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
define the title of plane selection page
public void title(){ textFont(select,30); fill(150); text("PLANE SELECT",482,72); fill(0); text("PLANE SELECT",480,70); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Title ()\n {\n\tTitle = new Panel ();\n\tTitle.setBackground (Color.white);\n\tchessboard (Title);\n\tp_screen.add (\"1\", Title);\n }", "private void setupTitle(){\n\t\tJLabel title = new JLabel(quiz_type.toString()+\": \"+parent_frame.getDataHandler().getLevelNames().get(parent_frame.getDataHandler().getCurrentLevel())); \n\t\ttitle.setFont(new Font(\"Arial Rounded MT Bold\", Font.BOLD, 65));\n\t\ttitle.setForeground(new Color(254, 157, 79));\n\t\ttitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tadd(title);\n\t\ttitle.setBounds(32, 24, 1136, 119);\n\t\ttitle.setOpaque(false);\n\t}", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(java.lang.String title);", "public void setTitle(String title) { this.title = title; }", "public void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(String title);", "void showTitle(String title);", "private void addTitle() {\n\t\tJXPanel titlePanel = new JXPanel();\n\t\ttitlePanel.setLayout(null);\n\t\ttitlePanel.setSize(180, 60);\n\t\ttitlePanel.setLocation(60, 10);\n\t\ttitlePanel.setToolTipText(\"www.i.hsr.ch\");\n\t\ttitlePanel.setBorder(new DropShadowBorder(new Color(0, 0, 0), 7, 0.5f, 12, true, true, true, true));\n\t\t\n\t\tJLabel title = GUIComponents.createLabel(YAETMMainView.PROGRAM, new Point(45, 12));\n\t\ttitle.setFont(new Font(\"Tahoma\", Font.BOLD, 25));\n\t\t\n\t\tJLabel titleExtend = GUIComponents.createLabel(YAETMMainView.PROGRAMEXT, new Point(10, 33));\n\t\ttitleExtend.setSize(200, 20);\n\t\ttitleExtend.setFont(new Font(\"Arial\", Font.PLAIN, 11));\n\t\t\n\t\ttitlePanel.add(titleExtend);\n\t\ttitlePanel.add(title);\n\t\tpanel.add(titlePanel);\n\t}", "public void setTitle(java.lang.String title);", "public void setTitlePanel() {\n\t\ttitleview = new TitlePanelView();\n\t\ttitleview.createView();\n\t\tnorthpanel.add(titleview.getView());\n\t\n\t}", "protected abstract void setTitle();", "public void setTitle(String title){\n this.title = title;\n }", "@Override\r\n\t\tpublic void setTitle(String title)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public void setTitle(String title){\n \tthis.title = title;\n }", "public void setTitle(String titleTemplate);", "public void display_title_screen() {\n parent.textAlign(CENTER);\n parent.textFont(myFont);\n parent.textSize(displayH/10);\n parent.fill(255, 255, 0);\n parent.text(\"PACMAN\", 0.5f*displayW, 0.3f*displayH);\n\n parent.image(maxusLogoImage, 0.5f*displayW, 0.4f*displayH);\n\n parent.textFont(myFont);\n parent.textSize(tileSize);\n parent.fill(180);\n parent.text(\"2013\", 0.5f*displayW, 0.45f*displayH);\n\n display_chase_animation();\n\n display_insert_coin_text();\n }", "public void setTitle(String title) {\r\n\tthis.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "@Override\n\tpublic void setTitle(String title) {\n\t\t\n\t}", "public Text createTitle() {\n\t\tText title = new Text(\"Selecteer Gasten\");\n\t\ttitle.getStyleClass().add(\"h1\");\n\t\ttitle.setFont(Font.font(22));\n\t\treturn title;\t\t\n\t}", "private void setTitle(java.lang.String title) {\n System.out.println(\"setting title \"+title);\n this.title = title;\n }", "public void setTitle(String title){\n\t\tthis.title = title;\n\t}", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n\tthis.title = title;\n}", "@Override\r\n\tpublic void getTitle() {\n\t\t\r\n\t}", "public void setTitle( String title )\n {\n _strTitle = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "@Override\n\tpublic void setTitle(java.lang.String title) {\n\t\t_esfTournament.setTitle(title);\n\t}", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void displayTitle() {\n\t\tthis.theScreen.setFont(Preferences.TITLE_FONT);\n\t\tthis.theScreen.setColor(Preferences.TITLE_COLOR);\n\t\tthis.theScreen.drawString(Preferences.TITLE,\n\t\t\t\tPreferences.TITLE_X, Preferences.TITLE_Y);\n\t}", "public void setTitle(Title title) {\r\n this.title = title;\r\n }", "TITLE createTITLE();", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n _title = title;\r\n }", "public void printTitle()\n {\n System.out.println(title);\n }", "protected void setTitle(String title) {\n this.title = title;\n }", "public static void printTitle( String title )\r\n {\n }", "public void prepareTitle()\n {\n DuelTitle title = new DuelTitle();\n addObject(title, 539, 186);\n }", "public void setTitle(java.lang.String value) {\n this.title = value;\n }", "public void setTitle(String title) {\n\t\tthis.title = title; \n\t}", "public void setTitle(String title){\n lblTitle.setText(title);\n }", "public void setTitle(String title)\n\t{\n\t\tthis.title = title;\n\t}", "@Override\n public void title()\n {\n }", "private void setWindowTitle(String title) {\n this.title = title;\n }", "String title();", "String title();", "@Override\n public void setTitle(String title) {\n this.title = title;\n }", "@Override\n\tprotected void initTitle() {\n\t\tsetTitleContent(R.string.tocash);\n\t\tsetBtnBack();\n\t}", "@Override\r\n\tpublic void setTitle(String title) {\n\t\tthis.title = title;\r\n\t}", "private String addTitle(StringBuilder finalText) {\n\t\t// One Parameter: DisplayName\n\t\tMainController.titleName = parameters[0];\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|title:\" + parameters[0]);\n\t\treturn tag.toString();\n\t}", "@Override\r\n\tpublic void getTitle(String title) {\n\t\t\r\n\t}", "public void setTitle(String title) {\r\n if (title != null) {\r\n this.title = title;\r\n }\r\n else{\r\n System.out.println(\"Not a valid title\");\r\n }\r\n }", "public void setTitle(java.lang.String title)\n {\n this.title = title;\n }", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "protected abstract String title ();", "private void constructTitlePanel() {\n titlePanel = new JPanel();\n titlePanel.setPreferredSize(relativeSize(0.8f, 0.03f));\n \n JLabel titleLabel = new JLabel(\"JMarkets Server Interface\");\n titleLabel.setFont(new Font(\"Arial\", Font.BOLD, 18));\n titleLabel.setForeground(new Color(102, 51, 0));\n \n titlePanel.add(titleLabel);\n }" ]
[ "0.73424226", "0.7155317", "0.71366525", "0.71366525", "0.71366525", "0.71366525", "0.71366525", "0.706285", "0.7057173", "0.7049115", "0.7049115", "0.7049115", "0.7026132", "0.6977054", "0.694878", "0.6946698", "0.6946119", "0.69339836", "0.6912738", "0.6904179", "0.68555677", "0.68402565", "0.6816622", "0.6815166", "0.6815166", "0.6802905", "0.67979664", "0.6791895", "0.67903507", "0.67897904", "0.67897904", "0.67897904", "0.6788667", "0.6788667", "0.6784674", "0.6784674", "0.6784674", "0.6784674", "0.6779386", "0.67736727", "0.6748627", "0.6735579", "0.6726622", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.6724851", "0.67117256", "0.67027813", "0.6701882", "0.6675896", "0.6675896", "0.6675896", "0.6675896", "0.6675896", "0.6673414", "0.66722935", "0.66698414", "0.66600233", "0.6653578", "0.6652032", "0.6642037", "0.6637939", "0.6635479", "0.6627945", "0.6606234", "0.66030824", "0.66030824", "0.6596393", "0.65949667", "0.6593968", "0.65884626", "0.6578514", "0.6577015", "0.6566099", "0.65575135", "0.65575135", "0.65575135", "0.65575135", "0.65575135", "0.65575135", "0.65575135", "0.65575135", "0.65575135", "0.6551729", "0.65487385" ]
0.7572281
0
Draw the feature of plane
public void feature(float x, float y){ fill(150); textFont(feature,12); text("LETHAL",x,y); text("DEFENSE",x,y+18); text("BOMB",x,y+36); text("AGILITY",x,y+54); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void draw_plane(Graphics g, int log_num, int i);", "public void mark_plane(Graphics g, int log_num, int x, int y, int h);", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "public abstract void drawFeature(GeoJSONFeature feature, BoundingBox boundingBox, byte zoomLevel, Canvas canvas, Point topLeftPoint);", "void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}", "public void drawUserPlane(Graphics g) {\r\n\t\tlevelManager.drawUserPlane(g);\r\n\t}", "Plane getPlane();", "public void draw()\n\t{\t\t\n\t\tArrayList<Segment> seg = new ArrayList<Segment>();\n\t\tfor(int i = 0; i < hullVertices.length - 1; i++)\n\t\t{\n\t\t\tSegment s = new Segment(hullVertices[i], hullVertices[i+1]);\n\t\t\tseg.add(s);\n\t\t}\n\t\tSegment s1 = new Segment(hullVertices[hullVertices.length-1], hullVertices[0]);\n\t\tseg.add(s1);\n\t\t// Based on Section 4.1, generate the line segments to draw for display of the convex hull.\n\t\t// Assign their number to numSegs, and store them in segments[] in the order.\n\t\tSegment[] segments = new Segment[seg.size()];\n\t\tfor(int i = 0; i < seg.size(); i++)\n\t\t{\n\t\t\tsegments[i] = seg.get(i);\n\t\t}\n\t\t// The following statement creates a window to display the convex hull.\n\t\tPlot.myFrame(pointsNoDuplicate, segments, getClass().getName());\n\t}", "void drawMyPoint(double x, double y, MapContent map, String nombre) { \n// SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();\n// builder.setName(\"MyFeatureType\");\n// builder.setCRS( DefaultGeographicCRS.WGS84 ); // set crs \n// builder.add(\"location\", Point.class); // add geometry\n//\n// // build the type\n// SimpleFeatureType TYPE = builder.buildFeatureType();\n//\n// // create features using the type defined\n// SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(TYPE);\n// org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();\n// org.locationtech.jts.geom.Point point = geometryFactory.createPoint(new Coordinate(x, y));\n// //\n// \n// //\n// featureBuilder.add(point);\n// SimpleFeature feature = featureBuilder.buildFeature(\"FeaturePoint\");\n// DefaultFeatureCollection featureCollection = new DefaultFeatureCollection(\"internal\", TYPE);\n// featureCollection.add(feature); // Add feature 1, 2, 3, etc\n//\n// Style style = SLD.createPointStyle(\"Star\", Color.BLUE, Color.BLUE, 0.3f, 200);\n// Layer layer = new FeatureLayer(featureCollection, style);\n// layer.setTitle(\"NewPointLayer\");\n// map.addLayer(layer);\n// //mapFrame.getMapPane().repaint();// MapPane.repaint();\n//}\n\tSimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();\n builder.setName(\"MyFeatureType\"); // \n builder.setCRS( DefaultGeographicCRS.WGS84 ); // set crs // Definimos las caracteristicas de tipo del punto q vamos a crear\n builder.add(\"location\", Point.class); // add geometry //\n org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); //objeto q usaremos para crear el punto\n Coordinate coord = new Coordinate( x,y ); //creamos la coordenada con los puntos pasados como parametros\n org.locationtech.jts.geom.Point point = geometryFactory.createPoint(coord); // Creamos el punto geometrico\n\nSimpleFeatureType pointtype = null; //definimos el typo de punto que necesitamos apra agregarlo a la capa del mapa\n try {\n pointtype = DataUtilities.createType(\"POINT\", \"geom:Point,name:String\");\n } catch (SchemaException ex) {\n Logger.getLogger(SelectionLab.class.getName()).log(Level.SEVERE, null, ex);\n }\nSimpleFeatureBuilder featureBuilderPoints = new SimpleFeatureBuilder(pointtype); //creamos el constructor de lo que agregaremos\nDefaultFeatureCollection collectionPoints = new DefaultFeatureCollection(\"internal\", pointtype); //creamos el contenedor donde pondremos lo que agregaremos\n//PointString Point=builder.createPointString(Point);\n//LineString Point = builder.createLineString(Point);\nfeatureBuilderPoints.add(point); //agregamos el punto en el constructor\nSimpleFeature featureLine = featureBuilderPoints.buildFeature(null); \n((DefaultFeatureCollection)collectionPoints).add(featureLine); \nStyle PointStyle = SLD.createPointStyle(\"circle\", Color.RED, Color.RED,(float) 0.5,(float) 10); //definimos el estilo del punto (icono, color contorno, color, opacidad y tamaño)\n//Obserervacion: el dibujo del punto siempre se mantiene del mismo tamaño por mas que se use el zoom\nmap.addLayer(new FeatureLayer(collectionPoints, PointStyle)); //agregamos el punto a la capa\n\nguardarCoordenadas(nombre,x,y);\n}", "public void draw() {\n \n }", "public void draw() {\r\n /* DO NOT MODIFY */\r\n StdDraw.point(x, y);\r\n }", "@Override\n\tpublic void onDrawFrame(GL10 gl) {\n\n\t\tgl.glClear(GL10.GL_COLOR_BUFFER_BIT);\n\t\tgl.glLineWidth(3);\n\t\t// gl.glPointSize(10);\n\t\tgl.glEnable(GL10.GL_POINT_SMOOTH);\n\t\tray.dibuja(gl);\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tif (m[i][j] != 0) {\n\t\t\t\t\tif (m[i][j]==1) {\n\t\t\t\t\t\tif(i==0 && j==0)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,0);\n\t\t\t\t\t\tif(i==0 && j==1)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,1);\n\t\t\t\t\t\tif(i==0 && j==2)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,2);\n\t\t\t\t\t\tif(i==1 && j==0)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,3);\n\t\t\t\t\t\tif(i==1 && j==1)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,4);\n\t\t\t\t\t\tif(i==1 && j==2)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,5);\n\t\t\t\t\t\tif(i==2 && j==0)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,6);\n\t\t\t\t\t\tif(i==2 && j==1)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,7);\n\t\t\t\t\t\tif(i==2 && j==2)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,8);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(i==0 && j==0)\n\t\t\t\t\t\t\tcruz.dibuja(gl,0);\n\t\t\t\t\t\tif(i==0 && j==1)\n\t\t\t\t\t\t\tcruz.dibuja(gl,1);\n\t\t\t\t\t\tif(i==0 && j==2)\n\t\t\t\t\t\t\tcruz.dibuja(gl,2);\n\t\t\t\t\t\tif(i==1 && j==0)\n\t\t\t\t\t\t\tcruz.dibuja(gl,3);\n\t\t\t\t\t\tif(i==1 && j==1)\n\t\t\t\t\t\t\tcruz.dibuja(gl,4);\n\t\t\t\t\t\tif(i==1 && j==2)\n\t\t\t\t\t\t\tcruz.dibuja(gl,5);\n\t\t\t\t\t\tif(i==2 && j==0)\n\t\t\t\t\t\t\tcruz.dibuja(gl,6);\n\t\t\t\t\t\tif(i==2 && j==1)\n\t\t\t\t\t\t\tcruz.dibuja(gl,7);\n\t\t\t\t\t\tif(i==2 && j==2)\n\t\t\t\t\t\t\tcruz.dibuja(gl,8);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t/*if(sw){\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tcruz.dibuja(gl);\n\t\t\t\t\t}*/\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制矩形\");\n\t\t\n\t}", "public Plane() {\r\n\t\tvecX = new Vector3D();\r\n\t\tvecY = new Vector3D();\r\n\t\tnorm = new Vector3D();\r\n\t\tthis.setD(0);\r\n\t\tpos = new Position3D();\r\n\t}", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制三角形\");\t\n\t}", "@Override\n\tpublic String draw() {\n\t\treturn \"Geometry Draws\";\n\t}", "public void draw();", "public void draw();", "public void draw();", "public void drawControlPolygon() {\n\t\t//this.frame.stroke(255, 0, 0);\n\t\tfor(int i=0;i<points.length;i++) {\n\t\t\tfor(int j=0;j<points[i].length;j++)\n\t\t\t\tthis.frame.drawVertex(points[i][j]);\n\t\t}\n\t}", "public void display(GLAutoDrawable drawable){\n GL4 gl = (GL4) GLContext.getCurrentGL();\n \n gl.glClear(GL_DEPTH_BUFFER_BIT);\n \n // not needed if bkg is black\n float bkg[] = { 1.0f, 1.0f, 1.0f, 1.0f };\n FloatBuffer bkgBuffer = Buffers.newDirectFloatBuffer(bkg);\n gl.glClearBufferfv(GL_COLOR, 0, bkgBuffer);\n\n \n gl.glUseProgram(rendering_program); // loads program from init with the two shaders\n \n // define perspective matrix \n //perspective\n float aspect = (float) myCanvas.getWidth()/(float) myCanvas.getHeight();\n Matrix3D pMat = this.perspectiveMethod(60.0f, aspect, 0.1f, 100.0f);\t\t//for persective projection /zentrische Projektion\n Matrix3D oMat = this.orthographicMethod(1.0f, -1.0f, 1.0f, -1.0f, 0.1f, 100.0f); //for orthographic projection\n \n \n //copy perspective and MV matricies to corressponding uniform variables\n int mv_loc = gl.glGetUniformLocation(rendering_program, \"mv_matrix\");\n int proj_loc = gl.glGetUniformLocation(rendering_program, \"proj_matrix\");\n \n //build view matrix\n Matrix3D vMat = new Matrix3D();\n vMat.translate(-cameraX, -cameraY, -cameraZ);\n \n //build model matrix\n Matrix3D mMat = new Matrix3D(); //for right now we dont do anything (rotate, translate etc.) in with the mMat in this project\n\n Matrix3D mvMat = new Matrix3D();\n mvMat.concatenate(vMat);\t\t\t//first view matrix \n mvMat.concatenate(mMat);\t\t\t//second we put the model matrix on it (A * B)\n \n\n //plug the mvMat and pMat into the shader uniform variables \n gl.glUniformMatrix4fv(mv_loc, 1, false, mvMat.getFloatValues(),0);\n gl.glUniformMatrix4fv(proj_loc, 1, false, pMat.getFloatValues(),0);\n \n \n //be sure to bind the vbo before assigning the attribute pointer\n gl.glBindBuffer(GL_ARRAY_BUFFER, vbo[0]); \n // now set the \"location = 0\" info in the shaders to the point info from vbo[0]\n gl.glVertexAttribPointer(0, 3, GL_FLOAT, false, 0, 0);\n gl.glEnableVertexAttribArray(0);\n \n gl.glBindBuffer(GL_ARRAY_BUFFER, vbo[1]);\n gl.glVertexAttribPointer(1, 3, GL_FLOAT, false, 0, 0);\n gl.glEnableVertexAttribArray(1);\n \n gl.glLineWidth(10.0f);\n \n gl.glEnable(GL_DEPTH_TEST);\n gl.glDrawArrays(GL_LINES, 0, 4);\n\n }", "public void draw() {\n background(255);\n pushMatrix();\n translate(width/2,height/2+20,-160);\n rotateX(PI/3);\n rotateZ(theta);\n land.render(); \n popMatrix();\n\n land.calculate();\n \n theta += 0.0025f;\n}", "@Override\n protected void beforeDraw(UI ui, PGraphics pg) {\n pointLight(0, 0, 40, model.cx, model.cy, LengthUnit.FOOT.toMillimetres(-20L));\n pointLight(0, 0, 50, model.cx, model.yMax + LengthUnit.FOOT.toMillimetres(10L), model.cz);\n pointLight(0, 0, 20, model.cx, model.yMin - LengthUnit.FOOT.toMillimetres(10L), model.cz);\n //hint(ENABLE_DEPTH_TEST);\n }", "@Override\n public void display() {\n EasyViewer.beginOverlay();\n \n glColor4d( 0,1,0,alpha.getValue() );\n glLineWidth(2); \n glBegin( GL_LINE_STRIP );\n for ( int i = 0; i < 10; i++) {\n glVertex2d( 200 + i*10, 100 +i*i );\n }\n glEnd();\n \n glColor4d( 1,0,0,alpha.getValue() );\n glPointSize(5);\n glBegin( GL_POINTS );\n for ( int i = 0; i < 10; i++) {\n glVertex2d( 200 + i*10, 100+i*i );\n } \n glEnd();\n \n \n // lets draw some 2D text\n// glColor4d( 1,1,1,1 ); \n// EasyViewer.printTextLines( \"(100,100)\", 100, 100, 12, GLUT.BITMAP_HELVETICA_10 );\n// glRasterPos2d( 200, 200 );\n// EasyViewer.printTextLines( \"(200,200)\\ncan have a second line of text\", 200, 200, 12, GLUT.BITMAP_HELVETICA_10 );\n \n EasyViewer.endOverlay();\n \n }", "public void draw() {\n \n // TODO\n }", "private void plotEdgeFeatures()\n\t{\n\t\tfinal List< DefaultWeightedEdge > edges = new ArrayList< >();\n\t\tfor ( final Integer trackID : trackmate.getModel().getTrackModel().trackIDs( true ) )\n\t\t{\n\t\t\tedges.addAll( trackmate.getModel().getTrackModel().trackEdges( trackID ) );\n\t\t}\n\t\t// Prepare grapher\n\t\tfinal String xFeature = edgeFeatureSelectionPanel.getXKey();\n\t\tfinal Set< String > yFeatures = edgeFeatureSelectionPanel.getYKeys();\n\t\tfinal EdgeFeatureGrapher grapher = new EdgeFeatureGrapher( xFeature, yFeatures, edges, trackmate.getModel() );\n\t\tgrapher.render();\n\t}", "public CheckPlane( Vector p, Vector n, Vector o )\n\t{\n\t\tsuper(p,n,new Color());\n\t\tsetOrientation(o);\n\t\tsetColor( new Color(0.01,0.01,0.01), new Color(0.99,0.99,0.99) );\n\t}", "void draw();", "public void drawElement(GL10 gl){\n\t\tgl.glTranslatef(x, y, 0);\n\t\tbaseDrawElement(gl);\n\t\tgl.glTranslatef(-x, -y, 0);\n//\t\tgl.glColor4f(1, 1, 1, 1);\n\t}", "@Override\n public void draw() {\n /** preparacion de la ventana **/\n background(255);\n lights();\n directionalLight(40, 90, 100, 1, 40, 40);\n\n translate(origin.x,origin.y);\n scale(zoom);\n\n\n /** entrada del usuario **/\n userInput();\n /** ejes X Y Z **/\n drawAxes();\n /** aplicar ik **/\n writePos();\n\n /** escala de los objetos**/\n scale(-1.2f);\n\n /** esfera que muestra la posicion en coord X Y Z\n *\n * X -> coord[0]\n * Y -> coord[1]\n * Z -> coord[2]\n *\n * **/\n pushMatrix();\n noStroke();\n fill(250, 100, 1);\n translate(-coord_cartesian[1] ,-coord_cartesian[2] -11,-coord_cartesian[0] );\n sphere(2);\n popMatrix();\n\n\n /**\n * Dibuja el brazo\n */\n pushMatrix();\n arm.drawArm();\n popMatrix();\n }", "public void previewOglRender();", "public void draw(){\n }", "public void draw() {\n }", "public void draw() {\n\n }", "@Override\n public void drawPointCloud(PVector[] depthMap) {\n\n ArrayList<QuickHull3D> hulls = new ArrayList<QuickHull3D>();\n ArrayList<Point3d> points = new ArrayList<Point3d>();\n PVector oldVector = depthMap[0];\n QuickHull3D myHull = new QuickHull3D();\n\n for (int i = 1; i < depthMap.length; i++) {\n PVector myVector = depthMap[i];\n\n if (myVector.dist(oldVector) > 500) {\n if (points.size() > 10) {\n try {\n myHull.build(points.toArray(new Point3d[points.size()]));\n } catch(IllegalArgumentException e) {\n\n }\n hulls.add(myHull);\n myHull = new QuickHull3D();\n }\n points.clear();\n }\n\n if (myVector.z < 3000) {\n points.add(new Point3d(myVector.x, myVector.y, myVector.z));\n\n oldVector = myVector;\n }\n }\n\n// Point3d[] points = new Point3d[depthMap.length];\n// for (int i = 0; i < depthMap.length; i++) {\n// PVector vector = depthMap[i];\n// points[i] = new Point3d(vector.x, vector.y, vector.z);\n// }\n// hull.build(points);\n\n p5.fill(255, 50);\n p5.stroke(255, 70);\n\n for (QuickHull3D hull : hulls) {\n int[][] faceIndices = hull.getFaces();\n for (int i = 0; i < faceIndices.length; i++) {\n p5.beginShape();\n for (int k = 0; k < faceIndices[i].length; k++) {\n Point3d point = hull.getVertices()[faceIndices[i][k]];\n p5.vertex((float) point.x, (float) point.y, (float) point.z);\n }\n p5.endShape();\n }\n }\n\n// PApplet.println(hull.getNumFaces());\n }", "public void draw() {\t\t\n\t\ttexture.draw(x, y);\n\t\tstructure.getTexture().draw(x,y);\n\t}", "public static void main( String args[] )\n {\n JFrame f = new JFrame(\"Test for AltAzController\");\n f.setBounds(0,0,200,200);\n AltAzController controller = new AltAzController();\n// controller.setVirtualScreenSize( 2, 2 );\n f.getContentPane().add( controller );\n f.setVisible( true );\n\n\n JFrame window = new JFrame(\"Test for AltAzController\");\n window.setBounds(20,20,500,500);\n ThreeD_JPanel test = new ThreeD_JPanel();\n window.getContentPane().add( test );\n window.setVisible( true );\n\n controller.addControlledPanel( test );\n IThreeD_Object objs[] = new IThreeD_Object[6];\n Vector3D pts[] = new Vector3D[6];\n pts[0] = new Vector3D( -1, 1, 0 );\n pts[1] = new Vector3D( 1, 1, 0 );\n pts[2] = new Vector3D( 1, 1, 1 );\n pts[3] = new Vector3D( 1, 1, 0 );\n pts[4] = new Vector3D( 1, -1, 0 );\n pts[5] = new Vector3D( -1, -1, 0 );\n objs[0] = new Polyline( pts, Color.CYAN );\n\n pts = new Vector3D[2];\n pts[0] = new Vector3D( 0, 0, 0 );\n pts[1] = new Vector3D( 1, 0, 0 );\n objs[1] = new Polyline( pts, Color.RED );\n\n pts = new Vector3D[2];\n pts[0] = new Vector3D( 0, 0, 0 );\n pts[1] = new Vector3D( 0, 1, 0 );\n objs[2] = new Polyline( pts, Color.GREEN );\n\n pts = new Vector3D[2];\n pts[0] = new Vector3D( 0, 0, 0 );\n pts[1] = new Vector3D( 0, 0, 1 );\n objs[3] = new Polyline( pts, Color.BLUE );\n\n Vector3D center = new Vector3D( -1, -1, 1 );\n Vector3D x_vec = new Vector3D( -1, 1, 0 );\n Vector3D y_vec = new Vector3D( 0, 0, 1 );\n float width = 3;\n float height = 2;\n Color[][] colors = { { Color.RED, Color.GREEN, Color.BLUE },\n { Color.YELLOW, Color.CYAN, Color.MAGENTA },\n { Color.ORANGE, Color.GRAY, Color.WHITE } };\n\n ImageRectangle1 im_rect = new ImageRectangle1( center,\n x_vec,\n y_vec,\n width,\n height,\n colors );\n objs[4] = im_rect;\n\n\n center = new Vector3D( 1, 1, 1 );\n y_vec = new Vector3D( 1, 1, 0 );\n x_vec = new Vector3D( 1, -1, 0 );\n width = 2;\n height = 4;\n Color[][] colors_2 = { { Color.RED, Color.GREEN, Color.BLUE },\n { Color.YELLOW, Color.CYAN, Color.MAGENTA } };\n\n ImageRectangle1 im_rect_2 = new ImageRectangle1( center,\n x_vec,\n y_vec,\n width,\n height,\n colors_2 );\n objs[5] = im_rect_2;\n\n\n test.setObjects( \"SAMPLE_OBJECTS\", objs );\n\n controller.apply( true );\n }", "public void draw(){\n\t\tcomponent.draw();\r\n\t}", "public void draw() {\n\t\t\tfloat[] vertices = new float[mVertices.size()];\n\t\t\tfor (int i = 0; i < vertices.length; i++)\n\t\t\t\tvertices[i] = mVertices.get(i);\n\t\t\t\n\t\t\tfloat[] textureCoords = null;\n\t\t\tif (mTextureID != 0) {\n\t\t\t\ttextureCoords = new float[mTextureCoords.size()];\n\t\t\t\tfor (int i = 0; i < textureCoords.length; i++)\n\t\t\t\t\ttextureCoords[i] = mTextureCoords.get(i);\n\t\t\t}\n\t\t\t\n\t\t\tshort[] indices = new short[mIndices.size()];\n\t\t\tfor (int i = 0; i < indices.length; i++)\n\t\t\t\tindices[i] = mIndices.get(i);\n\t\t\t\n\t\t\t// Get OpenGL\n\t\t\tGL10 gl = GameGraphics2D.this.mGL;\n\t\t\t\n\t\t\t// Set render state\n\t\t\tgl.glDisable(GL10.GL_LIGHTING);\n\t\t\tgl.glEnable(GL10.GL_DEPTH_TEST);\n\t\t\tgl.glEnable(GL10.GL_BLEND);\n\n\t\t\tif (mBlendingMode == BLENDING_MODE.ALPHA)\n\t\t\t\tgl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);\n\t\t\telse if (mBlendingMode == BLENDING_MODE.ADDITIVE)\n\t\t\t\tgl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE);\n\t\t\t\n\t\t\tif (mTextureID != 0)\n\t\t\t\tgl.glEnable(GL10.GL_TEXTURE_2D);\n\t\t\telse\n\t\t\t\tgl.glDisable(GL10.GL_TEXTURE_2D);\n\t\t\t\n\t\t\t// Draw the batch of textured triangles\n\t\t\tgl.glColor4f(Color.red(mColour) / 255.0f,\n\t\t\t\t\t\t Color.green(mColour) / 255.0f,\n\t\t\t\t\t\t Color.blue(mColour) / 255.0f,\n\t\t\t\t\t\t Color.alpha(mColour) / 255.0f);\n\t\t\t\n\t\t\tif (mTextureID != 0) {\n\t\t\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID);\n\t\t\t\tgl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, GameGraphics.getFloatBuffer(textureCoords));\n\t\t\t}\n\t\t\t\n\t\t\tgl.glVertexPointer(3, GL10.GL_FLOAT, 0, GameGraphics.getFloatBuffer(vertices));\n\t\t\tgl.glDrawElements(GL10.GL_TRIANGLES, indices.length,\n\t\t\t\t\tGL10.GL_UNSIGNED_SHORT, GameGraphics.getShortBuffer(indices));\n\t\t}", "public void draw() {\r\n\t\tfor(int i=0; i<2; i++) {\r\n\t\t\trenderer[i].setView(camera[i]);\r\n\t\t\trenderer[i].render();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tPoint p = this.getP();\r\n\t\tint start_point = p.getX();\r\n\t\tint end_point = p.getY();\r\n\t\t\r\n\t\tint width = this.getWidth();\r\n\t\tint height = this.getHeight();\r\n\t\t\r\n\t\tSystem.out.println(\"�l�p�`��`�� �_(\" + start_point +\",\"+ end_point + \")����Ƃ��āA��\"+ width +\"����\"+ height +\"�̎l�p�`\");\r\n\t}", "private void HabVue(Feature feat)\n {\n StyleMap styleMap = feat.createAndAddStyleMap();\n\n //Create the style for normal edge.\n Pair pNormal = styleMap.createAndAddPair();\n Style normalStyle = pNormal.createAndSetStyle();\n pNormal.setKey(StyleState.NORMAL);\n\n LineStyle normalLineStyle =\n normalStyle.createAndSetLineStyle();\n normalLineStyle.setColor(\"YELLOW\");\n normalLineStyle.setWidth(2);\n\n\n //Create the style for highlighted edge.\n Pair pHighlight = styleMap.createAndAddPair();\n Style highlightStyle = pHighlight.createAndSetStyle();\n pHighlight.setKey(StyleState.HIGHLIGHT);\n\n LineStyle highlightLineStyle =\n highlightStyle.createAndSetLineStyle();\n highlightLineStyle.setColor(\"WHITE\");\n \n highlightLineStyle.setWidth(1);\n\n }", "public void draw()\n\t{\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, texture_id);\n\t\tdrawMesh(gl);\n\t}", "protected void drawImpl()\n {\n if (mode == 2) {\n // Invader\n background(0);\n noStroke();\n int triangleXDensity = 32;\n int triangleYDensity = 18;\n for (int i = 0; i < triangleXDensity + 100; i++) {\n for (int j = 0; j < triangleYDensity + 100; j++) {\n float value = scaledBandLevels[(i % scaledBandLevels.length)];\n float shapeSize = map(value, 0, 255, 0, 150);\n int currentX = (width/triangleXDensity) * i;\n int currentY = (int)(((height/triangleYDensity) * j));\n\n if (subMode == 1) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 3));\n }\n else if (subMode == 3) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 6));\n }\n\n if (subMode == 4) {\n shapeSize = map(value, 0, 255, 0, 500);\n }\n\n if ((i + j) % (int)random(1,5) == 0) {\n fill(0, 255, 255);\n }\n else {\n fill(234,100,255);\n }\n pushMatrix();\n if (subMode == 2) {\n translate(width/2, height/2);\n rotate(radians(frameCount % value * 2));\n translate(-width/2, -height/2);\n }\n triangle(currentX, currentY - shapeSize/2, currentX - shapeSize/2, currentY + shapeSize/2, currentX + shapeSize/2, currentY + shapeSize/2);\n popMatrix();\n }\n }\n\n }\n else if (mode == 5) {\n // Mirror Ball\n background(0);\n translate(width/2, height/2, 500);\n noStroke();\n if (subMode == 0) {\n rotateY(frameCount * PI/800);\n }\n else if (subMode == 1 || subMode == 2) {\n rotateY(frameCount * PI/800);\n rotateX(frameCount * PI/100);\n }\n else if (subMode == 3) {\n rotateY(frameCount * PI/400);\n }\n\n for (int i = 0; i < 100; i++) {\n for (int j = 0; j < 100; j++) {\n rotateY((2*PI/200) * j);\n pushMatrix();\n rotateX((2*PI/200) * i);\n translate(0,200);\n if (j > 50 && j < 150) {\n rotateX(PI/2);\n }\n else {\n rotateX(-PI/2);\n }\n if (subMode == 2 || subMode == 3) {\n fill(i * 2, 0, j, scaledBandLevels[i % scaledBandLevels.length] * 2);\n }\n else {\n fill(255, scaledBandLevels[i % scaledBandLevels.length]);\n }\n rect(0,200,20,20);\n popMatrix();\n }\n }\n }\n else if (mode == 8) {\n // End To Begin\n background(0);\n\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i] && modSizes[i] < 60) {\n modSizes[i]+=2;\n }\n else if (modSizes[i] > 5) {\n modSizes[i]--;\n }\n }\n \n theta += .2;\n\n if (subMode >=3) {\n theta += .6;\n }\n\n float tempAngle = theta;\n for (int i = 0; i < yvalues.length; i++) {\n yvalues[i] = sin(tempAngle)*amplitude;\n tempAngle+=dx;\n }\n\n noStroke();\n if (subMode >= 4) {\n translate(0, height/2);\n }\n int currentFrameCount = frameCount;\n for (int x = 0; x < yvalues.length; x++) {\n if (subMode >= 4) {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length] * 3);\n rotateX(currentFrameCount * (PI/200));\n }\n else {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length]);\n }\n ellipse(x*xspacing - period/2, height/2+yvalues[x], modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n if (subMode >= 1) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n if (subMode >= 2) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n }\n }\n else if (mode == 1) {\n // Life Support\n background(0);\n noStroke();\n if (trigger) { \n if (subMode == 0) {\n fill(255, 0, 0, triggerHold - (triggerCount * 4));\n }\n else if (subMode == 1) {\n fill(255, triggerHold - (triggerCount * 4));\n }\n rect(0,0,width,height);\n if (triggerCount > triggerHold) {\n trigger = false;\n triggerCount = 1;\n }\n else {\n triggerCount++;\n }\n }\n }\n else if (mode == 6) {\n // Stacking Cards\n background(255);\n if (subMode >= 1) {\n translate(width/2, 0);\n rotateY(frameCount * PI/200);\n }\n imageMode(CENTER);\n\n if (subMode <= 1) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=40;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n else if (subMode == 2) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 4; j++) {\n rotateY(j * (PI/4));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 3) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 4) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int k = 0; k < height; k+= 300) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), k, modSizes[i], modSizes[i]);\n }\n }\n }\n }\n } \n else if (mode == 4) {\n background(0);\n noStroke();\n for (int i = 0; i < letterStrings.length; i++) { \n if (subMode == 0) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), (height/2) + 75);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, (height/2) + 75);\n }\n }\n else if (subMode == 1) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100; j < height + 100; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 2) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100 - (frameCount % 400); j < height + 600; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 3) {\n for (int j = -100; j < height + 100; j+=200) {\n if (random(0,1) < .5) {\n fill(0,250,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n else {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n }\n }\n else if (mode == 9) {\n background(0);\n noStroke();\n fill(234,100,255);\n String bandName = \"ELAPHANT\";\n text(bandName, (width/2) - (textWidth(bandName)/2), (height/2) + 75);\n }\n else {\n background(0);\n }\n }", "private static void setPlane(){\n // your code goes there\n LinearRegression linG;\n linG = new LinearRegression(2,2000);\n\n for(double i = 0; i < 1000; i+=1)\n {\n double[] pt1, pt2;\n pt1 = new double[2];\n pt2 = new double[2];\n\n pt1[0] = i;\n pt2[0] = 2.0*i;\n\n pt1[1] = 2.0*i;\n pt2[1] = i;\n\n linG.addSample(pt1,5.0*i);\n linG.addSample(pt2,4.0*i);\n }\n \n\n System.out.println(\"Current hypothesis :\" + linG.currentHypothesis());\n System.out.println(\"Current cost :\" + linG.currentCost());\n\n for(int i = 1; i <= 10; i++)\n {\n linG.gradientDescent(0.000000003,1000);\n\n System.out.println(\"Current hypothesis :\" + linG.currentHypothesis());\n System.out.println(\"Current cost :\" + linG.currentCost());\n }\n\t}", "public static void printPlane(char[][]plane){\n for(int i = 0; i < plane.length; i++){\n //prints out row number\n System.out.print((i + 1) + \" \");\n \n for(int j = 0; j < plane[0].length; j++){\n System.out.print(plane[i][j] + \" \");\n //print extra space\n if(j == 1)\n System.out.print(\" \");\n }\n System.out.println();\n }\n }", "public Plane(Point origin, Vector normal) {\n\t\tthis(origin, normal, new Color((int) (Math.random() * 256),\n\t\t\t\t(int) (Math.random() * 256), (int) (Math.random() * 256)));\n\t}", "public String getPlaneName() {\n return PlaneName;\n }", "public void draw(Frame frame) {\n\t\t// Draw vehicle corner points.\n\t\tif (this.points != null) {\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tif (this.points[i] == null) continue;\n\t\t\t\tImgproc.circle(frame.getSource(), this.points[i], 3, new Scalar(0, 0, 255));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Draw the vehicles back point.\n\t\tif (this.back != null) {\n\t\t\tImgproc.circle(frame.getSource(), this.back, 3, new Scalar(0, 0, 255));\n\t\t}\n\t\t\n\t\t// Draw the vehicles front point.\n\t\tif (this.front != null) {\n\t\t\tImgproc.circle(frame.getSource(), this.front, 6, new Scalar(0, 0, 255));\n\t\t}\n\t\t\n\t\t// Draw the vehicles center point.\n\t\tif (this.center != null) {\n\t\t\tImgproc.circle(frame.getSource(), this.center, 3, new Scalar(255, 0, 0), Imgproc.FILLED);\n\t\t}\n\t}", "public double getPlaneX()\n {\n return planeX;\n }", "protected DrawSurface() {\n\t\taiDrawingOrder = new Object[] { RANGE_CURSOR_DRAWSURFACE, GRID_DRAWSURFACE, GRAPH_DRAWSURFACE,\n\t\t\t\tCURSOR_DRAWSURFACE, ZOOM_DRAWSURFACE, };\n\n\t\t// we know that we paint all our own pixels.\n\t\tsetOpaque(false);\n\n\t\t// default background\n\t\tsetBackground(Color.BLACK);\n\n\t\t// give us the same default front as a JPanel\n\t\tsetFont(UIManager.getFont(\"Panel.font\"));\n\n\t\t/*\n\t\t * We create our own cursor because the default cross-hair cursor has\n\t\t * some weird display issues - it seems to fade into some waterfall\n\t\t * graphs, and seems to interact with the green FFT line to produce red\n\t\t * pixels. Weird.\n\t\t */\n\t\tsetCursor(DEFAULT_CROSSHAIR_CURSOR);\n\n\t\tPeralexLibsBundle.addLocaleListener(this); // do after components have\n\t\t\t\t\t\t\t\t\t\t\t\t\t// been initialised\n\t}", "@Override\r\n public void draw() {\n }", "public void drawFloor() {\r\n GLES20.glUseProgram(program);\r\n\r\n // Set ModelView, MVP, position, normals, and color.\r\n GLES20.glUniform3fv(lightPosParam, 1, lightPosInEyeSpace, 0);\r\n GLES20.glUniformMatrix4fv(modelParam, 1, false, model, 0);\r\n GLES20.glUniformMatrix4fv(modelViewParam, 1, false, modelView, 0);\r\n GLES20.glUniformMatrix4fv(modelViewProjectionParam, 1, false, modelViewProjection, 0);\r\n GLES20.glVertexAttribPointer(positionParam, COORDS_PER_VERTEX, GLES20.GL_FLOAT, false, 0, vertices);\r\n GLES20.glVertexAttribPointer(normalParam, 3, GLES20.GL_FLOAT, false, 0, normals);\r\n GLES20.glVertexAttribPointer(colorParam, 4, GLES20.GL_FLOAT, false, 0, colors);\r\n\r\n GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 6);\r\n\r\n checkGLError(\"drawing floor\");\r\n }", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "public void draw(float f, int width, int height) {\n\t\t/**Draw whatever Hud or Menu is currently active**/\n\t\tsetUIProjection();\n\t\tglDisable(GL_CULL_FACE);\n\t\tglDisable(GL_DEPTH_TEST);\n\t\t\n\t\tif(engine.game.menuOpen)\n\t\t\tengine.game.menu.draw(f, width, height);\n\t\tif(engine.game.consoleOpen)\n\t\t\tengine.game.console.draw(f, width, height);\n\t\t\n\t\tglEnable(GL_DEPTH_TEST);\n\t\tglEnable(GL_CULL_FACE);\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Triangle was drawing.\");\r\n\t\tSystem.out.println(\"new line\");\r\n\t\tSystem.out.println(\"second line \");\r\n\t\t//add comments\r\n\t\t// add more comments \r\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "void drawShape() {\n System.out.println(\"Drawing Triangle\");\n this.color.addColor();\n }", "public void onDrawFrame(GL10 unused) {\n\n \tGLES20.glClearColor(0.5f,0.5f,0.5f,0.5f);\n GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);\n \n GLES20.glEnable(GLES20.GL_DEPTH_TEST);\n\n \t//GLES20.glCullFace(GLES20.GL_BACK);\n\n /* Update MVP matrix */\n\n mat4 mvp = mProj\n \t.mul(mat4.translation(0.0f, 0.0f, -5.0f))\n \t.mul(mat4.rotateY(-mAngleX))\n \t.mul(mat4.rotateX(mAngleY));\n \t\n \n // Add program to OpenGL environment\n GLES20.glUseProgram(mProgram);\n \n /* Set model view projection matrix */\n GLES20.glUniformMatrix4fv(muMVPHandle, 1, false, mvp.f(), 0);\n \n /*\n * Now we're ready to draw some 3D objects\n */\n mCube.draw(maPositionHandle, maColorHandle);\n }", "public void show() {\r\n\t\tif ((polygon.npoints > 1)\r\n\t\t\t\t&& ((polygon.xpoints[0] != polygon.xpoints[1]) || (polygon.ypoints[0] != polygon.ypoints[1]))) {\r\n\t\t\tGraphics2D gr = (Graphics2D) graphics;\r\n\t\t\tgr.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\r\n\t\t\tgr.setPaint(colorPar.getDevColor());\r\n\t\t\tgr.setStroke(new BasicStroke((float) lineWidth));\r\n\t\t\tPolygon p = isTransformed ? transformed() : polygon;\r\n\t\t\tGeneralPath gp = new GeneralPath();\r\n\t\t\tgp.moveTo((float) (p.xpoints[0]), (float) (p.ypoints[0]));\r\n\t\t\tfor (int i = 1; i < p.npoints; i++) {\r\n\t\t\t\tgp.lineTo((float) (p.xpoints[i]), (float) (p.ypoints[i]));\r\n\t\t\t}\r\n\t\t\tgr.draw(gp);\r\n\t\t\tif (validBounds) {\r\n\t\t\t\tsetBounds(gp.getBounds());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void draw() {\r\n background(255);\r\n\r\n float mouseXFactor = map(mouseX, 0, width, 0.05f, 1);\r\n float mouseYFactor = map(mouseY, 0, height, 0.05f, 1);\r\n\r\n for (int gridX = 0; gridX < img.width; gridX++) {\r\n for (int gridY = 0; gridY < img.height; gridY++) {\r\n // grid position + tile size\r\n float tileWidth = width / (float) img.width;\r\n float tileHeight = height / (float) img.height;\r\n float posX = tileWidth * gridX;\r\n float posY = tileHeight * gridY;\r\n\r\n // get current color\r\n int c = pixelArray[gridX][gridY];\r\n\r\n // greyscale conversion\r\n int greyscale = round(red(c) * 0.222f + green(c) * 0.707f + blue(c) * 0.071f);\r\n\r\n if (drawMode == 1) {\r\n // greyscale to ellipse area\r\n fill(0);\r\n noStroke();\r\n float r2 = 1.1284f * sqrt(tileWidth * tileWidth * (1 - greyscale / 255.0f));\r\n r2 = r2 * mouseXFactor * 3;\r\n ellipse(posX, posY, r2, r2);\r\n } else if (drawMode == 2) {\r\n // greyscale to rotation, line length and stroke weight\r\n stroke(0);\r\n float w4 = map(greyscale, 0, 255, 10, 0);\r\n strokeWeight(w4 * mouseXFactor + 0.1f);\r\n float l4 = map(greyscale, 0, 255, 35, 0);\r\n l4 = l4 * mouseYFactor;\r\n pushMatrix();\r\n translate(posX, posY);\r\n rotate(greyscale / 255.0f * PI);\r\n line(0, 0, 0 + l4, 0 + l4);\r\n popMatrix();\r\n } else if (drawMode == 3) {\r\n // greyscale to line relief\r\n float w5 = map(greyscale, 0, 255, 5, 0.2f);\r\n strokeWeight(w5 * mouseYFactor + 0.1f);\r\n // get neighbour pixel, limit it to image width\r\n int /* color */ c2 = img.get(min(gridX + 1, img.width - 1), gridY);\r\n stroke(c2);\r\n int greyscale2 = (int) (red(c2) * 0.222f + green(c2) * 0.707f + blue(c2) * 0.071f);\r\n float h5 = 50 * mouseXFactor;\r\n float d1 = map(greyscale, 0, 255, h5, 0);\r\n float d2 = map(greyscale2, 0, 255, h5, 0);\r\n line(posX - d1, posY + d1, posX + tileWidth - d2, posY + d2);\r\n } else if (drawMode == 4) {\r\n // pixel color to fill, greyscale to ellipse size\r\n float w6 = map(greyscale, 0, 255, 25, 0);\r\n noStroke();\r\n fill(c);\r\n ellipse(posX, posY, w6 * mouseXFactor, w6 * mouseXFactor);\r\n // TODO 2: Add the following: if(Math.random()<0.1) {pixelArray[gridX][gridY] = lerpColor(c,0xff0000, 0.1f);}\r\n } else if (drawMode == 5) {\r\n stroke(c);\r\n float w7 = map(greyscale, 0, 255, 5, 0.1f);\r\n strokeWeight(w7);\r\n fill(255, 255 * mouseXFactor);\r\n pushMatrix();\r\n translate(posX, posY);\r\n rotate(greyscale / 255.0f * PI * mouseYFactor);\r\n rect(0, 0, 15, 15);\r\n popMatrix();\r\n }\r\n /*\r\n * TODO 3: Add a drawMode == 6 case. \r\n * Try modifying the pixelArray \r\n * Try drawing shapes or colors depending on c and grayscale variables \r\n * Try adding other forms of animation\r\n */\r\n }\r\n }\r\n }", "void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}", "@Override\r\n public void generateDisplayList(GL2 gl, GLU glu) {\r\n ArrayList<double[]> triangle = null;\r\n\r\n /*\r\n * List of all vertices describing the contour of the border, as well as the\r\n * vertices color and texture coordinates.\r\n */\r\n ArrayList<double[]> borderTriangle = null;\r\n\r\n // Get a denominator for the display list\r\n displayList = gl.glGenLists(1);\r\n\r\n // Create the display list\r\n gl.glNewList(displayList, GL2.GL_COMPILE);\r\n // Store the current OpenGL attribute states\r\n gl.glPushAttrib(GL2.GL_ALL_ATTRIB_BITS);\r\n\r\n /*\r\n * Set the alpha value of the colors. The opacity of the whole object\r\n * (opacity) always has a higher priority.\r\n */\r\n if (opacity < 1) {\r\n fillColor.setAlpha(opacity);\r\n borderColor.setAlpha(opacity);\r\n } else {\r\n fillColor.setAlpha(fillOpacity);\r\n borderColor.setAlpha(1);\r\n }\r\n\r\n // Don't draw if the dimensions are too small\r\n if (sideLength > 0) {\r\n\r\n // Create a list storing the triangles vertices\r\n triangle = new ArrayList<double[]>();\r\n\r\n // Check if the triangle will be rendered with a texture applied on it\r\n if (texture != null) {\r\n\r\n // Calculate the triangles contour\r\n calculateContour(triangle, null);\r\n\r\n // Set the triangles color to white (because of texture)\r\n applyColor(triangle, new Color(Color.WHITE));\r\n\r\n // Map the texture to the triangle\r\n applyTexture(triangle, texture.getImageTexCoords());\r\n\r\n // Enable texture support\r\n texture.enable();\r\n\r\n // Draw the textured triangle\r\n TessellatedPolygon poly = new TessellatedPolygon();\r\n poly.init(gl, glu);\r\n poly.beginPolygon();\r\n poly.beginContour();\r\n poly.renderContour(triangle);\r\n poly.endContour();\r\n poly.endPolygon();\r\n poly.end();\r\n poly = null;\r\n\r\n // Disable texture support\r\n texture.disable();\r\n } else {\r\n\r\n // Check if the triangle will be rendered with a border\r\n if (borderWidth > 0) {\r\n\r\n // Create a list storing the borders vertices\r\n borderTriangle = new ArrayList<double[]>(1);\r\n\r\n // Calculate the triangles contour and the contour of the border\r\n calculateContour(triangle, null);\r\n calculateContour(triangle, borderTriangle);\r\n\r\n // Apply the border color\r\n applyColor(triangle, borderColor);\r\n applyColor(borderTriangle, borderColor);\r\n\r\n // Don't apply any texture\r\n applyTexture(triangle, null);\r\n applyTexture(borderTriangle, null);\r\n\r\n // Draw the border\r\n TessellatedPolygon poly = new TessellatedPolygon();\r\n poly.init(gl, glu);\r\n poly.setWindingRule(GLU.GLU_TESS_WINDING_ODD);\r\n poly.beginPolygon();\r\n poly.beginContour();\r\n poly.renderContour(triangle);\r\n poly.endContour();\r\n poly.beginContour();\r\n poly.renderContour(borderTriangle);\r\n poly.endContour();\r\n poly.endPolygon();\r\n poly.end();\r\n\r\n // Apply the fill color\r\n applyColor(borderTriangle, fillColor);\r\n\r\n // Draw the inner triangle\r\n poly.init(gl, glu);\r\n poly.beginPolygon();\r\n poly.beginContour();\r\n poly.renderContour(borderTriangle);\r\n poly.endContour();\r\n poly.endPolygon();\r\n poly.end();\r\n poly = null;\r\n } else {\r\n\r\n // Calculate the contour of the triangle\r\n calculateContour(triangle, null);\r\n\r\n // Apply the fill color to the triangle\r\n applyColor(triangle, fillColor);\r\n\r\n // Don't apply any texture\r\n applyTexture(triangle, null);\r\n\r\n // Draw the triangle without border\r\n TessellatedPolygon poly = new TessellatedPolygon();\r\n poly.init(gl, glu);\r\n poly.beginPolygon();\r\n poly.beginContour();\r\n poly.renderContour(triangle);\r\n poly.endContour();\r\n poly.endPolygon();\r\n poly.end();\r\n poly = null;\r\n }\r\n }\r\n }\r\n\r\n // Restore the OpenGL attribute states\r\n gl.glPopAttrib();\r\n gl.glEndList();\r\n }", "@Override\n public void onDrawFrame(GL10 gl) {\n // Clear color and depth buffers using clear-value set earlier\n gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);\n \n // You OpenGL|ES rendering code here\n // ......\n gl.glLoadIdentity(); // Reset model-view matrix\n gl.glTranslatef(-((float) triangles.get(5)[0].x()+1.0f),-((float) triangles.get(5)[0].y()+1.0f),0.0f);\n Log.i(\"dd\",\"\"+triangles.get(0)[0].x() + \" \"+ triangles.get(0)[0].y()+\" \"+ triangles.get(0)[0].z());\n for(int i=0;i<triangles.size();i++){\n \t\n \tfloat[] vertices=new float[] {\n \t\t(float) triangles.get(i)[0].x(),(float) triangles.get(i)[0].y(),(float) triangles.get(i)[0].z()\t , //first point\n \t\t(float) triangles.get(i)[1].x(),(float) triangles.get(i)[1].y(),(float) triangles.get(i)[1].z()\t , //second point\n \t\t(float) triangles.get(i)[2].x(),(float) triangles.get(i)[2].y(),(float) triangles.get(i)[2].z()\t //third point\n \t };\n \t triangle=new Triangle(vertices);\n \t triangle.draw(gl); // Draw triangle \n }\n /* gl.glLoadIdentity(); // Reset model-view matrix\n gl.glTranslatef(-5.0f,-6.0f,-2.0f);\n float[] vertices = { // Vertices of the triangle\n \t 5.0f, 6.0f, 1.0f, // 0. top\n \t 3.0f, 0.0f, 0.0f, // 1. left-bottom\n \t 7.0f, 0.0f, 0.0f // 2. right-bottom\n \t };\n triangle=new Triangle(vertices);\n triangle.draw(gl); */\n\n }", "public void draw() {\n for (Point2D point : pointSet) {\n point.draw();\n }\n }", "@Override\n public void draw() {\n super.draw(); \n double radius = (this.getLevel() * 0.0001 + 0.025) * 2.5e10;\n double x = this.getR().cartesian(0) - Math.cos(rot) * radius;\n double y = this.getR().cartesian(1) - Math.sin(rot) * radius;\n StdDraw.setPenRadius(0.01);\n StdDraw.setPenColor(StdDraw.RED);\n StdDraw.point(x, y);\n \n }", "@Override\r\n\tpublic void display(GLAutoDrawable drawable) {\r\n\t\tGL2 gl = drawable.getGL().getGL2();\r\n\t\tgl.glClear(GL2.GL_COLOR_BUFFER_BIT);\r\n\r\n\t\t//points should be in the same zone\r\n\t\tDrawMPL(gl,0,0,30,25);\r\n\t\tDrawMPL(gl,0,0,-100,0);\r\n\t\tDrawMPL(gl,0,0,0,-100);\r\n\t\tDrawMPL(gl,-70,25,30,25);\r\n\t\tDrawMPL(gl,-70,25,-100,0);\r\n\t\tDrawMPL(gl,-70,25,-70,-75);\r\n\t\tDrawMPL(gl,-100,-100,-100,0);\r\n\t\tDrawMPL(gl,-100,-100,0,-100);\r\n\t\tDrawMPL(gl,-100,-100,-70,-75);\r\n\t\tDrawMPL(gl,-70,-75,30,-75);\r\n\t\tDrawMPL(gl,0,-100,30,-75);\r\n\t\tDrawMPL(gl,30,-75,30,25);\r\n\t}", "@Override\n public void draw()\n {\n }", "public Shapes draw ( );", "void render(GraphicsContext gc, double xOffSet, double yOffSet);", "@Override\n public void draw() {\n }", "public void draw(GLAutoDrawable drawable) {\n\t\tGL4 gl = drawable.getGL().getGL4();\n\t\n\t\t// rotate the sun around its Y axis\n\t\tthis.getTranslation().setToIdentity();\n\t\t//this.getTranslation().rotateX(45);\n\t\tthis.getTranslation().translate(location.getX(), location.getY(),location.getZ());\n\t\t\n\t\t//\n\t\tthis.getTranslation().rotateY(count);\n\t\tif(animated){\n\t\t\tthis.getTranslation().rotateZ(45);\n\t\t\n\t\t}\n\t\tcount += 0.5f;\n\n\t\t//this.getTranslation().rotateY(count);\n\t\tcount += 0.5f;\n\n\t\tnorBuf = FloatBuffer.wrap(this.getNormals(cylinderBuf));\n\t\tverBuf = FloatBuffer.wrap(cylinderBuf);\n\t\ttexBuf = FloatBuffer.wrap(texel_positions);\n\t\t// active the first buffer and load data for vertices into shader\n\t\tgl.glBindBuffer(GL4.GL_ARRAY_BUFFER, points_vbo[0]);\n\t\tgl.glBufferData(GL4.GL_ARRAY_BUFFER, verBuf.limit() * 4, verBuf,\n\t\t\t\tGL4.GL_STATIC_DRAW);\n\t\tgl.glVertexAttribPointer(0, 3, GL4.GL_FLOAT, false, 0, 0);\n\t\tgl.glEnableVertexAttribArray(0);\n\n\t\t// active the second buffer and load texture coord into shader\n\t\tgl.glBindBuffer(GL4.GL_ARRAY_BUFFER, points_vbo[1]);\n\t\tgl.glBufferData(GL4.GL_ARRAY_BUFFER, norBuf.limit() * 4, norBuf,\n\t\t\t\tGL4.GL_STATIC_DRAW);\n\t\tgl.glVertexAttribPointer(1, 3, GL4.GL_FLOAT, false, 0, 0);\n\t\tgl.glEnableVertexAttribArray(1);\n\n\t\tgl.glBindBuffer(GL4.GL_ARRAY_BUFFER, points_vbo[2]);\n\t\tgl.glBufferData(GL4.GL_ARRAY_BUFFER, texBuf.limit() * 4, texBuf,\n\t\t\t\tGL4.GL_STATIC_DRAW);\n\t\tgl.glVertexAttribPointer(2, 2, GL4.GL_FLOAT, false, 0, 0);\n\t\tgl.glEnableVertexAttribArray(2);\n\t\t\n\t\tgl.glDrawArraysInstanced(GL4.GL_TRIANGLES, 0, cylinderBuf.length, 1);\n\n\t}", "public void render () {\n\t\tcam.update();\n\t\tbatch.setProjectionMatrix(cam.combined);\n\t\trenderBackground();\n\t\t/*shapeRender.setProjectionMatrix(cam.combined);\n\t\tshapeRender.begin(ShapeRenderer.ShapeType.Line);\n\t\tshapeRender.ellipse(world.trout.hitBox.x, world.trout.hitBox.y, world.trout.hitBox.width, world.trout.hitBox.height);\n\t\tshapeRender.circle(world.hook.circleBounds.x, world.hook.circleBounds.y, world.hook.circleBounds.radius);\n\t\tshapeRender.point(world.trout.position.x, world.trout.position.y, 0f);*/\n\t\trenderObjects();\n\t\t\n\t}", "@Override\n public void display(GLAutoDrawable drawable) {\n if (ds == null) {\n return;\n }\n\n //VolumetricDataSet ds = new VolumetricDataSet(FileReader.class.getResourceAsStream(\"/marschnerlobb.raw\"), 41, 41, 41);\n int[][][] allDimensions = ds.getVolumeData();\n\n int[] dimensions = ds.getDimensions();\n\n int x = dimensions[0];\n int y = dimensions[1];\n int z = dimensions[2];\n\n System.out.println(\"x = \" + x);\n System.out.println(\"y = \" + y);\n System.out.println(\"z = \" + z);\n\n GL gl = drawable.getGL();\n\n gl.glClear(GL.GL_COLOR_BUFFER_BIT);\n\n// gl.glColor3f(0.94f, 0.94f, 0.94f);\n// gl.glBegin(GL.GL_POLYGON);\n// gl.glVertex2f(330, 0);\n// gl.glVertex2f(330, 720);\n// gl.glVertex2f(333, 0);\n// gl.glVertex2f(333, 720);\n// gl.glEnd();\n//\n// gl.glBegin(GL.GL_POLYGON);\n// gl.glVertex2f(165, 0);\n// gl.glVertex2f(165, 720);\n// gl.glVertex2f(168, 0);\n// gl.glVertex2f(168, 720);\n// gl.glEnd();\n// gl.glPushMatrix();\n// gl.glTranslated(-200.0, 0.0, 0.0);\n gl.glBegin(GL.GL_QUADS);\n\n for (int i = 0; i < z; i++) {\n for (int j = 0; j < y; j++) {\n float col = (float) allDimensions[j][100][i] / 255f;\n System.out.println(allDimensions[100][j][i] + \": \" + col);\n gl.glColor3f(col, col, col);\n\n gl.glVertex2d(i, j);\n gl.glVertex2d((i + 1), j);\n gl.glVertex2d((i + 1), (j + 1));\n gl.glVertex2d(i, (j + 1));\n System.out.println(\"x \" + i + \": y \" + j);\n }\n\n }\n gl.glEnd();\n //gl.glPopMatrix();\n\n// gl.glPushMatrix();\n// gl.glTranslated(0.0, 0.0, 0.0);\n// gl.glBegin(GL.GL_POLYGON);\n//\n// for (int i = 1; i < 41; i++) {\n// for (int j = 0; j < 41; j++) {\n// if (allDimensions[j][i][0] <= 225) {\n// gl.glColor3f(0, 1, 0);\n// } else {\n// gl.glColor3f(1, 1, 1);\n// }\n//\n// gl.glVertex2d(allDimensions[0][j][i], allDimensions[0][i][j]);\n// }\n//\n// }\n// gl.glEnd();\n// gl.glPopMatrix();\n gl.glFlush();\n }", "protected abstract void paintVectors(Graphics2D g);", "public void drawOnCursor3d(StsGLPanel3d glPanel3d, int dir, float dirCoordinate, StsPoint[] planePoints, boolean isDragging)\n {\n if(!isVisibleOnCursor) return;\n if(currentModel.getCurrentObject(StsBuiltModel.class) == null) return;\n int nZones = getSize();\n String displayMode = StsBuiltModelClass.staticGetDisplayModeString();\n for (int i = 0; i < nZones; i++)\n {\n StsZone zone = (StsZone)getElement(i);\n zone.drawOnCursor3d(glPanel3d, dir, dirCoordinate, planePoints[0], planePoints[3], isDragging, displayMode);\n }\n }", "@Override\r\n\tpublic void onDrawFrame(GL10 gl) {\n\t\tgl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);\r\n\r\n\t\tgl.glMatrixMode(GL10.GL_PROJECTION);\r\n\t\tgl.glLoadIdentity();\r\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION,\r\n\t\t\t\tnew float[] { 5, 5, 5, 1 }, 0);\r\n\r\n\t\tgl.glRotatef(anglez, 0, 0, 1);\r\n\t\tgl.glRotatef(angley, 0, 1, 0);\r\n\t\tgl.glRotatef(anglex, 1, 0, 0);\r\n\t\tanglez += 0.1;\r\n\t\tangley += 0.2;\r\n\t\tanglex += 0.3;\r\n\r\n\t\tgl.glEnableClientState(GL10.GL_VERTEX_ARRAY);\r\n\t\t// gl.glEnableClientState(GL10.GL_NORMAL_ARRAY);\r\n\t\tgl.glEnableClientState(GL10.GL_COLOR_ARRAY);\r\n\r\n\t\tgl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexesBuffer);\r\n\t\tgl.glColorPointer(4, GL10.GL_FLOAT, 0, colorBuffer);\r\n\t\tgl.glDrawElements(GL10.GL_TRIANGLES, triangleBuffer.remaining(),\r\n\t\t\t\tGL10.GL_UNSIGNED_BYTE, triangleBuffer);\r\n\r\n\t\tgl.glDisableClientState(GL10.GL_VERTEX_ARRAY);\r\n\t\tgl.glDisableClientState(GL10.GL_COLOR_ARRAY);\r\n\t\tgl.glFinish();\r\n\r\n\t}", "@Override\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\n\t}", "private static void draw() {\n\t\tinitField();\n\t\tview = new View(field);\n\t\tview.setSize(viewWidth, viewHeight);\n\t\tframe = new JFrame();\n\t\tframe.setSize(fwidth, fheight);\n\t\tframe.setTitle(\"Land Mine\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.add(view);\n\t\tframe.setVisible(true);\n\t}", "@Override\n\tpublic void draw() {\n\t}", "public void render() {\r\n\t\t //Draw all of the sprites in the game\r\n\t background.draw(0,backgroudY1);\r\n\t\tbackground.draw(0,backgroudY2);\r\n\t\tbackground.draw(0,backgroudY3);\r\n\t\tbackground.draw(WIDTH/2,backgroudY1);\r\n\t\tbackground.draw(WIDTH/2,backgroudY2);\r\n\t background.draw(WIDTH/2,backgroudY3);\r\n\t \r\n\t // call this method from Player class, to draw the plane.\r\n\t player.render();\r\n\t \r\n\t \r\n\t // loop through every enemy, draw enemy if it's not killed\r\n\t for(int i=0; i<enemy.length; i++) {\r\n\t \t\r\n \tif(enemy[i] != null && enemyKilled[i] == true) {\r\n \t\t\r\n\t \t\t\r\n\t enemy[i].render();\r\n\t \r\n\t \t}\r\n\t \r\n\t }\r\n\t // loop through every laser, if it has not made contact with any enemy,\r\n\t // call its render method to draw it\r\n\t for (int i = 0; i < arr_size; i++) {\r\n\t \tif (lasers[i] != null && laserUsed[i] == true) {\r\n\t lasers[i].render();\r\n \t}\r\n\t \t\r\n\t }\r\n\t \r\n\t}", "public void draw() {\r\n System.out.println(\"Shape: \" + this.getClass().getName() +\r\n \"\\t Perimeter: \" + calculatePerimeter() +\r\n \"\\t Area: \" + calculateArea());\r\n }", "PlaneSubset(final Plane plane) {\n this.plane = plane;\n }", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "@Override\n public void onDrawFrame(GL10 glUnused) {\n glClear(GL_COLOR_BUFFER_BIT);\n \n \n multiplyMM(viewProjectionMatrix, 0, projectionMatrix, 0,\n viewMatrix, 0);\n invertM(invertedViewProjectionMatrix, 0, viewProjectionMatrix, 0);\n\n refreshGameState();\n \n setPerspectiveView();\n // Draw the table.\n positionTableInScene();\n textureProgram.useProgram();\n textureProgram.setUniforms(modelViewProjectionMatrix, texture);\n table.bindData(textureProgram);\n table.draw();\n\n // Draw the mallets.\n// positionObjectInScene(0f, mallet.height / 2f, -0.4f);\n colorProgram.useProgram();\n\n \n //draw grids\n for (int i = 0; i<lines.length; i++)\n {\n positionObjectInScene(0,0,0);\n colorProgram.setUniforms(modelViewProjectionMatrix,0.5f + i*0.1f, 0.4f+ i*0.1f, 1f);\n lines[i].bindData(colorProgram);\n lines[i].draw();\n }\n \n \n // Draw the puck.\n for (int i = 0; i<2; i++)\n {\n\t positionObjectInScene(puckPosition[i].x, puckPosition[i].y, puckPosition[i].z);\n\t colorProgram.setUniforms(modelViewProjectionMatrix, 0.5f + i*0.2f, 0.015f + 0*0.1f, 0.9f);\n\t //colorProgram.setUniforms(modelViewProjectionMatrix, 0.5f, 0.01f , 0.9f);\n\t puck[i].bindData(colorProgram);\n\t puck[i].draw();\n }\n \n //draw Obstacles\n for (int i = 0; i< obstacles.length; i++){\n positionObjectInScene(obstaclePosition[i].x, obstaclePosition[i].y, obstaclePosition[i].z);\n colorProgram.setUniforms(modelViewProjectionMatrix, 0.1f, 0.3f, 0.11f);\n obstacles[i].bindData(colorProgram);\n obstacles[i].draw();\n \n \n }\n \n\n \n }", "public void drawPoint(DrawPanelModel drawPanelModel);", "public void draw() {\n easyFade();\n\n if(showSettings) \n { \n // updates the kinect raw depth + pixels\n kinecter.updateKinectDepth(true);\n \n // display instructions for adjusting kinect depth image\n instructionScreen();\n\n // want to see the optical flow after depth image drawn.\n flowfield.update();\n }\n else\n {\n // updates the kinect raw depth\n kinecter.updateKinectDepth(false);\n \n // updates the optical flow vectors from the kinecter depth image (want to update optical flow before particles)\n flowfield.update();\n particleManager.updateAndRenderGL();\n }\n}", "private void drawLight() {\n final int pointMVPMatrixHandle = GLES20.glGetUniformLocation(mPointProgramHandle, \"u_MVPMatrix\");\n final int pointPositionHandle = GLES20.glGetAttribLocation(mPointProgramHandle, \"a_Position\");\n\n // Pass in the position.\n GLES20.glVertexAttrib3f(pointPositionHandle, mLightPosInModelSpace[0], mLightPosInModelSpace[1], mLightPosInModelSpace[2]);\n\n // Since we are not using a buffer object, disable vertex arrays for this attribute.\n GLES20.glDisableVertexAttribArray(pointPositionHandle);\n\n // Pass in the transformation matrix.\n Matrix.multiplyMM(mMVPMatrix, 0, mViewMatrix, 0, mLightModelMatrix, 0);\n Matrix.multiplyMM(mTemporaryMatrix, 0, mProjectionMatrix, 0, mMVPMatrix, 0);\n System.arraycopy(mTemporaryMatrix, 0, mMVPMatrix, 0, 16);\n GLES20.glUniformMatrix4fv(pointMVPMatrixHandle, 1, false, mMVPMatrix, 0);\n\n // Draw the point.\n GLES20.glDrawArrays(GLES20.GL_POINTS, 0, 1);\n }", "public void display(GLAutoDrawable drawable) {\n GL2 gl = drawable.getGL().getGL2();\n //\n float position[] = {0.0f, 0.0f, 1.0f, 0.0f};\n float mat_cube1[] = {0.75f, 0.75f, 0.0f, 1.0f};\n float mat_cube2[] = {0.0f, 0.75f, 0.75f, 1.0f};\n\n if (polySmooth)\n gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);\n else\n gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);\n\n toggleSmooth(gl);\n\n gl.glPushMatrix();\n\n gl.glTranslatef(0.0f, 0.0f, -8.0f);\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, position, 0);\n\n gl.glBlendFunc(GL2.GL_SRC_ALPHA_SATURATE, GL.GL_ONE);\n\n gl.glPushMatrix();\n gl.glRotatef(30.0f, 1.0f, 0.0f, 0.0f);\n gl.glRotatef(60.0f, 0.0f, 1.0f, 0.0f);\n gl.glMaterialfv(GL.GL_FRONT, GL2.GL_DIFFUSE, mat_cube1, 0);\n glut.glutSolidCube(1.0f);\n gl.glPopMatrix();\n\n gl.glTranslatef(0.0f, 0.0f, -2.0f);\n gl.glMaterialfv(GL.GL_FRONT, GL2.GL_DIFFUSE, mat_cube2, 0);\n gl.glRotatef(30.0f, 0.0f, 1.0f, 0.0f);\n gl.glRotatef(60.0f, 1.0f, 0.0f, 0.0f);\n glut.glutSolidCube(1.0f);\n gl.glPopMatrix();\n\n gl.glFlush();\n }", "public WorldImage draw() {\n return new OverlayImage(\n this.tree.draw(),\n new LineImage(new Posn((int) this.deltaX(), (int) this.deltaY()), Color.RED)\n .movePinhole(-this.deltaX() / 2, -this.deltaY() / 2)).movePinhole(this.deltaX(),\n this.deltaY());\n }", "@Override\n public void draw(GL2 gl) {\n gl.glPushMatrix();\n float[] translate = GLScene.P(translateX, translateY);\n gl.glTranslatef(translate[0], translate[1], translate[2]);\n gl.glScalef(scaleX, scaleY, scaleZ);\n gl.glRotated(rotation * 180 / Math.PI, 0, 0, 1);\n gl.glBegin(GL2.GL_LINE_STRIP);\n GLPanel.V(gl, controlPoints[1].x, controlPoints[1].y);\n GLPanel.V(gl, controlPoints[0].x, controlPoints[0].y);\n GLPanel.V(gl, controlPoints[2].x, controlPoints[2].y);\n gl.glEnd();\n gl.glPopMatrix();\n }", "public void render() {\n float theta = velocity.heading2D() + radians(90);\n\n\n fill(255, 0, 0);\n stroke(0, 0, 0);\n strokeWeight(0.5f);\n pushMatrix();\n translate(position.x, position.y);\n rotate(theta);\n beginShape(QUAD);\n fill(130);\n vertex(r, -r*2);\n\n vertex(-r, -r*2);\n vertex(-r, r*2);\n vertex(r, r*2);\n\n endShape();\n strokeWeight(0.5f);\n beginShape(TRIANGLES);\n vertex(r,-r*2);\n vertex(r*2.5f,r);\n vertex(r,r);\n endShape();\n strokeWeight(0.5f);\n beginShape(TRIANGLES);\n vertex(-r, -r*2);\n vertex(r, -r*2);\n vertex(0, -r*4);\n endShape();\n beginShape(TRIANGLES);\n vertex(-r, r*5);\n vertex(r, r*5);\n vertex(0, r*2);\n endShape();\n strokeWeight(1.7f*r);\n stroke(255);\n fill(255);\n point(0, -r*2.5f);\n stroke(0);\n fill(0);\n strokeWeight(0.75f*r);\n point(0, -r*2.5f);\n popMatrix();\n }" ]
[ "0.7292615", "0.70132196", "0.6913582", "0.6117335", "0.61046225", "0.5965875", "0.5918374", "0.5897971", "0.569963", "0.56756186", "0.56710535", "0.5665825", "0.5656716", "0.56503195", "0.5638646", "0.5638646", "0.5638646", "0.5638646", "0.56276953", "0.56118727", "0.5606603", "0.5606603", "0.5606603", "0.560212", "0.5598377", "0.5589595", "0.55788887", "0.55710953", "0.5568788", "0.5562234", "0.5561791", "0.5559563", "0.55593604", "0.5544098", "0.5523904", "0.5517524", "0.5505569", "0.54919106", "0.54781395", "0.54679644", "0.54521304", "0.54365075", "0.5383466", "0.53657377", "0.53647083", "0.53372294", "0.5336544", "0.5327439", "0.53242284", "0.5320502", "0.53183544", "0.53151053", "0.5314883", "0.53130925", "0.5307824", "0.5294772", "0.528386", "0.52820307", "0.52820307", "0.52812153", "0.52676415", "0.52676415", "0.5259931", "0.52535033", "0.52535033", "0.5249384", "0.52463615", "0.52436674", "0.52435863", "0.5242085", "0.5227198", "0.52270734", "0.52194285", "0.5209496", "0.5207658", "0.5191617", "0.51888275", "0.51857114", "0.518355", "0.51822805", "0.5181398", "0.51800054", "0.51784736", "0.5177992", "0.5172186", "0.51691574", "0.51608276", "0.51589894", "0.51551616", "0.51538885", "0.51532274", "0.51501817", "0.51442343", "0.5142321", "0.5141382", "0.51400024", "0.51367337", "0.51320344", "0.51291513", "0.51281476" ]
0.58878535
8
draw the selection page
public void strength1(float x, float y){ noStroke(); fill(80); rect(x+7,y,66,6); bezier(x+7,y,x,y+1,x,y+5,x+7,y+6); bezier(x+73,y,x+80,y+1,x+80,y+5,x+73,y+6); rect(x+7,y+1,13,3);//1st blue ba bezier(x+7,y+1,x+1,y+2.5f,x+1,y+3.5f,x+7,y+4); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void draw(){\n\t\tif(!visible) return;\n\n\t\twinApp.pushStyle();\n\t\twinApp.style(G4P.g4pStyle);\n\t\tPoint pos = new Point(0,0);\n\t\tcalcAbsPosition(pos);\n\n\t\t// Draw selected option area\n\t\tif(border == 0)\n\t\t\twinApp.noStroke();\n\t\telse {\n\t\t\twinApp.strokeWeight(border);\n\t\t\twinApp.stroke(localColor.txfBorder);\n\t\t}\n\t\tif(opaque)\n\t\t\twinApp.fill(localColor.txfBack);\n\t\telse\n\t\t\twinApp.noFill();\n\t\twinApp.rect(pos.x, pos.y, width, height);\n\t\t\n\t\t// Draw selected text\n\t\twinApp.noStroke();\n\t\twinApp.fill(localColor.txfFont);\n\t\twinApp.textFont(localFont, localFont.getSize());\n\t\twinApp.text(text, pos.x + PADH, pos.y -PADV +(height - localFont.getSize())/2, width - 16, height);\n\n\t\t// draw drop down list\n\t\twinApp.fill(winApp.color(255,255));\n\t\tif(imgArrow != null)\n\t\t\twinApp.image(imgArrow, pos.x + width - imgArrow.width - 1, pos.y + (height - imgArrow.height)/2);\n\t\tif(expanded == true){\n\t\t\tGOption opt;\n\t\t\twinApp.noStroke();\n\t\t\twinApp.fill(localColor.txfBack);\n\t\t\twinApp.rect(pos.x,pos.y+height,width,nbrRowsToShow*height);\n\n\t\t\tfor(int i = 0; i < optGroup.size(); i++){\n\t\t\t\topt = optGroup.get(i);\n\t\t\t\tif(i >= startRow && i < startRow + nbrRowsToShow){\n\t\t\t\t\topt.visible = true;\n\t\t\t\t\topt.y = height * (i - startRow + 1);\n\t\t\t\t\topt.draw();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\topt.visible = false;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Draw box round list\n\t\t\tif(border != 0){\n\t\t\t\twinApp.strokeWeight(border);\n\t\t\t\twinApp.stroke(localColor.txfBorder);\n\t\t\t\twinApp.noFill();\n\t\t\t\twinApp.rect(pos.x,pos.y+height,width,nbrRowsToShow*height);\n\t\t\t}\n\t\t\tif(optGroup.size() > maxRows){\n\t\t\t\tslider.setVisible(true);\n\t\t\t\tslider.draw();\n\t\t\t}\n\t\t}\n\t\twinApp.popStyle();\n\t}", "protected abstract void paintSelection(Graphics2D g);", "public void drawSelection(Graphics g, int screenX, int screenY, Case caseSelection, int selectionX, int selectionY) {\n\t\t\n\t}", "public void updateSelection()\n {\n \trectForSelection.setRect(rettangoloX,rettangoloY,larghezza,altezza);\n \trectSelTopLeft.setRect(rettangoloX-3,rettangoloY-3,6,6);\n \trectSelBottomLeft.setRect(rettangoloX-3,rettangoloY+altezza-3,6,6);\n \trectSelTopRight.setRect(rettangoloX+larghezza-3,rettangoloY-3,6,6);\n \trectSelBottomRight.setRect(rettangoloX+larghezza-3,rettangoloY+altezza-3,6,6);\n }", "public void renderSelectedRegion() {\n textBuffer.renderInit();\n renderFlag = 2;\n Text text;\n root.getChildren().removeAll(renderPieces);\n renderPieces.clear();\n if (!reversed) {\n while ((text = textBuffer.getTextToRender()) != null) {\n addRenderPieces(text);\n }\n } else {\n while ((text = textBuffer.getPreToRender()) != null) {\n addRenderPieces(text);\n }\n }\n\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n if(selected != null)currentPage.drawIsDroppable(g, selected);\n pa.draw(g, selected);\n g.setColor(Color.BLACK);\n \tg.drawLine(0, currentPage.getBounds().height, currentPage.getBounds().width, currentPage.getBounds().height);\n }", "@Override\n public void paintMenu(Graphics g) {\n if (visible) {\n g.drawImage(toDraw, xPos, yPos, null); \n \n if (selection >= 0) {\n g.setColor(Colors.getColor(Colors.selectedColor));\n g.fillRoundRect(xPos + wGap, selection * hItemBox + yPos + hGap, getWidth() - wGap, hItemBox, wGap, hGap);\n }\n \n if (!activated) {\n g.setColor(Colors.getColor(Colors.selectedColor));\n g.fillRoundRect(xPos, yPos, getWidth(), getHeight(), wGap, hGap);\n }\n }\n }", "public void draw(){\n\t\tif(selected){\n\t\t\timg.draw(xpos,ypos,scale,Color.blue);\n\t\t}else{\n\t\t\timg.draw(xpos, ypos, scale);\n\t\t}\n\t}", "public void renderSelected(int x, int y, int width, int height)\n {\n int color = 0xffcccccc;\n\n this.drawHorizontalLine(x, x + width - 1, y, color);\n this.drawHorizontalLine(x, x + width - 1, y + height - 1, color);\n\n this.drawVerticalLine(x, y, y + height - 1, color);\n this.drawVerticalLine(x + width - 1, y, y + height - 1, color);\n }", "public void updateSelection() {\n\t\t\n\t}", "public void drawSelection(int x, int y, int width, int height) {\n implementation.devDrawStrokeRectangle(x, y, width, height, Color.BLUE);\n }", "abstract public void showSelection(Node[] nodes) ;", "public void selectionChanged(DrawingView view) {\n setupAttributes();\n }", "public void paintSelected(Graphics2D g2d)\n {\n if (isSelected)\n {\n \tg2d.setColor(Color.black);\n \tg2d.draw(rectForSelection);\n \tg2d.setColor(Color.white);\n \tg2d.fill(rectSelTopLeft);\n \tg2d.fill(rectSelBottomLeft);\n \tg2d.fill(rectSelTopRight);\n \tg2d.fill(rectSelBottomRight);\n \tg2d.setColor(Color.black);\n \tg2d.draw(rectSelTopLeft);\n \tg2d.draw(rectSelBottomLeft);\n \tg2d.draw(rectSelTopRight);\n \tg2d.draw(rectSelBottomRight);\n \t\n }\n }", "@Override\n protected final void setGraphics() {\n super.setGraphics();\n Graphics g = toDraw.getGraphics();\n g.setColor(Color.BLACK); \n \n for (int i = 0; i < choices.size(); i++) { \n g.drawString(choices.get(i).getValue(), wGap, (i + 1) * hItemBox);\n }\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 }", "public void paintComponent(Graphics page)\n {\n super.paintComponent(page);\n\n //set color, then draw a rectangle\n page.setColor(currentColor);\n\n page.drawRect(x1, y1, currentWidth, currentHeight);\n }", "void render() {\n\t\tif (!dragLock)\n\t\t\tfucusLocks();\n\n\t\t// display help information\n\t\tString selected = isSelected ? \" [selected]\" : \"\";\n\t\tmyParent.text(id + selected, anchor.x + 10, anchor.y);\n\n\t\t// display points and lines with their colourings\n\t\tfor (int i = 0; i < amount; i++) {\n\n\t\t\tpoint[i].render();\n\n\t\t\tif (state == State.DRAG_AREA)\n\t\t\t\tmyParent.stroke(255, 255, 0);\n\n\t\t\tline[i].draw();\n\n\t\t}\n\n\t\t// display rotation ellipse in anchor position\n\t\tif (state == State.ROTATE && isSelected) {\n\t\t\tmyParent.noFill();\n\t\t\tif (!dragLock)\n\t\t\t\tmyParent.stroke(255, 255, 0);\n\t\t\telse\n\t\t\t\tmyParent.stroke(0, 255, 0);\n\t\t\tmyParent.ellipse(anchor.x, anchor.y, 15, 15);\n\t\t}\n\n\t\t// display drag area rectangle in anchor position\n\t\tif (state == State.DRAG_AREA) {\n\t\t\tmyParent.noFill();\n\t\t\tif (!dragLock)\n\t\t\t\tmyParent.stroke(255, 255, 0);\n\t\t\telse\n\t\t\t\tmyParent.stroke(0, 255, 0);\n\t\t\tmyParent.rect(anchor.x, anchor.y, 15, 15);\n\t\t}\n\n\t\t// display anchor point\n\t\tmyParent.rect(anchor.x, anchor.y, 5, 5);\n\n\t\t// display line centres\n\t\tmyParent.noFill();\n\t\tmyParent.stroke(150);\n\t\tmyParent.rectMode(PConstants.CENTER);\n\t\tmyParent.rect(X.x, X.y, 5, 5);\n\t\tmyParent.rect(Y.x, Y.y, 5, 5);\n\t\tmyParent.rect(Z.x, Z.y, 5, 5);\n\t\tmyParent.rect(Q.x, Q.y, 5, 5);\n\t}", "void draw() {\n canvas.drawColor(Color.BLACK);\n insertSort(vstar);\n for( int i=0; i<NUMSTARS; i++){\n vstar[i].draw();\n }\n }", "public void showDraw(){\n\t\tdraw = new Document( drawFilePath);\n\t}", "private void paintSelectingPart(int fromSample, int toSample) {\r\n\t\tGraphics g = getGraphics();\r\n\t\tif (g != null) {\r\n\t\t\tif (SELECT_ALL_CHANNELS || getChannelCount() == 1) {\r\n\t\t\t\t// assumes that above and below graphs is nothing\r\n\t\t\t\tg.setClip(getGraphBounds(ALL_CHANNELS));\r\n\t\t\t} else if (SELECT_LEFT) {\r\n\t\t\t\tg.setClip(getGraphBounds(0));\r\n\t\t\t} else if (SELECT_RIGHT) {\r\n\t\t\t\tg.setClip(getGraphBounds(1));\r\n\t\t\t}\r\n\t\t\tint pixelFrom = toPixelX(fromSample);\r\n\t\t\tint width = toPixelEndX(toSample) - pixelFrom + 1;\r\n\t\t\tg.clipRect(pixelFrom + pv.graphX, 0, width, pv.height);\r\n\t\t\tpaintGraphArea(g);\r\n\t\t\tg.dispose();\r\n\t\t}\r\n\t}", "protected void drawBounds(Graphics page)\n\t{\n\n\t}", "public void draw(final TreeDrawerNode node,\n\t\t\tfinal TreeSelectionI treeSelection,final int xIndent,\n\t\t\tfinal int yIndent,final int size,final int startIndex,\n\t\t\tfinal int endIndex,final boolean showSelections) {\n\n\t\t\tStack<TreeDrawerNode> selectedNodeStack =\n\t\t\t\texportDFS(node,treeSelection,xIndent,yIndent,size,\n\t\t\t\t\tnode.getMinCorr(),node.getMaxCorr(),startIndex,endIndex,\n\t\t\t\t\tshowSelections);\n\n\t\t\tif(showSelections) {\n\t\t\t\tgraphics.setColor(new Color(197,181,66));//dark yellow\n\t\t\t\texportNodeDots(selectedNodeStack,xIndent,yIndent,size,\n\t\t\t\t\tnode.getMinCorr(),node.getMaxCorr(),startIndex,endIndex);\n\t\t\t}\n\t\t}", "public void drawSelector(int x) {\n int currentTime = millis() / 100;\n noStroke();\n if (currentTime % 13 == 0) {\n fill(200, 200, 100, 30);\n }\n else if (currentTime % 13 == 1) {\n fill(200, 200, 100, 40);\n }\n else if (currentTime % 13 == 2) {\n fill(200, 200, 100, 50);\n }\n else if (currentTime % 13 == 3) {\n fill(200, 200, 100, 60);\n }\n else if (currentTime % 13 == 4) {\n fill(200, 200, 100, 70);\n }\n else if (currentTime % 13 == 5) {\n fill(200, 200, 100, 80);\n }\n else if (currentTime % 13 == 6) {\n fill(200, 200, 100, 90);\n }\n else if (currentTime % 13 == 7) {\n fill(200, 200, 100, 100);\n }\n else if (currentTime % 13 == 8) {\n fill(200, 200, 100, 110);\n }\n else if (currentTime % 13 == 9) {\n fill(200, 200, 100, 120);\n }\n else if (currentTime % 13 == 10) {\n fill(200, 200, 100, 130);\n }\n else if (currentTime % 13 == 11) {\n fill(200, 200, 100, 140);\n }\n else if (currentTime % 13 == 12) {\n fill(200, 200, 100, 150);\n }\n else {\n fill(255, 200, 100);\n }\n switch(x){\n case 1:\n beginShape();\n vertex(80, 330);\n vertex(50, 360);\n vertex(80, 350);\n vertex(110, 360);\n endShape();\n break;\n case 2:\n beginShape();\n vertex(370, 330);\n vertex(340, 360);\n vertex(370, 350);\n vertex(400, 360);\n endShape();\n break;\n case 3:\n beginShape();\n vertex(80, 600);\n vertex(50, 630);\n vertex(80, 620);\n vertex(110, 630);\n endShape();\n break;\n case 4:\n beginShape();\n vertex(370, 600);\n vertex(340, 630);\n vertex(370, 620);\n vertex(400, 630);\n endShape();\n break;\n }\n\n}", "void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}", "public void beginSelecting() {\r\n selecting = true;\r\n minX = 0;\r\n maxX = 0;\r\n }", "protected void createSelection() {\r\n\t\tsel = new GraphSelection();\r\n\t}", "public void draw() {\n \n // TODO\n }", "protected void paintGraphBackground(Graphics G, int drawX, int drawY,\r\n\t\t\tint drawW, int drawH, int fromSample, int toSample) {\r\n\t\tif (DEBUG_DRAW) {\r\n\t\t\tdebug(\"paintGraphBackground() enter.\");\r\n\t\t}\r\n\r\n\t\tif (!showSelection || sel.onePoint()\r\n\t\t\t\t|| (sel.getStart() > section.getEnd())\r\n\t\t\t\t|| (sel.getEnd() < section.getStart())\r\n\t\t\t\t|| (sel.getStart() > toSample) || (sel.getEnd() < fromSample)) {\r\n\t\t\tif (DEBUG_DRAW) {\r\n\t\t\t\tdebug(\"Painting background from \" + drawX + \" to \"\r\n\t\t\t\t\t\t+ (drawW + drawX - 1));\r\n\t\t\t}\r\n\t\t\tG.setColor(getBackground());\r\n\t\t\tG.fillRect(drawX, drawY, drawW, drawH);\r\n\t\t} else { // il y a une selection a dessiner\r\n\t\t\t// calculer la zone de selection qu'il faut dessiner\r\n\t\t\tint sx = toPixelX(Math.max(sel.getStart(), section.getStart()))\r\n\t\t\t\t\t+ pv.graphX;\r\n\t\t\tRectangle selRect = new Rectangle(sx, pv.graphY,\r\n\t\t\t\t\ttoPixelEndX(Math.min(sel.getEnd(), section.getEnd()))\r\n\t\t\t\t\t\t\t+ pv.graphX - sx + 1, pv.allGraphsHeight);\r\n\t\t\tselRect = selRect.intersection(new Rectangle(drawX, drawY, drawW,\r\n\t\t\t\t\tdrawH));\r\n\t\t\tif (selRect.isEmpty()) {\r\n\t\t\t\tG.setColor(getBackground());\r\n\t\t\t\tG.fillRect(drawX, drawY, drawW, drawH);\r\n\t\t\t\tif (DEBUG_DRAW) {\r\n\t\t\t\t\tdebug(\"Graph: Painting background: x=\" + drawX + \" width=\"\r\n\t\t\t\t\t\t\t+ drawW);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (DEBUG_DRAW) {\r\n\t\t\t\t\tdebug(\"Graph: Painting selection rect:\" + selRect);\r\n\t\t\t\t}\r\n\t\t\t\tif (drawW != selRect.width) {\r\n\t\t\t\t\t// clear left of selection\r\n\t\t\t\t\tint w = selRect.x - drawX;\r\n\t\t\t\t\tif (w > 0) {\r\n\t\t\t\t\t\tG.setColor(getBackground());\r\n\t\t\t\t\t\tG.fillRect(drawX, drawY, w, drawH);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// clear right of selection\r\n\t\t\t\t\tint x = selRect.x + selRect.width;\r\n\t\t\t\t\tw = drawX + drawW - x;\r\n\t\t\t\t\tif (w > 0) {\r\n\t\t\t\t\t\tG.setColor(getBackground());\r\n\t\t\t\t\t\tG.fillRect(x, drawY, w, drawH);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// draw selection Rect\r\n\t\t\t\tG.setColor(selColor);\r\n\t\t\t\tif (SELECT_ALL_CHANNELS) {\r\n\t\t\t\t\tG.fillRect(selRect.x, drawY, selRect.width, drawH);\r\n\t\t\t\t} else if (SELECT_LEFT) {\r\n\t\t\t\t\tG.fillRect(selRect.x, pv.graphY, selRect.width,\r\n\t\t\t\t\t\t\tpv.graphHeight);\r\n\t\t\t\t\tG.setColor(getBackground());\r\n\t\t\t\t\tG.fillRect(selRect.x, getGraphTop(1), selRect.width,\r\n\t\t\t\t\t\t\tpv.graphHeight);\r\n\t\t\t\t} else if (SELECT_RIGHT) {\r\n\t\t\t\t\tG.fillRect(selRect.x, getGraphTop(1), selRect.width,\r\n\t\t\t\t\t\t\tpv.graphHeight);\r\n\t\t\t\t\tG.setColor(getBackground());\r\n\t\t\t\t\tG.fillRect(selRect.x, pv.graphY, selRect.width,\r\n\t\t\t\t\t\t\tpv.graphHeight);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void draw()\n\t{\t\t\n\t\tArrayList<Segment> seg = new ArrayList<Segment>();\n\t\tfor(int i = 0; i < hullVertices.length - 1; i++)\n\t\t{\n\t\t\tSegment s = new Segment(hullVertices[i], hullVertices[i+1]);\n\t\t\tseg.add(s);\n\t\t}\n\t\tSegment s1 = new Segment(hullVertices[hullVertices.length-1], hullVertices[0]);\n\t\tseg.add(s1);\n\t\t// Based on Section 4.1, generate the line segments to draw for display of the convex hull.\n\t\t// Assign their number to numSegs, and store them in segments[] in the order.\n\t\tSegment[] segments = new Segment[seg.size()];\n\t\tfor(int i = 0; i < seg.size(); i++)\n\t\t{\n\t\t\tsegments[i] = seg.get(i);\n\t\t}\n\t\t// The following statement creates a window to display the convex hull.\n\t\tPlot.myFrame(pointsNoDuplicate, segments, getClass().getName());\n\t}", "public void selectPanel() {\n\t\tthis.displayNumberBlock.setBackground(dispSelected);\n\t}", "@Override\n\tvoid draw(Graphics g) {\n\t\tg.setColor(needsHighlight() ? selectColor : Color.GRAY);\n\t\tsetBbox(x, y, x2, y2);\n\t\tif (x < x2 && y < y2)\n\t\t\tg.fillRect(x, y, x2 - x, y2 - y);\n\t\telse if (x > x2 && y < y2)\n\t\t\tg.fillRect(x2, y, x - x2, y2 - y);\n\t\telse if (x < x2 && y > y2)\n\t\t\tg.fillRect(x, y2, x2 - x, y - y2);\n\t\telse\n\t\t\tg.fillRect(x2, y2, x - x2, y - y2);\n\t}", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tBitmap bitmap = unselected;\n\t\tfor (int i = 0;i<dotcount;i++) {\n\t\t\tif(i==selectIndex){\n\t\t\t\tbitmap = selected;\n\t\t\t} else {\n\t\t\t\tbitmap = unselected;\n\t\t\t}\n\t\t\t//canvas.drawBitmap(bitmap, leftPadding+i*(dotWidth+marginPs), heigth/2, null);\n\t\t\trelateRect.left = leftPadding+i*(dotWidth+marginPs);\n\t\t\trelateRect.right = relateRect.left+dotWidth;\n\t\t\tcanvas.drawBitmap(bitmap, orRect, relateRect, null);\n\t\t}\n\t}", "public void showTexturePage(String selection, int page){\n \n ArrayList<String> idSubStages = control.getIdsSubStages(selection);\n ArrayList<String> idsTexturesOrSubMeshes = control.getIdsTexturesORSubMeshes(idSubStages.get(0));\n unCheck();\n subStageSelected = \"\";\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(false);\n for(int i=page*TEXTURES_PAGE; i<control.getNumTexturesORSubMeshes(idSubStages.get(0)); i++){\n if(i<((page+1)*TEXTURES_PAGE)){\n Element image = nifty.getScreen(stageType).findElementByName(\"i\"+Integer.toString(i%TEXTURES_PAGE));\n List<Effect> effects = image.getEffects(EffectEventId.onHover,Tooltip.class);\n String idTexturesOrSubMeshes = i18nModel.getString(control.getTextTexturesORSubMeshes(idsTexturesOrSubMeshes.get(i)));\n if(idTexturesOrSubMeshes==null){\n idTexturesOrSubMeshes=control.getTextTexturesORSubMeshes(idsTexturesOrSubMeshes.get(i));\n }\n effects.get(0).getParameters().setProperty(\"hintText\",idTexturesOrSubMeshes);\n image.setVisible(true);\n ImageRenderer imager = image.getRenderer(ImageRenderer.class);\n String imagePath = control.getIconPathTexturesORSubMeshes(idsTexturesOrSubMeshes.get(i));\n if(imagePath!=null){\n imager.setImage(nifty.getRenderEngine().createImage(imagePath, false));\n }\n else{\n imager.setImage(nifty.getRenderEngine().createImage(Resources.x, false));\n }\n if (control.isChecked(idSubStages.get(0), idsTexturesOrSubMeshes.get(i))){\n nifty.getScreen(stageType).findElementByName(\"t\"+Integer.toString(i%TEXTURES_PAGE)).setVisible(true);\n subStageSelected = idSubStages.get(0);\n if(!seleccionado.containsKey(subStageSelected)){\n seleccionado.put(subStageSelected, idsTexturesOrSubMeshes.get(i));\n }\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"t\"+Integer.toString(i%TEXTURES_PAGE)).setVisible(false);\n }\n }\n }\n if(seleccionado.containsKey(subStageSelected)){\n if(!(control.getTextureType(seleccionado.get(subStageSelected)) == TexturesMeshType.simpleTexture)){\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(true);\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(false);\n }\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(false);\n }\n for(int i=control.getNumTexturesORSubMeshes(idSubStages.get(0));i<((page+1)*TEXTURES_PAGE);i++){\n Element image = nifty.getScreen(stageType).findElementByName(\"i\"+Integer.toString(i%TEXTURES_PAGE));\n image.setVisible(false);\n }\n if(page > 0){\n nifty.getScreen(stageType).findElementByName(\"leftT\").setVisible(true);\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"leftT\").setVisible(false);\n }\n if((((double)control.getNumTexturesORSubMeshes(idSubStages.get(0))/(double)TEXTURES_PAGE) - page) > 1){\n nifty.getScreen(stageType).findElementByName(\"rightT\").setVisible(true);\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"rightT\").setVisible(false);\n }\n }", "public void showSelection () {\n checkWidget();\n if( selectedIndex != -1 ) {\n showItem( getSelection() );\n }\n }", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "void renderNameSelection() {\n //sets the right letters for buttons\n String[] names = {Character.toString(arr[0]), Character.toString(arr[1]), Character.toString(arr[2])};\n changeNames(names);\n selectedButton = menuItems[iH];\n selectedButton.buildSelecter();\n //renders the startscreen\n renderStartScreen();\n }", "public void draw() {\n\t\tsuper.repaint();\n\t}", "public void draw(Graphics g) {\n g.setColor(needsHighlight() ? selectColor : Color.GRAY);\n setBbox(x1, y1, x2, y2);\n g.setLineDash(16, 6);\n if (x1 < x2 && y1 < y2) {\n g.drawRect(x1, y1, x2 - x1, y2 - y1);\n } else if (x1 > x2 && y1 < y2) {\n g.drawRect(x2, y1, x1 - x2, y2 - y1);\n } else if (x1 < x2 && y1 > y2) {\n g.drawRect(x1, y2, x2 - x1, y1 - y2);\n } else {\n g.drawRect(x2, y2, x1 - x2, y1 - y2);\n }\n g.setLineDash(0, 0);\n }", "public void draw(Rectangle selectionBox, Transformation t) {\n\t\tif (t != null)\n\t\t\tdraw((Vector) getDrawPosition(selectionBox).getTransformed(t));\n\t\telse\n\t\t\tdraw(getDrawPosition(selectionBox));\n\t}", "public void beginSelection()\n {\n\tisMultiSelection = true;\n\tsetMaxCheckCount(-1);\n }", "public void run() {\n List<Node> selNodes = new ArrayList<Node>(selectedPaths.size());\n\n for (Object path : selectedPaths) {\n selNodes.add(findPath(root, (String[]) path));\n }\n\n // set the selection\n Node[] newSelection = selNodes.toArray(new Node[selNodes.size()]);\n\n if (exploredCtx != null) {\n setExploredContext(findPath(root, exploredCtx), newSelection);\n } else {\n setSelectedNodes0(newSelection);\n }\n }", "public void render() {\r\n Color geneColor=null;\r\n\r\n if(isChanged) {\r\n this.removeChild(predRect);\r\n predRect = new PPath();\r\n\r\n if(type == SegmentInfo.TYPE_AUTO) predRect.setPathTo(new RoundRectangle2D.Double(startx,0.0,endx - startx,(double)this.PREDICTION_RECT_HEIGHT, 10, 10));\r\n else if(type == SegmentInfo.TYPE_MANUAL) predRect.setPathTo(new RoundRectangle2D.Double(startx,0.0,endx - startx,(double)this.PREDICTION_RECT_HEIGHT, 0, 0));\r\n\r\n if(this.isSelected()) {\r\n if(this.sign < 0) geneColor = this.SELECTED_DOWN_COLOR;\r\n else geneColor = this.SELECTED_UP_COLOR;\r\n }\r\n else {\r\n if(this.sign < 0) geneColor = this.DOWN_COLOR;\r\n else geneColor = this.UP_COLOR;\r\n }\r\n\r\n predRect.setPaint(geneColor);\r\n this.addChild(predRect);\r\n isChanged=false;\r\n }\r\n }", "public void comboselect(){\n int intPageNum = btnMenu.getSelectedIndex();\n if (intPageNum == 0)\n {\n new Main_menu().setVisible(true);\n this.setVisible(false);\n }\n if (intPageNum == 1)\n {\n new Content_p1().setVisible(true);\n this.setVisible(false);\n }\n if (intPageNum == 2)\n {\n new Content_p2().setVisible(true);\n this.setVisible(false);\n }\n if (intPageNum == 3)\n {\n new Content_p3().setVisible(true);\n this.setVisible(false);\n }\n if (intPageNum == 4)\n {\n new Content_p4().setVisible(true);\n this.setVisible(false);\n }\n if (intPageNum == 5)\n {\n new Content_p5().setVisible(true);\n this.setVisible(false);\n }\n if (intPageNum == 6)\n {\n new Content_p7().setVisible(true);\n this.setVisible(false);\n }\n if (intPageNum == 7)\n {\n new Wrap_Up().setVisible(true);\n this.setVisible(false);\n }\n }", "@Override\r\n public void draw() {\n }", "public void widgetSelected( SelectionEvent e )\r\n\t\t\t{\r\n\t\t\t\tShellSystem.setWallPaper( fileText.getText( ).trim( ),\r\n\t\t\t\t\t\tShellSystem.WALLPAPER_STRETCH );\r\n\t\t\t\tShellSystem.setWallPaper( fileText.getText( ).trim( ),\r\n\t\t\t\t\t\tShellSystem.WALLPAPER_STRETCH );\r\n\t\t\t}", "private void draw() {\n\t\t\n\t\tthis.getChildren().clear(); // empty the result first\n\t\t\n\t\tfor (int i = 0; i < resultList.size(); i++) { // create a snippet for each quiz in the result and show\n\t\t\t\n\t\t\tthis.getChildren().add(new QuizSnippet(resultList.get(i)));\n\t\t \n\t\t}\n\t\t\n\t\tif(resultList.size() == 0) { // if no result: show \"No result found!\"\n\n\t\t\tText noResult = new Text(\"No result found!\");\n\t\t\tnoResult.setFont(new Font(20));\n\t\t\tthis.getChildren().add(noResult);\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void draw() {\n\t\tif (fill) {\n\t\t\tapplet.noStroke();\n\t\t\tapplet.fill(color);\n\t\t} else {\n\t\t\tapplet.noFill();\n\t\t\tapplet.stroke(color);\n\t\t}\n\t\tapplet.rect(position.x, position.y, size.x, size.y);\n\t\tsliderButton.draw(new PVector(-10,0));\n\t}", "private void determineMenuSelection(String filePath) throws IOException {\n\t\tBufferedImage currentImage = Utils.readInImage(filePath);\n\t\tArrayList<Rectangle> boxes = model.getTemplateBoxes();\n\t\tArrayList<Rectangle> used = new ArrayList<>();\n\t\tdetermineInitSelections(boxes, used, currentImage);\n\t\tfor(int i = 7; i < boxes.size(); i++) { // Start at i = 2 for initial selections\n\t\t\t\n\t\t\tif(!used.contains(boxes.get(i))) {\n\t\t\t\tboolean a = searchBlackPixels(boxes.get(i), currentImage);\n\t\t\t\tboolean b = searchBlackPixels(boxes.get(i + 5), currentImage);\n\t\t\t\tif(a) {\n\t\t\t\t\tmodel.getSelections()[i] = 'A';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t} else if(b) {\n\t\t\t\t\tmodel.getSelections()[i] = 'B';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t} else {\n\t\t\t\t\tmodel.getSelections()[i] = 'A';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void paintSelected(Graphics g, int mode, double zx, double zy ){\n \r\n g.setXORMode(Color.WHITE);\r\n \r\n g.setColor(selectedBorderColor);\r\n if(mode == DrawingCanvas.EDIT_LEFT){\r\n paintSelectedBorder(g, (int)(x*zx) , (int)(y*zy), (int)zx, (int)(h*zy+zy));\r\n }\r\n else if(mode == DrawingCanvas.EDIT_RIGHT){\r\n //paintSelectedBorder(g, x + w - 3, y - 3, (int)(6/zx), h + 6);\r\n paintSelectedBorder(g, (int)((x+w)*zx) , (int)(y*zy), (int)zx, (int)(h*zy+zy));\r\n }\r\n else if(mode == DrawingCanvas.EDIT_UPPER){\r\n //paintSelectedBorder(g, x - 3, y - 3, w + 6, (int)(6/zy));\r\n paintSelectedBorder(g, (int)(x*zx) , (int)(y*zy), (int)((w+1)*zx), (int)(zy));\r\n }\r\n else if(mode == DrawingCanvas.EDIT_LOWER){\r\n //paintSelectedBorder(g, x - 3, y + h - 3, w + 6, (int)(6/zy));\r\n paintSelectedBorder(g, (int)(x*zx) , (int)((y+h)*zy), (int)((w+1)*zx), (int)(zy));\r\n }\r\n else if(mode == DrawingCanvas.EDIT_BODY){\r\n paintSelectedBorder(g, x + 5, y + 5, w - 10, h - 10);\r\n }\r\n \r\n }", "@Override\n \t\t\tpublic void widgetSelected(SelectionEvent e) {\n \t\t\t\t\n \t\t\t\tupdatePageComplete();\n \t\t\t}", "public void paint(Graphics page)\n\t{\n\t\tpage.setColor(Color.DARK_GRAY);\n\t\tpage.fillOval(x, y, width, height);\n\t}", "public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}", "public void drawAllGraphics(){\r\n\t\t \r\n\t}", "public abstract Vector getDrawPosition(Rectangle selectionBox);", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public void draw(Graphics2D g)\n {\n //g.setColor(Color.black);\n //g.drawString(statusMsg,20,20);\n\n /* only draw when game is not running */\n if(GAME_RUNNING == false && selectedWidget != null)\n {\n if(SELECT_MODE == SelectMode.SELECTED || SELECT_MODE == SelectMode.DRAGGING)\n {\n /* draw boundary of selected widget */\n g.setColor(Color.orange);\n\n Vector2f[] points = selectedWidget.getBoundary();\n for(int i = 0; i <= 3; i++)\n \t\t{\n \n \t\t\tg.drawLine(\n (int)points[i].getX(),\n (int)points[i].getY(),\n (int)points[(i+1)%4].getX(),\n (int)points[(i+1)%4].getY());\n \t\t}\n }\n\n if(SELECT_MODE == SelectMode.DRAGGING || SELECT_MODE == SelectMode.ADDING)\n {\n /* draw boundary of dragged widget */\n if (timWorld.testPlacement(selectedWidget, mouseX + clickOffsetX, mouseY + clickOffsetY))\n {\n /* placement position is safe, draw green boundary */\n g.setColor(Color.green);\n }\n else\n {\n /* placement position unsafe, draw red boundary */\n g.setColor(Color.red);\n }\n \n Vector2f[] points = selectedWidget.getBoundary();\n for(int i = 0; i <= 3; i++)\n \t\t{\n \n if(SELECT_MODE == SelectMode.ADDING)\n {\n \t\t\tg.drawLine(\n (int)(points[i].getX() + mouseX),\n (int)(points[i].getY() + mouseY),\n (int)(points[(i+1)%4].getX() + mouseX),\n (int)(points[(i+1)%4].getY() + mouseY));\n }\n else\n {\n \t\t\t g.drawLine(\n (int)(points[i].getX() + (mouseX - pressX)),\n (int)(points[i].getY() + (mouseY - pressY)),\n (int)(points[(i+1)%4].getX() + (mouseX - pressX)),\n (int)(points[(i+1)%4].getY() + (mouseY - pressY)));\n }\n \t\t}\n }\n }\n }", "protected abstract void doSelection() throws IOException;", "@Override\n\t\tpublic void onPageSelected(int arg0) {\n\t\t\tsetTextViewBG(arg0);\n\t\t}", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "public void paintComponent(Graphics page) {\n\t super.paintComponent(page); // execute the paint method of JPanel\n\t dwg.draw(page); // have the drawing draw itself\n\t }", "public void draw()\n {\n super.draw();\n k = 0;\n traceOK = true;\n\n // Initialize n, x0, and xn in the control panel.\n nText.setText(\" \");\n x0Text.setText(\" \");\n xnText.setText(\" \");\n\n PlotFunction plotFunction = getSelectedPlotFunction();\n\n // Create the fixed-point iteration root finder.\n finder = new FixedPointRootFinder((Function) plotFunction.getFunction());\n }", "public void drawSelected(Graphics2D g2) {\n\t\tfloat[] dashes = {1,1,1};\n \tBasicStroke stroke = new BasicStroke(2, BasicStroke.CAP_SQUARE, BasicStroke.CAP_SQUARE, 10, dashes, 10);\n \tg2.setColor(Color.RED);\n\t\tg2.draw(stroke.createStrokedShape(new Rectangle2D.Double(this.getX()-2,this.getY()-2,this.getDimension()+4,this.getDimension()/2 +4)));\n\t}", "@Override\n\tpublic void mousePressed(MouseEvent arg0) {\n\t\tint x = arg0.getX() / 20;\n\t\tint y = arg0.getY() / 20;\n\t\tGraphics g = this.getGraphics();\n\t\tg.setColor(Color.black);\n\t\tg.fillRect(x * 20, y * 20, 20, 20);\n\t\tg.setColor(Color.gray);\n\t\tg.drawRect(x * 20, y * 20, 20, 20);\n\t\t// System.out.println(\"x: \" + x + \" y: \" + y);\n\t\tthis.selected.add(y * 64 + x);\n\n\t}", "void selectpos()\n {\n \n }", "void diagramSelection(DynamicTable table, String line, int product) {\n\n float longDif = longitudeMaxO - longitudeMinO;\n float latDif = latitudeMaxO - latitudeMinO;\n\n if (longDif > latDif){\n areaDifference = longDif;\n } else {\n areaDifference = latDif;\n }\n areaDifference = ec.ceiling(areaDifference,0);\n\n //................FLOOR VALUE - ........................\n float latitudeMin = ec.floor(latitudeMinO,0);\n float longitudeMin = ec.floor(longitudeMinO,0);\n\n //................CEILING ......................\n float latitudeMax = ec.ceiling(latitudeMaxO,0);\n float longitudeMax = ec.ceiling(longitudeMaxO,0);\n\n // ....... Initialize the value of the areadifference ARRAY[] .............\n for (int tf = 0; tf < sc.MAX1; tf++) {\n if ((tf+1) == areaDifference) {\n trueFalse[tf] = \"true\";\n } else {\n trueFalse[tf] = \"\";\n } // if (tf == areaDifference)\n } // for int tf\n\n //................CREATE SELECT BOXES.................\n Select tableSelect = new Select(sc.TABLESIZE +\n \"\\\" onChange=\\\"updateMenus(this); updatePTable(this); \" +\n \"writeIt(plongitudewest.value,platitudenorth.value,ptable.value)\");\n tableSelect.addOption(new Option(\"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \" +\n \"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \" +\n \"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \" +\n \"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"));\n tableSelect.addOption(new Option(\"\"));\n tableSelect.addOption(new Option(\"\"));\n\n Select blockSelect = new Select(sc.BLOCKSIZE);\n blockSelect.addOption(new Option(\"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \" +\n \"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \" +\n \"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \" +\n \"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"));\n blockSelect.addOption(new Option(\"\"));\n blockSelect.addOption(new Option(\"\"));\n if (dbg) System.out.println(\"blocksize <br>\");\n\n //................IF STATEMENT for DIAGRAM................\n\n if ( (product == INVEN) || (product == MEANS) ) { // inventories, means\n\n //................DIAGRAM:................\n String latNJavaScript = \"\\\" onChange=\\\"writeIt(\" + sc.LONGITUDEWEST +\n \".value,\" + sc.LATITUDENORTH + \".value,ptable.value);\\\"\\n\";\n String latSJavaScript = \"\\\" onFocus=\\\"this.blur()\";\n String lonWJavaScript = \"\\\" onChange=\\\"writeIt(\" + sc.LONGITUDEWEST +\n \".value,\" + sc.LATITUDENORTH + \".value,ptable.value);\\\"\\n\";\n String lonEJavaScript = \"\\\" onFocus=\\\"this.blur()\";\n\n table.addRow(ec.latlonRangeInput(\n \"Select Top right Corner\",\n 6,\n new Float (latitudeMin).toString(),\n new Float (latitudeMax).toString(),\n new Float (longitudeMin).toString(),\n new Float (longitudeMax).toString(),\n \"<b><font color=green>N</font></b>\", \"<b>S</b>\",\n \"<b><font color=green>W</font></b>\", \"<b>E</b>\",\n latNJavaScript, latSJavaScript,\n latNJavaScript, latSJavaScript,\n \"\"));\n //BREAKS\n table.addRow(ec.crSpanColsRow(\"<br>\",2));\n\n //TABLE SIZE input box\n //TextField txt2 = new TextField(sc.TABLESIZE, 10, 10, \"\");\n table.addRow(ec.cr2ColRow(\n \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" +\n \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" +\n chFSize(\"Table Size:<br><i>(degrees square)</i>\",\"-1\"),\n tableSelect.toHTML()));\n\n //BLOCK SIZE Size input box\n //txt2 = new TextField(sc.BLOCKSIZE, 10, 10, \"\");\n table.addRow(ec.cr2ColRow(\n \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" +\n \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" +\n chFSize(\"Block Size: <br><i>(minutes square)</i>\",\"-1\"),\n blockSelect.toHTML()));\n //BREAKS\n table.addRow(ec.crSpanColsRow(\"<br>\",2));\n\n if (dbg) System.out.println(\"blockSelect = \" + blockSelect + \"<br>\");\n\n } else { // ROSES, HISTO, SCATT, TIMES\n\n //................DIAGRAM:................\n table.addRow(ec.latlonRangeInput(\n \"Enter Range Selection\",\n 6,\n new Float (latitudeMin).toString(),\n new Float (latitudeMax).toString(),\n new Float (longitudeMin).toString(),\n new Float (longitudeMax).toString(),\n \"<b><font color=green>N</font></b>\",\n \"<b><font color=green>S</font></b>\",\n \"<b><font color=green>W</font></b>\",\n \"<b><font color=green>E</font></b>\",\n \"\", \"\", \"\", \"\", \"\"));\n table.addRow(ec.crSpanColsRow(\"<br>\",2));\n\n } // if ((product == 1) ...\n }", "private void drawTable(int selected){\n\t\ttlCategories.removeAllViews();\n\t\tTableRow.LayoutParams rowParams=new TableRow.LayoutParams \n\t\t\t\t(TableRow.LayoutParams.WRAP_CONTENT,TableRow.LayoutParams.WRAP_CONTENT);\n\t\t\n\t\tfor(int i = 0; i<4; i++){\n\t\t\tTableRow tr = new TableRow(getApplicationContext());\n\t\t\ttr.setLayoutParams(rowParams);\n\t\t\ttr.setTag(2); \n\t\t\tfor(int j = 0; j<4; j++ ){ \n\t\t\t\tView v = mCatAdapter.getView(i*4+j + 1, null, tr);\n\t\t\t\tv.setTag(i*4+j);\n\t\t\t\tv.setOnClickListener(this);\n\t\t\t\ttr.addView(v);\n\t\t\t\tif( i*4+j+1 == selected) onClick(v);\n\t\t\t}\n\t\t\ttlCategories.addView(tr);\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void seleccionar() {\n\r\n\t\t\t}", "public void paintComponent(Graphics g)\n {\n\t\n\t\tg.drawImage(img1, 0, 0, 1000,800, this);\n\t\t\n\t\tg.setColor(textColor);\n\t\t\n\t\tg.drawOval(selectionOvalX, selectionOvalY, selectionOvalHeight, selectionOvalWidth);\n\t\t\n\t\tg.drawString(title, 50, 50);\n\t\t\n\t\tg.drawString(chooseName, 50, 90);\n\t\tg.drawString(retMain, 50, 130);\n\t\tg.drawString(start, 50, 150);\n\t\t\n\t\t//IMPORTANT: PLACEHOLDERS!!\n\t\t\n\t\t/*\n\t\tg.drawString(levelOne, 50, 100);\n\t\tg.drawString(levelTwo, 50, 120);\n\t\tg.drawString(levelThree, 50, 140);\n\t\tg.drawString(levelFour, 50, 160);\n\t\tg.drawString(exit, 50, 180);\n\t\t*/\n\t\t\n\t\t\n\t\t// IMPORTANT: keep note of these x and y positions, they correspond to the selection areas for getSelection\n\t\t//g.drawString(playGame, 50, 100);\n\t\t//g.drawString(highScores, 50, 120);\n\t\t//g.drawString(options, 50, 140);\n\t\t//g.drawString(exit, 50, 160);\n }", "private void nextSelect() {\n\t\tif (selectionIndex + 1 > selections.size() - 1) {\n\t\t\tselectionIndex = 0;\n\t\t} else {\n\t\t\tselectionIndex++;\n\t\t}\n\t\tselected.setVisible(true);\n\t\tselected = selections.get(selectionIndex);\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t}", "void showPage1(){\n displayPage();\n up.setVisible(false);\n if(page != maxPage){\n down.setVisible(true);\n }\n back.setVisible(true);\n next.setVisible(true);\n go.setVisible(true);\n txtPage.setVisible(true);\n for(int i = 0; i < lbl.size() && i < max;i++){\n lbl.get(i).setVisible(true);\n select.get(i).setVisible(true);\n deselect.get(i).setVisible(true);\n if(chars.contains(i)){\n select.get(i).setEnabled(false);\n deselect.get(i).setEnabled(true);\n }else{\n select.get(i).setEnabled(true);\n deselect.get(i).setEnabled(false);\n }\n }\n }", "public void draw() {\n drawSubtree(root);\n }", "public void run() {\n\t\t\t\t\tif (currentViewer != null) {\r\n\t\t\t\t\t\tcurrentViewer.setSelection(new StructuredSelection(\r\n\t\t\t\t\t\t\t\ttheSelection.toArray()), true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "public void draw() {\n draw(root, false);\n }", "@Override\n\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\tdrawRectangle(selectionCanvas);\n\n\t\t\t\tcurrentMouseBox.setEndx(event.getX());\n\t\t\t\tcurrentMouseBox.setEndy(event.getY());\n\t\t\t}", "static void draw()\n {\n for (Viewport viewport : viewports)\n viewport.draw(renderers);\n }", "protected abstract void draw();", "private void selectMenu()\n\t{\n\t\t//clear the panel first\n\t\tclearPanel(getPanel1());\n\t\t\n\t\tJLabel label1=new JLabel(\"Select two rows to inspect data:\");\n\t\t\n\t\t//set up panel\n\t\tgetPanel1().setLayout(null);\n\t\tadd(getPanel1(),BorderLayout.CENTER);\n\t\t\n\t\t//add buttons to panel\n\t\tgetPanel1().add(getButton1());\n\t\tgetPanel1().add(getTopics1());\n\t\tgetPanel1().add(getTopics2());\n\t\tgetPanel1().add(label1);\n\t\t\n\t\t\n\t\t//manually set their position\n\t\tlabel1.setBounds(380,10,400,40);\n\t\tgetButton1().setBounds(430,350,230,60);\n\t\tgetTopics1().setBounds(430,80,230,60);\n\t\tgetTopics2().setBounds(430,215,230,60);\n\n\t\tlabel1.setFont(new Font(\"Serif\", Font.CENTER_BASELINE, 24));\t\n\t}", "public void draw() {\n }", "public void draw();", "public void draw();", "public void draw();", "@Override\n public void draw()\n {\n }", "@Override\n public void draw() {\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n state = \"select\";\r\n instruction.setText(\"Drag the rectangle to cover the whole shape which you want to select\");\r\n\r\n }", "public void draw() {\n \n }", "private JPanel createSelectionDialogBox(final GraphPanel graphPanel, Selection selection) {\n\t\tJPanel selectionPanel = new JPanel();\n\t\tselectionPanel.setLayout(new BoxLayout(selectionPanel, BoxLayout.PAGE_AXIS));\n\t\tselectionPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(10,10,10,10),\n\t\t\t\tBorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Information about selection\"),\n\t\t\t\t\t\tBorderFactory.createEmptyBorder(10,10,10,10))));\n\n\t\tif (selection == null || selection.isEmpty()) {\n\t\t\tselectionPanel.add(new JLabel(\"empty\"));\n\t\t\treturn selectionPanel;\n\t\t}\n\n\t\tint nbVertices = 0;\n\t\tint nbEdges = 0;\n\n\t\tEnumeration<GraphItemView> items = selection.elements();\n\t\twhile (items.hasMoreElements()) {\n\t\t\tGraphItemView item = items.nextElement();\n\t\t\tif (item instanceof VertexView) {\n\t\t\t\tnbVertices ++;\n\t\t\t} else if (item instanceof EdgeView) {\n\t\t\t\tnbEdges ++;\n\t\t\t}\n\t\t}\n\n\t\tif (nbVertices == 1 && nbEdges == 0) { // One vertex is selected\n\t\t\taddNonEditableLine(selectionPanel, \"One vertex.\", \"\");\n\t\t\tselectionPanel.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\t\tVertexView vertex = (VertexView) selection.elements().nextElement();\n\t\t\tint vertexId = vertex.getVertex().getId();\n\t\t\taddNonEditableLine(selectionPanel, \"Id: \", new Integer(vertexId).toString());\t\t\t\t\t\t\n\n\t\t\tselectionPanel.add(Box.createRigidArea(new Dimension(0,10)));\n\t\t\tPoint pos = vertex.getPosition();\n\t\t\tString s = \"(\" + new Integer(pos.x).toString() + \", \" + new Integer(pos.x).toString() + \")\";\n\t\t\taddNonEditableLine(selectionPanel, \"Position: \", s);\n\n\t\t\tselectionPanel.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\t\taddNonEditableLine(selectionPanel, \"Degree: \", new Integer(vertex.getVertex().degree()).toString());\t\t\t\t\t\t\n\n\t\t\tselectionPanel.add(Box.createRigidArea(new Dimension(0, 10)));\n\n\t\t\tString algoName = \"none\";\n\t\t\tif (graphPanel instanceof GraphPanelSimulation) {\n\t\t\t\tAlgorithm algo = ((GraphPanelSimulation) graphPanel).getAlgorithm();\n\t\t\t\tif (algo != null) algoName = algo.getClass().getSimpleName();\n\t\t\t}\n\t\t\taddNonEditableLine(selectionPanel, \"Algorithm: \", algoName);\n\t\t} else if (nbVertices == 0 && nbEdges == 1) { // One edge is selected\n\t\t\taddNonEditableLine(selectionPanel, \"One edge.\", \"\");\n\t\t\tselectionPanel.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\t\tfinal EdgeView edge = (EdgeView) selection.elements().nextElement();\n\t\t\tfinal JLabel origLabel = addNonEditableLine(selectionPanel, \"Origin vertex id: \", new Integer(edge.getOrigin().getVertex().getId()).toString());\n\t\t\tselectionPanel.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\t\tfinal JLabel destLabel = addNonEditableLine(selectionPanel, \"Destination vertex id: \", new Integer(edge.getDestination().getVertex().getId()).toString());\n\n\t\t\tJButton switchButton = new JButton(\"Switch origin and destination\");\n\t\t\tswitchButton.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tedge.switchOriginAndDestination();\n\t\t\t\t\tString text = origLabel.getText();\n\t\t\t\t\torigLabel.setText(destLabel.getText());\n\t\t\t\t\tdestLabel.setText(text);\n\t\t\t\t\tgraphPanel.repaint();\n\t\t\t\t}\n\t\t\t});\n\t\t\tselectionPanel.add(switchButton);\n\t\t} else { // Various items are selected\n\t\t\taddNonEditableLine(selectionPanel, \"Nb vertices: \", new Integer(nbVertices).toString());\n\t\t\tselectionPanel.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\t\taddNonEditableLine(selectionPanel, \"Nb edges: \", new Integer(nbEdges).toString());\n\n\t\t\tselectionPanel.add(Box.createRigidArea(new Dimension(0,20)));\t\n\t\t}\n\n\t\tselectionPanel.add(Box.createRigidArea(new Dimension(0,20)));\n\n\t\tif (nbVertices + nbEdges == 1) { // a single element (either a vertex or an edge) is selected\n\t\t\tPropertyTable properties = null;\n\t\t\tGraphItemView item = selection.elements().nextElement();\n\t\t\tproperties = (nbVertices == 1 ? ((VertexView) item).getVertex() : ((EdgeView) item).getEdge());\n\n\t\t\tPropertyTableViewer viewer = new PropertyTableViewer(properties);\n\t\t\tviewer.addListener(new PropertyTableViewerChangeListener(){\n\t\t\t\tpublic void updated() {\n\t\t\t\t\tgraphPanel.repaint();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tJScrollPane scrollPane = new JScrollPane(viewer);\n\t\t\tscrollPane.setBounds(viewer.getBounds());\n\t\t\tselectionPanel.add(scrollPane);\n\t\t}\n\n\t\treturn selectionPanel;\n\t}", "protected void render() {\n\t\tentities.render();\n\t\t// Render GUI\n\t\tentities.renderGUI();\n\n\t\t// Flips the page between the two buffers\n\t\ts.drawToGraphics((Graphics2D) Window.strategy.getDrawGraphics());\n\t\tWindow.strategy.show();\n\t}", "public void dispatchDraw(Canvas canvas) {\n if (this.mSelectHei > 0) {\n canvas.save();\n canvas.clipPath(this.mSelectDrawablePath);\n if (this.mSelectDrawableBac != null) {\n this.mSelectDrawableBac.setBounds(this.mSelectDrawableRectBac);\n this.mSelectDrawableBac.draw(canvas);\n }\n if (this.mSelectDrawable != null) {\n this.mSelectDrawable.setBounds(this.mSelectDrawableRect);\n this.mSelectDrawable.draw(canvas);\n }\n canvas.restore();\n }\n super.dispatchDraw(canvas);\n }", "private static void DoSelection()\n\t{\n\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAtts.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Int\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Float\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att4\"));\n\n\t\tString selection = \"o_orderdate > Str (\\\"1996-12-19\\\") && o_custkey < Int (100)\";\n\n\t\tHashMap<String, String> exprs = new HashMap<String, String>();\n\t\texprs.put(\"att1\", \"o_orderkey\");\n\t\texprs.put(\"att2\", \"(o_totalprice * Float (1.5)) + Int (1)\");\n\t\texprs.put(\"att3\", \"o_orderdate + Str (\\\" this is my string\\\")\");\n\t\texprs.put(\"att4\", \"o_custkey\");\n\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Selection(inAtts, outAtts, selection, exprs, \"orders.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "private void renderMenu() {\n StdDraw.setCanvasSize(START_WIDTH * TILE_SIZE, START_HEIGHT * TILE_SIZE);\n Font font = new Font(\"Monaco\", Font.BOLD, 20);\n StdDraw.setFont(font);\n StdDraw.setXscale(0, START_WIDTH );\n StdDraw.setYscale(0, START_HEIGHT );\n StdDraw.clear(Color.BLACK);\n StdDraw.setPenColor(Color.WHITE);\n StdDraw.enableDoubleBuffering();\n StdDraw.text(START_WIDTH / 2, START_HEIGHT * 2 / 3, \"CS61B The Game\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2 + 2, \"New Game (N)\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2, \"Load Game (L)\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2 - 2 , \"Quit (Q)\");\n StdDraw.show();\n }", "@Override\n public void createPageControls(Composite pageContainer) {\n fSelectionPage.createControl(pageContainer);\n }", "public void draw() {\n draw(root, true);\n }", "private void drawSelectedEntities(Graphics2D g2d, RenderContext myrc, Set<String> sel, Set<String> sticks, int txt_h) {\n\tStroke orig_stroke = g2d.getStroke(); g2d.setStroke(new BasicStroke(3.0f));\n\n\t// Draw the selected entities - outline the shape with red and draw labels if appropriate\n\tIterator<String> it = sel.iterator();\n\twhile (it.hasNext()) { \n\t String node = it.next(); String node_coord = entity_to_sxy.get(node);\n\t Shape shape = myrc.node_to_geom.get(node_coord);\n\t if (shape != null) {\n\t g2d.setColor(RTColorManager.getColor(\"linknode\", \"movenodes\")); g2d.draw(shape);\n\t if (myrc.node_lm != null && sel.size() < 100 && sticks.contains(node) == false) { \n\t // Bound it by 100... otherwise, it's going to be unreasonable\n\t myrc.node_lm.draw(g2d, node_coord, (int) shape.getBounds().getCenterX(), (int) shape.getBounds().getMaxY(), true);\n }\n }\n\t}\n\n\t// Draw the sticky labels\n\tit = sticks.iterator();\n\twhile (it.hasNext()) {\n\t String node = it.next(); String node_coord = entity_to_sxy.get(node);\n\t Shape shape = myrc.node_to_geom.get(node_coord);\n\t if (shape != null && myrc.node_lm != null) {\n\t myrc.node_lm.draw(g2d, node_coord, (int) shape.getBounds().getCenterX(), (int) shape.getBounds().getMaxY(), true);\n }\n\t}\n\tg2d.setStroke(orig_stroke);\n\n\t// Provide information on what's selected\n g2d.setColor(RTColorManager.getColor(\"label\", \"default\"));\n g2d.drawString(\"\" + sel.size() + \" Selected\", 5, txt_h);\n\n\tint x_off = Utils.txtW(g2d, \"\" + sel.size() + \" Selected\");\n\n // Print the mode string... doesn't really belong here...\n String str = \"| \" + mode();\n\tmodeColor(g2d);\n g2d.drawString(\"\" + str, 10 + x_off, txt_h);\n }", "protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException {\n g.setColor(selected);\n Container c = getContainer();\n if (c instanceof JPasswordField) {\n JPasswordField f = (JPasswordField) c;\n if (!f.echoCharIsSet()) {\n return super.drawSelectedText(g, x, y, p0, p1);\n }\n char echoChar = f.getEchoChar();\n int n = p1 - p0;\n for (int i = 0; i < n; i++) {\n x = drawEchoCharacter(g, x, y, echoChar);\n }\n }\n return x;\n }", "public void setSelection(Pair selection);" ]
[ "0.74065804", "0.71557677", "0.69538105", "0.6794125", "0.637082", "0.6366316", "0.63405514", "0.63013995", "0.62862414", "0.6285295", "0.6212342", "0.61987835", "0.6179169", "0.61749536", "0.6164928", "0.61605316", "0.6107619", "0.6070298", "0.6051495", "0.60412115", "0.60376257", "0.599938", "0.59909135", "0.5979271", "0.5978803", "0.5971171", "0.59634227", "0.59578305", "0.5955777", "0.593885", "0.59198225", "0.5900172", "0.58895874", "0.5859934", "0.58582836", "0.5846412", "0.5846412", "0.58339864", "0.5815252", "0.5811752", "0.577728", "0.5765803", "0.57608014", "0.5757843", "0.5750674", "0.57309014", "0.5727162", "0.5725735", "0.5724067", "0.5720807", "0.5703895", "0.5699708", "0.5690652", "0.56891215", "0.5658433", "0.5655268", "0.5654206", "0.5654206", "0.56483203", "0.56483203", "0.56473523", "0.5643699", "0.5637943", "0.56287587", "0.5627751", "0.56261325", "0.5618328", "0.5614298", "0.5608157", "0.5606053", "0.56043327", "0.5597002", "0.5593163", "0.5593113", "0.55909896", "0.55904084", "0.5589976", "0.5588317", "0.5587859", "0.5582124", "0.55821127", "0.5579444", "0.55721825", "0.5571984", "0.55684566", "0.55684566", "0.55684566", "0.55638945", "0.5561621", "0.55582637", "0.55575323", "0.5556529", "0.5548507", "0.55481035", "0.5547607", "0.55401605", "0.5538855", "0.5526099", "0.55235255", "0.5521711", "0.55187005" ]
0.0
-1
draw the US plane
public void usa(){ stroke(1); //back guns fill(0); rect(73,192,4,15); rect(224,192,4,15); rect(71,207,8,15); rect(222,207,8,15); rect(66,207,3,15); rect(232,207,3,17); rect(122,109,4,15); rect(175,110,4,15); rect(121,120,6,15); rect(174,120,6,15); rect(116,124,3,15); rect(182,124,3,15); //wings fill(1,0,74);//dark blue beginShape(); vertex(14,286); vertex(61,236); vertex(88,308); vertex(51,334); vertex(14,313); endShape(CLOSE); beginShape(); vertex(286,287); vertex(286,312); vertex(247,335); vertex(212,309); vertex(238,238); endShape(CLOSE); fill(200);//white beginShape(); vertex(38,307); vertex(74,307); vertex(80,314); vertex(81,337); vertex(68,345); vertex(38,327); endShape(CLOSE); beginShape(); vertex(219,316); vertex(226,308); vertex(262,308); vertex(262,326); vertex(231,345); vertex(219,336); endShape(CLOSE); fill(192,0,11);//red beginShape(); vertex(96,191); vertex(61,230); vertex(60,269); vertex(96,312); vertex(101,300); vertex(100,247); vertex(112,232); vertex(132,232); vertex(131,186); endShape(CLOSE); beginShape(); vertex(204,191); vertex(240,230); vertex(240,270); vertex(205,312); vertex(200,302); vertex(200,248); vertex(193,238); vertex(185,231); vertex(170,230); vertex(170,186); endShape(CLOSE); //white fill(200); beginShape(); vertex(70,217); vertex(74,220); vertex(81,210); vertex(85,213); vertex(75,227); vertex(72,229); vertex(71,231); vertex(73,233); vertex(73,268); vertex(71,272); vertex(76,277); vertex(82,274); vertex(89,283); vertex(90,297); vertex(66,272); vertex(65,235); vertex(68,229); vertex(62,228); endShape(CLOSE); beginShape(); vertex(228,217); vertex(225,218); vertex(218,211); vertex(215,213); vertex(223,227); vertex(226,226); vertex(230,230); vertex(227,233); vertex(228,270); vertex(229,272); vertex(223,276); vertex(218,276); vertex(210,283); vertex(211,296); vertex(235,273); vertex(234,233); vertex(232,228); vertex(237,227); endShape(CLOSE); //guns //white fill(200); beginShape(); vertex(121,301); vertex(98,313); vertex(102,336); vertex(119,342); vertex(139,336); vertex(141,313); endShape(CLOSE);//l beginShape(); vertex(159,312); vertex(162,336); vertex(180,342); vertex(200,336); vertex(202,313); vertex(180,302); endShape(CLOSE); //black fill(0); rect(105,315,30,30); rect(166,315,30,30); quad(105,344,109,355,131,355,135,344); quad(166,344,170,355,192,355,196,344); //green fill(0,0,67); rect(103,253,33,62);//l rect(164,252,33,62);//r //white fill(200); bezier(103,252,107,230,132,230,136,252);//l bezier(164,252,169,230,192,230,197,252);//r rect(103,280,33,25);//l rect(164,280,33,25);//r rect(104,319,33,26,3);//l rect(165,319,33,26,3);//r rect(115,310,7,28,8);//l rect(178,310,7,28,8);//r //green fill(0,0,67); rect(105,284,10,15); rect(124,284,10,15); rect(167,285,10,15); rect(185,284,10,15); //body-wings //green fill(0,0,67);//blue bezier(107,154,101,162,98,169,98,187); bezier(191,153,199,164,202,172,203,187); quad(107,154,98,186,98,223,107,224); quad(191,153,203,186,202,223,192,223); fill(192,0,11);//red quad(134,112,108,147,107,239,132,230); quad(165,112,192,147,193,239,168,230); //black fill(0); quad(130,122,130,142,111,164,111,147); quad(169,122,188,147,188,165,169,144); //white fill(200); beginShape(); vertex(131,154); vertex(129,202); vertex(118,202); vertex(112,181); vertex(110,179); vertex(110,171); endShape(CLOSE); beginShape(); vertex(170,154); vertex(190,172); vertex(190,182); vertex(188,181); vertex(182,201); vertex(172,201); endShape(CLOSE); //green fill(192,0,11); quad(134,193,166,193,154,342,146,342); fill(192,0,11); quad(142,180,159,180,152,352,148,352); //white fill(200); ellipse(150,374,6,50); //head fill(1,1,75); ellipse(149.5f,72,33,25); ellipse(149.5f,94,30,170); fill(0); ellipse(149.5f,94,20,160); fill(154,155,84); ellipse(149.5f,94,17,77); strokeWeight(2); line(143,74,158,74); line(142,104,158,104); strokeWeight(1); fill(200); bezier(143,15,147,2,153,2,155.5f,15); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void draw_plane(Graphics g, int log_num, int i);", "void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}", "public void draw() {\r\n\t\t// Draw the triangle making up the mountain\r\n\t\tTriangle mountain = new Triangle(this.x, 100,\r\n\t\t\t\tthis.x + mountainSize / 2, 100, this.x + mountainSize / 4,\r\n\t\t\t\t100 - this.y / 4, Color.DARK_GRAY, true);\r\n\t\t// Draw the triangle making up the snow cap\r\n\t\tthis.snow = new Triangle(side1, bottom - this.y / 8, side2, bottom\r\n\t\t\t\t- this.y / 8, this.x + mountainSize / 4, 100 - this.y / 4,\r\n\t\t\t\tColor.WHITE, true);\r\n\t\tthis.window.add(mountain);\r\n\t\tthis.window.add(snow);\r\n\t}", "@Override\n public void draw() {\n /** preparacion de la ventana **/\n background(255);\n lights();\n directionalLight(40, 90, 100, 1, 40, 40);\n\n translate(origin.x,origin.y);\n scale(zoom);\n\n\n /** entrada del usuario **/\n userInput();\n /** ejes X Y Z **/\n drawAxes();\n /** aplicar ik **/\n writePos();\n\n /** escala de los objetos**/\n scale(-1.2f);\n\n /** esfera que muestra la posicion en coord X Y Z\n *\n * X -> coord[0]\n * Y -> coord[1]\n * Z -> coord[2]\n *\n * **/\n pushMatrix();\n noStroke();\n fill(250, 100, 1);\n translate(-coord_cartesian[1] ,-coord_cartesian[2] -11,-coord_cartesian[0] );\n sphere(2);\n popMatrix();\n\n\n /**\n * Dibuja el brazo\n */\n pushMatrix();\n arm.drawArm();\n popMatrix();\n }", "public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}", "public void drawUserPlane(Graphics g) {\r\n\t\tlevelManager.drawUserPlane(g);\r\n\t}", "public void draw() \n{\n background(250, 243, 225);\n timer(); //control timing of the program\n mapwd.draw(); //visualize weekday trajectory\n shadeTra(t1); \n mapwk.draw(); //visualize weekend trajectory\n shadeTra(t2); \n transport(); //draw the transport legend\n infoDisplay(); //display almost text information\n \n\n stroke(0);\n \n gweekend();\n gweekday();\n frame();\n graduation();\n piechart();\n \n stroke(0);\n arrow();\n \n saveFrame(\"Output1/traffic_######.tif\");\n}", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "public void draw() {\r\n /* DO NOT MODIFY */\r\n StdDraw.point(x, y);\r\n }", "public void draw() {\n \n // TODO\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\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 draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}", "public void drawControlPolygon() {\n\t\t//this.frame.stroke(255, 0, 0);\n\t\tfor(int i=0;i<points.length;i++) {\n\t\t\tfor(int j=0;j<points[i].length;j++)\n\t\t\t\tthis.frame.drawVertex(points[i][j]);\n\t\t}\n\t}", "private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }", "void draw();", "public void mark_plane(Graphics g, int log_num, int x, int y, int h);", "public void draw() {\n \n }", "public void draw();", "public void draw();", "public void draw();", "void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}", "void draw() {\n scsw.draw();\n \n}", "public void draw(){\n\t\t/* Stamps a copy of the planet at the position. the file of the planet image is under folder of \"images\".\n\t\t * a mistake easily to be ignored here..*/\n\t\tString imageToDraw = \"images/\" + imgFileName;\n\t\tStdDraw.picture(xxPos, yyPos, imageToDraw);\n\n\t}", "public void draw()\n {\n myPencil.up();\n myPencil.backward(100);\n myPencil.down();\n myPencil.turnRight(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(400);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n // Roof\n myPencil.up();\n myPencil.move(0,200);\n myPencil.down();\n myPencil.setDirection(333.435);\n myPencil.forward(223.607);\n myPencil.setColor(new Color(2, 0, 0));\n myPencil.up();\n myPencil.move(0,200);\n myPencil.setDirection(206.565);\n myPencil.down();\n myPencil.forward(223.607);\n // Windows\n myPencil.up();\n myPencil.move(-150,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.turnLeft(90);\n myPencil.forward(50);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(60);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(50,-100);\n myPencil.setDirection(120);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(-150,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n // House Sidewalk\n myPencil.up();\n myPencil.move(-250,-112.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(250,-112.5);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(90);\n myPencil.forward(193);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(90);\n myPencil.up();\n myPencil.move(-75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n // Chimney\n myPencil.up();\n myPencil.move(125,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(52);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(40);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(25);\n // Door window\n myPencil.up();\n myPencil.move(0,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(8);\n myPencil.up();\n myPencil.move(-8,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(16);\n myPencil.up();\n myPencil.move(0,-17);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(16);\n // Door knob\n myPencil.up();\n myPencil.move(14,-55);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(2);\n }", "public void draw(){\n textAlign(CENTER);\n route.update(pp, qq);\n SoundSys();\n fill(0xff31F0FF, 127);\n noStroke();\n ellipse(mouseX, mouseY, 30, 30);\n}", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "public void display()\n {\n if(corner == 1)\n {\n moveTo(new Location(0,0));\n setDirection(135);\n }\n else if(corner == 2)\n {\n moveTo(new Location(0,9));\n setDirection(225);\n }\n else if(corner == 3)\n {\n moveTo(new Location(9,9));\n setDirection(315);\n }\n else if(corner == 4)\n {\n moveTo(new Location(9,0));\n setDirection(45);\n }\n }", "public void russia(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(165,0,0);//gray\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(0);//black\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(18,39,148);//blue\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //red\n fill(194,24,11);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n fill(194,24,11);\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n\n fill(194,24,11);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(160,0,0);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "public void draw()\r\n {\r\n\tfinal GraphicsLibrary g = GraphicsLibrary.getInstance();\r\n\t_level.draw(g);\r\n\t_printText.draw(\"x\" + Mario.getTotalCoins(), 30, _height - 36, false);\r\n\t_printText.draw(\"C 000\", _width - 120, _height - 36, false);\r\n\t_printText.draw(Mario.getLives() + \"UP\", 240, _height - 36, false);\r\n\t_printText.draw(Mario.getPoints() + \"\", 400, _height - 36, false);\r\n\t_coin.draw();\r\n\t_1UP.draw();\r\n }", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tPoint p = this.getP();\r\n\t\tint start_point = p.getX();\r\n\t\tint end_point = p.getY();\r\n\t\t\r\n\t\tint width = this.getWidth();\r\n\t\tint height = this.getHeight();\r\n\t\t\r\n\t\tSystem.out.println(\"�l�p�`��`�� �_(\" + start_point +\",\"+ end_point + \")����Ƃ��āA��\"+ width +\"����\"+ height +\"�̎l�p�`\");\r\n\t}", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "public void draw() {\n }", "public void show() {\r\n\t\tif ((polygon.npoints > 1)\r\n\t\t\t\t&& ((polygon.xpoints[0] != polygon.xpoints[1]) || (polygon.ypoints[0] != polygon.ypoints[1]))) {\r\n\t\t\tGraphics2D gr = (Graphics2D) graphics;\r\n\t\t\tgr.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\r\n\t\t\tgr.setPaint(colorPar.getDevColor());\r\n\t\t\tgr.setStroke(new BasicStroke((float) lineWidth));\r\n\t\t\tPolygon p = isTransformed ? transformed() : polygon;\r\n\t\t\tGeneralPath gp = new GeneralPath();\r\n\t\t\tgp.moveTo((float) (p.xpoints[0]), (float) (p.ypoints[0]));\r\n\t\t\tfor (int i = 1; i < p.npoints; i++) {\r\n\t\t\t\tgp.lineTo((float) (p.xpoints[i]), (float) (p.ypoints[i]));\r\n\t\t\t}\r\n\t\t\tgr.draw(gp);\r\n\t\t\tif (validBounds) {\r\n\t\t\t\tsetBounds(gp.getBounds());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void draw() {\r\n\t\tbackground(255); // Clear the screen with a white background\r\n\r\n\t\ttextSize(12);\r\n\t\tfill(0);\r\n\r\n\t\tstroke(0);\r\n\t\tcurve.draw(this);\r\n\t}", "private void drawFlights(){\n if(counter%180 == 0){ //To not execute the SQL request every frame.\n internCounter = 0;\n origins.clear();\n destinations.clear();\n internCounter = 0 ;\n ArrayList<String> answer = GameScreen.database.readDatas(\"SELECT Origin, Destination FROM Flights\");\n for(String s : answer){\n internCounter++;\n String[] parts = s.split(\" \");\n String xyOrigin, xyDestination;\n try{\n xyOrigin = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE SystemName = '\"+parts[0]+\"' ;\").get(0);\n } catch (IndexOutOfBoundsException e){\n String systemId = GameScreen.database.getOneData(\"SELECT SystemId FROM Planet WHERE PlanetName = '\"+parts[0]+\"' ;\");\n xyOrigin = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE id = '\"+systemId+\"' ;\").get(0);\n }\n origins.add(new Vector2(Float.parseFloat(xyOrigin.split(\" \")[0]), Float.parseFloat(xyOrigin.split(\" \")[1])));\n\n try{\n xyDestination = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE SystemName = '\"+parts[1]+\"' ;\").get(0);\n }catch (IndexOutOfBoundsException e){\n String systemId = GameScreen.database.getOneData(\"SELECT SystemId FROM Planet WHERE PlanetName = '\"+parts[1]+\"' ;\");\n xyDestination = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE id = '\"+systemId+\"' ;\").get(0);\n }\n destinations.add(new Vector2(Float.parseFloat(xyDestination.split(\" \")[0]), Float.parseFloat(xyDestination.split(\" \")[1])));\n }\n }\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.setColor(Color.WHITE);\n renderer.circle(600, 380, 4);\n for(int i = 0; i<internCounter; i++){\n renderer.line(origins.get(i), destinations.get(i));\n renderer.setColor(Color.RED);\n renderer.circle(origins.get(i).x, origins.get(i).y, 3);\n renderer.setColor(Color.GREEN);\n renderer.circle(destinations.get(i).x, destinations.get(i).y, 3);\n }\n renderer.end();\n }", "public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}", "public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(.01);\n for (Point2D p : s) {\n p.draw();\n }\n }", "public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(0.01);\n for (Point2D point : points) {\n StdDraw.point(point.x(), point.y());\n }\n StdDraw.setPenRadius();\n }", "static void draw()\n {\n for (Viewport viewport : viewports)\n viewport.draw(renderers);\n }", "public void draw(){\n }", "public void draw() {\n\n }", "public void draw(WorldLocation coord){\n \n }", "public static void draw(ArrayList<Sighting> data){\n \n \t\tint backgroundColor = Utils.globalProcessing.color(120, 120, 120, 60);\n \n \t\tUtils.globalProcessing.fill(backgroundColor);\n \n \t\tUtils.globalProcessing.rect(200, 0, 1024, 768);\n \t\t//Utils.globalProcessing.rectMode(Utils.globalProcessing.CORNERS);\n \t\tArrayList<Shape> shapes = new ArrayList<Shape>();\n \t\tArrayList<Time> times = new ArrayList<Time>();\n \t\tArrayList<City> locations = new ArrayList<City>();\n \t\t//calculate min/max for each dimension\n \t\tfor(int i = 0; i < data.size(); i++){\n \t\t\tSighting s = data.get(i);\n \t\t\tif(!shapes.contains(s.getShape()))\n \t\t\t\tshapes.add(s.getShape());\n \t\t\tif(!times.contains(s.getTime()))\n \t\t\t\ttimes.add(s.getTime());\n \t\t\tif(!locations.contains(s.getPosition()))\n \t\t\t\tlocations.add((City)s.getPosition());\n \t\t}\n \t\tfloat xPloti, xPlote, yPloti, yPlote;\n \t\txPloti = 200;\n \t\txPlote = 1024;\n \t\tyPloti = 100;\n \t\tyPlote = 700;\n \n \t\tfloat maxDistance = 0;\n\t\tfloat minPopulationDensity = Utils.allCities.get(0).getPopulationDensity();\n\t\tfloat maxpopulationDensity = Utils.allCities.get(0).getPopulationDensity();\n \t\tfor(City c: locations){\n \t\t\tif(c.getDistanceAirport() > maxDistance)\n \t\t\t\tmaxDistance = c.getDistanceAirport();\n \t\t\tif(c.getPopulationDensity()< minPopulationDensity)\n \t\t\t\tminPopulationDensity = c.getPopulationDensity();\n \t\t\telse if(c.getPopulationDensity() > maxpopulationDensity)\n \t\t\t\tmaxpopulationDensity = c.getPopulationDensity();\n \n \t\t}\n \n \n \n \t\t\n \t\tfor(int i = 0; i < data.size(); i++){\n \t\t\tSighting s = data.get(i);\n \t\t\tUtils.globalProcessing.stroke(s.getShape().getColor());\n \t\t\tUtils.globalProcessing.beginShape();\n \t\t\t//Utils.globalProcessing.stroke(120);\n \t\t\tfloat x = Utils.globalProcessing.map((float)1/7, 0, 1, xPloti, xPlote);\n \t\t\tfloat y = Utils.globalProcessing.map(((City)s.getPosition()).getDistanceAirport(), 0, maxDistance, yPloti, yPlote);\n \n \t\t\tUtils.globalProcessing.vertex(x,y); // distance\n \n \t\t\tx = Utils.globalProcessing.map((float)2/7, 0, 1, xPloti, xPlote);\n \t\t\ty = Utils.globalProcessing.map(((City)s.getPosition()).getPopulationDensity(), minPopulationDensity, maxpopulationDensity, yPloti, yPlote);\n \n \t\t\tUtils.globalProcessing.vertex(x,y); //populationDensity\n \t\t\tUtils.globalProcessing.endShape();\n \t\t\t//It works only if I threat all the couple of points as separate, indipendent lines\n \t\t\tUtils.globalProcessing.beginShape();\n \n \t\t\tUtils.globalProcessing.vertex(x,y);\n \n \t\t\tx = Utils.globalProcessing.map((float)3/7, 0, 1, xPloti, xPlote);\n \t\t\tif(s.getTime().getBeginTime().get(Calendar.HOUR_OF_DAY)<19 &&s.getTime().getBeginTime().get(Calendar.HOUR_OF_DAY)>=7)\n \t\t\t\ty = Utils.globalProcessing.map(1, 0, 3, yPloti, yPlote); //day \n \t\t\telse\t\n \t\t\t\ty = Utils.globalProcessing.map(2, 0, 3, yPloti, yPlote); //night \n \t\t\t//System.out.println(x +\" \" +y);\n \t\t\tUtils.globalProcessing.vertex(x,y); // night/day\n \t\t\tUtils.globalProcessing.endShape();\n \t\t\tUtils.globalProcessing.beginShape();\n \t\t\t\n \t\t\tUtils.globalProcessing.vertex(x,y);\n \t\t\tx = Utils.globalProcessing.map((float)4/7, 0, 1, xPloti, xPlote);\n \t\t\ty = Utils.globalProcessing.map(s.getTime().getBeginTime().get(Calendar.MONTH)+1, 0, 13, yPloti, yPlote);\n \t\t\tUtils.globalProcessing.vertex(x, y); //month of the year\n \t\t\t\n \t\t\tUtils.globalProcessing.endShape();\n \t\t\tUtils.globalProcessing.beginShape();\n \t\t\t\n \t\t\tUtils.globalProcessing.vertex(x, y);\n \t\t\tx = Utils.globalProcessing.map((float)5/7, 0, 1, xPloti, xPlote);\n \t\t\tif(s.getTime().getBeginTime().get(Calendar.MONTH)==Calendar.MARCH || s.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.APRIL ||\n \t\t\t\t\ts.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.MAY) //Spring\n \t\t\ty = Utils.globalProcessing.map(1, 0, 5, yPloti, yPlote);\n \t\t\telse if(s.getTime().getBeginTime().get(Calendar.MONTH)==Calendar.JUNE || s.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.JULY ||\n \t\t\t\t\ts.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.AUGUST) //summer\n \t\t\t\ty = Utils.globalProcessing.map(2, 0, 5, yPloti, yPlote);\n \t\t\telse if(s.getTime().getBeginTime().get(Calendar.MONTH)==Calendar.SEPTEMBER || s.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.OCTOBER ||\n \t\t\t\t\ts.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.NOVEMBER) //autumn\n \t\t\t\ty = Utils.globalProcessing.map(3, 0, 5, yPloti, yPlote);\n \t\t\telse\n \t\t\t\ty = Utils.globalProcessing.map(3, 0, 5, yPloti, yPlote);\n \t\t\tUtils.globalProcessing.vertex(x, y); //seasons\n \t\t\t\n \t\t\tUtils.globalProcessing.endShape();\n \t\t\tUtils.globalProcessing.beginShape();\n \t\t\t\n \t\t\tUtils.globalProcessing.vertex(x, y);\n \t\t\t\n \t\t\tx = Utils.globalProcessing.map((float)6/7, 0, 1, xPloti, xPlote);\n \t\t\ty = Utils.globalProcessing.map(s.getTime().getBeginTime().get(Calendar.YEAR), 2000, 2011, yPloti, yPlote);\n \t\t\tUtils.globalProcessing.vertex(x, y); //years\n \t\t\tUtils.globalProcessing.endShape();\n \t\t}\n \t\t//draw vertical lines\n \n \t\tfor(int i = 1; i < 7 ; i++){\n \t\t\tfloat x = Utils.globalProcessing.map((float)i/7, 0, 1, xPloti, xPlote);\n \t\t\t//Utils.globalProcessing.\n \t\t}\n \n \t}", "public void draw()\n\t{\t\t\n\t\tArrayList<Segment> seg = new ArrayList<Segment>();\n\t\tfor(int i = 0; i < hullVertices.length - 1; i++)\n\t\t{\n\t\t\tSegment s = new Segment(hullVertices[i], hullVertices[i+1]);\n\t\t\tseg.add(s);\n\t\t}\n\t\tSegment s1 = new Segment(hullVertices[hullVertices.length-1], hullVertices[0]);\n\t\tseg.add(s1);\n\t\t// Based on Section 4.1, generate the line segments to draw for display of the convex hull.\n\t\t// Assign their number to numSegs, and store them in segments[] in the order.\n\t\tSegment[] segments = new Segment[seg.size()];\n\t\tfor(int i = 0; i < seg.size(); i++)\n\t\t{\n\t\t\tsegments[i] = seg.get(i);\n\t\t}\n\t\t// The following statement creates a window to display the convex hull.\n\t\tPlot.myFrame(pointsNoDuplicate, segments, getClass().getName());\n\t}", "private static void draw() {\n\t\tinitField();\n\t\tview = new View(field);\n\t\tview.setSize(viewWidth, viewHeight);\n\t\tframe = new JFrame();\n\t\tframe.setSize(fwidth, fheight);\n\t\tframe.setTitle(\"Land Mine\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.add(view);\n\t\tframe.setVisible(true);\n\t}", "@Override\n\tpublic void draw(Graphics2D g) {\n\n\t\t\n\t\tg.setColor(new Color(36, 36, 36));\n\t\tg.fillRect(0, 0, Driver.screenWidth, Driver.screenHeight);\n\n\t\tg.setColor(new Color(87, 87, 87));\n\t\tSceneManager.sm.currSector.drawBasicGrid(g, 1000000, (int) (100 * (1 / Math.sqrt((Camera.scale)))), 2);\n\n\t\tif (target != null) {\n\t\t\tg.setPaint(new Color(255, 0, 0, 200));\n\t\t\tg.setStroke(new BasicStroke((int) (3 * Camera.scale)));\n\t\t\tCamera.toScreen(target.cm).drawCircle(g, (int) (150 * Camera.scale));\n\t\t}\n\n\t\tSceneManager.sm.currSector.draw(g);\n\n\t\tg.setColor(Color.BLACK);\n\n\t\tg.drawImage(ui, 0, 0, 1920, 1010, null);\n\n\t\t// draw player scrap amt\n\t\tg.setFont(Misc.arialBig);\n\t\tg.setColor(Color.white);\n\t\tg.drawString(\"\" + Driver.playerScrap, 1733, 72);\n\n\t\t// draw speed\n\t\tg.setColor(new Color(0, 119, 166));\n\t\tg.fillRect(1872, (int) (113 + 564 - 564\n\t\t\t\t* ((p.vel.getMagnitude() * 20) / (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag)))), 33,\n\t\t\t\t(int) (564 * ((p.vel.getMagnitude() * 20)\n\t\t\t\t\t\t/ (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag)))));\n\t\tg.setFont(Misc.font);\n\t\tg.setColor(Color.LIGHT_GRAY);\n\t\tg.drawString((int) (p.vel.getMagnitude() * 20) + \" mph\", 1760, 564 - (int) (564\n\t\t\t\t* ((p.vel.getMagnitude() * 20) / (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag))))\n\t\t\t\t+ 120);\n\n\t\t// show selected ship\n\t\tif (selected != null && !selected.destroyed) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tCamera.toScreen(selected.cm).drawCircle(g, (int) (150 * Camera.scale));\n\t\t}\n\n\t\tfor (Ship s : SceneManager.sm.currSector.ships) {\n\t\t\tfor (Part p : s.parts) {\n\t\t\t\tif (p.health < p.baseHealth && Camera.scale > .5) {\n\t\t\t\t\tg.rotate(s.rotation, Camera.toXScreen(s.cm.x), Camera.toYScreen(s.cm.y));\n\t\t\t\t\tdrawPartHealth(g, p,\n\t\t\t\t\t\t\tCamera.toScreen(new Point(s.pos.x + p.pos.x * Part.SQUARE_WIDTH,\n\t\t\t\t\t\t\t\t\ts.pos.y + p.pos.y * Part.SQUARE_WIDTH)),\n\t\t\t\t\t\t\t(int) (40 * Camera.scale), (int) (15 * Camera.scale), p.health, p.baseHealth);\n\t\t\t\t\tg.rotate(-s.rotation, Camera.toXScreen(s.cm.x), Camera.toYScreen(s.cm.y));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (partTarget != null) {\n\t\t\tg.rotate(target.rotation, Camera.toXScreen(target.cm.x), Camera.toYScreen(target.cm.y));\n\t\t\tg.setColor(Color.red);\n\t\t\toutlinePart(g,\n\t\t\t\t\tCamera.toScreen(new Point(target.pos.x + partTarget.pos.x * Part.SQUARE_WIDTH,\n\t\t\t\t\t\t\ttarget.pos.y + partTarget.pos.y * Part.SQUARE_WIDTH)),\n\t\t\t\t\t(int) (partTarget.width * Part.SQUARE_WIDTH * Camera.scale),\n\t\t\t\t\t(int) (partTarget.height * Part.SQUARE_WIDTH * Camera.scale));\n\t\t\tg.rotate(-target.rotation, Camera.toXScreen(target.cm.x), Camera.toYScreen(target.cm.y));\n\t\t}\n\n\t\t// shipYard.draw(g);\n\t\t// starMap.draw(g);\n\n\t\tif (target != null) {\n\t\t\tPoint avg = Camera.toScreen(target.cm.avg(p.cm));\n\t\t\tPoint mapAvg = target.cm.avg(p.cm);\n\t\t\teyeLoc.setXY(mapAvg.x, mapAvg.y);\n\t\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, eyeFocused ? .1f : .3f));\n\t\t\tg.drawImage(eye, (int)(avg.x - eye.getWidth() * Camera.scale / 2), (int)(avg.y - eye.getHeight() * Camera.scale / 2),\n\t\t\t\t\t(int)(eye.getWidth() * Camera.scale), (int)(eye.getHeight() * Camera.scale), null);\n\t\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f));\n\t\t\t\n\t\t}\n\n\t\tminimap.mc.focus(Camera.toMap(Driver.screenWidth / 2, Driver.screenHeight / 2));\n\t\tminimap.draw(g, SceneManager.sm.currSector.ships);\n\n\t\tif (!running) {\n\t\t\tg.setPaint(new Color(0, 0, 0, 128));\n\t\t\tg.fillRect(0, 0, Driver.screenWidth, Driver.screenHeight);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.setFont(Misc.arialSmall);\n\t\t\tg.drawString(\"Paused - [p] to resume\", 900, 50);\n\t\t\tg.setColor(Color.cyan);\n\t\t\tg.drawString(\n\t\t\t\t\t\"Protect your reactor, destroy enemies to collect scrap, build up your ship, and make your way to the end of the galaxy!\",\n\t\t\t\t\tDriver.screenWidth / 2 - 920, Driver.screenHeight / 2 - 400);\n\t\t\tg.setColor(Color.WHITE);\n\t\t\tg.drawString(\"CONTROL BASICS:\", Driver.screenWidth / 2 - 940, Driver.screenHeight / 2 - 350);\n\t\t\t\n\t\t\tg.drawString(\"MOVEMENT: Rotation = Q and E, Translation = WASD\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 300);\n\t\t\tg.drawString(\"COMBAT: Right Click on enemy = set as a target: lasers will shoot target when in range\",\n\t\t\t\t\tDriver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 250);\n\t\t\tg.drawString(\"CAMERA: Middle Mouse Click on ship = set the camera to that ship\",\n\t\t\t\t\tDriver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 200);\n\t\t\tg.drawString(\"Scroll Wheel = zoom\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 150);\n\t\t\tg.drawString(\"Arrow Keys = pan\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 100);\n\t\t\t\n\t\t\tg.drawString(\"GAMEPLAY + STRATEGY:\", Driver.screenWidth / 2 - 930, Driver.screenHeight / 2 - 0);\n\t\t\tg.setColor(new Color(217, 52, 52));\n\t\t\tg.drawString(\"If you just started, your ship is weak! Upgrade it before entering combat!\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -50);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.drawString(\"Cannot jump to the next sector if current sector is not clear\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -100);\n\t\t\tg.drawString(\"Enemies will attack you when in range & can't edit ship if in enemy range\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -150);\n\t\t\t\n\t\t\t\n\t\t\t//advanced\n\t\t\tg.drawString(\"ADVANCED:\", Driver.screenWidth / 2 - 930, Driver.screenHeight / 2 - -200);\n\t\t\tg.drawImage(eye, Driver.screenWidth / 2 - 340, Driver.screenHeight / 2 + 225, eye.getWidth()/4, eye.getHeight()/4, null);\n\t\t\tg.drawString(\"Middle Click the icon: set the camera to focus on the center of battle\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -250);\n\t\t\tg.drawString(\"Spacebar = recenter camera on player\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -300);\n\t\t}\n\n\t}", "public void draw(){\n\t\tcomponent.draw();\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "public void draw(Graphics page){\r\n\t\tpage.setColor(Color.RED);\r\n\t\tpage.drawPolygon(this);\r\n\t\t\r\n\t\tif(bDrawQueued){\r\n\t\t\tpage.setColor(Color.GREEN);\r\n\t\t}\r\n\t\t\r\n\t\tdrawFloorName(page);\r\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制三角形\");\t\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 }", "public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}", "public DrawHouse(){\r\n\t\tcanvas = new SketchPad(1000, 1000);\r\n\t\tpen = new DrawingTool(canvas);\r\n\t}", "public void draw() {\n for (Point2D p: mPoints) {\n StdDraw.filledCircle(p.x(), p.y(), 0.002);\n }\n }", "ZHDraweeView mo91981h();", "public void draw() {\t\t\n\t\ttexture.draw(x, y);\n\t\tstructure.getTexture().draw(x,y);\n\t}", "@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}", "private void draw(Graphics2D g)\r\n\t{\t\t\r\n\t\tColor[] cols = new Color[] {Color.red,Color.green,Color.blue};\r\n\t\t\r\n\t\t// clear the background\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,0,640,510);\r\n\t\t\r\n\t\tg.translate(0,30);\t\r\n\r\n\t\tif (zp < 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t} \r\n\r\n\t\tColor[] colMap = new Color[16];\r\n\t\tcolMap[3] = Color.white;\r\n\t\tcolMap[12] = cols[(timers[0] / 100) % 3];\r\n\t\tcolMap[13] = Color.black;\r\n\t\tcolMap[14] = Color.gray;\r\n\t\tcolMap[15] = Color.yellow;\r\n\t\t\r\n\t\tfor (int x=0;x<30;x++) {\r\n\t\t\tfor (int y=0;y<30;y++) {\r\n\t\t\t\tint tile = getTile(x,y);\r\n\t\t\t\tif (tile != 0) {\r\n\t\t\t\t\tPolygon p = new Polygon();\r\n\r\n\t\t\t\t\tint total = addPoint(x,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y+1,p);\r\n\t\t\t\t\ttotal += addPoint(x,y+1,p);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (total == 4) {\r\n\t\t\t\t\t\tif ((tile == 11) && (!controls[19])) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ((tile == 13) && (toggles > 0)) {\r\n\t\t\t\t\t\t\ttile = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tColor col = cols[l % 3];\r\n\t\t\t\t\t\tif ((x+y) % 2 == 0) {\r\n\t\t\t\t\t\t\tcol = cols[l % 3].darker();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (colMap[tile] != null) {\r\n\t\t\t\t\t\t\tcol = colMap[tile];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (tile > 10) {\r\n\t\t\t\t\t\t\tg.setColor(Color.darkGray);\r\n\t\t\t\t\t\t\tif (tile == 11) {\r\n\t\t\t\t\t\t\t\tg.setColor(col.darker());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPolygon p2 = new Polygon();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.1,p2);\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.1,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.9,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.9,p2);\r\n\t\r\n\t\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\t\tg.fillPolygon(p2);\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}\r\n\t\t}\r\n\r\n\t\tif (zp >= 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t}\r\n\t\t\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,-20,640,45);\r\n\t\tg.setColor(Color.darkGray);\r\n\t\tg.drawLine(0,25,640,25);\r\n\t\tg.setFont(g.getFont().deriveFont(Font.BOLD, 20.0f));\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.green,0,0,Color.white));\r\n\t\t\r\n\t\tg.drawString(\"Time: \"+(timers[0]/1000),530,20);\r\n\t\tg.drawString(\"Ball\",20,20);\r\n\t\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.yellow,0,0,Color.white));\r\n\t\tg.drawString(msg,(640-g.getFontMetrics().stringWidth(msg))/2,20);\r\n\t\t\r\n\t\tif (!started) {\r\n\t\t\tang += 0.01f;\r\n\t\t\tg.drawString(\"Cursors - Move PgUp/PgDown - View Space - Jump\",60,470);\r\n\t\t}\r\n\t}", "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\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\r\n public void draw() {\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制矩形\");\n\t\t\n\t}", "protected abstract void draw();", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "public void draw() {\n background(0); // Color de Fondo - Negro\n // Se mencionan cada una de las funciones a utilizar en la class.\n a.movbolitas1(); // a.funcion es para las funciones principales.\n a.bolita2();\n a.movbolitas();\n a.bolita1();\n a.triangulo();\n a.triangulo1();\n c.movbolitas(); // c.funcion y m.funci\\u00f3n es para las mismas\n // funciones anteriores que se repetir\\u00e1n\n c.bolita1();\n c.movbolitas();\n c.bolita2();\n m.movbolitas();\n m.bolita1();\n m.movbolitas1();\n m.bolita2();\n a.circulos();\n}", "private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }", "private void draw() {\n gsm.draw(g);\n }", "public void draw() {\n for (Point2D point : pointSet) {\n point.draw();\n }\n }", "public void draw(Graphics g){\n\n g.setColor(Color.red);\n g.drawLine(x1,y1,x2,y2);\n g.drawLine(x2,y2,x3,y3);\n g.drawLine(x3,y3,x1,y1);\n g.setFont(new Font(\"Courier\", Font.BOLD, 12));\n DecimalFormat fmt = new DecimalFormat(\"0.##\"); \n g.setColor(Color.blue);\n g.drawString(fmt.format(perimeter()) + \" \" + name,x1+2 , y1 -2);\n \n }", "public void med1() {\n DrawingPanel win = new DrawingPanel(WIDTH, HEIGHT);\n java.awt.Graphics g = win.getGraphics();\n win.setTitle(\"Med. 1\");\n win.setLocation(300, 10);\n win.setBackground(java.awt.Color.red);\n for(int y = -10; y < HEIGHT; y += 24) {\n for(int x = -10; x < WIDTH; x += 24) {\n octagon(x, y, g);\n }\n }\n }", "void drawAt(DrawSurface d, Rectangle rect);", "public void drawInfoWindow(){\n\n p.pushMatrix();\n p.translate(0,0); // translate whole window if necessary\n\n // display name and show\n p.stroke(0);\n p.strokeWeight(2);\n p.textSize(30);\n p.fill(0);\n p.text(\"Info\",735,35);\n p.rectMode(CORNER);\n p.fill(219, 216, 206);\n p.rect(730,40,550,700);\n p.rectMode(CENTER);\n\n p.fill(0);\n p.pushMatrix();{\n p.translate(740,80);\n p.textSize(15);\n p.text(\"General\",0,-20);\n p.line(-3,-15,150,-15);\n p.text(\"Speed: \" + manipulator.maxSpeed,0,0);\n p.text(\"Angle of rotation for segment_1: \" + p.degrees(manipulator.segment_1_rot),0,20);\n p.text(\"Angle of rotation for segment_2: \" + p.degrees(manipulator.segment_2_rot),0,40);\n\n\n }p.popMatrix();\n\n p.popMatrix();\n\n }", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}", "void drawSky()\n {\n \tPaint color = canvas.getFill();\n \tcanvas.setFill(Color.DEEPSKYBLUE);\n \tcanvas.fillRect(0, 0, mainCanvas.getWidth(), mainCanvas.getHeight());\n \tcanvas.setFill(color);\n }", "public void draw(Graphics2D g) {\r\n \tAffineTransform at = g.getTransform();\r\n g.translate(s.x, s.y);\r\n double rot = d.theta() + Math.PI / 2;\r\n \r\n g.rotate(rot);\r\n g.scale(SCALE, SCALE);\r\n g.setColor(COLOR);\r\n g.fillPolygon(XP, YP, XP.length);\r\n //If the shield is active we draw it to\r\n if (shield) {\r\n \tg.setColor(Color.red);\r\n \tg.drawOval(-13, -10, 25, 25);\r\n }\r\n //If the ship is trusting we draw the thruster\r\n if (thrusting) {\r\n g.setColor(Color.red);\r\n g.fillPolygon(XPTHRUST, YPTHRUST, XPTHRUST.length);\r\n g.setColor(Color.yellow);\r\n g.fillPolygon(XPTHRUSTIN, YPTHRUSTIN, XPTHRUSTIN.length);\r\n }\r\n g.setTransform(at);\r\n \r\n \r\n }", "public void draw() {\n StdDraw.clear();\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setXscale(-drawLength * 0.1, drawLength * 1.2);\n StdDraw.setYscale(-drawLength * 0.65, drawLength * 0.65);\n StdDraw.line(0, 0, drawLength, 0);\n StdDraw.text(-drawLength * 0.05, 0, \"0\");\n StdDraw.text(drawLength * 1.1, 0, Integer.toString(size()));\n }", "public void draw() {\n //Grey background, which removes the tails of the moving elements\n background(0, 0, 0);\n //Running the update function in the environment class, updating the positions of stuff in environment\n //update function is a collection of the methods needing to be updated\n if(stateOfProgram == 0) { startTheProgram.update(); }\n if(stateOfProgram == 1) {\n theEnvironment.update();\n //update function is a collection of the methods needing to be updated\n //Running the update function in the Population class, updating the positions and states of the rabbits.\n entitiesOfRabbits.update();\n entitiesOfGrass.update();\n entitiesOfFoxes.update();\n\n entitiesOfRabbits.display();\n entitiesOfGrass.display();\n entitiesOfFoxes.display();\n openGraph.update();\n }\n }", "protected void drawImpl()\n {\n if (mode == 2) {\n // Invader\n background(0);\n noStroke();\n int triangleXDensity = 32;\n int triangleYDensity = 18;\n for (int i = 0; i < triangleXDensity + 100; i++) {\n for (int j = 0; j < triangleYDensity + 100; j++) {\n float value = scaledBandLevels[(i % scaledBandLevels.length)];\n float shapeSize = map(value, 0, 255, 0, 150);\n int currentX = (width/triangleXDensity) * i;\n int currentY = (int)(((height/triangleYDensity) * j));\n\n if (subMode == 1) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 3));\n }\n else if (subMode == 3) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 6));\n }\n\n if (subMode == 4) {\n shapeSize = map(value, 0, 255, 0, 500);\n }\n\n if ((i + j) % (int)random(1,5) == 0) {\n fill(0, 255, 255);\n }\n else {\n fill(234,100,255);\n }\n pushMatrix();\n if (subMode == 2) {\n translate(width/2, height/2);\n rotate(radians(frameCount % value * 2));\n translate(-width/2, -height/2);\n }\n triangle(currentX, currentY - shapeSize/2, currentX - shapeSize/2, currentY + shapeSize/2, currentX + shapeSize/2, currentY + shapeSize/2);\n popMatrix();\n }\n }\n\n }\n else if (mode == 5) {\n // Mirror Ball\n background(0);\n translate(width/2, height/2, 500);\n noStroke();\n if (subMode == 0) {\n rotateY(frameCount * PI/800);\n }\n else if (subMode == 1 || subMode == 2) {\n rotateY(frameCount * PI/800);\n rotateX(frameCount * PI/100);\n }\n else if (subMode == 3) {\n rotateY(frameCount * PI/400);\n }\n\n for (int i = 0; i < 100; i++) {\n for (int j = 0; j < 100; j++) {\n rotateY((2*PI/200) * j);\n pushMatrix();\n rotateX((2*PI/200) * i);\n translate(0,200);\n if (j > 50 && j < 150) {\n rotateX(PI/2);\n }\n else {\n rotateX(-PI/2);\n }\n if (subMode == 2 || subMode == 3) {\n fill(i * 2, 0, j, scaledBandLevels[i % scaledBandLevels.length] * 2);\n }\n else {\n fill(255, scaledBandLevels[i % scaledBandLevels.length]);\n }\n rect(0,200,20,20);\n popMatrix();\n }\n }\n }\n else if (mode == 8) {\n // End To Begin\n background(0);\n\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i] && modSizes[i] < 60) {\n modSizes[i]+=2;\n }\n else if (modSizes[i] > 5) {\n modSizes[i]--;\n }\n }\n \n theta += .2;\n\n if (subMode >=3) {\n theta += .6;\n }\n\n float tempAngle = theta;\n for (int i = 0; i < yvalues.length; i++) {\n yvalues[i] = sin(tempAngle)*amplitude;\n tempAngle+=dx;\n }\n\n noStroke();\n if (subMode >= 4) {\n translate(0, height/2);\n }\n int currentFrameCount = frameCount;\n for (int x = 0; x < yvalues.length; x++) {\n if (subMode >= 4) {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length] * 3);\n rotateX(currentFrameCount * (PI/200));\n }\n else {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length]);\n }\n ellipse(x*xspacing - period/2, height/2+yvalues[x], modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n if (subMode >= 1) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n if (subMode >= 2) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n }\n }\n else if (mode == 1) {\n // Life Support\n background(0);\n noStroke();\n if (trigger) { \n if (subMode == 0) {\n fill(255, 0, 0, triggerHold - (triggerCount * 4));\n }\n else if (subMode == 1) {\n fill(255, triggerHold - (triggerCount * 4));\n }\n rect(0,0,width,height);\n if (triggerCount > triggerHold) {\n trigger = false;\n triggerCount = 1;\n }\n else {\n triggerCount++;\n }\n }\n }\n else if (mode == 6) {\n // Stacking Cards\n background(255);\n if (subMode >= 1) {\n translate(width/2, 0);\n rotateY(frameCount * PI/200);\n }\n imageMode(CENTER);\n\n if (subMode <= 1) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=40;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n else if (subMode == 2) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 4; j++) {\n rotateY(j * (PI/4));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 3) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 4) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int k = 0; k < height; k+= 300) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), k, modSizes[i], modSizes[i]);\n }\n }\n }\n }\n } \n else if (mode == 4) {\n background(0);\n noStroke();\n for (int i = 0; i < letterStrings.length; i++) { \n if (subMode == 0) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), (height/2) + 75);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, (height/2) + 75);\n }\n }\n else if (subMode == 1) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100; j < height + 100; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 2) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100 - (frameCount % 400); j < height + 600; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 3) {\n for (int j = -100; j < height + 100; j+=200) {\n if (random(0,1) < .5) {\n fill(0,250,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n else {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n }\n }\n else if (mode == 9) {\n background(0);\n noStroke();\n fill(234,100,255);\n String bandName = \"ELAPHANT\";\n text(bandName, (width/2) - (textWidth(bandName)/2), (height/2) + 75);\n }\n else {\n background(0);\n }\n }", "public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}", "public void draw(Graphics2D g2) {\r\n\tif (!bustedWall) {\r\n\t\tg2.setColor(new Color(0, 0, 0)); \r\n\t\tSystem.out.println(\"black\"); // for testing purposes\r\n\t}else {\r\n\t\tg2.setColor(new Color(255,255,255)); \r\n\t\tSystem.out.println(\"white\"); // for testing purposes\r\n\t}\r\n\tg2.drawLine(x1, y1, x2, y2); \r\n\t// print the untranslated coordinates for testing purposes\r\n\tSystem.out.println(String.format(\"%d,%d,%d,%d\",x1 - TRANSLATION ,y1 - TRANSLATION,x2 - TRANSLATION,y2 - TRANSLATION));\r\n}", "public void display() {\n PVector d = location.get();\n float diam = d.y/height;\n println(diam);\n\n stroke(0);\n fill(255,0,0);\n ellipse (location.x, location.y, diameter, diameter);\n }", "public void draw() {\n GraphicsContext gc = getGraphicsContext2D();\n /*gc.clearRect(0, 0, getWidth(), getHeight());\n\n if (squareMap != null) {\n squareMap.draw(gc);\n }\n if (hexMap != null) {\n hexMap.draw(gc);\n }*/\n\n // Draw animations\n for (SpriteAnimationInstance anim : animationList) {\n anim.draw(gc);\n }\n\n // Lastly draw the dialogue window, no matter which canvas\n // we are on, all the same.\n DfSim.dialogueWindow.draw(gc);\n\n /*if (landMap != null) {\n landMap.draw(gc);\n }*/\n\n // Draw a border around the canvas\n //drawBorder(gc);\n\n // And now just draw everything directly from the simulator\n /*for (Raindrop item : sim.getDrops()) {\n drawMovableCircle(gc, item);\n }\n for (Earthpatch item : sim.getPatches()) {\n drawMovableCircle(gc, item);\n }\n for (SysShape item : sim.getShapes()) {\n drawSysShape(gc, item);\n }\n for (Spike item : sim.getSpikes()) {\n drawMovablePolygon(gc, item);\n }\n for (GravityWell item : sim.getGravityWells()) {\n drawGravityWell(gc, item);\n }*/\n }", "@Override\n\tpublic void draw() {\n\t}", "public void uk(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings--england\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n noStroke();\n fill(255);\n rect(15,286,74,20);\n rect(212,284,74,20);\n rect(48,248,20,74);\n rect(233,248,20,74);\n quad(26,272,35,260,83,312,72,320);\n quad(262,260,272,272,229,312,220,318);\n quad(25,318,38,328,85,278,75,263);\n quad(264,324,280,316,228,262,214,274);\n\n fill(207,20,43);\n rect(51,248,15,74);\n rect(235,247,15,74);\n rect(15,289,74,15);\n rect(211,286,74,15);\n\n stroke(1);\n fill(0);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(0,36,125);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //gray\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n\n fill(207,20,43);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n fill(0,36,125);\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n fill(200);\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(0,36,125);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n\n fill(0,36,125);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "public abstract void draw( );", "public void draw(Point location) {\n\t}", "public static void mainDraw(Graphics graphics) {\n Color[] colors = {Color.green, Color.blue, Color.red, Color.cyan};\n int rectangles[] = {50, 100, 150, 200};\n for (int k = 0; k < 4; k++) {\n toCenter(graphics, rectangles[k], colors[k]);\n }\n }", "public void draw() {\n draw(this.root, new RectHV(0.0, 0.0, 1.0, 1.0));\n }", "public void display(GLAutoDrawable glDrawable) {\n\n cnt++;\n depth = (cnt/50)%6;\n\n if (cnt%60==0) {\n dalpha = -dalpha;\n dbeta = -dbeta;\n dgama = -dgama;\n }\n\n alpha += dalpha;\n beta += dbeta;\n gama += dgama;\n\n gl.glClear(GL.GL_COLOR_BUFFER_BIT|\n GL.GL_DEPTH_BUFFER_BIT);\n\n viewPort1();\n drawSolar(WIDTH, cnt, WIDTH/3, cnt);\n // the objects' centers are retrieved from above call\n\n viewPort2();\n drawSolar(WIDTH/4, cnt, WIDTH/12, cnt);\n\n viewPort3();\n drawSolar(WIDTH/4, cnt, WIDTH/12, cnt);\n\n viewPort4();\n drawRobot(O, A, B, C, alpha, beta, gama);\n\ttry {\n\t\tThread.sleep(10);\n\t} catch (Exception ignore) {\n\t}\n }", "public void draw() \n\t {\n\t\t draw(root,0,0,1,1,true);\n\t }" ]
[ "0.661921", "0.66065997", "0.6515994", "0.64545214", "0.6391024", "0.6355836", "0.6331783", "0.6331243", "0.63173914", "0.6297884", "0.6270391", "0.6270391", "0.6270391", "0.6270391", "0.62620604", "0.6233397", "0.6219141", "0.6213291", "0.61944103", "0.6164763", "0.6141551", "0.6127063", "0.6127063", "0.6127063", "0.61170954", "0.6087485", "0.60723025", "0.60624605", "0.60614544", "0.604638", "0.60405165", "0.6038563", "0.6032182", "0.60307014", "0.60268915", "0.6018581", "0.6009695", "0.60050094", "0.5978971", "0.597746", "0.59710974", "0.5953665", "0.5950653", "0.59478235", "0.5941008", "0.5927538", "0.5920038", "0.5903215", "0.59028566", "0.58981615", "0.58908933", "0.58799547", "0.58733326", "0.58733326", "0.5868161", "0.5865778", "0.58615714", "0.5858012", "0.58466375", "0.58432066", "0.5839339", "0.58309615", "0.58271813", "0.5823569", "0.5816372", "0.5814153", "0.5814153", "0.5809163", "0.57985777", "0.5786921", "0.5785731", "0.5785731", "0.57800466", "0.57640445", "0.5758925", "0.5758851", "0.57353765", "0.5733336", "0.57300067", "0.57258886", "0.57237446", "0.57237446", "0.57237446", "0.5717339", "0.5715609", "0.57042396", "0.57037807", "0.5702189", "0.57013035", "0.5692345", "0.56918013", "0.5685682", "0.5679549", "0.5675251", "0.56749314", "0.5668759", "0.56650776", "0.56614655", "0.56481093", "0.56454843" ]
0.5811665
67
draw the russia plane
public void russia(){ stroke(1); //back guns fill(0); rect(73,192,4,15); rect(224,192,4,15); rect(71,207,8,15); rect(222,207,8,15); rect(66,207,3,15); rect(232,207,3,17); rect(122,109,4,15); rect(175,110,4,15); rect(121,120,6,15); rect(174,120,6,15); rect(116,124,3,15); rect(182,124,3,15); //wings fill(165,0,0);//gray beginShape(); vertex(14,286); vertex(61,236); vertex(88,308); vertex(51,334); vertex(14,313); endShape(CLOSE); beginShape(); vertex(286,287); vertex(286,312); vertex(247,335); vertex(212,309); vertex(238,238); endShape(CLOSE); fill(0);//black beginShape(); vertex(38,307); vertex(74,307); vertex(80,314); vertex(81,337); vertex(68,345); vertex(38,327); endShape(CLOSE); beginShape(); vertex(219,316); vertex(226,308); vertex(262,308); vertex(262,326); vertex(231,345); vertex(219,336); endShape(CLOSE); fill(18,39,148);//blue beginShape(); vertex(96,191); vertex(61,230); vertex(60,269); vertex(96,312); vertex(101,300); vertex(100,247); vertex(112,232); vertex(132,232); vertex(131,186); endShape(CLOSE); beginShape(); vertex(204,191); vertex(240,230); vertex(240,270); vertex(205,312); vertex(200,302); vertex(200,248); vertex(193,238); vertex(185,231); vertex(170,230); vertex(170,186); endShape(CLOSE); //white fill(200); beginShape(); vertex(70,217); vertex(74,220); vertex(81,210); vertex(85,213); vertex(75,227); vertex(72,229); vertex(71,231); vertex(73,233); vertex(73,268); vertex(71,272); vertex(76,277); vertex(82,274); vertex(89,283); vertex(90,297); vertex(66,272); vertex(65,235); vertex(68,229); vertex(62,228); endShape(CLOSE); beginShape(); vertex(228,217); vertex(225,218); vertex(218,211); vertex(215,213); vertex(223,227); vertex(226,226); vertex(230,230); vertex(227,233); vertex(228,270); vertex(229,272); vertex(223,276); vertex(218,276); vertex(210,283); vertex(211,296); vertex(235,273); vertex(234,233); vertex(232,228); vertex(237,227); endShape(CLOSE); //guns //red fill(194,24,11); beginShape(); vertex(121,301); vertex(98,313); vertex(102,336); vertex(119,342); vertex(139,336); vertex(141,313); endShape(CLOSE);//l beginShape(); vertex(159,312); vertex(162,336); vertex(180,342); vertex(200,336); vertex(202,313); vertex(180,302); endShape(CLOSE); //black fill(0); rect(105,315,30,30); rect(166,315,30,30); quad(105,344,109,355,131,355,135,344); quad(166,344,170,355,192,355,196,344); rect(103,253,33,62);//l rect(164,252,33,62);//r //white fill(200); bezier(103,252,107,230,132,230,136,252);//l bezier(164,252,169,230,192,230,197,252);//r rect(103,280,33,25);//l rect(164,280,33,25);//r rect(104,319,33,26,3);//l rect(165,319,33,26,3);//r fill(194,24,11); rect(115,310,7,28,8);//l rect(178,310,7,28,8);//r fill(194,24,11); rect(105,284,10,15); rect(124,284,10,15); rect(167,285,10,15); rect(185,284,10,15); //body-wings fill(0,0,67);//blue bezier(107,154,101,162,98,169,98,187); bezier(191,153,199,164,202,172,203,187); quad(107,154,98,186,98,223,107,224); quad(191,153,203,186,202,223,192,223); fill(192,0,11);//red quad(134,112,108,147,107,239,132,230); quad(165,112,192,147,193,239,168,230); //black fill(0); quad(130,122,130,142,111,164,111,147); quad(169,122,188,147,188,165,169,144); //white fill(200); beginShape(); vertex(131,154); vertex(129,202); vertex(118,202); vertex(112,181); vertex(110,179); vertex(110,171); endShape(CLOSE); beginShape(); vertex(170,154); vertex(190,172); vertex(190,182); vertex(188,181); vertex(182,201); vertex(172,201); endShape(CLOSE); fill(0); quad(134,193,166,193,154,342,146,342); fill(192,0,11); quad(142,180,159,180,152,352,148,352); //white fill(200); ellipse(150,374,6,50); //head fill(160,0,0); ellipse(149.5f,72,33,25); ellipse(149.5f,94,30,170); fill(0); ellipse(149.5f,94,20,160); fill(154,155,84); ellipse(149.5f,94,17,77); strokeWeight(2); line(143,74,158,74); line(142,104,158,104); strokeWeight(1); fill(200); bezier(143,15,147,2,153,2,155.5f,15); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void draw_plane(Graphics g, int log_num, int i);", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "public void SRU() {\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glLineWidth(1.0f);\n\t\tgl.glBegin( GL.GL_LINES );\n\t\t\tgl.glVertex2f( -200.0f, 0.0f );\n\t\t\tgl.glVertex2f( 200.0f, 0.0f );\n\t\t\tgl.glEnd();\n\t\t// eixo y\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glBegin( GL.GL_LINES);\n\t\t\tgl.glVertex2f( 0.0f, -200.0f);\n\t\t\tgl.glVertex2f( 0.0f, 200.0f );\n\t\tgl.glEnd();\n\t}", "public void drawUserPlane(Graphics g) {\r\n\t\tlevelManager.drawUserPlane(g);\r\n\t}", "public void draw()\n {\n myPencil.up();\n myPencil.backward(100);\n myPencil.down();\n myPencil.turnRight(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(400);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n // Roof\n myPencil.up();\n myPencil.move(0,200);\n myPencil.down();\n myPencil.setDirection(333.435);\n myPencil.forward(223.607);\n myPencil.setColor(new Color(2, 0, 0));\n myPencil.up();\n myPencil.move(0,200);\n myPencil.setDirection(206.565);\n myPencil.down();\n myPencil.forward(223.607);\n // Windows\n myPencil.up();\n myPencil.move(-150,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.turnLeft(90);\n myPencil.forward(50);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(60);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(50,-100);\n myPencil.setDirection(120);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(-150,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n // House Sidewalk\n myPencil.up();\n myPencil.move(-250,-112.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(250,-112.5);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(90);\n myPencil.forward(193);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(90);\n myPencil.up();\n myPencil.move(-75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n // Chimney\n myPencil.up();\n myPencil.move(125,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(52);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(40);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(25);\n // Door window\n myPencil.up();\n myPencil.move(0,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(8);\n myPencil.up();\n myPencil.move(-8,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(16);\n myPencil.up();\n myPencil.move(0,-17);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(16);\n // Door knob\n myPencil.up();\n myPencil.move(14,-55);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(2);\n }", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "@Override\n public void draw() {\n /** preparacion de la ventana **/\n background(255);\n lights();\n directionalLight(40, 90, 100, 1, 40, 40);\n\n translate(origin.x,origin.y);\n scale(zoom);\n\n\n /** entrada del usuario **/\n userInput();\n /** ejes X Y Z **/\n drawAxes();\n /** aplicar ik **/\n writePos();\n\n /** escala de los objetos**/\n scale(-1.2f);\n\n /** esfera que muestra la posicion en coord X Y Z\n *\n * X -> coord[0]\n * Y -> coord[1]\n * Z -> coord[2]\n *\n * **/\n pushMatrix();\n noStroke();\n fill(250, 100, 1);\n translate(-coord_cartesian[1] ,-coord_cartesian[2] -11,-coord_cartesian[0] );\n sphere(2);\n popMatrix();\n\n\n /**\n * Dibuja el brazo\n */\n pushMatrix();\n arm.drawArm();\n popMatrix();\n }", "public void mark_plane(Graphics g, int log_num, int x, int y, int h);", "public void draw() {\n background(255);\n pushMatrix();\n translate(width/2,height/2+20,-160);\n rotateX(PI/3);\n rotateZ(theta);\n land.render(); \n popMatrix();\n\n land.calculate();\n \n theta += 0.0025f;\n}", "void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}", "ZHDraweeView mo91981h();", "public void plotSurface(double du, double dv) {\n\t\t for (double u = 0.; u <= 1. - du; u += du) {\n\t\t frame.beginShape(frame.QUAD_STRIP);\n\t\t for (double v = 0.; v <= 1.; v += dv) {\n\t\t \tPoint_3 p0, p1; // four points defining a quad\n\t\t \tp0=evaluate(u,v);\n\t\t \tp1=evaluate(u+du,v);\n\t\t frame.noStroke();\n\t\t frame.fill( 255 );\n\t\t frame.vertex( (float)p0.getX(), (float)p0.getY(), (float)p0.getZ() );\n\t\t frame.vertex( (float)p1.getX(), (float)p1.getY(), (float)p1.getZ() );\n\t\t }\n\t\t frame.endShape();\n\t\t }\n\t}", "void draw();", "protected void drawImpl()\n {\n if (mode == 2) {\n // Invader\n background(0);\n noStroke();\n int triangleXDensity = 32;\n int triangleYDensity = 18;\n for (int i = 0; i < triangleXDensity + 100; i++) {\n for (int j = 0; j < triangleYDensity + 100; j++) {\n float value = scaledBandLevels[(i % scaledBandLevels.length)];\n float shapeSize = map(value, 0, 255, 0, 150);\n int currentX = (width/triangleXDensity) * i;\n int currentY = (int)(((height/triangleYDensity) * j));\n\n if (subMode == 1) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 3));\n }\n else if (subMode == 3) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 6));\n }\n\n if (subMode == 4) {\n shapeSize = map(value, 0, 255, 0, 500);\n }\n\n if ((i + j) % (int)random(1,5) == 0) {\n fill(0, 255, 255);\n }\n else {\n fill(234,100,255);\n }\n pushMatrix();\n if (subMode == 2) {\n translate(width/2, height/2);\n rotate(radians(frameCount % value * 2));\n translate(-width/2, -height/2);\n }\n triangle(currentX, currentY - shapeSize/2, currentX - shapeSize/2, currentY + shapeSize/2, currentX + shapeSize/2, currentY + shapeSize/2);\n popMatrix();\n }\n }\n\n }\n else if (mode == 5) {\n // Mirror Ball\n background(0);\n translate(width/2, height/2, 500);\n noStroke();\n if (subMode == 0) {\n rotateY(frameCount * PI/800);\n }\n else if (subMode == 1 || subMode == 2) {\n rotateY(frameCount * PI/800);\n rotateX(frameCount * PI/100);\n }\n else if (subMode == 3) {\n rotateY(frameCount * PI/400);\n }\n\n for (int i = 0; i < 100; i++) {\n for (int j = 0; j < 100; j++) {\n rotateY((2*PI/200) * j);\n pushMatrix();\n rotateX((2*PI/200) * i);\n translate(0,200);\n if (j > 50 && j < 150) {\n rotateX(PI/2);\n }\n else {\n rotateX(-PI/2);\n }\n if (subMode == 2 || subMode == 3) {\n fill(i * 2, 0, j, scaledBandLevels[i % scaledBandLevels.length] * 2);\n }\n else {\n fill(255, scaledBandLevels[i % scaledBandLevels.length]);\n }\n rect(0,200,20,20);\n popMatrix();\n }\n }\n }\n else if (mode == 8) {\n // End To Begin\n background(0);\n\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i] && modSizes[i] < 60) {\n modSizes[i]+=2;\n }\n else if (modSizes[i] > 5) {\n modSizes[i]--;\n }\n }\n \n theta += .2;\n\n if (subMode >=3) {\n theta += .6;\n }\n\n float tempAngle = theta;\n for (int i = 0; i < yvalues.length; i++) {\n yvalues[i] = sin(tempAngle)*amplitude;\n tempAngle+=dx;\n }\n\n noStroke();\n if (subMode >= 4) {\n translate(0, height/2);\n }\n int currentFrameCount = frameCount;\n for (int x = 0; x < yvalues.length; x++) {\n if (subMode >= 4) {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length] * 3);\n rotateX(currentFrameCount * (PI/200));\n }\n else {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length]);\n }\n ellipse(x*xspacing - period/2, height/2+yvalues[x], modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n if (subMode >= 1) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n if (subMode >= 2) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n }\n }\n else if (mode == 1) {\n // Life Support\n background(0);\n noStroke();\n if (trigger) { \n if (subMode == 0) {\n fill(255, 0, 0, triggerHold - (triggerCount * 4));\n }\n else if (subMode == 1) {\n fill(255, triggerHold - (triggerCount * 4));\n }\n rect(0,0,width,height);\n if (triggerCount > triggerHold) {\n trigger = false;\n triggerCount = 1;\n }\n else {\n triggerCount++;\n }\n }\n }\n else if (mode == 6) {\n // Stacking Cards\n background(255);\n if (subMode >= 1) {\n translate(width/2, 0);\n rotateY(frameCount * PI/200);\n }\n imageMode(CENTER);\n\n if (subMode <= 1) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=40;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n else if (subMode == 2) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 4; j++) {\n rotateY(j * (PI/4));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 3) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 4) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int k = 0; k < height; k+= 300) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), k, modSizes[i], modSizes[i]);\n }\n }\n }\n }\n } \n else if (mode == 4) {\n background(0);\n noStroke();\n for (int i = 0; i < letterStrings.length; i++) { \n if (subMode == 0) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), (height/2) + 75);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, (height/2) + 75);\n }\n }\n else if (subMode == 1) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100; j < height + 100; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 2) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100 - (frameCount % 400); j < height + 600; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 3) {\n for (int j = -100; j < height + 100; j+=200) {\n if (random(0,1) < .5) {\n fill(0,250,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n else {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n }\n }\n else if (mode == 9) {\n background(0);\n noStroke();\n fill(234,100,255);\n String bandName = \"ELAPHANT\";\n text(bandName, (width/2) - (textWidth(bandName)/2), (height/2) + 75);\n }\n else {\n background(0);\n }\n }", "public void draw() {\n background(0); // Color de Fondo - Negro\n // Se mencionan cada una de las funciones a utilizar en la class.\n a.movbolitas1(); // a.funcion es para las funciones principales.\n a.bolita2();\n a.movbolitas();\n a.bolita1();\n a.triangulo();\n a.triangulo1();\n c.movbolitas(); // c.funcion y m.funci\\u00f3n es para las mismas\n // funciones anteriores que se repetir\\u00e1n\n c.bolita1();\n c.movbolitas();\n c.bolita2();\n m.movbolitas();\n m.bolita1();\n m.movbolitas1();\n m.bolita2();\n a.circulos();\n}", "private void drawWaypoints() {\r\n\t\tint x1 = (width - SIZE_X) / 2;\r\n\t\tint y1 = (height - SIZE_Y) / 2;\r\n\r\n\t\tfloat scissorFactor = (float) _resolutionResolver.getScaleFactor() / 2.0f;\r\n\r\n\t\tint glLeft = (int) ((x1 + 10) * 2.0f * scissorFactor);\r\n\t\tint glWidth = (int) ((SIZE_X - (10 + 25)) * 2.0f * scissorFactor);\r\n\t\tint gluBottom = (int) ((this.height - y1 - SIZE_Y) * 2.0f * scissorFactor);\r\n\t\tint glHeight = (int) ((SIZE_Y) * 2.0f * scissorFactor);\r\n\r\n\t\tGL11.glEnable(GL11.GL_SCISSOR_TEST);\r\n\t\tGL11.glScissor(glLeft, gluBottom, glWidth, glHeight);\r\n\r\n\t\tGL11.glPushMatrix();\r\n\t\tGL11.glScalef(_textScale, _textScale, _textScale);\r\n\r\n\t\t_startCell = getStartCell();\r\n\t\t_cellStartX = (int) (((float) x1 + (float) 13) / _textScale);\r\n\t\t_cellStartY = (int) (((float) y1 + (float) 22) / _textScale);\r\n\r\n\t\tint x2 = _cellStartX;\r\n\t\tint y2 = _cellStartY + (int) ((float) 0 * (float) CELL_SIZE_Y / _textScale);\r\n\r\n\t\tImmutableList<UltraTeleportWaypoint> list = UltraTeleportWaypoint.getWaypoints();\r\n\t\tfor (int i = 0; i < 2; ++i) {\r\n \t\tfor (int j = 0; j < list.size() && j < MAX_CELL_COUNT; ++j) {\r\n\r\n \t\t\tint x = _cellStartX;\r\n \t\t\tint y = _cellStartY + (int) ((float) j * (float) CELL_SIZE_Y / _textScale);\r\n\r\n \t\t\tdouble posX = list.get(j + _startCell).getPos().getX();\r\n \t\t\tdouble posY = list.get(j + _startCell).getPos().getY();\r\n \t\t\tdouble posZ = list.get(j + _startCell).getPos().getZ();\r\n\r\n \t\t\tString strX = String.format(\"x: %4.1f\", posX);\r\n \t\t\tString strY = String.format(\"y: %4.1f\", posY);\r\n \t\t\tString strZ = String.format(\"z: %4.1f\", posZ);\r\n \t\t\tString text = strX + \" \" + strY + \" \" + strZ;\r\n\r\n \t\t\tif (i == 0) {\r\n \t\t\t this.fontRendererObj.drawStringWithShadow(text, x + 18, y, list.get(j).getColor());\r\n\r\n \t\t\t boolean selected = j + _startCell < _selectedList.size() ? _selectedList.get(j + _startCell) : false;\r\n\r\n \t\t\t GL11.glPushMatrix();\r\n GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);\r\n \t\t\t this.mc.renderEngine.bindTexture(selected ? BUTTON_ON_RESOURCE : BUTTON_OFF_RESOURCE);\r\n \t\t\t HubbyUtils.drawTexturedRectHelper(0, x + CELL_SIZE_X + 18, y - 3, 16, 16, 0, 0, 256, 256);\r\n \t\t\t GL11.glPopMatrix();\r\n \t\t\t}\r\n \t\t\telse if (i == 1) {\r\n \t\t\t\tBlockPos pos = new BlockPos((int)posX, (int)posY - 1, (int)posZ);\r\n \t\t\t Block block = Minecraft.getMinecraft().theWorld.getBlockState(pos).getBlock();\r\n \t\t\tif (block != null) {\r\n \t\t\t Item itemToRender = Item.getItemFromBlock(block);\r\n \t\t\t itemToRender = itemToRender != null ? itemToRender : Item.getItemFromBlock((Block)Block.blockRegistry.getObjectById(3));\r\n \t\t\t ItemStack is = new ItemStack(itemToRender, 1, 0);\r\n \t\t\t _itemRender.renderItemAndEffectIntoGUI(is, x - 1, y - 3);\r\n \t _itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, is, x - 1, y - 3, \"\"); // TODO: is the last param correct?\r\n \t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t}\r\n\r\n\t\tGL11.glPopMatrix();\r\n\t\tGL11.glDisable(GL11.GL_SCISSOR_TEST);\r\n\t}", "public void usa(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(192,0,11);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,0,67);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n //green\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n //green\n fill(192,0,11);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n }", "private void drawSprite(int x, int y, int u, int v)\n {\n GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);\n this.mc.getTextureManager().bindTexture(STAT_ICONS);\n float f = 0.0078125F;\n float f1 = 0.0078125F;\n int i = 18;\n int j = 18;\n Tessellator tessellator = Tessellator.getInstance();\n BufferBuilder bufferbuilder = tessellator.getBuffer();\n bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);\n bufferbuilder.pos((double)(x + 0), (double)(y + 18), (double)this.zLevel).tex((double)((float)(u + 0) * 0.0078125F), (double)((float)(v + 18) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 18), (double)(y + 18), (double)this.zLevel).tex((double)((float)(u + 18) * 0.0078125F), (double)((float)(v + 18) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 18), (double)(y + 0), (double)this.zLevel).tex((double)((float)(u + 18) * 0.0078125F), (double)((float)(v + 0) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 0), (double)(y + 0), (double)this.zLevel).tex((double)((float)(u + 0) * 0.0078125F), (double)((float)(v + 0) * 0.0078125F)).endVertex();\n tessellator.draw();\n }", "public void draw(Graphics2D g2) {\r\n\tif (!bustedWall) {\r\n\t\tg2.setColor(new Color(0, 0, 0)); \r\n\t\tSystem.out.println(\"black\"); // for testing purposes\r\n\t}else {\r\n\t\tg2.setColor(new Color(255,255,255)); \r\n\t\tSystem.out.println(\"white\"); // for testing purposes\r\n\t}\r\n\tg2.drawLine(x1, y1, x2, y2); \r\n\t// print the untranslated coordinates for testing purposes\r\n\tSystem.out.println(String.format(\"%d,%d,%d,%d\",x1 - TRANSLATION ,y1 - TRANSLATION,x2 - TRANSLATION,y2 - TRANSLATION));\r\n}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制三角形\");\t\n\t}", "private void renderSkybox(int p_73971_1_, int p_73971_2_, float p_73971_3_) {\n\t\tthis.mc.getFramebuffer().unbindFramebuffer();\n\t\tGlStateManager.viewport(0, 0, 256, 256);\n\t\tthis.drawPanorama(p_73971_1_, p_73971_2_, p_73971_3_);\n\t\tthis.rotateSkybox();\n\t\tthis.mc.getFramebuffer().bindFramebuffer(true);\n\t\tGlStateManager.viewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);\n\t\tTessellator var4 = Tessellator.getInstance();\n\t\tWorldRenderer var5 = var4.getWorldRenderer();\n\t\tvar5.startDrawingQuads();\n\t\tfloat var6 = this.width > this.height ? 120.0F / (float) this.width : 120.0F / (float) this.height;\n\t\tfloat var7 = (float) this.height * var6 / 256.0F;\n\t\tfloat var8 = (float) this.width * var6 / 256.0F;\n\t\tvar5.func_178960_a(1.0F, 1.0F, 1.0F, 1.0F);\n\t\tint var9 = this.width;\n\t\tint var10 = this.height;\n\t\tvar5.addVertexWithUV(0.0D, (double) var10, (double) this.zLevel, (double) (0.5F - var7),\n\t\t\t\t(double) (0.5F + var8));\n\t\tvar5.addVertexWithUV((double) var9, (double) var10, (double) this.zLevel, (double) (0.5F - var7),\n\t\t\t\t(double) (0.5F - var8));\n\t\tvar5.addVertexWithUV((double) var9, 0.0D, (double) this.zLevel, (double) (0.5F + var7), (double) (0.5F - var8));\n\t\tvar5.addVertexWithUV(0.0D, 0.0D, (double) this.zLevel, (double) (0.5F + var7), (double) (0.5F + var8));\n\t\tvar4.draw();\n\t}", "public void paintComponent(Graphics g){\n super.paintComponent(g);\n g.setColor(Color.BLACK);\n g.fillRect(0,0,width*scale,height*scale);\n if(game.getWindowNum() == 2){\n for(int x = 0; x < world.length*scale; x+=scale){\n for(int y = 0; y < world[0].length*scale; y+= scale){\n if(game.getDiscoverdWorld()[x/scale][y/scale] == 1){\n if(world[x/scale][y/scale] == 0){\n g.setColor(Color.CYAN);\n }\n else if(world[x/scale][y/scale] == 1){\n g.setColor(Color.GREEN);\n }\n else if(world[x/scale][y/scale] == 2){\n g.setColor(new Color(102,66,0));\n }\n else if(world[x/scale][y/scale] == 3){\n g.setColor(new Color(105,105,105));\n }\n g.fillRect(x,y,scale,scale);\n }\n }\n }\n g.setColor(Color.RED);\n g.fillRect((int)(game.getPlayerCords()[0]*(double)scale),(int)(game.getPlayerCords()[1]*(double)scale),scale*game.getPlayerDimentions()[0],scale*game.getPlayerDimentions()[1]);\n g.setColor(Color.BLACK);\n g.drawRect((int)(game.getViewBoxCords()[0]*scale),(int)(game.getViewBoxCords()[1]*scale),(int)(game.getPlayerView().length*scale),(int)(game.getPlayerView()[0].length*scale));\n g.drawString(\"X: \"+game.getPlayerCords()[0]+\" Y: \"+game.getPlayerCords()[1],20,20);\n g.drawString(\"Seed: \"+game.getSeed(),20,40);\n g.drawString(\"Grounded: \"+game.getPlayer().getGrounded(),20,60);\n g.drawString(\"Vertical Velocity: \"+game.getPlayer().getVertVelocity(),20,80);\n }\n else if(game.getWindowNum() == 1){\n int[][] viewPlane = game.getPlayerView();\n double playerViewScale = game.getPlayerViewScale();\n double[] viewBoxCords = game.getViewBoxCords();\n g.setColor(Color.CYAN);\n for(int x = 0; x < viewPlane.length;x++){\n for(int y = 0; y < viewPlane[0].length;y++){\n if(viewPlane[x][y] != 0 && game.getDiscoverdWorld()[x+(int)viewBoxCords[0]][y+(int)viewBoxCords[1]] == 1){\n g.drawImage(textures.get(viewPlane[x][y]-1),(int)(((double)x-(viewBoxCords[0]%1))*playerViewScale),(int)(((double)y-(viewBoxCords[1]%1))*playerViewScale),this);\n /*\n if(viewPlane[x][y] == 1){\n g.setColor(Color.GREEN);\n }\n else if(viewPlane[x][y] == 2){\n g.setColor(new Color(102,66,0));\n }\n else if(viewPlane[x][y] == 3){\n g.setColor(new Color(105,105,105));\n }\n g.fillRect((int)(((double)x-(viewBoxCords[0]%1))*playerViewScale),(int)(((double)y-(viewBoxCords[1]%1))*playerViewScale),(int)(playerViewScale+0.5),(int)(playerViewScale+0.5));\n */\n }\n else if(viewPlane[x][y] == 0 && game.getDiscoverdWorld()[x+(int)viewBoxCords[0]][y+(int)viewBoxCords[1]] == 1){\n g.fillRect((int)(((double)x-(viewBoxCords[0]%1))*playerViewScale),(int)(((double)y-(viewBoxCords[1]%1))*playerViewScale),(int)(playerViewScale+1),(int)(playerViewScale+1));\n }\n }\n }\n if(recentlyHit != null){\n g.setColor(new Color(50,50,50,(int)(255*(1-recentlyHit.getHealthPercent()))));\n g.fillRect((int)(recentlyHit.getX()*playerViewScale)-(int)(viewBoxCords[0]%1*playerViewScale)+1,(int)(recentlyHit.getY()*playerViewScale)-(int)(viewBoxCords[1]%1*playerViewScale)+1,(int)playerViewScale,(int)playerViewScale);\n }\n //g.setColor(Color.RED);\n //g.fillRect((int)((game.getPlayerCords()[0]-viewBoxCords[0])*playerViewScale),(int)((game.getPlayerCords()[1]-viewBoxCords[1])*playerViewScale),(int)playerViewScale*game.getPlayerDimentions()[0],(int)playerViewScale*game.getPlayerDimentions()[1]);\n if(game.isFacingRight()){\n g.drawImage(textures.get(3),(int)((game.getPlayerCords()[0]-viewBoxCords[0])*playerViewScale),(int)((game.getPlayerCords()[1]-viewBoxCords[1])*playerViewScale),this);\n }\n else{\n g.drawImage(textures.get(4),(int)((game.getPlayerCords()[0]-viewBoxCords[0])*playerViewScale),(int)((game.getPlayerCords()[1]-viewBoxCords[1])*playerViewScale),this);\n }\n g.setColor(Color.BLACK);\n g.setFont(font2);\n g.drawString(\"X: \"+game.getPlayerCords()[0]+\" Y: \"+game.getPlayerCords()[1],20,20);\n g.drawString(\"Seed: \"+game.getSeed(),20,40);\n g.drawString(\"Grounded: \"+game.getPlayer().getGrounded(),20,60);\n g.drawString(\"Vertical Velocity: \"+game.getPlayer().getVertVelocity(),20,80);\n g.drawString(\"View Box Cords: X:\"+viewBoxCords[0]+\" Y: \"+viewBoxCords[1],20,100);\n int a = 0;\n for(Item i: game.getPlayerInventory()){\n if(i != null){\n g.drawString(i.getName()+\" Count: \"+i.getCount(),20,120+a*20);\n a++;\n }\n } \n g.setColor(new Color(100,100,100,95));\n g.fillRect((int)(0.09*viewPlane.length*playerViewScale),(int)(0.8*viewPlane[0].length*playerViewScale),(int)(0.82*viewPlane.length*playerViewScale),(int)(0.12*viewPlane[0].length*playerViewScale));\n g.setColor(Color.WHITE);\n for(int i = 0; i < game.getPlayerHotbar().length;i++){\n if(i == game.getPlayer().getHotbarItemSelected()){\n g.setColor(Color.BLACK);\n g.fillRect((int)(0.11*viewPlane.length*playerViewScale)+(int)(i*0.08*viewPlane.length*playerViewScale),(int)(0.81*viewPlane[0].length*playerViewScale),(int)(0.06*playerViewScale*viewPlane.length),(int)(0.1*viewPlane[0].length*playerViewScale));\n g.setColor(Color.WHITE);\n }\n else{\n g.fillRect((int)(0.11*viewPlane.length*playerViewScale)+(int)(i*0.08*viewPlane.length*playerViewScale),(int)(0.81*viewPlane[0].length*playerViewScale),(int)(0.06*playerViewScale*viewPlane.length),(int)(0.1*viewPlane[0].length*playerViewScale));\n }\n if(game.getPlayer().getHotbar()[i] != null){\n g.drawImage(textures.get(game.getPlayer().getHotbar()[i].getTextureNum()),(int)(0.125*viewPlane.length*playerViewScale)+(int)(i*0.08*viewPlane.length*playerViewScale),(int)(0.83*viewPlane[0].length*playerViewScale),this);\n }\n }\n if(game.isInvenVisible()){\n int rowLength = 10;\n g.setColor(new Color(100,100,100,180));\n g.fillRect((int)(0.05*screenWidth),(int)(0.06*screenHeight),(int)(0.9*screenWidth),(int)(0.7*screenHeight));\n g.setColor(Color.WHITE);\n int count = 0; \n for(Item i: game.getPlayerInventory()){\n if(i!=null){\n g.drawImage(textures.get(i.getTextureNum()),(int)(0.08*screenWidth)+(int)((count%rowLength)*0.085*screenWidth),(int)(0.085*screenHeight)+(int)((int)(count/rowLength)*0.085*screenHeight),this);\n g.drawString(\"x\"+i.getCount(),(int)(0.11*screenWidth)+(int)((count%rowLength)*0.085*screenWidth),(int)(0.096*screenHeight)+(int)((int)(count/rowLength)*0.085*screenHeight));\n count++;\n }\n }\n }\n else if(game.isCraftingVisible()){\n g.setColor(new Color(100,100,100,180));\n g.fillRect((int)(0.05*viewPlane.length*playerViewScale),(int)(0.05*viewPlane[0].length*playerViewScale),(int)(0.9*viewPlane.length*playerViewScale),(int)(0.7*viewPlane[0].length*playerViewScale));\n }\n g.setColor(Color.BLACK);\n g.drawRect((int)(screenWidth*0.8),(int)(screenHeight*.03),(int)(screenWidth*.18),(int)(screenHeight*0.04));\n g.setColor(new Color((int)(255*(1-game.getPlayerHealthPercent())),(int)(255*game.getPlayerHealthPercent()),0));\n g.fillRect((int)(screenWidth*0.8)+1,(int)(screenHeight*.03)+1,(int)(screenWidth*.18*game.getPlayerHealthPercent())-1,(int)(screenHeight*0.04)-1);\n g.setColor(new Color(50,50,50,200));\n g.setFont(font1);\n g.drawString(game.getPlayerHealthPercent()*100+\"%\",(int)(screenWidth*.88),(int)(screenHeight*0.06));\n }\n }", "@Test\n\tpublic void testCuatroEnRayaVertical() {\n\t\t\n\t\tint []posX = new int[4];\n\t\tint []posY = new int[4];\n\t\tfor (int x = 1; x <= 7; ++x) {\n\t\t\tfor (int y = 1; y <= 6 - 3; ++y) {\n\t\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\t\tposX[l] = x;\n\t\t\t\t\tposY[l] = y + l;\n\t\t\t\t}\n\t\t\t\ttestCuatroEnRaya(posX, posY, 0, Counter.WHITE);\n\t\t\t\ttestCuatroEnRaya(posX, posY, 0, Counter.BLACK);\n\t\t\t}\n\t\t}\n\t}", "private void drawUniverse() {\n Random r = new Random();\n Point lower = getLower();\n Point upper = getUpper();\n lower = new Point(lower.x / (UNIVERSE_SCALE), lower.y / (UNIVERSE_SCALE));\n upper = new Point(upper.x / (UNIVERSE_SCALE), upper.y / (UNIVERSE_SCALE));\n\n universe.generateFrom(lower.x, lower.y, upper.x, upper.y );\n \n //sets scale of star backdrop\n starBackdrop.setScaleX(zoom / 5);\n starBackdrop.setScaleY(zoom / 5);\n gameCanvas.setScaleX(zoom / 10);\n gameCanvas.setScaleY(zoom / 10);\n \n //clears before drawing\n g.clearRect(0, 0, gameCanvas.getWidth(), gameCanvas.getHeight());\n \n //int x = universe.xMin(), y = universe.yMin();\n starBackdrop.setTranslateX((-mapOffsetX - dragOffsetX) * 2);\n starBackdrop.setTranslateY((-mapOffsetY - dragOffsetY) * 2);\n \n //draw non travelable solar systems\n for (SparseSpace.SparseIterator iter = universe.iterateFrom(lower.x, lower.y, upper.x, upper.y); iter.hasNext();) {\n SolarSystem a = iter.next();\n Image starImage = null;\n if (a != null && !travelable.contains(a)) {\n int x = a.getX() * UNIVERSE_SCALE;\n int y = a.getY() * UNIVERSE_SCALE;\n r.setSeed(a.name().hashCode());\n \n //set color of star based on suntype\n if (a.sunType().usesColor()) {\n g.setFill(new Color(a.sunType().getR(), a.sunType().getG(), a.sunType().getB(), 1.0));\n } else {\n starImage = sunImages.get(a.sunType().getName());\n }\n \n //initializes size and position variables\n double size = 20 + a.planets().length * 2;\n double xPosition = (x - mapOffsetX - dragOffsetX) + (512 - mapOffsetX - dragOffsetX) - (size / 2);\n double yPosition = (y - mapOffsetY - dragOffsetY) + (288 - mapOffsetY - dragOffsetY) - (size / 2);\n if (dragFinished) {\n solarSystemLocations.put(new Point((int) (xPosition + (size / 2)), (int) (yPosition + (size / 2))), a);\n }\n if (starImage == null) {\n g.fillOval(xPosition, yPosition, size, size);\n } else {\n Affine old = g.getTransform();\n double angle = r.nextDouble() * 360;\n rotate(angle, xPosition + size / 2, yPosition + size / 2);\n g.drawImage(starImage, xPosition, yPosition, size, size);\n g.setTransform(old);\n }\n g.setFill(Color.WHITE);\n }\n }\n \n //darken non-travelable planets\n g.setFill(new Color(0, 0, 0, 0.7));\n g.fillRect(0, 0, 1024, 512);\n \n //draw travel radius\n double radsize = player.getTravelRadius() * UNIVERSE_SCALE * 2;\n double radx = (((player.getCurrentSolarSystem().getX() * UNIVERSE_SCALE) - mapOffsetX - dragOffsetX)) + (512 - mapOffsetX - dragOffsetX) - (radsize / 2f);\n double rady = (((player.getCurrentSolarSystem().getY() * UNIVERSE_SCALE) - mapOffsetY - dragOffsetY)) + (288 - mapOffsetY - dragOffsetY) - (radsize / 2f);\n g.strokeOval(radx, rady, radsize, radsize);\n g.setFill(new Color(0, 0, 1, 0.1));\n g.fillOval(radx, rady, radsize, radsize);\n \n drawTravelable();\n }", "private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }", "protected void skybox() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(0, 0, 0);\n pos2 = new Triple(100, 0, 0);\n pos3 = new Triple(100, 0, 100);\n pos4 = new Triple(0, 0, 100);\n pos5 = new Triple(0, 100, 0);\n pos6 = new Triple(100, 100, 0);\n pos7 = new Triple(100, 100, 100);\n pos8 = new Triple(0, 100, 100);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, .25, 0),\n new Vertex(pos3, .25, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, .25, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 21 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 1, 0),\n new Vertex(pos5, .75, 0),\n new Vertex(pos8, .75, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, .75, 1),\n new Vertex(pos4, 1, 1),\n new Vertex(pos1, 1, 0),\n 21 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, .25, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos3, .25, 1),\n new Vertex(pos2, .25, 0),\n 21 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, .75, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos8, .75, 1),\n new Vertex(pos5, .75, 0),\n 21 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "void draw() {\n scsw.draw();\n \n}", "@Override\n public void draw() {\n super.draw(); \n double radius = (this.getLevel() * 0.0001 + 0.025) * 2.5e10;\n double x = this.getR().cartesian(0) - Math.cos(rot) * radius;\n double y = this.getR().cartesian(1) - Math.sin(rot) * radius;\n StdDraw.setPenRadius(0.01);\n StdDraw.setPenColor(StdDraw.RED);\n StdDraw.point(x, y);\n \n }", "public void uk(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings--england\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n noStroke();\n fill(255);\n rect(15,286,74,20);\n rect(212,284,74,20);\n rect(48,248,20,74);\n rect(233,248,20,74);\n quad(26,272,35,260,83,312,72,320);\n quad(262,260,272,272,229,312,220,318);\n quad(25,318,38,328,85,278,75,263);\n quad(264,324,280,316,228,262,214,274);\n\n fill(207,20,43);\n rect(51,248,15,74);\n rect(235,247,15,74);\n rect(15,289,74,15);\n rect(211,286,74,15);\n\n stroke(1);\n fill(0);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(0,36,125);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //gray\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n\n fill(207,20,43);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n fill(0,36,125);\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n fill(200);\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(0,36,125);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n\n fill(0,36,125);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "public void draw();", "public void draw();", "public void draw();", "public CheckPlane( Vector p, Vector n, Vector o )\n\t{\n\t\tsuper(p,n,new Color());\n\t\tsetOrientation(o);\n\t\tsetColor( new Color(0.01,0.01,0.01), new Color(0.99,0.99,0.99) );\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tPoint p = this.getP();\r\n\t\tint start_point = p.getX();\r\n\t\tint end_point = p.getY();\r\n\t\t\r\n\t\tint width = this.getWidth();\r\n\t\tint height = this.getHeight();\r\n\t\t\r\n\t\tSystem.out.println(\"�l�p�`��`�� �_(\" + start_point +\",\"+ end_point + \")����Ƃ��āA��\"+ width +\"����\"+ height +\"�̎l�p�`\");\r\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制矩形\");\n\t\t\n\t}", "@Test\n\tpublic void testCuatroEnRayaDiag2() {\n\t\t\n\t\tint []posX = new int[4];\n\t\tint []posY = new int[4];\n\t\tfor (int i = 1; i <= 12; ++i) {\n\t\t\tint sx = Math.min(i, 7);\n\t\t\tint sy = Math.min(13 - i, 6);\n\t\t\twhile ((sy - 4 >= 0) && (sx - 4 >= 0)) {\n\t\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\t\tposX[l] = sx - l;\n\t\t\t\t\tposY[l] = sy - l;\n\t\t\t\t}\n\t\t\t\tpruebaCuatroEnRaya(posX, posY);\n\t\t\t\tsy--; sx--;\n\t\t\t}\n\t\t}\n\t}", "public void draw() {\n \n }", "public void render() {\r\n\t\t //Draw all of the sprites in the game\r\n\t background.draw(0,backgroudY1);\r\n\t\tbackground.draw(0,backgroudY2);\r\n\t\tbackground.draw(0,backgroudY3);\r\n\t\tbackground.draw(WIDTH/2,backgroudY1);\r\n\t\tbackground.draw(WIDTH/2,backgroudY2);\r\n\t background.draw(WIDTH/2,backgroudY3);\r\n\t \r\n\t // call this method from Player class, to draw the plane.\r\n\t player.render();\r\n\t \r\n\t \r\n\t // loop through every enemy, draw enemy if it's not killed\r\n\t for(int i=0; i<enemy.length; i++) {\r\n\t \t\r\n \tif(enemy[i] != null && enemyKilled[i] == true) {\r\n \t\t\r\n\t \t\t\r\n\t enemy[i].render();\r\n\t \r\n\t \t}\r\n\t \r\n\t }\r\n\t // loop through every laser, if it has not made contact with any enemy,\r\n\t // call its render method to draw it\r\n\t for (int i = 0; i < arr_size; i++) {\r\n\t \tif (lasers[i] != null && laserUsed[i] == true) {\r\n\t lasers[i].render();\r\n \t}\r\n\t \t\r\n\t }\r\n\t \r\n\t}", "private void draw(Graphics2D g)\r\n\t{\t\t\r\n\t\tColor[] cols = new Color[] {Color.red,Color.green,Color.blue};\r\n\t\t\r\n\t\t// clear the background\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,0,640,510);\r\n\t\t\r\n\t\tg.translate(0,30);\t\r\n\r\n\t\tif (zp < 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t} \r\n\r\n\t\tColor[] colMap = new Color[16];\r\n\t\tcolMap[3] = Color.white;\r\n\t\tcolMap[12] = cols[(timers[0] / 100) % 3];\r\n\t\tcolMap[13] = Color.black;\r\n\t\tcolMap[14] = Color.gray;\r\n\t\tcolMap[15] = Color.yellow;\r\n\t\t\r\n\t\tfor (int x=0;x<30;x++) {\r\n\t\t\tfor (int y=0;y<30;y++) {\r\n\t\t\t\tint tile = getTile(x,y);\r\n\t\t\t\tif (tile != 0) {\r\n\t\t\t\t\tPolygon p = new Polygon();\r\n\r\n\t\t\t\t\tint total = addPoint(x,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y+1,p);\r\n\t\t\t\t\ttotal += addPoint(x,y+1,p);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (total == 4) {\r\n\t\t\t\t\t\tif ((tile == 11) && (!controls[19])) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ((tile == 13) && (toggles > 0)) {\r\n\t\t\t\t\t\t\ttile = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tColor col = cols[l % 3];\r\n\t\t\t\t\t\tif ((x+y) % 2 == 0) {\r\n\t\t\t\t\t\t\tcol = cols[l % 3].darker();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (colMap[tile] != null) {\r\n\t\t\t\t\t\t\tcol = colMap[tile];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (tile > 10) {\r\n\t\t\t\t\t\t\tg.setColor(Color.darkGray);\r\n\t\t\t\t\t\t\tif (tile == 11) {\r\n\t\t\t\t\t\t\t\tg.setColor(col.darker());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPolygon p2 = new Polygon();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.1,p2);\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.1,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.9,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.9,p2);\r\n\t\r\n\t\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\t\tg.fillPolygon(p2);\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}\r\n\t\t}\r\n\r\n\t\tif (zp >= 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t}\r\n\t\t\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,-20,640,45);\r\n\t\tg.setColor(Color.darkGray);\r\n\t\tg.drawLine(0,25,640,25);\r\n\t\tg.setFont(g.getFont().deriveFont(Font.BOLD, 20.0f));\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.green,0,0,Color.white));\r\n\t\t\r\n\t\tg.drawString(\"Time: \"+(timers[0]/1000),530,20);\r\n\t\tg.drawString(\"Ball\",20,20);\r\n\t\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.yellow,0,0,Color.white));\r\n\t\tg.drawString(msg,(640-g.getFontMetrics().stringWidth(msg))/2,20);\r\n\t\t\r\n\t\tif (!started) {\r\n\t\t\tang += 0.01f;\r\n\t\t\tg.drawString(\"Cursors - Move PgUp/PgDown - View Space - Jump\",60,470);\r\n\t\t}\r\n\t}", "public void drawPokemon() {\n setAttackText();\n drawImage();\n }", "public void drawControlPolygon() {\n\t\t//this.frame.stroke(255, 0, 0);\n\t\tfor(int i=0;i<points.length;i++) {\n\t\t\tfor(int j=0;j<points[i].length;j++)\n\t\t\t\tthis.frame.drawVertex(points[i][j]);\n\t\t}\n\t}", "void crtajKocka( Graphics g ) {\n double teta = Math.PI * a / 180.0;\n double fi = Math.PI * izvishuvanje / 180.0;\n float kosinusT = (float)Math.cos( teta ), sinusT = (float)Math.sin( teta );\n float kosinusP = (float)Math.cos( fi ), sinusP = (float)Math.sin( fi );\n float kosinusTkosinusP = kosinusT*kosinusP, kosinusTsinusP = kosinusT*sinusP,\n sinusTkosinusP = sinusT*kosinusP, sinusTsinusP = sinusT*sinusP;\n\n // project vertices onto the 2D viewport\n Point[] tocki;\n tocki = new Point[ stranaKocka.length ];\n int j;\n int merka = sirina/4;\n float blisku = 3; // distance from eye to near plane\n float bliskuDoObjekt = 1.5f; // distance from near plane to center of object\n for ( j = 0; j < stranaKocka.length; ++j ) {\n int x0 = stranaKocka[j].x;\n int y0 = stranaKocka[j].y;\n int z0 = stranaKocka[j].z;\n\n // compute an orthographic projection\n float x1 = kosinusT*x0 + sinusT*z0;\n float y1 = -sinusTsinusP*x0 + kosinusP*y0 + kosinusTsinusP*z0;\n\n // now adjust things to get a perspective projection\n float z1 = kosinusTkosinusP*z0 - sinusTkosinusP*x0 - sinusP*y0;\n x1 = x1*blisku/(z1+blisku+bliskuDoObjekt);\n y1 = y1*blisku/(z1+blisku+bliskuDoObjekt);\n\n // the 0.5 is to round off when converting to int\n tocki[j] = new Point(\n (int)(sirina/2 + merka*x1 + 0.5),\n (int)(visina/2 - merka*y1 + 0.5)\n );\n }\n\n // draw the wireframe\n g.setColor( Color.LIGHT_GRAY);\n g.fillRect( 0, 0, sirina, visina );\n g.setColor( Color.white );\n for ( j = 0; j < rabovi.length; ++j ) {\n g.drawLine(\n tocki[ rabovi[j].a ].x, tocki[ rabovi[j].a ].y,\n tocki[ rabovi[j].b ].x, tocki[ rabovi[j].b ].y\n );\n }\n }", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}", "protected final void resetClipPlanes()\n {\n // set the point for each plane to the viewer position\n Vector3d loc = myPosition.getLocation();\n myLeftClip.setPoint(loc);\n myRightClip.setPoint(loc);\n myBottomClip.setPoint(loc);\n myTopClip.setPoint(loc);\n myRightClip.setNormal(myPosition.getRight().rotate(myPosition.getUp(), Math.PI - myHalfFOVx));\n myLeftClip.setNormal(myPosition.getRight().rotate(myPosition.getUp(), myHalfFOVx));\n myBottomClip.setNormal(myPosition.getUp().rotate(myPosition.getRight(), -myHalfFOVy));\n // Increase the top clip a bit to account for zoomed in with terrain.\n myTopClip.setNormal(myPosition.getUp().rotate(myPosition.getRight(), myHalfFOVy - Math.PI + ourTopClipIncreaseAngle));\n }", "public void syria(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(206,17,38);//red\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(0);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,122,61);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,122,61);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,122,61);//green\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(206,17,38);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(0);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n\n fill(206,17,38);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "public void triangulo() {\n fill(0);\n stroke(255);\n strokeWeight(5);\n triangle(width/2, 50, height+100, 650, 350, 650);\n //(width/2, height-100, 350, 150, 900, 150);\n }", "public void draw(){\n\t\t/* Stamps a copy of the planet at the position. the file of the planet image is under folder of \"images\".\n\t\t * a mistake easily to be ignored here..*/\n\t\tString imageToDraw = \"images/\" + imgFileName;\n\t\tStdDraw.picture(xxPos, yyPos, imageToDraw);\n\n\t}", "@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}", "public void printTexture(Graphics2D bg) {\n\r\n\t\tbg.setColor(Color.RED);\r\n\t\tbg.setStroke(new BasicStroke(0.1f));\r\n\r\n\t\t//lower base\r\n\t\tprintTextureLine(bg,0,1);\r\n\t\tprintTextureLine(bg,1,2);\r\n\t\tprintTextureLine(bg,2,3);\r\n\t\tprintTextureLine(bg,3,4);\r\n\t\tprintTextureLine(bg,4,5);\r\n\t\tprintTextureLine(bg,5,0);\r\n\r\n\t\t//lateral faces\r\n\t\tbg.setColor(Color.BLACK);\r\n\t\tprintTextureLine(bg,6,7);\r\n\t\tprintTextureLine(bg,7,14);\r\n\t\tprintTextureLine(bg,14,13);\r\n\t\tprintTextureLine(bg,13,6);\r\n\t\t\r\n\t\tprintTextureLine(bg,7,8);\r\n\t\tprintTextureLine(bg,8,15);\r\n\t\tprintTextureLine(bg,15,14);\r\n\t\t\r\n\t\tprintTextureLine(bg,8,9);\r\n\t\tprintTextureLine(bg,9,16);\r\n\t\tprintTextureLine(bg,16,15);\r\n\t\t\r\n\t\tprintTextureLine(bg,9,10);\r\n\t\tprintTextureLine(bg,10,17);\r\n\t\tprintTextureLine(bg,17,16);\r\n\t\t\r\n\t\tprintTextureLine(bg,10,11);\r\n\t\tprintTextureLine(bg,11,18);\r\n\t\tprintTextureLine(bg,18,17);\r\n\t\t\r\n\t\tprintTextureLine(bg,11,12);\r\n\t\tprintTextureLine(bg,12,19);\r\n\t\tprintTextureLine(bg,19,18);\r\n\t\r\n\t\t//gables\r\n\t\tbg.setColor(Color.BLUE);\r\n\r\n\t\tprintTextureLine(bg,13,14);\r\n\t\tprintTextureLine(bg,14,20);\r\n\t\tprintTextureLine(bg,20,13);\r\n\t\t\r\n\t\tprintTextureLine(bg,16,17);\r\n\t\tprintTextureLine(bg,17,21);\r\n\t\tprintTextureLine(bg,21,16);\r\n\t\t\r\n\r\n\t\t//roof\r\n\t\tbg.setColor(Color.RED);\r\n\t\tprintTexturePolygon(bg,22,23,28,25);\r\n\t\t\r\n\t\tprintTexturePolygon(bg,23,24,26,28);\r\n\t\tprintTexturePolygon(bg,26,27,29,28);\r\n\t\tprintTexturePolygon(bg,28,29,31,30);\r\n\t\tprintTexturePolygon(bg,30,25,28);\r\n\r\n\t}", "public void draw() {\r\n background(255);\r\n\r\n float mouseXFactor = map(mouseX, 0, width, 0.05f, 1);\r\n float mouseYFactor = map(mouseY, 0, height, 0.05f, 1);\r\n\r\n for (int gridX = 0; gridX < img.width; gridX++) {\r\n for (int gridY = 0; gridY < img.height; gridY++) {\r\n // grid position + tile size\r\n float tileWidth = width / (float) img.width;\r\n float tileHeight = height / (float) img.height;\r\n float posX = tileWidth * gridX;\r\n float posY = tileHeight * gridY;\r\n\r\n // get current color\r\n int c = pixelArray[gridX][gridY];\r\n\r\n // greyscale conversion\r\n int greyscale = round(red(c) * 0.222f + green(c) * 0.707f + blue(c) * 0.071f);\r\n\r\n if (drawMode == 1) {\r\n // greyscale to ellipse area\r\n fill(0);\r\n noStroke();\r\n float r2 = 1.1284f * sqrt(tileWidth * tileWidth * (1 - greyscale / 255.0f));\r\n r2 = r2 * mouseXFactor * 3;\r\n ellipse(posX, posY, r2, r2);\r\n } else if (drawMode == 2) {\r\n // greyscale to rotation, line length and stroke weight\r\n stroke(0);\r\n float w4 = map(greyscale, 0, 255, 10, 0);\r\n strokeWeight(w4 * mouseXFactor + 0.1f);\r\n float l4 = map(greyscale, 0, 255, 35, 0);\r\n l4 = l4 * mouseYFactor;\r\n pushMatrix();\r\n translate(posX, posY);\r\n rotate(greyscale / 255.0f * PI);\r\n line(0, 0, 0 + l4, 0 + l4);\r\n popMatrix();\r\n } else if (drawMode == 3) {\r\n // greyscale to line relief\r\n float w5 = map(greyscale, 0, 255, 5, 0.2f);\r\n strokeWeight(w5 * mouseYFactor + 0.1f);\r\n // get neighbour pixel, limit it to image width\r\n int /* color */ c2 = img.get(min(gridX + 1, img.width - 1), gridY);\r\n stroke(c2);\r\n int greyscale2 = (int) (red(c2) * 0.222f + green(c2) * 0.707f + blue(c2) * 0.071f);\r\n float h5 = 50 * mouseXFactor;\r\n float d1 = map(greyscale, 0, 255, h5, 0);\r\n float d2 = map(greyscale2, 0, 255, h5, 0);\r\n line(posX - d1, posY + d1, posX + tileWidth - d2, posY + d2);\r\n } else if (drawMode == 4) {\r\n // pixel color to fill, greyscale to ellipse size\r\n float w6 = map(greyscale, 0, 255, 25, 0);\r\n noStroke();\r\n fill(c);\r\n ellipse(posX, posY, w6 * mouseXFactor, w6 * mouseXFactor);\r\n // TODO 2: Add the following: if(Math.random()<0.1) {pixelArray[gridX][gridY] = lerpColor(c,0xff0000, 0.1f);}\r\n } else if (drawMode == 5) {\r\n stroke(c);\r\n float w7 = map(greyscale, 0, 255, 5, 0.1f);\r\n strokeWeight(w7);\r\n fill(255, 255 * mouseXFactor);\r\n pushMatrix();\r\n translate(posX, posY);\r\n rotate(greyscale / 255.0f * PI * mouseYFactor);\r\n rect(0, 0, 15, 15);\r\n popMatrix();\r\n }\r\n /*\r\n * TODO 3: Add a drawMode == 6 case. \r\n * Try modifying the pixelArray \r\n * Try drawing shapes or colors depending on c and grayscale variables \r\n * Try adding other forms of animation\r\n */\r\n }\r\n }\r\n }", "public VisuCoordinateTranslator() {\r\n limitedDirections = new HashMap<String, Integer>();\r\n limitedCoordinates = new HashMap<String, Shape>();\r\n limitedGroundCoordinates = new HashMap<String, Float[]>();\r\n Float c[] = {22f, 2f, 8.5f, -1.7f, 0f};\r\n limitedDirections.put(\"Status_GWP01\", 0);\r\n ArrayList a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n StraightShape ss = new StraightShape(a);\r\n limitedCoordinates.put(\"0.1.0\", ss);\r\n\r\n\r\n c = new Float[]{-0.97f, 0.88f, 0f, -0.1f, 1f};\r\n limitedDirections.put(\"Status_ETKa1\", 1);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"1.1.0\", ss);\r\n\r\n limitedDirections.put(\"Status_ETKa2\", 1);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa1\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa2\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n\r\n\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n ArrayList<ArrayList<Float>> arrayOval = new ArrayList<ArrayList<Float>>();\r\n c = new Float[]{6.3f, -2f, 7.3f, -14.38f, 0f};//straight_1\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, -4.8f, 7.3f, -14.38f, 0f};//straight_2\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.072f, 0.0695f, 2.826f, -5.424f, -17.2f, 7.3f, 1f};//circular_3\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-4.8f, -2f, 7.3f, -19.715f, 0f};//straight_4\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, 6.3f, 7.3f, -19.715f, 0f};//straight_5\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.038f, 0.1032f, 2.833f, 6.567f, -17.2f, 7.3f, 1f};//circular_6\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.1302f, 0.0114f, 2.8202f, -2.0298f, -17.2f, 7.3f, 1f};//circular_7\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n \r\n c = new Float[]{0.41f, 0.48f, 0.6f, 0.67f, 0.78f, 0.92f};//partitions\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n\r\n OvalShape os = new OvalShape(arrayOval);\r\n\r\n for (int i = 2; i < 11; i++) {\r\n for (int j = 0; j < 3; j++) {\r\n limitedCoordinates.put(\"1.\" + i + \".\" + j, os);\r\n limitedCoordinates.put(\"2.\" + i + \".\" + j, ss);\r\n }\r\n }\r\n\r\n \r\n \r\n c = new Float[]{2.0785f, -1.8972f};\r\n limitedGroundCoordinates.put(\"0.1.0\", c);\r\n c = new Float[]{-6.3859f,-0.4682f};\r\n limitedGroundCoordinates.put(\"1.1.0\", c);\r\n }", "public void Render(){\n //player rect\n glPushMatrix();\n glTranslatef(px, py, 0.0f);\n glBegin(GL_TRIANGLES);\n glColor3f(1.0f, 1.0f, 1.0f);\n glVertex2f(-sx, sy);\n glVertex2f(-sx, -sy);\n glVertex2f(sx, sy);\n glVertex2f(sx, sy);\n glVertex2f(-sx, -sy);\n glVertex2f(sx, -sy);\n glEnd();\n glPopMatrix();\n \n if(debug){\n glPushMatrix();\n glBegin(GL_LINES);\n glColor3f(0f, 1f, 0f);\n glVertex2f(px-sx, py+sy/2);\n glVertex2f(px+sx, py+sy/2);\n glColor3f(0f, 1f, 0f);\n glVertex2f(px-sx, py-sy/2);\n glVertex2f(px+sx, py-sy/2);\n glEnd();\n glPopMatrix();\n }\n \n }", "public void draw(){\n }", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "private void drawsegment_gouraud_texture24(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) {\n //Accurate texture mode added - comments stripped from dupe code, see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode){\n if(precomputeAccurateTexturing()){ //see if the precomputation goes well, if so finish the setup\n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n accurateMode = false; //if the matrix inversion screwed up, revert to normal rendering (something is degenerate)\n }\n }\n \n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n float irf = iradd;\n float igf = igadd;\n float ibf = ibadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n \n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n int ir = (int) (irf * xdiff + rleft);\n int ig = (int) (igf * xdiff + gleft);\n int ib = (int) (ibf * xdiff + bleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode&&goingIn){\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU; iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else{\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n for ( ; xstart < xend; xstart++ ) {\n if(accurateMode){\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else{\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n \n try {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n m_zbuffer[xstart] = iz;\n \n int red;\n int grn;\n int blu;\n \n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = (iu & 0xFFFF) >> 9;\n int ivi = (iv & 0xFFFF) >> 9;\n \n // get texture pixels\n int pix0 = m_texture[ofs];\n int pix1 = m_texture[ofs + 1];\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int pix2 = m_texture[ofs];\n int pix3 = m_texture[ofs + 1];\n \n // red\n int red0 = (pix0 & 0xFF0000);\n int red2 = (pix2 & 0xFF0000);\n int up = red0 + ((((pix1 & 0xFF0000) - red0) * iui) >> 7);\n int dn = red2 + ((((pix3 & 0xFF0000) - red2) * iui) >> 7);\n red = up + (((dn-up) * ivi) >> 7);\n \n // grn\n red0 = (pix0 & 0xFF00);\n red2 = (pix2 & 0xFF00);\n up = red0 + ((((pix1 & 0xFF00) - red0) * iui) >> 7);\n dn = red2 + ((((pix3 & 0xFF00) - red2) * iui) >> 7);\n grn = up + (((dn-up) * ivi) >> 7);\n \n // blu\n red0 = (pix0 & 0xFF);\n red2 = (pix2 & 0xFF);\n up = red0 + ((((pix1 & 0xFF) - red0) * iui) >> 7);\n dn = red2 + ((((pix3 & 0xFF) - red2) * iui) >> 7);\n blu = up + (((dn-up) * ivi) >> 7);\n } else {\n // get texture pixel color\n blu = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)];\n red = (blu & 0xFF0000);\n grn = (blu & 0xFF00);\n blu = blu & 0xFF;\n }\n \n //\n int r = (ir >> 16);\n int g = (ig >> 16);\n // oops, namespace collision with accurate \n // texture vector b...sorry [ewjordan]\n int bb2 = (ib >> 16); \n \n m_pixels[xstart] = 0xFF000000 | \n ((((red * r) & 0xFF000000) | ((grn * g) & 0xFF0000) | (blu * bb2)) >> 8);\n // m_stencil[xstart] = p;\n }\n } catch (Exception e) { }\n \n //\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n ir+=iradd;\n ig+=igadd;\n ib+=ibadd;\n iz+=izadd;\n }\n ypixel++;//accurate mode\n \n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n rleft+=rleftadd;\n gleft+=gleftadd;\n bleft+=bleftadd;\n zleft+=zleftadd;\n }\n }", "private void drawsegment_texture8(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) { \n // Accurate texture mode added - comments stripped from dupe code, \n // see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode) {\n // see if the precomputation goes well, if so finish the setup\n if (precomputeAccurateTexturing()) { \n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n // if the matrix inversion screwed up, revert to normal rendering \n // (something is degenerate)\n accurateMode = false; \n }\n }\n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n \n int red = m_fill & 0xFF0000;\n int grn = m_fill & 0xFF00;\n int blu = m_fill & 0xFF;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n \n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode && goingIn) {\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU;\n iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else {\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n for ( ; xstart < xend; xstart++ ) {\n if (accurateMode) {\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else {\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n // try-catch just in case pixel offset it out of range\n try {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n //m_zbuffer[xstart] = iz;\n \n int al0;\n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = iu & 0xFFFF;\n al0 = m_texture[ofs] & 0xFF;\n int al1 = m_texture[ofs + 1] & 0xFF;\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int al2 = m_texture[ofs] & 0xFF;\n int al3 = m_texture[ofs + 1] & 0xFF;\n al0 = al0 + (((al1-al0) * iui) >> 16);\n al2 = al2 + (((al3-al2) * iui) >> 16);\n al0 = al0 + (((al2-al0) * (iv & 0xFFFF)) >> 16);\n } else {\n al0 = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)] & 0xFF;\n }\n \n int br = m_pixels[xstart];\n int bg = (br & 0xFF00);\n int bb = (br & 0xFF);\n br = (br & 0xFF0000);\n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al0) >> 8)) & 0xFF0000) | \n ((bg + (((grn - bg) * al0) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al0) >> 8)) & 0xFF);\n // m_stencil[xstart] = p;\n }\n }\n catch (Exception e) {\n }\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n iz+=izadd;\n }\n ypixel++;//accurate mode\n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n zleft+=zleftadd;\n }\n }", "public void draw() {\t\t\n\t\ttexture.draw(x, y);\n\t\tstructure.getTexture().draw(x,y);\n\t}", "private void drawSquare(Graphics g, int x, int y, \n Tetrominoe shape) {\n Color colors[] = {\n new Color(0, 0, 0), new Color(204, 102, 102),\n new Color(102, 204, 102), new Color(102, 102, 204),\n new Color(204, 204, 102), new Color(204, 102, 204),\n new Color(102, 204, 204), new Color(218, 170, 0)\n };\n//left and top sides are brighter, bottom and right sides to look 3d\n Color color = colors[shape.ordinal()];\n\n g.setColor(color);\n g.fillRect(x + 1, y + 1, squareWidth() - 2, squareHeight() - 2);\n\n g.setColor(color.brighter());\n g.drawLine(x, y + squareHeight() - 1, x, y);\n g.drawLine(x, y, x + squareWidth() - 1, y);\n\n g.setColor(color.darker());\n g.drawLine(x + 1, y + squareHeight() - 1,\n x + squareWidth() - 1, y + squareHeight() - 1);\n g.drawLine(x + squareWidth() - 1, y + squareHeight() - 1,\n x + squareWidth() - 1, y + 1);\n\n }", "public void zeichnen()\r\n {\n if(textur==null)\r\n {\r\n glColor3d(colorrd, colorgr, colorbl);\r\n glBegin(GL_QUADS);\r\n glVertex2i(x,y);\r\n glVertex2i(x+w,y);\r\n glVertex2i(x+w,y+h);\r\n glVertex2i(x,y+h);\r\n glEnd();\r\n }\r\n else\r\n {\r\n textur.bind();\r\n glBegin(GL_TRIANGLES);\r\n glTexCoord2f(1, 0);\r\n glVertex2i(x+w, y);\r\n glTexCoord2f(0, 0);\r\n glVertex2i(x, y);\r\n glTexCoord2f(0, 1);\r\n glVertex2i(x, y+h);\r\n glTexCoord2f(0, 1);\r\n glVertex2i(x, y+h);\r\n glTexCoord2f(1, 1);\r\n glVertex2i(x+w, y+h);\r\n glTexCoord2f(1, 0);\r\n glVertex2i(x+w, y);\r\n glEnd();\r\n }\r\n }", "private void aretes_aR(){\n\t\tthis.cube[13] = this.cube[52]; \n\t\tthis.cube[52] = this.cube[19];\n\t\tthis.cube[19] = this.cube[1];\n\t\tthis.cube[1] = this.cube[28];\n\t\tthis.cube[28] = this.cube[13];\n\t}", "public void paintRoute(Graphics g, String[] ruteData, int begin, int end, int color) {\n //System.out.println(\"painting rute\");\n end += RUTE_FLOOR + 1;\n begin += RUTE_FLOOR + 1;\n if (begin > end || end > ruteData.length || begin < 0 || g == null || ruteData == null) {\n return;\n }\n g.setColor(color);\n //paint the rute\n int x = 0, y = 0, lastx = 0, lasty = 0, i = begin;\n int floor = Integer.parseInt(ruteData[RUTE_FLOOR]);\n for (; i < end; i++) {\n //System.out.println(ruteData[i]);\n point = getPoint(ruteData[i]);\n x = point[0] + currMatrixX + transformCoordenate(floor, X_COORD);\n y = point[1] + currMatrixY + transformCoordenate(floor, Y_COORD);\n //dot\n g.fillRoundRect(x - 5, y - 5, 10, 10, 5, 5);\n //line\n if (!(lastx == 0 && lasty == 0)) {\n g.drawLine(x - 1, y - 1, lastx - 1, lasty - 1);\n g.drawLine(x, y - 1, lastx, lasty - 1);\n g.drawLine(x - 1, y, lastx - 1, lasty);\n g.drawLine(x, y, lastx, lasty);\n g.drawLine(x, y + 1, lastx, lasty + 1);\n g.drawLine(x + 1, y, lastx + 1, lasty);\n g.drawLine(x + 1, y + 1, lastx + 1, lasty + 1);\n }\n lastx = x;\n lasty = y;\n //System.out.println(\"point \" + (i-begin) + \": \" + x + \",\" + y + \" floor \" + floor);\n }\n }", "public void draw() {\n PImage grid = loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/tile.png\");\n for(int i = 0 ; i < 10 ; i++){\n for(int j = 0 ; j < 6 ; j++){\n image(grid, i*grid.width, j*grid.height);\n if(gridPlane.get(List.of(i, j)).getOwner() != null){\n if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Red\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red3.png\"), i*grid.width, j*grid.height);\n }\n }else if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Green\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green3.png\"), i*grid.width, j*grid.height);\n }\n }\n }\n }\n }\n if(this.finish == true){\n System.exit(0);\n }\n }", "public void zmiana_rozmiaru_okna()\n {\n b.dostosowanie_rozmiaru(getWidth(),getHeight());\n w.dostosowanie_rozmiaru(getWidth(),getHeight());\n\n for (Pilka np : p) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Naboj np : n) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Bonus np : bon) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n\n }", "public void draw() {\r\n\r\n//\t\tif (textures.length > 1) {\r\n//\t\t\tfor (int i = 1; i < textures.length; i++) {\r\n\t\tif (textures.length > 1) {\r\n\t\t\tDrawQuadWithTexture(textures[0], x, y, width, height);\r\n\t\t\tDrawQuadWithRotatedTexture(textures[1], x, y, width, height, angle);\r\n\t\t} else {\r\n\t\t\tDrawQuadWithRotatedTexture(textures[0], x, y, width, height, angle);\r\n\t\t}\r\n\r\n//\t\t\t}\r\n//\t\t}\r\n//\t\t\r\n\t}", "public void render() {\n // Every cell is an individual quad\n for (int x = 0; x < z.length-1; x++)\n {\n beginShape(QUAD_STRIP);\n for (int y = 0; y < z[x].length; y++)\n {\n // one quad at a time\n // each quad's color is determined by the height value at each vertex\n // (clean this part up)\n stroke(0xffff69b4);\n stroke(0xffbbbbbb);\n float currentElevation = z[x][y];\n float currentShade = map(currentElevation, -120, 120, 0, 255);\n // fill(currentShade, 255);\n noFill();\n float xCoordinate = x*scl-w/2;\n float yCoordinate = y*scl-h/2;\n vertex(xCoordinate, yCoordinate, z[x][y]);\n vertex(xCoordinate + scl, yCoordinate, z[x+1][y]);\n }\n endShape();\n }\n }", "public void paint( Graphics g )\n {\n\tint red;int green;int blue,p;\n\tred = 255; green = 255; blue = 255;\n\tg.setColor(new Color(red,green,blue));//change the bg color\n\tg.fillRect(0,0,720,520);\n\tred = 255; green = 255; blue = 255;\n\tg.setColor(new Color(0,0,255));\n\t//g.drawLine(0,0,200,200);\n\t\n\t//set up chaos\t\n\tTri ob = new Tri (g,20,20);\n\tint h1 = 220, k1 = 50;\n\tint h2 = 20, k2 = 320;\n\tint h3 = 420, k3 = 320;\n\t\n\t//g.setColor(new Color(0,0,255));\n\t\n\t//g.drawLine(h1,k1,h1,k1);\n\t//g.setColor(new Color(255,0,0));\n\t\n\t//g.drawLine(h2,k2,h2,k2);\n\t//g.setColor(new Color(0,0,255));\n\t\n\t//g.drawLine(h3,k3,h3,k3);\n\t\n\t//g.drawLine(sx,sy,sx,sy);\n\t\n\tg.setColor(new Color(255,0,0));\n\tint a,n,nx,ny;\n\t\n\n\t\tg.setColor(new Color(255,0,0));\n\t\tg.fillOval(h1-8,k1-15,5,5);\n\t\t\n\t\tg.setColor(new Color(0,255,0));\n\t\tg.fillOval(h2-7,k2+7,5,5);\n\t\t\n\t\tg.setColor(new Color(0,0,255));\n\t\tg.fillOval(h3-7,k3+7,5,5);\n\t\t\n\t\tg.setColor(new Color(0,255,255));\n\t\tint sx = 20, sy = 320;\n\t\t//int sx = 10, sy = 10;\n\t\t\n\t\t//g.fillOval(sx,sy,15,15);\n\tfor (a = 0;a <500000;a++){\n\t\tint z = 2;\n\t\tn = (int)( Math.random()*3);\n\tswitch(n) {\n\tcase 0:\n\t\tnx = (int) ((sx+h1)/z);\n\t\tny = (int) ((sy+k1)/z);\n\t\tg.setColor(new Color(255,0,0));\n\t\tg.drawLine(nx,ny,nx,ny);\n\t\tsx = nx;sy = ny;\n\t\tbreak;\n\tcase 1:\n\t\tnx = (int) ((sx + h2) / z);\n\t\tny = (int) ((sy+ k2)/z);\n\t\tg.setColor(new Color(0,150,10));\n\t\tg.drawLine(nx,ny,nx,ny);\n\t\tsx = nx;sy = ny;\n\t\tbreak;\n\tdefault:\n\t\tnx = (int) ((sx + h3) / z);\n\t\tny = (int) ((sy + k3)/z);\n\t\tg.setColor(new Color(0,0,255));\n\t\tg.drawLine(nx,ny,nx,ny);\n\t\tsx = nx;sy = ny;\n\t}\n\n\t//for (p = 0;p<100000;p++);\n\t}//for a\n\t\n}", "@Test\n\tpublic void testCuatroEnRayaDiag1() {\n\t\t\n\t\tint []posX = new int[4];\n\t\tint []posY = new int[4];\n\t\tfor (int i = 1; i <= 12; ++i) {\n\t\t\tint sx = Math.max(1, i-5);\n\t\t\tint sy = Math.min(i, 6);\n\t\t\twhile ((sy - 4 >= 0) && (sx + 3 <= 7)) {\n\t\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\t\tposX[l] = sx + l;\n\t\t\t\t\tposY[l] = sy - l;\n\t\t\t\t}\n\t\t\t\tpruebaCuatroEnRaya(posX, posY);\n\t\t\t\tsy--; sx++;\n\t\t\t}\n\t\t}\n\t}", "public void draw() {\n \n // TODO\n }", "protected DrawSurface() {\n\t\taiDrawingOrder = new Object[] { RANGE_CURSOR_DRAWSURFACE, GRID_DRAWSURFACE, GRAPH_DRAWSURFACE,\n\t\t\t\tCURSOR_DRAWSURFACE, ZOOM_DRAWSURFACE, };\n\n\t\t// we know that we paint all our own pixels.\n\t\tsetOpaque(false);\n\n\t\t// default background\n\t\tsetBackground(Color.BLACK);\n\n\t\t// give us the same default front as a JPanel\n\t\tsetFont(UIManager.getFont(\"Panel.font\"));\n\n\t\t/*\n\t\t * We create our own cursor because the default cross-hair cursor has\n\t\t * some weird display issues - it seems to fade into some waterfall\n\t\t * graphs, and seems to interact with the green FFT line to produce red\n\t\t * pixels. Weird.\n\t\t */\n\t\tsetCursor(DEFAULT_CROSSHAIR_CURSOR);\n\n\t\tPeralexLibsBundle.addLocaleListener(this); // do after components have\n\t\t\t\t\t\t\t\t\t\t\t\t\t// been initialised\n\t}", "private void DrawPlait(GL gl, float x, float y, float xP, float yP,\n\t\t\tdouble costheta, double sintheta, TextureCoords tc) {\n\n\t\tgl.glPushMatrix();\n\t\tgl.glMatrixMode(gl.GL_MODELVIEW);\n\t\t//gl.glScalef(0.5f, 0.5f, 1f);\n\t\tgl.glTranslatef(x, y, 0.0f);\n\n\t\tgl.glEnable(gl.GL_TEXTURE_2D);\n\t\tgl.glAlphaFunc(gl.GL_GREATER, 0.3f);\n\t\tgl.glEnable(gl.GL_ALPHA_TEST);\n\t\tgl.glEnable(gl.GL_MODULATE);\n\t\tgl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA);\n\t\tgl.glTexEnvf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);\n\t\tgl.glDepthMask(false);\n\n\t\tm_txt.enable();\n\t\tm_txt.bind();\n\t\tgl.glBegin(gl.GL_QUADS);\n\t\tgl.glColor3f(m_r, m_g, m_b);\n\t\tgl.glRotatef((float) 180, 1.0f, 0.0f, 0.0f);\n\n\t\tgl.glTexCoord2d(tc.left(), tc.top());\n\t\tgl.glVertex2f((float) (costheta * (-xP) - sintheta * (yP)),\n\t\t\t\t(float) (sintheta * (-xP) + costheta * (yP)));\n\t\tgl.glTexCoord2d(tc.right(), tc.top());\n\t\tgl.glVertex2f((float) (costheta * (xP) - sintheta * (yP)),\n\t\t\t\t(float) (sintheta * (xP) + costheta * (yP)));\n\t\tgl.glTexCoord2d(tc.right(), tc.bottom());\n\t\tgl.glVertex2f((float) (costheta * (xP) - sintheta * (-yP)),\n\t\t\t\t(float) (sintheta * (xP) + costheta * (-yP)));\n\t\tgl.glTexCoord2d(tc.left(), tc.bottom());\n\t\tgl.glVertex2f((float) (costheta * (-xP) - sintheta * (-yP)),\n\t\t\t\t(float) (sintheta * (-xP) + costheta * (-yP)));\n\t\tgl.glEnd();\n\n\t\tm_txt.disable();\n\t\tgl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_MODULATE);\n\t\tgl.glDisable(GL.GL_ALPHA);\n\t\tgl.glDisable(gl.GL_BLEND);\n\t\tgl.glDisable(gl.GL_TEXTURE_2D);\n\t\tgl.glDisable(gl.GL_DEPTH_TEST);\n\t\tgl.glDepthMask(true);\n\n\t\tgl.glPopMatrix();\n\t}", "@Override\r\n public final void draw(final Square s, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(s.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(s.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(s.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(s.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(s.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(s.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(s.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(s.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(s.getBorderColor().getBlue());\r\n }\r\n String color = \"#\" + red + green + blue;\r\n \r\n draw(new Line((String.valueOf(s.getxSus())), String.valueOf(s.getySus()),\r\n String.valueOf(s.getxSus() + s.getLatura() - 1), String.valueOf(s.getySus()), color,\r\n String.valueOf(s.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(s.getxSus() + s.getLatura() - 1)),\r\n String.valueOf(s.getySus()), String.valueOf(s.getxSus() + s.getLatura() - 1),\r\n String.valueOf(s.getySus() + s.getLatura() - 1), color,\r\n String.valueOf(s.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(s.getxSus() + s.getLatura() - 1)),\r\n String.valueOf(s.getySus() + s.getLatura() - 1), String.valueOf(s.getxSus()),\r\n String.valueOf(s.getySus() + s.getLatura() - 1), color,\r\n String.valueOf(s.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(s.getxSus())),\r\n String.valueOf(s.getySus() + s.getLatura() - 1), String.valueOf(s.getxSus()),\r\n String.valueOf(s.getySus()), color, String.valueOf(s.getBorderColor().getAlpha()),\r\n paper), paper);\r\n for (int i = s.getxSus() + 1; i < s.getxSus() + s.getLatura() - 1; i++) {\r\n for (int j = s.getySus() + 1; j < s.getySus() + s.getLatura() - 1; j++) {\r\n if (checkBorder(i, j, paper)) {\r\n paper.setRGB(i, j, s.getFillColor().getRGB());\r\n }\r\n }\r\n }\r\n\r\n }", "@Override\n\tpublic void onDrawFrame(GL10 gl) {\n\n\t\tgl.glClear(GL10.GL_COLOR_BUFFER_BIT);\n\t\tgl.glLineWidth(3);\n\t\t// gl.glPointSize(10);\n\t\tgl.glEnable(GL10.GL_POINT_SMOOTH);\n\t\tray.dibuja(gl);\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tif (m[i][j] != 0) {\n\t\t\t\t\tif (m[i][j]==1) {\n\t\t\t\t\t\tif(i==0 && j==0)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,0);\n\t\t\t\t\t\tif(i==0 && j==1)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,1);\n\t\t\t\t\t\tif(i==0 && j==2)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,2);\n\t\t\t\t\t\tif(i==1 && j==0)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,3);\n\t\t\t\t\t\tif(i==1 && j==1)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,4);\n\t\t\t\t\t\tif(i==1 && j==2)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,5);\n\t\t\t\t\t\tif(i==2 && j==0)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,6);\n\t\t\t\t\t\tif(i==2 && j==1)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,7);\n\t\t\t\t\t\tif(i==2 && j==2)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,8);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(i==0 && j==0)\n\t\t\t\t\t\t\tcruz.dibuja(gl,0);\n\t\t\t\t\t\tif(i==0 && j==1)\n\t\t\t\t\t\t\tcruz.dibuja(gl,1);\n\t\t\t\t\t\tif(i==0 && j==2)\n\t\t\t\t\t\t\tcruz.dibuja(gl,2);\n\t\t\t\t\t\tif(i==1 && j==0)\n\t\t\t\t\t\t\tcruz.dibuja(gl,3);\n\t\t\t\t\t\tif(i==1 && j==1)\n\t\t\t\t\t\t\tcruz.dibuja(gl,4);\n\t\t\t\t\t\tif(i==1 && j==2)\n\t\t\t\t\t\t\tcruz.dibuja(gl,5);\n\t\t\t\t\t\tif(i==2 && j==0)\n\t\t\t\t\t\t\tcruz.dibuja(gl,6);\n\t\t\t\t\t\tif(i==2 && j==1)\n\t\t\t\t\t\t\tcruz.dibuja(gl,7);\n\t\t\t\t\t\tif(i==2 && j==2)\n\t\t\t\t\t\t\tcruz.dibuja(gl,8);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t/*if(sw){\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tcruz.dibuja(gl);\n\t\t\t\t\t}*/\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\t}", "public void drawPolygon (int xC, int yC, int xP, int yP,int ribs, Graphics g){\r\n \r\n \tint n = ribs; \r\n \t//delta keep the the original delta , this size of delta will increase in delta size each time.\r\n \tdouble delta = (2* Math.PI)/ n;\r\n \tdouble deltaTemp = delta;\r\n \t//List of Points that I keep during n rotation.\r\n \tList <Point> points; \r\n \tfloat x,y,newX,newY;\r\n \t//First Sliding\r\n \tx = xP - xC;\r\n \ty = yP - yC;\r\n \tnewX = x; \t\r\n \tnewY = y; \t\r\n \tList <Point> vertexs = new ArrayList();\r\n \t//Follow delta angle rotation n times and write a list of vertices to vertexs list.\r\n \tfor (int i = 0; i < n ; i++)\r\n \t{\r\n \t\tnewX = (int) ((x*Math.cos(delta) - y*Math.sin(delta)));\r\n \t\tnewY = (int) ((x*Math.sin(delta) + y*Math.cos(delta))); \r\n \t\tvertexs.add(new Point(Math.round(newX),Math.round(newY))); \t\r\n \t\tSystem.out.println(vertexs.get(i).x+\",\"+vertexs.get(i).y);\r\n \t\tdelta = delta + deltaTemp;\r\n \t}\r\n \t//Sliding back\r\n \tfor (int i = 0; i < vertexs.size(); i++ ){\r\n \t\tvertexs.get(i).x = (int) (vertexs.get(i).getX() + xC);\r\n \t\tvertexs.get(i).y = (int) (vertexs.get(i).getY() + yC);\r\n \t\tg.drawRect(vertexs.get(i).x, vertexs.get(i).y ,1,1);\r\n \t}\r\n \t//draw line between the list of the points we got.\r\n \tfor (int z = 0 ; z < vertexs.size(); z++){\r\n \t\tif (z == vertexs.size()-1)\r\n \t\t\tdrawLine((int) Math.round(vertexs.get(z).getX()), (int)(vertexs.get(z).getY()),(int)(vertexs.get(0).getX()), (int)(vertexs.get(0).getY()),g);\r\n \t\telse\r\n \t\t\tdrawLine((int)(vertexs.get(z).getX()), (int)(vertexs.get(z).getY()),(int)(vertexs.get(z+1).getX()), (int)(vertexs.get(z+1).getY()),g);\r\n\r\n \t\t}\r\n \t\r\n }", "public void draw() {\n\n }", "void display() {\n pushMatrix();\n pushStyle();\n \n translate(_x, _y);\n rotate(_rotVector.heading() - _front);\n if (_flipped) scale(-1, 1);\n imageMode(CENTER);\n image(_img, 0, 0, _w, _h);\n \n popStyle();\n popMatrix();\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制五角形\");\n\t}", "public void paintComponent(Graphics g){ \r\n Graphics2D g2 = (Graphics2D)g;\r\n \r\n if(rev == true){\r\n int[] xCord = new int[]{x, x-25, x-50, x-100, x-50, x-25, x};\r\n int[] yCord = new int[]{y, y+25, y+10, y+45, y+65, y+50, y+75};\r\n setColor(g2);\r\n g2.drawPolygon(xCord, yCord, xCord.length);\r\n g2.fillPolygon(xCord, yCord, xCord.length); \r\n \r\n \r\n }\r\n else{\r\n int[] xCord = new int[]{x, x+25, x+50, x+100, x+50, x+25, x};\r\n int[] yCord = new int[]{y, y+25, y+10, y+45, y+65, y+50, y+75};\r\n setColor(g2);\r\n g2.drawPolygon(xCord, yCord, xCord.length);\r\n g2.fillPolygon(xCord, yCord, xCord.length); \r\n } \r\n }", "private void DrawBraid(GL gl, float x, float y, float size,\n\t\t\tfloat r, float g, float b) {\n\n float reflected_x=0, reflected_y=0;\n float reflected_vector_angle=0, reflected_image_angle=0, reflected_rotate=0;\n\n // Degeneracy = do not want\n\t\tif (m_length == 0.0f || m_width == 0.0f) {\n\t\t\treturn;\n\t\t}\n\n\t\t////int mct = (int) (1 / this.GetPEngine().m_uniscale);\n\t\t////mct = (mct / 2) / 100 * 100;\n\n //Do the reflection\n if(m_x_reflection==0 && m_y_reflection==0)\n {\n reflected_x=x;\n reflected_y=y;\n reflected_image_angle=m_slope;\n reflected_vector_angle=m_slope;\n reflected_rotate= m_rotate;\n }\n else if(m_x_reflection==1 && m_y_reflection==0)\n {\n reflected_x=x;\n reflected_y=-y;\n reflected_image_angle=90-m_slope;\n reflected_vector_angle=-m_slope;\n reflected_rotate= -m_rotate;\n }\n else if(m_x_reflection==0 && m_y_reflection==1)\n {\n reflected_x=-x;\n reflected_y=y;\n reflected_image_angle=-90-m_slope;\n reflected_vector_angle=180-m_slope;\n reflected_rotate= -m_rotate;\n }\n else if(m_x_reflection==1 && m_y_reflection==1)\n {\n reflected_x=-x;\n reflected_y=-y;\n reflected_image_angle=m_slope-180;\n reflected_vector_angle=m_slope+180;\n reflected_rotate= m_rotate;\n }\n\n\t\tfloat start_image_theta = (float) Math.toRadians(reflected_image_angle);\n \t\tfloat start_vector_theta = (float) Math.toRadians(reflected_vector_angle);\n\t\tfloat rotate_theta = (float) Math.toRadians(reflected_rotate);\n\t\tfloat cur_image_theta = 0f, cur_vector_theta = 0f;\n\t\tdouble image_costheta = 0, vector_costheta = 0;\n\t\tdouble image_sintheta = 0, vector_sintheta = 0;\n\t\tfloat xP = 0f;\n\t\tfloat yP = 0f;\n\t\tfloat xO = 0f, nextXO = 0f;\n\t\tfloat yO = 0f, nextYO = 0f;\n\n\t\t//if (txt == null) {\n\t\t//\ttxt = load(\"img/plaitWhite.png\");\n\t\t//}\n\t\tTextureCoords tc = m_txt.getImageTexCoords();\n\t\txO = nextXO = reflected_x;\n\t\tyO = nextYO = reflected_y;\n xP = m_cx * m_starting_dilation;\n\t\tyP = m_cy * m_starting_dilation;\n //vector\n\t\tcur_vector_theta = start_vector_theta;\n vector_costheta = Math.cos(cur_vector_theta);\n\t\tvector_sintheta = Math.sin(cur_vector_theta);\n //image\n cur_image_theta = start_image_theta;\n\t\timage_costheta = Math.cos(cur_image_theta);\n\t\timage_sintheta = Math.sin(cur_image_theta);\n\t\t\n\t\tfor (int i = 0; i < Iteration; i++) {\t\t\t\n DrawPlait(gl, xO, yO, xP / 2, yP / 2, image_costheta, image_sintheta, tc);\n\t\t\t//vector\n cur_vector_theta += rotate_theta;\n\t\t\tvector_costheta = Math.cos(cur_vector_theta);\n\t\t\tvector_sintheta = Math.sin(cur_vector_theta);\n //image\n\t\t\tcur_image_theta += rotate_theta;\n\t\t\timage_costheta = Math.cos(cur_image_theta);\n\t\t\timage_sintheta = Math.sin(cur_image_theta);\n //next centor position\n\t\t\tnextXO = xO + (float) (xP * m_translate * vector_costheta);\n\t\t\tnextYO = yO + (float) (yP * m_translate * vector_sintheta);\n\t\t\tif (m_vector) {\n\t\t\t\tDrawVector(gl, xO, yO, nextXO, nextYO, xP, cur_vector_theta);\n\t\t\t}\n\t\t\txO = nextXO;\n\t\t\tyO = nextYO;\n\t\t\txP *= m_dilate;\n\t\t\tyP *= m_dilate;\n\t\t}\n\t}", "public void draw() {\n }", "public void drawRightTriangle(){\n\t for(int i = 0; i < height; i++)\n\t {\n\t \tfor(int j = 0; j < width - 1; j++)\n\t \t{\n\t \t\tSystem.out.print(\" \");\n\t \t}\n\t \twidth--;\n\t \tfor(int k = height; k > width; k--)\n\t \t{\n\t \t\tSystem.out.print(appearance);\n\t \t}\n\t \tSystem.out.println(\"\");\n\t }\n\t}", "public void leerPlanesDietas();", "public void skaliere(double u)\n {\n p1.setX(p1.getX() * u);\n p1.setY(p1.getY() * u);\n p2.setX(p2.getX() * u);\n p2.setY(p2.getY() * u);\n p3.setX(p3.getX() * u);\n p3.setY(p3.getY() * u);\n p4.setX(p4.getX() * u);\n p4.setY(p4.getY() * u);\n }", "@Override\n \tpublic void draw() {\n \n \t\tGL11.glPushMatrix();\n \t\t\n \t\tGL11.glTranslatef(super.getX(), super.getY(), 0);\n \t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\tMain.BLANK_TEXTURE.bind();\n \t\tGL11.glBegin(GL11.GL_QUADS);\n \t\t{\n \t\t\t\n \t\t\tGL11.glColor3f(1.0f, 0.0f, 0.0f);\n \t\t\tGL11.glVertex2f(0, 0); // top left\n \t\t\tGL11.glVertex2f(0, Main.gridSize); // bottom left\n \t\t\tGL11.glVertex2f(Main.gridSize, Main.gridSize); // bottom right\n \t\t\tGL11.glVertex2f(Main.gridSize, 0); // top right\n \t\t\t\n \t\t\t\n \t\t\tif (isRight()) {\n \t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\t\t\tGL11.glVertex2f(12, 0);\n \t\t\t\tGL11.glVertex2f(12, 12);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 12);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 0);\n \t\t\t\t\n \t\t\t\tGL11.glColor3f(0.0f, 0.0f, 0.0f);\n \t\t\t\tGL11.glVertex2f(Main.gridSize-6, 3);\n \t\t\t\tGL11.glVertex2f(Main.gridSize-6, 9);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 9);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 3);\n \t\t\t\t\n \t\t\t} else {\n \t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\t\t\tGL11.glVertex2f(0, 0);\n \t\t\t\tGL11.glVertex2f(0, 12);\n \t\t\t\tGL11.glVertex2f(12, 12);\n \t\t\t\tGL11.glVertex2f(12, 0);\n \t\t\t\t\n \t\t\t\tGL11.glColor3f(0.0f, 0.0f, 0.0f);\n \t\t\t\tGL11.glVertex2f(0, 3);\n \t\t\t\tGL11.glVertex2f(0, 9);\n \t\t\t\tGL11.glVertex2f(4, 9);\n \t\t\t\tGL11.glVertex2f(4, 3);\n \t\t\t}\n \t\t\t\n \t\t}\n \t\tGL11.glEnd();\n \n \t\tGL11.glPopMatrix();\n \t\t\n \t}", "public void render() {\n float theta = velocity.heading2D() + radians(90);\n\n\n fill(255, 0, 0);\n stroke(0, 0, 0);\n strokeWeight(0.5f);\n pushMatrix();\n translate(position.x, position.y);\n rotate(theta);\n beginShape(QUAD);\n fill(130);\n vertex(r, -r*2);\n\n vertex(-r, -r*2);\n vertex(-r, r*2);\n vertex(r, r*2);\n\n endShape();\n strokeWeight(0.5f);\n beginShape(TRIANGLES);\n vertex(r,-r*2);\n vertex(r*2.5f,r);\n vertex(r,r);\n endShape();\n strokeWeight(0.5f);\n beginShape(TRIANGLES);\n vertex(-r, -r*2);\n vertex(r, -r*2);\n vertex(0, -r*4);\n endShape();\n beginShape(TRIANGLES);\n vertex(-r, r*5);\n vertex(r, r*5);\n vertex(0, r*2);\n endShape();\n strokeWeight(1.7f*r);\n stroke(255);\n fill(255);\n point(0, -r*2.5f);\n stroke(0);\n fill(0);\n strokeWeight(0.75f*r);\n point(0, -r*2.5f);\n popMatrix();\n }", "private void drawsegment_gouraud_texture8(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) {\n //Accurate texture mode added - comments stripped from dupe code, see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode){\n if(precomputeAccurateTexturing()){ //see if the precomputation goes well, if so finish the setup\n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n accurateMode = false; //if the matrix inversion screwed up, revert to normal rendering (something is degenerate)\n }\n }\n \n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n float irf = iradd;\n float igf = igadd;\n float ibf = ibadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n \n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n int ir = (int) (irf * xdiff + rleft);\n int ig = (int) (igf * xdiff + gleft);\n int ib = (int) (ibf * xdiff + bleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode&&goingIn){\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU; iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else{\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n \n for ( ; xstart < xend; xstart++ ) {\n if(accurateMode){\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else{\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n \n try\n {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n //m_zbuffer[xstart] = iz;\n \n int al0;\n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = iu & 0xFFFF;\n al0 = m_texture[ofs] & 0xFF;\n int al1 = m_texture[ofs + 1] & 0xFF;\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int al2 = m_texture[ofs] & 0xFF;\n int al3 = m_texture[ofs + 1] & 0xFF;\n al0 = al0 + (((al1-al0) * iui) >> 16);\n al2 = al2 + (((al3-al2) * iui) >> 16);\n al0 = al0 + (((al2-al0) * (iv & 0xFFFF)) >> 16);\n } else {\n al0 = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)] & 0xFF;\n }\n \n // get RGB colors\n int red = ir & 0xFF0000;\n int grn = (ig >> 8) & 0xFF00;\n int blu = (ib >> 16);\n \n // get buffer pixels\n int bb = m_pixels[xstart];\n int br = (bb & 0xFF0000); // 0x00FF0000\n int bg = (bb & 0xFF00); // 0x0000FF00\n bb = (bb & 0xFF); // 0x000000FF\n m_pixels[xstart] = 0xFF000000 |\n ((br + (((red - br) * al0) >> 8)) & 0xFF0000) |\n ((bg + (((grn - bg) * al0) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al0) >> 8)) & 0xFF);\n \n // write stencil\n // m_stencil[xstart] = p;\n }\n }\n catch (Exception e) {\n \n }\n \n //\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n ir+=iradd;\n ig+=igadd;\n ib+=ibadd;\n iz+=izadd;\n }\n ypixel++;//accurate mode\n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n \n uleft+=uleftadd;\n vleft+=vleftadd;\n rleft+=rleftadd;\n gleft+=gleftadd;\n bleft+=bleftadd;\n zleft+=zleftadd;\n }\n }", "public void circulos() {\n pushMatrix();\n translate(width/2, height/2);\n rotate(-h);\n noFill();\n strokeWeight(5);\n stroke(255);\n ellipse(10, 10, 20, 20);\n popMatrix();\n\n h = h + 0.3f;\n }", "void drawAt(DrawSurface d, Rectangle rect);", "public static void test10(World w){\n\t\tUtilities.generateGeometry2(w.points ,w.pivots, \"Front.png\", \"Side.png\", 1900, 2500, 0, 0, 1/7.0);\r\n\t\t\r\n\t}", "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}", "void drawPlayer(float x, float y, float w)\n\t{\n\t\tline(x, y, x + 50, y);\n\t\tline(x, y, x, y - 50);\n\t\tline(x + 50, y, x + 50, y - 50);\n\t\tline(x, y - 50, x + 50, y - 50);\n\t\tstroke(255,0,0);\n\t}", "private void drawFlights(){\n if(counter%180 == 0){ //To not execute the SQL request every frame.\n internCounter = 0;\n origins.clear();\n destinations.clear();\n internCounter = 0 ;\n ArrayList<String> answer = GameScreen.database.readDatas(\"SELECT Origin, Destination FROM Flights\");\n for(String s : answer){\n internCounter++;\n String[] parts = s.split(\" \");\n String xyOrigin, xyDestination;\n try{\n xyOrigin = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE SystemName = '\"+parts[0]+\"' ;\").get(0);\n } catch (IndexOutOfBoundsException e){\n String systemId = GameScreen.database.getOneData(\"SELECT SystemId FROM Planet WHERE PlanetName = '\"+parts[0]+\"' ;\");\n xyOrigin = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE id = '\"+systemId+\"' ;\").get(0);\n }\n origins.add(new Vector2(Float.parseFloat(xyOrigin.split(\" \")[0]), Float.parseFloat(xyOrigin.split(\" \")[1])));\n\n try{\n xyDestination = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE SystemName = '\"+parts[1]+\"' ;\").get(0);\n }catch (IndexOutOfBoundsException e){\n String systemId = GameScreen.database.getOneData(\"SELECT SystemId FROM Planet WHERE PlanetName = '\"+parts[1]+\"' ;\");\n xyDestination = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE id = '\"+systemId+\"' ;\").get(0);\n }\n destinations.add(new Vector2(Float.parseFloat(xyDestination.split(\" \")[0]), Float.parseFloat(xyDestination.split(\" \")[1])));\n }\n }\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.setColor(Color.WHITE);\n renderer.circle(600, 380, 4);\n for(int i = 0; i<internCounter; i++){\n renderer.line(origins.get(i), destinations.get(i));\n renderer.setColor(Color.RED);\n renderer.circle(origins.get(i).x, origins.get(i).y, 3);\n renderer.setColor(Color.GREEN);\n renderer.circle(destinations.get(i).x, destinations.get(i).y, 3);\n }\n renderer.end();\n }", "public void draw(){\n textAlign(CENTER);\n route.update(pp, qq);\n SoundSys();\n fill(0xff31F0FF, 127);\n noStroke();\n ellipse(mouseX, mouseY, 30, 30);\n}", "public void tetraederzeichnen(double ax,double ay,double bx,double by,double cx,double cy,double dx,double dy){\n double[][] arr_koordinaten_2d ={{ax,ay},{bx,by},{cx,cy},{dx,dy}};\n /**\n * Aufruf der Methode gestricheltodernicht\n *\n * Überprüft, welche Strecken von Punkt D sichtbar sind oder nicht.\n */\n\n boolean[] strichelnodernicht = cls_berechnen.gestricheltodernicht(arr_koordinaten_2d);\n\n /**Skaliert die Koordinaten zum Pixelformat mit Koordinatenursprung\n * ca in der Mitte der Zeichenfläche*/\n int sw=9; //skalierungswert\n ax= (sw+ax)*50;\n ay=(sw-ay)*50;\n bx= (sw+bx)*50;\n by=(sw-by)*50;\n cx= (sw+cx)*50;\n cy=(sw-cy)*50;\n dx= (sw+dx)*50;\n dy=(sw-dy)*50;\n\n /**\n * Erstellt Linienobjekte für die Kanten des Tetraeder Objekts...\n */\n Line line1 = new Line();\n Line line2 = new Line();\n Line line3 = new Line();\n Line line4 = new Line();\n Line line5 = new Line();\n Line line6 = new Line();\n\n /**\n * ... weißt ihnen die Koordinaten zu...\n */\n line1.setStartX(ax);\n line1.setStartY(ay);\n line1.setEndX(bx);\n line1.setEndY(by);\n\n line2.setStartX(ax);\n line2.setStartY(ay);\n line2.setEndX(cx);\n line2.setEndY(cy);\n\n line3.setStartX(bx);\n line3.setStartY(by);\n line3.setEndX(cx);\n line3.setEndY(cy);\n \n line4.setStartX(dx);\n line4.setStartY(dy);\n line4.setEndX(ax);\n line4.setEndY(ay);\n\n line5.setStartX(dx);\n line5.setStartY(dy);\n line5.setEndX(bx);\n line5.setEndY(by);\n\n line6.setStartX(dx);\n line6.setStartY(dy);\n line6.setEndX(cx);\n line6.setEndY(cy);\n \n if(!strichelnodernicht[0]){\n line4.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[1]){\n line5.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[2]){\n line6.getStrokeDashArray().addAll(5d,5d);}\n\n /**\n * ... und fügt die Linien Objekte der Zeichenfläche hinzu\n */\n canvaspane.getChildren().add(line1);\n canvaspane.getChildren().add(line2);\n canvaspane.getChildren().add(line3);\n canvaspane.getChildren().add(line4);\n canvaspane.getChildren().add(line5);\n canvaspane.getChildren().add(line6);\n\n //zeichnet den Koordinatenursprung neu\n canvaspane.getChildren().add(l1);\n canvaspane.getChildren().add(l2);\n }", "private void paint(int sideLength) {\n\n float fac = randomStart;\n while (sideLength >= 2) {\n\n for (int py = 0; py < _height; py += sideLength) {\n for (int px = 0; px < _width; px += sideLength) {\n // fetch corner colors\n float c1 = mono[repeat(px, py, _width, _height)];\n float c3 = mono[repeat(px + sideLength, py, _width, _height)];\n float c7 = mono[repeat(px, py + sideLength, _width, _height)];\n float c9 = mono[repeat(px + sideLength, py + sideLength, _width,\n _height)];\n\n int shortX = px / sideLength; \n int shortY = py / sideLength; \n \n \n float c2 = (c1 + c3) / 2 + calcFac(fac, shortX, shortY);\n float c4 = (c1 + c7) / 2 + calcFac(fac, shortX, shortY);\n float c5 = (c1 + c3 + c7 + c9) / 4 + calcFac(fac, shortX, shortY);\n\n mono[repeat(px + sideLength / 2, py, _width, _height)] = c2;\n mono[repeat(px, py + sideLength / 2, _width, _height)] = c4;\n mono[repeat(px + sideLength / 2, py + sideLength / 2, _width, _height)] = c5;\n }\n }\n\n fac = fac * randomFactor + randomSummand;\n\n sideLength /= 2;\n }\n }", "public static void main(String [] args)\n{\n //this is something to memorize \n\nDrawingTool pencil;\nSketchPad paper;\n//these two were object declarations \npaper = new SketchPad (300,300); \npencil = new DrawingTool(paper); \n//these two were to create instances of the DrawingTool and SketchPad that are in the library today \n\n//now, directions: memorize the format for the instructions \npencil.forward (100);\npencil.turnRight (90);\npencil.forward (200);\npencil.turnRight (90);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (200);\npencil.turnRight (90);\npencil.forward (100);\npencil.turnRight (45);\npencil.forward (142);\npencil.turnRight (90); \npencil.forward (142);\npencil.turnRight (45);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (80);\npencil.turnRight (90);\npencil.forward (40);\npencil.turnLeft (90);\npencil.forward (20);\npencil.turnLeft (90);\npencil.forward (40);\n/*a few questions I have: can I change the color of the pencil, can I lift\n * it or choose where to start\n */\npencil.turnRight(90);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (160);\npencil.turnRight (90);\npencil.forward (30);\npencil.turnRight (90);\npencil.forward (30);\n\n\n\n \n\n//how can I add a new color in this? I requested access for the video \n//that the logo team made\n \n \n}", "public void draw() {\n if (numSides <= 6) {\n System.out.println(\"- - - - - -\");\n \n for (int i = numSides - 2; i < numSides; i++) {\n System.out.print(\" | \");\n for (int j = 0; j < this.value ; j++) {\n if (value == 1) {\n System.out.print(\" \");\n }\n if (i % 2 == 0) {\n System.out.print(\"*\");\n } else {\n System.out.print(\" \");\n }\n if (value == 1) {\n System.out.print(\" \");\n }\n }\n }\n System.out.println(\"\");\n System.out.println(\"- - - - - -\");\n } else {\n print();\n }\n }", "public static void main(String[] args)\n {\n setUpTortoise();\n //have fun with the level\n int currentLevel = 9;\n drawTriangle(currentLevel);\n }", "public VolcanoRuins createRuins(float col, float row) {\n List<Part> parts = new ArrayList<>();\n\n //Back Wall\n for (int i = 1; i < 16; i++) {\n parts.add(new Part(new SquareVector(0, -i), \"Ruins_2\", true));\n }\n\n //Top & Bottom walls\n parts.add(new Part(new SquareVector(2, 0), \"Ruins_2\", true));\n parts.add(new Part(new SquareVector(3, 0), \"Ruins_2\", true));\n parts.add(new Part(new SquareVector(4, 0), \"Ruins_2\", true));\n parts.add(new Part(new SquareVector(5, 0), \"Ruins_2\", true));\n parts.add(new Part(new SquareVector(6, 0), \"Ruins_2\", true));\n\n parts.add(new Part(new SquareVector(1, -15), \"Ruins_2\", true));\n parts.add(new Part(new SquareVector(2, -15), \"Ruins_2\", true));\n parts.add(new Part(new SquareVector(3, -15), \"Ruins_2\", true));\n parts.add(new Part(new SquareVector(4, -15), \"Ruins_2\", true));\n\n //Front Walls\n parts.add(new Part(new SquareVector(7, -1), \"Ruins_5\", true));\n parts.add(new Part(new SquareVector(7, -2), \"Ruins_5\", true));\n parts.add(new Part(new SquareVector(7, -5), \"Ruins_5\", true));\n parts.add(new Part(new SquareVector(7, -6), \"Ruins_5\", true));\n parts.add(new Part(new SquareVector(7, -10), \"Ruins_5\", true));\n parts.add(new Part(new SquareVector(7, -11), \"Ruins_5\", true));\n parts.add(new Part(new SquareVector(7, -12), \"Ruins_5\", true));\n parts.add(new Part(new SquareVector(7, -15), \"Ruins_5\", true));\n\n //Inner pillars\n parts.add(new Part(new SquareVector(3, -3), \"Ruins_5\", true));\n parts.add(new Part(new SquareVector(4, -4), \"Ruins_5\", true));\n\n parts.add(new Part(new SquareVector(4, -11), \"Ruins_5\", true));\n parts.add(new Part(new SquareVector(3, -12), \"Ruins_5\", true));\n\n //Front Top Pillars\n parts.add(new Part(new SquareVector(9, -5), \"Ruins_4\", true));\n parts.add(new Part(new SquareVector(9, -6), \"Ruins_4\", true));\n parts.add(new Part(new SquareVector(10, -6), \"Ruins_4\", true));\n\n //Front Bottom Pillars\n parts.add(new Part(new SquareVector(9, -9), \"Ruins_4\", true));\n parts.add(new Part(new SquareVector(9, -10), \"Ruins_4\", true));\n parts.add(new Part(new SquareVector(10, -9), \"Ruins_4\", true));\n\n //Bones at Ruins\n parts.add(new Part(new SquareVector(4, -3), \"Bones\", false));\n parts.add(new Part(new SquareVector(3, -4), \"Bones\", false));\n\n parts.add(new Part(new SquareVector(3, -11), \"Bones\", false));\n parts.add(new Part(new SquareVector(4, -12), \"Bones\", false));\n\n return new VolcanoRuins(col, row, parts);\n }" ]
[ "0.6629113", "0.62455595", "0.62012285", "0.60765135", "0.5917666", "0.59125215", "0.5901925", "0.59010506", "0.57873136", "0.5717227", "0.57052654", "0.567642", "0.56630147", "0.5638433", "0.56346536", "0.56340414", "0.5607406", "0.56060493", "0.56057405", "0.55913836", "0.5587506", "0.55873215", "0.558434", "0.5567724", "0.55649966", "0.5561138", "0.5550332", "0.553744", "0.5532005", "0.5515633", "0.5515633", "0.5515633", "0.5493429", "0.5491097", "0.54674906", "0.5439125", "0.54379445", "0.54320693", "0.5429039", "0.54185987", "0.54184884", "0.54027545", "0.54013956", "0.5394461", "0.53881305", "0.5385135", "0.5367216", "0.5361872", "0.53565496", "0.5356479", "0.5345608", "0.53411114", "0.5311727", "0.5310039", "0.5306267", "0.53015465", "0.5300746", "0.52998966", "0.52987796", "0.52929056", "0.52917176", "0.52829343", "0.5282591", "0.5281823", "0.5281465", "0.5279129", "0.527908", "0.52787507", "0.5278244", "0.5273643", "0.52730316", "0.5269199", "0.5268284", "0.5267333", "0.5262573", "0.5261109", "0.52548224", "0.52510726", "0.5250831", "0.52432835", "0.52425236", "0.5234648", "0.52328336", "0.52271914", "0.52112657", "0.5209462", "0.52053887", "0.5199441", "0.5198618", "0.5198238", "0.5193468", "0.5192753", "0.51926756", "0.51886934", "0.5185515", "0.517867", "0.5160709", "0.51594067", "0.5156256", "0.5155215" ]
0.65678406
1
draw the syria plane
public void syria(){ stroke(1); //back guns fill(0); rect(73,192,4,15); rect(224,192,4,15); rect(71,207,8,15); rect(222,207,8,15); rect(66,207,3,15); rect(232,207,3,17); rect(122,109,4,15); rect(175,110,4,15); rect(121,120,6,15); rect(174,120,6,15); rect(116,124,3,15); rect(182,124,3,15); //wings fill(206,17,38);//red beginShape(); vertex(14,286); vertex(61,236); vertex(88,308); vertex(51,334); vertex(14,313); endShape(CLOSE); beginShape(); vertex(286,287); vertex(286,312); vertex(247,335); vertex(212,309); vertex(238,238); endShape(CLOSE); fill(200);//white beginShape(); vertex(38,307); vertex(74,307); vertex(80,314); vertex(81,337); vertex(68,345); vertex(38,327); endShape(CLOSE); beginShape(); vertex(219,316); vertex(226,308); vertex(262,308); vertex(262,326); vertex(231,345); vertex(219,336); endShape(CLOSE); fill(0);//red beginShape(); vertex(96,191); vertex(61,230); vertex(60,269); vertex(96,312); vertex(101,300); vertex(100,247); vertex(112,232); vertex(132,232); vertex(131,186); endShape(CLOSE); beginShape(); vertex(204,191); vertex(240,230); vertex(240,270); vertex(205,312); vertex(200,302); vertex(200,248); vertex(193,238); vertex(185,231); vertex(170,230); vertex(170,186); endShape(CLOSE); //white fill(200); beginShape(); vertex(70,217); vertex(74,220); vertex(81,210); vertex(85,213); vertex(75,227); vertex(72,229); vertex(71,231); vertex(73,233); vertex(73,268); vertex(71,272); vertex(76,277); vertex(82,274); vertex(89,283); vertex(90,297); vertex(66,272); vertex(65,235); vertex(68,229); vertex(62,228); endShape(CLOSE); beginShape(); vertex(228,217); vertex(225,218); vertex(218,211); vertex(215,213); vertex(223,227); vertex(226,226); vertex(230,230); vertex(227,233); vertex(228,270); vertex(229,272); vertex(223,276); vertex(218,276); vertex(210,283); vertex(211,296); vertex(235,273); vertex(234,233); vertex(232,228); vertex(237,227); endShape(CLOSE); //guns //white fill(200); beginShape(); vertex(121,301); vertex(98,313); vertex(102,336); vertex(119,342); vertex(139,336); vertex(141,313); endShape(CLOSE);//l beginShape(); vertex(159,312); vertex(162,336); vertex(180,342); vertex(200,336); vertex(202,313); vertex(180,302); endShape(CLOSE); //black fill(0); rect(105,315,30,30); rect(166,315,30,30); quad(105,344,109,355,131,355,135,344); quad(166,344,170,355,192,355,196,344); //green fill(0,122,61); rect(103,253,33,62);//l rect(164,252,33,62);//r //white fill(200); bezier(103,252,107,230,132,230,136,252);//l bezier(164,252,169,230,192,230,197,252);//r rect(103,280,33,25);//l rect(164,280,33,25);//r rect(104,319,33,26,3);//l rect(165,319,33,26,3);//r rect(115,310,7,28,8);//l rect(178,310,7,28,8);//r //green fill(0,122,61); rect(105,284,10,15); rect(124,284,10,15); rect(167,285,10,15); rect(185,284,10,15); //body-wings fill(0,122,61);//green bezier(107,154,101,162,98,169,98,187); bezier(191,153,199,164,202,172,203,187); quad(107,154,98,186,98,223,107,224); quad(191,153,203,186,202,223,192,223); fill(206,17,38);//red quad(134,112,108,147,107,239,132,230); quad(165,112,192,147,193,239,168,230); //black fill(0); quad(130,122,130,142,111,164,111,147); quad(169,122,188,147,188,165,169,144); //white fill(200); beginShape(); vertex(131,154); vertex(129,202); vertex(118,202); vertex(112,181); vertex(110,179); vertex(110,171); endShape(CLOSE); beginShape(); vertex(170,154); vertex(190,172); vertex(190,182); vertex(188,181); vertex(182,201); vertex(172,201); endShape(CLOSE); fill(0); quad(134,193,166,193,154,342,146,342); fill(0); quad(142,180,159,180,152,352,148,352); //white fill(200); ellipse(150,374,6,50); //head fill(206,17,38); ellipse(149.5f,72,33,25); ellipse(149.5f,94,30,170); fill(0); ellipse(149.5f,94,20,160); fill(154,155,84); ellipse(149.5f,94,17,77); strokeWeight(2); line(143,74,158,74); line(142,104,158,104); strokeWeight(1); fill(200); bezier(143,15,147,2,153,2,155.5f,15); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void draw_plane(Graphics g, int log_num, int i);", "public void SRU() {\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glLineWidth(1.0f);\n\t\tgl.glBegin( GL.GL_LINES );\n\t\t\tgl.glVertex2f( -200.0f, 0.0f );\n\t\t\tgl.glVertex2f( 200.0f, 0.0f );\n\t\t\tgl.glEnd();\n\t\t// eixo y\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glBegin( GL.GL_LINES);\n\t\t\tgl.glVertex2f( 0.0f, -200.0f);\n\t\t\tgl.glVertex2f( 0.0f, 200.0f );\n\t\tgl.glEnd();\n\t}", "void draw() {\n scsw.draw();\n \n}", "@Override\n public void draw() {\n super.draw(); \n double radius = (this.getLevel() * 0.0001 + 0.025) * 2.5e10;\n double x = this.getR().cartesian(0) - Math.cos(rot) * radius;\n double y = this.getR().cartesian(1) - Math.sin(rot) * radius;\n StdDraw.setPenRadius(0.01);\n StdDraw.setPenColor(StdDraw.RED);\n StdDraw.point(x, y);\n \n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制三角形\");\t\n\t}", "public void mark_plane(Graphics g, int log_num, int x, int y, int h);", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制矩形\");\n\t\t\n\t}", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(.01);\n for (Point2D p : s) {\n p.draw();\n }\n }", "@Override\n public void draw() {\n /** preparacion de la ventana **/\n background(255);\n lights();\n directionalLight(40, 90, 100, 1, 40, 40);\n\n translate(origin.x,origin.y);\n scale(zoom);\n\n\n /** entrada del usuario **/\n userInput();\n /** ejes X Y Z **/\n drawAxes();\n /** aplicar ik **/\n writePos();\n\n /** escala de los objetos**/\n scale(-1.2f);\n\n /** esfera que muestra la posicion en coord X Y Z\n *\n * X -> coord[0]\n * Y -> coord[1]\n * Z -> coord[2]\n *\n * **/\n pushMatrix();\n noStroke();\n fill(250, 100, 1);\n translate(-coord_cartesian[1] ,-coord_cartesian[2] -11,-coord_cartesian[0] );\n sphere(2);\n popMatrix();\n\n\n /**\n * Dibuja el brazo\n */\n pushMatrix();\n arm.drawArm();\n popMatrix();\n }", "private void drawSquare(Graphics g, int x, int y, \n Tetrominoe shape) {\n Color colors[] = {\n new Color(0, 0, 0), new Color(204, 102, 102),\n new Color(102, 204, 102), new Color(102, 102, 204),\n new Color(204, 204, 102), new Color(204, 102, 204),\n new Color(102, 204, 204), new Color(218, 170, 0)\n };\n//left and top sides are brighter, bottom and right sides to look 3d\n Color color = colors[shape.ordinal()];\n\n g.setColor(color);\n g.fillRect(x + 1, y + 1, squareWidth() - 2, squareHeight() - 2);\n\n g.setColor(color.brighter());\n g.drawLine(x, y + squareHeight() - 1, x, y);\n g.drawLine(x, y, x + squareWidth() - 1, y);\n\n g.setColor(color.darker());\n g.drawLine(x + 1, y + squareHeight() - 1,\n x + squareWidth() - 1, y + squareHeight() - 1);\n g.drawLine(x + squareWidth() - 1, y + squareHeight() - 1,\n x + squareWidth() - 1, y + 1);\n\n }", "public void draw() {\n if (numSides <= 6) {\n System.out.println(\"- - - - - -\");\n \n for (int i = numSides - 2; i < numSides; i++) {\n System.out.print(\" | \");\n for (int j = 0; j < this.value ; j++) {\n if (value == 1) {\n System.out.print(\" \");\n }\n if (i % 2 == 0) {\n System.out.print(\"*\");\n } else {\n System.out.print(\" \");\n }\n if (value == 1) {\n System.out.print(\" \");\n }\n }\n }\n System.out.println(\"\");\n System.out.println(\"- - - - - -\");\n } else {\n print();\n }\n }", "public void draw()\n {\n myPencil.up();\n myPencil.backward(100);\n myPencil.down();\n myPencil.turnRight(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(400);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n // Roof\n myPencil.up();\n myPencil.move(0,200);\n myPencil.down();\n myPencil.setDirection(333.435);\n myPencil.forward(223.607);\n myPencil.setColor(new Color(2, 0, 0));\n myPencil.up();\n myPencil.move(0,200);\n myPencil.setDirection(206.565);\n myPencil.down();\n myPencil.forward(223.607);\n // Windows\n myPencil.up();\n myPencil.move(-150,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.turnLeft(90);\n myPencil.forward(50);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(60);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(50,-100);\n myPencil.setDirection(120);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(-150,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n // House Sidewalk\n myPencil.up();\n myPencil.move(-250,-112.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(250,-112.5);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(90);\n myPencil.forward(193);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(90);\n myPencil.up();\n myPencil.move(-75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n // Chimney\n myPencil.up();\n myPencil.move(125,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(52);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(40);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(25);\n // Door window\n myPencil.up();\n myPencil.move(0,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(8);\n myPencil.up();\n myPencil.move(-8,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(16);\n myPencil.up();\n myPencil.move(0,-17);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(16);\n // Door knob\n myPencil.up();\n myPencil.move(14,-55);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(2);\n }", "public void draw(Graphics2D g) {\r\n \tAffineTransform at = g.getTransform();\r\n g.translate(s.x, s.y);\r\n double rot = d.theta() + Math.PI / 2;\r\n \r\n g.rotate(rot);\r\n g.scale(SCALE, SCALE);\r\n g.setColor(COLOR);\r\n g.fillPolygon(XP, YP, XP.length);\r\n //If the shield is active we draw it to\r\n if (shield) {\r\n \tg.setColor(Color.red);\r\n \tg.drawOval(-13, -10, 25, 25);\r\n }\r\n //If the ship is trusting we draw the thruster\r\n if (thrusting) {\r\n g.setColor(Color.red);\r\n g.fillPolygon(XPTHRUST, YPTHRUST, XPTHRUST.length);\r\n g.setColor(Color.yellow);\r\n g.fillPolygon(XPTHRUSTIN, YPTHRUSTIN, XPTHRUSTIN.length);\r\n }\r\n g.setTransform(at);\r\n \r\n \r\n }", "public void draw() {\r\n\t\t// Draw the triangle making up the mountain\r\n\t\tTriangle mountain = new Triangle(this.x, 100,\r\n\t\t\t\tthis.x + mountainSize / 2, 100, this.x + mountainSize / 4,\r\n\t\t\t\t100 - this.y / 4, Color.DARK_GRAY, true);\r\n\t\t// Draw the triangle making up the snow cap\r\n\t\tthis.snow = new Triangle(side1, bottom - this.y / 8, side2, bottom\r\n\t\t\t\t- this.y / 8, this.x + mountainSize / 4, 100 - this.y / 4,\r\n\t\t\t\tColor.WHITE, true);\r\n\t\tthis.window.add(mountain);\r\n\t\tthis.window.add(snow);\r\n\t}", "void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}", "private void drawAxes() {\n float margin = 90;\n\n //TODO tony va a hacer que el eje aparezca abajo\n //X rojo\n text(\"+X\",margin,-2,0);\n text(\"-X\",-margin,-2,0);\n stroke(210, 0, 0);\n line(-size,0,0,size,0,0);\n\n //Y verde\n text(\"-Z\",2,margin,0);\n text(\"+Z\",2,-margin,0);\n stroke(0, 210, 0);\n line(0,-size,0,0,size,0);\n\n //Z azul\n text(\"+Y\",5,0,margin);\n text(\"-Y\",5,0,-margin);\n stroke(0, 0, 210);\n line(0, 0, -size,0,0, size);\n }", "protected abstract void plot2d( int px, int py, double z, int istyle );", "void draw();", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "public void russia(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(165,0,0);//gray\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(0);//black\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(18,39,148);//blue\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //red\n fill(194,24,11);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n fill(194,24,11);\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n\n fill(194,24,11);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(160,0,0);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制五角形\");\n\t}", "public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}", "public void circulos() {\n pushMatrix();\n translate(width/2, height/2);\n rotate(-h);\n noFill();\n strokeWeight(5);\n stroke(255);\n ellipse(10, 10, 20, 20);\n popMatrix();\n\n h = h + 0.3f;\n }", "void render() {\n smooth();\n for (int x = 0; x < yvalues.length; x++) {\n noStroke();\n fill(0,0,255,100);\n ellipseMode(CENTER);\n ellipse(x*xspacing,yvalues[x],16,16);\n }\n }", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "public void Display() \n {\n float theta = velocity.heading() + PI/2;\n fill(175);\n stroke(0);\n pushMatrix();\n translate(pos.x,pos.y);\n rotate(theta);\n beginShape();\n vertex(0, -birdSize*2);\n vertex(-birdSize, birdSize*2);\n vertex(birdSize, birdSize*2);\n endShape(CLOSE);\n popMatrix();\n }", "public void draw() {\n StdDraw.clear();\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setXscale(-drawLength * 0.1, drawLength * 1.2);\n StdDraw.setYscale(-drawLength * 0.65, drawLength * 0.65);\n StdDraw.line(0, 0, drawLength, 0);\n StdDraw.text(-drawLength * 0.05, 0, \"0\");\n StdDraw.text(drawLength * 1.1, 0, Integer.toString(size()));\n }", "public void draw() {\n \n }", "public void draw() {\r\n /* DO NOT MODIFY */\r\n StdDraw.point(x, y);\r\n }", "public void draw();", "public void draw();", "public void draw();", "public void med1() {\n DrawingPanel win = new DrawingPanel(WIDTH, HEIGHT);\n java.awt.Graphics g = win.getGraphics();\n win.setTitle(\"Med. 1\");\n win.setLocation(300, 10);\n win.setBackground(java.awt.Color.red);\n for(int y = -10; y < HEIGHT; y += 24) {\n for(int x = -10; x < WIDTH; x += 24) {\n octagon(x, y, g);\n }\n }\n }", "public void draw(Graphics2D g2) {\r\n\tif (!bustedWall) {\r\n\t\tg2.setColor(new Color(0, 0, 0)); \r\n\t\tSystem.out.println(\"black\"); // for testing purposes\r\n\t}else {\r\n\t\tg2.setColor(new Color(255,255,255)); \r\n\t\tSystem.out.println(\"white\"); // for testing purposes\r\n\t}\r\n\tg2.drawLine(x1, y1, x2, y2); \r\n\t// print the untranslated coordinates for testing purposes\r\n\tSystem.out.println(String.format(\"%d,%d,%d,%d\",x1 - TRANSLATION ,y1 - TRANSLATION,x2 - TRANSLATION,y2 - TRANSLATION));\r\n}", "public void draw() {\t\t\n\t\ttexture.draw(x, y);\n\t\tstructure.getTexture().draw(x,y);\n\t}", "public void draw() {\n \n // TODO\n }", "private void showDraw() {\n StdDraw.show(0);\n // reset the pen radius\n StdDraw.setPenRadius();\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void drawRightTriangle(){\n\t for(int i = 0; i < height; i++)\n\t {\n\t \tfor(int j = 0; j < width - 1; j++)\n\t \t{\n\t \t\tSystem.out.print(\" \");\n\t \t}\n\t \twidth--;\n\t \tfor(int k = height; k > width; k--)\n\t \t{\n\t \t\tSystem.out.print(appearance);\n\t \t}\n\t \tSystem.out.println(\"\");\n\t }\n\t}", "private void drawPowerSwitch(int x, int y) {\n \t\tStdDraw.setPenColor(StdDraw.WHITE);\n \t\tStdDraw.filledSquare(x + 0.5, y + 0.5, 0.5);\n \t\tStdDraw.setPenColor(StdDraw.RED);\n \t\tStdDraw.setPenRadius(.007);\n \t\tStdDraw.arc(x + 0.5, y + 0.5, 0.45, 120, 60);\n \t\tStdDraw.line(x + 0.5, y + 0.5, x + 0.5, y + 0.95);\n \t\tStdDraw.setPenRadius();\n \t}", "@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}", "void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}", "void to_screen_2D_x_y_i (double horiz, double vert) {\n double rp = Math.toRadians(craft_pitch); \n double space_x = scalex*(offx+horiz);\n double space_y = scaley*(offy+vert);\n space_x = space_x*Math.cos(rp) - space_y*Math.sin(rp); \n space_y = space_x*Math.sin(rp) + space_y*Math.cos(rp); \n\n x[xy_i] = screen_off_x + toInt(space_x);\n y[xy_i++] = screen_off_y + toInt(space_y);\n }", "public void usa(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(192,0,11);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,0,67);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n //green\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n //green\n fill(192,0,11);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n }", "protected void paint2D (Graphics2D g2) {\n\t AffineTransform tform = AffineTransform.getTranslateInstance( 0, 0);\n\t tform.scale(0.1, 0.1); \n\t //set the properties of g2\n\t g2.setTransform( tform);\n\t g2.setColor( Color.BLUE); \n\t }", "public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(0.01);\n for (Point2D point : points) {\n StdDraw.point(point.x(), point.y());\n }\n StdDraw.setPenRadius();\n }", "public Shapes draw ( );", "@Override\r\n public final void draw(final Square s, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(s.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(s.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(s.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(s.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(s.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(s.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(s.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(s.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(s.getBorderColor().getBlue());\r\n }\r\n String color = \"#\" + red + green + blue;\r\n \r\n draw(new Line((String.valueOf(s.getxSus())), String.valueOf(s.getySus()),\r\n String.valueOf(s.getxSus() + s.getLatura() - 1), String.valueOf(s.getySus()), color,\r\n String.valueOf(s.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(s.getxSus() + s.getLatura() - 1)),\r\n String.valueOf(s.getySus()), String.valueOf(s.getxSus() + s.getLatura() - 1),\r\n String.valueOf(s.getySus() + s.getLatura() - 1), color,\r\n String.valueOf(s.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(s.getxSus() + s.getLatura() - 1)),\r\n String.valueOf(s.getySus() + s.getLatura() - 1), String.valueOf(s.getxSus()),\r\n String.valueOf(s.getySus() + s.getLatura() - 1), color,\r\n String.valueOf(s.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(s.getxSus())),\r\n String.valueOf(s.getySus() + s.getLatura() - 1), String.valueOf(s.getxSus()),\r\n String.valueOf(s.getySus()), color, String.valueOf(s.getBorderColor().getAlpha()),\r\n paper), paper);\r\n for (int i = s.getxSus() + 1; i < s.getxSus() + s.getLatura() - 1; i++) {\r\n for (int j = s.getySus() + 1; j < s.getySus() + s.getLatura() - 1; j++) {\r\n if (checkBorder(i, j, paper)) {\r\n paper.setRGB(i, j, s.getFillColor().getRGB());\r\n }\r\n }\r\n }\r\n\r\n }", "public void drawUserPlane(Graphics g) {\r\n\t\tlevelManager.drawUserPlane(g);\r\n\t}", "protected void drawPlot()\n\t{\n \t\tfill(255);\n \t\tbeginShape();\n \t\tvertex(m_ViewCoords[0] - 1, m_ViewCoords[1] - 1);\n \t\tvertex(m_ViewCoords[2] + 1, m_ViewCoords[1] - 1);\n \t\tvertex(m_ViewCoords[2] + 1, m_ViewCoords[3] + 1);\n \t\tvertex(m_ViewCoords[0] - 1, m_ViewCoords[3] + 1);\n \t\tendShape(CLOSE);\n\t}", "public void draw(){\n }", "public void draw() {\r\n\t\tbackground(255); // Clear the screen with a white background\r\n\r\n\t\ttextSize(12);\r\n\t\tfill(0);\r\n\r\n\t\tstroke(0);\r\n\t\tcurve.draw(this);\r\n\t}", "private void drawBox(Graphics2D g2d, int y, int wid, int hei) {\n g2d.setColor(Dark_Gray);\n Triangle triangle1 = new Triangle(new Point(wid / 3, y), new Point(2 * wid / 3, y), new Point(wid / 3, y + hei / 10));\n triangle1.fill(g2d);\n g2d.setColor(Light_Gray);\n Triangle triangle2 = new Triangle(new Point(2 * wid / 3, y + hei / 10), new Point(2 * wid / 3, y), new Point(wid / 3, y + hei / 10));\n triangle2.fill(g2d);\n Triangle triangle3 = new Triangle(new Point(wid / 3, y + hei / 10), new Point(wid / 3 + 8, y + hei / 10), new Point(wid / 3 + 8, y + hei / 10 - 8));\n triangle3.fill(g2d);\n g2d.setColor(Dark_Gray);\n Triangle triangle4 = new Triangle(new Point(2 * wid / 3, y), new Point(2 * wid / 3 - 8, y), new Point(2 * wid / 3 - 8, y + 8));\n triangle4.fill(g2d);\n g2d.setColor(Color.BLACK);\n g2d.fillRect(wid / 3 + 4, y + 4, wid / 3 - 8, hei / 10 - 8);\n }", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "protected void plotScatterDiagram(){\n double xmax = a + 5. * gamma;\r\n double xmin = a - 5. * gamma;\r\n DatanGraphics.openWorkstation(getClass().getName(), \"\");\r\n DatanGraphics.setFormat(0., 0.);\r\n DatanGraphics.setWindowInComputingCoordinates(xmin, xmax, 0., .5);\r\n DatanGraphics.setViewportInWorldCoordinates(-.15, .9, .16, .86);\r\n DatanGraphics.setWindowInWorldCoordinates(-.414, 1., 0., 1.);\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawFrame();\r\n DatanGraphics.drawScaleX(\"y\");\r\n DatanGraphics.drawScaleY(\"f(y)\");\r\n DatanGraphics.drawBoundary();\r\n double xpl[] = new double[2];\r\n double ypl[] = new double[2];\r\n// plot scatter diagram\r\n DatanGraphics.chooseColor(1);\r\n for(int i = 0; i < y.length; i++){\r\n xpl[0] = y[i];\r\n xpl[1] = y[i];\r\n ypl[0] = 0.;\r\n ypl[0] = .1;\r\n DatanGraphics.drawPolyline(xpl, ypl); \r\n }\r\n// draw Breit-Wigner corresponding to solution\r\n int npl = 100;\r\n xpl = new double[npl];\r\n ypl = new double[npl];\r\n double dpl = (xmax - xmin) / (double)(npl - 1);\r\n for(int i = 0; i < npl; i++){\r\n xpl[i] = xmin + (double)i * dpl;\r\n ypl[i] = breitWigner(xpl[i], x.getElement(0), x.getElement(1));\r\n }\r\n DatanGraphics.chooseColor(5);\r\n DatanGraphics.drawPolyline(xpl, ypl);\r\n// draw caption\r\n String sn = \"N = \" + nny;\r\n\t numForm.setMaximumFractionDigits(3);\r\n \t numForm.setMinimumFractionDigits(3);\r\n String sx1 = \", x_1# = \" + numForm.format(x.getElement(0));\r\n String sx2 = \", x_2# = \" + numForm.format(x.getElement(1));\r\n String sdx1 = \", &D@x_1# = \" + numForm.format(Math.sqrt(cx.getElement(0,0)));\r\n String sdx2 = \", &D@x_2# = \" + numForm.format(Math.sqrt(cx.getElement(1,1)));\r\n caption = sn + sx1 + sx2 + sdx1 + sdx2;\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawCaption(1., caption);\r\n DatanGraphics.closeWorkstation();\r\n\r\n }", "protected void drawImpl()\n {\n if (mode == 2) {\n // Invader\n background(0);\n noStroke();\n int triangleXDensity = 32;\n int triangleYDensity = 18;\n for (int i = 0; i < triangleXDensity + 100; i++) {\n for (int j = 0; j < triangleYDensity + 100; j++) {\n float value = scaledBandLevels[(i % scaledBandLevels.length)];\n float shapeSize = map(value, 0, 255, 0, 150);\n int currentX = (width/triangleXDensity) * i;\n int currentY = (int)(((height/triangleYDensity) * j));\n\n if (subMode == 1) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 3));\n }\n else if (subMode == 3) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 6));\n }\n\n if (subMode == 4) {\n shapeSize = map(value, 0, 255, 0, 500);\n }\n\n if ((i + j) % (int)random(1,5) == 0) {\n fill(0, 255, 255);\n }\n else {\n fill(234,100,255);\n }\n pushMatrix();\n if (subMode == 2) {\n translate(width/2, height/2);\n rotate(radians(frameCount % value * 2));\n translate(-width/2, -height/2);\n }\n triangle(currentX, currentY - shapeSize/2, currentX - shapeSize/2, currentY + shapeSize/2, currentX + shapeSize/2, currentY + shapeSize/2);\n popMatrix();\n }\n }\n\n }\n else if (mode == 5) {\n // Mirror Ball\n background(0);\n translate(width/2, height/2, 500);\n noStroke();\n if (subMode == 0) {\n rotateY(frameCount * PI/800);\n }\n else if (subMode == 1 || subMode == 2) {\n rotateY(frameCount * PI/800);\n rotateX(frameCount * PI/100);\n }\n else if (subMode == 3) {\n rotateY(frameCount * PI/400);\n }\n\n for (int i = 0; i < 100; i++) {\n for (int j = 0; j < 100; j++) {\n rotateY((2*PI/200) * j);\n pushMatrix();\n rotateX((2*PI/200) * i);\n translate(0,200);\n if (j > 50 && j < 150) {\n rotateX(PI/2);\n }\n else {\n rotateX(-PI/2);\n }\n if (subMode == 2 || subMode == 3) {\n fill(i * 2, 0, j, scaledBandLevels[i % scaledBandLevels.length] * 2);\n }\n else {\n fill(255, scaledBandLevels[i % scaledBandLevels.length]);\n }\n rect(0,200,20,20);\n popMatrix();\n }\n }\n }\n else if (mode == 8) {\n // End To Begin\n background(0);\n\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i] && modSizes[i] < 60) {\n modSizes[i]+=2;\n }\n else if (modSizes[i] > 5) {\n modSizes[i]--;\n }\n }\n \n theta += .2;\n\n if (subMode >=3) {\n theta += .6;\n }\n\n float tempAngle = theta;\n for (int i = 0; i < yvalues.length; i++) {\n yvalues[i] = sin(tempAngle)*amplitude;\n tempAngle+=dx;\n }\n\n noStroke();\n if (subMode >= 4) {\n translate(0, height/2);\n }\n int currentFrameCount = frameCount;\n for (int x = 0; x < yvalues.length; x++) {\n if (subMode >= 4) {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length] * 3);\n rotateX(currentFrameCount * (PI/200));\n }\n else {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length]);\n }\n ellipse(x*xspacing - period/2, height/2+yvalues[x], modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n if (subMode >= 1) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n if (subMode >= 2) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n }\n }\n else if (mode == 1) {\n // Life Support\n background(0);\n noStroke();\n if (trigger) { \n if (subMode == 0) {\n fill(255, 0, 0, triggerHold - (triggerCount * 4));\n }\n else if (subMode == 1) {\n fill(255, triggerHold - (triggerCount * 4));\n }\n rect(0,0,width,height);\n if (triggerCount > triggerHold) {\n trigger = false;\n triggerCount = 1;\n }\n else {\n triggerCount++;\n }\n }\n }\n else if (mode == 6) {\n // Stacking Cards\n background(255);\n if (subMode >= 1) {\n translate(width/2, 0);\n rotateY(frameCount * PI/200);\n }\n imageMode(CENTER);\n\n if (subMode <= 1) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=40;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n else if (subMode == 2) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 4; j++) {\n rotateY(j * (PI/4));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 3) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 4) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int k = 0; k < height; k+= 300) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), k, modSizes[i], modSizes[i]);\n }\n }\n }\n }\n } \n else if (mode == 4) {\n background(0);\n noStroke();\n for (int i = 0; i < letterStrings.length; i++) { \n if (subMode == 0) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), (height/2) + 75);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, (height/2) + 75);\n }\n }\n else if (subMode == 1) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100; j < height + 100; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 2) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100 - (frameCount % 400); j < height + 600; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 3) {\n for (int j = -100; j < height + 100; j+=200) {\n if (random(0,1) < .5) {\n fill(0,250,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n else {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n }\n }\n else if (mode == 9) {\n background(0);\n noStroke();\n fill(234,100,255);\n String bandName = \"ELAPHANT\";\n text(bandName, (width/2) - (textWidth(bandName)/2), (height/2) + 75);\n }\n else {\n background(0);\n }\n }", "public static void main(String[] args) {\n Point a = new Point(46, 65);\n Point b = new Point(40, 265);\n// Point c = new Point(20, 20);\n// Point d = new Point(21, 211);\n// Point e = new Point(2, 221);\n// Point f = new Point(23, 21);\n// Point g = new Point(-2, 21);\n// Point h = new Point(212, 22);\n//// StdDraw.setPenRadius(0.05);\n//// StdDraw.setPenColor(StdDraw.BLUE);\n//// StdDraw.point(1.0, 2.0);\n//// StdDraw.setCanvasSize(720, 720);\n//// StdDraw.setScale(-10, 10);\n//\n System.out.println(\"Compare : \"+ a.slopeTo(b));\n//\n//// a.draw();\n//// b.draw();\n//// c.draw();\n//// d.draw();\n//// e.draw();\n//// f.draw();\n//// g.draw();\n//// h.draw();\n//// a.drawTo(b);\n//\n//// a.draw();\n\n }", "public void draw() {\n }", "protected DrawSurface() {\n\t\taiDrawingOrder = new Object[] { RANGE_CURSOR_DRAWSURFACE, GRID_DRAWSURFACE, GRAPH_DRAWSURFACE,\n\t\t\t\tCURSOR_DRAWSURFACE, ZOOM_DRAWSURFACE, };\n\n\t\t// we know that we paint all our own pixels.\n\t\tsetOpaque(false);\n\n\t\t// default background\n\t\tsetBackground(Color.BLACK);\n\n\t\t// give us the same default front as a JPanel\n\t\tsetFont(UIManager.getFont(\"Panel.font\"));\n\n\t\t/*\n\t\t * We create our own cursor because the default cross-hair cursor has\n\t\t * some weird display issues - it seems to fade into some waterfall\n\t\t * graphs, and seems to interact with the green FFT line to produce red\n\t\t * pixels. Weird.\n\t\t */\n\t\tsetCursor(DEFAULT_CROSSHAIR_CURSOR);\n\n\t\tPeralexLibsBundle.addLocaleListener(this); // do after components have\n\t\t\t\t\t\t\t\t\t\t\t\t\t// been initialised\n\t}", "public void draw(){\n textAlign(CENTER);\n route.update(pp, qq);\n SoundSys();\n fill(0xff31F0FF, 127);\n noStroke();\n ellipse(mouseX, mouseY, 30, 30);\n}", "public void draw() {\n\n }", "public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}", "public final void draw2D()\n {\n if ( GameLevel.current() != null )\n {\n //draw player's wearpon or gadget\n GameLevel.currentPlayer().drawWearponOrGadget();\n }\n\n //draw avatar message ( if active )\n AvatarMessage.drawMessage();\n\n //draw all hud messages\n HUDMessage.drawAllMessages();\n\n //draw fullscreen hud effects\n HUDFx.drawHUDEffects();\n\n //draw frames per second last\n Fps.draw();\n\n //draw ammo if the wearpon uses ammo\n if ( GameLevel.currentPlayer().showAmmoInHUD() )\n {\n drawAmmo();\n }\n\n //draw health\n drawHealth();\n\n //draw debug logs\n //Level.currentPlayer().drawDebugLog( g );\n }", "private void drawVector(Vector2 v, float x, float y, float scayl, ShapeRenderer sr) {\n float arrowsize = 4;\n sr.begin(ShapeRenderer.ShapeType.Line);\n // Translate to location to render vector\n sr.setColor(0,0,0,.5f);\n sr.identity();\n sr.translate(x,y,0);\n // Call vector heading function to get direction (note that pointing to the right is a heading of 0) and rotate\n sr.rotate(0,0,1,v.angle());\n // Calculate length of vector & scale it to be bigger or smaller if necessary\n float len = scayl;\n // Draw three lines to make an arrow (draw pointing up since we've rotate to the proper direction)\n sr.line(0,0,len,0);\n //line(len,0,len-arrowsize,+arrowsize/2);\n //line(len,0,len-arrowsize,-arrowsize/2);\n sr.end();\n }", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "public void drawSymmetricalPoints (int xc, int x, int yc, int y, Graphics g ){\r\n \tg.drawRect(xc + x, yc + y,1,1);\r\n \tg.drawRect(xc - x, yc + y,1,1);\r\n \tg.drawRect(xc + x, yc - y,1,1);\r\n \tg.drawRect(xc - x, yc - y,1,1);\r\n \tg.drawRect(xc + y, yc + x,1,1);\r\n \tg.drawRect(xc - y, yc + x,1,1);\r\n \tg.drawRect(xc + y, yc - x,1,1);\r\n \tg.drawRect(xc - y, yc - x,1,1);\r\n }", "public void display (Graphics2D g, double x, double y);", "public void draw(ShapeRenderer sr){\n this.draw(sr,null,true);\n }", "public void drawControlPolygon() {\n\t\t//this.frame.stroke(255, 0, 0);\n\t\tfor(int i=0;i<points.length;i++) {\n\t\t\tfor(int j=0;j<points[i].length;j++)\n\t\t\t\tthis.frame.drawVertex(points[i][j]);\n\t\t}\n\t}", "public void display(Graphics g, float alpha, double w, double h) {\r\n\t\tGraphics2D g2 = (Graphics2D) g;\r\n\t\tint d = 20;\r\n\r\n\t\t// synapses:\r\n\t\tfor (int s = 1; s < stages.length; s++) {\r\n\t\t\tint x1 = (s) * (int) (w / (stages.length + 1));\r\n\t\t\tint x2 = (s + 1) * (int) (w / (stages.length + 1));\r\n\r\n\t\t\tfor (int i = 0; i < stages[s].coeffs.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < stages[s].coeffs[0].length - 1; j++) {\r\n\t\t\t\t\tint c = stages[s].coeffs[i][j];\r\n\t\t\t\t\tif (Math.abs(c) < 48)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tg2.setStroke(new BasicStroke(Math.abs(c) * 3 / 129));\r\n\r\n\t\t\t\t\tint y1 = (j + 1) * (int) (h / (stages[s - 1].output.length + 1));\r\n\t\t\t\t\tint y2 = (i + 1) * (int) (h / (stages[s].output.length + 1));\r\n\t\t\t\t\tfloat b = (float) (stages[s - 1].output[j] / Stage.signalMultiplier);\r\n\t\t\t\t\tif (c < 0)\r\n\t\t\t\t\t\tg.setColor(new Color(b, 0, 0));\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tg.setColor(new Color(0, b, 0));\r\n\t\t\t\t\tg2.drawLine(x1, y1, x2, y2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// neurons:\r\n\t\tfor (int s = 0; s < stages.length; s++) {\r\n\t\t\tint x = (s + 1) * (int) (w / (stages.length + 1));\r\n\t\t\td = (int) (h / (stages[s].output.length + 7));\r\n\t\t\tfor (int i = 0; i < stages[s].output.length; i++) {\r\n\t\t\t\tint y = (i + 1) * (int) (h / (stages[s].output.length + 1));\r\n\r\n\t\t\t\tfloat output = (float) (stages[s].output[i] / Stage.signalMultiplier * .8 + .2);\r\n\t\t\t\tg.setColor(new Color(Color.HSBtoRGB(.6f, 1, output)));\r\n\t\t\t\tg.fillOval(x - d / 2, y - d / 2, d, d);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void mainDraw(Graphics graphics){\n\n int centerX = WIDTH / 3 ;\n int centerY = HEIGHT / 3;\n int rectA2 = 20 / 2;\n\n graphics.setColor(Color.GREEN);\n graphics.drawRect(centerX - rectA2, centerY - rectA2, rectA2 * 2, rectA2 * 2);\n\n centerX = WIDTH /5 ;\n centerY = HEIGHT / 2;\n rectA2 = 40 / 2;\n\n graphics.setColor(Color.YELLOW);\n graphics.drawRect(centerX - rectA2, centerY - rectA2, rectA2 * 2, rectA2 * 2);\n\n centerX = WIDTH / 2 ;\n centerY = HEIGHT / 6;\n rectA2 = 70 / 2;\n\n graphics.setColor(Color.BLUE);\n graphics.drawRect(centerX - rectA2, centerY - rectA2, rectA2 * 2, rectA2 * 2);\n\n centerX = WIDTH / 2 ;\n centerY = HEIGHT / 2;\n rectA2 = 100 / 2;\n\n graphics.setColor(Color.RED);\n graphics.drawRect(centerX - rectA2, centerY - rectA2, rectA2 * 2, rectA2 * 2);\n\n }", "public void paintComponent(Graphics g){\n super.paintComponent(g);\n g.setColor(Color.BLACK);\n g.fillRect(0,0,width*scale,height*scale);\n if(game.getWindowNum() == 2){\n for(int x = 0; x < world.length*scale; x+=scale){\n for(int y = 0; y < world[0].length*scale; y+= scale){\n if(game.getDiscoverdWorld()[x/scale][y/scale] == 1){\n if(world[x/scale][y/scale] == 0){\n g.setColor(Color.CYAN);\n }\n else if(world[x/scale][y/scale] == 1){\n g.setColor(Color.GREEN);\n }\n else if(world[x/scale][y/scale] == 2){\n g.setColor(new Color(102,66,0));\n }\n else if(world[x/scale][y/scale] == 3){\n g.setColor(new Color(105,105,105));\n }\n g.fillRect(x,y,scale,scale);\n }\n }\n }\n g.setColor(Color.RED);\n g.fillRect((int)(game.getPlayerCords()[0]*(double)scale),(int)(game.getPlayerCords()[1]*(double)scale),scale*game.getPlayerDimentions()[0],scale*game.getPlayerDimentions()[1]);\n g.setColor(Color.BLACK);\n g.drawRect((int)(game.getViewBoxCords()[0]*scale),(int)(game.getViewBoxCords()[1]*scale),(int)(game.getPlayerView().length*scale),(int)(game.getPlayerView()[0].length*scale));\n g.drawString(\"X: \"+game.getPlayerCords()[0]+\" Y: \"+game.getPlayerCords()[1],20,20);\n g.drawString(\"Seed: \"+game.getSeed(),20,40);\n g.drawString(\"Grounded: \"+game.getPlayer().getGrounded(),20,60);\n g.drawString(\"Vertical Velocity: \"+game.getPlayer().getVertVelocity(),20,80);\n }\n else if(game.getWindowNum() == 1){\n int[][] viewPlane = game.getPlayerView();\n double playerViewScale = game.getPlayerViewScale();\n double[] viewBoxCords = game.getViewBoxCords();\n g.setColor(Color.CYAN);\n for(int x = 0; x < viewPlane.length;x++){\n for(int y = 0; y < viewPlane[0].length;y++){\n if(viewPlane[x][y] != 0 && game.getDiscoverdWorld()[x+(int)viewBoxCords[0]][y+(int)viewBoxCords[1]] == 1){\n g.drawImage(textures.get(viewPlane[x][y]-1),(int)(((double)x-(viewBoxCords[0]%1))*playerViewScale),(int)(((double)y-(viewBoxCords[1]%1))*playerViewScale),this);\n /*\n if(viewPlane[x][y] == 1){\n g.setColor(Color.GREEN);\n }\n else if(viewPlane[x][y] == 2){\n g.setColor(new Color(102,66,0));\n }\n else if(viewPlane[x][y] == 3){\n g.setColor(new Color(105,105,105));\n }\n g.fillRect((int)(((double)x-(viewBoxCords[0]%1))*playerViewScale),(int)(((double)y-(viewBoxCords[1]%1))*playerViewScale),(int)(playerViewScale+0.5),(int)(playerViewScale+0.5));\n */\n }\n else if(viewPlane[x][y] == 0 && game.getDiscoverdWorld()[x+(int)viewBoxCords[0]][y+(int)viewBoxCords[1]] == 1){\n g.fillRect((int)(((double)x-(viewBoxCords[0]%1))*playerViewScale),(int)(((double)y-(viewBoxCords[1]%1))*playerViewScale),(int)(playerViewScale+1),(int)(playerViewScale+1));\n }\n }\n }\n if(recentlyHit != null){\n g.setColor(new Color(50,50,50,(int)(255*(1-recentlyHit.getHealthPercent()))));\n g.fillRect((int)(recentlyHit.getX()*playerViewScale)-(int)(viewBoxCords[0]%1*playerViewScale)+1,(int)(recentlyHit.getY()*playerViewScale)-(int)(viewBoxCords[1]%1*playerViewScale)+1,(int)playerViewScale,(int)playerViewScale);\n }\n //g.setColor(Color.RED);\n //g.fillRect((int)((game.getPlayerCords()[0]-viewBoxCords[0])*playerViewScale),(int)((game.getPlayerCords()[1]-viewBoxCords[1])*playerViewScale),(int)playerViewScale*game.getPlayerDimentions()[0],(int)playerViewScale*game.getPlayerDimentions()[1]);\n if(game.isFacingRight()){\n g.drawImage(textures.get(3),(int)((game.getPlayerCords()[0]-viewBoxCords[0])*playerViewScale),(int)((game.getPlayerCords()[1]-viewBoxCords[1])*playerViewScale),this);\n }\n else{\n g.drawImage(textures.get(4),(int)((game.getPlayerCords()[0]-viewBoxCords[0])*playerViewScale),(int)((game.getPlayerCords()[1]-viewBoxCords[1])*playerViewScale),this);\n }\n g.setColor(Color.BLACK);\n g.setFont(font2);\n g.drawString(\"X: \"+game.getPlayerCords()[0]+\" Y: \"+game.getPlayerCords()[1],20,20);\n g.drawString(\"Seed: \"+game.getSeed(),20,40);\n g.drawString(\"Grounded: \"+game.getPlayer().getGrounded(),20,60);\n g.drawString(\"Vertical Velocity: \"+game.getPlayer().getVertVelocity(),20,80);\n g.drawString(\"View Box Cords: X:\"+viewBoxCords[0]+\" Y: \"+viewBoxCords[1],20,100);\n int a = 0;\n for(Item i: game.getPlayerInventory()){\n if(i != null){\n g.drawString(i.getName()+\" Count: \"+i.getCount(),20,120+a*20);\n a++;\n }\n } \n g.setColor(new Color(100,100,100,95));\n g.fillRect((int)(0.09*viewPlane.length*playerViewScale),(int)(0.8*viewPlane[0].length*playerViewScale),(int)(0.82*viewPlane.length*playerViewScale),(int)(0.12*viewPlane[0].length*playerViewScale));\n g.setColor(Color.WHITE);\n for(int i = 0; i < game.getPlayerHotbar().length;i++){\n if(i == game.getPlayer().getHotbarItemSelected()){\n g.setColor(Color.BLACK);\n g.fillRect((int)(0.11*viewPlane.length*playerViewScale)+(int)(i*0.08*viewPlane.length*playerViewScale),(int)(0.81*viewPlane[0].length*playerViewScale),(int)(0.06*playerViewScale*viewPlane.length),(int)(0.1*viewPlane[0].length*playerViewScale));\n g.setColor(Color.WHITE);\n }\n else{\n g.fillRect((int)(0.11*viewPlane.length*playerViewScale)+(int)(i*0.08*viewPlane.length*playerViewScale),(int)(0.81*viewPlane[0].length*playerViewScale),(int)(0.06*playerViewScale*viewPlane.length),(int)(0.1*viewPlane[0].length*playerViewScale));\n }\n if(game.getPlayer().getHotbar()[i] != null){\n g.drawImage(textures.get(game.getPlayer().getHotbar()[i].getTextureNum()),(int)(0.125*viewPlane.length*playerViewScale)+(int)(i*0.08*viewPlane.length*playerViewScale),(int)(0.83*viewPlane[0].length*playerViewScale),this);\n }\n }\n if(game.isInvenVisible()){\n int rowLength = 10;\n g.setColor(new Color(100,100,100,180));\n g.fillRect((int)(0.05*screenWidth),(int)(0.06*screenHeight),(int)(0.9*screenWidth),(int)(0.7*screenHeight));\n g.setColor(Color.WHITE);\n int count = 0; \n for(Item i: game.getPlayerInventory()){\n if(i!=null){\n g.drawImage(textures.get(i.getTextureNum()),(int)(0.08*screenWidth)+(int)((count%rowLength)*0.085*screenWidth),(int)(0.085*screenHeight)+(int)((int)(count/rowLength)*0.085*screenHeight),this);\n g.drawString(\"x\"+i.getCount(),(int)(0.11*screenWidth)+(int)((count%rowLength)*0.085*screenWidth),(int)(0.096*screenHeight)+(int)((int)(count/rowLength)*0.085*screenHeight));\n count++;\n }\n }\n }\n else if(game.isCraftingVisible()){\n g.setColor(new Color(100,100,100,180));\n g.fillRect((int)(0.05*viewPlane.length*playerViewScale),(int)(0.05*viewPlane[0].length*playerViewScale),(int)(0.9*viewPlane.length*playerViewScale),(int)(0.7*viewPlane[0].length*playerViewScale));\n }\n g.setColor(Color.BLACK);\n g.drawRect((int)(screenWidth*0.8),(int)(screenHeight*.03),(int)(screenWidth*.18),(int)(screenHeight*0.04));\n g.setColor(new Color((int)(255*(1-game.getPlayerHealthPercent())),(int)(255*game.getPlayerHealthPercent()),0));\n g.fillRect((int)(screenWidth*0.8)+1,(int)(screenHeight*.03)+1,(int)(screenWidth*.18*game.getPlayerHealthPercent())-1,(int)(screenHeight*0.04)-1);\n g.setColor(new Color(50,50,50,200));\n g.setFont(font1);\n g.drawString(game.getPlayerHealthPercent()*100+\"%\",(int)(screenWidth*.88),(int)(screenHeight*0.06));\n }\n }", "private void drawUniverse() {\n Random r = new Random();\n Point lower = getLower();\n Point upper = getUpper();\n lower = new Point(lower.x / (UNIVERSE_SCALE), lower.y / (UNIVERSE_SCALE));\n upper = new Point(upper.x / (UNIVERSE_SCALE), upper.y / (UNIVERSE_SCALE));\n\n universe.generateFrom(lower.x, lower.y, upper.x, upper.y );\n \n //sets scale of star backdrop\n starBackdrop.setScaleX(zoom / 5);\n starBackdrop.setScaleY(zoom / 5);\n gameCanvas.setScaleX(zoom / 10);\n gameCanvas.setScaleY(zoom / 10);\n \n //clears before drawing\n g.clearRect(0, 0, gameCanvas.getWidth(), gameCanvas.getHeight());\n \n //int x = universe.xMin(), y = universe.yMin();\n starBackdrop.setTranslateX((-mapOffsetX - dragOffsetX) * 2);\n starBackdrop.setTranslateY((-mapOffsetY - dragOffsetY) * 2);\n \n //draw non travelable solar systems\n for (SparseSpace.SparseIterator iter = universe.iterateFrom(lower.x, lower.y, upper.x, upper.y); iter.hasNext();) {\n SolarSystem a = iter.next();\n Image starImage = null;\n if (a != null && !travelable.contains(a)) {\n int x = a.getX() * UNIVERSE_SCALE;\n int y = a.getY() * UNIVERSE_SCALE;\n r.setSeed(a.name().hashCode());\n \n //set color of star based on suntype\n if (a.sunType().usesColor()) {\n g.setFill(new Color(a.sunType().getR(), a.sunType().getG(), a.sunType().getB(), 1.0));\n } else {\n starImage = sunImages.get(a.sunType().getName());\n }\n \n //initializes size and position variables\n double size = 20 + a.planets().length * 2;\n double xPosition = (x - mapOffsetX - dragOffsetX) + (512 - mapOffsetX - dragOffsetX) - (size / 2);\n double yPosition = (y - mapOffsetY - dragOffsetY) + (288 - mapOffsetY - dragOffsetY) - (size / 2);\n if (dragFinished) {\n solarSystemLocations.put(new Point((int) (xPosition + (size / 2)), (int) (yPosition + (size / 2))), a);\n }\n if (starImage == null) {\n g.fillOval(xPosition, yPosition, size, size);\n } else {\n Affine old = g.getTransform();\n double angle = r.nextDouble() * 360;\n rotate(angle, xPosition + size / 2, yPosition + size / 2);\n g.drawImage(starImage, xPosition, yPosition, size, size);\n g.setTransform(old);\n }\n g.setFill(Color.WHITE);\n }\n }\n \n //darken non-travelable planets\n g.setFill(new Color(0, 0, 0, 0.7));\n g.fillRect(0, 0, 1024, 512);\n \n //draw travel radius\n double radsize = player.getTravelRadius() * UNIVERSE_SCALE * 2;\n double radx = (((player.getCurrentSolarSystem().getX() * UNIVERSE_SCALE) - mapOffsetX - dragOffsetX)) + (512 - mapOffsetX - dragOffsetX) - (radsize / 2f);\n double rady = (((player.getCurrentSolarSystem().getY() * UNIVERSE_SCALE) - mapOffsetY - dragOffsetY)) + (288 - mapOffsetY - dragOffsetY) - (radsize / 2f);\n g.strokeOval(radx, rady, radsize, radsize);\n g.setFill(new Color(0, 0, 1, 0.1));\n g.fillOval(radx, rady, radsize, radsize);\n \n drawTravelable();\n }", "@Override\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\n\t}", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "@Override\n public void draw(GraphicsContext gc, int sides){}", "public void paintComponent(Graphics g){ \r\n Graphics2D g2 = (Graphics2D)g;\r\n \r\n if(rev == true){\r\n int[] xCord = new int[]{x, x-25, x-50, x-100, x-50, x-25, x};\r\n int[] yCord = new int[]{y, y+25, y+10, y+45, y+65, y+50, y+75};\r\n setColor(g2);\r\n g2.drawPolygon(xCord, yCord, xCord.length);\r\n g2.fillPolygon(xCord, yCord, xCord.length); \r\n \r\n \r\n }\r\n else{\r\n int[] xCord = new int[]{x, x+25, x+50, x+100, x+50, x+25, x};\r\n int[] yCord = new int[]{y, y+25, y+10, y+45, y+65, y+50, y+75};\r\n setColor(g2);\r\n g2.drawPolygon(xCord, yCord, xCord.length);\r\n g2.fillPolygon(xCord, yCord, xCord.length); \r\n } \r\n }", "public void draw() {\n drawBox();\n if (root == null) {\n return;\n }\n\n draw(root, ORIENTATION_VERTICAL);\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"Square drawn\");\n\t}", "void draw (Graphics2D g);", "public void draw() {\n background(0); // Color de Fondo - Negro\n // Se mencionan cada una de las funciones a utilizar en la class.\n a.movbolitas1(); // a.funcion es para las funciones principales.\n a.bolita2();\n a.movbolitas();\n a.bolita1();\n a.triangulo();\n a.triangulo1();\n c.movbolitas(); // c.funcion y m.funci\\u00f3n es para las mismas\n // funciones anteriores que se repetir\\u00e1n\n c.bolita1();\n c.movbolitas();\n c.bolita2();\n m.movbolitas();\n m.bolita1();\n m.movbolitas1();\n m.bolita2();\n a.circulos();\n}", "private void paintHand3(Graphics2D gfx)\r\n {\n \r\n }", "public static void main(String[] args) {\n double[] xCoordinates = new double[] {0.0, 0.5, 1.0};\n double[] yCoordinates = new double[] {0.0, Math.sqrt(3)/2, 0.0};\n int n = Integer.parseInt(args[0]);\n double length = 1.0;\n StdDraw.polygon(xCoordinates, yCoordinates);\n // this will create the outlined triangle\n // now we must call the sierpinksi triangle to actually fill it so \n // we use \n sierpinski(n, 0.5, 0, length/2);\n // the x coordinates will be at the midpoint of the base therefore x is x/2 and y remains zero. \n //length will also change because you are beginning the function from the middle of the triangle's base\n\t// WRITE YOUR CODE HERE \n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n Graphics2D g2 = (Graphics2D) g;\n g2.scale(2, 2);\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setColor(Color.WHITE);\n\n Application.grid.draw(g2);\n ui.draw(g2);\n }", "public void strength1(float x, float y){\n noStroke();\n fill(80);\n rect(x+7,y,66,6);\n bezier(x+7,y,x,y+1,x,y+5,x+7,y+6);\n bezier(x+73,y,x+80,y+1,x+80,y+5,x+73,y+6);\n rect(x+7,y+1,13,3);//1st blue ba\n bezier(x+7,y+1,x+1,y+2.5f,x+1,y+3.5f,x+7,y+4);\n}", "public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n Graphics2D g2d = (Graphics2D) g;\n drawAxis(g2d);\n \n drawCurve(g2d);\n \n drawPoints(g2d);\n \n // drawObject(g2d); **\n // El panel, por defecto no es \"focusable\". \n // Hay que incluir estas líneas para que el panel pueda\n // agregarse como KeyListsener.\n this.setFocusable(true);\n this.requestFocusInWindow();\n }", "public void paint( Graphics g ){\n g.drawOval(-4, -4, 8, 8);\n g.drawLine(-2, 2, 2,-2);\n g.drawLine(-2,-2, 2, 2);\n }", "public static void drawRectangle(int x, int y,int width, int height){\n for (int i = 0; i < y; i++) {\n System.out.println();\n }\n for (int i = 1; i < width; i++) {\n System.out.print(\"*\");\n }\n System.out.println(\"*\");\n for (int i = 0; i < height; i++) {\n System.out.print(\"*\");\n for (int j = 2; j < width; j++) {\n System.out.print(\" \");\n }\n System.out.println(\"*\");\n }\n for (int i = 0; i < width; i++) {\n System.out.print(\"*\");\n }\n\n }", "public static void mainDraw(Graphics graphics) {\n int x1 = 50;\r\n int x2 = 180;\r\n int y1 = 180;\r\n int y2 = 50;\r\n Color[] colors = {Color.blue, Color.cyan, Color.green, Color.magenta};\r\n graphics.setColor(colors[1]);\r\n graphics.drawLine(x1, y2, x2, y2);\r\n graphics.setColor(colors[2]);\r\n graphics.drawLine(x2, y2, x2, y1);\r\n graphics.setColor(colors[3]);\r\n graphics.drawLine(x2, y1, x1, y1);\r\n graphics.setColor(colors[0]);\r\n graphics.drawLine(x1, y1, x1, y2);\r\n }", "public void drawLine(double x0, double y0, double x1, double y1, int red, int green, int blue){\n\t\tif( x0 > x1 ) {\n\t\t\tdouble xt = x0 ; x0 = x1 ; x1 = xt ;\n\t\t\tdouble yt = y0 ; y0 = y1 ; y1 = yt ;\n\t\t}\n\t\t\n\t\tdouble a = y1-y0;\n\t\tdouble b = -(x1-x0);\n\t\tdouble c = x1*y0 - x0*y1;\n\n\t\t\tif(y0<y1){ // Octant 1 or 2\n\t\t\t\tif( (y1-y0) <= (x1-x0) ) { //Octant 1\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Calculate initial x and initial y\n\t\t\t\t\tint x = (int)Math.round(x0);\n\t\t\t\t\tint y = (int)Math.round((-a*x-c)/b);\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+1) + b*(y+0.5) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go E or SE\n\t\t\t\t\twhile(x<=Math.round(x1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d<0){\n\t\t\t\t\t\t\td = d+a;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a+b;\n\t\t\t\t\t\t\ty = y+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else { // Octant 2\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Calculate initial x and initial y\n\t\t\t\t\tint y = (int)Math.round(y0);\n\t\t\t\t\tint x = (int)Math.round((-b*y-c)/a);\n\t\t\t\n\t\t\t\t\tdouble d = a*(x+0.5) + b*(y+1) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go SE or S\t\t\t\t\t\n\t\t\t\t\twhile(y<=Math.round(y1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d>0){\n\t\t\t\t\t\t\td = d+b; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a+b;\n\t\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty = y+1;\n\t\t\t\t\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} else { // Octant 7 or 8\n\t\t\t\tif( (y0-y1) <= (x1-x0) ) { // Octant 8\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tint x = (int)Math.round(x0);\n\t\t\t\t\tint y = (int)Math.round((-a*x-c)/b);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+1) + b*(y-0.5) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go E or NE\t\t\t\t\t\n\t\t\t\t\twhile(x<=Math.round(x1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d>0){ \n\t\t\t\t\t\t\td = d+a;\n\t\t\t\t\t\t} else { \n\t\t\t\t\t\t\td = d+a-b;\n\t\t\t\t\t\t\ty = y-1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else { //Octant 7\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tint y = (int)Math.round(y0);\n\t\t\t\t\tint x = (int)Math.round((-b*y-c)/a);\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+0.5) + b*(y-1) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go NE or N\n\t\t\t\t\twhile(y>=Math.round(y1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d<0){\n\t\t\t\t\t\t\td = d-b; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a-b;\n\t\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty = y-1;\n\t\t\t\t\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}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}" ]
[ "0.6609521", "0.66057616", "0.63492584", "0.6316947", "0.62914646", "0.6225562", "0.61977065", "0.61598873", "0.6148164", "0.6100577", "0.6094347", "0.6071875", "0.60107535", "0.59378374", "0.5936223", "0.59314215", "0.592351", "0.591935", "0.59092766", "0.59086925", "0.5906159", "0.5898218", "0.58820325", "0.58663636", "0.5862555", "0.58462214", "0.5832615", "0.58292675", "0.5804623", "0.5803601", "0.58031654", "0.5802629", "0.5802629", "0.5802629", "0.58003163", "0.57773167", "0.5759955", "0.5756803", "0.57557034", "0.57437587", "0.57437587", "0.57437587", "0.57437587", "0.57317257", "0.5724224", "0.5719753", "0.5705295", "0.5705215", "0.569727", "0.56896544", "0.5685398", "0.56853896", "0.5684855", "0.5678824", "0.5665613", "0.5661902", "0.56610394", "0.5658763", "0.5642855", "0.56427234", "0.56410164", "0.56386703", "0.5632844", "0.56231844", "0.5616326", "0.56139904", "0.5612839", "0.56104827", "0.5609581", "0.5594493", "0.5583635", "0.55824786", "0.5567652", "0.5561471", "0.5551422", "0.555091", "0.55439496", "0.5539865", "0.5530838", "0.552628", "0.5526071", "0.55259645", "0.5525583", "0.5518653", "0.5516969", "0.55166745", "0.55147237", "0.55102605", "0.55052304", "0.5503116", "0.54921013", "0.54861474", "0.54861474", "0.5482337", "0.5479166", "0.54789984", "0.54750824", "0.54687476", "0.54665583", "0.5464416" ]
0.6325599
3
draw the UK plane
public void uk(){ stroke(1); //back guns fill(0); rect(73,192,4,15); rect(224,192,4,15); rect(71,207,8,15); rect(222,207,8,15); rect(66,207,3,15); rect(232,207,3,17); rect(122,109,4,15); rect(175,110,4,15); rect(121,120,6,15); rect(174,120,6,15); rect(116,124,3,15); rect(182,124,3,15); //wings--england fill(1,0,74);//dark blue beginShape(); vertex(14,286); vertex(61,236); vertex(88,308); vertex(51,334); vertex(14,313); endShape(CLOSE); beginShape(); vertex(286,287); vertex(286,312); vertex(247,335); vertex(212,309); vertex(238,238); endShape(CLOSE); noStroke(); fill(255); rect(15,286,74,20); rect(212,284,74,20); rect(48,248,20,74); rect(233,248,20,74); quad(26,272,35,260,83,312,72,320); quad(262,260,272,272,229,312,220,318); quad(25,318,38,328,85,278,75,263); quad(264,324,280,316,228,262,214,274); fill(207,20,43); rect(51,248,15,74); rect(235,247,15,74); rect(15,289,74,15); rect(211,286,74,15); stroke(1); fill(0);//white beginShape(); vertex(38,307); vertex(74,307); vertex(80,314); vertex(81,337); vertex(68,345); vertex(38,327); endShape(CLOSE); beginShape(); vertex(219,316); vertex(226,308); vertex(262,308); vertex(262,326); vertex(231,345); vertex(219,336); endShape(CLOSE); fill(0,36,125);//red beginShape(); vertex(96,191); vertex(61,230); vertex(60,269); vertex(96,312); vertex(101,300); vertex(100,247); vertex(112,232); vertex(132,232); vertex(131,186); endShape(CLOSE); beginShape(); vertex(204,191); vertex(240,230); vertex(240,270); vertex(205,312); vertex(200,302); vertex(200,248); vertex(193,238); vertex(185,231); vertex(170,230); vertex(170,186); endShape(CLOSE); //gray fill(200); beginShape(); vertex(70,217); vertex(74,220); vertex(81,210); vertex(85,213); vertex(75,227); vertex(72,229); vertex(71,231); vertex(73,233); vertex(73,268); vertex(71,272); vertex(76,277); vertex(82,274); vertex(89,283); vertex(90,297); vertex(66,272); vertex(65,235); vertex(68,229); vertex(62,228); endShape(CLOSE); beginShape(); vertex(228,217); vertex(225,218); vertex(218,211); vertex(215,213); vertex(223,227); vertex(226,226); vertex(230,230); vertex(227,233); vertex(228,270); vertex(229,272); vertex(223,276); vertex(218,276); vertex(210,283); vertex(211,296); vertex(235,273); vertex(234,233); vertex(232,228); vertex(237,227); endShape(CLOSE); //guns //white fill(200); beginShape(); vertex(121,301); vertex(98,313); vertex(102,336); vertex(119,342); vertex(139,336); vertex(141,313); endShape(CLOSE);//l beginShape(); vertex(159,312); vertex(162,336); vertex(180,342); vertex(200,336); vertex(202,313); vertex(180,302); endShape(CLOSE); //black fill(0); rect(105,315,30,30); rect(166,315,30,30); quad(105,344,109,355,131,355,135,344); quad(166,344,170,355,192,355,196,344); fill(207,20,43); rect(103,253,33,62);//l rect(164,252,33,62);//r fill(200); bezier(103,252,107,230,132,230,136,252);//l bezier(164,252,169,230,192,230,197,252);//r rect(103,280,33,25);//l rect(164,280,33,25);//r fill(0,36,125); rect(104,319,33,26,3);//l rect(165,319,33,26,3);//r fill(200); rect(115,310,7,28,8);//l rect(178,310,7,28,8);//r fill(0,0,67); rect(105,284,10,15); rect(124,284,10,15); rect(167,285,10,15); rect(185,284,10,15); //body-wings fill(0,0,67);//blue bezier(107,154,101,162,98,169,98,187); bezier(191,153,199,164,202,172,203,187); quad(107,154,98,186,98,223,107,224); quad(191,153,203,186,202,223,192,223); fill(0,36,125);//red quad(134,112,108,147,107,239,132,230); quad(165,112,192,147,193,239,168,230); //black fill(0); quad(130,122,130,142,111,164,111,147); quad(169,122,188,147,188,165,169,144); //white fill(200); beginShape(); vertex(131,154); vertex(129,202); vertex(118,202); vertex(112,181); vertex(110,179); vertex(110,171); endShape(CLOSE); beginShape(); vertex(170,154); vertex(190,172); vertex(190,182); vertex(188,181); vertex(182,201); vertex(172,201); endShape(CLOSE); fill(0,36,125); quad(134,193,166,193,154,342,146,342); fill(192,0,11); quad(142,180,159,180,152,352,148,352); //white fill(200); ellipse(150,374,6,50); //head fill(1,1,75); ellipse(149.5f,72,33,25); ellipse(149.5f,94,30,170); fill(0); ellipse(149.5f,94,20,160); fill(154,155,84); ellipse(149.5f,94,17,77); strokeWeight(2); line(143,74,158,74); line(142,104,158,104); strokeWeight(1); fill(200); bezier(143,15,147,2,153,2,155.5f,15); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void draw_plane(Graphics g, int log_num, int i);", "void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}", "void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}", "@Override\n public void draw() {\n /** preparacion de la ventana **/\n background(255);\n lights();\n directionalLight(40, 90, 100, 1, 40, 40);\n\n translate(origin.x,origin.y);\n scale(zoom);\n\n\n /** entrada del usuario **/\n userInput();\n /** ejes X Y Z **/\n drawAxes();\n /** aplicar ik **/\n writePos();\n\n /** escala de los objetos**/\n scale(-1.2f);\n\n /** esfera que muestra la posicion en coord X Y Z\n *\n * X -> coord[0]\n * Y -> coord[1]\n * Z -> coord[2]\n *\n * **/\n pushMatrix();\n noStroke();\n fill(250, 100, 1);\n translate(-coord_cartesian[1] ,-coord_cartesian[2] -11,-coord_cartesian[0] );\n sphere(2);\n popMatrix();\n\n\n /**\n * Dibuja el brazo\n */\n pushMatrix();\n arm.drawArm();\n popMatrix();\n }", "public void draw() {\n \n // TODO\n }", "private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }", "void draw();", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "public void draw() {\r\n\t\t// Draw the triangle making up the mountain\r\n\t\tTriangle mountain = new Triangle(this.x, 100,\r\n\t\t\t\tthis.x + mountainSize / 2, 100, this.x + mountainSize / 4,\r\n\t\t\t\t100 - this.y / 4, Color.DARK_GRAY, true);\r\n\t\t// Draw the triangle making up the snow cap\r\n\t\tthis.snow = new Triangle(side1, bottom - this.y / 8, side2, bottom\r\n\t\t\t\t- this.y / 8, this.x + mountainSize / 4, 100 - this.y / 4,\r\n\t\t\t\tColor.WHITE, true);\r\n\t\tthis.window.add(mountain);\r\n\t\tthis.window.add(snow);\r\n\t}", "public void draw();", "public void draw();", "public void draw();", "public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}", "public void mark_plane(Graphics g, int log_num, int x, int y, int h);", "public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}", "public void draw() {\n \n }", "public void draw() {\r\n /* DO NOT MODIFY */\r\n StdDraw.point(x, y);\r\n }", "private static void draw() {\n\t\tinitField();\n\t\tview = new View(field);\n\t\tview.setSize(viewWidth, viewHeight);\n\t\tframe = new JFrame();\n\t\tframe.setSize(fwidth, fheight);\n\t\tframe.setTitle(\"Land Mine\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.add(view);\n\t\tframe.setVisible(true);\n\t}", "public void russia(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(165,0,0);//gray\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(0);//black\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(18,39,148);//blue\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //red\n fill(194,24,11);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n fill(194,24,11);\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n\n fill(194,24,11);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(160,0,0);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void drawControlPolygon() {\n\t\t//this.frame.stroke(255, 0, 0);\n\t\tfor(int i=0;i<points.length;i++) {\n\t\t\tfor(int j=0;j<points[i].length;j++)\n\t\t\t\tthis.frame.drawVertex(points[i][j]);\n\t\t}\n\t}", "public void draw() \n{\n background(250, 243, 225);\n timer(); //control timing of the program\n mapwd.draw(); //visualize weekday trajectory\n shadeTra(t1); \n mapwk.draw(); //visualize weekend trajectory\n shadeTra(t2); \n transport(); //draw the transport legend\n infoDisplay(); //display almost text information\n \n\n stroke(0);\n \n gweekend();\n gweekday();\n frame();\n graduation();\n piechart();\n \n stroke(0);\n arrow();\n \n saveFrame(\"Output1/traffic_######.tif\");\n}", "public void draw() {\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制三角形\");\t\n\t}", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "public void drawUserPlane(Graphics g) {\r\n\t\tlevelManager.drawUserPlane(g);\r\n\t}", "private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }", "public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}", "public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}", "public void draw(){\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制矩形\");\n\t\t\n\t}", "public void draw() {\n\n }", "protected abstract void draw();", "public void draw()\r\n {\r\n\tfinal GraphicsLibrary g = GraphicsLibrary.getInstance();\r\n\t_level.draw(g);\r\n\t_printText.draw(\"x\" + Mario.getTotalCoins(), 30, _height - 36, false);\r\n\t_printText.draw(\"C 000\", _width - 120, _height - 36, false);\r\n\t_printText.draw(Mario.getLives() + \"UP\", 240, _height - 36, false);\r\n\t_printText.draw(Mario.getPoints() + \"\", 400, _height - 36, false);\r\n\t_coin.draw();\r\n\t_1UP.draw();\r\n }", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "private void draw() {\n gsm.draw(g);\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"You are drawing a RECTANGLE\");\n\t}", "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 draw(Graphics2D g2) {\r\n\tif (!bustedWall) {\r\n\t\tg2.setColor(new Color(0, 0, 0)); \r\n\t\tSystem.out.println(\"black\"); // for testing purposes\r\n\t}else {\r\n\t\tg2.setColor(new Color(255,255,255)); \r\n\t\tSystem.out.println(\"white\"); // for testing purposes\r\n\t}\r\n\tg2.drawLine(x1, y1, x2, y2); \r\n\t// print the untranslated coordinates for testing purposes\r\n\tSystem.out.println(String.format(\"%d,%d,%d,%d\",x1 - TRANSLATION ,y1 - TRANSLATION,x2 - TRANSLATION,y2 - TRANSLATION));\r\n}", "@Override\r\n\tpublic void draw() {\n\t\tPoint p = this.getP();\r\n\t\tint start_point = p.getX();\r\n\t\tint end_point = p.getY();\r\n\t\t\r\n\t\tint width = this.getWidth();\r\n\t\tint height = this.getHeight();\r\n\t\t\r\n\t\tSystem.out.println(\"�l�p�`��`�� �_(\" + start_point +\",\"+ end_point + \")����Ƃ��āA��\"+ width +\"����\"+ height +\"�̎l�p�`\");\r\n\t}", "private void draw(Graphics2D g)\r\n\t{\t\t\r\n\t\tColor[] cols = new Color[] {Color.red,Color.green,Color.blue};\r\n\t\t\r\n\t\t// clear the background\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,0,640,510);\r\n\t\t\r\n\t\tg.translate(0,30);\t\r\n\r\n\t\tif (zp < 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t} \r\n\r\n\t\tColor[] colMap = new Color[16];\r\n\t\tcolMap[3] = Color.white;\r\n\t\tcolMap[12] = cols[(timers[0] / 100) % 3];\r\n\t\tcolMap[13] = Color.black;\r\n\t\tcolMap[14] = Color.gray;\r\n\t\tcolMap[15] = Color.yellow;\r\n\t\t\r\n\t\tfor (int x=0;x<30;x++) {\r\n\t\t\tfor (int y=0;y<30;y++) {\r\n\t\t\t\tint tile = getTile(x,y);\r\n\t\t\t\tif (tile != 0) {\r\n\t\t\t\t\tPolygon p = new Polygon();\r\n\r\n\t\t\t\t\tint total = addPoint(x,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y+1,p);\r\n\t\t\t\t\ttotal += addPoint(x,y+1,p);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (total == 4) {\r\n\t\t\t\t\t\tif ((tile == 11) && (!controls[19])) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ((tile == 13) && (toggles > 0)) {\r\n\t\t\t\t\t\t\ttile = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tColor col = cols[l % 3];\r\n\t\t\t\t\t\tif ((x+y) % 2 == 0) {\r\n\t\t\t\t\t\t\tcol = cols[l % 3].darker();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (colMap[tile] != null) {\r\n\t\t\t\t\t\t\tcol = colMap[tile];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (tile > 10) {\r\n\t\t\t\t\t\t\tg.setColor(Color.darkGray);\r\n\t\t\t\t\t\t\tif (tile == 11) {\r\n\t\t\t\t\t\t\t\tg.setColor(col.darker());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPolygon p2 = new Polygon();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.1,p2);\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.1,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.9,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.9,p2);\r\n\t\r\n\t\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\t\tg.fillPolygon(p2);\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}\r\n\t\t}\r\n\r\n\t\tif (zp >= 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t}\r\n\t\t\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,-20,640,45);\r\n\t\tg.setColor(Color.darkGray);\r\n\t\tg.drawLine(0,25,640,25);\r\n\t\tg.setFont(g.getFont().deriveFont(Font.BOLD, 20.0f));\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.green,0,0,Color.white));\r\n\t\t\r\n\t\tg.drawString(\"Time: \"+(timers[0]/1000),530,20);\r\n\t\tg.drawString(\"Ball\",20,20);\r\n\t\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.yellow,0,0,Color.white));\r\n\t\tg.drawString(msg,(640-g.getFontMetrics().stringWidth(msg))/2,20);\r\n\t\t\r\n\t\tif (!started) {\r\n\t\t\tang += 0.01f;\r\n\t\t\tg.drawString(\"Cursors - Move PgUp/PgDown - View Space - Jump\",60,470);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public abstract void draw( );", "@Override\n\tpublic void draw(Graphics2D g) {\n\n\t\t\n\t\tg.setColor(new Color(36, 36, 36));\n\t\tg.fillRect(0, 0, Driver.screenWidth, Driver.screenHeight);\n\n\t\tg.setColor(new Color(87, 87, 87));\n\t\tSceneManager.sm.currSector.drawBasicGrid(g, 1000000, (int) (100 * (1 / Math.sqrt((Camera.scale)))), 2);\n\n\t\tif (target != null) {\n\t\t\tg.setPaint(new Color(255, 0, 0, 200));\n\t\t\tg.setStroke(new BasicStroke((int) (3 * Camera.scale)));\n\t\t\tCamera.toScreen(target.cm).drawCircle(g, (int) (150 * Camera.scale));\n\t\t}\n\n\t\tSceneManager.sm.currSector.draw(g);\n\n\t\tg.setColor(Color.BLACK);\n\n\t\tg.drawImage(ui, 0, 0, 1920, 1010, null);\n\n\t\t// draw player scrap amt\n\t\tg.setFont(Misc.arialBig);\n\t\tg.setColor(Color.white);\n\t\tg.drawString(\"\" + Driver.playerScrap, 1733, 72);\n\n\t\t// draw speed\n\t\tg.setColor(new Color(0, 119, 166));\n\t\tg.fillRect(1872, (int) (113 + 564 - 564\n\t\t\t\t* ((p.vel.getMagnitude() * 20) / (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag)))), 33,\n\t\t\t\t(int) (564 * ((p.vel.getMagnitude() * 20)\n\t\t\t\t\t\t/ (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag)))));\n\t\tg.setFont(Misc.font);\n\t\tg.setColor(Color.LIGHT_GRAY);\n\t\tg.drawString((int) (p.vel.getMagnitude() * 20) + \" mph\", 1760, 564 - (int) (564\n\t\t\t\t* ((p.vel.getMagnitude() * 20) / (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag))))\n\t\t\t\t+ 120);\n\n\t\t// show selected ship\n\t\tif (selected != null && !selected.destroyed) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tCamera.toScreen(selected.cm).drawCircle(g, (int) (150 * Camera.scale));\n\t\t}\n\n\t\tfor (Ship s : SceneManager.sm.currSector.ships) {\n\t\t\tfor (Part p : s.parts) {\n\t\t\t\tif (p.health < p.baseHealth && Camera.scale > .5) {\n\t\t\t\t\tg.rotate(s.rotation, Camera.toXScreen(s.cm.x), Camera.toYScreen(s.cm.y));\n\t\t\t\t\tdrawPartHealth(g, p,\n\t\t\t\t\t\t\tCamera.toScreen(new Point(s.pos.x + p.pos.x * Part.SQUARE_WIDTH,\n\t\t\t\t\t\t\t\t\ts.pos.y + p.pos.y * Part.SQUARE_WIDTH)),\n\t\t\t\t\t\t\t(int) (40 * Camera.scale), (int) (15 * Camera.scale), p.health, p.baseHealth);\n\t\t\t\t\tg.rotate(-s.rotation, Camera.toXScreen(s.cm.x), Camera.toYScreen(s.cm.y));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (partTarget != null) {\n\t\t\tg.rotate(target.rotation, Camera.toXScreen(target.cm.x), Camera.toYScreen(target.cm.y));\n\t\t\tg.setColor(Color.red);\n\t\t\toutlinePart(g,\n\t\t\t\t\tCamera.toScreen(new Point(target.pos.x + partTarget.pos.x * Part.SQUARE_WIDTH,\n\t\t\t\t\t\t\ttarget.pos.y + partTarget.pos.y * Part.SQUARE_WIDTH)),\n\t\t\t\t\t(int) (partTarget.width * Part.SQUARE_WIDTH * Camera.scale),\n\t\t\t\t\t(int) (partTarget.height * Part.SQUARE_WIDTH * Camera.scale));\n\t\t\tg.rotate(-target.rotation, Camera.toXScreen(target.cm.x), Camera.toYScreen(target.cm.y));\n\t\t}\n\n\t\t// shipYard.draw(g);\n\t\t// starMap.draw(g);\n\n\t\tif (target != null) {\n\t\t\tPoint avg = Camera.toScreen(target.cm.avg(p.cm));\n\t\t\tPoint mapAvg = target.cm.avg(p.cm);\n\t\t\teyeLoc.setXY(mapAvg.x, mapAvg.y);\n\t\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, eyeFocused ? .1f : .3f));\n\t\t\tg.drawImage(eye, (int)(avg.x - eye.getWidth() * Camera.scale / 2), (int)(avg.y - eye.getHeight() * Camera.scale / 2),\n\t\t\t\t\t(int)(eye.getWidth() * Camera.scale), (int)(eye.getHeight() * Camera.scale), null);\n\t\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f));\n\t\t\t\n\t\t}\n\n\t\tminimap.mc.focus(Camera.toMap(Driver.screenWidth / 2, Driver.screenHeight / 2));\n\t\tminimap.draw(g, SceneManager.sm.currSector.ships);\n\n\t\tif (!running) {\n\t\t\tg.setPaint(new Color(0, 0, 0, 128));\n\t\t\tg.fillRect(0, 0, Driver.screenWidth, Driver.screenHeight);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.setFont(Misc.arialSmall);\n\t\t\tg.drawString(\"Paused - [p] to resume\", 900, 50);\n\t\t\tg.setColor(Color.cyan);\n\t\t\tg.drawString(\n\t\t\t\t\t\"Protect your reactor, destroy enemies to collect scrap, build up your ship, and make your way to the end of the galaxy!\",\n\t\t\t\t\tDriver.screenWidth / 2 - 920, Driver.screenHeight / 2 - 400);\n\t\t\tg.setColor(Color.WHITE);\n\t\t\tg.drawString(\"CONTROL BASICS:\", Driver.screenWidth / 2 - 940, Driver.screenHeight / 2 - 350);\n\t\t\t\n\t\t\tg.drawString(\"MOVEMENT: Rotation = Q and E, Translation = WASD\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 300);\n\t\t\tg.drawString(\"COMBAT: Right Click on enemy = set as a target: lasers will shoot target when in range\",\n\t\t\t\t\tDriver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 250);\n\t\t\tg.drawString(\"CAMERA: Middle Mouse Click on ship = set the camera to that ship\",\n\t\t\t\t\tDriver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 200);\n\t\t\tg.drawString(\"Scroll Wheel = zoom\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 150);\n\t\t\tg.drawString(\"Arrow Keys = pan\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 100);\n\t\t\t\n\t\t\tg.drawString(\"GAMEPLAY + STRATEGY:\", Driver.screenWidth / 2 - 930, Driver.screenHeight / 2 - 0);\n\t\t\tg.setColor(new Color(217, 52, 52));\n\t\t\tg.drawString(\"If you just started, your ship is weak! Upgrade it before entering combat!\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -50);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.drawString(\"Cannot jump to the next sector if current sector is not clear\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -100);\n\t\t\tg.drawString(\"Enemies will attack you when in range & can't edit ship if in enemy range\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -150);\n\t\t\t\n\t\t\t\n\t\t\t//advanced\n\t\t\tg.drawString(\"ADVANCED:\", Driver.screenWidth / 2 - 930, Driver.screenHeight / 2 - -200);\n\t\t\tg.drawImage(eye, Driver.screenWidth / 2 - 340, Driver.screenHeight / 2 + 225, eye.getWidth()/4, eye.getHeight()/4, null);\n\t\t\tg.drawString(\"Middle Click the icon: set the camera to focus on the center of battle\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -250);\n\t\t\tg.drawString(\"Spacebar = recenter camera on player\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -300);\n\t\t}\n\n\t}", "public void draw(Graphics2D g2)\n {\n Rectangle2D.Double land= new Rectangle2D.Double(xleft, ybottom, 10000, 100);\n Color mycolor= new Color(255, 222, 156);\n g2.setColor(mycolor);\n g2.draw(land);\n g2.fill(land);\n g2.draw(land);\n \n }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "public void draw(){\n textAlign(CENTER);\n route.update(pp, qq);\n SoundSys();\n fill(0xff31F0FF, 127);\n noStroke();\n ellipse(mouseX, mouseY, 30, 30);\n}", "@Override\r\n public void draw() {\n }", "void drawAt(DrawSurface d, Rectangle rect);", "public void draw(Graphics g){\n\n g.setColor(Color.red);\n g.drawLine(x1,y1,x2,y2);\n g.drawLine(x2,y2,x3,y3);\n g.drawLine(x3,y3,x1,y1);\n g.setFont(new Font(\"Courier\", Font.BOLD, 12));\n DecimalFormat fmt = new DecimalFormat(\"0.##\"); \n g.setColor(Color.blue);\n g.drawString(fmt.format(perimeter()) + \" \" + name,x1+2 , y1 -2);\n \n }", "public void draw() {\r\n\t\tbackground(255); // Clear the screen with a white background\r\n\r\n\t\ttextSize(12);\r\n\t\tfill(0);\r\n\r\n\t\tstroke(0);\r\n\t\tcurve.draw(this);\r\n\t}", "public void draw()\n\t{\t\t\n\t\tArrayList<Segment> seg = new ArrayList<Segment>();\n\t\tfor(int i = 0; i < hullVertices.length - 1; i++)\n\t\t{\n\t\t\tSegment s = new Segment(hullVertices[i], hullVertices[i+1]);\n\t\t\tseg.add(s);\n\t\t}\n\t\tSegment s1 = new Segment(hullVertices[hullVertices.length-1], hullVertices[0]);\n\t\tseg.add(s1);\n\t\t// Based on Section 4.1, generate the line segments to draw for display of the convex hull.\n\t\t// Assign their number to numSegs, and store them in segments[] in the order.\n\t\tSegment[] segments = new Segment[seg.size()];\n\t\tfor(int i = 0; i < seg.size(); i++)\n\t\t{\n\t\t\tsegments[i] = seg.get(i);\n\t\t}\n\t\t// The following statement creates a window to display the convex hull.\n\t\tPlot.myFrame(pointsNoDuplicate, segments, getClass().getName());\n\t}", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}", "public void draw()\n {\n myPencil.up();\n myPencil.backward(100);\n myPencil.down();\n myPencil.turnRight(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(400);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n // Roof\n myPencil.up();\n myPencil.move(0,200);\n myPencil.down();\n myPencil.setDirection(333.435);\n myPencil.forward(223.607);\n myPencil.setColor(new Color(2, 0, 0));\n myPencil.up();\n myPencil.move(0,200);\n myPencil.setDirection(206.565);\n myPencil.down();\n myPencil.forward(223.607);\n // Windows\n myPencil.up();\n myPencil.move(-150,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.turnLeft(90);\n myPencil.forward(50);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(60);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(50,-100);\n myPencil.setDirection(120);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(-150,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n // House Sidewalk\n myPencil.up();\n myPencil.move(-250,-112.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(250,-112.5);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(90);\n myPencil.forward(193);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(90);\n myPencil.up();\n myPencil.move(-75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n // Chimney\n myPencil.up();\n myPencil.move(125,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(52);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(40);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(25);\n // Door window\n myPencil.up();\n myPencil.move(0,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(8);\n myPencil.up();\n myPencil.move(-8,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(16);\n myPencil.up();\n myPencil.move(0,-17);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(16);\n // Door knob\n myPencil.up();\n myPencil.move(14,-55);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(2);\n }", "public void draw() {\t\t\n\t\ttexture.draw(x, y);\n\t\tstructure.getTexture().draw(x,y);\n\t}", "private void drawFlights(){\n if(counter%180 == 0){ //To not execute the SQL request every frame.\n internCounter = 0;\n origins.clear();\n destinations.clear();\n internCounter = 0 ;\n ArrayList<String> answer = GameScreen.database.readDatas(\"SELECT Origin, Destination FROM Flights\");\n for(String s : answer){\n internCounter++;\n String[] parts = s.split(\" \");\n String xyOrigin, xyDestination;\n try{\n xyOrigin = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE SystemName = '\"+parts[0]+\"' ;\").get(0);\n } catch (IndexOutOfBoundsException e){\n String systemId = GameScreen.database.getOneData(\"SELECT SystemId FROM Planet WHERE PlanetName = '\"+parts[0]+\"' ;\");\n xyOrigin = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE id = '\"+systemId+\"' ;\").get(0);\n }\n origins.add(new Vector2(Float.parseFloat(xyOrigin.split(\" \")[0]), Float.parseFloat(xyOrigin.split(\" \")[1])));\n\n try{\n xyDestination = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE SystemName = '\"+parts[1]+\"' ;\").get(0);\n }catch (IndexOutOfBoundsException e){\n String systemId = GameScreen.database.getOneData(\"SELECT SystemId FROM Planet WHERE PlanetName = '\"+parts[1]+\"' ;\");\n xyDestination = GameScreen.database.readDatas(\"SELECT SystemX, SystemY FROM Systems WHERE id = '\"+systemId+\"' ;\").get(0);\n }\n destinations.add(new Vector2(Float.parseFloat(xyDestination.split(\" \")[0]), Float.parseFloat(xyDestination.split(\" \")[1])));\n }\n }\n renderer.begin();\n renderer.set(ShapeRenderer.ShapeType.Filled);\n renderer.setColor(Color.WHITE);\n renderer.circle(600, 380, 4);\n for(int i = 0; i<internCounter; i++){\n renderer.line(origins.get(i), destinations.get(i));\n renderer.setColor(Color.RED);\n renderer.circle(origins.get(i).x, origins.get(i).y, 3);\n renderer.setColor(Color.GREEN);\n renderer.circle(destinations.get(i).x, destinations.get(i).y, 3);\n }\n renderer.end();\n }", "public void draw(){\n\t\t/* Stamps a copy of the planet at the position. the file of the planet image is under folder of \"images\".\n\t\t * a mistake easily to be ignored here..*/\n\t\tString imageToDraw = \"images/\" + imgFileName;\n\t\tStdDraw.picture(xxPos, yyPos, imageToDraw);\n\n\t}", "public void usa(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(192,0,11);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,0,67);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n //green\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n //green\n fill(192,0,11);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n }", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}", "private void draw (String printable, StringBuffer canvas) {\r\n \t\t\tcanvas.append(\"| \");\r\n \t\t\t\r\n \t\t\tcanvas.append(printable);\r\n \t\t\tfor (int i=printable.length(); i<width-4; i++) //Fill in the spaces.\r\n \t\t\t{\r\n \t\t\t\tcanvas.append(' ');\r\n \t\t\t}\r\n \t\t\tcanvas.append(\" |\\n\");\r\n \t\t}", "abstract void draw();", "abstract void draw();", "public void draw() {\n background(0); // Color de Fondo - Negro\n // Se mencionan cada una de las funciones a utilizar en la class.\n a.movbolitas1(); // a.funcion es para las funciones principales.\n a.bolita2();\n a.movbolitas();\n a.bolita1();\n a.triangulo();\n a.triangulo1();\n c.movbolitas(); // c.funcion y m.funci\\u00f3n es para las mismas\n // funciones anteriores que se repetir\\u00e1n\n c.bolita1();\n c.movbolitas();\n c.bolita2();\n m.movbolitas();\n m.bolita1();\n m.movbolitas1();\n m.bolita2();\n a.circulos();\n}", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "@Override\n\tpublic void draw() {\n\t}", "public static void mainDraw(Graphics graphics) {\n Color[] colors = {Color.green, Color.blue, Color.red, Color.cyan};\n int rectangles[] = {50, 100, 150, 200};\n for (int k = 0; k < 4; k++) {\n toCenter(graphics, rectangles[k], colors[k]);\n }\n }", "protected void drawImpl()\n {\n if (mode == 2) {\n // Invader\n background(0);\n noStroke();\n int triangleXDensity = 32;\n int triangleYDensity = 18;\n for (int i = 0; i < triangleXDensity + 100; i++) {\n for (int j = 0; j < triangleYDensity + 100; j++) {\n float value = scaledBandLevels[(i % scaledBandLevels.length)];\n float shapeSize = map(value, 0, 255, 0, 150);\n int currentX = (width/triangleXDensity) * i;\n int currentY = (int)(((height/triangleYDensity) * j));\n\n if (subMode == 1) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 3));\n }\n else if (subMode == 3) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 6));\n }\n\n if (subMode == 4) {\n shapeSize = map(value, 0, 255, 0, 500);\n }\n\n if ((i + j) % (int)random(1,5) == 0) {\n fill(0, 255, 255);\n }\n else {\n fill(234,100,255);\n }\n pushMatrix();\n if (subMode == 2) {\n translate(width/2, height/2);\n rotate(radians(frameCount % value * 2));\n translate(-width/2, -height/2);\n }\n triangle(currentX, currentY - shapeSize/2, currentX - shapeSize/2, currentY + shapeSize/2, currentX + shapeSize/2, currentY + shapeSize/2);\n popMatrix();\n }\n }\n\n }\n else if (mode == 5) {\n // Mirror Ball\n background(0);\n translate(width/2, height/2, 500);\n noStroke();\n if (subMode == 0) {\n rotateY(frameCount * PI/800);\n }\n else if (subMode == 1 || subMode == 2) {\n rotateY(frameCount * PI/800);\n rotateX(frameCount * PI/100);\n }\n else if (subMode == 3) {\n rotateY(frameCount * PI/400);\n }\n\n for (int i = 0; i < 100; i++) {\n for (int j = 0; j < 100; j++) {\n rotateY((2*PI/200) * j);\n pushMatrix();\n rotateX((2*PI/200) * i);\n translate(0,200);\n if (j > 50 && j < 150) {\n rotateX(PI/2);\n }\n else {\n rotateX(-PI/2);\n }\n if (subMode == 2 || subMode == 3) {\n fill(i * 2, 0, j, scaledBandLevels[i % scaledBandLevels.length] * 2);\n }\n else {\n fill(255, scaledBandLevels[i % scaledBandLevels.length]);\n }\n rect(0,200,20,20);\n popMatrix();\n }\n }\n }\n else if (mode == 8) {\n // End To Begin\n background(0);\n\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i] && modSizes[i] < 60) {\n modSizes[i]+=2;\n }\n else if (modSizes[i] > 5) {\n modSizes[i]--;\n }\n }\n \n theta += .2;\n\n if (subMode >=3) {\n theta += .6;\n }\n\n float tempAngle = theta;\n for (int i = 0; i < yvalues.length; i++) {\n yvalues[i] = sin(tempAngle)*amplitude;\n tempAngle+=dx;\n }\n\n noStroke();\n if (subMode >= 4) {\n translate(0, height/2);\n }\n int currentFrameCount = frameCount;\n for (int x = 0; x < yvalues.length; x++) {\n if (subMode >= 4) {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length] * 3);\n rotateX(currentFrameCount * (PI/200));\n }\n else {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length]);\n }\n ellipse(x*xspacing - period/2, height/2+yvalues[x], modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n if (subMode >= 1) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n if (subMode >= 2) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n }\n }\n else if (mode == 1) {\n // Life Support\n background(0);\n noStroke();\n if (trigger) { \n if (subMode == 0) {\n fill(255, 0, 0, triggerHold - (triggerCount * 4));\n }\n else if (subMode == 1) {\n fill(255, triggerHold - (triggerCount * 4));\n }\n rect(0,0,width,height);\n if (triggerCount > triggerHold) {\n trigger = false;\n triggerCount = 1;\n }\n else {\n triggerCount++;\n }\n }\n }\n else if (mode == 6) {\n // Stacking Cards\n background(255);\n if (subMode >= 1) {\n translate(width/2, 0);\n rotateY(frameCount * PI/200);\n }\n imageMode(CENTER);\n\n if (subMode <= 1) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=40;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n else if (subMode == 2) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 4; j++) {\n rotateY(j * (PI/4));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 3) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 4) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int k = 0; k < height; k+= 300) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), k, modSizes[i], modSizes[i]);\n }\n }\n }\n }\n } \n else if (mode == 4) {\n background(0);\n noStroke();\n for (int i = 0; i < letterStrings.length; i++) { \n if (subMode == 0) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), (height/2) + 75);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, (height/2) + 75);\n }\n }\n else if (subMode == 1) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100; j < height + 100; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 2) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100 - (frameCount % 400); j < height + 600; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 3) {\n for (int j = -100; j < height + 100; j+=200) {\n if (random(0,1) < .5) {\n fill(0,250,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n else {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n }\n }\n else if (mode == 9) {\n background(0);\n noStroke();\n fill(234,100,255);\n String bandName = \"ELAPHANT\";\n text(bandName, (width/2) - (textWidth(bandName)/2), (height/2) + 75);\n }\n else {\n background(0);\n }\n }", "public void drawRoad(int player, int location, Graphics g){\n\t}", "public abstract void draw();", "public abstract void draw();", "public abstract void draw();", "public void draw() {\n //Grey background, which removes the tails of the moving elements\n background(0, 0, 0);\n //Running the update function in the environment class, updating the positions of stuff in environment\n //update function is a collection of the methods needing to be updated\n if(stateOfProgram == 0) { startTheProgram.update(); }\n if(stateOfProgram == 1) {\n theEnvironment.update();\n //update function is a collection of the methods needing to be updated\n //Running the update function in the Population class, updating the positions and states of the rabbits.\n entitiesOfRabbits.update();\n entitiesOfGrass.update();\n entitiesOfFoxes.update();\n\n entitiesOfRabbits.display();\n entitiesOfGrass.display();\n entitiesOfFoxes.display();\n openGraph.update();\n }\n }", "public void interface1(){\n noStroke();\n fill(10,100);//light gray\n rect(0,60,600,590);\n fill(220);//gray\n noStroke();\n beginShape();\n vertex(365,40);\n vertex(600,40);\n vertex(600,80);\n vertex(365,80);\n vertex(345,60);\n endShape(CLOSE);\n fill(19,70,100,100);//dark blue\n rect(0,110,600,215);\n rect(0,380,600,215);\n}", "private void DrawBraid(GL gl, float x, float y, float size,\n\t\t\tfloat r, float g, float b) {\n\n float reflected_x=0, reflected_y=0;\n float reflected_vector_angle=0, reflected_image_angle=0, reflected_rotate=0;\n\n // Degeneracy = do not want\n\t\tif (m_length == 0.0f || m_width == 0.0f) {\n\t\t\treturn;\n\t\t}\n\n\t\t////int mct = (int) (1 / this.GetPEngine().m_uniscale);\n\t\t////mct = (mct / 2) / 100 * 100;\n\n //Do the reflection\n if(m_x_reflection==0 && m_y_reflection==0)\n {\n reflected_x=x;\n reflected_y=y;\n reflected_image_angle=m_slope;\n reflected_vector_angle=m_slope;\n reflected_rotate= m_rotate;\n }\n else if(m_x_reflection==1 && m_y_reflection==0)\n {\n reflected_x=x;\n reflected_y=-y;\n reflected_image_angle=90-m_slope;\n reflected_vector_angle=-m_slope;\n reflected_rotate= -m_rotate;\n }\n else if(m_x_reflection==0 && m_y_reflection==1)\n {\n reflected_x=-x;\n reflected_y=y;\n reflected_image_angle=-90-m_slope;\n reflected_vector_angle=180-m_slope;\n reflected_rotate= -m_rotate;\n }\n else if(m_x_reflection==1 && m_y_reflection==1)\n {\n reflected_x=-x;\n reflected_y=-y;\n reflected_image_angle=m_slope-180;\n reflected_vector_angle=m_slope+180;\n reflected_rotate= m_rotate;\n }\n\n\t\tfloat start_image_theta = (float) Math.toRadians(reflected_image_angle);\n \t\tfloat start_vector_theta = (float) Math.toRadians(reflected_vector_angle);\n\t\tfloat rotate_theta = (float) Math.toRadians(reflected_rotate);\n\t\tfloat cur_image_theta = 0f, cur_vector_theta = 0f;\n\t\tdouble image_costheta = 0, vector_costheta = 0;\n\t\tdouble image_sintheta = 0, vector_sintheta = 0;\n\t\tfloat xP = 0f;\n\t\tfloat yP = 0f;\n\t\tfloat xO = 0f, nextXO = 0f;\n\t\tfloat yO = 0f, nextYO = 0f;\n\n\t\t//if (txt == null) {\n\t\t//\ttxt = load(\"img/plaitWhite.png\");\n\t\t//}\n\t\tTextureCoords tc = m_txt.getImageTexCoords();\n\t\txO = nextXO = reflected_x;\n\t\tyO = nextYO = reflected_y;\n xP = m_cx * m_starting_dilation;\n\t\tyP = m_cy * m_starting_dilation;\n //vector\n\t\tcur_vector_theta = start_vector_theta;\n vector_costheta = Math.cos(cur_vector_theta);\n\t\tvector_sintheta = Math.sin(cur_vector_theta);\n //image\n cur_image_theta = start_image_theta;\n\t\timage_costheta = Math.cos(cur_image_theta);\n\t\timage_sintheta = Math.sin(cur_image_theta);\n\t\t\n\t\tfor (int i = 0; i < Iteration; i++) {\t\t\t\n DrawPlait(gl, xO, yO, xP / 2, yP / 2, image_costheta, image_sintheta, tc);\n\t\t\t//vector\n cur_vector_theta += rotate_theta;\n\t\t\tvector_costheta = Math.cos(cur_vector_theta);\n\t\t\tvector_sintheta = Math.sin(cur_vector_theta);\n //image\n\t\t\tcur_image_theta += rotate_theta;\n\t\t\timage_costheta = Math.cos(cur_image_theta);\n\t\t\timage_sintheta = Math.sin(cur_image_theta);\n //next centor position\n\t\t\tnextXO = xO + (float) (xP * m_translate * vector_costheta);\n\t\t\tnextYO = yO + (float) (yP * m_translate * vector_sintheta);\n\t\t\tif (m_vector) {\n\t\t\t\tDrawVector(gl, xO, yO, nextXO, nextYO, xP, cur_vector_theta);\n\t\t\t}\n\t\t\txO = nextXO;\n\t\t\tyO = nextYO;\n\t\t\txP *= m_dilate;\n\t\t\tyP *= m_dilate;\n\t\t}\n\t}", "public void Display() \n {\n float theta = velocity.heading() + PI/2;\n fill(175);\n stroke(0);\n pushMatrix();\n translate(pos.x,pos.y);\n rotate(theta);\n beginShape();\n vertex(0, -birdSize*2);\n vertex(-birdSize, birdSize*2);\n vertex(birdSize, birdSize*2);\n endShape(CLOSE);\n popMatrix();\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制五角形\");\n\t}", "public void draw(){\n\t\tcomponent.draw();\r\n\t}", "public final void draw2D()\n {\n if ( GameLevel.current() != null )\n {\n //draw player's wearpon or gadget\n GameLevel.currentPlayer().drawWearponOrGadget();\n }\n\n //draw avatar message ( if active )\n AvatarMessage.drawMessage();\n\n //draw all hud messages\n HUDMessage.drawAllMessages();\n\n //draw fullscreen hud effects\n HUDFx.drawHUDEffects();\n\n //draw frames per second last\n Fps.draw();\n\n //draw ammo if the wearpon uses ammo\n if ( GameLevel.currentPlayer().showAmmoInHUD() )\n {\n drawAmmo();\n }\n\n //draw health\n drawHealth();\n\n //draw debug logs\n //Level.currentPlayer().drawDebugLog( g );\n }", "public void draw(WorldLocation coord){\n \n }", "public void draw(Graphics2D g) {\r\n \tAffineTransform at = g.getTransform();\r\n g.translate(s.x, s.y);\r\n double rot = d.theta() + Math.PI / 2;\r\n \r\n g.rotate(rot);\r\n g.scale(SCALE, SCALE);\r\n g.setColor(COLOR);\r\n g.fillPolygon(XP, YP, XP.length);\r\n //If the shield is active we draw it to\r\n if (shield) {\r\n \tg.setColor(Color.red);\r\n \tg.drawOval(-13, -10, 25, 25);\r\n }\r\n //If the ship is trusting we draw the thruster\r\n if (thrusting) {\r\n g.setColor(Color.red);\r\n g.fillPolygon(XPTHRUST, YPTHRUST, XPTHRUST.length);\r\n g.setColor(Color.yellow);\r\n g.fillPolygon(XPTHRUSTIN, YPTHRUSTIN, XPTHRUSTIN.length);\r\n }\r\n g.setTransform(at);\r\n \r\n \r\n }", "public void draw(Frame frame) {\n\t\t// Draw vehicle corner points.\n\t\tif (this.points != null) {\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tif (this.points[i] == null) continue;\n\t\t\t\tImgproc.circle(frame.getSource(), this.points[i], 3, new Scalar(0, 0, 255));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Draw the vehicles back point.\n\t\tif (this.back != null) {\n\t\t\tImgproc.circle(frame.getSource(), this.back, 3, new Scalar(0, 0, 255));\n\t\t}\n\t\t\n\t\t// Draw the vehicles front point.\n\t\tif (this.front != null) {\n\t\t\tImgproc.circle(frame.getSource(), this.front, 6, new Scalar(0, 0, 255));\n\t\t}\n\t\t\n\t\t// Draw the vehicles center point.\n\t\tif (this.center != null) {\n\t\t\tImgproc.circle(frame.getSource(), this.center, 3, new Scalar(255, 0, 0), Imgproc.FILLED);\n\t\t}\n\t}", "@Override\n public void draw(GraphicsContext gc, int sides){}", "void draw() {\n scsw.draw();\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}", "public void draw() {\n GraphicsContext gc = getGraphicsContext2D();\n /*gc.clearRect(0, 0, getWidth(), getHeight());\n\n if (squareMap != null) {\n squareMap.draw(gc);\n }\n if (hexMap != null) {\n hexMap.draw(gc);\n }*/\n\n // Draw animations\n for (SpriteAnimationInstance anim : animationList) {\n anim.draw(gc);\n }\n\n // Lastly draw the dialogue window, no matter which canvas\n // we are on, all the same.\n DfSim.dialogueWindow.draw(gc);\n\n /*if (landMap != null) {\n landMap.draw(gc);\n }*/\n\n // Draw a border around the canvas\n //drawBorder(gc);\n\n // And now just draw everything directly from the simulator\n /*for (Raindrop item : sim.getDrops()) {\n drawMovableCircle(gc, item);\n }\n for (Earthpatch item : sim.getPatches()) {\n drawMovableCircle(gc, item);\n }\n for (SysShape item : sim.getShapes()) {\n drawSysShape(gc, item);\n }\n for (Spike item : sim.getSpikes()) {\n drawMovablePolygon(gc, item);\n }\n for (GravityWell item : sim.getGravityWells()) {\n drawGravityWell(gc, item);\n }*/\n }", "@Override\n public void draw()\n {\n }", "@Override\n public void draw() {\n }", "@Override\n\tpublic String draw() {\n\t\treturn \"Geometry Draws\";\n\t}", "public void draw(Graphics surface) {\r\n surface.drawLine(50, 50, 250, 250);\r\n\tsurface.drawOval(20,20,40,40);\r\n box.draw(surface);\r\n\tfor (BouncingBox b : boxes) {\r\n\t b.draw(surface);\r\n\t}\r\n }", "ZHDraweeView mo91981h();", "public static void draw(ArrayList<Sighting> data){\n \n \t\tint backgroundColor = Utils.globalProcessing.color(120, 120, 120, 60);\n \n \t\tUtils.globalProcessing.fill(backgroundColor);\n \n \t\tUtils.globalProcessing.rect(200, 0, 1024, 768);\n \t\t//Utils.globalProcessing.rectMode(Utils.globalProcessing.CORNERS);\n \t\tArrayList<Shape> shapes = new ArrayList<Shape>();\n \t\tArrayList<Time> times = new ArrayList<Time>();\n \t\tArrayList<City> locations = new ArrayList<City>();\n \t\t//calculate min/max for each dimension\n \t\tfor(int i = 0; i < data.size(); i++){\n \t\t\tSighting s = data.get(i);\n \t\t\tif(!shapes.contains(s.getShape()))\n \t\t\t\tshapes.add(s.getShape());\n \t\t\tif(!times.contains(s.getTime()))\n \t\t\t\ttimes.add(s.getTime());\n \t\t\tif(!locations.contains(s.getPosition()))\n \t\t\t\tlocations.add((City)s.getPosition());\n \t\t}\n \t\tfloat xPloti, xPlote, yPloti, yPlote;\n \t\txPloti = 200;\n \t\txPlote = 1024;\n \t\tyPloti = 100;\n \t\tyPlote = 700;\n \n \t\tfloat maxDistance = 0;\n\t\tfloat minPopulationDensity = Utils.allCities.get(0).getPopulationDensity();\n\t\tfloat maxpopulationDensity = Utils.allCities.get(0).getPopulationDensity();\n \t\tfor(City c: locations){\n \t\t\tif(c.getDistanceAirport() > maxDistance)\n \t\t\t\tmaxDistance = c.getDistanceAirport();\n \t\t\tif(c.getPopulationDensity()< minPopulationDensity)\n \t\t\t\tminPopulationDensity = c.getPopulationDensity();\n \t\t\telse if(c.getPopulationDensity() > maxpopulationDensity)\n \t\t\t\tmaxpopulationDensity = c.getPopulationDensity();\n \n \t\t}\n \n \n \n \t\t\n \t\tfor(int i = 0; i < data.size(); i++){\n \t\t\tSighting s = data.get(i);\n \t\t\tUtils.globalProcessing.stroke(s.getShape().getColor());\n \t\t\tUtils.globalProcessing.beginShape();\n \t\t\t//Utils.globalProcessing.stroke(120);\n \t\t\tfloat x = Utils.globalProcessing.map((float)1/7, 0, 1, xPloti, xPlote);\n \t\t\tfloat y = Utils.globalProcessing.map(((City)s.getPosition()).getDistanceAirport(), 0, maxDistance, yPloti, yPlote);\n \n \t\t\tUtils.globalProcessing.vertex(x,y); // distance\n \n \t\t\tx = Utils.globalProcessing.map((float)2/7, 0, 1, xPloti, xPlote);\n \t\t\ty = Utils.globalProcessing.map(((City)s.getPosition()).getPopulationDensity(), minPopulationDensity, maxpopulationDensity, yPloti, yPlote);\n \n \t\t\tUtils.globalProcessing.vertex(x,y); //populationDensity\n \t\t\tUtils.globalProcessing.endShape();\n \t\t\t//It works only if I threat all the couple of points as separate, indipendent lines\n \t\t\tUtils.globalProcessing.beginShape();\n \n \t\t\tUtils.globalProcessing.vertex(x,y);\n \n \t\t\tx = Utils.globalProcessing.map((float)3/7, 0, 1, xPloti, xPlote);\n \t\t\tif(s.getTime().getBeginTime().get(Calendar.HOUR_OF_DAY)<19 &&s.getTime().getBeginTime().get(Calendar.HOUR_OF_DAY)>=7)\n \t\t\t\ty = Utils.globalProcessing.map(1, 0, 3, yPloti, yPlote); //day \n \t\t\telse\t\n \t\t\t\ty = Utils.globalProcessing.map(2, 0, 3, yPloti, yPlote); //night \n \t\t\t//System.out.println(x +\" \" +y);\n \t\t\tUtils.globalProcessing.vertex(x,y); // night/day\n \t\t\tUtils.globalProcessing.endShape();\n \t\t\tUtils.globalProcessing.beginShape();\n \t\t\t\n \t\t\tUtils.globalProcessing.vertex(x,y);\n \t\t\tx = Utils.globalProcessing.map((float)4/7, 0, 1, xPloti, xPlote);\n \t\t\ty = Utils.globalProcessing.map(s.getTime().getBeginTime().get(Calendar.MONTH)+1, 0, 13, yPloti, yPlote);\n \t\t\tUtils.globalProcessing.vertex(x, y); //month of the year\n \t\t\t\n \t\t\tUtils.globalProcessing.endShape();\n \t\t\tUtils.globalProcessing.beginShape();\n \t\t\t\n \t\t\tUtils.globalProcessing.vertex(x, y);\n \t\t\tx = Utils.globalProcessing.map((float)5/7, 0, 1, xPloti, xPlote);\n \t\t\tif(s.getTime().getBeginTime().get(Calendar.MONTH)==Calendar.MARCH || s.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.APRIL ||\n \t\t\t\t\ts.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.MAY) //Spring\n \t\t\ty = Utils.globalProcessing.map(1, 0, 5, yPloti, yPlote);\n \t\t\telse if(s.getTime().getBeginTime().get(Calendar.MONTH)==Calendar.JUNE || s.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.JULY ||\n \t\t\t\t\ts.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.AUGUST) //summer\n \t\t\t\ty = Utils.globalProcessing.map(2, 0, 5, yPloti, yPlote);\n \t\t\telse if(s.getTime().getBeginTime().get(Calendar.MONTH)==Calendar.SEPTEMBER || s.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.OCTOBER ||\n \t\t\t\t\ts.getTime().getBeginTime().get(Calendar.MONTH) == Calendar.NOVEMBER) //autumn\n \t\t\t\ty = Utils.globalProcessing.map(3, 0, 5, yPloti, yPlote);\n \t\t\telse\n \t\t\t\ty = Utils.globalProcessing.map(3, 0, 5, yPloti, yPlote);\n \t\t\tUtils.globalProcessing.vertex(x, y); //seasons\n \t\t\t\n \t\t\tUtils.globalProcessing.endShape();\n \t\t\tUtils.globalProcessing.beginShape();\n \t\t\t\n \t\t\tUtils.globalProcessing.vertex(x, y);\n \t\t\t\n \t\t\tx = Utils.globalProcessing.map((float)6/7, 0, 1, xPloti, xPlote);\n \t\t\ty = Utils.globalProcessing.map(s.getTime().getBeginTime().get(Calendar.YEAR), 2000, 2011, yPloti, yPlote);\n \t\t\tUtils.globalProcessing.vertex(x, y); //years\n \t\t\tUtils.globalProcessing.endShape();\n \t\t}\n \t\t//draw vertical lines\n \n \t\tfor(int i = 1; i < 7 ; i++){\n \t\t\tfloat x = Utils.globalProcessing.map((float)i/7, 0, 1, xPloti, xPlote);\n \t\t\t//Utils.globalProcessing.\n \t\t}\n \n \t}" ]
[ "0.67232114", "0.6685493", "0.66303474", "0.6555684", "0.6478266", "0.6464", "0.6429516", "0.64232993", "0.6408382", "0.6388902", "0.6388902", "0.6388902", "0.6366759", "0.636524", "0.6343995", "0.6338405", "0.63209033", "0.6286929", "0.62846583", "0.6272561", "0.6272561", "0.6272561", "0.6272561", "0.6240522", "0.6240302", "0.62402934", "0.6234092", "0.62237823", "0.6212229", "0.6204109", "0.61615175", "0.61546516", "0.61481595", "0.61333567", "0.61327213", "0.6122652", "0.61182487", "0.6116359", "0.6116359", "0.6105381", "0.6104143", "0.6102855", "0.6094358", "0.6083624", "0.6073544", "0.6072768", "0.6072768", "0.606535", "0.60634786", "0.60620475", "0.6047526", "0.6047526", "0.60327184", "0.6026754", "0.60251755", "0.6017959", "0.6008229", "0.6007624", "0.5995472", "0.5992742", "0.5991117", "0.5988066", "0.59855634", "0.5978977", "0.59729064", "0.59691715", "0.59691715", "0.59691715", "0.59660536", "0.59624416", "0.59624416", "0.59468204", "0.59458375", "0.5945424", "0.59444946", "0.5939923", "0.59320015", "0.59253204", "0.59253204", "0.59253204", "0.59227026", "0.59202963", "0.5904822", "0.5894364", "0.5894044", "0.5892794", "0.5889243", "0.58867556", "0.5879788", "0.5878259", "0.58767223", "0.5875296", "0.58746797", "0.58589697", "0.58565754", "0.5846559", "0.58461165", "0.5843927", "0.5842549", "0.58402926" ]
0.6339542
15
draw the stat on the plane
public void star(float x, float y, float r, float R) { float angle = TWO_PI / 5; float halfAngle = angle/2.0f; beginShape(); noStroke(); for (float a = 0; a < TWO_PI; a += angle) { float sx = x + cos(a) * r; float sy = y + sin(a) * r; vertex(sx, sy); sx = x + cos(a+halfAngle) * R; sy = y + sin(a+halfAngle) * R; vertex(sx, sy); } endShape(CLOSE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "public void draw_plane(Graphics g, int log_num, int i);", "public void mark_plane(Graphics g, int log_num, int x, int y, int h);", "public void draw() {\r\n /* DO NOT MODIFY */\r\n StdDraw.point(x, y);\r\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}", "public void draw() {\n \n }", "public void draw() {\n \n // TODO\n }", "void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}", "public void draw() {\n StdDraw.clear();\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setXscale(-drawLength * 0.1, drawLength * 1.2);\n StdDraw.setYscale(-drawLength * 0.65, drawLength * 0.65);\n StdDraw.line(0, 0, drawLength, 0);\n StdDraw.text(-drawLength * 0.05, 0, \"0\");\n StdDraw.text(drawLength * 1.1, 0, Integer.toString(size()));\n }", "public void draw() {\n }", "public void draw(){\n }", "public void draw() {\t\t\n\t\ttexture.draw(x, y);\n\t\tstructure.getTexture().draw(x,y);\n\t}", "public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}", "public void draw() {\n\n }", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n public void draw() {\n }", "@Override\n public void draw() {\n /** preparacion de la ventana **/\n background(255);\n lights();\n directionalLight(40, 90, 100, 1, 40, 40);\n\n translate(origin.x,origin.y);\n scale(zoom);\n\n\n /** entrada del usuario **/\n userInput();\n /** ejes X Y Z **/\n drawAxes();\n /** aplicar ik **/\n writePos();\n\n /** escala de los objetos**/\n scale(-1.2f);\n\n /** esfera que muestra la posicion en coord X Y Z\n *\n * X -> coord[0]\n * Y -> coord[1]\n * Z -> coord[2]\n *\n * **/\n pushMatrix();\n noStroke();\n fill(250, 100, 1);\n translate(-coord_cartesian[1] ,-coord_cartesian[2] -11,-coord_cartesian[0] );\n sphere(2);\n popMatrix();\n\n\n /**\n * Dibuja el brazo\n */\n pushMatrix();\n arm.drawArm();\n popMatrix();\n }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "public void draw(){\n StdDraw.picture(this.xCoordinate,this.yCoordinate,this.img);\n }", "@Override\n public void draw() {\n super.draw(); \n double radius = (this.getLevel() * 0.0001 + 0.025) * 2.5e10;\n double x = this.getR().cartesian(0) - Math.cos(rot) * radius;\n double y = this.getR().cartesian(1) - Math.sin(rot) * radius;\n StdDraw.setPenRadius(0.01);\n StdDraw.setPenColor(StdDraw.RED);\n StdDraw.point(x, y);\n \n }", "public void drawUserPlane(Graphics g) {\r\n\t\tlevelManager.drawUserPlane(g);\r\n\t}", "public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "public void draw(){\n\t\tcomponent.draw();\r\n\t}", "public void draw();", "public void draw();", "public void draw();", "public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(0.01);\n for (Point2D point : points) {\n StdDraw.point(point.x(), point.y());\n }\n StdDraw.setPenRadius();\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n public void draw()\n {\n }", "public void draw() {\n for (Point2D p: mPoints) {\n StdDraw.filledCircle(p.x(), p.y(), 0.002);\n }\n }", "@Override\n public void draw() {\n }", "@Override\r\n\tpublic void draw() {\n\t\tPoint p = this.getP();\r\n\t\tint start_point = p.getX();\r\n\t\tint end_point = p.getY();\r\n\t\t\r\n\t\tint width = this.getWidth();\r\n\t\tint height = this.getHeight();\r\n\t\t\r\n\t\tSystem.out.println(\"�l�p�`��`�� �_(\" + start_point +\",\"+ end_point + \")����Ƃ��āA��\"+ width +\"����\"+ height +\"�̎l�p�`\");\r\n\t}", "@Override\n\tpublic void draw() {\n\t}", "void draw();", "public void drawPokemon() {\n setAttackText();\n drawImage();\n }", "public void draw()\r\n {\r\n\tfinal GraphicsLibrary g = GraphicsLibrary.getInstance();\r\n\t_level.draw(g);\r\n\t_printText.draw(\"x\" + Mario.getTotalCoins(), 30, _height - 36, false);\r\n\t_printText.draw(\"C 000\", _width - 120, _height - 36, false);\r\n\t_printText.draw(Mario.getLives() + \"UP\", 240, _height - 36, false);\r\n\t_printText.draw(Mario.getPoints() + \"\", 400, _height - 36, false);\r\n\t_coin.draw();\r\n\t_1UP.draw();\r\n }", "public void draw() {\n\t\t/* Clear Screen */\n\t\tGdx.graphics.getGL20().glClearColor(1,1,1,0);\n\t\tGdx.graphics.getGL20().glClear( GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT );\n\n\t\t/* Iterate through draw list */\n\t\tIterator<ArrayList<Drawable>> iter = this.drawlist.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tArrayList<Drawable> layer = iter.next();\n\t\t\t/* Sort the layer. */\n\t\t\tCollections.sort(layer, new DrawableComparator());\n\t\t\t/* Iterate through the layer. */\n\t\t\tIterator<Drawable> jter = layer.iterator();\n\t\t\twhile(jter.hasNext()) {\n\t\t\t\tDrawable drawable = jter.next();\n\t\t\t\tif (drawable.isDead()) {\n\t\t\t\t\tjter.remove(); //Remove if dead.\n\t\t\t\t}//fi\n\t\t\t\telse {\n\t\t\t\t\tdrawable.draw(this, this.scalar); //Draw the drawable.\n\t\t\t\t}//else\n\t\t\t}//elihw\n\t\t}//elihw\n\t}", "public void draw() {\r\n\t\tif (active_)\r\n\t\t\tGlobals.getInstance().getCamera().drawImageOnHud(posx_, posy_, currentImage());\r\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制矩形\");\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"You are drawing a RECTANGLE\");\n\t}", "@Override\r\n\tpublic void draw(Batch batch)\r\n\t{\n\t\t\r\n\t\tif(m_texRegion.isFlipX() && m_rightDirection)\r\n\t\t\tm_texRegion.flip(true, false);\r\n\t\telse if(!m_texRegion.isFlipX() && !m_rightDirection)\r\n\t\t\tm_texRegion.flip(true, false);\r\n\r\n\t\tif(this.m_isInvulnerable)\r\n\t\t\tbatch.setColor(1,1,1,0.5f);\r\n\t\telse\r\n\t\t\tbatch.setColor(new Color(Color.WHITE));\r\n\r\n\t\tthis.updateTransform();\r\n\t\tbatch.draw(m_texRegion, this.getDimension().x, this.getDimension().y, this.getTransform());\r\n\r\n\t\tbatch.setColor(new Color(Color.WHITE));\r\n\r\n\r\n\t\tm_lifeBar.setLife((int) this.m_life);\r\n\t\tm_lifeBar.setPosition(this.getPosition().add(0, 64));\r\n\t\tm_lifeBar.draw(batch);\r\n\t\t\r\n\t}", "void drawAt(DrawSurface d, Rectangle rect);", "protected abstract void draw();", "public abstract void draw( );", "@Override\n public void draw(Batch batch, float alpha) {\n\t\t if(reverse)\n \tbatch.draw(plat,this.getX()+69, this.getY(),plat.getWidth()*px,plat.getHeight()*py,0,0,plat.getWidth(),plat.getHeight(),reverse,false);\n\t\t else\n\t\t\t batch.draw(plat,this.getX(), this.getY(),plat.getWidth()*px,plat.getHeight()*py);\n \tif(!reverse){\n \tbatch.draw(bar1,this.getX()+9,this.getY()+142,330/maxBlood*blood*px,bar1.getHeight()*py);\n \tbatch.draw(bar2,this.getX()+9,this.getY()+95,240*magic/maxMagic*px,bar2.getHeight()*py);\n \t}else{\n \t\tbatch.draw(bar1,this.getX()+688-330/maxBlood*blood*px,this.getY()+142,330/maxBlood*blood*px,bar1.getHeight()*py);\n \tbatch.draw(bar2,this.getX()+688-240*magic/maxMagic*px,this.getY()+95,240*magic/maxMagic*px,bar2.getHeight()*py);\n \t}\n \t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"draw method\");\n\t}", "public void draw() {\r\n if(isVisible()) {\r\n Canvas canvas = Canvas.getCanvas();\r\n canvas.draw(this,getColor(),\r\n new Rectangle(\r\n (int)round(getXposition()),\r\n (int)round(getYposition()),\r\n (int)round(size),\r\n (int)round(size)));\r\n canvas.wait(10);\r\n }\r\n }", "public void drawHealthBar() {}", "private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }", "public void draw(Graphics g){\n\n g.setColor(Color.red);\n g.drawLine(x1,y1,x2,y2);\n g.drawLine(x2,y2,x3,y3);\n g.drawLine(x3,y3,x1,y1);\n g.setFont(new Font(\"Courier\", Font.BOLD, 12));\n DecimalFormat fmt = new DecimalFormat(\"0.##\"); \n g.setColor(Color.blue);\n g.drawString(fmt.format(perimeter()) + \" \" + name,x1+2 , y1 -2);\n \n }", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "public void _draw(Transform t, Vector3f color) {\n\t\t// Bounds\n\t\tfor (int i = 0; i < points.length; i++) {\n\t\t\tVector2f a = points[i].clone().add(center);\n\t\t\tVector2f b = points[(i+1) % points.length].clone().add(center);\n\t\t\t\n\t\t\t// Scale\n\t\t\ta.x *= t.scale.x;\n\t\t\ta.y *= t.scale.y;\n\t\t\t// Rotate\n\t\t\ta = Vector2f.rotate(a, (float) t.rotation, null);\n\t\t\t// Translate\n\t\t\ta.add(t.position);\n\t\t\t\n\t\t\t// Scale\n\t\t\tb.x *= t.scale.x;\n\t\t\tb.y *= t.scale.y;\n\t\t\t// Rotate\n\t\t\tb = Vector2f.rotate(b, (float) t.rotation, null);\n\t\t\t// Translate\n\t\t\tb.add(t.position);\n\t\t\t\n\t\t\tsk.debug.Debug.drawLine(a, b, color);\n\t\t}\n\t\t\n\t\t// Normals\n\t\tfor (Vector2f n : normals) {\n\t\t\tVector2f a = getCenter(t);\n\t\t\tVector2f b = getCenter(t).clone().add(n.clone().rotate(t.rotation));\n\t\t\t\t\t\n\t\t\tsk.debug.Debug.drawLine(a, b, (Vector3f) color.scale(0.5f));\t\t;\n\t\t}\n\t\t\n\t\t// The broadphase check\n\t\tsk.debug.Debug.drawCircle(getCenter(t), getBP(t));\n\t}", "public void draw() {\n p.pushMatrix(); // save old visual style for other sprites\n p.translate(pos.x, pos.y); \n if (localpen) p.image(pen.get(0,0,p.width,p.height),p.width/2-pos.x, p.height/2-pos.y);\n if (visible) {\n // locked left-right rotation\n if (((direction%360<=270) & (direction%360>=90)) & rotationStyle==rotationStyle_leftRight) p.scale(-1.0f,1.0f);\n if (rotationStyle==rotationStyle_allAround) p.rotate(p.radians(-direction));\n if (ghostEffect > 0) {\n int calculatedAlpha = (int)p.map(ghostEffect,100,0,0,255);\n \n int[] alpha = new int[costumes.get(costumeNumber).width*costumes.get(costumeNumber).height];\n for (int i=0; i<alpha.length; i++) {\n // only fade non-zero pixels; 0 is full-transparency\n if (costumes.get(costumeNumber).pixels[i]!=0) alpha[i]=calculatedAlpha;\n }\n costumes.get(costumeNumber).mask(alpha);\n }\n p.image(costumes.get(costumeNumber), 0, 0, costumes.get(costumeNumber).width*(size/100),\n costumes.get(costumeNumber).height*(size/100));\n }\n p.popMatrix(); // restore default visual style\n }", "public void draw(){\n\t\t/* Stamps a copy of the planet at the position. the file of the planet image is under folder of \"images\".\n\t\t * a mistake easily to be ignored here..*/\n\t\tString imageToDraw = \"images/\" + imgFileName;\n\t\tStdDraw.picture(xxPos, yyPos, imageToDraw);\n\n\t}", "public abstract void showStat();", "public void draw(){\n\t\tStdDraw.picture(this.xxPos,this.yyPos,\"images/\"+this.imgFileName);\n\t}", "abstract void draw();", "abstract void draw();", "@Override\n\tpublic String draw() {\n\t\treturn \"Geometry Draws\";\n\t}", "public void draw(WorldLocation coord){\n \n }", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Triangle was drawing.\");\r\n\t\tSystem.out.println(\"new line\");\r\n\t\tSystem.out.println(\"second line \");\r\n\t\t//add comments\r\n\t\t// add more comments \r\n\t}", "public void draw() {\n for (Point2D point : pointSet) {\n point.draw();\n }\n }", "public void show() {\r\n\t\tif ((polygon.npoints > 1)\r\n\t\t\t\t&& ((polygon.xpoints[0] != polygon.xpoints[1]) || (polygon.ypoints[0] != polygon.ypoints[1]))) {\r\n\t\t\tGraphics2D gr = (Graphics2D) graphics;\r\n\t\t\tgr.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\r\n\t\t\tgr.setPaint(colorPar.getDevColor());\r\n\t\t\tgr.setStroke(new BasicStroke((float) lineWidth));\r\n\t\t\tPolygon p = isTransformed ? transformed() : polygon;\r\n\t\t\tGeneralPath gp = new GeneralPath();\r\n\t\t\tgp.moveTo((float) (p.xpoints[0]), (float) (p.ypoints[0]));\r\n\t\t\tfor (int i = 1; i < p.npoints; i++) {\r\n\t\t\t\tgp.lineTo((float) (p.xpoints[i]), (float) (p.ypoints[i]));\r\n\t\t\t}\r\n\t\t\tgr.draw(gp);\r\n\t\t\tif (validBounds) {\r\n\t\t\t\tsetBounds(gp.getBounds());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void draw() {\n gsm.draw(g);\n }", "private void draw(){\n\t\t\t Point level = new Point(txtBoard_top_left.x, txtBoard_top_left.y);\n\t\t\t level_info = new TextInfo(g, level, txt_width, size*4, LEVEL, this.level);\n\t\t\t level_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 2nd text info\n\t\t\t Point lines = new Point(level.x, level.y+size*2);\n\t\t\t lines_info = new TextInfo(g, lines, txt_width, size*4, LINES, this.lines);\n\t\t\t lines_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 3rd text info\n\t\t\t Point score = new Point(lines.x, lines.y+size*2);\n\t\t\t score_info = new TextInfo(g, score, txt_width, size*4, SCORE, this.score);\n\t\t\t score_info.drawTextInfo();\t\t\n\t\t}", "public void draw() {\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setPenRadius(.01);\n for (Point2D p : s) {\n p.draw();\n }\n }", "public abstract void draw();", "public abstract void draw();", "public abstract void draw();", "private void drawStatDisplay(Graphics g, Container container)\n\t{\n\t\tif (hoverButton != null)\n\t\t{\n\t\t\t// Set the display to draw right underneath the button being\n\t\t\t// hovered over\n\t\t\tint x = hoverButton.getLocation().x;\n\t\t\tint y = hoverButton.getLocation().y + thumbnailSize.height + 3;\n\n\t\t\tstatDisplay.draw(g, x, y, container);\n\n\t\t\tStatSet stats = buttons.get(hoverButton).getStats();\n\n\t\t\tg.setFont(statFont);\n\t\t\tg.setColor(Color.black);\n\t\t\tg.drawString(\"\" + stats.getAttack(), x + 30, y + 20);\n\t\t\tg.drawString(\"\" + stats.getMovement(), x + 30, y + 40);\n\n\t\t\t// Make sure the right display is right-aligned\n\t\t\t// The stats do not exceed 99, therefore there isn't\n\t\t\t// any need for dealing with 3 or more digit numbers\n\t\t\tif (stats.getHealth() >= 10)\n\t\t\t\tg.drawString(\"\" + stats.getHealth(), x + 78, y + 20);\n\t\t\telse\n\t\t\t\tg.drawString(\"\" + stats.getHealth(), x + 86, y + 20);\n\t\t\tif (stats.getRange() >= 10)\n\t\t\t\tg.drawString(\"\" + stats.getRange(), x + 78, y + 40);\n\t\t\telse\n\t\t\t\tg.drawString(\"\" + stats.getRange(), x + 86, y + 40);\n\n\t\t}\n\t}", "public void draw()\r\n\t{\r\n\t\tfor(int i=1;i<accountValue.length;i++)\r\n\t\t{\r\n\t\t\taccountValue[i]+=playerBet[i];\r\n\t\t}\r\n\t\tendRund();\r\n\t}", "void draw() {\n canvas.drawColor(Color.BLACK);\n insertSort(vstar);\n for( int i=0; i<NUMSTARS; i++){\n vstar[i].draw();\n }\n }", "public void display() {\n PVector d = location.get();\n float diam = d.y/height;\n println(diam);\n\n stroke(0);\n fill(255,0,0);\n ellipse (location.x, location.y, diameter, diameter);\n }", "public void draw() {\r\n System.out.println(\"Shape: \" + this.getClass().getName() +\r\n \"\\t Perimeter: \" + calculatePerimeter() +\r\n \"\\t Area: \" + calculateArea());\r\n }", "public void render() {\r\n\t\t //Draw all of the sprites in the game\r\n\t background.draw(0,backgroudY1);\r\n\t\tbackground.draw(0,backgroudY2);\r\n\t\tbackground.draw(0,backgroudY3);\r\n\t\tbackground.draw(WIDTH/2,backgroudY1);\r\n\t\tbackground.draw(WIDTH/2,backgroudY2);\r\n\t background.draw(WIDTH/2,backgroudY3);\r\n\t \r\n\t // call this method from Player class, to draw the plane.\r\n\t player.render();\r\n\t \r\n\t \r\n\t // loop through every enemy, draw enemy if it's not killed\r\n\t for(int i=0; i<enemy.length; i++) {\r\n\t \t\r\n \tif(enemy[i] != null && enemyKilled[i] == true) {\r\n \t\t\r\n\t \t\t\r\n\t enemy[i].render();\r\n\t \r\n\t \t}\r\n\t \r\n\t }\r\n\t // loop through every laser, if it has not made contact with any enemy,\r\n\t // call its render method to draw it\r\n\t for (int i = 0; i < arr_size; i++) {\r\n\t \tif (lasers[i] != null && laserUsed[i] == true) {\r\n\t lasers[i].render();\r\n \t}\r\n\t \t\r\n\t }\r\n\t \r\n\t}", "public void draw() {\n draw(this.root, new RectHV(0.0, 0.0, 1.0, 1.0));\n }", "public void draw()\r\n {\r\n drawn = true;\r\n }", "public void draw() {\n //Grey background, which removes the tails of the moving elements\n background(0, 0, 0);\n //Running the update function in the environment class, updating the positions of stuff in environment\n //update function is a collection of the methods needing to be updated\n if(stateOfProgram == 0) { startTheProgram.update(); }\n if(stateOfProgram == 1) {\n theEnvironment.update();\n //update function is a collection of the methods needing to be updated\n //Running the update function in the Population class, updating the positions and states of the rabbits.\n entitiesOfRabbits.update();\n entitiesOfGrass.update();\n entitiesOfFoxes.update();\n\n entitiesOfRabbits.display();\n entitiesOfGrass.display();\n entitiesOfFoxes.display();\n openGraph.update();\n }\n }", "public void draw(Graphics2D g) {\n \t switch(id){\n \t case NORMAL:\n \t g.drawImage(img,getX(),getY(),2*getWidth(),2*getHeight(),null);\n\t Graphics2D graphics = (Graphics2D)g.create();\n \t graphics.setColor(Color.red);\n \t graphics.fill3DRect(getX()+10,getY()-10,health,10,true);\n \t graphics.dispose();\n \t break;\n \t case BOSS:\n \t g.drawImage(img,getX(),getY(),getWidth(),getHeight(),null);\n\t Graphics2D graphics = (Graphics2D)g.create();\n \t graphics.setColor(Color.red);\n \t graphics.fill3DRect(getX()+10,getY()-10,health,10,true);\n \t graphics.dispose();\n \t\t break;\n \t }\n \t}", "public void Draw(Graphics g)\n/* */ {\n/* 55 */ g.setColor(this.m_color);\n/* */ \n/* 57 */ Point prevPt = new Point(0, 0);Point currPt = new Point(0, 0);\n/* */ \n/* 59 */ for (double t = 0.0D; t < 1.01D; t += this.m_tValue) {\n/* 60 */ ptFromTVal(t, currPt);\n/* */ \n/* 62 */ if (t == 0.0D) {\n/* 63 */ prevPt.x = currPt.x;\n/* 64 */ prevPt.y = currPt.y;\n/* */ }\n/* */ \n/* 67 */ g.drawLine(prevPt.x, prevPt.y, currPt.x, currPt.y);\n/* */ \n/* 69 */ if (this.m_showTPoints) {\n/* 70 */ g.fillOval(currPt.x - this.PT_RADIUS, currPt.y - this.PT_RADIUS, this.PT_DIAMETER, this.PT_DIAMETER);\n/* */ }\n/* */ \n/* 73 */ prevPt.x = currPt.x;\n/* 74 */ prevPt.y = currPt.y;\n/* */ }\n/* */ }", "@Override\n\tpublic void draw() {\n\t\tbg.draw();\n\t\tfor(Test2 t : test)\n\t\t\tt.draw();\n\t\tfor(Test2 t : test2)\n\t\t\tt.draw();\n\t\t\n\t\tfor(Test2 t : test3)\n\t\t\tt.draw();\n\t\tobj.draw();\n\t\tEffect().drawEffect(1);\n\t}", "public void draw(){\n hit();\n hit();\n }", "private void renserGameStats(SpriteBatch batch)\n {\n String points = \"Points: \";\n String crumbs = \"Crumbs: \";\n\n float x = 3;\n float y = 3;\n \n font.draw(batch, points + (int)stats.getPoints(), x, y);\n x = camera.viewportWidth - 120;\n font.draw(batch, crumbs + (int)stats.getCrumbs(), x, y);\n }", "public void draw(Graphics gr) {\n\n //Draw the buttons\n for (int i = 0; i < buttons.length; i++) {\n\n if(buttons[i].getIsSelected()){\n gr.setColor(Color.yellow);\n gr.fillRect((int)buttons[i].getX() , (int)buttons[i].getY()\n , buttons[i].height, buttons[i].width);\n }\n else if(buttons[i].contains(Game.mousePoint)){\n gr.setColor(Color.red);\n gr.fillRect((int)buttons[i].getX() , (int)buttons[i].getY()\n , buttons[i].height, buttons[i].width);\n }\n buttons[i].draw(gr, i);\n }\n\n //Draw the stats\n for (int i = 0; i < statsElements.length ; i++) {\n if(i == 0) {\n statsElements[i].drawStats(gr, i + 6, (int) noOfCredits);\n }else if (i ==1){\n statsElements[i].drawStats(gr, i + 6, time);\n }else if( i == 2){\n statsElements[i].drawStats(gr, i + 6, unitsToWin);\n }\n }\n }", "public void draw(Graphics page){\r\n\t\tpage.setColor(Color.RED);\r\n\t\tpage.drawPolygon(this);\r\n\t\t\r\n\t\tif(bDrawQueued){\r\n\t\t\tpage.setColor(Color.GREEN);\r\n\t\t}\r\n\t\t\r\n\t\tdrawFloorName(page);\r\n\t}", "public void draw() {\n background(0); // Color de Fondo - Negro\n // Se mencionan cada una de las funciones a utilizar en la class.\n a.movbolitas1(); // a.funcion es para las funciones principales.\n a.bolita2();\n a.movbolitas();\n a.bolita1();\n a.triangulo();\n a.triangulo1();\n c.movbolitas(); // c.funcion y m.funci\\u00f3n es para las mismas\n // funciones anteriores que se repetir\\u00e1n\n c.bolita1();\n c.movbolitas();\n c.bolita2();\n m.movbolitas();\n m.bolita1();\n m.movbolitas1();\n m.bolita2();\n a.circulos();\n}", "@Override\r\n\tpublic void display(GLAutoDrawable drawable) {\r\n\t\tGL2 gl = drawable.getGL().getGL2();\r\n\t\tgl.glClear(GL2.GL_COLOR_BUFFER_BIT);\r\n\r\n\t\t//points should be in the same zone\r\n\t\tDrawMPL(gl,0,0,30,25);\r\n\t\tDrawMPL(gl,0,0,-100,0);\r\n\t\tDrawMPL(gl,0,0,0,-100);\r\n\t\tDrawMPL(gl,-70,25,30,25);\r\n\t\tDrawMPL(gl,-70,25,-100,0);\r\n\t\tDrawMPL(gl,-70,25,-70,-75);\r\n\t\tDrawMPL(gl,-100,-100,-100,0);\r\n\t\tDrawMPL(gl,-100,-100,0,-100);\r\n\t\tDrawMPL(gl,-100,-100,-70,-75);\r\n\t\tDrawMPL(gl,-70,-75,30,-75);\r\n\t\tDrawMPL(gl,0,-100,30,-75);\r\n\t\tDrawMPL(gl,30,-75,30,25);\r\n\t}", "public void drawElement(GL10 gl){\n\t\tgl.glTranslatef(x, y, 0);\n\t\tbaseDrawElement(gl);\n\t\tgl.glTranslatef(-x, -y, 0);\n//\t\tgl.glColor4f(1, 1, 1, 1);\n\t}", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"Square drawn\");\n\t}", "public void draw(){\n if(isVisible) {\n double diameter = calcularLado(area);\n double side = 2*diameter;\n Canvas circle = Canvas.canvas;\n circle.draw(this, color, \n new Ellipse2D.Double(xPosition, yPosition, \n (int)diameter, side));\n }\n }", "@Override\r\n public void Draw(Graphics g)\r\n {\r\n g.drawImage(image, (int)x, (int)y, width, height, null);\r\n\r\n\r\n ///doar pentru debug daca se doreste vizualizarea dreptunghiului de coliziune altfel se vor comenta urmatoarele doua linii\r\n //g.setColor(Color.blue);\r\n //g.fillRect((int)(x + bounds.x), (int)(y + bounds.y), bounds.width, bounds.height);\r\n }", "public void drawDebug(){\n debugRenderer.setProjectionMatrix(cam.combined);\n debugRenderer.begin(ShapeRenderer.ShapeType.Line);\n\n for (Object e : world.getEnemies()) {\n Enemy enemy = (Enemy)e;\n Rectangle rect = enemy.getBounds();\n float x1 = rect.x;\n float y1 = rect.y;\n debugRenderer.setColor(new Color(1, 0, 0, 1));\n debugRenderer.rect(x1, y1, rect.width, rect.height);\n }\n\n for(Bullet b : world.getPlayer().getWeapon().getBullets()) {\n Rectangle rect = b.getBounds();\n float x1 = rect.x;\n float y1 = rect.y;\n debugRenderer.setColor(new Color(1, 0, 0, 1));\n debugRenderer.rect(x1, y1, rect.width, rect.height);\n }\n\n for(Enemy e : world.getEnemies()) {\n for(Bullet b : e.getWeapon().getBullets()){\n Rectangle rect = b.getBounds();\n float x1 = rect.x;\n float y1 = rect.y;\n debugRenderer.setColor(new Color(1, 0, 0, 1));\n debugRenderer.rect(x1, y1, rect.width, rect.height);\n }\n }\n\n Player player = world.getPlayer();\n Rectangle rect = player.getBounds();\n float x1 = rect.x;\n float y1 = rect.y;\n debugRenderer.setColor(new Color(0, 1, 0, 1));\n debugRenderer.rect(x1, y1, rect.width, rect.height);\n debugRenderer.end();\n }" ]
[ "0.696141", "0.6940534", "0.6810799", "0.67020285", "0.6689721", "0.6689721", "0.6689721", "0.6689721", "0.6544791", "0.645862", "0.64577013", "0.63895863", "0.6324133", "0.6306065", "0.62639827", "0.6229318", "0.6226139", "0.6218318", "0.6214471", "0.6214471", "0.6184675", "0.6159324", "0.6156371", "0.6156371", "0.615416", "0.614596", "0.6143691", "0.6121532", "0.61176944", "0.61140764", "0.61032814", "0.61032814", "0.61032814", "0.6102285", "0.60979086", "0.60979086", "0.60946876", "0.60933995", "0.60825986", "0.6064802", "0.60605574", "0.6047859", "0.6011339", "0.59919196", "0.5982687", "0.59731984", "0.5967626", "0.59557426", "0.5949885", "0.59380543", "0.5919452", "0.5909641", "0.59067094", "0.5897278", "0.5863286", "0.5859742", "0.58535355", "0.5835536", "0.58298784", "0.58289886", "0.58276445", "0.5819843", "0.58186597", "0.58034307", "0.57974434", "0.57974434", "0.57850087", "0.5782783", "0.57810426", "0.5763636", "0.5763135", "0.57590026", "0.5756856", "0.57556695", "0.5754325", "0.5754325", "0.5754325", "0.57381433", "0.5724564", "0.5722", "0.5721577", "0.57190245", "0.5716609", "0.57126707", "0.57097757", "0.57043296", "0.5703214", "0.5694518", "0.5693714", "0.5688337", "0.56804925", "0.5676462", "0.5675166", "0.5674066", "0.56726724", "0.56688994", "0.5666775", "0.56527555", "0.5650402", "0.5641285", "0.5640811" ]
0.0
-1
define if the object is player or enemy, player for 0, enemy for 1
BasicObject(){ posX = -1; posY = -1; velX = 0; velY = 0; accX = 0; accY = 0; classOfObejct = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isVisionary(EntityPlayer player);", "public abstract boolean isPlayer();", "@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }", "public abstract void isUsedBy(Player player);", "@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public boolean isHuman() {\n \t\treturn (type == PLAYER_HUMAN);\n \t}", "int otherPlayer(int player) {\n switch (player) {\n case 0: return 1;\n case 1: return 0;\n default: return 0;\n }\n }", "public void setAlive(boolean alive){\n // make sure the enemy can be alive'nt\n this.alive = alive; \n }", "private int otherPlayer() {\n return (currentPlayer == 1 ? 2 : 1);\n }", "@Override\n public boolean isCollided(gameObject obj){\n return Rect.intersects(obj.getastRect(), getRectplayer1())||\n Rect.intersects(obj.getastRect(), getRectplayer2()) ||\n Rect.intersects(obj.getastRect(), getRectplayer3()) ||\n Rect.intersects(obj.getastRect(), getRectplayer4());\n }", "private boolean checkSeesPlayer(int x, int y) {\r\n\t\tint enemy;\r\n\t\tif (creature.getCreature().team == 1) {\r\n\t\t\tenemy = 2;\r\n\t\t} else if (creature.getCreature().team == 2) {\r\n\t\t\tenemy = 1;\r\n\t\t} else {\r\n\t\t\tenemy = 0; //No enemy\r\n\t\t}\r\n\t\tRectangle r = new Rectangle(); // Location Rectangle\r\n\t\tr.width = Tile.TILEWIDTH;\r\n\t\tr.height = Tile.TILEHEIGHT;\r\n\t\tr.x = x * Tile.TILEWIDTH;\r\n\t\tr.y = y * Tile.TILEHEIGHT;\r\n\t\tfor(Creature c : handler.getWorld().getEntityManager().getCreatures()) {\r\n\t\t\tif (c.getCreature().team == enemy) {\r\n\t\t\t\tif(c.getCollisionBounds(0, 0).intersects(r)) {\r\n\t\t\t\t\tseenEnemy = c;\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean whoIsHere(){\r\n\t\treturn otherPlayer;\r\n\t}", "public void basicEnemyAI(){\n if(enemyMana == enemyManaMax){\n applyCard(enemyPlayCard(), \"enemy\");\n }\n }", "protected abstract boolean isPlayerActivatable(PlayerSimple player);", "@Override\n\tpublic boolean movable(Entity obj) {\n\t\tif (!(obj instanceof Player)) return false;\n\t\tPlayer player = (Player) obj;\n\t\t\n\t\tint futureX = this.getX();\n\t\tint futureY = this.getY();\n\t\t\n\t\t\n\t\tint playerX = player.getX();\n\t\tint playerY = player.getY();\n\t\t\n\t\tif (playerX == this.getX()) {\n\t\t\t// player moving either up or down\n\t\t\tif (playerY > this.getY()) {\n\t\t\t\t// player moving up so check what's up of boulder\n\t\t\t\tfutureY = this.getY() - 1;\n\t\t\t} else {\n\t\t\t\t// player moving down ''\n\t\t\t\tfutureY = this.getY() + 1;\n\t\t\t}\n\t\t} else if (playerY == this.getY()) {\n\t\t\t// player moving either left or right\n\t\t\tif (playerX > this.getX()) {\n\t\t\t\t// player moving left ''\n\t\t\t\tfutureX = this.getX() - 1;\n\t\t\t} else {\n\t\t\t\t// player moving right ''\n\t\t\t\tfutureX = this.getX() + 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean result = checkMoveable(futureX, futureY);\n\t\treturn result;\n\t}", "void useInBattle(PlayerCharacter player, Opponent enemy) {\n\t}", "boolean isPlayableInGame();", "public abstract boolean isPossible(Player p);", "public abstract boolean attack(Enemy w);", "@Override\n public boolean isChasingPlayer()\n {\n return(chasingPlayer);\n }", "@Override\n\tpublic void interact(Entity obj) {\n\t\tif (!(obj instanceof Player)) return;\n\t\t\n\t\tPlayer player = (Player) obj;\n\t\t\n\t\tint playerX = player.getX();\n\t\tint playerY = player.getY();\n\t\t\n\t\tif (playerX == this.getX()) {\n\t\t\tif (playerY > this.getY()) this.moveUp();\n\t\t\telse {\n\t\t\t\tthis.moveDown();\n\t\t\t}\n\t\t} else if (playerY == this.getY()) {\n\t\t\tif (playerX > this.getX()) this.moveLeft();\n\t\t\telse {\n\t\t\t\tthis.moveRight();\n\t\t\t}\n\t\t}\t\t\n\t}", "public boolean isPlayer() {\n return player != null;\n }", "public boolean hitObject(BasicObject oppose){\n if (oppose.classOfObejct != classOfObejct){\n if (abs(posX - oppose.posX) < (wid / 2 + oppose.wid/2) && abs(posY - oppose.posY) < (hei / 2 + oppose.hei/2)){\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "private boolean handleCollisionWithAntOrNest()\n {\n ArrayList<GameObject> collisions = this.getCollisions();\n if(!collisions.isEmpty() && (collisions.get(0) instanceof Ant || collisions.get(0) instanceof Nest))\n {\n this.opponent = collisions.get(0);\n return true;\n }\n\n return false;\n }", "public static void genericCombat(GameObject a, GameObject b) {\n if(a instanceof Player && b instanceof EnemyObject) combatPlayer((Player)a,(EnemyObject)b);\n else if(a instanceof EnemyObject && b instanceof Player) combatEnemy((EnemyObject)a,(Player) b); \n }", "public boolean isBot() {\n \t\treturn (type == PLAYER_BOT);\n \t}", "interface Player {\n /**\n * player playing as hare\n */\n int PLAYER_TYPE_HARE = 100;\n\n /**\n * player playing as hound\n */\n int PLAYER_TYPE_HOUND = 101;\n }", "@SuppressWarnings(\"unchecked\")\n \tpublic static boolean isMinecraftPlayer(final Object obj) {\n \t\treturn getEntityPlayerClass().isAssignableFrom(obj.getClass());\n \t}", "@Override\n public int getType() {\n return Enemy.TYPEA;\n }", "@Override\n public boolean canInteractWith(EntityPlayer player)\n {\n return teKeeper.isUsableByPlayer(player);\n }", "public boolean activeFor(String player);", "@Override\n public boolean gameOver() {\n return player1Wins() || player2Wins();\n }", "private boolean isTargetingPlayer(Entity entity) {\n if (!plugin.getConfiguration().relativeAgeEnabled()) return false;\n if (entity instanceof Creature) {\n Creature creature = (Creature) entity;\n if (creature.getTarget() != null && creature.getTarget().getType().equals(EntityType.PLAYER)) {\n lastTargeted.put(entity.getUniqueId(), entity.getTicksLived());\n return true;\n }\n }\n return false;\n }", "public Boolean physinteractor(int x, int y) {\n \tNextMoveY = y;\n \tNextMoveX =x;\n \tList<Entity> entities = new ArrayList<Entity>();\n \tentities = dungeon.checkEntity(x, y);\n \tEntity entity = null;\n \tfor(Entity z:entities) {\n \t\tif(!z.transparency()) {\n \t\t\tentity = z;\n \t\t\tbreak;\n \t\t}\n \t}\n \tif(!(entity instanceof Wall)) {\n\t \tif(entity instanceof Door) {\n\t \t\t//System.out.println(\"BAHAHAHAHA\");\n\t \t\tif(this.getkey() !=null) {\n\t \t\t\tthis.getkey().interaction(this);\n\t \t\t}\n\t \t}else {\n\t\t \tPhysicalEntities phye = (PhysicalEntities) entity;\n\t\t \t\n\t \t\tif(phye.playeradjacent(this)) {\n\t \t\t\treturn true;\n\t \t\t}\n\t\t \n\t \t}\n \t}\n \treturn false;\n }", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "boolean canRobPlayer(HexLocation location, int victimIndex);", "public static void setEnemyOne(boolean state)\r\n\t{\r\n\t\tenemyOne = state;\r\n\t}", "public boolean isActiveMember() {\n return member instanceof HumanMember || member instanceof AiMember;\n }", "boolean isMultiplayer();", "int attack(Unit unit, Unit enemy);", "boolean isPlayerTurn();", "public void checkEnemy() {\n\t\tif (enemy != null)\n\t\tif (Integer.parseInt(getCurrentPositionX()) == enemy.getCurrentPositionX() && Integer.parseInt(getCurrentPositionY()) == enemy.getCurrentPositionY()) {\n\t\t\tx = spawnX;\n\t\t\ty = spawnY;\n\t\t}\n\t}", "public Enemy getEnemy(int whichEnemy);", "public boolean isOnPlayerOne() {\r\n\t\treturn onTraderOne;\r\n\t}", "public boolean func_75145_c(EntityPlayer par1EntityPlayer) { return true; }", "private boolean detectCollisions(GameState mGaemState,ArrayList<GameObject> objects,SoundEngine se,ParticleSystem ps){\n boolean playerHit = false;\n for (GameObject go1:objects){\n if (go1.checkActive()){\n //the 1st object is active\n //so worth checking\n\n for (GameObject go2:objects){\n if (go2.checkActive()){\n //the 2nd object is active\n //so worth checking\n if (RectF.intersects(go1.getTransform().getCollider(),go2.getTransform().getCollider())){\n\n //switch goes here\n //there has been a collision\n //but does it matter?\n switch (go1.getTag() + \" with \" + go2.getTag()){\n case \"Player with Alien Laser\":\n playerHit = true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player with Alien\":\n playerHit =true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player Laser with Alien\":\n mGaemState.increaseScore();\n //respawn the alien\n ps.emitParticles(new PointF(go2.getTransform().getLocation().x,go2.getTransform().getLocation().y));\n go2.setInactive();\n go2.spawn(objects.get(Level.PLAYER_INDEX).getTransform());\n go1.setInactive();\n se.playAlienExplode();\n\n break;\n\n default:\n break;\n }\n\n }\n }\n }\n }\n }\n return playerHit;\n }", "public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }", "private boolean isInDoor(Entity player){\n Sprite playerSprite= (Sprite) player.getComponent(Sprite.class);\n for(int i = 0; i<Main.colliderWallMap.size(); i++){\n if(Main.colliderWallMap.get(i).intersects(playerSprite.getValue().getX(), playerSprite.getValue().getY(),playerSprite.getValue().getWidth(), playerSprite.getValue().getHeight())){\n return false;\n }\n }\n\n return true;\n }", "public boolean isPlayerInThisGame(Player player) {\n return player.equals(getRedPlayer()) || player.equals(getWhitePlayer());\n }", "public static void spawnEnemy(){\n RNG.D100();\n if(PlayerStats.LVL <= 2){\n if(RNG.num <= 90){\n enemy = \"imp\";\n }else{\n enemy = \"IMP LORD\";\n }\n }else if(PlayerStats.LVL > 2 && PlayerStats.LVL <= 3){\n if(RNG.num <= 20){\n enemy = \"imp\";\n }else if(RNG.num > 20 && RNG.num <= 90){\n enemy = \"toadman\";\n }else{\n enemy = \"IMP LORD\";\n }\n }else if(PlayerStats.LVL > 3 && PlayerStats.LVL <= 5){\n if(RNG.num <= 10){\n enemy = \"toadman\";\n }else if(RNG.num > 10 && RNG.num <= 90){\n enemy = \"giant spider\";\n }else{\n enemy = \"BROODMOTHER\";\n }\n }else if (PlayerStats.LVL > 5 && PlayerStats.LVL <= 8){\n if(RNG.num <= 30){\n enemy = \"goblin sorceror\";\n }else if(RNG.num > 30 && RNG.num <= 60){\n enemy = \"goblin warrior\";\n }else if(RNG.num >60 && RNG.num <= 90){\n enemy = \"goblin archer\";\n }else if(RNG.num > 90 && RNG.num <= 100){\n enemy = \"GOBLIN CHIEFTAN\"; \n }\n } \n }", "public boolean getPlayerOne()\n\t{\n\t\treturn playerOne;\n\t}", "public static boolean isEnemyProtoss() {\n return AtlantisGame.enemy().getRace().equals(RaceTypes.Protoss);\n }", "public boolean canMine(EntityPlayer player, int X, int Y, int Z);", "private boolean rightCollision(InteractiveObject obj){\n\t\treturn rightUpCollision(obj) || rightDownCollision(obj);\n\t}", "private PlayerType GetOpponent(PlayerType current) {\n return current == PlayerType.One ? PlayerType.Two : PlayerType.One;\n }", "public static void setEnemyTwo(boolean state)\r\n\t{\r\n\t\tenemyTwo = state;\r\n\t}", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "public boolean isUseableByPlayer(EntityPlayer p_70300_1_)\n {\n return true;\n }", "public boolean isActor() {\r\n \t\treturn (actor != null);\r\n \t}", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "public void playEnemy(){\n // System.out.println(\"staaaaaaaaaaaaaaaaaaaaar\"+character.getBlock());\n for(int i = 0 ; i < enemyController.getSize() ; i++){\n if (! enemies.get(i).isDead())\n effectHandler.playEnemy( i );\n }\n for( int i = 0 ; i < enemyController.getSize() ; i++){\n if (! enemies.get(i).isDead())\n effectHandler.endEnemyTurn(i);\n }\n\n }", "@Override\n\tpublic boolean isUseableByPlayer(EntityPlayer player){\n\t return worldObj.getTileEntity(xCoord, yCoord, zCoord) != this ? false : player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64.0D;\n\t}", "private boolean isAdventureMode(EntityPlayer player) {\n\t\t/*if(player.worldObj.isRemote) {\n\t\t\treturn isAdventureMode_Client(player);\n\t\t}*/\n\t\t//return !player.worldObj.isRemote && ((EntityPlayerMP) player).theItemInWorldManager.getGameType().isAdventure();\n\t\treturn !(player instanceof FakePlayer) && !player.worldObj.isRemote && ((EntityPlayerMP) player).theItemInWorldManager.getGameType() != GameType.CREATIVE && !player.canCommandSenderUseCommand(2, \"cv\");\n\t}", "public boolean isOwner(EntityPlayer player) {\n\t\treturn player.getDisplayName().equals(owner) /*|| Platform.worldType() != Platform.WorldMode.MP*/;\r\n\t}", "public int playerFlagFor(PlayerController player)\n {\n if (player == player1) {\n return PLAYER_1_FLAG;\n } else if (player == player2) {\n return PLAYER_2_FLAG;\n } else {\n return UNKNOWN_PLAYER_FLAG;\n }\n }", "private void SetPlayerAndEnemy(int stage) {\n // screen size\n Point screen = GameView.GetScreenSize();\n int countMax[] = new int[2];\n // to diverge the initialization from selected stage.\n switch(stage) {\n case Play.STAGE_OFF_ROAD:\n // Player\n // loading the file\n this.mPlayer.LoadCharaImage(this.mContext,\"offroadplayer\");\n this.mPlayer.mSize.x = OffroadPlayer.PLAYER_SIZE.x;\n this.mPlayer.mSize.y = OffroadPlayer.PLAYER_SIZE.y;\n this.mPlayer.mPos.x = (screen.x-this.mPlayer.mSize.x)>>1;\n this.mPlayer.mPos.y = screen.y+100;\n this.mPlayer.mMoveX = 0.0f;\n this.mPlayer.mMoveY = PLAYER_DEFAULT_SPEED*-1;\n this.mPlayer.mExistFlag = true;\n countMax[0] = 2;\n // Enemy that is jump point\n this.mEnemy.LoadCharaImage(this.mContext,\"offroadjump\");\n this.mEnemy.mSize.x = OffroadObstacles.OBSTACLE_JUMP_POINT_SIZE.x;\n this.mEnemy.mSize.y = OffroadObstacles.OBSTACLE_JUMP_POINT_SIZE.y;\n this.mEnemy.mPos.x = screen.x+100;\n this.mEnemy.mPos.y = 600;\n this.mEnemy.mMoveX = ENEMY_DEFAULT_SPEED*-1;\n this.mEnemy.mMoveY = 0.0f;\n this.mEnemy.mType = Play.STAGE_OFF_ROAD;\n this.mEnemy.mExistFlag = true;\n countMax[1] = 0;\n break;\n case Play.STAGE_ROAD:\n // loading the file\n this.mPlayer.LoadCharaImage(this.mContext,\"roadplayer\");\n this.mPlayer.mSize.x = RoadPlayer.RUNNER_SIZE.x;\n this.mPlayer.mSize.y = RoadPlayer.RUNNER_SIZE.y;\n this.mPlayer.mPos.x = (screen.x-this.mPlayer.mSize.x)>>1;\n this.mPlayer.mPos.y = screen.y+100;\n this.mPlayer.mMoveX = 0.0f;\n this.mPlayer.mMoveY = PLAYER_DEFAULT_SPEED*-1;\n this.mPlayer.mExistFlag = true;\n countMax[0] = 4;\n // Enemy that is hurdle\n this.mEnemy.LoadCharaImage(this.mContext,\"roadhurdle\");\n this.mEnemy.mSize.x = RoadObstacles.HURDLE_SIZE.x;\n this.mEnemy.mSize.y = RoadObstacles.HURDLE_SIZE.y;\n this.mEnemy.mPos.x = screen.x+100;\n this.mEnemy.mPos.y = 600;\n this.mEnemy.mMoveX = ENEMY_DEFAULT_SPEED*-1;\n this.mEnemy.mMoveY = 0.0f;\n this.mEnemy.mType = Play.STAGE_ROAD;\n this.mEnemy.mExistFlag = true;\n countMax[1] = 0;\n break;\n case Play.STAGE_SEA:\n // loading the file\n this.mPlayer.LoadCharaImage(this.mContext,\"swimmer\");\n this.mPlayer.mSize.x = SeaPlayer.SWIMMER_SIZE.x;\n this.mPlayer.mSize.y = SeaPlayer.SWIMMER_SIZE.y;\n this.mPlayer.mPos.x = -100;\n this.mPlayer.mPos.y = PLAYER_ARRIVE_POSITION_Y;\n this.mPlayer.mMoveX = PLAYER_DEFAULT_SPEED;\n this.mPlayer.mMoveY = 0.0f;\n this.mPlayer.mExistFlag = true;\n countMax[0] = 3;\n // Enemy that is sunfish\n this.mEnemy.LoadCharaImage(this.mContext,\"sunfish\");\n this.mEnemy.mSize.x = SeaEnemyManager.SUNFISH_SIZE.x;\n this.mEnemy.mSize.y = SeaEnemyManager.SUNFISH_SIZE.y;\n this.mEnemy.mPos.x = screen.x+100;\n this.mEnemy.mPos.y = 600;\n this.mEnemy.mMoveX = ENEMY_DEFAULT_SPEED*-1;\n this.mEnemy.mMoveY = 0.0f;\n this.mEnemy.mType = Play.STAGE_SEA;\n this.mEnemy.mExistFlag = true;\n countMax[1] = SeaEnemyManager.ANIMATION_COMMON_COUNT_MAX;\n break;\n }\n // animation setting\n // player\n this.mPlayerAni.SetAnimation(\n 0,0,\n this.mPlayer.mSize.x,\n this.mPlayer.mSize.y,\n countMax[0],10,0\n );\n // except for off-road and road, enemy\n if (stage == Play.STAGE_SEA) {\n this.mEnAni.SetAnimation(\n 0, 0,\n this.mEnemy.mSize.x, this.mEnemy.mSize.y,\n countMax[1], 10, 0\n );\n }\n }", "public boolean hitObject(BasicObject obj){\n if(abs(obj.posX - posX) < obj.wid/ 2 && abs(obj.posY - posY) < obj.hei/ 2){\n return true;\n }\n else{\n return false;\n }\n }", "boolean isPlayable();", "public default boolean isAffectingEntity(SpellData dataIn, LivingEntity entityIn){ return false;}", "public boolean GameOver() {\r\n if(Main.player1.SuaVida()==0 || Main.player2.SuaVida()==0)\r\n return true;\r\n return false;\r\n }", "boolean isGameOver() {\n return getMenu() instanceof ch;\n }", "public boolean meTurn(){\n return (isWhite && isWhitePlayer) || (!isWhite && !isWhitePlayer);\n }", "public abstract boolean gameIsOver();", "@Override\r\n\tpublic void efectoPersonaje(Jugador uno) {\r\n\t\tthis.player = uno;\r\n\t\tSystem.out.println(\"Efecto\" + activado);\r\n\t\tif (activado) {\r\n\r\n\t\t\tactivarContador = true;\r\n\t\t\tSystem.out.println(\"EMPEZO CONTADOR\");\r\n\r\n\t\t\tif (player instanceof Verde) {\r\n\t\t\t\tSystem.out.println(\"FUE JUGADOR VERDE\");\r\n\t\t\t\tplayer.setBoost(3);\r\n\t\t\t} else if (player instanceof Morado) {\r\n\t\t\t\tSystem.out.println(\"FUE JUGADOR MORADO\");\r\n\t\t\t\tplayer.setBoost(3);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean playerCollideTest(PlayerObject player)\n {\n if (this.isTouchable)\n {\n return true;\n\n }\n else return false;\n }", "public boolean isProjectile();", "public String playerNear(){\r\n\t\tif(AdventureManager.toon.x + 25 > x-200 && AdventureManager.toon.x +25 < x) return \"left\";\r\n\t\telse if(AdventureManager.toon.x +25 < x+250 && AdventureManager.toon.x +25 > x) return \"right\";\r\n\t\telse return \"n\";\r\n\t}", "@java.lang.Override\n public boolean hasOpponent() {\n return opponent_ != null;\n }", "public boolean isOver() {\n \treturn status == GameStatus.victory || status == GameStatus.draw || status == GameStatus.quit;\n }", "public boolean isPlayer1() {\n\t\treturn currentPlayer.equals(player1);\n\t}", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "public boolean getAttack(IEntity enemyUnit){\n return tempUnit.getAttack(enemyUnit);\n }", "private boolean isEnemyOccupied(int x, int y) {\n for (int i = 0; i < player.own.length; i++) {\n if (player.enemy[i].x == x && player.enemy[i].y == y) {\n System.out.println(\"enemy occupied:\" + i);\n return true;\n }\n }\n return false;\n }", "private void setEnemy(){\n depths.setEnemy(scorpion);\n throne.setEnemy(rusch);\n ossuary.setEnemy(skeleton);\n graveyard.setEnemy(zombie);\n ramparts.setEnemy(ghoul);\n bridge.setEnemy(concierge);\n deathRoom1.setEnemy(ghost);\n deathRoom2.setEnemy(cthulu);\n deathRoom3.setEnemy(wookie); \n }", "public boolean isEnemy(Piece piece) {\n\t\treturn piece == null ? false : piece.team != this.team;\n\t}", "public boolean getAI(){return ai;}", "public PlayerState getEnemy()\n {\n if(this.turnOfPlayer == playerBlack)\n {\n return playerWhite;\n }\n return playerBlack;\n }", "@Override\n\tpublic boolean isUseableByPlayer(EntityPlayer player) {\n\t\treturn true;\n\t}", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "@Override\n\t\t\tpublic void handle(long now) {\n\t\t\t\tif(flagD && !flagA) {\n\t\t\t\t\tplayer.velocityX = 1;\n\t\t\t\t} else if(flagA && !flagD) {\n\t\t\t\t\tplayer.velocityX = -1;\n\t\t\t\t} else if(flagD && flagA) {\n\t\t\t\t\tplayer.velocityX = 1;\n\t\t\t\t} else if(!flagA && !flagD) {\n\t\t\t\t\tplayer.velocityX = 0;\n\t\t\t\t}\n\t\t\t\t//Flags W & S\n\t\t\t\tif(flagS && !flagW) {\n\t\t\t\t\tplayer.velocityY = 1;\n\t\t\t\t} else if(flagW && !flagS) {\n\t\t\t\t\tplayer.velocityY = -1;\n\t\t\t\t} else if(flagS && flagW) {\n\t\t\t\t\tplayer.velocityY = 1;\n\t\t\t\t} else if(!flagW && !flagS) {\n\t\t\t\t\tplayer.velocityY = 0;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tplayer.velocityX = 0;\n\t\t\t\t\tplayer.velocityY = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tplayer.setTranslateX(player.getTranslateX() + player.velocityX);\n\t\t\t\tplayer.setTranslateY(player.getTranslateY() + player.velocityY);\n\t\t\t\t\n\t\t\t\tif(collision(player, player2)) {\n\t\t\t\t\tplayer.setFill(Color.YELLOW);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayer.setFill(Color.BLACK);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "private boolean playerDetection() {\n\t\tAxisAlignedBB axisalignedbb = new AxisAlignedBB(posX, posY, posZ, posX + 1, posY + 1, posZ + 1).grow(DETECTION_RANGE);\n\t\tList<EntityPlayer> list = world.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb);\n\n\t\treturn !list.isEmpty();\n\t}", "public boolean isControlledByPlayer(Player player) {\r\n if (territories == null) {\r\n return false;\r\n }\r\n\r\n for (Territory territory : territories) {\r\n if (!territory.getPlayer().equals(player)) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "public int isSafe(){\n int nbEnnemies = 0;\n List<Player> players = state.getPlayers();\n Player currentPlayer = state.getCurrentPlayer();\n for(Player p : players){\n if(!p.equals(currentPlayer)) {\n nbEnnemies += currentPlayerReachable(state.getCurrentPlayer(), p);\n //nbEnnemies += manhattan(currentPlayer, p); //naive version\n }\n }\n return nbEnnemies;\n }", "public void checkIfOtherType(Entity[][] map, int y, int x){\r\n if (map[y][x] instanceof Sheep){\r\n Ecosystem.sheepCount --;\r\n }\r\n else if (map[y][x] instanceof Grass){\r\n Ecosystem.grassCount --;\r\n }\r\n else if (map[y][x] instanceof Wolf){\r\n Ecosystem.wolfCount --;\r\n }\r\n }", "public boolean isUseableByPlayer(EntityPlayer entityPlayer)\n {\n return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) == this &&\n entityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D,\n (double) this.zCoord + 0.5D) <= 64.0D;\n }", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "protected boolean isAIEnabled()\n {\n return true;\n }", "@SuppressWarnings(\"unchecked\")\n \tpublic static boolean isMinecraftEntity(final Object obj) {\n \t\treturn getEntityClass().isAssignableFrom(obj.getClass());\n \t}", "private boolean isObjectAPaddle(GObject collider) {\n return (collider == paddle);\n }", "int defend(Unit unit, Unit enemy);" ]
[ "0.6681166", "0.66337013", "0.630971", "0.62420034", "0.6215757", "0.62056446", "0.61346555", "0.6133545", "0.6123187", "0.6085249", "0.5935208", "0.5931599", "0.5922821", "0.5921279", "0.591954", "0.5905092", "0.5904284", "0.5886759", "0.5884431", "0.58490956", "0.5818318", "0.57931614", "0.5788181", "0.5740562", "0.5708214", "0.56990767", "0.5696858", "0.5689661", "0.56592536", "0.5651342", "0.5649256", "0.5648581", "0.56445307", "0.56410664", "0.56409967", "0.5637014", "0.5622441", "0.56141627", "0.5612489", "0.5608976", "0.56034386", "0.5602904", "0.5599888", "0.5591353", "0.55857235", "0.55851763", "0.5579439", "0.557797", "0.5570311", "0.5568934", "0.55579275", "0.5547789", "0.554567", "0.5543016", "0.55424297", "0.5518148", "0.5516276", "0.55143845", "0.5511351", "0.54995507", "0.5497237", "0.5495681", "0.548919", "0.5480273", "0.54679406", "0.54618126", "0.5456446", "0.5455121", "0.54315335", "0.5430614", "0.54290825", "0.54290324", "0.5420988", "0.5419448", "0.5418442", "0.5411236", "0.5410167", "0.5410005", "0.54026514", "0.5395037", "0.5394607", "0.5389911", "0.53862685", "0.53861505", "0.5377583", "0.537538", "0.5374952", "0.53676033", "0.53539646", "0.5352365", "0.5352241", "0.53501236", "0.5340386", "0.53325784", "0.5330426", "0.5328864", "0.5322835", "0.5310378", "0.5307099", "0.53049845", "0.5300447" ]
0.0
-1
constructor which defines the position, velocity and acceleration of the plane pos, vel, acc defines the basic index of the plane classOfObject defines if the object belongs to player or the enemy
BasicObject(int posX,int posY,int velX,int velY, int accX, int accY, int classOfObejct){ this.posX = posX; this.posY = posY; this.velX = velX; this.velY = velY; this.accX = accX; this.accY = accY; this.classOfObejct = classOfObejct; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BasicObject(){\n posX = -1;\n posY = -1;\n velX = 0;\n velY = 0;\n accX = 0;\n accY = 0;\n classOfObejct = 0;\n }", "public Plane() {\r\n\t\tvecX = new Vector3D();\r\n\t\tvecY = new Vector3D();\r\n\t\tnorm = new Vector3D();\r\n\t\tthis.setD(0);\r\n\t\tpos = new Position3D();\r\n\t}", "void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n // Multiplying by 0 sets the all the components to 0\n acc.mult(0);\n}", "Thing(PVector a, PVector v, PVector l, float m_) {\n acc = a.get();\n vel = v.get();\n loc = l.get();\n mass = m_;\n max_vel = 20.0f;\n }", "public Airplane(){\n\t\tsuper(106, 111);\n\t\tspeed = Math.random() + 2.0;\n\t}", "public Plane(double a, double b, double c, double d) {\n this.a = a;\n this.b = b;\n this.c = c;\n this.d = d;\n }", "void setAcceleration(double acc) {\r\n if (acc * ACCELERATION_COST_FACTOR <= energy) {\r\n rAcc = acc;\r\n xAcc = rAcc * Math.cos(orientation);\r\n yAcc = rAcc * Math.sin(orientation);\r\n }\r\n }", "public void move(int accX,int accY){\n this.accX = accX;\n this.accY = accY;\n velX = velX + accX;\n velY = velY + accY;\n }", "public AdsbPlane(int icao) {\r\n\t\tmIcao = icao;\r\n\t\tmCprs[0] = new CprRec();\r\n\t\tmCprs[1] = new CprRec();\r\n\t}", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "public Enemy(Texture tex) \r\n\t{\r\n\t\tsuper(tex);\r\n\t\tm_type = \"enemy\";\r\n\t\tm_controller = new IAController();\r\n\t\tm_weapon = new AttackEmitter();\r\n\t\t\r\n\t\tm_lifeBar.setScale(new Vector2(0.3f,0.3f));\r\n\t\t\r\n\t\tm_speed = 50;\r\n\t\tm_life = 4;\r\n\t\t\r\n\t}", "public Plane(Vector3D vecX, Vector3D vecY, Position3D pos) {\r\n\t\tthis.vecX = vecX.normalize();\r\n\t\tthis.vecY = this.vecX.perp(vecY).normalize();\r\n\t\tthis.norm = this.vecX.cross(this.vecY);\r\n\t\tthis.pos = pos;\r\n\t\tthis.setD(norm.dot(this.pos.toVec()));\r\n\t}", "public Plane(Point origin, Vector normal, Color c) {\n\t\tthis.origin = origin;\n\t\tthis.normal = normal;\n\n\t\tthis.c = c;\n\t}", "private static Vector2 calculateAcceleration(PhysicsGameObject obj){\n Vector2 gravity = gravityForce(obj);\n Vector2 friction = frictionForce(obj);\n return new Vector2(friction.x + gravity.x,friction.y + gravity.y);\n }", "Player(int posX,int posY,int velX,int velY, int accX, int accY,int attack,int health, int numOfBomb, int sInterval){\n this.posX = posX;\n this.posY = posY;\n this.velX = velX;\n this.velY = velY;\n this.accX = accX;\n this.accY = accY;\n this.health = health;\n this.numOfBomb = numOfBomb;\n this.attack = attack;\n this.sInterval = sInterval;\n invincibleTime = 0;\n invincible = false;\n wid = 300/4;\n hei = 400/4;\n classOfObejct = 0;\n alive = true;\n }", "public Airplane() { \n\n\t\t//The Airplane constructor calls the Flyingobject constructor\n\t\tsuper();\n\n\t\t//Sets its attributes to default values\n\t\tthis.brand = \"\";\n\t\tthis.price = 0.0; \n\t\tthis.horsePower = 0; \n\t}", "public Airplane (){\n \n }", "public Space_Object(int xPos, int yPos, int xVel, int yVel, int objectDiameter, Color objectColor, Universe theUniverse)\n {\n xPosition = xPos;\n yPosition = yPos;\n xSpeed = xVel;\n ySpeed = yVel;\n color = objectColor;\n diameter = objectDiameter;\n universe = theUniverse;\n groundPosition = universe.getGround();\n lifeTime = 1000000;\n destroyed = false;\n //degrees = 1;\n \n }", "public PlayerObject(Vector r, Vector v, double mass) {\n super(r, v, mass);\n this.cam = new Camera(this, DEFAULT_FOV);\n this.rot = 0;\n }", "public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }", "Bullet(int posX,int posY,int velX,int velY,int classOfObejct,int attack){\n this.posX = posX;\n this.posY = posY;\n this.velX = velX;\n this.velY = velY;\n this.classOfObejct = classOfObejct;\n this.attack = attack;\n\n }", "public Plane(Point spawnPoint, boolean flyingHorizontally, Level parentLevel){\n // Initialize the variables for the plane\n this.flyingHorizontally = flyingHorizontally;\n this.drawOps = new DrawOptions();\n this.planeImage = new Image(\"res/images/airsupport.png\");\n this.parentLevel = parentLevel;\n this.isFinished = false;\n this.bombs = new ArrayList<>();\n\n // Initialize the timekeeper that will control when a bomb should be dropped\n // '1' is added to the RNG here as the upper bound is not inclusive\n int initialDropTime = ThreadLocalRandom.current().nextInt(DROP_TIME_LOWER_BOUND,DROP_TIME_UPPER_BOUND + 1);\n this.bombDropper = new Timekeeper(initialDropTime);\n this.justDropped = false;\n // The Plane can either fly horizontally or vertically, which is specified in its constructor\n if (flyingHorizontally){\n // Set the plane facing to the right, at the leftmost point of the window and at the correct\n // height given by the spawn position\n this.currPos = new Point(0, spawnPoint.y);\n this.drawOps.setRotation(Math.PI/2);\n this.flyingHorizontally = true;\n }\n else {\n // Set the plane facing downward, at the top of the window and at the correct\n // x co-ordinate given by the spawn position\n this.currPos = new Point(spawnPoint.x, 0);\n this.drawOps.setRotation(Math.PI);\n this.flyingHorizontally = false;\n }\n }", "public void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n acc.mult(0);\n }", "public Plane(Point a, Point b, Point c, Color colour) {\n\t\torigin = a;\n\t\tnormal = new Vector(a, b).crossProduct(new Vector(a, c));\n\n\t\tthis.c = colour;\n\t}", "public PaperAirplane (int x, int y)\n\t{\n\t\tsuper (x, y);\t//Superclass called to set x and y\n\t\t\n\t\txPoints = new int [3];\t//sets xPoints to have 3 elements\n\t\tyPoints = new int [3];\t//sets yPoints to have 3 elements\n\t\t\n\t\t//Using the getX_Pos () set in the superclass, the following sets the\n\t\t//xDimensions.\n\t\txDimension1 = getX_Pos () - 23;\n\t\txDimension2 = getX_Pos () - 18;\n\t\txDimension3 = getX_Pos () + 22;\n\t\t\n\t\t//Using the getY_Pos () set in the superclass, the following sets the\n\t\t//yDimensions.\n\t\tyDimension1 = getY_Pos() - 2;\n\t\tyDimension2 = getY_Pos() - 17;\n\t\tyDimension3 = getY_Pos() + 5;\n\t\t\n\t\t//The following sets the same dimensions from above, but these never\n\t\t//change and can be used for reconstruction\n\t\trXD1 = getX_Pos () - 23;\n\t\trXD2 = getX_Pos () - 18;\n\t\trXD3 = getX_Pos () + 22;\n\t\trYD1 = getY_Pos() - 2;\n\t\trYD2 = getY_Pos() - 17;\n\t\trYD3 = getY_Pos() + 5;\n\t}", "public TypeA(float x, float y, Player player) {\n super(x, y, TYPE_A_WIDTH, TYPE_A_HEIGHT, player);\n stateTime = 0;\n speed = 100;\n\n //initial vel = towards player\n float xx = player.position.x - position.x;\n float yy = player.position.y - position.y;\n velocity.set(xx, yy);\n velocity.normalize();\n velocity.mult(speed);\n }", "public static void setAcceleration(ArrayList<Inertial> someoneJointPos, ArrayList<InertialAcc> inertial_acc, double thresholdInertialAcc) {\r\n\t\t//(t-1) Velocity data per segment are calculated into (t-2) Acceleration data per segment ( t=4 as default)\r\n\t\tdouble[]acc = new double[3];\r\n\t\t\r\n\t\tfor (int i = 0; i < someoneJointPos.size(); i++) {\r\n\t\t\tacc[0] = someoneJointPos.get(i).getRight_wrist()[0];\r\n\t\t\tacc[1] = someoneJointPos.get(i).getRight_wrist()[1];\r\n\t\t\tacc[2] = someoneJointPos.get(i).getRight_wrist()[2];\r\n\t\t\t\r\n\t\t\tif(Math.abs(acc[0]) < thresholdInertialAcc)\r\n\t\t\t\tacc[0] = 0;\r\n\t\t\tif(Math.abs(acc[1]) < thresholdInertialAcc)\r\n\t\t\t\tacc[1] = 0;\r\n\t\t\tif(Math.abs(acc[2]) < thresholdInertialAcc)\r\n\t\t\t\tacc[2] = 0;\r\n\t\t\t\r\n\t\t\tinertial_acc.add(new InertialAcc(acc[0], acc[1], acc[2]));\r\n\t\t}\r\n\t}", "Plane getPlane();", "public CourtMovement() {\r\n\t\tsuper();\r\n\t\tstart = 0;\r\n\t\tend = 0;\r\n\t}", "public Plane3(Plane3 p) {\n this.a = p.a; this.b = p.b; this.c = p.c; this.v = p.v; this.d = p.d;\n }", "public static void setForwardAcceleration(int acc) {\n LEFT_MOTOR.setAcceleration(acc);\n RIGHT_MOTOR.setAcceleration(acc);\n }", "public FoodMoodStatsController(NavController navCntrl){\n System.out.println(\"FoodMoodStatsController Class Instantiated.\");\n this.navCntrl= navCntrl;\n }", "public CheckPlane( Vector p, Vector n, Vector o )\n\t{\n\t\tsuper(p,n,new Color());\n\t\tsetOrientation(o);\n\t\tsetColor( new Color(0.01,0.01,0.01), new Color(0.99,0.99,0.99) );\n\t}", "public Plane(Point a, Point b, Point c) {\n\t\tthis(a, b, c, new Color((int) (Math.random() * 256),\n\t\t\t\t(int) (Math.random() * 256), (int) (Math.random() * 256)));\n\t}", "public Actor(GameEngine e) {\r\n\t\tvelocity = new Point2D.Float(0, 0); // speed in pixels/s\r\n\t\tcenter = new Point2D.Float(0, 0);\r\n\t\tsize = new Point2D.Float(0, 0);\r\n\t\tacceleration = new Point2D.Float(0, 0);\r\n\t\tmaxVelocity = new Point2D.Float(Integer.MAX_VALUE, Integer.MAX_VALUE);\r\n\t\tdeath = false;\r\n\t\tengine = e;\r\n\t\tbasePoly = new Polygon();\r\n\t\thealth = 0;\r\n\t\tdir = 0;\r\n\t\tmaxHealth = 0;\r\n\t\t_checkInvariant();\r\n\t}", "public Flight(Plane plane, String flightNo, String airlineName) {\n this.airlineName = airlineName;\n this.flightNo = flightNo;\n this.plane = plane;\n }", "public EvmUnitData(Date date, double pv, double ev, double ac, double bac) {\n\t\tthis.date = date;\n\t\tthis.pv = pv;\n\t\tthis.ev = ev;\n\t\tthis.ac = ac;\n\t\tthis.bac = bac;\n\t\tthis.cv = ev - ac;\n\t\tthis.sv = ev - pv;\n\t\tif (ac != 0) {\n\t\t\tthis.cpi = ev / ac;\n\t\t} else {\n\t\t\tthis.cpi = 1;\n\t\t}\n\t\tif (pv != 0) {\n\t\t\tthis.spi = ev / pv;\n\t\t} else {\n\t\t\tthis.spi = 1;\n\t\t}\n\t\tif (this.cpi != 0) {\n\t\t\tthis.eac = ac + (bac - ev) / this.cpi;\n\t\t} else {\n\t\t\tthis.eac = bac;\n\t\t}\n\t\tthis.etc = this.eac - ac;\n\t}", "public Planet (double x, double y, double r, double m, double vx, double vy, Color c) {\n this.xCoor = x;\n this.yCoor = y;\n this.rad = r;\n this.mass = m;\n this.xVel = vx;\n this.yVel = vy;\n this.col = c; \n \n }", "public Department(int deptId, int trId, int amount, int accId, ArrayList<Account> list) {\n\t\tdept_id = deptId;\n\t\ttr_id = trId;\n\t\tamt = amount;\n\t\tacc_id = accId;\n\t\taccountList = list;\n\t}", "public Engine(){\n name = \"Basic Engine\";\n moveDeduction = 1;\n }", "public Plane(Point origin, Vector normal) {\n\t\tthis(origin, normal, new Color((int) (Math.random() * 256),\n\t\t\t\t(int) (Math.random() * 256), (int) (Math.random() * 256)));\n\t}", "public VelocityComponent(double xVector, double yVector, double zVector) {\n velocity = new Point3D(xVector, yVector, zVector);\n }", "Enemy(float xx, float yy, float dd, ImageLoader iL, PApplet p, int type) {\n x = xx;\n y = yy;\n speed = dd;\n this.iL = iL;\n\n this.p = p;\n this.type = type;\n }", "public Base(int posX, int posY, Animacion animacion) {\n this.posX = posX;\n this.posY = posY;\n this.animacion = animacion;\n }", "public lo(Entity paramwv)\r\n/* 15: */ {\r\n/* 16:23 */ this.a = paramwv.getID();\r\n/* 17:24 */ this.b = MathUtils.floor(paramwv.xPos * 32.0D);\r\n/* 18:25 */ this.c = MathUtils.floor(paramwv.yPos * 32.0D);\r\n/* 19:26 */ this.d = MathUtils.floor(paramwv.zPos * 32.0D);\r\n/* 20:27 */ this.e = ((byte)(int)(paramwv.yaw * 256.0F / 360.0F));\r\n/* 21:28 */ this.f = ((byte)(int)(paramwv.pitch * 256.0F / 360.0F));\r\n/* 22:29 */ this.g = paramwv.landing;\r\n/* 23: */ }", "public Space_Object (){\n groundPosition = 0;\n }", "private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector3 acceleration,double dt){\n float newX = (float) (position.x +(dt * velocity.Vx) + (dt*acceleration.x * dt / 2));\n float newY = (float) (position.y + (dt * velocity.Vy) + ( dt*acceleration.y * dt / 2));\n\n //v(t+h) = v(t) + h*a\n float newVelX = (float) (velocity.Vx + dt * acceleration.x );\n float newVelY = (float) (velocity.Vy + dt * acceleration.y );\n\n obj.setPositionX(newX);\n obj.setPositionY(newY);\n\n obj.setVelocityComponents(newVelX, newVelY);\n\n\n }", "Builder(final Plane plane) {\n this.plane = plane;\n }", "public OBGPControlPlane(Config aConfig, SimulationAccounting aAccounting) {\r\n\t\t\r\n\t\r\n\r\n\t\tsuper(aConfig);\r\n\t\t// System.out.println(\"Carregando plano de controle\");\r\n\t\tthis.accounting = (Accounting) aAccounting;\r\n\t\t// Get the links of this network\r\n\t\tlinks = config.getLinks();\r\n\t\t// System.out.println(links.toString());\r\n\t\t// Create the nodes of this network\r\n\t\tnodes = new LinkedHashMap<String, OBGPLabelSwitchRouter>();\r\n\t\t// Create the storage of disrupted connections by failure\r\n\t\tdisruptedLSP = new Hashtable<String, LightpathRequest>();\r\n\t\trestoredLSP = new Hashtable<String, Connection>();\r\n\t\t// Get the simulation parameters\r\n\t\tHashtable<String, Vector<String>> parameters = config\r\n\t\t\t\t.getSimulationParameters();\r\n\t\t// see all the parameters\r\n\t\tif (verbose)\r\n\t\t\tSystem.out.println(parameters.toString());\r\n\r\n\t\t// get all the asbrs. It will be important to identify the node\r\n\t\tasbrs = parameters.get(\"/Domains/ASBR\");\r\n\r\n\t\t// policyFrom = parameters.get(\"/Domains/POLICY/@from\");\r\n\t\tsetPolicy = new LinkedHashMap<String, Vector<String>>();\r\n\r\n\t\thopLimit = Integer.parseInt(parameters.get(\"/OPS/Hop/@limit\")\r\n\t\t\t\t.firstElement());\r\n\t\t// Get details about the RWA algorithm used\r\n\t\trerouting = ReRouting.valueOf(parameters.get(\"/RWA/Routing/@rerouting\")\r\n\t\t\t\t.firstElement());\r\n\r\n\t\t// Get the number of rerounting attempts\r\n\t\treroutingAttempts = Integer.parseInt(parameters.get(\r\n\t\t\t\t\"/RWA/Routing/@attempts\").firstElement());\r\n\t\t// Get the number of interomdina rerouting attempts\r\n\t\tmaxInterReroutingAttempts = Integer.parseInt(parameters.get(\r\n\t\t\t\t\"/RWA/Routing/@interAttempts\").firstElement());\r\n\t\t// The max number of rerouting attempts\r\n\t\tmaxReroutingAttempts = Integer.parseInt(parameters.get(\r\n\t\t\t\t\"/RWA/Routing/@maxAttempts\").firstElement());\r\n\t\tthis.alternative = reroutingAttempts + 1; // Number of k-shortest paths\r\n\t\twa = WavelengthAssignment.valueOf(parameters.get(\"/RWA/WA/@type\")\r\n\t\t\t\t.firstElement());\r\n\r\n\t\tmaxInterRoutes = Integer.parseInt(parameters.get(\r\n\t\t\t\t\"/RWA/Routing/@interRoutes\").firstElement());\r\n\r\n\t\tboolean serRT = Boolean.parseBoolean(parameters.get(\r\n\t\t\t\t\"/RWA/Serialize/@rt\").firstElement());\r\n\r\n\t\t// Gets the size of the time slice\r\n\t\ttimeSlice = Double.parseDouble(parameters.get(\r\n\t\t\t\t\"/Outputs/Transient/@timeSlice\").firstElement());\r\n\t\tactualTimeSlice = timeSlice;\r\n\t\t// Gets the time necessary for fault localization.\r\n\t\tfaultLocalizationTime = Double.parseDouble(parameters.get(\r\n\t\t\t\t\"/Failure/Timing/@localization\").firstElement());\r\n\t\tidentificationLength = Integer.parseInt(parameters.get(\r\n\t\t\t\t\"/OPS/Hop/@bytes\").firstElement());\r\n\r\n\t\tLinkedHashMap<String, ExplicitRoutingTable> rTables = null;\r\n\r\n\t\t// create the collection of graphs\r\n\t\tdomainGraphs = new LinkedHashMap<String, Graph>();\r\n\t\treroutedLSP = new LinkedHashMap<String, Connection>();\r\n\r\n\t\t/** GENERATION OF PER DOMAIN GRAPH */\r\n\r\n\t\tsetPerDomainPaths(graph, domainGraphs);\r\n\r\n\t\tif (serRT) {\r\n\t\t\tString fileRT = parameters.get(\"/RWA/Serialize/@file\")\r\n\t\t\t\t\t.firstElement();\r\n\r\n\t\t\trTables = this.read(fileRT);\r\n\t\t} else {\r\n\r\n\t\t\t/** COMMAND BLOCK: GENERATION OF PER-DOMAIN ROUTES */\r\n\r\n\t\t\tdomainSetPaths = new LinkedHashMap<String, LinkedHashMap<String, Vector<Path>>>();\r\n\t\t\t// Populates the hash table domainSetPaths with path inside each\r\n\t\t\t// domain\r\n\t\t\tfor (String domain : domainGraphs.keySet()) {\r\n\t\t\t\tdomainSetPaths.put(domain,\r\n\t\t\t\t\t\tthis.getPaths(domainGraphs.get(domain), alternative));\r\n\t\t\t}\r\n\t\t\t// Now, each domain has all the best paths from one node to another\r\n\t\t\t// (inside the same domain)\r\n\t\t}\r\n\r\n\t\t// We need to create a routing table of the node inside its own domain.\r\n\t\tfor (String domain : domainGraphs.keySet()) {\r\n\t\t\t// the Graph representing the domain\r\n\t\t\tGraph gDomain = domainGraphs.get(domain);\r\n\t\t\t// for each node inside the domain\r\n\t\t\tfor (String node : gDomain.nodes()) {\r\n\t\t\t\t// creates the routing table of this node\r\n\t\t\t\tExplicitRoutingTable rtable;\r\n\r\n\t\t\t\t// if this table comes from a file, so we need to load it\r\n\t\t\t\tif (rTables != null) {\r\n\t\t\t\t\trtable = rTables.get(node);\r\n\r\n\t\t\t\t} else { // otherwise, we need to create a new one\r\n\t\t\t\t\trtable = new ExplicitRoutingTable(node, alternative);\r\n\r\n\t\t\t\t\t// and the new routing table will be updated from the\r\n\t\t\t\t\t// topology\r\n\t\t\t\t\trtable.updateFromTopology(gDomain,\r\n\t\t\t\t\t\t\tdomainSetPaths.get(domain));\r\n\r\n\t\t\t\t\tRoutingTableEntry[][] teste = rtable.getRoutingTable();\r\n\r\n\t\t\t\t}\r\n\t\t\t\t// the adjacents nodes from this node\r\n\t\t\t\tVector<String> adjacent = gDomain.adjacentNodes(node);\r\n\t\t\t\t// the linkstate hashmap\r\n\t\t\t\tLinkedHashMap<String, LinkState> linkStateSet = new LinkedHashMap<String, LinkState>();\r\n\r\n\t\t\t\tfor (String adjId : adjacent) {\r\n\t\t\t\t\t// get the link between node and adjacent\r\n\t\t\t\t\tLink link = links.get(node + \"-\" + adjId);\r\n\t\t\t\t\t// create a linkState\r\n\t\t\t\t\tLinkState linkState = new LinkState(link);\r\n\t\t\t\t\t// put this on a link state\r\n\t\t\t\t\tlinkStateSet.put(adjId.toString(), linkState);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if the current node is an ASBR, so, we need to\r\n\t\t\t\t// generate all links to its neighbors\r\n\t\t\t\tif (asbrs.contains(node)) {\r\n\t\t\t\t\tif (verbose)\r\n\t\t\t\t\t\tSystem.out.println(\"OBGP Info: Este no eh um ASBR\");\r\n\r\n\t\t\t\t\tVector<String> adjancent = graph.adjacentNodes(node);\r\n\r\n\t\t\t\t\tfor (int i = 0; i < adjancent.size(); i++) {\r\n\t\t\t\t\t\tif (!getDomain(adjancent.get(i))\r\n\t\t\t\t\t\t\t\t.equals(getDomain(node))) {\r\n\t\t\t\t\t\t\tLink link = links\r\n\t\t\t\t\t\t\t\t\t.get(node + \"-\" + adjancent.get(i));\r\n\t\t\t\t\t\t\tLinkState lstate = new LinkState(link);\r\n\t\t\t\t\t\t\tlinkStateSet.put(adjancent.get(i).toString(),\r\n\t\t\t\t\t\t\t\t\tlstate);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Create the node and put it into the table.\r\n\t\t\t\tOBGPLabelSwitchRouter obgpLSR = new OBGPLabelSwitchRouter(node,\r\n\t\t\t\t\t\trtable, linkStateSet, gDomain, wa, rerouting,\r\n\t\t\t\t\t\tmaxReroutingAttempts, reroutingAttempts,\r\n\t\t\t\t\t\tasbrs.contains(node), getDomain(node),\r\n\t\t\t\t\t\tmaxInterReroutingAttempts);\r\n\r\n\t\t\t\tnodes.put(node, obgpLSR);\r\n\r\n\t\t\t\t// System.out.println(\"=== Routing Table ===\\n\"\r\n\t\t\t\t// + obgpLSR.getRoutingTable().toString());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * GUSTAVO [old] // Initialize the state of each node for (String id :\r\n\t\t * graph.nodes()) { // System.out.println(\"...: \"+id); // Create the\r\n\t\t * routing table for this node ExplicitRoutingTable ert; if (rTables !=\r\n\t\t * null) { ert = rTables.get(id); } else { ert = new\r\n\t\t * ExplicitRoutingTable(id, alternative); ert.updateFromTopology(graph,\r\n\t\t * setPaths); // System.out.println(ert.toString()); } // Create the\r\n\t\t * links adjacent to this node. Vector<String> adjacent =\r\n\t\t * graph.adjacentNodes(id); // System.out.println(adjacent.toString());\r\n\t\t * LinkedHashMap<String, LinkState> linkStateSet = new\r\n\t\t * LinkedHashMap<String, LinkState>(); // for each adjacent node do for\r\n\t\t * (String adjId : adjacent) { Link link = links.get(id + \"-\" + adjId);\r\n\t\t * LinkState linkState = new LinkState(link);\r\n\t\t * linkStateSet.put(adjId.toString(), linkState); } // Create the node\r\n\t\t * and put it into the table. // AQUI EU CRIO OS NODES\r\n\t\t * OBGPLabelSwitchRouter node = new OBGPLabelSwitchRouter(id, ert,\r\n\t\t * linkStateSet, graph, wa, rerouting, maxReroutingAttempts,\r\n\t\t * reroutingAttempts); nodes.put(id, node); }\r\n\t\t */\r\n\r\n\t\t/** INTER-DOMAIN ROUTING POLICY */\r\n\r\n\t\t// generates the inter-domain routing\r\n\t\t// required by the next steps\r\n\t\t// read policy from XML and generates the policy rules\r\n\t\tsetPolicy(setPolicy);\r\n\t\t// generateASPathv2(setPolicy);\r\n\t\t// simulates Path dissemation from BGP generating AS-PATH\r\n\t\tLinkedHashMap<String, ArrayList<Vector<String>>> ASPath = generateASPath(setPolicy);\r\n\t\tOBGPRoutingTable interdomainRoutes = new OBGPRoutingTable(ASPath);\r\n\t\t// System.out.println(domainGraphs.toString());\r\n\t\t// Fill the Interdomain Routing Table\r\n\t\t// All interdomain routes does not contain :\r\n\t\t// Example: 1:a-1:g is an intra-domain route\r\n\t\t// and 1-2 is an interdomain route\r\n\t\t// for (String key : setPolicy.keySet()) {\r\n\t\t// if (!key.contains(\":\")) {\r\n\t\t// interdomainRoutes.putEntry(key, ASPath.get(key));\r\n\t\t// interdomainRoutes.putEntry(key, setPolicy.get(key));\r\n\t\t// }\r\n\r\n\t\t// }\r\n\r\n\t\tSystem.out.println(\"Tabela de Rotas - Interdominio\");\r\n\t\tSystem.out.println(interdomainRoutes.toString());\r\n\t\t// System.out.println(\"Os links:\");\r\n\t\t// System.out.println(config.getLinks().toString());\r\n\r\n\t\tSystem.out.println(\"JA PASSEI PELO CONSTRUTOR\");\r\n\t}", "public Velocity(double angle, double mag){\n\t\tthis(Math.cos(angle),-Math.sin(angle),mag);\n\t}", "public Vector(double x1, double y1, double z1) {\n Point3D p = new Point3D(x1, y1, z1);\n if (p.equals(Point3D.ZERO))\n throw new IllegalArgumentException(\"no meaning to the vector\");\n head=new Point3D(p);\n }", "public Particle(double xstart, double ystart, double velx, double vely, Compound c) {\r\n\t\tpos = new Vector(xstart, ystart);\r\n\t\tvel = new Vector(velx, vely);\r\n\t\tcompound = c;\r\n\t\tactivated = false;\r\n\t}", "public GameObject(int x, int y, int dx, int dy, Mapa m){\n\t\tmap=m;\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tdimensionX=dx;\n\t\tdimensionY=dy;\n\t}", "@Test\n public void Constructor_test() \n {\n // ============ Equivalence Partitions Tests ==============\n\n // TC01: creating the Plane: x + y + z = 1 with the constructor\n\t // that get 3 Point3D that contain in the Plane\n try \n {\n new Plane(new Point3D(1,0,0), new Point3D(0,1,0), new Point3D(0,0,1));\n } \n catch (IllegalArgumentException e) \n {\n fail(\"Failed constructing a correct Plane\");\n }\n \n // TC02: creating the Plane: x + y + z = 1 with the constructor\n \t // that get Point3D that contain in the Plane and Vector- the normal of the Plane.\n try \n {\n new Plane(new Point3D(1,0,0), new Vector(1,1,1));\n } \n catch (IllegalArgumentException e) \n {\n fail(\"Failed constructing a correct Plane\");\n }\n \n // =============== Boundary Values Tests ==================\n \n // TC03: creating the Plane: z = 0 with the constructor\n \t // that get 3 Point3D that contain in the Plane\n try \n {\n new Plane(new Point3D(1,0,0), new Point3D(0,1,0), new Point3D(2,3,0));\n } \n catch (IllegalArgumentException e) \n {\n fail(\"Failed constructing a correct Plane\");\n }\n \n // TC04: creating the Plane: x + y + z = 1 with the constructor\n \t // that get Point3D that contain in the Plane and Vector- the normal of the Plane.\n try \n {\n new Plane(new Point3D(1,0,0), new Vector(0,0,1));\n } \n catch (IllegalArgumentException e) \n {\n fail(\"Failed constructing a correct Plane\");\n }\n }", "public Vector(Coordinate x1, Coordinate y1, Coordinate z1) {\n Point3D p = new Point3D(x1, y1, z1);\n if (p.equals(Point3D.ZERO))\n throw new IllegalArgumentException(\"no meaning to the vector\");\n head=new Point3D(p);\n }", "public GameObject(PImage img, int x, int y, int width, int height, int[] velocity){\n this.img = img;\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.velocity= velocity;\n health = 1; //Default value for health\n }", "public Game()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1, false); \n Greenfoot.start(); //Autostart the game\n Greenfoot.setSpeed(50); // Set the speed to 30%\n setBackground(bgImage);// Set the background image\n \n //Create instance\n \n Airplane gameplayer = new Airplane ();\n addObject (gameplayer, 100, getHeight()/2);\n \n }", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "public GameObject(int x, int y, int width, int height, int[] velocity){\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.velocity= velocity;\n }", "public void accelerate(){\n double acceleration = .1;\n if(xVel<0)\n xVel-=acceleration;\n if(xVel>0)\n xVel+=acceleration;\n if(yVel<0)\n yVel-=acceleration;\n if(yVel>0)\n yVel+=acceleration;\n System.out.println(xVel + \" \" + yVel);\n \n }", "public Planet(double xP, double yP, double xV,\n\t\tdouble yV, double m, String img){\n\t\txxPos=xP;\n\t\tyyPos=yP;\n\t\txxVel=xV;\n\t\tyyVel=yV;\n\t\tmass=m;\n\t\timgFileName=img;\n\t}", "public Planet(double xP, double yP, double xV,\n double yV, double m, String img){\n\txxPos = xP;\n\tyyPos = yP;\n\txxVel = xV;\n\tyyVel = yV ; \n\tmass = m;\n\timgFileName = new String(img);\n\n\t}", "public Planet(double xP, double yP, double xV,\n double yV, double m, String img) {\n\t\txxPos = xP;\n\t\tyyPos = yP;\n\t\txxVel = xV;\n\t\tyyVel = yV;\n\t\tmass = m;\n\t\timgFileName =img;\n\t}", "public AdvancedPhysicDrawnObject(int x, int y, int depth, boolean isSolid,\n\t\t\tCollisionType collisiontype, Area area)\n\t{\n\t\tsuper(x, y, depth, isSolid, collisiontype, area);\n\t\t\n\t\t// Initializes attributes (Most of these need to be initialized after \n\t\t// the subclass is done)\n\t\tthis.currentRotationAxis = new Point2D.Double(0, 0);\n\t\t//this.rotationAxisCandidates = new ArrayList<Point2D.Double>();\n\t\tthis.rotationAxisCandidates = new HashMap<Point2D.Double, Double>();\n\t\tthis.actsSinceLastCollision = 1000;\n\t\tthis.defaultMomentMass = 0;\n\t\tthis.currentMomentMass = 0;\n\t\tthis.rotationAllowed = true;\n\t}", "public Enemy(int startMaxHealth, int startWalkSpeed, int startSprintSpeed, Weapon startWeapon, int startBaseContactDamage, int startBaseFieldOfView, int startBaseSightDistance, List<PassiveItem> startPassiveEffects, String characterName, String characterDescription)\n\t{\n\t\tsuper(characterName, characterDescription);\n\t\t\n\t\tmaxHealth = startMaxHealth;\n\t\tcurrentHealth = startMaxHealth;\n\t\t\n\t\tsprintSpeed = startSprintSpeed;\n\t\twalkSpeed = startWalkSpeed;\n\t\t\n\t\tweapon = startWeapon;\n\t\t\n\t\tbaseContactDamage = startBaseContactDamage;\n\t\t\n\t\tbaseFieldOfView = startBaseFieldOfView;\n\t\t\n\t\tbaseSightDistance = startBaseSightDistance;\n\t\t\n\t\tpassiveEffects = startPassiveEffects;\n\t}", "public Unit (int hp, int str, int mag, int def, int x, int y) {\n this.stats = new Stats(hp, str, mag, def);\n this.position = new Position(x, y);\n }", "@Model\r\n\tpublic Vector(double xComp, double yComp) {\r\n\t\t\r\n\t\t\tthis.xComp = xComp;\r\n\t\t\r\n\t\r\n\t\t\tthis.yComp = yComp;\r\n\r\n\t}", "public Vector3 () {\n }", "public BankAcc(){\r\n //uses another constuctor\r\n this(593,2.5,\"Deg\",\"Deg\",\"Deg\");\r\n System.out.println(\"EMpty\");;\r\n }", "public Planet(Planet p){\n\txxPos = p.xxPos;\n\tyyPos = p.yyPos;\n\txxVel = p.xxVel;\n\tyyVel = p.yyVel ;\n\tmass = p.mass;\n\timgFileName = new String(p.imgFileName);\n\t}", "public Plane(double in, boolean isD) {\n\t\tisFlying = isD;\n\t\tinQ = in;\n\t}", "public AngleIF() {\n \t\t//_navx = new navx();\n \t\t//roboAccel = new RoboRioAccelerometers();\n \t}", "public BankAcc(int accNum, double bal, String name, String email, String phone){\r\n System.out.println(\"DONE\");\r\n //can do some validation in the other functions\r\n //not nessacary\r\n setAccNum(accNum);\r\n this.bal=bal;\r\n this.name=name;\r\n this.email=email;\r\n this.phone=phone;\r\n\r\n }", "public Vector2f ()\n {\n }", "public ColladaFloatVector() {\n super();\n }", "Employee(String empId, String name, int roleId, double basic, double allowancePercentage, double hra){\r\n\t\tthis.empId = empId;\r\n\t\tthis.name = name;\r\n\t\tthis.role.setRoleId(roleId);\r\n\t\tthis.basic = basic;\r\n\t\tthis.allowancePercentage = allowancePercentage;\r\n\t\tthis.hra = hra;\r\n\t}", "public Objects(double startx, double starty, double speed, String image, int xsize, int ysize, String name, double Xvelocity, double Yvelocity, double life){\n\t\tthis.face = new Image(\"file:res/\" + image);\n\t\tthis.x = startx;\n\t\tthis.y = starty;\n\t\tthis.MoveSpeed = speed;\n\t\tthis.staticMoveSpeed = speed;\n\t\tthis.sizeX = xsize;\n\t\tthis.sizeY = ysize;\n\t\tthis.name = name;\n\t\tthis.Xvelocity = Xvelocity;\n\t\tthis.Yvelocity = Yvelocity;\n\t\tthis.HP = (int)life;\n\t\tthis.hpLimit = (int)life;\n\t\tobjectlist.add(this);\n\t}", "public void updateTrifecta() {\n\n\t\taccelX = (xl.getX() - 0) * 9.8 * Math.cos(angleToForward * (Math.PI / 180.0)); //convert from g's\n\t\taccelY = (xl.getY() - 0) * 9.8 * Math.sin(angleToForward * (Math.PI / 180.0));\n\t\taccelZ = (xl.getZ() - 0) * 9.8;\n\t\t\n\t\t//velocity updated by acceleration integral\n\t\tvelX += accelX * dT;\n\t\tvelY += accelY * dT;\n\t\tvelZ += accelZ * dT;\n\t\t\n\t\t//position updated by velocity integral and adjusted for robot rotation\n\t\tposX += velX * dT;\n\t\tposY += velY * dT;\n\t\tposZ += velZ * dT;\n\t}", "private Vector(double x, double y){\n this.x = x;\n this.y = y;\n }", "public account(){\n this.accNo = 000;\n this.id = 000;\n this.atype = \"\";\n this.abal = 0.00;\n }", "public GameObject(int x, int y, int speed, ID id){\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tinitX = x;\r\n\t\tinitY = y;\r\n\t\tthis.id = id;\r\n\t\tthis.speed = speed;\r\n\t}", "public AVL() {\n\n }", "public TransmissionCoefficientVisualiser()\n\t{\n\t\tsuper();\n\t\t\n\t\t// set to true for interactive version\n\t\tnonInteractiveTIMAction = NonInteractiveTIMActionEnum.INTERACTIVE;\n\t\t\n\t\t// set all parameters\n\t\t\n\t\trenderQuality = RenderQualityEnum.DRAFT;\n\t\t\n\t\taHat = new Vector3D(0, 0, 1);\n\t\tuHat = new Vector3D(1, 0, 0);\n\t\tvHat = new Vector3D(0, 1, 0);\n\t\tetaU = -0.2;\n\t\tetaV = -0.1;\n\t\tdeltaU = 0.6;\t// 0.2;\n\t\tdeltaV = 0.1;\t// -0.4;\n\t\tsigma1U = 1;\n\t\tsigma1V = 1;\n\t\tsigma2U = 1;\n\t\tsigma2V = 1;\n\t\t\n\t\talphaChoice =\n\t\t\t\tAlphaChoice.ZERO;\n//\t\t\t\tAlphaChoice.MANUAL;\n//\t\t\t\tAlphaChoice.OPTIMISED;\n\n\t\t// AlphaChoice.MANUAL parameters\n\t\talpha1U = 0;\n\t\talpha1V = 0;\n\t\talpha2U = -0.15;\t// -0.6;\n\t\talpha2V = -0.15;\t// -0.1;\n\n\t\tdouble distanceInFront = 2;\t// 0.8;\n\t\tapertureCentre =\n\t\t\t\tnew Vector3D(0, 0, 10-distanceInFront);\t// straight in front\n//\t\t\t\tnew Vector3D(1, 0, 10-distanceInFront);\t// a bit to the right\n//\t\t\t\tnew Vector3D(10, 0, 0);\t// 45 degrees off to the right\n\t\tcameraHorizontalFOVDeg = 2*MyMath.rad2deg(Math.atan(10./distanceInFront*Math.tan(MyMath.deg2rad(10))));\n\t\tbrightnessFactor = 1;\n\t\t\n\t\t// AlphaChoice.OPTIMISED parameters\n\t\tpointAtFOVCentre =\n\t\t\t\tnew Vector3D(0, 0, 8);\t// straight in front\n//\t\t\t\tapertureCentre;\t// always optimised for camera position\n//\t\t\t\tnew Vector3D(0, 0, -1000);\t// 45 degrees off to the right\n\t\tparallelityParameter = 0;\n\n\n\t\t\n\t\tSystem.out.println(\"TransmissionCoefficientVisualiser::TransmissionCoefficientVisualiser: F-numbers are as follows:\" +\n\t\t\t\t\"N_1u=\" + 1/sigma1U +\n\t\t\t\t\", N_1v=\" + 1/sigma1V +\n\t\t\t\t\", N_2u=\" + Math.abs(etaU)/sigma2U +\n\t\t\t\t\", N_2v=\" + Math.abs(etaV)/sigma2V\n\t\t\t);\n\t\t\n\t\t// boring parameters\n\t\tnonInteractiveTIMAction = NonInteractiveTIMActionEnum.INTERACTIVE;\n\n\t\t// for movie version\n\t\tnumberOfFrames = 50;\n\t\tfirstFrame = 0;\n\t\tlastFrame = numberOfFrames-1;\n\t\t\n\t\t// camera parameters are set in populateStudio() method\n\t\t\n\t\t// blur quality if test = false; make this better in the non-interactive version, as this is used to produce publication-quality images\n\t\t// standardCameraBlurQuality = (interactive?QualityType.GOOD:QualityType.SUPER);\t// this is the camera's blur quality if test=false\n\t\t\n\t\t// for interactive version\n\t\twindowTitle = \"Dr TIM's telescope-window transmission-coefficient visualiser\";\n\t\twindowWidth = 1200;\n\t\twindowHeight = 650;\n\t}", "public VOIVector() {\r\n super();\r\n }", "public ObjetoJuegoMovimiento(int xPosition, int yPosition, int xVelocity, int yVelocity, Color color)\r\n {\r\n super(xPosition, yPosition, color);\r\n this.xVel = xVelocity;\r\n this.yVel = yVelocity;\r\n \r\n }", "public Warrior(Point3D position, int speed) {\r\n super(\"img/Ants/warrior.png\", position, speed);\r\n currentBehaviour = WarriorBehaviour.PATROL;\r\n }", "public Pacman() {\n int life = 50;\n int repro = 20;\n int maxCal = 500;\n int burn = 5;\n int strength = 50;\n myInfo = BasicMatrixModel.createCritterInfoInstance(this,life,repro,maxCal,burn,strength);\n }", "public DecelerationController() {\n\t\tlastCallTimeStamp = -1;\n\t\tlastDistanceToTarget = -1;\n\t}", "public double\nangleInXYPlane()\n{\n\tBVector2d transPt = new BVector2d(\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n\t\n\t// debug(\"transPt: \" + transPt);\n\n\tdouble angle = MathDefines.RadToDeg * new Vector2d(1.0, 0.0).angle(transPt);\n\tif (transPt.getY() < 0.0)\n\t{\n\t\t// debug(\"ang0: \" + (360.0 - angle));\n\t\treturn(360.0 - angle);\n\t}\n\t// debug(\"ang1: \" + angle);\n\treturn(angle);\n}", "private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector2 acceleration,double dt){\n\n integral(obj, dt);\n\n }", "public Planet(Planet p){\n\t\txxPos=p.xxPos;\n\t\tyyPos=p.yyPos;\n\t\txxVel=p.xxVel;\n\t\tyyVel=p.yyVel;\n\t\tmass=p.mass;\n\t\timgFileName=p.imgFileName;\n\t}", "public PassiveEntity(Location loc, float addHealth, float addSpeed)\n {\n super(loc);\n this.addHealth = addHealth;\n this.addSpeed = addSpeed;\n }", "public AccrualRule(){}", "public Drive(DriveTrain dr, double speed, double rot) {\n\n m_driveTrain = dr;\n\n m_speed = speed; m_rot = rot;\n\n addRequirements(dr);\n }", "public Department(int deptId, int trId, int amount, int accId, int accIdSecond, ArrayList<Account> list) {\n\t\tdept_id = deptId;\n\t\ttr_id = trId;\n\t\tamt = amount;\n\t\tacc_id = accId;\n\t\tacc_id_second = accIdSecond;\n\t\taccountList = list;\n\t}", "private Character(int id, int loyalty)\r\n \t{\r\n \t\tif(id < CharacterProfile.values().length && id >= 0)\r\n \t\t{\r\n \t\t\tCharacterProfile profile = CharacterProfile.values()[id];\r\n \t\t\t\r\n \t\t\tthis.selected = false;\r\n \t\t\tthis.id = id;\r\n \t\t\tthis.loyalty = loyalty;\r\n \t\t\tthis.lastSleep = 0;\r\n \t\t\tthis.targetedRoom = null;\r\n \t\t\tthis.name = profile.name;\r\n \t\t\tthis.currentRoom = null; // None\r\n \t\t\tthis.x = 0;\r\n \t\t\tthis.y = 0;\r\n \r\n \t\t\ttry {\r\n \t\t\t\tthis.img = new Image(Game.ASSETS_DIR + profile.spriteName);\r\n \t\t\t} catch (SlickException e) {\r\n \t\t\t\te.printStackTrace();\r\n \t\t\t}\r\n \t\t}\r\n \t\telse\r\n \t\t\tSystem.out.println(\"Error: wrong ID!\");\r\n \t}", "public AC(AutoAPI obj) {\n\t\tthis.auto = obj;\n\t}", "public Weapon(MainPlayer p, ArrayList<MainPlayer> enemies, ArrayList<StaticObjects> s,\r\n\t\t\tArrayList<ReactiveObjects> r, boolean l, double velocity,\r\n\t\t\tdouble angle) {\r\n\t\ttrajectoryIncrements = calculateTrajectory(velocity, angle);\r\n\t\tvisible = true;\r\n\t\tstaticobjects = s;\r\n\t\treactiveobjects = r;\r\n\t\tthis.enemies = enemies;\r\n\t\tthis.velocity = velocity;\r\n\t\tthis.angle = angle;\r\n\r\n\t\tloadAnnimationImages();\r\n\t\tloadDestructionImages();\r\n\t\tthis.player = p;\r\n\t\tthis.player.setGrenadesAvailable(player.getGrenadesAvailable() - 1);\t\t\r\n\t\tif (l == true) {\r\n\t\t\tx = p.x + p.playerImage.getWidth(null);\r\n\t\t\ty = p.y;\r\n\t\t} else {\r\n\t\t\tx = p.x;\r\n\t\t\ty = p.y;\r\n\t\t}\r\n\r\n\t\tlaunchDirectionRight = l;\r\n\t\trectangle = new Rectangle(x, y, currentImage.getWidth(null),\r\n\t\t\t\tcurrentImage.getHeight(null));\r\n\t\timageHeight = currentImage.getHeight(null);\r\n\t\timageWidth = currentImage.getWidth(null);\r\n\t\ttimer = new Timer(20, this);\r\n\t\ttimer.start();\r\n\t}", "public Cargo(){\n super(\"Cargo\");\n intake = new WPI_TalonSRX(RobotMap.cargoIntake);\n shoot = new WPI_TalonSRX(RobotMap.cargoShoot);\n }", "public TriMeshCollideable( CollisionEngine eng )\n {\n super( eng );\n \n // To avoid lots of casts\n this.gfxObject = null;\n }" ]
[ "0.6285012", "0.61208147", "0.56902206", "0.5610973", "0.5595046", "0.55773956", "0.5463803", "0.54305875", "0.53945714", "0.5345938", "0.52769893", "0.52611077", "0.5215772", "0.5183777", "0.5179531", "0.5175504", "0.51666945", "0.51640975", "0.5121581", "0.5064551", "0.50424504", "0.5027227", "0.5004605", "0.49854144", "0.49825755", "0.49809375", "0.49539015", "0.49434033", "0.49181536", "0.4910293", "0.4885512", "0.48854384", "0.48771018", "0.4863944", "0.48613787", "0.4841033", "0.48396057", "0.48385036", "0.4819648", "0.4811936", "0.48021474", "0.47955826", "0.4792617", "0.47869912", "0.4781419", "0.4778966", "0.47757876", "0.4759314", "0.47427177", "0.47280824", "0.47204345", "0.47136202", "0.47127762", "0.471125", "0.47078365", "0.47068116", "0.47030655", "0.47025543", "0.46954432", "0.46912554", "0.46911272", "0.46877995", "0.46768075", "0.46698323", "0.4663122", "0.4652087", "0.46498924", "0.46445882", "0.4637734", "0.46329406", "0.46290225", "0.46251482", "0.4624411", "0.46236688", "0.46216524", "0.46088517", "0.46047664", "0.4602292", "0.45957765", "0.4587423", "0.45821717", "0.45805326", "0.4576468", "0.4570912", "0.45554575", "0.4554592", "0.45533007", "0.454891", "0.45483306", "0.45464507", "0.45441997", "0.45364475", "0.45359114", "0.45352134", "0.45289162", "0.45275456", "0.45188972", "0.45186695", "0.45091045", "0.45087868" ]
0.7146404
0
update the position of the plane.
public void update(){ velX *= damp; velY *= damp; posX += velX; posY += velY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updatePosition() {\n\n this.x = this.temp_x;\n this.y = this.temp_y;\n this.ax = 0;\n this.ay = 0;\n\t\tthis.axplusone = 0;\n this.ayplusone = 0;\n \n }", "private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }", "public void updatePosition() {\n \t\r\n \tx += dx;\r\n \ty += dy;\r\n \t\r\n\t}", "protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}", "@Override\n public void move() {\n this.point.x += vector.x * getCurrentSpeed();\n this.point.y += vector.y * getCurrentSpeed();\n }", "void updatePosition() {\n\t\t\n\t\tcoords.x = body.getPosition().x*Simulation.meterToPixel;\n\t\tcoords.y = body.getPosition().y*Simulation.meterToPixel;\n\t\tspeed.x = body.m_linearVelocity.x;\n\t\tspeed.y = body.m_linearVelocity.y;\n\t}", "public void update(long delta){\n \n if(placement <= -1000){\n placement = zPosition;\n }\n placement -= 5;\n \n \n }", "@Override\n public void update(float delta) {\n // Make sure to COPY the vector and not copy the reference\n position = new Vector3f(entity.getPosition()).add(offset);\n }", "@Override\n\tpublic void update() {\n\t\tmove();\n\t\tplace();\n\t}", "@Override\n\tpublic void update()\n\t{\n\t\tsuper.update();\n\n\t\tcalcAcceleration();\n\t\tsetVelocity(Vector2D.add(getVelocity(), getAcceleration()));\n\n\t\tcalcVelocity();\n\t\tsetPosition(Vector2D.add(getPosition(), getVelocity()));\n\n\t\tbm.update(getPosition(), getWidth(), getHeight());\n\t}", "@Override\n\tpublic void updatePosition() {\n\t\t\n\t}", "public void update(){\n posX += velX;\n posY += velY;\n }", "protected void updatePosition() {\n\t\tif(motion == null) {\n\t\t\tmotion = new Motion3D(player, true);\n\t\t} else motion.update(player, true);\n\t\t\n\t\tmotion.applyToEntity(this);\n\t\tthis.rotationPitch = player.rotationPitch;\n\t\tthis.rotationYaw = player.rotationYaw;\n\t}", "private void updatePosition() {\n position.add(deltaPosition);\n Vector2[] points = getRotatedPoints();\n\n for (Vector2 point : points) {\n if (point.getX() < bound.getX() || point.getX() > bound.getX() + bound.getWidth()) { //If the point is outside of the bounds because of X\n position.addX(-deltaPosition.getX() * 2); //Undo the move so it is back in bounds\n deltaPosition.setX(-deltaPosition.getX()); //Make the direction it is going bounce to the other direction\n break;\n }\n if (point.getY() < bound.getY() || point.getY() > bound.getY() + bound.getHeight()) { //If the point is outside of the bounds because of Y\n position.addY(-deltaPosition.getY() * 2); //Undo the move so it is back in bounds\n deltaPosition.setY(-deltaPosition.getY()); //Make the direction it is going bounce to the other direction\n break;\n }\n }\n deltaPosition.scale(.98);\n }", "public void update() {\n if (isActive()) {\n updatePosition(dx, dy);\n }\n }", "public void update(){\n\t\tx+=xspeed; \n\t\ty+=yspeed;\t\n\t}", "public void refreshPosition() {\n\n this.setTransform(getTransform());\n }", "private void changeCameraPosition() {\n yPosition = mPerspectiveCamera.position.y;\n if (isMovingUp) {\n yPosition += 0.1;\n if (yPosition > 20)\n isMovingUp = false;\n } else {\n yPosition -= 0.1;\n if (yPosition < 1)\n isMovingUp = true;\n }\n\n mPerspectiveCamera.position.set(xPosition, yPosition, zPosition);\n mPerspectiveCamera.update();\n }", "void setPosition(Vector3f position);", "public void changePos(double xP, double yP){ \n this.xCoor += xP;\n this.yCoor += yP;\n \n }", "public void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n acc.mult(0);\n }", "private void updatePos() {\n var ballBounds = ball.getMesh().getRelativeRectangleBounds().getBounds2D();\n var hookBallBounds = hook.getHookBall().getMesh().getRelativeRectangleBounds().getBounds2D();\n var ballCenter = new Vector2(ballBounds.getCenterX(), ballBounds.getCenterY());\n var hookBallCenter = new Vector2(hookBallBounds.getCenterX(), hookBallBounds.getCenterY());\n fullDirection = hookBallCenter.subtracted(ballCenter);\n var oposDir = ballCenter.subtracted(hookBallCenter).normalized();\n oposDir.multiplyBy(hookBallBounds.getWidth() / 2);\n hookBallCenter.add(oposDir);\n direction = hookBallCenter.subtracted(ballCenter);\n getTransform().setPosition(ballCenter);\n getTransform().setRotation(GeometryHelper.vectorToAngle(hookBallCenter.subtracted(ballCenter)));\n getTransform().translate(0, -GameSettings.ROPE_HEIGHT / 2 - 1);\n }", "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(){\r\n\t\tList<Point> list = new ArrayList<Point>();\r\n\t\t\r\n\t\tlist.addAll(Arrays.asList(points));\r\n\t\t\r\n\t\tsetPoints(list);\r\n\t}", "void setPosition (DVector3C xyz);", "void setPos(Vec3 pos);", "public abstract void updateVertices();", "public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }", "@Override\n public void update(){\n getNextPosition();\n checkTileMapCollision();\n setPosition(xtemp, ytemp);\n animation.update();\n }", "@Override\n\tpublic void update() {\n\t\tthis.setBounds(obstacle.getCoords().getX() * 64, obstacle.getCoords().getY() * 64, 64, 64);\n\t}", "void update(int[] xyPos) {\n this.x = xyPos[0];\n this.y = xyPos[1];\n }", "public void mou(){\n\n this.setY(getY() + getVelocitatY());\n this.setX(getX() + getVelocitatX());\n\n }", "public void update() {\n\t\tVec2 newPos = calculatePos();\n\t\t/* energy bar */\n\t\tfloat newEnergy = actor.getEnergy();\n\t\tfloat maxEnergy = actor.getEnergyLimit();\n\t\tenergy.setPosition(newPos.getX(), newPos.getY() + paddingHealth / Application.s_Viewport.getX(), newEnergy,\n\t\t\t\tmaxEnergy);\n\t\t/* health bar */\n\t\tfloat newHealth = actor.getHealth();\n\t\tfloat maxHealth = actor.getHealthLimit();\n\t\thealth.setPosition(newPos.getX(), newPos.getY() + paddingEnergy / Application.s_Viewport.getX(), newHealth,\n\t\t\t\tmaxHealth);\n\t\t/* name label */\n\t\tplayerName.setPosition(newPos.getX(), newPos.getY() + paddingName / Application.s_Viewport.getY());\n\t}", "public void move()\n {\n x = x + unitVector.getValue(1)*speed;\n y = y + unitVector.getValue(2)*speed;\n }", "private void updatePosition (float newCenterX, float newCenterY) {\n centerX = newCenterX;\n centerY = newCenterY;\n\n atomSpriteBoundary.left = centerX - spriteLength/2;\n atomSpriteBoundary.right = centerX + spriteLength/2;\n atomSpriteBoundary.top = centerY - spriteHeight/2;\n atomSpriteBoundary.bottom = centerY + spriteHeight/2;\n }", "public void setPosition(Vector2 position);", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "void setPosition (double x, double y, double z);", "public void move(){\n super.move();\n load.updateCoordinates(this.x,this.y);\n }", "public void updatePosition(double timestep){\n\t\tx = x + vx * timestep;\n\t y = y + vy * timestep;\n\t}", "public void setPosition(Point newPosition);", "public void updatePosition(float x, float y){\n rect = new Rectangle2D.Float(x,y,width,height);\n this.x = x;\n this.y = y;\n }", "public Plane() {\r\n\t\tvecX = new Vector3D();\r\n\t\tvecY = new Vector3D();\r\n\t\tnorm = new Vector3D();\r\n\t\tthis.setD(0);\r\n\t\tpos = new Position3D();\r\n\t}", "private void updatePosition (Coordinate newPosition) {\n centerX = newPosition.x;\n centerY = newPosition.y;\n\n atomSpriteBoundary.left = centerX - spriteLength/2;\n atomSpriteBoundary.right = centerX + spriteLength/2;\n atomSpriteBoundary.top = centerY - spriteHeight/2;\n atomSpriteBoundary.bottom = centerY + spriteHeight/2;\n }", "public void update() {\n this.move(this.getDX(), this.getDY());\n }", "void setOffsetWorldPosition(double x, double y, double z);", "@Override\n\tpublic void update() {\n\t\t\n\t\tif(!this.explShowing)\n\t\t{\n\t\t\tx+= dx;\n\t\t\ty+= dy;\n\t\n\t\t\tif(x < 0)\n\t\t\t{\n\t\t\t\tx = 0;\n\t\t\t\tdx = dx *-1;\n\t\t\t}\n\t\t\telse\n\t\t\tif(x + w > MainGame.getInstance().X_WORLD_END)\n\t\t\t{\n\t\t\t\tx = MainGame.getInstance().X_WORLD_END - w ;\n\t\t\t\tdx = dx *-1;\t\n\t\t\t}\n\t\n\t\t\tif(y < 0)\n\t\t\t{\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t\telse\n\t\t\tif(y + h > MainGame.getInstance().Y_WORLD_END)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t}\n\t\t\n\t\ts.update();\n\t\n\t\tif(this.explShowing)\n\t\t{\n\t\t\tif(expl.isHasFinished())\n\t\t\t{\n\t\t\t\texplShowing = false;\n\t\t\t\ts = this.normalImage;\n\t\t\t\tthis.x = this.xStart;\n\t\t\t\tthis.y = this.yStart;\n\t\t\t\ts.setX(this.xStart);\n\t\t\t\ts.setY(this.yStart);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//s.setX(x);\n\t\t//s.setY(y);\n\t\t\n\t\tthis.rect.setFrame(getX(),getY(),getW(),getH());\t\n\t}", "public void update(int x,int y,Card card);", "public void update() { \n rS = globeR;\n // *Generate the vector of the obj on the surface\n drawPosS = sphereToCart(lon, lat, rS);\n // *Generate the vector of the obj inside the globe\n drawPosD = sphereToCart(lon, lat, rD);\n }", "public void increasePosition(float dx, float dy, float dz);", "public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }", "public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }", "public void update(int x,int y);", "public void updatePosition(int y, int x){\r\n\t\tposition = owner.getPosition().add(new Vector(x*SIZE, y*SIZE));\r\n\t\tcenter = this.position.add(new Vector(SIZE/2.,SIZE/2.));\r\n\t\tnode = new Node(center, y*owner.C + x);\r\n\t}", "public void recalculateVector()\r\n {\r\n recalculateVector(destX, destY);\r\n }", "public static void new_position( Body body, double t ){\r\n body.lastState.copyStateVectors( body.currentState );\r\n body.currentState.x = body.currentState.x + body.currentState.vx * t; // new x\r\n body.currentState.y = body.currentState.y + body.currentState.vy * t; // new y\r\n body.currentState.z = body.currentState.z + body.currentState.vz * t; // new z\r\n }", "private void updateTranslated() {\r\n\r\n\tfloat[] dp = new float[3];\r\n\tTools3d.subtract(p, _p, dp);\r\n\r\n\tfor (int i = 0; i < npoints * 3; i+= 3) {\r\n\t // translate by adding the amount local origin has moved by\r\n\t ps[i] += dp[0];\r\n\t ps[i + 1] += dp[1];\r\n\t ps[i + 2] += dp[2];\r\n\t}\r\n\t\r\n\t// reset bounding box and clear dirty flag\r\n\tbox.setBB();\r\n\tdirtyT = false;\r\n\r\n\t// finally\r\n\t_p[0] = p[0];\r\n\t_p[1] = p[1];\r\n\t_p[2] = p[2];\r\n }", "public void updatePosition(double dt)\n {\n if (!projectedVelocity.equals(Vector3.ZERO))\n {\n projectedPosition = projectedPosition.add(projectedVelocity.multiply(dt));\n }\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 }", "private void move() {\n acceleration.accelerate(velocity, position);\r\n }", "private void updatePosition() {\n\t\tfor (int i = 0; i < encoders.length; i++) {\n\t\t\tdRot[i] = (encoders[i].get() - lastEncPos[i]) / this.cyclesPerRev;\n\t\t\tdPos[i] = dRot[i] * wheelDiameter * Math.PI;\n\t\t\tlastEncPos[i] = encoders[i].get();\n\t\t}\n\t\t\n\t\tdLinearPos = (dPos[0] + dPos[1]) / 2;\n\t\t\n\t\tposition[2] = Math.toRadians(gyro.getAngle()) + gyroOffset;\n\t\tposition[0] += dLinearPos * Math.sin(position[2]);\n\t\tposition[1] += dLinearPos * Math.cos(position[2]);\n\t}", "public void update() {\n\t\tthis.set(owner.getX(), owner.getY(), owner.getX() + length*(float)Math.cos(angle),\n\t\t\t\towner.getY() + length*(float)Math.sin(angle));\n\t}", "@Override\n\tpublic void setPosition(Vector3d position) {\n\t\t\n\t}", "public void updateSprites() {\n this.model.getSprites().values().forEach(x -> x.setPosition(this.x, this.y));\n }", "void setPosition(Point point);", "public abstract void objectUpdate(int x,int y, int delta);", "public void setPosition(Point position){\r\n this.position.set(position.x, position.y);\r\n\r\n this.shadow.setPosition(position);\r\n this.surface.setPosition(position);\r\n this.shading.setPosition(position);\r\n\r\n\r\n this.setBounds(new Rect(\r\n this.position.x - this.radius,\r\n this.position.y - this.radius,\r\n this.position.x + this.radius,\r\n this.position.y + this.radius\r\n ));\r\n \r\n }", "public void update(){\n\t\tupdatePlayerPosition();\n\t\thandleCollisions();\n\t}", "private void setOrigin() {\n Hep3Vector origin = VecOp.mult(CoordinateTransformations.getMatrix(), _sensor.getGeometry().getPosition());\n // transform to p-side\n Polygon3D psidePlane = this.getPsidePlane();\n Translation3D transformToPside = new Translation3D(VecOp.mult(-1 * psidePlane.getDistance(),\n psidePlane.getNormal()));\n this._org = transformToPside.translated(origin);\n }", "public void setPosition(Point position);", "public void setPosition(float x, float y, float z) {\n\t\tposition = new Vectorf3(x, y, z);\n\t\tmodified = true;\n\t}", "public void update() {\n\t\tupdateCamera();\n\t}", "@Override\n\tpublic void update(){\n\t\t\n\t\tx += dx;\n\t\tif(x <= 2){\n\t\t\tx = 2;\n\t\t}else if(x >= ((this.width+this.paddlewidth)-350)){\n\t\t\tx = (this.width+this.paddlewidth)-350;\n\t\t}else if(x <= Dimensions.PADDLE_LEFT){\n\t\t\tx = Dimensions.PADDLE_LEFT;\n\t\t}\n\t}", "private void updateCamera() {\n\t\tVector3f x = new Vector3f();\n\t\tVector3f y = new Vector3f();\n\t\tVector3f z = new Vector3f();\n\t\tVector3f temp = new Vector3f(this.mCenterOfProjection);\n\n\t\ttemp.sub(this.mLookAtPoint);\n\t\ttemp.normalize();\n\t\tz.set(temp);\n\n\t\ttemp.set(this.mUpVector);\n\t\ttemp.cross(temp, z);\n\t\ttemp.normalize();\n\t\tx.set(temp);\n\n\t\ty.cross(z, x);\n\n\t\tMatrix4f newMatrix = new Matrix4f();\n\t\tnewMatrix.setColumn(0, x.getX(), x.getY(), x.getZ(), 0);\n\t\tnewMatrix.setColumn(1, y.getX(), y.getY(), y.getZ(), 0);\n\t\tnewMatrix.setColumn(2, z.getX(), z.getY(), z.getZ(), 0);\n\t\tnewMatrix.setColumn(3, mCenterOfProjection.getX(),\n\t\t\t\tmCenterOfProjection.getY(), mCenterOfProjection.getZ(), 1);\n\t\ttry {\n\t\t\tnewMatrix.invert();\n\t\t\tthis.mCameraMatrix.set(newMatrix);\n\t\t} catch (SingularMatrixException exc) {\n\t\t\tLog.d(\"Camera\",\n\t\t\t\t\t\"SingularMatrixException on Matrix: \"\n\t\t\t\t\t\t\t+ newMatrix.toString());\n\t\t}\n\t}", "public void update()\n {\n scene.realDistance(cfg,\n segway.position(),\n segway.pitch(),\n segway.yaw(),\n result);\n \n scale.setX(result.distance());\n }", "public void update() {\n\t\tfirstMove = false;\n\t\tif (color == 1) xrange = -1;\n\t\tif (color == 0) xrange = 1;\n\t}", "@Override\n public void tick() {\n setPosition(getPosition().add(getSpeed())); \n }", "public void update(Point point)\n {\n rectangle.set(point.x - rectangle.width()/2, point.y - rectangle.height()/2, point.x + rectangle.width()/2,point.y + rectangle.height()/2);\n\n //hitBox(this.rectangle);\n }", "@Override\n\tpublic void setPosition(Vector3 pos) {\n\t\t\n\t}", "@Override\r\n\tpublic void updatePosition(int id, float[] pos) {\n\r\n\t}", "private void recalculatePosition()\n {\n position.x = gridCoordinate.getCol()*(width+horizontal_spacing);\n position.y = gridCoordinate.getRow()*(heigh+vertical_spacing);\n }", "@Override\n public void recalculatePositions() { \n \n }", "public void move()\n {\n universe.erase(this);\n \n // compute new position\n \n yPosition += ySpeed;\n xPosition += xSpeed;\n\n // check if it has hit the ground\n if(yPosition >= (groundPosition - diameter) && ySpeed > 0) {\n yPosition = groundPosition - diameter;\n ySpeed = -ySpeed; \n }\n // check if top\n if(yPosition <= 0 && ySpeed < 0){\n ySpeed = -ySpeed; \n }\n //check right\n if(xPosition >= (universe.getLength() - diameter) && xSpeed >0){\n xSpeed = -xSpeed;\n }\n //check left\n if(xPosition <= 0 && xSpeed < 0){\n xSpeed = -xSpeed;\n }\n \n // draw again at new position\n universe.draw(this);\n }", "public void updatePhysics() {\n ball.setLayoutX(ball.getLayoutX() + velX);\n ball.setLayoutY(ball.getLayoutY() - velY);\n\n velY += accelY;\n velX += accelX;\n }", "void updatePercepts() {\n clearPercepts();\n \n Location r1Loc = model.getAgPos(0);\n //Location r2Loc = model.getAgPos(1);\n \n Literal pos1 = Literal.parseLiteral(\"pos(r1,\" + r1Loc.x + \",\" + r1Loc.y + \")\");\n // Literal pos2 = Literal.parseLiteral(\"pos(r2,\" + r2Loc.x + \",\" + r2Loc.y + \")\");\n\n addPercept(pos1);\n //addPercept(pos2);\n \n if (model.hasObject(Const.ObstacleCode, r1Loc)) {\n addPercept(Const.v1);\n }\n// if (model.hasObject(Const.ObstacleCode, r2Loc)) {\n// addPercept(Const.v2);\n// }\n }", "public void setPosition(Point2D position)\n {\n mPosition = position;\n }", "void setPos(float x, float y);", "public void setPosition(float x, float y);", "protected void updateMove(float delta) {\n\n if (freeX && dx != 0) {\n setX(getX() + getDx());\n }\n if (freeY && dy != 0) {\n setY(getY() + getDy());\n }\n }", "private void adjustEViewPosition() {\n double aVec[] = theRocket.getCoordSys().getPositionVec();\n CoordSys eViewSys = new CoordSys();\n eViewSys.setZAxis(VMath.normalize(aVec));\n\n aVec = VMath.vecMultByScalar(aVec, 2.5);\n eViewSys.setPositionAsVec(aVec);\n\n double[] zAxis = VMath.normalize(eViewSys.zAxis().getVectorForm());\n double[] yAxis = VMath.normalize(theRocket.getCoordSys().yAxis().getVectorForm());\n double[] xAxis = VMath.normalize(VMath.crossprd(yAxis, zAxis));\n yAxis = VMath.crossprd(zAxis, xAxis);\n eViewSys.setXAxis(xAxis);\n eViewSys.setYAxis(yAxis);\n eViewSys.setZAxis(zAxis);\n\n eViewSys.xRotate(180);\n eViewSys.zRotate(-90);\n eView.setViewingCoordSys(eViewSys);\n }", "public void update(float delta){\n\t\tposition.add(velocity.cpy().mul(delta));\n\t\tthis.bounds.setPosition(position.x, position.y);\n\t}", "public void update( ) {\n\t\tdraw( );\n\t}", "@Override\n\t\tpublic void updateVariables(){\n\t\t\tthis.currentX = odometer.getCurrentX();\n\t\t\tthis.currentY = odometer.getCurrentY();\n\t\t\tthis.currentAngle = odometer.getHeadingAngle();\n\t\t\tthis.currentAverageVelocity = odometer.getCurrentAverageVelocity();\n\t\t}", "public void stateChanged(ChangeEvent e) {\n\t\t\t\tplane.setX(jsCentreStick.getValue());\n\t\t\t}", "public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }", "@Override\n public void update(String member, float[] values) {\n if (values.length == 3) {\n set(new Vector3f(values[0], values[1], values[2]));\n } else if (values.length == 1 && member.equalsIgnoreCase(\"X\")) {\n set(new Vector3f(values[0], cur.y, cur.z));\n } else if (values.length == 1 && member.equalsIgnoreCase(\"Y\")) {\n set(new Vector3f(cur.x, values[0], cur.z));\n } else if (values.length == 1 && member.equalsIgnoreCase(\"Z\")) {\n set(new Vector3f(cur.x, cur.y, values[0]));\n } else {\n throw new IllegalArgumentException(\"Unable to update \" + getSid() + \n \": must update entire transform \" +\n \" or X, Y, or Z\");\n }\n }", "public void update() {\n\t\tif (screen.scale != newScale) \n\t\t\tscreen = new Screen(Game.width/newScale, Game.height/newScale, newScale);\n\t\t\n\t\tif (screen.width != Game.width || screen.height != Game.height) {\n\t\t\t\n\t\t\tscreen = new Screen(Game.width/newScale, Game.height/newScale, newScale);\n\t\t}\n\t\t\n\t\tfor (Terrain t : terrainObjs) {\n\t\t\tt.update();\n\t\t}\n\t\t\n\t\tif (backgroundMain != null) {\n\t\t\tbackgroundMain.update();\n\t\t}\n\t\t\n\t\txPos += xMoving;\n\t\tyPos += yMoving;\n\t}", "@Override\n\tpublic void update(Zone t) {\n\t\t\n\t}", "public abstract void setPosition(Point2D position);", "void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n // Multiplying by 0 sets the all the components to 0\n acc.mult(0);\n}" ]
[ "0.7063753", "0.6887612", "0.6840575", "0.6814994", "0.65622", "0.6441057", "0.64067286", "0.63971865", "0.6373462", "0.6342056", "0.6330723", "0.63215584", "0.63214314", "0.62255526", "0.621196", "0.613893", "0.6119572", "0.6099013", "0.6096999", "0.6096974", "0.6091997", "0.6087609", "0.6084531", "0.60833204", "0.60561216", "0.6030804", "0.5975757", "0.59674346", "0.5966637", "0.5959227", "0.5947468", "0.5941047", "0.59384376", "0.5937807", "0.5934772", "0.5917709", "0.5913217", "0.5904397", "0.588924", "0.5873941", "0.5869831", "0.5864576", "0.5836103", "0.5822668", "0.5818116", "0.58161545", "0.58059764", "0.5802545", "0.5798365", "0.5788899", "0.57847404", "0.57847404", "0.5759427", "0.5751424", "0.5749986", "0.57468444", "0.5741898", "0.5739319", "0.5733218", "0.5730788", "0.5728864", "0.57196796", "0.57181996", "0.5716966", "0.5708656", "0.57057834", "0.57050484", "0.570312", "0.56886864", "0.5683201", "0.56702906", "0.5660553", "0.5659172", "0.56530905", "0.5648612", "0.5648399", "0.5645615", "0.56454885", "0.56440216", "0.5638284", "0.5635395", "0.56307817", "0.562844", "0.5625978", "0.56238186", "0.56198287", "0.56124425", "0.5596377", "0.5590175", "0.5584355", "0.55830926", "0.5583029", "0.55796224", "0.55688286", "0.5567305", "0.5561343", "0.555916", "0.5557479", "0.55486554", "0.5547335" ]
0.6202284
15
keep change the velosity of the plane, it is damped above
public void move(int accX,int accY){ this.accX = accX; this.accY = accY; velX = velX + accX; velY = velY + accY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Plane() {\r\n\t\tvecX = new Vector3D();\r\n\t\tvecY = new Vector3D();\r\n\t\tnorm = new Vector3D();\r\n\t\tthis.setD(0);\r\n\t\tpos = new Position3D();\r\n\t}", "public void moverIzquierda() {\n estado = EstadosPersonaje.IZQUIERDA;\n mover(new Vector2(-1, 0));\n }", "Plane getPlane();", "public void reflektiereV(double pAnteil){\n vy = vy*(-pAnteil);\n }", "static float[] makeSwell(float x, float y, float z,\n float scale, float pt_size, float f0, float f1,\n float[] vx, float[] vy, float[] vz, int[] numv) {\n \n float d, xd, yd;\n float x0, y0, x1, y1, x2, y2, x3, y3, x4, y4;\n float sscale = 0.75f * scale;\n \n float[] mbarb = new float[4];\n mbarb[0] = x;\n mbarb[1] = y;\n \n float swell_height = (float) Math.sqrt(f0 * f0 + f1 * f1);\n \n int lenv = vx.length;\n int nv = numv[0];\n \n //determine the initial (minimum) length of the flag pole\n if (swell_height >= 0.1f) {\n // normalize direction\n x0 = f0 / swell_height;\n y0 = f1 / swell_height;\n \n float start_arrow = 0.9f * sscale;\n float end_arrow = 1.9f * sscale;\n float arrow_head = 0.3f * sscale;\n x1 = (x + x0 * start_arrow);\n y1 = (y + y0 * start_arrow);\n x2 = (x + x0 * end_arrow);\n y2 = (y + y0 * end_arrow);\n \n // draw arrow shaft\n vx[nv] = x1;\n vy[nv] = y1;\n vz[nv] = z;\n nv++;\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n \n mbarb[2] = x2;\n mbarb[3] = y2;\n \n xd = x2 - x1;\n yd = y2 - y1;\n \n x3 = x2 - 0.3f * (xd - yd);\n y3 = y2 - 0.3f * (yd + xd);\n x4 = x2 - 0.3f * (xd + yd);\n y4 = y2 - 0.3f * (yd - xd);\n \n // draw arrow head\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x3;\n vy[nv] = y3;\n vz[nv] = z;\n nv++;\n \n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x4;\n vy[nv] = y4;\n vz[nv] = z;\n nv++;\n \n int shi = (int) (10.0f * (swell_height + 0.5f));\n float shf = 0.1f * shi;\n String sh_string = Float.toString(shf);\n int point = sh_string.indexOf('.');\n sh_string = sh_string.substring(0, point + 2);\n double[] start = {x, y - 0.25 * sscale, 0.0};\n double[] base = {0.5 * sscale, 0.0, 0.0};\n double[] up = {0.0, 0.5 * sscale, 0.0};\n VisADLineArray array =\n PlotText.render_label(sh_string, start, base, up, true);\n int nl = array.vertexCount;\n int k = 0;\n for (int i=0; i<nl; i++) {\n vx[nv] = array.coordinates[k++];\n vy[nv] = array.coordinates[k++];\n vz[nv] = array.coordinates[k++];\n nv++;\n }\n }\n else { // if (swell_height < 0.1)\n \n // wind < 2.5 kts. Plot a circle\n float rad = (0.7f * pt_size);\n \n // draw 8 segment circle, center = (x, y), radius = rad\n // 1st segment\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 2nd segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n // 3rd segment\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 4th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // 5th segment\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 6th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n // 7th segment\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 8th segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // System.out.println(\"circle \" + x + \" \" + y + \"\" + rad);\n mbarb[2] = x;\n mbarb[3] = y;\n }\n \n numv[0] = nv;\n return mbarb;\n }", "public void mark_plane(Graphics g, int log_num, int x, int y, int h);", "protected final void resetClipPlanes()\n {\n // set the point for each plane to the viewer position\n Vector3d loc = myPosition.getLocation();\n myLeftClip.setPoint(loc);\n myRightClip.setPoint(loc);\n myBottomClip.setPoint(loc);\n myTopClip.setPoint(loc);\n myRightClip.setNormal(myPosition.getRight().rotate(myPosition.getUp(), Math.PI - myHalfFOVx));\n myLeftClip.setNormal(myPosition.getRight().rotate(myPosition.getUp(), myHalfFOVx));\n myBottomClip.setNormal(myPosition.getUp().rotate(myPosition.getRight(), -myHalfFOVy));\n // Increase the top clip a bit to account for zoomed in with terrain.\n myTopClip.setNormal(myPosition.getUp().rotate(myPosition.getRight(), myHalfFOVy - Math.PI + ourTopClipIncreaseAngle));\n }", "public void moverArriba() {\n estado = EstadosPersonaje.QUIETO;\n mover(new Vector2(0, 1));\n }", "public void swim() {\r\n\t\tif(super.getPosition()[0] == Ocean.getInstance().getWidth()-71){\r\n\t\t\tinvX = true;\r\n\t\t} else if(super.getPosition()[0] == 0){\r\n\t\t\tinvX = false;\r\n\t\t}\r\n\t\tif(super.getPosition()[1] == Ocean.getInstance().getDepth()-71){\r\n\t\t\tinvY = true;\r\n\t\t} else if(super.getPosition()[1] == 0){\r\n\t\t\tinvY = false;\r\n\t\t}\r\n\t\tif(invX){\r\n\t\t\tsuper.getPosition()[0]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[0]+=1;\r\n\t\t}\r\n\t\tif(invY){\r\n\t\t\tsuper.getPosition()[1]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[1]+=1;\r\n\t\t}\r\n\t}", "boolean hasPlaneValue();", "@Override\n \tpublic void update() {\n \t\tif (!constructing) {\n \t\t\t// not constructing means the pellet is still traveling through\n \t\t\t// space\n \n \t\t\t// move the pellet\n \t\t\tVector3f.add(pos, vel, pos);\n \n \t\t\t// if it's too old, kill it\n \t\t\tif (Main.timer.getTime() - birthday > 5) {\n \t\t\t\talive = false;\n \t\t\t} else {\n \t\t\t\t// if the pellet is not dead yet, see if it intersected anything\n \n \t\t\t\t// did it hit another pellet?\n \t\t\t\tPellet neighbor_pellet = queryOtherPellets();\n \n \t\t\t\t// did it hit a line or plane?\n \t\t\t\tVector3f closest_point = queryScaffoldGeometry();\n \n \t\t\t\tif (neighbor_pellet != null) {\n \t\t\t\t\talive = false;\n \n\t\t\t\t\tif (neighbor_pellet == current_cycle.lastElement()){\n\t\t\t\t\t\tSystem.out.println(\"shot at same pellet\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n \t\t\t\t\tif (!(neighbor_pellet instanceof PolygonPellet)) {\n \t\t\t\t\t\tMain.all_dead_pellets_in_world.add(neighbor_pellet);\n \t\t\t\t\t\tneighbor_pellet = new PolygonPellet(neighbor_pellet);\n \t\t\t\t\t\tMain.new_pellets_to_add_to_world.add(neighbor_pellet);\n \t\t\t\t\t}\n \n \t\t\t\t\t// if neighbor pellet's class is not PolygonPellet...\n \t\t\t\t\t// neighbor_pellet = new PolygonPellet(neighbor_pellet)\n \t\t\t\t\t// copy the position and stuff from the line/plane\n \t\t\t\t\t// pellet into the new polygon pellet\n \t\t\t\t\t// then go and add it to this cycle\n \t\t\t\t\t// hopefully it changes in the actual array of world\n \t\t\t\t\t// pellets\n \t\t\t\t\t// if not, remove that pellet from all world pelelts and\n \t\t\t\t\t// then add the new one to the end\n \n \t\t\t\t\tcurrent_cycle.add((PolygonPellet) neighbor_pellet);\n \t\t\t\t\tif (current_cycle.size() > 1) {\n \t\t\t\t\t\tmakeLine();\n \t\t\t\t\t}\n \n \t\t\t\t\tif (current_cycle.size() > 2\n \t\t\t\t\t\t\t&& current_cycle.get(0) == current_cycle\n \t\t\t\t\t\t\t\t\t.get(current_cycle.size() - 1)) {\n \t\t\t\t\t\tmakePolygon();\n \t\t\t\t\t} else {\n \t\t\t\t\t\tActionTracker.newPolygonPellet(this);\n \t\t\t\t\t}\n \n \t\t\t\t} else if (closest_point != null) {\n \t\t\t\t\tSystem.out.println(\"pellet stuck to some geometry\");\n \t\t\t\t\tconstructing = true;\n \n \t\t\t\t\tpos.set(closest_point);\n \n \t\t\t\t\tif (CONNECT_TO_PREVIOUS)\n \t\t\t\t\t\tcurrent_cycle.add(this);\n \n \t\t\t\t\tif (CONNECT_TO_PREVIOUS && current_cycle.size() > 1) {\n \t\t\t\t\t\tmakeLine();\n \t\t\t\t\t}\n \n \t\t\t\t\tif (current_cycle.size() > 2\n \t\t\t\t\t\t\t&& current_cycle.get(0) == current_cycle\n \t\t\t\t\t\t\t\t\t.get(current_cycle.size() - 1))\n \t\t\t\t\t\tmakePolygon();\n \t\t\t\t} else if (Main.draw_points) {\n \t\t\t\t\t// if it's not dead yet and also didn't hit a\n \t\t\t\t\t// neighboring\n \t\t\t\t\t// pellet, look for nearby points in model\n \t\t\t\t\tint neighbors = queryKdTree(pos.x, pos.y, pos.z, radius);\n \n \t\t\t\t\t// is it near some points?!\n \t\t\t\t\tif (neighbors > 0) {\n \t\t\t\t\t\tconstructing = true;\n \t\t\t\t\t\tsetInPlace();\n \n \t\t\t\t\t\tsnapToCenterOfPoints();\n \n \t\t\t\t\t\tif (CONNECT_TO_PREVIOUS)\n \t\t\t\t\t\t\tcurrent_cycle.add(this);\n \n \t\t\t\t\t\tif (CONNECT_TO_PREVIOUS && current_cycle.size() > 1) {\n \t\t\t\t\t\t\tmakeLine();\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\tif (current_cycle.size() > 0)\n \t\t\t\t\tcurrent_cycle.get(0).setAsFirstInCycle();\n \n \t\t\t\tif (constructing == true) {\n \t\t\t\t\tActionTracker.newPolygonPellet(this);\n \t\t\t\t}\n \t\t\t}\n \t\t} else {\n \t\t\t// the pellet has stuck... here we just give it a nice growing\n \t\t\t// bubble animation\n \t\t\tif (radius < max_radius) {\n \t\t\t\tradius *= 1.1;\n \t\t\t}\n \t\t}\n \t}", "public static vtkPlaneCollection computeClippingPlane(Canvas canvas, Point pressPosition, Point releasePosition)\n\t{\n\t\tvtkRenderer render = canvas.GetRenderer();\n\t\tvtkPlaneCollection planes = new vtkPlaneCollection();\n\t\tvtkPlane plane = null;\n\t\tdouble[] p1;\n\t\tdouble[] p2;\n\t\tdouble[] p3;\n\n\t\t/**\n\t\t * These are the two points in the screen that define the different clipping planes\n\t\t */\n\t\tint[][] pos1 =\n\t\t{\n\t\t\t{\n\t\t\t\tpressPosition.x, pressPosition.y\n\t\t\t}, // Left plane\n\n\t\t\t{\n\t\t\t\treleasePosition.x, pressPosition.y\n\t\t\t}, // Top plane\n\n\t\t\t{\n\t\t\t\treleasePosition.x, releasePosition.y\n\t\t\t}, // Right plane\n\n\t\t\t{\n\t\t\t\tpressPosition.x, releasePosition.y\n\t\t\t} // Bottom plane\n\n\t\t};\n\t\tint[][] pos2 =\n\t\t{\n\t\t\t{\n\t\t\t\tpressPosition.x, releasePosition.y\n\t\t\t},\n\t\t\t{\n\t\t\t\tpressPosition.x, pressPosition.y\n\t\t\t},\n\t\t\t{\n\t\t\t\treleasePosition.x, pressPosition.y\n\t\t\t},\n\t\t\t{\n\t\t\t\treleasePosition.x, releasePosition.y\n\t\t\t}\n\t\t};\n\n\t\tfor (int i = 0; i < 4; ++i)\n\t\t{\n\t\t\tplane = new vtkPlane();\n\t\t\trender.SetDisplayPoint(pos1[i][0], pos1[i][1], 0.);\n\t\t\trender.DisplayToWorld();\n\t\t\tp1 = render.GetWorldPoint();\n\t\t\trender.SetDisplayPoint(pos1[i][0], pos1[i][1], 1.);\n\t\t\trender.DisplayToWorld();\n\t\t\tp2 = render.GetWorldPoint();\n\t\t\trender.SetDisplayPoint(pos2[i][0], pos2[i][1], 1.);\n\t\t\trender.DisplayToWorld();\n\t\t\tp3 = render.GetWorldPoint();\n\n\t\t\t// Compute two vectors of the plane\n\t\t\tVector3d v1 = new Vector3d();\n\t\t\tVector3d v2 = new Vector3d();\n\t\t\tVector3d n = new Vector3d();\n\n\t\t\tv1.set(p2);\n\t\t\tv2.set(p1);\n\t\t\tn.set(p3);\n\t\t\tv1.sub(v2);\n\t\t\tv2.sub(n);\n\n\t\t\t// Compute cross product (the normal of the plane) between p1 and p2\n\t\t\tn.cross(v1, v2);\n\t\t\tn.normalize();\n\n\t\t\tplane.SetNormal(n.x, n.y, n.z);\n\t\t\tplane.SetOrigin(p1);\n\t\t\tplanes.AddItem(plane);\n\t\t}\n\t\t\n\t\treturn planes;\n\t}", "public static void main( String args[] )\n {\n JFrame f = new JFrame(\"Test for AltAzController\");\n f.setBounds(0,0,200,200);\n AltAzController controller = new AltAzController();\n// controller.setVirtualScreenSize( 2, 2 );\n f.getContentPane().add( controller );\n f.setVisible( true );\n\n\n JFrame window = new JFrame(\"Test for AltAzController\");\n window.setBounds(20,20,500,500);\n ThreeD_JPanel test = new ThreeD_JPanel();\n window.getContentPane().add( test );\n window.setVisible( true );\n\n controller.addControlledPanel( test );\n IThreeD_Object objs[] = new IThreeD_Object[6];\n Vector3D pts[] = new Vector3D[6];\n pts[0] = new Vector3D( -1, 1, 0 );\n pts[1] = new Vector3D( 1, 1, 0 );\n pts[2] = new Vector3D( 1, 1, 1 );\n pts[3] = new Vector3D( 1, 1, 0 );\n pts[4] = new Vector3D( 1, -1, 0 );\n pts[5] = new Vector3D( -1, -1, 0 );\n objs[0] = new Polyline( pts, Color.CYAN );\n\n pts = new Vector3D[2];\n pts[0] = new Vector3D( 0, 0, 0 );\n pts[1] = new Vector3D( 1, 0, 0 );\n objs[1] = new Polyline( pts, Color.RED );\n\n pts = new Vector3D[2];\n pts[0] = new Vector3D( 0, 0, 0 );\n pts[1] = new Vector3D( 0, 1, 0 );\n objs[2] = new Polyline( pts, Color.GREEN );\n\n pts = new Vector3D[2];\n pts[0] = new Vector3D( 0, 0, 0 );\n pts[1] = new Vector3D( 0, 0, 1 );\n objs[3] = new Polyline( pts, Color.BLUE );\n\n Vector3D center = new Vector3D( -1, -1, 1 );\n Vector3D x_vec = new Vector3D( -1, 1, 0 );\n Vector3D y_vec = new Vector3D( 0, 0, 1 );\n float width = 3;\n float height = 2;\n Color[][] colors = { { Color.RED, Color.GREEN, Color.BLUE },\n { Color.YELLOW, Color.CYAN, Color.MAGENTA },\n { Color.ORANGE, Color.GRAY, Color.WHITE } };\n\n ImageRectangle1 im_rect = new ImageRectangle1( center,\n x_vec,\n y_vec,\n width,\n height,\n colors );\n objs[4] = im_rect;\n\n\n center = new Vector3D( 1, 1, 1 );\n y_vec = new Vector3D( 1, 1, 0 );\n x_vec = new Vector3D( 1, -1, 0 );\n width = 2;\n height = 4;\n Color[][] colors_2 = { { Color.RED, Color.GREEN, Color.BLUE },\n { Color.YELLOW, Color.CYAN, Color.MAGENTA } };\n\n ImageRectangle1 im_rect_2 = new ImageRectangle1( center,\n x_vec,\n y_vec,\n width,\n height,\n colors_2 );\n objs[5] = im_rect_2;\n\n\n test.setObjects( \"SAMPLE_OBJECTS\", objs );\n\n controller.apply( true );\n }", "public CheckPlane( Vector p, Vector n, Vector o )\n\t{\n\t\tsuper(p,n,new Color());\n\t\tsetOrientation(o);\n\t\tsetColor( new Color(0.01,0.01,0.01), new Color(0.99,0.99,0.99) );\n\t}", "public void movbolitas() {\n x += vx;\n y += vy;\n if (x > width || x < 0) {\n vx *= -1;\n }\n if (y > height || y < 0) {\n vy *= -1;\n }\n }", "public void draw_plane(Graphics g, int log_num, int i);", "public void leerPlanesDietas();", "public void moverAbajo() {\n estado = EstadosPersonaje.QUIETO;\n mover(new Vector2(0, -1));\n }", "public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}", "public Plane(Point origin, Vector normal) {\n\t\tthis(origin, normal, new Color((int) (Math.random() * 256),\n\t\t\t\t(int) (Math.random() * 256), (int) (Math.random() * 256)));\n\t}", "private void arretes_fY(){\n\t\tthis.cube[49] = this.cube[46]; \n\t\tthis.cube[46] = this.cube[48];\n\t\tthis.cube[48] = this.cube[52];\n\t\tthis.cube[52] = this.cube[50];\n\t\tthis.cube[50] = this.cube[49];\n\t}", "private void arretes_fO(){\n\t\tthis.cube[40] = this.cube[37]; \n\t\tthis.cube[37] = this.cube[39];\n\t\tthis.cube[39] = this.cube[43];\n\t\tthis.cube[43] = this.cube[41];\n\t\tthis.cube[41] = this.cube[40];\n\t}", "@Override\n protected void beforeDraw(UI ui, PGraphics pg) {\n pointLight(0, 0, 40, model.cx, model.cy, LengthUnit.FOOT.toMillimetres(-20L));\n pointLight(0, 0, 50, model.cx, model.yMax + LengthUnit.FOOT.toMillimetres(10L), model.cz);\n pointLight(0, 0, 20, model.cx, model.yMin - LengthUnit.FOOT.toMillimetres(10L), model.cz);\n //hint(ENABLE_DEPTH_TEST);\n }", "private void arretes_fW(){\n\t\tthis.cube[4] = this.cube[1]; \n\t\tthis.cube[1] = this.cube[3];\n\t\tthis.cube[3] = this.cube[7];\n\t\tthis.cube[7] = this.cube[5];\n\t\tthis.cube[5] = this.cube[4];\n\t}", "public void moverDerecha() {\n estado = EstadosPersonaje.DERECHA;\n mover(new Vector2(1, 0));\n }", "public Plane(double in, boolean isD) {\n\t\tisFlying = isD;\n\t\tinQ = in;\n\t}", "public void flipNormal() {\n int i, j;\n\n for (i = 0; i < nr_of_segments; i++) {\n for (j = 0; j < points_per_segment; j++) {\n points[i][j].z = -points[i][j].z;\n }\n }\n\n for (i = 0; i < (int) ((double) nr_of_segments / step); i++) {\n for (j = 0; j < (int) ((double) points_per_segment / step); j++) {\n evaluated_points[i][j].z = -evaluated_points[i][j].z;\n }\n }\n\n }", "public void perpendicular() {\r\n\t\tset(y, x * -1);\r\n\t}", "public double getPlaneX()\n {\n return planeX;\n }", "private void aretes_aW(){\n\t\tthis.cube[4] = this.cube[16]; \n\t\tthis.cube[16] = this.cube[23];\n\t\tthis.cube[23] = this.cube[37];\n\t\tthis.cube[37] = this.cube[30];\n\t\tthis.cube[30] = this.cube[4];\n\t}", "public void mou(){\n\n this.setY(getY() + getVelocitatY());\n this.setX(getX() + getVelocitatX());\n\n }", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }", "public void movbolitas1() {\n x += vx1;\n y += vy1;\n if (x > width || x < 0) {\n vx1 *= -1;\n }\n if (y > height || y < 0) {\n vy1 *= -1;\n }\n }", "void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n // Multiplying by 0 sets the all the components to 0\n acc.mult(0);\n}", "public void setPlanes(ArrayList planes) {\n this.planes = planes;\n }", "private void doVels() {\n\t\tthis.launchPerVel = Math.sqrt((2d * body.getGm() * this.launchApoAlt) / (this.launchPerAlt * this.a));\n\t\tthis.launchApoVel = Math.sqrt((2d * body.getGm() * this.launchPerAlt) / (this.launchApoAlt * this.a));\n\t}", "public void update(long delta){\n \n if(placement <= -1000){\n placement = zPosition;\n }\n placement -= 5;\n \n \n }", "public void toCollectionPlane()\r\n {\r\n System.out.println(\"toCollectionPlane\");\r\n setManual(false);\r\n if (motorJ1.getCurrentPosition() > initialCollectionPosJ1)\r\n {\r\n j1Power = -J1_POWER;\r\n }\r\n else if (motorJ1.getCurrentPosition() < initialCollectionPosJ1)\r\n {\r\n j1Power = J1_POWER;\r\n }\r\n\r\n if (motorJ2.getCurrentPosition() > initialCollectionPosJ2)\r\n {\r\n j2Power = -J2_POWER;\r\n }\r\n else if (motorJ2.getCurrentPosition() < initialCollectionPosJ2)\r\n {\r\n j2Power = J2_POWER;\r\n }\r\n\r\n if (motorJ3.getCurrentPosition() > initialCollectionPosJ3)\r\n {\r\n j3Power = -UP_POWER_J3;\r\n }\r\n else if (motorJ3.getCurrentPosition() < initialCollectionPosJ3)\r\n {\r\n j3Power = UP_POWER_J3;\r\n }\r\n toPosition(j1Power, j2Power, j3Power, initialCollectionPosJ1, initialCollectionPosJ2, initialCollectionPosJ3);\r\n setIsCollectionPlane(true);\r\n j1Power = 0;\r\n j2Power = 0;\r\n j3Power = 0;\r\n }", "@Override\n\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\tsuper.keyReleased(e);\n\t\t\tplane.minusDirection(e);\n\t\t}", "public void PerspektivischeProjektion(){\n /**\n * Abrufen der Koordinaten aus den einzelnen\n * Point Objekten des Objekts Tetraeder.\n */\n double[] A = t1.getTetraeder()[0].getPoint();\n double[] B = t1.getTetraeder()[1].getPoint();\n double[] C = t1.getTetraeder()[2].getPoint();\n double[] D = t1.getTetraeder()[3].getPoint();\n\n /*\n * Aufrufen der Methode sortieren\n */\n double[][] sP = cls_berechnen.sortieren(A, B, C, D);\n\n A = sP[0];\n B = sP[1];\n C = sP[2];\n D = sP[3];\n\n /*Wenn alle z Koordinaten gleich sind, ist es kein Tetraeder. */\n if (A[2] == D[2]) {\n System.out.println(\"kein Tetraeder\");\n return;\n }\n\n //Entfernung vom 'Center of projection' zur 'Projectoin plane'\n double d=5;\n\n /*\n * Transformiert x|y|z Koordinaten in x|y Koordinaten\n * mithilfer der perspektivischen Projektion\n */\n\n A[0]=A[0]/((A[2]+d)/d);\n A[1]=A[1]/((A[2]+d)/d);\n B[0]=B[0]/((B[2]+d)/d);\n B[1]=B[1]/((B[2]+d)/d);\n C[0]=C[0]/((C[2]+d)/d);\n C[1]=C[1]/((C[2]+d)/d);\n D[0]=D[0]/((D[2]+d)/d);\n D[1]=D[1]/((D[2]+d)/d);\n\n\n double ax, ay, bx, by, cx, cy, dx, dy;\n ax=A[0];\n ay=A[1];\n bx=B[0];\n by=B[1];\n cx=C[0];\n cy=C[1];\n dx=D[0];\n dy=D[1];\n\n tetraederzeichnen(ax, ay, bx, by, cx, cy, dx, dy);\n }", "public Vector subtract(Point3D p){\n// return new Vector(\n// p.x.coord- x.coord,\n// p.y.coord- y.coord,\n// p.z.coord- z.coord);\n return new Vector(\n x.coord- p.x.coord,\n y.coord- p.y.coord,\n z.coord- p.z.coord);\n }", "PlaneSubset(final Plane plane) {\n this.plane = plane;\n }", "public void recalculateVector()\r\n {\r\n recalculateVector(destX, destY);\r\n }", "private void aretes_aO(){\n\t\tthis.cube[40] = this.cube[7]; \n\t\tthis.cube[7] = this.cube[25];\n\t\tthis.cube[25] = this.cube[46];\n\t\tthis.cube[46] = this.cube[34];\n\t\tthis.cube[34] = this.cube[40];\n\t}", "double getVz() { return vel[2]; }", "@Override\n public void drawPointCloud(PVector[] depthMap) {\n\n ArrayList<QuickHull3D> hulls = new ArrayList<QuickHull3D>();\n ArrayList<Point3d> points = new ArrayList<Point3d>();\n PVector oldVector = depthMap[0];\n QuickHull3D myHull = new QuickHull3D();\n\n for (int i = 1; i < depthMap.length; i++) {\n PVector myVector = depthMap[i];\n\n if (myVector.dist(oldVector) > 500) {\n if (points.size() > 10) {\n try {\n myHull.build(points.toArray(new Point3d[points.size()]));\n } catch(IllegalArgumentException e) {\n\n }\n hulls.add(myHull);\n myHull = new QuickHull3D();\n }\n points.clear();\n }\n\n if (myVector.z < 3000) {\n points.add(new Point3d(myVector.x, myVector.y, myVector.z));\n\n oldVector = myVector;\n }\n }\n\n// Point3d[] points = new Point3d[depthMap.length];\n// for (int i = 0; i < depthMap.length; i++) {\n// PVector vector = depthMap[i];\n// points[i] = new Point3d(vector.x, vector.y, vector.z);\n// }\n// hull.build(points);\n\n p5.fill(255, 50);\n p5.stroke(255, 70);\n\n for (QuickHull3D hull : hulls) {\n int[][] faceIndices = hull.getFaces();\n for (int i = 0; i < faceIndices.length; i++) {\n p5.beginShape();\n for (int k = 0; k < faceIndices[i].length; k++) {\n Point3d point = hull.getVertices()[faceIndices[i][k]];\n p5.vertex((float) point.x, (float) point.y, (float) point.z);\n }\n p5.endShape();\n }\n }\n\n// PApplet.println(hull.getNumFaces());\n }", "private float[] calculatePlaneTransform(double[] point, double normal[],\n float[] openGlTdepth) {\n // Vector aligned to gravity.\n float[] openGlUp = new float[]{0, 1, 0, 0};\n float[] depthTOpenGl = new float[16];\n Matrix.invertM(depthTOpenGl, 0, openGlTdepth, 0);\n\n float[] depthUp = new float[4];\n Matrix.multiplyMV(depthUp, 0, depthTOpenGl, 0, openGlUp, 0);\n\n // Create the plane matrix transform in depth frame from a point,\n // the plane normal and the up vector.\n float[] depthTplane = matrixFromPointNormalUp(point, normal, depthUp);\n float[] openGlTplane = new float[16];\n Matrix.multiplyMM(openGlTplane, 0, openGlTdepth, 0, depthTplane, 0);\n\n return openGlTplane;\n }", "void Death(){\r\n if (vie==0){\r\n this.plateau[this.x][this.y]='0';\r\n }\r\n }", "@Test\n void getNormal() {\n Plane pl = new Plane(new Point3D(-1,2,1), new Point3D(0,-3,2), new Point3D(1,1,-4)\n );\n\n assertEquals(new Vector(26,7,9).normalize(),\n pl.getNormal(),\n \"Bad normal to trinagle\");\n\n }", "public void keyPressed(KeyEvent evt) {\n Vector3f translate = new Vector3f();\n Vector3f transball = new Vector3f();\n \n plane_trans.get( translate ); \n ball_trans.get( transball ); \n \n if (evt.getKeyChar()=='a') {\n Transform3D rotate = new Transform3D();\n rotate.rotY(Math.PI/36.0d);\n plane_trans.mul(rotate);\n \n //transball.x += 0.4f;\n \n \n \n }\n if (evt.getKeyChar()=='d') {\n Transform3D rotate = new Transform3D();\n rotate.rotY(-Math.PI/36.0d);\n plane_trans.mul(rotate);\n //transball.x -= 0.3f;\n }\n \n /*if (evt.getKeyChar()=='s') {\n Transform3D rotate = new Transform3D();\n rotate.rotX(-Math.PI/36.0d);\n plane_trans.mul(rotate);\n transball.y += 0.5f;\n }*/\n \n /*if (evt.getKeyChar()=='w') {\n Transform3D rotate = new Transform3D();\n rotate.rotX(Math.PI/36.0d);\n plane_trans.mul(rotate);\n transball.y -= 0.4f;\n \n }*/\n \n if (evt.getKeyChar()=='i') {\n //transball.x = 0.0f;\n //transball.y = -3.00f;\n //transball.z = 0.3f;\n plane_trans.set(new Vector3f(0.0f, 1.5f, 9985.0f));\n \n Transform3D rotate = new Transform3D();\n rotate.rotX(-Math.PI/3.0d);\n plane_trans.mul(rotate);\n }\n \n if(evt.getKeyChar()=='l'){\n stime = 2000;\n movement();\n \n \n }\n \n // (-5,5) (-5,-4) (5,-4) (5,5)\n // x varies from -5 to 5\n // y varies from 5 to -4\n \n /*if(transball.x< -5 || transball.x>5){\n transball.x = 0.0f;\n transball.y = -3.00f;\n }\n if(transball.y < -4 || transball.y>5){\n transball.x = 0.0f;\n transball.y = -3.00f;\n }*/\n \n \n //ball_trans.setTranslation( transball );\n //ballTG.setTransform(ball_trans);\n \n plane_trans.setTranslation( translate );\n planeTG.setTransform(plane_trans);\n \n // make a rectangle and usse its four coordinates to check where the ball is in the area or outside\n // resetball();\n \n \n \n }", "public void vivir(){\r\n\t\r\n\tAtacable algo42tmp;\r\n\t\r\n\tif (!(this.muerto)){\r\n\t\tfor(int i = 0; i <= this.velY; i++){\r\n\t\t\tthis.mover();\r\n\t\t}\r\n\t\t\r\n\t\talgo42tmp = zonaDeCombate.comprobarColisionAlgo42(this);\r\n\t\tif (algo42tmp != null){\r\n\t\t\talgo42tmp.recibirDanio(20); /**hacer q se muera*/\r\n\t\t\tthis.muerto = true;\r\n\t\t}\r\n\t\t\r\n\r\n\t\t}\r\n\t}", "public void invert() {\n\t\tthis.vector.setXYZ(-this.vector.x(), -this.vector.y(), -this.vector.z());\n\t\tthis.energy = -this.energy;\n\t}", "public Plane(Point origin, Vector normal, Color c) {\n\t\tthis.origin = origin;\n\t\tthis.normal = normal;\n\n\t\tthis.c = c;\n\t}", "public void phaseOutMovement() {\n inertia_y();\n inertia_x();\n }", "private void bounceOffVerticalWall() {\n vx = -vx;\n }", "private void updateTempVisiblePoints() {\n for (int[] point : tempVisiblePoints) {\n point[3] -= 1;\n if (point[3] <= 0) {\n map.setPointHidden(point[0], point[1]);\n }\n }\n }", "public void act(){\n if (alive) {\n x = x + vx * dt;\n vx = vx * (1. - daempfung); //Luftwiderstand, eventuell muss dass nur in der Spielerklasse implementiert\n //werden, damit die Pilze nicht abgebremst werden.\n if (bewegung == Bewegung.fallen) {\n y = y + vy * dt;\n vy = vy + g * dt;\n }\n }\n }", "@java.lang.Override\n public boolean hasPlaneValue() {\n return typeCase_ == 10;\n }", "private static void vel_step ( int N, double[] u, double[] v, double[] u0, double[] v0,\r\n\t\tfloat visc, float dt )\r\n\t\t{\r\n\t\tadd_source ( N, u, u0, dt ); add_source ( N, v, v0, dt );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\t//SWAP ( u0, u ); \r\n\t\t\r\n\t\tdouble[] temp;\r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t//draw_dens ( N, u );\r\n\t\tdiffuse ( N, 1, u, u0, visc, dt );\r\n\t\t//draw_dens ( N, u );\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t//SWAP ( v0, v ); \r\n\t\t//double[] temp;\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//draw_dens ( N, v );\r\n\t\t//draw_dens ( N, v0 );\r\n\t\tdiffuse ( N, 2, v, v0, visc, dt );\r\n\t\t//draw_dens ( N, v );\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t//SWAP ( u0, u ); \r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t\r\n\t\t//SWAP ( v0, v );\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\tadvect ( N, 1, u, u0, u0, v0, dt ); \r\n\t\tadvect ( N, 2, v, v0, u0, v0, dt );\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t}", "@java.lang.Override\n public boolean hasPlaneValue() {\n return typeCase_ == 10;\n }", "public void mueveBala() {\n switch (direccion) {\n case NORTE:\n posY -= velocidadBala;\n break;\n case SUR:\n posY += velocidadBala;\n break;\n case ESTE:\n posX += velocidadBala;\n break;\n case OESTE:\n posX -= velocidadBala;\n break;\n }\n actualizaHitbox();\n }", "public void Wall()\n {\n if (this.getX() > 50 -this.getScale()) \n { \n this.setX(this.getX()-0.5); \n } \n else if (this.getX() < getScale()) \n {\n this.setX(this.getX()+0.5);\n \n }else if (this.getZ() > 50-this.getScale() ) \n {\n this.setZ(this.getZ()-0.5);\n \n }else if (this.getScale() > this.getZ()) \n {\n this.setZ(this.getZ()+0.5);\n }\n }", "private void aretes_aY(){\n\t\tthis.cube[49] = this.cube[43]; \n\t\tthis.cube[43] = this.cube[21];\n\t\tthis.cube[21] = this.cube[10];\n\t\tthis.cube[10] = this.cube[32];\n\t\tthis.cube[32] = this.cube[49];\n\t}", "private void bounceOffHorizontalWall() {\n vy = -vy;\n }", "protected Vertex() {\n\t\tisInDepot = false;\n\t}", "private static void setPlane(){\n // your code goes there\n LinearRegression linG;\n linG = new LinearRegression(2,2000);\n\n for(double i = 0; i < 1000; i+=1)\n {\n double[] pt1, pt2;\n pt1 = new double[2];\n pt2 = new double[2];\n\n pt1[0] = i;\n pt2[0] = 2.0*i;\n\n pt1[1] = 2.0*i;\n pt2[1] = i;\n\n linG.addSample(pt1,5.0*i);\n linG.addSample(pt2,4.0*i);\n }\n \n\n System.out.println(\"Current hypothesis :\" + linG.currentHypothesis());\n System.out.println(\"Current cost :\" + linG.currentCost());\n\n for(int i = 1; i <= 10; i++)\n {\n linG.gradientDescent(0.000000003,1000);\n\n System.out.println(\"Current hypothesis :\" + linG.currentHypothesis());\n System.out.println(\"Current cost :\" + linG.currentCost());\n }\n\t}", "@Override\n \t\t\t\tpublic void doWorldPerspective() {\n \n \t\t\t\t}", "Builder(final Plane plane) {\n this.plane = plane;\n }", "public String getPlaneName() {\n return PlaneName;\n }", "public boolean\n doIntersection(Ray inOutRay) {\n double t, min_t = Double.MAX_VALUE;\n double x2 = size.x/2; // OJO: Esto deberia venir precalculado\n double y2 = size.y/2; // OJO: Esto deberia venir precalculado\n double z2 = size.z/2; // OJO: Esto deberia venir precalculado\n Vector3D p = new Vector3D();\n GeometryIntersectionInformation info = \n new GeometryIntersectionInformation();\n\n inOutRay.direction.normalize();\n\n // (1) Plano superior: Z = size.z/2\n if ( Math.abs(inOutRay.direction.z) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Z=size.z/2\n t = (z2-inOutRay.origin.z)/inOutRay.direction.z;\n if ( t > -VSDK.EPSILON ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.y >= -y2 && p.y <= y2 ) {\n info.p = new Vector3D(p);\n min_t = t;\n lastPlane = 1;\n }\n }\n }\n\n // (2) Plano inferior: Z = -size.z/2\n if ( Math.abs(inOutRay.direction.z) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Z=-size.z/2\n t = (-z2-inOutRay.origin.z)/inOutRay.direction.z;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.y >= -y2 && p.y <= y2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 2;\n }\n }\n }\n\n // (3) Plano frontal: Y = size.y/2\n if ( Math.abs(inOutRay.direction.y) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Y=size.y/2\n t = (y2-inOutRay.origin.y)/inOutRay.direction.y;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 3;\n }\n }\n }\n\n // (4) Plano posterior: Y = -size.y/2\n if ( Math.abs(inOutRay.direction.y) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Y=-size.y/2\n t = (-y2-inOutRay.origin.y)/inOutRay.direction.y;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 4;\n }\n }\n }\n\n // (5) Plano X = size.x/2\n if ( Math.abs(inOutRay.direction.x) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano X=size.x/2\n t = (x2-inOutRay.origin.x)/inOutRay.direction.x;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.y >= -y2 && p.y <= y2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 5;\n }\n }\n }\n\n // (6) Plano X = -size.x/2\n if ( Math.abs(inOutRay.direction.x) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano X=-size.x/2\n t = (-x2-inOutRay.origin.x)/inOutRay.direction.x;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.y >= -y2 && p.y <= y2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 6;\n }\n }\n }\n\n if ( min_t < Double.MAX_VALUE ) {\n inOutRay.t = min_t;\n lastInfo.clone(info);\n return true;\n }\n return false;\n }", "void setupPointScaleFree() {\n\t\tbeginOffsetP.set(P);\n\n\t\tleftOppositeLine = neighborOppositeLinesFromPoint(selectedPoint)[0];\n\t\trightOppositeLine = neighborOppositeLinesFromPoint(selectedPoint)[1];\n\t\tleftOppositeLine.resetLockPoints(P);\n\t\trightOppositeLine.resetLockPoints(P);\n\t\tbeginP.set(P);\n\t\tbeginOffsetP.set(P);\n\n\t\tbeginOffset.set(P); // lock the beginning position of the\n\t\t\t\t\t\t\t// offset vector\n\t\tbeginOffsetP.set(point[selectedPoint].position); // lock the beginning\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of the vector to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// be transformed\n\n\t\tleftOppositeLine.isOnThisSideOfLine = leftOppositeLine.checkLineSide(P); // check\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// on\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// which\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// side\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// mirror\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// we\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// are\n\t\trightOppositeLine.isOnThisSideOfLine = rightOppositeLine.checkLineSide(P);\n\t}", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "private void coins_fY(){\n\t\tthis.cube[49] = this.cube[45]; \n\t\tthis.cube[45] = this.cube[51];\n\t\tthis.cube[51] = this.cube[53];\n\t\tthis.cube[53] = this.cube[47];\n\t\tthis.cube[47] = this.cube[49];\n\t}", "long getPlaneSize();", "@Test\n public void bonusTMoveCamera2() {\n Scene scene = new Scene(\"Test scene\");\n scene.setCamera(new Camera(new Point3D(3100, -3100, -2600), new Vector(-2, 2, 2), new Vector(-1, -2, 1)));\n scene.setDistance(600);\n scene.setBackground(Color.BLACK);\n scene.setAmbientLight(new AmbientLight(new Color(java.awt.Color.WHITE), 0.15));\n\n scene.addGeometries( //\n new Plane(new Material(0.4, 0.1, 60, 0, 0), new Color(java.awt.Color.DARK_GRAY),\n new Point3D(0, 400, 100), new Vector(0, -1, 0)),\n new Polygon(Color.BLACK, new Material(0.2, 0.3, 200, 0.5, 0),\n new Point3D(-1, -300, 500), new Point3D(-1, -140, 500), new Point3D(1, -140, 500), new Point3D(1, -300, 500)),\n new Sphere(new Color(java.awt.Color.yellow), new Material(0.2, 0.2, 200, 0, 0.6), // )\n 80, new Point3D(-1, -120, 500)),\n new Polygon(Color.BLACK, new Material(0.2, 0.2, 200, 0.9, 0),\n new Point3D(-150, -150, 1999), new Point3D(-150, 200, 1999), new Point3D(150, 200, 1999), new Point3D(150, -150, 1999)),\n new Sphere(new Color(800, 0, 0), new Material(0.3, 0.5, 200, 0.2, 0), // )\n 140, new Point3D(300, 260, 600)),\n new Sphere(new Color(0, 0, 200), new Material(0.25, 0.25, 20, 0, 0.25), // )\n 140, new Point3D(-260, 260, 0)),\n new Sphere(new Color(400, 20, 20), new Material(0.2, 0.5, 200, 0, 0.3), // )\n 100, new Point3D(-600, 300, 1300)),\n new Triangle(new Color(100, 300, 100), new Material(0.25, 0.5, 100, 0.25, 0),\n new Point3D(-100, 400, 150), new Point3D(100, 400, 350), new Point3D(0, 200, 250)));\n\n scene.addLights(new SpotLight(new Color(700, 400, 400), //no. 1\n new Point3D(0, 0, -1500), 1, 4E-5, 2E-7, new Vector(0, 0, 1)).setRadius(15),\n new PointLight(new Color(200, 400, 200), new Point3D(0.001, -100, 499), 1, 4E-5, 2E-7).setRadius(15),//no.2\n new PointLight(new Color(200, 200, 400), new Point3D(0.001, -50, 1000), 1, 4E-5, 2E-7).setRadius(25));//no.3\n\n ImageWriter imageWriter = new ImageWriter(\"The magical room moving camera to right - soft shadow 5\", 200, 200, 1000, 1000);\n Render render = new Render(imageWriter, scene).setSuperSampling(400).setMultithreading(3).setDebugPrint();\n\n render.renderImage();\n render.writeToImage();\n }", "public Plane3(Plane3 p) {\n this.a = p.a; this.b = p.b; this.c = p.c; this.v = p.v; this.d = p.d;\n }", "static Vector4d computePlane(Vector3d a, Vector3d b, Vector3d c)\n\t{\n\t\tVector4d plane = new Vector4d();\n\t\t\n\t\tVector3d ab = new Vector3d();\n\t\tab.sub(b, a);\n\t\t\n\t\tVector3d ac = new Vector3d();\n\t\tac.sub(c, a);\n\t\t\n\t\tVector3d n = new Vector3d();\n\t\tn.cross(ab, ac);\n\t\tn.normalize();\n\t\t\n\t\tplane.set(n);\n\t\tplane.w = - a.dot(n);\n\t\t\n\t\treturn plane;\n\t}", "public void c(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2)\r\n/* 77: */ {\r\n/* 78: 89 */ float f1 = uv.a(paramDouble1 * paramDouble1 + paramDouble2 * paramDouble2 + paramDouble3 * paramDouble3);\r\n/* 79: */ \r\n/* 80: 91 */ paramDouble1 /= f1;\r\n/* 81: 92 */ paramDouble2 /= f1;\r\n/* 82: 93 */ paramDouble3 /= f1;\r\n/* 83: */ \r\n/* 84: 95 */ paramDouble1 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 85: 96 */ paramDouble2 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 86: 97 */ paramDouble3 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 87: */ \r\n/* 88: 99 */ paramDouble1 *= paramFloat1;\r\n/* 89:100 */ paramDouble2 *= paramFloat1;\r\n/* 90:101 */ paramDouble3 *= paramFloat1;\r\n/* 91: */ \r\n/* 92:103 */ this.v = paramDouble1;\r\n/* 93:104 */ this.w = paramDouble2;\r\n/* 94:105 */ this.x = paramDouble3;\r\n/* 95: */ \r\n/* 96:107 */ float f2 = uv.a(paramDouble1 * paramDouble1 + paramDouble3 * paramDouble3);\r\n/* 97: */ \r\n/* 98:109 */ this.A = (this.y = (float)(Math.atan2(paramDouble1, paramDouble3) * 180.0D / 3.141592741012573D));\r\n/* 99:110 */ this.B = (this.z = (float)(Math.atan2(paramDouble2, f2) * 180.0D / 3.141592741012573D));\r\n/* 100:111 */ this.i = 0;\r\n/* 101: */ }", "private void arretes_fG(){\n\t\tthis.cube[31] = this.cube[28]; \n\t\tthis.cube[28] = this.cube[30];\n\t\tthis.cube[30] = this.cube[34];\n\t\tthis.cube[34] = this.cube[32];\n\t\tthis.cube[32] = this.cube[31];\n\t}", "public void setCulling(boolean tf) {\n m_culling = tf;\n }", "public Plane(Point spawnPoint, boolean flyingHorizontally, Level parentLevel){\n // Initialize the variables for the plane\n this.flyingHorizontally = flyingHorizontally;\n this.drawOps = new DrawOptions();\n this.planeImage = new Image(\"res/images/airsupport.png\");\n this.parentLevel = parentLevel;\n this.isFinished = false;\n this.bombs = new ArrayList<>();\n\n // Initialize the timekeeper that will control when a bomb should be dropped\n // '1' is added to the RNG here as the upper bound is not inclusive\n int initialDropTime = ThreadLocalRandom.current().nextInt(DROP_TIME_LOWER_BOUND,DROP_TIME_UPPER_BOUND + 1);\n this.bombDropper = new Timekeeper(initialDropTime);\n this.justDropped = false;\n // The Plane can either fly horizontally or vertically, which is specified in its constructor\n if (flyingHorizontally){\n // Set the plane facing to the right, at the leftmost point of the window and at the correct\n // height given by the spawn position\n this.currPos = new Point(0, spawnPoint.y);\n this.drawOps.setRotation(Math.PI/2);\n this.flyingHorizontally = true;\n }\n else {\n // Set the plane facing downward, at the top of the window and at the correct\n // x co-ordinate given by the spawn position\n this.currPos = new Point(spawnPoint.x, 0);\n this.drawOps.setRotation(Math.PI);\n this.flyingHorizontally = false;\n }\n }", "double getVy() { return vel[1]; }", "public static void setScene() {\n\n Shape ground = new Plane(vec3(0.0, -1.0, 0.0), vec3(0, 1, -0.2), new Diffuse(new Vec3(1,1,1), white));\n \n /* Shape globe1 = new Sphere(vec3(0.0, 2, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n Shape globe2 = new Sphere(vec3(2, 0, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n Shape globe3 = new Sphere(vec3(-2, 0, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n*/\n Shape globe1T = new Sphere(vec3(0.0, 2, -2.0), 0.3, new Diffuse(new Vec3(1,1,1), white));\n // Shape globe2T = new Sphere(vec3(-0.5, -2, -3.0), 0.5, new Diffuse(new Vec3(1,1,1),yellow));\n // Shape globe3T = new Sphere(vec3(0.5, -2, -3.0), 0.5, new Diffuse(new Vec3(1,1,1), yellow));\n\n \n \n Shape globe4 = new Sphere(vec3(0.0, 2, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n Shape globe5 = new Sphere(vec3(2, 0, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n Shape globe6 = new Sphere(vec3(-2, 0, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n \n Shape globe7 = new Sphere(vec3(0.0, 2, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe8 = new Sphere(vec3(2, 0, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe9 = new Sphere(vec3(-2, 0, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe7D = new Sphere(vec3(0.0, -2, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n\n Shape globeC = new Sphere(vec3(0.0, 0.0, -6.0), 1.0, new Diffuse(new Vec3(1,1,1), red));\n \n ArrayList<Shape> shapes = new ArrayList<>();\n shapes.add(bg);\n shapes.add(ground);\n shapes.add(globe1T);\n // shapes.add(globe2T);\n // shapes.add(globe3T);\n //shapes.add(globe4);\n //shapes.add(globe5);\n shapes.add(globe7);\n shapes.add(globe8);\n shapes.add(globe9);\n shapes.add(globe7D);\n shapes.add(globeC);\n gr = new Group(shapes);\n /////////////////////////////--------------------------------------\n \n \n }", "public static void main(String[] args) {\n\t\tJFrame myFrame = new JFrame(\"Plane Control\");\n\t\tmyFrame.setSize(650, 600);\n\t\tmyFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t// Creating widgets\n\t\tJSlider jsCentreStick = new JSlider(JSlider.HORIZONTAL, 0, 10, 5); // min\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// max\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// parameters\n\t\tJSlider jsThrottle = new JSlider(JSlider.VERTICAL, 0, 10, 0);\n\t\tJButton jbReset = new JButton(\"Reset\");\n\t\tJTextArea jtArea = new JTextArea();\n\n\t\t// Automatically scrolls down\n\t\tDefaultCaret caret = (DefaultCaret) jtArea.getCaret();\n\t\tcaret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);\n\t\tJScrollPane scroll = new JScrollPane(jtArea);\n\t\tmyFrame.setLayout(new GridLayout(2, 1));\n\t\tmyFrame.add(scroll);\n\n\t\t// Creates panel, sets layout and adds widgets to south panel\n\t\tJPanel jpSouth = new JPanel();\n\t\tjpSouth.setLayout(new BorderLayout());\n\t\tjpSouth.add(jsCentreStick, BorderLayout.NORTH);\n\t\tjpSouth.add(jsThrottle, BorderLayout.CENTER);\n\t\tjpSouth.add(jbReset, BorderLayout.SOUTH);\n\n\t\t// adds panel to frame\n\t\tmyFrame.add(jpSouth);\n\n\t\t// Creates an aeroplane and the initial x and y value is from the\n\t\t// throttle and centrestick\n\t\tAeroplane plane = new Aeroplane(0, jsCentreStick.getValue(),\n\t\t\t\tjsThrottle.getValue(), 0, 0);\n\n\t\t// Creates an inner class\n\t\tjsCentreStick.addChangeListener(new ChangeListener() {\n\t\t\t/*\n\t\t\t * updates planes x value with the centresticks value on the GUI\n\t\t\t */\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tplane.setX(jsCentreStick.getValue());\n\t\t\t}\n\t\t});\n\t\t// Creates an inner class\n\t\tjsThrottle.addChangeListener(new ChangeListener() {\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\t/*\n\t\t\t\t * updates planes speed value with the throttle value on the GUI\n\t\t\t\t */\n\t\t\t\tplane.setSpeed(jsThrottle.getValue());\n\t\t\t}\n\t\t});\n\t\t// allows the user to see the GUI\n\t\tmyFrame.setVisible(true);\n\n\t\twhile (plane.onRunway()) {\n\t\t\ttry {\n\t\t\t\t// print message of plane details\n\t\t\t\tjtArea.append(\"Seconds: \" + plane.getCurrentTime() + \" \\n\"\n\t\t\t\t\t\t+ \"X: \" + plane.getX() + \" Y: \" + plane.getY()\n\t\t\t\t\t\t+ \" Speed: \" + plane.getSpeed() + \" Elevation: \"\n\t\t\t\t\t\t+ plane.updateElevation() + \"\\n\");\n\t\t\t\t// 1 second pause and adds 1 second\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tplane.setCurrentTime(plane.getCurrentTime() + 1);\n\t\t\t\t// checks if plane's elevation is greater than 4 and x value is\n\t\t\t\t// 5\n\t\t\t\tif (plane.getElevation() > 4 && plane.getX() == 5) {\n\t\t\t\t\tjtArea.append(\"Plane has taken off! \\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t\t// checks if the plane is not on the runway\n\t\tif (!plane.onRunway()) {\n\t\t\tjtArea.append(\"Take off failed!\");\n\t\t}\n\n\t}", "public void actionPerformed(ActionEvent ae){\n\t\ttarget.moveCameraBRU(target.getVVec().normalize(0.2f));\r\n\t\t// set V vec to 1.0 length\r\n\t\ttarget.getVVec().normalize(1.0f);\r\n\t}", "public void verzerren(int mouse_x, int mouse_y, boolean ende) {\n\t\t\t\tif(zustand==0){\n\t\t\t\t\tdouble distance = 0;\n\n\t\t\t\t\tfor (Particle p : pm.particlesystem) {\n\t\t\t\t\t\tdistance = p.getDistance(mouse_x, mouse_y);\n\t\t\t\t\t\tif(distance <= orad+200){\n\t\t\t\t\t\t\tgelocked =p;\n\t\t\t\t\t\t\tzustand=1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"Partikel erkannt!\");\n\t\t\t\t\tSystem.out.println(gelocked.getSpeed(0));\n\t\t\t\t\tSystem.out.println(gelocked.getSpeed(1));\n\t\t\t\t}\n\t\t\n\t\t//Wenn schon ein Partikel gefunden bewegen\t\t\n\t\tif(zustand==1){\t\t\n\t\t\tgelocked.setLocation(mouse_x, mouse_y);\n\t\t\tSystem.out.println(\"Partikel bewegt!\");\t\t\t\n\t\t\tSystem.out.println(particle.getLocation(0));\n\t\t\tSystem.out.println(particle.getLocation(1));\n//\t\t\tgui.repaint();\n\t\t\t\n\t\t}\n\t\t\n\t\t//Wenn ein Partikel gefunden wurde und ende �bergeben wird freigeben\n\t\tif(zustand==1 && ende){\n\t\t\tSystem.out.println(\"Partikel freigegeben!\");\t\t\t\n\t\t\tgelocked=null;\n\t\t\tzustand=0;\n\t\t}\n\t\t\n\t}", "public Plane(double a, double b, double c, double d) {\n this.a = a;\n this.b = b;\n this.c = c;\n this.d = d;\n }", "@Override\n public void handleCollision(Pellet pellet)\n {\n if(!isMovingToPoint())\n {\n if (mirror.getColor().a > Toggle.fadealpha)\n {\n\n float mirOX = getPosX() + getWidth() / 2;\n float mirOY = getPosY() + getHeight() / 2;\n\n if (acceptedDirs.equals(\"dl\"))\n {\n\n if (pellet.direction == 'u')\n {\n pellet.direction = 'd';\n pellet.pellet.setX(mirOX - (pellet.pellet.getWidth() / 2));\n }\n else if (pellet.direction == 'd')\n {\n pellet.direction = 'r';\n }\n else if (pellet.direction == 'l')\n {\n pellet.direction = 'u';\n pellet.pellet.setX(mirOX - (pellet.pellet.getWidth() / 2));\n pellet.pellet.setY(mirOY - (pellet.pellet.getHeight() / 2));\n }\n else if (pellet.direction == 'r')\n {\n pellet.direction = 'l';\n pellet.pellet.setY(mirOY - (pellet.pellet.getHeight() / 2));\n }\n }\n else if (acceptedDirs.equals(\"dr\"))\n {\n if (pellet.direction == 'u')\n {\n pellet.direction = 'd';\n pellet.pellet.setX(mirOX - (pellet.pellet.getWidth() / 2));\n }\n else if (pellet.direction == 'd')\n {\n pellet.direction = 'l';\n pellet.pellet.setX(mirOX - (pellet.pellet.getWidth() / 2) + 1 / PlayScreen.PPM);\n pellet.pellet.setY(mirOY - (pellet.pellet.getHeight() / 2) - 1 / PlayScreen.PPM);\n }\n else if (pellet.direction == 'l')\n {\n pellet.direction = 'r';\n pellet.pellet.setY(mirOY - (pellet.pellet.getHeight() / 2));\n }\n else if (pellet.direction == 'r')\n {\n pellet.direction = 'u';\n pellet.pellet.setX(mirOX - (pellet.pellet.getWidth() / 2));\n pellet.pellet.setY(mirOY - (pellet.pellet.getHeight() / 2));\n }\n }\n else if (acceptedDirs.equals(\"ur\"))\n {\n if (pellet.direction == 'u')\n {\n pellet.direction = 'l';\n pellet.pellet.setX(mirOX - (pellet.pellet.getWidth() / 2));\n pellet.pellet.setY(mirOY - (pellet.pellet.getHeight() / 2));\n }\n else if (pellet.direction == 'd')\n {\n pellet.direction = 'u';\n pellet.pellet.setX(mirOX - (pellet.pellet.getWidth() / 2));\n }\n else if (pellet.direction == 'l')\n {\n pellet.direction = 'r';\n pellet.pellet.setY(mirOY - (pellet.pellet.getHeight() / 2));\n\n }\n else if (pellet.direction == 'r')\n {\n pellet.direction = 'd';\n pellet.pellet.setX(mirOX - (pellet.pellet.getWidth() / 2));\n pellet.pellet.setY(mirOY - (pellet.pellet.getHeight() / 2));\n }\n }\n else if (acceptedDirs.equals(\"ul\"))\n {\n if (pellet.direction == 'u')\n {\n pellet.direction = 'r';\n pellet.pellet.setX(mirOX - (pellet.pellet.getWidth() / 2));\n pellet.pellet.setY(mirOY - (pellet.pellet.getHeight() / 2));\n }\n else if (pellet.direction == 'd')\n {\n pellet.direction = 'u';\n pellet.pellet.setX(mirOX - (pellet.pellet.getWidth() / 2));\n }\n else if (pellet.direction == 'l')\n {\n pellet.direction = 'd';\n pellet.pellet.setX(mirOX - (pellet.pellet.getWidth() / 2));\n pellet.pellet.setY(mirOY - (pellet.pellet.getHeight() / 2));\n }\n else if (pellet.direction == 'r')\n {\n pellet.direction = 'l';\n pellet.pellet.setY(mirOY - (pellet.pellet.getHeight() / 2));\n }\n }\n //Draw the pellet at the origin of the mirror\n pellet.collided = false;\n }\n }\n }", "public Vector produitVectorielle(Vector vec){\n return new Vector(y * vec.z - z * vec.y, z * vec.x - x * vec.z, x * vec.y - y * vec.x);\t\t\n }", "public void reflektiere(double pAnteil){\n vx = vx*(-pAnteil);\n }", "public AABB a(World paramaqu, BlockPosition paramdt, Block parambec, float paramFloat, EnumDirection paramej)\r\n/* 147: */ {\r\n/* 148:175 */ if ((parambec.getType() == this) || (parambec.getType().getMaterial() == Material.air)) {\r\n/* 149:176 */ return null;\r\n/* 150: */ }\r\n/* 151:178 */ AABB localbrt = parambec.getType().a(paramaqu, paramdt, parambec);\r\n/* 152:180 */ if (localbrt == null) {\r\n/* 153:181 */ return null;\r\n/* 154: */ }\r\n/* 155:184 */ double d1 = localbrt.minX;\r\n/* 156:185 */ double d2 = localbrt.minY;\r\n/* 157:186 */ double d3 = localbrt.minZ;\r\n/* 158:187 */ double d4 = localbrt.maxX;\r\n/* 159:188 */ double d5 = localbrt.maxY;\r\n/* 160:189 */ double d6 = localbrt.maxZ;\r\n/* 161:192 */ if (paramej.g() < 0) {\r\n/* 162:193 */ d1 -= paramej.g() * paramFloat;\r\n/* 163: */ } else {\r\n/* 164:195 */ d4 -= paramej.g() * paramFloat;\r\n/* 165: */ }\r\n/* 166:197 */ if (paramej.h() < 0) {\r\n/* 167:198 */ d2 -= paramej.h() * paramFloat;\r\n/* 168: */ } else {\r\n/* 169:200 */ d5 -= paramej.h() * paramFloat;\r\n/* 170: */ }\r\n/* 171:202 */ if (paramej.i() < 0) {\r\n/* 172:203 */ d3 -= paramej.i() * paramFloat;\r\n/* 173: */ } else {\r\n/* 174:205 */ d6 -= paramej.i() * paramFloat;\r\n/* 175: */ }\r\n/* 176:207 */ return new AABB(d1, d2, d3, d4, d5, d6);\r\n/* 177: */ }", "public void subtract(Point3 p) {\r\n\t\tset(this.x - p.x, this.y - p.y, this.z - p.z);\r\n\t}", "public void doRender(EntityNinjastar ninjastar, double transX, double transY, double transZ, float param5, float dir){\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n GlStateManager.pushMatrix();\n\n GlStateManager.translate((float) transX, (float) transY, (float) transZ);\n\n //moved\n GlStateManager.enableRescaleNormal();\n float scale = 0.75F;\n GlStateManager.scale(scale, scale, scale);\n\n GlStateManager.rotate(ninjastar.prevRotationYaw + (ninjastar.rotationYaw - ninjastar.prevRotationYaw) * dir - 90.0F, 0.0F, 1.0F, 0.0F);\n GlStateManager.rotate(ninjastar.getRandomTilt(), 1.0F, 0.0F, 0.0F);\n\n //moved\n bindEntityTexture(ninjastar);\n\n Tessellator tessellator = Tessellator.getInstance();\n WorldRenderer worldRenderer = tessellator.getWorldRenderer();\n\n// GlStateManager.enableRescaleNormal();\n\n// float scale = 0.05F;\n// GlStateManager.scale(scale, scale, scale);\n\n GL11.glNormal3f(0.0F, 0.0F, scale);\n\n worldRenderer.startDrawingQuads();\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 1);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 1);\n tessellator.draw();\n\n GlStateManager.rotate(100.0F, 1.0F, 0.0F, 0.0F);\n worldRenderer.startDrawingQuads();\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 1);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 1);\n tessellator.draw();\n\n //added\n this.renderItemNinjastar.renderItemModel(this.func_177082_d(ninjastar));\n\n GlStateManager.disableRescaleNormal();\n GlStateManager.popMatrix();\n\n super.doRender(ninjastar, transX, transY, transZ, param5, dir);\n\n }", "private void arretes_fR(){\n\t\tthis.cube[13] = this.cube[10]; \n\t\tthis.cube[10] = this.cube[12];\n\t\tthis.cube[12] = this.cube[16];\n\t\tthis.cube[16] = this.cube[14];\n\t\tthis.cube[14] = this.cube[13];\n\t}", "@Test\n public void getNormal_test() \n {\n\t // ============ Equivalence Partitions Tests ==============\n\t // TC01\n\t Plane pln= new Plane(new Point3D(1,0,0), new Vector(1,1,1));\n\t assertEquals(pln.getNormal(new Point3D(0,1,0)), new Vector(0.5773502691896258, 0.5773502691896258, 0.5773502691896258));\n }", "@Override\r\n\tpublic vec3 minus() {\n\t\treturn null;\r\n\t}", "void pointScaleFree() {\n\t\t// offsetP = PVector.sub(P, beginOffsetP); // get the offset (because\n\t\t// mouse isnt' exatly at the pressed point, there a little offset)\n\t\toffset = PVector.sub(P, beginOffset); // calculate the offset made by\n\t\t\t\t\t\t\t\t\t\t\t\t// mouseDrag -- subtract\n\t\t\t\t\t\t\t\t\t\t\t\t// beginOffset from P\n\t\toffsetP = PVector.add(beginOffsetP, offset); // reposition point A based\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the offset made\n\n\t\tleftOppositeLine.detectX(offsetP); // update X (dot product magic)\n\t\t\t\t\t\t\t\t\t\t\t// constantly\n\t\trightOppositeLine.detectX(offsetP); // update X (dot product magic)\n\t\t\t\t\t\t\t\t\t\t\t// constantly\n\n\t\tfloat scaleFactorRight, scaleFactorLeft;\n\t\tscaleFactorRight = rightOppositeLine.X.dist(offsetP) / rightOppositeLine.beginX.dist(beginOffsetP);\n\t\tscaleFactorLeft = leftOppositeLine.X.dist(offsetP) / leftOppositeLine.beginX.dist(beginOffsetP);\n\n\t\t// needs exaplainin drawing\n\t\tPVector tmpR = new PVector();\n\t\tPVector tmpL = new PVector();\n\n\t\tif (rightOppositeLine.isOnThisSideOfLine == rightOppositeLine.checkLineSide(offsetP)) {\n\t\t\tif (leftOppositeLine.isOnThisSideOfLine == leftOppositeLine.checkLineSide(offsetP)) {\n\t\t\t\ttmpR = PVector.sub(rightOppositeLine.beginStart, rightOppositeLine.beginEnd);\n\t\t\t\ttmpL = PVector.sub(leftOppositeLine.beginStart, leftOppositeLine.beginEnd);\n\t\t\t} else {\n\t\t\t\ttmpR = PVector.sub(rightOppositeLine.beginEnd, rightOppositeLine.beginStart);\n\t\t\t\ttmpL = PVector.sub(leftOppositeLine.beginStart, leftOppositeLine.beginEnd);\n\t\t\t}\n\t\t} else {\n\t\t\tif (leftOppositeLine.isOnThisSideOfLine == leftOppositeLine.checkLineSide(offsetP)) {\n\t\t\t\ttmpR = PVector.sub(rightOppositeLine.beginStart, rightOppositeLine.beginEnd);\n\t\t\t\ttmpL = PVector.sub(leftOppositeLine.beginEnd, leftOppositeLine.beginStart);\n\t\t\t} else {\n\t\t\t\ttmpR = PVector.sub(rightOppositeLine.beginEnd, rightOppositeLine.beginStart);\n\t\t\t\ttmpL = PVector.sub(leftOppositeLine.beginEnd, leftOppositeLine.beginStart);\n\t\t\t}\n\t\t}\n\n\t\t// needs exaplainin drawing\n\n\t\ttmpL.mult(scaleFactorRight);\n\t\ttmpL.add(leftOppositeLine.end);\n\n\t\ttmpR.mult(scaleFactorLeft);\n\t\ttmpR.add(rightOppositeLine.end);\n\n\t\t// set left neigbor point\n\t\tpoint[neighbor(selectedPoint)[0]].position.set(tmpL);\n\n\t\t// set right neighbor point\n\t\tpoint[neighbor(selectedPoint)[1]].position.set(tmpR);\n\t\tpoint[selectedPoint].position.set(offsetP);\n\t\tselectedLine = -1; // disable line focus\n\t\tupdateGlobalLines();\n\t}", "Lover(float _x, float _y, float m, float t, float _s, float _G) { //loc.x,loc.y,mass,topspeed,drawVectorSize\n location = new PVector(_x, _y);\n velocity = new PVector(0,0);\n acceleration = new PVector (0,0);\n mass = m;\n topspeed = t;\n diameter = 3*mass;\n drawVectorSize = _s;\n G = _G;\n //fill (255,0,0);\n }", "@NotNull\n private Coordinate flipV() {\n angle = -angle;\n Coordinate nextCenterPointCoordinate = new Coordinate(this.centerPointCoordinate.getXCoordinate(),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(90 - angle))));\n return nextCenterPointCoordinate;\n }", "public void setNearClippingPlane(int nearClippingPlane) {\r\n\t\tthis.nearClippingPlane = nearClippingPlane;\r\n\t\tchanged = true;\r\n\t}", "void setFullPelForwardVector(int value)\n {\n forwardVector.setFullPel(value);\n }" ]
[ "0.62633145", "0.617999", "0.59941727", "0.5983669", "0.5964642", "0.5930993", "0.592469", "0.5916371", "0.5908532", "0.583011", "0.5817811", "0.5809789", "0.5803498", "0.5801471", "0.5786595", "0.5780059", "0.57767457", "0.57660455", "0.5760006", "0.57390785", "0.5713881", "0.56857765", "0.5676636", "0.56716794", "0.5661886", "0.5657605", "0.565276", "0.5644821", "0.5632793", "0.56268466", "0.5625047", "0.5618809", "0.561222", "0.56093365", "0.5593965", "0.5593741", "0.5585899", "0.55735844", "0.55728596", "0.557048", "0.5568685", "0.55665123", "0.55541384", "0.55498964", "0.5546506", "0.554605", "0.55439955", "0.55432004", "0.5534843", "0.5533781", "0.5498", "0.5495558", "0.54802424", "0.54776484", "0.547179", "0.54528433", "0.5450414", "0.5449445", "0.54269135", "0.5415846", "0.5414816", "0.5413765", "0.5406688", "0.5398334", "0.53962064", "0.5392853", "0.53887516", "0.53850025", "0.53735775", "0.53657454", "0.5353689", "0.535249", "0.53492856", "0.5346453", "0.5330217", "0.5321537", "0.5315872", "0.5315548", "0.531505", "0.5306194", "0.5305971", "0.529884", "0.5298198", "0.5297372", "0.5290185", "0.5283925", "0.52824754", "0.52819794", "0.52724546", "0.52633584", "0.52609885", "0.5256346", "0.5249995", "0.52435434", "0.5237851", "0.5236791", "0.5234087", "0.5232777", "0.5227981", "0.5225136", "0.52207786" ]
0.0
-1
detect if the object is at the edge, if yes, for plane, it can not move, for bullet, demised
public boolean detectBound(){ if(posX < 10){ posX = 10; velX = 0; accX = 0; return true; } else if(posX > width - 10){ posX = width - 10; velX = 0; accX = 0; return true; } if(posY < 10){ posY = 10; velY = 0; accY = 0; return true; } else if(posY > height - 10){ posY = height - 10; velY = 0; accY = 0; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkIfAtEdge() {\n\t\tif(x<=0){\n\t\t\tx=1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(y<=0){\n\t\t\ty=1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(x>=GameSystem.GAME_WIDTH-collisionWidth){\n\t\t\tx=GameSystem.GAME_WIDTH-collisionHeight-1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(y>=GameSystem.GAME_HEIGHT-collisionWidth){\n\t\t\ty=GameSystem.GAME_HEIGHT-collisionHeight-1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\telse{\n\t\t\tatEdge=false;\n\t\t}\n\t\t\n\t}", "public void checkEdge()\n {\n if(getX() < 10 || getX() > getWorld().getWidth() - 10)\n {\n speed *= -1;\n }\n }", "public void checkIsFrogAtTheEdge() {\n\t\tif (getY()<0 || getY()>800) {\n\t\t\tsetY(FrogPositionY);\t\n\t\t}\n\t\tif (getX()<-20) {\n\t\t\tmove(movementX*2, 0);\n\t\t} else if (getX()>600) {\n\t\t\tmove(-movementX*2, 0);\n\t\t}\n\t\tif (getY()<130 && ! ((getIntersectingObjects(End.class).size() >= 1))) {\n\t\t\tmove(0, movementY*2);\n\t\t\t\n\t\t}\n\t}", "public void bounceOffEdge()\n {\n int margin = 2;\n\n if (getX() <= margin || getX() >= getWorld().getWidth() - margin) //left or right side\n {\n turn(180);\n }\n if (getY() <= margin || getY() >= getWorld().getHeight() - margin) //top or bottom side\n {\n turn(180);\n }\n }", "private boolean leftDownCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((obj.getY() - this.getY()) < this.getHeight()) && (obj.getY() > this.getY()));\n\t}", "public boolean atWorldEdge()\n {\n if(getX() < 20 || getX() > getWorld().getWidth() - 20)\n return true;\n if(getY() < 20 || getY() > getWorld().getHeight() - 20)\n return true;\n else\n return false;\n }", "public boolean atWorldEdge()\n {\n if(getX() < 20 || getX() > getWorld().getWidth() - 20)\n return true;\n if(getY() < 20 || getY() > getWorld().getHeight() - 20)\n return true;\n else\n return false;\n }", "private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }", "boolean reachedEdge() {\n\t\treturn this.x > parent.width - 30;// screen width including the size of\n\t\t\t\t\t\t\t\t\t\t\t// the image\n\t}", "protected void checkEdges(){\n if (getX() > getWorld().getBackground().getWidth() + getImage().getWidth()){\n world.monsterAdded();\n getWorld().removeObject(this);\n world.decreaseLives();\n }\n }", "private boolean leftUpCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "protected Vec3 maybeBackOffFromEdge(Vec3 debug1, MoverType debug2) {\n/* 1102 */ if (!this.abilities.flying && (debug2 == MoverType.SELF || debug2 == MoverType.PLAYER) && isStayingOnGroundSurface() && isAboveGround()) {\n/* 1103 */ double debug3 = debug1.x;\n/* 1104 */ double debug5 = debug1.z;\n/* 1105 */ double debug7 = 0.05D;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1110 */ while (debug3 != 0.0D && this.level.noCollision((Entity)this, getBoundingBox().move(debug3, -this.maxUpStep, 0.0D))) {\n/* 1111 */ if (debug3 < 0.05D && debug3 >= -0.05D) {\n/* 1112 */ debug3 = 0.0D; continue;\n/* 1113 */ } if (debug3 > 0.0D) {\n/* 1114 */ debug3 -= 0.05D; continue;\n/* */ } \n/* 1116 */ debug3 += 0.05D;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1121 */ while (debug5 != 0.0D && this.level.noCollision((Entity)this, getBoundingBox().move(0.0D, -this.maxUpStep, debug5))) {\n/* 1122 */ if (debug5 < 0.05D && debug5 >= -0.05D) {\n/* 1123 */ debug5 = 0.0D; continue;\n/* 1124 */ } if (debug5 > 0.0D) {\n/* 1125 */ debug5 -= 0.05D; continue;\n/* */ } \n/* 1127 */ debug5 += 0.05D;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1132 */ while (debug3 != 0.0D && debug5 != 0.0D && this.level.noCollision((Entity)this, getBoundingBox().move(debug3, -this.maxUpStep, debug5))) {\n/* 1133 */ if (debug3 < 0.05D && debug3 >= -0.05D) {\n/* 1134 */ debug3 = 0.0D;\n/* 1135 */ } else if (debug3 > 0.0D) {\n/* 1136 */ debug3 -= 0.05D;\n/* */ } else {\n/* 1138 */ debug3 += 0.05D;\n/* */ } \n/* */ \n/* 1141 */ if (debug5 < 0.05D && debug5 >= -0.05D) {\n/* 1142 */ debug5 = 0.0D; continue;\n/* 1143 */ } if (debug5 > 0.0D) {\n/* 1144 */ debug5 -= 0.05D; continue;\n/* */ } \n/* 1146 */ debug5 += 0.05D;\n/* */ } \n/* */ \n/* 1149 */ debug1 = new Vec3(debug3, debug1.y, debug5);\n/* */ } \n/* 1151 */ return debug1;\n/* */ }", "void object_calculations_doesnt_touch_ground(){\n if(angle_with_ground>0&&down_angle>0&&up_angle<0)\n object_on_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle<0&&up_angle<0)\n object_upper_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle>0&&up_angle>0)\n object_below_eyes_level_calc();\n }", "private void checkCollision()\n {\n if (gameOverBool==false)\n { \n Actor a = getOneIntersectingObject(Wall.class);\n if (a != null||isAtEdge())\n {\n setImage(\"gone.png\");//laat de helicopter verdwijnen\n //greenfoot.GreenfootSound.stop(\"helisound.wav\");\n World world = getWorld();\n world.addObject(new Explosion(), getX(), getY());\n Greenfoot.playSound(\"heliExplosion.wav\");\n world.addObject( new Gameover(), 600, 300 );\n gameOverBool = true; \n }\n } \n }", "private boolean rightDownCollision(InteractiveObject obj){\n\t\treturn ((obj.getX() - this.getX() < this.getWidth()) && (obj.getX() > this.getX()) &&\n\t\t\t\t(obj.getY() - this.getY() < this.getHeight()) && (obj.getY() > this.getY()));\n\t}", "public boolean isInEdge(int width, int height, Position position);", "private boolean collisionWithVerticalWall() {\n return (yPos + dy > LOWER_BORDER || yPos + dy < 0);\n }", "public boolean hitObject(BasicObject obj){\n if(abs(obj.posX - posX) < obj.wid/ 2 && abs(obj.posY - posY) < obj.hei/ 2){\n return true;\n }\n else{\n return false;\n }\n }", "private void checkBoundaries() {\n if (!isDestroyed()) {\n float upperEdge = screen.getGameCam().position.y + screen.getGameViewPort().getWorldHeight() / 2;\n float bottomEdge = screen.getGameCam().position.y - screen.getGameViewPort().getWorldHeight() / 2;\n if (bottomEdge <= getY() + getHeight() && getY() <= upperEdge) {\n b2body.setActive(true);\n currentState = b2body.getLinearVelocity().x > 0 ? State.MOVING_RIGHT : State.MOVING_LEFT;\n } else {\n if (b2body.isActive()) { // Was on camera...\n // It's outside bottom edge\n if (bottomEdge > getY() + getHeight()) {\n if(!world.isLocked()) {\n world.destroyBody(b2body);\n }\n currentState = State.FINISHED;\n }\n }\n }\n }\n }", "public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\telse \n\t\t\treturn true; \n\t}", "public boolean borderAhead () {\r\n if ( myDirection == NORTH ) {\r\n return getY() == 0;\r\n } else if ( myDirection == EAST ) {\r\n return getX() == getWorld().getWidth() - 1;\r\n } else if ( myDirection == SOUTH ) {\r\n return getY() == getWorld().getHeight() - 1;\r\n } else { // if ( myDirection == WEST ) {\r\n return getX() == 0;\r\n }\r\n }", "boolean hasIsBoundaryNodeOf();", "public abstract boolean getEdge(Point a, Point b);", "private boolean rightCollision(InteractiveObject obj){\n\t\treturn rightUpCollision(obj) || rightDownCollision(obj);\n\t}", "public boolean canPlaceRoad(Player p, Edge e){\r\n for(Corner c: e.getConnectingCorners()){\r\n if(c.getOwner()==p) return true;\r\n }\r\n return false;\r\n }", "private boolean rightUpCollision(InteractiveObject obj){\n\t\treturn (((obj.getX() - this.getX()) < this.getWidth()) && (obj.getX() > this.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "private void splitEdgeDetection() {\n\t\tif(!currentlyDetecting)\n {\n detectRisingEdge();\n }else{//if currentlyDetecting is true, then we are looking for a falling edge\n detectFallingEdge();\n }\n\t}", "public boolean move(double x, double y, Landscape scape ){\n\t\t// check to see if it is moving off the landscape in the x directions\n\t\tif( (this.x + x) > scape.getWidth() || (this.x + x) < 0 ){\n\t\t\t// it is on the edge, do nothing\n\t\t\tthis.isAlive = true;\n\t\t\treturn true;\n\t\t}\n\t\t// check to see if it is moving off of the landscape in the y direction. It cannot move more than 1/5 of the way up\n\t\telse if( (this.y + y) > scape.getHeight() || (this.y + y) < (4.0/5.0)*scape.getHeight() ){\n\t\t\t// it is on the edge in the y direction\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// check to see if there are any obstacles in the way of the motion of the Defender\n\t\tboolean check = checkObs(this.x +x , this.y + y,scape);\n\t\t// if this is false then we cannot move, but are still alive\n\t\tif(!check){\n\t\t\t// don't move, but return true (still alive)\n\t\t\tthis.isAlive = true;\n\t\t\treturn true;\n\t\t}\n\t\t// check to see if the defender is about to hit any of the millipede's\n\t\tcheck = checkMillipede(this.x+x, this.y+y , scape);\n\t\t// if it returns false, then the Defender has hit a millipede and died!\n\t\tif( !check){\n\t\t\t// user hit a millipede segment! It has died, return false\n\t\t\tthis.isAlive = false;\n\t\t\treturn false;\n\t\t}\n\t\t// Otherwise, the path is clear to move and it will do so\n\t\tthis.x += x;\n\t\tthis.y += y;\n\t\t// still alive\n\t\tthis.isAlive = true;\n\t\treturn true;\n\t}", "private boolean leftCollision(InteractiveObject obj){\n\t\treturn leftUpCollision(obj) || leftDownCollision(obj);\n\t}", "public boolean hitObject(BasicObject oppose){\n if (oppose.classOfObejct != classOfObejct){\n if (abs(posX - oppose.posX) < (wid / 2 + oppose.wid/2) && abs(posY - oppose.posY) < (hei / 2 + oppose.hei/2)){\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "public boolean hitEdge(int newX, int newY)\n {\n return (newX > 0 && newX < screenWidth-width && newY > 0 && newY < screenHeight-height);\n }", "private boolean collisionWithHorizontalWall() {\n return (xPos + dx > RIGHT_BORDER || xPos + dx < 0);\n }", "private boolean hitMyPaddle() {\n if (b.numX - 60 <= 0) {\n if ((b.numY <= (this.touchedY + 260)) && (b.numY >= (this.touchedY - 260))) {\n } else {\n this.wentOffWall();\n }\n return true;\n } else {\n return false;\n }\n }", "boolean canPlaceRoad(EdgeLocation edgeLoc, boolean free);", "public boolean onVerticalEdge() {\n\t\treturn vertical != Side.None;\n\t}", "public abstract boolean hasEdge(int from, int to);", "boolean canMoveTo(Vector2d position);", "public void loopThroughEdge()\n {\n int margin = 2;\n\n if (getX() < margin) //left side\n { \n setLocation(getWorld().getWidth()+ margin, getY());\n }\n else if (getX() > getWorld().getWidth() - margin) //right side\n {\n setLocation(margin, getY());\n }\n\n if (getY() < margin) //top side\n { \n setLocation(getX(), getWorld().getHeight() - margin);\n }\n else if(getY() > getWorld().getHeight() - margin) //bottom side\n { \n setLocation(getX(), margin);\n }\n }", "public boolean reachBorder() {\n // check up\n if (direction == 12) {\n if (this.getY() < speed) {\n return true;\n }\n }\n //check down\n if (direction == 6) {\n if (this.getY() + this.getHeight() + speed > GameUtility.GameUtility.MAP_HEIGHT) {\n return true;\n }\n\n }\n //check left\n if (direction == 9) {\n if (this.getX() < speed) {\n return true;\n }\n }\n //check right\n if (direction == 3) {\n if (this.getX()\n + this.getWidth() + speed > GameUtility.GameUtility.MAP_WIDTH) {\n return true;\n }\n }\n return false;\n\n }", "private boolean corner(int e) {\r\n if (endx[e] + 200 >= width - radius[e] && directionend[e] == 0) {\r\n return true;\r\n } else if (endy[e] + 200 >= height - radius[e] && directionend[e] == 1) {\r\n return true;\r\n } else if (endx[e] - 200 <= radius[e] && directionend[e] == 2) {\r\n return true;\r\n } else if (endy[e] - 200 <= radius[e] && directionend[e] == 3) {\r\n return true;\r\n }\r\n return false;\r\n }", "private void drive(int e) {\r\n if (endx[e] + 120 >= width - radius[e] && directionend[e] == 0) {\r\n endx[e] += 20;\r\n endy[e] -= 20;\r\n directionend[e]++;\r\n radius[e] -= 60;\r\n directionchanged[e] = true;\r\n } else if (endy[e] + 120 >= height - radius[e] && directionend[e] == 1) {\r\n\r\n endx[e] += 20;\r\n endy[e] += 20;\r\n directionend[e]++;\r\n radius[e] -= 60;\r\n directionchanged[e] = true;\r\n } else if (endx[e] - 120 <= radius[e] && directionend[e] == 2) {\r\n endx[e] -= 20;\r\n endy[e] += 20;\r\n radius[e] -= 60;\r\n directionend[e]++;\r\n directionchanged[e] = true;\r\n } else if (endy[e] - 80 <= radius[e] && directionend[e] == 3) {\r\n endx[e] -= 20;\r\n endy[e] -= 20;\r\n radius[e] -= 60;\r\n directionend[e] = 0;\r\n directionchanged[e] = true;\r\n } else {\r\n directionchanged[e] = false;\r\n }\r\n }", "protected boolean isWall2()\n {\n\n if(isTouching(Wall.class)) //&&!isTouching(Door.class))\n return true;\n /*else if(isTouching(Door.class))\n {\n Door d = (Door)getOneIntersectingObject(Door.class);\n if(d.alreadyOpened==false)\n return true;\n else\n return false;\n }*/\n else\n return false;\n }", "public boolean onHorizontalEdge() {\n\t\treturn horizontal != Side.None;\n\t}", "boolean isMoving();", "public boolean isFallingEdge()\n {\n return !currentlyDetecting && previouslyDetecting;\n }", "void object_calculations_touch_ground(){\n\n if (down_angle < 0 && up_angle > 0)//base case\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n base_case();\n } else if ((down_angle > 0 && up_angle > 0) && (down_angle < up_angle))//smaller object\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n measure_small_object();\n } else if (up_angle < 0 && down_angle > 0)//base case\n base_case();\n else //smaller object\n measure_small_object();\n }", "public void checkForEdge() \n {\n if (getX() <= 1)\n {\n \n \n Greenfoot.playSound(\"pointScore.wav\");\n setLocation(getWorld().getWidth() / 2, getWorld().getHeight() / 2);\n dX = -dX;\n lWin++;\n \n MyWorld myWorld = (MyWorld) getWorld();\n myWorld.score2();\n \n wait = 0;\n \n }\n \n if(getX() >= getWorld().getWidth() -1 )\n {\n \n MyWorld myWorld = (MyWorld) getWorld();\n myWorld.score1();\n \n \n Greenfoot.playSound(\"pointScore.wav\");\n \n getWorld();\n setLocation(getWorld().getWidth() / 2, getWorld().getHeight() / 2);\n dX = -dX;\n rWin++;\n wait = 0;\n \n \n }\n\n \n }", "boolean canMove();", "public void sideCheck() {\n /*Be careful when creating tiles, especially ones that allow Sonic's bottom and middle sensors to intersect \n the same tile*/\n mLCollide = false;\n mRCollide = false;\n if(grounded) {\n if(groundSpeed > 0) {\n sideCollision(middleRight);\n }\n else if(groundSpeed < 0) {\n sideCollision(middleLeft);\n } \n }\n else if(!grounded) {\n if(xSpeed < 0) {\n sideCollision(middleLeft);\n }\n else if(xSpeed > 0) {\n sideCollision(middleRight);\n }\n }\n }", "public boolean hitSide()\n {\n if(accel.getAcceleration(ADXL345_I2C.Axes.kX)>0)\n return true;\n else\n return false;\n }", "public boolean isRisingEdge()\n {\n return currentlyDetecting && !previouslyDetecting;\n }", "public void borders() {\n if (loc.y > height) {\n vel.y *= -bounce;\n loc.y = height;\n }\n if ((loc.x > width) || (loc.x < 0)) {\n vel.x *= -bounce;\n } \n //if (loc.x < 0) loc.x = width;\n //if (loc.x > width) loc.x = 0;\n }", "private boolean hasHitEdge() {\n if (!enableClusterExitPurging) {\n return false;\n }\n int lx = (int) location.x, ly = (int) location.y;\n int sx = chip.getSizeX(), sy = chip.getSizeY();\n if (lx < radiusX || lx > sx - radiusX || ly < radiusY || ly > sy - radiusY) {\n if (hitEdgeTime == 0) {\n hitEdgeTime = getLastEventTimestamp();\n return false;\n } else {\n if (getLastEventTimestamp() - hitEdgeTime > 0/* getClusterLifetimeWithoutSupportUs()*/) {\n return true;\n } else {\n return false;\n }\n }\n }\n return false;\n }", "public void checkWallCollision(Wall wall) {\n\t\t// check to see if enemy is colliding with wall.\n\t\t// Log.d(TAG,\"Front of character: \" + (x+xSpeed+width) +\n\t\t// \", edge of wall: \" + wall.getX());\n\t\t// check if at wall only when checking isDestroyed (for true value). if\n\t\t// moving and wall is destroyed won't pass first if check and won't ever\n\t\t// get set to atWall\n\t\tif (Rect.intersects(new Rect(x + xSpeed, y - (height + ySpeed), x\n\t\t\t\t+ width + xSpeed, y - ySpeed), wall.getStructure())\n\t\t\t\t&& enemyState == EnemyState.moving && !wall.isDestroyed()) {\n\t\t\tLog.d(TAG, \"Enemy x: \" + x);\n\t\t\tint diff = (x + xSpeed) - (wall.getX() + wall.getWidth());\n\t\t\tLog.d(TAG, \"Difference: \" + diff);\n\t\t\tx += xSpeed - diff;\n\t\t\tLog.d(TAG, \"Enemy new x: \" + x);\n\t\t\tLog.d(TAG, \"Edge of wall: \" + (wall.getX() + wall.getWidth()));\n\t\t\tthis.setEnemyState(EnemyState.atWall);\n\t\t} else if (Rect.intersects(new Rect(x + xSpeed, y - (height + ySpeed),\n\t\t\t\tx + width + xSpeed, y - ySpeed), wall.getStructure())\n\t\t\t\t&& enemyState == EnemyState.atWall && wall.isDestroyed()) {\n\t\t\tthis.setEnemyState(EnemyState.moving);\n\t\t}\n\t}", "public void chase(int targetX, int targetY, ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls, 0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if (isIntersection) {\r\n if (!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - targetX, 2) + Math.pow(yPos - targetY, 2);\r\n }\r\n if (!isLeftCollision && this.direction != 2) {\r\n leftDistance = Math.pow((xPos - 20) - targetX, 2) + Math.pow(yPos - targetY, 2);\r\n }\r\n if (!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - targetX, 2) + Math.pow((yPos - 20) - targetY, 2);\r\n }\r\n if (!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - targetX, 2) + Math.pow((yPos + 20) - targetY, 2);\r\n }\r\n if (upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n } else if (downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n } else if (rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n } else if (leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if (this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if (this.direction == 1) {\r\n yPos = yPos + 5;\r\n }\r\n if (this.direction == 2) {\r\n xPos = xPos + 5;\r\n }\r\n if (this.direction == 3) {\r\n xPos = xPos - 5;\r\n }\r\n\r\n }", "boolean hasSide();", "public boolean isCollisionDisabled() { return mover.isCollisionDisabled(); }", "public boolean isOutsidePlatform(GameObject object, Platform platform, GameObject gameObject2){\n if ( (object.isAirborne()) //if already airborne, it is still airborne (until it is belowPlatform\n || (object.getPos().getY()==platform.getY())\n && ((object.getPos().getX()<platform.getX()-object.getWidth()) //Outside to the left\n || (platform.getX()+platform.getWidth()<object.getPos().getX())) //Outside te the right\n && !(hasCollided(object,gameObject2)) \n || (object.getPos().getY()>720) //if object over screen its probably in air\n ){ //\n return true;\n } else {\n return false;\n }\n }", "public boolean isWall();", "public boolean isInBoundaries() {\n\t return Referee.playfield.isInBoundaries(this);\n }", "@Override\n\t\tprotected boolean condition() {\n\t\t\tWhichSide whichSide = VisionUtil.getPositionOfGearTarget();\n\t\t\tSystem.err.println(\"Position of gear target: \"+whichSide);\n\t\t\tif (whichSide == WhichSide.RIGHT)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "private boolean isNothingBehind(Direction direction, Box box){\n //TODO wall detection not only boxes\n for(Box temp : boxes){\n switch (direction){\n case DOWN:\n if(temp.getDestinationX()==box.getDestinationX() && box.getDestinationY()+DISTANCE == temp.getDestinationY())\n return false;\n break;\n case UP:\n if(temp.getDestinationX()==box.getDestinationX() && box.getDestinationY()-DISTANCE == temp.getDestinationY())\n return false;\n break;\n case LEFT:\n if(temp.getDestinationY()==box.getDestinationY() && box.getDestinationX()-DISTANCE == temp.getDestinationX())\n return false;\n break;\n case RIGHT:\n if(temp.getDestinationY()==box.getDestinationY() && box.getDestinationX()+DISTANCE == temp.getDestinationX())\n return false;\n break;\n }\n }\n for(Wall temp : walls){\n switch (direction){\n case DOWN:\n if(temp.getDestinationX()==box.getDestinationX() && box.getDestinationY()+DISTANCE == temp.getDestinationY())\n return false;\n break;\n case UP:\n if(temp.getDestinationX()==box.getDestinationX() && box.getDestinationY()-DISTANCE == temp.getDestinationY())\n return false;\n break;\n case LEFT:\n if(temp.getDestinationY()==box.getDestinationY() && box.getDestinationX()-DISTANCE == temp.getDestinationX())\n return false;\n break;\n case RIGHT:\n if(temp.getDestinationY()==box.getDestinationY() && box.getDestinationX()+DISTANCE == temp.getDestinationX())\n return false;\n break;\n }\n }\n return true;\n }", "private boolean isEdge() {\r\n\t\t// get the child view Width\r\n\t\tint childViewWidth = mChildView.getMeasuredWidth();\r\n\t\t// get the ScrollView Width\r\n\t\tint srollViewWidth = this.getWidth();\r\n\t\t// get\r\n\t\tint tempOffset = childViewWidth - srollViewWidth;\r\n\t\tint scrollX = this.getScrollX();\r\n\t\tif (scrollX == 0 || scrollX == tempOffset) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "public boolean isCollision(Ball ob) { // Kollisionsabfrage\r\n\t\t\r\n\t\tdX = posX - ob.getPosX();\r\n\t\tdY = posY - ob.getPosY();\r\n\t\tfloat vector = dX * dX + dY * dY;\r\n\t\tfloat hypo = radius * radius * 4;\r\n\t\tif (hypo >= vector) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "boolean outOfSight();", "public boolean isWalkable() {\n return type != CellType.WALL && isInBoundaries();\n }", "private boolean stop() {\n\t\tboolean collide = false;\n\n\t\tdist = (int) MathMachine.distance((xOrigin - this.x), (yOrigin - this.y)); // distance traveled\n\t\tif (dist >= move_range) collide = true;\n\n\t\tif (Math.abs(x - xD) <= 2 && Math.abs(y - yD) <= 2) { // adding 8 shifts the collision box from the top left corner to the bottom right.\n\t\t\tcollide = true; // this is the important statement for collision detection. It works by looking at the tile you want to go to and seeing if it is solid.\n\t\t}\n\n\t\treturn collide;\n\t}", "public T caseEdge(Edge object) {\n\t\treturn null;\n\t}", "public boolean inBounds(Obstacle obj) {\n\t\tboolean horiz = (bounds.x <= obj.getX() && obj.getX() <= bounds.x+bounds.width);\n\t\tboolean vert = (bounds.y <= obj.getY() && obj.getY() <= bounds.y+bounds.height);\n\t\treturn horiz && vert;\n\t}", "public abstract boolean canMove();", "public boolean isSideField(Field field) {\n if (field.getX() == 0 || field.getX() == boardSize - 1) {\n return true;\n }\n if (field.getY() == 0 || field.getY() == boardSize - 1) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n\tpublic void act(long now) {\n\n\t\tcheckIsFrogAtTheEdge();\n\t\t\tif (getIntersectingObjects(Car.class).size() >= 1 ||\n\t\t\t\tgetIntersectingObjects(Truck.class).size() >= 1 ||\n\t\t\t\tgetIntersectingObjects(LongTruck.class).size() >= 1)\n\t\t\t\t{\n\t\t\t\t\tintersectCar = true;\n\t\t\t\t}\n\n\t\t\telse if (getIntersectingObjects(Log.class).size() >= 1 && !death) {\n\t\t\t\tmove(frogSpeed.ObjSpeed(frogLevel, 6), 0);\n\t\t\t}\n\n\t\t\telse if (getIntersectingObjects(LongLog.class).size() >= 1 && !death) {\n\n\t\t\t\tmove(frogSpeed.ObjSpeed(frogLevel, 8), 0);\n\t\t\t}\n\n\t\t\telse if (getIntersectingObjects(Turtle.class).size() >= 1) {\n\t\t\t\tmove(frogSpeed.ObjSpeed(frogLevel, 7), 0);\n\t\t\t}\n\t\t\telse if (getIntersectingObjects(WetTurtle.class).size() >= 1){\n\t\t\t\tif (getIntersectingObjects(WetTurtle.class).get(0).isSunk()) {\n\t\t\t\t\tintersectWater = true;\n\t\t\t\t} else {\n\t\t\t\t\tmove(frogSpeed.ObjSpeed(frogLevel, 7), 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t else if (getIntersectingObjects(End.class).size() >= 1) {\n\n\t\t\t\t\tIntersectEnd();\n\t\t\t\t}\n\n\t\t\telse if (getY() < waterPositionY) {\n\t\t\t\tintersectWater = true;\n\t\t\t}\n\t\t\tgetlives();\n\n\t\t\tCheckIntersect(intersectCar, intersectWater, now);\n\t\t}", "public void frighten(ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n Random r = new Random();\r\n int targetX = 25;\r\n int targetY = 25;\r\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls,0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if(isIntersection) {\r\n\r\n if(!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - targetX,2) + Math.pow(yPos - targetY,2);\r\n }\r\n if(!isLeftCollision && this.direction !=2) {\r\n leftDistance = Math.pow((xPos - 20) - targetX,2) + Math.pow(yPos - targetY,2);\r\n }\r\n if(!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - targetX,2) + Math.pow((yPos-20) - targetY,2);\r\n }\r\n if(!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - targetX,2) + Math.pow((yPos+20) - targetY,2);\r\n }\r\n if(upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n }\r\n else if(downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n }\r\n\r\n else if(rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n }\r\n\r\n else if(leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if(this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if(this.direction ==1) {\r\n yPos = yPos + 5;\r\n }\r\n if(this.direction ==2) {\r\n xPos = xPos + 5;\r\n }\r\n if(this.direction == 3) {\r\n xPos = xPos - 5;\r\n }\r\n }", "public boolean isWalkingBack(GlobalObject object) {\r\n\t\tif(player.getX() < object.getX() && player.getY() >= object.getY() || player.getY() > object.getY())\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public abstract boolean putEdge(Edge incomingEdge);", "private void checkRightWall(Invader invader) {\n\t\t\n\t\tif (invader.getX() >= BORDER) {\n\t\t\tInvader.setDirectionRight(false);\n\t\t\t\n\t\t\tadvanceInvaders();\n\t\t}\n\t}", "private boolean verticalCrash(@NotNull Wall wallToCheck) {\n ArrayList<Coordinate> wallCoordinates = wallToCheck.getPointsArray();\n return wallCoordinates.get(1).getYCoordinate() <= coordinates.get(2).getYCoordinate() && coordinates.get(1).getYCoordinate() <= wallCoordinates.get(2).getYCoordinate();\n }", "public boolean canMoveBackward()\n {\n boolean ans = true;\n\n Iterator<WallMulti> walls = this.walls.iterator();\n\n while(walls.hasNext ())\n {\n WallMulti wall = walls.next();\n\n if(wall.getType ().equals (\"H\"))\n {\n if(locX>=wall.getX()-15 && locX<=wall.getX()+wall.getLength()+15)\n {\n //tank upper than wall\n if(wall.getY()-locY<=60 && wall.getY()-locY>=0 && degree>=270 && degree<=360)\n {\n ans=false;\n }\n //tank lower than wall\n if(locY-wall.getY()<=8 && locY-wall.getY()>=0 && degree>=0 && degree<=180)\n {\n ans=false;\n }\n }\n }\n\n if(wall.getType ().equals (\"V\"))\n {\n if(locY>=wall.getY()-15 &&locY<=wall.getY()+wall.getLength()+15)\n {\n //tank at the left side of the wall\n if(wall.getX()-locX<=60 && wall.getX()-locX>=0 &&\n (degree>=90 && degree<=270) )\n {\n ans=false;\n }\n //tank at the right side of the wall\n if(locX-wall.getX()<=8 && locX-wall.getX()>=0 &&\n ((degree>=0 && degree<=90)||(degree>=270 && degree<=360)) )\n {\n ans=false;\n }\n }\n }\n }\n return ans;\n }", "@Override\n\tpublic boolean isAWin(int side) {\n\t\treturn false;\n\t}", "protected void updateEdges() throws IllegalArgumentException {\n\t\tif(\n\t\t\t position.x < worldOrigin.x\n\t\t\t|| position.y < worldOrigin.y\n\t\t\t|| position.x > worldEnd.x\n\t\t\t|| position.y > worldEnd.y) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\"Illegal movement; \"\n\t\t\t\t+ position\n\t\t\t\t+ \" is not in the world extending from \"\n\t\t\t\t+ worldOrigin\n\t\t\t\t+ \" to \"\n\t\t\t\t+ worldEnd\n\t\t\t\t+ \" inclusively\"\n\t\t\t);\n\t\t}\n\n\t\tif(position.x == worldOrigin.x) {\n\t\t\thorizontal = Side.Left;\n\t\t} else if(position.x == worldEnd.x) {\n\t\t\thorizontal = Side.Right;\n\t\t} else {\n\t\t\thorizontal = Side.None;\n\t\t}\n\n\t\tif(position.y == worldOrigin.y) {\n\t\t\tvertical = Side.Top;\n\t\t} else if(position.y == worldEnd.y) {\n\t\t\tvertical = Side.Bottom;\n\t\t} else {\n\t\t\tvertical = Side.None;\n\t\t}\n\t}", "public boolean canMove2() {\n\t\tGrid<Actor> gr = getGrid(); \n\t\tif (gr == null) {\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\tLocation loc = getLocation(); \n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (!gr.isValid(next)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!gr.isValid(next2)) {\n\t\t\treturn false;\n\t\t}\n\t\tActor neighbor = gr.get(next2); \n\t\treturn (neighbor == null) || (neighbor instanceof Flower); \n\t}", "public abstract boolean canMove(Rect rect, int xClearance, int yClearance);", "public boolean canMoveForward()\n {\n boolean ans = true;\n\n Iterator<WallMulti> walls = this.walls.iterator();\n\n while(walls.hasNext ())\n {\n WallMulti wall = walls.next();\n\n if(wall.getType ().equals (\"H\"))\n {\n if(locX>=wall.getX()-15 && locX<=wall.getX()+wall.getLength()+15)\n {\n if(wall.getY()-locY<=50 && wall.getY()-locY>=0 && degree>=0 && degree<=150)\n {\n ans=false;\n }\n if(locY-wall.getY()<=8 && locY-wall.getY()>=0 && degree>=180 && degree<=360)\n {\n ans=false;\n }\n }\n }\n\n if(wall.getType ().equals (\"V\"))\n {\n if(locY>=wall.getY()-15 &&locY<=wall.getY()+wall.getLength()+15)\n {\n if(wall.getX()-locX<=50 && wall.getX()-locX>=0 &&\n ((degree>=0 && degree<=90)||(degree>=270 && degree<=360)) )\n {\n ans=false;\n }\n if(locX-wall.getX()<=8 && locX-wall.getX()>=0 &&\n degree>=90 && degree<=270 )\n {\n ans=false;\n }\n }\n }\n }\n return ans;\n }", "public boolean hitsWall(Entity e, ICollisionArea box) {\n\t\t// prevent playerfish from leaving the screen\n\t\tif (e instanceof PlayerFish) {\n\t\t\treturn box.isOutside(0, 0, getWidth(), getHeight());\n\t\t} else {\n\t\t\tdouble dw = 2.0 * box.getWidth() + 1;\n\t\t\tdouble dh = 2.0 * box.getHeight() + 1;\n\t\t\treturn box.isOutside(-dw, -dh, getWidth() + dw, getHeight() + dh);\n\t\t}\n\t}", "boolean invisiWallCollisions(Direction direction, Board board) {\n\n Board.logger.log(Logger.LoggingType.DEBUG, \"wallCollisions\",\n \"Checking whether the actor is colliding with a wall...\");\n\n if (board instanceof MenuBoard) {\n\n if (direction == Direction.LEFT) {\n for (Wall wall : ((MenuBoard) board).invisiWalls) {\n if (this.isLeftCollision(wall)) {\n Board.logger.log(Logger.LoggingType.DEBUG, \"wallCollisions\",\n \"There's a wall to the LEFT of the actor, returning.\");\n return true;\n }\n }\n return false;\n } else if (direction == Direction.RIGHT) {\n for (Wall wall : ((MenuBoard) board).invisiWalls) {\n if (this.isRightCollision(wall)) {\n Board.logger.log(Logger.LoggingType.DEBUG, \"wallCollisions\",\n \"There's a wall to the RIGHT of the actor, returning.\");\n return true;\n }\n }\n return false;\n } else if (direction == Direction.UP) {\n for (Wall wall : ((MenuBoard) board).invisiWalls) {\n if (this.isTopCollision(wall)) {\n Board.logger.log(Logger.LoggingType.DEBUG, \"wallCollisions\",\n \"There's a wall to the TOP of the actor, returning.\");\n return true;\n }\n }\n return false;\n } else /* if (dir == Direction.DOWN) */ {\n for (Wall wall : ((MenuBoard) board).invisiWalls) {\n if (this.isBottomCollision(wall)) {\n Board.logger.log(Logger.LoggingType.DEBUG, \"wallCollisions\",\n \"There's a wall to the BOTTOM of the actor, returning.\");\n return true;\n }\n }\n\n }\n }\n\n Board.logger.log(Logger.LoggingType.DEBUG, \"wallCollisions\",\n \"There are no walls blocking the actor, returning.\");\n return false;\n }", "public boolean canBuild(Edge edge) {\n \t\tif (edge == null || roads.size() >= MAX_ROADS)\n \t\t\treturn false;\n \n \t\tif (board.isSetupPhase()) {\n \t\t\t// check if the edge is adjacent to the last town built\n \t\t\tif (lastTown != edge.getVertex1() && lastTown != edge.getVertex2())\n \t\t\t\treturn false;\n \t\t}\n \n \t\treturn edge.canBuild(this);\n \t}", "private boolean isBallCollideLeftWall(GOval ball) {\n return ball.getX() <= 0;\n }", "private void bounceIfWallCollision() {\n \tdouble x = ball.getX();\n \tdouble y = ball.getY();\n \t\n \t// Ball hits side\n \tif (x <= 0 || (x + BALL_RADIUS * 2) >= getWidth()) vx = -vx;\n \t\n \t// Ball hits top\n \tif (y <= 0) vy = -vy;\n }", "private boolean isObjectAPaddle(GObject collider) {\n return (collider == paddle);\n }", "boolean isValidSide(IBlockAccess access, BlockPos pos, EnumFacing facing);", "public boolean canMoveDownIn(GameBoard b) {\n boolean checker = true;\n\n if(this.topLeftY+this.height==6)//wall\n checker=false;\n\n if(this.topLeftY+this.height<6){//not hitting bottom wall\n for (int i = 0; i < b.getNumGamePieces(); i++) {// go through game pieces\n if(this.topLeftY< b.getGamePieces()[i].topLeftY){//only checking pieces on bottom of this.\n if(this.topLeftY+this.height==b.getGamePieces()[i].topLeftY){//checking if y-axis line up\n if(this.topLeftX>=b.getGamePieces()[i].topLeftX){\n if(b.getGamePieces()[i].topLeftX+ b.getGamePieces()[i].width>this.topLeftX){\n checker=false;//then cant move\n break;\n }\n }\n }\n }\n }\n }return checker;\n\n }", "boolean checkLineOfSight(Entity a, Entity b, ServerGameModel model) {\n // Get x and y coordinate of both entities.\n double ax = a.getX();\n double ay = a.getY();\n double bx = b.getX();\n double by = b.getY();\n\n // Find how far in each component the two entities are.\n double dy = Math.abs(by - ay);\n double dx = Math.abs(bx - ax);\n\n int x = (int) Math.floor(a.getX());\n int y = (int) Math.floor(a.getY());\n\n // Number of grid cells to check.\n int n = 0;\n\n // How much to increment x, y after each grid cell check. Should be -1, 0, or 1.\n int xinc, yinc;\n double error;\n\n if (dx == 0) {\n xinc = 0;\n error = Double.POSITIVE_INFINITY;\n } else if (bx > ax) {\n xinc = 1;\n n += (int) Math.floor(bx) - x;\n error = (Math.floor(ax) + 1 - ax) * dy;\n } else {\n xinc = -1;\n n += x - (int) Math.floor(bx);\n error = (ax - Math.floor(ax)) * dy;\n }\n\n if (dy == 0) {\n yinc = 0;\n error -= Double.POSITIVE_INFINITY;\n } else if (by > ay) {\n yinc = 1;\n n += (int) Math.floor(by) - y;\n error -= (Math.floor(ay) + 1 - ay) * dx;\n } else {\n yinc = -1;\n n += y - (int) Math.floor(by);\n error -= (ay - Math.floor(ay)) * dx;\n }\n\n while (true) {\n\n // Check if cell x, y has a wall.\n if (!a.containedIn.contains(model.getCell(x, y)) && !model.getCell(x, y).isSeeThrough())\n return false;\n\n if (--n == 0)\n break;\n\n if (error > 0) {\n y += yinc;\n error -= dx;\n } else if (error < 0) {\n x += xinc;\n error += dy;\n } else {\n // Error = 0 case. Intersects the corner of a grid cell. Need to check\n // all of the 3 other corners.\n // May need to check this case.\n if (!model.getCell(x - 1, y - 1).isPassable() || !model.getCell(x - 1, y).isPassable() ||\n !model.getCell(x, y - 1).isPassable())\n return false;\n x += xinc;\n y += yinc;\n error += (dy - dx);\n n--;\n }\n\n }\n return true;\n }", "public void checkCollisions(){\n for(int i=bodyParts;i>0;i--){\n if((x[0]==x[i])&&(y[0]==y[i])){\n running=false;\n }\n }\n //head with left border\n if(x[0]<0){\n running=false;\n }\n //head with right border\n if(x[0]>screen_width){\n running=false;\n }\n //head with top border\n if(y[0]<0){\n running=false;\n }\n //head with bottom border\n if(y[0]>screen_height){\n running=false;\n }\n if(!running){\n timer.stop();\n }\n }", "public boolean isOnGround() {\n return this.sim_pos.getY() <= 2;\n }", "public boolean cross(Edge edge) {\n Vector3f P1 = this.getOrigin(), P2 = edge.getOrigin();\n Vector3f u = this.getDirection();\n Vector3f v = edge.getDirection();\n float t2 = (u.x * (P2.y - P1.y) - u.y * (P2.x - P1.x)) / (u.y * v.x - u.x * v.y);\n float t1 = (P2.x - P1.x + v.x * t2) / u.x;\n Vector3f p1 = P1.add(u.mult(t1));\n Vector3f p2 = P2.add(v.mult(t2));\n\n if (p1.distance(p2) <= FastMath.FLT_EPSILON) {\n // the lines cross, check if p1 and p2 are within the edges\n Vector3f p = p1.subtract(P1);\n float cos = p.dot(u) / (p.length() * u.length());\n if (cos > 0 && p.length() <= u.length()) {\n // p1 is inside the first edge, lets check the other edge now\n p = p2.subtract(P2);\n cos = p.dot(v) / (p.length() * v.length());\n return cos > 0 && p.length() <= u.length();\n }\n }\n return false;\n }", "public boolean canMoveTo(int x, int y) {\n if (x < 0 || x >= dungeon.getWidth() || y < 0 || y >= dungeon.getHeight() || characterStatus.equals(CharacterStatus.DEAD))\n return false;\n boolean canMove = true;\n for (Entity entity : dungeon.getEntities(x, y)) {\n if (entity instanceof FieldObject)\n ((FieldObject) entity).interact(this);\n if (entity instanceof FieldObject && ((FieldObject) entity).isObstacle()) {\n canMove = false;\n break;\n }\n }\n return canMove;\n }", "public abstract boolean isHit(int x, int y);", "public abstract boolean collisionWith(CollisionObject obj);", "public void crossEdge(Edge e) {}" ]
[ "0.78642493", "0.74052906", "0.7106565", "0.6437942", "0.6401384", "0.6322413", "0.6322413", "0.6292354", "0.6277786", "0.6263612", "0.62128574", "0.61886996", "0.6157695", "0.6135704", "0.6088119", "0.6002037", "0.59846544", "0.59519273", "0.59453857", "0.59313357", "0.5907481", "0.58548266", "0.5846507", "0.58240813", "0.5810624", "0.58083814", "0.58053017", "0.58017355", "0.5775317", "0.5773353", "0.57728994", "0.575547", "0.57421297", "0.57287085", "0.57180786", "0.5713616", "0.5704136", "0.5696771", "0.56957483", "0.567246", "0.56637657", "0.56469125", "0.5630619", "0.5629823", "0.5622931", "0.56055546", "0.56003875", "0.558685", "0.5585259", "0.5573833", "0.55657375", "0.5564179", "0.55639595", "0.5545192", "0.5508456", "0.5498565", "0.549726", "0.5475982", "0.5473236", "0.54706967", "0.54686743", "0.5464547", "0.54620683", "0.5458874", "0.5448117", "0.5432749", "0.54301524", "0.54222834", "0.5419983", "0.5416526", "0.5414029", "0.54096794", "0.54033", "0.5400486", "0.5392178", "0.53878045", "0.5380778", "0.5380273", "0.5378679", "0.536823", "0.53648114", "0.5364242", "0.53621787", "0.5359229", "0.53499764", "0.5348297", "0.53470844", "0.53448886", "0.53436935", "0.53420824", "0.5339372", "0.53363997", "0.53332585", "0.5332816", "0.5327175", "0.5322724", "0.53207576", "0.5317086", "0.5316008", "0.53152" ]
0.5582331
49
when the object get hitted, health decrease
public void decreaseHealth(int lostBlood){ health = health - lostBlood; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void decreaseHealth() {\n setHealth(getHealth()-1);\n }", "public void recieveDamage(){\n this.health--;\n }", "private void takeDamage(int damage){ health -= damage;}", "public void reduceHealth(int damage){\n health -= damage;\n }", "void decreaseHealth(Float damage);", "public void reduceHealth() {\n\t}", "public void reduceHealth(int ammo_damage){\n this.health -= ammo_damage;\n }", "public void decreaseHealth(int hp) {\n this.decreaseLife();\n }", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "public void takeDamage(int damage) {\r\n this.health -= damage;\r\n if(this.health < 0)\r\n this.health = 0;\r\n }", "void takeDamage(int points) {\n this.health -= points;\n }", "private void subtractEnemyHealth(int damage) {\n this.enemyShipHealth -= damage;\n }", "public void takeDamage(int damage) {\r\n health -= damage;\r\n if(health<=0)setAlive(false);\r\n }", "public void handleAttack(int damage) {\n this.health -= damage;\n }", "private void subtractEnemySheild(int damage) {\n this.enemyShield -= damage;\n }", "public void hurt (int amount) {\r\n\t\thealth -= amount;\r\n\t\tif(health <= 0) {\r\n\t\t\thealth = 0; //I will be using this later when entity is knocked out\r\n\t\t\tactive = false;\r\n//\t\t\tdestroy();\r\n\t\t}\r\n\t}", "public void weaken(float hit) {\n if (!isInvincible()) {\n hp -= hit;\n invincible = true;\n if (hp < 0) {\n hp = 0;\n }\n\n if(isWeak()){ //Play the death animation\n currentAnimation = deathAnimation;\n }\n }\n }", "private void subtractPlayerHealth(int damage) {\n this.playerShipHealth -= damage;\n }", "public void takeDamage (double damage)\n {\n getComponent(HealthC.class).decrease(damage);\n if (getComponent(HealthC.class).isDead())\n {\n setActive(false);\n }\n }", "public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}", "public void act() \r\n {\r\n Actor hitMC = getOneIntersectingObject(MC.class);\r\n if (hitMC != null) {\r\n ((Hall) getWorld()).player.health++;\r\n getWorld().removeObject(this);\r\n }\r\n }", "public void lowerHealth() {\n Greenfoot.playSound(\"hit.wav\");\n lives--;\n move(-100);\n if (lives == 0) {\n die();\n }\n }", "public void deductHealth(int h) {\n setHealth(getHealth() - h);\n }", "public void decreaseHealth(int amount)\n\t{\n\t\thealth = health - amount;\n\t}", "public void damagePlayer(int damage){\n hero.decreaseHp(damage);\n }", "public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }", "public void buyDecreaseDamage() {\n this.decreaseDamage++;\n }", "public void deductHealth( int amt) {\n currentHealth = currentHealth - amt;\n }", "public void takeDamage(int dmg){\r\n this.currHP -= dmg;\r\n }", "public void punch (int health)\n {\n\thealth -= 8;\n\thealth2 = health;\n }", "public void reduceAnimalHealth() {\n\t\thealth -= 10;\n\t}", "public void suffer(int damage){\r\n\t\thp -= damage;\r\n\t\tinvulnerable = true;\r\n\t}", "@Override\r\n\tprotected void setHealth( double newHealth ) \r\n\t{\r\n\t\tthis._health = this._health - newHealth;\r\n\t}", "private void subtractEnemyMissile() {\n this.enemyMissile -= 1;\n }", "@Override\n public void hit(int atk) {\n hp = hp - atk;\n }", "private void subtractPlayerSheild(int damage) {\n this.playerShield -= damage;\n }", "public void heal(float health) {\r\n \t\tthis.health += health;\r\n \t\tif(health > maxHealth) {\r\n \t\t\thealth = maxHealth;\r\n \t\t}\r\n \t}", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "public void Hit()\n {\n this.numLives--;\n //Oscillate visible and not if the number of lives is greater than zero\n if(this.numLives > 0)\n {\n this.damaged = true;\n this.Blink(1);\n\n }\n }", "public void loseHealth(int damage) {\r\n this.health -= damage;\r\n if (this.health <=0) {\r\n System.out.println(\"Player knocked out\");\r\n //Reduce number of lives remaining for the player\r\n }\r\n }", "public void heal2()\r\n {\r\n this.health = 900;\r\n Story.healText2();\r\n }", "public void suffer(int hits)\r\n {\r\n health = health - hits;\r\n if (health < 0)\r\n health = 0;\r\n if (hits == 0)\r\n say(\"Hahaha! I defened myself with \" + armor.getName() + \" and still have \" + health + \" left!\");\r\n else\r\n say(\"Ouch! \" + hits + \" hits is more than I want! I only have \" + health + \" left!\");\r\n if (health <= 0)\r\n die();\r\n }", "public void receiveDamage(double damage) {\r\n health = health - damage;\r\n }", "public void getDamage(int damagePoint){\n hp-=damagePoint;\n if(hp==0){\n alive=false;\n }\n }", "public void takeDamage()\n {\n if(getWorld()!= null)\n {\n if(this.isTouching(Enemies.class))\n {\n Life = Life - Enemies.damage;\n if(Life <=0)\n {\n getWorld().removeObject(this);\n Store.wealth += Game.credit;\n }\n }\n }\n }", "public void beAttacked(int damage) {\r\n\t\tif (health > damage) {\r\n\t\t\thealth -= damage;\r\n\t\t}else {\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t}", "public void dealDamage(int damage) {\r\n\t\thealth -= damage;\r\n\t\tif (health <= 0)\r\n\t\t\tdeath = true;\r\n\t\t_checkInvariant();\r\n\t}", "public void takeDamage(int dmg) {\n\t\thealth -= dmg;\n\t}", "public void act()\n {\n if (health == 0)\n {\n this.remove();\n }\n }", "@Override\r\n\tpublic void recieveHit() {\n\t\tif(armour <= 0) {\r\n\t\t\tSystem.out.println(\"Enemy Destroyed\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdouble calculateHitDamage = shot * basicDamage;\r\n\t\t\tif(calculateHitDamage == armour) {\r\n\t\t\t\tarmour = armour - calculateHitDamage;\r\n\t\t\t\tSystem.out.println(\"Enemy Armour Destroyed!!!\");\r\n\t\t\t}\r\n\t\t\telse if(calculateHitDamage > armour) {\r\n\t\t\t\tarmour = armour - calculateHitDamage;\r\n\t\t\t\tSystem.out.println(\"Enemy is Dead!!\");\r\n\t\t\t}\r\n\t\t\telse if(calculateHitDamage < armour) {\r\n\t\t\t\tarmour = armour - calculateHitDamage;\r\n\t\t\t\tSystem.out.println(\"Enemy not detroyed!! \\n\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Current Enemy life: \"+ armour);\r\n\t\t}\r\n\t}", "void hit(GameObject o){\r\n\t\tif (!shield){ // if sheild is on all hits do nothing\r\n\t\t\tif (!(o instanceof UpPower)){ // if didnt hit a power up the ship loses a life\r\n\t\t\t\tif (lives > 1) {\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t\treset();\r\n\t\t\t\t}\r\n\t\t\t\telse { // once there is no life left the ship dies\r\n\t\t\t\t\tdead = true;\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void act() \r\n {\r\n Controller world = (Controller) getWorld();\r\n player = world.getPlayer();\r\n if (this.isTouching(Player.class))\r\n {\r\n player.minusHealth(5);\r\n world.removeObject(this);\r\n }\r\n }", "public void attack(Person target) {\r\n target.setHealthPoints(target.getHealthPoints() - 1);\r\n }", "public void takedmg(int dmg){\n curHp -= dmg;\n }", "public void hurt(int damage)\n {\n \t hp -= (damage - ( damage * armor / 100 ));\n \t //System.out.println(\"hp: \" + hp);\n }", "public void repair(){\n if(health < 9) {\n this.health++;\n }\n }", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "void hurt(int strength) {\n life -= strength;\n if (life < 0)\n life = 0;\n }", "public void heal1()\r\n {\r\n this.health = 700;\r\n Story.healText1();\r\n }", "public void resetHealth(){\n curHp = healthPoint;\n }", "void gainHealth(int points) {\n this.health += points;\n }", "public void heal3()\r\n {\r\n this.health = 1200;\r\n Story.healText3();\r\n }", "public int takeDamage(int damage) {\n damage -= ARMOR;\r\n // set new hp\r\n return super.takeDamage(damage);\r\n }", "public void damage(Hero other) {\n this.weapon.knockBack(other, this.state, this.dir);\n }", "public void takeDamage(int amount){\r\n\t\tthis.life = this.life - amount;\r\n\t}", "private void subtractPlayerMissile() {\n this.playerMissile -= 1;\n }", "public int takeDamage(int damage) \r\n\t{\r\n\t\t//Pre: an int damage\r\n\t\t//Post: reduces health variable by damage\r\n\t\tif(health - damage > 0) \r\n\t\t{\r\n\t\t\thealth -= damage;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t\treturn health;\r\n\t}", "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "public void damage(int damageTaken) {\n //TODO: Create specific damage methods instead of damage calls everywhere(see damagedByBullet())\n if (!invincible) {\n this.hp -= damageTaken;\n }\n }", "public void takeDamage(int damage){\n\t\thealth -= damage;\n\t\tif(health<= 0) {\n\t\t\tspawnNew();\n\t\t}\n\t}", "@Override\r\n public void onHit(int damage){\n if(box2body != null){\r\n hp -= damage;\r\n screen.getGameManager().get(\"Sounds/orc-34-hit.wav\", Sound.class).play();\r\n if(this.hp <= 0) {\r\n screen.bodiesToDelete.add(box2body);\r\n deleteFlag = true;\r\n screen.spawnedCreatures.remove(this);\r\n screen.getGameManager().get(\"Sounds/orc-32-death.wav\", Sound.class).play();\r\n\r\n //Award Experience\r\n screen.getPlayer().awardExperience(this.experienceValue);\r\n screen.getPlayer().increaseKillCount();\r\n }\r\n }\r\n //Attack player when damaged\r\n //Prevents player from sniping monsters using Wander AI\r\n if(currentState != State.ATTACKING){\r\n Vector2 orcPosition = new Vector2(box2body.getPosition().x, box2body.getPosition().y);\r\n Vector2 playerPosition = new Vector2(screen.getPlayer().box2body.getPosition().x, screen.getPlayer().box2body.getPosition().y);\r\n\r\n currentState = State.HASBEENATTACKED;\r\n velocity = new Vector2(playerPosition.x - orcPosition.x, playerPosition.y - orcPosition.y);\r\n box2body.setLinearVelocity(velocity.scl(speed));\r\n }\r\n }", "@Override\n public void loseHealth(boolean s){\n\tif(s)\n\t health -= 2;\n\telse\n\t health--;\n }", "public void die() {\n\t\tsetDead(true);\n\t\tsetHp(0);\n\t\tgetGraphicShapes().get(stats.getBODY()).setLocation((int) getPosition().x(),\n\t\t\t\t(int) getPosition().y() + stats.getHeight() - stats.getWidth());\n\t\tgetGraphicShapes().get(stats.getBODY()).setSize(stats.getHeight(), stats.getWidth());\n\t\tgetPhysicalRectangle().setLocation((int) getPosition().x(),\n\t\t\t\t(int) getPosition().y() + stats.getHeight() - stats.getWidth());\n\t\tgetPhysicalRectangle().setSize(stats.getHeight(), stats.getWidth());\n\t\tgetGraphicShapes().remove(stats.getWEAPON());\n\t}", "public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }", "@Override\r\n\tpublic void heal() {\n\t\tSystem.out.println(\"Paladin \" + super.getName() + \" heals for 50 points.\");\r\n\t\tsuper.setHitPoints(super.getHitPoints() + 50);\r\n\t}", "protected void incrementHunger()\n {\n food_level--;\n if(food_level <= 0) {\n setDead();\n }\n }", "public void resetHealth() {\n\t\tthis.health = this.getCombatDefinition().getMaxHealth();\n\t}", "public void kill() {\n this.hp = 0;\n }", "@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "public void decreaseHealingNumber() {\n healingNumber--;\n }", "private void loseLife() {\r\n\t\thitGraphic(player);\r\n\t\tif (hits ==1) {\r\n\t\t\tlifeBar.scale(.67, 1);\r\n\t\t\tlifeBar.setColor(Color.ORANGE);\r\n\t\t} else if (hits == 2) {\r\n\t\t\tlifeBar.scale(.5, 1);\r\n\t\t\tlifeBar.setColor(Color.RED);\r\n\t\t} else if (hits == 3) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void bumped(SpaceObject object) {\n\t\thit = true;\t\n\t}", "public void takeAttack(int damage) {\r\n if(this.evasion > 0)\r\n this.evasion--;\r\n else\r\n this.takeDamage(damage);\r\n }", "public void applyDamage(int damage)\n\t{\n\t\tthis.currHP -= damage;\n\t\tif(currHP <= 0)\n\n\t\t{\n\t\t\tthis.currHP = 0;\n\t\t\tthis.kill();\n\t\t}\n\t\t\t\n\t}", "public void doAction(int action){\n this.hp -= action;\n }", "public void updateHealth(int healthLost){\n\t\thealth -= healthLost;\n\t\thealthLeftLabel.setText(\"\" + health);\n\t}", "public void damage(int amount) {\n \tshield = shield - amount;\n }", "private void strengthen(float hp) {\n this.hp += hp;\n if (this.hp > MAX_HP) {\n this.hp = MAX_HP;\n }\n }", "@Override\n\tpublic void reduceCurrentHp(final double damage, final L2Character attacker)\n\t{\n\t\treduceCurrentHp(damage, attacker, true);\n\t}", "public void setHealth(double h){\n health = h;\n }", "public void reduceHealth(int damage, int player) {\n\t\tif (player == OPPONENT) {\n\t\t\tint currentHealth = Integer.parseInt(opponentHealth.getText());\n\t\t\tint newHealth = currentHealth - damage;\n\t\t\topponentHealth.setText(Integer.toString(newHealth));\n\t\t\tdouble reduction = opponentHealthBar.getWidth()*(((double)newHealth)/((double) currentHealth));\n\t\t\thealthBarDamageAnimation(0,reduction);\n\t\t} else if (player == LOCAL) {\n\t\t\tint currentHealth = Integer.parseInt(localHealth.getText());\n\t\t\tint newHealth = currentHealth - damage;\n\t\t\tlocalHealth.setText(Integer.toString(newHealth));\n\t\t\tdouble reduction = localHealthBar.getWidth()*(((double)newHealth)/((double) currentHealth));\n\t\t\thealthBarDamageAnimation(1,reduction);\n\t\t}\n\t}", "public void gotDamaged() {\n \tif(!dead) {\n\t\t\tdamaged = true;\n\t\t\tgettingHitParticleEffect.reset();\n\t\t\tcolorValue = 0;\n\t\t}\n\n }", "public int HighHit(int start)\r\n {\r\n damage = ((int)(Math.random() * 100) % 50 + 80);\r\n int hp = start - damage;\r\n \r\n //modified to turn hp to 0 once it drops below or equals 0.\r\n if(hp <= 0)\r\n hp = 0;\r\n return hp;\r\n }", "@Override\r\n public void hitEvent(Block beingHit, Ball hitter) {\n this.currentScore.increase(5);\r\n // and destroying a block is worth and additional 10 points\r\n if (beingHit.getHitPointsNumber() == 0) {\r\n this.currentScore.increase(10);\r\n }\r\n }", "public void takeDamage(int damage) {\n Random rand = new Random();\n int game = rand.nextInt(51) + 75;\n double game2 = (double) game;\n double percDamage = game2/100.0;\n double realSomething = (double) damage;\n double actualDamageNotReal = realSomething * percDamage;\n int actualDamage = (int) actualDamageNotReal;\n int actualDmg = actualDamage - this.armour;\n if (actualDmg <= 0){\n actualDmg = 0;\n }\n this.health -= actualDmg;\n slowDisplay(String.format(\"%s takes %s damage, now at %s\\n\",this.name,actualDmg,this.health));\n\n }", "public void takeHeal(double amount)\n\t{\n\t\tif(healthHardCap == -1)\n\t\t{\n\t\t\tthis.maxHealth += amount;\n\t\t}\n\t\tthis.health = Math.min(this.health + amount, this.maxHealth);\n\t}", "public void SetHealth(int h)\n{\n\thealth=h;\n}", "public void damaged() {\n this.damageState = DamageState.DAMAGED;\n }", "@Override\r\n public void handleAttack(Player player) {\r\n player.decreaseHealth(3);\r\n player.setColor(true);\r\n }" ]
[ "0.82706916", "0.7915858", "0.78709584", "0.7805331", "0.7690341", "0.75556046", "0.75273186", "0.7525927", "0.74517626", "0.7450131", "0.74260396", "0.736551", "0.7303735", "0.72987115", "0.7238747", "0.7234748", "0.72245306", "0.71856755", "0.71647614", "0.716284", "0.71556497", "0.7129511", "0.71155405", "0.7114168", "0.7113795", "0.7089728", "0.70895994", "0.7048929", "0.7043105", "0.70204204", "0.7016199", "0.7004094", "0.69720995", "0.69561255", "0.6951981", "0.6938212", "0.69362676", "0.6925759", "0.6922297", "0.6912697", "0.6901362", "0.6891312", "0.68810856", "0.68622625", "0.68452466", "0.68219125", "0.68177027", "0.6813487", "0.68092537", "0.67741495", "0.6772366", "0.6769407", "0.6767576", "0.67406243", "0.6736154", "0.6734741", "0.6701294", "0.66912204", "0.6690994", "0.6671554", "0.66667634", "0.666671", "0.6650984", "0.66489214", "0.6641767", "0.66320705", "0.6628356", "0.6624431", "0.66223556", "0.6583582", "0.65646535", "0.65622556", "0.6557487", "0.6554591", "0.6542349", "0.6536955", "0.65343213", "0.6506081", "0.6498301", "0.6476241", "0.64607793", "0.6457886", "0.64533025", "0.6450543", "0.6448512", "0.64475346", "0.6444718", "0.6435471", "0.6423509", "0.6413942", "0.6404344", "0.6401228", "0.6399876", "0.6388934", "0.63809", "0.6374021", "0.63727224", "0.63701", "0.6359448", "0.63500875" ]
0.724133
14
detect if the object hit the other oppose objects. Hit objects of the same class is fine.
public boolean hitObject(BasicObject oppose){ if (oppose.classOfObejct != classOfObejct){ if (abs(posX - oppose.posX) < (wid / 2 + oppose.wid/2) && abs(posY - oppose.posY) < (hei / 2 + oppose.hei/2)){ return true; } else{ return false; } } else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean overlap(Catcher catcher, FallingObject object);", "public abstract boolean collisionWith(CollisionObject obj);", "private boolean detectCollisions(GameState mGaemState,ArrayList<GameObject> objects,SoundEngine se,ParticleSystem ps){\n boolean playerHit = false;\n for (GameObject go1:objects){\n if (go1.checkActive()){\n //the 1st object is active\n //so worth checking\n\n for (GameObject go2:objects){\n if (go2.checkActive()){\n //the 2nd object is active\n //so worth checking\n if (RectF.intersects(go1.getTransform().getCollider(),go2.getTransform().getCollider())){\n\n //switch goes here\n //there has been a collision\n //but does it matter?\n switch (go1.getTag() + \" with \" + go2.getTag()){\n case \"Player with Alien Laser\":\n playerHit = true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player with Alien\":\n playerHit =true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player Laser with Alien\":\n mGaemState.increaseScore();\n //respawn the alien\n ps.emitParticles(new PointF(go2.getTransform().getLocation().x,go2.getTransform().getLocation().y));\n go2.setInactive();\n go2.spawn(objects.get(Level.PLAYER_INDEX).getTransform());\n go1.setInactive();\n se.playAlienExplode();\n\n break;\n\n default:\n break;\n }\n\n }\n }\n }\n }\n }\n return playerHit;\n }", "@Override\n public <T extends VectorSprite> boolean collide(T object1, GraphicsObject object2) {\n double xDistance, yDistance;\n\n xDistance = this.getHitCenterX() + object1.getRadius() / 2 - Math.max(object2.getxPos(), Math.min(this.getHitCenterX() + object1.getRadius() / 2, object2.getxPos() + object2.getWidth()));\n yDistance = this.getHitCenterY() + object1.getRadius() / 2 - Math.max(object2.getyPos(), Math.min(this.getHitCenterY() + object1.getRadius() / 2, object2.getyPos() + object2.getHeight()));\n\n return (xDistance * xDistance + yDistance * yDistance) < (object1.getRadius() / 2 * object1.getRadius() / 2);\n }", "public boolean collision(Objet o) {\r\n\t\treturn false;\r\n\t}", "public boolean intersects(BaseGameObject other) {\r\n return (other.getPosx() - this.getPosx())\r\n * (other.getPosx() - this.getPosx())\r\n + (other.getPosy() - this.getPosy())\r\n * (other.getPosy() - this.getPosy())\r\n < (other.bound + this.bound) * (other.bound + this.bound);\r\n }", "private boolean collides(GameObject gameObject1) {\n return collides(gameObject1, 0.5);\n }", "public boolean hitObject(BasicObject obj){\n if(abs(obj.posX - posX) < obj.wid/ 2 && abs(obj.posY - posY) < obj.hei/ 2){\n return true;\n }\n else{\n return false;\n }\n }", "public boolean intersects(OnScreenObject other) {\r\n if (other == null) {\r\n return false;\r\n }\r\n Rectangle r1 = getRectangle();\r\n Rectangle r2 = other.getRectangle();\r\n\r\n return r1.intersects(r2);\r\n }", "void checkCollision(Entity other);", "public boolean collidesWith(ICollider other);", "public boolean isIntersecting(GameObject other){\n if(other.isSolid()&&this.solid){\n return RectF.intersects(other.getHitBox(),this.hitBox);//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }\n return false;\n }", "@Override\n\tpublic boolean collidesWith(GameObject otherObject) {\n\t\tboolean result = false;\n\t\tdouble thisCenterX = this.getX();\n\t\tdouble thisCenterY = this.getY();\n\n\t\tdouble otherCenterX = (otherObject).getX();\n\t\tdouble otherCenterY = (otherObject).getY();\n\n\t\tdouble dx = thisCenterX - otherCenterX;\n\t\tdouble dy = thisCenterY - otherCenterY;\n\n\t\tdouble distBetweenCentersSqr = (dx * dx + dy * dy);\n\n\t\tint thisRadius= this.getSize() / 2;\n\t\t\n\t\tint otherRadius;\n\t\t\n\t\tif(otherObject instanceof Base) {\n\t\t\totherRadius= (otherObject).getSize();\n\t\t}else {\n\t\t\totherRadius= (otherObject).getSize() / 2;\n\t\t}\n\n\t\tint radiiSqr= (thisRadius * thisRadius + 2 * thisRadius * otherRadius + otherRadius * otherRadius);\n\n\t\tif (distBetweenCentersSqr <= radiiSqr) { result = true ; }\n\n\t\treturn result;\n\t}", "public boolean intersecta(Base obj) {\n return getPerimetro().intersects(obj.getPerimetro());\n }", "public boolean collidesWith(GameObject other) {\n me.setBounds((int) x, (int) y, sprite.getWidth(), sprite.getHeight());\n him.setBounds((int) other.x, (int) other.y, other.sprite.getWidth(), other.sprite.getHeight());\n\n return me.intersects(him);\n }", "public boolean collision(Object a, Object b) {\n if (Rect.intersects(a.getRect(), b.getRect())) { //if the two objects hitboxes colide\n return true;\n }\n return false;\n }", "public boolean hasCollided(GameObject object1, GameObject object2){\n Position pos1 = object1.getPos();\n Position pos2 = object2.getPos();\n int object1Width = object1.getWidth();\n int object2Width = object2.getWidth();\n if(object1Width < 0){\n pos1.setX(pos1.getX()+object1Width);\n object1Width = Math.abs(object1Width);\n }\n if(object2Width < 0){\n pos2.setX(pos2.getX()+object2Width);\n object2Width = Math.abs(object2Width);\n }\n\n return(!(pos1.getX()+object1Width<pos2.getX()\n //Checks if the object is on either side of the other. If it is not, it is inside.\n || pos1.getY()>pos2.getY()+object2.getHeight()\n || pos1.getY() + object1.getHeight()<pos2.getY()\n || pos1.getX()>pos2.getX()+object2Width));\n }", "public boolean isOver(VisibleThing other) {\n // checks each of the false conditions for the other's image not being over our current image\n // returns false if each of these conditions fails, true otherwise\n\n if (other == null) {\n return false;\n }\n if ((other.x > (this.x + this.image.width))) {\n return false;\n }\n\n if ((other.x + other.image.width) < this.x) {\n return false;\n }\n\n if (other.y > (this.y + this.image.height)) {\n return false;\n }\n\n if ((other.y + other.image.height) < this.y) {\n return false;\n }\n\n return true;\n\n\n }", "public boolean equivalentInteractions(InteractionObject first, InteractionObject second) {\n\t\tboolean result = \n\t\t\tfirst.getType() == second.getType() &&\n\t\t\tfirst.getIndex() == second.getIndex();\n\t\treturn result;\n\t}", "@Test\n public void collidableObjects() {\n radar.loop();\n assertTrue(radar.getObjectsSeenByRadar().stream().anyMatch(t -> t.getId().equals(\"roadsign_speed_40_1\")));\n assertFalse(radar.getObjectsSeenByRadar().stream().anyMatch(t -> t.getId().equals(\"parking_2\")));\n }", "private boolean isObjectAPaddle(GObject collider) {\n return (collider == paddle);\n }", "@Override\r\n\tpublic boolean collides (Entity other)\r\n\t{\r\n\t\tif (other == owner || other instanceof Missile)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn super.collides(other);\r\n\t}", "@Override\n public boolean isCollided(gameObject obj){\n return Rect.intersects(obj.getastRect(), getRectplayer1())||\n Rect.intersects(obj.getastRect(), getRectplayer2()) ||\n Rect.intersects(obj.getastRect(), getRectplayer3()) ||\n Rect.intersects(obj.getastRect(), getRectplayer4());\n }", "public boolean isHit() { return hit; }", "public abstract boolean isHit(int x, int y);", "public boolean opposedTo(Object o);", "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n \n final Point other = (Point) obj;\n if( !(Point.memeReel(this.x, other.getX()) && Point.memeReel(this.y, other.getY())) ) {\n return false;\n }\n\n return true;\n }", "public boolean isIntersecting(RectF other){\n return RectF.intersects(other,this.hitBox);//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }", "public abstract boolean hit(Rectangle2D r);", "private boolean isRockTouchingRock(RockView rock1, RockView rock2) {\n\n boolean isTouching = false;\n\n double distance = rock1.calcDistance(rock2.getCenter());\n\n if (distance <= rockRadius * 1.5) {\n isTouching = true;\n }\n\n return isTouching;\n }", "public abstract void collide(InteractiveObject obj);", "boolean wasHit();", "@Override\n public void collide(ScreenObject other) {\n switch (other.getType()) {\n case ASTEROID:\n hp -= other.dealDamage();\n break;\n case ENEMY:\n hp -= other.dealDamage();\n break;\n case ENEMYBULLET:\n hp -= other.dealDamage();\n break;\n case MACGUFFIN:\n macguffinsCollected++;\n break;\n case PORT:\n if (macguffinsCollected >= level.getMacguffinCount()\n && boundingCircle.contains(other.getPosition())) {\n Gdx.app.log(\"Ship\", \"level over\");\n //ends level\n }\n break;\n }\n }", "public boolean match(MindObject other){\n return other.isSubtypeOf(this) || isSubtypeOf(other);\n }", "boolean compare(Object targetOne, Object targetTwo);", "boolean intersects( Geometry gmo );", "public boolean isIdentical(Remote obj1, Remote obj2)\n {\n\torg.omg.CORBA.Object corbaObj1 = (org.omg.CORBA.Object)obj1;\n\torg.omg.CORBA.Object corbaObj2 = (org.omg.CORBA.Object)obj2;\n\n\treturn corbaObj1._is_equivalent(corbaObj2);\n }", "public boolean intersects(GraphicalFigure fig) {\n\n\t\t// Get the distance between the 2 figures on the x axis\n\t\tint xDist = pos.xCoord() - fig.getOffset().xCoord();\n\n\t\t// Get the distance on the y axis\n\t\tint yDist = pos.yCoord() - fig.getOffset().xCoord();\n\n\t\t// All if's allow for if the x's are the same\n\t\t// Check to see if the figure is on the right and overlaps\n\t\tif (xDist >= 0 && xDist < fig.getWidth()) {\n\n\t\t\t// For loop variables\n\t\t\tint initial = 0;\n\t\t\tint compare = 0;\n\t\t\tBoolean loopCheck = false;\n\n\t\t\t// All if's allow for if the y's are the same\n\t\t\t// Check if it's above the object and within range\n\t\t\tif (yDist >= 0 && xDist < fig.getHeight()) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = pos.yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = pos.yCoord() + fig.getHeight() - yDist;\n\t\t\t}\n\n\t\t\t// Check if it's below the object and within range\n\t\t\telse if (yDist <= 0 && xDist < height) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = fig.getOffset().yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = fig.getOffset().yCoord() + fig.getHeight() + yDist;\n\t\t\t}\n\n\t\t\t// If the loop check is true, do a for loop\n\t\t\tif (loopCheck) {\n\n\t\t\t\t// Create a location variable\n\t\t\t\tLocation loc;\n\t\t\t\t// Loop through the intersecting rectangle\n\t\t\t\t// Loop Horizontally\n\t\t\t\tfor (int i = pos.xCoord(); i < pos.xCoord() + fig.getWidth() - xDist; i++) {\n\t\t\t\t\t// Loop through vertically\n\t\t\t\t\tfor (int j = initial; j < compare; j++) {\n\t\t\t\t\t\t// Create a location for the new pixel\n\t\t\t\t\t\tloc = new Location(i, j);\n\n\t\t\t\t\t\t// Check for overlap, return true\n\t\t\t\t\t\tif (findPixel(loc) && fig.findPixel(loc)) {\n\t\t\t\t\t\t\treturn true;\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\n\t\t// All if's allow for if the x's are the same\n\t\t// Check if the figure is on the left and overlaps\n\t\telse if (xDist >= 0 && xDist < width) {\n\t\t\t// For loop variables\n\t\t\tint initial = 0;\n\t\t\tint compare = 0;\n\t\t\tBoolean loopCheck = false;\n\n\t\t\t// All if's allow for if the y's are the same\n\t\t\t// Check if it's above the object and within range\n\t\t\tif (yDist >= 0 && xDist < fig.getHeight()) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = pos.yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = pos.yCoord() + fig.getHeight() - yDist;\n\t\t\t}\n\n\t\t\t// Check if it's below the object and within range\n\t\t\telse if (yDist <= 0 && xDist < height) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = fig.getOffset().yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = fig.getOffset().yCoord() + fig.getHeight() + yDist;\n\t\t\t}\n\n\t\t\t// If the loop check is true, do a for loop\n\t\t\tif (loopCheck) {\n\n\t\t\t\t// Create a location variable\n\t\t\t\tLocation loc;\n\t\t\t\t// Loop through the intersecting rectangle\n\t\t\t\t// Loop Horizontally\n\t\t\t\tfor (int i = fig.getOffset().xCoord(); i < fig.getOffset().xCoord() + width + xDist; i++) {\n\t\t\t\t\t// Loop through vertically\n\t\t\t\t\tfor (int j = initial; j < compare; j++) {\n\t\t\t\t\t\t// Create a location for the new pixel\n\t\t\t\t\t\tloc = new Location(i, j);\n\n\t\t\t\t\t\t// Check for overlap, return true\n\t\t\t\t\t\tif (findPixel(loc) && fig.findPixel(loc)) {\n\t\t\t\t\t\t\treturn true;\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\n\t\t// If no intersection found, return false\n\t\treturn false;\n\t}", "public boolean isEqual(Object objectname1, Object objectname2, Class<?> voClass) {\n\t\treturn false;\n\t}", "void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }", "public void detectCollisions(){\n\t\tfor(int i = 0; i < pScene.getNumOf(); i++){\n\t\t\tEntity a = pScene.getObject(i);\n\t\t\tif (!a.isAlive())\n\t\t\t\tcontinue;\n\t\t\tfor(int j = i + 1; j < pScene.getNumOf(); j++){\n\t\t\t\tEntity b = pScene.getObject(j);\n\t\t\t\tif(a.intersects(b)&&(!(a.getStatic()&&b.getStatic()))){\n\t\t\t\t\tsManifolds.add(new Manifold(a,b)); // For regular objects\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean equals(Object other){\n\t\t\n\t\t\n\t\tif(other instanceof Wall)\n\t\t{\n\t\t\t\n\t\t\tWall that = (Wall) other;\n\t\t\t\n\t\t\tif(this.startx == that.startx && this.starty == that.starty && this.endx == that.endx && this.endy == that.endy){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse if(this.startx == that.endx && this.starty == that.endy && this.endx == that.startx && this.endy == that.starty){\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}", "public abstract void collideWith(Entity entity);", "@Override\r\n public boolean checkCollisions(Point p1, Point p2) {\r\n for(IShape child : children) {\r\n if(child.checkCollisions(p1,p2)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public void collideWith(Rigidbody obj) {\n\t\t\r\n\t}", "public void onHitOther(Actor other) {\n\t\t\r\n\t}", "public boolean hasCollidedWith(InteractiveObject obj){\n\t\tif (obj == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn (leftCollision(obj) || rightCollision(obj));\n\t\t}\n\t}", "private void collision(GameObjectContainer<GameObject> object) {\n \tGameObject renderObject = null;\r\n\t\tfor (int i = 0; i < object.getSize(); i++) {\r\n\t\t\trenderObject = object.iterator().next();\r\n\r\n\t\t\tif (renderObject.getType() == \"BLOCK\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(renderObject.getBoundsInParent())) {\r\n\t\t\t\t\tSystem.out.println(\"intersected\");\r\n\t\t\t\t\tthis.setTranslateY(renderObject.getTranslateY() - renderObject.getHeight());\r\n\t\t\t\t\tfalling = false;\r\n\t\t\t\t\tjump = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfalling = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (renderObject.getType() == \"NURSE\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(renderObject.getBoundsInParent())) {\r\n\t\t\t\t\tSystem.out.println(\"nurse\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}else {\r\n\t\t\t\tfalling = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n }", "private boolean leftUpCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "@Override\r\n\tpublic boolean collidesWith(ICollider obj) {\r\n\t\tGameObject go = (GameObject) obj;\r\n\t\t// find the centers\r\n\t\tdouble thisCenterX = this.getPointX();\r\n\t\tdouble thisCenterY = this.getPointY();\r\n\r\n\t\tdouble otherCenterX = 0;\r\n\t\tdouble otherCenterY = 0;\r\n\t\tif (go instanceof Asteroid) {\r\n\t\t\totherCenterX = go.getPointX() + go.getObjectSize() / 2;\r\n\t\t\totherCenterY = go.getPointY() + go.getObjectSize() / 2;\r\n\t\t} else if (go instanceof NonPlayerShip) {\r\n\t\t\totherCenterX = go.getPointX();\r\n\t\t\totherCenterY = go.getPointY();\r\n\t\t} else if (go instanceof PlayerShip) {\r\n\t\t\totherCenterX = go.getPointX();\r\n\t\t\totherCenterY = go.getPointY() - 11.667;\r\n\t\t} else if (go instanceof Missile) {\r\n\t\t\totherCenterX = go.getPointX();\r\n\t\t\totherCenterY = go.getPointY();\r\n\t\t}else if(go instanceof Curve) {\r\n\t\t\totherCenterX=((Curve) go).getCurveCenterX();\r\n\t\t\totherCenterY=((Curve) go).getCurveCenterY();\r\n\t\t}\r\n\r\n\t\t// find distance between centers\r\n\t\tdouble dx = thisCenterX - otherCenterX;\r\n\t\tdouble dy = thisCenterY - otherCenterY;\r\n\t\tdouble disBetCentSqr = dx * dx + dy * dy;\r\n\r\n\t\t// find square of sum of radii\r\n\t\tdouble thisRadius = getObjectSize() * 4;\r\n\t\tdouble otherRadius = 0;\r\n\t\tif (go instanceof Asteroid) {\r\n\t\t\totherRadius = go.getObjectSize() / 2;\r\n\t\t} else if (go instanceof NonPlayerShip) {\r\n\t\t\totherRadius = go.getObjectSize() * 4;\r\n\t\t} else if (go instanceof PlayerShip) {\r\n\t\t\totherRadius = 41.667;\r\n\t\t} else if (go instanceof SpaceStation) {\r\n\t\t\totherRadius = 30;\r\n\t\t} else if (go instanceof Missile) {\r\n\t\t\tMissile m=(Missile)go;\r\n\t\t\tif(m.getMissileFlag()==0) {\r\n\t\t\t\totherRadius=21;\r\n\t\t\t}else {\r\n\t\t\t\totherRadius=10;\r\n\t\t\t}\r\n\t\t}else if(go instanceof Curve) {\r\n\t\t\totherRadius=((Curve) go).getCurveRadius();\r\n\t\t}\r\n\t\tdouble radiiSqr = thisRadius * thisRadius + 2 * thisRadius * otherRadius + otherRadius * otherRadius;\r\n\r\n\t\tif (disBetCentSqr <= radiiSqr) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tMove other = (Move)obj;\n\t\treturn (other.game==game) && (other.player==player) && (other.conseq==conseq);\n\t}", "public static boolean collision(Bug b1, Bug b2){\n float xDiff = b1.getCenter().x - b2.getCenter().x;\n float yDiff = b1.getCenter().y - b2.getCenter().y;\n float distSqr = xDiff*xDiff + yDiff*yDiff;\n return distSqr < (b1.getRadius() + b2.getRadius()) * (b1.getRadius() + b2.getRadius());\n }", "public void checkForCollisions()\r\n\t{\r\n\t\t//collision detection\r\n\t\tfor(PolygonD obj : objects)\r\n\t\t{\r\n\t\t\t//find points in character that intersected with the scene\r\n\t\t\tfor(PointD p : aSquare.getBoundary().getVerts())\r\n\t\t\t{\r\n\t\t\t\tif(obj.contains(p)){\r\n\t\t\t\t\t//find side that intersected\r\n\t\t\t\t\tdouble minDist = Double.MAX_VALUE;\r\n\t\t\t\t\tPointD prev = obj.getVerts().get(obj.getVerts().size()-1);\r\n\t\t\t\t\tPointD closestPoint = null;\r\n\t\t\t\t\tfor(PointD vert : obj.getVerts())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDouble d = distanceToLine(new Vector(prev, vert), p);\r\n\t\t\t\t\t\tif(d != null && d < minDist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\t\tclosestPoint = getNearestPointOnLine(new Vector(prev, vert),p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprev = vert;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tVector offset = new Vector(p, closestPoint);\r\n\t\t\t\t\taSquare.translate(offset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//find points in scene that intersected with the character\r\n\t\t\tfor(PointD p : obj.getVerts())\r\n\t\t\t{\r\n\t\t\t\tif(aSquare.getBoundary().contains(p)){\r\n\t\t\t\t\t//find side that intersected\r\n\t\t\t\t\tdouble minDist = Double.MAX_VALUE;\r\n\t\t\t\t\tPointD prev = aSquare.getBoundary().getVerts().get(aSquare.getBoundary().getVerts().size()-1);\r\n\t\t\t\t\tPointD closestPoint = null;\r\n\t\t\t\t\tfor(PointD vert : aSquare.getBoundary().getVerts())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDouble d = distanceToLine(new Vector(prev, vert), p);\r\n\t\t\t\t\t\tif(d != null && d < minDist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\t\tclosestPoint = getNearestPointOnLine(new Vector(prev, vert),p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprev = vert;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//get the angle of object by 'feeling' it\r\n\t\t\t\t\tint numVerts = obj.verts.size();\r\n\t\t\t\t\tint objI = obj.verts.indexOf(p);\r\n\t\t\t\t\tint lastI = (objI - 1) % numVerts;\r\n\t\t\t\t\tif(lastI == -1)\r\n\t\t\t\t\t\tlastI = numVerts - 1;\r\n\t\t\t\t\tint nextI = (objI + 1) % numVerts;\r\n\t\t\t\t\t\r\n\t\t\t\t\tint angle = (int)Math.round((new Vector(obj.verts.get(objI), obj.verts.get(lastI))).angleBetween(new Vector(obj.verts.get(objI), obj.verts.get(nextI))));\r\n\t\t\t\t\t\r\n\t\t\t\t\taSquare.sendMsg(new Msg(aSquare, \"Felt Vertex: \" + angle + \"deg\"));//null means status message\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//reverse direction to make aSquare move out of wall\r\n\t\t\t\t\tVector offset = new Vector(closestPoint, p);\r\n\t\t\t\t\taSquare.translate(offset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\taSquare.getCenter();\r\n\t}", "@Override\n\tpublic boolean checkCollision() {\n\t\treturn true;\n\t}", "@Override\n public void checkCollision( Sprite obj )\n {\n \n }", "@Override\r\n public boolean equals(Object obj) {\r\n if (obj instanceof Pokemon) {\r\n Pokemon objOne = (Pokemon) obj;\r\n return objOne.number == this.number;\r\n// return objOne.hashCode() == this.hashCode();\r\n } else {\r\n return false;\r\n }\r\n }", "boolean collideWithVehicles(Vehicle v);", "public boolean equals(Object obj) {\n/* 117 */ if (obj == this) {\n/* 118 */ return true;\n/* */ }\n/* 120 */ if (obj instanceof ContourEntity && super.equals(obj)) {\n/* 121 */ ContourEntity ce = (ContourEntity)obj;\n/* 122 */ if (this.index != ce.index) {\n/* 123 */ return false;\n/* */ }\n/* 125 */ return true;\n/* */ } \n/* 127 */ return false;\n/* */ }", "public boolean collisionDetection(Rectangle2D object1, Rectangle2D object2) {\n return object1.intersects(object2);\n }", "public boolean equals(Object obj) {\n\t\tMercator p;\n\t\ttry {\n\t\t\tp = (Mercator)obj;\n\t\t} catch (ClassCastException ex) {\n\t\t\treturn false;\n\t\t}\n\t\tif(!super.equals(p))return false;\n\t\treturn (refY==p.refY) && (scaleY==p.scaleY);\n\t}", "private void checkCollision()\n {\n if (gameOverBool==false)\n { \n Actor a = getOneIntersectingObject(Wall.class);\n if (a != null||isAtEdge())\n {\n setImage(\"gone.png\");//laat de helicopter verdwijnen\n //greenfoot.GreenfootSound.stop(\"helisound.wav\");\n World world = getWorld();\n world.addObject(new Explosion(), getX(), getY());\n Greenfoot.playSound(\"heliExplosion.wav\");\n world.addObject( new Gameover(), 600, 300 );\n gameOverBool = true; \n }\n } \n }", "@Override\n public void checkCollision( Sprite obj )\n {\n\n }", "@Override\n public int test(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2) {\n // This is similar to WedgeContainsOrCrosses, except that we want to\n // distinguish cases (1) [A contains B], (3) [A and B are disjoint],\n // and (2,4,5,6) [A intersects but does not contain B].\n\n if (orderedCCW(a0, a2, b2, ab1)) {\n // We are in case 1, 5, or 6, or case 2 if a2 == b2.\n return orderedCCW(b2, b0, a0, ab1) ? 1 : -1; // Case 1 vs. 2,5,6.\n }\n // We are in cases 2, 3, or 4.\n if (!orderedCCW(a2, b0, b2, ab1)) {\n return 0; // Case 3.\n }\n\n // We are in case 2 or 4, or case 3 if a2 == b0.\n return (a2.equalsPoint(b0)) ? 0 : -1; // Case 3 vs. 2,4.\n }", "public boolean contactsSprite(Sprite other) {\r\n\t\treturn bb.intersects(other.getBoundingBox());\r\n\t}", "@Override\n public boolean isTouching(Sprite other)\n {\n return Rect.intersects(other.spriteBounds, this.spriteBounds);\n }", "private boolean alreadyHit(int x, int y) {\n for (int i = 0; i < hitCount; i++){\n if (x == hitList[i].x && y == hitList[i].y){\n return true;\n }\n }\n for (int i = 0; i < missCount; i++) {\n if (x == missList[i].x && y == missList[i].y) {\n return true;\n }\n }\n return false;\n }", "public boolean detectCollide(int objectX, int objectY, int objectW, int objectH) {\r\n \tint north = (objectY + objectH) - y;\r\n int east = objectX - (x + width);\r\n int south = objectY - (y + height);\r\n int west = (objectX + objectW) - x;\r\n if(north >= 1 && east <= 1 && south <= 1 && west >= 1) { return true; }\r\n else { return false; }\r\n }", "private boolean isColliding(Node node1, Node node2){\n\t\tfinal int offset = 2;\n\t\tBounds bounds1 = node1.getBoundsInParent();\n\t\tBounds bounds2 = node2.getBoundsInParent();\n\t\tbounds1 = new BoundingBox(bounds1.getMinX() + offset, bounds1.getMinY() + offset,\n\t\t\t\tbounds1.getWidth() - offset * 2, bounds1.getHeight() - offset * 2);\n\t\tbounds2 = new BoundingBox(bounds2.getMinX() + offset, bounds2.getMinY() + offset,\n\t\t\t\tbounds2.getWidth() - offset * 2, bounds2.getHeight() - offset * 2);\n\t\treturn bounds1.intersects(bounds2);\n\t}", "public boolean isOverhit()\n\t{\n\t\treturn overhit;\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif(obj!=null && obj instanceof Test1){\n\t\t\tTest1 obj2 = (Test1)obj;\n\t\t\tif(x==obj2.x && y==obj2.y){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean equals( Object o ) { \n if (o!=null && this.getClass() == (o.getClass()) && \n getP1().equals(((Triangle)o).getP1()) && \n getP2().equals(((Triangle)o).getP2()) && \n getP3().equals(((Triangle)o).getP3())){\n return true;\n }\n return false;//if not equal to each other\n\n }", "public static void checkCollisions() {\n\t \n\t\tfor (Ball b1 : Panel.balls) {\n\t\t\tfor (Ball b2 : Panel.balls) {\n\t\t\t\tif (b1.Bounds().intersects(b2.Bounds()) && !b1.equals(b2)) {\t\t\t//checking for collision and no equals comparisions\n\t\t\t\t\tint vX = b1.getxVelocity();\n\t\t\t\t\tint vY = b1.getyVelocity();\n\t\t\t\t\tb1.setxVelocity(b2.getxVelocity());\t\t\t\t\t\t\t\t//reversing velocities of each Ball object\n\t\t\t\t\tb1.setyVelocity(b2.getyVelocity());\n\t\t\t\t\tb2.setxVelocity(vX);\n\t\t\t\t\tb2.setyVelocity(vY);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean collision(GameObject initial, GameObject secondary){\n\n if (Rect.intersects(initial.getHitbox(),secondary.getHitbox())){\n MediaPlayer myplayer = MediaPlayer.create(getContext(), R.raw.robloxdeath);\n myplayer.start();\n return true;\n }\n return false;\n\n }", "public static boolean squareSquare(GameObject obj1, GameObject obj2) {\r\n\t\tfloat obj1_size = (obj1.getScale() * EnvironmentVariables.getMeter()) / 2;\r\n\t\tfloat obj2_size = (obj2.getScale() * EnvironmentVariables.getMeter()) / 2;\r\n\t\t\r\n\t\tif(obj1.getX() + obj1_size >= obj2.getX() - obj2_size && \t//obj1 right edge past obj2 left edge\r\n\t\t\tobj1.getX() - obj1_size <= obj2.getX() + obj2_size &&\t//obj1 left edge past obj2 right edge\r\n\t\t\tobj1.getY() + obj1_size >= obj2.getY() - obj2_size &&\t//obj1 top edge past obj2 bottom edge\r\n\t\t\tobj1.getY() - obj1_size <= obj2.getY() + obj2_size\t\t//obj1 top edge past obj2 bottom edge\r\n\t\t\t\t) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Override\n public boolean\n doIntersection(Ray inOut_Ray) {\n // TODO!\n return false;\n }", "@Override\n\tpublic boolean equals(Object other) { \n\t\tif (other instanceof Fish) {\n\t\t\tFish otherFish =((Fish) other);\n\t\t\treturn this.xloc == otherFish.getXLoc() && this.yloc == otherFish.getYLoc()\n\t\t\t\t\t\t\t\t&& this.isCaught == otherFish.isCaught && this.direction\n\t\t\t\t\t\t\t\t== otherFish.direction && this.species == otherFish.species;\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void isMatched(Point p) {\n\t\t\r\n\t}", "protected void onCollision(Actor other) {\r\n\r\n\t}", "boolean equals(Point other) {\n //System.out.println(\"Calling our equals method now!\");\n return (this.x == other.x) && (this.y == other.y);\n }", "public void checkCollision() {}", "public boolean collisionDetected() {\r\n\t\tfor (GameElement target : getTargets()) {\r\n\t\t\tif (myInitiator.intersects(target) && checkTargetMatch(target)) {\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 inLaws(T gp1, T gp2) {\r\n T temp1Target = getOffspring(gp1);\r\n T gpTarget = getOffspring(temp1Target);\r\n\r\n T temp2Target = getOffspring(gp2);\r\n T gmTarget = getOffspring(temp2Target);\r\n\r\n if (temp1Target.equals(temp2Target)) {\r\n return false;\r\n }\r\n if (gpTarget.equals(gmTarget)) {\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean collides(AirObject ao) {\n LinkedNode curr = head;\n while (curr != null) {\n if (!curr.collides(ao)) {\n return false;\n }\n curr = curr.next();\n }\n return true;\n }", "public void checkCollisions(int xH, int yH) {\n Rectangle r1 = new Rectangle(xH, yH, 50, 50);\n Rectangle r2 = new Rectangle(zombie.x, zombie.y, 50, 50);\n if (r1.intersects(r2)) {\n zombieWins = true; \n }\n }", "public boolean isCollision(Ball ob) { // Kollisionsabfrage\r\n\t\t\r\n\t\tdX = posX - ob.getPosX();\r\n\t\tdY = posY - ob.getPosY();\r\n\t\tfloat vector = dX * dX + dY * dY;\r\n\t\tfloat hypo = radius * radius * 4;\r\n\t\tif (hypo >= vector) {\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 boolean isWithinObject(int x, int y)\n {\n if( x > coX-Xsize/2 &&\n x < coX+Xsize/2 &&\n y > coY-Ysize/2 &&\n y < coY+Ysize/2 )\n return true;\n else\n return false;\n }", "protected boolean intersects(Circle2D other) {\n\t\treturn intersects(other.x, other.y, other.diameter);\n\t}", "public boolean trackingViolation(TrackedObject obj) {\n\t\t//Examine cross-correlation coefficients. Worse coefficient is considered incorrect.\n\t\t//If the two coefficients are too similar, examine distance instead.\n\t\tdouble difference = Math.abs(this.tMatch - obj.tMatch);\n\t\tif (difference > MATCH_TOLERANCE) {\n\t\t\tif (this.tMatch > obj.tMatch)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//Examine distance. The object that moved further is considered incorrect.\n\t\tif (obj.newStepDistance() > this.newStepDistance())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean intersects(Shape other) {\n boolean result = false;\n ArrayList<Vector3D> points = getPoints();\n for (Vector3D point : points) {\n if (other.contains(point)) {\n if (other.contains(point)) {\n if (other.contains(point)) {\n System.out.println(this.part.name + \" contains \" + other.part.name + \" : \" + point);\n\n result = true;\n }\n }\n }\n }\n\n points = other.getPoints();\n for (Vector3D point : points) {\n if (this.contains(point)) {\n if (this.contains(point)) {\n if (this.contains(point)) {\n System.out.println(this.part.name + \" contains \" + other.part.name + \" : \" + point);\n\n result = true;\n }\n }\n }\n }\n\n return result;\n }", "public void checkCollisions(List<Entity> listOfCloseObjects){\n\n for(Entity first : listOfCloseObjects){\n for(Entity second : listOfCloseObjects){\n if(first!=second) {\n\n String typeOfCollision = \"\";\n\n //check for a collision between the bounding boxes\n if (first.getBoundingBox().intersects(second.getBoundingBox())) {\n if(first.getEntityType().equals(EntityType.WALL) && second.getEntityType().equals(EntityType.PLAYER)) {\n typeOfCollision = \"playerWithWall\";\n }\n else if(first.getEntityType().equals(EntityType.FLOOR_HAZARD) && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"playerWithHazard\";\n }\n else if(first.getEntityType().equals(EntityType.MELEE_WEAPON) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"swordWithEnemy\";\n }\n else if(first instanceof Bullet && second.getEntityType().equals(EntityType.WALL)){\n typeOfCollision = \"bulletWithWall\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.WALL)){\n typeOfCollision = \"enemyWithWall\";\n }\n else if((first.getEntityType().equals(EntityType.DEFAULT_BULLET) || first.getEntityType().equals(EntityType.SHOTGUN_BULLET) || first.getEntityType().equals(EntityType.FAST_BULLET)) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"enemyWithBullet\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.ENEMY)){\n typeOfCollision = \"enemyWithEnemy\";\n }\n else if(first.getEntityType().equals(EntityType.ENEMY) && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"enemyWithPlayer\";\n }\n else if((first.getEntityType().equals(EntityType.SWORD) || first.getEntityType().equals(EntityType.SHOTGUN) || first.getEntityType().equals(EntityType.PISTOL) || first.getEntityType().equals(EntityType.ASSAULT_RIFLE) ||\n first.getEntityType().equals(EntityType.SHIELD) || first.getEntityType().equals(EntityType.SPEEDBOOST) || first.getEntityType().equals(EntityType.HEART))\n && second.getEntityType().equals(EntityType.PLAYER)){\n typeOfCollision = \"itemWithPlayer\";\n }\n\n if(!typeOfCollision.isEmpty())\n collide(typeOfCollision, first, second);\n }\n }\n }\n }\n\n }", "public void checkCollisions(ArrayList<Collidable> other);", "boolean losCompare(double x1, double y1, double x2, double y2, CObject pHo)\r\n {\r\n double delta;\r\n int x, y;\r\n\r\n int xLeft = pHo.hoX - pHo.hoImgXSpot;\r\n int xRight = xLeft + pHo.hoImgWidth;\r\n int yTop = pHo.hoY - pHo.hoImgYSpot;\r\n int yBottom = yTop + pHo.hoImgHeight;\r\n\r\n if (x2 - x1 > y2 - y1)\r\n {\r\n delta = (double) (y2 - y1) / (double) (x2 - x1);\r\n if (x2 > x1)\r\n {\r\n if (xRight < x1 || xLeft >= x2)\r\n {\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n if (xRight < x2 || xLeft >= x1)\r\n {\r\n return false;\r\n }\r\n }\r\n y = (int) (delta * (xLeft - x1) + y1);\r\n if (y >= yTop && y < yBottom)\r\n {\r\n return true;\r\n }\r\n\r\n y = (int) (delta * (xRight - x1) + y1);\r\n if (y >= yTop && y < yBottom)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n delta = (double) (x2 - x1) / (double) (y2 - y1);\r\n if (y2 > y1)\r\n {\r\n if (yBottom < y1 || yTop >= y2)\r\n {\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n if (yBottom < y2 || yTop >= y1)\r\n {\r\n return false;\r\n }\r\n }\r\n x = (int) (delta * (yTop - y1) + x1);\r\n if (x >= xLeft && x < xRight)\r\n {\r\n return true;\r\n }\r\n\r\n x = (int) (delta * (yTop - y1) + x1);\r\n if (x >= xLeft && x < xRight)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n }", "public void testContainsEdgeObjectObject( ) {\n init( );\n\n assertFalse( m_g1.containsEdge( m_v1, m_v2 ) );\n assertFalse( m_g1.containsEdge( m_v1, m_v1 ) );\n\n assertTrue( m_g2.containsEdge( m_v1, m_v2 ) );\n assertTrue( m_g2.containsEdge( m_v2, m_v1 ) );\n\n assertTrue( m_g3.containsEdge( m_v1, m_v2 ) );\n assertTrue( m_g3.containsEdge( m_v2, m_v1 ) );\n assertTrue( m_g3.containsEdge( m_v3, m_v2 ) );\n assertTrue( m_g3.containsEdge( m_v2, m_v3 ) );\n assertTrue( m_g3.containsEdge( m_v1, m_v3 ) );\n assertTrue( m_g3.containsEdge( m_v3, m_v1 ) );\n\n assertFalse( m_g4.containsEdge( m_v1, m_v4 ) );\n m_g4.addEdge( m_v1, m_v4 );\n assertTrue( m_g4.containsEdge( m_v1, m_v4 ) );\n\n assertFalse( m_g3.containsEdge( m_v4, m_v2 ) );\n assertFalse( m_g3.containsEdge( null, null ) );\n }", "boolean collideWithCoins(Coin c);", "@Override\r\n\tprotected boolean prerequisites() {\n\t\treturn _player1.getClient().getPlayer().getWrappedObject().getPosition()\r\n\t\t\t\t.equals(_player2.getClient().getPlayer().getWrappedObject().getPosition());\r\n\t}", "public boolean isSameAs(Move comp){ \n return this.xFrom==comp.xFrom &&\n this.xTo==comp.xTo &&\n this.yFrom==comp.yFrom &&\n this.yTo==comp.yTo;\n }", "@Override\r\n public boolean equals(Object obj) {\r\n if (obj instanceof PeptideHit) {\r\n return getSequence().equals(((PeptideHit) obj).getSequence());\r\n }\r\n return false;\r\n }", "@Override\r\n public boolean collision(org.dyn4j.dynamics.Body body1, BodyFixture fixture1, org.dyn4j.dynamics.Body body2, BodyFixture fixture2, Manifold manifold) {\r\n\r\n EntityId one = (EntityId) body1.getUserData();\r\n EntityId two = (EntityId) body2.getUserData();\r\n\r\n if (gravityState.isWormholeFixture(fixture1) || gravityState.isWormholeFixture(fixture2)) {\r\n return gravityState.collide(body1, fixture1, body2, fixture2, manifold, time.getTpf());\r\n }\r\n\r\n if (flagState.isFlag(one) || flagState.isFlag(two)) {\r\n return flagState.collide(body1, fixture1, body2, fixture2, manifold, time.getTpf());\r\n }\r\n\r\n return true; //Default, keep processing this event\r\n }", "public boolean checkIntersect(OWLClass class1, OWLClass class2) {\n return loader.areIntersecting(class1, class2);\n }", "public boolean cmp(Type other){\n if (this.dimension != other.dimension) return false;\n if (this.type != type.CLASS && this.type.equals(other.type)) return true;\n// System.out.println(\"this: \" + this.type);\n// System.out.println(\"other: \" + other.type);\n if (this.type == type.CLASS && other.type == type.CLASS && this.class_id.equals(other.class_id)) return true;\n return false;\n }" ]
[ "0.6848917", "0.6757454", "0.6430055", "0.6259333", "0.61742616", "0.616948", "0.61537343", "0.60876364", "0.6040841", "0.60305953", "0.6012751", "0.599565", "0.5972894", "0.59465367", "0.5906596", "0.5897785", "0.58936054", "0.5876105", "0.5852799", "0.584902", "0.58253783", "0.5773318", "0.57367516", "0.5719575", "0.57114327", "0.570861", "0.5699896", "0.56736916", "0.5645075", "0.5639451", "0.5639277", "0.5634906", "0.5630852", "0.56213295", "0.56185406", "0.56175554", "0.55952334", "0.5581126", "0.5555496", "0.554322", "0.5541641", "0.5536503", "0.5531464", "0.5530972", "0.55255985", "0.55218226", "0.55154216", "0.550157", "0.550098", "0.54994684", "0.5498925", "0.54981625", "0.54972446", "0.54804605", "0.5475025", "0.54734325", "0.546255", "0.5454024", "0.54509646", "0.5450854", "0.54504627", "0.5446486", "0.54376274", "0.5437265", "0.5435757", "0.5430335", "0.5428712", "0.54262805", "0.5421681", "0.54173714", "0.54157263", "0.54147357", "0.54106236", "0.54062074", "0.5405432", "0.5405375", "0.5400167", "0.5398293", "0.53879213", "0.53832436", "0.53740543", "0.53717846", "0.5365599", "0.5364909", "0.53615373", "0.5361391", "0.5357471", "0.535561", "0.5354163", "0.5341506", "0.5340338", "0.53364235", "0.5330314", "0.53300107", "0.53290915", "0.5328921", "0.53265977", "0.5323498", "0.5322466", "0.5319051" ]
0.729884
0
store the bullet of the boss constructor to create the boss
BossEnemy(){ super(); totallyDied = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }", "public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }", "public Boss() {\n\t\tlife = 3;\n\t\timage = new Image(\"/Model/boss3.png\", true);\n\t\tboss = new ImageView(image);\n\t\tRandom r = new Random();\n\t\tboss.setTranslateX(r.nextInt(900));\n\t\tboss.setTranslateY(0);\n\t\tisAlive = true;\n\t}", "private GameObject spawnBoss(LogicEngine in_logicEngine,LevelManager in_manager)\r\n\t{\n\t\tGameObject go = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/redcube.png\",in_logicEngine.SCREEN_WIDTH/2,LogicEngine.rect_Screen.getHeight()+50,0);\r\n\t\tboss = go;\r\n\t\t\r\n\t\tboss.i_animationFrameRow = 1;\r\n\t\tboss.i_animationFrame =0;\r\n\t\tboss.i_animationFrameSizeWidth =75;\r\n\t\tboss.i_animationFrameSizeHeight =93;\r\n\t\t\r\n\t\tboss.v.setMaxForce(1);\r\n\t\tboss.v.setMaxVel(5);\r\n\t\tboss.stepHandlers.add( new BounceOfScreenEdgesStep());\r\n\t\t\r\n\t\t\r\n\t\tboss_arrive.setAttribute(\"arrivedistance\", \"50\", null);\r\n\t\tboss.stepHandlers.add( new CustomBehaviourStep(boss_arrive));\r\n\t\tboss.isBoss = true;\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(boss, 150, 40, true,1);\r\n\t\t\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\tc.f_numberOfHitpoints = 200;\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t\tc.f_numberOfHitpoints = 250;\r\n\t\t\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\ti_bossBubbleEvery = 125;\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t\ti_bossBubbleEvery = 100;\r\n\t\t\r\n\t\t\r\n\t\tc.addHitpointBossBar(in_logicEngine);\r\n\t\tc.setExplosion(Utils.getBossExplosion(boss));\r\n\t\tboss.collisionHandler = c;\r\n\t\t\r\n\t\tboss.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t//initial velocity of first one \r\n\t\tboss.v.setVel(new Vector2d(0,-5));\r\n\t\t\r\n\t\tGameObject Tadpole1 = in_manager.spawnTadpole(in_logicEngine);\r\n\t\tGameObject Tadpole2 = in_manager.spawnTadpole(in_logicEngine);\r\n\t\t\r\n\t\tGameObject Bubble = null;\r\n\t\t\r\n\t\t\r\n\t\tBubble = spawnBossBubble(in_logicEngine, 0, 3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tTadpole1.v.setVel(new Vector2d(-10,5));\r\n\t\tTadpole2.v.setVel(new Vector2d(10,5));\r\n\t\tBubble.v.setVel(new Vector2d(0,-5));\r\n\t\t\r\n\t\tLaunchShipsStep l1 = new LaunchShipsStep(Tadpole1 , 50, 5, 1, false);\r\n\t\tLaunchShipsStep l2 = new LaunchShipsStep(Tadpole2, 50, 5, 1, true);\r\n\t\tLaunchShipsStep l3 = new LaunchShipsStep(Bubble, i_bossBubbleEvery, 1, 1, true);\r\n\t\tl1.b_addToBullets = true;\r\n\t\tl2.b_addToBullets = true;\r\n\t\t\r\n\t\tboss.stepHandlers.add(l1);\r\n\t\tboss.stepHandlers.add(l2);\r\n\t\tboss.stepHandlers.add(l3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\td_eye = new Drawable();\r\n\t\td_eye.i_animationFrameSizeHeight=8;\r\n\t\td_eye.i_animationFrameSizeWidth=8;\r\n\t\td_eye.i_animationFrameRow = 3;\r\n\t\td_eye.str_spritename = \"data/\"+GameRenderer.dpiFolder+\"/eye.png\";\r\n\t\t\r\n\t\tboss.visibleBuffs.add(d_eye);\r\n\t\t\r\n\t\treturn boss;\r\n\t}", "public Boss(String line, String ship, String explosion, Point pos){\r\n\t\tsuper(line,pos,ship,explosion);\r\n\t\tposition=pos;\r\n\t\tbossHb = new Health(600, 10);\r\n\t\tinPosition=false;\r\n\t}", "public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }", "public void new_boss(Boss newBoss){\n this.workerBoss = newBoss;\n }", "public DumbEnemy(){\n setImage(new GreenfootImage(SPRITE_W,SPRITE_H));\n }", "public Command(EpicBoss boss)\r\n\t{\r\n\t\teb = boss;\r\n\t}", "public BulletAddedEvent(Bullet b)\r\n {\r\n bull = b;\r\n }", "public EnemyGunBullet1() {\n super(DAMAGE, SPEED);\n setEnemyBullet(true);\n setShootSound(\"enemyShot.wav\");\n try {\n image = ImageIO.read(new File(\"res/images/tanks/bullets/enemyBullet1.png\"));\n }\n catch (IOException e) { }\n }", "public Bullet() {\n super();\n }", "Bullet(int posX,int posY,int velX,int velY,int classOfObejct,int attack){\n this.posX = posX;\n this.posY = posY;\n this.velX = velX;\n this.velY = velY;\n this.classOfObejct = classOfObejct;\n this.attack = attack;\n\n }", "public static void main(String[] args) {\n Hero hero1 = new Hero(500,30,\"Bob\");\n hero1.getInfo();\n\n\n\n\n\n\n Boss boss = new Boss(700,50,null);\n\n\n\n\n\n\n }", "Hero()\n\t{\n\t\t\n\t\tsuper(152,500,97,124);\n\t\tlife = 3;\n\t\tdoubleFire = 0;\n\t\t\n\t}", "private void createEnemy()\n {\n scorpion = new Enemy(\"Giant Scorpion\", 5, 10); \n rusch = new Enemy(\"Mr. Rusch\", 10, 1000);\n skeleton = new Enemy(\"Skeleton\", 10, 50);\n zombie = new Enemy(\"Zombie\", 12, 25);\n ghoul = new Enemy(\"Ghoul\", 15, 45);\n ghost = new Enemy(\"Ghost\", 400, 100);\n cthulu = new Enemy(\"Cthulu\", 10000000, 999999);\n concierge = new Enemy(\"Concierge\", 6, 100);\n wookie = new Enemy(\"Savage Wookie\", 100, 300);\n }", "@Override\n public Bullet getBullet() {\n return new EnemyGunBullet1();\n }", "public void fireBullet(){\n\t\tBullet bullet = new Bullet(ship);\n\t\tbullets.add(bullet);\n\t\tsoundMan.playBulletSound();\n\t}", "private GameObject spawnBossBubble(LogicEngine toRunIn, int i_level, int i_maxLevel)\r\n\t{\r\n\t\tfloat f_sizeMultiplier = 1 - ((float)i_level/(float)i_maxLevel);\r\n\t\t\r\n\t\tif(i_level == i_maxLevel)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t{\r\n\t\t\tGameObject go = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/redcube.png\",toRunIn.SCREEN_WIDTH/2,LogicEngine.rect_Screen.getHeight()+50,0);\r\n\t\t\tgo.i_animationFrameRow = 0;\r\n\t\t\tgo.i_animationFrame =1;\r\n\t\t\tgo.i_animationFrameSizeWidth =40;\r\n\t\t\tgo.i_animationFrameSizeHeight =37;\r\n\t\t\tgo.f_forceScaleX = 2f * f_sizeMultiplier;\r\n\t\t\tgo.f_forceScaleY = 2f * f_sizeMultiplier;\r\n\t\t\tgo.v.setMaxForce(1);\r\n\t\t\tgo.v.setMaxVel(5);\r\n\t\t\tgo.stepHandlers.add( new BounceOfScreenEdgesStep());\r\n\t\r\n\t\t\t\r\n\t\t\tgo.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\t//initial velocity of first one \r\n\t\t\tgo.v.setVel(new Vector2d(0,-5));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tgo.allegiance = GameObject.ALLEGIANCES.ENEMIES;\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//if is last one\r\n\t\t\tif(i_level == i_maxLevel - 1)\r\n\t\t\t{\r\n\t\t\t\tHitpointShipCollision collision = new HitpointShipCollision(go,1, 40.0 * f_sizeMultiplier);\r\n\t\t\t\tgo.collisionHandler = collision;\r\n\t\t\t\tcollision.setSimpleExplosion();\r\n\t\t\t\t\r\n\r\n\t\t\t\treturn go;\r\n\t\t\t}\r\n\t\t\telse //has children\r\n\t\t\t{\r\n\t\t\t\tSplitCollision collision = new SplitCollision(go,2, 15.0 * f_sizeMultiplier);\r\n\t\t\t\tcollision.setSimpleExplosion();\r\n\t\t\t\t\r\n\t\t\t\tgo.collisionHandler = collision;\r\n\t\t\t\t\r\n\t\t\t\t//add children\t\t\t\t\r\n\t\t\t\tfor(int i=0;i<4;i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tGameObject go2 = spawnBossBubble(toRunIn,i_level+1,i_maxLevel);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(i==0)\r\n\t\t\t\t\t\tgo2.v.setVel(new Vector2d(-5,-5));\r\n\t\t\t\t\tif(i==1)\r\n\t\t\t\t\t\tgo2.v.setVel(new Vector2d(5,-5));\r\n\t\t\t\t\tif(i==2)\r\n\t\t\t\t\t\tgo2.v.setVel(new Vector2d(-5,5));\r\n\t\t\t\t\tif(i==3)\r\n\t\t\t\t\t\tgo2.v.setVel(new Vector2d(5,5));\r\n\t\t\t\t\r\n\t\t\t\t\tcollision.splitObjects.add(go2);\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\treturn go;\t\t\r\n\t\t}\r\n\t}", "Boss(String imgPath, int x, int y, int hitPoints, Node player) {\n super(new ImageView(imgPath), x, y, hitPoints);\n\n this.getView().setTranslateX(x);\n this.getView().setTranslateY(y);\n this.defaultHp = hitPoints;\n this.isAlive = true;\n this.player = player;\n\n bossTimer = new AnimationTimer() {\n @Override\n public void handle(long now) {\n\n bossMove();\n\n }\n };\n bossTimer.start();\n }", "public void createBullet(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player != null) {\r\n Bullet bullet = new Bullet(x, y);\r\n bullet.player = name;\r\n playAudio(\"shoot\");\r\n }\r\n }", "public Missile(SimpleSlickGame _game, int x, int y, int destX, int destY, Entity owner) \r\n\t{\r\n\t\t//the super constructor is called to give the x and y coordinates and call the game to use its variable and \r\n\t\tsuper(_game, x,y);\r\n\t\tsetHitboxRadius(20); \r\n\t\tthis.startX = x;\r\n\t\tthis.startY = y;\r\n\t\tthis.owner = owner;\r\n\t\tthis.destX = destX;\r\n\t\tthis.destY = destY;\r\n\t\tsetLocation(startX, startY);\r\n\t\trecalculateVector(destX, destY);\r\n\t\t\r\n\t\t//Initializes and adds a particle system to the entity\r\n\t\ttry \r\n\t\t{\r\n\n\t\t\tImage particleImg = new Image (\"Particles/particle.png\");\r\n\n\t\t\tparticles = new ParticleSystem(particleImg,150);\r\n\t\t\t\r\n\n\t\t//\tFile xmlFile = new File (\"Particles/fire effect.xml\");\r\n\t\t//\temitter = ParticleIO.loadEmitter(xmlFile);\r\n\t\t\temitter = ParticleIO.loadEmitter(\"Particles/fire effect.xml\");\r\n\n\t\t\temitter.setPosition(this.getPositionX(), this.getPositionY(),false);\r\n\t\t\t\r\n\t\t\tparticles.addEmitter(emitter);\r\n\t\t\tparticles.setBlendingMode(ParticleSystem.BLEND_ADDITIVE);\r\n\t\t\t\r\n\t\t} catch (SlickException e1) {\r\n\t\t\tSystem.out.println(\"cannot find xml file / particle image\");\r\n\t\t\te1.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Cannot assign xml file to emitter. File might be missing.\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//Adds sound files to the entity\r\n\t\ttry\r\n\t\t{\r\n\t\t\tSound sound = new Sound(\"Sounds/lazer.wav\");\r\n\t\t\tfloat pitch = ((float)game.r.nextInt(200) + 800)/1000;\r\n\t\t\tsound.play(pitch,1f);\r\n\t\t} catch (SlickException e){\r\n\t\t\tSystem.out.println(\"Could not find sound file\");\r\n\t\t}\r\n\t\t\r\n\t\t//Adds sprites to the entity\r\n\t\ttry\r\n\t\t{\r\n\t\t\tmissileImg = new Image(\"Graphics/Fireball.png\");\r\n\t\t\tthis.setSprite(missileImg);\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"ERROR: Could not find sprite\");\r\n\t\t}\r\n\t}", "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }", "public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }", "public void placeAlienBullet() {\r\n\t\tif (alien != null) {\r\n\t\t\t// If the alien is large fires a bullet in a random direction\r\n\t\t\tif (alien.getSize() == 1 && ship != null) {\r\n\r\n\t\t\t\t// Create the alien bullet\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\r\n\t\t\t\t// give the alien bullet a random direction and the bullet speed velocity,\r\n\t\t\t\t// then add as participant\r\n\t\t\t\tdouble r = (2 * Math.PI) * RANDOM.nextDouble();\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, r);\r\n\t\t\t\taddParticipant(ab);\r\n\r\n\t\t\t\t// Sets the alien bullet to expire when it reaches the bullet duration time\r\n\t\t\t\t// limit\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\r\n\t\t\t// If the alien is small fires a bullet aimed directly at the ship\r\n\t\t\tif (alien.getSize() == 0 && ship != null) {\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\t\t\t\tab.setSpeed(BULLET_SPEED);\r\n\r\n\t\t\t\t// Aims the alien bullet directly at the ship\r\n\t\t\t\tdouble A = ship.getY() - alien.getY();\r\n\t\t\t\tdouble B = ship.getX() - alien.getX();\r\n\t\t\t\tdouble angle = Math.atan2(A, B);\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, angle);\r\n\r\n\t\t\t\t// Add the alien bullet as a participant and then set it to expire when it\r\n\t\t\t\t// reaches the bullet duration time limit\r\n\t\t\t\taddParticipant(ab);\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void dispara()\r\n {\r\n BulletEnemy bala = new BulletEnemy();\r\n getWorld().addObject(bala,getX(),getY()+25);\r\n }", "public Bomb(int x, int y) {\n\t\tsuper(x, y);\n\t\tthis.state = new Spawned();\n\t\tthis.visualStatus = new SimpleIntegerProperty(0);\n\t}", "public synchronized void spawnMe()\n\t{\n\t\t_itemInstance = ItemTable.getInstance().createItem(\"Combat\", _itemId, 1, null, null);\n\t\t_itemInstance.dropMe(null, _location.getX(), _location.getY(), _location.getZ());\n\t}", "public int useBomb(){\n //do harm while the animation start\n //cause harm to the boss\n println(\"BEFORE Main.boss.health: \"+Main.boss.health);\n int count = 0;\n if ((Main.boss.alive) && (Main.boss.posY != -1)){\n Main.boss.decreaseHealth(10);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n bossKilled = true;\n }\n }\n println(\"AFTER Main.boss.health: \"+Main.boss.health);\n //remove all bullets\n Main.boss.emptyBullets();\n //kill all the enemies\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n count ++;\n }\n // fill(0,0,0);\n // rect(0,0,width,height);\n return count;\n }", "public Bullet() {\n\t\t\n\t\tx = 0;\n\t\ty = 0;\n\t\timgBullet = new ImageIcon(getClass().getResource(\"lu.png\"));\n\t\twidth=imgBullet.getIconWidth();\n\t\theight=imgBullet.getIconHeight();\n\t\tshot = false;\n\t\n\t}", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "public Water_Hero(RefLinks refLink, float x, float y)\r\n {\r\n ///Apel al constructorului clasei de baza\r\n super(refLink, x,y, Character.DEFAULT_CREATURE_WIDTH, Character.DEFAULT_CREATURE_HEIGHT);\r\n\r\n ///Seteaza imaginea de start a eroului\r\n image = Assets.heroLeft;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea implicita(normala)\r\n normalBounds.x = 16;\r\n normalBounds.y = 16;\r\n normalBounds.width = 16;\r\n normalBounds.height = 32;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea de atac\r\n attackBounds.x = 10;\r\n attackBounds.y = 10;\r\n attackBounds.width = 38;\r\n attackBounds.height = 38;\r\n\r\n jumpingTimer = new Timer();\r\n\r\n lista_dinamic_element = new ArrayList<CollisionItem>();\r\n\r\n lista_static_element = new ArrayList<CollisionItem>();\r\n list_fire = new ArrayList<CollisionItem>();\r\n }", "public GameObject spawnBomber(LogicEngine in_logicEngine){\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bomber.png\",((float)LogicEngine.SCREEN_WIDTH)+50,LogicEngine.SCREEN_HEIGHT-50,0);\r\n\t\tship.i_animationFrameSizeHeight = 58;\r\n\t\tship.i_animationFrameSizeWidth = 58;\r\n\t\t\r\n\t\t//fly back and forth\r\n\t\tLoopWaypointsStep s = new LoopWaypointsStep();\r\n\t\ts.waypoints.add(new Point2d(-30,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\ts.waypoints.add(new Point2d(LogicEngine.SCREEN_WIDTH+50,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\t\r\n\t\tship.b_mirrorImageHorizontal = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(s);\r\n\t\tship.v.setMaxForce(5.0f);\r\n\t\tship.v.setMaxVel(5.0f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\r\n\r\n\t\t//tadpole bullets\r\n\t\tGameObject go_tadpole = this.spawnTadpole(in_logicEngine);\r\n\t\tgo_tadpole.stepHandlers.clear();\r\n\t\tFlyStraightStep fly = new FlyStraightStep(new Vector2d(0,-0.5f));\r\n\t\tfly.setIsAccelleration(true);\r\n\t\t\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t{\tgo_tadpole.v.setMaxVel(5);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\telse\r\n\t\t{\tgo_tadpole.v.setMaxVel(10);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\tgo_tadpole.stepHandlers.add(fly);\r\n\t\tgo_tadpole.v.setVel(new Vector2d(-2.5f,0f));\r\n\t\t\r\n\t\t\r\n\t\t//bounce on hard and medium\r\n\t\tif(Difficulty.isHard() || Difficulty.isMedium())\r\n\t\t{\r\n\t\t\tBounceOfScreenEdgesStep bounce = new BounceOfScreenEdgesStep();\r\n\t\t\tbounce.b_sidesOnly = true;\r\n\t\t\tgo_tadpole.stepHandlers.add(bounce);\r\n\t\t}\r\n\t\t\r\n\t\t//drop bombs\r\n\t\tLaunchShipsStep launch = new LaunchShipsStep(go_tadpole, 20, 5, 3, true);\r\n\t\tlaunch.b_addToBullets = true;\r\n\t\tlaunch.b_forceVelocityChangeBasedOnParentMirror = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(launch);\r\n\t\tship.rotateToV=true;\r\n\t\t\r\n\t\t//give it some hp\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 50, 50f);\r\n\t\tc.setSimpleExplosion();\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t\r\n\t}", "public UpBullet(CopyOnWriteArrayList<Slender> slender,CopyOnWriteArrayList<Slender> slender1,CopyOnWriteArrayList<Slender> slender2,Boss boss,CopyOnWriteArrayList<box> boxes, int x, int y,int width, int height, String img)\r\n\t{\r\n\t\tthis.slender = slender;\r\n\t\tthis.slender1 = slender1;\r\n\t\tthis.slender2 = slender2;\r\n\r\n\t\tthis.boss = boss;\r\n\r\n\t\tthis.boxes = boxes;\r\n\r\n\t\tcurrentx = x;\r\n\t\tcurrenty = y;\r\n\t\tthis.height = height;\r\n\t\tthis.width = width;\r\n\t\tthis.img = getImage(img);\r\n\t\tthis.rect = new Rectangle(x, y,width,height);\r\n\t}", "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "public Fortress(int x, int y) {\n super(x, y, tileNr, null);\n buildingType = 1;\n buildingImage = SpriteManager.instance.getBuildingSprite(\"Fortress1\");\n background = SpriteManager.instance.getBuildingSprite(\"Background\");\n height = width * buildingImage.getHeight() / buildingImage.getWidth();\n collider = new Rect(x,y-height,x+width,y);\n flag = new Flag();\n flagpole = BitmapFactory.decodeResource(GameView.instance.getResources(), R.drawable.flagpole);\n flagpole = Bitmap.createScaledBitmap(flagpole, tilesize, tilesize*2, false);\n\n BD.add(\"House\");\n BD.add(\"House\");\n BD.add(\"House\");\n BD.add(\"Farm\");\n BD.add(\"Farm\");\n BD.add(\"Farm\");\n BD.add(\"Farm\");\n\n\n Random r = new Random();\n x = r.nextInt();\n buildingType = 1;\n currentGold = 150;\n\n maxBuildings = 5;\n maxGold = 400;\n lv = 0;\n maxHealth = 1000;\n surrenderFear = 100;\n\n health = maxHealth;\n\n Farmers newFarmer = GameView.instance.npc_pool.spawnFarmers(x, (int) GameView.instance.groundLevel, this);\n }", "public Sheep()\n {\n super(\"Sheep\",3,2,0); \n \n // tagline = \"Whatever\";\n maxHealth = 5;\n currentHealth = maxHealth;\n equip(new Cloth());\n equip(new SheepClaws());\n \n \n \n engaged = false;\n aggression = 1;\n special = 0;\n hostileRange = 2;\n }", "@Override\r\n public void init(GameContainer gc) throws SlickException {\r\n\r\n \tbulletsToRemove = new ArrayList<Body>();\r\n \tbulletsToAdd = new ArrayList<Float[]>();\r\n \tbulletList = new ArrayList<Bullet>();\r\n \t\r\n \t//Set camera coordinates and size.\r\n viewport = new Rectangle(0, 0, 1024, 600);\r\n \r\n //Load our map. (Made in a program called TILED)\r\n map1 = new TiledMap(\"data/2.tmx\");\r\n \r\n \r\n //Create our World, enter a gravity (100 default, bullets have a gravity variable of this*0.05)\r\n Vec2 gravity = new Vec2(0, 100);\r\n world = new World(gravity);\r\n \r\n //Create 2 players.\r\n //Player 1\r\n player1 = new Player(5, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player1.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n //Player 2\r\n player2 = new Player(15, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player2.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n hpbar = new Image(\"data/healthbar.png\");\r\n \r\n //If we want multiplayer, connect to the server.\r\n if(multiplayer) {\r\n \t//Connecting to someone\r\n \tisHosting = false;\r\n \tmyPlayer = player2;\r\n \thisPlayer = player1;\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Connected to server\";\r\n }\r\n else {\r\n \t//Connecting to ourselfs\r\n \tisHosting = true;\r\n \tmyPlayer = player1;\r\n \thisPlayer = player2;\r\n \tnew BFServer(true);\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Local server online\";\r\n }\r\n \r\n //Set player2's friction to only about half of ours, this will reduce \"lag\" and simulate running better.\r\n FixtureDef fd = hisPlayer.getFixture();\r\n fd.friction = 2;\r\n hisPlayer.getBody().createFixture(fd);\r\n \r\n //Get collision layer from map\r\n int collisionLayerIndex = map1.getLayerIndex(\"collision\");\r\n\r\n //Create our collision blocks in the physics engine.\r\n for(int row=0; row<map1.getWidth(); row++) {\r\n \tfor(int col=0; col<map1.getHeight(); col++) {\r\n \t\tif(map1.getTileId(row, col, collisionLayerIndex)==1) {\r\n \t\t\tBodyDef groundBodyDef = new BodyDef();\r\n \t\t\tgroundBodyDef.position.set(row*2, col*2);\r\n \t\t\tBody groundBody = world.createBody(groundBodyDef);\r\n \t\t\tPolygonShape groundBox = new PolygonShape();\r\n \t\t\tgroundBox.setAsBox(1, 1, new Vec2(1, 1), 0);\r\n \t\t\tgroundBody.createFixture(groundBox, 0);\r\n \t\t}\r\n \t}\r\n }\r\n \r\n\r\n //Setup physics world\r\n timeStep = 1.0f/60.0f;\r\n velocityIterations = 6;\r\n positionIterations = 2;\r\n \r\n //Add a new collision listener to our world.\r\n world.setContactListener(new BFContactListener());\r\n \r\n //Add Keylistener to our GameContainer.\r\n gc.getInput().addKeyListener(keylistener);\r\n \r\n //Physics debug draw. (DEPRECATED. I'm using JBox2d-2.3.0 SNAPSHOT, this debugdraw hasn't been updated for it yet)\r\n \r\n //Slick2dDebugDraw sDD = new Slick2dDebugDraw(gc.getGraphics(), gc);\r\n //sDD.setFlags(0x0001); //Setting the debug draw flags, draw polygons, no joints.\r\n //world.setDebugDraw(sDD);\r\n }", "public void makeHero()\r\n { \r\n maxHealth = 100;\r\n health = maxHealth;\r\n }", "public Shooter() {\n fire1 = new Solenoid(1);\n fire2 = new Solenoid(4);\n returnValve = new Solenoid(3);\n latchSolenoid = new Solenoid(2);\n FFM = true;\n m_enabled = true;\n shooting = false;\n reloading = false;\n initShooter();\n }", "private void fire(GameEngine gameEngine) {\n Bullet bullet1 = gameEngine.getBulletEnemy();\n if (bullet1 == null) {\n return;\n }\n bullet1.init(this, positionX + imageWidth/2, positionY, 0);\n gameEngine.addGameObject(bullet1);\n gameEngine.playSound(1);\n }", "public Flame_Tank(int defx, int defy) {\n\t\tsuper(defx,defy);\n\t\twidth = 58;\n\t\theight = 31;\n\t\thitBox = new Rectangle(defx, defy, width, height); // fix this\n\t\txMaxSpeed = 0.3f;\n\t\tfriction = 0.01f;\n\t\tjumpStrength = 0.5f;\n\t\telasticity = 0.2f;\n\t\thp = 1000;\n\t\t\n\t\ttry {\n\t\t\tblank = new Image (\"res/blank.png\");\n\t\t\tft1 = new Image (\"res/Flare_Tank1.png\");\n\t\t\tft2 = new Image (\"res/Flare_Tank2.png\");\n\t\t\tftb1 = new Image (\"res/Flare_Tank_b1.png\");\n\t\t\tftb2 = new Image (\"res/Flare_Tank_b2.png\");\n\t\t\tftb3 = new Image (\"res/Flare_Tank_b3.png\");\n\t\t\tftb4 = new Image (\"res/Flare_Tank_b4.png\");\n\t\t} catch (SlickException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tftank[0] = ft1;\n\t\tftank[1] = ft2;\n\t\tftank[2] = ft2;\n\t\tftank[3] = ftb1;\n\t\tftank[4] = ftb2;\n\t\tftank[5] = ftb3;\n\t\tftank[6] = ftb4;\n\t\tftank[7] = blank;\n\t\tFlame_tank = new Animation(ftank,200,true);\n\t\t\n\t\tweapons.add(new Weapon(Weapon.getWeapons().get(7)));\n\t\tfor(Weapon w : weapons) {\n\t\t\tw.setEnemy(true);\n\t\t}\n\t\tcurrentWeapon = weapons.get(1);\n\t}", "@Override\n\tprotected void on_boss_death() {\n\n\t}", "public DwarfEnemy()\r\n\t{\r\n\t\tdamagePower = GameStatics.Enemies.Dwarf.damagePower;\r\n\t\tspeed = GameStatics.Enemies.Dwarf.speed;\r\n\t\thp = GameStatics.Enemies.Dwarf.initHp;\r\n\t}", "public BoardFactory(PacManSprites spriteStore) {Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\");this.sprites = spriteStore; Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\", \"689\");}", "public Bomb(int x, int y){\r\n\t\t\r\n\t\t//Bomb image.\r\n\t\tImageIcon bombIMG = new ImageIcon(\"src/sprites/bullet9.png\");\r\n\t\tsetImage(bombIMG.getImage());\r\n\t\t\r\n\t\t//It just so works out that the bombs drop nicely from the alien sprite so no offset is needed.\r\n\t\tsetx(x);\r\n\t\tsety(y);\r\n\t\t\r\n\t}", "public Charmander(World w)\n {\n //TODO (48): Add a third parameter of Fire to this super line\n super(700, 1);\n getImage().scale(150, 100);\n w.addObject( getHealthBar() , 300, w.getHeight() - 50 );\n }", "private void addEnemySheild() {\n this.enemyShield += 1;\n }", "public Melee(ScrGame game, Player player){\n super();\n this.game = game;\n this.player = player;\n isPlayer = true;\n\n nSpray = 0;\n nShotsPerFire = 1;\n nAmmo = 1;\n nAmmoMax = nAmmo;\n }", "public void bossReset(){\n bossTimer.start();\n this.getView().setTranslateX(x);\n this.getView().setTranslateY(y);\n this.getView().setRotate(0);\n bossTimer.start();\n setHitPoints(getDefaultHp());\n }", "private void createWarrior(String persoName, String persoImage, int persoLife, int attack) {\n\t\tpersoList.add(new Warrior(persoName, persoImage, persoLife, attack));\n\t}", "public Boat() {\n batch = new SpriteBatch();\n }", "@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tbatch = new SpriteBatch();\n\t\tcastle = new CastleScreen(this);\n\t\tsetScreen(new MainMenuScreen(this));\n\t}", "public ProjectGame() {\n\n super(\"BulletHell\", 1200, 900);\n die = new Event();\n backgroundMusic = new SoundManagerClass();\n playButton.setPositionX(420);\n playButton.setPositionY(180);\n quitButton.setPositionX(623);\n quitButton.setPositionY(181);\n //x = 0;\n reduceLife = new Event();\n fadeOutEvent = new Event();\n PickedUpEvent = new Event();\n die.setEventType(\"playerDeath\");\n fadeOutEvent.setEventType(\"FadeOut\");\n reduceLife.setEventType(\"Collision\");\n collidedEvent = new Event();\n collidedEvent.setEventType(\"CollidedEvent\");\n throwKnife = new Event();\n throwKnife.setEventType(\"throwKnife\");\n\n\n keyIcon.setPositionX(200);\n keyIcon.setPositionY(40);\n\n knifeIcon.setPositionX(205);\n knifeIcon.setPositionY(95);\n\n currentLevel = 0;//0 = base , 3=brigham's level\n\n\n PickedUpEvent.setEventType(\"CoinPickedUp\");\n\n this.addEventListener(myQuestManager, collidedEvent.getEventType());\n\n\n background.setScaleX(5);\n background.setScaleY(5);\n\n background.setScaleX(5);\n background.setScaleY(5);\n\n\n player = new Player(\"player\", \"resources/player_sheet.png\", \"idle_right\");\n player.setSpriteSheetJson(\"resources/player_sheet.json\");\n player.setDelay(100);\n\n player.getLifeArray().get(0).setPositionX(390);\n player.getLifeArray().get(0).setPositionY(40);\n player.getLifeArray().get(1).setPositionX(420);\n player.getLifeArray().get(1).setPositionY(40);\n player.getLifeArray().get(2).setPositionX(450);\n player.getLifeArray().get(2).setPositionY(40);\n // player.setHasPhysics(true);\n keyCount = 0;\n knifeCount = 4;\n // player.setHasPhysics(true);\n\n // platform.setPositionX(50);\n // platform.setPositionY(550);\n\n\n // platform1.setPositionX(150);\n // platform1.setPositionY(150);\n\n\n player.setPositionX(550);\n player.setPositionY(700);\n\n pressE = new Sprite(\"pressE\", \"pressE.png\");\n player.addChild(pressE);\n pressE.setPositionY(-50);\n\n\n coin.setPositionY(250);\n coin.setPositionX(660);\n\n findKey.setPositionX(500);\n findKey.setPositionY(-20);\n\n getToRoom.setPositionX(500);\n getToRoom.setPositionY(-20);\n\n killTurtle.setPositionX(500);\n killTurtle.setPositionY(-20);\n\n\n //Rectangle2D rect = new Rectangle2D.Float(600,400,700,500);\n //coverList = new ArrayList<Rectangle2D>(); //list of cover sprites\n //coverList.add(rect);\n\n ///////////////////////////////////////LEVEL 0 ////////////////////////////////////////////////////////////////\n\n if (currentLevel == 0) {\n\n tutorial = new TutorialLevel1(\"Tutorial\");\n tutorial.run();\n addChild(tutorial);\n\n myLevel = new Level0(\"Room1\");\n myLevel.run();\n addChild(myLevel);\n\n\n myLevel1 = new Level1(\"Room2\");\n myLevel1.run();\n myLevel1.hide();\n addChild(myLevel1);\n\n myLevel2 = new ahmedslevel(\"Room3\", player);\n myLevel2.run();\n myLevel2.hide();\n addChild(myLevel2);\n\n myLevel3 = new BrighamLevel(\"Room4\");\n myLevel3.run();\n myLevel3.hide();\n addChild(myLevel3);\n\n level4 = new AlternatingSpikesLevel(\"Room6\");\n level4.run();\n level4.hide();\n addChild(level4);\n\n bossLevel = new BossLevel(\"Room5\", player);\n bossLevel.run();\n bossLevel.hide();\n addChild(bossLevel);\n\n\n\n tutorial.mapDoorToRoom(0,myLevel);\n myLevel.mapDoorToRoom(0, myLevel1);\n myLevel1.mapDoorToRoom(0, myLevel2);\n myLevel2.mapDoorToRoom(0, myLevel3);\n myLevel3.mapDoorToRoom(0, level4);\n level4.mapDoorToRoom(0, bossLevel);\n //myLevel3.mapDoorToRoom(0,bossLevel);\n\n\n currentRoom = tutorial;\n\n //myLevel1.mapDoorToRoom(0,myLevel2);\n\n //myLevel2.run();\n //myLevel2.hide();\n\n\n //myLevel2.mapDoorToRoom(0,myLevel3);\n //myLevel3.run();\n //myLevel3.hide();\n currentQuestObjective = 0;\n\n }\n\n if (currentLevel == 4) {\n\n\n bossLevel = new BossLevel(\"Room4\", player);\n bossLevel.run();\n currentRoom = bossLevel;\n\n\n }\n\n enemies = currentRoom.enemies;\n pickpocketEnemy = null;\n\n transitionY = 615;\n transitionYCurrent = 615;\n\n\n backgroundMusic.playSoundEffect(\"resources/oceanOperator.wav\", 100);\n\n }", "public void createDeathBlock(HitListener ballrmv) {\n Block death = new Block(new Rectangle(new Point(0, 600), 800, 10), Color.DARK_GRAY);\n death.addHitListener(ballrmv);\n death.addToGame(this);\n death.setHitPoints(100);\n }", "public Hero(LogicController logicController, Vector2 vec){\n this.setWorld(logicController.getWorld());\n this.logicController=logicController;\n sprite = new Sprite();\n position=vec;\n booleanDefinition();\n resetCounters();\n this.bombs=new ArrayList<Bomb>();\n if(!logicController.getGame().getIsTest())\n heroAnimations();\n heroBody = new HeroBody(logicController, this,vec);\n if(!logicController.getGame().getIsTest()) {\n heroStandingTextureLoad();\n standRight.flip(true, false);\n sprite.setBounds(0, 0, 17*MyGame.PIXEL_TO_METER, 22*MyGame.PIXEL_TO_METER);\n }\n soundHurt= Gdx.audio.newSound(Gdx.files.internal(\"Sounds/hero_hurt.wav\"));\n soundDying= Gdx.audio.newSound(Gdx.files.internal(\"Sounds/hero_dying.wav\"));\n }", "public Blocks(int h)\n {\n health=h;\n worth=h;\n setImage(colors[health-1]);\n }", "public Bomb(){\n this.num_uses = 2147483647; // Constant set num times we can use this\n }", "@Override\n\tpublic void create () {\n\t\tmBatch = new SpriteBatch();\n mFont = new BitmapFont();\n\t\tmCamera = new OrthographicCamera();\n\t\tmCamera.setToOrtho(false, 800, 480); // Regardless of resolution, project screen onto 800 x 480 orthographic matrix\n\n\t\tmGameBackgrounds = new Texture[6]; // Six frames describing six states of damage to the castle, from pristine to broken\n\t\tmGameBackgrounds[0] = new Texture(\"castle_v1.png\");\n\t\tmGameBackgrounds[1] = new Texture(\"castle_v1_dam1.png\");\n\t\tmGameBackgrounds[2] = new Texture(\"castle_v1_dam2.png\");\n\t\tmGameBackgrounds[3] = new Texture(\"castle_v1_dam3.png\");\n\t\tmGameBackgrounds[4] = new Texture(\"castle_v1_dam4.png\");\n\t\tmGameBackgrounds[5] = new Texture(\"castle_v1_dam5.png\");\n\n\t\t// Assign value to list so it may be given objects to store\n\t\tmAttackers = new Attacker[ATTACKER_ARRAY_SIZE];\n\t\tmButtons = new DefenderButtons[7];\n\t\tmButtons[0] = new DefenderButtons(DefenderButtons.TYPE_NEW_GAME);\n\t\tmButtons[1] = new DefenderButtons(DefenderButtons.TYPE_RESUME_SAVED_GAME);\n\t\tmButtons[2] = new DefenderButtons(DefenderButtons.TYPE_PAUSE_GAME);\n\t\tmButtons[3] = new DefenderButtons(DefenderButtons.TYPE_RESUME_PAUSED_GAME);\n\t\tmButtons[4] = new DefenderButtons(DefenderButtons.TYPE_REPAIR_CASTLE);\n\t\tmButtons[5] = new DefenderButtons(DefenderButtons.TYPE_CONTINUE_NEXT_ROUND);\n\t\tmButtons[6] = new DefenderButtons(DefenderButtons.TYPE_SAVE_GAME);\n\n\t\tmButtons[0].setTexture(new Texture(\"button1.png\"));\n\t\tmButtons[1].setTexture(new Texture(\"button1.png\"));\n\t\tmButtons[2].setTexture(new Texture(\"button2.png\"));\n\t\tmButtons[3].setTexture(new Texture(\"button2.png\"));\n\t\tmButtons[4].setTexture(new Texture(\"button3.png\"));\n\t\tmButtons[5].setTexture(new Texture(\"button3.png\"));\n\t\tmButtons[6].setTexture(new Texture(\"button3.png\"));\n\n\t\t// Create the object that tracks the touch coordinates\n\t\tmLastTouch = new Vector3();\n\n // Assign value to miscellaneous game variables\n mRoundTimeElapsed = 0;\n mRoundMaxTime = 25f; // Counted in SECONDS\n\t\tmCastleMaxHealth = 1000f;\n mCastleHealth = mCastleMaxHealth; // Will last 1,000 frames if attacked by one single standard attacker constantly\n\t\tmCastleDamageStage = 0;\n mRoundScore = 0f;\n mTotalScore = 0f;\n mRoundNumber = 1;\n\t\tmGameState = STATE_PRE_GAME;\n\t\tmAttackerDelay = 0;\n mRoundMaxAttackers = 5;\n\t\tmRepairCost = 1000f;\n\t\tmLivingAttackerCount = 0;\n\t\tmKnightSpawnChance = 0.35f; // 35% chance to spawn a knight instead of normal under regular circumstances\n mPaused = false;\n\t\tmRoundSaved = false;\n mHealthText = \"Castle Strength: \" + mCastleHealth;\n mRoundScoreText = \"This Round Score: \" + mRoundScore;\n\t\tmTotalScoreText = \"Total Game Score: \" + mTotalScore;\n\t\tmGameTitle = \"Castle Defender\";\n\t\tmGameSavedText = \"Game Saved!\";\n\t\tmRoundText = \"Round :\" + mRoundNumber;\n\t\tmRandom = new Random();\n\t\t//TEMPORARY! Will change the logic later\n mSpawnTime = 100;\n\t\tmMonsterHouseSpawn = 10;\n\n\t\t// Pull out the normal attacker's frames through temporary objects\n\t\tTexture walkTexture = new Texture(\"attackerSheet.png\");\n\t\tTextureRegion[][] walkTempArray = TextureRegion.split(walkTexture, 64, 64);\n\t\tTextureRegion[] walkFrames = new TextureRegion[16];\n\n\t\tint index = 0; // Cut the animation's frames up using this temporary jagged array (8 by 2 matches the image file rows / cols)\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tfor (int j = 0; j < 8; j++) {\n\t\t\t\twalkFrames[index++] = walkTempArray[i][j];\n\t\t\t}\n\t\t}\n\n\t\tmStandardAttackerWalk = new Animation(0.055f, walkFrames);\n\n\t\t// Do the same process for the knight animations\n\t\tTexture knightWalk = new Texture(\"knight_sheet_walk.png\");\n\t\tTexture knightAttack = new Texture(\"knight_sheet_attack.png\");\n\n\t\tTextureRegion[][] knightWalkTemp = TextureRegion.split(knightWalk, 64, 128);\n\t\tTextureRegion[][] knightAtkTemp = TextureRegion.split(knightAttack, 64, 128);\n\n\t\tTextureRegion[] knightWalkFrames = new TextureRegion[8];\n\t\tTextureRegion[] knightAtkFrames = new TextureRegion[4];\n\n\t\tindex = 0;\n\t\tfor(int i = 0; i < 2; i++) {\n\t\t\tfor(int j = 0; j < 4; j++) {\n\t\t\t\tknightWalkFrames[index++] = knightWalkTemp[i][j];\n\t\t\t}\n\t\t}\n\n\t\tindex = 0;\n\t\tfor(int i = 0; i < 4; i++) {\n\t\t\tknightAtkFrames[index++] = knightAtkTemp[0][i];\n\t\t}\n\n\t\tmKnightAttackerAttack = new Animation(0.25f, knightAtkFrames);\n\t\tmKnightAttackerWalk = new Animation(0.125f, knightWalkFrames);\n\n\t\t// Populate the mAttackers array with 50 total attackers, 25 of each\n\t\tfor(int i = 0; i < ATTACKER_ARRAY_SIZE; i++){\n\t\t\t// Grab a walk speed between constant minimum and maximum\n\t\t\tfloat walkSpeed = mRandom.nextFloat() * MAX_SPEED_VARIANCE;\n\t\t\twalkSpeed += MIN_SPEED; // Ensures the speed is AT LEAST 60 \"units\"\n\t\t\t// Spawn at a random y coordinate starting at MIN_SPAWN_Y, varying by MAX_SPAWN_Y_VARIANCE\n\t\t\tfloat spawnY = mRandom.nextFloat() * MAX_SPAWN_Y_VARIANCE;\n\t\t\tspawnY += MIN_SPAWN_Y;\n\n\t\t\tif(i < ATTACKER_HALF_SIZE) {\n\t\t\t\t// The first half of the array are normal attackers\n\t\t\t\tmAttackers[i] = new Attacker(1f, walkSpeed, -100f, spawnY, 64f, 64f, \"normal\");\n\t\t\t\tmAttackers[i].addAnimation(mStandardAttackerWalk, \"walk\");\n\t\t\t} else {\n\t\t\t\t// The second half of the array are \"knight\" attackers\n\t\t\t\tmAttackers[i] = new Attacker(2f, walkSpeed * 0.75f, -100f, spawnY, 64f, 128f, \"knight\");\n\t\t\t\tmAttackers[i].addAnimation(mKnightAttackerWalk, \"walk\");\n\t\t\t\tmAttackers[i].addAnimation(mKnightAttackerAttack, \"attack\");\n\t\t\t}\n\t\t}\n\t}", "public Weapon(Player player)\n\t{\n\t\tthis.bullets=new ArrayList<Bullet>();\n\t\tthis.player=player;\n\t\tpause = cooldown;\n\t}", "private void createEnemyHelicopter()\n\t {\n\t \t\tRandNum = 0 + (int)(Math.random()*700);\n\t\t \t\tint xCoordinate = 1400;\n\t int yCoordinate = RandNum; \n\t eh = new Enemy(xCoordinate,yCoordinate);\n\t \n\t // Add created enemy to the list of enemies.\n\t EnemyList.add(eh);\n\t \n\t }", "public SniperEnemy()\n { \n scoreBoost = 15;\n moneyBoost = 300;\n healthPoints = 500; \n fireRate = 45; \n movementCounter = 20;\n movementMod = 20;\n }", "@Spawns(\"Background\")\r\n\tpublic Entity spawnEnemyBullet(SpawnData data) {\n\t\treturn Entities.builder().from(data).type(SpritesTypes.BACKGROUND).viewFromNode(FXGL.getAssetLoader().loadTexture(\"bg.png\"))\r\n\t\t\t\t.renderLayer(RenderLayer.BACKGROUND).build();\r\n\t}", "public Bomb(Position posn) {\n\t\tthis.posn = posn;\n\t\tthis.fuseLength = Bomb.DEFAULT_FUSE_LENGTH;\n\t\tthis.dropTime = System.nanoTime();\n\t\tthis.explode = false;\n\t}", "public Lunge() {\n super(SkillFactory.LUNGE, \"Lunge\", SkillDescription.lunge, 15, Pokemon.Type.BUG,\n SkillCategory.PHYSICAL, 100, 80, 1, 1.0);\n secondaryEffects.add(new AttackEffect(SecondaryEffect.Target.ENEMY, 1,\n SecondaryEffect.StatDirection.DECREASE));\n makesPhysicalContact = true;\n }", "public Bathroom(int size) {\n this.size = size;\n myBathtub = new Bathtub(100); //instantiate bathtub object during Bathroom object creation\n }", "public Bullet(int bulletsDamage, @NotNull String bulletsType, Coordinate centerPointCoordinate, double angle, TankTroubleMap tankTroubleMap, boolean isUserTank, int tankIndex) {\n this.isUserTank = isUserTank;\n this.tankIndex = tankIndex;\n this.centerPointCoordinate = centerPointCoordinate;\n updateArrayListCoordinates();\n bulletsBlasted = false;\n damage = bulletsDamage;\n this.tankTroubleMap = tankTroubleMap;\n if (bulletsType.equals(\"NORMAL\")) {\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/normal.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (bulletsType.equals(\"LASER\")) { // ba else nazadam yevakht khastim emtiazi ezafe konim ye golule\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/laser.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n this.angle = angle;\n\n fireTime = LocalDateTime.now();\n Thread thread = new Thread(() -> {\n try {\n Thread.sleep(4000);\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n\n }", "public Bomb(int Py, int Px, int ExpRds, Player player)\n {\n super(Py,Px);\n this.setEnable(true);\n this.m_Validity = 3; // 10 tick per seconds -> 3 seconds to explosion\n this.c_Player = player;\n this.setCollision(true);\n this.m_ExplosionRadius = ExpRds;\n }", "private void defineDeathBlock() {\r\n BallRemover removeBall = new BallRemover(this);\r\n Rectangle death = new Rectangle(new Point(0, HEIGHT), WITH, 10);\r\n Block deathRegion = new Block(death, Color.black,0);\r\n deathRegion.addHitListener(removeBall);\r\n deathRegion.addToGame(this);\r\n }", "Boat(String name)\n {\n this.name = name;\n speed = 0;\n sail = true;\n }", "public Enemy(Texture tex) \r\n\t{\r\n\t\tsuper(tex);\r\n\t\tm_type = \"enemy\";\r\n\t\tm_controller = new IAController();\r\n\t\tm_weapon = new AttackEmitter();\r\n\t\t\r\n\t\tm_lifeBar.setScale(new Vector2(0.3f,0.3f));\r\n\t\t\r\n\t\tm_speed = 50;\r\n\t\tm_life = 4;\r\n\t\t\r\n\t}", "public Program7()\n { \n _tc = new TravelingCreature( 200, 200 );\n }", "private void spawnBigEnemy(IEnemyService spawner, World world, GameData gameData) {\r\n if (spawner != null) {\r\n spawner.createBigEnemy(world, gameData, new Position(randomIntRange(1600, 3200), gameData.getGroundHeight()));\r\n spawner.createBigEnemy(world, gameData, new Position(randomIntRange(-600, -2000), gameData.getGroundHeight()));\r\n }\r\n }", "public BossEnemy(double xCoord, double yCoord){\r\n super(xCoord, yCoord, 0, 0, 40, 20, 100);\r\n velocity = 6;\r\n }", "public HealthyObject(String name, String des, int u, int p)\n \n {\n // initialisation des variables d'instance\n super(name, des, u);\n pointsHealthy = p;\n }", "public void levelBuilder() {\r\n\t\t//round 1\r\n\t\tEnemy[] round1Enemy = new Enemy[1];\r\n\t\tround1Enemy[0] = new Enemy();\r\n\t\t\tround1Enemy[0].type = 0;\r\n\t\t\tround1Enemy[0].imag = (MyFrame.refFrame).client.getOtherPlayer(0).getCardLeader().getCardImage();\r\n\t\t\tround1Enemy[0].position = new vec2(157, 0); \r\n\t\t\tround1Enemy[0].size = new vec2(185, 201); //X: 0~500 Y:250 lower\r\n\t\t\tround1Enemy[0].blood = (MyFrame.refFrame).client.getOtherPlayer(0).getHp();\r\n\t\t\tround1Enemy[0].currentBlood = (MyFrame.refFrame).client.getOtherPlayer(0).getHp();\r\n\t\t\tround1Enemy[0].attackCD = 0;\r\n\t\t\tround1Enemy[0].attack = 0;\r\n\t\t\tround1Enemy[0].initialCD = 0;\r\n\t\t\tround1Enemy[0].defense = 0;\r\n\t\t\t\r\n\t\tround[0].addEnemy(round1Enemy);\r\n\t}", "BossBar createBossBar(String title, float health, BossColor color, BossStyle style);", "public Bomb(int x, int y, Mouse mouse)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.mouse = mouse;\r\n\t\tdetonated = false;\r\n\t}", "public EnemySpawner(String mapName) {\n\n map = new Map(mapName);\n enemiesLeft = new int[]{0};\n }", "public SaboWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(counter, 100, 380); //Add the scoreboard\n addObject(healthBar, 300, 370); //Add the health bar\n addObject(turret, getWidth()/2-5, getHeight()-turret.getImage().getWidth()); \n }", "public BulletController(Bullet bullet) {\n this.bullet = bullet;\n rangeTimer = 0;\n }", "public void setBullet(Bullet _bul) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n bul = _bul;\n }", "public Banana(JComponent panel)\n {\n super(panel);\n isBomb = false;\n pointValue = 1;\n }", "Creature()\n {\n super();\n this.glyph = new Glyph('c', TextColor.ANSI.WHITE, TextColor.ANSI.BLACK);\n }", "public BossRoom() {\n\t\ttiles = new WorldTiles(width, height, width);\n\t\tbackground = new Sprite(SpriteList.BOSS_ROOM_BACKGROUND);\n\t}", "public void init(){\n hp = DEFAULT_MAX_HEALTH;\n bulletsFired = new ArrayList<>();\n initial_y = -1;\n\n //Sets the byte to identify the state of movement\n //For animation purposes in the renderer\n //0 = stationary\n //1 = jumping\n //2 = moving left\n //3 = jumping left\n //4 = right\n //5 = Jumping right\n //6 = crouching\n //8 = crouching left\n //10 = crouching right\n stateOfMovement = 0;\n }", "Enemy(Bitmap image) {\n super(image);\n }", "public Zombie() {\r\n\t\tsuper(myAnimationID, 0, 0, 60, 60);\r\n\t}", "@Override\n public void create () {\n batch = new SpriteBatch();\n height = Gdx.graphics.getHeight();\n width = Gdx.graphics.getWidth();\n\n bullets = new ArrayList<Bullet>();\n fondo = new Texture(\"background.png\");\n nave = new Texture(\"space-ship-24px.png\");\n\n spaceship = new SpaceShip();\n Enemy = new Enemy();\n //Enemy = new Sprite(nave);\n //spaceship.setPosition(348, 50);\n Enemy.setPosition(348, 300);\n System.out.println(x);\n }", "private void normal(EntityManager manager) {\r\n Shot shot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, forwardX * 30, forwardY * 30, 800, 0.65f, 1, 0, 1, true, 200, false);\r\n\r\n manager.addEntity(shot);\r\n manager.shotFired(0);\r\n }", "@Override\n public void init() {\n GetSprite(\"/images/bullet.png\");\n MusicUtils.StopASounds(\"/music/Laser_Shoot.wav\");\n Level().play(\"/music/Laser_Shoot.wav\");\n }", "public zombie_bg()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1010,900, 1); \n setPaintOrder(ScoreBoard.class, player.class, zomb_gen.class, options.class);\n populate();\n \n }", "Ground(Sprite sprite) {Collect.Hit(\"BoardFactory.java\",\"Ground(Sprite sprite)\");this.background = sprite; Collect.Hit(\"BoardFactory.java\",\"Ground(Sprite sprite)\", \"3015\");}", "public Torpedo(Board mygame, StarShip owner, int attack, StarShip target) {\n super(mygame, owner, attack);\n this.target = target;\n this.setSprite(\"torpedo\");\n }", "public void spawnNew() {\n\t\tif (tier> 1) {\n\t\t\ttier--;\n\t\t\thealth = tier;\n\t\t\tdamage = tier;\n\t\t\tspeed = 5;\n\t\t\timg = getImage(updateImage(tier)); // converted getImage to protected b/c it wasn't accessible by Balloon class (child class)\n\t\t}\n\t\telse {\n\t\t\tisAlive = false;\n\t\t\tdeletePath();\t\t\t\n\t\t}\n\t}", "private void GenerateBomb(){\n\t\t\n\t\t//Update for the bomb powerup\n\t\tint randGen = rand.nextInt((int)((float)BOMB_FREQUENCY * RANDOM_DEVIATION));\n\t\trandGen = (rand.nextBoolean()) ?-randGen :randGen;\n\t\t\n\n\t\t\n\t\tif(timeSinceLastSpawns.get(CollectibleType.Bomb.ordinal()).intValue() > (BOMB_FREQUENCY + randGen)){\n\t\t\t\n\n\t\t\ttimeSinceLastSpawns.set(CollectibleType.Bomb.ordinal(), 0);\n\t\t\t\n\t\t\t//SPAWN BOMB COLLECTIBLE HERE\n\t\t}\n\t}", "private void placeBullet(double x, double y) {\r\n\t\tb = new Bullet(x, y);\r\n\t\taddParticipant(b);\r\n\t\tb.setVelocity(BULLET_SPEED, ship.getRotation());\r\n\t\tnew ParticipantCountdownTimer(b, \"expire\", BULLET_DURATION);\r\n\t}", "Wall(Sprite sprite) {Collect.Hit(\"BoardFactory.java\",\"Wall(Sprite sprite)\");this.background = sprite; Collect.Hit(\"BoardFactory.java\",\"Wall(Sprite sprite)\", \"2420\");}", "@Override\n\tpublic Bullet shoot(int hx, int hy) {\n\t\treturn null;\n\t}" ]
[ "0.73028404", "0.71702445", "0.7100227", "0.70920354", "0.68482673", "0.668451", "0.63951844", "0.6361203", "0.63405216", "0.6317015", "0.6299075", "0.6262472", "0.62591785", "0.6222888", "0.6210654", "0.61768407", "0.6155832", "0.61297214", "0.6115249", "0.61057395", "0.6066593", "0.605227", "0.604521", "0.6045205", "0.6008691", "0.60080254", "0.6005359", "0.5994146", "0.5989395", "0.59886646", "0.59731495", "0.59669477", "0.5935228", "0.59347224", "0.5929486", "0.5893785", "0.5880886", "0.58648884", "0.58622813", "0.58615255", "0.58579993", "0.58416617", "0.5836552", "0.5830579", "0.5830285", "0.5787544", "0.5769457", "0.57576376", "0.5757418", "0.57529664", "0.57528335", "0.5751829", "0.57514197", "0.5740303", "0.57350963", "0.5727657", "0.5709781", "0.57000595", "0.5694437", "0.56868637", "0.5684248", "0.5672489", "0.5669864", "0.56675696", "0.5664387", "0.5663261", "0.56494313", "0.564271", "0.56394064", "0.56324875", "0.56282735", "0.5628047", "0.5626506", "0.5626236", "0.5625153", "0.5621506", "0.5613885", "0.56067127", "0.5600907", "0.5590534", "0.55885965", "0.558796", "0.5582401", "0.55813897", "0.55792814", "0.55782026", "0.55762625", "0.5574422", "0.5572095", "0.5567871", "0.5564068", "0.55635196", "0.5563466", "0.55624324", "0.5561375", "0.5556332", "0.55371445", "0.55282694", "0.55223954", "0.5519619" ]
0.7048296
4
update the position of the boss.
public void update(){ if (bossMoveTime > 10){ if(random(0,16) <= 8){ dir = 1; }else{ dir = -1; } velX *= dir; bossMoveTime = 0; } posY *= 0.8f; posX += velX; posY += velY; angle += 0.04f; bossMoveTime++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void moveBoss() {\n\t\tdouble position = boss.getTranslateY();\n\t\tspeed = Math.random()*30;\n\t\tif(position > 600-70) {\n\t\t\tRandom r = new Random();\n\t\t\tboss.setTranslateY(-6);\n\t\t\tboss.setTranslateX(r.nextInt(900));\n\t\t}else {\n\t\tboss.setTranslateY(position + speed);\n\t\t}\n\t}", "private void bossMove() {\n int radius = 150; // radius\n\n angle += 0.03;\n this.getView().setTranslateX((int)(x + radius*Math.cos(angle)));\n this.getView().setTranslateY((int)(y - radius*Math.sin(angle)));\n }", "public void updatePosition()\r\n\t{\r\n\t\tsuper.updatePosition();\r\n\t\t\r\n\t\t// Update the bomb's position\r\n\t\tPoint nextPosition = getPath().getLocation(t++);\r\n\t\tsetX(nextPosition.x + startX);\r\n\t\tint nextY = nextPosition.y + startY;\r\n\t\tsetY(nextY);\r\n\t\t\r\n\t\t// Blow the bomb up after it reaches mid screen\r\n\t\tif (t > 120 || (nextY < (Global.WINDOW_HEIGHT >> 1) && t > 30))\r\n\t\t{\r\n\t\t\tbombSound.stop();\r\n\t\t\tsuper.remove();\r\n\t\t\tGamePanel.makeExplosion(getX(), getY());\r\n\t\t\t\r\n\t\t\t// Injure all the enemies on the screen\r\n\t\t\t\r\n\t\t\tArrayList<Sprite> sprites = GamePanel.getSprites();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < sprites.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tif (sprites.get(i) instanceof Enemy)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy enemy = (Enemy) sprites.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t\tint currentYTop = GamePanel.getLevel().getCurrentY() +\r\n\t\t\t\t\t\tBLOCKS_PER_Y - 1;\r\n\t\t\t\t\tboolean visibleX = enemy.getX() + enemy.getWidth() >= 0 &&\r\n\t\t\t\t\t\tenemy.getX() <= Global.WINDOW_WIDTH;\r\n\t\t\t\t\tboolean yOnScreen = enemy.getY() <= Global.WINDOW_HEIGHT +\r\n\t\t\t\t\t\t100;\r\n\t\t\t\t\tboolean visibleY = enemy.getYBlock() >= currentYTop &&\r\n\t\t\t\t\t\tyOnScreen;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (visibleX && visibleY && enemy.isAlive())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tenemy.offsetHealth(-300);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (enemy.getHealth() <= 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tenemy.remove();\r\n\t\t\t\t\t\t\tGamePanel.offsetNumLevelPoints(100);\r\n\t\t\t\t\t\t\tGamePanel.makeExplosion(enemy.getX(), enemy.getY());\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}\r\n\t\t}\r\n\t}", "public void bossReset(){\n bossTimer.start();\n this.getView().setTranslateX(x);\n this.getView().setTranslateY(y);\n this.getView().setRotate(0);\n bossTimer.start();\n setHitPoints(getDefaultHp());\n }", "@Test\n\tpublic void testBossMovement() {\n\t\tEngine engine = new Engine(20);\n\t\tint x = engine.getMoveableObject(5).getX() + engine.getMoveableObject(5).getDisplacement().getXDisplacement();\n\t\tint y = engine.getMoveableObject(5).getY() + engine.getMoveableObject(5).getDisplacement().getYDisplacement();\n\t\tengine.update();\n\t\tassertEquals(\"failure - boss's next x coordinate is not correct\", x, engine.getMoveableObject(5).getX(), 0.0);\n\t\tassertEquals(\"failure - boss's next y coordinate is not correct\", y, engine.getMoveableObject(5).getY(), 0.0);\n\t}", "public void update() {\n\t\tVec2 newPos = calculatePos();\n\t\t/* energy bar */\n\t\tfloat newEnergy = actor.getEnergy();\n\t\tfloat maxEnergy = actor.getEnergyLimit();\n\t\tenergy.setPosition(newPos.getX(), newPos.getY() + paddingHealth / Application.s_Viewport.getX(), newEnergy,\n\t\t\t\tmaxEnergy);\n\t\t/* health bar */\n\t\tfloat newHealth = actor.getHealth();\n\t\tfloat maxHealth = actor.getHealthLimit();\n\t\thealth.setPosition(newPos.getX(), newPos.getY() + paddingEnergy / Application.s_Viewport.getX(), newHealth,\n\t\t\t\tmaxHealth);\n\t\t/* name label */\n\t\tplayerName.setPosition(newPos.getX(), newPos.getY() + paddingName / Application.s_Viewport.getY());\n\t}", "protected void updatePos()\r\n\t{\r\n\t\t// storing all birds of this flock into ArrayList\r\n\t\tArrayList<Bird> bird_list = new ArrayList<Bird>();\r\n\t\tbird_list = getFlock().getBirds();\r\n\t\tPosition currPos = getPos();\r\n\t\tdouble move_x=0,move_y=0,temp_x=0,temp_y=0,normal=0;\r\n\t\t// taking the current positions\r\n int x = currPos.getX();\r\n int y = currPos.getY();\r\n if (!isleader)\r\n\t\t{\r\n Position leader_pos = getFlock().getLeader().getPos();\r\n setTarget(leader_pos.getX(),leader_pos.getY());\r\n }\r\n\t\t// giving the target positions\r\n int x_target = getTarget().getX();\r\n int y_target = getTarget().getY();\r\n\t\t// if normal is zero give some initial value to normal\r\n\t\tnormal = Math.pow(Math.pow(y_target-y,2)+Math.pow(x_target-x,2),0.5);\r\n\t\tif(normal==0) normal = 10;\r\n\t\tmove_x = ((x_target-x)*getMaxSpeed())/normal;\r\n\t\tmove_y = ((y_target-y)*getMaxSpeed())/normal;\r\n\t\t// checking all other birds in the flock for avoiding collisions\r\n\t\tfor(Bird b:bird_list)\r\n\t\t{\r\n\t\t\ttemp_x = b.getPos().getX();\r\n\t\t\ttemp_y = b.getPos().getY();\r\n\t\t\tnormal = Math.pow(Math.pow(temp_x-x,2)+Math.pow(temp_y-y,2),0.5);\r\n\t\t\t// if distance between two birds is less than 2*maxSpeed,giving the bird\r\n\t\t\t// velocity in other direction and atlast taking resultant\r\n\t\t\tif(normal<2*(getMaxSpeed()+5) && normal!=0)\r\n\t\t\t{\r\n\t\t\t\tmove_x += ((x - temp_x)*getMaxSpeed())/normal;\r\n\t\t\t\tmove_y += ((y - temp_y)*getMaxSpeed())/normal;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// updating the position of the bird by avoiding collisions\r\n\t\tsetPos(x+(int)move_x, y+(int)move_y);\r\n\t}", "@Override\n public void update(float delta) {\n if (health>Boss.bossHealth * 0.75) phase = 1;\n if (health<=Boss.bossHealth * 0.75) phase = 2;\n if (health<=Boss.bossHealth * 0.5) phase = 3;\n if (health<=Boss.bossHealth * 0.25) phase = 4;\n updatePositions(delta);\n this.landmines.trimToSize();\n this.bulletArray.trimToSize();\n if (!this.isPositioned){\n this.positionSelf(delta);\n }else{\n if (phase == 1){\n moveSelf(delta);\n fireBullet(delta);\n shootLandmines(delta);\n }\n if (phase == 2){\n moveSelf(delta);\n fireBullet(delta);\n shootLandmines(delta);\n shootLaser(delta);\n }\n if (phase == 3){\n clearLaser();\n moveSelf(delta);\n shootLandmines(delta);\n spawnMinions(delta);\n }\n if (phase == 4){\n moveSelf(delta);\n fireBullet(delta);\n shootLandmines(delta);\n shootLaser(delta);\n spawnMinions(delta);\n }\n\n }\n\n }", "public void onUpdate()\n {\n super.onUpdate();\n\n if (!this.worldObj.isRemote && this.getBossHP() != this.health)\n {\n this.setBossHP();\n }\n }", "@Override\n\tpublic void updatePosition() {\n\t\t\n\t}", "private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }", "@Override\n\tpublic void update() {\n\t\tthis.setBounds(obstacle.getCoords().getX() * 64, obstacle.getCoords().getY() * 64, 64, 64);\n\t}", "public void change_hero_pos() {\n\t\tif (labirinto.getLab()[heroi.getX_coord()][heroi.getY_coord()] == 'O')\n\t\t\theroi.setShielded(true);\n\t\tif (heroi.isArmado())\n\t\t\tlabirinto.setLabCell(heroi.getX_coord(), heroi.getY_coord(), 'A');\n\t\telse\n\t\t\tlabirinto.setLabCell(heroi.getX_coord(), heroi.getY_coord(), 'H');\n\t}", "public void updatePosition() {\n \t\r\n \tx += dx;\r\n \ty += dy;\r\n \t\r\n\t}", "public void updatePosition(List<CollisionObject> collidables) {\n double start = 0;\n // If the boat does not need to regenerate stamina, then they accelerate\n if (!regen) {\n this.accelerate();\n // When stamina gets low, regen is set to true, meaning the boat will regenerate stamina\n if (stamina <= 0.2) {\n regen = true;\n }\n } else {\n //We calculate a random number here so that we can add some variety\n //to the AI boat's behaviour\n while (start <= 0.3 ) {\n start = Math.random();\n }\n if (stamina >= start ) {\n regen = false;\n }\n }\n this.check_turn(collidables);\n super.updatePosition();\n\n }", "@Override\n\tpublic void update() \n\t{\n\t\tPoint loc = getLocationCopy();\n\t\tEnemy c = game.findNearestEnemy(loc);\n\t\tif (c == null)\n\t\t\treturn;\n\t\t\n\t\tif(c.getLocation().distance(loc) < 100 && game.getFrameCount() % 30 == 0)\n\t\t{\n\t\t\tFlyingSalt s = new FlyingSalt(game, loc, \n\t\t\t\t\t\t\t\t\tc.getLocation().x - position.x,\n\t\t\t\t\t\t\t\t\tc.getLocation().y - position.y);\n\t\t\tgame.addAnimatable(s);\n\t\t}\n\t}", "public void boom() {\n\t\tboom.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = boom;\n\t}", "public void update(){\n\t\tthis.game.atacarZombies(this.x, this.y, this.damage, 1, false); //Misma fila\n\t\tthis.game.atacarZombies(this.x-1, this.y, this.damage, 1, false); //Fila arriba\n\t\tthis.game.atacarZombies(this.x+1, this.y, this.damage, 1, false); //Fila abajo\n\t\tthis.turno++;\n\t}", "void setEnemyPos(Point2D pos);", "public void update() {\n\t\t\n\t\t//System.out.println(this.observer);\n\t\t\n\t\tif(this.isCollidable == false){\n\t\t\tthis.x = -500;\n\t\t\tthis.y = -500;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (this.life < this.maxLife && !this.isDead()){\n\t\t\t\n\t\t\tif(recovery >= 1){\n\t\t\t\tthis.setLife(this.life + 1);\n\t\t\t\trecovery = 0;\n\t\t\t}\n\t\t\t\n\t\t\trecovery += 0.01;\n\t\t}\n\t\t\n\t\tsuper.update();\n\t\t\n\t\t//Shield movement\n\t\tInteger horizontalCorrection = (this.width - player.width)/2;\n\t\tInteger verticalCorrection = (this.height - player.height)/2;\n\n\t\t//Adjusting position player with force shield\n\t\tthis.x = player.x - horizontalCorrection;\n\t\tthis.y = player.y - verticalCorrection;\n\t}", "public void move() {\n\t\tsetHealth(getHealth() - 1);\n\t\t//status();\n\t\tint row = getPosition().getRow() ;\n\t\tint column = getPosition().getColumn();\n\t\tint randomInt = (int)((Math.random()*2) - 1);\n\t\t\n\t\tif(hunter == false && row < 33) {\n\t\t\tif(row == 32) {\n\t\t\t\tgetPosition().setCoordinates(row -1 , randomInt);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(row == 0) {\n\t\t\t\tgetPosition().setCoordinates(row + 1 , randomInt);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(column == 99) {\n\t\t\t\tgetPosition().setCoordinates(randomInt , column - 1);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(column == 0) {\n\t\t\t\tgetPosition().setCoordinates(randomInt , column + 1);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t}\n\t\tif(hunter == false && row > 32) {\n\t\t\t//setHealth(100);\n\t\t\tgetPosition().setCoordinates(row -1 , randomInt);\n\t\t\tsetPosition(getPosition()) ;\n\t\t}\n\t\telse {\n\t\t\tif(row < 65 && hunter == true) {\n\t\t\t\tgetPosition().setCoordinates(row + 1, column);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgetPosition().setCoordinates(65, column);\n\t\t\t\tsetPosition(getPosition());\n\t\t\t\t//Check if there is a gazelle\n\t\t\t\tPair [][] range = {{Drawer.pairs[row+1][column-1],Drawer.pairs[row+1][column],\n\t\t\t\t\t\t\t Drawer.pairs[row+1][column+1]}, {\n\t\t\t\t\t\t\t Drawer.pairs[row+2][column-1],\n\t\t\t\t\t\t\t Drawer.pairs[row+2][column],Drawer.pairs[row+2][column+1]}};\n\t\t\t\t\n\t\t\t\tfor(Pair [] line: range) {\n\t\t\t\t\tfor(Pair prey: line) {\n\t\t\t\t\t\tif(prey.getAnimal() instanceof Gazelle ) {\n\t\t\t\t\t\t\tattack();\n\t\t\t\t\t\t\tprey.getAnimal().die();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tcontinue;\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}", "private GameObject spawnBoss(LogicEngine in_logicEngine,LevelManager in_manager)\r\n\t{\n\t\tGameObject go = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/redcube.png\",in_logicEngine.SCREEN_WIDTH/2,LogicEngine.rect_Screen.getHeight()+50,0);\r\n\t\tboss = go;\r\n\t\t\r\n\t\tboss.i_animationFrameRow = 1;\r\n\t\tboss.i_animationFrame =0;\r\n\t\tboss.i_animationFrameSizeWidth =75;\r\n\t\tboss.i_animationFrameSizeHeight =93;\r\n\t\t\r\n\t\tboss.v.setMaxForce(1);\r\n\t\tboss.v.setMaxVel(5);\r\n\t\tboss.stepHandlers.add( new BounceOfScreenEdgesStep());\r\n\t\t\r\n\t\t\r\n\t\tboss_arrive.setAttribute(\"arrivedistance\", \"50\", null);\r\n\t\tboss.stepHandlers.add( new CustomBehaviourStep(boss_arrive));\r\n\t\tboss.isBoss = true;\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(boss, 150, 40, true,1);\r\n\t\t\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\tc.f_numberOfHitpoints = 200;\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t\tc.f_numberOfHitpoints = 250;\r\n\t\t\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\ti_bossBubbleEvery = 125;\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t\ti_bossBubbleEvery = 100;\r\n\t\t\r\n\t\t\r\n\t\tc.addHitpointBossBar(in_logicEngine);\r\n\t\tc.setExplosion(Utils.getBossExplosion(boss));\r\n\t\tboss.collisionHandler = c;\r\n\t\t\r\n\t\tboss.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t//initial velocity of first one \r\n\t\tboss.v.setVel(new Vector2d(0,-5));\r\n\t\t\r\n\t\tGameObject Tadpole1 = in_manager.spawnTadpole(in_logicEngine);\r\n\t\tGameObject Tadpole2 = in_manager.spawnTadpole(in_logicEngine);\r\n\t\t\r\n\t\tGameObject Bubble = null;\r\n\t\t\r\n\t\t\r\n\t\tBubble = spawnBossBubble(in_logicEngine, 0, 3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tTadpole1.v.setVel(new Vector2d(-10,5));\r\n\t\tTadpole2.v.setVel(new Vector2d(10,5));\r\n\t\tBubble.v.setVel(new Vector2d(0,-5));\r\n\t\t\r\n\t\tLaunchShipsStep l1 = new LaunchShipsStep(Tadpole1 , 50, 5, 1, false);\r\n\t\tLaunchShipsStep l2 = new LaunchShipsStep(Tadpole2, 50, 5, 1, true);\r\n\t\tLaunchShipsStep l3 = new LaunchShipsStep(Bubble, i_bossBubbleEvery, 1, 1, true);\r\n\t\tl1.b_addToBullets = true;\r\n\t\tl2.b_addToBullets = true;\r\n\t\t\r\n\t\tboss.stepHandlers.add(l1);\r\n\t\tboss.stepHandlers.add(l2);\r\n\t\tboss.stepHandlers.add(l3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\td_eye = new Drawable();\r\n\t\td_eye.i_animationFrameSizeHeight=8;\r\n\t\td_eye.i_animationFrameSizeWidth=8;\r\n\t\td_eye.i_animationFrameRow = 3;\r\n\t\td_eye.str_spritename = \"data/\"+GameRenderer.dpiFolder+\"/eye.png\";\r\n\t\t\r\n\t\tboss.visibleBuffs.add(d_eye);\r\n\t\t\r\n\t\treturn boss;\r\n\t}", "@Override\n public void update(int timeModifier) {\n // Check if a bomb can be dropped and if the plane is still within the game window\n bombDropper.update(timeModifier);\n if (bombDropper.shouldRelease() && isInGameWindow()){\n justDropped = true;\n bombs.add(new Bomb(currPos, parentLevel));\n }\n\n // if we just dropped a bomb, reset the timer to a new random value\n if (justDropped){\n int dropTime = ThreadLocalRandom.current().nextInt(DROP_TIME_LOWER_BOUND, DROP_TIME_UPPER_BOUND + 1);\n bombDropper.setNewTime(dropTime);\n justDropped = false;\n }\n\n // Update all current bombs\n ArrayList<Bomb> bombsToRemove = new ArrayList<>();\n for (Bomb bomb : bombs){\n bomb.update(timeModifier);\n if (bomb.isFinished()){\n bombsToRemove.add(bomb);\n }\n }\n // Remove all finished bombs\n for (Bomb bomb : bombsToRemove){\n bombs.remove(bomb);\n }\n\n // update the current position\n if (flyingHorizontally) {\n double newX = currPos.x + PLANE_SPEED * timeModifier;\n currPos = new Point(newX, currPos.y);\n }\n else {\n double newY = currPos.y + PLANE_SPEED * timeModifier;\n currPos = new Point(currPos.x, newY);\n }\n\n // if the plane has moved outside the window, and has no remaining\n // bombs, it no longer needs to be updated\n if (!isInGameWindow() && bombs.size() == 0){\n isFinished = true;\n }\n render();\n\n }", "void updatePosition() {\n\t\t\n\t\tcoords.x = body.getPosition().x*Simulation.meterToPixel;\n\t\tcoords.y = body.getPosition().y*Simulation.meterToPixel;\n\t\tspeed.x = body.m_linearVelocity.x;\n\t\tspeed.y = body.m_linearVelocity.y;\n\t}", "@Override\n\tpublic void update(){\n\t\tif(right && !left)\n\t\t{\n\t\t\tif(player1.getX() < cm.getGameStateManager().getWidth() - player1.getBounds().getWidth())\n\t\t\t\tplayer1.setX(player1.getX()+8);\n\t\t}\n\t\tif(!right && left)\n\t\t{\n\t\t\tif(player1.getX() > 0)\n\t\t\t\tplayer1.setX(player1.getX()-8);\n\t\t}\n\t\t\n\t\tcheckBarrelBounds();\n\t\ttry{\n\t\t\tcheckPlayerCollision();\t\t\n\t\t\trefreshData();\n\t\t}catch(IOException e){\n\t\t\tSystem.err.println(\"no connection with server\");\n\t\t}\n\t\tplayer1.update();\n\t\tplayer2.update();\n\t\tplayerIndication.update();\n\t}", "@Override\n\tpublic void update() {\n\t\tmove();\n\t\tplace();\n\t}", "private void updatePos() {\n var ballBounds = ball.getMesh().getRelativeRectangleBounds().getBounds2D();\n var hookBallBounds = hook.getHookBall().getMesh().getRelativeRectangleBounds().getBounds2D();\n var ballCenter = new Vector2(ballBounds.getCenterX(), ballBounds.getCenterY());\n var hookBallCenter = new Vector2(hookBallBounds.getCenterX(), hookBallBounds.getCenterY());\n fullDirection = hookBallCenter.subtracted(ballCenter);\n var oposDir = ballCenter.subtracted(hookBallCenter).normalized();\n oposDir.multiplyBy(hookBallBounds.getWidth() / 2);\n hookBallCenter.add(oposDir);\n direction = hookBallCenter.subtracted(ballCenter);\n getTransform().setPosition(ballCenter);\n getTransform().setRotation(GeometryHelper.vectorToAngle(hookBallCenter.subtracted(ballCenter)));\n getTransform().translate(0, -GameSettings.ROPE_HEIGHT / 2 - 1);\n }", "@Override\n\tpublic void update() {\n\t\tposX -= ninja.getSpeedX();\n\t\t\n\t}", "public void update() {\n remHpWidth = healthbarWidth * ent.getCurrentHealth() / ent.getMaxHealth();\n lostHpWidth = healthbarWidth - remHpWidth;\n }", "public void update(){\n\t\tupdatePlayerPosition();\n\t\thandleCollisions();\n\t}", "@Override\n\tpublic void posModify() {\n\t\t\n\t}", "@Override\n\tpublic void posModify() {\n\t\t\n\t}", "public Boss(String line, String ship, String explosion, Point pos){\r\n\t\tsuper(line,pos,ship,explosion);\r\n\t\tposition=pos;\r\n\t\tbossHb = new Health(600, 10);\r\n\t\tinPosition=false;\r\n\t}", "protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}", "public void update(){\n if (boatStats.getSpeed() > 0){\n boatStats.setSpeed(boatStats.getSpeed() - boatStats.getDeceleration());\n boatPosition.setPosY(boatPosition.getPosY() + boatStats.getSpeed());\n } else {\n boatStats.setSpeed(0);\n }\n }", "@Override\n public void update(){\n getNextPosition();\n checkTileMapCollision();\n setPosition(xtemp, ytemp);\n animation.update();\n }", "public void bomb() {\n\t\tbomb.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = bomb;\n\t}", "@Override\n public void update(double millis) throws InvalidDataException {\n myMovable.update(millis);\n }", "public void updatePosition(int xPos, int yPos) {\n this.pos.x = xPos;\n this.pos.y = yPos;\n }", "public void setPosition(Position pos) {\n \tthis.position = pos;\n \t//setGrade();\n }", "private void updatePosition (Coordinate newPosition) {\n centerX = newPosition.x;\n centerY = newPosition.y;\n\n atomSpriteBoundary.left = centerX - spriteLength/2;\n atomSpriteBoundary.right = centerX + spriteLength/2;\n atomSpriteBoundary.top = centerY - spriteHeight/2;\n atomSpriteBoundary.bottom = centerY + spriteHeight/2;\n }", "public void updatePosition(int y, int x){\r\n\t\tposition = owner.getPosition().add(new Vector(x*SIZE, y*SIZE));\r\n\t\tcenter = this.position.add(new Vector(SIZE/2.,SIZE/2.));\r\n\t\tnode = new Node(center, y*owner.C + x);\r\n\t}", "@Override\r\n\tpublic void move()\r\n\t{\r\n\t\t//Updates the X and Y position by using dx and dy\r\n float x = location.getX() + dx;\r\n float y = location.getY() + dy;\r\n \r\n //Updates the particle emitter's position to the missiles current position\r\n emitter.setPosition(this.getPositionX(), this.getPositionY(),false);\r\n \r\n //Updates the location of the missile\n setLocation(x, y);\n\t}", "public void new_boss(Boss newBoss){\n this.workerBoss = newBoss;\n }", "Boss(String imgPath, int x, int y, int hitPoints, Node player) {\n super(new ImageView(imgPath), x, y, hitPoints);\n\n this.getView().setTranslateX(x);\n this.getView().setTranslateY(y);\n this.defaultHp = hitPoints;\n this.isAlive = true;\n this.player = player;\n\n bossTimer = new AnimationTimer() {\n @Override\n public void handle(long now) {\n\n bossMove();\n\n }\n };\n bossTimer.start();\n }", "public void update() {\n if (!outOfBounds()) {\n super.move(dirVec.mul(ShadowDefend.getTimescale() * speed));\n }\n super.update();\n }", "public void update(long delta){\n \n if(placement <= -1000){\n placement = zPosition;\n }\n placement -= 5;\n \n \n }", "public void change_sword_pos() {\n\t\tif (!heroi.isArmado())\n\t\t\tlabirinto.setLabCell(espada.getX_coord(), espada.getY_coord(), 'E');\n\t}", "public void attack() {\n\t\t\n\t\tint row = getPosition().getRow();\n\t\tint column = getPosition().getColumn();\n\t\t\n\t\tgetPosition().setCoordinates(row + 1, column);\n\t\tsetPosition(getPosition()) ;\n\t\t// restore health\n\t\tsetHealth(100);\n\t\t// end hunter mode\n\t\tthis.hunter = false;\n\t\t\n\t}", "private void updatePosition() {\n position.add(deltaPosition);\n Vector2[] points = getRotatedPoints();\n\n for (Vector2 point : points) {\n if (point.getX() < bound.getX() || point.getX() > bound.getX() + bound.getWidth()) { //If the point is outside of the bounds because of X\n position.addX(-deltaPosition.getX() * 2); //Undo the move so it is back in bounds\n deltaPosition.setX(-deltaPosition.getX()); //Make the direction it is going bounce to the other direction\n break;\n }\n if (point.getY() < bound.getY() || point.getY() > bound.getY() + bound.getHeight()) { //If the point is outside of the bounds because of Y\n position.addY(-deltaPosition.getY() * 2); //Undo the move so it is back in bounds\n deltaPosition.setY(-deltaPosition.getY()); //Make the direction it is going bounce to the other direction\n break;\n }\n }\n deltaPosition.scale(.98);\n }", "public void onLivingUpdate() {\n if (!this.onGround && this.motionY < 0.0D)\n this.motionY *= 0.6D;\n\n\n if (this.ticksExisted % 20 == 0 && this.getHealth() != this.getMaxHealth() && this.getHealth() >= 1)\n this.setHealth(this.getHealth() + 1);\n\n if (worldObj.isRemote) {\n if (this.isSitting())\n worldObj.spawnParticle(EnumParticleTypes.REDSTONE, posX, posY + 1.5, posZ, 0, 0, 0);\n }\n\n if (worldObj.isRemote) {\n MoWitchAndWizard.proxy.spawnParticles(\"air_normal\", this);\n }\n\n super.onLivingUpdate();\n }", "public void updateSprites() {\n this.model.getSprites().values().forEach(x -> x.setPosition(this.x, this.y));\n }", "public void updatePosition() {\n\n this.x = this.temp_x;\n this.y = this.temp_y;\n this.ax = 0;\n this.ay = 0;\n\t\tthis.axplusone = 0;\n this.ayplusone = 0;\n \n }", "@Test\n\tpublic void kickBombTestAndStopCase() {\n\t\tEntity anEntity = createDropperEntity();\n\t\tBombDropper bombDropper = (BombDropper) entityManager.getComponent(BombDropper.class, anEntity.getEntityId());\n\t\t\n\t\tkickSystem = new KickSystem();\n\t\tbombSystem = new BombSystem(entityManager);\n\t\t\n\t\tentityManager.update(anEntity);\n\t\t\n\t\tbombSystem.verifyAndDropBomb(bombDropper);\n\t\t\n\t\tkickSystem.update(); // ?? \n\t\t\n\t\tPosition dropperPlacement = (Position) entityManager.getComponent(Position.class, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbombDropper.getEntityId());\n\t\t\n\t\tassertEquals(dropperPlacement.getCellX(), dropperPlacement.getCellX() + 4); // +4 ??\n\t}", "public void setPosition(Position pos);", "public void updateStats( ) {\r\n\t\tperseverance = owner.perseverance;\r\n\t\tobservation = owner.observation;\r\n\t\tintellect = owner.intellect;\r\n\t\tnegotiation = owner.negotiation;\r\n\t\ttact = owner.tact;\r\n\t\tstrength = owner.strength;\r\n\r\n\t\txCoord = owner.xCoord;\r\n\t\tyCoord = owner.yCoord;\r\n\r\n\t\tmaxHealth = 2400 + ( perseverance * 200 );\r\n\r\n\t\thealth = maxHealth;\r\n\r\n\t\tsetDamages( );\r\n\t}", "public void moveBomber(){\n\t\t\t\n\t\t\tif (startredtimer) redtimer++;\n\t\t\tif (redtimer > 5) {\n\t\t\t\tredtimer = 0;\n\t\t\t\tstartredtimer = false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif (rand.nextInt(21) == 20){ //controls the switching of directions\n\t\t\t\tif (direction == 1) direction = 0;\n\t\t\t\telse if (direction == 0) direction = 1;\n\t\t\t}\n\t\t\tif (direction == 1){ //actually moves the plain\n\t\t\t\tx += 10;\n\t\t\t\tr = true;\n\t\t\t}\n\t\t\telse if (direction == 0){\n\t\t\t\tx -= 10;\n\t\t\t\tr = false;\n\t\t\t}\n\t\t\t\n\t\t\tif (x <= 0) x = 992; //handles the ofscrean plane\n\t\t\telse if ( x >= 992) x = 0;\n\t\t\t\n\t\t\tthis.setBounds(x,y,100,50); //updates the bounds\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void update(Player unitPlayer, double dX, double dY) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tthis.setXPos(this.getXPos()+dX);\r\n\t\tthis.setYPos(this.getYPos()+dY);\r\n\t\t\r\n\t\tifAttackedByPlayer(unitPlayer);\r\n\t\tattackPlayer(unitPlayer);\r\n\t\tcheckHealth(unitPlayer);\r\n\t}", "@Override\n public void update(float delta) {\n for (Map.Entry<Integer, IComponent> kv : _affectedComponents.get(0).entrySet()) {\n int id = kv.getKey();\n SpriteComponent sprite = (SpriteComponent) kv.getValue();\n PositionComponent position = (PositionComponent) _affectedComponents.get(1).get(id);\n sprite.setPosition(position.getX(), position.getY());\n }\n }", "private void placeBomb(int x, int y, int newValue) {\n setCell(x, y, newValue); // a: Turns this cell into a bomb\n ++bombsPlaced; // b: increments bombs placed\n GridHelper.oneUpAll(x, y, hiddenGrid); // b: Increments all cells surrounding the new bomb\n }", "public void update(int x,int y,Card card);", "void setPosition(Position p);", "public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }", "@Override\n public void run() {\n for(MessageManager temp : plugin.playerBossBars.values()){\n if(temp.bossBar.getPlayers().size() > 0){\n temp.advanceBar();\n\n BossBarMessage currentMessage = temp.getCurrentMessageObject();\n temp.bossBar.setTitle(currentMessage.barMessage);\n temp.bossBar.setColor(currentMessage.barColor);\n temp.bossBar.setStyle(currentMessage.barStyle);\n }\n }\n }", "void setPos(float x, float y);", "void setPosition(double xPos, double yPos);", "public void Obstaclemove() {\n for (int i = 0; i < getNumberObstacles(); i++) {\n if (ObstacleDeplace.class.isInstance(getObstacle()[i])) {\n getObstacle()[i].setX(getObstacle()[i].getX() - getObstacle()[i].getSpeed());\n\n if (getObstacle()[i].getX() < -200) {\n getObstacle()[i].setX(600);\n getObstacle()[i].setSpeed(randomGenerator.nextFloat());\n }\n }\n setChanged();\n notifyObstacle(i, getObstacle()[i].getX(), getObstacle()[i].getY());\n }\n }", "public void update(){\r\n\t\t\r\n\t}", "public void updateFrame() {\n if (level != null) {\n for (GameEntity entity : entities) entity.update(this);\n pacman.update(this);\n checkCollisions();\n }\n }", "@Override\r\n\tpublic void update(int[] dice, int pos, int balance, String playerName) {\r\n\t\t// Updating dice values\r\n\t\tGUI.setDice(dice[0], dice[1]);\r\n\t\t// Updating active player balance\r\n\t\tGUI.setBalance(playerName, balance);\r\n\t\t// Removing players current car\r\n\t\tGUI.removeAllCars(playerName);\r\n\t\t// Adding player car at updated position\r\n\t\tGUI.setCar(pos+1, playerName);\t\r\n\t}", "void setPosition(Position position);", "void setPosition(Position position);", "@Override\n\tpublic void posModify() {\n\t\tgetEntityManager().refresh(instance);\n\t\tcambiarTipoCuenta(instance);\n\t\tgetEntityManager().flush();\n\t\tgetEntityManager().refresh(instance);\n\t\tresultList = null;\n\t\trootNode = null;\n\t}", "public void update() {\n\t\tthis.set(owner.getX(), owner.getY(), owner.getX() + length*(float)Math.cos(angle),\n\t\t\t\towner.getY() + length*(float)Math.sin(angle));\n\t}", "@Override\r\n\tpublic void updatePosition(int id, float[] pos) {\n\r\n\t}", "public void updatePosition(int xPos, int yPos, Port.PortName newPort) {\n this.pos.x = xPos;\n this.pos.y = yPos;\n this.currentPort = newPort;\n }", "public void setPosition(Point newPosition);", "@Override\n\tpublic void update() {\n\t\tif(isSaveScore()){\n\t\t\tsaveScore();\n\t\t\tmanager.reconstruct();\n\t\t}\n\t\tmanager.move();\n\t}", "public void chasePlayer() {\n refreshObstructionMatrix();\n Coordinate currPosition = new Coordinate(getX(), getY());\n Player player = this.dungeon.getPlayer();\n Coordinate playerPosition = new Coordinate(player.getX(), player.getY());\n\n if (currPosition.equals(playerPosition)) {\n // Debug.printC(\"Enemy has reached the player!\", Debug.RED);\n player.useItem(this);\n } else {\n this.pathToDest = pathFinder.getPathToDest(currPosition, playerPosition);\n if (!this.pathToDest.empty()) {\n Coordinate nextPosition = this.pathToDest.pop();\n // this.setCoordinate(nextPosition);\n if (getX() + 1 == nextPosition.x) {\n moveRight();\n } else if (getX() - 1 == nextPosition.x) {\n moveLeft();\n } else if (getY() + 1 == nextPosition.y) {\n moveDown();\n } else if (getY() - 1 == nextPosition.y) {\n moveUp();\n }\n }\n }\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 }", "@Override\n\tpublic boolean updatePos(Physical_passive map) {\n\t\tupdate_animSpeed();\n\t\t// if (!map.getPhysicalRectangle().contains(getPhysicalShape()))\n\t\t// return false;\n\t\tif (!isDead()) {\n\t\t\tResolveUnreleasedMovements();\n\t\t\tgetWeapon().update();\n\t\t\tupdatePush();\n\t\t\t/*\n\t\t\t * if (!isBlock_down()) { // Por lo visto esto controla el salto if\n\t\t\t * (getJumpTTL() != 0) { moveJump(); } else // Y este 3 es la\n\t\t\t * gravedad., lo paso a un metodo de actor // para decirle q empiece\n\t\t\t * a caer fall(); // ; }\n\t\t\t */\n\t\t\t// Aqui es donde realmente cambiamos la posicion una vez calculado\n\t\t\t// donde va a ir.\n\t\t\t// updateLegsRotation(getSpeed().add(getPosition()));\n\t\t\tgetLegs().setLocation(new Point((int) getPosition().x(), (int) getPosition().y()));\n\t\t\tsetPosition(getPosition().add(getSpeed().add(getPush())));\n\t\t\tgetTorax().setLocation(new Point((int) getPosition().x(), (int) getPosition().y()));\n\t\t\t// setPosition(getPosition().add(getSpeed().add(getPush()))); //\n\t\t\t// CAmbiado;\n\t\t\tLine2D line = new Line2D.Float((float) getKillTracer().getTrace().getLine().getX1(),\n\t\t\t\t\t(float) getKillTracer().getTrace().getLine().getY1(), (float) getSpeed().x(),\n\t\t\t\t\t(float) getSpeed().y());\n\t\t\tgetKillTracer().getTrace().setLine(line);\n\t\t\tArrayList<Entity> hits = getKillTracer().getCollision(getMap());\n\t\t\tfor (Entity ent : hits) {\n\t\t\t\tif (ent instanceof Player && ent != this) {\n\t\t\t\t\tPlayer plent = (Player) ent;\n\t\t\t\t\tplent.die();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "public void update() {\r\n\t\t\r\n\t}", "public void updatemove() {\n\t\tmove = new Movement(getX(), getY(),dungeon,this);\n\t\t//System.out.println(\"Updated\");\n\t\tnotifys();\n\t\tif(this.getInvincible()) {\n\t\t\tsteptracer++;\n\t\t}\n\t\tdungeon.checkGoal();\n\t}", "public void setPos(int pos);", "public void setPos(int pos);", "@Override\n public void tick() {\n setPosition(getPosition().add(getSpeed())); \n }", "void update()\n\t{\n\t\t// the snake moves this function records it\n\t\ttheSnake.update();\n\n\t\t// checks if the snake is alive\n\t\tplaying = theSnake.isAlive();\n\n\t\t// checks if the snake has eaten a fruit\n\t\tif (theSnake.getXofPartI(0) == fruit[0] && theSnake.getYofPartI(0) == fruit[1] && theSnake.getZofPartI(0) == fruit[2])\n\t\t{\n\t\t\t// the snake grows\n\t\t\ttheSnake.grow();\n\t\t\t// a new fruit location needs to be determined\n\t\t\tplaceFruit();\n\t\t}\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t\tif(!this.explShowing)\n\t\t{\n\t\t\tx+= dx;\n\t\t\ty+= dy;\n\t\n\t\t\tif(x < 0)\n\t\t\t{\n\t\t\t\tx = 0;\n\t\t\t\tdx = dx *-1;\n\t\t\t}\n\t\t\telse\n\t\t\tif(x + w > MainGame.getInstance().X_WORLD_END)\n\t\t\t{\n\t\t\t\tx = MainGame.getInstance().X_WORLD_END - w ;\n\t\t\t\tdx = dx *-1;\t\n\t\t\t}\n\t\n\t\t\tif(y < 0)\n\t\t\t{\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t\telse\n\t\t\tif(y + h > MainGame.getInstance().Y_WORLD_END)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t}\n\t\t\n\t\ts.update();\n\t\n\t\tif(this.explShowing)\n\t\t{\n\t\t\tif(expl.isHasFinished())\n\t\t\t{\n\t\t\t\texplShowing = false;\n\t\t\t\ts = this.normalImage;\n\t\t\t\tthis.x = this.xStart;\n\t\t\t\tthis.y = this.yStart;\n\t\t\t\ts.setX(this.xStart);\n\t\t\t\ts.setY(this.yStart);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//s.setX(x);\n\t\t//s.setY(y);\n\t\t\n\t\tthis.rect.setFrame(getX(),getY(),getW(),getH());\t\n\t}", "private void updatePosition (float newCenterX, float newCenterY) {\n centerX = newCenterX;\n centerY = newCenterY;\n\n atomSpriteBoundary.left = centerX - spriteLength/2;\n atomSpriteBoundary.right = centerX + spriteLength/2;\n atomSpriteBoundary.top = centerY - spriteHeight/2;\n atomSpriteBoundary.bottom = centerY + spriteHeight/2;\n }", "public void setPosition(Position pos) {\n position = new Position(pos);\n }", "@Override\n\tpublic void updateEntity() {\n\t\t\n\t\tif (this.mobID != null && !this.worldObj.isRemote) {\n\t\t\t\n\t\t\tif (this.delay > 0) {\n\t\t\t\tthis.delay--;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tEntity entity = EntityList.createEntityByName(this.mobID, this.worldObj);\n\t\t\t\n\t\t\t// L'entity n'existe pas\n\t\t\tif (entity == null) {\n\t\t\t\tModGollumCoreLib.log.warning(\"This mob \"+this.mobID+\" isn't register\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tthis.worldObj.setBlockToAir(this.xCoord , this.yCoord , this.zCoord);\n\t\t\t\n\t\t\tdouble x = (double)this.xCoord + 0.5D;\n\t\t\tdouble y = (double)(this.yCoord);// + this.worldObj.rand.nextInt(3) - 1);\n\t\t\tdouble z = (double)this.zCoord + 0.5D;\n\t\t\tEntityLiving entityLiving = entity instanceof EntityLiving ? (EntityLiving)entity : null;\n\t\t\tentity.setLocationAndAngles(x, y, z, this.worldObj.rand.nextFloat() * 360.0F, this.worldObj.rand.nextFloat() * 360.0F);\n\t\t\tthis.worldObj.spawnEntityInWorld(entity);\n\t\t\t\n\t\t\tif (entityLiving == null || entityLiving.getCanSpawnHere()) {\n\t\t\t\t\n\t\t\t\tthis.worldObj.playSoundEffect (this.xCoord, this.yCoord, this.zCoord, \"dig.stone\", 0.5F, this.worldObj.rand.nextFloat() * 0.25F + 0.6F);\n\t\t\t\t\n\t\t\t\tif (entityLiving != null) {\n\t\t\t\t\tentityLiving.spawnExplosionParticle();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void flap(){\n bird.setY(bird.getY() - 6);\n }", "public void update() {\n this.move(this.getDX(), this.getDY());\n }", "public abstract void setPosition(Position position);", "public void updateEnemies() {\n for (Map.Entry<Integer, Enemy> entry :enemies.entrySet()) {\n entry.getValue().update(mainPlayerPosX, mainPlayerPosY);\n if (entry.getValue().isDead()) {\n enemiesSize--;\n }\n }\n }", "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 void update() {\n if (isActive()) {\n updatePosition(dx, dy);\n }\n }", "final protected void setSpawnPosition(int newX, int newY)\n {\n spawnPoint = new Point(newX, newY);\n boundingBox.setLocation(spawnPoint);\n }", "public void setPosition(Position p);", "void playerPositionChanged(Player player);" ]
[ "0.7244002", "0.6992491", "0.67683256", "0.6546752", "0.6534638", "0.63708186", "0.63118744", "0.6290712", "0.6275678", "0.62360245", "0.61832035", "0.6165689", "0.61513484", "0.6105757", "0.61052936", "0.60495317", "0.60446113", "0.60219", "0.59885395", "0.5921241", "0.5908069", "0.5888895", "0.5867826", "0.5859762", "0.58488524", "0.5843557", "0.58372474", "0.5809609", "0.579702", "0.57903504", "0.57799214", "0.57799214", "0.57721823", "0.57707214", "0.57637256", "0.5741651", "0.57365113", "0.57312435", "0.5707104", "0.5705262", "0.56874406", "0.5682308", "0.5680289", "0.5669912", "0.5657008", "0.56461895", "0.56444037", "0.564424", "0.561896", "0.56063473", "0.56022984", "0.5600636", "0.5594609", "0.5586576", "0.5580033", "0.5569741", "0.5552926", "0.554989", "0.5542243", "0.5537399", "0.55364835", "0.5525545", "0.55170846", "0.5511316", "0.5509496", "0.5496895", "0.54959387", "0.5492481", "0.5489595", "0.548871", "0.54881907", "0.54881907", "0.5469673", "0.54684085", "0.5455198", "0.5453966", "0.5451877", "0.54493076", "0.5447479", "0.5447113", "0.5446684", "0.5443624", "0.54407305", "0.5436279", "0.5436279", "0.5429552", "0.54246205", "0.53960896", "0.53954476", "0.5393713", "0.5390874", "0.5389705", "0.5388752", "0.5387596", "0.5378824", "0.53785574", "0.5372437", "0.5368616", "0.5365034", "0.53649765" ]
0.7052018
1
control the shoot of the boss
public void shoot(){ // boss bullete attract to player int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle))); int bulletPosY = (int)(posY + hei / 2); float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX); int bulletVelX = (int)(8 * cos(bulletAngle)); int bulletVelY = (int)(8 * sin(bulletAngle)); bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shoot() {\n\t\tgetWeapon().triggerMain();\n\t\tsetShooting(true);\n\t}", "private void shoot() {\n }", "private void shoot() {\n }", "@Override\n\t\t\tpublic void shoot() {\n\t\t\t}", "void shoot();", "@Override\n\tpublic void shoot() {\n\t\tthis.fired = true;\n\t\tghost.shot=true;\n\t}", "public void shoot() {\n _shooterMotor1.set(_targetRPM);\n }", "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}", "public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }", "private void tankWillShoot(Graphics2D g2d, GameState state) {\n if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() > 0 && state.getGunType() % 2 == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfCannonBullet(tankObject.getNumOfCannonBullet() - 1);\n if (tankObject.getCannonLevel() == 1) {\n state.getMissiles().add(new Missile(state, 15));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (tankObject.getCannonLevel() == 2) {\n state.getMissiles().add(new Missile(state, 30));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n } else if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() == 0 && state.getGunType() % 2 == 1) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n state.setMouseClicked(false);\n }\n for (Missile missile : state.getMissiles()) {\n missile.paint(g2d, state);\n }\n if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() > 0 && state.getGunType() % 2 == 0) {\n if (numOfRenderBullet1 == 0 && tankObject.getMachineGunLevel() == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 20));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet2 == 0 && tankObject.getMachineGunLevel() == 2) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 30));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet1 <= 7) {\n numOfRenderBullet1++;\n }\n if (numOfRenderBullet1 == 7) {\n numOfRenderBullet1 = 0;\n }\n if (numOfRenderBullet2 <= 3) {\n numOfRenderBullet2++;\n }\n if (numOfRenderBullet2 == 3) {\n numOfRenderBullet2 = 0;\n }\n }\n else if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() == 0 && state.getGunType() % 2 == 0) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n }\n for (Bullet bullet : state.getBullets()) {\n bullet.paint(g2d, state);\n }\n }", "public void shootIntoCargoShip(){\n shoot.set(SHIP_SHOOT);\n }", "void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);", "public void shoot()\n {\n\n if(reload<=0)//if the tower has reloaded\n {\n int randomizer=Greenfoot.getRandomNumber(20)-10; \n MinigunBullet bullet = new MinigunBullet(this.getRotation()+randomizer, damage,this);\n getWorld().addObject(bullet, getX(), getY());\n bullet.move(30);\n reload=3;\n }\n else//reload\n {\n reload--;\n }\n\n }", "public void enemyShoot()\r\n\t{\r\n\t\tfor (Enemy enemies : enemy)\r\n\t\t{\r\n\t\t\tif (enemies.getHasFired())\r\n\t\t\t{\r\n\t\t\t\tBullet enemyPew = enemies.shoot();\r\n\t\t\t\tif (enemyPew != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.add(enemyPew);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "private void shoot() {\n\t\tif (playerList.size() > 0) {\n\t\t\tif (!someoneLose) {\n\t\t\t\tPlayer target = null;\n\t\t\t\tint remainingShips = SHIP_COUNT + 1;\n\t\t\t\tfor (Player player : playerList) {\n\t\t\t\t\tif (player.getRemainingShips() < remainingShips) {\n\t\t\t\t\t\ttarget = player;\n\t\t\t\t\t\tremainingShips = player.getRemainingShips();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSector targetSector = target.findFreeSector();\n\t\t\t\tlastTarget = targetSector.getMiddle();\n\t\t\t\tShootingThread st = new ShootingThread(chordImpl, targetSector.getMiddle());\n\t\t\t\tst.start();\n\t\t\t}\n\t\t}\n\t}", "public void stopShoot(){\n\t\tshoot.set(0);\n\t}", "public boolean shootoutEntity(Entity ent, boolean simulate);", "public void shoot(Graphics g) {\r\n\t\tlevelManager.shoot(g);\r\n\t}", "private void attackPlayer()\n\t{\n\t\tif(shootTimer.done())\n\t\t{\n\t\t\tProjectile spiderWeb = new SpiderWeb(x, y);\n\t\t\tGame.objectWaitingRoom.add(spiderWeb);\n\t\t\tspiderWeb.shoot();\n\t\t\tshootTimer.setTime(200);\n\t\t}\n\t}", "public void shoot() {\n\r\n switch (shootstate) {\r\n case down:\r\n tempbutton = Components.shootsinglespeed;\r\n templimit = islimitshooterup();\r\n\r\n if (Components.shootsinglespeed && islimitshooterup() && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(singlespeed);\r\n Components.shootermotorleft2.setX(singlespeed);\r\n Components.shootermotorright.setX(-singlespeed);\r\n Components.shootermotorright2.setX(-singlespeed);\r\n\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n\r\n }\r\n shootpothigh = shootsinglepot;\r\n shootstate = movingup;\r\n } else if (Components.trusshp == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(trusshpspeed);\r\n Components.shootermotorleft2.setX(trusshpspeed);\r\n Components.shootermotorright.setX(-trusshpspeed);\r\n Components.shootermotorright2.setX(-trusshpspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = trusshppothigh;\r\n shootstate = movingup;\r\n }else if (Components.truss == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(trussspeed);\r\n Components.shootermotorleft2.setX(trussspeed);\r\n Components.shootermotorright.setX(-trussspeed);\r\n Components.shootermotorright2.setX(-trussspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = trusspothigh;\r\n shootstate = movingup;\r\n } else if (Components.pass == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(passspeed);\r\n Components.shootermotorleft2.setX(passspeed);\r\n Components.shootermotorright.setX(-passspeed);\r\n Components.shootermotorright2.setX(-passspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = passpot;\r\n shootstate = movingup;\r\n } else if (Components.longdistanceshoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(longdistancespeed);\r\n Components.shootermotorleft2.setX(longdistancespeed);\r\n Components.shootermotorright.setX(-longdistancespeed);\r\n Components.shootermotorright2.setX(-longdistancespeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = longdistancepot;\r\n shootstate = movingup;\r\n }\r\n else if (Components.shoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(shooterspeed);\r\n Components.shootermotorleft2.setX(shooterspeed);\r\n Components.shootermotorright.setX(-shooterspeed);\r\n Components.shootermotorright2.setX(-shooterspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = shootpot;\r\n shootstate = movingup;\r\n }else if (Components.slowmovingshoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(slowmovingspeed);\r\n Components.shootermotorleft2.setX(slowmovingspeed);\r\n Components.shootermotorright.setX(-slowmovingspeed);\r\n Components.shootermotorright2.setX(-slowmovingspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n slowmovingpot = shootpot;\r\n shootstate = movingup;\r\n }\r\n else if (Components.fastmovingshoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(fastmovingspeed);\r\n Components.shootermotorleft2.setX(fastmovingspeed);\r\n Components.shootermotorright.setX(-fastmovingspeed);\r\n Components.shootermotorright2.setX(-fastmovingspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n fastmovingpot = shootpot;\r\n\r\n }\r\n case movingup:\r\n if (islimitshooterup() == false || Components.potvalue >= shootpothigh) {\r\n shootstate = stopped;\r\n oldTime = DS.getMatchTime();\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n break;\r\n\r\n case stopped:\r\n try {\r\n if (/*Components.shooterdown && */time - oldTime > .2 && islimitshooterdown() == true && Components.DownPickupLimit.get()) {\r\n\r\n Components.shootermotorleft.setX(shootdownspeed);\r\n Components.shootermotorleft2.setX(shootdownspeed);\r\n\r\n Components.shootermotorright.setX(-shootdownspeed);\r\n Components.shootermotorright2.setX(-shootdownspeed);\r\n\r\n shootstate = movingdown;\r\n }\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n break;\r\n\r\n case movingdown:\r\n if ((islimitshooterdown() == false) || (Components.potvalue < shootpotdown)) {\r\n\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootstate = down;\r\n }\r\n }\r\n }", "public void draw() {\r\n\r\n if (this.z == 2) {\r\n //--- Shooting//---\r\n for (Enemy e: this.td.getEnemies()) {\r\n if (e.getX() < this.x + this.size / 2\r\n && e.getX() + e.getSize() > this.x - this.size / 2) {\r\n if (e.getY() < this.y + this.size / 2\r\n && e.getY() + e.getSize() > this.y - this.size / 2) {\r\n if (!this.firing) {\r\n this.firing = true;\r\n this.target = e;\r\n }\r\n } else {\r\n this.firing = false;\r\n }\r\n }\r\n this.firing();\r\n }\r\n }\r\n this.update();\r\n\r\n }", "private void enemiesWillShoot(Graphics2D g2d, GameState state) {\n if (numOfRenderShoot == 75) {\n numOfRenderShoot = 0;\n for (int i = 0; i < state.getEnemyTanks().size(); i++) {\n if (state.getEnemyTanks().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTanks().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTanks().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTanks().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyMissiles().add(new EnemyMissile(this, state, 10\n , state.getEnemyTanks().get(i)));\n state.getEnemyMissiles().get(state.getEnemyMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyCars().size(); i++) {\n if (state.getEnemyCars().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyCars().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyCars().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyCars().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyBullets().add(new EnemyBullet(this, state, 20\n , state.getEnemyCars().get(i)));\n state.getEnemyBullets().get(state.getEnemyBullets().size() - 1).bulletDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyWallTurrets().size(); i++) {\n if (state.getEnemyWallTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyWallTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyWallTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyWallTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyWallTurretMissiles().add(new EnemyWallTurretMissile(this, state, 15\n , state.getEnemyWallTurrets().get(i)));\n state.getEnemyWallTurretMissiles().get(state.getEnemyWallTurretMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n\n for (int i = 0; i < state.getEnemyTurrets().size(); i++) {\n if (state.getEnemyTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyHomingMissiles().add(new EnemyHomingMissile(this, state, 15\n , state.getEnemyTurrets().get(i)));\n state.getEnemyHomingMissiles().get(state.getEnemyHomingMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n }\n for (EnemyMissile enemyMissile : state.getEnemyMissiles()) {\n enemyMissile.paint(g2d, state);\n }\n for (EnemyBullet enemyBullet : state.getEnemyBullets()) {\n enemyBullet.paint(g2d, state);\n }\n for (EnemyWallTurretMissile enemyWallTurretMissile : state.getEnemyWallTurretMissiles()) {\n enemyWallTurretMissile.paint(g2d, state);\n }\n for (EnemyHomingMissile enemyHomingMissile : state.getEnemyHomingMissiles()) {\n enemyHomingMissile.paint(g2d, state);\n }\n }", "public void avatarShoot()\r\n\t{\r\n\t\tBullet avatarPew = avatar.shoot();\r\n\t\tif (avatarPew!= null)\r\n\t\t{\r\n\t\t\tbullets.add(avatarPew);\r\n\t\t}\r\n\t}", "public void shootIntoRocket(){\n shoot.set(ROCKET_SHOOT);\n }", "public void shootGun() {\n\t\tammo--;\n\t}", "public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }", "public Shooter() {\n fire1 = new Solenoid(1);\n fire2 = new Solenoid(4);\n returnValve = new Solenoid(3);\n latchSolenoid = new Solenoid(2);\n FFM = true;\n m_enabled = true;\n shooting = false;\n reloading = false;\n initShooter();\n }", "public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }", "public void spitIntakeCargo(){\n shoot.set(SPIT_INTAKE);\n }", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "public void act() \n {\n World w = getWorld();\n int height = w.getHeight();\n \n setLocation(getX(),getY()+1);\n if (getY() <=0 || getY() >= height || getX() <= 0) // off the world\n {\n w.removeObject(this);\n return;\n }\n \n \n SaboWorld thisWorld = (SaboWorld) getWorld();\n Turret turret = thisWorld.getTurret();\n Actor turretActor = getOneIntersectingObject(Turret.class);\n Actor bullet = getOneIntersectingObject(Projectile.class);\n \n if (turretActor!=null && bullet==null) // hit the turret!\n {\n \n turret.bombed(); //Turret loses health\n explode();\n w.removeObject(this);\n } else if (turret==null && bullet!=null) //hit by a bullet!\n {\n explode();\n w.removeObject(this);\n }\n \n }", "public void shoot(){\r\n\t\tif(numberOfArrows>0){\r\n\t\t\tnumberOfArrows--;\r\n\t\t\tPosition positionWumpus = b.getWumpus().getPosition();\r\n\t\t\tif (position.checkShoot(positionWumpus))\r\n\t\t\t\tb.getWumpus().kill();\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"There are no more arrows.\");\r\n\t}", "private void shoot(int mode, EntityManager manager) {\r\n switch (mode) {\r\n case 0:\r\n normal(manager);\r\n break;\r\n case 1:\r\n shotgun(manager);\r\n break;\r\n case 2:\r\n shield(manager);\r\n break;\r\n case 3:\r\n laser(manager);\r\n break;\r\n case 4:\r\n multi(manager);\r\n break;\r\n case 5:\r\n shrapnel(manager);\r\n break;\r\n }\r\n }", "public void Fire()\n {\n Random random = new Random();\n int randNum = random.nextInt(limit);\n\n //Check to see if this bomb is dropped\n if(!owner.BehindInvader() && !this.Visible() && randNum == HIT_VAL)\n {\n //Set this bomb to visible\n this.Visible(true);\n this.PlaySound();\n this.x = this.owner.X();\n this.y = this.owner.Y();\n }\n\n //Check for collision with the defender\n if(Bomb.enemy.Visible() && this.Visible() && this.Collision(Bomb.enemy))\n {\n Bomb.enemy.Hit();\n this.Visible(false);\n }\n //Move the bomb down\n else if(this.Visible())\n {\n this.y++;\n\n //Check for collision with the floor\n if(this.y >= GameConstants.GROUND - this.imageHeight)\n {\n this.Visible(false);\n }\n //Check for collision with the barriers\n for(Barrier barrier : Bomb.barriers.Barriers())\n {\n for(BarrierBlock block : barrier.BarrierBlocks())\n {\n if(this.Collision(block))\n {\n block.Visible(false);\n //Removal could cause Comodification issue\n block.Damaged(true);\n this.Visible(false);\n //May not need this return\n return;\n }\n }\n }\n }\n }", "public void ballShoot() {\n\n ballRight.setPower(-1);\n ballLeft.setPower(1);\n\n wait(2.0);\n\n flipper.setPosition(0.7);\n\n wait(0.5);\n\n flipper.setPosition(0.9);\n ballLeft.setPower(0);\n ballRight.setPower(0);\n\n\n }", "private void handleShooting(SpaceWars game, GameGUI gui) {\r\n\t\tif (gui.isShotPressed()) {\r\n\t\t\tfire(game);\r\n\t\t}\r\n\t}", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "public void shoot(Projectile p){\r\n\t\tp.facing = facing;\r\n\t\tp.x = x+(width/2)-(p.width/2);\r\n\t\tp.y = y+(height/2)-(p.height/2);\r\n\t\tp.fired = true;\r\n\t\tinAttackCooldown = true;\r\n\t}", "@Override\n\tpublic void shoot(Plateau p) {\n\t\tif(!noMunition()) {\n\t\t\tuseMunition();\n\t\t\t//complete\n\t\t}\n\t\t\n\t}", "@Override\r\n public void onHit(int damage){\n if(box2body != null){\r\n hp -= damage;\r\n screen.getGameManager().get(\"Sounds/orc-34-hit.wav\", Sound.class).play();\r\n if(this.hp <= 0) {\r\n screen.bodiesToDelete.add(box2body);\r\n deleteFlag = true;\r\n screen.spawnedCreatures.remove(this);\r\n screen.getGameManager().get(\"Sounds/orc-32-death.wav\", Sound.class).play();\r\n\r\n //Award Experience\r\n screen.getPlayer().awardExperience(this.experienceValue);\r\n screen.getPlayer().increaseKillCount();\r\n }\r\n }\r\n //Attack player when damaged\r\n //Prevents player from sniping monsters using Wander AI\r\n if(currentState != State.ATTACKING){\r\n Vector2 orcPosition = new Vector2(box2body.getPosition().x, box2body.getPosition().y);\r\n Vector2 playerPosition = new Vector2(screen.getPlayer().box2body.getPosition().x, screen.getPlayer().box2body.getPosition().y);\r\n\r\n currentState = State.HASBEENATTACKED;\r\n velocity = new Vector2(playerPosition.x - orcPosition.x, playerPosition.y - orcPosition.y);\r\n box2body.setLinearVelocity(velocity.scl(speed));\r\n }\r\n }", "public void shoot() {\r\n\t\twhile (rounds > 1) {\r\n\t\t\trounds--;\r\n\t\t\tSystem.out.println(gunType + \" is shooting now\\n\" + rounds + \" \\nCLACK! CLACK! CLAK! CLAK! CLAK!\");\r\n\t\t\tif (rounds == 1) {\r\n\t\t\t\tSystem.out.println(\"Magazine's Empty!! \\nRELOAD!!\\nRELOAD!!!\\nRELAOD!!!\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public void stopShooting() {\n\t\tgetWeapon().releaseMain();\n\t\tsetShooting(false);\n\t}", "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }", "public void attack() {\n\t\t\n\t\tint row = getPosition().getRow();\n\t\tint column = getPosition().getColumn();\n\t\t\n\t\tgetPosition().setCoordinates(row + 1, column);\n\t\tsetPosition(getPosition()) ;\n\t\t// restore health\n\t\tsetHealth(100);\n\t\t// end hunter mode\n\t\tthis.hunter = false;\n\t\t\n\t}", "public void Hit()\n {\n this.numLives--;\n //Oscillate visible and not if the number of lives is greater than zero\n if(this.numLives > 0)\n {\n this.damaged = true;\n this.Blink(1);\n\n }\n }", "public void manualShoot(double speed) {\n shooter1.set(speed);\n }", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "public void shoot(Point p, Graphics g, Player player){\r\n if(p.getX() > getXCoord()-20){ //not sure if -20 needed (it is to make cetner by the shoulder of arm)\r\n setFacing(1);\r\n } else{\r\n setFacing(0);\r\n }\r\n this.setAttackSpeedTimer(this.getAttackSpeedTimer() + 1);\r\n if(this.getAttackSpeedTimer() == this.getAttackSpeed()){\r\n\t\t Bullet bullet = new Bullet(this.getXCoord(), \r\n\t\t\t\t\t this.getYCoord(), this.getFacing(), g, findAngle(p), player);\r\n\t\t\t\t\t bullet.setAttack(50);\r\n\t\t bullet.setMouseY(this.getMouseY());\r\n\t\t bullet.setMouseX(this.getMouseX());\r\n\t\t bullet.setMouseAngle(this.getMouseAngle());\r\n\t \t bullet.setPlayerDirection(this.getPlayerDirection());\r\n\t\t this.addProjectile(bullet);\r\n\t\t this.setAttackSpeedTimer(0);\r\n\t\t //System.out.println(findAngle(p)*180/Math.PI);\r\n\t\t this.playSound();\r\n }\r\n }", "public Answer shoot(){\n if (this.isOccuped()){\n this.ship.hit();\n if (this.ship.hasBeenSunk()){\n\tthis.hasBeenShot = true;\n return Answer.SUNK;\n }\n else{\n\tthis.hasBeenShot = true;\n return Answer.HIT;\n }\n }\n else{\n this.hasBeenShot = true;\n return Answer.MISSED;\n }\n }", "@Override\r\n\tpublic void onPlayerHit(Player p) {\n\t\tParUtils.createParticle(Particles.EXPLOSION, loc, 0, 0, 0, 1, 0);\r\n\t\tplaySound(Sound.ENTITY_DRAGON_FIREBALL_EXPLODE,loc,1,1);\r\n\t\t//p.setVelocity(dir.multiply(speed/2));\r\n\t\tdoKnockback(p, caster.getLocation(), 1 );\r\n\t\tdamage(p, 2, caster);\r\n\t}", "private void fire(GameEngine gameEngine) {\n Bullet bullet1 = gameEngine.getBulletEnemy();\n if (bullet1 == null) {\n return;\n }\n bullet1.init(this, positionX + imageWidth/2, positionY, 0);\n gameEngine.addGameObject(bullet1);\n gameEngine.playSound(1);\n }", "protected void execute() \n {\n \tRobot.ballManipSubsystem.setTopRollerToShootingSpeed();\n }", "private GameObject spawnBoss(LogicEngine in_logicEngine,LevelManager in_manager)\r\n\t{\n\t\tGameObject go = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/redcube.png\",in_logicEngine.SCREEN_WIDTH/2,LogicEngine.rect_Screen.getHeight()+50,0);\r\n\t\tboss = go;\r\n\t\t\r\n\t\tboss.i_animationFrameRow = 1;\r\n\t\tboss.i_animationFrame =0;\r\n\t\tboss.i_animationFrameSizeWidth =75;\r\n\t\tboss.i_animationFrameSizeHeight =93;\r\n\t\t\r\n\t\tboss.v.setMaxForce(1);\r\n\t\tboss.v.setMaxVel(5);\r\n\t\tboss.stepHandlers.add( new BounceOfScreenEdgesStep());\r\n\t\t\r\n\t\t\r\n\t\tboss_arrive.setAttribute(\"arrivedistance\", \"50\", null);\r\n\t\tboss.stepHandlers.add( new CustomBehaviourStep(boss_arrive));\r\n\t\tboss.isBoss = true;\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(boss, 150, 40, true,1);\r\n\t\t\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\tc.f_numberOfHitpoints = 200;\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t\tc.f_numberOfHitpoints = 250;\r\n\t\t\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\ti_bossBubbleEvery = 125;\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t\ti_bossBubbleEvery = 100;\r\n\t\t\r\n\t\t\r\n\t\tc.addHitpointBossBar(in_logicEngine);\r\n\t\tc.setExplosion(Utils.getBossExplosion(boss));\r\n\t\tboss.collisionHandler = c;\r\n\t\t\r\n\t\tboss.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t//initial velocity of first one \r\n\t\tboss.v.setVel(new Vector2d(0,-5));\r\n\t\t\r\n\t\tGameObject Tadpole1 = in_manager.spawnTadpole(in_logicEngine);\r\n\t\tGameObject Tadpole2 = in_manager.spawnTadpole(in_logicEngine);\r\n\t\t\r\n\t\tGameObject Bubble = null;\r\n\t\t\r\n\t\t\r\n\t\tBubble = spawnBossBubble(in_logicEngine, 0, 3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tTadpole1.v.setVel(new Vector2d(-10,5));\r\n\t\tTadpole2.v.setVel(new Vector2d(10,5));\r\n\t\tBubble.v.setVel(new Vector2d(0,-5));\r\n\t\t\r\n\t\tLaunchShipsStep l1 = new LaunchShipsStep(Tadpole1 , 50, 5, 1, false);\r\n\t\tLaunchShipsStep l2 = new LaunchShipsStep(Tadpole2, 50, 5, 1, true);\r\n\t\tLaunchShipsStep l3 = new LaunchShipsStep(Bubble, i_bossBubbleEvery, 1, 1, true);\r\n\t\tl1.b_addToBullets = true;\r\n\t\tl2.b_addToBullets = true;\r\n\t\t\r\n\t\tboss.stepHandlers.add(l1);\r\n\t\tboss.stepHandlers.add(l2);\r\n\t\tboss.stepHandlers.add(l3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\td_eye = new Drawable();\r\n\t\td_eye.i_animationFrameSizeHeight=8;\r\n\t\td_eye.i_animationFrameSizeWidth=8;\r\n\t\td_eye.i_animationFrameRow = 3;\r\n\t\td_eye.str_spritename = \"data/\"+GameRenderer.dpiFolder+\"/eye.png\";\r\n\t\t\r\n\t\tboss.visibleBuffs.add(d_eye);\r\n\t\t\r\n\t\treturn boss;\r\n\t}", "void hit(GameObject o){\r\n\t\tif (!shield){ // if sheild is on all hits do nothing\r\n\t\t\tif (!(o instanceof UpPower)){ // if didnt hit a power up the ship loses a life\r\n\t\t\t\tif (lives > 1) {\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t\treset();\r\n\t\t\t\t}\r\n\t\t\t\telse { // once there is no life left the ship dies\r\n\t\t\t\t\tdead = true;\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }", "private static void attack(RobotInfo target) throws GameActionException {\n if (SOLDIER_DEBUG) {\n System.out.println(\"attacking\");\n }\n BulletInfo[] bullets = rc.senseNearbyBullets(EvasiveSoldier.BULLET_DETECT_RADIUS);\n RobotInfo[] robots = rc.senseNearbyRobots(EvasiveSoldier.ENEMY_DETECT_RADIUS);\n MapLocation targetLocation = target.getLocation();\n move(bullets, robots, targetLocation);\n //RobotUtils.tryMoveDestination(targetLocation);\n if (TargetingUtils.clearShot(here, target) || (rc.getType() == RobotType.GARDENER && rc.getOpponentVictoryPoints() > 10)) {\n if (SOLDIER_DEBUG) {\n System.out.println(\"clearShot to target\");\n }\n Direction towardsEnemy = here.directionTo(targetLocation);\n float distanceEnemy = here.distanceTo(targetLocation);\n if (distanceEnemy <= 3.5 && rc.canFirePentadShot() && rc.getTeamBullets() > 200) {\n rc.firePentadShot(towardsEnemy);\n }\n else {\n if (rc.canFireTriadShot() && rc.getTeamBullets() > 50) {\n rc.fireTriadShot(towardsEnemy);\n }\n else if (rc.canFireSingleShot()) {\n rc.fireSingleShot(towardsEnemy);\n }\n }\n }\n }", "protected void execute() {\n timeRunning = timeSinceInitialized();\n if (!Robot.lifter2.getunder15()) {\n Robot.shooter.set(190);\n System.out.println(\"In position: \"+inPosition.get());\n } else {\n System.out.println(\"under angle don't shoot!\");\n }\n \n }", "private void shoot(GObject bottom, GObject bottomLeft, GObject topRight, GObject bottomRight, GObject topLeft) {\r\n\t\t//if(bullet == null && bottom != null && bottomLeft == null && topRight == null && bottomRight == null && topLeft == null) {\r\n\t\t\t{bullet = new GRect(BULLET_WIDTH, BULLET_HEIGHT);\r\n\t\t\tbullet.setFilled(true);\r\n\t\t\tbullet.setColor(Color.green);\r\n\t\t\tif(facingEast == true) {\r\n\t\t\t\tbulletVelocity = BULLET_SPEED;\r\n\t\t\t\tadd(bullet, player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() * 3/5.0);\r\n\t\t\t} else {\r\n\t\t\t\tbulletVelocity = -BULLET_SPEED;\r\n\t\t\t\tadd(bullet, player.getX() - BULLET_WIDTH, player.getY() + player.getHeight() * 3/5.0);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic int costOfShooting() {\r\n\t\treturn 50;\r\n\t}", "private void shoot(boolean canShoot, java.util.List<Enemy> enemiesInVicinity) {\n if (canShoot) {\n shotEnemy = null;\n if (!enemiesInVicinity.isEmpty()){\n boolean shotEnamies = shootAt(enemyWithLowestHealth(enemiesInVicinity));\n if (shotEnamies) resetCooldown();\n }\n }\n }", "public void Attack(){\n float randomx = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/10;\n float randomy = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/5;\n Vector2 target = GameView.instance.player.aimFor();\n float dx = target.x-creationPoint.x;\n float dy =target.y-creationPoint.y;\n float l= (float)Math.sqrt(dx*dx+dy*dy);\n dx = dx/l-((float)Math.random()-0.5f)/2;\n dy = dy/l-(float)(Math.random())/10;\n ProjectilePool.instance.shootArrow(creationPoint.x, creationPoint.y, 1, dx, dy, 3);\n }", "void doGun() {\r\n\t\tlong time = getTime()\r\n\t\t\t\t+ (int) Math\r\n\t\t\t\t\t\t.round((getRange(getX(), getY(), target.x, target.y) / (20 - (3 * firePower))));\r\n\t\tPoint2D.Double p = target.guessPosition(time);\r\n\r\n\t\t// offsets the gun by the angle to the next shot based on linear\r\n\t\t// targeting provided by the enemy class\r\n\t\tdouble gunOffset = getGunHeadingRadians()\r\n\t\t\t\t- (Math.PI / 2 - Math.atan2(p.y - getY(), p.x - getX()));\r\n\t\tsetTurnGunLeftRadians(normaliseBearing(gunOffset));\r\n\t}", "@Override\n public void doAction() {\n checkRep();\n if (!storedBalls.isEmpty()) {\n Ball ballToShootOut = storedBalls.remove();\n ballToShootOut.setVelocity(new Vect(0,STOREDBALLVELOCITY));\n ballToShootOut.setActive(true);\n }\n checkRep();\n }", "@Override\n\tpublic Bullet shoot(int hx, int hy) {\n\t\treturn null;\n\t}", "public void findShootedPlayer(UUID id) {\n\t\n\t\tif(healths.contains(id.toString()))\n\t\t\t{\n\t\t\t\thealths.put(id.toString(),healths.get(id.toString())-20);\n\t\t\t\tSystem.out.println(\"ghostEntity \"+id.toString() +\"was shooted\");\n\t\t\t\tif(healths.get(id.toString())<=0)\n\t\t\t\t{\n\t\t\t\t\thealths.put(id.toString(),100);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t}", "public void tick() {\n if (ShulkerEntity.this.world.getDifficulty() != Difficulty.PEACEFUL) {\n --this.attackTime;\n LivingEntity livingentity = ShulkerEntity.this.getAttackTarget();\n ShulkerEntity.this.getLookController().setLookPositionWithEntity(livingentity, 180.0F, 180.0F);\n double d0 = ShulkerEntity.this.getDistanceSq(livingentity);\n if (d0 < 400.0D) {\n if (this.attackTime <= 0) {\n this.attackTime = 20 + ShulkerEntity.this.rand.nextInt(10) * 20 / 2;\n ShulkerEntity.this.world.addEntity(new ShulkerBulletEntity(ShulkerEntity.this.world, ShulkerEntity.this, livingentity, ShulkerEntity.this.getAttachmentFacing().getAxis()));\n ShulkerEntity.this.playSound(SoundEvents.ENTITY_SHULKER_SHOOT, 2.0F, (ShulkerEntity.this.rand.nextFloat() - ShulkerEntity.this.rand.nextFloat()) * 0.2F + 1.0F);\n }\n } else {\n ShulkerEntity.this.setAttackTarget((LivingEntity)null);\n }\n\n super.tick();\n }\n }", "void smallgunHandler() {\n for (Sprite smb: smBullets) {\n \n smb.display();\n if(usingCoil){\n smb.forward(120);\n }else{\n smb.forward(40);\n }\n\n }\n}", "private void shootMove() {\n for (int i = 0; i < fires.size(); i++) {\n //子弹往上移动\n fires.get(i).move();\n //注意这里remove需要放在下面\n if (fires.get(i).y < -1000) {\n fires.remove(fires.get(i));\n }\n }\n\n }", "@EventHandler\n public void onEntityShootBowEvent(final EntityShootBowEvent event) {\n \tif (SheepWarsPlugin.getVersionManager().getVersion().equals(MinecraftVersion.v1_8_R3))\n \t\tevent.getProjectile().setVelocity(event.getProjectile().getVelocity());\n }", "public void fireShot() {\n\t\tVector3 position = player.getPositionVector();\n\t\tVector3 rotation = player.getRotationVector();\n\t\tVector3 scale = player.getScaleVector();\n\t\tAsteroidsLaser laser = new AsteroidsLaser(GameObject.ROOT, this, rotation.z);\n\t\tlaser.translate(position);\n\t\tlaserShots.add(laser);\n\t}", "void dropHandler() {\n if (tickSpeed < 0) {\n if((int)random(1,6) == 1){ //every 6 medkits the handler drops a minigun\n Sprite mg = new Sprite(minigun);\n mg.moveToPoint(random(0,2048), random(0, 2048)); //moves drop to random point\n minigunDrop.add(mg);\n tickSpeed = (int)random(100,500);\n }else if((int)random(1,4) == 1){ //every 4 medkits the handler drops a coilgun\n Sprite cg = new Sprite(coilgun);\n cg.moveToPoint(random(0,2048), random(0,2048)); //moves drop to random point\n coilgunDrop.add(cg);\n tickSpeed = (int)random(100,500); //changes \n }\n else {\n \n \n Medkit hp = new Medkit();\n hp.med.moveToPoint(random(0, 2048), random(0, 2048));\n\n health.add(hp);\n\n tickSpeed = (int)random(100,500);\n }\n }\n tickSpeed--;\n for (Medkit hp: health) {\n hp.med.display();\n hp.timer--;\n\n }\n for (Sprite mg: minigunDrop){\n mg.display();\n }\n for (Sprite cg: coilgunDrop){\n cg.display();\n }\n // e.forward(5);\n}", "BossEnemy(){\n super();\n totallyDied = true;\n }", "@Override\n\tpublic void OnAttackCommand() {\n\t\tsuper.OnAttackCommand();\n\t\tSoundManage.playSound(atkSound1);\n\t}", "void tick() {\n\t\tif (playing) {\n\t\t\tdeadcannon = null;\n\t\t\t// sets general output message\n\t\t\tstatus.setText(\"Engaging alien wave \" + Integer.toString(level)+ \" \");\n\n\t\t\t// controls the first shot fired by the aliens\n\t\t\tif (shot1 == null) {\n\t\t\t\tint count1 = 0;\n\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\tif (alien3[i]!=null) {if (!alien3[i].Destroyed) count1++ ;}\n\t\t\t\t}\n\t\t\t\tif (count1 > 1) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\tshootbottom().pos_x + 18, shootbottom().pos_y); \n\t\t\t\telse {\n\t\t\t\t\tint count2 = 0;\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null) {if(!alien2[i].Destroyed)count2++;}\n\t\t\t\t\t}\n\t\t\t\t\tif (count2 > 1) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\tshootmiddle().pos_x + 18, shootmiddle().pos_y);\n\t\t\t\t\telse {\n\t\t\t\t\t\tint count3 = 0;\n\t\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\t\tif (alien1[i]!=null) {if(!alien1[i].Destroyed)count3++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count3 != 0) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\t\tshoottop().pos_x + 18, shoottop().pos_y);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// controls the second shot fired by the aliens\n\t\t\tif (shot2 == null) {\n\t\t\t\tint count4 = 0;\n\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\tif (alien3[i]!=null) {if (!alien3[i].Destroyed) count4++ ;}\n\t\t\t\t}\n\t\t\t\tif (count4 != 0) {shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\tshootbottom().pos_x + 18, shootbottom().pos_y); \n\t\t\t\tStdAudio.play(\"zap.wav\"); }\n\t\t\t\telse {\n\t\t\t\t\tint count5 = 0;\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null) {if(!alien2[i].Destroyed)count5++;}\n\t\t\t\t\t}\n\t\t\t\t\tif (count5 != 0) { shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\tshootmiddle().pos_x + 18, shootmiddle().pos_y);\n\t\t\t\t\tStdAudio.play(\"zap.wav\"); }\n\t\t\t\t\telse {\n\t\t\t\t\t\tint count6 = 0;\n\t\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\t\tif (alien1[i]!=null) {if(!alien1[i].Destroyed)count6++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count6 != 0) {shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\t\tshoottop().pos_x + 18, shoottop().pos_y);\n\t\t\t\t\t\tStdAudio.play(\"zap.wav\");}\n\t\t\t\t\t\telse {level = level + 1; \n\t\t\t\t\t\tnewlevel();\n\t\t\t\t\t\tthescore=thescore + 100;\n\t\t\t\t\t\tStdAudio.play(\"up.wav\");}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move bullet and delete if it reaches the roof\n\t\t\tif (bullet!= null) {\n\t\t\t\tbullet.move();\n\t\t\t\tif (bullet.pos_y == 0) bullet = null;\n\t\t\t}\n\n\t\t\t// controls movement of first shot\n\t\t\tif (shot1 != null) {\n\t\t\t\tshot1.move();\n\t\t\t\tif (shot1.pos_y > 435) shot1 = null;\n\t\t\t}\n\t\t\t// controls movement of second shot\n\t\t\tif (shot2 != null) {\n\t\t\t\tshot2.move();\n\t\t\t\tif (shot2.pos_y > 435) shot2 = null;\n\t\t\t}\n\n\t\t\t// For Top Row\n\n\t\t\t// change alien direction if a wall is reached\n\t\t\tif (alien1[0] != null && alien1[9] != null){\n\t\t\t\tif (alien1[0].pos_x == 0 || alien1[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\tif (alien1[i]!=null){alien1[i].v_x = -alien1[i].v_x;\n\t\t\t\t\t\talien1[i].pos_y=alien1[i].pos_y+15;\n\t\t\t\t\t\tif (alien1[i].pos_y >= 385 && !alien1[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false;\n\t\t\t\t\t\t\tstatus.setText(\"You have been overrun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\t \n\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\tif (alien1[i] != null) \n\t\t\t\t\talien1[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\tif (alien1[i] != null && bullet != null) {\n\t\t\t\t\tif (alien1[i].intersects(bullet) && !alien1[i].Destroyed) { \n\t\t\t\t\t\talien1[i].Destroyed=true;\n\t\t\t\t\t\tthescore += 20;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10 ) {\n\t\t\t\t\t\t\talien1[i].img_file = \"black.jpg\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For Second Row\n\n\t\t\t// change alien direction if a wall is reached\n\t\t\tif (alien2[0] != null && alien2[9] != null){\n\t\t\t\tif (alien2[0].pos_x == 0 || alien2[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null){alien2[i].v_x = -alien2[i].v_x;\n\t\t\t\t\t\talien2[i].pos_y=alien2[i].pos_y+15;\n\t\t\t\t\t\tif (alien2[i].pos_y >= 385 && !alien2[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false; \n\t\t\t\t\t\t\tstatus.setText(\"You have been ovverun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\tif (alien2[i] != null) \n\t\t\t\t\talien2[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\tif (alien2[i] != null && bullet != null) {\n\t\t\t\t\tif (alien2[i].intersects(bullet) && !alien2[i].Destroyed) { \n\t\t\t\t\t\talien2[i].Destroyed=true;\n\t\t\t\t\t\tthescore +=15;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10 ) {\n\t\t\t\t\t\t\talien2[i].img_file = \"black.jpg\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//For third row\n\n\t\t\t//change alien direction if a wall is reached\n\t\t\tif (alien3[0] != null && alien3[9] != null){\n\t\t\t\tif (alien3[0].pos_x == 0 || alien3[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\t\tif (alien3[i]!=null){alien3[i].v_x = -alien3[i].v_x;\n\t\t\t\t\t\talien3[i].pos_y=alien3[i].pos_y+15;\n\t\t\t\t\t\tif (alien3[i].pos_y >= 385 && !alien3[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false;\n\t\t\t\t\t\t\tstatus.setText(\"You have been ovverrun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\n\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\tif (alien3[i] != null) \n\t\t\t\t\talien3[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\tif (alien3[i] != null && bullet != null) {\n\t\t\t\t\tif (alien3[i].intersects(bullet) && !alien3[i].Destroyed) { \n\t\t\t\t\t\talien3[i].Destroyed=true;\n\t\t\t\t\t\tthescore += 10;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10) {\n\t\t\t\t\t\t\talien3[i].img_file = \"black.jpg\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// destroy cannon if shot\n\t\t\tif (shot1 != null) {\n\t\t\t\tif (shot1.intersects(cannon)){ dead = true; \n\t\t\t\tthelives = thelives - 1;\n\t\t\t\tStdAudio.play(\"bigboom.wav\");\n\t\t\t\tcannon.img_file = \"dead.jpg\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (shot2 != null) {\n\t\t\t\tif (shot2.intersects(cannon)){ dead = true; \n\t\t\t\tthelives = thelives - 1;\n\t\t\t\tStdAudio.play(\"bigboom.wav\");}\n\t\t\t\tcannon.img_file = \"dead.jpg\";\n\t\t\t}\n\n\t\t\t// ends the game when all lives are lost\n\t\t\tif (thelives <= 0) {\n\t\t\t\tplaying = false; \n\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\tstatus.setText(\"You have been killed and Earth has been \" +\n\t\t\t\t\t\t\"destroyed. You are a terrible defender \" +\n\t\t\t\t\t\t\"of humanity. \");\n\t\t\t}\n\n\t\t\t//makes sure lives cannot become negative\n\t\t\tif (thelives <= 0) {\n\t\t\t\tthelives = 0;\n\t\t\t\tdeadcannon = new DeadCannon(COURT_WIDTH, COURT_HEIGHT);\n\t\t\t\tdeadcannon.pos_x = cannon.pos_x;\n\t\t\t\tStdAudio.play(\"loss.wav\");\n\t\t\t}\n\n\t\t\t//set the text labels at the bottom of the screen\n\t\t\tmyscore.setText(\"Score = \"+ Integer.toString(thescore)+ \" \");\n\t\t\tmylives.setText(\"Lives = \"+ Integer.toString(thelives));\n\t\t\trepaint();\n\t\t\n\t\t\t//move cannon\n\t\t\tcannon.move();\n\t\t} \n\t}", "private void shotgun(EntityManager manager) {\r\n if (manager.getAmmo(1) == 0 && !testMode) {\r\n changeGuns(0, manager);\r\n manager.outOfAmmo();\r\n return;\r\n }\r\n\r\n float newRotationR = rotationZ - 15;\r\n float newRotationL = rotationZ + 15;\r\n\r\n float forwardXL = (float) Math.sin(Math.toRadians(newRotationL));\r\n float forwardYL = (float) -Math.cos(Math.toRadians(newRotationL));\r\n\r\n float forwardXR = (float) Math.sin(Math.toRadians(newRotationR));\r\n float forwardYR = (float) -Math.cos(Math.toRadians(newRotationR));\r\n\r\n Shot leftshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, forwardXL * 75, forwardYL * 75, 200, 0.9f, 0, 1, 0, true, 200, false);\r\n\r\n Shot rightshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, forwardXR * 75, forwardYR * 75, 200, 0.9f, 0, 1, 0, true, 200, false);\r\n\r\n Shot centershot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, forwardX * 75, forwardY * 75, 200, 0.9f, 0, 1, 0, true, 200, false);\r\n\r\n manager.addEntity(leftshot);\r\n manager.addEntity(rightshot);\r\n manager.addEntity(centershot);\r\n if (!testMode) manager.updateAmmo(1, -1, false);\r\n manager.shotFired(1);\r\n }", "public static void vehicleShoot(Player curr, int owner) {\n boolean airShot = false;\n if (gameMode == EARTH_INVADERS) //so vehicles don't shoot each other\n airShot = true;\n if (numFrames >= curr.getLastShotTime() + curr.getReloadTime()) {\n int hd = curr.getHeadDirection();\n Bullet temp = null;\n int bulletSpeed = SPEED * 6;\n //find monster in sights\n int[] target = isMonsterInSight(curr);\n int mIndex = target[1];\n int detX = -1;\n int detY = -1;\n if (mIndex > 0) {\n detX = players[mIndex].findX(cellSize);\n detY = players[mIndex].findY(cellSize);\n if (players[mIndex].isFlying())\n airShot = true;\n }\n if (curr.getName().endsWith(\"missile\")) {\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n\n if (gameMode == CITY_SAVER)\n bulletSpeed = SPEED * 4;\n else\n bulletSpeed = SPEED * 3;\n temp = new Bullet(\"missile\" + hd, curr.getX(), curr.getY(), 50, rocketImages, SPEED, \"SHELL\", bulletSpeed, true, owner, detX, detY);\n } else if (curr.getName().endsWith(\"jeep\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 65, (int) (Math.random() * 10) + 30);\n if (gameMode == CITY_SAVER)\n bulletSpeed = SPEED * 7;\n else\n bulletSpeed = SPEED * 6;\n temp = new Bullet(\"jeep\" + hd, curr.getX(), curr.getY(), 5, machBulletImages, SPEED, \"BULLET\", bulletSpeed, airShot, owner, -1, -1);\n } else if (curr.getName().endsWith(\"troops\") || curr.getName().endsWith(\"police\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 70, (int) (Math.random() * 10) + 20);\n temp = new Bullet(\"troops\" + hd, curr.getX(), curr.getY(), 3, bulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, owner, -1, -1);\n } else if (curr.getName().endsWith(\"flame\")) {\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 15, (int) (Math.random() * 10) + 40);\n\n if (gameMode == CITY_SAVER)\n bulletSpeed = SPEED * 5;\n else\n bulletSpeed = SPEED * 4;\n temp = new Bullet(\"flame\" + hd, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", bulletSpeed, airShot, owner, -1, -1);\n } else {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n\n if (gameMode == CITY_SAVER)\n bulletSpeed = SPEED * 6;\n else\n bulletSpeed = SPEED * 5;\n temp = new Bullet(\"\" + hd, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", bulletSpeed, airShot, owner, -1, -1);\n }\n temp.setDirection(hd);\n if (temp != null) {\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n }\n if (bullets.size() > BULLET_LIMIT) //remove earliest fired bullet if we have more than the bullet limit\n {\n explosions.add(new Explosion(\"SMALL\", bullets.get(0).getX() - (cellSize / 2), bullets.get(0).getY() - (cellSize / 2), explosionImages, animation_delay));\n bullets.remove(0);\n }\n }\n }", "public void attack(RobotReference target) {\n if (target != null) {\n turnToVector(target.getLocation());\n pointGunToVector(target.getLocation());\n setAhead(60);\n fire(3);\n\n\n }\n }", "public void shoot(ArrayList<Bullet> alienBullets)\r\n\t{\r\n\t\t//do nothing usually\r\n\t}", "public void shoot(Agent agent) throws RemoteException {\n\t}", "public void shoot(double x, double y) {\n if (magazineCounter > 0 && !reloading) {\n magazineCounter--;\n new WeaponProjectile(new Point2D(x, y), mouseLocation(), projectileSpeed, testing);\n }\n }", "void fire() {\r\n // firing a shot takes energy\r\n if (!expendEnergy(BULLET_ENERGY))\r\n return;\r\n\r\n //create a bullet object so it doesn't hit the ship that's firing it\r\n double xV = getXVel() + BULLET_SPEED * (Math.cos(orientation));\r\n double yV = getYVel() + BULLET_SPEED * (Math.sin(orientation));\r\n\r\n // create the actual bullet\r\n new Bullet(\r\n getGame(),\r\n (getXPos() + ((getSize()/2 + 2) * (Math.cos(orientation))) + xV),\r\n (getYPos() + ((getSize()/2 + 2) * (Math.sin(orientation))) + yV),\r\n xV,\r\n yV);\r\n }", "public void takeDamage()\n {\n if(getWorld()!= null)\n {\n if(this.isTouching(Enemies.class))\n {\n Life = Life - Enemies.damage;\n if(Life <=0)\n {\n getWorld().removeObject(this);\n Store.wealth += Game.credit;\n }\n }\n }\n }", "@Override\r\n\tboolean shootAt(int row, int column) {\r\n\t\t\r\n\t\t\tthis.getHit()[0]=true;\r\n\t\t\treturn false;\r\n\t\t\t\r\n\t}", "public void startExecuting() {\n this.attackTime = 20;\n ShulkerEntity.this.updateArmorModifier(100);\n }", "public void bossReset(){\n bossTimer.start();\n this.getView().setTranslateX(x);\n this.getView().setTranslateY(y);\n this.getView().setRotate(0);\n bossTimer.start();\n setHitPoints(getDefaultHp());\n }", "public void update(){\n if (bossMoveTime > 10){\n if(random(0,16) <= 8){\n dir = 1;\n }else{\n dir = -1;\n }\n velX *= dir;\n bossMoveTime = 0;\n }\n posY *= 0.8f;\n posX += velX;\n posY += velY;\n angle += 0.04f;\n bossMoveTime++;\n }", "void takeDamage(int points) {\n this.health -= points;\n }", "public void moveBoss() {\n\t\tdouble position = boss.getTranslateY();\n\t\tspeed = Math.random()*30;\n\t\tif(position > 600-70) {\n\t\t\tRandom r = new Random();\n\t\t\tboss.setTranslateY(-6);\n\t\t\tboss.setTranslateX(r.nextInt(900));\n\t\t}else {\n\t\tboss.setTranslateY(position + speed);\n\t\t}\n\t}", "@Override\r\n\tpublic void onEntityHit(LivingEntity ent) {\n\t\tParUtils.createParticle(Particles.EXPLOSION, loc, 0, 0, 0, 1, 0);\r\n\t\tplaySound(Sound.ENTITY_DRAGON_FIREBALL_EXPLODE,loc,1,1);\r\n\t\tent.setVelocity(dir.multiply(speed));\r\n\t\tdamage(ent, 2, caster);\r\n\t}", "private void ShootListener() {\n shoot.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (presenter.canShoot()) {\n shoot(presenter.getBullet());\n presenter.checkLastBullet();\n }\n\n }\n });\n }", "public int useBomb(){\n //do harm while the animation start\n //cause harm to the boss\n println(\"BEFORE Main.boss.health: \"+Main.boss.health);\n int count = 0;\n if ((Main.boss.alive) && (Main.boss.posY != -1)){\n Main.boss.decreaseHealth(10);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n bossKilled = true;\n }\n }\n println(\"AFTER Main.boss.health: \"+Main.boss.health);\n //remove all bullets\n Main.boss.emptyBullets();\n //kill all the enemies\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n count ++;\n }\n // fill(0,0,0);\n // rect(0,0,width,height);\n return count;\n }", "void playerHandler() {\n player.turnToPoint(mouseX, mouseY);\n if (firing && sTimer < 1) {\n\n Sprite smb = new Sprite(smbulletbase);\n smb.moveToSprite(player);\n if(usingCoil){\n clickEffect = new KTSound(this, coilshotURL);\n ktAudio.add(clickEffect);\n clickEffect.play();\n clickEffect = new KTSound(this, gunshotURL);\n ktAudio.add(clickEffect);\n }\n smBullets.add(smb);\n clickEffect.play();\n if(weapon == \"minigun\"){\n smb.turnToPoint(mouseX+(int)random(-90,90), mouseY+(int)random(-90,90));\n }\n else{\n smb.turnToPoint(mouseX, mouseY);\n }\n\n sTimer = firingSpeed;\n }\n sTimer -= 1;\n \n prevX = player.getX();\n prevY = player.getY();\n\n if (up) {\n player.moveY( - 5);\n // pAngle -= 1;\n }\n if (down) {\n player.moveY(5);\n // pAngle += 1;\n }\n if (left) {\n player.moveX( - 5);\n // pAngle -= 1;\n }\n if (right) {\n player.moveX(5);\n }\n if (player.getY() < player.getH() / 2) {\n player.setY(player.getH() / 2);\n }\n if (player.getY() > 2048 - player.getH() / 2) {\n player.setY(2048 - player.getH() / 2);\n }\n if (player.getX() < player.getH() / 2) {\n player.setX(player.getH() / 2);\n }\n if (player.getX() > 2048 - player.getH() / 2) {\n player.setX(2048 - player.getH() / 2);\n }\n \n \n\n // player.turnToDir(pAngle);\n player.display();\n // player.displayHitbox();\n}", "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }", "private void addEnemySheild() {\n this.enemyShield += 1;\n }", "@Override\r\n\tpublic void execute() {\n\t\tm_FlywheelSubsystem.shoot();\r\n\t}", "private static void shooting() {\n if (m_gamepad.getStartButton() || shootOverride) { //If the start button is pressed\n if (Math.abs(kVelocitySetpoint - -flywheelMaster.getSelectedSensorVelocity()) <= kFlywheelTolerance) { // ... and we're close enough to the desired RPM ...\n SmartDashboard.putBoolean(\"AUTO SHOOT READY\", true); //Alert driver that the shooting is ready\n runConveyor(); //Convey balls into the flywheel\n } else { //If we are NOT within our tolerance\n SmartDashboard.putBoolean(\"AUTO SHOOT READY\", false); //Alert the operator\n }\n if (velocityDipped && -flywheelMaster.getSelectedSensorVelocity() >= kVelocitySetpoint) {\n powerCellCount--;\n velocityDipped = false;\n }\n\n if (-flywheelMaster.getSelectedSensorVelocity() <= kDip /*Placeholder value*/) {\n velocityDipped = true;\n }\n PID(); //Calculate PIDF loop\n flywheelMaster.set(ControlMode.PercentOutput, -speed); //Run the motor at the calculated level\n } else { //If start button is NOT pressed\n flywheelMaster.set(ControlMode.PercentOutput, m_gamepad.getY(GenericHID.Hand.kLeft)); //Set flywheel manually with joystick\n SmartDashboard.putBoolean(\"AUTO SHOOT READY\", false); //Alert operator\n }\n }" ]
[ "0.7726971", "0.7552923", "0.7552923", "0.7538083", "0.74787897", "0.74201936", "0.73777866", "0.7325889", "0.72976696", "0.7106123", "0.7074525", "0.7061754", "0.70409197", "0.7004446", "0.698011", "0.69437253", "0.69275707", "0.68982774", "0.6885112", "0.68823457", "0.68578094", "0.685411", "0.6842088", "0.6826281", "0.6818107", "0.68119764", "0.6776153", "0.6763073", "0.67481166", "0.67454827", "0.6739643", "0.67388445", "0.67117435", "0.66710734", "0.6667374", "0.66608495", "0.66570663", "0.665275", "0.66522497", "0.665099", "0.662522", "0.66123044", "0.659997", "0.6597056", "0.6585409", "0.6581937", "0.6579556", "0.6571276", "0.65597963", "0.65508986", "0.6545593", "0.65291727", "0.65219414", "0.651895", "0.65144545", "0.6496019", "0.64708465", "0.6469341", "0.64685893", "0.64584696", "0.64577466", "0.6450722", "0.64404094", "0.6427413", "0.64207476", "0.6395623", "0.63893634", "0.6382449", "0.6379378", "0.6369528", "0.6369144", "0.63675916", "0.6367247", "0.63650435", "0.6357786", "0.6348876", "0.63460875", "0.6345942", "0.63453984", "0.63373464", "0.6334917", "0.63332224", "0.6317176", "0.6313846", "0.63095295", "0.63008547", "0.62962705", "0.629583", "0.6293118", "0.6285938", "0.6283146", "0.6279992", "0.6274386", "0.62742186", "0.62691313", "0.6265643", "0.62642914", "0.62496626", "0.6247397", "0.62433237" ]
0.8021458
0
track the bullets of the boss, check if the bullet hit the object
public void trackBullets(){ // bossbullet control, if it hit the bound, remove the bullet for(int i = 0; i < bossBullets.size(); i++){ Bullet tempBullet = bossBullets.get(i); tempBullet.update(); tempBullet.drawBullet(); // print (tempBullet.posX, tempBullet.posY,'\n'); if(tempBullet.detectBound()){ bossBullets.remove(i); continue; } if(tempBullet.hitObject(Main.player) && !Main.player.invincible){ Main.player.decreaseHealth(1); Main.player.posX = width / 2; Main.player.posY = height * 9 / 10; Main.player.invincible = true; Main.player.invincibleTime = millis(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void trackBullets(){\n for (int i = 0; i < bullets.size(); i++){\n Bullet tempBullet = bullets.get(i);\n //update the position of the bullets\n tempBullet.update();\n tempBullet.drawBullet();\n //check if the bullet hit the boundary, remove the bullet from the list of the bullet\n if(tempBullet.detectBound()){\n bullets.remove(i);\n continue;\n }\n //detect if the bullet hit the boss and cause the damage if yes\n if(tempBullet.hitObject(Main.boss) && Main.boss.alive){\n Main.boss.decreaseHealth(attack);\n tempBullet.drawHit();\n bullets.remove(i);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n }\n }\n //detect if the bullet hit the enemy and cause the damage if yes\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n if(tempBullet.hitObject(tempEnemy) && tempEnemy.alive){\n tempBullet.drawHit();\n tempEnemy.decreaseHealth(attack);\n // if enemy is totally hitted, wait one 1s, and then removed\n if(tempEnemy.health <= 0){\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n }\n bullets.remove(i);\n break;\n }\n }\n }\n }", "private void bulletCollisionWithObject() {\r\n\t\tif(bullet != null) {\r\n\t\t\tGObject collider = getElementAt(bullet.getX() -1 , bullet.getY() + 1);\r\n\t\t\tif (dragon1 != null && collider == dragon1) {\r\n\t\t\t\thit(dragon1);\r\n\t\t\t}\r\n\t\t\tif(dragon2 != null && collider == dragon2) {\r\n\t\t\t\thit(dragon2);\r\n\t\t\t}\r\n\t\t\tif(mehran != null && collider == mehran && bullet.getY() > mehran.getY() + mehran.getHeight() / 2.0) {\r\n\t\t\t\thit(mehran);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }", "public void checkCollision(){\n\r\n for(int i = 0; i < enemies.size(); i++){\r\n \r\n // Player and Enemy collision\r\n \r\n if(collide(this.player, enemies.get(i)) && this.player.isVisible() && enemies.get(i).isVisible()){\r\n System.out.println(\"Collide\");\r\n this.player.setHealth(this.player.getHealth() - 100);\r\n }\r\n\r\n // Player and Enemy bullet collision\r\n \r\n for(int j =0; j < enemies.get(i).getBullets().size(); j++){\r\n\r\n if(collide(this.player, enemies.get(i).getBullets().get(j)) && this.player.isVisible() && enemies.get(i).getBullets().get(j).isVisible()){\r\n\r\n enemies.get(i).getBullets().get(j).setVisible(false);\r\n this.player.setHealth(this.player.getHealth() - enemies.get(i).getBullets().get(j).getDamage());\r\n\r\n }\r\n }\r\n\r\n }\r\n //time = DEFAULT_TIME_DELAY;\r\n// }\r\n\r\n\r\n\r\n for(int i = 0; i < player.getBullets().size(); i++){\r\n\r\n\r\n // Player bullet and enemy collision\r\n\r\n for(int j = 0; j < enemies.size(); j++) {\r\n if (collide(enemies.get(j), player.getBullets().get(i)) && enemies.get(j).isVisible() && player.getBullets().get(i).isVisible()) {\r\n\r\n if (enemies.get(j).getHealth() < 0) {\r\n enemies.get(j).setVisible(false);\r\n score.addScore(100);\r\n }\r\n\r\n enemies.get(j).setHealth(enemies.get(j).getHealth() - player.getBullets().get(i).getDamage());\r\n // enemies.get(j).setColor(Color.RED);\r\n player.getBullets().get(i).setVisible(false);\r\n\r\n\r\n }\r\n }\r\n\r\n\r\n // Boss collision & player bullet collision\r\n\r\n if(collide(player.getBullets().get(i), this.boss1) && player.getBullets().get(i).isVisible() && boss1.isVisible()){\r\n\r\n if(boss1.getHealth() < 0){\r\n boss1.setVisible(false);\r\n score.addScore(1000);\r\n state = STATE.WIN;\r\n }\r\n this.boss1.setHealth(this.boss1.getHealth() - player.getBullets().get(i).getDamage());\r\n // this.boss1.setHealth(0);\r\n player.getBullets().get(i).setVisible(false);\r\n\r\n }\r\n\r\n }\r\n\r\n // Bullet vs Bullet Collision\r\n\r\n for(int k = 0 ; k < player.getBullets().size(); k++){\r\n\r\n if(player.getBullets().get(k).isVisible()) {\r\n for (int i = 0; i < enemies.size(); i++) {\r\n\r\n if(enemies.get(i).isVisible()) {\r\n for (int j = 0; j < enemies.get(i).getBullets().size(); j++) {\r\n\r\n if (collide(player.getBullets().get(k), enemies.get(i).getBullets().get(j)) && enemies.get(i).getBullets().get(j ).isVisible()) {\r\n\r\n\r\n System.out.println(\"bullets colliding\");\r\n\r\n player.getBullets().get(k).setVisible(false);\r\n enemies.get(i).getBullets().get(j).setColor(Color.yellow);\r\n enemies.get(i).getBullets().get(j).deflect(this.player.getX() + this.player.getW()/2, this.player.getY() + this.player.getH()/2);\r\n\r\n player.getBullets().add(enemies.get(i).getBullets().get(j));\r\n\r\n enemies.get(i).getBullets().remove(enemies.get(i).getBullets().get(j)); //removes bullet\r\n\r\n\r\n k++;\r\n j--;\r\n //enemies.get(i).getBullets().get(j).setVisible(false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n for(int i = 0; i < boss1.getBullets().size(); i++) {\r\n\r\n\r\n if (collide(player.getBullets().get(k), boss1.getBullets().get(i)) && boss1.getBullets().get(i).isVisible()) {\r\n\r\n System.out.println(\"boss bullets colliding\");\r\n player.getBullets().get(k).setVisible(false);\r\n boss1.getBullets().get(i).setColor(Color.yellow);\r\n boss1.getBullets().get(i).deflect(this.player.getX() + this.player.getW()/2, this.player.getY() + this.player.getH()/2);\r\n player.getBullets().add(boss1.getBullets().get(i));\r\n boss1.getBullets().remove(boss1.getBullets().get(i));\r\n k++;\r\n i--;\r\n\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Boss bullet and player collision\r\n\r\n for(Bullet b : boss1.getBullets() ){\r\n\r\n\r\n if(collide(player, b) && player.isVisible() && b.isVisible()){\r\n b.setVisible(false);\r\n player.setHealth(player.getHealth() - b.getDamage());\r\n }\r\n }\r\n\r\n\r\n // Power up collision\r\n\r\n for(PowerUp p : powerUps){\r\n\r\n if(collide(player, p) && p.isVisible()){\r\n\r\n p.executeEffect(this.player);\r\n p.setVisible(false);\r\n }\r\n }\r\n\r\n\r\n\r\n // Deleting out of bound bullets\r\n for(int i = 0; i < player.getBullets().size(); i++){\r\n if(player.getBullets().get(i).getY() < 0 || player.getBullets().get(i).getY() > GameWorld.SCREEN_H ||\r\n player.getBullets().get(i).getX()< 0 || player.getBullets().get(i).getX() > GameWorld.SCREEN_W) {\r\n\r\n player.getBullets().remove(player.getBullets().get(i));\r\n }\r\n }\r\n\r\n }", "@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}", "private void checkForBulletCollisions() {\r\n\t\tbulletMoveOffScreen();\r\n\t\tbulletCollisionWithObject();\r\n\t}", "public boolean hit(Bullet bullet) {\n //System.out.println(\"A golyo nem csapodott meg be semmibe.\");\n return false;\n }", "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "public void enemyShoot()\r\n\t{\r\n\t\tfor (Enemy enemies : enemy)\r\n\t\t{\r\n\t\t\tif (enemies.getHasFired())\r\n\t\t\t{\r\n\t\t\t\tBullet enemyPew = enemies.shoot();\r\n\t\t\t\tif (enemyPew != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.add(enemyPew);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }", "public void detectCollisionPerBullet() {\n//\t\tfor (Bullet bullet : bulletList) {\n\t\tfor (int i=0; i<bulletList.size(); i++) {\n\t\t\tBullet bullet = bulletList.get(i);\n\t\t\tif (bullet != null && !bullet.isDead()) {\n\t\t\t\tdetectCollision(bullet);\n\t\t\t}\n\t\t}\n\t}", "private static void checkCollisions() {\n ArrayList<Entity> bulletsArray = bullets.entities;\n ArrayList<Entity> enemiesArray = enemies.entities;\n for (int i = 0; i < bulletsArray.size(); ++i) {\n for (int j = 0; j < enemiesArray.size(); ++j) {\n if (j < 0) {\n continue;\n }\n if (i < 0) {\n break;\n }\n Entity currentBullet = bulletsArray.get(i);\n Entity currentEnemy = enemiesArray.get(j);\n if (Collision.boxBoxOverlap(currentBullet, currentEnemy)) {\n ++player.hiScore;\n if (currentBullet.collided(currentEnemy)) {\n --i;\n }\n if (currentEnemy.collided(currentBullet)) {\n --j;\n }\n }\n }\n }\n textHiScore.setString(\"HISCORE:\" + player.hiScore);\n\n // Check players with bonuses\n ArrayList<Entity> bonusArray = bonus.entities;\n for (int i = 0; i < bonusArray.size(); ++i) {\n Entity currentBonus = bonusArray.get(i);\n if (Collision.boxBoxOverlap(player, currentBonus)) {\n if (currentBonus.collided(player)) {\n --i;\n player.collided(currentBonus);\n }\n }\n }\n }", "@Override\n protected void doCheckEffect ()\n {\n List<LivingEntity> entities = getLivingEntities(1.5);\n if (entities.size() > 0)\n {\n for (LivingEntity entity : entities)\n {\n if (entity.getUniqueId() == player.getUniqueId())\n continue;\n\n entity.damage(usesModifier * 2, player);\n\n kill();\n return;\n }\n }\n\n // if the spell has hit a solid block, the projectile is stopped and wont go further so kill the spell\n if (hasHitTarget())\n kill();\n }", "HitEnemy checkHits(@NotNull List<Bullet> bullets, Bitmap hitEnemyImage) {\n for (Bullet b : bullets) {\n int enemyXCoordinate = x();\n int enemyYCoordinate = y();\n int enemyWidth = this.getBitmap().getWidth();\n int enemyHeight = this.getBitmap().getHeight();\n\n int bulletXCoordinate = b.x();\n int bulletYCoordinate = b.y();\n int bulletWidth = b.getBitmap().getWidth();\n int bulletHeight = b.getBitmap().getHeight();\n\n // Standard rectangular bitmap intersection formula\n // (Good enough up to +/- the corner pixels, which are not\n // noticeable in the game)\n if (enemyXCoordinate + enemyWidth >= bulletXCoordinate\n && bulletXCoordinate + bulletWidth >= enemyXCoordinate\n && enemyYCoordinate + enemyHeight >= bulletYCoordinate\n && bulletYCoordinate + bulletHeight >= enemyYCoordinate) {\n b.markForRemoval();\n this.markForRemoval();\n\n return new HitEnemy(this.x(), this.y() - 34, hitEnemyImage);\n }\n }\n\n return null;\n }", "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }", "public void checkCollision()\r\n\t{\r\n\t\t//for Bullets against Avatar and Enemy\r\n\t\tfor(int bulletIndex = 0; bulletIndex < bullets.size(); bulletIndex++)\r\n\t\t{\r\n\t\t\tBullet b = bullets.get(bulletIndex);\r\n\t\t\tif (b instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tboolean collided = false;\r\n\t\t\t\tfor (int enemyIndex = 0; enemyIndex < enemy.size(); enemyIndex++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy e = enemy.get(enemyIndex);\r\n\t\t\t\t\tif(((AvatarBullet) b).collidedWith(e))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\t\tenemy.remove(enemyIndex);\r\n\t\t\t\t\t\tenemyIndex --;\r\n\t\t\t\t\t\tcollided = true;\r\n\t\t\t\t\t\tint score = getScore()+1;\r\n\t\t\t\t\t\tsetScore(score);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (b instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tif (((EnemyBullet) b).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\tint health = Avatar.getLives()-1;\r\n\t\t\t\t\tavatar.setLives(health);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int platformIndex = 0; platformIndex < platforms.size(); platformIndex++)\r\n\t\t{\r\n\t\t\tPlatforms p = platforms.get(platformIndex);\r\n\t\t\tif (p instanceof Platforms)\r\n\t\t\t{\r\n\t\t\t\t//boolean collided = false;\r\n\t\t\t\t//Avatar a = avatar.get(enemyIndex);\r\n\t\t\t\tif(((Platforms) p).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void UpdateBullets()\n\t {\n\t for(int i = 0; i < BulletList.size(); i++)\n\t {\n\t Bullet bullet = BulletList.get(i);\n\t \n\t // Move the bullet.\n\t bullet.Update();\n\t \n\t // checks if the bullet has it left the screen\n\t if(bullet.HasLeftScreen()){\n\t BulletList.remove(i);\n\t \n\t continue;\n\t }\n\t \n\t // checks if the bullet hit the enemy\n\t Rectangle BulletRectangle = new Rectangle((int)bullet.xCoord, (int)bullet.yCoord, bullet.BulletImage.getWidth(), bullet.BulletImage.getHeight());\n\t // Go trough all enemies.\n\t for(int j = 0; j < EnemyList.size(); j++)\n\t {\n\t Enemy eh = EnemyList.get(j);\n\n\t \n\t Rectangle EnemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\n\t // Checks whether the the bullet has hit the enemy\n\t if(BulletRectangle.intersects(EnemyRectangel))\n\t {\n\t // Bullet hit the enemy so we reduce his health.\n\t eh.Health -= Bullet.DamagePower;\n\t \n\t // Bullet was also destroyed so we remove it.\n\t BulletList.remove(i);\n\t \n\t \n\t }\n\t }\n\t }\n\t }", "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "@Override\n public void update(Bullet b){\n if(!(b.getData() instanceof DriverBulletData)){\n hit(b);\n return;\n }\n\n float hitDst = 7f;\n\n DriverBulletData data = (DriverBulletData) b.getData();\n\n //if the target is dead, just keep flying until the bullet explodes\n if(data.to.isDead()){\n return;\n }\n\n float baseDst = data.from.distanceTo(data.to);\n float dst1 = b.distanceTo(data.from);\n float dst2 = b.distanceTo(data.to);\n\n boolean intersect = false;\n\n //bullet has gone past the destination point: but did it intersect it?\n if(dst1 > baseDst){\n float angleTo = b.angleTo(data.to);\n float baseAngle = data.to.angleTo(data.from);\n\n //if angles are nearby, then yes, it did\n if(Mathf.angNear(angleTo, baseAngle, 2f)){\n intersect = true;\n //snap bullet position back; this is used for low-FPS situations\n b.set(data.to.x + Angles.trnsx(baseAngle, hitDst), data.to.y + Angles.trnsy(baseAngle, hitDst));\n }\n }\n\n //if on course and it's in range of the target\n if(Math.abs(dst1 + dst2 - baseDst) < 4f && dst2 <= hitDst){\n intersect = true;\n } //else, bullet has gone off course, does not get recieved.\n\n if(intersect){\n data.to.handlePayload(b, data);\n }\n }", "public void defensive_act()\r\n\t{\r\n\t\tBullet closestBullet = IMAGINARY_BULLET;\r\n\t//\tBullet secondClosestBullet = IMAGINARY_BULLET;\r\n\t\t\r\n\t\tActor machines;\r\n\t\tEnumeration<Actor> opponent = ((MachineInfo)data.get(TankFrame.PLAYER_1)).getHashtable().elements();\r\n\t\twhile(opponent.hasMoreElements())\r\n\t\t{\r\n\t\t\tmachines = (Actor) opponent.nextElement();\r\n\t\t\tif(machines instanceof Bullet)\r\n\t\t\t{\r\n\t\t\t\tif(machines.getPoint().distance(getPoint()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t{\r\n\t\t\t\t\tclosestBullet = (Bullet)machines;\r\n\t\t\t\t\tLine2D aim = new Line2D.Double(getCenterX(), getCenterY(), closestBullet.getPosX(), closestBullet.getPosY() );\r\n\t\t\t\t\tSystem.out.println(aim.getP1().distance(aim.getP2()));\r\n\t\t\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t\t\taimAndShoot(aim);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t/*\tif(machines.getPoint().distance(getPoint()) > secondClosestBullet.getPoint().distance(getPoint()) \r\n\t\t\t\t\t&& machines.getPoint().distance(getPoint()) < closestBullet.getPoint().distance(getPoint()))\r\n\t\t\t\t\tsecondClosestBullet = (Bullet)machines;*/\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 * Find the line\r\n\t\t */\r\n\t\t/*if(!closestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), closestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(getCenterX(), getCenterY(), (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\t/*bulletPath = new Line2D(getRightPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\tbulletPath = new Line2D(getPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);*/\r\n\t\t\t\r\n\t\t//}\r\n\t/*\tif(!secondClosestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), secondClosestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t}*/\r\n\r\n\t}", "public void gotHit(Bullet bullet) {\n\t\tif (bullet.getOwner() != this) {\n\t\t\tDefaultModeScoring.addHitScore(bullet.getOwner());\n\t\t\tAudioManager.startAudio(bullet.getSoundName());\n\t\t\tif (!isDead())\n\t\t\t\tAudioManager.startAudio(getSoundName());\n\t\t\tsetHp(getHp() - bullet.getDamage());\n\t\t\tif (bullet.getSpeed().x() > 0)\n\t\t\t\tgetPush().setX(getPush().x() + bullet.getPush());\n\t\t\telse\n\t\t\t\tgetPush().setX(getPush().x() - bullet.getPush());\n\t\t\tif (getHp() <= 0 && !isDead())\n\t\t\t\tdie();\n\t\t}\n\t}", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "private void checkBulletWallCollision() {\n\t\tArrayList<Missile> heroMissiles = hero.getMissiles();\n\t\tArrayList<Missile> hero2Missile = computer.getMissiles();\n\n\t\tdouble x1Wall, y1Wall, x2Wall, y2Wall, x1Bullet, y1Bullet, x2Bullet, y2Bullet;\n\t\tboolean left, right, top, bottom;\n\n\t\t// tank 1 bullets and wall collision\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m1 = heroMissiles.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\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\n\t\t// tank 2 bullets and wall collision\n\t\tfor (int i = 0; i < hero2Missile.size(); i++) {\n\t\t\tMissile m1 = hero2Missile.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\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}", "private void enemiesWillShoot(Graphics2D g2d, GameState state) {\n if (numOfRenderShoot == 75) {\n numOfRenderShoot = 0;\n for (int i = 0; i < state.getEnemyTanks().size(); i++) {\n if (state.getEnemyTanks().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTanks().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTanks().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTanks().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyMissiles().add(new EnemyMissile(this, state, 10\n , state.getEnemyTanks().get(i)));\n state.getEnemyMissiles().get(state.getEnemyMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyCars().size(); i++) {\n if (state.getEnemyCars().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyCars().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyCars().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyCars().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyBullets().add(new EnemyBullet(this, state, 20\n , state.getEnemyCars().get(i)));\n state.getEnemyBullets().get(state.getEnemyBullets().size() - 1).bulletDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyWallTurrets().size(); i++) {\n if (state.getEnemyWallTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyWallTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyWallTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyWallTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyWallTurretMissiles().add(new EnemyWallTurretMissile(this, state, 15\n , state.getEnemyWallTurrets().get(i)));\n state.getEnemyWallTurretMissiles().get(state.getEnemyWallTurretMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n\n for (int i = 0; i < state.getEnemyTurrets().size(); i++) {\n if (state.getEnemyTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyHomingMissiles().add(new EnemyHomingMissile(this, state, 15\n , state.getEnemyTurrets().get(i)));\n state.getEnemyHomingMissiles().get(state.getEnemyHomingMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n }\n for (EnemyMissile enemyMissile : state.getEnemyMissiles()) {\n enemyMissile.paint(g2d, state);\n }\n for (EnemyBullet enemyBullet : state.getEnemyBullets()) {\n enemyBullet.paint(g2d, state);\n }\n for (EnemyWallTurretMissile enemyWallTurretMissile : state.getEnemyWallTurretMissiles()) {\n enemyWallTurretMissile.paint(g2d, state);\n }\n for (EnemyHomingMissile enemyHomingMissile : state.getEnemyHomingMissiles()) {\n enemyHomingMissile.paint(g2d, state);\n }\n }", "public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}", "void smallgunHandler() {\n for (Sprite smb: smBullets) {\n \n smb.display();\n if(usingCoil){\n smb.forward(120);\n }else{\n smb.forward(40);\n }\n\n }\n}", "void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }", "private void fireball1Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball1.getX() - 1, fireball1.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball1.getX() - 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tGObject topRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY());\r\n\t\tGObject bottomRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tif(topLeft == player || bottomLeft == player || topRight == player || bottomRight == player) {\r\n\t\t\tremove(fireball1);\r\n\t\t\tfireball1 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "public void checkForDeath()\n {\n Bullet2 bullet2 = new Bullet2(getVelocity(), getRotation());\n myWorld2 world = (myWorld2)getWorld();\n Zombie2 zombie = new Zombie2();\n \n if (isTouching(Bullet2.class))\n {\n health -= bullet2.damage;\n \n if(health < 0)\n {\n world.score(2);\n world.removeObject(this);\n } \n }\n else if (getX() == 900) \n {\n world.score(-1);\n world.removeObject(this);\n } \n }", "private void intersectBulletWithEnemy(Entity bullet, Entity enemy){\n\n //TODO implement health/damage system for enemies\n room.removeEntity(enemy);\n room.getEntityManager().removeEntity(enemy);\n\n //delete the bullet\n room.getEntityManager().removeEntity(bullet);\n ((WeaponComponent) player.getComponent(ComponentType.WEAPON)).getBullets().removeEntity(bullet);\n\n }", "public void shoot(ArrayList<Bullet> alienBullets)\r\n\t{\r\n\t\t//do nothing usually\r\n\t}", "public void gettingAttacked(HitByBulletEvent e) {\r\n\t\tif (gotTarget) {\r\n\t\t\tfor (int i = 0; i < enemyTracker.getEnemyList().size(); i++) {\r\n\t\t\t\tif (enemyTracker.getEnemyList().get(i).getName().equals(e.getName()) && (!e.getName().equals(radarTarget.getName()))) {\r\n\t\t\t\t\t\tmrRobot.sendMessage(5, \"2\");\r\n\t\t\t\t\t\tradarTarget = enemyTracker.getEnemyList().get(getIndexForEnemy(e.getName()));\r\n\t\t\t\t\t\ttargetTracking.get(getIndexForName(mrRobot.getName())).updateTarget(radarTarget);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void update(){\n\n // advance player and entity loader\n player.advance();\n entityloader.advance();\n\n // if the player is shooting\n if (player.isShooting){\n player.nextBullet--;\n if (player.nextBullet < 0){\n audioloader.play(\"plshoot\"); // play audio\n for (int i = -1; i <= 1; ++i){\n playerBullets.add(new Projectile<RectangleHitbox>(player.getCenterX(), player.getCenterY(), 500, 0, 270 + 2.5 * i, 0, 0, false, 1.5, true, 0,\n player.bulletSprite.getRectangleHitbox(player.bulletSize), player.bulletSprite.img.getScaledInstance(player.bulletSize, player.bulletSize, 1), 0, 0, this));\n } \n player.nextBullet = (int)(FPS / player.bulletsPerSecond);\n }\n }\n\n // Player bullets\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n if (bullet.advance()){\n nextPlayerBullets.add(bullet);\n }\n }\n playerBullets.clear();\n for (Projectile<RectangleHitbox> bullet : nextPlayerBullets){\n playerBullets.add(bullet);\n }\n nextPlayerBullets.clear();\n\n // Circle Enemies\n for (Projectile<CircleHitbox> enemy : circleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (!enemy.isBullet){ // if enemy is not a bullet, check if it is being hit by player bullets\n boolean hit = false; // each enemy can only be hit once each frame\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n hit |= bullet.getHitbox().intersects(enemy.getHitbox());\n if (hit)\n break;\n }\n if (hit){\n enemy.damageTaken += enemy.originalLifetime * enemy.percentDamage;\n }\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextCircleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n circleEnemies.clear();\n for (Projectile<CircleHitbox> enemy : nextCircleEnemies){ // swap nextCircleEnemies with circleEnemies\n circleEnemies.add(enemy);\n }\n nextCircleEnemies.clear();\n\n // Rectangle Enemies\n for (Projectile<RectangleHitbox> enemy : rectangleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextRectangleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n rectangleEnemies.clear();\n for (Projectile<RectangleHitbox> enemy : nextRectangleEnemies){ // swap nextRectangleEnemies with rectangleEnemies\n rectangleEnemies.add(enemy);\n }\n nextRectangleEnemies.clear();\n\n }", "private void CheckWorldCollision() {\n\t\tfor(WorldObj obj : World.CurrentWorld.SpawnedObjects) {\n\t\t\tif(bounds.overlaps(obj.bounds))\n\t\t\t\tobj.OnCollision(this);\n\t\t\tif(MapRenderer.CurrentRenderer.ItemAnimation != null) {\n\t\t\t\tif(obj.ai != null) {\n\t\t\t\t\tif(dir == LEFT)\n\t\t\t\t\tAttackBounds.set(pos.x+(dir*1.35f)+0.5f,pos.y,1.35f,1);\n\t\t\t\t\telse\n\t\t\t\t\t\tAttackBounds.set(pos.x+0.5f,pos.y,1.35f,1);\n\t\t\t\t\tif(obj.healthBarTimer > 0.4f)\n\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\tif(!Terrain.CurrentTerrain.isSolid((int)(pos.x+0.5f+(0.3f*dir)), (int)(pos.y+0.5f)))\n\t\t\t\t\tobj.ai.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\tHitTimer = 0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(obj.damageable) {\n\t\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\t\tobj.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void checkCollision() {\n\t\tfor(SolidObject i : solidObjects) {\r\n\t\t\tif(getBounds().intersects(i.getBounds())) {\r\n\t\t\t\t//Increments the KillCount\r\n\t\t\t\tif(i.onAttack(damage, flipped)) {\r\n\t\t\t\t\tkillCount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void checkCol() {\n Player player = gm.getP();\n int widthPlayer = (int) player.getImg().getWidth();\n int heightPlayer = (int) player.getImg().getHeight();\n Bullet dummyBuullet = new Bullet();\n int widthBullet = (int) dummyBuullet.getImg().getWidth();\n int heightBullet = (int) dummyBuullet.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n // the bullet must be an enemy bullet\n if (bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the bullet location is inside the rectangle of player\n if ( Math.abs( bullet.getX() - player.getX() ) < widthPlayer / 2\n && Math.abs( bullet.getY() - player.getY() ) < heightPlayer / 2 ) {\n // 1) destroy the bullet\n // 2) decrease the life of a player\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n bullet.setActive(false);\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n break;\n }\n }\n }\n // 2'nd case\n // the enemy is hit with player bullet\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n if (!bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the player bullet location is inside the rectangle of enemy\n if (Math.abs(enemy.getX() - bullet.getX()) < (widthBullet / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - bullet.getY()) < (heightBullet / 2 + heightEnemy / 2)) {\n // 1) destroy the player bullet\n // 2) destroy the enemy\n if (destroyedEnemy % 3 == 0 && destroyedEnemy != 0) onlyOnce = 0;\n destroyedEnemy++;\n gm.increaseScore();\n enemy.setActive(false);\n\n\n if(enemy.hTitanium()) {\n gm.getTitaniumList()[gm.getTitaniumIndex()].setX(enemy.getX());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setY(enemy.getY());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setActive(true);\n gm.increaseTitaniumIndex();\n }\n\n if(enemy.hBonus()) {\n \tgm.getBonusList()[gm.getBonusIndex()].setX(enemy.getX());\n \tgm.getBonusList()[gm.getBonusIndex()].setY(enemy.getY());\n \tgm.getBonusList()[gm.getBonusIndex()].setActive(true);\n \tgm.increaseBonusIndex();\n }\n bullet.setActive(false);\n break;\n }\n }\n }\n }\n }\n\n // 3'rd case\n // the player collided with enemy ship\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n // the condition when the enemy rectangle is inside the rectangle of player\n if (Math.abs(enemy.getX() - player.getX()) < (widthPlayer / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - player.getY()) < (heightPlayer / 2 + heightEnemy / 2)) {\n // 1) destroy the enemy\n // 2) decrease the player's life\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n enemy.setActive(false);\n\n break;\n }\n }\n }\n\n for (Bonus bonus : gm.getBonusList()) {\n if (bonus.isActive()) {\n int widthBonus = (int) bonus.getImg().getWidth();\n int heightBonus = (int) bonus.getImg().getHeight();\n if (Math.abs(bonus.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(bonus.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n bonus.setActive(false);\n if (bonus.getType() == 1) {\n if (player.getLives() < player.getMaxLives()) {\n player.setLives(player.getLives() + 1);\n }\n }\n else{\n superAttack = 1;\n }\n }\n }\n }\n\n for (Titanium titanium : gm.getTitaniumList()) {\n if (titanium.isActive()) {\n int widthBonus = (int) titanium.getImg().getWidth();\n int heightBonus = (int) titanium.getImg().getHeight();\n if (Math.abs(titanium.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(titanium.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n titanium.setActive(false);\n gm.getP().increaseTitanium();\n }\n }\n }\n\n }", "private void bladeAndActorOverlap() {\n for (BirdActor bird : birdList) {\n if (bird.isCircleOverlap(bladeActor.boundaryCircle)) {\n ExplosionActor explosionActor = new ExplosionActor(bird.getX(), bird.getY(), 0.03333f, explosionAtlas, Animation.PlayMode.NORMAL);\n gameStage.addActor(explosionActor);\n bird.setRandomPosition(birdActorLowestYPos);\n bird.flyAction.restart();\n lblHighScore.setText(scoreDefaultTxt + String.format(\"%04d\", ++score));\n ++destroyInOneShoot;\n }\n }\n }", "private boolean detectCollisions(GameState mGaemState,ArrayList<GameObject> objects,SoundEngine se,ParticleSystem ps){\n boolean playerHit = false;\n for (GameObject go1:objects){\n if (go1.checkActive()){\n //the 1st object is active\n //so worth checking\n\n for (GameObject go2:objects){\n if (go2.checkActive()){\n //the 2nd object is active\n //so worth checking\n if (RectF.intersects(go1.getTransform().getCollider(),go2.getTransform().getCollider())){\n\n //switch goes here\n //there has been a collision\n //but does it matter?\n switch (go1.getTag() + \" with \" + go2.getTag()){\n case \"Player with Alien Laser\":\n playerHit = true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player with Alien\":\n playerHit =true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player Laser with Alien\":\n mGaemState.increaseScore();\n //respawn the alien\n ps.emitParticles(new PointF(go2.getTransform().getLocation().x,go2.getTransform().getLocation().y));\n go2.setInactive();\n go2.spawn(objects.get(Level.PLAYER_INDEX).getTransform());\n go1.setInactive();\n se.playAlienExplode();\n\n break;\n\n default:\n break;\n }\n\n }\n }\n }\n }\n }\n return playerHit;\n }", "void hit(GameObject o){\r\n\t\tif (!shield){ // if sheild is on all hits do nothing\r\n\t\t\tif (!(o instanceof UpPower)){ // if didnt hit a power up the ship loses a life\r\n\t\t\t\tif (lives > 1) {\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t\treset();\r\n\t\t\t\t}\r\n\t\t\t\telse { // once there is no life left the ship dies\r\n\t\t\t\t\tdead = true;\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void fireBullet(){\n\t\tBullet bullet = new Bullet(ship);\n\t\tbullets.add(bullet);\n\t\tsoundMan.playBulletSound();\n\t}", "public void draw() {\r\n\r\n if (this.z == 2) {\r\n //--- Shooting//---\r\n for (Enemy e: this.td.getEnemies()) {\r\n if (e.getX() < this.x + this.size / 2\r\n && e.getX() + e.getSize() > this.x - this.size / 2) {\r\n if (e.getY() < this.y + this.size / 2\r\n && e.getY() + e.getSize() > this.y - this.size / 2) {\r\n if (!this.firing) {\r\n this.firing = true;\r\n this.target = e;\r\n }\r\n } else {\r\n this.firing = false;\r\n }\r\n }\r\n this.firing();\r\n }\r\n }\r\n this.update();\r\n\r\n }", "float shouldAggroOnHit(IGeneticMob geneticMob, EntityLiving attacker);", "private void tankWillShoot(Graphics2D g2d, GameState state) {\n if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() > 0 && state.getGunType() % 2 == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfCannonBullet(tankObject.getNumOfCannonBullet() - 1);\n if (tankObject.getCannonLevel() == 1) {\n state.getMissiles().add(new Missile(state, 15));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (tankObject.getCannonLevel() == 2) {\n state.getMissiles().add(new Missile(state, 30));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n } else if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() == 0 && state.getGunType() % 2 == 1) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n state.setMouseClicked(false);\n }\n for (Missile missile : state.getMissiles()) {\n missile.paint(g2d, state);\n }\n if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() > 0 && state.getGunType() % 2 == 0) {\n if (numOfRenderBullet1 == 0 && tankObject.getMachineGunLevel() == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 20));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet2 == 0 && tankObject.getMachineGunLevel() == 2) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 30));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet1 <= 7) {\n numOfRenderBullet1++;\n }\n if (numOfRenderBullet1 == 7) {\n numOfRenderBullet1 = 0;\n }\n if (numOfRenderBullet2 <= 3) {\n numOfRenderBullet2++;\n }\n if (numOfRenderBullet2 == 3) {\n numOfRenderBullet2 = 0;\n }\n }\n else if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() == 0 && state.getGunType() % 2 == 0) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n }\n for (Bullet bullet : state.getBullets()) {\n bullet.paint(g2d, state);\n }\n }", "public void checkForHits(){\n\t\tfor(Missile missile : this.missiles){\n\t\t\tif(missile != null && !missile.isDestroyed()){\n\t\t\t\t// Check buildings\n\t\t\t\tfor (int i = 0; i < this.buildings.length; i++) {\n\t\t\t\t\tif(!this.buildings[i].isDestroyed()){\n\t\t\t\t\t\tif (this.buildings[i].getHitBox().intersects(missile.getHitBox())) {\n\t\t\t\t\t\t\tthis.buildings[i].destroy();\n\t\t\t\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Check turrets\n\t\t\t\tfor (int i = 0; i < this.turrets.length; i++ ) {\n\t\t\t\t\tif(!this.turrets[i].isDestroyed()){\n\t\t\t\t\t\tif (!missile.isFriendly() && this.turrets[i].getHitBox().intersects(missile.getHitBox())) {\n\t\t\t\t\t\t\tthis.turrets[i].destroy();\n\t\t\t\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\t\t\t\tbreak;\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// Checks Missile vs. Friendly Missile collisions\n\t\t\t\tfor (Missile fMissile : this.friendlyMissiles){\n\t\t\t\t\tif(!fMissile.isDestroyed() && fMissile != null){\n\t\t\t\t\t\tif (missile.getHitBox().intersects(fMissile.getHitBox())) {\n\t\t\t\t\t\t\tfMissile.setDestroyed(true);\n\t\t\t\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\t\t\t\tthis.incrementScore(this.SCORE_INCREASE);\n\t\t\t\t\t\t\tbreak;\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}", "public boolean handleFireballCollisions(ArrayList<Fireball> fireballs) {\n\t\tboolean isCollide = false; \n\t\t//temporary variable to store status that whether hero \n\t\t//is hitted by fireball\n\t\tfor (int i = 0;i < fireballs.size(); i++) {\n\t\t\tif (graphic.isCollidingWith(fireballs.get(i).getGraphic()) == true) {\n\t\t\t\tisCollide = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (isCollide == true) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "private void checkCollision()\n {\n if (gameOverBool==false)\n { \n Actor a = getOneIntersectingObject(Wall.class);\n if (a != null||isAtEdge())\n {\n setImage(\"gone.png\");//laat de helicopter verdwijnen\n //greenfoot.GreenfootSound.stop(\"helisound.wav\");\n World world = getWorld();\n world.addObject(new Explosion(), getX(), getY());\n Greenfoot.playSound(\"heliExplosion.wav\");\n world.addObject( new Gameover(), 600, 300 );\n gameOverBool = true; \n }\n } \n }", "@Override\n\tpublic void onCollision(WorldObj obj) {\n\t\tif(obj.removalFlag)\n\t\t\treturn;\n\t\t\n\t\t\n\t\tif(obj.item != null) {\n\t\t\t\n\t\t\t\n\t\t\tif(obj.stateTime > 0.2f) {\n\t\t\t\tAddItemToBag(obj.item,obj.stack);\n\t\t\t\tobj.removalFlag = true;\n\t\t\t\t\n\t\t\t\tGdx.app.debug(\"\", \"\"+obj.stack);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tsuper.onCollision(obj);\n\t}", "public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Paramos tudo o que estamos fazendo.\n\t\tstop();\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\n\t\t// Giramos a arma na direção do disparo\n\t\tdouble turnGunAmt = Utils.normalRelativeAngleDegrees(e.getBearing() + getHeading() - getGunHeading());\n\t\tturnGunRight(turnGunAmt);\n\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\t\tback(400); // Recuamos\n\t}", "public static void checkAvatarBulletCollision(List<Node> aB, Node fE, Node sE, Node tE, Node foE, Node fiE, Node siE, Node seE, Node eiE, Node niE, Node tenE, Node eleE, Node tweE, Node thE, Node fouE, Node fifE, Pane p)\r\n\t{\r\n\t\tfor(Node avatarBullet : aB)\r\n\t\t{\r\n\t\t\tif(fE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\t//remove enemy\r\n\t\t\t\tfE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(fE);\r\n\t\t\t\tsetEnemyOne(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(sE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tsE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(sE);\r\n\t\t\t\tsetEnemyTwo(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(tE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\ttE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(tE);\r\n\t\t\t\tsetEnemyThree(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(foE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tfoE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(foE);\r\n\t\t\t\tsetEnemyFour(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(fiE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tfiE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(fiE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(siE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tsiE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(siE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(seE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tseE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(seE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(eiE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\teiE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(eiE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(niE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tniE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(niE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(tenE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\ttenE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(tenE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(eleE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\teleE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(eleE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(tweE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\ttweE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(tweE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(thE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tthE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(thE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(fouE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tfouE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(fouE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(fifE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tfifE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(fifE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean hit(float[] bInfo){\n\t\tfloat bx=bInfo[0],by=bInfo[1],xpd=bInfo[2],ypd=bInfo[3];\r\n int sx = (int)bx,sy=(int)by,ex=(int)(bx+xpd),ey=(int)(by+ypd);\r\n //print(\"shot in your area \" + commu.getAddr());\r\n /*float PX = xPos,PY=yPos;\r\n double opme = angleBP(sx,sy,(int)PX,(int)PY);\r\n double shotang = angleBP(sx,sy,ex,ey);\r\n //println(\" difang \" + opme + \" ashot\" + shotang);\r\n double angle = min(min(abd(opme-shotang),abd(opme+(2*Math.PI)-shotang)),abd(opme-((2*Math.PI)+shotang)));\r\n double distance = DBP((int)PX,(int)PY,sx,sy)*Math.sin((float)angle);\r\n //println(\"distance to bullet path \" + distance + \" angle \" + angle + \" hyp \" + DBP((int)PX,(int)PY,sx,sy));\r\n if(distance<10){\r\n \treturn true; \r\n }\r\n return false;*/\r\n if((sx>xPos && sx < xPos+size) || (ex>xPos && ex< xPos+size)){\r\n \tif((sy>yPos && sy < yPos+size) || (ey>yPos && ey< yPos+size)){\r\n \treturn true;\r\n }\r\n }\r\n return false;\r\n }", "public void Fire()\n {\n Random random = new Random();\n int randNum = random.nextInt(limit);\n\n //Check to see if this bomb is dropped\n if(!owner.BehindInvader() && !this.Visible() && randNum == HIT_VAL)\n {\n //Set this bomb to visible\n this.Visible(true);\n this.PlaySound();\n this.x = this.owner.X();\n this.y = this.owner.Y();\n }\n\n //Check for collision with the defender\n if(Bomb.enemy.Visible() && this.Visible() && this.Collision(Bomb.enemy))\n {\n Bomb.enemy.Hit();\n this.Visible(false);\n }\n //Move the bomb down\n else if(this.Visible())\n {\n this.y++;\n\n //Check for collision with the floor\n if(this.y >= GameConstants.GROUND - this.imageHeight)\n {\n this.Visible(false);\n }\n //Check for collision with the barriers\n for(Barrier barrier : Bomb.barriers.Barriers())\n {\n for(BarrierBlock block : barrier.BarrierBlocks())\n {\n if(this.Collision(block))\n {\n block.Visible(false);\n //Removal could cause Comodification issue\n block.Damaged(true);\n this.Visible(false);\n //May not need this return\n return;\n }\n }\n }\n }\n }", "public void tick()\n{\n y+=speed;\n\n for(int i=0; i<game.ea.size(); i++)\n {\n EntityA tempEnt= game.ea.get(i);\n if(Physics.Coliision(this,tempEnt))\n {\n c.removeEntity(tempEnt); //zeby po trafieniu znikal pocisk\n c.removeEntity(this);\n game.setEnemy_killed(game.getEnemy_killed()+1);\n\n }\n }\n\n/*\n* If Enemy is out of bounds player get - points\n* and loses some stamina.\n*\n* Enemies are removed from list after disapears\n */\n\n if(y>(App.getHEIGHT()-20)*2)\n {\n App.addHealth(-10);\n App.addPOINTS(-3);\n c.removeEntity(this);\n }\n\n anim.runAnimation();\n\n /*\n * If App is not in game state it doesn't\n * need to have any enemies\n */\n\n if(App.State != App.STATE.GAME)\n {\n delEnemies();\n\n }\n}", "private void checkOnHit(View v) {\n float bulletX = v.getX();\n float bulletY = v.getY();\n float ufoX = ufo.getX();\n float ufoY = ufo.getY();\n\n if (presenter.checkOnHit(bulletX, bulletY, ufoX, ufoY)) {\n presenter.increasePoint();\n presenter.updatePoints();\n v.setVisibility(View.INVISIBLE);\n }\n }", "private void fireball2Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball2.getX() - 1, fireball2.getY());\r\n\t\tGObject topRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball2.getX() - 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tGObject bottomRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(fireball2);\r\n\t\t\tfireball2 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "private void handleCollisions() {\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tcheckInvaderDeath(a);\n\t\t\t\tcheckPlayerDeath(a);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (Shot s : enemyShotList) {\n\t\t\t\n\t\t\tif (s.detectDownwardCollision(player.getX(), player.getY())) {\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcollectPowerUp(armorPiercing);\n\t\tcollectPowerUp(explosive);\n\t}", "void collisionDetection() {\n\t\tfor (int a = 0; a < botsList.size(); a++) {\r\n\t\t\tfor (int b = 0; b < botsList.size(); b++) {\r\n\r\n\t\t\t\tif (a == b) // Avoid checking if bot hits itself.\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\ttime = System.currentTimeMillis();\r\n\t\t\t\tif (time - botsList.get(a).enemy_last_detected > botsList.get(a).enemy_detect_timeout) {\r\n\t\t\t\t\tfor (int i = 0; i > botsList.get(b).bullets.size(); i++) {\r\n\t\t\t\t\t\tif (colides(botsList.get(a), botsList.get(b).bullets.get(i)))\r\n\t\t\t\t\t\t\tbotsList.get(a).loseLife();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (botsList.get(0).detect.intersects(botsList.get(1).body.getFrame())) {\r\n\t\t\tbotsList.get(0).enemyDetected(botsList.get(1).body);\r\n\t\t\tbot_1_detect = false;\r\n\t\t\tbot_1_detected = System.currentTimeMillis();\r\n\t\t}\r\n\t\tif (System.currentTimeMillis() - bot_1_detected > bot_1_detect_timeout)\r\n\t\t\tbot_1_detect = true;\r\n\t\t// and now same for bot 2\r\n\t\tif (botsList.get(1).detect.intersects(botsList.get(0).body.getFrame())) {\r\n\t\t\tbotsList.get(1).enemyDetected(botsList.get(0).body);\r\n\t\t\tbot_2_detect = false;\r\n\t\t\tbot_2_detected = System.currentTimeMillis();\r\n\t\t}\r\n\t\tif (System.currentTimeMillis() - bot_2_detected > bot_2_detect_timeout)\r\n\t\t\tbot_2_detect = true;\r\n\r\n\t\t// Bullets collision\r\n\t\t// See if bot_n hits the other bot with a bullet\r\n\t\tfor (int mainB = 0; mainB < botsList.size(); mainB++) {\r\n\t\t\tfor (int secB = 0; secB < botsList.size(); secB++) {\r\n\r\n\t\t\t\tif (secB == mainB)\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t// if player_2 collides with player 1's bullets\r\n\t\t\t\tfor (int i = 0; i < botsList.get(mainB).bullets.size(); i++) {\r\n\t\t\t\t\tif (colides(botsList.get(secB), botsList.get(mainB).bullets.get(i))) {\r\n\t\t\t\t\t\tSystem.out.println(\"Bot \" + 2 + \" intersects bullet nš \" + i);\r\n\t\t\t\t\t\tbotsList.get(mainB).bullets.remove(i);\r\n\t\t\t\t\t\tbotsList.get(secB).loseLife();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if player_1 collides with player 2's bullets\r\n\t\tfor (int i = 0; i < botsList.get(1).bullets.size(); i++) {\r\n\t\t\tif (colides(botsList.get(0), botsList.get(1).bullets.get(i))) {\r\n\t\t\t\tSystem.out.println(\"Bot \" + 2 + \" intersects bullet nš \" + i);\r\n\t\t\t\tbotsList.get(1).bullets.remove(i);\r\n\t\t\t\tbotsList.get(0).loseLife();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }", "private void killBullet() {\r\n this.dead = true;\r\n }", "public static void removeBody(Body obj, Body bullet) {\r\n \tif(obj==myPlayer.getBody()) {\r\n \t\t//We've been hit.\r\n \t\tmyPlayer.takeDamage(0.09f);\r\n \t}\r\n \tbulletsToRemove.add(bullet);\r\n }", "@Override\n\tpublic void collideWith(Bullet bullet) {\n\t\tbulletMoveForward(bullet);\n\t}", "public void drawBullets(){\n if(!world.getPlayer().getWeapon().getBullets().isEmpty()) {\n for (Bullet b : world.getPlayer().getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y * ppuY,\n b.SIZE * ppuX, b.SIZE * ppuY);\n }\n }\n if(!world.getEnemies().isEmpty()) {\n for(Enemy e: world.getEnemies()){\n if(!e.getWeapon().getBullets().isEmpty()){\n for (Bullet b : e.getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }\n }\n if(!world.getBullets().isEmpty()) {\n for(Bullet b : world.getBullets()){\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }", "@Override\n\tpublic void shoot() {\n\t\tthis.fired = true;\n\t\tghost.shot=true;\n\t}", "private void notdrawy()\n\t{\n\t\t// check if a flag for a item has been set to see if the item has died and remove it from the arraylist\n\t\tfor (int i =0; i < drawableItems.size();i++)\n\t\t\tif (drawableItems.get(i).isDead())\n\t\t\t{\n\t\t\t\t//remove the corps\n\t\t\t\tdrawableItems.remove(i);\n\t\t\t\t//add to score\n\t\t\t\tscore += +100;\n\t\t\t}\n\t\t\n\t\t//check if any enterties enter each others bounds and if so means they have collided and will trigger the collision on the entitie\n\t\tfor (int i = 0; i < drawableItems.size();i++)\n\t\t\tfor (int j = 0; j < drawableItems.size();j++)\n\t\t\t\tif (j != i)\n\t\t\t\t\tif (drawableItems.get(j).getBounds().intersect(drawableItems.get(i).getBounds()))\n\t\t\t\t\t\tif (drawableItems.get(i).equals(player))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdrawableItems.get(j).collision();\n\t\t\t\t\t\t\tdrawableItems.get(i).collision();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdrawableItems.get(j).collision();\n\t\t\n\t\t//sets have bullets\n\t\tfor (int i = 0; i < player.getGun().getBullets().size();i++)\n\t\t\tfor (int j = 0; j<drawableItems.size();j++)\n\t\t\t\tif (!drawableItems.get(j).equals(player))\n\t\t\t\t\tif (drawableItems.get(j).getBounds().intersect(player.getGun().getBullets().get(i).getBounds()))\n\t\t\t\t\t{\n\t\t\t\t\t\tdrawableItems.get(j).hit(player.getGun().getBullets().get(i).getDamage());\n\t\t\t\t\t\t//tell the bullet it has collided\n\t\t\t\t\t\tplayer.getGun().getBullets().get(i).collision();\n\t\t\t\t\t\t// we want to add to score\n\t\t\t\t\t\tscore++;\n\t\t\t\t\t}\n\t\t\n\t\t// {debug} add new zombies to fight\n\t\tif (drawableItems.size() < 20)\n\t\t\tdrawableItems.add(new ObjectItem(Statics.getScreenWidth() - 100,Statics.getScreenHeight() - 300));\n\t\t\n\t\t//update player p\n\t\tsettarget(player.getPosX(),player.getPosY());\n\t}", "boolean testDrawBullet(Tester t) {\n return t.checkExpect(bullet1.draw(), new CircleImage(2, OutlineMode.SOLID, Color.pink))\n && t.checkExpect(bullet2.draw(), new CircleImage(2, OutlineMode.SOLID, Color.pink));\n }", "private void checkExplosionKill() {\n\t\t\n\t\texplosion.expand();\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tif (explosion.detectDownwardCollision(a.getX(), a.getY())) {\n\t\t\t\t\ta.setVisibility(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "boolean testPlaceBullet(Tester t) {\n return t.checkExpect(bullet1.place(this.em),\n em.placeImageXY(new CircleImage(2, OutlineMode.SOLID, Color.PINK), 250, 300))\n && t.checkExpect(bullet2.place(this.em),\n em.placeImageXY(new CircleImage(2, OutlineMode.SOLID, Color.PINK), 600, 600));\n }", "private void checkCollision()\n {\n if(isTouching(Rocket.class))\n {\n removeTouching(Rocket.class);\n Level1 level1 = (Level1)getWorld(); \n isSwordscore = false;\n notifyObservers(-20);\n }\n else if(isTouching(Fire.class))\n {\n removeTouching(Fire.class);\n Level1 level1 = (Level1)getWorld(); \n isSwordscore = false;\n notifyObservers(-20);\n }\n else if(isTouching(Sword.class))\n { \n removeTouching(Sword.class);\n Level1 level1 = (Level1)getWorld();\n isSwordscore = false;\n notifyObservers(-20);\n }\n \n else if(isTouching(Star.class))\n { \n removeTouching(Star.class);\n Level1 level1 = (Level1)getWorld();\n isSwordscore = false;\n count++;\n boost();\n }\n }", "@Override\n public void collide(CollisionEvent e) {\n \n if (e.getOtherBody() instanceof OptimusPrime && e.getReportingBody() instanceof Health) {\n prime.incrementHealthCount();\n healthSound.play();\n e.getReportingBody().destroy();\n \n \n }\n \n else if (e.getOtherBody() instanceof OptimusPrime && e.getReportingBody() instanceof Emerald) {\n prime.incrementEmeraldCount();\n emeraldSound.play();\n e.getReportingBody().destroy();\n }\n \n else if (e.getOtherBody() instanceof OptimusPrime && e.getReportingBody() instanceof DeadZone) {\n e.getReportingBody().destroy();\n System.exit(0);\n } \n \n else if (e.getReportingBody() instanceof Boss && e.getOtherBody() instanceof FireBall){\n e.getOtherBody().destroy();\n System.out.println(\"boss hit\");\n }\n \n else if (e.getReportingBody() instanceof StaticBody && e.getOtherBody() instanceof FireBall){\n e.getOtherBody().destroy();\n System.out.println(\"boss hit\");\n } \n \n }", "public boolean shoot() {\n if (!isReloading && System.currentTimeMillis() - previousShotTime > shootInterval * 1000 && ammoRemaining > 0) {\n\n previousShotTime = System.currentTimeMillis();\n\n ammoRemaining--;\n audioPlayer.setSpatial(holder);\n audioPlayer.playOnce();\n // score -= 50;\n Vec2 angle = Vec2\n .Vector2FromAngleInDegrees(transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread));\n\n Vec2 spawnPosition = transform.getWorldPosition();\n\n Projectile p = new Projectile(spawnPosition,\n Vec2\n .Vector2FromAngleInDegrees(\n transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread)),\n new Sprite(projectilePath));\n p.setSpeed(speed);\n p.setSource(holder);\n p.getCollider().addInteractionLayer(\"Block\");\n p.getCollider().addInteractionLayer(\"Hittable\");\n p.getCollider().addInteractionLayer(\"Walk\");\n p.setOnCollisionListener(other -> {\n if (other.getGameObject() instanceof Player && other.getGameObject() != holder) {\n Player player = (Player) other.getGameObject();\n player.hit(alteredDmg);\n if (GameEngine.DEBUG) {\n System.out.println(\"Bullet Hit \" + other.getName());\n }\n p.destroy();\n\n// player.destroy();\n } else if (other.getGameObject() instanceof Enemy) {\n Enemy e = ((Enemy) other.getGameObject());\n e.hit(alteredDmg);\n if (!e.isAlive()) { // CHeck if enemy survived\n ((Player) p.getSource()).killedEnemy();\n }\n p.destroy();\n } else if (other.getTag() == \"Block\") {\n p.destroy();\n }\n\n });\n return true;\n } else if(ammoRemaining <= 0){\n reloadWeapon();\n return false;\n }else\n return false;\n }", "void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }", "private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}", "@Override\n\tpublic void onHitted(EntityDamageByEntityEvent e, Player damager, Player victim) {\n\t\t\n\t}", "boolean collidesEnemy() {\n for(int i = 0; i < barrage.size(); i++) {\n // establish a rectangle for the laser\n Rectangle blaster = new Rectangle((int)barrage.get(i).getX(), (int)barrage.get(i).getY(), WIDTH, HEIGHT);\n \n // determine if the laser intersects an enemy\n for (int q = 0; q < fleet.size(); q++) {\n Rectangle enemy = new Rectangle((int)fleet.get(q).getX(), (int)fleet.get(q).getY(), 40, 36); \n \n // if blaster hits a ship, remove it\n if (blaster.intersects(enemy) && fleet.get(q).getCount() == 0) {\n fleet.get(q).hit = true; // set the enemy hit\n barrage.remove(barrage.get(i));\n score += 100; // add to score\n return true; // hit\n }\n }\n }\n return false; // miss\n }", "private void collision(){\n\t\tboolean touched = false;\n\t\tboolean hit;\n\t\tint j =0;\n\t\twhile ( j< this.game_.getSaveBaby().size() && !touched){\n\t\t\tBabyBunnies b = this.game_.getSaveBaby().get(j);\n\t\t\ttouched = this.game_.getBunnyHood().getPosition().dst(b.getPosition())<=80;\n\t\t\thit = this.game_.getWolf().getPosition().dst(b.getPosition())<=80;\n\t\t\tif (touched){\n\t\t\t\tthis.game_.setBabySaved(b);\n\t\t\t}\n\t\t\tif (hit){\n\t\t\t\tthis.game_.wolfCatchBunnies(b);\n\t\t\t\t/**\n\t\t\t\t * Test de callback, retour vers l app android\n\t\t\t\t */\n\t\t\t\tif(this.game_.getScoreWolf()==3){\n\t\t\t\t\tif (this.gameCallBack != null) {\n\n this.gameCallBack.gameOverActivity(this.game_.getScoreBunny());\n\t\t\t\t\t\tthis.isGameOver=true;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tGdx.app.log(\"MyGame\", \"To use this class you must implement MyGameCallback!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t}", "public void findShootedPlayer(UUID id) {\n\t\n\t\tif(healths.contains(id.toString()))\n\t\t\t{\n\t\t\t\thealths.put(id.toString(),healths.get(id.toString())-20);\n\t\t\t\tSystem.out.println(\"ghostEntity \"+id.toString() +\"was shooted\");\n\t\t\t\tif(healths.get(id.toString())<=0)\n\t\t\t\t{\n\t\t\t\t\thealths.put(id.toString(),100);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t}", "public void checkItem() {\n Entity t = BombermanGame.checkCollisionItem(this.rectangle);\n if (t instanceof SpeedItem) {\n speed ++;\n ((SpeedItem) t).afterCollision();\n SoundEffect.sound(SoundEffect.mediaPlayerEatItem);\n }\n\n if (t instanceof FlameItem) {\n flame = true;\n ((FlameItem) t).afterCollision();\n SoundEffect.sound(SoundEffect.mediaPlayerEatItem);\n }\n\n if (t instanceof BombItem) {\n max_bomb ++;\n ((BombItem) t).afterCollision();\n SoundEffect.sound(SoundEffect.mediaPlayerEatItem);\n }\n\n if (t instanceof Portal) {\n SoundEffect.sound(SoundEffect.mediaPlayerEatItem);\n }\n }", "@Override\r\n public void onHit(int damage){\n if(box2body != null){\r\n hp -= damage;\r\n screen.getGameManager().get(\"Sounds/orc-34-hit.wav\", Sound.class).play();\r\n if(this.hp <= 0) {\r\n screen.bodiesToDelete.add(box2body);\r\n deleteFlag = true;\r\n screen.spawnedCreatures.remove(this);\r\n screen.getGameManager().get(\"Sounds/orc-32-death.wav\", Sound.class).play();\r\n\r\n //Award Experience\r\n screen.getPlayer().awardExperience(this.experienceValue);\r\n screen.getPlayer().increaseKillCount();\r\n }\r\n }\r\n //Attack player when damaged\r\n //Prevents player from sniping monsters using Wander AI\r\n if(currentState != State.ATTACKING){\r\n Vector2 orcPosition = new Vector2(box2body.getPosition().x, box2body.getPosition().y);\r\n Vector2 playerPosition = new Vector2(screen.getPlayer().box2body.getPosition().x, screen.getPlayer().box2body.getPosition().y);\r\n\r\n currentState = State.HASBEENATTACKED;\r\n velocity = new Vector2(playerPosition.x - orcPosition.x, playerPosition.y - orcPosition.y);\r\n box2body.setLinearVelocity(velocity.scl(speed));\r\n }\r\n }", "public boolean check(double xDelt,double yDelt) {\r\n \tBounds pBound= player1.player.getBoundsInParent();\r\n \t\r\n \tfor( Node object: enemy1.hostileG.getChildren()) {\r\n \t\t\r\n \t\tif(object.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())){\r\n \t\t\teHealth -= inventory.getpDamage();\r\n \t\t\tpHealth -= 1;\r\n\r\n \t\t\tSystem.out.println(\"eHealth \"+ eHealth);\r\n \t\t\tSystem.out.println(\"pHealth \"+ pHealth);\r\n \t\t\t\r\n \t\t\t//\"Deaths of the sprites\"\r\n \t\t\tif(pHealth <=0) {\r\n \t\t\t\tlayout.getChildren().remove(player1.player);\r\n \t\t\t\tSystem.out.println(\"You died!\");\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif(eHealth <=0) {\r\n \t\t\t\tlayout.getChildren().remove(enemy1.enemy);\r\n \t\t\t\tenemy1.enemy.setLayoutX(-10000);\r\n \t\t\t\tenemy1.enemy.setLayoutY(-10000);\r\n \t\t\t}\r\n \t\treturn false;\r\n \t\t}\r\n }\r\n \t\r\n \tfor( Node object: map1.walls.getChildren()) {\r\n \t\tif(object.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())) return false;\r\n \t}\r\n \t\r\n \tfor( Node chest: map1.chests.getChildren()) {\r\n \tif(chest.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())){\r\n \t\tmap1.chests.getChildren().remove(chest);\r\n \t chestchose=inventory.getchestchose();\r\n \t \r\n \t if(chestchose==1) {\r\n \t \tinventory.sworda.setVisible(true);\r\n \t \tinventory.setpDamage(3);\r\n \t }\r\n \t if(chestchose==2) {\r\n \t \tinventory.healthbag.setVisible(true);\r\n \t }\r\n \t \r\n \t return false;\r\n \t} \r\n }\t\r\n \t\r\n return true;\r\n }", "void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirection(angle);\r\n\t\tbullets[slot].reset();\r\n\t\t// Reset the timer\r\n\t\tcount = RELOAD;\r\n\t}", "private void hit(GObject element) {\r\n\t\tremove(bullet);\r\n\t\tbullet = null;\r\n\t\thitGraphic(element);\r\n\t\tif(element == dragon1) {\r\n\t\t\tlifeArray[DRAGON_ONE]--;\r\n\t\t\tif(lifeArray[DRAGON_ONE] < 1) {\r\n\t\t\t\tremove(dragon1);\r\n\t\t\t\tdragon1 = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(element == dragon2) {\r\n\t\t\tlifeArray[DRAGON_TWO]--;\r\n\t\t\tif(lifeArray[DRAGON_TWO] < 1) {\r\n\t\t\t\tremove(dragon2);\r\n\t\t\t\tdragon2 = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(element == mehran) {\r\n\t\t\tlifeArray[MEHRAN]--;\r\n\t\t\tif(lifeArray[MEHRAN] < 1) {\r\n\t\t\t\tremove(mehran);\r\n\t\t\t\tmehran = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void hitEvent(Block beingHit, Ball hitter);", "void hitEvent(Block beingHit, Ball hitter);", "public void collision() {\n for (int i = 0; i < friendlyBullets.size(); i++) {\n\n friendlyBullets.get(i).tick();\n\n if (friendlyBullets.get(i).getImgY() <= 40) {\n friendlyBullets.get(i).bulletImage.delete();\n friendlyBullets.remove(friendlyBullets.get(i));\n i--;\n continue;\n }\n\n for (int j = 0; j < enemies.size(); j++) {\n\n if (friendlyBullets.get(i).getHitbox().intersects(enemies.get(j).getHitbox())) {\n\n friendlyBullets.get(i).hit();\n friendlyBullets.remove(friendlyBullets.get(i));\n i--;\n\n enemies.get(j).hit();\n\n if (enemies.get(j).getHp() <= 0) {\n enemies.remove(enemies.get(j));\n score.setScore(50);\n j--;\n }\n //end this loop\n j = enemies.size();\n }\n }\n\n }\n\n ///////////////////////////////////////////////////////////////////////////////////////\n\n\n // Enemy out of bounds\n for (int i = 0; i < enemies.size(); i++) {\n\n enemies.get(i).tick();\n\n // Out of bounds\n if (enemies.get(i).getEnemyImage().getY() >= 750) {\n enemies.get(i).getEnemyImage().delete();\n enemies.remove(enemies.get(i));\n\n if (enemies.size() > 1) {\n i--;\n }\n }\n }\n\n\n //////////////////////////////////////////////////////////////////////////\n\n //powerUps out of bounds and collision with spaceships\n for (int i = 0; i < powerUps.size(); i++) {\n\n powerUps.get(i).tick();\n\n if (powerUps.get(i).getImgY() >= 745) {\n\n powerUps.get(i).powerUpImage.delete();\n powerUps.remove(powerUps.get(i));\n\n i--;\n continue;\n }\n\n for (int j = 0; j < spaceShips.size(); j++) {\n\n if (spaceShips.get(j).getHitbox().intersects(powerUps.get(i).getHitbox())) {\n\n\n spaceShips.get(j).powerUp(powerUps.get(i).getPowerUpType());\n powerUps.get(i).hit();\n powerUps.remove(powerUps.get(i));\n\n //if it collides with one leave the for loop\n i--;\n j = spaceShips.size();\n }\n }\n\n }\n\n }", "public void checkCollision(final Bubble bubble) {\n if (bubble.isAbleToCatch() && !isCaughtByBubble) {\n double bubbleX = bubble.getSpriteBase().getXCoordinate();\n double bubbleY = bubble.getSpriteBase().getYCoordinate();\n double bubbleX2 = bubbleX + bubble.getSpriteBase().getWidth();\n double bubbleY2 = bubbleY + bubble.getSpriteBase().getHeight();\n if (((bubbleX >= spriteBase.getXCoordinate()\n && bubbleX <= spriteBase.getXCoordinate() + spriteBase.getWidth())\n || (bubbleX2 >= spriteBase.getXCoordinate()\n && bubbleX2 <= spriteBase.getXCoordinate() + spriteBase.getWidth()))\n && ((bubbleY >= spriteBase.getYCoordinate()\n && bubbleY <= spriteBase.getYCoordinate() + spriteBase.getHeight())\n || bubbleY2 >= spriteBase.getYCoordinate()\n && bubbleY2 <= spriteBase.getYCoordinate() + spriteBase.getHeight())) {\n prisonBubble = bubble;\n prisonBubble.setAbleToCatch(false);\n prisonBubble.setPrisonBubble(true);\n isCaughtByBubble = true;\n\n Logger.log(\"Monster is caught by bubble!\");\n }\n }\n }", "public void isShooting(GameContainer gc) throws LineUnavailableException{\r\n\t\tif(gc.getInput().isKeyPressed(Input.KEY_SPACE) || gc.getInput().isKeyPressed(Input.KEY_UP)){\r\n\t\t\tif(!this.bullet.isMoved()){\r\n\t\t\t\tthis.playSound();\r\n\t\t\t\tanimation = this.shooting;\r\n\t\t\t\tthis.bullet.position.x = super.getShape().getCenterX();\r\n\t\t\t\tthis.bullet.position.y = super.getShape().getCenterY();\r\n\t\t\t\tthis.getBullet().setMoved(true);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.getBullet().isMoved()){\r\n\t\t\tthis.bullet.move();\r\n\t\t}\r\n\t}", "public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }", "private void checkWeaponCollisions(GObject element) {\r\n\t\tGObject topLeft = getElementAt(element.getX() - 1, element.getY());\r\n\t\tGObject topRight = getElementAt(element.getX() + element.getWidth() + 1, element.getY());\r\n\t\tGObject bottomLeft = getElementAt(element.getX() - 1, element.getY() + element.getHeight());\r\n\t\tGObject bottomRight = getElementAt(element.getX() + element.getWidth() + 1, element.getY() + element.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(element);\r\n\t\t\telement = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "@Override\n public void checkCollision( Sprite obj )\n {\n \n }", "boolean testHandleCollisions(Tester t) {\n return t.checkExpect(new NBullets(10).handleCollisions(), new NBullets(10))\n && t.checkExpect(new NBullets(this.mt, this.los3, 3, 2, 40).handleCollisions(),\n new NBullets(this.mt, this.los3, 3, 2, 40))\n && t.checkExpect(new NBullets(this.lob3, this.mt, 3, 2, 40).handleCollisions(),\n new NBullets(this.lob3, this.mt, 3, 2, 40))\n && t.checkExpect(new NBullets(this.lob4, this.los4, 5, 5, 0).handleCollisions(),\n new NBullets(this.lob4.explodeTouchers(this.los4),\n new ConsLoGamePiece(this.ship1, this.mt), 5, 8, 0));\n }", "@Override\n protected void doCheckEffect ()\n {\n // check all the stationary spells in the location of the projectile for a Colloportus\n List<O2StationarySpell> inside = new ArrayList<>();\n for (O2StationarySpell spell : Ollivanders2API.getStationarySpells(p).getStationarySpellsAtLocation(location))\n {\n if (spell instanceof COLLOPORTUS)\n {\n inside.add(spell);\n }\n }\n\n // remove the colloportus spells found\n if (inside.size() > 0)\n {\n for (O2StationarySpell spell : inside)\n {\n spell.kill();\n spell.flair(10);\n }\n\n kill();\n }\n\n // if the spell has hit a solid block, the projectile is stopped and wont go further so kill the spell\n if (hasHitTarget())\n kill();\n }", "public void checkForBounce()\n {\n if (isTouching(mid.class)){\n \n bounce = 1;\n \n \n }\n \n \n \n \n if (getY() <= 0 || getY() >= getWorld().getHeight() -1 )\n {\n \n dY = -dY;\n \n }\n \n \n if(isTouching(Pad1.class )){\n \n if (bounce == 1){\n \n \n Greenfoot.playSound(\"paddleHit.wav\"); \n dX = -dX;\n bounce = 0;\n change(); \n }\n \n \n }\n \n \n \n }", "@Override\n public void checkCollision( Sprite obj )\n {\n\n }", "public void collision(ArrayList<Game_Object> obj) {\n for (int i = 0; i < obj.size(); i++) {\n \tif(collidesWith(obj.get(i)) && (obj.get(i) instanceof Unit)) {\n \t\tUnit unit = (Unit) obj.get(i);\n \t\tdamage(unit.getColDamage());\n \t}\n }\n }", "private void checkForDeaths() {\n Iterator<Entity> entityIter = this.entities.iterator();\n\n //geht alle teilnehmer durch\n while ( entityIter.hasNext() ) {\n Entity entity = entityIter.next();\n\n //und entfernt sie wenn sie tot sind aus der liste und der engine\n if ( this.combatMapper.get(entity).curHealth <= 0 ) {\n entityIter.remove();\n\n //alle actions der entity entfernen, können ja nichts machen wenn sie tot sind\n Iterator<IAction> actionIter = this.actions.iterator();\n\n while ( actionIter.hasNext() ) {\n if ( actionIter.next().getOwner().equals(entity) ) {\n actionIter.remove();\n }\n }\n\n this.combatExp += this.combatMapper.get(entity).level * 5; //TODO\n\n EventSystem.getInstance().commitEvent(new Event(EventSystem.EventType.KILL_EVENT, entity));\n\n this.combatSystem.getEngine().removeEntity(entity);\n }\n }\n }", "public void tick(){\n\t\tfor(int i=0;i<object.size(); i++){\n\t\t\ttempObject = object.get(i);\n\t\t\ttempObject.tick(object);\n\t\t\tif(tempObject.getId() == ObjectId.Player){\n\t\t\t\tif(tempObject.position.x == MouseInput.exitPosition.x&&\n\t\t\t\t tempObject.position.y == MouseInput.exitPosition.y){\n\t\t\t\t\tgame.score += game.timeLeft;\n\t\t\t\t\tSystem.out.println(\"exited\");\n\t\t\t\t\tgame.levelCompleted=true;\n\t\t\t\t}\n\t\t\t\tif(game.player.health <= 0){\n\t\t\t\t\tobject.clear();\n\t\t\t\t\tgame.gameLoop=1;\n\t\t\t\t\tgame.State=STATE.GAMEOVER;\n\t\t\t}\n\t\t}\n\t\t// bomb is null when exploded\t\t\n\t\tif(Bomb.exploded(bomb, object)){\n\t\t\tbomb=null;\t\t\t\n\t\t}\n\t\t\n\t\tif(System.currentTimeMillis()-Player.tHit < 3000){\n\t\t\tPlayer.invincible = true;\n\t\t}\n\t\telse{\n\t\t\tPlayer.invincible = false;\n\t\t}\n\t\t\n\t\tif(Power.consumed(power, object)) {\n\t\t\tpower=null;\n\t\t}\n\t\t}\n\t\t\n\t}", "public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Replace the next line with any behavior you would like\n\t\t\n\t}", "public void Hit()\n {\n this.numLives--;\n //Oscillate visible and not if the number of lives is greater than zero\n if(this.numLives > 0)\n {\n this.damaged = true;\n this.Blink(1);\n\n }\n }", "void check_missile_collisions() {\n for (int i = ship.missiles.size()-1; i >= 0; i --) {\n Missile missile = ship.missiles.get(i);\n for (int j = aliens.size()-1; j >= 0; j --) {\n Alien alien = aliens.get(j);\n boolean hit = alien.checkMissileCollisions(missile);\n if (hit) {\n alien_destroyed_audio.play();\n\n // Move the missile off-screen to be deleted by delete_missiles()\n missile.moveOffScreen();\n\n // Update the score, speed up remaining aliens, remove the alien\n update_score(alien.points);\n Alien.speed_up();\n alien_audio_intervals = (long) (500000000 - (100000000 * Alien.alien_speed));\n ImageView alien_image_view = alien_image_views.get(j);\n game_pane.getChildren().remove(alien_image_view);\n alien_image_views.remove(j);\n aliens.remove(alien);\n break;\n }\n }\n }\n\n // Check if any alien missiles hit the ship\n for (int i = Alien.missiles.size()-1; i >= 0; i --) {\n Missile missile = Alien.missiles.get(i);\n // Only check missiles that have reached the y-coordinate of the player\n if (missile.y_position+missile.missile_height >= ship.y_position) {\n boolean hit = ship.checkMissileCollisions(missile);\n if (hit) {\n ship_destroyed_clip.play();\n\n // Player loses a life\n lives -= 1;\n lives_text.setText(\"Lives: \" + lives);\n\n // Ship and missiles not respawn/removed for last life so that player can see how they died\n if (lives > 0){\n // Move the missile off-screen, deleted by delete_missiles()\n missile.moveOffScreen();\n ship_respawn();\n }\n break;\n }\n }\n }\n }", "void checkCollision(Entity other);", "protected void check_turn(List<CollisionObject> collidables) {\n //Firing rays\n\n //select an area of 180 degrees (pi radians)\n boolean turn = true;\n Vector2 start_point = get_ray_fire_point();\n for (int ray = 0; ray <= number_of_rays; ray++) {\n\n if (turn) {\n ray--;\n float ray_angle = sprite.getRotation() + ((ray_angle_range / (number_of_rays / 2)) * ray);\n turn = false;\n } else {\n float ray_angle = sprite.getRotation() - ((ray_angle_range / (number_of_rays / 2)) * ray);\n turn = true;\n }\n\n float ray_angle = ((ray_angle_range / number_of_rays) * ray) + sprite.getRotation();\n\n for (float dist = 0; dist <= ray_range; dist += ray_step_size) {\n\n double tempx = (Math.cos(Math.toRadians(ray_angle)) * dist) + (start_point.x);\n double tempy = (Math.sin(Math.toRadians(ray_angle)) * dist) + (start_point.y);\n //check if there is a collision hull (other than self) at (tempx, tempy)\n for (CollisionObject collideable : collidables) {\n if (collideable.isShown() &&\n ((Obstacle) collideable).getSprite().getY() > sprite.getY() - 200 &&\n ((Obstacle) collideable).getSprite().getY() < sprite.getY() + 200 &&\n ((Obstacle) collideable).getSprite().getX() > sprite.getX() - 200 &&\n ((Obstacle) collideable).getSprite().getX() < sprite.getX() + 200)\n for (Shape2D bound : collideable.getBounds().getShapes()) {\n if (bound.contains((float) tempx, (float) tempy)) {\n // Determines which side the ai should turn to\n if (turn) {\n turn(-1);\n return;\n } else {\n turn(1);\n return;\n }\n\n }\n }\n\n }\n }\n }\n }" ]
[ "0.8011626", "0.75681484", "0.72206396", "0.71593124", "0.70785534", "0.7068307", "0.68237233", "0.6817263", "0.676829", "0.67488873", "0.6704512", "0.6697372", "0.667231", "0.6671969", "0.66645235", "0.6661888", "0.66335756", "0.65853363", "0.6584401", "0.65820324", "0.65699583", "0.6555197", "0.65445787", "0.6495962", "0.647357", "0.6448668", "0.64399177", "0.64104736", "0.64056885", "0.63944334", "0.63810885", "0.63757265", "0.6352374", "0.6349771", "0.63318694", "0.6317819", "0.6316567", "0.6305529", "0.6305014", "0.62955594", "0.6276964", "0.6273824", "0.6264639", "0.62524337", "0.6249691", "0.62387925", "0.62321496", "0.62290734", "0.62230265", "0.6213341", "0.6213334", "0.6210622", "0.6198483", "0.6193106", "0.6193032", "0.6182456", "0.61755025", "0.61655915", "0.6156328", "0.61519605", "0.61512977", "0.6147808", "0.61466813", "0.6144593", "0.6132801", "0.61306894", "0.61259764", "0.6121136", "0.61166775", "0.610643", "0.6102429", "0.60976887", "0.6095262", "0.60928774", "0.6092169", "0.60913056", "0.6090613", "0.6089331", "0.6087672", "0.6081781", "0.6064229", "0.6064229", "0.6064154", "0.6058985", "0.60543865", "0.60506845", "0.60478145", "0.6038306", "0.6038182", "0.60381025", "0.6034896", "0.6029486", "0.60251933", "0.60181", "0.6013661", "0.6012043", "0.6008702", "0.60066", "0.6003832", "0.6001815" ]
0.82669026
0
when player use bomb, remove all the exsiting bullets
public void emptyBullets() { for(int i = 0; i < bossBullets.size(); i++){ Bullet tempBullet = bossBullets.get(i); bossBullets.remove(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeBomb();", "private void killBullet() {\r\n this.dead = true;\r\n }", "private void clearBullet()\n {\n if(playerBullets.size() > 0)\n {\n for(int i = 0; i < playerBullets.size(); ++i)\n {\n int x = playerBullets.get(i).getRectangle().centerX(), y = playerBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n playerBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n if(enemyBullets.size() > 0)\n {\n for(int i = 0; i < enemyBullets.size(); ++i)\n {\n int x = enemyBullets.get(i).getRectangle().centerX(), y = enemyBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n enemyBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n }", "public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }", "public void cleanUpBullets() {\n for (int i = 0; i < this.bullets.size(); i++) {\n if (!this.bullets.get(i).visible) {\n this.bullets.remove(i);\n }\n }\n }", "void garbageCollector() {\n Enemy ETR = null;\n Sprite BTR = null;\n Medkit MTR = null;\n for (Enemy e: enemies) {\n if (e.eTank.getX() < -100) {\n ETR = e;\n }\n }\n for (Sprite c: smBullets) {\n if (c.getX() > width + 100) {\n BTR = c;\n }\n if (c.getY() > height + 100) {\n BTR = c;\n }\n if (c.getX() < -100) {\n BTR = c;\n }\n if (c.getY() < -100) {\n BTR = c;\n }\n }\n \n for (Medkit med : health) {\n if (med.timer <= 0) {\n MTR = med;\n }\n }\n //gets rid of bullets that went off-screen\n if (BTR != null) {\n smBullets.remove(BTR);\n println(\"Deleted bullet\");\n }\n if (ETR != null) {\n enemies.remove(ETR);\n }\n //Medkits to despawn\n if (MTR != null) {\n health.remove(MTR);\n }\n}", "protected void cleanBullets() {\n Set<Bullet> recyclable = new HashSet<Bullet>();\n for (Bullet bullet : this.bullets) {\n bullet.update();\n if (bullet.getPositionY() < SEPARATION_LINE_HEIGHT\n || bullet.getPositionY() > this.height)\n recyclable.add(bullet);\n }\n this.bullets.removeAll(recyclable);\n //BulletPool.recycle(recyclable);\n }", "public static void removeBody(Body obj, Body bullet) {\r\n \tif(obj==myPlayer.getBody()) {\r\n \t\t//We've been hit.\r\n \t\tmyPlayer.takeDamage(0.09f);\r\n \t}\r\n \tbulletsToRemove.add(bullet);\r\n }", "public void trackBullets(){\n for (int i = 0; i < bullets.size(); i++){\n Bullet tempBullet = bullets.get(i);\n //update the position of the bullets\n tempBullet.update();\n tempBullet.drawBullet();\n //check if the bullet hit the boundary, remove the bullet from the list of the bullet\n if(tempBullet.detectBound()){\n bullets.remove(i);\n continue;\n }\n //detect if the bullet hit the boss and cause the damage if yes\n if(tempBullet.hitObject(Main.boss) && Main.boss.alive){\n Main.boss.decreaseHealth(attack);\n tempBullet.drawHit();\n bullets.remove(i);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n }\n }\n //detect if the bullet hit the enemy and cause the damage if yes\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n if(tempBullet.hitObject(tempEnemy) && tempEnemy.alive){\n tempBullet.drawHit();\n tempEnemy.decreaseHealth(attack);\n // if enemy is totally hitted, wait one 1s, and then removed\n if(tempEnemy.health <= 0){\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n }\n bullets.remove(i);\n break;\n }\n }\n }\n }", "private void tryToKillStuff(final Bomb b) {\n \t\tfor (Bomb bomb : bombs)\n \t\t\tif (bomb != b && !bomb.isCurrentlyExploding())\n \t\t\t\tif (eac.isInExplosionArea(b, bomb)) {\n \t\t\t\t\tbomb.goBomf();\n \t\t\t\t}\n \n \t\tif (eac.isInExplosionArea(b, bman.get(0))) {\n \t\t\talive = false;\n \t\t\tgui.lost();\n \t\t}\n \t}", "public void dispara()\r\n {\r\n BulletEnemy bala = new BulletEnemy();\r\n getWorld().addObject(bala,getX(),getY()+25);\r\n }", "void delete_missiles() {\n // Player missiles\n for (int i = ship.missiles.size()-1; i >= 0; i --) {\n Missile missile = ship.missiles.get(i);\n if (missile.y_position <= Dimensions.LINE_Y) {\n ImageView ship_missile_image_view = ship_missile_image_views.get(i);\n game_pane.getChildren().remove(ship_missile_image_view);\n ship_missile_image_views.remove(i);\n ship.missiles.remove(missile);\n }\n }\n\n // Enemy missiles\n for (int i = Alien.missiles.size()-1; i >= 0; i --) {\n Missile missile = Alien.missiles.get(i);\n if (missile.y_position > scene_height) {\n ImageView alien_missile_image_view = alien_missile_image_views.get(i);\n game_pane.getChildren().remove(alien_missile_image_view);\n alien_missile_image_views.remove(i);\n Alien.missiles.remove(missile);\n }\n }\n }", "public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }", "public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }", "public void tick()\n{\n y+=speed;\n\n for(int i=0; i<game.ea.size(); i++)\n {\n EntityA tempEnt= game.ea.get(i);\n if(Physics.Coliision(this,tempEnt))\n {\n c.removeEntity(tempEnt); //zeby po trafieniu znikal pocisk\n c.removeEntity(this);\n game.setEnemy_killed(game.getEnemy_killed()+1);\n\n }\n }\n\n/*\n* If Enemy is out of bounds player get - points\n* and loses some stamina.\n*\n* Enemies are removed from list after disapears\n */\n\n if(y>(App.getHEIGHT()-20)*2)\n {\n App.addHealth(-10);\n App.addPOINTS(-3);\n c.removeEntity(this);\n }\n\n anim.runAnimation();\n\n /*\n * If App is not in game state it doesn't\n * need to have any enemies\n */\n\n if(App.State != App.STATE.GAME)\n {\n delEnemies();\n\n }\n}", "public void drop(){\r\n if(activeFish.isEmpty()) return;\r\n \r\n ArrayList<Fish> toremove = new ArrayList<Fish>();\r\n for(Fish bone : activeFish){\r\n bone.drop();\r\n\r\n if(!(bone.inBounds())){ // branch for out of bound fh\r\n toremove.add(bone);\r\n }\r\n }\r\n missedFish(toremove);\r\n\r\n update();\r\n }", "private void UpdateBullets()\n\t {\n\t for(int i = 0; i < BulletList.size(); i++)\n\t {\n\t Bullet bullet = BulletList.get(i);\n\t \n\t // Move the bullet.\n\t bullet.Update();\n\t \n\t // checks if the bullet has it left the screen\n\t if(bullet.HasLeftScreen()){\n\t BulletList.remove(i);\n\t \n\t continue;\n\t }\n\t \n\t // checks if the bullet hit the enemy\n\t Rectangle BulletRectangle = new Rectangle((int)bullet.xCoord, (int)bullet.yCoord, bullet.BulletImage.getWidth(), bullet.BulletImage.getHeight());\n\t // Go trough all enemies.\n\t for(int j = 0; j < EnemyList.size(); j++)\n\t {\n\t Enemy eh = EnemyList.get(j);\n\n\t \n\t Rectangle EnemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\n\t // Checks whether the the bullet has hit the enemy\n\t if(BulletRectangle.intersects(EnemyRectangel))\n\t {\n\t // Bullet hit the enemy so we reduce his health.\n\t eh.Health -= Bullet.DamagePower;\n\t \n\t // Bullet was also destroyed so we remove it.\n\t BulletList.remove(i);\n\t \n\t \n\t }\n\t }\n\t }\n\t }", "void smallgunHandler() {\n for (Sprite smb: smBullets) {\n \n smb.display();\n if(usingCoil){\n smb.forward(120);\n }else{\n smb.forward(40);\n }\n\n }\n}", "public void removeTomb(String player) {\r\n\t\ttombs.remove(player);\r\n\t}", "public void removeLostBodies(){\n for(int i = physics.rigidBodies.size() - 1; i >= 0; i--){\n BObject body = physics.rigidBodies.get(i);\n Vector3f pos = body.getPosition();\n \n if(pos.z < -1000){\n int idx = group_bulletbodies.getChildIndex(body.displayShape);\n if(idx >= 0){\n group_bulletbodies.removeChild(idx);\n }\n physics.removeBody(body);\n }\n }\n }", "void deathHandler(Enemy e) {\n\n if (e != null) {\n Explosion rip = new Explosion();\n rip.kaboom.moveToPoint(e.eTank.getX(), e.eTank.getY());\n // println(\"made enemy\");\n rip.kaboom.frontAngle(90);\n rip.kaboom.turn(90);\n explosion.add(rip);\n }\n for (Explosion exp: explosion) {\n if (exp.kaboomCounter > 1) {\n exp.kaboom.display();\n }\n // if (exp.kaboomCounter < 1) {\n // explosion.remove(exp);\n // }\n // else {\n exp.kaboomCounter -= 3;\n // println(exp.kaboomCounter);\n // println(explosion.size());\n // }\n }\n\n}", "void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }", "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "public void drawBullets(){\n if(!world.getPlayer().getWeapon().getBullets().isEmpty()) {\n for (Bullet b : world.getPlayer().getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y * ppuY,\n b.SIZE * ppuX, b.SIZE * ppuY);\n }\n }\n if(!world.getEnemies().isEmpty()) {\n for(Enemy e: world.getEnemies()){\n if(!e.getWeapon().getBullets().isEmpty()){\n for (Bullet b : e.getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }\n }\n if(!world.getBullets().isEmpty()) {\n for(Bullet b : world.getBullets()){\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }", "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }", "public void shootGun() {\n\t\tammo--;\n\t}", "public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }", "public void shoot(ArrayList<Bullet> alienBullets)\r\n\t{\r\n\t\t//do nothing usually\r\n\t}", "public void enemyoff(){\n getWorld().removeObject(this);\n }", "public void bomb() {\n\t\tbomb.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = bomb;\n\t}", "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "public void stopUsingTheBullet(float worldWidth, float worldHeight, boolean removeFromActiveBullets) {\n\n if (!inUse) return;\n\n /*if (getColor().a == 0)\n Gdx.app.log(TAG, \"::::::::::::::::::: ALPHA 0 :::::::::::::::::::\");*/\n\n if (gameplayScreen.isRewinding()) {\n if (currentEffect.equals(effects.armor) & currentBulletRecord.bulletPortalType != BulletPortalType.PORTAL_ENTRANCE) {\n gameplayScreen.getLazerAttackStuff().decrementCurrentNumOfSpawnedArmorBulletsForTheNextAttack(parent.getIndex());\n }\n if (currentEffect.equals(effects.armor))\n Gdx.app.log(TAG, \"currentBulletRecord.bulletPortalType = \" + currentBulletRecord.bulletPortalType);\n }\n\n handleRewindEventWhenStopping();\n\n handlePlusMinusBulletCausingSlowMoExists();\n\n handlePortalTypeWhenStoppingUsingTheBullet();\n handlePortalRoleWhenStoppingUsingTheBullet();\n\n bulletsHandler.getBulletPool().free(this);\n //bulletMovement.finish();\n resetPosition(worldWidth, worldHeight);\n detachFromBulletsAndShieldObject();\n\n iamNotInUseNow(removeFromActiveBullets);\n }", "private void shootMove() {\n for (int i = 0; i < fires.size(); i++) {\n //子弹往上移动\n fires.get(i).move();\n //注意这里remove需要放在下面\n if (fires.get(i).y < -1000) {\n fires.remove(fires.get(i));\n }\n }\n\n }", "private void checkExplosionKill() {\n\t\t\n\t\texplosion.expand();\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tif (explosion.detectDownwardCollision(a.getX(), a.getY())) {\n\t\t\t\t\ta.setVisibility(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void nuke() {\n\t\tfor (int a = 0; a < height; a++) {\n\t\t\tfor (int b = 0; b < width; b++) {\n\t\t\t\tif (FWorld[a][b] != null) {\n\t\t\t\t\tEZ.removeEZElement(FWorld[a][b]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tEZ.removeEZElement(background);\n\t\tEZ.removeEZElement(explosion);\n\t\tturtle.kill();\n\t}", "private void hit(GObject element) {\r\n\t\tremove(bullet);\r\n\t\tbullet = null;\r\n\t\thitGraphic(element);\r\n\t\tif(element == dragon1) {\r\n\t\t\tlifeArray[DRAGON_ONE]--;\r\n\t\t\tif(lifeArray[DRAGON_ONE] < 1) {\r\n\t\t\t\tremove(dragon1);\r\n\t\t\t\tdragon1 = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(element == dragon2) {\r\n\t\t\tlifeArray[DRAGON_TWO]--;\r\n\t\t\tif(lifeArray[DRAGON_TWO] < 1) {\r\n\t\t\t\tremove(dragon2);\r\n\t\t\t\tdragon2 = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(element == mehran) {\r\n\t\t\tlifeArray[MEHRAN]--;\r\n\t\t\tif(lifeArray[MEHRAN] < 1) {\r\n\t\t\t\tremove(mehran);\r\n\t\t\t\tmehran = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void act() \n {\n if(timer > 0){\n timer--;\n }else{\n Greenfoot.playSound(\"explosionSound.wav\");\n getWorld().removeObject(this);\n }\n }", "public void shoot()\n {\n\n if(reload<=0)//if the tower has reloaded\n {\n int randomizer=Greenfoot.getRandomNumber(20)-10; \n MinigunBullet bullet = new MinigunBullet(this.getRotation()+randomizer, damage,this);\n getWorld().addObject(bullet, getX(), getY());\n bullet.move(30);\n reload=3;\n }\n else//reload\n {\n reload--;\n }\n\n }", "public void Fire()\n {\n Random random = new Random();\n int randNum = random.nextInt(limit);\n\n //Check to see if this bomb is dropped\n if(!owner.BehindInvader() && !this.Visible() && randNum == HIT_VAL)\n {\n //Set this bomb to visible\n this.Visible(true);\n this.PlaySound();\n this.x = this.owner.X();\n this.y = this.owner.Y();\n }\n\n //Check for collision with the defender\n if(Bomb.enemy.Visible() && this.Visible() && this.Collision(Bomb.enemy))\n {\n Bomb.enemy.Hit();\n this.Visible(false);\n }\n //Move the bomb down\n else if(this.Visible())\n {\n this.y++;\n\n //Check for collision with the floor\n if(this.y >= GameConstants.GROUND - this.imageHeight)\n {\n this.Visible(false);\n }\n //Check for collision with the barriers\n for(Barrier barrier : Bomb.barriers.Barriers())\n {\n for(BarrierBlock block : barrier.BarrierBlocks())\n {\n if(this.Collision(block))\n {\n block.Visible(false);\n //Removal could cause Comodification issue\n block.Damaged(true);\n this.Visible(false);\n //May not need this return\n return;\n }\n }\n }\n }\n }", "private void deleteAttacks(){\n while(!attacksToDelete.isEmpty()){\n attacks.remove(attacksToDelete.remove());\n }\n }", "private void bulletMoveOffScreen() {\r\n\t\tif(bullet != null && (bullet.getX() > getWidth() || bullet.getX() < 0)){\r\n\t\t\tremove(bullet);\r\n\t\t\tbullet = null;\r\n\t\t}\r\n\t}", "public void clearEnemies() {\n\t\tIterator<Entity> it = entities.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tEntity e = it.next();\n\t\t\t//Skip playerfish\n\t\t\tif (e instanceof PlayerFish) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Kill and remove the entity\n\t\t\te.kill();\n\t\t\tit.remove();\n\t\t}\n\t\t\n\t\t//Remove all non playerfish from collidables\n\t\tcollidables.removeIf(c -> !(c instanceof PlayerFish));\n\t\tdrawables.removeIf(c -> !(c instanceof PlayerFish));\n\t}", "public void collision() {\n for (int i = 0; i < friendlyBullets.size(); i++) {\n\n friendlyBullets.get(i).tick();\n\n if (friendlyBullets.get(i).getImgY() <= 40) {\n friendlyBullets.get(i).bulletImage.delete();\n friendlyBullets.remove(friendlyBullets.get(i));\n i--;\n continue;\n }\n\n for (int j = 0; j < enemies.size(); j++) {\n\n if (friendlyBullets.get(i).getHitbox().intersects(enemies.get(j).getHitbox())) {\n\n friendlyBullets.get(i).hit();\n friendlyBullets.remove(friendlyBullets.get(i));\n i--;\n\n enemies.get(j).hit();\n\n if (enemies.get(j).getHp() <= 0) {\n enemies.remove(enemies.get(j));\n score.setScore(50);\n j--;\n }\n //end this loop\n j = enemies.size();\n }\n }\n\n }\n\n ///////////////////////////////////////////////////////////////////////////////////////\n\n\n // Enemy out of bounds\n for (int i = 0; i < enemies.size(); i++) {\n\n enemies.get(i).tick();\n\n // Out of bounds\n if (enemies.get(i).getEnemyImage().getY() >= 750) {\n enemies.get(i).getEnemyImage().delete();\n enemies.remove(enemies.get(i));\n\n if (enemies.size() > 1) {\n i--;\n }\n }\n }\n\n\n //////////////////////////////////////////////////////////////////////////\n\n //powerUps out of bounds and collision with spaceships\n for (int i = 0; i < powerUps.size(); i++) {\n\n powerUps.get(i).tick();\n\n if (powerUps.get(i).getImgY() >= 745) {\n\n powerUps.get(i).powerUpImage.delete();\n powerUps.remove(powerUps.get(i));\n\n i--;\n continue;\n }\n\n for (int j = 0; j < spaceShips.size(); j++) {\n\n if (spaceShips.get(j).getHitbox().intersects(powerUps.get(i).getHitbox())) {\n\n\n spaceShips.get(j).powerUp(powerUps.get(i).getPowerUpType());\n powerUps.get(i).hit();\n powerUps.remove(powerUps.get(i));\n\n //if it collides with one leave the for loop\n i--;\n j = spaceShips.size();\n }\n }\n\n }\n\n }", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "public void removeAllMissiles(){\n\t\tfor (Missile missile : this.missiles){\n\t\t\tif(!missile.isDestroyed() && missile != null){\n\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\tmissile = null;\n\t\t\t}\n\t\t}\n\t\tfor (Missile fMissile : this.friendlyMissiles){\n\t\t\tif(!fMissile.isDestroyed() && fMissile != null){\n\t\t\t\tfMissile.setDestroyed(true);\n\t\t\t\tfMissile = null;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}", "private void intersectBulletWithEnemy(Entity bullet, Entity enemy){\n\n //TODO implement health/damage system for enemies\n room.removeEntity(enemy);\n room.getEntityManager().removeEntity(enemy);\n\n //delete the bullet\n room.getEntityManager().removeEntity(bullet);\n ((WeaponComponent) player.getComponent(ComponentType.WEAPON)).getBullets().removeEntity(bullet);\n\n }", "static void removeBomb(int x, int y)\r\n {\r\n Map<Integer,Integer> map = new HashMap<Integer, Integer>();\r\n damagedBombs.put(x, map); \r\n damagedBombs.get(x).put(y,0);\r\n \r\n /*\r\n if(twoSecondBombs.get(x) != null)\r\n twoSecondBombs.get(x).remove(y);\r\n \r\n if(oneSecondBombs.get(x) != null)\r\n oneSecondBombs.get(x).remove(y);\r\n */\r\n }", "public void removeDead() {\n for (BaseObject object : new ArrayList<BaseObject>(bombs)) {\n if (!object.isAlive())\n bombs.remove(object);\n }\n\n for (BaseObject object : new ArrayList<BaseObject>(rockets)) {\n if (!object.isAlive())\n rockets.remove(object);\n }\n\n for (BaseObject object : new ArrayList<BaseObject>(ufos)) {\n if (!object.isAlive())\n ufos.remove(object);\n }\n }", "public int useBomb(){\n //do harm while the animation start\n //cause harm to the boss\n println(\"BEFORE Main.boss.health: \"+Main.boss.health);\n int count = 0;\n if ((Main.boss.alive) && (Main.boss.posY != -1)){\n Main.boss.decreaseHealth(10);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n bossKilled = true;\n }\n }\n println(\"AFTER Main.boss.health: \"+Main.boss.health);\n //remove all bullets\n Main.boss.emptyBullets();\n //kill all the enemies\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n count ++;\n }\n // fill(0,0,0);\n // rect(0,0,width,height);\n return count;\n }", "public void update() {\n if (player.getPlaying()) { //if player alive\n bg.update(); //update background\n player.update(); //update player\n //player collision detection, if player hits any baddies or their bullets is playing sets to false\n for (int i = 0; i < gargants.size(); i++) {\n if (collision(gargants.get(i), player)) {\n //gargants.remove(i);\n player.setPlaying(false);\n\n }\n for (int j = 0; j < demons.size(); j++) {\n if (collision(demons.get(j), player)) {\n //demons.remove(j);\n player.setPlaying(false);\n\n }\n for (int k = 0; k < dragons.size(); k++) {\n if (collision(dragons.get(k), player)) {\n //dragons.remove(k);\n player.setPlaying(false);\n\n }\n for (int l = 0; l < demonShots.size(); l++) {\n if (collision(demonShots.get(l), player)) {\n //demonShots.remove(l);\n player.setPlaying(false);\n\n }\n\n }\n }\n }\n }\n\n for (int i = 0; i < bullets.size(); i++) { //for each bullet\n bullets.get(i).update(); //update them\n if (bullets.get(i).getX() > WIDTH + 10) {\n bullets.remove(i); //if off screen delete\n }\n }\n\n for (int i = 0; i < demonShots.size(); i++) { // for each demon bullet\n demonShots.get(i).update(); //update them\n if (demonShots.get(i).getX() < -100) {\n demonShots.remove(i); //if off screen delete\n }\n }\n\n long gargantElapseTime = (System.nanoTime() - gargantStartTime) / 1000000;\n if (gargantElapseTime > (1200 - player.getScore() / 3)) { //as score increases, more will spawn\n gargants.add(new Gargant(BitmapFactory.decodeResource(getResources(), R.drawable.gargant), WIDTH + 10, (int) (rand.nextDouble() * (HEIGHT)), 64, 64, 8));\n if (gargants.size() >= 13) { //limit amount of this enemy to 13\n gargants.remove(gargants.size() - 1);\n }\n gargantStartTime = System.nanoTime();\n }\n for (int i = 0; i < gargants.size(); i++) { // for each gargant\n gargants.get(i).update(); //update them\n for (int j = 0; j < bullets.size(); j++) {\n if (collision(gargants.get(i), bullets.get(j))) {\n //when shot remove enemy and bullet\n gargants.remove(i);\n bullets.remove(j);\n player.addScore(10); //10 score for these guys\n break;\n }\n }\n if (gargants.get(i).getX() < -100) {\n gargants.remove(i); //if off screen remove\n }\n }\n\n if (level >= 3) { //only spawn demon above level 3\n long demonElapseTime = (System.nanoTime() - demonStartTime) / 1000000;\n if (demonElapseTime > (12000 - player.getScore() / 3)) { //as score increases, more will spawn\n demons.add(new Demon(BitmapFactory.decodeResource(getResources(), R.drawable.demon), WIDTH + 10, (int) (rand.nextDouble() * (HEIGHT)), 64, 64, 8));\n if (demons.size() >= 10) { //limit amount of this enemy to 10\n demons.remove(demons.size() - 1);\n }\n demonStartTime = System.nanoTime();\n }\n for (int i = 0; i < demons.size(); i++) { //for each demon\n demons.get(i).update(); //update them\n int n = rand.nextInt(1001); //random int between 1 and 1000\n if (n > 980) { //if random int > 980 shoot demon bullet\n demonShots.add(new HellFire(BitmapFactory.decodeResource(getResources(), R.drawable.hellfire_0), demons.get(i).getX(), demons.get(i).getY(), 64, 64));\n }\n for (int j = 0; j < bullets.size(); j++) {\n if (collision(demons.get(i), bullets.get(j))) {\n demonHitCount++; //each hit with bullet increases hitcount\n bullets.remove(j);\n if (demonHitCount >= 10) { //when hit more than 10 times it dies\n demonHitCount = 0;\n demons.remove(i);\n bullets.remove(j);\n player.addScore(100); //100 score for these big bois\n }\n }\n }\n if (demons.get(i).getX() < -100) {\n demons.remove(i); //if off screen delete\n }\n }\n }\n\n\n if (level >= 2) { //only spawn dragon above level 3\n long dragonElapseTime = (System.nanoTime() - dragonStartTime) / 1000000;\n if (dragonElapseTime > (6000 - player.getScore() / 3)) { //as score increases, more will spawn\n dragons.add(new Dragon(BitmapFactory.decodeResource(getResources(), R.drawable.dragon), WIDTH + 10, (int) (rand.nextDouble() * (HEIGHT)), 128, 128, 8));\n if (dragons.size() >= 5) { //dragons limitted to only 5\n dragons.remove(dragons.size() - 1);\n }\n dragonStartTime = System.nanoTime();\n }\n for (int i = 0; i < dragons.size(); i++) {\n dragons.get(i).update();\n for (int j = 0; j < bullets.size(); j++) {\n if (collision(dragons.get(i), bullets.get(j))) {\n dragonHitCount++; //if hit increase hitcount\n bullets.remove(j);\n if (dragonHitCount >= 4) { //when hit 4 times it dies\n dragonHitCount = 0;\n dragons.remove(i);\n bullets.remove(j);\n player.addScore(25); //25 score for dragons\n }\n break;\n }\n }\n if (dragons.get(i).getX() < -100) {\n dragons.remove(i); //when off screen remove\n }\n }\n }\n }\n }", "public void removeBomb(Bomb b) {\r\n this.bombs.remove(b);\r\n }", "void kill()\n\t{\n\t\tfor(GameObject G : ObjectList)\n\t\t{\n\t\t\tG.kill();\n\t\t}\n\t}", "public boolean shoot() {\n if (!isReloading && System.currentTimeMillis() - previousShotTime > shootInterval * 1000 && ammoRemaining > 0) {\n\n previousShotTime = System.currentTimeMillis();\n\n ammoRemaining--;\n audioPlayer.setSpatial(holder);\n audioPlayer.playOnce();\n // score -= 50;\n Vec2 angle = Vec2\n .Vector2FromAngleInDegrees(transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread));\n\n Vec2 spawnPosition = transform.getWorldPosition();\n\n Projectile p = new Projectile(spawnPosition,\n Vec2\n .Vector2FromAngleInDegrees(\n transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread)),\n new Sprite(projectilePath));\n p.setSpeed(speed);\n p.setSource(holder);\n p.getCollider().addInteractionLayer(\"Block\");\n p.getCollider().addInteractionLayer(\"Hittable\");\n p.getCollider().addInteractionLayer(\"Walk\");\n p.setOnCollisionListener(other -> {\n if (other.getGameObject() instanceof Player && other.getGameObject() != holder) {\n Player player = (Player) other.getGameObject();\n player.hit(alteredDmg);\n if (GameEngine.DEBUG) {\n System.out.println(\"Bullet Hit \" + other.getName());\n }\n p.destroy();\n\n// player.destroy();\n } else if (other.getGameObject() instanceof Enemy) {\n Enemy e = ((Enemy) other.getGameObject());\n e.hit(alteredDmg);\n if (!e.isAlive()) { // CHeck if enemy survived\n ((Player) p.getSource()).killedEnemy();\n }\n p.destroy();\n } else if (other.getTag() == \"Block\") {\n p.destroy();\n }\n\n });\n return true;\n } else if(ammoRemaining <= 0){\n reloadWeapon();\n return false;\n }else\n return false;\n }", "void clear_missiles() {\n // Remove ship missiles\n ship.missiles.clear();\n for (ImageView ship_missile_image_view : ship_missile_image_views) {\n game_pane.getChildren().remove(ship_missile_image_view);\n }\n ship_missile_image_views.clear();\n\n // Remove alien missiles\n Alien.missiles.clear();\n for (ImageView alien_missile_image_view : alien_missile_image_views) {\n game_pane.getChildren().remove(alien_missile_image_view);\n }\n alien_missile_image_views.clear();\n }", "public void handleFishBomb(FishBomb aFishBomb) {\n\n ArrayList<EnemyFish> fishToRemove = new ArrayList<EnemyFish>();\n\n for (EnemyFish currEnemyFish : fEnemyFishList) {\n\n BoundingBox currEnemyFishBoundingBox = currEnemyFish.getSprite().getBoundingBox();\n\n if (aFishBomb.intersectsRectangle(currEnemyFishBoundingBox)) {\n\n GameLoop.updateScore(currEnemyFish);\n fishToRemove.add(currEnemyFish);\n \n }\n }\n\n for (EnemyFish currEnemyFish : fishToRemove) {\n fEnemyFishList.remove(currEnemyFish);\n }\n }", "public void checkForDeath()\n {\n Bullet2 bullet2 = new Bullet2(getVelocity(), getRotation());\n myWorld2 world = (myWorld2)getWorld();\n Zombie2 zombie = new Zombie2();\n \n if (isTouching(Bullet2.class))\n {\n health -= bullet2.damage;\n \n if(health < 0)\n {\n world.score(2);\n world.removeObject(this);\n } \n }\n else if (getX() == 900) \n {\n world.score(-1);\n world.removeObject(this);\n } \n }", "public void remove() {\n super.remove();\n if (this.caughtEntity != null) {\n this.caughtEntity.noClip = false;\n }\n if (this.angler != null) {\n this.angler.fishingBobber = null;\n this.angler.noClip = false;\n }\n if(this.rod.getItem() == Items.ITEM_GRAB_HOOK){\n this.rod.getOrCreateTag().putBoolean(\"cast\", false);\n }\n }", "public void dropExplosives() {\n // Updates the time elapsed for each of the explosives\n for (int i=0; i<this.explosives.size(); i++) {\n Explosive dormantExplosive = this.explosives.get(i);\n dormantExplosive.increaseTime();\n }\n // If the Airplane has reached the end, doesn't detect any enemies\n // Isn't deleted straight away as it needs to wait for explosives to detonate\n if (super.outOfBounds()) {return;}\n this.timeElapsedDrop += ShadowDefend.getTimescale()/FPS;\n //Adds a new explosive\n if (this.timeElapsedDrop >= this.dropTime) {\n this.timeElapsedDrop = 0;\n Explosive newExplosive = new Explosive(super.getCenter());\n // Centers the explosive at the airplane's current position\n newExplosive.centerRectAt(super.getCenter());\n this.explosives.add(newExplosive);\n // Generates a new drop time in range\n this.dropTime = generateDropTime();\n this.numDropped++;\n }\n\n }", "@Override\n public boolean collide(Entity e) {\n if (e.isExplosion() || (e.isBomb() && (((Bomb) e).isMissile()))) {\n kill();\n ArrayList<Mob> m = Board.getInstance().getMobsAtExcluding(this.getXTile(), this.getYTile(), this);\n for (Mob mob1 : m) {\n if (mob1.isAlive()) {\n mob1.kill();\n }\n }\n return true;\n }\n return false;\n }", "public void stopShooting() {\n\t\tgetWeapon().releaseMain();\n\t\tsetShooting(false);\n\t}", "public void removeSprites(){\r\n\r\n\t}", "private void checkForDeaths() {\n Iterator<Entity> entityIter = this.entities.iterator();\n\n //geht alle teilnehmer durch\n while ( entityIter.hasNext() ) {\n Entity entity = entityIter.next();\n\n //und entfernt sie wenn sie tot sind aus der liste und der engine\n if ( this.combatMapper.get(entity).curHealth <= 0 ) {\n entityIter.remove();\n\n //alle actions der entity entfernen, können ja nichts machen wenn sie tot sind\n Iterator<IAction> actionIter = this.actions.iterator();\n\n while ( actionIter.hasNext() ) {\n if ( actionIter.next().getOwner().equals(entity) ) {\n actionIter.remove();\n }\n }\n\n this.combatExp += this.combatMapper.get(entity).level * 5; //TODO\n\n EventSystem.getInstance().commitEvent(new Event(EventSystem.EventType.KILL_EVENT, entity));\n\n this.combatSystem.getEngine().removeEntity(entity);\n }\n }\n }", "public void checkBombs(final Integer tile){\n if(bombs_location.contains(tile)){\n if(invulnerable){\n showTimedAlertDialog(\"PHEW!\", \"Your GODMODE saved your life\", 5);\n invulnerable = false;\n return;\n }\n invulnerable = false;\n Lejos.makeSound_Boom();\n hp = hp-1;\n DrawHP();\n bombs_location.remove(tile);\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n MultiplayerManager.getInstance().SendMessage(\"bomb_remove \" + revertTile(tile).toString());\n }\n }, 1000);\n if(hp==0){\n onLose();\n }\n showTimedAlertDialog(\"PWNED!\", \"You just stepped on a mine\", 3);\n }\n }", "void dropHandler() {\n if (tickSpeed < 0) {\n if((int)random(1,6) == 1){ //every 6 medkits the handler drops a minigun\n Sprite mg = new Sprite(minigun);\n mg.moveToPoint(random(0,2048), random(0, 2048)); //moves drop to random point\n minigunDrop.add(mg);\n tickSpeed = (int)random(100,500);\n }else if((int)random(1,4) == 1){ //every 4 medkits the handler drops a coilgun\n Sprite cg = new Sprite(coilgun);\n cg.moveToPoint(random(0,2048), random(0,2048)); //moves drop to random point\n coilgunDrop.add(cg);\n tickSpeed = (int)random(100,500); //changes \n }\n else {\n \n \n Medkit hp = new Medkit();\n hp.med.moveToPoint(random(0, 2048), random(0, 2048));\n\n health.add(hp);\n\n tickSpeed = (int)random(100,500);\n }\n }\n tickSpeed--;\n for (Medkit hp: health) {\n hp.med.display();\n hp.timer--;\n\n }\n for (Sprite mg: minigunDrop){\n mg.display();\n }\n for (Sprite cg: coilgunDrop){\n cg.display();\n }\n // e.forward(5);\n}", "private void removeDeadEnemies() {\n ArrayList<Entity> deadEnemies = getAllEnemiesDead();\n if (deadEnemies.size() > 0) {\n for (Entity enemy : deadEnemies) {\n enemiesInCombat.remove(enemy);\n }\n }\n isStillInCombat();\n }", "public void updatePosition()\r\n\t{\r\n\t\tsuper.updatePosition();\r\n\t\t\r\n\t\t// Update the bomb's position\r\n\t\tPoint nextPosition = getPath().getLocation(t++);\r\n\t\tsetX(nextPosition.x + startX);\r\n\t\tint nextY = nextPosition.y + startY;\r\n\t\tsetY(nextY);\r\n\t\t\r\n\t\t// Blow the bomb up after it reaches mid screen\r\n\t\tif (t > 120 || (nextY < (Global.WINDOW_HEIGHT >> 1) && t > 30))\r\n\t\t{\r\n\t\t\tbombSound.stop();\r\n\t\t\tsuper.remove();\r\n\t\t\tGamePanel.makeExplosion(getX(), getY());\r\n\t\t\t\r\n\t\t\t// Injure all the enemies on the screen\r\n\t\t\t\r\n\t\t\tArrayList<Sprite> sprites = GamePanel.getSprites();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < sprites.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tif (sprites.get(i) instanceof Enemy)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy enemy = (Enemy) sprites.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t\tint currentYTop = GamePanel.getLevel().getCurrentY() +\r\n\t\t\t\t\t\tBLOCKS_PER_Y - 1;\r\n\t\t\t\t\tboolean visibleX = enemy.getX() + enemy.getWidth() >= 0 &&\r\n\t\t\t\t\t\tenemy.getX() <= Global.WINDOW_WIDTH;\r\n\t\t\t\t\tboolean yOnScreen = enemy.getY() <= Global.WINDOW_HEIGHT +\r\n\t\t\t\t\t\t100;\r\n\t\t\t\t\tboolean visibleY = enemy.getYBlock() >= currentYTop &&\r\n\t\t\t\t\t\tyOnScreen;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (visibleX && visibleY && enemy.isAlive())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tenemy.offsetHealth(-300);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (enemy.getHealth() <= 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tenemy.remove();\r\n\t\t\t\t\t\t\tGamePanel.offsetNumLevelPoints(100);\r\n\t\t\t\t\t\t\tGamePanel.makeExplosion(enemy.getX(), enemy.getY());\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}\r\n\t\t}\r\n\t}", "public void cleanupBattle(List<Enemy> defeatedEnemies){\r\n Character character = world.getCharacter();\r\n updateAllies();\r\n\r\n ArrayList<MovingEntity> deadFriendlies = new ArrayList<MovingEntity>();\r\n for (MovingEntity friendly: world.getFriendlyEntities()) {\r\n if (friendly.getCurrHP() <= 0) {\r\n deadFriendlies.add(friendly);\r\n friendly.destroy();\r\n }\r\n }\r\n world.getFriendlyEntities().removeAll(deadFriendlies);\r\n\r\n \r\n //ArrayList<Enemy> defeatedEnemies = battle.getDefeated();\r\n for(Enemy defeatedEnemy : defeatedEnemies) {\r\n killEnemy(defeatedEnemy);\r\n }\r\n\r\n if (character.getCurrHP() <= 0) {\r\n world.setGameStateLose();\r\n }\r\n }", "public void onImpact() {\n die();\r\n this.getArrow().remove();\r\n }", "@Override\n\tprotected void on_object_drop(GfxObject bonus) {\n\n\t}", "public void moveTowards(){\n \n \n \n if(!exploded){\n \n \n move(speed);\n \n if(isTouching(Enemy.class)){\n move(explosionRadius); \n \n inRange = (ArrayList) getObjectsInRange(explosionRadius + 25, Enemy.class);\n for(Enemy e : inRange){\n e.hit(damage);\n }\n \n //explode\n exploded = true;\n \n image = new GreenfootImage(\"50x50 aoe.png\");\n image.scale(explosionRadius*2, explosionRadius*2);\n setImage(image);\n //getWorld().removeObject(this);\n }\n else if (isAtEdge())\n {\n getWorld().removeObject(this);\n }\n else if ( radius < distance) {\n getWorld().removeObject(this); \n }\n }\n else{\n setImage(image);\n image.setTransparency(image.getTransparency() - 5);\n if(image.getTransparency() <= 0) getWorld().removeObject(this);\n }\n }", "public void isShot() {\r\n\t\tlives -=1;\r\n\t\tif(isDead())\r\n\t\t{\r\n\t\t\tthis.erase();\r\n\t\t}\r\n\t}", "public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }", "public void enemyShoot()\r\n\t{\r\n\t\tfor (Enemy enemies : enemy)\r\n\t\t{\r\n\t\t\tif (enemies.getHasFired())\r\n\t\t\t{\r\n\t\t\t\tBullet enemyPew = enemies.shoot();\r\n\t\t\t\tif (enemyPew != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.add(enemyPew);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void update() {\r\n super.update();\r\n life -= 1;\r\n if(life <= 0) {\r\n killBullet();\r\n }\r\n }", "private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}", "public void removeFromGame(){\n this.isInGame = false;\n }", "void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirection(angle);\r\n\t\tbullets[slot].reset();\r\n\t\t// Reset the timer\r\n\t\tcount = RELOAD;\r\n\t}", "public AvoidBullets(AIPlayer player) {\r\n\t\tsuper(player);\r\n\t}", "public void die() {\r\n final Entity e = entity;\r\n final EnchantArrow arrow = this;\r\n Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Storage.zenchantments, () -> {\r\n if (Storage.advancedProjectiles.containsKey(e)) {\r\n if (Storage.advancedProjectiles.get(e).size() == 1) {\r\n Storage.advancedProjectiles.remove(e);\r\n } else {\r\n Storage.advancedProjectiles.get(e).remove(arrow);\r\n }\r\n }\r\n }, 1);\r\n }", "private void subtractEnemyMissile() {\n this.enemyMissile -= 1;\n }", "private void nullify() {\n paint = null;\n bg1 = null;\n bg2 = null;\n madafacka = null;\n for(int i=0; i<enemies.size(); i++){\n enemies.remove(i);\n i--;\n }\n currentSprite = null;\n ship = null;\n shipleft1 = null;\n shipleft2 = null;\n shipright1 = null;\n shipright2 = null;\n basicInv1 = null;\n basicInv2 = null;\n badBoyAnim = null;\n\n // Call garbage collector to clean up memory.\n System.gc();\n }", "public void takeDamage()\n {\n if(getWorld()!= null)\n {\n if(this.isTouching(Enemies.class))\n {\n Life = Life - Enemies.damage;\n if(Life <=0)\n {\n getWorld().removeObject(this);\n Store.wealth += Game.credit;\n }\n }\n }\n }", "boolean testRemoveOffscreenBullets(Tester t) {\n return t.checkExpect(lob3.removeOffscreen(100, 100),\n new ConsLoGamePiece(bullet9, new ConsLoGamePiece(bullet8, mt)))\n && t.checkExpect(lob3.removeOffscreen(300, 300), lob3)\n && t.checkExpect(lob3.removeOffscreen(500, 500), lob3)\n && t.checkExpect(mt.removeOffscreen(0, 0), mt);\n }", "public void removeEntity(Entity entity) {\n\t\tif (entity instanceof Bullet) {\n\t\t\tif (((Bullet) entity).getName().equals(\"bullet\")) {\n\t\t\t\tbullet.remove(entity);\n\t\t\t} else if (((Bullet) entity).getName().equals(\"enemy_bullet\")\n\t\t\t\t\t|| ((Bullet) entity).getName().equals(\"boss_bullet\")) {\n\t\t\t\tenemy_bullet.remove(entity);\n\t\t\t}\n\t\t} else if (entity instanceof Enemy) {\n\t\t\tint enemyX = entity.getX();\n\t\t\tint enemyY = entity.getY();\n\t\t\t\n\t\t\tif (!((Enemy) entity).getName().equals(\"boss\")) {\n\t\t\t\tenemy.remove(entity);\n\t\t\t\t// play enemy explosion sfx\n\t\t\t\tsound.get(\"enemyExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\t\n\t\t\t\t// add enemy explosion\n\t\t\t\texplosion.add(new Explosion(this, \"enemy_explosion\", enemyX - 5, enemyY - 5, entity));\n\t\t\t\tpowerupCheck(enemyX, enemyY);\n\t\t\t} else if (((Enemy) entity).getName().equals(\"boss\") && bossExplosionNum == 0) {\n\t\t\t\tbossExplosionNum = 1;\n\t\t\t\t\n\t\t\t\tsound.get(\"bossExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\texplosion.add(new Explosion(this, \"enemy_explosion\", enemyX, enemyY, entity));\n\t\t\t}\n\t\t\t\n\t\t\t// add cash and points to score\n\t\t\tif (!stopDrawingPlayer && ((Enemy) entity).getName().equals(\"green_box\")) {\n\t\t\t\tcash += 30;\n\t\t\t\ttotalCash += 30;\n\t\t\t} else if (!stopDrawingPlayer && ((Enemy) entity).getName().equals(\"red_box\")) {\n\t\t\t\tcash += 50;\n\t\t\t\ttotalCash += 50;\n\t\t\t} else if (!stopDrawingPlayer && ((Enemy) entity).getName().equals(\"boss\")) {\n\t\t\t\ttotalCash += 500;\n\t\t\t}\n\t\t} else if (entity instanceof Powerup) {\n\t\t\t// play obtain powerup sfx\n\t\t\tsound.get(\"powerupGetEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\n\t\t\tEnemy boss = null;\n\t\t\t\n\t\t\tpowerup.remove(entity);\n\t\t\tif (((Powerup) entity).getName() == \"powerup_explosion\") {\n\t\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\t\tif (!enemy.get(i).getName().equals(\"boss\")) {\n\t\t\t\t\t\texplosion.add(new Explosion(this, \"enemy_explosion\", enemy.get(i).getX() - 5,\n\t\t\t\t\t\t\t\tenemy.get(i).getY() - 5, entity));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tboss = enemy.get(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\t\tif (enemy.get(i).getName().equals(\"green_box\")) {\n\t\t\t\t\t\tcash += 30;\n\t\t\t\t\t\ttotalCash += 30;\n\t\t\t\t\t} else if (enemy.get(i).getName().equals(\"red_box\")) {\n\t\t\t\t\t\tcash += 50;\n\t\t\t\t\t\ttotalCash += 50;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// play enemy explosion sfx\n\t\t\t\tsound.get(\"enemyExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\tenemy.clear();\n\t\t\t\t\n\t\t\t\tif (boss != null)\n\t\t\t\t\tenemy.add(boss);\n\t\t\t}\n\t\t} else if (entity instanceof Player) {\n\t\t\t// play player explosion sfx\n\t\t\tsound.get(\"playerExplosionEffect\").playAsSoundEffect(1.0f, 1.0f, false);\n\t\t\t\n\t\t\texplosion.add(new Explosion(this, \"player_explosion\", player.getX() - 5, player.getY() - 5,\n\t\t\t\t\tentity));\n\t\t\tstopDrawingPlayer = true;\n\t\t}\n\t}", "public void drop() {\n\t\t// Has player waited cooldown before trying to fire again?\n\t\tif (System.currentTimeMillis() - this.lastFired > Config.WEAPON_COOLDOWN_TIME * 1000) {\n\t\t\t\n\t\t\t// Can this airship drop bombs?\n\t\t\tif (this.properties.DROPS_BOMB) {\n\t\t\t\tBlock[] cannons = getCannons();\n\t\t\t\tint numfiredcannons = 0;\n\t\t\t\tfor (int i = 0; i < cannons.length; i++) {\n\t\t\t\t\tif (cannons[i] != null && cannons[i].getRelative(0, -1, 0).getType().equals(Material.AIR) && cannonHasTnt(cannons[i], Config.NUM_TNT_TO_DROP_BOMB)) {\n\t\t\t\t\t\tif (numfiredcannons < this.properties.MAX_NUMBER_OF_CANNONS ) {\n\t\t\t\t\t\t\tnumfiredcannons++;\n\t\t\t\t\t\t\tlastFired = System.currentTimeMillis();\n\t\t\t\t\t\t\twithdrawTnt(cannons[i], Config.NUM_TNT_TO_DROP_BOMB);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Spawn primed tnt firing downwards TODO: maybe add sound effects for tnt firing? :P\n\t\t\t\t\t\t\tTNTPrimed tnt = cannons[i].getWorld().spawn(cannons[i].getLocation().clone().add(0, -1, 0), TNTPrimed.class);\n\t\t\t\t\t\t\ttnt.setVelocity(new Vector(0, -0.5, 0));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// More cannons on ship than allowed. Not all fired - can break out of loop now.\n\t\t\t\t\t\t\tplayer.sendMessage(ChatColor.AQUA + \"Some cannons did not fire. Max cannon limit is \" + ChatColor.GOLD + this.properties.MAX_NUMBER_OF_CANNONS);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + this.properties.SHIP_TYPE + \" CANNOT DROP BOMBS\");\n\t\t} else\n\t\t\tplayer.sendMessage(ChatColor.GOLD + \"COOLING DOWN FOR \" + ChatColor.AQUA + (int)(Math.round(6 - (System.currentTimeMillis() - this.lastFired) / 1000)) + ChatColor.GOLD + \" MORE SECONDS\");\n\t}", "@Override\n\tpublic void onCollision(WorldObj obj) {\n\t\tif(obj.removalFlag)\n\t\t\treturn;\n\t\t\n\t\t\n\t\tif(obj.item != null) {\n\t\t\t\n\t\t\t\n\t\t\tif(obj.stateTime > 0.2f) {\n\t\t\t\tAddItemToBag(obj.item,obj.stack);\n\t\t\t\tobj.removalFlag = true;\n\t\t\t\t\n\t\t\t\tGdx.app.debug(\"\", \"\"+obj.stack);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tsuper.onCollision(obj);\n\t}", "@Override\n\tpublic Bullet shoot(int hx, int hy) {\n\t\treturn null;\n\t}", "public void move()\r\n\t{\r\n\t\tfor (int a = 0; a < bullets.size(); a++)\r\n\t\t{\r\n\t\t\tBullet bullet = bullets.get(a);\r\n\t\t\tif (!bullet.move())\r\n\t\t\t{\r\n\t\t\t\tbullets.remove(a);\r\n\t\t\t\ta--;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void stopShoot(){\n\t\tshoot.set(0);\n\t}", "public void hitEvent(Collidable beingHit, Fire bullet) {\r\n int index = this.enemies.indexOf((Enemy) beingHit);\r\n this.removeEnemy((Enemy) beingHit);\r\n this.startLocations.remove(index);\r\n }", "public void removeMissile(Object o,boolean enemy)\n\t{\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.getClass().isInstance(o))\n\t\t\t{\n\t\t\t\tif(((Missile)current).isEnemy() == enemy)\n\t\t\t\t{\n\t\t\t\t\titer.remove();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void delMissile(Missile missile)\r\n {\n \r\n \r\n boolean remove = missiles.remove(missile);\r\n try {\r\n missile.finalize();\r\n } catch (Throwable ex) {\r\n Logger.getLogger(Object_.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //System.out.println(\"Remove: \" + remove);\r\n }", "public void update(){\n\n // advance player and entity loader\n player.advance();\n entityloader.advance();\n\n // if the player is shooting\n if (player.isShooting){\n player.nextBullet--;\n if (player.nextBullet < 0){\n audioloader.play(\"plshoot\"); // play audio\n for (int i = -1; i <= 1; ++i){\n playerBullets.add(new Projectile<RectangleHitbox>(player.getCenterX(), player.getCenterY(), 500, 0, 270 + 2.5 * i, 0, 0, false, 1.5, true, 0,\n player.bulletSprite.getRectangleHitbox(player.bulletSize), player.bulletSprite.img.getScaledInstance(player.bulletSize, player.bulletSize, 1), 0, 0, this));\n } \n player.nextBullet = (int)(FPS / player.bulletsPerSecond);\n }\n }\n\n // Player bullets\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n if (bullet.advance()){\n nextPlayerBullets.add(bullet);\n }\n }\n playerBullets.clear();\n for (Projectile<RectangleHitbox> bullet : nextPlayerBullets){\n playerBullets.add(bullet);\n }\n nextPlayerBullets.clear();\n\n // Circle Enemies\n for (Projectile<CircleHitbox> enemy : circleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (!enemy.isBullet){ // if enemy is not a bullet, check if it is being hit by player bullets\n boolean hit = false; // each enemy can only be hit once each frame\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n hit |= bullet.getHitbox().intersects(enemy.getHitbox());\n if (hit)\n break;\n }\n if (hit){\n enemy.damageTaken += enemy.originalLifetime * enemy.percentDamage;\n }\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextCircleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n circleEnemies.clear();\n for (Projectile<CircleHitbox> enemy : nextCircleEnemies){ // swap nextCircleEnemies with circleEnemies\n circleEnemies.add(enemy);\n }\n nextCircleEnemies.clear();\n\n // Rectangle Enemies\n for (Projectile<RectangleHitbox> enemy : rectangleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextRectangleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n rectangleEnemies.clear();\n for (Projectile<RectangleHitbox> enemy : nextRectangleEnemies){ // swap nextRectangleEnemies with rectangleEnemies\n rectangleEnemies.add(enemy);\n }\n nextRectangleEnemies.clear();\n\n }", "@Override\r\n public void init(GameContainer gc) throws SlickException {\r\n\r\n \tbulletsToRemove = new ArrayList<Body>();\r\n \tbulletsToAdd = new ArrayList<Float[]>();\r\n \tbulletList = new ArrayList<Bullet>();\r\n \t\r\n \t//Set camera coordinates and size.\r\n viewport = new Rectangle(0, 0, 1024, 600);\r\n \r\n //Load our map. (Made in a program called TILED)\r\n map1 = new TiledMap(\"data/2.tmx\");\r\n \r\n \r\n //Create our World, enter a gravity (100 default, bullets have a gravity variable of this*0.05)\r\n Vec2 gravity = new Vec2(0, 100);\r\n world = new World(gravity);\r\n \r\n //Create 2 players.\r\n //Player 1\r\n player1 = new Player(5, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player1.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n //Player 2\r\n player2 = new Player(15, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player2.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n hpbar = new Image(\"data/healthbar.png\");\r\n \r\n //If we want multiplayer, connect to the server.\r\n if(multiplayer) {\r\n \t//Connecting to someone\r\n \tisHosting = false;\r\n \tmyPlayer = player2;\r\n \thisPlayer = player1;\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Connected to server\";\r\n }\r\n else {\r\n \t//Connecting to ourselfs\r\n \tisHosting = true;\r\n \tmyPlayer = player1;\r\n \thisPlayer = player2;\r\n \tnew BFServer(true);\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Local server online\";\r\n }\r\n \r\n //Set player2's friction to only about half of ours, this will reduce \"lag\" and simulate running better.\r\n FixtureDef fd = hisPlayer.getFixture();\r\n fd.friction = 2;\r\n hisPlayer.getBody().createFixture(fd);\r\n \r\n //Get collision layer from map\r\n int collisionLayerIndex = map1.getLayerIndex(\"collision\");\r\n\r\n //Create our collision blocks in the physics engine.\r\n for(int row=0; row<map1.getWidth(); row++) {\r\n \tfor(int col=0; col<map1.getHeight(); col++) {\r\n \t\tif(map1.getTileId(row, col, collisionLayerIndex)==1) {\r\n \t\t\tBodyDef groundBodyDef = new BodyDef();\r\n \t\t\tgroundBodyDef.position.set(row*2, col*2);\r\n \t\t\tBody groundBody = world.createBody(groundBodyDef);\r\n \t\t\tPolygonShape groundBox = new PolygonShape();\r\n \t\t\tgroundBox.setAsBox(1, 1, new Vec2(1, 1), 0);\r\n \t\t\tgroundBody.createFixture(groundBox, 0);\r\n \t\t}\r\n \t}\r\n }\r\n \r\n\r\n //Setup physics world\r\n timeStep = 1.0f/60.0f;\r\n velocityIterations = 6;\r\n positionIterations = 2;\r\n \r\n //Add a new collision listener to our world.\r\n world.setContactListener(new BFContactListener());\r\n \r\n //Add Keylistener to our GameContainer.\r\n gc.getInput().addKeyListener(keylistener);\r\n \r\n //Physics debug draw. (DEPRECATED. I'm using JBox2d-2.3.0 SNAPSHOT, this debugdraw hasn't been updated for it yet)\r\n \r\n //Slick2dDebugDraw sDD = new Slick2dDebugDraw(gc.getGraphics(), gc);\r\n //sDD.setFlags(0x0001); //Setting the debug draw flags, draw polygons, no joints.\r\n //world.setDebugDraw(sDD);\r\n }", "void removeAllSpawn();", "private void fireball1Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball1.getX() - 1, fireball1.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball1.getX() - 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tGObject topRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY());\r\n\t\tGObject bottomRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tif(topLeft == player || bottomLeft == player || topRight == player || bottomRight == player) {\r\n\t\t\tremove(fireball1);\r\n\t\t\tfireball1 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\tAlly.update();\r\n\t\tEnemy.update();\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tif(GroundList.get(i).kill) {\r\n\t\t\t\tGroundList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BarelList.size(); i++) {\r\n\t\t\tif(BarelList.get(i).kill) {\r\n\t\t\t\tBarelList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tif(WoodList.get(i).kill) {\r\n\t\t\t\tWoodList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tif(FireBallList.get(i).kill) {\r\n\t\t\t\tFireBallList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tif(BulletList.get(i).kill) {\r\n\t\t\t\tBulletList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tGroundList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0 ; i < BarelList.size(); i++) {\r\n\t\t\tBarelList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tBulletList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tFireBallList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tWoodList.get(i).update();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(GamePanel.updateTimes%60 == 0) {\r\n\t\t\tEnemy.PushEntity(2, new Vector2f(width*1/2, height/4),enemy);\r\n\t\t}\r\n\t\tfor(int i = 0; i < AllyDeadList.size(); i++) {\r\n\t\t\tAlly.entityList.remove(AllyDeadList.get(i)-i);\r\n\t\t}\r\n\t\tfor(int i = 0; i < EnemyDeadList.size(); i++) {\r\n\t\t\tEnemy.entityList.remove(EnemyDeadList.get(i)-i);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tAllyDeadList.clear();\r\n\t\tEnemyDeadList.clear();\r\n\t\tfor(int i = 0; i < Ally.entityList.size(); i++) {\r\n\t\t\tif(Ally.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tAllyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < Enemy.entityList.size(); i++) {\r\n\t\t\tif(Enemy.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tEnemyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\t\r\n\t\t\t\t\tfor(Entity as: Bukkit.getWorld(\"world\").getEntities()) {\r\n\t\t\t\t\t\tif(as instanceof ArmorStand) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tas.remove();\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\t//TOPS\r\n\t\t\t\t\r\n\t\t\t\t\tif(MetodosWarps.containsWarp(\"topkills\")) {\r\n\t\t\t\t\t getTop(locTopKILLS,\"Kills\");\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žAžlTOP KILLS ATUALIZADO COM SUCESSO! \\n \");\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žcžlO TOP KILLS NAO PODE SER CARREGADO, POIS A WARP topkills NAO ESTA SETADA! \\n \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(MetodosWarps.containsWarp(\"topcoins\")) {\r\n\t\t\t\t\t getTop(locTopCoins,\"Coins\");\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žAžlTOP COINS ATUALIZADO COM SUCESSO! \\n \");\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žcžlO TOP COINS NAO PODE SER CARREGADO, POIS A WARP topkills NAO ESTA SETADA! \\n \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(MetodosWarps.containsWarp(\"top1v1\")) {\r\n\t\t\t\t\t getTop(locTop1v1,\"wins\");\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žAžlTOP 1v1 ATUALIZADO COM SUCESSO! \\n \");\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žcžlO TOP 1v1 NAO PODE SER CARREGADO, POIS A WARP top1v1 NAO ESTA SETADA! \\n \");\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\r\n\t\t\t\t\t//Caixa misteriosa\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(MetodosWarps.containsWarp(\"misteryBox\")) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t Spawn(misteryBox, \"žažlCAIXA MISTERIOSA\",misteryBox.getY()-1.7);\r\n\t\t\t\t\t Spawn(misteryBox, \"žežlEM BREVE!\",misteryBox.getY()-2);\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žAžlMYSTERYBOX ATUALIZADO COM SUCESSO! \\n \");\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žcžlO TOP COINS NAO PODE SER CARREGADO, POIS A WARP misteryBox NAO ESTA SETADA! \\n \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }" ]
[ "0.7661584", "0.7428656", "0.73217756", "0.7239031", "0.720221", "0.7184822", "0.7113793", "0.7060166", "0.7013538", "0.685625", "0.67437714", "0.67117053", "0.6665686", "0.6614477", "0.6608741", "0.6598063", "0.65848726", "0.6573795", "0.65608895", "0.65377706", "0.6530861", "0.65275", "0.6454361", "0.6452007", "0.64437026", "0.64325684", "0.6421527", "0.64005756", "0.6399839", "0.6381048", "0.6376", "0.6373472", "0.6364447", "0.6362884", "0.63564426", "0.63548356", "0.6336913", "0.63353586", "0.6330993", "0.6330302", "0.6319491", "0.6309614", "0.63006324", "0.62957245", "0.6295393", "0.62853336", "0.6279761", "0.6273112", "0.62683046", "0.6267576", "0.626125", "0.6251621", "0.62271184", "0.6222944", "0.6216126", "0.62112534", "0.62085694", "0.62027895", "0.61992866", "0.6187158", "0.61862236", "0.61831445", "0.61729616", "0.6162958", "0.6142504", "0.6138015", "0.61368364", "0.61358935", "0.6118669", "0.61137784", "0.6112355", "0.6105627", "0.60925096", "0.6089515", "0.60723424", "0.6061012", "0.6059951", "0.6059433", "0.6051913", "0.60480213", "0.6044236", "0.60304743", "0.6026068", "0.6025464", "0.6022345", "0.6019095", "0.60188425", "0.601406", "0.60061556", "0.5985632", "0.59729165", "0.5964826", "0.59632427", "0.5963181", "0.5952692", "0.59501314", "0.5950102", "0.5925774", "0.5923802", "0.59167606" ]
0.74297774
1
constructor to define the bullet
Bullet(int posX,int posY,int velX,int velY,int classOfObejct,int attack){ this.posX = posX; this.posY = posY; this.velX = velX; this.velY = velY; this.classOfObejct = classOfObejct; this.attack = attack; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Bullet() {\n super();\n }", "public Bullet() {\n\t\t\n\t\tx = 0;\n\t\ty = 0;\n\t\timgBullet = new ImageIcon(getClass().getResource(\"lu.png\"));\n\t\twidth=imgBullet.getIconWidth();\n\t\theight=imgBullet.getIconHeight();\n\t\tshot = false;\n\t\n\t}", "public EnemyGunBullet1() {\n super(DAMAGE, SPEED);\n setEnemyBullet(true);\n setShootSound(\"enemyShot.wav\");\n try {\n image = ImageIO.read(new File(\"res/images/tanks/bullets/enemyBullet1.png\"));\n }\n catch (IOException e) { }\n }", "public void setBullet(Bullet bullet) {\r\n\t\tthis.bullet = bullet;\r\n\t}", "public BulletController(Bullet bullet) {\n this.bullet = bullet;\n rangeTimer = 0;\n }", "@Override\n public Bullet getBullet() {\n return new EnemyGunBullet1();\n }", "public void createBullet(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player != null) {\r\n Bullet bullet = new Bullet(x, y);\r\n bullet.player = name;\r\n playAudio(\"shoot\");\r\n }\r\n }", "public Bullet(float x, float y, int bitmapId, float xDest, float yDest, boolean shootsEnemies)\n {\n super(x, y, bitmapId);\n this.xDest = xDest;\n this.yDest = yDest;\n this.shootsEnemies = shootsEnemies;\n\n this.setAngle(calcAngle(x, y, xDest, yDest));\n }", "public void setBullet(Bullet _bul) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n bul = _bul;\n }", "public void fireBullet(){\n\t\tBullet bullet = new Bullet(ship);\n\t\tbullets.add(bullet);\n\t\tsoundMan.playBulletSound();\n\t}", "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }", "public Bullet(ProximityVector position, double angle, ParticleManager particleManager) {\n //Arguments: ProximityEffect particleEffect, int health, int speed, Sound sound, Image image, ProximityVector position, double angle, Creep target\n super(particleManager.getBulletEffect(), 1, 20, sound, img, position, angle);\n\n }", "public void drawBullet(){\n if (classOfObejct == 0){\n colorMode(RGB,255,255,255);\n noStroke();\n fill(255,100,30);\n ellipse(posX, posY, 6, 9);\n fill(255,153,51);\n ellipse(posX,posY, 4, 6);\n fill(255,255,100);\n ellipse(posX,posY, 2, 3);\n fill(255,255,200);\n ellipse(posX,posY, 1, 1);\n stroke(1);\n }\n else{\n colorMode(RGB,255,255,255);\n noStroke();\n fill(51,153,255);\n ellipse(posX, posY, 8, 8);\n fill(102,178,255);\n ellipse(posX,posY, 6, 6);\n fill(204,229,255);\n ellipse(posX,posY, 4, 4);\n fill(255,255,255);\n ellipse(posX,posY, 2, 2);\n stroke(1);\n }\n }", "private void placeBullet(double x, double y) {\r\n\t\tb = new Bullet(x, y);\r\n\t\taddParticipant(b);\r\n\t\tb.setVelocity(BULLET_SPEED, ship.getRotation());\r\n\t\tnew ParticipantCountdownTimer(b, \"expire\", BULLET_DURATION);\r\n\t}", "@Override\n\tpublic void onCreateBulletEvent() {\n\t\tcreateBullet();\n\t}", "public M_Bullet shoot() {\n Point leftCorner = this.getLocation();\n // get the center of the character\n int x = leftCorner.x;\n int y = leftCorner.y;\n Point dim = this.getDimensions();\n int h = dim.y;\n int w = dim.x;\n h = h / 2;\n w = w / 2;\n Point center = new Point(x + w, y + h);\n // get the velocity for the bullet\n Point vel = new Point(this.getDirection() * 3, 0);\n // set the enemy's shot cooldown to its shot interval.\n setShotCooldown(getShotInterval());\n // return the new bullet\n return new M_Bullet(center, this.getStrength(), vel, true);\n }", "@Override\n public void init() {\n GetSprite(\"/images/bullet.png\");\n MusicUtils.StopASounds(\"/music/Laser_Shoot.wav\");\n Level().play(\"/music/Laser_Shoot.wav\");\n }", "public void init(){\n hp = DEFAULT_MAX_HEALTH;\n bulletsFired = new ArrayList<>();\n initial_y = -1;\n\n //Sets the byte to identify the state of movement\n //For animation purposes in the renderer\n //0 = stationary\n //1 = jumping\n //2 = moving left\n //3 = jumping left\n //4 = right\n //5 = Jumping right\n //6 = crouching\n //8 = crouching left\n //10 = crouching right\n stateOfMovement = 0;\n }", "@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}", "public Bullet getBullet() {\n\t\treturn bullet;\n\t}", "public Bullet(Vector2D position, Vector2D velocity, int radius, int parent) {\r\n super(new Vector2D(position), new Vector2D(velocity), radius);\r\n life = 250;\r\n this.parent_type = parent;\r\n setImage(Constants.BULLET1);\r\n }", "public Bullet(double theta, double x, double y){\n\t\t\tmovex = speed*Math.cos(theta); //calculates the move speed based on the angle upon which it is fired from\n\t\t\tmovey = -speed*Math.sin(theta);\t\t\t\t\t\n\t\t\tbx = (int)x;\n\t\t\tby=(int) y;\n\t\t\tthis.setBounds((int)bx,(int)by,10,10);\n\n\t\t}", "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "public BulletView(DeathmatchMania game) {\n super(game);\n }", "public boolean IsBullet()\r\n {\r\n return this.isBullet;\r\n }", "public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }", "public Bullet(double x,boolean xN, double y,boolean yN, double dir)\r\n\t{\r\n\t\tsuper(x,y,WIDTH,HEIGHT);\t\r\n\t\txVel = SPEED*Math.cos(dir);\r\n\t\tyVel = SPEED*Math.sin(dir);\r\n\t\tif(xN)\r\n\t\t\txVel*=-1;\r\n\t\tif(yN)\r\n\t\t\tyVel*=-1;\r\n\t}", "public BulletAddedEvent(Bullet b)\r\n {\r\n bull = b;\r\n }", "@Override\n public void attack(){\n int xBullet=0,yBullet=0;\n switch(direction){\n case 0:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()*3/4);\n break;\n case 1:\n xBullet=(int)(x+Sprite.python_left.getWidth()*3/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 2:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 3:\n xBullet=(int)(x+Sprite.python_left.getWidth()/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n }\n PythonBullet pythonBullet=new PythonBullet(xBullet,yBullet,board,Player.PLAYER_SPEED*1.5);\n pythonBullet.setDirection(direction);\n board.addBullets(pythonBullet);\n\n }", "private void quickFireBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Pink\"));\n\t}", "@Override\n\tpublic Bullet shoot(int hx, int hy) {\n\t\treturn null;\n\t}", "public Bullet getBullet() {\r\n\t\treturn this.bullet;\r\n\t}", "public Bullet(int bulletsDamage, @NotNull String bulletsType, Coordinate centerPointCoordinate, double angle, TankTroubleMap tankTroubleMap, boolean isUserTank, int tankIndex) {\n this.isUserTank = isUserTank;\n this.tankIndex = tankIndex;\n this.centerPointCoordinate = centerPointCoordinate;\n updateArrayListCoordinates();\n bulletsBlasted = false;\n damage = bulletsDamage;\n this.tankTroubleMap = tankTroubleMap;\n if (bulletsType.equals(\"NORMAL\")) {\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/normal.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (bulletsType.equals(\"LASER\")) { // ba else nazadam yevakht khastim emtiazi ezafe konim ye golule\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/laser.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n this.angle = angle;\n\n fireTime = LocalDateTime.now();\n Thread thread = new Thread(() -> {\n try {\n Thread.sleep(4000);\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n\n }", "@Override\n public void draw(Bullet b){\n Draw.color(Palette.lightFlame, Palette.darkFlame, Color.GRAY, b.fin());\n Fill.circle(b.x, b.y, 3f * b.fout());\n Draw.reset();\n }", "public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}", "@Override\n public Bullet getBullet(Ship theShip) {\n Point speed = new Point(6, 0);\n Point location = theShip.getLocationPoint();\n Bullet b = new Bullet(location, speed, strength, new AngledMotion(), theShip, getImage());\n b.setHeading(theShip.getHeading());\n return b;\n }", "public Bullet(double angle, int x, int y,boolean update) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tr = 2;\n\n\t\trad = Math.toRadians(angle);\n\t\tspeed = 10;\n\t\tdx = Math.cos(rad) * speed;\n\t\tdy = Math.sin(rad) * speed;\n\n\t\tthis.angle= (float) angle;\n\t\tcolor1 = Color.YELLOW;\n\n\t\tneedToSend=false;\n\t}", "public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }", "public void setBulletintype(Integer bulletintype) {\n this.bulletintype = bulletintype;\n }", "public UpBullet(CopyOnWriteArrayList<Slender> slender,CopyOnWriteArrayList<Slender> slender1,CopyOnWriteArrayList<Slender> slender2,Boss boss,CopyOnWriteArrayList<box> boxes, int x, int y,int width, int height, String img)\r\n\t{\r\n\t\tthis.slender = slender;\r\n\t\tthis.slender1 = slender1;\r\n\t\tthis.slender2 = slender2;\r\n\r\n\t\tthis.boss = boss;\r\n\r\n\t\tthis.boxes = boxes;\r\n\r\n\t\tcurrentx = x;\r\n\t\tcurrenty = y;\r\n\t\tthis.height = height;\r\n\t\tthis.width = width;\r\n\t\tthis.img = getImage(img);\r\n\t\tthis.rect = new Rectangle(x, y,width,height);\r\n\t}", "public void setBullet (boolean flag) {\n\t\tbody.setBullet(flag);\n\t}", "public AvoidBullets(AIPlayer player) {\r\n\t\tsuper(player);\r\n\t}", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "@Override\n public void fireBullet(ArrayList<ScreenObject> level) {\n level.add(new ShipBullet(position.x, position.y, 8, 8, direction));\n }", "@Override\n public void create () {\n batch = new SpriteBatch();\n height = Gdx.graphics.getHeight();\n width = Gdx.graphics.getWidth();\n\n bullets = new ArrayList<Bullet>();\n fondo = new Texture(\"background.png\");\n nave = new Texture(\"space-ship-24px.png\");\n\n spaceship = new SpaceShip();\n Enemy = new Enemy();\n //Enemy = new Sprite(nave);\n //spaceship.setPosition(348, 50);\n Enemy.setPosition(348, 300);\n System.out.println(x);\n }", "private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}", "public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }", "public void placeAlienBullet() {\r\n\t\tif (alien != null) {\r\n\t\t\t// If the alien is large fires a bullet in a random direction\r\n\t\t\tif (alien.getSize() == 1 && ship != null) {\r\n\r\n\t\t\t\t// Create the alien bullet\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\r\n\t\t\t\t// give the alien bullet a random direction and the bullet speed velocity,\r\n\t\t\t\t// then add as participant\r\n\t\t\t\tdouble r = (2 * Math.PI) * RANDOM.nextDouble();\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, r);\r\n\t\t\t\taddParticipant(ab);\r\n\r\n\t\t\t\t// Sets the alien bullet to expire when it reaches the bullet duration time\r\n\t\t\t\t// limit\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\r\n\t\t\t// If the alien is small fires a bullet aimed directly at the ship\r\n\t\t\tif (alien.getSize() == 0 && ship != null) {\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\t\t\t\tab.setSpeed(BULLET_SPEED);\r\n\r\n\t\t\t\t// Aims the alien bullet directly at the ship\r\n\t\t\t\tdouble A = ship.getY() - alien.getY();\r\n\t\t\t\tdouble B = ship.getX() - alien.getX();\r\n\t\t\t\tdouble angle = Math.atan2(A, B);\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, angle);\r\n\r\n\t\t\t\t// Add the alien bullet as a participant and then set it to expire when it\r\n\t\t\t\t// reaches the bullet duration time limit\r\n\t\t\t\taddParticipant(ab);\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public Bullet fireCannon0(String line){\r\n\t\treturn new Bullet(line, new Point(950,70+225));\r\n\t}", "public Projectile(Vec2 position, Vec2 direction, Sprite sprite) {\n super(position, direction, sprite);\n allProjectilse.add(this);\n startPosition = transform.getGlobalPosition();\n setCollider(new CircleCollider(this, 30));\n setRenderLayer(RenderLayer.RenderLayerName.HIGH_BLOCKS);\n\n\n collider.setName(\"Bullet\");\n collider.setTag(\"DMG\");\n\n startTime = System.currentTimeMillis();\n startSize = new Vec2(1, 1);\n squareHeightStart = 1;\n squareWithStart = 1;\n }", "public Image getBulletImg(){ \n return SpriteSheet.playerProjectileSprites[this.frameNumber]; \n }", "private void multiBulletFire() {\n\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 20, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) - 10, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 50, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t}", "public void dispara()\r\n {\r\n BulletEnemy bala = new BulletEnemy();\r\n getWorld().addObject(bala,getX(),getY()+25);\r\n }", "public Bullet fireCannon1(String line){\r\n\t\treturn new Bullet(line, new Point(950,70+110));\r\n\t}", "public Case(int posX, int posY, LivingBeing lb){\n\t\tthis.posX=posX; \n\t\tthis.posY=posY;\n\t\tthis.lb=lb; \n\t}", "Snake(){\n T=new Text(String.valueOf(numBalls));\n body=new ArrayList<Circle>();\n setNumBalls(4);\n \n }", "@Override\r\n public void init(GameContainer gc) throws SlickException {\r\n\r\n \tbulletsToRemove = new ArrayList<Body>();\r\n \tbulletsToAdd = new ArrayList<Float[]>();\r\n \tbulletList = new ArrayList<Bullet>();\r\n \t\r\n \t//Set camera coordinates and size.\r\n viewport = new Rectangle(0, 0, 1024, 600);\r\n \r\n //Load our map. (Made in a program called TILED)\r\n map1 = new TiledMap(\"data/2.tmx\");\r\n \r\n \r\n //Create our World, enter a gravity (100 default, bullets have a gravity variable of this*0.05)\r\n Vec2 gravity = new Vec2(0, 100);\r\n world = new World(gravity);\r\n \r\n //Create 2 players.\r\n //Player 1\r\n player1 = new Player(5, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player1.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n //Player 2\r\n player2 = new Player(15, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player2.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n hpbar = new Image(\"data/healthbar.png\");\r\n \r\n //If we want multiplayer, connect to the server.\r\n if(multiplayer) {\r\n \t//Connecting to someone\r\n \tisHosting = false;\r\n \tmyPlayer = player2;\r\n \thisPlayer = player1;\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Connected to server\";\r\n }\r\n else {\r\n \t//Connecting to ourselfs\r\n \tisHosting = true;\r\n \tmyPlayer = player1;\r\n \thisPlayer = player2;\r\n \tnew BFServer(true);\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Local server online\";\r\n }\r\n \r\n //Set player2's friction to only about half of ours, this will reduce \"lag\" and simulate running better.\r\n FixtureDef fd = hisPlayer.getFixture();\r\n fd.friction = 2;\r\n hisPlayer.getBody().createFixture(fd);\r\n \r\n //Get collision layer from map\r\n int collisionLayerIndex = map1.getLayerIndex(\"collision\");\r\n\r\n //Create our collision blocks in the physics engine.\r\n for(int row=0; row<map1.getWidth(); row++) {\r\n \tfor(int col=0; col<map1.getHeight(); col++) {\r\n \t\tif(map1.getTileId(row, col, collisionLayerIndex)==1) {\r\n \t\t\tBodyDef groundBodyDef = new BodyDef();\r\n \t\t\tgroundBodyDef.position.set(row*2, col*2);\r\n \t\t\tBody groundBody = world.createBody(groundBodyDef);\r\n \t\t\tPolygonShape groundBox = new PolygonShape();\r\n \t\t\tgroundBox.setAsBox(1, 1, new Vec2(1, 1), 0);\r\n \t\t\tgroundBody.createFixture(groundBox, 0);\r\n \t\t}\r\n \t}\r\n }\r\n \r\n\r\n //Setup physics world\r\n timeStep = 1.0f/60.0f;\r\n velocityIterations = 6;\r\n positionIterations = 2;\r\n \r\n //Add a new collision listener to our world.\r\n world.setContactListener(new BFContactListener());\r\n \r\n //Add Keylistener to our GameContainer.\r\n gc.getInput().addKeyListener(keylistener);\r\n \r\n //Physics debug draw. (DEPRECATED. I'm using JBox2d-2.3.0 SNAPSHOT, this debugdraw hasn't been updated for it yet)\r\n \r\n //Slick2dDebugDraw sDD = new Slick2dDebugDraw(gc.getGraphics(), gc);\r\n //sDD.setFlags(0x0001); //Setting the debug draw flags, draw polygons, no joints.\r\n //world.setDebugDraw(sDD);\r\n }", "public SingleBullet(int width, int height, ITextureRegion textureRegion,\n VertexBufferObjectManager vertexBufferObjectManager) {\n super(width, height, textureRegion, vertexBufferObjectManager);\n }", "public Flame_Tank(int defx, int defy) {\n\t\tsuper(defx,defy);\n\t\twidth = 58;\n\t\theight = 31;\n\t\thitBox = new Rectangle(defx, defy, width, height); // fix this\n\t\txMaxSpeed = 0.3f;\n\t\tfriction = 0.01f;\n\t\tjumpStrength = 0.5f;\n\t\telasticity = 0.2f;\n\t\thp = 1000;\n\t\t\n\t\ttry {\n\t\t\tblank = new Image (\"res/blank.png\");\n\t\t\tft1 = new Image (\"res/Flare_Tank1.png\");\n\t\t\tft2 = new Image (\"res/Flare_Tank2.png\");\n\t\t\tftb1 = new Image (\"res/Flare_Tank_b1.png\");\n\t\t\tftb2 = new Image (\"res/Flare_Tank_b2.png\");\n\t\t\tftb3 = new Image (\"res/Flare_Tank_b3.png\");\n\t\t\tftb4 = new Image (\"res/Flare_Tank_b4.png\");\n\t\t} catch (SlickException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tftank[0] = ft1;\n\t\tftank[1] = ft2;\n\t\tftank[2] = ft2;\n\t\tftank[3] = ftb1;\n\t\tftank[4] = ftb2;\n\t\tftank[5] = ftb3;\n\t\tftank[6] = ftb4;\n\t\tftank[7] = blank;\n\t\tFlame_tank = new Animation(ftank,200,true);\n\t\t\n\t\tweapons.add(new Weapon(Weapon.getWeapons().get(7)));\n\t\tfor(Weapon w : weapons) {\n\t\t\tw.setEnemy(true);\n\t\t}\n\t\tcurrentWeapon = weapons.get(1);\n\t}", "public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }", "@Override\n\tpublic void collideWith(Bullet bullet) {\n\t\tbulletMoveForward(bullet);\n\t}", "public static void addBullet(float x, float y, float xspeed, float yspeed) {\r\n \tFloat[] t = new Float[4];\r\n \tt[0] = x;\r\n \tt[1] = y;\r\n \tt[2] = xspeed;\r\n \tt[3] = yspeed;\r\n \tbulletsToAdd.add(t);\r\n }", "public ImageIcon getBullet() {\n\t\treturn imgBullet;\n\t}", "public BulletBody(World world, ElementModel model, boolean direction) {\n super(world, model);\n multiplier = direction ? 1 : -1;\n createFixture(getBody(), null, 0, 0, 0f, 0f, 0f, (short) 0, (short) 0);\n }", "private void fire(GameEngine gameEngine) {\n Bullet bullet1 = gameEngine.getBulletEnemy();\n if (bullet1 == null) {\n return;\n }\n bullet1.init(this, positionX + imageWidth/2, positionY, 0);\n gameEngine.addGameObject(bullet1);\n gameEngine.playSound(1);\n }", "public TuringMachine()\n {\n this.tape = new ArrayList<MyChar>();\n this.head = 0;\n }", "public Bullet fireCannon2(String line){\r\n\t\treturn new Bullet(line, new Point(950,70+340));\r\n\t}", "private void killBullet() {\r\n this.dead = true;\r\n }", "public void drawBullets(){\n if(!world.getPlayer().getWeapon().getBullets().isEmpty()) {\n for (Bullet b : world.getPlayer().getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y * ppuY,\n b.SIZE * ppuX, b.SIZE * ppuY);\n }\n }\n if(!world.getEnemies().isEmpty()) {\n for(Enemy e: world.getEnemies()){\n if(!e.getWeapon().getBullets().isEmpty()){\n for (Bullet b : e.getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }\n }\n if(!world.getBullets().isEmpty()) {\n for(Bullet b : world.getBullets()){\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }", "public void shoot(ArrayList<Bullet> alienBullets)\r\n\t{\r\n\t\t//do nothing usually\r\n\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tshootBullet(arg0);\r\n\t\t\t}", "public Flappy() \r\n\t{\r\n\t\t//sets the properties of the bird\r\n\t\tx = 100;\r\n\t\ty = 150;\r\n\t\tyVel = 0;\r\n\t\twidth = 45;\r\n\t\theight = 32;\r\n\t\tgravity = 0.5;\r\n\t\tjDelay = 0;\r\n\t\trotate = 0.0;\r\n\t\talive = true;\r\n\t}", "void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirection(angle);\r\n\t\tbullets[slot].reset();\r\n\t\t// Reset the timer\r\n\t\tcount = RELOAD;\r\n\t}", "public Bomb(int x, int y){\r\n\t\t\r\n\t\t//Bomb image.\r\n\t\tImageIcon bombIMG = new ImageIcon(\"src/sprites/bullet9.png\");\r\n\t\tsetImage(bombIMG.getImage());\r\n\t\t\r\n\t\t//It just so works out that the bombs drop nicely from the alien sprite so no offset is needed.\r\n\t\tsetx(x);\r\n\t\tsety(y);\r\n\t\t\r\n\t}", "protected ArrayList<Bullet> getBullets()\r\n\t{\r\n\t\treturn bullets;\r\n\t}", "public Integer getBulletintype() {\n return bulletintype;\n }", "public Image getBulletsImage() {\n return bulletsImage;\n }", "public Water_Hero(RefLinks refLink, float x, float y)\r\n {\r\n ///Apel al constructorului clasei de baza\r\n super(refLink, x,y, Character.DEFAULT_CREATURE_WIDTH, Character.DEFAULT_CREATURE_HEIGHT);\r\n\r\n ///Seteaza imaginea de start a eroului\r\n image = Assets.heroLeft;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea implicita(normala)\r\n normalBounds.x = 16;\r\n normalBounds.y = 16;\r\n normalBounds.width = 16;\r\n normalBounds.height = 32;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea de atac\r\n attackBounds.x = 10;\r\n attackBounds.y = 10;\r\n attackBounds.width = 38;\r\n attackBounds.height = 38;\r\n\r\n jumpingTimer = new Timer();\r\n\r\n lista_dinamic_element = new ArrayList<CollisionItem>();\r\n\r\n lista_static_element = new ArrayList<CollisionItem>();\r\n list_fire = new ArrayList<CollisionItem>();\r\n }", "private void moveBullet() {\r\n\t\tif(bullet != null) {\r\n\t\t\tbullet.move(bulletVelocity, 0);\r\n\t\t}\r\n\t}", "public Big_shot(double x,double y,double velocity,double angle){\n\t\tsuper(x,y,velocity,angle,100,30);\n\t}", "public FireTile() {\n super();\n setUtility(5);\n }", "public Gun() {\n\t\tgunName = \"pistol\";\n\t\tammo = 7;\n\t\taccuracy = 7;\n\t}", "Hero()\n\t{\n\t\t\n\t\tsuper(152,500,97,124);\n\t\tlife = 3;\n\t\tdoubleFire = 0;\n\t\t\n\t}", "public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Replace the next line with any behavior you would like\n\t\t\n\t}", "@Override\n public void draw(Graphics2D g2d) {\n g2d.drawImage(getBulletImg(), this.getX(), this.getY(), null);\n \n }", "public LaserCanvas()\r\n\t{\r\n\t\tsuper();\r\n\t\t\r\n\t\tgame = new LaserTutor();\r\n\t\t\r\n\t\tgame.initialize( );\r\n\t}", "public Weapon(Player player)\n\t{\n\t\tthis.bullets=new ArrayList<Bullet>();\n\t\tthis.player=player;\n\t\tpause = cooldown;\n\t}", "public Lunge() {\n super(SkillFactory.LUNGE, \"Lunge\", SkillDescription.lunge, 15, Pokemon.Type.BUG,\n SkillCategory.PHYSICAL, 100, 80, 1, 1.0);\n secondaryEffects.add(new AttackEffect(SecondaryEffect.Target.ENEMY, 1,\n SecondaryEffect.StatDirection.DECREASE));\n makesPhysicalContact = true;\n }", "void fire() {\r\n // firing a shot takes energy\r\n if (!expendEnergy(BULLET_ENERGY))\r\n return;\r\n\r\n //create a bullet object so it doesn't hit the ship that's firing it\r\n double xV = getXVel() + BULLET_SPEED * (Math.cos(orientation));\r\n double yV = getYVel() + BULLET_SPEED * (Math.sin(orientation));\r\n\r\n // create the actual bullet\r\n new Bullet(\r\n getGame(),\r\n (getXPos() + ((getSize()/2 + 2) * (Math.cos(orientation))) + xV),\r\n (getYPos() + ((getSize()/2 + 2) * (Math.sin(orientation))) + yV),\r\n xV,\r\n yV);\r\n }", "public DrawGraphics() {\r\n box = new BouncingBox(200, 50, Color.RED);\r\n\tbox.setMovementVector(1,1);\r\n\r\n\tboxes = new ArrayList<BouncingBox>();\r\n\tboxes.add(new BouncingBox(35,40, Color.BLUE));\r\n\tboxes.get(0).setMovementVector(2,-1);\r\n\tboxes.add(new BouncingBox(120,80, Color.GREEN));\r\n\tboxes.get(1).setMovementVector(-1,2);\r\n\tboxes.add(new BouncingBox(500,80, Color.PINK));\r\n\tboxes.get(2).setMovementVector(-2,-2);\r\n }", "public Asteroid(){\n\t\t\n\t\t//call Sprite constructor\n\t\tsuper();\n for(int i =0;i<arrowAmount;i++)\n {\n arrows.add(new Arrow(Game.R.nextInt(4),Game.R.nextBoolean()));\n }\n\t\tinitialize();\n\t\tint nDY = Game.R.nextInt(speedLevel);\n\t\tsetDeltaY((double)nDY*0.03*CommandCenter.getLevel()+1);\n\n\n\t\t\n\n\t}", "public Shooter() {\n fire1 = new Solenoid(1);\n fire2 = new Solenoid(4);\n returnValve = new Solenoid(3);\n latchSolenoid = new Solenoid(2);\n FFM = true;\n m_enabled = true;\n shooting = false;\n reloading = false;\n initShooter();\n }", "public Athlete()\r\n{\r\n this.def = \"An athlete is said to be running when he/she is accelerating in a certain direction during which his legs and the rest of his body are moving\";\r\n}", "public void shoot(GraphicsContext graphicsContext) {\n TankBullet bullet = new TankBullet(new FixedCoordinates(getCoordinates().getX() + 17, getCoordinates().getY() + 100), gameEnded, graphicsContext);\n bullet.draw(graphicsContext);\n CoordinatesCache.getInstance().getEnemyBullets().add(bullet);\n }", "private BubbleGravityBehaviour()\n {\n\n }", "public void addBullet(Bullet bullet) {\n\t\tif(bulletList.size() < GameParameters.getInstance().maxBulletAllowed) {\n//\t\t\tsynchronized (bulletList) {\n\t\t\t\tbulletList.add(bullet);\n//\t\t\t}\n\t\t}\n\n\t\t// Log.e(null, \"size of bulletList: \" + bulletList.size());\n\t}", "public Spell() {}", "public List<AProjectile> getBullets() {\n return bullets;\n }", "public void mousePressed(MouseEvent e){\n\t\t\t t.bullets.add(new Bullet(t.theta, t.lx, t.ly));\t\n\t\t}" ]
[ "0.8562703", "0.82576877", "0.7656008", "0.7619017", "0.7549738", "0.74214077", "0.73734754", "0.70594203", "0.703333", "0.7006061", "0.69655454", "0.6894913", "0.6878058", "0.68608713", "0.6847267", "0.68365765", "0.68355", "0.68256027", "0.68104196", "0.6736378", "0.6688498", "0.66826713", "0.6648643", "0.66257125", "0.6624577", "0.66242164", "0.66002333", "0.65967035", "0.6578449", "0.65615606", "0.65319353", "0.65181357", "0.6514752", "0.65021855", "0.64818156", "0.6473201", "0.64593446", "0.64549893", "0.6385915", "0.6380259", "0.6375036", "0.63529783", "0.6347065", "0.63102746", "0.63045216", "0.62891513", "0.62657994", "0.6238444", "0.6201782", "0.6194526", "0.61815256", "0.6175902", "0.6162408", "0.6140105", "0.6138976", "0.61222017", "0.61161625", "0.61067647", "0.6105835", "0.61026347", "0.6078463", "0.6078114", "0.60656196", "0.6046321", "0.60457337", "0.60300076", "0.6010058", "0.6005557", "0.6005351", "0.6001204", "0.60011387", "0.5990299", "0.598365", "0.59809", "0.5966242", "0.5922733", "0.5916486", "0.591208", "0.59102815", "0.5903309", "0.59008336", "0.5895724", "0.58832175", "0.58827615", "0.5878513", "0.58775204", "0.58742696", "0.5873307", "0.587025", "0.5858988", "0.5851227", "0.5848336", "0.58424866", "0.5841765", "0.5828165", "0.5816119", "0.5808981", "0.5807887", "0.57846665", "0.57840914" ]
0.7777504
2
draw the bullet on the canvas
public void drawBullet(){ if (classOfObejct == 0){ colorMode(RGB,255,255,255); noStroke(); fill(255,100,30); ellipse(posX, posY, 6, 9); fill(255,153,51); ellipse(posX,posY, 4, 6); fill(255,255,100); ellipse(posX,posY, 2, 3); fill(255,255,200); ellipse(posX,posY, 1, 1); stroke(1); } else{ colorMode(RGB,255,255,255); noStroke(); fill(51,153,255); ellipse(posX, posY, 8, 8); fill(102,178,255); ellipse(posX,posY, 6, 6); fill(204,229,255); ellipse(posX,posY, 4, 4); fill(255,255,255); ellipse(posX,posY, 2, 2); stroke(1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void draw(Graphics2D g2d) {\n g2d.drawImage(getBulletImg(), this.getX(), this.getY(), null);\n \n }", "@Override\n public void draw(Bullet b){\n Draw.color(Palette.lightFlame, Palette.darkFlame, Color.GRAY, b.fin());\n Fill.circle(b.x, b.y, 3f * b.fout());\n Draw.reset();\n }", "@Override\r\n\tpublic void draw(Canvas canvas) {\n\t\tthing.getSprite().draw(canvas);\r\n\t}", "public void shoot(GraphicsContext graphicsContext) {\n TankBullet bullet = new TankBullet(new FixedCoordinates(getCoordinates().getX() + 17, getCoordinates().getY() + 100), gameEnded, graphicsContext);\n bullet.draw(graphicsContext);\n CoordinatesCache.getInstance().getEnemyBullets().add(bullet);\n }", "public void drawBullets(){\n if(!world.getPlayer().getWeapon().getBullets().isEmpty()) {\n for (Bullet b : world.getPlayer().getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y * ppuY,\n b.SIZE * ppuX, b.SIZE * ppuY);\n }\n }\n if(!world.getEnemies().isEmpty()) {\n for(Enemy e: world.getEnemies()){\n if(!e.getWeapon().getBullets().isEmpty()){\n for (Bullet b : e.getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }\n }\n if(!world.getBullets().isEmpty()) {\n for(Bullet b : world.getBullets()){\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }", "public void draw() {\n\t\t/* Clear Screen */\n\t\tGdx.graphics.getGL20().glClearColor(1,1,1,0);\n\t\tGdx.graphics.getGL20().glClear( GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT );\n\n\t\t/* Iterate through draw list */\n\t\tIterator<ArrayList<Drawable>> iter = this.drawlist.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tArrayList<Drawable> layer = iter.next();\n\t\t\t/* Sort the layer. */\n\t\t\tCollections.sort(layer, new DrawableComparator());\n\t\t\t/* Iterate through the layer. */\n\t\t\tIterator<Drawable> jter = layer.iterator();\n\t\t\twhile(jter.hasNext()) {\n\t\t\t\tDrawable drawable = jter.next();\n\t\t\t\tif (drawable.isDead()) {\n\t\t\t\t\tjter.remove(); //Remove if dead.\n\t\t\t\t}//fi\n\t\t\t\telse {\n\t\t\t\t\tdrawable.draw(this, this.scalar); //Draw the drawable.\n\t\t\t\t}//else\n\t\t\t}//elihw\n\t\t}//elihw\n\t}", "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "public void draw(Canvas canvas, int rad) {\n PointOnTank(currentSelfAngle, rad);\n realTank.set(tx-halfwidth, ty-halfheight, tx+halfwidth, ty+halfheight);\n //canvas.drawRect(realTank,paint);\n\n bounds.set(centX + rad - halfwidth, centY - halfheight, centX + rad + halfheight, centY + halfheight);\n\n gunbounds.set(centX + rad - halfwidth - 30, centY - 5, centX + rad - halfwidth, centY + 5);\n if (centX + rad - halfwidth - 40 + xBullet<=centX-rad) {\n xBullet = 0;\n bulletAngle = currentSelfAngle;\n bulletLive = true;\n } else xBullet -= 10;\n\n canvas.rotate(bulletAngle, centX, centY);\n if(bulletLive) {\n if(tankLive) {\n bulletbounds.set(centX + rad - halfwidth - 40 + xBullet, centY - 5, centX + rad - halfwidth - 30 + xBullet, centY + 5);\n canvas.drawRect(bulletbounds, paint);\n PointOnCircle(bulletAngle, rad - halfwidth - 35 + xBullet);\n realBullet.set(sx - 5, sy - 5, sx + 5, sy + 5);\n }\n }\n\n canvas.rotate(-bulletAngle, centX, centY);\n\n canvas.rotate(currentSelfAngle, centX, centY);\n if(tankLive) {\n canvas.drawRect(bounds, paint);\n canvas.drawRect(gunbounds, paint);\n //canvas.drawRect(realTank, paint);\n }\n }", "private void doDraw(Canvas canvas) {\n \tlong now = System.currentTimeMillis();\n \tif (canvas != null) {\n \t\tcanvas.drawColor(Color.BLACK);\n \t\t// Draw the sprite (animation is handled within the AnimatedSprite class) \n \t\tfor(int i = 0; i < particles.length; i++) particles[i].draw(canvas);\n \t}\n mLastTime = now;\n }", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "public void fireBullet(){\n\t\tBullet bullet = new Bullet(ship);\n\t\tbullets.add(bullet);\n\t\tsoundMan.playBulletSound();\n\t}", "@SuppressLint(\"MissingSuperCall\")\n @Override\n public void draw(Canvas canvas) {\n final float scaleX = getWidth() / (WIDTH * 1.f); //set scale factor of bg image and screen area\n final float scaleY = getHeight() / (HEIGHT * 1.f);\n if (canvas != null) {\n final int savedState = canvas.save();\n canvas.scale(scaleX, scaleY); //scale bg\n //draw order means that demons walk over gargants, demon shots go over all ground troops and under dragon.\n //also means dragons fly over all enemies cus, ya know, they fly\n bg.draw(canvas); //draw bg\n player.draw(canvas); //draw player\n for (LightningBall b : bullets) {\n b.draw(canvas); //draw each player bullet\n }\n for (Gargant g : gargants) {\n g.draw(canvas); //draw each gargant\n }\n for (Demon de : demons) {\n de.draw(canvas); //draw each demon\n }\n for (HellFire ds : demonShots) {\n ds.draw(canvas); //draw each demon shot\n }\n for (Dragon d : dragons) {\n d.draw(canvas); //draw each dragon\n }\n\n drawText(canvas); //draw the text on screen\n canvas.restoreToCount(savedState);\n }\n }", "public void draw() {\n \n // TODO\n }", "public void draw() {\n \n }", "public void draw() {\n\n // Make sure our drawing surface is valid or we crash\n if (ourHolder.getSurface().isValid()) {\n // Lock the canvas ready to draw\n canvas = ourHolder.lockCanvas();\n // Draw the background color\n paint.setTypeface(tf);\n canvas.drawColor(Color.rgb(178,223,219));\n paint.setColor(Color.rgb(255,255,255));\n canvas.drawRect(offsetX, offsetY, width-offsetX, (height-100)-offsetY, paint);\n // Choose the brush color for drawing\n paint.setColor(Color.argb(50,0,0,0));\n paint.setFlags(Paint.ANTI_ALIAS_FLAG);\n // Make the text a bit bigger\n paint.setTextSize(40);\n paint.setStrokeWidth(5);\n paint.setStrokeCap(Paint.Cap.ROUND);\n // Display the current fps on the screen\n canvas.drawText(\"FPS:\" + fps, 20, 40, paint);\n paint.setTextSize(400);\n if(hasTouched == true) {\n if (count < 0) {\n canvas.drawText(0 + \"\", (width / 2) - 100, height / 2, paint);\n } else if(count<=numLines) {\n canvas.drawText(count + \"\", (width / 2) - 100, height / 2, paint);\n }\n } else {\n paint.setTextSize(100);\n canvas.drawText(\"TAP TO START\", (width / 2) - 300, height / 2, paint);\n }\n paint.setColor(Color.rgb(0,150,136));\n\n paint.setColor(color);\n\n canvas.drawCircle(xPosition, yPosition, radius, paint);\n\n paint.setColor(lineColor);\n\n if(isMoving==true && hasHit == false && count>=0) {\n canvas.drawLine(initialX, initialY, endX, endY, paint);\n }\n paint.setColor(Color.rgb(103,58,183));\n\n for(int i=0; i<verts.length; i++) {\n canvas.drawVertices(Canvas.VertexMode.TRIANGLES, verts[0].length, verts[i], 0, null, 0, verticesColors, 0, null, 0, 0, new Paint());\n }\n for (int i=0; i<innerVerts.length; i++) {\n canvas.drawVertices(Canvas.VertexMode.TRIANGLES, innerVerts[0].length, innerVerts[i], 0, null, 0, verticesColors, 0, null, 0, 0, new Paint());\n }\n // Draw everything to the screen\n ourHolder.unlockCanvasAndPost(canvas);\n\n //Display size and width\n\n }\n\n }", "private void draw() {\n\t\tCanvas c = null;\n\t\ttry {\n\t\t\t// NOTE: in the LunarLander they don't have any synchronization here,\n\t\t\t// so I guess this is OK. It will return null if the holder is not ready\n\t\t\tc = mHolder.lockCanvas();\n\t\t\t\n\t\t\t// TODO this needs to synchronize on something\n\t\t\tif (c != null) {\n\t\t\t\tdoDraw(c);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (c != null) {\n\t\t\t\tmHolder.unlockCanvasAndPost(c);\n\t\t\t}\n\t\t}\n\t}", "public void draw(){\n hit();\n hit();\n }", "public void draw() {\n }", "public Bullet() {\n\t\t\n\t\tx = 0;\n\t\ty = 0;\n\t\timgBullet = new ImageIcon(getClass().getResource(\"lu.png\"));\n\t\twidth=imgBullet.getIconWidth();\n\t\theight=imgBullet.getIconHeight();\n\t\tshot = false;\n\t\n\t}", "boolean testDrawBullet(Tester t) {\n return t.checkExpect(bullet1.draw(), new CircleImage(2, OutlineMode.SOLID, Color.pink))\n && t.checkExpect(bullet2.draw(), new CircleImage(2, OutlineMode.SOLID, Color.pink));\n }", "public void draw(Canvas canvas);", "public void draw(Canvas canvas);", "public void draw(Canvas canvas) {\n // Draw the game\n for (int i = 0; i < width + 2; i++) {\n for (int j = 0; j < height + 2; j++) {\n canvas.setPoint(i, j, '.');\n }\n }\n\n for (int i = 0; i < width + 2; i++) {\n canvas.setPoint(i, 0, '-');\n canvas.setPoint(i, height + 1, '-');\n }\n\n for (int i = 0; i < height + 2; i++) {\n canvas.setPoint(0, i, '|');\n canvas.setPoint(width + 1, i, '|');\n }\n\n for (BaseObject object : getAllItems()) {\n object.draw(canvas);\n }\n }", "private void drawGame(){\n drawBackGroundImage();\n drawWalls();\n drawPowerups();\n drawBullet();\n }", "public void draw(){\n }", "@Override\n public void draw(Canvas canvas){\n final float scaleFactorX = getWidth()/(WIDTH*1.f);\n final float scaleFactorY = getHeight()/(HEIGHT*1.f);\n if(canvas!=null){\n final int savedState = canvas.save();\n canvas.scale(scaleFactorX, scaleFactorY);\n bg.draw(canvas);\n //below was to draw collis boxes\n // canvas.drawRect(new Rect(10, 10, 200,300 - 15*jumpCounter), myPaint);\n // if(!bananas.isEmpty())\n // canvas.drawRect(bananas.get(0).getRectangle(), myPaint );\n player.draw(canvas);\n for(TallBricks c: cones){\n c.draw(canvas);\n }\n for(Banana b: bananas){\n b.draw(canvas);\n }\n drawText(canvas);\n canvas.restoreToCount(savedState);\n }\n }", "public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }", "void render(GraphicsContext gc) {\n\t\tgc.save();\r\n\t\tAffine trans = new Affine();\r\n\t\ttrans.appendTranslation(locX, locY);\r\n\t\ttrans.appendRotation(angle);\r\n\t\t// draw the image using the specified transform\r\n\t\tgc.setTransform(trans);\r\n\t\tgc.drawImage(image, -radius, -radius);\r\n\t\t// Reset the transform (this is important)\r\n\t\tgc.restore();\r\n\t\t// Then draw bullets\r\n\t\tfor (Bullet b : bullets)\r\n\t\t\tb.render(gc);\r\n\r\n\t}", "public M_Bullet shoot() {\n Point leftCorner = this.getLocation();\n // get the center of the character\n int x = leftCorner.x;\n int y = leftCorner.y;\n Point dim = this.getDimensions();\n int h = dim.y;\n int w = dim.x;\n h = h / 2;\n w = w / 2;\n Point center = new Point(x + w, y + h);\n // get the velocity for the bullet\n Point vel = new Point(this.getDirection() * 3, 0);\n // set the enemy's shot cooldown to its shot interval.\n setShotCooldown(getShotInterval());\n // return the new bullet\n return new M_Bullet(center, this.getStrength(), vel, true);\n }", "@Override\n public void draw(Canvas canvas) {\n if(drawable != null) {\n drawable.draw(canvas);\n }\n }", "public void draw() {\n\n }", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "private void draw()\n {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(this, color, new Ellipse2D.Double(xPosition, yPosition, \n diameter, diameter));\n canvas.wait(10);\n }", "public void dispatchDraw(Canvas canvas) {\n int[] iArr = new int[2];\n int[] iArr2 = new int[2];\n this.f2856b.getLocationOnScreen(iArr);\n this.f2857c.getLocationOnScreen(iArr2);\n canvas.translate((float) (iArr2[0] - iArr[0]), (float) (iArr2[1] - iArr[1]));\n canvas.clipRect(new Rect(0, 0, this.f2857c.getWidth(), this.f2857c.getHeight()));\n super.dispatchDraw(canvas);\n ArrayList<Drawable> arrayList = this.f2858d;\n int size = arrayList == null ? 0 : arrayList.size();\n for (int i2 = 0; i2 < size; i2++) {\n ((Drawable) this.f2858d.get(i2)).draw(canvas);\n }\n }", "public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "public Bullet(float x, float y, int bitmapId, float xDest, float yDest, boolean shootsEnemies)\n {\n super(x, y, bitmapId);\n this.xDest = xDest;\n this.yDest = yDest;\n this.shootsEnemies = shootsEnemies;\n\n this.setAngle(calcAngle(x, y, xDest, yDest));\n }", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "public void draw() {\r\n\r\n if (this.z == 2) {\r\n //--- Shooting//---\r\n for (Enemy e: this.td.getEnemies()) {\r\n if (e.getX() < this.x + this.size / 2\r\n && e.getX() + e.getSize() > this.x - this.size / 2) {\r\n if (e.getY() < this.y + this.size / 2\r\n && e.getY() + e.getSize() > this.y - this.size / 2) {\r\n if (!this.firing) {\r\n this.firing = true;\r\n this.target = e;\r\n }\r\n } else {\r\n this.firing = false;\r\n }\r\n }\r\n this.firing();\r\n }\r\n }\r\n this.update();\r\n\r\n }", "public void draw(DrawingContext context) {\n\t\t\t\t}", "public void draw() {\r\n\t\tif (active_)\r\n\t\t\tGlobals.getInstance().getCamera().drawImageOnHud(posx_, posy_, currentImage());\r\n\t}", "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }", "public void draw() {\t\t\n\t\ttexture.draw(x, y);\n\t\tstructure.getTexture().draw(x,y);\n\t}", "@Override\n\tpublic void draw(Canvas canvas) {\n\t\t\n\t}", "@Override\n\tpublic void draw(Canvas canvas) {\n\n\t}", "@Override\n\t\tpublic void draw(Canvas canvas) {\n\t\t\tif(drawable != null) {\n\t\t\t\tdrawable.draw(canvas);\n\t\t\t}\n\t\t}", "public void paintComponent(Graphics g) {\n super.paintComponent(g);\n Graphics2D g2d = (Graphics2D)g;\n\n\n g.setColor(Color.black);\n g2d.drawRect(clock_x, clock_y, clock_width, clock_height);\n Font fontClock = new Font(\"Courier\", Font.PLAIN, 130);\n g.setFont(fontClock);\n g.drawString(Long.toString(gameClock.displayTime()), clock_x, clock_y + clock_height);\n \n //enemy area\n //g.setColor(Color.black);\n //g2d.drawRect(enemy_x, enemy_y, enemy_width, enemy_height);\n if(enemyImage != null) {\n g2d.drawImage(enemyImage,\n enemy_x, enemy_y, enemy_width+enemy_x, enemy_height+enemy_y,\n 0, 0, enemyImage.getWidth(null),\n enemyImage.getHeight(null), null); \n } else {\n System.out.println(\"Enemy image is null\");\n }\n \n //draw targets\n for(target t : targets) {\n g.setColor(t.getColor());\n Ellipse2D.Double targ = new Ellipse2D.Double(t.get_x(), t.get_y(), t.get_diam(), t.get_diam());\n g2d.fill(targ);\n //g.drawRect(t.get_x(), t.get_y(), t.get_diam(), t.get_diam());\n Ellipse2D.Double hitCircle = new Ellipse2D.Double(t.get_x() - target_radius / 2, t.get_y() - target_radius / 2, t.get_diam() + target_radius, t.get_diam() + target_radius);\n g2d.draw(hitCircle);\n }\n\n //draw bullet holes\n for(bulletHole b : bullets) {\n //translate circle so that it\n //displays at correct coordinates\n //double translation = Math.sqrt(2 * (Math.pow(bullet_diam / 2, 2)));\n double translation = bullet_diam / 2;\n g.setColor(bulletHole);\n Ellipse2D.Double hole = new Ellipse2D.Double(b.get_x() - translation, b.get_y() - translation, b.get_diam(), b.get_diam());\n g2d.fill(hole);\n }\n\n //end of game\n //... or next round\n switch(end_round()) {\n case(1):\n g.setColor(Color.black);\n g.setFont(new Font(\"Narkisim\", Font.PLAIN, 150));\n current_round++;\n g.drawString(\"Round \"+current_round, 253, 350);\n refreshAll(false);\n break;\n \n case(2):\n g.setColor(Color.black);\n g.setFont(new Font(\"Narkisim\", Font.PLAIN, 135));\n g.drawString(\"You Lose!\", 240, 350);\n \n g.setColor(Color.black);\n Font fontPlayAgain = new Font(\"Mool Boran\", Font.PLAIN, 20);\n g.setFont(fontPlayAgain);\n g.drawString(\"Right Click to play again!\", 400, 400);\n //show score\n //then prompt to replay\n break;\n \n default:\n break;\n }\n }", "@Override\n\tpublic void draw() {\n\t}", "@Override\n public void draw()\n {\n }", "@Override\n public void draw(Canvas canvas)\n {\n\n animationM.draw(canvas, rectangle);\n\n }", "private void quickFireBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Pink\"));\n\t}", "@Override\r\n public void draw() {\n }", "private void draw(){\n if (ourHolder.getSurface().isValid()) {\n\n if (openMainMenu) {\n mainMenu();\n } else if (openGameOverMenu) {\n gameOverMenu();\n } else if (openUpgradesMenu) {\n upgradeMenu();\n } else if (openPauseMenu) {\n pauseMenu();\n } else {\n // Lock the canvas ready to draw\n gameCanvas = ourHolder.lockCanvas();\n\n // Draw the background\n gameCanvas.drawBitmap(btBgLeft, leftSideRect.left, leftSideRect.top, null);\n gameCanvas.drawBitmap(btBgMiddle, middleSideRect.left, middleSideRect.top, null);\n gameCanvas.drawBitmap(btBgRight, rightSideRect.left, rightSideRect.top, null);\n\n // HUD Rectangle\n String padding = \" | \";\n paint.setTextSize(30);\n paint.setColor(Color.argb(125, 0, 0, 0));\n gameCanvas.drawRect(hudRect, paint);\n paint.setColor(Color.argb(255, 255, 255, 255));\n gameCanvas.drawText(\"Bonus: \" + multiplier + padding + \"Score: \" + totalScore + padding + \"Shields: \" + shields + padding + \"Cash: £\" + cash, hudRect.left + (hudRect.right/25), hudRect.bottom - (hudRect.height()/3), paint);\n\n // Draw the invaders bullets if active\n for(int i = 0; i < invadersBullets.length; i++){\n paint.setColor(Color.argb(255, 228, 53, 37));\n if(invadersBullets[i].getStatus()) {\n gameCanvas.drawRect(invadersBullets[i].getRect(), paint);\n }\n }\n\n // Draw the players bullet if active\n if(bullet.getStatus()){\n paint.setColor(Color.argb(255, 30, 127, 224));\n gameCanvas.drawRect(bullet.getRect(), paint);\n }\n\n // Draw the player spaceship\n paint.setColor(Color.argb(255, 255, 255, 255));\n gameCanvas.drawBitmap(defender.getBitmap(), defender.getX(), screenY - defender.getHeight(), paint);\n\n // Draw the invaders\n for(int i = 0; i < numInvaders; i++){\n if(invaders[i].getVisibility()) {\n if(uhOrOh) {\n gameCanvas.drawBitmap(invaders[i].getBitmap(), invaders[i].getX(), invaders[i].getY(), paint);\n }else{\n gameCanvas.drawBitmap(invaders[i].getBitmap2(), invaders[i].getX(), invaders[i].getY(), paint);\n }\n }\n }\n\n // Pause button\n paint.setColor(Color.argb(125, 0, 0, 0));\n gameCanvas.drawRect(pauseRect, paint);\n paint.setTextSize((float) (screenX*0.0138));\n paint.setColor(Color.argb(255, 255, 255, 255));\n gameCanvas.drawText(\"PAUSE GAME\", pauseRect.left + (pauseRect.width()/10), pauseRect.bottom - (pauseRect.height()/3), paint);\n\n // Animations\n renderAnimations();\n\n // Draw everything to the screen\n ourHolder.unlockCanvasAndPost(gameCanvas);\n }\n\n }\n }", "public void createBullet(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player != null) {\r\n Bullet bullet = new Bullet(x, y);\r\n bullet.player = name;\r\n playAudio(\"shoot\");\r\n }\r\n }", "public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }", "@Override\n public void fireBullet(ArrayList<ScreenObject> level) {\n level.add(new ShipBullet(position.x, position.y, 8, 8, direction));\n }", "void draw(GraphicsContext context);", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tshootBullet(arg0);\r\n\t\t\t}", "void drawObject(DrawingObject d){\n canvas.drawDrawingObject(d);\n }", "@Override\n public void draw() {\n }", "public void draw(GameCanvas canvas) {\n\t\tif (texture != null) {\n\t\t\tcanvas.draw(texture, Color.WHITE,origin.x,origin.y,position.x*drawScale.x,position.y*drawScale.x,0,1,1);\n\t\t}\n\t}", "public void draw()\r\n {\r\n drawn = true;\r\n }", "@Override\n public void draw(GameCanvas canvas) {\n drawWall(canvas, true, opacity);\n drawWall(canvas, false, opacity);\n }", "public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}", "public void draw(Canvas canvas){\n for(AttackObject attack : attacks){\n attack.draw(canvas);\n }\n }", "@Override\n\tpublic void draw(Graphics canvas) {}", "@Override\n\tpublic void draw(Canvas canvas) {\n\t\tif (drawable != null) {\n\t\t\tdrawable.draw(canvas);\n\t\t}\n\t}", "public void setBullet(Bullet bullet) {\r\n\t\tthis.bullet = bullet;\r\n\t}", "@Override\r\n\tpublic void draw(final Canvas canvas) {\n\r\n\t}", "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "public void draw();", "public void draw();", "public void draw();", "public void draw() {\n StdDraw.clear();\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setXscale(-drawLength * 0.1, drawLength * 1.2);\n StdDraw.setYscale(-drawLength * 0.65, drawLength * 0.65);\n StdDraw.line(0, 0, drawLength, 0);\n StdDraw.text(-drawLength * 0.05, 0, \"0\");\n StdDraw.text(drawLength * 1.1, 0, Integer.toString(size()));\n }", "public void draw() {\n if (you.health() > 0 | lives >= 0) {\n if (aliens.isEmpty()) {\n win();\n }\n if (you.health() <= 0 & lives >= 0) {\n die();\n }\n \n you.act();\n \n if (fire & you.getWeapon() == Weapon.WEAPON_GOD) {\n for (Dot d : you.fire()) {\n this.moreBullets(d);\n }\n }\n for (Dot d : lazers){d.update(); d.draw(page);}\n for (Dot d : bullets) {d.update(); d.draw(page);}\n for (Alien loop : aliens) {\n loop.act();\n if (Math.random() > .993) {\n for (Dot d : loop.fire())\n lazers.add(d);\n }\n loop.draw(page);\n }\n \n if (collisionCheck() | fl) {\n flash();\n fl = !fl;\n }\n \n int index1 = 0, index2 = 0, size1 = bullets.size(), size2 = aliens.size();\n for (Alien al : aliens) {\n index2 = 0;\n while (index2 < size1) {\n if (al.collide(bullets.get(index2))) {\n bullets.remove(index2);\n size1--;\n score += 10;\n }\n index2++;\n }\n }\n\n index1 = 0; size1 = aliens.size();\n while (index1 < size1) {\n if (aliens.get(index1).health() <= 0) {\n aliens.remove(index1);\n index1--;\n size1--;\n score += 25;\n }\n index1++;\n }\n \n for (Dot d : lazers) {\n if (d.getX() < 0 | d.getX() > 512 | d.getY() < 0 | d.getY() > 496) {\n d.deactivate();\n }\n }\n index1 = 0; size1 = lazers.size();\n while (index1 < size1) {\n if (!lazers.get(index1).isActive()) {\n lazers.remove(index1);\n size1--;\n index1--;\n }\n index1++;\n }\n \n for (Dot d : bullets) {\n if (d.getX() < 0 | d.getX() > 512 | d.getY() < 0 | d.getY() > 512) {\n d.deactivate();\n }\n }\n index1 = 0; size1 = bullets.size();\n while (index1 < size1) {\n if (!bullets.get(index1).isActive()) {\n bullets.remove(index1);\n size1--;\n index1--;\n }\n index1++;\n }\n \n for (int i = 0; i < lives; i++) {\n page.drawImage(you.getImage(), i*20, 496, 16, 16, null);\n }\n page.setColor(Color.white);\n page.drawString(\"\" + you.health(), 420, 509);\n page.drawString(\"\" + score, 450, 509);\n you.draw(page);\n }\n else {\n lose();\n }\n }", "public void onDraw(Canvas c){\n\t// have actors draw themselves\n\t \n\t\tpaddle.drawRect(c);\n\t\tball.drawCircle(c);\n\t\t\n\t\tball.move();\n\t\tball.bounce(c);\n\t\tif(ball.isTouching(paddle)){\n\t\t\tball.bounceUp();\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < bricks.size(); i++) {\n\t\t\t\t// Set Brick Width\n\t\t\t\tbricks.get(i).setWidth((c.getWidth()/6)-3);\n\t\t\t\t// Set the x position for the bricks\n\t\t\t\tint xPos = i * (c.getWidth()/6);\n\t\t\t\t//goTo and Draw the Bricks\n\t\t\t\tbricks.get(i).goTo(xPos, 100);\n\t\t\t\tbricks.get(i).drawRect(c);\n\t\t\t\t\n\t\t\t\t// Check for Collisions and Erase Bricks\n\t\t\t\tif (ball.isTouching(bricks.get(i))) {\n\t\t\t\t\tif (bricks.get(i).getVisible() == true) {\n\t\t\t\t\t\tball.bounceUp();\n\t\t\t\t\t\tbricks.get(i).setVisible(false);\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\t\n\t\t//tardis.changeDX(ax * -1); //read the x acceleration\n\t\t//tardis.changeDY(ay); // read the y acceleration\n\t\t//tardis.move(); // Move\n\t\t//tardis.bounce(c); // bounce\n\t\t\n\t\t//actorone.drawCircle(c);\n\t\t//actortwo.drawSquare(c);\n\t\t//actorthree.drawSquare(c);\n\t //tardis.draw(c);\n\t\th.postDelayed(r,RATE);\n\t\t\n\t\t//actorone.move();\n\t\t//actorone.bounce(c);\n\t\t//actortwo.move();\n\t\t//actortwo.bounce(c);\n\t\t\n\t\t\n\t\t// Bounce off the actorthree\n\t\t\t\tif (actorone.isTouching(actorthree)) {\n\t\t\t\t\tactorone.bounceOff();\n\t\t\t\t}\n\t\t\t\tif (actorone.isTouching(actortwo)){\n\t\t\t\t\tactorone.bounceOff();\n\t\t\t\t}\n\t\t\t\t\t\t\t \n\t\t\t\t if(actortwo.isTouching(actorthree)){\n\t\t\t\t\t actortwo.bounceOff();\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t if(actortwo.isTouching(actorthree)){\n\t\t\t\t\t actortwo.bounceOff();\n\t\t\t\t }\n\t\t\t\t if(tardis.isTouching(actorthree)) {\n\t\t\t\t\t tardis.bounceOff();\n\t\t\t\t\t }\n\t}", "@Override\n public void attack(){\n int xBullet=0,yBullet=0;\n switch(direction){\n case 0:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()*3/4);\n break;\n case 1:\n xBullet=(int)(x+Sprite.python_left.getWidth()*3/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 2:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 3:\n xBullet=(int)(x+Sprite.python_left.getWidth()/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n }\n PythonBullet pythonBullet=new PythonBullet(xBullet,yBullet,board,Player.PLAYER_SPEED*1.5);\n pythonBullet.setDirection(direction);\n board.addBullets(pythonBullet);\n\n }", "public Bullet() {\n super();\n }", "public void render(){\n spriteBatch.begin();\n drawEnemies();\n drawPlayer();\n drawBullets();\n spriteBatch.end();\n if(debug){\n drawDebug();\n }\n }", "@Override\n\tpublic void draw(Canvas canvas) {\n\t\tif (hit && animTimer <= 100) {\n\t\t\tgraphicExt.draw(canvas);\n\t\t\tanimTimer++;\n\t\t\tif (animTimer == 100) {\n\t\t\t\tanimTimer = 0;\n\t\t\t\thit = false;\n\t\t\t}\n\t\t} else {\n\t\t\tgraphic.draw(canvas);\n\t\t}\n\t}", "public void draw() {\r\n PennDraw.clear();\r\n\r\n for (int i = 0; i < targets.length; i++) {\r\n targets[i].draw();\r\n }\r\n\r\n bird.draw(); \r\n\r\n if (mouseWasPressedLastUpdate) {\r\n bird.drawVelocity();\r\n }\r\n\r\n PennDraw.advance();\r\n }", "public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}", "@Override\n public void draw(Canvas canvas){\n\n final float scaleX = getWidth()/(width*1.f);\n final float scaleY = getHeight()/(height*1.f);\n\n if (canvas!=null) {\n final int savedState = canvas.save();\n canvas.scale(scaleX, scaleY);\n background.draw(canvas);\n if(!disappear){\n newPlayer.draw(canvas);\n }\n\n //Top border\n for (TopBorder tp : topborder){\n tp.draw(canvas);\n }\n\n //Draws bottom border\n for (BotBorder bp : botborder){\n bp.draw(canvas);\n }\n\n //Draws effects\n for (Effects sp : effect){\n sp.draw(canvas);\n }\n\n //Draws first enemy\n for (Enemy sp : enemy){\n sp.draw(canvas);\n }\n\n //Draws second enemy\n for (secondaryEnemy se : newEnemy){\n se.draw(canvas);\n }\n\n //Draws third enemy\n for (thirdShip ls : thirdEnemy){\n ls.draw(canvas);\n }\n\n //draws death animation\n if(started){\n death.draw(canvas);\n }\n\n //Draws screen text\n screenText(canvas);\n canvas.restoreToCount(savedState);\n }\n }", "public void draw(){\n\t\tStdDraw.picture(this.xxPos,this.yyPos,\"images/\"+this.imgFileName);\n\t}", "@Override\n public void draw(SpriteBatch batch) {\n sprite.draw(batch);\n }", "public void draw(){\n StdDraw.picture(this.xCoordinate,this.yCoordinate,this.img);\n }", "@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}", "public void draw() {\r\n if(isVisible()) {\r\n Canvas canvas = Canvas.getCanvas();\r\n canvas.draw(this,getColor(),\r\n new Rectangle(\r\n (int)round(getXposition()),\r\n (int)round(getYposition()),\r\n (int)round(size),\r\n (int)round(size)));\r\n canvas.wait(10);\r\n }\r\n }", "@Override\n public void draw(Canvas canvas) {\n canvas.drawRGB(40,40,40);\n selectedLevel.draw(canvas);\n }", "public void draw(SpriteBatch spriteBatch) {\n if(isMoving) {\n\t\t\t//walkingParticleEffect.scaleEffect(walkingParticleEffectScale);\n walkingParticleEffect.draw(spriteBatch);\n }\n\n spriteBatch.setColor(1, colorValue, colorValue, 1);\n\n if(isMoving) {\n\t\t\tanimation.draw(spriteBatch, hitbox.getX()+xOffset, hitbox.getY()+yOffset, spriteWidth, spriteHeight);\n\t\t} else {\n\t\t\tanimation.drawStaticFrame(spriteBatch, hitbox.getX()+xOffset, hitbox.getY()+yOffset, spriteWidth, spriteHeight);\n\t\t}\n\n\t\tspriteBatch.setColor(1, 1, 1, 1);\n\n if(damaged) {\n \t//gettingHitParticleEffect.scaleEffect(gettingHitParticleEffectScale);\n gettingHitParticleEffect.draw(spriteBatch);\n }\n\n // Draw HP bar\n hpBar.draw(spriteBatch);\n\n /*\n // Debug draw enemie sprite hitbox\n hitboxSprite.draw(spriteBatch);\n\n // Debug draw enemie bullet hitboxes sprite\n for(Sprite bulletHitbox : bulletHitboxSpriteList) {\n \tbulletHitbox.draw(spriteBatch);\n\t\t}\n\n\t\tspriteBatch.draw(mapHitboxSprite, mapHitbox.getX(), mapHitbox.getY(), mapHitbox.getWidth(), mapHitbox.getHeight());\n\t\t*/\n }", "public void draw(Canvas canvas)\n {\n canvas.drawBitmap(animation.getImage(), x, y, null);\n }", "public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}", "public void draw(Canvas canvas){\n\t\tcanvas.drawColor(Color.BLACK);\n\t\tresultSprite.draw(canvas);\n\t\tnewRound.draw(canvas);\n\t\tbackMenu.draw(canvas);\n\t}", "public void draw(float dt) {\n\t\tcanvas.clear();\n\t\t\n\t\t// Draw background unscaled.\n\t\tcanvas.begin();\n\t\tcanvas.draw(backgroundTexture, Color.WHITE, 0, 0,canvas.getWidth(),canvas.getHeight());\n\t\tcanvas.end();\n\t\t\n\t\tcanvas.begin();\n\t\tfor(Obstacle obj : objects) {\n\t\t\tobj.draw(canvas);\n\t\t}\n\t\tcanvas.end();\n\t\t\n\t\tif (isDebug()) {\n\t\t\tcanvas.beginDebug();\n\t\t\tfor(Obstacle obj : objects) {\n\t\t\t\tobj.drawDebug(canvas);\n\t\t\t}\n\t\t\tcanvas.endDebug();\n\t\t}\n\t\t\n\t\t// Draw foreground last.\n\t\tcanvas.begin();\n\t\tcanvas.draw(foregroundTexture, FORE_COLOR, 0, 0, canvas.getWidth(), canvas.getHeight());\n\t\tselector.draw(canvas);\n\t\tcanvas.end();\n\t}", "@Override\r\n\tpublic void draw(Batch batch)\r\n\t{\n\t\t\r\n\t\tif(m_texRegion.isFlipX() && m_rightDirection)\r\n\t\t\tm_texRegion.flip(true, false);\r\n\t\telse if(!m_texRegion.isFlipX() && !m_rightDirection)\r\n\t\t\tm_texRegion.flip(true, false);\r\n\r\n\t\tif(this.m_isInvulnerable)\r\n\t\t\tbatch.setColor(1,1,1,0.5f);\r\n\t\telse\r\n\t\t\tbatch.setColor(new Color(Color.WHITE));\r\n\r\n\t\tthis.updateTransform();\r\n\t\tbatch.draw(m_texRegion, this.getDimension().x, this.getDimension().y, this.getTransform());\r\n\r\n\t\tbatch.setColor(new Color(Color.WHITE));\r\n\r\n\r\n\t\tm_lifeBar.setLife((int) this.m_life);\r\n\t\tm_lifeBar.setPosition(this.getPosition().add(0, 64));\r\n\t\tm_lifeBar.draw(batch);\r\n\t\t\r\n\t}", "@Override\r\n public void draw()\r\n {\n\r\n }", "public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }" ]
[ "0.7430002", "0.70386654", "0.702441", "0.69146466", "0.67841566", "0.67800736", "0.67626476", "0.67043984", "0.6647543", "0.66288227", "0.6564061", "0.65537536", "0.6533994", "0.6530298", "0.6478928", "0.64623225", "0.64558744", "0.6447678", "0.6446465", "0.644611", "0.64440584", "0.64440584", "0.6437848", "0.6430542", "0.63982683", "0.63762134", "0.63761437", "0.6375607", "0.63726723", "0.6370668", "0.6361278", "0.63537186", "0.63537186", "0.6347774", "0.63412786", "0.6322947", "0.6315582", "0.6315582", "0.63117546", "0.63068", "0.63068", "0.6306474", "0.6298675", "0.62836784", "0.62782264", "0.6269211", "0.6268894", "0.6257128", "0.6254453", "0.625429", "0.6251973", "0.62314606", "0.6229083", "0.6224566", "0.62232715", "0.62177485", "0.621682", "0.6204595", "0.62005186", "0.6198379", "0.6197559", "0.61919886", "0.6191616", "0.61845404", "0.61745745", "0.61742526", "0.6171405", "0.6169413", "0.6167055", "0.6162503", "0.61574703", "0.61520064", "0.6139475", "0.61326724", "0.61326724", "0.61326724", "0.61298734", "0.61294216", "0.61165816", "0.6084834", "0.60794777", "0.60662365", "0.6054554", "0.60541654", "0.6053329", "0.6049521", "0.60493594", "0.6043259", "0.60379255", "0.6032381", "0.60294616", "0.60220414", "0.6021003", "0.6016814", "0.6012905", "0.6004196", "0.5968049", "0.59657913", "0.5950701", "0.59502447" ]
0.7833122
0
update the position of the bullet
public void update(){ posX += velX; posY += velY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void moveBullet() {\r\n\t\tif(bullet != null) {\r\n\t\t\tbullet.move(bulletVelocity, 0);\r\n\t\t}\r\n\t}", "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "public void moveBullets() {\n bController.increment();\n }", "public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}", "private void setBulletLocation(View v, float x, float y) {\n v.setX(x);\n v.setY(y);\n }", "private void update() {\n\t\t// checks to see if the w key is down\n\t\tif (wKeyDown) {\n\t\t\tplayer.setY((int) (player.getY() - 8));\n\t\t}\n\t\t// checks to see if the a key is down\n\t\tif (aKeyDown) {\n\t\t\tplayer.setX((int) (player.getX() - 8));\n\t\t}\n\t\t// checks to see if the s key is down\n\t\tif (sKeyDown) {\n\t\t\tplayer.setY((int) (player.getY() + 8));\n\t\t}\n\t\t// checks to see if the d key is down\n\t\tif (dKeyDown) {\n\t\t\tplayer.setX((int) (player.getX() + 8));\n\t\t}\n\t\t\n\t\t// checks to make sure the player is within the bounds\n\t\tcheckBounds();\n\t\t\n\t\t// checks to see if the left mouse button is clicked\n\t\tif (mouseDown) {\n\t\t\t// if doubleshot is activated\n\t\t\tif (doubleShot && bulletDelta > doubleShotShootingSpeed) {\n\t\t\t\t// plays the bullet shooting sound\n\t\t\t\tsound.get(\"shootEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t\n\t\t\t\t// adds the first bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the bullet\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble xChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble yChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\txChange = xChange / magnitude * 20;\n\t\t\t\tyChange = yChange / magnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) xChange);\n\t\t\t\tlastBullet.setYChange((int) yChange);\n\t\t\t\t\n\t\t\t\t// adds the second bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tlastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET2_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET2_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble doubleshotXChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble doubleshotYChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble doubleshotMagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\tdoubleshotXChange = xChange / doubleshotMagnitude * 20;\n\t\t\t\tdoubleshotYChange = yChange / doubleshotMagnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) doubleshotXChange);\n\t\t\t\tlastBullet.setYChange((int) doubleshotYChange);\n\t\t\t\t\n\t\t\t\tDelta.setLastBullet(Delta.getTime());\n\t\t\t}\n\t\t\t// if a bullet is shot and the time since the last bullet is at least shootingSpeed\n\t\t\telse if (bulletShot && bulletDelta > bulletShootingSpeed) {\n\t\t\t\t// plays the bullet shooting sound\n\t\t\t\tsound.get(\"shootEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t\n\t\t\t\t// adds the bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the bullet\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble xChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble yChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\txChange = xChange / magnitude * 20;\n\t\t\t\tyChange = yChange / magnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) xChange);\n\t\t\t\tlastBullet.setYChange((int) yChange);\n\t\t\t\t\n\t\t\t\tDelta.setLastBullet(Delta.getTime());\n\t\t\t}\n\t\t\t// if a laser is shot\n\t\t\telse if (laserShot) {\n\t\t\t\tif (Delta.getTime() % 6 == 0) {\n\t\t\t\t\t// plays the laser shooting sound\n\t\t\t\t\tsound.get(\"laserEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// adds the laser\n\t\t\t\tbullet.add(new Bullet(this, \"laser\", 0, 0, 20));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the laser\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"laserSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"laserSprite\").getHeight() + BULLET_Y_OFFSET);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Checks to see if the time since the last enemy is greater than the enemy interval\n\t\tif (!bossSpawned && enemyDelta > generateEnemyInterval()) {\n\t\t\tdouble enemyGenerate = randomGenerator.nextDouble();\n\t\t\tif (enemyGenerate >= 0.3 || Delta.getDelta(\"beginning\") <= 10000)\n\t\t\t\tenemy.add(new Enemy(this, \"green_box\", 0, 0, 300, Delta.getDelta(\"beginning\"), 300));\n\t\t\telse if (enemyGenerate < 0.3)\n\t\t\t\tenemy.add(new Enemy(this, \"red_box\", 0, 0, 400, Delta.getDelta(\"beginning\"), 400));\n\t\t\tEnemy lastEnemy = enemy.get(enemy.size() - 1);\n\t\t\t\n\t\t\tlastEnemy.setX(lastEnemy.generateEnemyX());\n\t\t\tlastEnemy.setY(-lastEnemy.getSprite().getHeight());\n\t\t\tDelta.setLastEnemy(Delta.getTime());\n\t\t}\n\t\t\n\t\tif (bossExplosionNum == 0) {\n\t\t\t// Checks to see if enemy bullets should be generated\n\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\tif (enemy.get(i).getName().equals(\"red_box\") && enemy.get(i).getTimeSinceLastBullet() >= 700) {\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"enemy_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tBullet lastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tSprite enemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tSprite enemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (enemy.get(i).getName().equals(\"boss\") && enemy.get(i).getTimeSinceLastBullet() >= 1000) {\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tBullet lastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tSprite enemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tSprite enemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\tdouble xChange = player.getX() - lastEnemyBullet.getX();\n\t\t\t\t\tdouble yChange = player.getY() - lastEnemyBullet.getY();\n\t\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t\t\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tenemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tenemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\txChange = player.getX() - lastEnemyBullet.getX() - 100;\n\t\t\t\t\tyChange = player.getY() - lastEnemyBullet.getY() - 100;\n\t\t\t\t\tmagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t\t\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tenemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tenemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\txChange = player.getX() - lastEnemyBullet.getX() + 100;\n\t\t\t\t\tyChange = player.getY() - lastEnemyBullet.getY() + 100;\n\t\t\t\t\tmagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// spawns the boss if 60 seconds has passed\n\t\tif (Delta.getDelta(\"beginning\") >= 60000 && !bossSpawned) {\n\t\t\tbossSpawned = true;\n\t\t\tenemy.add(new Enemy(this, \"boss\", 0, 0, 10000, Delta.getDelta(\"beginning\"), 500));\n\t\t\t\n\t\t\tEnemy boss = enemy.get(enemy.size() - 1);\n\t\t\tboss.setX(displayWidth / 2 - boss.getSprite().getWidth() / 2);\n\t\t\tboss.setY(-boss.getSprite().getHeight());\n\t\t}\n\t\t\n\t\t// checks for collisions\n\t\tif (bossExplosionNum == 0) {\n\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\tEntity entity1 = enemy.get(i);\n\t\t\t\t\n\t\t\t\t// if a bullet collides with an enemy\n\t\t\t\tfor (int j = 0; j < bullet.size(); j++) {\n\t\t\t\t\tEntity entity2 = bullet.get(j);\n\t\t\t\t\t\n\t\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tEntity entity2 = player;\n\t\t\t\t\n\t\t\t\t// if the player collides with an enemy\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tEntity entity1 = player;\n\t\t\t// if an enemy bullet collides with the player\n\t\t\tfor (int i = 0; i < enemy_bullet.size(); i++) {\n\t\t\t\tEntity entity2 = enemy_bullet.get(i);\n\t\t\t\t\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if a powerup collides with the player\n\t\t\tfor (int i = 0; i < powerup.size(); i++) {\n\t\t\t\tEntity entity2 = powerup.get(i);\n\t\t\t\t\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if the player has defeated the boss\n\t\tif (gameWon && bossSpawned) {\n\t\t\t// draw Congratulations\n\t\t\tString congrats = \"Congratulations! You were able to vanquish\";\n\t\t\tString congrats2 = \"all of your evil thoughts and achieve nirvana!\";\n\t\t\tcongratsFont.drawString(displayWidth / 2 - congratsFont.getWidth(congrats) / 2, displayHeight / 2\n\t\t\t\t\t- congratsFont.getHeight(congrats) / 2 - 50, congrats);\n\t\t\tcongratsFont.drawString(displayWidth / 2 - congratsFont.getWidth(congrats2) / 2, displayHeight\n\t\t\t\t\t/ 2 - congratsFont.getHeight(congrats2) / 2 - 15, congrats2);\n\t\t\t\n\t\t\t// draw the score\n\t\t\tscoreFont.drawString(displayWidth / 2 - scoreFont.getWidth(\"Score: \" + totalCash) / 2, displayHeight\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Game Over!\")\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Score: \" + totalCash)\n\t\t\t\t\t/ 2 + 10 - 50, \"Score: \" + totalCash);\n\t\t}\n\t}", "public void fireBullet(int direction , int posX, int posY ){\n if ( clockBullet.getElapsedTime().asMilliseconds() > 100 ){\n int lowestbulletNo = 10;\n for( int i = 9; i > 0; i-- ){\n if ( bulletSpace.get(i).isEnabled() == false){\n lowestbulletNo = i;//find the first bullet in the gun barrol\n }\n }\n\n if ( lowestbulletNo < 10 ){\n bulletSpace.get(lowestbulletNo).setDirection(direction);\n bulletSpace.get(lowestbulletNo).setDistance(0);\n bulletSpace.get(lowestbulletNo).setPosX(posX - map.getX()) ;\n bulletSpace.get(lowestbulletNo).setPosY(posY - map.getY()) ;\n bulletSpace.get(lowestbulletNo).enabled(true);\n bulletSpace.get(lowestbulletNo).setRotation(direction+1);\n }\n }\n clockBullet.restart();\n }", "private static void reposition(Bullet blt) {\n\t\tswitch (blt.directory) {\n\t\tcase leftDown:\n blt.setPositionX( blt.getPositionX() + 10);\n blt.setPositionY(blt.getPositionY() + 100);\n\t\t\tbreak;\n\t\tcase left:\n\t\t\tblt.setPositionX( blt.getPositionX() - 10);\n\t blt.setPositionY(blt.getPositionY() + 22);\n\t\t\tbreak;\n\t\tcase down:\n\t\t\tblt.setPositionX( blt.getPositionX() + 24);\n\t blt.setPositionY(blt.getPositionY() + 110);\n\t\t\tbreak;\n\t\tcase up:\n\t\t\tblt.setPositionX( blt.getPositionX() + 20);\n\t blt.setPositionY(blt.getPositionY() - 10);\n\t\t\tbreak;\n\t\tcase right:\n\t\t\tblt.setPositionX( blt.getPositionX() + 110);\n\t blt.setPositionY(blt.getPositionY() + 23);\n\t\t\tbreak;\n\t\tcase rightDown:\n\t\t\tblt.setPositionX( blt.getPositionX() + 100);\n\t blt.setPositionY(blt.getPositionY() + 98);\n\t\t\tbreak;\n\t\tcase leftUp:\n\t\t\tblt.setPositionX( blt.getPositionX() + 10);\n\t blt.setPositionY(blt.getPositionY() + 12);\n\t\t\tbreak;\n\t\tcase rightUp:\n\t\t\tblt.setPositionX( blt.getPositionX() + 100);\n\t blt.setPositionY(blt.getPositionY() + 8);\n\t\t\tbreak;\n\t\t}\n\t\tblt.justCreated = false;\n\t}", "private void updateDelta() {\n\t\tbulletDelta = Delta.getDelta(\"bullet\");\n\t\tenemyDelta = Delta.getDelta(\"enemy\");\n\t}", "@Override\n public void attack(){\n int xBullet=0,yBullet=0;\n switch(direction){\n case 0:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()*3/4);\n break;\n case 1:\n xBullet=(int)(x+Sprite.python_left.getWidth()*3/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 2:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 3:\n xBullet=(int)(x+Sprite.python_left.getWidth()/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n }\n PythonBullet pythonBullet=new PythonBullet(xBullet,yBullet,board,Player.PLAYER_SPEED*1.5);\n pythonBullet.setDirection(direction);\n board.addBullets(pythonBullet);\n\n }", "public void update(float delta) {\n rangeTimer++;//update bullet distance\n //delete bullet if hit collison or met ranged\n if (rangeTimer == RANGE) {\n bullet.setShoot(false);\n rangeTimer = 0;\n } else {\n //update bullet timings\n bullet.updateTimer(delta);\n //make bullet go to p x y - follows player to increase difficulty\n if (this.bullet.x < playerX + 1.5) {\n this.bullet.x += Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.x >playerX + 1.5) {\n this.bullet.x -= Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.y < playerY + 0.5) {\n this.bullet.y += Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.y > playerY + 1.5) {\n this.bullet.y -= Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n }\n }", "public void setBullet(Bullet bullet) {\r\n\t\tthis.bullet = bullet;\r\n\t}", "public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }", "private void placeBullet(double x, double y) {\r\n\t\tb = new Bullet(x, y);\r\n\t\taddParticipant(b);\r\n\t\tb.setVelocity(BULLET_SPEED, ship.getRotation());\r\n\t\tnew ParticipantCountdownTimer(b, \"expire\", BULLET_DURATION);\r\n\t}", "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }", "@Override\n\tpublic void collideWith(Bullet bullet) {\n\t\tbulletMoveForward(bullet);\n\t}", "@Override\n public void fireBullet(ArrayList<ScreenObject> level) {\n level.add(new ShipBullet(position.x, position.y, 8, 8, direction));\n }", "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }", "public void tick() {\n boolean shouldHaltAfterTick = false;\n\n List<Pair<Movement, Bullet>> movements = new ArrayList<>();\n\n //Bullets on nodes\n Map<Coordinate, Bullet> capturedBullets = new HashMap<>(bullets);\n capturedBullets.keySet().retainAll(nodes.keySet());\n\n //Bullets not on nodes\n Map<Coordinate, Bullet> freeBullets = new HashMap<>(bullets);\n freeBullets.keySet().removeAll(capturedBullets.keySet());\n\n //Generate movements for free bullets\n for (Map.Entry<Coordinate, Bullet> entry : freeBullets.entrySet()) {\n Bullet bullet = entry.getValue();\n Coordinate coord = entry.getKey();\n Coordinate newCoord = entry.getKey().plus(bullet.getDirection()).wrap(width, height);\n movements.add(new Pair<>(new Movement(coord, newCoord), bullet));\n }\n\n //Update captured bullets\n for (Map.Entry<Coordinate, Bullet> entry : capturedBullets.entrySet()) {\n Coordinate coordinate = entry.getKey();\n INode node = nodes.get(coordinate);\n\n // special case\n if (node instanceof NodeHalt)\n shouldHaltAfterTick = true;\n\n //TODO this brings great shame onto my family\n Direction bulletDirection = entry.getValue().getDirection();\n Direction dir = Direction.UP;\n while (dir != node.getRotation()) {\n dir = dir.clockwise();\n bulletDirection = bulletDirection.antiClockwise();\n }\n Bullet bullet = new Bullet(bulletDirection, entry.getValue().getValue());\n\n Map<Direction, BigInteger> bulletParams = node.run(bullet);\n\n for (Map.Entry<Direction, BigInteger> newBulletEntry : bulletParams.entrySet()) {\n //TODO this too\n bulletDirection = newBulletEntry.getKey();\n dir = Direction.UP;\n while (dir != node.getRotation()) {\n dir = dir.clockwise();\n bulletDirection = bulletDirection.clockwise();\n }\n\n Bullet newBullet = new Bullet(bulletDirection, newBulletEntry.getValue());\n Coordinate newCoordinate = coordinate.plus(newBullet.getDirection()).wrap(width, height);\n Movement movement = new Movement(coordinate, newCoordinate);\n movements.add(new Pair<>(movement, newBullet));\n }\n }\n\n //Remove swapping bullets\n List<Movement> read = new ArrayList<>();\n Set<Coordinate> toDelete = new HashSet<>();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Coordinate from = movement.getFrom();\n Coordinate to = movement.getTo();\n boolean foundSwaps = read.stream().anyMatch(other -> from.equals(other.getTo()) && to.equals(other.getFrom()));\n if (foundSwaps) {\n toDelete.add(from);\n toDelete.add(to);\n }\n read.add(movement);\n }\n movements.removeIf(pair -> toDelete.contains(pair.getKey().getFrom()) || toDelete.contains(pair.getKey().getTo()));\n\n //Remove bullets that end in the same place\n read.clear();\n toDelete.clear();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Coordinate to = movement.getTo();\n boolean foundSameFinal = read.stream().anyMatch(other -> to.equals(other.getTo()));\n if (foundSameFinal) {\n toDelete.add(to);\n }\n read.add(movement);\n }\n movements.removeIf(pair -> toDelete.contains(pair.getKey().getTo()));\n\n //Move bullets\n Map<Coordinate, Bullet> newBullets = new HashMap<>();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Bullet bullet = pair.getValue();\n newBullets.put(movement.getTo(), bullet);\n }\n\n bullets.clear();\n bullets.putAll(newBullets);\n\n if (shouldHaltAfterTick)\n halt();\n }", "@Override\n public void tick() {\n setPosition(getPosition().add(getSpeed())); \n }", "void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirection(angle);\r\n\t\tbullets[slot].reset();\r\n\t\t// Reset the timer\r\n\t\tcount = RELOAD;\r\n\t}", "private void UpdateBullets()\n\t {\n\t for(int i = 0; i < BulletList.size(); i++)\n\t {\n\t Bullet bullet = BulletList.get(i);\n\t \n\t // Move the bullet.\n\t bullet.Update();\n\t \n\t // checks if the bullet has it left the screen\n\t if(bullet.HasLeftScreen()){\n\t BulletList.remove(i);\n\t \n\t continue;\n\t }\n\t \n\t // checks if the bullet hit the enemy\n\t Rectangle BulletRectangle = new Rectangle((int)bullet.xCoord, (int)bullet.yCoord, bullet.BulletImage.getWidth(), bullet.BulletImage.getHeight());\n\t // Go trough all enemies.\n\t for(int j = 0; j < EnemyList.size(); j++)\n\t {\n\t Enemy eh = EnemyList.get(j);\n\n\t \n\t Rectangle EnemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\n\t // Checks whether the the bullet has hit the enemy\n\t if(BulletRectangle.intersects(EnemyRectangel))\n\t {\n\t // Bullet hit the enemy so we reduce his health.\n\t eh.Health -= Bullet.DamagePower;\n\t \n\t // Bullet was also destroyed so we remove it.\n\t BulletList.remove(i);\n\t \n\t \n\t }\n\t }\n\t }\n\t }", "private void quickFireBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Pink\"));\n\t}", "public void fireBullet(){\n\t\tBullet bullet = new Bullet(ship);\n\t\tbullets.add(bullet);\n\t\tsoundMan.playBulletSound();\n\t}", "public M_Bullet shoot() {\n Point leftCorner = this.getLocation();\n // get the center of the character\n int x = leftCorner.x;\n int y = leftCorner.y;\n Point dim = this.getDimensions();\n int h = dim.y;\n int w = dim.x;\n h = h / 2;\n w = w / 2;\n Point center = new Point(x + w, y + h);\n // get the velocity for the bullet\n Point vel = new Point(this.getDirection() * 3, 0);\n // set the enemy's shot cooldown to its shot interval.\n setShotCooldown(getShotInterval());\n // return the new bullet\n return new M_Bullet(center, this.getStrength(), vel, true);\n }", "public void move()\r\n\t{\r\n\t\tfor (int a = 0; a < bullets.size(); a++)\r\n\t\t{\r\n\t\t\tBullet bullet = bullets.get(a);\r\n\t\t\tif (!bullet.move())\r\n\t\t\t{\r\n\t\t\t\tbullets.remove(a);\r\n\t\t\t\ta--;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }", "public void updatePosition() {\n \t\r\n \tx += dx;\r\n \ty += dy;\r\n \t\r\n\t}", "@Override\n\tpublic void updatePosition() {\n\t\t\n\t}", "public void update() {\r\n super.update();\r\n life -= 1;\r\n if(life <= 0) {\r\n killBullet();\r\n }\r\n }", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "public Bullet() {\n\t\t\n\t\tx = 0;\n\t\ty = 0;\n\t\timgBullet = new ImageIcon(getClass().getResource(\"lu.png\"));\n\t\twidth=imgBullet.getIconWidth();\n\t\theight=imgBullet.getIconHeight();\n\t\tshot = false;\n\t\n\t}", "public void update(float dt) {\n\t\tIterator<Bullet> iter = bullets.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tBullet b = iter.next();\n\t\t\t\n\t\t\tb.update(dt);\n\t\t\tif(b.getY() > 480 - bullet_size_h) iter.remove();\n\t\t}\n\t}", "public void placeAlienBullet() {\r\n\t\tif (alien != null) {\r\n\t\t\t// If the alien is large fires a bullet in a random direction\r\n\t\t\tif (alien.getSize() == 1 && ship != null) {\r\n\r\n\t\t\t\t// Create the alien bullet\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\r\n\t\t\t\t// give the alien bullet a random direction and the bullet speed velocity,\r\n\t\t\t\t// then add as participant\r\n\t\t\t\tdouble r = (2 * Math.PI) * RANDOM.nextDouble();\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, r);\r\n\t\t\t\taddParticipant(ab);\r\n\r\n\t\t\t\t// Sets the alien bullet to expire when it reaches the bullet duration time\r\n\t\t\t\t// limit\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\r\n\t\t\t// If the alien is small fires a bullet aimed directly at the ship\r\n\t\t\tif (alien.getSize() == 0 && ship != null) {\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\t\t\t\tab.setSpeed(BULLET_SPEED);\r\n\r\n\t\t\t\t// Aims the alien bullet directly at the ship\r\n\t\t\t\tdouble A = ship.getY() - alien.getY();\r\n\t\t\t\tdouble B = ship.getX() - alien.getX();\r\n\t\t\t\tdouble angle = Math.atan2(A, B);\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, angle);\r\n\r\n\t\t\t\t// Add the alien bullet as a participant and then set it to expire when it\r\n\t\t\t\t// reaches the bullet duration time limit\r\n\t\t\t\taddParticipant(ab);\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}", "@Override\n public void update(GameContainer gc, StateBasedGame stateBasedGame, int delta) throws SlickException {\n timeSinceStart += delta;\n rtimeSinceStart += delta;\n Input input = gc.getInput();\n int mouseX = input.getMouseX();\n int mouseY = input.getMouseY();\n\n\n basicbulletSheet.rotate(90f);\n basicbulletSheet.setCenterOfRotation(16, 16);\n\n // Move this bullet\n for (int i = 0; i < bulletList.size(); i++) {\n bullet = bulletList.get(i);\n bullet.move();\n }\n\n //Add this tower to the this towerList\n if (Tower.isBasicPlaced()) {\n basicTowers.add(new BasicTower());\n System.out.println(basicTowers);\n Tower.setBasicPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isBomberPlaced()) {\n bomberTowers.add(new BomberTower());\n System.out.println(bomberTowers);\n Tower.setBomberPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isSniperPlaced()) {\n sniperTowers.add(new SniperTower());\n System.out.println(sniperTowers);\n Tower.setSniperPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isQuickPlaced()) {\n quickTowers.add(new QuickTower());\n System.out.println(quickTowers);\n Tower.setQuickPlaced(false);\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BasicTower basicTower1 : basicTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > basicTower1.rcoolDown + basicTower1.rlastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n basicTower1.basicClicked.setRotation((float) getTargetAngle(basicTower1.towerX,\n basicTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n basicTower1.basicClicked.setCenterOfRotation(32, 32);\n basicTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > basicTower1.coolDown + basicTower1.lastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n addNewBullet2(basicTower1.towerX, basicTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n basicTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BomberTower bomberTower1 : bomberTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > bomberTower1.rcoolDown + bomberTower1.rlastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n bomberTower1.bomberClicked.setRotation((float) getTargetAngle(bomberTower1.bombertowerX,\n bomberTower1.bombertowerY, enemy.getStartPosX(), enemy.getStartPosY()));\n bomberTower1.bomberClicked.setCenterOfRotation(32, 32);\n bomberTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > bomberTower1.coolDown + bomberTower1.lastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n addNewBullet2(bomberTower1.bombertowerX, bomberTower1.bombertowerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n bomberTower1.lastShot = timeSinceStart;\n }\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (SniperTower sniperTower1 : sniperTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > sniperTower1.rcoolDown + sniperTower1.rlastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n sniperTower1.sniperClicked.setRotation((float) getTargetAngle(sniperTower1.towerX,\n sniperTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n sniperTower1.sniperClicked.setCenterOfRotation(32, 32);\n sniperTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n if (timeSinceStart > sniperTower1.coolDown + sniperTower1.lastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n addNewBullet2(sniperTower1.towerX, sniperTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 50);\n sniperTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (QuickTower quickTower1 : quickTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > quickTower1.rcoolDown + quickTower1.rlastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n quickTower1.quickClicked.setRotation((float) getTargetAngle(quickTower1.towerX,\n quickTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n quickTower1.quickClicked.setCenterOfRotation(32, 32);\n quickTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n\n if (timeSinceStart > quickTower1.coolDown + quickTower1.lastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n radiusVisited = true;\n addNewBullet2(quickTower1.towerX, quickTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 5);\n quickTower1.lastShot = timeSinceStart;\n }\n }\n\n }\n }\n\n //A spawn is in progress\n if (spawninProgress) {\n timePassedEnemy += delta;\n if (timePassedEnemy > 800) {\n enemies.add(new Enemy());\n enemySpawns++;\n timePassedEnemy = 0;\n }\n }\n //When enough enemies has spawned, stop the spawninProgress\n if (enemySpawns == enemyCounter) {\n spawninProgress = false;\n //hasbeenDead = false;\n enemySpawns = 0;\n enemyCounter++;\n }\n\n //When no more enemies on maps\n if (enemies.size() == 0) {\n waveinProgress = false;\n startWaveCount = 0;\n }\n\n //Start a new level when there's no more enemies on the map\n if (loadMap.MAP[mouseY / w][mouseX / w] == 16) {\n if (input.isMousePressed(0) && startWaveCount == 0 && !waveinProgress) {\n startWaveCount++;\n if (startWaveCount == 1 && enemies.size() == 0 && !waveinProgress) {\n waveinProgress = true;\n gc.resume();\n spawninProgress = true;\n currentLevel++;\n }\n }\n }\n\n //For each new level, increase the HP of each enemy\n if (currentLevel < currentLevel + 1 && !waveinProgress) {\n for (Enemy enemyHP : enemies) {\n if (enemyHP.getStartPosX() <= 0 && enemyHP.getHP() < enemyHP.startHP + currentLevel) {\n enemyHP.setHP(enemyHP.getHP() + currentLevel);\n }\n }\n }\n\n\n //For each enemies, if enemies has finished their way, decrease player HP\n //and set them inactive\n for (Enemy enemyList : enemies) {\n if (enemyList.counter >= enemyList.path.getLength() - 1) {\n player.decreaseLife();\n bulletCount = 0;\n enemyList.isActive = false;\n }\n\n //If enemies' hp is zero, set them inactive and remove from the list\n if (enemyList.getHP() <= 0) {\n enemyList.isActive = false;\n bulletCount = 0;\n player.addCredits(20);\n }\n enemyList.update(gc, stateBasedGame, delta);\n }\n for (int i = 0; i < enemies.size(); i++) {\n if (!enemies.get(i).isActive) {\n enemies.remove(enemies.get(i));\n }\n }\n\n //For all objects, update\n for (GameObject obj : objects)\n try {\n obj.update(gc, stateBasedGame, delta);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //Go to Menu\n if (gc.getInput().isKeyPressed(Input.KEY_ESCAPE)) {\n gc.getInput().clearKeyPressedRecord();\n stateBasedGame.enterState(2);\n }\n\n\n }", "public void setBullet(Bullet _bul) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n bul = _bul;\n }", "public void drawBullet(){\n if (classOfObejct == 0){\n colorMode(RGB,255,255,255);\n noStroke();\n fill(255,100,30);\n ellipse(posX, posY, 6, 9);\n fill(255,153,51);\n ellipse(posX,posY, 4, 6);\n fill(255,255,100);\n ellipse(posX,posY, 2, 3);\n fill(255,255,200);\n ellipse(posX,posY, 1, 1);\n stroke(1);\n }\n else{\n colorMode(RGB,255,255,255);\n noStroke();\n fill(51,153,255);\n ellipse(posX, posY, 8, 8);\n fill(102,178,255);\n ellipse(posX,posY, 6, 6);\n fill(204,229,255);\n ellipse(posX,posY, 4, 4);\n fill(255,255,255);\n ellipse(posX,posY, 2, 2);\n stroke(1);\n }\n }", "@Override\n\tpublic void update() {\n\t\tif(isMove) {\n\t\t\tspriteMoveToPoint(player, (int) mouseX, (int) mouseY);\n\t\t}\n\t\t\n\t\t//bullet\n\t\tfor(int i = 0; i < bulletList.size(); i++) {\n\t\t\tMoveSprite bullet = bulletList.get(i);\n\t\t\tspriteMoveToPoint(bullet, bullet.getX(), bullet.getY() - bullet.getVelocity());\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < bulletList.size(); i++) {\n\t\t\tMoveSprite bullet = bulletList.get(i);\n\t\t\t\tif(bullet.getY() < 10) {\n\t\t\t\t\tremoveBullet(bullet);\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t//enemy\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tMoveSprite enemy = enemyList.get(i);\n\t\t\tspriteMoveToPoint(enemy, enemy.getX(), enemy.getY() + enemy.getVelocity());\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tMoveSprite enemy = enemyList.get(i);\n\t\t\tif(enemy.getY() > layerheight) {\n\t\t\t\tremoveEnemy(enemy);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tEnemy enemy = enemyList.get(i);\n\t\t\tfor(int j = 0; j < bulletList.size(); j++) {\n\t\t\t\tBullet bullet = bulletList.get(j);\n\t\t\t\tcollisionCheckForBulletAndEnemy(enemy, bullet);\n\t\t\t}\n\t\t}\n\t}", "private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}", "public void update(){\n\n // advance player and entity loader\n player.advance();\n entityloader.advance();\n\n // if the player is shooting\n if (player.isShooting){\n player.nextBullet--;\n if (player.nextBullet < 0){\n audioloader.play(\"plshoot\"); // play audio\n for (int i = -1; i <= 1; ++i){\n playerBullets.add(new Projectile<RectangleHitbox>(player.getCenterX(), player.getCenterY(), 500, 0, 270 + 2.5 * i, 0, 0, false, 1.5, true, 0,\n player.bulletSprite.getRectangleHitbox(player.bulletSize), player.bulletSprite.img.getScaledInstance(player.bulletSize, player.bulletSize, 1), 0, 0, this));\n } \n player.nextBullet = (int)(FPS / player.bulletsPerSecond);\n }\n }\n\n // Player bullets\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n if (bullet.advance()){\n nextPlayerBullets.add(bullet);\n }\n }\n playerBullets.clear();\n for (Projectile<RectangleHitbox> bullet : nextPlayerBullets){\n playerBullets.add(bullet);\n }\n nextPlayerBullets.clear();\n\n // Circle Enemies\n for (Projectile<CircleHitbox> enemy : circleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (!enemy.isBullet){ // if enemy is not a bullet, check if it is being hit by player bullets\n boolean hit = false; // each enemy can only be hit once each frame\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n hit |= bullet.getHitbox().intersects(enemy.getHitbox());\n if (hit)\n break;\n }\n if (hit){\n enemy.damageTaken += enemy.originalLifetime * enemy.percentDamage;\n }\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextCircleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n circleEnemies.clear();\n for (Projectile<CircleHitbox> enemy : nextCircleEnemies){ // swap nextCircleEnemies with circleEnemies\n circleEnemies.add(enemy);\n }\n nextCircleEnemies.clear();\n\n // Rectangle Enemies\n for (Projectile<RectangleHitbox> enemy : rectangleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextRectangleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n rectangleEnemies.clear();\n for (Projectile<RectangleHitbox> enemy : nextRectangleEnemies){ // swap nextRectangleEnemies with rectangleEnemies\n rectangleEnemies.add(enemy);\n }\n nextRectangleEnemies.clear();\n\n }", "public void shoot(int bulletLeft) {\n float xValue = canon.getX();\n float yValue = canon.getY();\n bullets.get(bulletLeft).setVisibility(View.VISIBLE);\n shootingMotion(bullets.get(bulletLeft), xValue, yValue);\n\n }", "private void bulletMoveOffScreen() {\r\n\t\tif(bullet != null && (bullet.getX() > getWidth() || bullet.getX() < 0)){\r\n\t\t\tremove(bullet);\r\n\t\t\tbullet = null;\r\n\t\t}\r\n\t}", "private void speedBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Yellow\"));\n\n\t\tfor (int i = 0; i < bulletArrayList.size(); i++) {\n\t\t\tbulletArrayList.get(i).setSpeed(5);\n\t\t}\n\t}", "@Override\n public void update(float dt) {\n //bulletUpdate(dt,b2body);\n stateTime += dt;\n bulletUpdate(b2body,bulletSprite1);\n bulletUpdate(b2body2,bulletSprite2);\n bulletUpdate(b2body3,bulletSprite3);\n\n\n\n }", "public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }", "private void shootingMotion(final View v, final float x, final float y) {\n setBulletLocation(v, x, y);\n ObjectAnimator animation = ObjectAnimator.ofFloat(v, \"translationY\", -300f);\n animation.setDuration(2000);\n animation.start();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n checkOnHit(v);\n }\n }, 1300);\n }", "public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }", "public void setBullet (boolean flag) {\n\t\tbody.setBullet(flag);\n\t}", "Bullet(int posX,int posY,int velX,int velY,int classOfObejct,int attack){\n this.posX = posX;\n this.posY = posY;\n this.velX = velX;\n this.velY = velY;\n this.classOfObejct = classOfObejct;\n this.attack = attack;\n\n }", "public void createBullet(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player != null) {\r\n Bullet bullet = new Bullet(x, y);\r\n bullet.player = name;\r\n playAudio(\"shoot\");\r\n }\r\n }", "@Override\n public void draw(Graphics2D g2d) {\n g2d.drawImage(getBulletImg(), this.getX(), this.getY(), null);\n \n }", "@Override\n public void update(float delta) {\n // Make sure to COPY the vector and not copy the reference\n position = new Vector3f(entity.getPosition()).add(offset);\n }", "private void updatePos() {\n var ballBounds = ball.getMesh().getRelativeRectangleBounds().getBounds2D();\n var hookBallBounds = hook.getHookBall().getMesh().getRelativeRectangleBounds().getBounds2D();\n var ballCenter = new Vector2(ballBounds.getCenterX(), ballBounds.getCenterY());\n var hookBallCenter = new Vector2(hookBallBounds.getCenterX(), hookBallBounds.getCenterY());\n fullDirection = hookBallCenter.subtracted(ballCenter);\n var oposDir = ballCenter.subtracted(hookBallCenter).normalized();\n oposDir.multiplyBy(hookBallBounds.getWidth() / 2);\n hookBallCenter.add(oposDir);\n direction = hookBallCenter.subtracted(ballCenter);\n getTransform().setPosition(ballCenter);\n getTransform().setRotation(GeometryHelper.vectorToAngle(hookBallCenter.subtracted(ballCenter)));\n getTransform().translate(0, -GameSettings.ROPE_HEIGHT / 2 - 1);\n }", "public void shoot()\n {\n\n if(reload<=0)//if the tower has reloaded\n {\n int randomizer=Greenfoot.getRandomNumber(20)-10; \n MinigunBullet bullet = new MinigunBullet(this.getRotation()+randomizer, damage,this);\n getWorld().addObject(bullet, getX(), getY());\n bullet.move(30);\n reload=3;\n }\n else//reload\n {\n reload--;\n }\n\n }", "public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Replace the next line with any behavior you would like\n\t\t\n\t}", "public void onBulletHit(BulletHitEvent event) {\n RobotReference hitRobot;\n hitRobot = robots.get(event.getName());\n\n if (hitRobot.isTeammate()) {\n setTurnRight(90);\n setAhead(400);\n setChargerTarget();\n }\n }", "@Override\n\tpublic void update() {\n\t\tposX -= ninja.getSpeedX();\n\t\t\n\t}", "void updatePosition() {\n\t\t\n\t\tcoords.x = body.getPosition().x*Simulation.meterToPixel;\n\t\tcoords.y = body.getPosition().y*Simulation.meterToPixel;\n\t\tspeed.x = body.m_linearVelocity.x;\n\t\tspeed.y = body.m_linearVelocity.y;\n\t}", "public void drawBullets(){\n if(!world.getPlayer().getWeapon().getBullets().isEmpty()) {\n for (Bullet b : world.getPlayer().getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y * ppuY,\n b.SIZE * ppuX, b.SIZE * ppuY);\n }\n }\n if(!world.getEnemies().isEmpty()) {\n for(Enemy e: world.getEnemies()){\n if(!e.getWeapon().getBullets().isEmpty()){\n for (Bullet b : e.getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }\n }\n if(!world.getBullets().isEmpty()) {\n for(Bullet b : world.getBullets()){\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }", "public void updatePosition()\r\n\t{\r\n\t\tsuper.updatePosition();\r\n\t\t\r\n\t\t// Update the bomb's position\r\n\t\tPoint nextPosition = getPath().getLocation(t++);\r\n\t\tsetX(nextPosition.x + startX);\r\n\t\tint nextY = nextPosition.y + startY;\r\n\t\tsetY(nextY);\r\n\t\t\r\n\t\t// Blow the bomb up after it reaches mid screen\r\n\t\tif (t > 120 || (nextY < (Global.WINDOW_HEIGHT >> 1) && t > 30))\r\n\t\t{\r\n\t\t\tbombSound.stop();\r\n\t\t\tsuper.remove();\r\n\t\t\tGamePanel.makeExplosion(getX(), getY());\r\n\t\t\t\r\n\t\t\t// Injure all the enemies on the screen\r\n\t\t\t\r\n\t\t\tArrayList<Sprite> sprites = GamePanel.getSprites();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < sprites.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tif (sprites.get(i) instanceof Enemy)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy enemy = (Enemy) sprites.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t\tint currentYTop = GamePanel.getLevel().getCurrentY() +\r\n\t\t\t\t\t\tBLOCKS_PER_Y - 1;\r\n\t\t\t\t\tboolean visibleX = enemy.getX() + enemy.getWidth() >= 0 &&\r\n\t\t\t\t\t\tenemy.getX() <= Global.WINDOW_WIDTH;\r\n\t\t\t\t\tboolean yOnScreen = enemy.getY() <= Global.WINDOW_HEIGHT +\r\n\t\t\t\t\t\t100;\r\n\t\t\t\t\tboolean visibleY = enemy.getYBlock() >= currentYTop &&\r\n\t\t\t\t\t\tyOnScreen;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (visibleX && visibleY && enemy.isAlive())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tenemy.offsetHealth(-300);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (enemy.getHealth() <= 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tenemy.remove();\r\n\t\t\t\t\t\t\tGamePanel.offsetNumLevelPoints(100);\r\n\t\t\t\t\t\t\tGamePanel.makeExplosion(enemy.getX(), enemy.getY());\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}\r\n\t\t}\r\n\t}", "public void shoot(GraphicsContext graphicsContext) {\n TankBullet bullet = new TankBullet(new FixedCoordinates(getCoordinates().getX() + 17, getCoordinates().getY() + 100), gameEnded, graphicsContext);\n bullet.draw(graphicsContext);\n CoordinatesCache.getInstance().getEnemyBullets().add(bullet);\n }", "public Bullet(ProximityVector position, double angle, ParticleManager particleManager) {\n //Arguments: ProximityEffect particleEffect, int health, int speed, Sound sound, Image image, ProximityVector position, double angle, Creep target\n super(particleManager.getBulletEffect(), 1, 20, sound, img, position, angle);\n\n }", "protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}", "private void multiBulletFire() {\n\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 20, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) - 10, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 50, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t}", "public void setBulletsFired(ArrayList<Bullet> bullets) {\n if(!bulletsFired.isEmpty()) {\n //System.out.println(bullets.get(0).getxPos() != bulletsFired.get(0).getxPos());\n this.bulletsFired = bullets;\n }\n }", "public void update()\n {\n done = false;\n if(data.size()==0)\n {\n data.add('0');\n data.add('0');\n data.add('0');\n data.add('0');\n data.add('0');\n }\n\n boolean isPressed = shot;\n\n keyUP = data.get(0) == '1';\n keyDOWN = data.get(1) == '1';\n keyLEFT = data.get(2) == '1';\n keyRIGHT = data.get(3) == '1';\n shot = data.get(4) == '1';\n\n if(!shot && isPressed)\n {\n if (canShot)\n {\n status.setShot(true);\n if (getBulletType ().equals (\"Laser\"))\n {\n bullets.add (new LaserBulletMulti (getCanonStartX (), getCanonStartY (),\n getDegree (), System.currentTimeMillis (), walls, tanks,canonPower,this.code,kills));\n setBulletType (\"Normal\");\n } else\n {\n bullets.add (new BulletMulti (getCanonStartX (), getCanonStartY (),\n getDegree (), System.currentTimeMillis (), walls, tanks,canonPower,this.code,kills));\n }\n\n canShot = false;\n shot = true;\n new Thread (new Runnable () {\n @Override\n public void run () {\n try {\n Thread.sleep (100);\n shot = false;\n } catch (InterruptedException e) {\n e.printStackTrace ();\n }\n }\n }).start ();\n new Thread (new Runnable () {\n @Override\n public void run () {\n try {\n Thread.sleep (500);\n canShot = true;\n } catch (InterruptedException e) {\n e.printStackTrace ();\n }\n }\n }).start ();\n }\n }\n\n int forX = (int) (6 * Math.cos (Math.toRadians (this.getDegree ())));\n int forY = (int) (6 * Math.sin (Math.toRadians (this.getDegree ())));\n\n if(keyUP && canMove(forX , forY) && isEmpty(forX,forY,1))\n {\n this.addLocX(forX);\n this.addLocY(forY);\n }\n if(keyDOWN && canMove(-1*forX , -1*forY) && isEmpty(forX,forY,-1))\n {\n this.addLocX(-1*forX);\n this.addLocY(-1*forY);\n }\n\n checkPrize();\n\n if(keyRIGHT && !keyLEFT)\n this.increaseDegree();\n\n if(!keyRIGHT && keyLEFT)\n this.decreaseDegree();\n\n\n this.setLocX(Math.max(this.getLocX(), 0));\n this.setLocX(Math.min(this.getLocX(), GameFrameMulti.GAME_WIDTH - 30));\n this.setLocY(Math.max(this.getLocY(), 0));\n this.setLocY(Math.min(this.getLocY(), GameFrameMulti.GAME_HEIGHT - 30));\n done = true;\n }", "void resetPositions() {\n position = new PVector(Constants.width/2, Constants.height/2);\n velocity = new PVector();\n acceleration = new PVector();\n bullets = new ArrayList<Bullet>();\n rotation = 0;\n }", "public void shoot(float direction) {\n\t\tif(pause != 0) return;\n\t\tbullets.add(new Bullet(player.getPosition(),direction));\n\t\tpause = cooldown;\n\t}", "public void attach(float speed, int delta) {\n\t\tthis.xpos+=speed*delta;\t\n\t}", "void setTubeDownPosition(double x, double y);", "public void update() {\n double newAngle = angle - 90;\n Coordinate nextCenterPointCoordinate = new Coordinate(\n this.centerPointCoordinate.getXCoordinate() - (Constants.BULLET_SPEED * Math.cos(Math.toRadians(newAngle))),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(newAngle)))\n );\n\n\n ArrayList<Wall> walls = new ArrayList<>();\n walls.addAll(TankTroubleMap.getDestructibleWalls());\n walls.addAll(TankTroubleMap.getIndestructibleWalls());\n ArrayList<Coordinate> nextCoordinatesArrayList = makeCoordinatesFromCenterCoordinate(nextCenterPointCoordinate);\n Wall wallToCheck = null;\n for (Wall wall : walls) {\n if (TankTroubleMap.checkOverLap(wall.getPointsArray(), nextCoordinatesArrayList)) {\n wallToCheck = wall;\n }\n }\n\n if (wallToCheck != null) {\n if (horizontalCrash(wallToCheck)) { //if the bullet would only go over horizontal side of any walL\n nextCenterPointCoordinate = flipH();\n } else if (verticalCrash(wallToCheck)) { // if the bullet would only go over vertical side any wall\n nextCenterPointCoordinate = flipV();\n } else {// if the bullet would only go over corner of any wall\n int cornerCrashState = cornerCrash(wallToCheck);\n nextCenterPointCoordinate = flipCorner(cornerCrashState);\n }\n\n if (wallToCheck.isDestroyable()) {//crashing destructible\n //System.out.println(\"bullet damage:\"+ damage);\n //System.out.println(\"wall health:\"+ ((DestructibleWall) wallToCheck).getHealth());\n ((DestructibleWall) wallToCheck).receiveDamage(damage);\n if (((DestructibleWall) wallToCheck).getHealth() <= 0) {\n TankTroubleMap.getDestructibleWalls().remove(wallToCheck);\n }\n bulletsBlasted = true;\n tankTroubleMap.getBullets().remove(this);\n }\n }\n this.centerPointCoordinate = nextCenterPointCoordinate;\n updateArrayListCoordinates();\n\n // Tanks / users\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getUsers().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getUsers().get(i).getUserTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getUsers().get(i).getUserTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getUsers().get(i).getUserTank().getHealth());\n if (tankTroubleMap.getUsers().get(i).getUserTank().getHealth() <= 0) {\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().remove(finalI);\n gameOverCheck();\n if (isUserTank) {\n tankTroubleMap.getUsers().get(tankIndex).getUserTank().setNumberOfDestroyedTank(tankTroubleMap.getUsers().get(tankIndex).getUserTank().getNumberOfDestroyedTank() + 1);\n }\n tankTroubleMap.getAudience().add(tankTroubleMap.getUsers().get(finalI));\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n\n // Tanks / bots\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getBots().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getBots().get(i).getAiTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getBots().get(i).getAiTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getBots().get(i).getAiTank().getHealth());\n if (tankTroubleMap.getBots().get(i).getAiTank().getHealth() <= 0) {\n // System.out.println(\"Blasted Tank.......\");\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().remove(finalI);\n gameOverCheck();\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n }", "public void trackBullets(){\n for (int i = 0; i < bullets.size(); i++){\n Bullet tempBullet = bullets.get(i);\n //update the position of the bullets\n tempBullet.update();\n tempBullet.drawBullet();\n //check if the bullet hit the boundary, remove the bullet from the list of the bullet\n if(tempBullet.detectBound()){\n bullets.remove(i);\n continue;\n }\n //detect if the bullet hit the boss and cause the damage if yes\n if(tempBullet.hitObject(Main.boss) && Main.boss.alive){\n Main.boss.decreaseHealth(attack);\n tempBullet.drawHit();\n bullets.remove(i);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n }\n }\n //detect if the bullet hit the enemy and cause the damage if yes\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n if(tempBullet.hitObject(tempEnemy) && tempEnemy.alive){\n tempBullet.drawHit();\n tempEnemy.decreaseHealth(attack);\n // if enemy is totally hitted, wait one 1s, and then removed\n if(tempEnemy.health <= 0){\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n }\n bullets.remove(i);\n break;\n }\n }\n }\n }", "public void updateVelocity(){\r\n if (getPosition().x <= 0 || getPosition().x >= GameBoard.MAX_X) {\r\n setVelocity(getVelocity().add(getVelocity().mul(reverse)));\r\n }\r\n }", "public void update(int delta)\n\t{\n\t\tpause = Math.max(0, pause - 1);\n\t\tfor(int i = 0; i < bullets.size(); i++)\n\t\t{\n\t\t\tboolean shoot = bullets.get(i).updateBullet(delta);\n\t\t\tif(shoot)\n\t\t\t{\n\t\t\t\t//bullets.get(i).killInstance();\n\t\t\t\tbullets.remove(i);\n\t\t\t}\n\t\t}\n\t}", "private void updatePosition() {\n position.add(deltaPosition);\n Vector2[] points = getRotatedPoints();\n\n for (Vector2 point : points) {\n if (point.getX() < bound.getX() || point.getX() > bound.getX() + bound.getWidth()) { //If the point is outside of the bounds because of X\n position.addX(-deltaPosition.getX() * 2); //Undo the move so it is back in bounds\n deltaPosition.setX(-deltaPosition.getX()); //Make the direction it is going bounce to the other direction\n break;\n }\n if (point.getY() < bound.getY() || point.getY() > bound.getY() + bound.getHeight()) { //If the point is outside of the bounds because of Y\n position.addY(-deltaPosition.getY() * 2); //Undo the move so it is back in bounds\n deltaPosition.setY(-deltaPosition.getY()); //Make the direction it is going bounce to the other direction\n break;\n }\n }\n deltaPosition.scale(.98);\n }", "@Override\n\tpublic void onCreateBulletEvent() {\n\t\tcreateBullet();\n\t}", "public BulletController(Bullet bullet) {\n this.bullet = bullet;\n rangeTimer = 0;\n }", "private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }", "public void update() {\n super.update();\n // Code specific to the ship gameObject\n action = ctrl.action();\n direction.rotate(action.turn * STEER_RATE * Constants.DT);\n velocity.addScaled(direction, (MAG_ACC * Constants.DT * action.thrust));\n position.addScaled(velocity, DRAG * Constants.DT);\n position.wrap(Constants.FRAME_WIDTH, Constants.FRAME_HEIGHT);\n\n // Checks if the user is pressing forwards\n if(action.thrust == 1){\n thrusting = true;\n } else{\n thrusting = false;\n }\n time -= 1;\n if(action.shoot && time <= 0){\n mkBullet();\n time = 30;\n }\n\n if(invincible)\n color = Color.blue;\n else\n color = Color.cyan;\n }", "@Override\n\tpublic void update()\n\t{\n\t\tsuper.update();\n\n\t\tcalcAcceleration();\n\t\tsetVelocity(Vector2D.add(getVelocity(), getAcceleration()));\n\n\t\tcalcVelocity();\n\t\tsetPosition(Vector2D.add(getPosition(), getVelocity()));\n\n\t\tbm.update(getPosition(), getWidth(), getHeight());\n\t}", "public void shoot(Point p, Graphics g, Player player){\r\n if(p.getX() > getXCoord()-20){ //not sure if -20 needed (it is to make cetner by the shoulder of arm)\r\n setFacing(1);\r\n } else{\r\n setFacing(0);\r\n }\r\n this.setAttackSpeedTimer(this.getAttackSpeedTimer() + 1);\r\n if(this.getAttackSpeedTimer() == this.getAttackSpeed()){\r\n\t\t Bullet bullet = new Bullet(this.getXCoord(), \r\n\t\t\t\t\t this.getYCoord(), this.getFacing(), g, findAngle(p), player);\r\n\t\t\t\t\t bullet.setAttack(50);\r\n\t\t bullet.setMouseY(this.getMouseY());\r\n\t\t bullet.setMouseX(this.getMouseX());\r\n\t\t bullet.setMouseAngle(this.getMouseAngle());\r\n\t \t bullet.setPlayerDirection(this.getPlayerDirection());\r\n\t\t this.addProjectile(bullet);\r\n\t\t this.setAttackSpeedTimer(0);\r\n\t\t //System.out.println(findAngle(p)*180/Math.PI);\r\n\t\t this.playSound();\r\n }\r\n }", "public void mousePressed(MouseEvent e){\n\t\t\t t.bullets.add(new Bullet(t.theta, t.lx, t.ly));\t\n\t\t}", "@Override\n\tpublic void update(){\n\t\t\n\t\tx += dx;\n\t\tif(x <= 2){\n\t\t\tx = 2;\n\t\t}else if(x >= ((this.width+this.paddlewidth)-350)){\n\t\t\tx = (this.width+this.paddlewidth)-350;\n\t\t}else if(x <= Dimensions.PADDLE_LEFT){\n\t\t\tx = Dimensions.PADDLE_LEFT;\n\t\t}\n\t}", "@Override\n\tpublic void update() {\n\t\tmove();\n\t\tplace();\n\t}", "@Override\n\tpublic void posModify() {\n\t\t\n\t}", "@Override\n\tpublic void posModify() {\n\t\t\n\t}", "public static void addBullet(float x, float y, float xspeed, float yspeed) {\r\n \tFloat[] t = new Float[4];\r\n \tt[0] = x;\r\n \tt[1] = y;\r\n \tt[2] = xspeed;\r\n \tt[3] = yspeed;\r\n \tbulletsToAdd.add(t);\r\n }", "public void updateSprites() {\n this.model.getSprites().values().forEach(x -> x.setPosition(this.x, this.y));\n }", "public Bullet(double angle, int x, int y,boolean update) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tr = 2;\n\n\t\trad = Math.toRadians(angle);\n\t\tspeed = 10;\n\t\tdx = Math.cos(rad) * speed;\n\t\tdy = Math.sin(rad) * speed;\n\n\t\tthis.angle= (float) angle;\n\t\tcolor1 = Color.YELLOW;\n\n\t\tneedToSend=false;\n\t}", "public boolean IsBullet()\r\n {\r\n return this.isBullet;\r\n }", "@Override\n\tpublic Bullet shoot(int hx, int hy) {\n\t\treturn null;\n\t}", "public void init(){\n hp = DEFAULT_MAX_HEALTH;\n bulletsFired = new ArrayList<>();\n initial_y = -1;\n\n //Sets the byte to identify the state of movement\n //For animation purposes in the renderer\n //0 = stationary\n //1 = jumping\n //2 = moving left\n //3 = jumping left\n //4 = right\n //5 = Jumping right\n //6 = crouching\n //8 = crouching left\n //10 = crouching right\n stateOfMovement = 0;\n }", "void setPos(float x, float y);", "public void avatarShoot()\r\n\t{\r\n\t\tBullet avatarPew = avatar.shoot();\r\n\t\tif (avatarPew!= null)\r\n\t\t{\r\n\t\t\tbullets.add(avatarPew);\r\n\t\t}\r\n\t}", "private void clearBullet()\n {\n if(playerBullets.size() > 0)\n {\n for(int i = 0; i < playerBullets.size(); ++i)\n {\n int x = playerBullets.get(i).getRectangle().centerX(), y = playerBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n playerBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n if(enemyBullets.size() > 0)\n {\n for(int i = 0; i < enemyBullets.size(); ++i)\n {\n int x = enemyBullets.get(i).getRectangle().centerX(), y = enemyBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n enemyBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n }", "@Override\r\n public int fire() {\r\n if (this.getBulletsCount() == 0) {\r\n return 0;\r\n }\r\n this.setBulletsCount(this.getBulletsCount() - 10);\r\n return 10;\r\n }", "public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }", "public void update(){\n\t\ttime += System.currentTimeMillis() - lastTime;\n\t\tlastTime = System.currentTimeMillis();\n\t\t\n\t\t/*fin quando il tempo Ŕ maggiore della velocita incrementa gli indici*/\n\t\tif(time > velocity){\n\t\t\tindex++;\n\t\t\ttime = 0;\n\t\t\tif(index >= animation_frame.length)\n\t\t\t\t{\n\t\t\t\t\tindex = 0;\n\t\t\t\t}\n\t\t}\n\t}" ]
[ "0.7143655", "0.695315", "0.69121075", "0.68941283", "0.67749023", "0.6723658", "0.67028487", "0.6674708", "0.66455644", "0.6645441", "0.65644115", "0.6536819", "0.6505926", "0.64893746", "0.6455267", "0.64449924", "0.644156", "0.64223355", "0.6392841", "0.6387203", "0.63869464", "0.6384344", "0.6362149", "0.63427603", "0.6306349", "0.62823397", "0.6252738", "0.62445676", "0.6215182", "0.62082946", "0.6202199", "0.61965936", "0.61586016", "0.61517435", "0.614759", "0.6139614", "0.6132156", "0.61320156", "0.6126853", "0.6113422", "0.61002576", "0.6095333", "0.60900575", "0.608504", "0.60845095", "0.60690105", "0.6064699", "0.6055433", "0.6045655", "0.60443866", "0.60408115", "0.6012982", "0.597664", "0.5953107", "0.5947171", "0.59336394", "0.5926708", "0.5925601", "0.5904025", "0.5902864", "0.59023064", "0.589122", "0.58727", "0.587252", "0.58639747", "0.5853851", "0.58532846", "0.584321", "0.58317", "0.58254915", "0.5810202", "0.5803766", "0.57999307", "0.579922", "0.57863706", "0.5786303", "0.57737166", "0.5772272", "0.57673436", "0.57602197", "0.5754081", "0.57380253", "0.57352877", "0.57262766", "0.5724285", "0.57233995", "0.5720146", "0.5720146", "0.5715832", "0.5712401", "0.57086337", "0.57075745", "0.5703966", "0.5687733", "0.5687705", "0.5685236", "0.5682453", "0.5673273", "0.567154", "0.5656102" ]
0.57373905
82
decide if the bullet goes out the screen
public boolean detectBound(){ if(posX < 0 || posX > width || posY < 0 || posY > height){ return true; } else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void bulletMoveOffScreen() {\r\n\t\tif(bullet != null && (bullet.getX() > getWidth() || bullet.getX() < 0)){\r\n\t\t\tremove(bullet);\r\n\t\t\tbullet = null;\r\n\t\t}\r\n\t}", "boolean testIsOffScreenBullet(Tester t) {\n return t.checkExpect(bullet1.isOffScreen(0, 0), true)\n && t.checkExpect(bullet2.isOffScreen(1000, 1000), false)\n && t.checkExpect(bullet1.isOffScreen(250, 300), false);\n }", "public void isShooting(GameContainer gc) throws LineUnavailableException{\r\n\t\tif(gc.getInput().isKeyPressed(Input.KEY_SPACE) || gc.getInput().isKeyPressed(Input.KEY_UP)){\r\n\t\t\tif(!this.bullet.isMoved()){\r\n\t\t\t\tthis.playSound();\r\n\t\t\t\tanimation = this.shooting;\r\n\t\t\t\tthis.bullet.position.x = super.getShape().getCenterX();\r\n\t\t\t\tthis.bullet.position.y = super.getShape().getCenterY();\r\n\t\t\t\tthis.getBullet().setMoved(true);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.getBullet().isMoved()){\r\n\t\t\tthis.bullet.move();\r\n\t\t}\r\n\t}", "private void killBullet() {\r\n this.dead = true;\r\n }", "public boolean isOffScreen()\r\n\t{\r\n\t\treturn (getX()<-10&&xVel<0)||(getX()>WIDTH_SCREEN&&xVel>0)||getY()<-10||getY()>HEIGHT_SCREEN;\r\n\t\t\t\r\n\t}", "public boolean IsBullet()\r\n {\r\n return this.isBullet;\r\n }", "private void checkForBulletCollisions() {\r\n\t\tbulletMoveOffScreen();\r\n\t\tbulletCollisionWithObject();\r\n\t}", "public boolean offScreen() {\r\n\t\treturn (this.getY() < -TREE_HEIGHT || this.getY() > 1000); \r\n\t}", "@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}", "public void deadcheck()\n\t{\n\t\tif (this.shield <= 0)\n\t\t{\n\t\t\tthis.drawMissile = false;\n\t\t}\n\t\telse \n\t\t\tthis.drawMissile = true;\n\t}", "public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}", "public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\telse \n\t\t\treturn true; \n\t}", "public void checkForDeath()\n {\n Bullet2 bullet2 = new Bullet2(getVelocity(), getRotation());\n myWorld2 world = (myWorld2)getWorld();\n Zombie2 zombie = new Zombie2();\n \n if (isTouching(Bullet2.class))\n {\n health -= bullet2.damage;\n \n if(health < 0)\n {\n world.score(2);\n world.removeObject(this);\n } \n }\n else if (getX() == 900) \n {\n world.score(-1);\n world.removeObject(this);\n } \n }", "boolean testRemoveOffscreenBullets(Tester t) {\n return t.checkExpect(lob3.removeOffscreen(100, 100),\n new ConsLoGamePiece(bullet9, new ConsLoGamePiece(bullet8, mt)))\n && t.checkExpect(lob3.removeOffscreen(300, 300), lob3)\n && t.checkExpect(lob3.removeOffscreen(500, 500), lob3)\n && t.checkExpect(mt.removeOffscreen(0, 0), mt);\n }", "public boolean isBullet () {\n\t\treturn body.isBullet();\n\t}", "public void isShot() {\r\n\t\tlives -=1;\r\n\t\tif(isDead())\r\n\t\t{\r\n\t\t\tthis.erase();\r\n\t\t}\r\n\t}", "void checkCol() {\n Player player = gm.getP();\n int widthPlayer = (int) player.getImg().getWidth();\n int heightPlayer = (int) player.getImg().getHeight();\n Bullet dummyBuullet = new Bullet();\n int widthBullet = (int) dummyBuullet.getImg().getWidth();\n int heightBullet = (int) dummyBuullet.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n // the bullet must be an enemy bullet\n if (bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the bullet location is inside the rectangle of player\n if ( Math.abs( bullet.getX() - player.getX() ) < widthPlayer / 2\n && Math.abs( bullet.getY() - player.getY() ) < heightPlayer / 2 ) {\n // 1) destroy the bullet\n // 2) decrease the life of a player\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n bullet.setActive(false);\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n break;\n }\n }\n }\n // 2'nd case\n // the enemy is hit with player bullet\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n if (!bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the player bullet location is inside the rectangle of enemy\n if (Math.abs(enemy.getX() - bullet.getX()) < (widthBullet / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - bullet.getY()) < (heightBullet / 2 + heightEnemy / 2)) {\n // 1) destroy the player bullet\n // 2) destroy the enemy\n if (destroyedEnemy % 3 == 0 && destroyedEnemy != 0) onlyOnce = 0;\n destroyedEnemy++;\n gm.increaseScore();\n enemy.setActive(false);\n\n\n if(enemy.hTitanium()) {\n gm.getTitaniumList()[gm.getTitaniumIndex()].setX(enemy.getX());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setY(enemy.getY());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setActive(true);\n gm.increaseTitaniumIndex();\n }\n\n if(enemy.hBonus()) {\n \tgm.getBonusList()[gm.getBonusIndex()].setX(enemy.getX());\n \tgm.getBonusList()[gm.getBonusIndex()].setY(enemy.getY());\n \tgm.getBonusList()[gm.getBonusIndex()].setActive(true);\n \tgm.increaseBonusIndex();\n }\n bullet.setActive(false);\n break;\n }\n }\n }\n }\n }\n\n // 3'rd case\n // the player collided with enemy ship\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n // the condition when the enemy rectangle is inside the rectangle of player\n if (Math.abs(enemy.getX() - player.getX()) < (widthPlayer / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - player.getY()) < (heightPlayer / 2 + heightEnemy / 2)) {\n // 1) destroy the enemy\n // 2) decrease the player's life\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n enemy.setActive(false);\n\n break;\n }\n }\n }\n\n for (Bonus bonus : gm.getBonusList()) {\n if (bonus.isActive()) {\n int widthBonus = (int) bonus.getImg().getWidth();\n int heightBonus = (int) bonus.getImg().getHeight();\n if (Math.abs(bonus.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(bonus.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n bonus.setActive(false);\n if (bonus.getType() == 1) {\n if (player.getLives() < player.getMaxLives()) {\n player.setLives(player.getLives() + 1);\n }\n }\n else{\n superAttack = 1;\n }\n }\n }\n }\n\n for (Titanium titanium : gm.getTitaniumList()) {\n if (titanium.isActive()) {\n int widthBonus = (int) titanium.getImg().getWidth();\n int heightBonus = (int) titanium.getImg().getHeight();\n if (Math.abs(titanium.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(titanium.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n titanium.setActive(false);\n gm.getP().increaseTitanium();\n }\n }\n }\n\n }", "public boolean isShooting()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public boolean isShootDown() {\n return shootDown;\n }", "private boolean birdIsOffscreen() {\r\n return (bird.getYpos() + bird.getRadius() < 0) ||\r\n (bird.getXpos() + bird.getRadius() < 0) ||\r\n (bird.getXpos() - bird.getRadius() > width);\r\n }", "public boolean hit(Bullet bullet) {\n //System.out.println(\"A golyo nem csapodott meg be semmibe.\");\n return false;\n }", "@Override\n\tpublic Bullet shoot(int hx, int hy) {\n\t\treturn null;\n\t}", "public void stopShoot(){\n\t\tshoot.set(0);\n\t}", "public boolean detectBound(){\n // super.detectBound();\n if(posY > height || posY < 0){\n Main.enemies.remove(this);\n return true;\n }\n return false;\n\n }", "private void bulletCollisionWithObject() {\r\n\t\tif(bullet != null) {\r\n\t\t\tGObject collider = getElementAt(bullet.getX() -1 , bullet.getY() + 1);\r\n\t\t\tif (dragon1 != null && collider == dragon1) {\r\n\t\t\t\thit(dragon1);\r\n\t\t\t}\r\n\t\t\tif(dragon2 != null && collider == dragon2) {\r\n\t\t\t\thit(dragon2);\r\n\t\t\t}\r\n\t\t\tif(mehran != null && collider == mehran && bullet.getY() > mehran.getY() + mehran.getHeight() / 2.0) {\r\n\t\t\t\thit(mehran);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void checkDeathCondition() {\n float speed = body.getLinearVelocity().x;\n if (prevSpeed >= 0.1 && speed < 0.1)\n kill();\n prevSpeed = speed;\n }", "private boolean hitMyPaddle() {\n if (b.numX - 60 <= 0) {\n if ((b.numY <= (this.touchedY + 260)) && (b.numY >= (this.touchedY - 260))) {\n } else {\n this.wentOffWall();\n }\n return true;\n } else {\n return false;\n }\n }", "public void stopUsingTheBullet(float worldWidth, float worldHeight, boolean removeFromActiveBullets) {\n\n if (!inUse) return;\n\n /*if (getColor().a == 0)\n Gdx.app.log(TAG, \"::::::::::::::::::: ALPHA 0 :::::::::::::::::::\");*/\n\n if (gameplayScreen.isRewinding()) {\n if (currentEffect.equals(effects.armor) & currentBulletRecord.bulletPortalType != BulletPortalType.PORTAL_ENTRANCE) {\n gameplayScreen.getLazerAttackStuff().decrementCurrentNumOfSpawnedArmorBulletsForTheNextAttack(parent.getIndex());\n }\n if (currentEffect.equals(effects.armor))\n Gdx.app.log(TAG, \"currentBulletRecord.bulletPortalType = \" + currentBulletRecord.bulletPortalType);\n }\n\n handleRewindEventWhenStopping();\n\n handlePlusMinusBulletCausingSlowMoExists();\n\n handlePortalTypeWhenStoppingUsingTheBullet();\n handlePortalRoleWhenStoppingUsingTheBullet();\n\n bulletsHandler.getBulletPool().free(this);\n //bulletMovement.finish();\n resetPosition(worldWidth, worldHeight);\n detachFromBulletsAndShieldObject();\n\n iamNotInUseNow(removeFromActiveBullets);\n }", "public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }", "private void checkDeath() {\n\t\tif (player.getLives() == 0) {\n shooty.setIv(new Image(\"/img/shipdeath.png\"));\n\t\t\tdie();\n\t\t}\n\t\t// another way to die: the blocks hit you\n\t\tif(btnList.get(0).getLayoutY() >= FATAL_BUTTON_DIST) {\n\t\t\tendGame.play();\n\t\t\tdie();\n\t\t}\n\t}", "public void update() {\r\n super.update();\r\n life -= 1;\r\n if(life <= 0) {\r\n killBullet();\r\n }\r\n }", "public boolean isHitFree()\n {\n // TODO: replace this line with your code\n }", "public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }", "public void stopShooting() {\n\t\tgetWeapon().releaseMain();\n\t\tsetShooting(false);\n\t}", "public void shoot(){\r\n\t\tif(numberOfArrows>0){\r\n\t\t\tnumberOfArrows--;\r\n\t\t\tPosition positionWumpus = b.getWumpus().getPosition();\r\n\t\t\tif (position.checkShoot(positionWumpus))\r\n\t\t\t\tb.getWumpus().kill();\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"There are no more arrows.\");\r\n\t}", "protected boolean isMovementNoisy() {\n/* 1861 */ return (!this.abilities.flying && (!this.onGround || !isDiscrete()));\n/* */ }", "public boolean isShootLeft() {\n return shootLeft;\n }", "public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Paramos tudo o que estamos fazendo.\n\t\tstop();\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\n\t\t// Giramos a arma na direção do disparo\n\t\tdouble turnGunAmt = Utils.normalRelativeAngleDegrees(e.getBearing() + getHeading() - getGunHeading());\n\t\tturnGunRight(turnGunAmt);\n\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\t\tback(400); // Recuamos\n\t}", "protected void end() {\n Robot.shooter.set(0);\n RobotMap.Armed=false;\n RobotMap.shootState=false;\n System.out.println(\"done shooting\");\n if (this.isTimedOut()==true) {\n System.out.println(\n \"shot timed out\");\n \n }\n if (RobotMap.inPosition.get()!=OI.shooterArmed){\n System.out.println(\"in position is different than shooter armed\");\n }\n}", "public boolean isShootUp() {\n return shootUp;\n }", "public void update(float delta) {\n rangeTimer++;//update bullet distance\n //delete bullet if hit collison or met ranged\n if (rangeTimer == RANGE) {\n bullet.setShoot(false);\n rangeTimer = 0;\n } else {\n //update bullet timings\n bullet.updateTimer(delta);\n //make bullet go to p x y - follows player to increase difficulty\n if (this.bullet.x < playerX + 1.5) {\n this.bullet.x += Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.x >playerX + 1.5) {\n this.bullet.x -= Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.y < playerY + 0.5) {\n this.bullet.y += Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.y > playerY + 1.5) {\n this.bullet.y -= Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n }\n }", "public void checkForBounce()\n {\n if (isTouching(mid.class)){\n \n bounce = 1;\n \n \n }\n \n \n \n \n if (getY() <= 0 || getY() >= getWorld().getHeight() -1 )\n {\n \n dY = -dY;\n \n }\n \n \n if(isTouching(Pad1.class )){\n \n if (bounce == 1){\n \n \n Greenfoot.playSound(\"paddleHit.wav\"); \n dX = -dX;\n bounce = 0;\n change(); \n }\n \n \n }\n \n \n \n }", "public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }", "public void endGunFlash() {\n if (System.currentTimeMillis() - lastAttack > 200) {\n gunFlash = false;\n ((Geometry)gun.getChild(\"Box\")).getMaterial().setColor(\"Color\", ColorRGBA.Gray);\n }\n }", "boolean testIsTouchingBulletBullet(Tester t) {\n return t.checkExpect(bullet3.isTouchingBullet(bullet6), false)\n && t.checkExpect(bullet6.isTouchingBullet(bullet6), false);\n }", "private boolean leftUpCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "public void shootGun() {\n\t\tammo--;\n\t}", "static boolean willCollideWithMe(BulletInfo bullet) {\n\t\tMapLocation myLocation = rc.getLocation();\n\n\t\t// Get relevant bullet information\n\t\tDirection propagationDirection = bullet.dir;\n\t\tMapLocation bulletLocation = bullet.location;\n\n\t\t// Calculate bullet relations to this robot\n\t\tDirection directionToRobot = bulletLocation.directionTo(myLocation);\n\t\tfloat distToRobot = bulletLocation.distanceTo(myLocation);\n\t\tfloat theta = propagationDirection.radiansBetween(directionToRobot);\n\n\t\t// If theta > 90 degrees, then the bullet is traveling away from us and we can break early\n\t\tif (Math.abs(theta) > Math.PI/2) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// distToRobot is our hypotenuse, theta is our angle, and we want to know this length of the opposite leg.\n\t\t// This is the distance of a line that goes from myLocation and intersects perpendicularly with propagationDirection.\n\t\t// This corresponds to the smallest radius circle centered at our location that would intersect with the\n\t\t// line that is the path of the bullet.\n\t\tfloat perpendicularDist = (float)Math.abs(distToRobot * Math.sin(theta)); // soh cah toa :)\n\n\t\treturn (perpendicularDist <= rc.getType().bodyRadius);\n\t}", "public boolean atVelocity() {\n return false;\n }", "boolean testMoveBullet(Tester t) {\n return t.checkExpect(bullet1.move(),\n new Bullet(2, Color.PINK, new MyPosn(250, 292), new MyPosn(0, -8), 1))\n && t.checkExpect(bullet2.move(),\n new Bullet(2, Color.PINK, new MyPosn(650, 650), new MyPosn(50, 50), 1));\n }", "public void Hit()\n {\n this.numLives--;\n //Oscillate visible and not if the number of lives is greater than zero\n if(this.numLives > 0)\n {\n this.damaged = true;\n this.Blink(1);\n\n }\n }", "void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }", "public void trackBullets(){\n for (int i = 0; i < bullets.size(); i++){\n Bullet tempBullet = bullets.get(i);\n //update the position of the bullets\n tempBullet.update();\n tempBullet.drawBullet();\n //check if the bullet hit the boundary, remove the bullet from the list of the bullet\n if(tempBullet.detectBound()){\n bullets.remove(i);\n continue;\n }\n //detect if the bullet hit the boss and cause the damage if yes\n if(tempBullet.hitObject(Main.boss) && Main.boss.alive){\n Main.boss.decreaseHealth(attack);\n tempBullet.drawHit();\n bullets.remove(i);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n }\n }\n //detect if the bullet hit the enemy and cause the damage if yes\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n if(tempBullet.hitObject(tempEnemy) && tempEnemy.alive){\n tempBullet.drawHit();\n tempEnemy.decreaseHealth(attack);\n // if enemy is totally hitted, wait one 1s, and then removed\n if(tempEnemy.health <= 0){\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n }\n bullets.remove(i);\n break;\n }\n }\n }\n }", "boolean testDrawBullet(Tester t) {\n return t.checkExpect(bullet1.draw(), new CircleImage(2, OutlineMode.SOLID, Color.pink))\n && t.checkExpect(bullet2.draw(), new CircleImage(2, OutlineMode.SOLID, Color.pink));\n }", "public void defensive_act()\r\n\t{\r\n\t\tBullet closestBullet = IMAGINARY_BULLET;\r\n\t//\tBullet secondClosestBullet = IMAGINARY_BULLET;\r\n\t\t\r\n\t\tActor machines;\r\n\t\tEnumeration<Actor> opponent = ((MachineInfo)data.get(TankFrame.PLAYER_1)).getHashtable().elements();\r\n\t\twhile(opponent.hasMoreElements())\r\n\t\t{\r\n\t\t\tmachines = (Actor) opponent.nextElement();\r\n\t\t\tif(machines instanceof Bullet)\r\n\t\t\t{\r\n\t\t\t\tif(machines.getPoint().distance(getPoint()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t{\r\n\t\t\t\t\tclosestBullet = (Bullet)machines;\r\n\t\t\t\t\tLine2D aim = new Line2D.Double(getCenterX(), getCenterY(), closestBullet.getPosX(), closestBullet.getPosY() );\r\n\t\t\t\t\tSystem.out.println(aim.getP1().distance(aim.getP2()));\r\n\t\t\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t\t\taimAndShoot(aim);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t/*\tif(machines.getPoint().distance(getPoint()) > secondClosestBullet.getPoint().distance(getPoint()) \r\n\t\t\t\t\t&& machines.getPoint().distance(getPoint()) < closestBullet.getPoint().distance(getPoint()))\r\n\t\t\t\t\tsecondClosestBullet = (Bullet)machines;*/\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 * Find the line\r\n\t\t */\r\n\t\t/*if(!closestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), closestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(getCenterX(), getCenterY(), (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\t/*bulletPath = new Line2D(getRightPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\tbulletPath = new Line2D(getPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);*/\r\n\t\t\t\r\n\t\t//}\r\n\t/*\tif(!secondClosestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), secondClosestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t}*/\r\n\r\n\t}", "public boolean Lost()\n {\n return this.numLives <= 0;\n }", "public void avatarShoot()\r\n\t{\r\n\t\tBullet avatarPew = avatar.shoot();\r\n\t\tif (avatarPew!= null)\r\n\t\t{\r\n\t\t\tbullets.add(avatarPew);\r\n\t\t}\r\n\t}", "private void clearBullet()\n {\n if(playerBullets.size() > 0)\n {\n for(int i = 0; i < playerBullets.size(); ++i)\n {\n int x = playerBullets.get(i).getRectangle().centerX(), y = playerBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n playerBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n if(enemyBullets.size() > 0)\n {\n for(int i = 0; i < enemyBullets.size(); ++i)\n {\n int x = enemyBullets.get(i).getRectangle().centerX(), y = enemyBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n enemyBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n }", "private boolean didPlayerLose() {\r\n return mouseListeningMode && bird.getNumThrowsRemaining() == 0;\r\n }", "public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }", "public boolean isDead() {\n return hullStrength <= 0;\n }", "public boolean damagable() {\n return !this.state.equals(\"knockedBack\")\n && !this.state.equals(\"dodge\");\n }", "public void isStillInCombat() {\n isInCombat = enemiesInCombat.size() > 0;\n }", "@Override\n\tpublic void action() {\n\t if (firingBall.getY() + firingBall.getRadius() < this.y) { \n\t //deactivate absorber locally and in GameBoard\n\t firingBall = null;\n\t gb.removeFromActiveList(this);\n\t }\n\t}", "boolean isGameSpedUp();", "public void rightPressNotGround() {\n if(!grounded) {\n if(animation.getDirection() == -1) {\n animation.setDirection(1);\n }\n if(xSpeed < 5) { \n xSpeed += AIR; \n } \n else {\n xSpeed = 5;\n }\n }\n }", "private boolean stop() {\n\t\tboolean collide = false;\n\n\t\tdist = (int) MathMachine.distance((xOrigin - this.x), (yOrigin - this.y)); // distance traveled\n\t\tif (dist >= move_range) collide = true;\n\n\t\tif (Math.abs(x - xD) <= 2 && Math.abs(y - yD) <= 2) { // adding 8 shifts the collision box from the top left corner to the bottom right.\n\t\t\tcollide = true; // this is the important statement for collision detection. It works by looking at the tile you want to go to and seeing if it is solid.\n\t\t}\n\n\t\treturn collide;\n\t}", "private void checkExplosionKill() {\n\t\t\n\t\texplosion.expand();\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tif (explosion.detectDownwardCollision(a.getX(), a.getY())) {\n\t\t\t\t\ta.setVisibility(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }", "public boolean isDead() {\n\t\tint boxX = parentBox.x;\n\t\tint boxY = parentBox.y;\n\t\tint boxLength = parentBox.LENGTH;\n\t\n\t\tif (boxX == x && boxY < y + length && boxY > y) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void dispara()\r\n {\r\n BulletEnemy bala = new BulletEnemy();\r\n getWorld().addObject(bala,getX(),getY()+25);\r\n }", "public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Replace the next line with any behavior you would like\n\t\t\n\t}", "private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}", "public void onBulletMissed(BulletMissedEvent event) {\n pointGunToVector(chargerTarget.getLocation());\n missed = true;\n }", "private void checkCollision()\n {\n if (gameOverBool==false)\n { \n Actor a = getOneIntersectingObject(Wall.class);\n if (a != null||isAtEdge())\n {\n setImage(\"gone.png\");//laat de helicopter verdwijnen\n //greenfoot.GreenfootSound.stop(\"helisound.wav\");\n World world = getWorld();\n world.addObject(new Explosion(), getX(), getY());\n Greenfoot.playSound(\"heliExplosion.wav\");\n world.addObject( new Gameover(), 600, 300 );\n gameOverBool = true; \n }\n } \n }", "public boolean shoot() {\n if (!isReloading && System.currentTimeMillis() - previousShotTime > shootInterval * 1000 && ammoRemaining > 0) {\n\n previousShotTime = System.currentTimeMillis();\n\n ammoRemaining--;\n audioPlayer.setSpatial(holder);\n audioPlayer.playOnce();\n // score -= 50;\n Vec2 angle = Vec2\n .Vector2FromAngleInDegrees(transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread));\n\n Vec2 spawnPosition = transform.getWorldPosition();\n\n Projectile p = new Projectile(spawnPosition,\n Vec2\n .Vector2FromAngleInDegrees(\n transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread)),\n new Sprite(projectilePath));\n p.setSpeed(speed);\n p.setSource(holder);\n p.getCollider().addInteractionLayer(\"Block\");\n p.getCollider().addInteractionLayer(\"Hittable\");\n p.getCollider().addInteractionLayer(\"Walk\");\n p.setOnCollisionListener(other -> {\n if (other.getGameObject() instanceof Player && other.getGameObject() != holder) {\n Player player = (Player) other.getGameObject();\n player.hit(alteredDmg);\n if (GameEngine.DEBUG) {\n System.out.println(\"Bullet Hit \" + other.getName());\n }\n p.destroy();\n\n// player.destroy();\n } else if (other.getGameObject() instanceof Enemy) {\n Enemy e = ((Enemy) other.getGameObject());\n e.hit(alteredDmg);\n if (!e.isAlive()) { // CHeck if enemy survived\n ((Player) p.getSource()).killedEnemy();\n }\n p.destroy();\n } else if (other.getTag() == \"Block\") {\n p.destroy();\n }\n\n });\n return true;\n } else if(ammoRemaining <= 0){\n reloadWeapon();\n return false;\n }else\n return false;\n }", "public boolean isShooting() {\n return shooting;\n }", "public void leftPressNotGround() {\n if(!grounded) {\n if(animation.getDirection() == 1) {\n animation.setDirection(-1);\n } \n if(xSpeed > -5) { \n xSpeed -= AIR; \n }\n else {\n xSpeed = -5;\n }\n }\n }", "public boolean isShotDown(){\n return this.shotDown;\n }", "@Override\n\tpublic void collideWith(Bullet bullet) {\n\t\tbulletMoveForward(bullet);\n\t}", "@Override\n\tpublic void shoot() {\n\t\tthis.fired = true;\n\t\tghost.shot=true;\n\t}", "private void ShootListener() {\n shoot.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (presenter.canShoot()) {\n shoot(presenter.getBullet());\n presenter.checkLastBullet();\n }\n\n }\n });\n }", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "public void drawBullet(){\n if (classOfObejct == 0){\n colorMode(RGB,255,255,255);\n noStroke();\n fill(255,100,30);\n ellipse(posX, posY, 6, 9);\n fill(255,153,51);\n ellipse(posX,posY, 4, 6);\n fill(255,255,100);\n ellipse(posX,posY, 2, 3);\n fill(255,255,200);\n ellipse(posX,posY, 1, 1);\n stroke(1);\n }\n else{\n colorMode(RGB,255,255,255);\n noStroke();\n fill(51,153,255);\n ellipse(posX, posY, 8, 8);\n fill(102,178,255);\n ellipse(posX,posY, 6, 6);\n fill(204,229,255);\n ellipse(posX,posY, 4, 4);\n fill(255,255,255);\n ellipse(posX,posY, 2, 2);\n stroke(1);\n }\n }", "public boolean isProjectile(){\n\t\treturn (getSpeed() != -1);\t\t\n\t}", "public void onImpact() {\n die();\r\n this.getArrow().remove();\r\n }", "public boolean isPushedByFluid() {\n/* 1974 */ return !this.abilities.flying;\n/* */ }", "boolean bulletGrow(Tester t) {\n return t.checkExpect(this.bullet2.grow(), 4) && t.checkExpect(this.bullet4.grow(), 8);\n }", "private void checkBulletWallCollision() {\n\t\tArrayList<Missile> heroMissiles = hero.getMissiles();\n\t\tArrayList<Missile> hero2Missile = computer.getMissiles();\n\n\t\tdouble x1Wall, y1Wall, x2Wall, y2Wall, x1Bullet, y1Bullet, x2Bullet, y2Bullet;\n\t\tboolean left, right, top, bottom;\n\n\t\t// tank 1 bullets and wall collision\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m1 = heroMissiles.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\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\n\t\t// tank 2 bullets and wall collision\n\t\tfor (int i = 0; i < hero2Missile.size(); i++) {\n\t\t\tMissile m1 = hero2Missile.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\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}", "boolean testPlaceBullet(Tester t) {\n return t.checkExpect(bullet1.place(this.em),\n em.placeImageXY(new CircleImage(2, OutlineMode.SOLID, Color.PINK), 250, 300))\n && t.checkExpect(bullet2.place(this.em),\n em.placeImageXY(new CircleImage(2, OutlineMode.SOLID, Color.PINK), 600, 600));\n }", "public void setBullet (boolean flag) {\n\t\tbody.setBullet(flag);\n\t}", "private void tankWillShoot(Graphics2D g2d, GameState state) {\n if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() > 0 && state.getGunType() % 2 == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfCannonBullet(tankObject.getNumOfCannonBullet() - 1);\n if (tankObject.getCannonLevel() == 1) {\n state.getMissiles().add(new Missile(state, 15));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (tankObject.getCannonLevel() == 2) {\n state.getMissiles().add(new Missile(state, 30));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n } else if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() == 0 && state.getGunType() % 2 == 1) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n state.setMouseClicked(false);\n }\n for (Missile missile : state.getMissiles()) {\n missile.paint(g2d, state);\n }\n if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() > 0 && state.getGunType() % 2 == 0) {\n if (numOfRenderBullet1 == 0 && tankObject.getMachineGunLevel() == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 20));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet2 == 0 && tankObject.getMachineGunLevel() == 2) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 30));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet1 <= 7) {\n numOfRenderBullet1++;\n }\n if (numOfRenderBullet1 == 7) {\n numOfRenderBullet1 = 0;\n }\n if (numOfRenderBullet2 <= 3) {\n numOfRenderBullet2++;\n }\n if (numOfRenderBullet2 == 3) {\n numOfRenderBullet2 = 0;\n }\n }\n else if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() == 0 && state.getGunType() % 2 == 0) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n }\n for (Bullet bullet : state.getBullets()) {\n bullet.paint(g2d, state);\n }\n }", "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }", "private void moveBullet() {\r\n\t\tif(bullet != null) {\r\n\t\t\tbullet.move(bulletVelocity, 0);\r\n\t\t}\r\n\t}", "@Override\n public void attack(){\n int xBullet=0,yBullet=0;\n switch(direction){\n case 0:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()*3/4);\n break;\n case 1:\n xBullet=(int)(x+Sprite.python_left.getWidth()*3/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 2:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 3:\n xBullet=(int)(x+Sprite.python_left.getWidth()/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n }\n PythonBullet pythonBullet=new PythonBullet(xBullet,yBullet,board,Player.PLAYER_SPEED*1.5);\n pythonBullet.setDirection(direction);\n board.addBullets(pythonBullet);\n\n }", "private boolean rightDownCollision(InteractiveObject obj){\n\t\treturn ((obj.getX() - this.getX() < this.getWidth()) && (obj.getX() > this.getX()) &&\n\t\t\t\t(obj.getY() - this.getY() < this.getHeight()) && (obj.getY() > this.getY()));\n\t}", "@Override\n\tpublic void canTakeOff() {\n\t\tSystem.out.println(\"I CANNOT TAKE OFF UNLESS YA JUMP ME OVER SOMMAT\");\n\t}", "public boolean isDropped(){\r\n\t\treturn getDirectHolder() == World.world;\r\n\t}", "private void shoot(GObject bottom, GObject bottomLeft, GObject topRight, GObject bottomRight, GObject topLeft) {\r\n\t\t//if(bullet == null && bottom != null && bottomLeft == null && topRight == null && bottomRight == null && topLeft == null) {\r\n\t\t\t{bullet = new GRect(BULLET_WIDTH, BULLET_HEIGHT);\r\n\t\t\tbullet.setFilled(true);\r\n\t\t\tbullet.setColor(Color.green);\r\n\t\t\tif(facingEast == true) {\r\n\t\t\t\tbulletVelocity = BULLET_SPEED;\r\n\t\t\t\tadd(bullet, player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() * 3/5.0);\r\n\t\t\t} else {\r\n\t\t\t\tbulletVelocity = -BULLET_SPEED;\r\n\t\t\t\tadd(bullet, player.getX() - BULLET_WIDTH, player.getY() + player.getHeight() * 3/5.0);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean shoot(float startX, float startY, float touchX, float touchY, int screenX, int screenY) {\n if(!isActive){\n x = (startX+((screenX/5)/2));\n y = (startY+((screenX/10)/2));\n\n LEFT = false;\n BOTTOM = false;\n\n targetX = touchX;\n targetY = touchY;\n\n slopeX = (x/targetX);\n slopeY = (y/targetY);\n\n\n if(targetX < (screenX/2)) {\n LEFT = true;\n }\n\n if(targetY < (screenY/2)) {\n BOTTOM = true;\n }\n\n slope = slopeY/slopeX;\n\n isActive = true;\n return false;\n }\n\n //Bullet is already Active\n return false;\n }" ]
[ "0.77025485", "0.70350647", "0.6953367", "0.68384135", "0.6758094", "0.66886926", "0.66670215", "0.66654116", "0.66572475", "0.6604604", "0.64950275", "0.64846814", "0.6404624", "0.6403432", "0.638786", "0.6381582", "0.6378412", "0.6355559", "0.6345844", "0.62888163", "0.62832534", "0.62768424", "0.6248457", "0.6230187", "0.62096244", "0.6194484", "0.6149665", "0.61466074", "0.61329657", "0.6124389", "0.612058", "0.6120122", "0.61029476", "0.60928655", "0.60916406", "0.6087276", "0.60819703", "0.60754967", "0.6041918", "0.60399365", "0.6010937", "0.599889", "0.5992038", "0.5990754", "0.5984102", "0.595848", "0.59561324", "0.59528667", "0.5948519", "0.59452", "0.5939849", "0.5929911", "0.59283257", "0.5924294", "0.5915977", "0.59115916", "0.59062093", "0.5904328", "0.5889492", "0.5881017", "0.58738965", "0.58729774", "0.5862927", "0.5858437", "0.5857303", "0.5846439", "0.58459336", "0.5845128", "0.5840901", "0.5837185", "0.58311397", "0.58300096", "0.5829448", "0.5820789", "0.5820602", "0.58133066", "0.5810974", "0.5805774", "0.5804449", "0.57964575", "0.579518", "0.579502", "0.5789919", "0.57896674", "0.57883716", "0.5787443", "0.57852966", "0.57834387", "0.57807046", "0.57764834", "0.5772525", "0.57717913", "0.57705694", "0.5770282", "0.57693374", "0.57612085", "0.57602036", "0.57560766", "0.57476646", "0.57437015", "0.57430845" ]
0.0
-1
draw the hitting effects
public void drawHit(){ image(explode[5],posX,posY,10,10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void draw(){\n hit();\n hit();\n }", "int hitGfx();", "@Override\n\tpublic void draw() {\n\t\tbg.draw();\n\t\tfor(Test2 t : test)\n\t\t\tt.draw();\n\t\tfor(Test2 t : test2)\n\t\t\tt.draw();\n\t\t\n\t\tfor(Test2 t : test3)\n\t\t\tt.draw();\n\t\tobj.draw();\n\t\tEffect().drawEffect(1);\n\t}", "private void activeDrawEffects() {\n }", "@Override\n\tpublic void onHit() {\n\t\t\n\t}", "public void drawOn(DrawSurface surface) {\r\n //define the x,y of the upper left point and the widthe and heigt of the rectangle(block).\r\n// double x = this.getCollisionRectangle().getUpperLeft().getX();\r\n// double y = this.getCollisionRectangle().getUpperLeft().getY();\r\n// double height = this.getCollisionRectangle().getHeight();\r\n// double width = this.getCollisionRectangle().getWidth();\r\n// String hitCounteString;\r\n// hitCounteString = Integer.toString(this.hitCounter); // changing the number of hit from int to string.\r\n// if (this.hitCounter == 2) {\r\n// surface.setColor(this.color);\r\n// } else if (this.hitCounter < 2) {\r\n// surface.setColor(this.color.darker());\r\n// } else {\r\n// surface.setColor(this.color.darker());\r\n// }\r\n//// surface.setColor(this.color); // change the color of the surface , rectangle lines(boundries).\r\n// surface.fillRectangle((int) x, (int) y, (int) width, (int) height);\r\n// surface.setColor(Color.black);\r\n// surface.drawRectangle((int) x, (int) y, (int) width, (int) height);\r\n// surface.setColor(Color.black);\r\n// //if the ball hit the block amount of time that made the hit counter to be under zero or equall\r\n// // marked with nothing.\r\n// if (this.hitCounter <= 0) {\r\n// surface.drawText((int) (this.recangle.getUpperLeft().getX()),\r\n// (int) (this.recangle.getUpperLeft().getY()), \"\", 1);\r\n// } else { // else marked the new hit counter.\r\n// surface.setColor(Color.black);\r\n// surface.drawText((int) (this.recangle.getUpperLeft().getX() - 5 + this.recangle.getWidth() / 2),\r\n// (int) (this.recangle.getUpperLeft().getY() + 5 + this.recangle.getHeight() / 2),\r\n// \"\", 15);\r\n// }\r\n//\r\n// if (this.hasText) {\r\n// settext(surface, this.text);\r\n// }\r\n\r\n\r\n Point upperLeft = this.recangle.getUpperLeft();\r\n double width = this.recangle.getWidth();\r\n double height = this.recangle.getHeight();\r\n if (mapImages == null && mapColors == null) {\r\n\r\n //set the color of the block\r\n surface.setColor(this.color);\r\n surface.fillRectangle((int) upperLeft.getX(), (int) upperLeft.getY(), (int) width, (int) height);\r\n return;\r\n }\r\n if (mapImages.containsKey(this.hitCounter - 1)) {\r\n Image image = this.mapImages.get(this.hitCounter - 1);\r\n surface.drawImage((int) this.recangle.getUpperLeft().getX(),\r\n (int) this.recangle.getUpperLeft().getY(), image);\r\n } else if (mapColors.containsKey(this.hitCounter - 1)) {\r\n surface.setColor(mapColors.get(this.hitCounter - 1));\r\n surface.fillRectangle((int) upperLeft.getX(), (int) upperLeft.getY(), (int) width, (int) height);\r\n }\r\n\r\n if ((this.stroke != null)) {\r\n surface.setColor(this.stroke);\r\n surface.drawRectangle((int) upperLeft.getX(), (int) upperLeft.getY(), (int) width, (int) height);\r\n }\r\n //check if count of the hits is under zero:\r\n if (this.hitCounter <= 0) {\r\n return;\r\n }\r\n surface.setColor(Color.white);\r\n\r\n\r\n }", "public void draw() {\r\n\r\n if (this.z == 2) {\r\n //--- Shooting//---\r\n for (Enemy e: this.td.getEnemies()) {\r\n if (e.getX() < this.x + this.size / 2\r\n && e.getX() + e.getSize() > this.x - this.size / 2) {\r\n if (e.getY() < this.y + this.size / 2\r\n && e.getY() + e.getSize() > this.y - this.size / 2) {\r\n if (!this.firing) {\r\n this.firing = true;\r\n this.target = e;\r\n }\r\n } else {\r\n this.firing = false;\r\n }\r\n }\r\n this.firing();\r\n }\r\n }\r\n this.update();\r\n\r\n }", "public void drawPokemon() {\n setAttackText();\n drawImage();\n }", "public void render(float delta, float runTime) {\n Gdx.gl.glClearColor(0, 0, 0, 1);\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\n\n batch.begin();\n// shapeRenderer.begin(ShapeRenderer.ShapeType.Filled);\n// shapeRenderer.setColor(Color.BLUE);\n// shapeRenderer.rect(rabbit.getHitBox().getX(), rabbit.getHitBox().getY(), rabbit.getHitBox().getWidth(), rabbit.getHitBox().getHeight());\n// shapeRenderer.setColor(Color.RED);\n// shapeRenderer.rect(ground1.getHitBox().getX(), ground1.getHitBox().getY(), ground1.getHitBox().getWidth(), ground1.getHitBox().getHeight());\n// shapeRenderer.rect(ground2.getHitBox().getX(), ground2.getHitBox().getY(), ground2.getHitBox().getWidth(), ground2.getHitBox().getHeight());\n// shapeRenderer.setColor(Color.PINK);\n// shapeRenderer.rect(hill1.getHitBox().getX(), hill1.getHitBox().getY(), hill1.getHitBox().getWidth(), hill1.getHitBox().getHeight());\n// shapeRenderer.rect(hill2.getHitBox().getX(), hill2.getHitBox().getY(), hill2.getHitBox().getWidth(), hill2.getHitBox().getHeight());\n// shapeRenderer.setColor(Color.YELLOW);\n// shapeRenderer.rect(hill3.getHitBox().getX(), hill3.getHitBox().getY(), hill3.getHitBox().getWidth(), hill3.getHitBox().getHeight());\n// shapeRenderer.rect(hill4.getHitBox().getX(), hill4.getHitBox().getY(), hill4.getHitBox().getWidth(), hill4.getHitBox().getHeight());\n// shapeRenderer.setColor(Color.PURPLE);\n// shapeRenderer.rect(policeCar1.getHitBox().getX(), policeCar1.getHitBox().getY(), policeCar1.getHitBox().getWidth(), policeCar1.getHitBox().getHeight());\n// shapeRenderer.rect(policeCar2.getHitBox().getX(), policeCar2.getHitBox().getY(), policeCar2.getHitBox().getWidth(), policeCar2.getHitBox().getHeight());\n //Temporary Location\n //drawWater();\n\n drawBackground();\n drawClouds();\n drawWeed();\n drawGround();\n drawHills();\n drawHillBottoms();\n drawHillTops();\n drawPoliceCars();\n drawScore();\n drawEnemies();\n drawRabbit(delta, runTime);\n drawDyingPolice();\n drawBlood();\n drawBackgroundUI();\n drawBlood();\n drawTitle();\n drawPause();\n drawMenuUI();\n drawReady();\n drawRunning();\n drawLeaderBoard();\n drawResuming();\n drawBullets();\n drawHigh();\n //Shitty code to handle rabbit dying and bars showing over score\n if (rabbit.isDead()) {\n drawScore();\n }\n// - shapeRenderer.end();540\n batch.end();\n\n }", "private void drawActivePotionEffects() {\n/* 63 */ int i = this.guiLeft - 124;\n/* 64 */ int j = this.guiTop;\n/* 65 */ int k = 166;\n/* 66 */ Collection<PotionEffect> collection = this.mc.player.getActivePotionEffects();\n/* */ \n/* 68 */ if (!collection.isEmpty()) {\n/* */ \n/* 70 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 71 */ GlStateManager.disableLighting();\n/* 72 */ int l = 33;\n/* */ \n/* 74 */ if (collection.size() > 5)\n/* */ {\n/* 76 */ l = 132 / (collection.size() - 1);\n/* */ }\n/* */ \n/* 79 */ for (PotionEffect potioneffect : Ordering.natural().sortedCopy(collection)) {\n/* */ \n/* 81 */ Potion potion = potioneffect.getPotion();\n/* 82 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 83 */ this.mc.getTextureManager().bindTexture(INVENTORY_BACKGROUND);\n/* 84 */ drawTexturedModalRect(i, j, 0, 166, 140, 32);\n/* */ \n/* 86 */ if (potion.hasStatusIcon()) {\n/* */ \n/* 88 */ int i1 = potion.getStatusIconIndex();\n/* 89 */ drawTexturedModalRect(i + 6, j + 7, 0 + i1 % 8 * 18, 198 + i1 / 8 * 18, 18, 18);\n/* */ } \n/* */ \n/* 92 */ String s1 = I18n.format(potion.getName(), new Object[0]);\n/* */ \n/* 94 */ if (potioneffect.getAmplifier() == 1) {\n/* */ \n/* 96 */ s1 = String.valueOf(s1) + \" \" + I18n.format(\"enchantment.level.2\", new Object[0]);\n/* */ }\n/* 98 */ else if (potioneffect.getAmplifier() == 2) {\n/* */ \n/* 100 */ s1 = String.valueOf(s1) + \" \" + I18n.format(\"enchantment.level.3\", new Object[0]);\n/* */ }\n/* 102 */ else if (potioneffect.getAmplifier() == 3) {\n/* */ \n/* 104 */ s1 = String.valueOf(s1) + \" \" + I18n.format(\"enchantment.level.4\", new Object[0]);\n/* */ } \n/* */ \n/* 107 */ this.fontRendererObj.drawStringWithShadow(s1, (i + 10 + 18), (j + 6), 16777215);\n/* 108 */ String s = Potion.getPotionDurationString(potioneffect, 1.0F);\n/* 109 */ this.fontRendererObj.drawStringWithShadow(s, (i + 10 + 18), (j + 6 + 10), 8355711);\n/* 110 */ j += l;\n/* */ } \n/* */ } \n/* */ }", "public void hit(Graphics g) {\r\n\t\tthis.myDraw(g);\r\n\t\tsuper.loseHealth();\r\n\t\tg.drawImage(sprite,super.X(),super.Y(), null);\r\n\t\tfor(int i = 0; i < spits.size();i++) {\r\n\t\t\tspits.get(i).myDraw(g);\r\n\t\t}\r\n\t}", "public void onHit() {\n //override this to provide extra functionality\n }", "public void draw() {\n if(UPDATE_PHYSICS){\n \n physics.update();\n// physics.update(30);\n \n getCollisionPoints();\n \n removeLostBodies();\n \n for (BObject body : physics.rigidBodies) {\n updateShapes(body);\n }\n \n }\n \n \n // when the camera moves, the renderer restarts\n updateCamActiveStatus();\n if(CAM_ACTIVE || UPDATE_PHYSICS){\n skylight.reset();\n }\n\n // update renderer\n skylight.update();\n \n\n // apply AntiAliasing\n smaa.apply(skylight.renderer.pg_render, pg_aa);\n \n // apply bloom\n if(APPLY_BLOOM){\n filter.bloom.param.mult = 0.15f; //map(mouseX, 0, width, 0, 1);\n filter.bloom.param.radius = 0.5f; // map(mouseY, 0, height, 0, 1);\n filter.bloom.apply(pg_aa, null, pg_aa);\n } \n \n // apply DoF\n if(APPLY_DOF){\n int mult_blur = 5;\n \n geombuffer.update(skylight.renderer.pg_render);\n \n filter.gaussblur.apply(geombuffer.pg_geom, geombuffer.pg_geom, pg_tmp, mult_blur);\n\n dof.param.focus_pos = new float[]{0.5f, 0.5f};\n// dof.param.focus_pos[0] = map(mouseX, 0, width , 0, 1);\n// dof.param.focus_pos[1] = 1-map(mouseY, 0, height, 0, 1);\n dof.param.mult_blur = mult_blur;\n dof.apply(pg_aa, pg_render, geombuffer);\n filter.copy.apply(pg_render, pg_aa);\n }\n \n // display result\n cam.beginHUD();\n {\n background(255);\n noLights();\n image(pg_aa, 0, 0);\n displayCross();\n displayHUD();\n }\n cam.endHUD();\n \n // info\n String txt_fps = String.format(getClass().getName()+ \" [fps %6.2f] [bodies %d]\", frameRate, physics.rigidBodies.size());\n surface.setTitle(txt_fps);\n }", "public void draw() {\r\n PennDraw.clear();\r\n\r\n for (int i = 0; i < targets.length; i++) {\r\n targets[i].draw();\r\n }\r\n\r\n bird.draw(); \r\n\r\n if (mouseWasPressedLastUpdate) {\r\n bird.drawVelocity();\r\n }\r\n\r\n PennDraw.advance();\r\n }", "public void takesHit()\n {\n // TODO: replace this line with your code\n }", "void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}", "public void usa(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(192,0,11);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,0,67);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n //green\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n //green\n fill(192,0,11);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n }", "public void render(Graphics2D g,GameState state) {\n /**\n * information EnemyTank\n */\n AffineTransform tx = new AffineTransform();\n tx.setToTranslation(locX + state.xTransfer - smallEnemyBodyImage.getWidth() / 2 , locY + state.yTransfer - smallEnemyBodyImage.getHeight() / 2);\n tx.rotate(Math.toRadians(tankAngle), 50, 50);\n /**\n * information Enemy Gun\n */\n AffineTransform tx2 = new AffineTransform();\n tx2.setToTranslation(locX + state.xTransfer - smallEnemyGunImage.getWidth() / 5, locY + state.yTransfer - smallEnemyGunImage.getHeight() / 4.2);\n tx2.rotate(Math.toRadians(gunAngle), 20, 20);\n\n\n// Random random = new Random();\n// int angle = random.nextInt(360);\n// System.out.println(angle);\n /**\n * initialize is false\n */\n// if(j == 0)\n// limitMoving = false;\n//\n// if(limitMoving == false)\n// {\n// locX ++ ;\n// j++;\n// }\n// if(j == 100)\n// limitMoving = true;\n// if(limitMoving == true)\n// {\n// locX -- ;\n// j--;\n// }\n\n\n up = false;\n down = false;\n right = false;\n left = false;\n if(Math.abs(state.locX - (locX + state.xTransfer)) < 400 && Math.abs(state.locY - (locY + state.yTransfer)) < 400) {\n if (state.locX >= locX + state.xTransfer ) {\n locX++;\n right = true;\n left = false;\n }\n else {\n locX--;\n left = true;\n right = false;\n }\n\n if (state.locY >= locY + state.yTransfer) {\n locY++;\n up = false;\n down = true;\n }\n else {\n locY--;\n down = false;\n up = true;\n }\n ShapesIntersects shapesIntersects = new ShapesIntersects();\n for (Enemy01 e1 : GameFrame.getEnemyController().getE1()) {\n if (e1.locX != locX || e1.locY != locY) {\n // System.out.println(\"hi\");\n if (shapesIntersects.checkIntersect(locX + state.xTransfer - smallEnemyBodyImage.getWidth() / 2, locY + state.yTransfer - smallEnemyBodyImage.getHeight() / 2, smallEnemyBodyImage.getWidth(), smallEnemyBodyImage.getHeight()\n , e1.locX + state.xTransfer - smallEnemyBodyImage.getWidth() / 2, e1.locY + state.yTransfer - smallEnemyBodyImage.getHeight() / 2, smallEnemyBodyImage.getWidth(), smallEnemyBodyImage.getHeight())) {\n // System.out.println(\"intersects between enemy 01 is True\");\n if (right) {\n locX--;\n right = false;\n }\n if (left) {\n locX++;\n left = false;\n }\n if (up) {\n locY++;\n up = false;\n }\n if (down) {\n locY--;\n down = false;\n }\n }\n }\n }\n if (shapesIntersects.checkIntersect(locX + state.xTransfer - smallEnemyBodyImage.getWidth() / 2, locY + state.yTransfer - smallEnemyBodyImage.getHeight() / 2, smallEnemyBodyImage.getWidth(), smallEnemyBodyImage.getHeight()\n , state.locX - GameFrame.getMyTankImage().getWidth() / 2, state.locY - GameFrame.getMyTankImage().getHeight() / 2, GameFrame.getMyTankImage().getWidth(), GameFrame.getMyTankImage().getHeight()))\n {\n if (right) {\n locX--;\n right = false;\n }\n if (left) {\n locX++;\n left = false;\n }\n if (up) {\n locY++;\n up = false;\n }\n if (down) {\n locY--;\n down = false;\n }\n }\n for (HardWall hW : GameFrame.getWallController().getHardWalls())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2, GameFrame.getMyTankImage().getWidth(), GameFrame.getMyTankImage().getHeight()\n , hW.getLocX() + state.xTransfer, hW.getLocY() + state.yTransfer,hW.getHardWallImage().getWidth() ,hW.getHardWallImage().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n for (SoftWall sW : GameFrame.getWallController().getSoftWalls())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2 + 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2 + 2, GameFrame.getMyTankImage().getWidth() - 5, GameFrame.getMyTankImage().getHeight() - 5\n , sW.getLocX() + state.xTransfer, sW.getLocY() + state.yTransfer,sW.getSoftWall01Image().getWidth() ,sW.getSoftWall01Image().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n for (Teazel teazel : GameFrame.getWallController().getTeazels())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2, GameFrame.getMyTankImage().getWidth(), GameFrame.getMyTankImage().getHeight()\n , teazel.getLocX() + state.xTransfer, teazel.getLocY() + state.yTransfer,teazel.getTeazelImage().getWidth() ,teazel.getTeazelImage().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n for (Enemy02 e2 : GameFrame.getEnemyController().getE2())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2 + 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2 + 2, GameFrame.getMyTankImage().getWidth() - 5, GameFrame.getMyTankImage().getHeight() - 5\n , e2.getLocX() + state.xTransfer, e2.getLocY() + state.yTransfer,e2.getMovingEnemyImage().getWidth() ,e2.getMovingEnemyImage().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n for (Enemy03 e3 : GameFrame.getEnemyController().getE3())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2 + 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2 + 2, GameFrame.getMyTankImage().getWidth() - 5, GameFrame.getMyTankImage().getHeight() - 5\n , e3.getLocX() + state.xTransfer, e3.getLocY() + state.yTransfer,e3.getBigEnemyBodyImage().getWidth() ,e3.getBigEnemyBodyImage().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n\n tankAngle = enemyTankRotation.getAngle(up, down, left, right);\n enemyTankRotation.setTankAngle(tankAngle);\n gunAngle = Math.toDegrees(Math.atan2(state.locY - (locY + state.yTransfer), state.locX - (locX + state.xTransfer)));\n// Random random = new Random();\n// int n = random.nextInt(10);\n// if (n == 3)\n if(i % 50 == 0)\n GameFrame.getBulletController().addBullet(new Enemy01Bullet(locX,locY ,gunAngle,smallEnemyGunImage));\n\n i++;\n // angle = Math.toDegrees(Math.atan2(state.mouseY - state.locY - myTankImage.getHeight() / 2, state.mouseX - state.locX - myTankImage.getWidth() / 2));\n }\n// System.out.println(\"loc x = \" + locX);\n// System.out.println(\"loc y = \" + locY);\n g.drawImage(smallEnemyBodyImage,tx,null);\n g.drawImage(smallEnemyGunImage, tx2, null);\n// System.out.println(\"enemy 01 loc x = \" + locX);\n// System.out.println(\"enemy 01 loc y = \" + locY);\n }", "public void draw(SpriteBatch spriteBatch) {\n if(isMoving) {\n\t\t\t//walkingParticleEffect.scaleEffect(walkingParticleEffectScale);\n walkingParticleEffect.draw(spriteBatch);\n }\n\n spriteBatch.setColor(1, colorValue, colorValue, 1);\n\n if(isMoving) {\n\t\t\tanimation.draw(spriteBatch, hitbox.getX()+xOffset, hitbox.getY()+yOffset, spriteWidth, spriteHeight);\n\t\t} else {\n\t\t\tanimation.drawStaticFrame(spriteBatch, hitbox.getX()+xOffset, hitbox.getY()+yOffset, spriteWidth, spriteHeight);\n\t\t}\n\n\t\tspriteBatch.setColor(1, 1, 1, 1);\n\n if(damaged) {\n \t//gettingHitParticleEffect.scaleEffect(gettingHitParticleEffectScale);\n gettingHitParticleEffect.draw(spriteBatch);\n }\n\n // Draw HP bar\n hpBar.draw(spriteBatch);\n\n /*\n // Debug draw enemie sprite hitbox\n hitboxSprite.draw(spriteBatch);\n\n // Debug draw enemie bullet hitboxes sprite\n for(Sprite bulletHitbox : bulletHitboxSpriteList) {\n \tbulletHitbox.draw(spriteBatch);\n\t\t}\n\n\t\tspriteBatch.draw(mapHitboxSprite, mapHitbox.getX(), mapHitbox.getY(), mapHitbox.getWidth(), mapHitbox.getHeight());\n\t\t*/\n }", "public void uk(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings--england\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n noStroke();\n fill(255);\n rect(15,286,74,20);\n rect(212,284,74,20);\n rect(48,248,20,74);\n rect(233,248,20,74);\n quad(26,272,35,260,83,312,72,320);\n quad(262,260,272,272,229,312,220,318);\n quad(25,318,38,328,85,278,75,263);\n quad(264,324,280,316,228,262,214,274);\n\n fill(207,20,43);\n rect(51,248,15,74);\n rect(235,247,15,74);\n rect(15,289,74,15);\n rect(211,286,74,15);\n\n stroke(1);\n fill(0);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(0,36,125);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //gray\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n\n fill(207,20,43);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n fill(0,36,125);\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n fill(200);\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(0,36,125);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n\n fill(0,36,125);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "public float[] getHitTexCoord();", "public void draw(){\n\t\tif(selected){\n\t\t\timg.draw(xpos,ypos,scale,Color.blue);\n\t\t}else{\n\t\t\timg.draw(xpos, ypos, scale);\n\t\t}\n\t}", "public synchronized void draw()\n\t{\n\t\t// First update the lighting of the world\n\t\t//int x = avatar.getX();\n\t\t//int y = avatar.getY();\t\t\n\n\t\tfor (int x = 0; x < width; x++)\n\t\t{\n\t\t\tfor (int y = 0; y < height; y++)\n\t\t\t{\n\t\t\t\ttiles[x][y].draw(x, y);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = monsters.size() - 1; i >=0; i--)\n\t\t{\n\t\t\tMonster monster = monsters.get(i);\n\t\t\tint x = monster.getX();\n\t\t\tint y = monster.getY();\n\t\t\t\n\t\t\t// Check if the monster has been killed\n\t\t\tif (monster.getHitPoints() <= 0)\n\t\t\t{\n\t\t\t\tmonsters.remove(i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (tiles[x][y].getLit())\n\t\t\t\t\tmonster.draw();\n\t\t\t}\n\t\t}\t\t\n\t\tavatar.draw();\n\t}", "public void renderFlanges(int cons, int tex)\r\n/* 108: */ {\r\n/* 109:106 */ this.context.setTex(tex);\r\n/* 110:108 */ if ((cons & 0x1) > 0)\r\n/* 111: */ {\r\n/* 112:109 */ this.context.setTexFlags(0);\r\n/* 113:110 */ this.context.renderBox(63, 0.25D, 0.0D, 0.25D, 0.75D, 0.125D, 0.75D);\r\n/* 114: */ }\r\n/* 115:112 */ if ((cons & 0x2) > 0)\r\n/* 116: */ {\r\n/* 117:113 */ this.context.setTexFlags(112320);\r\n/* 118:114 */ this.context.renderBox(63, 0.25D, 0.875D, 0.25D, 0.75D, 1.0D, 0.75D);\r\n/* 119: */ }\r\n/* 120:116 */ if ((cons & 0x4) > 0)\r\n/* 121: */ {\r\n/* 122:117 */ this.context.setTexFlags(217134);\r\n/* 123:118 */ this.context.renderBox(63, 0.25D, 0.25D, 0.0D, 0.75D, 0.75D, 0.125D);\r\n/* 124: */ }\r\n/* 125:120 */ if ((cons & 0x8) > 0)\r\n/* 126: */ {\r\n/* 127:121 */ this.context.setTexFlags(188469);\r\n/* 128:122 */ this.context.renderBox(63, 0.25D, 0.25D, 0.875D, 0.75D, 0.75D, 1.0D);\r\n/* 129: */ }\r\n/* 130:124 */ if ((cons & 0x10) > 0)\r\n/* 131: */ {\r\n/* 132:125 */ this.context.setTexFlags(2944);\r\n/* 133:126 */ this.context.renderBox(63, 0.0D, 0.25D, 0.25D, 0.125D, 0.75D, 0.75D);\r\n/* 134: */ }\r\n/* 135:128 */ if ((cons & 0x20) > 0)\r\n/* 136: */ {\r\n/* 137:129 */ this.context.setTexFlags(3419);\r\n/* 138:130 */ this.context.renderBox(63, 0.875D, 0.25D, 0.25D, 1.0D, 0.75D, 0.75D);\r\n/* 139: */ }\r\n/* 140: */ }", "@Override\n\tprotected void draw(Canvas canvas) {\t\tcanvas.setColor(Color.DARK_GREEN);\n\t\tcanvas.drawRectangle(getBounds());\n\t\t\n/*\t\tRectangle originalClipping = canvas.getClipping();\n\t\tcanvas.setClipping(getBounds());\n\t\t\n\t\tTransformation originalTransformation = canvas.getTransformation();\n\n\t\tdrawWorld(new ShadowCanvas(canvas));\n\t\t\n\t\tcanvas.setAlpha(1.0f);\n\t\tcanvas.setTransformation(originalTransformation);\n\t\tcanvas.setClipping(getBounds());\n\t\t\n\t\tdrawWorld(canvas);\n\t\t\n\t\tcanvas.setClipping(originalClipping);\n*/\t}", "void ponderhit();", "public void render(){\r\n if(getLives() >= 10){\r\n StdDraw.picture(super.xCoord,super.yCoord,\"EnemyPurple.png\",super.radius*2,super.radius*2);\r\n }\r\n if(getLives() < 10){\r\n StdDraw.picture(super.xCoord,super.yCoord,\"EnemyPink.png\",super.radius*2,super.radius*2);\r\n }\r\n }", "public void drawScreen(int mouseX, int mouseY, float partialTicks) {\n/* 50 */ super.drawScreen(mouseX, mouseY, partialTicks);\n/* */ \n/* 52 */ if (this.hasActivePotionEffects)\n/* */ {\n/* 54 */ drawActivePotionEffects();\n/* */ }\n/* */ }", "public void drawHealth(int x, int y) {\n pushMatrix();\n translate(x, y);\n scale(0.8f);\n smooth();\n noStroke();\n fill(0);\n beginShape();\n vertex(52, 17);\n bezierVertex(52, -5, 90, 5, 52, 40);\n vertex(52, 17);\n bezierVertex(52, -5, 10, 5, 52, 40);\n endShape();\n fill(255,0,0);\n beginShape();\n vertex(50, 15);\n bezierVertex(50, -5, 90, 5, 50, 40);\n vertex(50, 15);\n bezierVertex(50, -5, 10, 5, 50, 40);\n endShape();\n popMatrix();\n}", "public void drawAction(Graphics g){\n\t\tg.setColor(new Color(192, 192, 192, 200));\n\t\tg.fillRect(0, 0, 1300, 700);\n\t\t\n\t\t//Draws the card that triggered the action(if creature and dead draw red cross)\n\t\tmSource.draw(g);\n\t\tif(mSource.getClass() == Creature.class){\n\t\t\tif(((Creature)mSource).isDead()){\n\t\t\t\tg.setColor(Color.red);\n\t\t\t\tg.drawLine(mSource.getX(), mSource.getY(), mSource.getX() + mSource.getWidth(), mSource.getY() + mSource.getHeight());\n\t\t\t\tg.drawLine(mSource.getX() + mSource.getWidth(), mSource.getY(), mSource.getX(), mSource.getY() + mSource.getHeight());\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Draws all the targets(if dead draw red cross)\n\t\tif(mTargets.size() > 0){\n\t\t\tg.setColor(Color.RED);\n\t\t\tg.fillRect(320, 150, 60, 30);\n\t\t}\n\t\tfor(int i = 0; i < mTargets.size(); i++){\n\t\t\tmTargets.get(i).draw(g);\n\t\t\tif(mTargets.get(i).isDead()){\n\t\t\t\tg.setColor(Color.red);\n\t\t\t\tg.drawLine(mTargets.get(i).getX(), mTargets.get(i).getY(), mTargets.get(i).getX() + mTargets.get(i).getWidth(), mTargets.get(i).getY() + mTargets.get(i).getHeight());\n\t\t\t\tg.drawLine(mTargets.get(i).getX() + mTargets.get(i).getWidth(), mTargets.get(i).getY(), mTargets.get(i).getX(), mTargets.get(i).getY() + mTargets.get(i).getHeight());\n\t\t\t}\n\t\t}\n\t}", "public void paintComponent(Graphics g) {\n super.paintComponent(g);\n Graphics2D g2d = (Graphics2D)g;\n\n\n g.setColor(Color.black);\n g2d.drawRect(clock_x, clock_y, clock_width, clock_height);\n Font fontClock = new Font(\"Courier\", Font.PLAIN, 130);\n g.setFont(fontClock);\n g.drawString(Long.toString(gameClock.displayTime()), clock_x, clock_y + clock_height);\n \n //enemy area\n //g.setColor(Color.black);\n //g2d.drawRect(enemy_x, enemy_y, enemy_width, enemy_height);\n if(enemyImage != null) {\n g2d.drawImage(enemyImage,\n enemy_x, enemy_y, enemy_width+enemy_x, enemy_height+enemy_y,\n 0, 0, enemyImage.getWidth(null),\n enemyImage.getHeight(null), null); \n } else {\n System.out.println(\"Enemy image is null\");\n }\n \n //draw targets\n for(target t : targets) {\n g.setColor(t.getColor());\n Ellipse2D.Double targ = new Ellipse2D.Double(t.get_x(), t.get_y(), t.get_diam(), t.get_diam());\n g2d.fill(targ);\n //g.drawRect(t.get_x(), t.get_y(), t.get_diam(), t.get_diam());\n Ellipse2D.Double hitCircle = new Ellipse2D.Double(t.get_x() - target_radius / 2, t.get_y() - target_radius / 2, t.get_diam() + target_radius, t.get_diam() + target_radius);\n g2d.draw(hitCircle);\n }\n\n //draw bullet holes\n for(bulletHole b : bullets) {\n //translate circle so that it\n //displays at correct coordinates\n //double translation = Math.sqrt(2 * (Math.pow(bullet_diam / 2, 2)));\n double translation = bullet_diam / 2;\n g.setColor(bulletHole);\n Ellipse2D.Double hole = new Ellipse2D.Double(b.get_x() - translation, b.get_y() - translation, b.get_diam(), b.get_diam());\n g2d.fill(hole);\n }\n\n //end of game\n //... or next round\n switch(end_round()) {\n case(1):\n g.setColor(Color.black);\n g.setFont(new Font(\"Narkisim\", Font.PLAIN, 150));\n current_round++;\n g.drawString(\"Round \"+current_round, 253, 350);\n refreshAll(false);\n break;\n \n case(2):\n g.setColor(Color.black);\n g.setFont(new Font(\"Narkisim\", Font.PLAIN, 135));\n g.drawString(\"You Lose!\", 240, 350);\n \n g.setColor(Color.black);\n Font fontPlayAgain = new Font(\"Mool Boran\", Font.PLAIN, 20);\n g.setFont(fontPlayAgain);\n g.drawString(\"Right Click to play again!\", 400, 400);\n //show score\n //then prompt to replay\n break;\n \n default:\n break;\n }\n }", "@Override\n protected void beforeDraw(UI ui, PGraphics pg) {\n pointLight(0, 0, 40, model.cx, model.cy, LengthUnit.FOOT.toMillimetres(-20L));\n pointLight(0, 0, 50, model.cx, model.yMax + LengthUnit.FOOT.toMillimetres(10L), model.cz);\n pointLight(0, 0, 20, model.cx, model.yMin - LengthUnit.FOOT.toMillimetres(10L), model.cz);\n //hint(ENABLE_DEPTH_TEST);\n }", "public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "public void draw() {\t\t\n\t\ttexture.draw(x, y);\n\t\tstructure.getTexture().draw(x,y);\n\t}", "public void draw()\n {\n Rectangle hatbox = new Rectangle(x, y, 20, 20);\n hatbox.fill();\n Rectangle brim = new Rectangle(x-10, y+20, 40, 0);\n brim.draw();\n Ellipse circle = new Ellipse (x, y+20, 20, 20);\n circle.draw();\n Ellipse circle2 = new Ellipse (x-10, y+40, 40, 40);\n circle2.draw();\n Ellipse circle3 = new Ellipse (x-20, y+80, 60, 60);\n circle3.draw();\n \n }", "public void render () {\n\t\tcam.update();\n\t\tbatch.setProjectionMatrix(cam.combined);\n\t\trenderBackground();\n\t\t/*shapeRender.setProjectionMatrix(cam.combined);\n\t\tshapeRender.begin(ShapeRenderer.ShapeType.Line);\n\t\tshapeRender.ellipse(world.trout.hitBox.x, world.trout.hitBox.y, world.trout.hitBox.width, world.trout.hitBox.height);\n\t\tshapeRender.circle(world.hook.circleBounds.x, world.hook.circleBounds.y, world.hook.circleBounds.radius);\n\t\tshapeRender.point(world.trout.position.x, world.trout.position.y, 0f);*/\n\t\trenderObjects();\n\t\t\n\t}", "public void draw() {\n if (you.health() > 0 | lives >= 0) {\n if (aliens.isEmpty()) {\n win();\n }\n if (you.health() <= 0 & lives >= 0) {\n die();\n }\n \n you.act();\n \n if (fire & you.getWeapon() == Weapon.WEAPON_GOD) {\n for (Dot d : you.fire()) {\n this.moreBullets(d);\n }\n }\n for (Dot d : lazers){d.update(); d.draw(page);}\n for (Dot d : bullets) {d.update(); d.draw(page);}\n for (Alien loop : aliens) {\n loop.act();\n if (Math.random() > .993) {\n for (Dot d : loop.fire())\n lazers.add(d);\n }\n loop.draw(page);\n }\n \n if (collisionCheck() | fl) {\n flash();\n fl = !fl;\n }\n \n int index1 = 0, index2 = 0, size1 = bullets.size(), size2 = aliens.size();\n for (Alien al : aliens) {\n index2 = 0;\n while (index2 < size1) {\n if (al.collide(bullets.get(index2))) {\n bullets.remove(index2);\n size1--;\n score += 10;\n }\n index2++;\n }\n }\n\n index1 = 0; size1 = aliens.size();\n while (index1 < size1) {\n if (aliens.get(index1).health() <= 0) {\n aliens.remove(index1);\n index1--;\n size1--;\n score += 25;\n }\n index1++;\n }\n \n for (Dot d : lazers) {\n if (d.getX() < 0 | d.getX() > 512 | d.getY() < 0 | d.getY() > 496) {\n d.deactivate();\n }\n }\n index1 = 0; size1 = lazers.size();\n while (index1 < size1) {\n if (!lazers.get(index1).isActive()) {\n lazers.remove(index1);\n size1--;\n index1--;\n }\n index1++;\n }\n \n for (Dot d : bullets) {\n if (d.getX() < 0 | d.getX() > 512 | d.getY() < 0 | d.getY() > 512) {\n d.deactivate();\n }\n }\n index1 = 0; size1 = bullets.size();\n while (index1 < size1) {\n if (!bullets.get(index1).isActive()) {\n bullets.remove(index1);\n size1--;\n index1--;\n }\n index1++;\n }\n \n for (int i = 0; i < lives; i++) {\n page.drawImage(you.getImage(), i*20, 496, 16, 16, null);\n }\n page.setColor(Color.white);\n page.drawString(\"\" + you.health(), 420, 509);\n page.drawString(\"\" + score, 450, 509);\n you.draw(page);\n }\n else {\n lose();\n }\n }", "public void syria(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(206,17,38);//red\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(0);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,122,61);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,122,61);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,122,61);//green\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(206,17,38);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(0);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n\n fill(206,17,38);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "public void draw(){\n }", "public void draw() {\n \n }", "public void draw() {\n }", "public void draw() {\n \n // TODO\n }", "public void paint(Graphics g){\n super.paint(g);\n Graphics2D g2d = (Graphics2D) g;\n g.setColor(Color.WHITE);\n for(int i = 0; i < ROWS; i++){\n g.drawLine(0, i * HEIGHT / ROWS - 1, \n WIDTH, i * HEIGHT / ROWS - 1);\n g.drawLine(0, i * HEIGHT / ROWS - 2, \n WIDTH, i * HEIGHT / ROWS - 2);\n }\n for (int i = 0; i <= COLS; i++) {\n g.drawLine(i * Game.getWindowWidth() / Game.getCols(), 0,\n i * Game.getWindowWidth() / Game.getCols(), HEIGHT);\n g.drawLine(i * Game.getWindowWidth() / Game.getCols() - 1, 0,\n i * Game.getWindowWidth() / Game.getCols() - 1, HEIGHT);\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paintShadow(g2d);\n }\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paint(g2d);\n }\n }\n \n for(Ball b : balls) {\n b.paint(g2d);\n }\n g2d.setColor(Color.BLACK);\n //segment at the top\n g2d.drawLine(0, 0, WIDTH, 0);\n g2d.drawLine(0, 1, WIDTH, 1);\n g2d.drawLine(0, 2, WIDTH, 2);\n //segment at the bottom\n g2d.drawLine(0, HEIGHT, WIDTH, HEIGHT);\n g2d.drawLine(0, HEIGHT + 1, WIDTH, HEIGHT + 1);\n g2d.drawLine(0, HEIGHT + 2, WIDTH, HEIGHT + 2);\n \n for(Point p : corners){\n g2d.drawOval(p.x, p.y, 3, 3);\n }\n\n if(aimStage){\n //draw the firing line\n g2d.setColor(lineColor);\n drawFatPath(g2d, startX, startY, endX, endY);\n g2d.setColor(arrowColor);\n drawArrow(g2d);\n }\n if(mouseHeld){\n// drawFatPath(g, Ball.restPositionX, HEIGHT - Ball.diameter, \n// getEndPoint().x, getEndPoint().y);\n }\n }", "public void drawDebug(){\n debugRenderer.setProjectionMatrix(cam.combined);\n debugRenderer.begin(ShapeRenderer.ShapeType.Line);\n\n for (Object e : world.getEnemies()) {\n Enemy enemy = (Enemy)e;\n Rectangle rect = enemy.getBounds();\n float x1 = rect.x;\n float y1 = rect.y;\n debugRenderer.setColor(new Color(1, 0, 0, 1));\n debugRenderer.rect(x1, y1, rect.width, rect.height);\n }\n\n for(Bullet b : world.getPlayer().getWeapon().getBullets()) {\n Rectangle rect = b.getBounds();\n float x1 = rect.x;\n float y1 = rect.y;\n debugRenderer.setColor(new Color(1, 0, 0, 1));\n debugRenderer.rect(x1, y1, rect.width, rect.height);\n }\n\n for(Enemy e : world.getEnemies()) {\n for(Bullet b : e.getWeapon().getBullets()){\n Rectangle rect = b.getBounds();\n float x1 = rect.x;\n float y1 = rect.y;\n debugRenderer.setColor(new Color(1, 0, 0, 1));\n debugRenderer.rect(x1, y1, rect.width, rect.height);\n }\n }\n\n Player player = world.getPlayer();\n Rectangle rect = player.getBounds();\n float x1 = rect.x;\n float y1 = rect.y;\n debugRenderer.setColor(new Color(0, 1, 0, 1));\n debugRenderer.rect(x1, y1, rect.width, rect.height);\n debugRenderer.end();\n }", "public void draw();", "public void draw();", "public void draw();", "public void render() {\r\n\t\tif ((this instanceof Turtles && ((Turtles) this).isAboveWater()) || !(this instanceof Turtles)) {\r\n\t\t\timage.drawCentered(xCoordinate, yCoordinate);\r\n\t\t}\r\n\t}", "public void drawButton(Minecraft p_146112_1_, int p_146112_2_, int p_146112_3_)\n {\n if (this.visible)\n {\n FontRenderer fontrenderer = p_146112_1_.fontRendererObj;\n p_146112_1_.getTextureManager().bindTexture(ThemeRegistry.curTheme().guiTexture());\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n this.hovered = p_146112_2_ >= this.xPosition && p_146112_3_ >= this.yPosition && p_146112_2_ < this.xPosition + this.width && p_146112_3_ < this.yPosition + this.height;\n int k = this.getHoverState(this.hovered);\n GlStateManager.enableBlend();\n GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);\n GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);\n \n GlStateManager.pushMatrix();\n float sh = height/20F;\n float sw = width >= 196? width/200F : 1F;\n float py = yPosition/sh;\n float px = xPosition/sw;\n GlStateManager.scale(sw, sh, 1F);\n \n if(width > 200) // Could use 396 but limiting it to 200 this makes things look nicer\n {\n \tGlStateManager.translate(px, py, 0F); // Fixes floating point errors related to position\n \tthis.drawTexturedModalRect(0, 0, 48, k * 20, 200, 20);\n } else\n {\n \tthis.drawTexturedModalRect((int)px, (int)py, 48, k * 20, this.width / 2, 20);\n \tthis.drawTexturedModalRect((int)px + width / 2, (int)py, 248 - this.width / 2, k * 20, this.width / 2, 20);\n }\n \n GlStateManager.popMatrix();\n \n this.mouseDragged(p_146112_1_, p_146112_2_, p_146112_3_);\n int l = 14737632;\n\n if (packedFGColour != 0)\n {\n l = packedFGColour;\n }\n else if (!this.enabled)\n {\n l = 10526880;\n }\n else if (this.hovered)\n {\n l = 16777120;\n }\n \n String txt = this.displayString;\n \n if(fontrenderer.getStringWidth(txt) > width) // Auto crop text to keep things tidy\n {\n \tint dotWidth = fontrenderer.getStringWidth(\"...\");\n \ttxt = fontrenderer.trimStringToWidth(txt, width - dotWidth) + \"...\";\n }\n \n this.drawCenteredString(fontrenderer, txt, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l);\n }\n }", "public void draw() {\n\n }", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "void draw();", "void hitBall() {\n \n System.out.println(this.golfBall.vel_vector.x + \",\"\n + this.golfBall.vel_vector.y + \",\"\n + this.golfBall.acc_vector.x + \",\"\n + this.golfBall.acc_vector.y);\n \n if (this.golfBall.stopped) {\n new Sound(\"resources/hit.wav\").play();\n this.golfBall.stopped = false;\n this.golfBall.acc(this.strokeAcc.x, this.strokeAcc.y);\n this.strokes += 1;\n }\n \n }", "@Override\r\n\tpublic void draw(Batch batch, float alpha) {\r\n\t\tbatch.setProjectionMatrix(camera.combined);\r\n\t\theroHealth.draw(batch);\r\n\t\tcover.draw(batch);\r\n\t}", "public void Hit()\n {\n this.numLives--;\n //Oscillate visible and not if the number of lives is greater than zero\n if(this.numLives > 0)\n {\n this.damaged = true;\n this.Blink(1);\n\n }\n }", "public void draw(Canvas canvas){\n for(AttackObject attack : attacks){\n attack.draw(canvas);\n }\n }", "@Override\r\n\tpublic void render(float delta) {\n\t\tGdx.gl.glClearColor(0f, 0f, 0f, 1);\r\n\t\tGdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r\n\t\tbatch.setProjectionMatrix(camera.combined);\r\n\t\ttweenManager.update(delta);\r\n\t\tbatch.begin();\r\n\t\tif(isrendereffect)\r\n\t\t\tballspell.render(batch, delta);\r\n\t\tbatch.end();\r\n\t\t\r\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "public void draw() {\n\tbackground(bg_count); // set background to something\n\tbg_count = bg_count + bg_dir;\n\tif (bg_count >= 255) {\n\t bg_dir = -1;\n\t} else if (bg_count <= 0) {\n\t bg_count = 0;\n\t bg_dir = 1;\n\t}\n\tellipse_x = ellipse_x + ellipse_x_dir;\n\tellipse_y = ellipse_y - ellipse_y_dir;\n\n\tif (ellipse_x > width) {\n\t ellipse_x_dir = -1;\n\t ellipse_x = width - 1;\n\t} else if (ellipse_x < 0) {\n\t ellipse_x_dir = 1;\n\t ellipse_x = 0;\n\t}\n\tif (ellipse_y > height) {\n\t ellipse_y_dir = -1;\n\t ellipse_y = height - 1;\n\t} else if (ellipse_y < 0) {\n\t ellipse_y_dir = 1;\n\t ellipse_y = 0;\n\t}\n\n\tfill(0, 64, 0);\n\t// x y w h\n\trect(400, 300, 200, 100);\n\n\tfill(212, 111, 249);\n\t\n\tstrokeWeight(4.0f);\n\n\t// x y r1 r2 // can set to mouseX, mouseY\n\tellipse(ellipse_x, ellipse_y, 30, 30);\n\n\t// some draw methods associated with PApplet:\n\t// background(int)\n\t// stroke(int, int, int)\n\t// fill(int)\n\t// ellipse(x, y, radius_1, radius_2)\n\t// noFill()\n\n\t// text(str, x, y)\n }", "public void draw(Graphics g){\n if (isEmpty()) {\n g.setColor(new Color(255, 204, 204));\n g.fillRect(getXGraphic(), getYGraphic(), 120, 120);\n g.setColor(Color.BLACK);\n if (getIndication()){\n g.setColor(new Color(0, 0, 0, 100));\n g.fillRect(getXGraphic(), getYGraphic(),120,120);\n }\n if (getTargetable()){\n g.setColor(new Color(0, 0, 255));\n g.drawRect(getXGraphic(), getYGraphic(),120,120);\n }\n\n g.drawRect(getXGraphic(), getYGraphic(), 120, 120);\n } else {\n enemy.draw(getXGraphic(), getYGraphic() ,g, getIndication());\n\n //Draw blue square around if it is a targetable space\n if (getTargetable()){\n g.setColor(new Color(0, 0, 255));\n g.drawRect(getXGraphic(), getYGraphic(),120,120);\n }\n }\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "void render() {\n smooth();\n for (int x = 0; x < yvalues.length; x++) {\n noStroke();\n fill(0,0,255,100);\n ellipseMode(CENTER);\n ellipse(x*xspacing,yvalues[x],16,16);\n }\n }", "public void drawBullet(){\n if (classOfObejct == 0){\n colorMode(RGB,255,255,255);\n noStroke();\n fill(255,100,30);\n ellipse(posX, posY, 6, 9);\n fill(255,153,51);\n ellipse(posX,posY, 4, 6);\n fill(255,255,100);\n ellipse(posX,posY, 2, 3);\n fill(255,255,200);\n ellipse(posX,posY, 1, 1);\n stroke(1);\n }\n else{\n colorMode(RGB,255,255,255);\n noStroke();\n fill(51,153,255);\n ellipse(posX, posY, 8, 8);\n fill(102,178,255);\n ellipse(posX,posY, 6, 6);\n fill(204,229,255);\n ellipse(posX,posY, 4, 4);\n fill(255,255,255);\n ellipse(posX,posY, 2, 2);\n stroke(1);\n }\n }", "static void drawPop(){\n\t\tif (currentStage[currentSlice-1]>3)\n\t\t{\n\t\t\tfloat x1,y1;\n\t\t\tint N = pop.N;\n\n\t\t\tfor (int i=0;i<N;i++)\n\t\t\t{\n\t\t\t\tBalloon bal;\n\t\t\t\tbal = (Balloon)(pop.BallList.get(i));\n\t\t\t\tint n = bal.XX.length;\n\n\t\t\t\t// filtering (for testing purposes)\n\t\t\t\tboolean isToDraw = true;\n\t\t\t\tBalloon B0 = ((Balloon)(pop.BallList.get(i)));\n\t\t\t\tB0.mass_geometry();\n\t\t\t\tif (pop.contacts != null)\n\t\t\t\t{\n\t\t\t\t\tfor (int k=0;k<B0.n0;k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (pop.contacts[i][k] == -1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisToDraw = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// draw\n\t\t\t\tshape.setWindingRule(0);\n\t\t\t\tif (isToDraw)\n\t\t\t\t{\n\t\t\t\t\tPolygonRoi Proi = B0.Proi;\n\t\t\t\t\tProi.setStrokeColor(Color.red);\n\t\t\t\t Proi.setStrokeWidth(3);\n\t\t\t\t OL.add(Proi);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void renderLivingAt(EntityBat p_77039_1_, double p_77039_2_, double p_77039_4_, double p_77039_6_)\n {\n super.renderLivingAt(p_77039_1_, p_77039_2_, p_77039_4_, p_77039_6_);\n }", "@Override\r\n public void draw() {\n }", "@Override\n public void drawHoverAttack(int x, int y, Graphics g, JointMap jointMap) {\n drawHoverAttackSingleHelper(x, y, g, jointMap);\n }", "int hit();", "public void draw() {\n p.pushMatrix(); // save old visual style for other sprites\n p.translate(pos.x, pos.y); \n if (localpen) p.image(pen.get(0,0,p.width,p.height),p.width/2-pos.x, p.height/2-pos.y);\n if (visible) {\n // locked left-right rotation\n if (((direction%360<=270) & (direction%360>=90)) & rotationStyle==rotationStyle_leftRight) p.scale(-1.0f,1.0f);\n if (rotationStyle==rotationStyle_allAround) p.rotate(p.radians(-direction));\n if (ghostEffect > 0) {\n int calculatedAlpha = (int)p.map(ghostEffect,100,0,0,255);\n \n int[] alpha = new int[costumes.get(costumeNumber).width*costumes.get(costumeNumber).height];\n for (int i=0; i<alpha.length; i++) {\n // only fade non-zero pixels; 0 is full-transparency\n if (costumes.get(costumeNumber).pixels[i]!=0) alpha[i]=calculatedAlpha;\n }\n costumes.get(costumeNumber).mask(alpha);\n }\n p.image(costumes.get(costumeNumber), 0, 0, costumes.get(costumeNumber).width*(size/100),\n costumes.get(costumeNumber).height*(size/100));\n }\n p.popMatrix(); // restore default visual style\n }", "private void drawT(int[] xPoints,int[] yPoints,boolean condition){\r\n if(condition)\r\n g.setColor(Color.red); \r\n else\r\n g.setColor(Color.gray); \r\n g.fillPolygon(xPoints,yPoints,3);\r\n g.setColor(Color.black);\r\n g.drawPolygon(xPoints,yPoints,3); \r\n }", "@Override\n public void draw()\n {\n }", "private void paintHand3(Graphics2D gfx)\r\n {\n \r\n }", "public void paint(Graphics g) {\n\t\tfor(int i = 0; i < handler.object.size(); i++){\r\n\t\t\tObjectsInGame tempObject = handler.object.get(i);\r\n\t\t\tif(tempObject.getId() == IDOfObjects.Paddle1)\r\n\t\t\t\tg.setColor(Color.blue);\r\n\t\t\telse\r\n\t\t\tif(tempObject.getId() == IDOfObjects.Paddle2)\r\n\t\t\t\tg.setColor(Color.green);\r\n\t\tg.fillRect(x, y, 100, 15);\r\n\t\t\r\n\t\t}\r\n\r\n\t}", "void hitEvent(Block beingHit, Ball hitter);", "void hitEvent(Block beingHit, Ball hitter);", "public void render(){\n ui.stroke(255,140,0);\r\n Random rand = new Random();\r\n int value1 = rand.nextInt(255);\r\n int value2 = rand.nextInt(255);\r\n int value3 = rand.nextInt(255);\r\n int value4 = rand.nextInt(255);\r\n ui.fill(value1,value2,value3,value4);\r\n ui.rect(x + 75 ,y + 380,200,40);\r\n String Text = \"TARGET ACQUIRED\";\r\n ui.textSize(18);\r\n ui.fill(255, 0, 0);\r\n ui.text(Text, x + 95 ,y + 407);\r\n\r\n //Create Target Aimer\r\n ui.noFill();\r\n ui.stroke(255,0,0);\r\n ui.ellipse(x + width / 2, y + height / 2, radius, radius);\r\n\r\n radius = radius + 1;\r\n if(radius>=150){\r\n radius *= -1;\r\n }\r\n }", "@Override\n\tpublic void draw() {\n\t}", "public void draw(Graphics2D g) {\n \t switch(id){\n \t case NORMAL:\n \t g.drawImage(img,getX(),getY(),2*getWidth(),2*getHeight(),null);\n\t Graphics2D graphics = (Graphics2D)g.create();\n \t graphics.setColor(Color.red);\n \t graphics.fill3DRect(getX()+10,getY()-10,health,10,true);\n \t graphics.dispose();\n \t break;\n \t case BOSS:\n \t g.drawImage(img,getX(),getY(),getWidth(),getHeight(),null);\n\t Graphics2D graphics = (Graphics2D)g.create();\n \t graphics.setColor(Color.red);\n \t graphics.fill3DRect(getX()+10,getY()-10,health,10,true);\n \t graphics.dispose();\n \t\t break;\n \t }\n \t}", "public void draw() {\n\t\t\tfloat[] vertices = new float[mVertices.size()];\n\t\t\tfor (int i = 0; i < vertices.length; i++)\n\t\t\t\tvertices[i] = mVertices.get(i);\n\t\t\t\n\t\t\tfloat[] textureCoords = null;\n\t\t\tif (mTextureID != 0) {\n\t\t\t\ttextureCoords = new float[mTextureCoords.size()];\n\t\t\t\tfor (int i = 0; i < textureCoords.length; i++)\n\t\t\t\t\ttextureCoords[i] = mTextureCoords.get(i);\n\t\t\t}\n\t\t\t\n\t\t\tshort[] indices = new short[mIndices.size()];\n\t\t\tfor (int i = 0; i < indices.length; i++)\n\t\t\t\tindices[i] = mIndices.get(i);\n\t\t\t\n\t\t\t// Get OpenGL\n\t\t\tGL10 gl = GameGraphics2D.this.mGL;\n\t\t\t\n\t\t\t// Set render state\n\t\t\tgl.glDisable(GL10.GL_LIGHTING);\n\t\t\tgl.glEnable(GL10.GL_DEPTH_TEST);\n\t\t\tgl.glEnable(GL10.GL_BLEND);\n\n\t\t\tif (mBlendingMode == BLENDING_MODE.ALPHA)\n\t\t\t\tgl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);\n\t\t\telse if (mBlendingMode == BLENDING_MODE.ADDITIVE)\n\t\t\t\tgl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE);\n\t\t\t\n\t\t\tif (mTextureID != 0)\n\t\t\t\tgl.glEnable(GL10.GL_TEXTURE_2D);\n\t\t\telse\n\t\t\t\tgl.glDisable(GL10.GL_TEXTURE_2D);\n\t\t\t\n\t\t\t// Draw the batch of textured triangles\n\t\t\tgl.glColor4f(Color.red(mColour) / 255.0f,\n\t\t\t\t\t\t Color.green(mColour) / 255.0f,\n\t\t\t\t\t\t Color.blue(mColour) / 255.0f,\n\t\t\t\t\t\t Color.alpha(mColour) / 255.0f);\n\t\t\t\n\t\t\tif (mTextureID != 0) {\n\t\t\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID);\n\t\t\t\tgl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, GameGraphics.getFloatBuffer(textureCoords));\n\t\t\t}\n\t\t\t\n\t\t\tgl.glVertexPointer(3, GL10.GL_FLOAT, 0, GameGraphics.getFloatBuffer(vertices));\n\t\t\tgl.glDrawElements(GL10.GL_TRIANGLES, indices.length,\n\t\t\t\t\tGL10.GL_UNSIGNED_SHORT, GameGraphics.getShortBuffer(indices));\n\t\t}", "public Shapes draw ( );", "private void hitGraphic(GObject element) {\r\n\t\tfor(int i = 0; i < 10; i++) {\r\n\t\t\telement.setVisible(true);\r\n\t\t\tmoveGame();\r\n\t\t\telement.setVisible(false);\r\n\t\t\tmoveGame();\r\n\t\t\telement.setVisible(true);\r\n\t\t}\r\n\t}", "public void draw() {\r\n\t\tif (active_)\r\n\t\t\tGlobals.getInstance().getCamera().drawImageOnHud(posx_, posy_, currentImage());\r\n\t}", "@Override\n public void draw() {\n }", "public void render() {\n float theta = velocity.heading2D() + radians(90);\n\n\n fill(255, 0, 0);\n stroke(255, 0, 0);\n strokeWeight(0.5f);\n pushMatrix();\n translate(position.x, position.y);\n rotate(theta);\n beginShape(QUAD);\n fill(255, 0, 0);\n vertex(r, -r*2);\n\n vertex(-r, -r*2);\n vertex(-r, r*2);\n vertex(r, r*2);\n\n endShape();\n beginShape(TRIANGLES);\n vertex(-r, -r*2);\n vertex(r, -r*2);\n vertex(0, -r*4);\n endShape();\n beginShape(TRIANGLES);\n vertex(-r, r*5);\n vertex(r, r*5);\n vertex(0, r*2);\n endShape();\n fill(0);\n stroke(255);\n fill(255);\n strokeWeight(1.7f*r);\n\n point(0, -r*2.5f);\n stroke(0);\n fill(0);\n strokeWeight(0.75f*r);\n point(0, -r*2.5f);\n\n\n popMatrix();\n textSize(6+(this.kidsHad/2));\n textMode(CENTER);\n stroke(0);\n text(\" g:\"+this.gen+\"/\"+kidsHad + \"/id: \" + (this.id+1), this.position.x, this.position.y);\n }", "public void draw() {\n\t\t/* Clear Screen */\n\t\tGdx.graphics.getGL20().glClearColor(1,1,1,0);\n\t\tGdx.graphics.getGL20().glClear( GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT );\n\n\t\t/* Iterate through draw list */\n\t\tIterator<ArrayList<Drawable>> iter = this.drawlist.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tArrayList<Drawable> layer = iter.next();\n\t\t\t/* Sort the layer. */\n\t\t\tCollections.sort(layer, new DrawableComparator());\n\t\t\t/* Iterate through the layer. */\n\t\t\tIterator<Drawable> jter = layer.iterator();\n\t\t\twhile(jter.hasNext()) {\n\t\t\t\tDrawable drawable = jter.next();\n\t\t\t\tif (drawable.isDead()) {\n\t\t\t\t\tjter.remove(); //Remove if dead.\n\t\t\t\t}//fi\n\t\t\t\telse {\n\t\t\t\t\tdrawable.draw(this, this.scalar); //Draw the drawable.\n\t\t\t\t}//else\n\t\t\t}//elihw\n\t\t}//elihw\n\t}", "private void drawActions() {\n\t\tif (state.getSelectedEntity() == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tAction [] actions = state.isSelectedFront() ? state.getSelectedEntity().getActions() : state.getSelectedEntity().getSwapActions();\n\t\tfor (int i = 0; i < actions.length; i++) {\n\t\t\tactions[i].render(batch, 500 + 25 * i, 800);\n\n\t\t\t// Do we draw the cursor here?\n\t\t\tif (state.getActionCursorPos() == i) {\n\t\t\t\tcursor.setPosition(500 + 25 * i, 900);\n\t\t\t\tcursor.draw(batch);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public void draw()\r\n {\n\r\n }", "public void render() {\r\n Color geneColor=null;\r\n\r\n if(isChanged) {\r\n this.removeChild(predRect);\r\n predRect = new PPath();\r\n\r\n if(type == SegmentInfo.TYPE_AUTO) predRect.setPathTo(new RoundRectangle2D.Double(startx,0.0,endx - startx,(double)this.PREDICTION_RECT_HEIGHT, 10, 10));\r\n else if(type == SegmentInfo.TYPE_MANUAL) predRect.setPathTo(new RoundRectangle2D.Double(startx,0.0,endx - startx,(double)this.PREDICTION_RECT_HEIGHT, 0, 0));\r\n\r\n if(this.isSelected()) {\r\n if(this.sign < 0) geneColor = this.SELECTED_DOWN_COLOR;\r\n else geneColor = this.SELECTED_UP_COLOR;\r\n }\r\n else {\r\n if(this.sign < 0) geneColor = this.DOWN_COLOR;\r\n else geneColor = this.UP_COLOR;\r\n }\r\n\r\n predRect.setPaint(geneColor);\r\n this.addChild(predRect);\r\n isChanged=false;\r\n }\r\n }", "@Override\n public void onDrawFrame(GL10 gl) {\n Log.i(\"kike\", \"onDrawFrame\");\n if (effectContext == null) {\n effectContext = EffectContext.createWithCurrentGlContext();\n }\n if (effect != null) {\n effect.release();\n }\n ////////////////////////////Efecte//////////////////////////\n //noEffect();\n //autofixEffect(fxValue); // ok\n //backdropperEffect(); // no probat\n //bitmapoverlayEffect(); // no probat\n //blackwhiteEffect(100, 150); // ok, ... :(\n brightnessEffect(fxValue); // ok\n //contrastEffect(fxValue); // ok\n //cropEffect(); // no probat\n //crossprocessEffect(); // ok\n //documentaryEffect(); // ok\n //duotoneEffect(); // no probat\n //filllightEffect(fxValue); // ok\n //fisheyeEffect(fxValue); // ok\n //flipEffect(false, false); // ok\n //grainEffect(fxValue); // l'efecte que fa no es massa bo\n //grayScaleEffect(); // ok\n //lomoishEffect(); // ok\n //negativeEffect(); // ok\n //posterizeEffect(); // ok\n //redeyeEffect(); // no probat\n //rotateEffect(fxValue); // error\n //saturateEffect(fxValue); // ok\n //sepiaEffect(); // ok\n //sharpenEffect(fxValue); // l'efecte que fa no es massa bo\n //straightenEffect(fxValue); // ok, retalla la imatge tambe\n //temperatureEffect(fxValue); // ok\n //tintEffect(); // no probat\n //vignetteEffect(fxValue); // nomes fa forma rodona i negra??\n ////////////////////////////Efecte//////////////////////////\n square.draw(textures[1]);\n }", "public void draw(Canvas canvas){\n canvas.drawBitmap(bitmap, hitBox.left, hitBox.top, null);\n\n /*\n Paint testing=new Paint();//draw a blue bounding box where the bitmap should be\n testing.setColor(Color.BLUE);\n testing.setAlpha(25);\n testing.setStrokeWidth(2);\n canvas.drawRect(hitBox,testing);\n */\n }", "public void beginDrawing();", "public void hit() {\n if (explodeTime == 0) {\n if (isExplosive) {\n region = explodeAnimation.getKeyFrame(explodeTime, false);\n explodeTime += Gdx.graphics.getDeltaTime();\n width = region.getRegionWidth();\n height = region.getRegionHeight();\n position.sub(width / 2, height / 2);\n direction = new Vector2(1, 0);\n explosionSound.play();\n } else {\n impactSound.play();\n active = false;\n }\n }\n }", "public void highlightEnemy(int i, boolean clear) {\n\n if(clear)\n clearBorders();\n\n switch(i) {\n\n case 1:\n findViewById(R.id.eslot1).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#FF00FF00\")));\n break;\n case 2:\n findViewById(R.id.eslot2).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#FF00FF00\")));\n break;\n case 3:\n findViewById(R.id.eslot3).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#FF00FF00\")));\n break;\n case 4:\n findViewById(R.id.eslot4).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#FF00FF00\")));\n break;\n }\n\n findViewById(R.id.eslot1).refreshDrawableState();\n findViewById(R.id.eslot2).refreshDrawableState();\n findViewById(R.id.eslot3).refreshDrawableState();\n findViewById(R.id.eslot4).refreshDrawableState();\n }", "public void russia(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(165,0,0);//gray\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(0);//black\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(18,39,148);//blue\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //red\n fill(194,24,11);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n fill(194,24,11);\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n\n fill(194,24,11);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(160,0,0);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "void render(GraphicsContext gc, double xOffSet, double yOffSet);" ]
[ "0.7932528", "0.69288486", "0.6695407", "0.6537239", "0.64236206", "0.63823146", "0.63237584", "0.62659854", "0.62526953", "0.6250104", "0.6167511", "0.6122047", "0.6109809", "0.6070854", "0.60532403", "0.6051217", "0.6035637", "0.6026396", "0.60241306", "0.5986354", "0.5968953", "0.59445333", "0.59262675", "0.5912073", "0.5910528", "0.5889941", "0.588018", "0.5875782", "0.5872556", "0.58708566", "0.586909", "0.5868444", "0.5867384", "0.5853823", "0.5843233", "0.58284503", "0.58199936", "0.5813638", "0.58057606", "0.58037126", "0.579473", "0.57776463", "0.5771199", "0.5770429", "0.576758", "0.57627755", "0.57627755", "0.57627755", "0.57539463", "0.5747683", "0.5732954", "0.5727472", "0.5718958", "0.5718958", "0.57168275", "0.5710853", "0.5708181", "0.57070345", "0.57047975", "0.5699942", "0.5682254", "0.5682254", "0.5682207", "0.56807035", "0.5680267", "0.5680267", "0.56745154", "0.56617326", "0.5655302", "0.5651966", "0.5650053", "0.564069", "0.56386423", "0.56362987", "0.563281", "0.56289065", "0.562385", "0.5621625", "0.56202424", "0.56202424", "0.56161994", "0.5614489", "0.56055355", "0.5600777", "0.5595318", "0.55925214", "0.559209", "0.55914694", "0.55688864", "0.55669385", "0.55631834", "0.5562114", "0.55603", "0.5558436", "0.5556709", "0.5555199", "0.55550337", "0.55541813", "0.55508953", "0.5546899" ]
0.7647113
1
decide if the bullet hit the object
public boolean hitObject(BasicObject obj){ if(abs(obj.posX - posX) < obj.wid/ 2 && abs(obj.posY - posY) < obj.hei/ 2){ return true; } else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void bulletCollisionWithObject() {\r\n\t\tif(bullet != null) {\r\n\t\t\tGObject collider = getElementAt(bullet.getX() -1 , bullet.getY() + 1);\r\n\t\t\tif (dragon1 != null && collider == dragon1) {\r\n\t\t\t\thit(dragon1);\r\n\t\t\t}\r\n\t\t\tif(dragon2 != null && collider == dragon2) {\r\n\t\t\t\thit(dragon2);\r\n\t\t\t}\r\n\t\t\tif(mehran != null && collider == mehran && bullet.getY() > mehran.getY() + mehran.getHeight() / 2.0) {\r\n\t\t\t\thit(mehran);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean hit(Bullet bullet) {\n //System.out.println(\"A golyo nem csapodott meg be semmibe.\");\n return false;\n }", "@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}", "public boolean isHit() { return hit; }", "private void checkForBulletCollisions() {\r\n\t\tbulletMoveOffScreen();\r\n\t\tbulletCollisionWithObject();\r\n\t}", "public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}", "public Bullet getHitBullet() {\n\t\treturn hitBullet;\n\t}", "boolean wasHit();", "static boolean willCollideWithMe(BulletInfo bullet) {\n\t\tMapLocation myLocation = rc.getLocation();\n\n\t\t// Get relevant bullet information\n\t\tDirection propagationDirection = bullet.dir;\n\t\tMapLocation bulletLocation = bullet.location;\n\n\t\t// Calculate bullet relations to this robot\n\t\tDirection directionToRobot = bulletLocation.directionTo(myLocation);\n\t\tfloat distToRobot = bulletLocation.distanceTo(myLocation);\n\t\tfloat theta = propagationDirection.radiansBetween(directionToRobot);\n\n\t\t// If theta > 90 degrees, then the bullet is traveling away from us and we can break early\n\t\tif (Math.abs(theta) > Math.PI/2) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// distToRobot is our hypotenuse, theta is our angle, and we want to know this length of the opposite leg.\n\t\t// This is the distance of a line that goes from myLocation and intersects perpendicularly with propagationDirection.\n\t\t// This corresponds to the smallest radius circle centered at our location that would intersect with the\n\t\t// line that is the path of the bullet.\n\t\tfloat perpendicularDist = (float)Math.abs(distToRobot * Math.sin(theta)); // soh cah toa :)\n\n\t\treturn (perpendicularDist <= rc.getType().bodyRadius);\n\t}", "public abstract boolean isHit(int x, int y);", "boolean testIsTouchingBullet(Tester t) {\n return t.checkExpect(\n this.bullet9.isTouching(new Bullet(7, Color.PINK, new MyPosn(1, 150), this.p7, 2)), false)\n && t.checkExpect(bullet3.isTouching(ship4), true)\n && t.checkExpect(bullet3.isTouching(ship5), true)\n && t.checkExpect(bullet3.isTouching(ship6), true)\n && t.checkExpect(bullet3.isTouching(ship7), true)\n && t.checkExpect(bullet1.isTouching(ship7), false)\n && t.checkExpect(bullet1.isTouching(ship8), false)\n && t.checkExpect(bullet4.isTouching(ship9), true)\n && t.checkExpect(bullet5.isTouching(ship9), false);\n }", "Velocity hit(Ball hitter, Point collisionPoint, Velocity currentVelocity);", "public void gotHit(Bullet bullet) {\n\t\tif (bullet.getOwner() != this) {\n\t\t\tDefaultModeScoring.addHitScore(bullet.getOwner());\n\t\t\tAudioManager.startAudio(bullet.getSoundName());\n\t\t\tif (!isDead())\n\t\t\t\tAudioManager.startAudio(getSoundName());\n\t\t\tsetHp(getHp() - bullet.getDamage());\n\t\t\tif (bullet.getSpeed().x() > 0)\n\t\t\t\tgetPush().setX(getPush().x() + bullet.getPush());\n\t\t\telse\n\t\t\t\tgetPush().setX(getPush().x() - bullet.getPush());\n\t\t\tif (getHp() <= 0 && !isDead())\n\t\t\t\tdie();\n\t\t}\n\t}", "public boolean isProjectile();", "boolean testIsTouchingBulletBullet(Tester t) {\n return t.checkExpect(bullet3.isTouchingBullet(bullet6), false)\n && t.checkExpect(bullet6.isTouchingBullet(bullet6), false);\n }", "public boolean hit(float[] bInfo){\n\t\tfloat bx=bInfo[0],by=bInfo[1],xpd=bInfo[2],ypd=bInfo[3];\r\n int sx = (int)bx,sy=(int)by,ex=(int)(bx+xpd),ey=(int)(by+ypd);\r\n //print(\"shot in your area \" + commu.getAddr());\r\n /*float PX = xPos,PY=yPos;\r\n double opme = angleBP(sx,sy,(int)PX,(int)PY);\r\n double shotang = angleBP(sx,sy,ex,ey);\r\n //println(\" difang \" + opme + \" ashot\" + shotang);\r\n double angle = min(min(abd(opme-shotang),abd(opme+(2*Math.PI)-shotang)),abd(opme-((2*Math.PI)+shotang)));\r\n double distance = DBP((int)PX,(int)PY,sx,sy)*Math.sin((float)angle);\r\n //println(\"distance to bullet path \" + distance + \" angle \" + angle + \" hyp \" + DBP((int)PX,(int)PY,sx,sy));\r\n if(distance<10){\r\n \treturn true; \r\n }\r\n return false;*/\r\n if((sx>xPos && sx < xPos+size) || (ex>xPos && ex< xPos+size)){\r\n \tif((sy>yPos && sy < yPos+size) || (ey>yPos && ey< yPos+size)){\r\n \treturn true;\r\n }\r\n }\r\n return false;\r\n }", "float shouldAggroOnHit(IGeneticMob geneticMob, EntityLiving attacker);", "public void takesHit()\n {\n // TODO: replace this line with your code\n }", "@Override\n public void update(Bullet b){\n if(!(b.getData() instanceof DriverBulletData)){\n hit(b);\n return;\n }\n\n float hitDst = 7f;\n\n DriverBulletData data = (DriverBulletData) b.getData();\n\n //if the target is dead, just keep flying until the bullet explodes\n if(data.to.isDead()){\n return;\n }\n\n float baseDst = data.from.distanceTo(data.to);\n float dst1 = b.distanceTo(data.from);\n float dst2 = b.distanceTo(data.to);\n\n boolean intersect = false;\n\n //bullet has gone past the destination point: but did it intersect it?\n if(dst1 > baseDst){\n float angleTo = b.angleTo(data.to);\n float baseAngle = data.to.angleTo(data.from);\n\n //if angles are nearby, then yes, it did\n if(Mathf.angNear(angleTo, baseAngle, 2f)){\n intersect = true;\n //snap bullet position back; this is used for low-FPS situations\n b.set(data.to.x + Angles.trnsx(baseAngle, hitDst), data.to.y + Angles.trnsy(baseAngle, hitDst));\n }\n }\n\n //if on course and it's in range of the target\n if(Math.abs(dst1 + dst2 - baseDst) < 4f && dst2 <= hitDst){\n intersect = true;\n } //else, bullet has gone off course, does not get recieved.\n\n if(intersect){\n data.to.handlePayload(b, data);\n }\n }", "public boolean wasHit() {\n return(_hit);\n }", "public boolean isOverhit()\n\t{\n\t\treturn overhit;\n\t}", "boolean testDrawBullet(Tester t) {\n return t.checkExpect(bullet1.draw(), new CircleImage(2, OutlineMode.SOLID, Color.pink))\n && t.checkExpect(bullet2.draw(), new CircleImage(2, OutlineMode.SOLID, Color.pink));\n }", "boolean testPlaceBullet(Tester t) {\n return t.checkExpect(bullet1.place(this.em),\n em.placeImageXY(new CircleImage(2, OutlineMode.SOLID, Color.PINK), 250, 300))\n && t.checkExpect(bullet2.place(this.em),\n em.placeImageXY(new CircleImage(2, OutlineMode.SOLID, Color.PINK), 600, 600));\n }", "private void checkOnHit(View v) {\n float bulletX = v.getX();\n float bulletY = v.getY();\n float ufoX = ufo.getX();\n float ufoY = ufo.getY();\n\n if (presenter.checkOnHit(bulletX, bulletY, ufoX, ufoY)) {\n presenter.increasePoint();\n presenter.updatePoints();\n v.setVisibility(View.INVISIBLE);\n }\n }", "public boolean IsBullet()\r\n {\r\n return this.isBullet;\r\n }", "Velocity hit(Ball hitter, Point collisionPoint,\r\n Velocity currentVelocity);", "public boolean hitObject(BasicObject oppose){\n if (oppose.classOfObejct != classOfObejct){\n if (abs(posX - oppose.posX) < (wid / 2 + oppose.wid/2) && abs(posY - oppose.posY) < (hei / 2 + oppose.hei/2)){\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "public void onBulletHit(BulletHitEvent event) {\n RobotReference hitRobot;\n hitRobot = robots.get(event.getName());\n\n if (hitRobot.isTeammate()) {\n setTurnRight(90);\n setAhead(400);\n setChargerTarget();\n }\n }", "public abstract boolean collisionWith(CollisionObject obj);", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "@Override\n\tpublic void collideWith(Bullet bullet) {\n\t\tbulletMoveForward(bullet);\n\t}", "public void isShooting(GameContainer gc) throws LineUnavailableException{\r\n\t\tif(gc.getInput().isKeyPressed(Input.KEY_SPACE) || gc.getInput().isKeyPressed(Input.KEY_UP)){\r\n\t\t\tif(!this.bullet.isMoved()){\r\n\t\t\t\tthis.playSound();\r\n\t\t\t\tanimation = this.shooting;\r\n\t\t\t\tthis.bullet.position.x = super.getShape().getCenterX();\r\n\t\t\t\tthis.bullet.position.y = super.getShape().getCenterY();\r\n\t\t\t\tthis.getBullet().setMoved(true);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.getBullet().isMoved()){\r\n\t\t\tthis.bullet.move();\r\n\t\t}\r\n\t}", "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "public boolean canHit(Figure entity) {\n return true;\n }", "private void checkBulletWallCollision() {\n\t\tArrayList<Missile> heroMissiles = hero.getMissiles();\n\t\tArrayList<Missile> hero2Missile = computer.getMissiles();\n\n\t\tdouble x1Wall, y1Wall, x2Wall, y2Wall, x1Bullet, y1Bullet, x2Bullet, y2Bullet;\n\t\tboolean left, right, top, bottom;\n\n\t\t// tank 1 bullets and wall collision\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m1 = heroMissiles.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\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\n\t\t// tank 2 bullets and wall collision\n\t\tfor (int i = 0; i < hero2Missile.size(); i++) {\n\t\t\tMissile m1 = hero2Missile.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\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}", "public abstract boolean hit(Rectangle2D r);", "public void defensive_act()\r\n\t{\r\n\t\tBullet closestBullet = IMAGINARY_BULLET;\r\n\t//\tBullet secondClosestBullet = IMAGINARY_BULLET;\r\n\t\t\r\n\t\tActor machines;\r\n\t\tEnumeration<Actor> opponent = ((MachineInfo)data.get(TankFrame.PLAYER_1)).getHashtable().elements();\r\n\t\twhile(opponent.hasMoreElements())\r\n\t\t{\r\n\t\t\tmachines = (Actor) opponent.nextElement();\r\n\t\t\tif(machines instanceof Bullet)\r\n\t\t\t{\r\n\t\t\t\tif(machines.getPoint().distance(getPoint()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t{\r\n\t\t\t\t\tclosestBullet = (Bullet)machines;\r\n\t\t\t\t\tLine2D aim = new Line2D.Double(getCenterX(), getCenterY(), closestBullet.getPosX(), closestBullet.getPosY() );\r\n\t\t\t\t\tSystem.out.println(aim.getP1().distance(aim.getP2()));\r\n\t\t\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t\t\taimAndShoot(aim);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t/*\tif(machines.getPoint().distance(getPoint()) > secondClosestBullet.getPoint().distance(getPoint()) \r\n\t\t\t\t\t&& machines.getPoint().distance(getPoint()) < closestBullet.getPoint().distance(getPoint()))\r\n\t\t\t\t\tsecondClosestBullet = (Bullet)machines;*/\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 * Find the line\r\n\t\t */\r\n\t\t/*if(!closestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), closestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(getCenterX(), getCenterY(), (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\t/*bulletPath = new Line2D(getRightPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\tbulletPath = new Line2D(getPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);*/\r\n\t\t\t\r\n\t\t//}\r\n\t/*\tif(!secondClosestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), secondClosestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t}*/\r\n\r\n\t}", "boolean testIsTouchingILoGamePieceBullet(Tester t) {\n return t.checkExpect(bullet9.isTouching(los3), true)\n && t.checkExpect(bullet1.isTouching(los3), false)\n && t.checkExpect(bullet9.isTouching(lob3), false);\n }", "Bullet(int posX,int posY,int velX,int velY,int classOfObejct,int attack){\n this.posX = posX;\n this.posY = posY;\n this.velX = velX;\n this.velY = velY;\n this.classOfObejct = classOfObejct;\n this.attack = attack;\n\n }", "public boolean isHitFree()\n {\n // TODO: replace this line with your code\n }", "private boolean hitMyPaddle() {\n if (b.numX - 60 <= 0) {\n if ((b.numY <= (this.touchedY + 260)) && (b.numY >= (this.touchedY - 260))) {\n } else {\n this.wentOffWall();\n }\n return true;\n } else {\n return false;\n }\n }", "@Override\n public <T extends VectorSprite> boolean collide(T object1, GraphicsObject object2) {\n double xDistance, yDistance;\n\n xDistance = this.getHitCenterX() + object1.getRadius() / 2 - Math.max(object2.getxPos(), Math.min(this.getHitCenterX() + object1.getRadius() / 2, object2.getxPos() + object2.getWidth()));\n yDistance = this.getHitCenterY() + object1.getRadius() / 2 - Math.max(object2.getyPos(), Math.min(this.getHitCenterY() + object1.getRadius() / 2, object2.getyPos() + object2.getHeight()));\n\n return (xDistance * xDistance + yDistance * yDistance) < (object1.getRadius() / 2 * object1.getRadius() / 2);\n }", "public abstract void collide(InteractiveObject obj);", "private void checkCollision()\n {\n if (gameOverBool==false)\n { \n Actor a = getOneIntersectingObject(Wall.class);\n if (a != null||isAtEdge())\n {\n setImage(\"gone.png\");//laat de helicopter verdwijnen\n //greenfoot.GreenfootSound.stop(\"helisound.wav\");\n World world = getWorld();\n world.addObject(new Explosion(), getX(), getY());\n Greenfoot.playSound(\"heliExplosion.wav\");\n world.addObject( new Gameover(), 600, 300 );\n gameOverBool = true; \n }\n } \n }", "public boolean hitObject(Object object, DrawInfo2D range)\n {\n return child.hitObject(object, range);\n }", "public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Paramos tudo o que estamos fazendo.\n\t\tstop();\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\n\t\t// Giramos a arma na direção do disparo\n\t\tdouble turnGunAmt = Utils.normalRelativeAngleDegrees(e.getBearing() + getHeading() - getGunHeading());\n\t\tturnGunRight(turnGunAmt);\n\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\t\tback(400); // Recuamos\n\t}", "public void trackBullets(){\n for (int i = 0; i < bullets.size(); i++){\n Bullet tempBullet = bullets.get(i);\n //update the position of the bullets\n tempBullet.update();\n tempBullet.drawBullet();\n //check if the bullet hit the boundary, remove the bullet from the list of the bullet\n if(tempBullet.detectBound()){\n bullets.remove(i);\n continue;\n }\n //detect if the bullet hit the boss and cause the damage if yes\n if(tempBullet.hitObject(Main.boss) && Main.boss.alive){\n Main.boss.decreaseHealth(attack);\n tempBullet.drawHit();\n bullets.remove(i);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n }\n }\n //detect if the bullet hit the enemy and cause the damage if yes\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n if(tempBullet.hitObject(tempEnemy) && tempEnemy.alive){\n tempBullet.drawHit();\n tempEnemy.decreaseHealth(attack);\n // if enemy is totally hitted, wait one 1s, and then removed\n if(tempEnemy.health <= 0){\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n }\n bullets.remove(i);\n break;\n }\n }\n }\n }", "public void detectCollisionPerBullet() {\n//\t\tfor (Bullet bullet : bulletList) {\n\t\tfor (int i=0; i<bulletList.size(); i++) {\n\t\t\tBullet bullet = bulletList.get(i);\n\t\t\tif (bullet != null && !bullet.isDead()) {\n\t\t\t\tdetectCollision(bullet);\n\t\t\t}\n\t\t}\n\t}", "public boolean getHit() {\r\n\t\treturn hit;\r\n\t}", "public void collideWith(Rigidbody obj) {\n\t\t\r\n\t}", "public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }", "public void checkForDeath()\n {\n Bullet2 bullet2 = new Bullet2(getVelocity(), getRotation());\n myWorld2 world = (myWorld2)getWorld();\n Zombie2 zombie = new Zombie2();\n \n if (isTouching(Bullet2.class))\n {\n health -= bullet2.damage;\n \n if(health < 0)\n {\n world.score(2);\n world.removeObject(this);\n } \n }\n else if (getX() == 900) \n {\n world.score(-1);\n world.removeObject(this);\n } \n }", "HitEnemy checkHits(@NotNull List<Bullet> bullets, Bitmap hitEnemyImage) {\n for (Bullet b : bullets) {\n int enemyXCoordinate = x();\n int enemyYCoordinate = y();\n int enemyWidth = this.getBitmap().getWidth();\n int enemyHeight = this.getBitmap().getHeight();\n\n int bulletXCoordinate = b.x();\n int bulletYCoordinate = b.y();\n int bulletWidth = b.getBitmap().getWidth();\n int bulletHeight = b.getBitmap().getHeight();\n\n // Standard rectangular bitmap intersection formula\n // (Good enough up to +/- the corner pixels, which are not\n // noticeable in the game)\n if (enemyXCoordinate + enemyWidth >= bulletXCoordinate\n && bulletXCoordinate + bulletWidth >= enemyXCoordinate\n && enemyYCoordinate + enemyHeight >= bulletYCoordinate\n && bulletYCoordinate + bulletHeight >= enemyYCoordinate) {\n b.markForRemoval();\n this.markForRemoval();\n\n return new HitEnemy(this.x(), this.y() - 34, hitEnemyImage);\n }\n }\n\n return null;\n }", "public boolean isCollision(Ball ob) { // Kollisionsabfrage\r\n\t\t\r\n\t\tdX = posX - ob.getPosX();\r\n\t\tdY = posY - ob.getPosY();\r\n\t\tfloat vector = dX * dX + dY * dY;\r\n\t\tfloat hypo = radius * radius * 4;\r\n\t\tif (hypo >= vector) {\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 boolean isBullet () {\n\t\treturn body.isBullet();\n\t}", "boolean testIsTouchingShipBullet(Tester t) {\n return t.checkExpect(bullet3.isTouchingShip(ship12), true)\n && t.checkExpect(bullet3.isTouchingShip(ship13), true)\n && t.checkExpect(bullet3.isTouchingShip(ship14), true)\n && t.checkExpect(bullet3.isTouchingShip(ship15), true)\n && t.checkExpect(bullet1.isTouchingShip(ship15), false)\n && t.checkExpect(bullet1.isTouchingShip(ship16), false);\n }", "@Override\n public boolean checkCollideSingle(GameObject gameObject, int x, int y) {\n if (!(gameObject instanceof Player) || !isAlive())\n return false;\n\n boolean result = super.withinRange(x, y);\n\n if (result) {\n if (prev + (hitInterval * 10) < System.currentTimeMillis()) {\n prev = System.currentTimeMillis();\n startHitTime = prev + 300;\n startHit = true;\n }\n }\n\n if (result) {\n if (startHitTime < System.currentTimeMillis() && startHit) {\n HUD.getInstance().removeHealth(getDamage());\n setStatus(PlayerStatus.FIGHTING);\n startHit = false;\n }\n }\n\n return result;\n }", "private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}", "@Override\n\tpublic Bullet shoot(int hx, int hy) {\n\t\treturn null;\n\t}", "public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Replace the next line with any behavior you would like\n\t\t\n\t}", "@Override\n public void checkCollision( Sprite obj )\n {\n\n }", "public boolean collidesWith(ICollider other);", "@Override\n public Actor hit(float x, float y, boolean touchable) {\n return super.hit(x, y, touchable);\n }", "@Override\n public void checkCollision( Sprite obj )\n {\n \n }", "public boolean shooting(){\n\t\t\tif(x==tmp || x==tmp1 || x==tmp2 || x == tmp3){\n\t\t\t\treturn true; \n\t\t\t}\n\t\t\telse \n\t\t\t\treturn false; \n\t}", "public boolean shoot() {\n if (!isReloading && System.currentTimeMillis() - previousShotTime > shootInterval * 1000 && ammoRemaining > 0) {\n\n previousShotTime = System.currentTimeMillis();\n\n ammoRemaining--;\n audioPlayer.setSpatial(holder);\n audioPlayer.playOnce();\n // score -= 50;\n Vec2 angle = Vec2\n .Vector2FromAngleInDegrees(transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread));\n\n Vec2 spawnPosition = transform.getWorldPosition();\n\n Projectile p = new Projectile(spawnPosition,\n Vec2\n .Vector2FromAngleInDegrees(\n transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread)),\n new Sprite(projectilePath));\n p.setSpeed(speed);\n p.setSource(holder);\n p.getCollider().addInteractionLayer(\"Block\");\n p.getCollider().addInteractionLayer(\"Hittable\");\n p.getCollider().addInteractionLayer(\"Walk\");\n p.setOnCollisionListener(other -> {\n if (other.getGameObject() instanceof Player && other.getGameObject() != holder) {\n Player player = (Player) other.getGameObject();\n player.hit(alteredDmg);\n if (GameEngine.DEBUG) {\n System.out.println(\"Bullet Hit \" + other.getName());\n }\n p.destroy();\n\n// player.destroy();\n } else if (other.getGameObject() instanceof Enemy) {\n Enemy e = ((Enemy) other.getGameObject());\n e.hit(alteredDmg);\n if (!e.isAlive()) { // CHeck if enemy survived\n ((Player) p.getSource()).killedEnemy();\n }\n p.destroy();\n } else if (other.getTag() == \"Block\") {\n p.destroy();\n }\n\n });\n return true;\n } else if(ammoRemaining <= 0){\n reloadWeapon();\n return false;\n }else\n return false;\n }", "@Test\n\tpublic void testCollideMeteorWithBullet() {\n\t\tfinal MeteorImpl meteorimpl = new MeteorImpl(new Pair<>(0,0), 1, 1, LENGTH, ID.METEOR);\n\t\tfinal BulletImpl bulletplayer = new BulletImpl(0, 0, ID.PLAYER_BULLET);\n\t\tmeteorimpl.collide(bulletplayer);\n\t\tassertFalse(meteorimpl.isDead());\n\t\tmeteorimpl.collide(bulletplayer);\n\t\tmeteorimpl.collide(bulletplayer);\n\t\tassertTrue(meteorimpl.isDead());\t\n\t}", "@Override\n \tpublic Actor hit(float x, float y) {\n \t\treturn null;\n \t}", "public boolean checkHit(Rectangle r){\n\t\t\tif (exists){\n\t\t\t\tif(this.intersects(r) || this.contains(r)){\n\t\t\t\t\thealth -= 1; //reduces the curret health\n\t\t\t\t\tif (health == 0) {\n\t\t\t\t\t\texists = false;\n\t\t\t\t\t\tstartboomtimer = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tstartredtimer = true; //starts the red animation\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse return false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "void hitEvent(Block beingHit, Ball hitter);", "void hitEvent(Block beingHit, Ball hitter);", "public void Hit()\n {\n this.numLives--;\n //Oscillate visible and not if the number of lives is greater than zero\n if(this.numLives > 0)\n {\n this.damaged = true;\n this.Blink(1);\n\n }\n }", "public boolean isHit(Point p){\n if(super.getLocation().equals(p)){\n nunMissiles = 0;\n return true;\n } else {\n return false;\n }\n }", "boolean testIsTouchingBulletShip(Tester t) {\n return t.checkExpect(ship4.isTouchingBullet(bullet6), true)\n && t.checkExpect(ship5.isTouchingBullet(bullet6), true)\n && t.checkExpect(ship6.isTouchingBullet(bullet6), true)\n && t.checkExpect(ship7.isTouchingBullet(bullet6), true)\n && t.checkExpect(ship7.isTouchingBullet(bullet7), false)\n && t.checkExpect(ship8.isTouchingBullet(bullet7), false);\n }", "@Override\n\tpublic void onHit() {\n\t\t\n\t}", "public boolean isProjectile(){\n\t\treturn (getSpeed() != -1);\t\t\n\t}", "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }", "public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }", "void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }", "boolean testMoveBullet(Tester t) {\n return t.checkExpect(bullet1.move(),\n new Bullet(2, Color.PINK, new MyPosn(250, 292), new MyPosn(0, -8), 1))\n && t.checkExpect(bullet2.move(),\n new Bullet(2, Color.PINK, new MyPosn(650, 650), new MyPosn(50, 50), 1));\n }", "public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }", "public boolean shoot(float startX, float startY, float touchX, float touchY, int screenX, int screenY) {\n if(!isActive){\n x = (startX+((screenX/5)/2));\n y = (startY+((screenX/10)/2));\n\n LEFT = false;\n BOTTOM = false;\n\n targetX = touchX;\n targetY = touchY;\n\n slopeX = (x/targetX);\n slopeY = (y/targetY);\n\n\n if(targetX < (screenX/2)) {\n LEFT = true;\n }\n\n if(targetY < (screenY/2)) {\n BOTTOM = true;\n }\n\n slope = slopeY/slopeX;\n\n isActive = true;\n return false;\n }\n\n //Bullet is already Active\n return false;\n }", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "public boolean tileReachObjectives(float xTile, float yTile)\r\n/* 122: */ {\r\n/* 123:136 */ return (!tileInBounds(xTile, yTile)) || \r\n/* 124:137 */ (this.reach[((int)xTile)][((int)yTile)] != 0);\r\n/* 125: */ }", "void checkCollision(Entity other);", "public abstract void collideWith(Entity entity);", "private void hit(GObject element) {\r\n\t\tremove(bullet);\r\n\t\tbullet = null;\r\n\t\thitGraphic(element);\r\n\t\tif(element == dragon1) {\r\n\t\t\tlifeArray[DRAGON_ONE]--;\r\n\t\t\tif(lifeArray[DRAGON_ONE] < 1) {\r\n\t\t\t\tremove(dragon1);\r\n\t\t\t\tdragon1 = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(element == dragon2) {\r\n\t\t\tlifeArray[DRAGON_TWO]--;\r\n\t\t\tif(lifeArray[DRAGON_TWO] < 1) {\r\n\t\t\t\tremove(dragon2);\r\n\t\t\t\tdragon2 = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(element == mehran) {\r\n\t\t\tlifeArray[MEHRAN]--;\r\n\t\t\tif(lifeArray[MEHRAN] < 1) {\r\n\t\t\t\tremove(mehran);\r\n\t\t\t\tmehran = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void checkForBounce()\n {\n if (isTouching(mid.class)){\n \n bounce = 1;\n \n \n }\n \n \n \n \n if (getY() <= 0 || getY() >= getWorld().getHeight() -1 )\n {\n \n dY = -dY;\n \n }\n \n \n if(isTouching(Pad1.class )){\n \n if (bounce == 1){\n \n \n Greenfoot.playSound(\"paddleHit.wav\"); \n dX = -dX;\n bounce = 0;\n change(); \n }\n \n \n }\n \n \n \n }", "@Override\n protected void doCheckEffect ()\n {\n List<LivingEntity> entities = getLivingEntities(1.5);\n if (entities.size() > 0)\n {\n for (LivingEntity entity : entities)\n {\n if (entity.getUniqueId() == player.getUniqueId())\n continue;\n\n entity.damage(usesModifier * 2, player);\n\n kill();\n return;\n }\n }\n\n // if the spell has hit a solid block, the projectile is stopped and wont go further so kill the spell\n if (hasHitTarget())\n kill();\n }", "public float hit(Projectile projectile) {\n float scoreReturned = 0;\n float velocity;\n int timesHit;\n\n if (projectile.getDestroys().contains(getType())) {\n velocity = projectile.getLinearVelocity().length();\n\n if (velocity >= 80) {\n timesHit = 3;\n } else if (velocity >= 60) {\n timesHit = 2;\n } else {\n timesHit = 1;\n }\n\n for (int i = 0; i < timesHit; i++) {\n if (!isDestroyed()) {\n hitCounter++;\n scoreReturned += getHitScore();\n }\n }\n\n playSound(hitCounter - 1, 1f);\n } else {\n if (!(getType() == TargetType.ENEMY)) {\n playSound(hitCounter, 0.5f);\n }\n }\n\n return scoreReturned;\n }", "void hit(GameObject o){\r\n\t\tif (!shield){ // if sheild is on all hits do nothing\r\n\t\t\tif (!(o instanceof UpPower)){ // if didnt hit a power up the ship loses a life\r\n\t\t\t\tif (lives > 1) {\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t\treset();\r\n\t\t\t\t}\r\n\t\t\t\telse { // once there is no life left the ship dies\r\n\t\t\t\t\tdead = true;\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "public boolean isHit(Collideable otherCol){\n return this.collideable.getHitX() - otherCol.getHitX() < 50\n && this.collideable.getHitX() - otherCol.getHitX() > -50\n && this.collideable.getHitY() - otherCol.getHitY() > -30\n && this.collideable.getHitY() - otherCol.getHitY() < 30;\n }", "public boolean hitCheck(float x, float y) {\r\n if (boxX <= x && x <= boxX + boxSize &&\r\n boxY <= y && y <= frameHeight) {\r\n return true;\r\n }\r\n return false;\r\n }", "public void checkCollision()\r\n\t{\r\n\t\t//for Bullets against Avatar and Enemy\r\n\t\tfor(int bulletIndex = 0; bulletIndex < bullets.size(); bulletIndex++)\r\n\t\t{\r\n\t\t\tBullet b = bullets.get(bulletIndex);\r\n\t\t\tif (b instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tboolean collided = false;\r\n\t\t\t\tfor (int enemyIndex = 0; enemyIndex < enemy.size(); enemyIndex++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy e = enemy.get(enemyIndex);\r\n\t\t\t\t\tif(((AvatarBullet) b).collidedWith(e))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\t\tenemy.remove(enemyIndex);\r\n\t\t\t\t\t\tenemyIndex --;\r\n\t\t\t\t\t\tcollided = true;\r\n\t\t\t\t\t\tint score = getScore()+1;\r\n\t\t\t\t\t\tsetScore(score);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (b instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tif (((EnemyBullet) b).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\tint health = Avatar.getLives()-1;\r\n\t\t\t\t\tavatar.setLives(health);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int platformIndex = 0; platformIndex < platforms.size(); platformIndex++)\r\n\t\t{\r\n\t\t\tPlatforms p = platforms.get(platformIndex);\r\n\t\t\tif (p instanceof Platforms)\r\n\t\t\t{\r\n\t\t\t\t//boolean collided = false;\r\n\t\t\t\t//Avatar a = avatar.get(enemyIndex);\r\n\t\t\t\tif(((Platforms) p).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void check_turn(List<CollisionObject> collidables) {\n //Firing rays\n\n //select an area of 180 degrees (pi radians)\n boolean turn = true;\n Vector2 start_point = get_ray_fire_point();\n for (int ray = 0; ray <= number_of_rays; ray++) {\n\n if (turn) {\n ray--;\n float ray_angle = sprite.getRotation() + ((ray_angle_range / (number_of_rays / 2)) * ray);\n turn = false;\n } else {\n float ray_angle = sprite.getRotation() - ((ray_angle_range / (number_of_rays / 2)) * ray);\n turn = true;\n }\n\n float ray_angle = ((ray_angle_range / number_of_rays) * ray) + sprite.getRotation();\n\n for (float dist = 0; dist <= ray_range; dist += ray_step_size) {\n\n double tempx = (Math.cos(Math.toRadians(ray_angle)) * dist) + (start_point.x);\n double tempy = (Math.sin(Math.toRadians(ray_angle)) * dist) + (start_point.y);\n //check if there is a collision hull (other than self) at (tempx, tempy)\n for (CollisionObject collideable : collidables) {\n if (collideable.isShown() &&\n ((Obstacle) collideable).getSprite().getY() > sprite.getY() - 200 &&\n ((Obstacle) collideable).getSprite().getY() < sprite.getY() + 200 &&\n ((Obstacle) collideable).getSprite().getX() > sprite.getX() - 200 &&\n ((Obstacle) collideable).getSprite().getX() < sprite.getX() + 200)\n for (Shape2D bound : collideable.getBounds().getShapes()) {\n if (bound.contains((float) tempx, (float) tempy)) {\n // Determines which side the ai should turn to\n if (turn) {\n turn(-1);\n return;\n } else {\n turn(1);\n return;\n }\n\n }\n }\n\n }\n }\n }\n }", "public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }" ]
[ "0.77722156", "0.7686135", "0.73045087", "0.72506905", "0.7055757", "0.70028424", "0.68472713", "0.67944604", "0.6775726", "0.6775183", "0.6763162", "0.6762774", "0.67485803", "0.67392653", "0.67191494", "0.66935414", "0.6631649", "0.6601303", "0.65672344", "0.654693", "0.65366673", "0.6535482", "0.6529655", "0.65137786", "0.6486109", "0.64770085", "0.6465217", "0.6459858", "0.6430778", "0.6426944", "0.642321", "0.6416436", "0.6413795", "0.6371551", "0.63575315", "0.6354978", "0.6354515", "0.6343649", "0.63254565", "0.6323384", "0.6314336", "0.62947273", "0.6294215", "0.62910837", "0.6290978", "0.6290851", "0.6284926", "0.627942", "0.62706196", "0.6267463", "0.62599784", "0.6237045", "0.62363994", "0.6235824", "0.6214705", "0.62014765", "0.6197322", "0.6196428", "0.6192672", "0.61913", "0.6186388", "0.6184426", "0.61825454", "0.61790836", "0.61756235", "0.61693466", "0.61691904", "0.61644155", "0.6163375", "0.6159712", "0.6159712", "0.6156005", "0.6149849", "0.6149713", "0.613789", "0.61346835", "0.61323476", "0.61213034", "0.6114248", "0.60934305", "0.6089152", "0.6088961", "0.60746866", "0.60746866", "0.60746866", "0.60746866", "0.60746866", "0.6072236", "0.60687315", "0.6063393", "0.6057779", "0.6028046", "0.6027419", "0.60162044", "0.6002083", "0.5997755", "0.59972286", "0.5991054", "0.5980112", "0.59791034" ]
0.6646016
16
update the postion of the enemy
public void update(){ // random move if(alive){ posX += velX * cos(angle); posY += velY * sin(PI/4); angle += 0.04f*dir; if(random(0, 16) < 8){ dir *= -1; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void prisonerUpdate(){\r\n\t\t//check if a enemy has been spotted\r\n\t\tif (checkSight()){\r\n\t\t\tseen = true;\r\n\t\t} if (seen) {\r\n\t\t\tcreature.setSpeed(1.5);\r\n\t\t\tchaseEnemy(seenEnemy, 5);\r\n\t\t\treturn; //if player has been spotted end method here\r\n\t\t}\r\n\t\t//if no enemy has been spotted\r\n\t\tcreature.setSpeed(1);\r\n\t\tcreature.setAttacking(false);\r\n\t\troamArea();\r\n\t\tif (!checkCollision(x, y)) {\r\n\t\tgoToLocation(x, y);\r\n\t\t}\r\n\t}", "void setEnemyPos(Point2D pos);", "public void update(MazeEventEnemyWalked e) {\r\n }", "public void updateEnemies() {\n for (Map.Entry<Integer, Enemy> entry :enemies.entrySet()) {\n entry.getValue().update(mainPlayerPosX, mainPlayerPosY);\n if (entry.getValue().isDead()) {\n enemiesSize--;\n }\n }\n }", "public void update(MazeEventEnemyWalkedKilled e) {\r\n }", "void updateEnemies() {\n getEnemies().forEach(e -> {\n if (!e.isAlive()) {\n e.die();\n SoundPlayer.play(SoundPlayer.enemyDestroyed);\n }\n });\n objectsInMap.removeIf(o -> o instanceof Enemy && !(((Enemy) o).isAlive()));//Removing Dead Enemies\n getEnemies().forEach(e -> e.setTarget(objectsInMap.stream().filter(p -> p.identifier.contains(\"PlayerTank0.\") &&\n p.isBlocking && ((Tank) p).isVisible()).collect(Collectors.toList())));//Giving Possible target to enemies to decide\n }", "private void setEnemy(){\n depths.setEnemy(scorpion);\n throne.setEnemy(rusch);\n ossuary.setEnemy(skeleton);\n graveyard.setEnemy(zombie);\n ramparts.setEnemy(ghoul);\n bridge.setEnemy(concierge);\n deathRoom1.setEnemy(ghost);\n deathRoom2.setEnemy(cthulu);\n deathRoom3.setEnemy(wookie); \n }", "@Override\n\tpublic void update() {\n\t\tposX -= ninja.getSpeedX();\n\t\t\n\t}", "public void updatemove() {\n\t\tmove = new Movement(getX(), getY(),dungeon,this);\n\t\t//System.out.println(\"Updated\");\n\t\tnotifys();\n\t\tif(this.getInvincible()) {\n\t\t\tsteptracer++;\n\t\t}\n\t\tdungeon.checkGoal();\n\t}", "public void updateOnAction(int update)\n {\n this.points += update;\n }", "public void setAlive(boolean alive){\n // make sure the enemy can be alive'nt\n this.alive = alive; \n }", "public void updatePosition()\r\n\t{\r\n\t\tsuper.updatePosition();\r\n\t\t\r\n\t\t// Update the bomb's position\r\n\t\tPoint nextPosition = getPath().getLocation(t++);\r\n\t\tsetX(nextPosition.x + startX);\r\n\t\tint nextY = nextPosition.y + startY;\r\n\t\tsetY(nextY);\r\n\t\t\r\n\t\t// Blow the bomb up after it reaches mid screen\r\n\t\tif (t > 120 || (nextY < (Global.WINDOW_HEIGHT >> 1) && t > 30))\r\n\t\t{\r\n\t\t\tbombSound.stop();\r\n\t\t\tsuper.remove();\r\n\t\t\tGamePanel.makeExplosion(getX(), getY());\r\n\t\t\t\r\n\t\t\t// Injure all the enemies on the screen\r\n\t\t\t\r\n\t\t\tArrayList<Sprite> sprites = GamePanel.getSprites();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < sprites.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tif (sprites.get(i) instanceof Enemy)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy enemy = (Enemy) sprites.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t\tint currentYTop = GamePanel.getLevel().getCurrentY() +\r\n\t\t\t\t\t\tBLOCKS_PER_Y - 1;\r\n\t\t\t\t\tboolean visibleX = enemy.getX() + enemy.getWidth() >= 0 &&\r\n\t\t\t\t\t\tenemy.getX() <= Global.WINDOW_WIDTH;\r\n\t\t\t\t\tboolean yOnScreen = enemy.getY() <= Global.WINDOW_HEIGHT +\r\n\t\t\t\t\t\t100;\r\n\t\t\t\t\tboolean visibleY = enemy.getYBlock() >= currentYTop &&\r\n\t\t\t\t\t\tyOnScreen;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (visibleX && visibleY && enemy.isAlive())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tenemy.offsetHealth(-300);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (enemy.getHealth() <= 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tenemy.remove();\r\n\t\t\t\t\t\t\tGamePanel.offsetNumLevelPoints(100);\r\n\t\t\t\t\t\t\tGamePanel.makeExplosion(enemy.getX(), enemy.getY());\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}\r\n\t\t}\r\n\t}", "public void setEnemy(Enemy enemy){\n this.enemy = enemy;\n enemy.setXGrid(getXGrid());\n enemy.setYGrid(getYGrid());\n setEntity(enemy);\n }", "public void update() {\r\n super.update();\r\n life -= 1;\r\n if(life <= 0) {\r\n killBullet();\r\n }\r\n }", "private void updateEnemies()\n\t \n\t {\n\t for(int i = 0; i < EnemyList.size(); i++)\n\t {\n\t \t//get and update enemy for the enemy list\n\t Enemy eh = EnemyList.get(i);\n\t eh.Update();\n\t \n\t //checks for enemy and player crashes \n\t Rectangle playerRectangel = new Rectangle(pl.xCoord, pl.yCoord, pl.PlayerImage.getWidth(), pl.PlayerImage.getHeight());\n\t Rectangle enemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\t if(playerRectangel.intersects(enemyRectangel)){\n\t \n\t \t//set player health to zero\n\t \tpl.Health = 0;\n\t \n\t // Remove helicopter from the list.\n\t EnemyList.remove(i);\n\t \n\t //creates new explosion coordinates \n\t enExplosionX = eh.xCoord; \n\t enExplosionY = eh.yCoord; \n\t plExplosionX = pl.xCoord+120;\n\t plExplosionY = pl.yCoord;\n\t GameOn = false;\n\t \n\t }\n\t \n\t // Check health.\n\t if(eh.Health <= 0){\n\t \n\t // Increase the number of destroyed enemies and removes a helicopter froma list.\n\t DestroyedEnemies++;\n\t \n\t \n\t if(DestroyedEnemies == 10)\n\t {\n\t \t//WinsState = true; \n\t \t\n\t }\n\t EnemyList.remove(i);\n\t \n\t }\n\t \n\t // If the current enemy has left the scree it is removed from the list and the number of runAwayEnemies is increased.\n\t if(eh.HasLeftScreen())\n\t {\n\t \tEnemyList.remove(i);\n\t RunAwayEnemies++;\n\t }\n\t \n\t if(RunAwayEnemies > 5)\n\t {\n\t \tGameOn = false; \n\t \t\n\t }\n\t }\n\t \n\t }", "public void guardUpdate(){\r\n\t\t//check if a enemy has been spotted\r\n\t\tif (checkSight()){\r\n\t\t\tseen = true;\r\n\t\t} if (seen) {\r\n\t\t\tcreature.setSpeed(1.5);\r\n\t\t\tchaseEnemy(seenEnemy, 5);\r\n\t\t\treturn; //if player has been spotted end method here\r\n\t\t}\r\n\t\t//if no enemy has been spotted\r\n\t\tcreature.setSpeed(1);\r\n\t\tif (creature.getCreature().equals(CreatureType.PGuard) || creature.getCreature().equals(CreatureType.SGuard)){ //Patrol Guards and Stationary Guards\r\n\t\t\tif (index > checkpoints.size()-1){\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t\tgoToLocation (checkpoints.get(index));\r\n\t\t} else if(creature.getCreature().equals(CreatureType.RGuard)){ //Roaming Guards\r\n\t\t\troamArea();\r\n\t\t} if (!checkCollision(x, y)) {\r\n\t\t\tgoToLocation(x, y);\r\n\t\t}\r\n\t}", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "@Override\n public void update(@NotNull GameVariables variables) {\n if (variables.getStep() % variables.getEnemyMovementDelay() == 0) {\n super.setCoordinates(x(), y() + variables.getEnemySpeed());\n }\n }", "private void updateDelta() {\n\t\tbulletDelta = Delta.getDelta(\"bullet\");\n\t\tenemyDelta = Delta.getDelta(\"enemy\");\n\t}", "@Override\n\tpublic void update() {\n\t\tage++;\n\t\tpoints = Globals.points;\n\t}", "@Override\n\tpublic void update(Subject obj) {\n\t\tif (obj instanceof Enemy) {\n\t\t\tthis.defeated++;\n\t\t}\n\t}", "public static void enemyWonInc(){\r\n\t\t_enemyWon++;\r\n\t}", "public void update(MazeEventTeleported e) {\r\n }", "public void update(){\n\t\tthis.game.atacarZombies(this.x, this.y, this.damage, 1, false); //Misma fila\n\t\tthis.game.atacarZombies(this.x-1, this.y, this.damage, 1, false); //Fila arriba\n\t\tthis.game.atacarZombies(this.x+1, this.y, this.damage, 1, false); //Fila abajo\n\t\tthis.turno++;\n\t}", "public void update() ;", "public void tick()\n{\n y+=speed;\n\n for(int i=0; i<game.ea.size(); i++)\n {\n EntityA tempEnt= game.ea.get(i);\n if(Physics.Coliision(this,tempEnt))\n {\n c.removeEntity(tempEnt); //zeby po trafieniu znikal pocisk\n c.removeEntity(this);\n game.setEnemy_killed(game.getEnemy_killed()+1);\n\n }\n }\n\n/*\n* If Enemy is out of bounds player get - points\n* and loses some stamina.\n*\n* Enemies are removed from list after disapears\n */\n\n if(y>(App.getHEIGHT()-20)*2)\n {\n App.addHealth(-10);\n App.addPOINTS(-3);\n c.removeEntity(this);\n }\n\n anim.runAnimation();\n\n /*\n * If App is not in game state it doesn't\n * need to have any enemies\n */\n\n if(App.State != App.STATE.GAME)\n {\n delEnemies();\n\n }\n}", "private void moveEnemies(){\n \t\tdouble dirX = 0;\n\t\tdouble dirY = 0;\n \t\tdouble length = 99999;\n \t\tint speed = 2;\n\n\t\tfor(int i=0;i<enemy_num;i++){\n\t\t\tdirX = players[enemy[i][2]][1] - enemy[i][0];\n\t\t\tdirY = players[enemy[i][2]][2] - enemy[i][1];\n\t\t\tlength = Math.sqrt(dirX*dirX + dirY*dirY);\n\t\t\tdirX /= length;\n\t\t\tdirY /= length;\n\t\t\tdirX *= speed;\n\t\t\tdirY *= speed;\n\t\t\tenemy[i][0] += dirX;\n\t\t\tenemy[i][1] += dirY;\n\t\t\n\t\t}\n\t\n\t}", "@Override\n\tpublic boolean update(){\n\t\tif(dead){ return true; }\n\t\tfieldOfView.setOwnerId(this.ownerId);\n\t\tupdateHealthBar();\n\t\tupdateTexture();\n\t\tregenHealth();\n\t\tadjustAttackspeed();\n\t\tattack();\n\t\treturn false;\n\t}", "public void update(){\r\n\t\t\r\n\t}", "@Override\n\tpublic void update(Monster monster) {\n\t\t\n\t}", "public void draw() {\r\n\r\n if (this.z == 2) {\r\n //--- Shooting//---\r\n for (Enemy e: this.td.getEnemies()) {\r\n if (e.getX() < this.x + this.size / 2\r\n && e.getX() + e.getSize() > this.x - this.size / 2) {\r\n if (e.getY() < this.y + this.size / 2\r\n && e.getY() + e.getSize() > this.y - this.size / 2) {\r\n if (!this.firing) {\r\n this.firing = true;\r\n this.target = e;\r\n }\r\n } else {\r\n this.firing = false;\r\n }\r\n }\r\n this.firing();\r\n }\r\n }\r\n this.update();\r\n\r\n }", "@Override\n\tpublic void doCollideEnemy(SlowEnemy enemy) {\n\t\t\n\t}", "@Override\n\tpublic void update() \n\t{\n\t\tPoint loc = getLocationCopy();\n\t\tEnemy c = game.findNearestEnemy(loc);\n\t\tif (c == null)\n\t\t\treturn;\n\t\t\n\t\tif(c.getLocation().distance(loc) < 100 && game.getFrameCount() % 30 == 0)\n\t\t{\n\t\t\tFlyingSalt s = new FlyingSalt(game, loc, \n\t\t\t\t\t\t\t\t\tc.getLocation().x - position.x,\n\t\t\t\t\t\t\t\t\tc.getLocation().y - position.y);\n\t\t\tgame.addAnimatable(s);\n\t\t}\n\t}", "public void update(Array<Enemy> enemies, Ship player, Array<Token> tokens)\n\t{\n\t\tthis.es = enemies;\n\t\tthis.ts = tokens;\n\t\tthis.player = player;\n\t}", "@Override\n public void update() {\n if(alive==false){\n afterBeKilled();\n return;\n }\n animate();\n chooseState();\n checkBeKilled();\n if(attack){\n if(timeBetweenShot<0){\n chooseDirection();\n attack();\n timeBetweenShot=15;\n }\n else{\n timeBetweenShot--;\n }\n\n }\n else{\n calculateMove();\n setRectangle();\n }\n }", "public void update() {\n super.update();\n // Code specific to the ship gameObject\n action = ctrl.action();\n direction.rotate(action.turn * STEER_RATE * Constants.DT);\n velocity.addScaled(direction, (MAG_ACC * Constants.DT * action.thrust));\n position.addScaled(velocity, DRAG * Constants.DT);\n position.wrap(Constants.FRAME_WIDTH, Constants.FRAME_HEIGHT);\n\n // Checks if the user is pressing forwards\n if(action.thrust == 1){\n thrusting = true;\n } else{\n thrusting = false;\n }\n time -= 1;\n if(action.shoot && time <= 0){\n mkBullet();\n time = 30;\n }\n\n if(invincible)\n color = Color.blue;\n else\n color = Color.cyan;\n }", "public void update() {\r\n\t\t\r\n\t}", "public void update() {}", "@Override\n\tpublic void update() {\n\n\t\ttimer++;\n\t\tupdatePlayer();\n\t\tupdateScreen();\n\t\tupdateLives();\n\n\t}", "public void updateStats( ) {\r\n\t\tperseverance = owner.perseverance;\r\n\t\tobservation = owner.observation;\r\n\t\tintellect = owner.intellect;\r\n\t\tnegotiation = owner.negotiation;\r\n\t\ttact = owner.tact;\r\n\t\tstrength = owner.strength;\r\n\r\n\t\txCoord = owner.xCoord;\r\n\t\tyCoord = owner.yCoord;\r\n\r\n\t\tmaxHealth = 2400 + ( perseverance * 200 );\r\n\r\n\t\thealth = maxHealth;\r\n\r\n\t\tsetDamages( );\r\n\t}", "public void onLivingUpdate() {\n if (!this.onGround && this.motionY < 0.0D)\n this.motionY *= 0.6D;\n\n\n if (this.ticksExisted % 20 == 0 && this.getHealth() != this.getMaxHealth() && this.getHealth() >= 1)\n this.setHealth(this.getHealth() + 1);\n\n if (worldObj.isRemote) {\n if (this.isSitting())\n worldObj.spawnParticle(EnumParticleTypes.REDSTONE, posX, posY + 1.5, posZ, 0, 0, 0);\n }\n\n if (worldObj.isRemote) {\n MoWitchAndWizard.proxy.spawnParticles(\"air_normal\", this);\n }\n\n super.onLivingUpdate();\n }", "public void update(float dt) {\n if (codeOn == true) {\n //do nothing\n } else {\n handleinput(dt);\n }\n //movedRight(dt);\n //takes 1 step in the physics simulation 60 times per second\n world.step(1 / 60f, 6, 2);\n player.update(dt);\n\n //if character dies, freeze the camera right where he died\n if (player.currentState != Adventurer.State.DEAD) {\n gamecam.position.x = player.b2body.getPosition().x;\n }\n\n hud.update(dt);\n\n for (Enemy enemy : creator.getDungeonMonster()) {\n enemy.update(dt);\n if (enemy.getX() < player.getX() + 220 / DefaultValues.PPM) {\n enemy.b2body.setActive(true);//activate goomba\n }\n }\n if (DefaultValues.questActivated == true) {\n quest1 = true;\n quest2 = false;\n DefaultValues.questActivated = false;\n stage.addActor(dialog);\n }\n\n if (DefaultValues.quest2Activated == true) {\n quest1 = false;\n quest2 = true;\n DefaultValues.quest2Activated = false;\n stage.addActor(dialog2);\n }\n\n if (touchedFinishline == true) {\n if (progressInsideTaskTwo == 100) {\n if (saveProcessor.checkAchievement() == true) {\n DungeonCoder.manager.get(\"UIElements/Animation/achievement.mp3\", Sound.class).play();\n }\n DungeonCoder.manager.get(\"UIElements/Animation/stagecomplete.mp3\", Sound.class).play();\n hud.stopMusic();\n touchedFinishline = false;\n saveProcessor.insClear();\n System.out.println(\"Total clear:\" + saveProcessor.getTotalCleared());\n System.out.printf(\"You have cleared %d instructional stages.\\n\", saveProcessor.getInsCleared());\n dispose();\n game.setScreen(new StageThreeComplete(game));\n } else {\n touchedFinishline = false;\n new Dialog(\"Dungeon Coder\", skin, \"dialog\") {\n protected void result(Object object) {\n }\n }.text(\"You have not fulfil the requirement to complete the stage!\").button(\" Ok \", true).show(stage);\n }\n }\n\n\n //update gamecam with correct corrdinates after changes\n gamecam.update();\n\n //tell renderer to draw only what our camera can see in our game world\n renderer.setView(gamecam);\n\n }", "public void update() {\n\t\t\n\t}", "public void update(MazeEventWon e) {\r\n }", "public void update(){\n if (bossMoveTime > 10){\n if(random(0,16) <= 8){\n dir = 1;\n }else{\n dir = -1;\n }\n velX *= dir;\n bossMoveTime = 0;\n }\n posY *= 0.8f;\n posX += velX;\n posY += velY;\n angle += 0.04f;\n bossMoveTime++;\n }", "public void processEnemyHitsAndDeaths(AbstractEnemy enemy) {\n this.scoreCounter.changeScore(2000, '+'); // This was put here to see all objectives being met\n this.gameState.updateScoreGoals(this.scoreCounter);\n this.gameState.updateEnemyHitGoals(enemy.getEnemyType());\n this.killCount += 1; \n }", "public void updateScoreEnemies(int enemiesDestroyed) {\n\t\tscore = (int) (score + (enemiesDestroyed * VALUE_ENEMY));\n\t}", "public void update(){}", "public void update(){}", "private void tick() {\n\n if (StateManager.getState() != null) {\n StateManager.getState().tick();\n }\n this.backgroundFrames--;\n if (this.backgroundFrames == 0) {\n this.backgroundFrames = Const.TOTAL_BACKGROUND_FRAMES;\n }\n//Check all changed variables for the player\n player.tick();\n long elapsed = (System.nanoTime() - time) / (Const.DRAWING_DELAY - (4000 * Enemy.getDifficulty()));\n//Check if enough time is passed to add new enemy or if spawnSpot is available\n if (elapsed > (this.delay - Enemy.getDifficulty() * 300)&& Road.isSpotAvailable()) {\n enemies.add(new Enemy());\n time = System.nanoTime();\n }\n//Loop for checking all changed variables for the enemies and check if they intersects with the player\n for (int j = 0; j < enemies.size(); j++) {\n enemies.get(j).tick();\n if(enemies.get(j).getY() > Const.ROAD_BOTTOM_BORDER + 200){\n Road.getOccupiedSpawnPoints()[Const.SPAWN_POINTS.indexOf(enemies.get(j).getX())] = false;\n player.setScore(player.getScore() + 50);\n enemies.remove(j);\n continue;\n }\n enemyBoundingBox = enemies.get(j).getEnemyRectangle();\n if (player.getBoundingBox().intersects(enemyBoundingBox)) {\n reset();\n if(player.getLives() == 0){\n gameOver();\n }\n break;\n }\n }\n }", "public void update(MazeEventWalkedKilled e) {\r\n }", "public void update(float dt) {\n\t\tIterator<Alien> iter = aliens.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tAlien alien = iter.next();\n\t\t\t\n\t\t\talien.setY(alien.getY() + alien.v * dt);\n\t\t\tif(alien.getY() > 480 - alien_size) iter.remove();\n\t\t}\n\t}", "public void update(){\n\n // advance player and entity loader\n player.advance();\n entityloader.advance();\n\n // if the player is shooting\n if (player.isShooting){\n player.nextBullet--;\n if (player.nextBullet < 0){\n audioloader.play(\"plshoot\"); // play audio\n for (int i = -1; i <= 1; ++i){\n playerBullets.add(new Projectile<RectangleHitbox>(player.getCenterX(), player.getCenterY(), 500, 0, 270 + 2.5 * i, 0, 0, false, 1.5, true, 0,\n player.bulletSprite.getRectangleHitbox(player.bulletSize), player.bulletSprite.img.getScaledInstance(player.bulletSize, player.bulletSize, 1), 0, 0, this));\n } \n player.nextBullet = (int)(FPS / player.bulletsPerSecond);\n }\n }\n\n // Player bullets\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n if (bullet.advance()){\n nextPlayerBullets.add(bullet);\n }\n }\n playerBullets.clear();\n for (Projectile<RectangleHitbox> bullet : nextPlayerBullets){\n playerBullets.add(bullet);\n }\n nextPlayerBullets.clear();\n\n // Circle Enemies\n for (Projectile<CircleHitbox> enemy : circleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (!enemy.isBullet){ // if enemy is not a bullet, check if it is being hit by player bullets\n boolean hit = false; // each enemy can only be hit once each frame\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n hit |= bullet.getHitbox().intersects(enemy.getHitbox());\n if (hit)\n break;\n }\n if (hit){\n enemy.damageTaken += enemy.originalLifetime * enemy.percentDamage;\n }\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextCircleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n circleEnemies.clear();\n for (Projectile<CircleHitbox> enemy : nextCircleEnemies){ // swap nextCircleEnemies with circleEnemies\n circleEnemies.add(enemy);\n }\n nextCircleEnemies.clear();\n\n // Rectangle Enemies\n for (Projectile<RectangleHitbox> enemy : rectangleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextRectangleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n rectangleEnemies.clear();\n for (Projectile<RectangleHitbox> enemy : nextRectangleEnemies){ // swap nextRectangleEnemies with rectangleEnemies\n rectangleEnemies.add(enemy);\n }\n nextRectangleEnemies.clear();\n\n }", "public void update(){\r\n }", "void update();", "void update();", "void update();", "void update();", "void update();", "void update();", "void update();", "void update();", "private void enemyMove() {\n\t\tArrayList<EnemySprite> enemylist = this.model.getEnemy();\n\t\tfor(EnemySprite sp :enemylist) {\n\t\t\tif(sp instanceof NormalEnemySprite) {\n\t\t\t\t\n\t\t\t\t((NormalEnemySprite)sp).move();\n\t\t\t}\n\t\t\t\n\t\t\telse if(sp instanceof PatrollingEnemySprite) {\n\t\t\t\t\n\t\t\t\t((PatrollingEnemySprite) sp).move();\n\t\t\t\t\n\t\t\t} \n\t\t\t\n\t\t\telse if (sp instanceof BigEnemySprite) {\n\t\t\t\t((BigEnemySprite)sp).move();\n\t\t\t}\n\t\t\t\n\t\t\telse if (sp instanceof PatrollingBigEnemySprite) {\n\t\t\t\t((PatrollingBigEnemySprite) sp).move();\n\t\t\t}\n\t\t\t\n\t\t\telse if (sp instanceof CircleBigEnemySprite) {\n\t\t\t\t((CircleBigEnemySprite) sp).move();\n\t\t\t}\n\t\t}\n\t\t\n\t\t\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\tif(!shortestPath.isEmpty())\n\t\t\tnextPoint = shortestPath.peek();\n\t\telse\n\t\t{\n\t\t\tgameManager.killEnemy(this, false);\n\t\t\tGameStateManager.getInstance().getPlayState().removeEnemy(this);\n\t\t\treturn;\n\t\t}\n\t\tnextVector = new Vector2d(nextPoint.x * PlayState.INGAMETILESIZE, nextPoint.y * PlayState.INGAMETILESIZE);\n\t\tdirection = Vector2d.sub(nextVector, position);\n\t\tif(direction.mag() < tolerance)\n\t\t{\n\t\t\tposition = nextVector;\n\t\t\tshortestPath.pop();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdirection.normalize();\n\t\t\tposition.add(direction);\n\t\t}\n\t}", "int defend(Unit unit, Unit enemy);", "@Override\n public void simpleUpdate(float tpf) {\n moveCamera(tpf);\n updateEnemies(tpf);\n updatePlayer();\n }", "public void update(float dt, EnemyManager em)\n {\n if (!active)\n return;\n\n CheckHealth(em);\n\n // Simply fly downwards\n basicShooter.pos.y -= dt * movementSpeed;\n\n // Once this enemy hits the bottom, it will be set to inactive,\n // and EnemyManager's enemy count is decremented\n if (basicShooter.pos.y <= 0)\n {\n active = false;\n --em.curEnemyCount;\n }\n }", "@Override\r\n\tpublic void Update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void Update() {\n\t\t\r\n\t}", "public void update() {\n\t\t// shooting and moving! This results in a slower movement, and unit self-targeting.\n\t\tif (action == 3 && !(this instanceof Grenadier) && !(this instanceof Sniper)) { // can't be a tank\n\t\t\tif (stop()) { // the method stop detects if we have arrived at correct position or reached max distance\n\t\t\t\txa = 0;\n\t\t\t\tya = 0;\n\t\t\t} else move(xa - xa / 8 * 5, ya - ya / 8 * 5); // SLOWS DOWN MOVEMENT\n\n\t\t\tUnit u = target(); // this is the enemy unit it is targeting.\n\t\t\tif (u != null) {\n\t\t\t\tdir = Math.atan2(u.getY() - y, u.getX() - x);\n\t\t\t\tupdateShooting();\n\t\t\t}\n\t\t}\n\n\t\t// shooting only\n\t\telse if (action == 2) {\n\t\t\tupdateShooting();\n\t\t}\n\t\t\n\t\t// moving only\n\t\telse if (action == 1) {\n\t\t\tif (unitType.equals(\"Assassin\") || unitType.equals(\"Zombie\")) { // these are units that deal with collisions!\n\t\t\t\tunitCollision(); // these three units have methods that specialize in collision\n\t\t\t}\n\n\t\t\tif (stop()) { // the method stop detects if we have arrived at correct position!\n\t\t\t\txa = 0;\n\t\t\t\tya = 0;\n\t\t\t\taction = 0;\n\t\t\t} else move(xa, ya); // YOU MUST ROUND TO A CERTAIN NUMBER OF DECIMAL PLACES IN ORDER TO REDUCE CHOPPINESS OF MOVEMENT\n\t\t}\n\t\tupdateAnimation();\n\n\t}", "@Override\n\t\t\tpublic void attack(Base enemy) {\n\t\t\t}", "public void update()\n\t{\n\t\t//\tTHE WORLD HAS ENDED DO NOT EXECUTE FURTHER\n\t\tif( end )\n\t\t{\n\t\t\tsafeEnd = true;\n\t\t\treturn;\n\t\t}\n\n\t\t//Plot graphics\n\t\tif(plot){\n\t\t\thealthyFunction.show(infectedFunction, healthyFunction);\n\t\t\tbusFunction.show(infectedFunction, seasFunction, busFunction, colFunction, ellFunction, smpaFunction, lawFunction);\n\t\t\tplot = false;\n\t\t}\n\n\t\t//\tsafe point to manage human/zombie ratios\n\t\t//\tTODO: Modify infect to also switch zombies to humans\n\t\tinfect();\n\t\tgetWell();\n\t\taddFromQueue();\n\n\t\t//\tupdate all entities\n\t\tfor( Zombie z: zombies )\n\t\t{\n\t\t\tz.update(zombiesPaused);\n\t\t}\n\t\tfor( Entity h: humans )\n\t\t{\n\t\t\th.update(humansPaused);\n\t\t}\n\n\t\tif( zc!=zombies.size() || hc!=humans.size() )\n\t\t{\n\t\t\tzc = zombies.size();\n\t\t\thc = humans.size();\n\t\t\tSystem.out.println(zc+\"/\"+hc);\n\t\t}\n\n\t\t//Add points to our functions\n\t\thealthyFunction.add(time,humans.size());\n\t\tinfectedFunction.add(time,zombies.size());\n\t\tseascount = smpacount = ellcount = lawcount = buscount = colcount = 0;\n\t\tfor (int i = 0; i < humans.size(); i++) {\n\t\t\tEntity curr = humans.get(i);\n\t\t\tif (curr instanceof SEAS) {\n\t\t\t\tseascount++;\n\t\t\t} else if (curr instanceof SMPA) {\n\t\t\t\tsmpacount++;\n\t\t\t} else if (curr instanceof Elliot) {\n\t\t\t\tellcount++;\n\t\t\t} else if (curr instanceof Law) {\n\t\t\t\tlawcount++;\n\t\t\t} else if (curr instanceof Business) {\n\t\t\t\tbuscount++;\n\t\t\t} else if (curr instanceof Columbian) {\n\t\t\t\tcolcount++;\n\t\t\t}\n\t\t}\n\t\tbusFunction.add(time, buscount);\n\t\tcolFunction.add(time, colcount);\n\t\tellFunction.add(time, ellcount);\n\t\tlawFunction.add(time, lawcount);\n\t\tsmpaFunction.add(time, smpacount);\n\t\tseasFunction.add(time, seascount);\n\t\ttime++;\n\t}", "public void setDmg(int enemyDmg){\r\n this.enemyDmg = enemyDmg;\r\n }", "public void onUpdateTimerTick() {\r\n\t\tx = x+dx;\r\n\t\ty = y+dy;\r\n\t\tgame.updateWorld();\r\n\r\n\t}", "public void update() {\n\t\t\n\t\t//System.out.println(this.observer);\n\t\t\n\t\tif(this.isCollidable == false){\n\t\t\tthis.x = -500;\n\t\t\tthis.y = -500;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (this.life < this.maxLife && !this.isDead()){\n\t\t\t\n\t\t\tif(recovery >= 1){\n\t\t\t\tthis.setLife(this.life + 1);\n\t\t\t\trecovery = 0;\n\t\t\t}\n\t\t\t\n\t\t\trecovery += 0.01;\n\t\t}\n\t\t\n\t\tsuper.update();\n\t\t\n\t\t//Shield movement\n\t\tInteger horizontalCorrection = (this.width - player.width)/2;\n\t\tInteger verticalCorrection = (this.height - player.height)/2;\n\n\t\t//Adjusting position player with force shield\n\t\tthis.x = player.x - horizontalCorrection;\n\t\tthis.y = player.y - verticalCorrection;\n\t}", "public void update(Player player) {\n\t\t\n\t}", "@Override\n\tpublic void setEnemyCount(int n) {\n\t\t\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void tick() {\n\t\tif (timer!=Game.timeCount)\n\t\t\thandler.addObject(new EnemyPlane(Game.WIDTH-38,r.nextInt(Game.HEIGHT-50), ID.Enemy, handler));\n\t\t\ttimer = Game.timeCount;\n\t}", "@Override\n public void update() {\n if (!myNPC.isAlive()) {\n myNPC.setState(MovingState.DEATH);\n }\n\n if (isAttacking()) {\n if (attackCounter > 300) {\n myNPC.setState(MovingState.IDLE);\n attackCounter = 0;\n } else {\n attackCounter++;\n }\n return;\n }\n\n// randomMove();\n }", "@Override\r\n public void update() {\r\n super.update();\r\n hero.checkForTileCollision(getXOverlap(hero.oldx,hero.oldx+width,hero.x,hero.x+width), getYOverlap(hero.oldy,hero.oldy+hero.height,hero.y, hero.y+hero.height));\r\n int i = 0;\r\n\r\n while (turningPoints[i]!= null)\r\n {\r\n if (intersects(turningPoints[i].x,turningPoints[i].y, turningPoints[i].width,turningPoints[i].height))\r\n {\r\n vx = -vx;\r\n vy = -vy;\r\n }\r\n i++;\r\n }\r\n }", "public void update() {\n\t\tVec2 newPos = calculatePos();\n\t\t/* energy bar */\n\t\tfloat newEnergy = actor.getEnergy();\n\t\tfloat maxEnergy = actor.getEnergyLimit();\n\t\tenergy.setPosition(newPos.getX(), newPos.getY() + paddingHealth / Application.s_Viewport.getX(), newEnergy,\n\t\t\t\tmaxEnergy);\n\t\t/* health bar */\n\t\tfloat newHealth = actor.getHealth();\n\t\tfloat maxHealth = actor.getHealthLimit();\n\t\thealth.setPosition(newPos.getX(), newPos.getY() + paddingEnergy / Application.s_Viewport.getX(), newHealth,\n\t\t\t\tmaxHealth);\n\t\t/* name label */\n\t\tplayerName.setPosition(newPos.getX(), newPos.getY() + paddingName / Application.s_Viewport.getY());\n\t}", "public void updateStep() {\n if (level != null) {\n // erst bewegung beenden, dann aktivitaet\n pacman.endMove();\n pacman.update(this);\n checkCollisions();\n // beendet die bewegungen von entities sofort, sonst keine aktivitaet\n GameEntity e;\n for (GameEntity entity : entities) {\n e = entity;\n // erst aktivitaet, dann bewegung beenden\n e.update(this);\n if (e instanceof MovingEntity)\n ((MovingEntity) e).endMove();\n }\n checkCollisions();\n }\n }", "public void act(){\n if (alive) {\n x = x + vx * dt;\n vx = vx * (1. - daempfung); //Luftwiderstand, eventuell muss dass nur in der Spielerklasse implementiert\n //werden, damit die Pilze nicht abgebremst werden.\n if (bewegung == Bewegung.fallen) {\n y = y + vy * dt;\n vy = vy + g * dt;\n }\n }\n }", "@Override\n\tpublic void ontick(Player p) {\n\t\tp.pos = move; // port to move vector\n\t\t\n\t\tfor(Effect ef:p.effects){\n\t\t\tef.ttl = 1;\n\t\t}\n\t}", "private void addEnemySheild() {\n this.enemyShield += 1;\n }", "public void update() {\n }", "public void onUpdate()\n {\n this.prevPosX = this.posX;\n this.prevPosY = this.posY;\n this.prevPosZ = this.posZ;\n this.motionY -= 0.03999999910593033D;\n this.moveEntity(this.motionX, this.motionY, this.motionZ);\n this.motionX *= 0.9800000190734863D;\n this.motionY *= 0.9800000190734863D;\n this.motionZ *= 0.9800000190734863D;\n\n if (this.onGround)\n {\n this.motionX *= 0.699999988079071D;\n this.motionZ *= 0.699999988079071D;\n this.motionY *= -0.5D;\n }\n\n if (this.fuse-- <= 0)\n {\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n this.explode();\n }\n } else\n {\n this.worldObj.spawnParticle(\"smoke\", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D);\n }\n }", "@Override\n\tpublic void update(double dt) {\n\t\tcurrentSurvivalTime += dt;\n\t\texplosionCurrentSize = currentSurvivalTime * explosionFinalSize / survivalTime;\n\t\tif (explosionCurrentSize > explosionFinalSize) {\n\t\t\trules.deleteObject(this);\n\t\t}\n\t}", "void Death(){\r\n if (vie==0){\r\n this.plateau[this.x][this.y]='0';\r\n }\r\n }", "void updatePosition() {\n\t\t\n\t\tcoords.x = body.getPosition().x*Simulation.meterToPixel;\n\t\tcoords.y = body.getPosition().y*Simulation.meterToPixel;\n\t\tspeed.x = body.m_linearVelocity.x;\n\t\tspeed.y = body.m_linearVelocity.y;\n\t}", "private void subtractEnemyMissile() {\n this.enemyMissile -= 1;\n }", "public void update() {\n\n }", "public void update() {\n\n }", "@Override\r\n\tpublic void update() {\n\t\tAlly.update();\r\n\t\tEnemy.update();\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tif(GroundList.get(i).kill) {\r\n\t\t\t\tGroundList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BarelList.size(); i++) {\r\n\t\t\tif(BarelList.get(i).kill) {\r\n\t\t\t\tBarelList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tif(WoodList.get(i).kill) {\r\n\t\t\t\tWoodList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tif(FireBallList.get(i).kill) {\r\n\t\t\t\tFireBallList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tif(BulletList.get(i).kill) {\r\n\t\t\t\tBulletList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tGroundList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0 ; i < BarelList.size(); i++) {\r\n\t\t\tBarelList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tBulletList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tFireBallList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tWoodList.get(i).update();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(GamePanel.updateTimes%60 == 0) {\r\n\t\t\tEnemy.PushEntity(2, new Vector2f(width*1/2, height/4),enemy);\r\n\t\t}\r\n\t\tfor(int i = 0; i < AllyDeadList.size(); i++) {\r\n\t\t\tAlly.entityList.remove(AllyDeadList.get(i)-i);\r\n\t\t}\r\n\t\tfor(int i = 0; i < EnemyDeadList.size(); i++) {\r\n\t\t\tEnemy.entityList.remove(EnemyDeadList.get(i)-i);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tAllyDeadList.clear();\r\n\t\tEnemyDeadList.clear();\r\n\t\tfor(int i = 0; i < Ally.entityList.size(); i++) {\r\n\t\t\tif(Ally.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tAllyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < Enemy.entityList.size(); i++) {\r\n\t\t\tif(Enemy.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tEnemyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void tick() {\n x += dirX * speed;\n y += dirY * speed;\n \n //Enemy berjalan sendiri (memantul)\n if(x >= Game.WIDTH - 60){\n dirX = -1;\n } else if(y >= Game.HEIGHT - 80){\n dirY = -1;\n } else if(x <= 5){\n dirX = 1;\n } else if(y <= 5){\n dirY = 1;\n }\n\n }", "public void update(){\n }", "public void update(float deltaTime) {\n if (yCoordinate > gameActivity.getScreenHeight()) //if enemy ship img_left_button screen\n {\n Random placeGenerator = new Random();\n //putting respawned enemy ship in a random X spot\n xCoordinate = placeGenerator.nextInt(gameActivity.getScreenWidth() - getRawEnemyShip().getWidth());\n yCoordinate = 0;\n\n } else {\n //here i use deltaTime\n //the longer it takes to do the updates, the more\n // i will multiple the distance the enemyShip has\n //to move\n //see the code in gameView class\n yCoordinate += 3 * (gameActivity.getScreenHeight() / 14) * deltaTime;\n }\n\n // Refresh enemyShipRect location\n enemyShipRect.left = getxCoordinate();\n enemyShipRect.top = getyCoordinate();\n enemyShipRect.right = getxCoordinate() + enemyShip.getWidth();\n enemyShipRect.bottom = (getyCoordinate() + enemyShip.getHeight());\n }" ]
[ "0.75075537", "0.7195044", "0.69958436", "0.6981414", "0.69632787", "0.69113606", "0.65346193", "0.65207267", "0.6484354", "0.64540756", "0.6448816", "0.64152837", "0.6409262", "0.6401159", "0.63798094", "0.63372755", "0.63362914", "0.63362515", "0.62901133", "0.6289767", "0.62348115", "0.6218724", "0.6188633", "0.61884284", "0.61869574", "0.61787677", "0.6170755", "0.6161267", "0.6156752", "0.61499417", "0.6134149", "0.61241674", "0.6121335", "0.61208135", "0.61140674", "0.6110349", "0.61087805", "0.61059403", "0.61052054", "0.61011434", "0.6095947", "0.6058705", "0.60515845", "0.604477", "0.60357547", "0.6034473", "0.60190046", "0.6013568", "0.6013568", "0.6003383", "0.59868187", "0.5986196", "0.5982858", "0.5979646", "0.59505683", "0.59505683", "0.59505683", "0.59505683", "0.59505683", "0.59505683", "0.59505683", "0.59505683", "0.593435", "0.5933876", "0.5933122", "0.592701", "0.5926983", "0.59268594", "0.59268594", "0.592676", "0.59254134", "0.59195757", "0.5917716", "0.5916881", "0.59119624", "0.5911413", "0.5910032", "0.59099925", "0.59099925", "0.59099925", "0.59099925", "0.5909804", "0.59096396", "0.5898308", "0.5895864", "0.5885755", "0.58779204", "0.58772033", "0.58720356", "0.5867764", "0.5864345", "0.58608085", "0.58540624", "0.58497554", "0.5847783", "0.5842448", "0.5842448", "0.58403355", "0.58392155", "0.5837801", "0.58374465" ]
0.0
-1
detect if the enemy hit the up/down boundary, if yes, remove
public boolean detectBound(){ // super.detectBound(); if(posY > height || posY < 0){ Main.enemies.remove(this); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void enemyoff(){\n getWorld().removeObject(this);\n }", "public void checkForRemoval()\n {\n if (life <= 0)\n {\n SideScrollingWorld world = (SideScrollingWorld) getWorld(); \n \n world.isPacmanDead = true;\n getWorld().removeObject(this);\n }\n }", "private void subtractEnemyMissile() {\n this.enemyMissile -= 1;\n }", "public void isShot() {\r\n\t\tlives -=1;\r\n\t\tif(isDead())\r\n\t\t{\r\n\t\t\tthis.erase();\r\n\t\t}\r\n\t}", "void checkCol() {\n Player player = gm.getP();\n int widthPlayer = (int) player.getImg().getWidth();\n int heightPlayer = (int) player.getImg().getHeight();\n Bullet dummyBuullet = new Bullet();\n int widthBullet = (int) dummyBuullet.getImg().getWidth();\n int heightBullet = (int) dummyBuullet.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n // the bullet must be an enemy bullet\n if (bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the bullet location is inside the rectangle of player\n if ( Math.abs( bullet.getX() - player.getX() ) < widthPlayer / 2\n && Math.abs( bullet.getY() - player.getY() ) < heightPlayer / 2 ) {\n // 1) destroy the bullet\n // 2) decrease the life of a player\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n bullet.setActive(false);\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n break;\n }\n }\n }\n // 2'nd case\n // the enemy is hit with player bullet\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n if (!bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the player bullet location is inside the rectangle of enemy\n if (Math.abs(enemy.getX() - bullet.getX()) < (widthBullet / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - bullet.getY()) < (heightBullet / 2 + heightEnemy / 2)) {\n // 1) destroy the player bullet\n // 2) destroy the enemy\n if (destroyedEnemy % 3 == 0 && destroyedEnemy != 0) onlyOnce = 0;\n destroyedEnemy++;\n gm.increaseScore();\n enemy.setActive(false);\n\n\n if(enemy.hTitanium()) {\n gm.getTitaniumList()[gm.getTitaniumIndex()].setX(enemy.getX());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setY(enemy.getY());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setActive(true);\n gm.increaseTitaniumIndex();\n }\n\n if(enemy.hBonus()) {\n \tgm.getBonusList()[gm.getBonusIndex()].setX(enemy.getX());\n \tgm.getBonusList()[gm.getBonusIndex()].setY(enemy.getY());\n \tgm.getBonusList()[gm.getBonusIndex()].setActive(true);\n \tgm.increaseBonusIndex();\n }\n bullet.setActive(false);\n break;\n }\n }\n }\n }\n }\n\n // 3'rd case\n // the player collided with enemy ship\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n // the condition when the enemy rectangle is inside the rectangle of player\n if (Math.abs(enemy.getX() - player.getX()) < (widthPlayer / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - player.getY()) < (heightPlayer / 2 + heightEnemy / 2)) {\n // 1) destroy the enemy\n // 2) decrease the player's life\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n enemy.setActive(false);\n\n break;\n }\n }\n }\n\n for (Bonus bonus : gm.getBonusList()) {\n if (bonus.isActive()) {\n int widthBonus = (int) bonus.getImg().getWidth();\n int heightBonus = (int) bonus.getImg().getHeight();\n if (Math.abs(bonus.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(bonus.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n bonus.setActive(false);\n if (bonus.getType() == 1) {\n if (player.getLives() < player.getMaxLives()) {\n player.setLives(player.getLives() + 1);\n }\n }\n else{\n superAttack = 1;\n }\n }\n }\n }\n\n for (Titanium titanium : gm.getTitaniumList()) {\n if (titanium.isActive()) {\n int widthBonus = (int) titanium.getImg().getWidth();\n int heightBonus = (int) titanium.getImg().getHeight();\n if (Math.abs(titanium.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(titanium.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n titanium.setActive(false);\n gm.getP().increaseTitanium();\n }\n }\n }\n\n }", "public void removeFromCollision(Entity en){\n\t\tif (hitboxCollision.containsKey(en)){\n\t\t\tRectangle hitbox = hitboxCollision.get(en);\n\t\t\tareaCollision.remove(hitbox);\n\t\t\thitboxCollision.remove(en);\n\t\t}\n\t}", "public void tick()\n{\n y+=speed;\n\n for(int i=0; i<game.ea.size(); i++)\n {\n EntityA tempEnt= game.ea.get(i);\n if(Physics.Coliision(this,tempEnt))\n {\n c.removeEntity(tempEnt); //zeby po trafieniu znikal pocisk\n c.removeEntity(this);\n game.setEnemy_killed(game.getEnemy_killed()+1);\n\n }\n }\n\n/*\n* If Enemy is out of bounds player get - points\n* and loses some stamina.\n*\n* Enemies are removed from list after disapears\n */\n\n if(y>(App.getHEIGHT()-20)*2)\n {\n App.addHealth(-10);\n App.addPOINTS(-3);\n c.removeEntity(this);\n }\n\n anim.runAnimation();\n\n /*\n * If App is not in game state it doesn't\n * need to have any enemies\n */\n\n if(App.State != App.STATE.GAME)\n {\n delEnemies();\n\n }\n}", "public void tick() {\n\t\tif (Math.abs(disToPlayerX()) > Math.abs(disToPlayerY())) {\r\n\t\t\tif (disToPlayerX()<0) {\r\n\t\t\t\tx -= speed;\t//moves enemy to the left\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tx += speed; //moves enemy to the right\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (disToPlayerY()<0) {\r\n\t\t\t\ty-=speed; //moves enemy up\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ty+=speed; //moves enemy down\r\n\t\t\t}\r\n\t\t}\r\n\t\tenemyRectangle.setLocation((int)x,(int) y); //updates hitbox of enemy\r\n\r\n\t\t//checks all enemies and see if they run into player\r\n\t\tfor (int i=0;i<c.getEnemys().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(player.getRectangle().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes the enemy\r\n\t\t\t\tPlayer.health -=10; //removes 10 health\r\n\t\t\t\tbreak; //doesn't work without this BREAK. DO NOT REMOVE\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//checks all bullets if they hit an enemy\r\n\t\tfor (int i = 0;i<c.getBullets().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(c.getBullets().get(i).getRect().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes enemy\r\n\t\t\t\tc.removeBullet(c.getBullets().get(i)); //removes the bullet\r\n\t\t\t\tPlayer.score += 50; //adds 50 to the score\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic boolean delete() {\n\t\tif(dead==true || y > GamePanel.HEIGHT+side){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}", "public boolean check(double xDelt,double yDelt) {\r\n \tBounds pBound= player1.player.getBoundsInParent();\r\n \t\r\n \tfor( Node object: enemy1.hostileG.getChildren()) {\r\n \t\t\r\n \t\tif(object.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())){\r\n \t\t\teHealth -= inventory.getpDamage();\r\n \t\t\tpHealth -= 1;\r\n\r\n \t\t\tSystem.out.println(\"eHealth \"+ eHealth);\r\n \t\t\tSystem.out.println(\"pHealth \"+ pHealth);\r\n \t\t\t\r\n \t\t\t//\"Deaths of the sprites\"\r\n \t\t\tif(pHealth <=0) {\r\n \t\t\t\tlayout.getChildren().remove(player1.player);\r\n \t\t\t\tSystem.out.println(\"You died!\");\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif(eHealth <=0) {\r\n \t\t\t\tlayout.getChildren().remove(enemy1.enemy);\r\n \t\t\t\tenemy1.enemy.setLayoutX(-10000);\r\n \t\t\t\tenemy1.enemy.setLayoutY(-10000);\r\n \t\t\t}\r\n \t\treturn false;\r\n \t\t}\r\n }\r\n \t\r\n \tfor( Node object: map1.walls.getChildren()) {\r\n \t\tif(object.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())) return false;\r\n \t}\r\n \t\r\n \tfor( Node chest: map1.chests.getChildren()) {\r\n \tif(chest.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())){\r\n \t\tmap1.chests.getChildren().remove(chest);\r\n \t chestchose=inventory.getchestchose();\r\n \t \r\n \t if(chestchose==1) {\r\n \t \tinventory.sworda.setVisible(true);\r\n \t \tinventory.setpDamage(3);\r\n \t }\r\n \t if(chestchose==2) {\r\n \t \tinventory.healthbag.setVisible(true);\r\n \t }\r\n \t \r\n \t return false;\r\n \t} \r\n }\t\r\n \t\r\n return true;\r\n }", "private boolean hitMyPaddle() {\n if (b.numX - 60 <= 0) {\n if ((b.numY <= (this.touchedY + 260)) && (b.numY >= (this.touchedY - 260))) {\n } else {\n this.wentOffWall();\n }\n return true;\n } else {\n return false;\n }\n }", "public boolean update() {\r\n\t\tboolean erase = false;\r\n\t\tif (game.searchInPosition(x+1, y)) {\r\n\t\t\tgame.damageFromEnemy(x+1, y);\r\n\t\t\terase = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\terase = move();\r\n\t\t}\r\n\t\treturn erase;\r\n\t}", "public void removeFromGame(){\n this.isInGame = false;\n }", "private void checkExplosionKill() {\n\t\t\n\t\texplosion.expand();\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tif (explosion.detectDownwardCollision(a.getX(), a.getY())) {\n\t\t\t\t\ta.setVisibility(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public void update() {\r\n super.update();\r\n hero.checkForTileCollision(getXOverlap(hero.oldx,hero.oldx+width,hero.x,hero.x+width), getYOverlap(hero.oldy,hero.oldy+hero.height,hero.y, hero.y+hero.height));\r\n int i = 0;\r\n\r\n while (turningPoints[i]!= null)\r\n {\r\n if (intersects(turningPoints[i].x,turningPoints[i].y, turningPoints[i].width,turningPoints[i].height))\r\n {\r\n vx = -vx;\r\n vy = -vy;\r\n }\r\n i++;\r\n }\r\n }", "@Override\n public void update()\n {\n if(!Rect.intersects(spriteBounds, gameRegion) || wasTouched)\n {\n destroy();\n }\n else\n {\n spriteBounds.offset(0, speed);\n }\n }", "private boolean stop() {\n\t\tboolean collide = false;\n\n\t\tdist = (int) MathMachine.distance((xOrigin - this.x), (yOrigin - this.y)); // distance traveled\n\t\tif (dist >= move_range) collide = true;\n\n\t\tif (Math.abs(x - xD) <= 2 && Math.abs(y - yD) <= 2) { // adding 8 shifts the collision box from the top left corner to the bottom right.\n\t\t\tcollide = true; // this is the important statement for collision detection. It works by looking at the tile you want to go to and seeing if it is solid.\n\t\t}\n\n\t\treturn collide;\n\t}", "public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }", "private boolean checkCollisions(int X, int Y){\n\t\tint hitBoxSizeX = 105;\n\t\tint hitBoxSizeY = 80;\n\t\tfor(int i=0;i<enemy_num;i++){\n\t\t\tif(X<enemy[i][0]+hitBoxSizeX && X>enemy[i][0]){\n\t\t\t\tif(Y<enemy[i][1]+hitBoxSizeY && Y>enemy[i][1]){\n\t\t\t\t\tremoveEnemy(i);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn(false);\n\t}", "protected void checkEdges(){\n if (getX() > getWorld().getBackground().getWidth() + getImage().getWidth()){\n world.monsterAdded();\n getWorld().removeObject(this);\n world.decreaseLives();\n }\n }", "private boolean rightUpCollision(InteractiveObject obj){\n\t\treturn (((obj.getX() - this.getX()) < this.getWidth()) && (obj.getX() > this.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "private void removeDeadEnemies() {\n ArrayList<Entity> deadEnemies = getAllEnemiesDead();\n if (deadEnemies.size() > 0) {\n for (Entity enemy : deadEnemies) {\n enemiesInCombat.remove(enemy);\n }\n }\n isStillInCombat();\n }", "private void checkWeaponCollisions(GObject element) {\r\n\t\tGObject topLeft = getElementAt(element.getX() - 1, element.getY());\r\n\t\tGObject topRight = getElementAt(element.getX() + element.getWidth() + 1, element.getY());\r\n\t\tGObject bottomLeft = getElementAt(element.getX() - 1, element.getY() + element.getHeight());\r\n\t\tGObject bottomRight = getElementAt(element.getX() + element.getWidth() + 1, element.getY() + element.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(element);\r\n\t\t\telement = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}", "private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }", "void playerHit() {\n if (lives == 0) {//if no lives left\n isDead = true;\n } else {//remove a life and reset positions\n lives -=1;\n immortalityTimer = 100;\n resetPositions();\n }\n }", "private boolean leftUpCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "private void fireball1Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball1.getX() - 1, fireball1.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball1.getX() - 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tGObject topRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY());\r\n\t\tGObject bottomRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tif(topLeft == player || bottomLeft == player || topRight == player || bottomRight == player) {\r\n\t\t\tremove(fireball1);\r\n\t\t\tfireball1 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "private void removeMoveIfExist(ActorRef actorRef) {\n for (int distance = 1; distance <= pointsMap.getLength(); distance++) {\n for (int lane = 1; lane <= pointsMap.getLanesNumber(); lane++) {\n if (!pointsMap.isMarked(distance, lane)) {\n pointsMap.putWithCondition(distance, lane, null, oldAct -> oldAct == actorRef);\n }\n }\n }\n }", "private void subtractPlayerMissile() {\n this.playerMissile -= 1;\n }", "public void removeEnemy(Enemy e) {\r\n this.enemies.remove(e);\r\n this.numOfEnemies.decrease(1);\r\n }", "private void removeEnemy(int e_num){\n\t\tint i;\n\t\tfor(i=e_num;i<enemy_num-1;i++){\n\t\t\tenemy[i][0] = enemy[i+1][0];\n\t\t\tenemy[i][1] = enemy[i+1][1];\n\t\t\tenemy[i][2] = enemy[i+1][2];\n\t\t\tenemy_arrow_num[i] = enemy_arrow_num[i+1];\n\t\t\tenemy_arrows[i] = enemy_arrows[i+1];\n\t\t}\n\t\tenemy_num -= 1;\n\t\tenemy[i][0] = 0;\n\t\tenemy[i][1] = 0;\n\t\tenemy[i][2] = 0;\n\t\tenemy_arrow_num[i] = 0;\n\t\t\n\t\t\n\t\n\t}", "public void bounceOffEdge()\n {\n int margin = 2;\n\n if (getX() <= margin || getX() >= getWorld().getWidth() - margin) //left or right side\n {\n turn(180);\n }\n if (getY() <= margin || getY() >= getWorld().getHeight() - margin) //top or bottom side\n {\n turn(180);\n }\n }", "@Override\n\tpublic void action() {\n\t if (firingBall.getY() + firingBall.getRadius() < this.y) { \n\t //deactivate absorber locally and in GameBoard\n\t firingBall = null;\n\t gb.removeFromActiveList(this);\n\t }\n\t}", "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}", "@Override\n public boolean onActionUp(MotionEvent event) {\n if(isWin()) return true;\n\n int mx = (int) (event.getX() - cameraX);\n int my = (int) (event.getY() - cameraY);\n\n TouchHandler cth = TouchHandler.getTouchHandler(event.getPointerId(0));\n if(cth != null){\n if(cth.isValid()){\n cth.perform();\n return true;\n }else{\n TouchHandler.removeTouchHandler(cth);\n }\n }\n\n if(this instanceof DungeonState) if(((DungeonState) this).onUp(mx, my)) return true;\n\n if(selectedPc != null){\n float x2, y2;\n\n if(my < GameView.getScreenHeight() / 2) y2 = Utils.max(getMapRect().top + selectedPc.getCollisionBox().height() - selectedPc.getCollisionBox().width() / 5, my);\n else y2 = Utils.min(getMapRect().bottom - selectedPc.getCollisionBox().width() / 5, my);\n if(mx < GameView.getScreenWidth() / 2) x2 = Utils.max(getMapRect().left + selectedPc.getCollisionBox().width() / 2, mx);\n else x2 = Utils.min(getMapRect().right - selectedPc.getCollisionBox().width() / 2, mx);\n ArrayList<Unit> units = new ArrayList<>();\n for(Unit x : Unit.getUnits()){\n if(x.getCollisionBox().contains(mx, my)){\n units.add(x);\n }\n }\n final Unit dst = selectedPc.choosePriorityUnit(units);\n\n if(dst == null){\n if(BattleState.getBattleState() instanceof DungeonState){\n DungeonState.getDungeonState().replayCommandMove(selectedPc, x2 - selectedPc.getCollisionBox().width() / 2, y2 - selectedPc.getCollisionBox().height());\n }\n BattleState.getBattleState().queueEvent(new Object[] {\"move\", selectedPc, x2 - selectedPc.getCollisionBox().width() / 2, y2 - selectedPc.getCollisionBox().height()});\n// selectedPc.setTarget(null);\n// selectedPc.commandMove(x2 - selectedPc.getCollisionBox().width() / 2, y2 - selectedPc.getCollisionBox().height());\n new MoveCommandVisualEffect(x2, y2);\n }else{\n if(BattleState.getBattleState() instanceof DungeonState){\n DungeonState.getDungeonState().replayCommandAttack(selectedPc, dst);\n }\n BattleState.getBattleState().queueEvent(new Object[] {\"attack\", selectedPc, dst});\n// selectedPc.setTarget(dst);\n// selectedPc.performAction();\n new AttackCommandVisualEffect(dst);\n }\n }\n return true;\n }", "public void killedByPlayer() {\r\n\t\tscreen.enemiesKilled++;\r\n\t\tMazeCrawler mc = screen.mazeHandler.mazeCrawler;\r\n\t\tint n = 2; //if enemy is large do movement n+1 times\r\n\t\tswitch (enemyType) {\r\n\t\tcase DOWN:\r\n\t\t\tmc.moveDown();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveDown();}\r\n\t\t\tbreak;\r\n\t\tcase LEFT:\r\n\t\t\tmc.moveLeft();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveLeft();}\r\n\t\t\tbreak;\r\n\t\tcase RIGHT:\r\n\t\t\tmc.moveRight();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveRight();}\r\n\t\t\tbreak;\r\n\t\tcase UP:\r\n\t\t\tmc.moveUp();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveUp();}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tscreen.enemyDeath.play(.5f);\r\n\t\tdestroy();\r\n\t}", "@Override\n public boolean onActionPointerUp(MotionEvent event) {\n if(isWin()) return true;\n\n int mx = (int) (event.getX(event.getActionIndex()) - cameraX);\n int my = (int) (event.getY(event.getActionIndex()) - cameraY);\n\n TouchHandler cth = TouchHandler.getTouchHandler(event.getPointerId(event.getActionIndex()));\n if(cth != null){\n if(cth.isValid()){\n cth.perform();\n return true;\n }else{\n TouchHandler.removeTouchHandler(cth);\n }\n }\n\n if(this instanceof DungeonState) if(((DungeonState) this).onUp(mx, my)) return true;\n\n if(selectedPc != null){\n float x2, y2;\n\n if(my < GameView.getScreenHeight() / 2) y2 = Utils.max(getMapRect().top + selectedPc.getCollisionBox().height() - selectedPc.getCollisionBox().width() / 5, my);\n else y2 = Utils.min(getMapRect().bottom - selectedPc.getCollisionBox().width() / 5, my);\n if(mx < GameView.getScreenWidth() / 2) x2 = Utils.max(getMapRect().left + selectedPc.getCollisionBox().width() / 2, mx);\n else x2 = Utils.min(getMapRect().right - selectedPc.getCollisionBox().width() / 2, mx);\n ArrayList<Unit> units = new ArrayList<>();\n for(Unit x : Unit.getUnits()){\n if(x.getCollisionBox().contains(mx, my)){\n units.add(x);\n }\n }\n final Unit dst = selectedPc.choosePriorityUnit(units);\n\n if(dst == null){\n if(BattleState.getBattleState() instanceof DungeonState){\n DungeonState.getDungeonState().replayCommandMove(selectedPc, x2 - selectedPc.getCollisionBox().width() / 2, y2 - selectedPc.getCollisionBox().height());\n }\n BattleState.getBattleState().queueEvent(new Object[] {\"move\", selectedPc, x2 - selectedPc.getCollisionBox().width() / 2, y2 - selectedPc.getCollisionBox().height()});\n// selectedPc.setTarget(null);\n// selectedPc.commandMove(x2 - selectedPc.getCollisionBox().width() / 2, y2 - selectedPc.getCollisionBox().height());\n new MoveCommandVisualEffect(x2, y2);\n }else{\n if(BattleState.getBattleState() instanceof DungeonState){\n DungeonState.getDungeonState().replayCommandAttack(selectedPc, dst);\n }\n BattleState.getBattleState().queueEvent(new Object[] {\"attack\", selectedPc, dst});\n// selectedPc.setTarget(dst);\n// selectedPc.performAction();\n new AttackCommandVisualEffect(dst);\n }\n }\n return true;\n }", "public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }", "public void act() \n {\n move(-2);\n\n if(getX() <= 0)\n {\n getWorld().removeObject(this);\n } \n\n }", "@Override\r\n public boolean dye() {\r\n if (getX() > 3100 || getX() < 10 || getY() < 10 || getY() > 3100) {\r\n return true;\r\n }\r\n// int pixel = mapRGB.getRGB((int) getX(), (int) getY());\r\n// int red = (pixel >> 16) & 0xff;\r\n// if(red==255){this.handler.getWaves().removeEnemy(); return true;}\r\n int k = collision(velX, velY, this.getX(), this.getY());\r\n if(k!=0) {\r\n this.handler.getWaves().removeEnemy(); \r\n return true;\r\n }\r\n else{\r\n zombie_x = getX(); \r\n zombie_y = getY();\r\n }\r\n //I proiettili hanno una portata limitata o se ha colpito il player o se è uscito dalla mappa o se è andato contro un muro\r\n if ((this.getHealth() == 0) || (handler.getPlayer().getBounds().contains(getX(), getY()))) {\r\n int n = (int) (Math.random() * 10);\r\n if(n>1) n=2;\r\n switch (n) {\r\n case 2:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 3, 200, 25, handler.getPlayer(), this.handler, 30, 60, 60, 5, new Animation(Assets.zombie, 20), new Animation(Assets.zombieAttack, 35), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 0:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 4, 70, 50, handler.getPlayer(), this.handler, 0, 60, 60, 20, new Animation(Assets.zombie2, 15), new Animation(Assets.zombie2Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 1:\r\n this.handler.addSprite(new SpittleZombie(zombie_x, zombie_y, 3, 500, 40, handler.getPlayer(), this.handler, 0, 60, 60, 45, new Animation(Assets.zombie3, 15), new Animation(Assets.zombie3Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n }\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "private void checkPlayerCollisions() {\r\n\t\tGObject left = getElementAt(player.getX() - 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tGObject right = getElementAt(player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tif(dragon1 != null && (left == dragon1 || right == dragon1)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t\tif(dragon2 != null && (left == dragon2 || right == dragon2)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t}", "public void abortDigging(){\n\t\tint tile = mWorld.get(diggingX, diggingY);\n\t\tint type = tile & MaterialBank.MATERIAL_MASK;\n\t\tint result = type | WorldPhysic.COLLISION_MASK;\n\t\tmWorld.set(diggingX, diggingY, result);\n\t\t\n\t\tswitch(direction){\n\t\tcase DIRECTION_LEFT:\n\t\t\tmPhysic.setPos(World.TILE_SIZE*(diggingX+1), World.TILE_SIZE * diggingY);\n\t\t\tmWorld.computeVideType(diggingX+1, diggingY);\n\t\t\tbreak;\n\t\tcase DIRECTION_RIGHT:\n\t\t\tmPhysic.get2D().setRight(World.TILE_SIZE*diggingX);\n\t\t\tmWorld.computeVideType(diggingX-1, diggingY);\n\t\t\tbreak;\n\t\tcase DIRECTION_DOWN:\n\t\t\tmPhysic.get2D().setBottom(World.TILE_SIZE*diggingY);\n\t\t\tmWorld.computeVideType(diggingX, diggingY-1);\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tmPhysic.setEnabled(true);\n\t\tmIsDigging = false;\n\t\t\n\t\tmAnimation.stop();\n\t}", "public void collisionVS() {\n for (int i = 0; i < enemyBullets.size(); i++) {\n\n enemyBullets.get(i).tick();\n\n if (enemyBullets.get(i).getImgY() >= 750 || enemyBullets.get(i).getImgY() <= 40) {\n\n enemyBullets.get(i).bulletImage.delete();\n enemyBullets.remove(enemyBullets.get(i));\n i--;\n continue;\n }\n\n for (int j = 0; j < spaceShips.size(); j++) {\n\n if (spaceShips.get(j).getHitbox().intersects(enemyBullets.get(i).getHitbox())) {\n\n spaceShips.get(j).hit();\n enemyBullets.get(i).hit();\n enemyBullets.remove(enemyBullets.get(i));\n\n if (spaceShips.get(j).getHp() <= 0) {\n spaceShips.remove(spaceShips.get(j));\n }\n\n //if it collides with one leave the for loop\n i--;\n j = spaceShips.size();\n }\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////////////////////\n\n // SPACESHIPS WITH ENEMIES AND ENEMY BULLETS\n for (int i = 0; i < spaceShips.size(); i++) {\n spaceShips.get(i).tick();\n\n // WITH ENEMIES\n for (int j = 0; j < enemies.size(); j++) {\n if (spaceShips.get(i).getHitbox().intersects(enemies.get(j).getHitbox())) {\n\n spaceShips.get(i).hit();\n enemies.get(j).hit(20);\n enemies.remove(enemies.get(j));\n\n if (spaceShips.get(i).getHp() <= 0) {\n spaceShips.remove(spaceShips.get(i));\n }\n\n //if it collides with one leave the for loop\n j = enemies.size();\n }\n }\n }\n }", "private void fireball2Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball2.getX() - 1, fireball2.getY());\r\n\t\tGObject topRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball2.getX() - 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tGObject bottomRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(fireball2);\r\n\t\t\tfireball2 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "public void deadcheck()\n\t{\n\t\tif (this.shield <= 0)\n\t\t{\n\t\t\tthis.drawMissile = false;\n\t\t}\n\t\telse \n\t\t\tthis.drawMissile = true;\n\t}", "private void playerMoveUp()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentY(this.getCurrentY() - 1);\n if (this.getCurrentY() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else// hit edge redo setlocation\n {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } \n }", "public void collision() {\n for (int i = 0; i < friendlyBullets.size(); i++) {\n\n friendlyBullets.get(i).tick();\n\n if (friendlyBullets.get(i).getImgY() <= 40) {\n friendlyBullets.get(i).bulletImage.delete();\n friendlyBullets.remove(friendlyBullets.get(i));\n i--;\n continue;\n }\n\n for (int j = 0; j < enemies.size(); j++) {\n\n if (friendlyBullets.get(i).getHitbox().intersects(enemies.get(j).getHitbox())) {\n\n friendlyBullets.get(i).hit();\n friendlyBullets.remove(friendlyBullets.get(i));\n i--;\n\n enemies.get(j).hit();\n\n if (enemies.get(j).getHp() <= 0) {\n enemies.remove(enemies.get(j));\n score.setScore(50);\n j--;\n }\n //end this loop\n j = enemies.size();\n }\n }\n\n }\n\n ///////////////////////////////////////////////////////////////////////////////////////\n\n\n // Enemy out of bounds\n for (int i = 0; i < enemies.size(); i++) {\n\n enemies.get(i).tick();\n\n // Out of bounds\n if (enemies.get(i).getEnemyImage().getY() >= 750) {\n enemies.get(i).getEnemyImage().delete();\n enemies.remove(enemies.get(i));\n\n if (enemies.size() > 1) {\n i--;\n }\n }\n }\n\n\n //////////////////////////////////////////////////////////////////////////\n\n //powerUps out of bounds and collision with spaceships\n for (int i = 0; i < powerUps.size(); i++) {\n\n powerUps.get(i).tick();\n\n if (powerUps.get(i).getImgY() >= 745) {\n\n powerUps.get(i).powerUpImage.delete();\n powerUps.remove(powerUps.get(i));\n\n i--;\n continue;\n }\n\n for (int j = 0; j < spaceShips.size(); j++) {\n\n if (spaceShips.get(j).getHitbox().intersects(powerUps.get(i).getHitbox())) {\n\n\n spaceShips.get(j).powerUp(powerUps.get(i).getPowerUpType());\n powerUps.get(i).hit();\n powerUps.remove(powerUps.get(i));\n\n //if it collides with one leave the for loop\n i--;\n j = spaceShips.size();\n }\n }\n\n }\n\n }", "public void checkForDeath()\n {\n Bullet2 bullet2 = new Bullet2(getVelocity(), getRotation());\n myWorld2 world = (myWorld2)getWorld();\n Zombie2 zombie = new Zombie2();\n \n if (isTouching(Bullet2.class))\n {\n health -= bullet2.damage;\n \n if(health < 0)\n {\n world.score(2);\n world.removeObject(this);\n } \n }\n else if (getX() == 900) \n {\n world.score(-1);\n world.removeObject(this);\n } \n }", "void object_calculations_doesnt_touch_ground(){\n if(angle_with_ground>0&&down_angle>0&&up_angle<0)\n object_on_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle<0&&up_angle<0)\n object_upper_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle>0&&up_angle>0)\n object_below_eyes_level_calc();\n }", "void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }", "public void removeHitListener(HitListener hl) {\nthis.hitListeners.remove(hl);\n}", "public void hitEvent(Collidable beingHit, Fire bullet) {\r\n int index = this.enemies.indexOf((Enemy) beingHit);\r\n this.removeEnemy((Enemy) beingHit);\r\n this.startLocations.remove(index);\r\n }", "void despawnHitbox() {\n\t\tif (hitbox == null) return;\n\t\thitbox.remove();\n\t\thitbox = null;\n\t}", "public void noCollision(){\r\n this.collidingEntity2=null;\r\n this.collidingEntity=null;\r\n collidedTop=false;\r\n collide=false;\r\n }", "private void intersectBulletWithEnemy(Entity bullet, Entity enemy){\n\n //TODO implement health/damage system for enemies\n room.removeEntity(enemy);\n room.getEntityManager().removeEntity(enemy);\n\n //delete the bullet\n room.getEntityManager().removeEntity(bullet);\n ((WeaponComponent) player.getComponent(ComponentType.WEAPON)).getBullets().removeEntity(bullet);\n\n }", "void check(){\n if(!data.up.isEmpty()){\r\n if(data.floor == data.up.get(0)){\r\n data.up.remove(0);\r\n data.state = 0;\r\n data.statePrv = 1;\r\n data.isMoving = false;\r\n }\r\n }\r\n if(!data.down.isEmpty()){\r\n if(data.floor == data.down.get(0)){\r\n data.down.remove(0);\r\n data.state = 0;\r\n data.statePrv = -1;\r\n data.isMoving = false;\r\n }\r\n }\r\n }", "private void checkPlayerCollisions(int x, int y){\n\t\tint wHitBoxX = 100;\n\t\tint wHitBoxY = 150;\n\t\t\n\t\tfor(int i = 0; i<enemy_num; i++){\n\t\t\tfor(int j = 0; j<enemy_arrow_num[i]; j++){\n\t\t\t\tif(enemy_arrows[i][j][0] > x && enemy_arrows[i][j][0] < (x+wHitBoxX)){\n\t\t\t\tif(enemy_arrows[i][j][1] > y && enemy_arrows[i][j][1] < (y+wHitBoxY)){\n\t\t\t\t \tremove_arrow(i,j);\n\t\t\t\t}}\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t}", "public void touchGhost() \n { \n if (getOneIntersectingObject(Ghosts.class) != null)\n Level1.transitionToGameLoseWorld(); \n // transfer to game lose would when the main character thouch the ghost\n }", "private boolean checkUpSpace(Position p,\n int len, int leftWid, int rightWid) {\n int x = p.x;\n int y = p.y;\n for (int j = y; j < y + len; j += 1) {\n for (int i = x - leftWid; i < x + rightWid + 1; i += 1) {\n if (j >= worldHeight) {\n return false;\n }\n if (i < 0 || i >= worldWidth) {\n return false;\n }\n if (!world[i][j].equals(Tileset.NOTHING)) {\n return false;\n }\n }\n }\n return true;\n }", "private void death(int x, int y) {\n // TODO Auto-generated method stub\n fieldInerface.setSadSmile();\n fieldInerface.timestop();\n gamestart = true;\n for (int j = 0; j < heightOfField; j++)\n for (int i = 0; i < widthOfField; i++)\n if ((i != x) || (j != y)) {\n if (fieldManager.isCellMined(i, j))\n if (!fieldManager.isCellMarked(i, j))\n fieldInerface.putMineToButton(i, j);\n else\n ;\n else if (fieldManager.isCellMarked(i, j))\n fieldInerface.putMistakeToButton(i, j);\n }\n gameover = true;\n }", "@Override\n\tpublic void update() {\n\t\tif(isMove) {\n\t\t\tspriteMoveToPoint(player, (int) mouseX, (int) mouseY);\n\t\t}\n\t\t\n\t\t//bullet\n\t\tfor(int i = 0; i < bulletList.size(); i++) {\n\t\t\tMoveSprite bullet = bulletList.get(i);\n\t\t\tspriteMoveToPoint(bullet, bullet.getX(), bullet.getY() - bullet.getVelocity());\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < bulletList.size(); i++) {\n\t\t\tMoveSprite bullet = bulletList.get(i);\n\t\t\t\tif(bullet.getY() < 10) {\n\t\t\t\t\tremoveBullet(bullet);\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t//enemy\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tMoveSprite enemy = enemyList.get(i);\n\t\t\tspriteMoveToPoint(enemy, enemy.getX(), enemy.getY() + enemy.getVelocity());\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tMoveSprite enemy = enemyList.get(i);\n\t\t\tif(enemy.getY() > layerheight) {\n\t\t\t\tremoveEnemy(enemy);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tEnemy enemy = enemyList.get(i);\n\t\t\tfor(int j = 0; j < bulletList.size(); j++) {\n\t\t\t\tBullet bullet = bulletList.get(j);\n\t\t\t\tcollisionCheckForBulletAndEnemy(enemy, bullet);\n\t\t\t}\n\t\t}\n\t}", "private void bulletMoveOffScreen() {\r\n\t\tif(bullet != null && (bullet.getX() > getWidth() || bullet.getX() < 0)){\r\n\t\t\tremove(bullet);\r\n\t\t\tbullet = null;\r\n\t\t}\r\n\t}", "private void intersectSwordWithEnemy(Entity sword, Entity enemy){\n\n //TODO implement health/damage system for enemies\n room.removeEntity(enemy);\n room.getEntityManager().removeEntity(enemy);\n ((WeaponComponent) player.getComponent(ComponentType.WEAPON)).getBullets().removeEntity(sword);\n\n\n }", "@Override\n public boolean checkCollideSingle(GameObject gameObject, int x, int y) {\n if (!(gameObject instanceof Player) || !isAlive())\n return false;\n\n boolean result = super.withinRange(x, y);\n\n if (result) {\n if (prev + (hitInterval * 10) < System.currentTimeMillis()) {\n prev = System.currentTimeMillis();\n startHitTime = prev + 300;\n startHit = true;\n }\n }\n\n if (result) {\n if (startHitTime < System.currentTimeMillis() && startHit) {\n HUD.getInstance().removeHealth(getDamage());\n setStatus(PlayerStatus.FIGHTING);\n startHit = false;\n }\n }\n\n return result;\n }", "@Override\r\n\tpublic void Collision(Entity e)\r\n\t{\r\n\t\tthis.isAlive = false;\r\n\t}", "@Override\r\n public boolean onEliminar(Vector3f vel) {\n return false;\r\n }", "@Override\n public void hitEvent(Block beingHit, Ball hitter) {\n //checking if we hit the death block\n //creating the upper left point of the death block\n Point upLeftDeathBlock = new Point(0.0, 600.0);\n if (beingHit.getCollisionRectangle().getUpperLeft().equals(upLeftDeathBlock)) {\n hitter.removeFromGame(this.gameLevel);\n this.remainingBalls.decrease(1);\n return;\n }\n //in regular cases\n return;\n\n }", "void getBlowUp(int x, int y) {\n //YOUR CODE HERE\n\t whichBoard.remove(x, y);\n }", "void removeBall(Coordinates at);", "void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }", "private void bounceOffVerticalWall() {\n vx = -vx;\n }", "private void update() {\n if (this.target != null) {\r\n if (this.target.getX() > this.x + this.size / 2\r\n || this.target.getX()\r\n + this.target.getSize() < this.x - this.size / 2) {\r\n this.target = null;\r\n this.firing = false;\r\n }\r\n }\r\n if (this.target != null) {\r\n if (this.target.getY() > this.y + this.size / 2\r\n || this.target.getY() + this.target.getSize()\r\n < this.y - this.size / 2) {\r\n this.target = null;\r\n this.firing = false;\r\n }\r\n }\r\n }", "private boolean isEnemyNotToFarAwayFromSpawnPoint(final LinkedList<Fightable> kis, final NonStatic enemy) {\n\t\tfor (Fightable ki : kis) {\n\t\t\tif (Points.distBetweenTwoPoints(enemy.getCoord(), ki.getSpawnPoint()) \n\t\t\t\t\t< ki.getAttributeValue(Attribute.viewRange) * VIEWRANGE_FACTOR) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "void checkPositions() {\n //check if any bullets have hit any asteroids\n for (int i = 0; i < bullets.size(); i++) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHit(bullets.get(i).pos)) {\n shotsHit++;\n bullets.remove(i);//remove bullet\n score +=1;\n break;\n }\n }\n }\n //check if player has been hit\n if (immortalityTimer <=0) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHitPlayer(position)) {\n playerHit();\n }\n }\n }\n }", "public void collide(){\n hp -= 10;\n resetPos();\n //canMove = false;\n }", "public void dropItLikeItsHot(){\n\t\tint score_increment = 0;\n\t\tPoint test_location = new Point(pieceOrigin);\n\t\twhile(true){\n\t\t\ttest_location.y += 1;\n\t\t\tif(!collides(test_location, currentPiece)){\n\t\t\t\tpieceOrigin.y += 1;\n\t\t\t\tscore_increment += 1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tscore += score_increment*100;\n\t\tgossipGirl();\n\t\trepaint();\n\t}", "boolean collidesEnemy() {\n for(int i = 0; i < barrage.size(); i++) {\n // establish a rectangle for the laser\n Rectangle blaster = new Rectangle((int)barrage.get(i).getX(), (int)barrage.get(i).getY(), WIDTH, HEIGHT);\n \n // determine if the laser intersects an enemy\n for (int q = 0; q < fleet.size(); q++) {\n Rectangle enemy = new Rectangle((int)fleet.get(q).getX(), (int)fleet.get(q).getY(), 40, 36); \n \n // if blaster hits a ship, remove it\n if (blaster.intersects(enemy) && fleet.get(q).getCount() == 0) {\n fleet.get(q).hit = true; // set the enemy hit\n barrage.remove(barrage.get(i));\n score += 100; // add to score\n return true; // hit\n }\n }\n }\n return false; // miss\n }", "private void hit(GObject element) {\r\n\t\tremove(bullet);\r\n\t\tbullet = null;\r\n\t\thitGraphic(element);\r\n\t\tif(element == dragon1) {\r\n\t\t\tlifeArray[DRAGON_ONE]--;\r\n\t\t\tif(lifeArray[DRAGON_ONE] < 1) {\r\n\t\t\t\tremove(dragon1);\r\n\t\t\t\tdragon1 = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(element == dragon2) {\r\n\t\t\tlifeArray[DRAGON_TWO]--;\r\n\t\t\tif(lifeArray[DRAGON_TWO] < 1) {\r\n\t\t\t\tremove(dragon2);\r\n\t\t\t\tdragon2 = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(element == mehran) {\r\n\t\t\tlifeArray[MEHRAN]--;\r\n\t\t\tif(lifeArray[MEHRAN] < 1) {\r\n\t\t\t\tremove(mehran);\r\n\t\t\t\tmehran = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void checkDeath() {\n\t\tif (player.getLives() == 0) {\n shooty.setIv(new Image(\"/img/shipdeath.png\"));\n\t\t\tdie();\n\t\t}\n\t\t// another way to die: the blocks hit you\n\t\tif(btnList.get(0).getLayoutY() >= FATAL_BUTTON_DIST) {\n\t\t\tendGame.play();\n\t\t\tdie();\n\t\t}\n\t}", "boolean outOfSight();", "private void killBullet() {\r\n this.dead = true;\r\n }", "public void removeObstacle(Coord obstacleCoord);", "@Override\n public void removed(Entity e) {\n AI ai = AIm.get(e);\n if (ai.active) {\n ai.active = false;\n startMove = startAction = true;\n groupAiDone= false;\n screen.processTurn();\n // Future note: This transition comes quite abruptly.\n // It would be nice to somehow delay it, but because\n // the entity has just been removed, it won't be\n // processed any more. Perhaps give processTurn()\n // a boolean argument which will pause for a second\n // or so before selecting the new entity and moving\n // the camera on.\n\n }\n }", "@Override\n public boolean collide(Entity e) {\n if (e.isExplosion() || (e.isBomb() && (((Bomb) e).isMissile()))) {\n kill();\n ArrayList<Mob> m = Board.getInstance().getMobsAtExcluding(this.getXTile(), this.getYTile(), this);\n for (Mob mob1 : m) {\n if (mob1.isAlive()) {\n mob1.kill();\n }\n }\n return true;\n }\n return false;\n }", "public void checkEnemy() {\n\t\tif (enemy != null)\n\t\tif (Integer.parseInt(getCurrentPositionX()) == enemy.getCurrentPositionX() && Integer.parseInt(getCurrentPositionY()) == enemy.getCurrentPositionY()) {\n\t\t\tx = spawnX;\n\t\t\ty = spawnY;\n\t\t}\n\t}", "public void shootNoHit(Board enemyBoard) \r\n {\r\n \t//Condition is used so that coords will be rechosen until they work.\r\n \tboolean condition = true;\r\n \twhile(condition == true) \r\n \t{\r\n \t\tsetCoords();\r\n \t\tboolean shot = enemyBoard.checkShot(getCoordX(), getCoordY());\r\n \t\t\r\n \t\tif(shot == true) \r\n \t\t{\r\n \t\t\tSystem.out.println(getCoordX() + \" \" + getCoordY());\r\n \t\t\tcondition = false;\r\n \t\t\t\r\n \t\t}\r\n\r\n \t}\r\n \t//This checks whether or not the ai will have hit anything in the current turn\r\n \tboolean shotHitOrNot = enemyBoard.shotFired(getCoordX(), getCoordY());\r\n \r\n \tif(shotHitOrNot = true) \r\n \t{\r\n \t\tthis.hitLastTurn = false;\r\n \t}\r\n \telse \r\n \t{\r\n \t\tthis.hitLastTurn = false;\r\n \t}\r\n \t\r\n }", "public void act() \n {\n advance(); // move forward in the correct direction\n\n if(canSee(Ground.class) || atWorldEdge()) {\n getWorld().removeObject(this);\n return; \n }\n\n bImpact();\n takeExplosionTimer();\n }", "private void checkCollision()\n {\n if (gameOverBool==false)\n { \n Actor a = getOneIntersectingObject(Wall.class);\n if (a != null||isAtEdge())\n {\n setImage(\"gone.png\");//laat de helicopter verdwijnen\n //greenfoot.GreenfootSound.stop(\"helisound.wav\");\n World world = getWorld();\n world.addObject(new Explosion(), getX(), getY());\n Greenfoot.playSound(\"heliExplosion.wav\");\n world.addObject( new Gameover(), 600, 300 );\n gameOverBool = true; \n }\n } \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 collideWithBall() {\n die();\n }", "private void handleCollisions() {\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tcheckInvaderDeath(a);\n\t\t\t\tcheckPlayerDeath(a);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (Shot s : enemyShotList) {\n\t\t\t\n\t\t\tif (s.detectDownwardCollision(player.getX(), player.getY())) {\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcollectPowerUp(armorPiercing);\n\t\tcollectPowerUp(explosive);\n\t}", "@Override\n public void processInput(Vector2f m) {\n\n //Check if mouse within bounds, if so, kill it\n if (mouse.buttonDown(MouseEvent.BUTTON1)) {\n if (m.x < this.tx + 800 && m.x > this.tx - 800 && m.y < this.ty + 800 && m.y > this.ty - 800) {\n this.shotDown = true;\n }\n }\n\n }", "@Test\n public void collidableRemoved() {\n radar.loop();\n assertTrue(radar.getObjectsSeenByRadar().stream().anyMatch(t -> t.getId().equals(\"tree_3\")));\n radar.loop();\n assertFalse(radar.getObjectsSeenByRadar().stream().anyMatch(t -> t.getId().equals(\"tree_3\")));\n }", "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 }", "public void moveTowards(){\n \n \n \n if(!exploded){\n \n \n move(speed);\n \n if(isTouching(Enemy.class)){\n move(explosionRadius); \n \n inRange = (ArrayList) getObjectsInRange(explosionRadius + 25, Enemy.class);\n for(Enemy e : inRange){\n e.hit(damage);\n }\n \n //explode\n exploded = true;\n \n image = new GreenfootImage(\"50x50 aoe.png\");\n image.scale(explosionRadius*2, explosionRadius*2);\n setImage(image);\n //getWorld().removeObject(this);\n }\n else if (isAtEdge())\n {\n getWorld().removeObject(this);\n }\n else if ( radius < distance) {\n getWorld().removeObject(this); \n }\n }\n else{\n setImage(image);\n image.setTransparency(image.getTransparency() - 5);\n if(image.getTransparency() <= 0) getWorld().removeObject(this);\n }\n }", "public void unFollowing() {\n\t\tdouble newTargetX, newTargetY, xValue, yValue;\n\t\tdouble slope = (kin.target.y - kin.position.y) / (kin.target.x - kin.position.x);\n\t\t\n\t\t// off to the left of the screen\n\t\tif (kin.position.x < kin.target.x) {\n\t\t\tnewTargetY = (MainPanel.PWIDTH + img.getWidth() - kin.target.x) * slope + kin.target.y;\n\t\t\txValue = MainPanel.PWIDTH + img.getWidth();\n\t\t} else { // off the right of the screen\n\t\t\tnewTargetY = (-kin.target.x - img.getWidth()) * slope + kin.target.y;;\n\t\t\txValue = -img.getWidth();\n\t\t}\n\t\t\n\t\t// off to the top of the screen\n\t\tif (kin.position.y < kin.target.y) {\n\t\t\tnewTargetX = (MainPanel.PHEIGHT + img.getHeight() - kin.target.y) / slope + kin.target.x;\n\t\t\tyValue = MainPanel.PHEIGHT + img.getHeight();\n\t\t} else { // off the bottom of the screen\n\t\t\tnewTargetX = (-kin.target.y - img.getHeight()) / slope + kin.target.x;\n\t\t\tyValue = -img.getHeight();\n\t\t}\n\t\t\n\t\t// compare distances and use the minimum as target\n\t\tif (getDistance(kin.position.x, kin.position.y, xValue, newTargetY) < getDistance(kin.position.x, kin.position.y, newTargetX, yValue)) {\n\t\t\tkin.target = new Vector2d(xValue, newTargetY);\n\t\t} else {\n\t\t\tkin.target = new Vector2d(newTargetX, yValue);\n\t\t} // end else\n\t}", "public void updatePosition()\r\n\t{\r\n\t\tsuper.updatePosition();\r\n\t\t\r\n\t\t// Update the bomb's position\r\n\t\tPoint nextPosition = getPath().getLocation(t++);\r\n\t\tsetX(nextPosition.x + startX);\r\n\t\tint nextY = nextPosition.y + startY;\r\n\t\tsetY(nextY);\r\n\t\t\r\n\t\t// Blow the bomb up after it reaches mid screen\r\n\t\tif (t > 120 || (nextY < (Global.WINDOW_HEIGHT >> 1) && t > 30))\r\n\t\t{\r\n\t\t\tbombSound.stop();\r\n\t\t\tsuper.remove();\r\n\t\t\tGamePanel.makeExplosion(getX(), getY());\r\n\t\t\t\r\n\t\t\t// Injure all the enemies on the screen\r\n\t\t\t\r\n\t\t\tArrayList<Sprite> sprites = GamePanel.getSprites();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < sprites.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tif (sprites.get(i) instanceof Enemy)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy enemy = (Enemy) sprites.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t\tint currentYTop = GamePanel.getLevel().getCurrentY() +\r\n\t\t\t\t\t\tBLOCKS_PER_Y - 1;\r\n\t\t\t\t\tboolean visibleX = enemy.getX() + enemy.getWidth() >= 0 &&\r\n\t\t\t\t\t\tenemy.getX() <= Global.WINDOW_WIDTH;\r\n\t\t\t\t\tboolean yOnScreen = enemy.getY() <= Global.WINDOW_HEIGHT +\r\n\t\t\t\t\t\t100;\r\n\t\t\t\t\tboolean visibleY = enemy.getYBlock() >= currentYTop &&\r\n\t\t\t\t\t\tyOnScreen;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (visibleX && visibleY && enemy.isAlive())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tenemy.offsetHealth(-300);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (enemy.getHealth() <= 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tenemy.remove();\r\n\t\t\t\t\t\t\tGamePanel.offsetNumLevelPoints(100);\r\n\t\t\t\t\t\t\tGamePanel.makeExplosion(enemy.getX(), enemy.getY());\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}\r\n\t\t}\r\n\t}", "public void checkHits() {\n\t\t// your code here\n\t\tfor (int i = 0; i < enemyX.length; i++) {\n\t\t\tif (distance((int)xI, (int)yI, enemyX[i], enemyY[i]) <= DIAM_ENEMY/2 + DIAM_LAUNCHER/2) {\n\t\t\t}\n\t\t}\n\t}", "public static boolean removeOccupied(int i, int j) {\r\n\t\tif (occupiedExists(i, j))\r\n\t\t\treturn _playerOccupied.remove(new Point(i, j));\r\n\t\treturn false;\r\n\t}" ]
[ "0.6507068", "0.6305416", "0.62987727", "0.62987316", "0.62848634", "0.6259138", "0.62375295", "0.6158748", "0.6146576", "0.61360073", "0.6128521", "0.61174136", "0.6097946", "0.60490084", "0.60327005", "0.60303503", "0.6024977", "0.60068977", "0.6001956", "0.5997652", "0.5989081", "0.5985804", "0.5979056", "0.5965253", "0.5951543", "0.5927968", "0.59044194", "0.5899268", "0.58957326", "0.5895045", "0.5860987", "0.585777", "0.585642", "0.58498627", "0.5848769", "0.58460367", "0.58402216", "0.5839469", "0.5838525", "0.5836492", "0.5833033", "0.5832625", "0.582961", "0.5814187", "0.58141655", "0.58069235", "0.58017", "0.57963246", "0.57922506", "0.5791687", "0.5791261", "0.5790085", "0.5781811", "0.577334", "0.5772401", "0.5770105", "0.5762586", "0.57617056", "0.575999", "0.5758752", "0.5754695", "0.5754068", "0.57505274", "0.5745122", "0.57426363", "0.5717474", "0.57116586", "0.57097423", "0.5704501", "0.5689573", "0.56828284", "0.5680502", "0.56691694", "0.5668368", "0.5667964", "0.5666967", "0.56656265", "0.5662232", "0.5660517", "0.56510824", "0.5639663", "0.5624525", "0.5607476", "0.5594929", "0.5585911", "0.5582823", "0.55823916", "0.5578724", "0.55726", "0.5568576", "0.55638045", "0.55572534", "0.5552158", "0.55381095", "0.55379325", "0.55375665", "0.553532", "0.55313087", "0.5530856", "0.5530486" ]
0.7494942
0
check if the enemy is damaged
public int getDamage() { //TODO return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "public static boolean monsterDeathCheck(){\n if (currentMonster.currentHp <= 0){\n return true;\n }\n return false;\n }", "public boolean getDamage(){\n\t\tdie();\n\t\treturn false;\n\t}", "boolean takeDamage(int dmg);", "public void checkDeath()\n {\n if (player.getY() >= 549)\n {\n gameOver();\n }\n }", "boolean takeDamage(DamageCount damage);", "public boolean isFireDamage();", "public boolean attackEntityFrom(DamageSource source, int damage)\r\n {\r\n if (damage > 15) { return true; }\r\n\r\n return false;\r\n }", "private void checkVictory()\n {\n if(throne.getEnemyHealth() <= 0)\n {\n System.out.println(\"Congrats! The land is now free from all chaos and destruction. You are now very rich and wealthy. Yay\");\n alive = false;\n }\n }", "float shouldAggroOnHit(IGeneticMob geneticMob, EntityLiving attacker);", "public void gotDamaged() {\n \tif(!dead) {\n\t\t\tdamaged = true;\n\t\t\tgettingHitParticleEffect.reset();\n\t\t\tcolorValue = 0;\n\t\t}\n\n }", "private void enemyturn() {\n if (enemy.getHealth() == 0) { // check if the enemy is still alive\n enemy.setAlive(false);\n }\n\n if (enemy.getAlive()) { // if he is alive\n // time to fuck the players day up\n System.out.println(\"\");//formatting\n System.out.println(enemy.getName() + \" attacks you!\");\n\n // calculate the damage this enemy will do\n int differenceHit = enemy.getMaxHit() - enemy.getMinHit(); // difference will be 0-3. But plus 1 (as the result will ALWAYS be +1 in the randomizer so a \"0\" will not happen.\n int minimumDamage = randomize.getRandomDamage(differenceHit); // for example, will return 0-4 if the min and max hit was 4-7. Then do a -1. Making it a 0-3 chance.\n int damage = differenceHit + minimumDamage; // add the minimum damage, to random hit damage.\n\n // calculate the players armor\n damage = damage - player.getPlayerArmorRating();\n if (damage <= 0){\n System.out.println(\"... but you dont take any damage because of your armor!\");\n } else {\n\n System.out.println(\"You take \" + damage + \" damage!\");\n player.removeHealth(damage);\n }\n\n } else { // when ded\n System.out.println(\"The enemy has no chance to fight back. As your final blow killed the enemy.\");\n }\n }", "private void checkDeath() {\n\t\tif (player.getLives() == 0) {\n shooty.setIv(new Image(\"/img/shipdeath.png\"));\n\t\t\tdie();\n\t\t}\n\t\t// another way to die: the blocks hit you\n\t\tif(btnList.get(0).getLayoutY() >= FATAL_BUTTON_DIST) {\n\t\t\tendGame.play();\n\t\t\tdie();\n\t\t}\n\t}", "public void deadcheck()\n\t{\n\t\tif (this.shield <= 0)\n\t\t{\n\t\t\tthis.drawMissile = false;\n\t\t}\n\t\telse \n\t\t\tthis.drawMissile = true;\n\t}", "public static boolean calcHitMiss(L2Character attacker, L2Character target)\n\t{\n\t\tdouble chance = 800 + 20 * (attacker.getAccuracy() - target.getEvasionRate(attacker));\n\n\t\t//if (attacker instanceof L2PcInstance && target instanceof L2PcInstance)\n\t\t//\tLog.info(\"P: \" + attacker.getAccuracy() + \" \" + target.getEvasionRate(attacker) + \": \" + chance);\n\n\t\t// Get additional bonus from the conditions when you are attacking\n\t\tchance *= hitConditionBonus.getConditionBonus(attacker, target);\n\n\t\tchance = Math.max(chance, 200);\n\t\tchance = Math.min(chance, 980);\n\n\t\tif (attacker instanceof L2PcInstance)\n\t\t{\n\t\t\tfinal L2PcInstance player = (L2PcInstance) attacker;\n\t\t\tif (player.getExpertiseWeaponPenalty() != 0)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn chance < Rnd.get(1000);\n\t}", "public void checkForDeath()\n {\n Bullet2 bullet2 = new Bullet2(getVelocity(), getRotation());\n myWorld2 world = (myWorld2)getWorld();\n Zombie2 zombie = new Zombie2();\n \n if (isTouching(Bullet2.class))\n {\n health -= bullet2.damage;\n \n if(health < 0)\n {\n world.score(2);\n world.removeObject(this);\n } \n }\n else if (getX() == 900) \n {\n world.score(-1);\n world.removeObject(this);\n } \n }", "private void checkDeathCondition() {\n float speed = body.getLinearVelocity().x;\n if (prevSpeed >= 0.1 && speed < 0.1)\n kill();\n prevSpeed = speed;\n }", "public abstract boolean attack(Enemy w);", "private boolean shootAt(Enemy enemy) {\n if (nextAttack == 0) {\n enemy.setHealth(enemy.getHealth() - tower.getDamage());\n shotEnemy = enemy;\n return true;\n }\n return false;\n }", "@Override\n\tpublic int attack( ){\n\t\treturn enemy.attack();\n\t}", "private void subtractEnemySheild(int damage) {\n this.enemyShield -= damage;\n }", "@Override\n public boolean onCollision(Enemy e) {\n if (!e.doesDamage()) {\n e.setVisible(false);\n return false;\n } else {\n //do damage\n return true;\n }\n }", "public boolean takeDamage(int[] damage){\n int damageTaken = 0;\n\n if(damage[0] == 1){\n damageTaken = damage[1] - endurance;\n if(damageTaken < 0) damageTaken = 0;\n System.out.println(type + \" took \" + damageTaken + \" damage\\n\");\n }else if(damage[0] == 2){\n damageTaken = damage[1] - willpower;\n if(damageTaken < 0) damageTaken = 0;\n System.out.println(type + \" took \" + damageTaken + \" damage\\n\");\n }\n healthPoints -= damageTaken;\n return healthPoints > 0;\n }", "private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }", "public boolean checkIfPlayerHoldsExplosive () { return noOfExplosives > 0; }", "public static void damageStep () {\r\n // rough plan:\r\n // #1: flip defending monster, if face down -> see flipMonster(...);\r\n // #2: Ask CPU and player for possible effect negation! (For an attack negation it is too late!) -> see below in this method\r\n // #3: calculate damage, kill monsters, if needed\r\n // (consider also banishing and immunity, also copied passive effect of (Holy) Lance)\r\n // -> see makeDamageCalculation(...);\r\n // #4: decrease life points, if needed -> see isDealingBattleDamageAndContinuingGame(...);\r\n // #5: consider passive (also copied) trap monster effects -> see possibleSuicideEffect(...);\r\n // #6: display Win/Lose dialog and end match, if needed -> see Game.over(...);\r\n // #7: finally end the attack (consider the effects that happen afterwards), thus allowing the next attack -> endDamageStep(...);\r\n \r\n // about #1:\r\n if (Game.ActiveGuardingMonster.isFaceDown) {flipMonster(Game.ActiveGuardingMonster);}\r\n // about #2:\r\n if (Game.ActiveAttackingMonster.canBeNegated() || Game.ActiveGuardingMonster.canBeNegated()) {\r\n AIinterrupts.cpuIsUsingEffectNegateDuringBattlePhase(); // ask CPU to negate effects first\r\n // ask player to negate effect here\r\n boolean isCanceling = false;\r\n boolean hasEffectNegateHandTrap = Hand.lookForEffectNegateOnHand(true);\r\n boolean hasEffectNegateOnField = Hand.lookForEffectNegateOnField(true);\r\n if (hasEffectNegateHandTrap || hasEffectNegateOnField) {\r\n if (hasEffectNegateHandTrap && !hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (!hasEffectNegateHandTrap && hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n else {\r\n int intDialogResult = YuGiOhJi.multipleChoiceDialog(\"Do you want to negate effects on the field?\", \"You can negate passive effects.\", new String[]{\"yes, by discarding Neutraliser\", \"yes, by paying the cost worth 1 card\", \"no (default)\"}, \"no (default)\");\r\n if (intDialogResult==0) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (intDialogResult==1) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n }\r\n }\r\n if (!isCanceling) {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n }\r\n else {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n \r\n }", "private static void checkForEnemies() throws GameActionException {\n //No need to hijack code for structure\n if (rc.isWeaponReady()) {\n // basicAttack(enemies);\n HQPriorityAttack(enemies, attackPriorities);\n }\n \n //Old splash damage code\n //Preserve because can use to improve current splash damage code\n //But not so simple like just checking directions, since there are many more \n //locations to consider hitting.\n /*if (numberOfTowers > 4) {\n //can do splash damage\n RobotInfo[] enemiesInSplashRange = rc.senseNearbyRobots(37, enemyTeam);\n if (enemiesInSplashRange.length > 0) {\n int[] enemiesInDir = new int[8];\n for (RobotInfo info: enemiesInSplashRange) {\n enemiesInDir[myLocation.directionTo(info.location).ordinal()]++;\n }\n int maxDirScore = 0;\n int maxIndex = 0;\n for (int i = 0; i < 8; i++) {\n if (enemiesInDir[i] >= maxDirScore) {\n maxDirScore = enemiesInDir[i];\n maxIndex = i;\n }\n }\n MapLocation attackLoc = myLocation.add(directions[maxIndex],5);\n if (rc.isWeaponReady() && rc.canAttackLocation(attackLoc)) {\n rc.attackLocation(attackLoc);\n }\n }\n }//*/\n \n }", "public void checkHits() {\n\t\t// your code here\n\t\tfor (int i = 0; i < enemyX.length; i++) {\n\t\t\tif (distance((int)xI, (int)yI, enemyX[i], enemyY[i]) <= DIAM_ENEMY/2 + DIAM_LAUNCHER/2) {\n\t\t\t}\n\t\t}\n\t}", "private void subtractEnemyHealth(int damage) {\n this.enemyShipHealth -= damage;\n }", "int attack(Unit unit, Unit enemy);", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "@Override\n protected void doCheckEffect ()\n {\n List<LivingEntity> entities = getLivingEntities(1.5);\n if (entities.size() > 0)\n {\n for (LivingEntity entity : entities)\n {\n if (entity.getUniqueId() == player.getUniqueId())\n continue;\n\n entity.damage(usesModifier * 2, player);\n\n kill();\n return;\n }\n }\n\n // if the spell has hit a solid block, the projectile is stopped and wont go further so kill the spell\n if (hasHitTarget())\n kill();\n }", "public void takeDamage()\n {\n if(getWorld()!= null)\n {\n if(this.isTouching(Enemies.class))\n {\n Life = Life - Enemies.damage;\n if(Life <=0)\n {\n getWorld().removeObject(this);\n Store.wealth += Game.credit;\n }\n }\n }\n }", "public void checkIfAlive()\n {\n if(this.health<=0)\n {\n targetable=false;\n monstersWalkDistanceX=0;\n monstersWalkDistanceY=0;\n this.health=0;\n new TextureChanger(this,0);\n isSelected=false;\n if(monsterType==1)\n {\n visible=false;\n }\n if(gaveResource==false) {\n int gameResource = Board.gameResources.getGameResources();\n Board.gameResources.setGameResources(gameResource + resourceReward);\n gaveResource=true;\n }\n }\n }", "public static boolean characterDeathCheck(){\n if (MainCharacter.hpNow <= 0){\n return true;\n }\n return false;\n }", "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "public void move1(Pokemon enemy){\n int randCrit = (int)(22 * Math.random()+1);\n boolean crit = false;\n boolean superEffective = false;\n boolean reduced = false;\n boolean moveHit = true;\n\n //CHANGE ATTACK TO FALSE IF MOVE DOES NO DAMAGE<<<<<<<<<<<<<\n boolean attack = true;\n //CHANGE TYPE TO TYPE OF MOVE POWER AND ACCURACY<<<<<<<<<<<<<\n String type = \"Dark\";\n int power = 70;\n int accuracy = 100;\n\n //DO NOT CHANGE BELOW THIS\n int damage = ((CONSTANT * power * ( getAtt() / enemy.getDef() )) /50);\n if(randCrit == CONSTANT){\n damage = damage * 2;\n crit = true;\n }\n if(checkSE(type,enemy.getType())){\n damage = damage * 2;\n superEffective = true;\n }\n if(checkNVE(type, enemy.getType())){\n damage = damage / 2;\n reduced = true;\n }\n if(attack && hit(accuracy)){\n enemy.lowerHp(damage);\n }\n else{\n if(hit(accuracy)){\n //DO STATUS EFFECT STUFF HERE (ill figure out later)\n }\n\n }\n lowerM1PP();\n }", "private void checkForDeaths() {\n Iterator<Entity> entityIter = this.entities.iterator();\n\n //geht alle teilnehmer durch\n while ( entityIter.hasNext() ) {\n Entity entity = entityIter.next();\n\n //und entfernt sie wenn sie tot sind aus der liste und der engine\n if ( this.combatMapper.get(entity).curHealth <= 0 ) {\n entityIter.remove();\n\n //alle actions der entity entfernen, können ja nichts machen wenn sie tot sind\n Iterator<IAction> actionIter = this.actions.iterator();\n\n while ( actionIter.hasNext() ) {\n if ( actionIter.next().getOwner().equals(entity) ) {\n actionIter.remove();\n }\n }\n\n this.combatExp += this.combatMapper.get(entity).level * 5; //TODO\n\n EventSystem.getInstance().commitEvent(new Event(EventSystem.EventType.KILL_EVENT, entity));\n\n this.combatSystem.getEngine().removeEntity(entity);\n }\n }\n }", "public boolean handleAttack(Action action) {\n ActorState a = action.getActor();\n if (a.getActor() == actor) {\n // Attacks on oneself always succeed, and we don't want to add ourselves as an enemy\n return true;\n }\n \n //maybeCounter(Augmentation.Type.ATTACK, a, combatants);\n enemies.add(a);\n \n double weaponAccuracy = 1.0; //source.getWeaponAccuracy(action);\n double chance = a.getAccuracy() * weaponAccuracy * (1.0 - getDefense());\n boolean success = Math.random() < chance;\n return success;\n }", "@Override\r\n\tpublic void recieveHit() {\n\t\tif(armour <= 0) {\r\n\t\t\tSystem.out.println(\"Enemy Destroyed\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdouble calculateHitDamage = shot * basicDamage;\r\n\t\t\tif(calculateHitDamage == armour) {\r\n\t\t\t\tarmour = armour - calculateHitDamage;\r\n\t\t\t\tSystem.out.println(\"Enemy Armour Destroyed!!!\");\r\n\t\t\t}\r\n\t\t\telse if(calculateHitDamage > armour) {\r\n\t\t\t\tarmour = armour - calculateHitDamage;\r\n\t\t\t\tSystem.out.println(\"Enemy is Dead!!\");\r\n\t\t\t}\r\n\t\t\telse if(calculateHitDamage < armour) {\r\n\t\t\t\tarmour = armour - calculateHitDamage;\r\n\t\t\t\tSystem.out.println(\"Enemy not detroyed!! \\n\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Current Enemy life: \"+ armour);\r\n\t\t}\r\n\t}", "public void attackMonster(World world){\n\t\tif ((UnitManager.unitNearPlayer(world.getPlayer(),this,PLAYER_RANGE) == true \n\t\t\t\t\t&& RPG.isAttacking()) && world.getPlayer().isAttack()) {\n\t\t\tthis.getUnitStats().reduceHP(world.getPlayer().damageAmount());\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t}\n\t}", "public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }", "public void isEnemyDefeated(Scanner userInput) {\r\n\t\tif(enemy.getHealth() <= 0) {\r\n\t\t\tSystem.out.println(enemyName + \"'s current HP is 0/\" + enemyHP + \"\\n\");\r\n\t\t\tenemyDefeated(userInput);\r\n\t\t\t} else {\r\n\t\t\tSystem.out.println(enemyName + \"'s current HP is \" + enemy.getHealth() + \"/\" + enemyHP + \"\\n\");\r\n\t\t}\r\n\t}", "private void checkInvaderDeath(Invader invader) {\n\t\t\n\t\tif (shot.detectUpwardCollision(invader.getX(), invader.getY(), invader.getVisibility()) ||\n\t\t\tshot.detectSideCollision(invader.getX(), invader.getY(), invader.getVisibility())) {\n\t\t\t\n\t\t\tif (shot.getAmmo() != Ammo.ARMORPIERCING) {\n\t\t\t\tshot.setVisibility(false);\n\t\t\t}\n\t\t\t\n\t\t\tif (shot.getAmmo() == Ammo.EXPLOSIVE) {\n\t\t\t\texplosion.setX(shot.getX() - PLAYER_WIDTH);\n\t\t\t\texplosion.setY(shot.getY() - 40);\n\t\t\t\texplosion.setVisibility(true);\n\t\t\t}\n\t\t\t\n\t\t\tinvader.setVisibility(false);\n\t\t}\n\t}", "public final boolean doAreaDamage(Creature aCreature) {\n/* 1079 */ boolean dead = false;\n/* 1080 */ if (!aCreature.isInvulnerable() && !aCreature.isGhost() && !aCreature.isUnique()) {\n/* */ \n/* 1082 */ AreaSpellEffect aes = getAreaEffect();\n/* */ \n/* 1084 */ if (aes != null) {\n/* */ \n/* 1086 */ System.out.println(\"AREA DAMAGE \" + aCreature.getName());\n/* */ \n/* 1088 */ if (aes.getFloorLevel() != aCreature.getFloorLevel()) {\n/* */ \n/* 1090 */ int heightOffset = aes.getHeightOffset();\n/* 1091 */ if (heightOffset != 0) {\n/* */ \n/* 1093 */ int pz = aCreature.getPosZDirts();\n/* 1094 */ if (Math.abs(pz - heightOffset) > 10) {\n/* */ \n/* 1096 */ System.out.println(\"AREA DAMAGE FAILED\");\n/* 1097 */ return false;\n/* */ } \n/* */ } \n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1104 */ byte type = getAreaEffect().getType();\n/* 1105 */ Creature caster = null;\n/* */ \n/* */ try {\n/* 1108 */ caster = Server.getInstance().getCreature(aes.getCreator());\n/* */ }\n/* 1110 */ catch (NoSuchCreatureException noSuchCreatureException) {\n/* */ \n/* */ \n/* */ }\n/* 1114 */ catch (NoSuchPlayerException noSuchPlayerException) {}\n/* */ \n/* */ \n/* */ \n/* 1118 */ if (caster != null) {\n/* */ \n/* */ try {\n/* */ \n/* 1122 */ if (aCreature.getAttitude(caster) == 2 || (caster\n/* 1123 */ .getCitizenVillage() != null && caster.getCitizenVillage().isEnemy(aCreature)))\n/* */ {\n/* 1125 */ boolean ok = true;\n/* 1126 */ if (!caster.isOnPvPServer() || !aCreature.isOnPvPServer()) {\n/* */ \n/* 1128 */ Village v = aCreature.getCurrentVillage();\n/* 1129 */ if (v != null && !v.mayAttack(caster, aCreature))\n/* */ {\n/* 1131 */ ok = false;\n/* */ }\n/* */ } \n/* 1134 */ if (ok)\n/* */ {\n/* 1136 */ aCreature.addAttacker(caster);\n/* 1137 */ if (type == 36 || type == 53)\n/* */ {\n/* 1139 */ byte pos = aCreature.getBody().getRandomWoundPos();\n/* 1140 */ sendAttachCreatureEffect(aCreature, (byte)6, (byte)0, (byte)0, (byte)0, (byte)0);\n/* */ \n/* */ \n/* */ \n/* 1144 */ double damage = getAreaEffect().getPower() * 4.0D;\n/* 1145 */ damage += 150.0D;\n/* 1146 */ double resistance = SpellResist.getSpellResistance(aCreature, 414);\n/* 1147 */ damage *= resistance;\n/* */ \n/* 1149 */ SpellResist.addSpellResistance(aCreature, 414, damage);\n/* */ \n/* 1151 */ damage = Spell.modifyDamage(aCreature, damage);\n/* */ \n/* 1153 */ dead = CombatEngine.addWound(caster, aCreature, (byte)8, pos, damage, 1.0F, \"\", null, 0.0F, 0.0F, false, false, true, true);\n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1158 */ else if (type == 35 || type == 51)\n/* */ {\n/* 1160 */ byte pos = aCreature.getBody().getRandomWoundPos();\n/* */ \n/* 1162 */ double damage = getAreaEffect().getPower() * 2.75D;\n/* 1163 */ damage += 300.0D;\n/* 1164 */ double resistance = SpellResist.getSpellResistance(aCreature, 420);\n/* 1165 */ damage *= resistance;\n/* */ \n/* 1167 */ SpellResist.addSpellResistance(aCreature, 420, damage);\n/* */ \n/* 1169 */ damage = Spell.modifyDamage(aCreature, damage);\n/* 1170 */ dead = CombatEngine.addWound(caster, aCreature, (byte)4, pos, damage, 1.0F, \"\", null, 0.0F, 0.0F, false, false, true, true);\n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1175 */ else if (type == 34)\n/* */ {\n/* 1177 */ byte pos = aCreature.getBody().getRandomWoundPos();\n/* */ \n/* 1179 */ double damage = getAreaEffect().getPower() * 1.0D;\n/* 1180 */ damage += 400.0D;\n/* 1181 */ double resistance = SpellResist.getSpellResistance(aCreature, 418);\n/* 1182 */ damage *= resistance;\n/* */ \n/* 1184 */ SpellResist.addSpellResistance(aCreature, 418, damage);\n/* */ \n/* 1186 */ damage = Spell.modifyDamage(aCreature, damage);\n/* */ \n/* 1188 */ dead = CombatEngine.addWound(caster, aCreature, (byte)0, pos, damage, 1.0F, \"\", null, 1.0F, 0.0F, false, false, true, true);\n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1193 */ else if (type == 37)\n/* */ {\n/* 1195 */ sendAttachCreatureEffect(aCreature, (byte)7, (byte)0, (byte)0, (byte)0, (byte)0);\n/* */ \n/* */ \n/* 1198 */ byte pos = aCreature.getBody().getRandomWoundPos();\n/* */ \n/* */ \n/* 1201 */ double damage = getAreaEffect().getPower() * 2.0D;\n/* 1202 */ damage += 350.0D;\n/* 1203 */ double resistance = SpellResist.getSpellResistance(aCreature, 433);\n/* 1204 */ damage *= resistance;\n/* */ \n/* 1206 */ SpellResist.addSpellResistance(aCreature, 433, damage);\n/* */ \n/* 1208 */ damage = Spell.modifyDamage(aCreature, damage);\n/* */ \n/* 1210 */ dead = CombatEngine.addWound(caster, aCreature, (byte)5, pos, damage, 1.0F, \"\", null, 0.0F, 3.0F, false, false, true, true);\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* */ \n/* 1217 */ } catch (Exception exe) {\n/* */ \n/* 1219 */ logger.log(Level.WARNING, exe.getMessage(), exe);\n/* */ } \n/* */ }\n/* */ } \n/* */ } \n/* 1224 */ return dead;\n/* */ }", "private void checkExplosionKill() {\n\t\t\n\t\texplosion.expand();\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tif (explosion.detectDownwardCollision(a.getX(), a.getY())) {\n\t\t\t\t\ta.setVisibility(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void battleEnemyAttack() {\n if(battleEnemy != null){ // If all enemies have attacked, they cannot attack anymore for this round\n\n MovingEntity target = battleEnemy.getAttackPreference(targetAllies);\n if(target == null){\n target = targetAlly;\n }\n\n battleEnemy.attack(target, targetEnemies, targetAllies);\n //System.out.println(battleEnemy.getID() + \" is attacking \" + target.getID() + \" remaining hp: \" + target.getCurrHP());\n if (updateTarget(target) == false) {\n // if target still alive, check if its still friendly incase of zombify\n targetAlly = checkSideSwap(targetAlly, false, battleEnemies, targetEnemies, battleAllies, targetAllies);\n }\n\n battleEnemy = nextAttacker(battleEnemy, battleEnemies);\n\n }\n }", "public abstract int doDamage(int time, GenericMovableUnit unit, Unit target);", "@Override\r\n public boolean dye() {\r\n if (getX() > 3100 || getX() < 10 || getY() < 10 || getY() > 3100) {\r\n return true;\r\n }\r\n// int pixel = mapRGB.getRGB((int) getX(), (int) getY());\r\n// int red = (pixel >> 16) & 0xff;\r\n// if(red==255){this.handler.getWaves().removeEnemy(); return true;}\r\n int k = collision(velX, velY, this.getX(), this.getY());\r\n if(k!=0) {\r\n this.handler.getWaves().removeEnemy(); \r\n return true;\r\n }\r\n else{\r\n zombie_x = getX(); \r\n zombie_y = getY();\r\n }\r\n //I proiettili hanno una portata limitata o se ha colpito il player o se è uscito dalla mappa o se è andato contro un muro\r\n if ((this.getHealth() == 0) || (handler.getPlayer().getBounds().contains(getX(), getY()))) {\r\n int n = (int) (Math.random() * 10);\r\n if(n>1) n=2;\r\n switch (n) {\r\n case 2:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 3, 200, 25, handler.getPlayer(), this.handler, 30, 60, 60, 5, new Animation(Assets.zombie, 20), new Animation(Assets.zombieAttack, 35), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 0:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 4, 70, 50, handler.getPlayer(), this.handler, 0, 60, 60, 20, new Animation(Assets.zombie2, 15), new Animation(Assets.zombie2Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 1:\r\n this.handler.addSprite(new SpittleZombie(zombie_x, zombie_y, 3, 500, 40, handler.getPlayer(), this.handler, 0, 60, 60, 45, new Animation(Assets.zombie3, 15), new Animation(Assets.zombie3Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n }\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "public int giveDamage();", "public void move2(Pokemon enemy){\n boolean crit = false;\n boolean superEffective = false;\n boolean reduced = false;\n boolean moveHit = true;\n\n int randCrit = (int)(22 * Math.random()+1);\n\n //CHANGE ATTACK TO FALSE IF MOVE DOES NO DAMAGE<<<<<<<<<<<<<\n boolean attack = true;\n //CHANGE TYPE TO TYPE OF MOVE POWER AND ACCURACY<<<<<<<<<<<<<\n String type = \"Bug\";\n int power = 80;\n int accuracy = 100;\n\n //DO NOT CHANGE BELOW THIS\n int damage = ((CONSTANT * power * ( getAtt() / enemy.getDef() )) /50);\n if(randCrit == CONSTANT){\n damage = damage * 2;\n crit = true;\n }\n if(checkSE(type,enemy.getType())){\n damage = damage * 2;\n superEffective = true;\n }\n if(checkNVE(type, enemy.getType())){\n damage = damage / 2;\n reduced = true;\n }\n if(attack && hit(accuracy)){\n enemy.lowerHp(damage);\n }\n else{\n if(hit(accuracy)){\n //DO STATUS EFFECT STUFF HERE (ill figure out later)\n }\n }\n lowerM2PP();\n }", "public void suffer(int damage){\r\n\t\thp -= damage;\r\n\t\tinvulnerable = true;\r\n\t}", "@Override\n\t\t\tpublic void attack(Base enemy) {\n\t\t\t}", "public void setDmg(int enemyDmg){\r\n this.enemyDmg = enemyDmg;\r\n }", "public boolean getAttack(IEntity enemyUnit){\n return tempUnit.getAttack(enemyUnit);\n }", "public void attack(User p)\n\t{\n\t\tint damage = getAttack() - p.getDefense();\n\t\tint evade = 0;\n\t\tif(damage <= 0)\n\t\t{\n\t\t\tevade = p.getDefense() - getAttack();\n\t\t\tdamage = 1;\n\t\t}\n\t\t\n\t\tif(Math.random() * 100 < evade * 5)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"Miss\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tp.reduce(damage);\n JOptionPane.showMessageDialog(null,\"Enemy attacked you! User's health = \" + p.getHealth() + \"\\n\" + \"Damage dealt = \" + damage); \n\t}", "public void getDamage(int damagePoint){\n hp-=damagePoint;\n if(hp==0){\n alive=false;\n }\n }", "@EventHandler(priority = EventPriority.HIGHEST)\n public void onEntityDamage(EntityDamageEvent event) {\n if (event instanceof EntityDamageByEntityEvent) {\n EntityDamageByEntityEvent edbeEvent = (EntityDamageByEntityEvent) event;\n Entity damager = edbeEvent.getDamager();\n if (damager instanceof Player) {\n //Player attacked some entity\n //Show info about players attack tool\n p = (Player) damager;\n\n if (p != null\n && this.plugin.commandEnabledForPlayers.contains(p.getName())\n && this.f.getBoolean(\"durability_warning_enabled\")) {\n durability(p, event);\n }\n } else if (edbeEvent.getEntity() != null && edbeEvent.getEntity() instanceof Player) {\n //Entity attacked player\n //Check if durability of armor is gone\n //Then check if armor is below critial level and output a warning message\n p = (Player) edbeEvent.getEntity();\n\n if (-0.0 != edbeEvent.getDamage(EntityDamageEvent.DamageModifier.ARMOR)\n && this.plugin.commandEnabledForPlayers.contains(p.getName())\n && this.f.getBoolean(\"durability_warning_enabled\")) {\n //The armor took damage\n durability(p, event, true);\n }\n }\n\n }\n\n }", "public boolean check(double xDelt,double yDelt) {\r\n \tBounds pBound= player1.player.getBoundsInParent();\r\n \t\r\n \tfor( Node object: enemy1.hostileG.getChildren()) {\r\n \t\t\r\n \t\tif(object.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())){\r\n \t\t\teHealth -= inventory.getpDamage();\r\n \t\t\tpHealth -= 1;\r\n\r\n \t\t\tSystem.out.println(\"eHealth \"+ eHealth);\r\n \t\t\tSystem.out.println(\"pHealth \"+ pHealth);\r\n \t\t\t\r\n \t\t\t//\"Deaths of the sprites\"\r\n \t\t\tif(pHealth <=0) {\r\n \t\t\t\tlayout.getChildren().remove(player1.player);\r\n \t\t\t\tSystem.out.println(\"You died!\");\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif(eHealth <=0) {\r\n \t\t\t\tlayout.getChildren().remove(enemy1.enemy);\r\n \t\t\t\tenemy1.enemy.setLayoutX(-10000);\r\n \t\t\t\tenemy1.enemy.setLayoutY(-10000);\r\n \t\t\t}\r\n \t\treturn false;\r\n \t\t}\r\n }\r\n \t\r\n \tfor( Node object: map1.walls.getChildren()) {\r\n \t\tif(object.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())) return false;\r\n \t}\r\n \t\r\n \tfor( Node chest: map1.chests.getChildren()) {\r\n \tif(chest.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())){\r\n \t\tmap1.chests.getChildren().remove(chest);\r\n \t chestchose=inventory.getchestchose();\r\n \t \r\n \t if(chestchose==1) {\r\n \t \tinventory.sworda.setVisible(true);\r\n \t \tinventory.setpDamage(3);\r\n \t }\r\n \t if(chestchose==2) {\r\n \t \tinventory.healthbag.setVisible(true);\r\n \t }\r\n \t \r\n \t return false;\r\n \t} \r\n }\t\r\n \t\r\n return true;\r\n }", "public void checkHealth()\n {\n if(player.getHealth() <= 0)\n {\n System.out.println(\"\\n\" + \"You are dead :(\" + \"\\n\");\n alive = false;\n }\n }", "protected boolean isMovementNoisy() {\n/* 1861 */ return (!this.abilities.flying && (!this.onGround || !isDiscrete()));\n/* */ }", "private void checkIfHungry(){\r\n\t\tif (myRC.getEnergonLevel() * 2.5 < myRC.getMaxEnergonLevel()) {\r\n\t\t\tmission = Mission.HUNGRY;\r\n\t\t}\r\n\t}", "public void move4(Pokemon enemy){\n boolean crit = false;\n boolean superEffective = false;\n boolean reduced = false;\n boolean moveHit = true;\n int randCrit = (int)(22 * Math.random()+1);\n\n //CHANGE ATTACK TO FALSE IF MOVE DOES NO DAMAGE<<<<<<<<<<<<<\n boolean attack = true;\n //CHANGE TYPE TO TYPE OF MOVE POWER AND ACCURACY<<<<<<<<<<<<<\n String type = \"Steel\";\n int power = 50;\n int accuracy = 95;\n\n //DO NOT CHANGE BELOW THIS\n int damage = ((CONSTANT * power * ( getAtt() / enemy.getDef() )) /50);\n if(randCrit == CONSTANT){\n damage = damage * 2;\n crit = true;\n }\n if(checkSE(type,enemy.getType())){\n damage = damage * 2;\n superEffective = true;\n }\n if(checkNVE(type, enemy.getType())){\n damage = damage / 2;\n reduced = true;\n }\n if(attack && hit(accuracy)){\n enemy.lowerHp(damage);\n }\n else{\n if(hit(accuracy)){\n //DO STATUS EFFECT STUFF HERE (ill figure out later)\n }\n }\n lowerM4PP();\n }", "public int doDamage(Actor attacker, int damage){\n if( iframes==0 ){\n health -= damage;\n healthbar.setHealth(health);\n iframes = 20;\n MuteControl.playSound(attackSound);\n if (health>0) return damage;\n die();\n return damage;\n }else return 0;\n }", "@Override\r\n\tpublic boolean damageEntity(DamageSource damagesource, float f2) {\n\t\tboolean toReturn = super.damageEntity(damagesource, f2);\r\n\t\tif(f2>=3 && !this.isInvulnerable(damagesource) && damagesource.getEntity()!=null && damagesource.getEntity().getBukkitEntity() instanceof Player) { // prevent things like snowball damage from triggering this ability\r\n\t\t\tif(random.nextInt(100)+1<=20) { //prevent boss from getting combo'd to hard in corner\r\n\t\t\t\tif(!teleportCooldown.isOnCooldown((Player)damagesource.getEntity().getBukkitEntity())) {\r\n\t\t\t\t\tteleportToEnemy();\t\t\r\n\t\t\t\t\tteleportCooldown.addCooldown((Player)damagesource.getEntity().getBukkitEntity());\r\n\t\t\t\t\tLog.info(teleportCooldown.isOnCooldown((Player)damagesource.getEntity().getBukkitEntity()));\r\n\t\t\t\t\tLog.info(((Player)damagesource.getEntity().getBukkitEntity()).getName());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn toReturn;\r\n\t}", "public boolean damage(Item weapon) {\n\t\tif (weapon instanceof assets.Sword) {\n\t\t\tSystem.out.println(\"The jubjub bird falls to the ground, dead.\");\n\t\t\tisAlive = false;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public int takeDamage(Enemy enemy)\n {\n int damage = Items.determineDamage(\n enemy.getWeapon(),\n this.getArmor(),\n enemy.fight()\n );\n this.setHealth(this.getHealth() - damage);\n return damage;\n }", "public boolean attack(int dir) {\n\t\treturn false;\n\t}", "public void attack(Entity entity, boolean aoe) {\n if(aoe) entity.damaged((int) (this.damage*0.6));\n else entity.damaged(this.damage);\n if(entity.isDead()){\n incExp(entity.getLevel()*9);\n if(entity instanceof Boss) {\n this.bossesDefeated++;\n }\n }\n }", "public void takeDamage(int damage) {\n Random rand = new Random();\n int game = rand.nextInt(51) + 75;\n double game2 = (double) game;\n double percDamage = game2/100.0;\n double realSomething = (double) damage;\n double actualDamageNotReal = realSomething * percDamage;\n int actualDamage = (int) actualDamageNotReal;\n int actualDmg = actualDamage - this.armour;\n if (actualDmg <= 0){\n actualDmg = 0;\n }\n this.health -= actualDmg;\n slowDisplay(String.format(\"%s takes %s damage, now at %s\\n\",this.name,actualDmg,this.health));\n\n }", "@Override\r\n public void onHit(int damage){\n if(box2body != null){\r\n hp -= damage;\r\n screen.getGameManager().get(\"Sounds/orc-34-hit.wav\", Sound.class).play();\r\n if(this.hp <= 0) {\r\n screen.bodiesToDelete.add(box2body);\r\n deleteFlag = true;\r\n screen.spawnedCreatures.remove(this);\r\n screen.getGameManager().get(\"Sounds/orc-32-death.wav\", Sound.class).play();\r\n\r\n //Award Experience\r\n screen.getPlayer().awardExperience(this.experienceValue);\r\n screen.getPlayer().increaseKillCount();\r\n }\r\n }\r\n //Attack player when damaged\r\n //Prevents player from sniping monsters using Wander AI\r\n if(currentState != State.ATTACKING){\r\n Vector2 orcPosition = new Vector2(box2body.getPosition().x, box2body.getPosition().y);\r\n Vector2 playerPosition = new Vector2(screen.getPlayer().box2body.getPosition().x, screen.getPlayer().box2body.getPosition().y);\r\n\r\n currentState = State.HASBEENATTACKED;\r\n velocity = new Vector2(playerPosition.x - orcPosition.x, playerPosition.y - orcPosition.y);\r\n box2body.setLinearVelocity(velocity.scl(speed));\r\n }\r\n }", "@Test\n public void testDiesByDamage() {\n addCard(Zone.BATTLEFIELD, playerA, \"Mountain\", 1);\n addCard(Zone.HAND, playerA, \"Lightning Bolt\");\n addCard(Zone.BATTLEFIELD, playerB, \"Dryad Militant\");\n\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Lightning Bolt\", \"Dryad Militant\");\n setStopAt(1, PhaseStep.BEGIN_COMBAT);\n execute();\n \n assertLife(playerB, 20);\n \n assertExileCount(\"Lightning Bolt\", 1);\n }", "@Override\n\tpublic int fight(Enemy e1) {\n\t\tint damage = 0;\n\t\tRandom randomNum = new Random();\n\t\tdamage = 6 + randomNum.nextInt(4);\n\t\ttry {\n\t\t\te1.takeDamage(damage);\n\t\t} catch (InvalidDamageException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn damage;\n\t}", "public void onDeath(DamageSource cause)\n {\n super.onDeath(cause);\n if (cause.getTrueSource() instanceof EntityPlayer) {\n EntityPlayer p = (EntityPlayer)cause.getTrueSource();\n if (p.getHealth() != p.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).getAttributeValue()) {\n if (this.world.rand.nextDouble() < 0.75) this.entityDropItem(new ItemStack(ItemManager.HEART), 0.0f);\n }\n }\n }", "public void processEnemyHitsAndDeaths(AbstractEnemy enemy) {\n this.scoreCounter.changeScore(2000, '+'); // This was put here to see all objectives being met\n this.gameState.updateScoreGoals(this.scoreCounter);\n this.gameState.updateEnemyHitGoals(enemy.getEnemyType());\n this.killCount += 1; \n }", "void takeDamage(HeroDamage enemy1, HeroDamage enemy2);", "public boolean wantToFight(int[] enemyAbilities) {\n boolean fight = boldness < 50;//After 50 fights, believes self unstoppable \n int huntable = 0;\n for(int ability : enemyAbilities){\n if(ability == 1)\n huntable++;\n }\n if(huntable >= 3){\n fight = true;\n }//if at least 3 of the visible stats are 1 then consider this prey and attack\n else if((float)enemyAbilities[1] / (float)getDefenseLvl() <= (float)getStrengthLvl() + (float)(getClevernessLvl() % 10) / (float)enemyAbilities[2] && enemyAbilities[0] / 5 < getLifeLvl() / 5)\n fight = true;//If I fancy my odds of coming out on top, float division for chance\n if(fight){//Count every scar\n boldness++;//get more bold with every battle\n life += enemyAbilities[0] / 5;\n str += enemyAbilities[1] / 5;\n def += enemyAbilities[2] / 5;\n clever += (10 - (enemyAbilities[0] + enemyAbilities[1] + enemyAbilities[2] + enemyAbilities[3] - 4)) / 5;//count the human cleverness attained or the enemies who buffed clever early\n }\n return fight;\n }", "public void damaged() {\n this.damageState = DamageState.DAMAGED;\n }", "@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)\r\n public void onPlayerDamagedByPlayer(final EntityDamageByEntityEvent event) {\n if (!(event.getEntity() instanceof Player)) {\r\n return;\r\n }\r\n if (!(event.getDamager() instanceof Player)) {\r\n return;\r\n }\r\n \r\n final Player target = (Player)event.getEntity();\r\n final Player attacker = (Player)event.getDamager();\r\n final ItemStack is = attacker.getItemInHand();\r\n \r\n if (is != null){\r\n switch (is.getType()){\r\n case EMERALD:\r\n attacker.setItemInHand(ItemUtil.decrementItem(is, 1));\r\n \r\n // 体力・空腹回復、燃えてたら消化\r\n target.setHealth(target.getMaxHealth());\r\n target.setFoodLevel(20);\r\n target.setFireTicks(0);\r\n \r\n // ポーション効果付与\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 45 * 20, 0)); // 45 secs\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 7 * 60 * 20, 0)); // 7 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 9 * 60 * 20, 1)); // 9 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 9 * 60 * 20, 0)); // 9 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 5 * 60 * 20, 1)); // 5 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 3 * 60 * 20, 0)); // 3 mins\r\n \r\n // effect, messaging\r\n target.getWorld().playEffect(target.getLocation(), Effect.ENDER_SIGNAL, 0, 10);\r\n Util.message(target, PlayerManager.getPlayer(attacker).getName() + \" &aから特殊効果を与えられました!\");\r\n Util.message(attacker, PlayerManager.getPlayer(target).getName() + \" &aに特殊効果を与えました!\");\r\n \r\n event.setCancelled(true);\r\n event.setDamage(0);\r\n break;\r\n default: break;\r\n }\r\n }\r\n }", "public void beAttacked(int damage) {\r\n\t\tif (health > damage) {\r\n\t\t\thealth -= damage;\r\n\t\t}else {\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void didContact(GameEntity entity){\n\t\tif (entity.getClass() == Enemy.class){\n\n\t\t\tentity.receiveDamage(100);\n\t\t\tthis.receiveDamage(10);\n\t\t\tSystem.out.println(\"hit enemy\");\n\t\t}\n\t}", "boolean checkFighterEnergy(AbstractFighterPokemon pokemon);", "public boolean attackAlly(Ally target) {\n\t\tLog.d(TAG, \"Attacking!\");\n\t\tif (target.takeDamage(damage)) {\n\t\t\treturn true;\n\t\t} else\n\t\t\treturn false;\n\t}", "@EventHandler\n\tpublic void attackMobs(EntityDamageByEntityEvent e) {\n\t\tMessages messagesConfig = plugin.getMsgs();\n\n\t\tif (e.getCause().equals(EntityDamageEvent.DamageCause.PROJECTILE)) { //Just my magic code w(o.o)w\n\t\t\treturn;\n\t\t}else if (e.getDamager() instanceof Player) {\n\t\t\tPlayer p = (Player) e.getDamager();\n\t\t\tItemStack pInv = p.getInventory().getItemInMainHand();\n\n\t\t\tif (!pInv.getType().name().contains(\"SWORD\") && !pInv.getType().name().contains(\"AXE\")) {\n\t\t\t\tif (!(e.getEntity() instanceof Chicken)) {\n\t\t\t\t\te.setCancelled(true);\n\n\t\t\t\t\tif (canSendMessage(p.getUniqueId()))\n\t\t\t\t\t\tp.sendMessage(StringUtil.inColor(messagesConfig.getCantHitWithoutSword()));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public String attack() {\r\n\t\t\tthis.getCurrentEnemy().setHealth(this.getCurrentEnemy().getHealth()-this.getPlayer().getWeapon().getAttack());\r\n\t\t\tif(this.getCurrentEnemy().isDefeated()) {\r\n\t\t\t\tthis.setInBattle(false);\r\n\t\t\t\t\r\n\t\t\t\tthis.handleQuestrelatedEnemy(this.getCurrentEnemy());\r\n\t\t\t\t\r\n\t\t\t\tif(this.getCurrentEnemy().getLoot() != null) {\r\n\t\t\t\t\tthis.getPlayer().getCurrentLocation().addItem(this.getCurrentEnemy().getLoot());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.getPlayer().gainXp(this.getCurrentEnemy().getXpYield());\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().removeNpc(this.getCurrentEnemy().getName());\r\n\t\t\t\tif(this.getCurrentEnemy().getClass().getName().equals(\"game.EnemyGuardian\")) {\r\n\t\t\t\t\t// adds paths between current location and location in the guardian, path names are specified in the guardian construction\r\n\t\t\t\t\tthis.getPlayer().getCurrentLocation().addPaths(this.getPlayer().getCurrentLocation(), ((EnemyGuardian)this.getCurrentEnemy()).getPathTo(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t((EnemyGuardian)this.getCurrentEnemy()).getGuardedLocation(), ((EnemyGuardian)this.getCurrentEnemy()).getPathFrom());\r\n\t\t\t\t\treturn \"You defeated \" + this.getCurrentEnemy().getName() + \". \\n\"\r\n\t\t\t\t\t\t\t+ ((EnemyGuardian)this.getCurrentEnemy()).getRevelationMessage() + \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn \"You defeated \" + this.getCurrentEnemy().getName() + \".\";\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.triggerEnemyAttack();\r\n\t\t\t\t\tif(this.getPlayer().getHealth() <= 0) {\r\n\r\n\t\t\t\t\t\tthis.gameOver();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn \"You attacked \" + this.getCurrentEnemy().getName() + \" for \" + this.getPlayer().getWeapon().getAttack() + \" damage. \\n You DIED.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\treturn \"You attacked \" + this.getCurrentEnemy().getName() + \" for \" + this.getPlayer().getWeapon().getAttack() + \" damage. \\n\"\r\n\t\t\t\t\t\t\t\t+ this.getCurrentEnemy().getName() + \" attacked you for \" + this.getCurrentEnemy().getAttack() + \" damage.\\n\"\r\n\t\t\t\t\t\t\t\t\t\t+ this.getCurrentEnemy().printHealth();\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "void hit(GameObject o){\r\n\t\tif (!shield){ // if sheild is on all hits do nothing\r\n\t\t\tif (!(o instanceof UpPower)){ // if didnt hit a power up the ship loses a life\r\n\t\t\t\tif (lives > 1) {\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t\treset();\r\n\t\t\t\t}\r\n\t\t\t\telse { // once there is no life left the ship dies\r\n\t\t\t\t\tdead = true;\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "int getMinigameDefenseChancesLeft();", "public int getDmg(){\r\n return enemyDmg;\r\n }", "public static void combatPlayer(Player atk, EnemyObject def){\n\t\tif(atk.stat.getType() != def.stat.getType() ){\n\n\t\t\t\tint atkDamage = 0;\n\t\t\t\tatkDamage = atk.stat.toDamage();\n\t\t\t\tdef.stat.getDamage(atkDamage);\n\t\t\t\t//System.out.println(\"Attack!\");\n\t\t\t\t//System.out.println(\"Enemy get \"+ atkDamage + \" Damage\");\n\t\t\t\tif(def.stat.checkAlive()==false){\n\t\t\t\t\t//check the object die or not.\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(def.stat.getType()==1){\n\t\t\t\t\t//System.out.println(\"Enemy Die\");\n\t\t\t\t\t\t//def.remove(0);\n\t\t\t\t\t\t//enemy die.\n\t\t\t\t\t\t//give exp to the user.\n\t\t\t\t\t\tint exp = def.stat.giveExp();\n\t\t\t\t\t\t\n\t\t\t\t\t\tatk.stat.getExp(exp);\n\t\t\t\t\t\t//System.out.println(\"Player get \"+exp+ \" exp\");\n\t\t\t\t\t\t//destroy the enemy object.-> ??\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t\t//System.out.println(\"\\n\\nEvent number : \" + atk.stat.getEventNum()+\" \\n\");\n /*\n\t\t\t\tSystem.out.println(\"Enemy Health: \" + def.stat.getHP());\n\t\t\t\tSystem.out.println(\"\\n\\n Player Stat: \");\n\t\t\t\tSystem.out.println(\"\\nPlayer HP: \"+atk.stat.getHP());\n\t\t\t\tSystem.out.println(\"Level: \"+atk.stat.getLv());\n\t\t\t\tSystem.out.println(\"STR: \"+atk.stat.getStr());\n\t\t\t\tSystem.out.println(\"DEX: \"+atk.stat.getDex());\n\t\t\t\tSystem.out.println(\"Wis: \"+atk.stat.getWis());\n\t\t\t\tSystem.out.println(\"Con: \"+atk.stat.getCon()+\"\\n\");\t*/\t\t\t\n\t\t}\n\t}", "public void playerHasInvincibility() {\n\t\tthis.state = canBeKilled;\n\t}", "private static int playerDamageDealt(int playerAttack, int monsterDefense){\r\n int playerDamageDealt;\r\n playerDamageDealt = (playerAttack - monsterDefense);\r\n return playerDamageDealt;\r\n }", "void evadeAttack(IUnit attacker, int incomingDamage);", "public boolean successfulHit(CreatureAttack attack, Creature attacked){\r\n return attack.attacker.attributes.health.accuracy.next() >= attacked.attributes.health.evasion.next();\r\n }", "public boolean onImpact(EntityDamageByEntityEvent evt) {\r\n onImpact();\r\n return true;\r\n }", "public void updateHealth(String target, Integer amount, boolean isAttack){\n\n if(target == \"player\"){\n if(isAttack){\n //To make defence/armour a bit weaker, round up on the damage.\n playerShipHealth+= (int) (amount - Math.ceil(amount*playerShipDefence));\n } else{\n playerShipHealth+=amount;\n\n }\n if (playerShipHealth > playerShipHealthMax){\n playerShipHealth = playerShipHealthMax;}\n else if (playerShipHealth <= 0){\n //PlayerDied\n\n playerShipDead = true;\n playerShip.setIsDead();\n }\n\n } else if (target == \"enemy\"){\n if(isAttack){\n enemyShipHealth+= (int) (amount - Math.ceil(amount*enemyShipDefence));\n } else{\n enemyShipHealth+=amount;\n }\n if (enemyShipHealth > enemyShipHealthMax){\n enemyShipHealth = enemyShipHealthMax;}\n else if (enemyShipHealth <= 0){\n //Enemy Died\n enemyShipDead = true;\n enemyShip.setIsDead();\n }\n }\n }" ]
[ "0.7844441", "0.7844441", "0.7844441", "0.7844441", "0.7844441", "0.71715975", "0.7126442", "0.7069014", "0.7032931", "0.69797856", "0.6972774", "0.6965054", "0.69332546", "0.6901669", "0.68981326", "0.68857586", "0.6855313", "0.6847088", "0.6813694", "0.68130076", "0.6810783", "0.67904717", "0.67889225", "0.67737985", "0.67530185", "0.67525196", "0.6742267", "0.6740367", "0.6725293", "0.6712877", "0.6710273", "0.67085147", "0.66891605", "0.6686727", "0.6677047", "0.6674506", "0.6653268", "0.66474664", "0.6640937", "0.6627314", "0.6612364", "0.66045517", "0.65918684", "0.6584154", "0.6562026", "0.6559731", "0.655681", "0.6545004", "0.654294", "0.6541206", "0.65310526", "0.65177387", "0.64890707", "0.64769965", "0.64672476", "0.6462273", "0.64619786", "0.64602697", "0.6454556", "0.6453791", "0.64503604", "0.64483017", "0.64473754", "0.64436406", "0.644343", "0.6439259", "0.64389986", "0.64361405", "0.64306825", "0.6413821", "0.6410524", "0.64047086", "0.63863117", "0.6369981", "0.6368412", "0.6364743", "0.6360228", "0.63568395", "0.63531435", "0.6352359", "0.63512444", "0.63445425", "0.6340153", "0.63401455", "0.63297266", "0.63224775", "0.6318633", "0.63083", "0.6308141", "0.63046765", "0.6301343", "0.6298462", "0.6294197", "0.6292103", "0.6289839", "0.6289006", "0.6278421", "0.6274212", "0.62699854", "0.6269816", "0.6260791" ]
0.0
-1
shooting interval constructor to define the basic characters of the player's plane different kind of player plane can have different attackm, health or numOfBomb
Player(int posX,int posY,int velX,int velY, int accX, int accY,int attack,int health, int numOfBomb, int sInterval){ this.posX = posX; this.posY = posY; this.velX = velX; this.velY = velY; this.accX = accX; this.accY = accY; this.health = health; this.numOfBomb = numOfBomb; this.attack = attack; this.sInterval = sInterval; invincibleTime = 0; invincible = false; wid = 300/4; hei = 400/4; classOfObejct = 0; alive = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Bullet(int posX,int posY,int velX,int velY,int classOfObejct,int attack){\n this.posX = posX;\n this.posY = posY;\n this.velX = velX;\n this.velY = velY;\n this.classOfObejct = classOfObejct;\n this.attack = attack;\n\n }", "public Warrior(Point3D position, int speed) {\r\n super(\"img/Ants/warrior.png\", position, speed);\r\n currentBehaviour = WarriorBehaviour.PATROL;\r\n }", "public GiantWarrior(float x, float y, boolean enemy, int level) {\r\n\t\tsuper(x, y, (int) Data.GIANTWARRIOR_STATS[0], (int) Data.GIANTWARRIOR_STATS[1],\r\n\t\t\t\t(int) Data.GIANTWARRIOR_STATS[2], Data.GIANTWARRIOR_STATS[3],\r\n\t\t\t\t(int) (Data.GIANTWARRIOR_STATS[4] * Math.pow(1.1, level - 1)), enemy, Data.GIANTWARRIOR_ICON,\r\n\t\t\t\tData.GIANTWARRIOR_ATTACK_ICON);\r\n\t}", "public Big_shot(double x,double y,double velocity,double angle){\n\t\tsuper(x,y,velocity,angle,100,30);\n\t}", "public Shooter() {\n fire1 = new Solenoid(1);\n fire2 = new Solenoid(4);\n returnValve = new Solenoid(3);\n latchSolenoid = new Solenoid(2);\n FFM = true;\n m_enabled = true;\n shooting = false;\n reloading = false;\n initShooter();\n }", "public Water_Hero(RefLinks refLink, float x, float y)\r\n {\r\n ///Apel al constructorului clasei de baza\r\n super(refLink, x,y, Character.DEFAULT_CREATURE_WIDTH, Character.DEFAULT_CREATURE_HEIGHT);\r\n\r\n ///Seteaza imaginea de start a eroului\r\n image = Assets.heroLeft;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea implicita(normala)\r\n normalBounds.x = 16;\r\n normalBounds.y = 16;\r\n normalBounds.width = 16;\r\n normalBounds.height = 32;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea de atac\r\n attackBounds.x = 10;\r\n attackBounds.y = 10;\r\n attackBounds.width = 38;\r\n attackBounds.height = 38;\r\n\r\n jumpingTimer = new Timer();\r\n\r\n lista_dinamic_element = new ArrayList<CollisionItem>();\r\n\r\n lista_static_element = new ArrayList<CollisionItem>();\r\n list_fire = new ArrayList<CollisionItem>();\r\n }", "public Unit (int hp, int str, int mag, int def, int x, int y) {\n this.stats = new Stats(hp, str, mag, def);\n this.position = new Position(x, y);\n }", "public gameWorld()\n { \n // Create a new world with 600x600 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n addObject(new winSign(), 310, 300);\n addObject(new obscureDecorative(), 300, 400);\n addObject(new obscureDecorative(), 300, 240);\n \n for(int i = 1; i < 5; i++) {\n addObject(new catchArrow(i * 90), 125 * i, 100);\n }\n for (int i = 0; i < 12; i++) {\n addObject(new damageArrowCatch(), 50 * i + 25, 50); \n }\n \n \n //Spawning Interval\n\n if(timerInterval >= 10) {\n arrowNumber = Greenfoot.getRandomNumber(3);\n }\n if(arrowNumber == 0) {\n addObject(new upArrow(directionOfArrow[0], imageOfArrow[0]), 125, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 1) {\n addObject(new upArrow(directionOfArrow[1], imageOfArrow[1]), 125 * 2, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 2) {\n addObject(new upArrow(directionOfArrow[2], imageOfArrow[2]), 125 * 3, 590);\n arrowNumber = 5;\n }\n if( arrowNumber == 3) {\n addObject(new upArrow(directionOfArrow[3], imageOfArrow[3]), 125 * 4, 590);\n arrowNumber = 5;\n }\n \n \n\n \n }", "public SaboWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(counter, 100, 380); //Add the scoreboard\n addObject(healthBar, 300, 370); //Add the health bar\n addObject(turret, getWidth()/2-5, getHeight()-turret.getImage().getWidth()); \n }", "public SpaceHulkWorldModel(TiledMap map, int players)\r\n/* 49: */ {\r\n/* 50: 49 */ super(map);\r\n/* 51: 50 */ this.mission = false;\r\n/* 52: 51 */ this.reachablePlaces = 0;\r\n/* 53: 52 */ this.highlight = new int[getWidthInTiles()][getHeightInTiles()];\r\n/* 54: 53 */ this.walkable = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 55: 54 */ this.blocked = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 56: 55 */ this.finish = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 57: 56 */ this.door = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 58: 57 */ this.rock = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 59: 58 */ this.fire = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 60: 59 */ this.grass = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 61: 60 */ this.sand = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 62: */ \r\n/* 63: 62 */ this.reach = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 64: 64 */ for (int x = 0; x < getWidthInTiles(); x++) {\r\n/* 65: 66 */ for (int y = 0; y < getHeightInTiles(); y++) {\r\n/* 66: 69 */ this.walkable[x][y] = checkTileProperty(x, y, \"walkable\", \"true\");\r\n/* 67: */ }\r\n/* 68: */ }\r\n/* 69: */ }", "public Character(int l, int h)\n\t{\n\t\tlevel = l;\n\t\thealth = h;\n\t}", "public MyWorld()\n { \n // Create a new world with 1600x1200 cells with a cell size of 1x1 pixels.\n super(1125, 1125, 1);\n //Adds the Cornucopia to the center of the Arena.\n int centerX = this.getWidth()/2;\n int centerY = this.getHeight()/2;\n this.addObject(new Cornucopia(), centerX, centerY);\n \n //The following adds the main character for the game.\n int CharacterX = 1125/2;\n int CharacterY = 770;\n this.addObject(new Character(), CharacterX, CharacterY);\n \n //The following code adds 6 \"Careers\" into the arena.\n int CareerX = 405;\n int CareerY = 328;\n this.addObject(new Careers(), CareerX, CareerY);\n this.addObject(new Careers(), CareerX+310, CareerY-5);\n this.addObject(new Careers(), CareerX+90, CareerY+430);\n this.addObject(new Careers(), CareerX+290, CareerY+405);\n this.addObject(new Careers(), CareerX+190, CareerY-60);\n \n //The following code add the remaining 17 Tributes to the arena.\n //Also, I cannot add like a normal person so there will only be twenty-three tributes. The Capitol goofed this year.\n int TribX = 660;\n int TribY = 288;\n this.addObject(new Tributes(), TribX, TribY);\n this.addObject(new Tributes(), TribX-200, TribY);\n this.addObject(new Tributes(), TribX-227, TribY+443);\n this.addObject(new Tributes(), TribX-280, TribY+400);\n this.addObject(new Tributes(), TribX-34, TribY+467);\n this.addObject(new Tributes(), TribX+86, TribY+397);\n this.addObject(new Tributes(), TribX-134, TribY-22);\n this.addObject(new Tributes(), TribX+103, TribY+82);\n this.addObject(new Tributes(), TribX+139, TribY+144);\n this.addObject(new Tributes(), TribX+150, TribY+210);\n this.addObject(new Tributes(), TribX+150, TribY+280);\n this.addObject(new Tributes(), TribX+120, TribY+342);\n this.addObject(new Tributes(), TribX-338, TribY+275);\n this.addObject(new Tributes(), TribX-319, TribY+343);\n this.addObject(new Tributes(), TribX-343, TribY+210);\n this.addObject(new Tributes(), TribX-330, TribY+150);\n this.addObject(new Tributes(), TribX-305, TribY+80);\n \n //The following code should add the forest onto the map.\n int ForX = this.getWidth()/2;\n int ForY = 900;\n this.addObject(new Forest(), ForX, ForY);\n \n //The following code should add the lake to the map.\n int LakX = 790;\n int LakY = 990;\n this.addObject(new Lake(), LakX, LakY);\n \n //The following should add the cave to the map.\n int CavX = 125;\n int CavY = 110;\n this.addObject(new Cave(), CavX, CavY);\n \n \n int actorCount = getObjects(Tributes.class).size();\n if(actorCount == 17) {\n int BeastX = 200;\n int BeastY = 200;\n this.addObject(new Beasts(), BeastX, BeastY);\n this.addObject(new Beasts(), BeastX+100, BeastY+100);\n }\n }", "public void shoot() {\n\r\n switch (shootstate) {\r\n case down:\r\n tempbutton = Components.shootsinglespeed;\r\n templimit = islimitshooterup();\r\n\r\n if (Components.shootsinglespeed && islimitshooterup() && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(singlespeed);\r\n Components.shootermotorleft2.setX(singlespeed);\r\n Components.shootermotorright.setX(-singlespeed);\r\n Components.shootermotorright2.setX(-singlespeed);\r\n\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n\r\n }\r\n shootpothigh = shootsinglepot;\r\n shootstate = movingup;\r\n } else if (Components.trusshp == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(trusshpspeed);\r\n Components.shootermotorleft2.setX(trusshpspeed);\r\n Components.shootermotorright.setX(-trusshpspeed);\r\n Components.shootermotorright2.setX(-trusshpspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = trusshppothigh;\r\n shootstate = movingup;\r\n }else if (Components.truss == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(trussspeed);\r\n Components.shootermotorleft2.setX(trussspeed);\r\n Components.shootermotorright.setX(-trussspeed);\r\n Components.shootermotorright2.setX(-trussspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = trusspothigh;\r\n shootstate = movingup;\r\n } else if (Components.pass == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(passspeed);\r\n Components.shootermotorleft2.setX(passspeed);\r\n Components.shootermotorright.setX(-passspeed);\r\n Components.shootermotorright2.setX(-passspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = passpot;\r\n shootstate = movingup;\r\n } else if (Components.longdistanceshoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(longdistancespeed);\r\n Components.shootermotorleft2.setX(longdistancespeed);\r\n Components.shootermotorright.setX(-longdistancespeed);\r\n Components.shootermotorright2.setX(-longdistancespeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = longdistancepot;\r\n shootstate = movingup;\r\n }\r\n else if (Components.shoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(shooterspeed);\r\n Components.shootermotorleft2.setX(shooterspeed);\r\n Components.shootermotorright.setX(-shooterspeed);\r\n Components.shootermotorright2.setX(-shooterspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = shootpot;\r\n shootstate = movingup;\r\n }else if (Components.slowmovingshoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(slowmovingspeed);\r\n Components.shootermotorleft2.setX(slowmovingspeed);\r\n Components.shootermotorright.setX(-slowmovingspeed);\r\n Components.shootermotorright2.setX(-slowmovingspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n slowmovingpot = shootpot;\r\n shootstate = movingup;\r\n }\r\n else if (Components.fastmovingshoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(fastmovingspeed);\r\n Components.shootermotorleft2.setX(fastmovingspeed);\r\n Components.shootermotorright.setX(-fastmovingspeed);\r\n Components.shootermotorright2.setX(-fastmovingspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n fastmovingpot = shootpot;\r\n\r\n }\r\n case movingup:\r\n if (islimitshooterup() == false || Components.potvalue >= shootpothigh) {\r\n shootstate = stopped;\r\n oldTime = DS.getMatchTime();\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n break;\r\n\r\n case stopped:\r\n try {\r\n if (/*Components.shooterdown && */time - oldTime > .2 && islimitshooterdown() == true && Components.DownPickupLimit.get()) {\r\n\r\n Components.shootermotorleft.setX(shootdownspeed);\r\n Components.shootermotorleft2.setX(shootdownspeed);\r\n\r\n Components.shootermotorright.setX(-shootdownspeed);\r\n Components.shootermotorright2.setX(-shootdownspeed);\r\n\r\n shootstate = movingdown;\r\n }\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n break;\r\n\r\n case movingdown:\r\n if ((islimitshooterdown() == false) || (Components.potvalue < shootpotdown)) {\r\n\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootstate = down;\r\n }\r\n }\r\n }", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "public Airplane(){\n\t\tsuper(106, 111);\n\t\tspeed = Math.random() + 2.0;\n\t}", "public Character(String name, int armor, int attack, int stamina, int speed, int luck) {\r\n\t\tthis.name.set(name);\r\n\t\tthis.armor.set(armor);\r\n\t\tthis.attack.set(attack);\r\n\t\tthis.stamina.set(stamina);\r\n\t\tthis.speed.set(speed);\r\n\t\tthis.luck.set(luck);\r\n\t\tthis.level.set((armor + attack + stamina + speed + luck) / 100);\r\n\t}", "WormCharacter(int inx, int iny, int inw, int inl, int sw, int sl){\n\t\tx = inx;\n\t\ty = iny;\n\t\twidth = inw;\n\t\tlength = inl;\n\t\tisVisible = true;\n\t\tscreenwidth = sw;\n\t\tscreenlength = sl;\n\t}", "public enemybullet(int x, int y, int xtank, int ytank) {\n\t\tthis.x=x; \n\t\tthis.y=y; \n\t\txspeed = speed; \n\t\tyspeed = (y-ytank)*speed/(x-xtank); \n\t\tSystem.out.println(xspeed+\" \"+yspeed);\n\t}", "public Tank(int tankNumber, Handler handler, float x, float y, int vx, int vy, int angle) {\n// super(handler, x, y, vx, vy, angle);\n super(handler, x, y, angle);\n health = 5;\n\n this.tankNumber = tankNumber;\n bounds.x = 0;\n bounds.y = 0;\n bounds.width = 49;\n bounds.height = 50;\n lifeCount = 3;\n }", "public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }", "public MonkeyTower(MonkeyTowerType type, Floor startingFloor, CopyOnWriteArrayList<Balloon> balloons, int width,\r\n\t\t\tint height) {\r\n\t\tthis.x = startingFloor.getxPos();\r\n\t\tthis.y = startingFloor.getyPos();\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t\t// this.target = target;\r\n\t\tthis.timeSinceLastShot = 0f;\r\n\t\tthis.darts = new ArrayList<Dart>();\r\n\t\tthis.damage = type.damage;\r\n\t\tthis.textures = type.textures;\r\n\t\tthis.balloons = balloons;\r\n\t\tthis.targeted = false;\r\n\t\tthis.range = type.range;\r\n\t\tthis.firingSpeed = type.firingSpeed;\r\n\t\tthis.angle = 0f;\r\n\t\tthis.type = type;\r\n\t\tthis.dart = DartType.NormalDart;\r\n\t\tSystem.out.println(\"Image: \" + width + \" \" + height);\r\n\t}", "public Flame_Tank(int defx, int defy) {\n\t\tsuper(defx,defy);\n\t\twidth = 58;\n\t\theight = 31;\n\t\thitBox = new Rectangle(defx, defy, width, height); // fix this\n\t\txMaxSpeed = 0.3f;\n\t\tfriction = 0.01f;\n\t\tjumpStrength = 0.5f;\n\t\telasticity = 0.2f;\n\t\thp = 1000;\n\t\t\n\t\ttry {\n\t\t\tblank = new Image (\"res/blank.png\");\n\t\t\tft1 = new Image (\"res/Flare_Tank1.png\");\n\t\t\tft2 = new Image (\"res/Flare_Tank2.png\");\n\t\t\tftb1 = new Image (\"res/Flare_Tank_b1.png\");\n\t\t\tftb2 = new Image (\"res/Flare_Tank_b2.png\");\n\t\t\tftb3 = new Image (\"res/Flare_Tank_b3.png\");\n\t\t\tftb4 = new Image (\"res/Flare_Tank_b4.png\");\n\t\t} catch (SlickException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tftank[0] = ft1;\n\t\tftank[1] = ft2;\n\t\tftank[2] = ft2;\n\t\tftank[3] = ftb1;\n\t\tftank[4] = ftb2;\n\t\tftank[5] = ftb3;\n\t\tftank[6] = ftb4;\n\t\tftank[7] = blank;\n\t\tFlame_tank = new Animation(ftank,200,true);\n\t\t\n\t\tweapons.add(new Weapon(Weapon.getWeapons().get(7)));\n\t\tfor(Weapon w : weapons) {\n\t\t\tw.setEnemy(true);\n\t\t}\n\t\tcurrentWeapon = weapons.get(1);\n\t}", "public Character()\n\t{\n\t\tthis(450,810);\n\t}", "ShooterExplosion(int x, int y) {\n super(x, y);\n }", "public Character()\n\t{\n\t\tlevel = 0;\n\t\thealth = 0;\n\t}", "public Warlock() {\n name = \"\";\n className = \"\";\n currentHealth = 0;\n strength = 0;\n defense = 0;\n special = 0;\n points = 0;\n }", "public Asteroid()\r\n\t{\r\n\t\tsuper.setDirection(rn.nextInt(360));\r\n\t\tsuper.setSpeed(rn.nextInt(100));\r\n\t\tsuper.setLocalX(rn.nextFloat() * 1024);\r\n\t\tsuper.setLocalY(rn.nextFloat() * 786);\r\n\t\tsuper.setColor(250);\r\n\t\tsize = rn.nextInt(10);\r\n\t\t\r\n\t}", "public WallTile()\n\t{\n\t\t\n\t}", "public Enemy(Texture tex) \r\n\t{\r\n\t\tsuper(tex);\r\n\t\tm_type = \"enemy\";\r\n\t\tm_controller = new IAController();\r\n\t\tm_weapon = new AttackEmitter();\r\n\t\t\r\n\t\tm_lifeBar.setScale(new Vector2(0.3f,0.3f));\r\n\t\t\r\n\t\tm_speed = 50;\r\n\t\tm_life = 4;\r\n\t\t\r\n\t}", "@Override\n public void attack(){\n int xBullet=0,yBullet=0;\n switch(direction){\n case 0:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()*3/4);\n break;\n case 1:\n xBullet=(int)(x+Sprite.python_left.getWidth()*3/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 2:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 3:\n xBullet=(int)(x+Sprite.python_left.getWidth()/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n }\n PythonBullet pythonBullet=new PythonBullet(xBullet,yBullet,board,Player.PLAYER_SPEED*1.5);\n pythonBullet.setDirection(direction);\n board.addBullets(pythonBullet);\n\n }", "Enemy(int floor, int position, String n, int l){\r\n\t\tname = n;\r\n\t\talive = true;\r\n\t\tlevel = l;\r\n\t\thealth = 2*level;\r\n\t\tleftImage = new ImageIcon(getClass().getClassLoader().getResource(n +\"Left.png\"));\r\n\t\trightImage = new ImageIcon(getClass().getClassLoader().getResource(n +\"Right.png\"));\r\n\t\tsetIcon(rightImage);\r\n\r\n\t\t\ty = floor - 100;\r\n\t\t\tx = position;\r\n\t\t\tsetSize(50, 100);\r\n\t\t\tsetLocation(x,y);\r\n\t\t\tsetBackground(Color.red);\r\n\r\n\r\n\t\t}", "public CourtMovement() {\r\n\t\tsuper();\r\n\t\tstart = 0;\r\n\t\tend = 0;\r\n\t}", "public PowerUp()\n {\n powerUp = new Rectangle();\n Random gen = new Random();\n int x = gen.nextInt(9);\n switch(x){\n case 0: type = \"Life\"; break;\n case 1: type = \"Laser\"; break;\n case 2: type = \"Gun\"; break;\n case 3: type = \"Long\"; break;\n case 4: type = \"Multi\"; break;\n case 5: type = \"Catch\"; break;\n case 6: type = \"Slow\"; break;\n case 7: type = \"Flip\"; break;\n case 8: type = \"Bomb\"; break;\n }\n text = new Rectangle();\n }", "public Tower(String name, Image image, double minRange, double maxRange, double buildCost, double upgradeCost, double attack, int x, int y) {\n this.name = name;\n this.image = image;\n this.minRange = minRange;\n this.maxRange = maxRange;\n this.buildCost = buildCost;\n this.upgradeCost = upgradeCost;\n this.attack = attack;\n this.x = x;\n this.y = y;\n }", "public MonkeyTower(MonkeyTowerType type, Floor startingFloor, CopyOnWriteArrayList<Balloon> balloons) {\r\n\t\tthis.x = startingFloor.getxPos();\r\n\t\tthis.y = startingFloor.getyPos();\r\n\t\tthis.width = type.textures[0].getImageWidth();\r\n\t\tthis.height = type.textures[0].getImageHeight();\r\n\t\t// this.target = target;\r\n\t\tthis.timeSinceLastShot = 0f;\r\n\t\tthis.darts = new ArrayList<Dart>();\r\n\t\tthis.damage = type.damage;\r\n\t\tthis.textures = type.textures;\r\n\t\tthis.balloons = balloons;\r\n\t\tthis.targeted = false;\r\n\t\tthis.range = type.range;\r\n\t\tthis.firingSpeed = type.firingSpeed;\r\n\t\tthis.angle = 0f;\r\n\t\tthis.type = type;\r\n\t\tthis.dart = DartType.NormalDart;\r\n\t\tSystem.out.println(\"Image: \" + type.textures[0].getImageWidth() + \" \" + type.textures[0].getImageHeight());\r\n\t}", "public Character(String name, int armor, int attack, int stamina, int speed, int luck, \r\n\t File imagePath) {\r\n\t\t\tthis.name.set(name);\r\n\t\t\tthis.armor.set(armor);\r\n\t\t\tthis.attack.set(attack);\t\r\n\t\t\tthis.stamina.set(stamina);\r\n\t\t\tthis.speed.set(speed);\r\n\t\t\tthis.luck.set(luck);\r\n\t\t\tportrait = imagePath;\r\n\t\t\tthis.level.set((armor + attack + stamina + speed + luck) / 100);\r\n\t}", "public Unit(String name, int calories, String side) {\n super(name);\n this.side = side;\n setStrength(calories);\n setTagged(false);\n bandanas = 1;\n // profile = new Profile();\n setInJail(false);\n column = -1;\n row = -1;\n challenges = 0;\n challengesWon = 0;\n rewards = new ArrayList<Reward>();\n }", "public FireTile() {\n super();\n setUtility(5);\n }", "public SniperEnemy()\n { \n scoreBoost = 15;\n moneyBoost = 300;\n healthPoints = 500; \n fireRate = 45; \n movementCounter = 20;\n movementMod = 20;\n }", "public GameBoard(int numLanes, int yPos, int laneLength, int maxObjects){\n super(BULLET_DEPTH); //all attacks will be drawn at a depth of 20\n attacks = new ArrayList<AttackObject>(maxObjects);\n attacksToDelete = new LinkedList<>();\n attacksToAdd = new LinkedList<>();\n this.laneTopPosition = yPos;\n this.numLanes = numLanes;\n this.laneLength = laneLength;\n this.maxObjects = maxObjects;\n this.clearing = false;\n }", "public Charmander(World w)\n {\n //TODO (48): Add a third parameter of Fire to this super line\n super(700, 1);\n getImage().scale(150, 100);\n w.addObject( getHealthBar() , 300, w.getHeight() - 50 );\n }", "public Unit (int hp, int str, int mag, int def, Position p) {\n this.stats = new Stats(hp, str, mag, def);\n this.position = p;\n }", "Enemy(int floor, int position, String n, int l, int m){\r\n\t\tname = n;\r\n\t\talive = true;\r\n\t\tmovetype = m;\r\n\t\tlevel = l;\r\n\t\thealth = 10*level;\r\n\t\tleftImage = new ImageIcon(getClass().getClassLoader().getResource(n +\"Left.png\"));\r\n\t\trightImage = new ImageIcon(getClass().getClassLoader().getResource(n +\"Right.png\"));\r\n\t\tsetIcon(rightImage);\r\n\r\n\t\t\ty = floor - 100;\r\n\t\t\tx = position;\r\n\t\t\tsetSize(50, 100);\r\n\t\t\tsetLocation(x,y);\r\n\t\t\tsetBackground(Color.red);\r\n\r\n\r\n\t\t}", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "public ObstacleSprite(int left, int top, int right, int bottom, OBSTACLE_SPEED obstacleSpeed, Game game)\n {\n super(left, top, right, bottom, game);\n speed = (int) Math.round(DEFAULT_OBSTACLE_SPEED * (obstacleSpeed.value / 2.0));\n wasTouched = false;\n\n if(obstacleSpriteImage == null)\n {\n Bitmap settingsBitmap = BitmapFactory.decodeResource(resources, R.drawable.missile);\n obstacleSpriteImage = new AndroidImage(settingsBitmap, AndroidGraphics.ImageFormat.ARGB4444);\n }\n\n if(obstacleExplosionImage == null)\n {\n Bitmap settingsBitmap = BitmapFactory.decodeResource(resources, R.drawable.explosion);\n obstacleExplosionImage = new AndroidImage(settingsBitmap, AndroidGraphics.ImageFormat.ARGB4444);\n }\n }", "public TankLocal() {\n super();\n\n setHullImage(\"/gui/sprites/TankBases/Tank1.png\");\n getHullView().setFocusTraversable(true);\n super.bindTurret();\n\n canShoot.bind(shotCooldownTicks.isEqualTo(0));\n\n getHullView().setOnKeyPressed(event -> {\n //System.out.println(event.getCharacter());\n\n switch(event.getCode()) {\n case UP: isUpPressed.setValue(true); break;\n case DOWN: isDownPressed.setValue(true); break;\n case LEFT: isLeftPressed.setValue(true); break;\n case RIGHT: isRightPressed.setValue(true); break;\n }\n });\n\n getHullView().setOnKeyReleased(event -> {\n switch(event.getCode()) {\n case UP: isUpPressed.setValue(false); break;\n case DOWN: isDownPressed.setValue(false); break;\n case LEFT: isLeftPressed.setValue(false); break;\n case RIGHT: isRightPressed.setValue(false); break;\n }\n });\n\n coolDownArc = new Arc();\n coolDownArc.setType(ArcType.ROUND);;\n coolDownArc.setFill(Paint.valueOf(\"#abababbf\"));\n coolDownArc.setStrokeWidth(0);\n coolDownArc.setRadiusX(40);\n coolDownArc.setRadiusY(40);\n coolDownArc.setStartAngle(90);\n\n //current / initial * 360\n coolDownArc.lengthProperty().bind(shotCooldownTicks.divide(initialCooldownTicks).multiply(360));\n coolDownArc.centerXProperty().bind(getHullView().xProperty().add(20));\n coolDownArc.centerYProperty().bind(getHullView().yProperty().add(20));\n }", "protected DugWall() {\r\n\t\tsuper(sprite, PERMEABILITY.PENETRABLE);\r\n\t\t\r\n\t}", "public Tank(){ //initializes the x, y, and rectangle\n\t\t\tx = 350;\n\t\t\tlx = x + 100;\n\t\t\tly = 490;\n\t\t\tthis.setBounds(x,y,540,200);\n\t\t}", "public BossEnemy(double xCoord, double yCoord){\r\n super(xCoord, yCoord, 0, 0, 40, 20, 100);\r\n velocity = 6;\r\n }", "public Wall() {\n\t\tcanHold = false;\n\t\tisPassable = false;\n\t\ttype = TileTypes.WALL;\n\t}", "public void newlevel() {\n\t\tblack = new Background(COURT_WIDTH, COURT_HEIGHT); // reset background\n\t\tcannon = new Cannon(COURT_WIDTH, COURT_HEIGHT); // reset cannon\n\t\tdeadcannon = null;\n\t\tbullet = null;\n\t\tshot1 = null;\n\t\tshot2 = null;\n\t\t// reset top row\n\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\talien1[i] = new Alien(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien1[i].pos_x = alien1[i].pos_x + 30*i;\n\t\t\talien1[i].v_x = level + alien1[i].v_x;\n\t\t}\n\t\t// reset second row\n\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\talien2[i] = new Alien2(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien2[i].pos_x = alien2[i].pos_x + 30*i;\n\t\t\talien2[i].v_x = level + alien2[i].v_x;\n\t\t}\n\t\t// reset third row\n\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\talien3[i] = new Alien3(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien3[i].pos_x = alien3[i].pos_x + 30*i;\n\t\t\talien3[i].v_x = level + alien3[i].v_x;\n\t\t}\n\t}", "public PlayerPiece()\n {\n // initialise instance variables\n //Use the values listed in the comments\n //above that are next to each instance variable\n pieceName = \"no name\";\n pieceType = \"human\";\n currentHealth = 100;\n maxHealth = 100;\n locX = 7;\n locY = 8;\n attackPower = 25;\n defensePower = 20;\n currentSpecialPower = 50;\n maxSpecialPower = 50;\n \n }", "DnDCharacter2() {\n strength = ability();\n dexterity = ability();\n constitution = ability();\n intelligence = ability();\n wisdom = ability();\n charisma = ability();\n hitpoints = 10 + modifier(constitution);\n }", "public HealthyWorld()\n { \n // Create a new wolrd with 800x400 cells and a cell size of 1x1 pixels\n super(800, 400, 1);\n healthLevel = 10;\n time = 2000;\n showHealthLevel();\n showTime();\n // Create a kid in the middle of the screen\n Kid theKid = new Kid();\n this.addObject(theKid, 400, 350);\n }", "public Character() {\n\t\tlocation = new Location[21];\n\t\t\n\t\t/***********************ERSTELLEN DER RÄUME***************************************/\n\t\tlocation[0] = new Location(\"Büro\", \"In deinem Büro ist mittig ein überfüllter Schreibtisch [desk] an dem ein Scott Chefsessel mit original Kunstleder im Wert von 500€ \"\n\t\t\t\t+ \"steht [chair]. Außerdem stehen zwei Schränke in jeweils einer Ecke des Raumes.\");\n\t\tlocation[1] = new Location(\"Korridor 2 Etage\", \"Im Korridor angekommen siehst du mehrere Räume.\");\n\t\tlocation[2] = new Location(\"Kaffeeraum\", \"Dies ist der Kaffee- und Kuchenraum der Lehrer.\"\n\t\t\t\t+ \"\\nDu siehst eine neumodische Ikea Küche, mit vielen Küchenschränken [cupboards] auf denen eine uralte verrostete vermutlich aus dem \"\n\t\t\t\t+ \"1. Weltkrieg stammende Kaffeemaschine [coffeemachine] und eine Mikrowelle steht!\");\n\t\tlocation[3] = new Location(\"Konferenzraum\", \"In diesem Raum werden Konferenzen zu wichtigen Themen abgehalten und unwichtigen, aber die betreffen dich ja eh nicht!\"\n\t\t\t\t+ \"\\nEinem Konferenzraum entsprechend befindet sich in der Mitte ein Tisch in der Form eines U's. Außerdem hängt an der Wand ein \"\n\t\t\t\t+ \"Stundenplan und ein Schrank mit den Fächern für die Lehrer.\");\n\t\tlocation[4] = new Location(\"Kammer der Leere\", \"Dieser Raum sieht aus als wenn hier seit Jahren niemand mehr drin gewesen wäre.\", false);\n\t\tlocation[5] = new Location(\"Ventilationraum\", \"Ein Ventilationsraum. Alt, veranzt und staubig. Gelüftet wurde hier schon seit Jahren nicht mehr!\", false);\n\t\tlocation[6] = new Location(\"Damentoilette\", \"In der Damentoilette angekommen, sieht Kollegin Stelz dich irritiert an und geht mit den Worten: \\\"Sie überraschen mich immer wieder\\\" raus.\"\n\t\t\t\t+ \"\\nBeschreibung: Warst du noch nie in einer Damentoilette?\");\n\t\tlocation[7] = new Location(\"Herrentoilette\", \"Als du die Herrentoilette betrittst, weht dir ein animalischer Duft entgegen, welchen du dem ebenfalls \\\"leicht\\\" animalischen Direktor zuordnest!\");\n\t\tlocation[8] = new Location(\"Schulleiterraum\", \"Das Büro des Direktors ist ähnlich wie deines, über den vermüllten Schreibtisch schaut dich ein grimmiger Haufen Kalorien an. Dies müsste \"\n\t\t\t\t+ \"deiner mathematisch hoch komplexen Überlegungen nach der Direktor sein.\");\n\t\tlocation[9] = new Location(\"Fahrstuhl\", \"An einer der blank geputzten grauen Fahrstuhlwände steht:\\\"Im Brandfall nicht benutzbar!\\\".\");\n\t\tlocation[10] = new Location(\"Treppenhaus\", \"Ein Treppenhaus... es brennt!\");\n\t\tlocation[11] = new Location(\"Korridor 1 Etage\", \"Ein langer Korridor...\"\n\t\t\t\t+ \"\\nAn ihm liegen vier vom Aufbau her identische Hörsäle, jedoch gehört der erste den musischen Wissenschaften, der \"\n\t\t\t\t+ \"zweite zu den literarischen, der dritte zu den gesellschaftlichen und als letztes kommt endlich der naturwissenschaftliche Hörsal.\", false);\n\t\tlocation[12] = new Location(\"Hörsaal 1\", \"Man darf sich bekanntlich nicht mehr fragen, ob musische Wissenschaften überhaupt als eine Wissenschaft gelten, da Künstler und Freidenker \"\n\t\t\t\t+ \"sich sonst angegriffen fühlen, aber ein Naturwissenschaftler wie du hat wohl besseres verdient!\");\n\t\tlocation[13] = new Location(\"Spindraum\", \"Modrig steigt der Geruch ranziger Käsebrote durch die Lüftungsschlitze einiger Schließfächer, welche jedoch alle durch Algen in einem schönen \"\n\t\t\t\t+ \"Armee-Grünton gehalten werden. Alle? Nein, nicht alle! Eine glanzpolierte Marmorvariante, die dem Hausmeister gehört, koexistiert tatsächlich noch in diesem Raum.\");\n\t\tlocation[14] = new Location(\"Abstellraum\", \"Ein Mob, ein Eimer, ein Feuchttuch.... dich verwundert es, wie der Hausmeister nur mit diesen Sachen zumindest sein Revier so poliert\");\n\t\tlocation[15] = new Location(\"Hörsaal 2\", \"Im vorderen Teil liest der Professor aus einem Buch einen Text in einer Sprache, die du nicht verstehst, während im hinteren Teil sich Schüler \"\n\t\t\t\t+ \"mit Käsekästchen, Schere-Stein-Papier und Battlefield die Zeit vertreiben.\");\n\t\tlocation[16] = new Location(\"Hörsaal 3\", \"Der Lehrende zeigt aufgeregt auf eine Karte, welchen Schwerpunkt diese Vorlesung auch immer hat, eine Karte macht alles spannender! \"\n\t\t\t\t+ \"Sein Gegenspieler gewinnt in dem Pokerduell und jubelt laut auf!\");\n\t\tlocation[17] = new Location(\"Hörsaal 4\", \"Dein Reich ist gerade von einem Chemieprofessor belegt. Dieser ist grade dabei mit peinlicher Sorgfalt den Tisch in alle vier \"\n\t\t\t\t+ \"Himmelsrichtungen gleichzeitig zu katapultieren!\");\n\t\tlocation[18] = new Location(\"Damentoilette\", \"Es riecht herrlich nach Einhorn und Regenbogen, und nach dem alkohoisierten Hausmeister, der dabei ist den Lippenstift vom Spiegel zu \"\n\t\t\t\t+ \"entfernen und dich nicht bemerkt.\");\n\t\tlocation[19] = new Location(\"Herrentoilette\", \"Das Putzfrauenspecialcorps hat sich gestern zur Aufgabe gemacht den grünen Schleim von der Wand zu entfernen... \"\n\t\t\t\t+ \"Nur noch ein wenig Neutralreiniger auf dem Boden und eine Cap, mit dem Wort \\\"Obey\\\", schaukelnd an einer Lampe, sind noch übrig geblieben.\");\n\t\tlocation[20] = new Location(\"Fahrstuhlschacht\", \"Im Raum angekommen fällt dir sofort die ganze Elektronik hier unten auf. Ob hier noch mehr ist?\", false);\n\t\t\n\t\t\n\t\t\n\t\t/*************************BESCHREIBUNG BEIM EXPLOREN******************************/\n\t\tlocation[0].getDescriptions().setExploreDescription(\"Das Büro ist nicht besonders groß, aber du bist trotzdem stolz auf deinen Chefsessel. Außerdem steht eine Vitrine in dem \"\n\t\t\t\t+ \"Raum, in der deine Preise und Trophäen stehen.\");\n\t\tlocation[1].getDescriptions().setExploreDescription(\"Was willst du wissen? Es ist nur ein typischer langweiliger Korridor, mit einem Kaffeelöscherkasten [extinguisher box], wie man's in Uni's gewohnt ist!\");\n\t\tlocation[2].getDescriptions().setExploreDescription(\"Du fragst dich, was in den ganzen Küchenschränken [cupboards] sein könnte und warum der Boden hier höher ist!\");\n\t\tlocation[3].getDescriptions().setExploreDescription(\"Die Lehrer starren dich aus großen Augen an. Du bist wohl mitten in eine Versammlung reingeplatzt. Kann dir auch egal sein, \"\n\t\t\t\t+ \"ist keine Konferenz von der du weißt. Dir fällt der Ventilationsschacht [ventilation shaft] auf, bei dem das Gitter nur noch an den Schacht gelehnt ist.\");\n\t\tlocation[4].getDescriptions().setExploreDescription(\"Du siehst eine deiner Notizen [note] zwischen zwei Kartons gequetscht. Keine Ahnung wie der Windstoß das verursachen konnte...\");\n\t\tlocation[5].getDescriptions().setExploreDescription(\"Du siehst eine deiner Notizen [note].\");\n\t\tlocation[6].getDescriptions().setExploreDescription(\"Jetzt bloß nicht spülen. Es sei denn du magst keine Skillbooks... [skillbook]. Bei diesem Skillbook scheinst du eine Beamfähigkeit \"\n\t\t\t\t+ \"erlernen zu können.\");\n\t\tlocation[7].getDescriptions().setExploreDescription(\"Der Geruch ist wirklich unerträglich. Lange wirst du es hier nicht mehr aushalten können.\");\n\t\tlocation[8].getDescriptions().setExploreDescription(\"Meisterhaft in Inneneinrichtung hat der Direktor hier einen braunen Tisch, zwei graue Stühle und eine Ansammlung von an Krawatten erhängten Skelette.\\nEr ist damit beschäftigt, Frederic Chopin's neunte Death Metal Komposition zu hören.\");\n\t\tlocation[9].getDescriptions().setExploreDescription(\"Erst jetzt fällt dir der Gully [gully] auf dem Boden auf. Wo der wohl hinführt...\\n\"\n\t\t\t\t+ \"Um das herauszufinden wirst du definitiv so etwas wie einen Hebel benötigen.\"\n\t\t\t\t+ \"\\nDie Feueraxt [fire ax] ist dir eigentlich schon vorher aufgefallen, doch vielleicht wird sie jetzt wichtig?\");\n\t\tlocation[10].getDescriptions().setExploreDescription(\"Das Feuer ist echt frech! Es blockiert dir doch tatsächlich den Weg in den ersten Stock [floor 1].\");\n\t\tlocation[11].getDescriptions().setExploreDescription(\"Grau.Und unspektakulär. Der Mülleimer muss unbedingt mal geleert werden.\");\n\t\tlocation[12].getDescriptions().setExploreDescription(\"Der Professor liegt in ziemlich bizarren Posen auf dem Tisch und erklärt den Studenten(und Studentinnen), welche Pose welche Wirkung hat.\"\n\t\t\t\t+ \"\\nDu kannst das Geld, dass für jede Pose gazahlt wird, förmlich von dem Direktor in die Tasche des Professors wandern sehen.\\nHier steht noch Maribelle [student], obwohl sie wesentlich kleiner ist, schaut sie hochnäsig auf dich herab.\");\n\t\tlocation[13].getDescriptions().setExploreDescription(\"So viele Schließfächer [locker], und alle sind nummeriert. Verhindert wird jedoch eine genaue Identifikation des Hausmeisterfaches [shiny locker], da die Nummer wegpoliert wurde.\");\n\t\tlocation[14].getDescriptions().setExploreDescription(\"Dir fällt ein Spachtel [spatula] auf, der eindeutig aus der Chemiesammlung genommen wurde. Hol zurück, was dir gehört!\");\n\t\tlocation[15].getDescriptions().setExploreDescription(\"Schon wieder eine Runde 4-1 KD, der Schüler ist wirklich gut darin, Minen im richtigen Moment hochzujagen. Der Professer liest weiterhin monoton aus dem Buch vor.\"\n\t\t\t\t+ \"\\nJochen [student] ist so gelangweilt, dass er deinen Schritten Aufmerksamkeit schenkt.\");\n\t\tlocation[16].getDescriptions().setExploreDescription(\"Alle Studierenden sind inzwischen wieder drin, während der Professor eine Runde in der Ecke schmollt.\"\n\t\t\t\t+ \"\\nOh-oh, da kommt Anthon [student]\");\n\t\tlocation[17].getDescriptions().setExploreDescription(\"Die Frau braucht wieder einmal zu lange, du musst den Vortrag wohl beginnen, während sie noch Chemikalien mischt.\"\n\t\t\t\t+ \"\\nGerhard [student], dein persöhnlicher Fanboy, starrt dich mit großen Augen an.\");\n\t\tlocation[18].getDescriptions().setExploreDescription(\"Es ist ein Graus, Steven hat sich von Rebecca getrennt, und Grün ist das neue Schwarz, zumindest nach den Tratschtanten auf dem Klo.\");\n\t\tlocation[19].getDescriptions().setExploreDescription(\"Der Schleim heißt Wilhelm von Kaiser [wilhelm] und verkauft während der Pausen Katzenbabys für diejenigen in Not, ein sehr angenehmer Geselle.\");\n\t\tlocation[20].getDescriptions().setExploreDescription(\"Hier liegt eine Kaffeetasse mit, wer hätte es gedacht, heißem Kaffee [cup coffee] drin.\");\n\t\t\n\t\t\n\t\t/******************BESCHREIBUNG FÜR BEREITS UNTERSUCHTE RÄUME*********************/\n\t\tlocation[0].getDescriptions().setAlreadyExploredDescription(\"Der Raum ist nicht besonders groß, aber auf deinen Chefsessel bist du trotzdem stolz und natürlich auf deine Preis und Trophäen \"\n\t\t\t\t+ \"in deiner Vitrine.\");\n\t\tlocation[1].getDescriptions().setAlreadyExploredDescription(\"Ein typischer Korridor mit einem Kaffeelöscherkasten [extinguisher box]. Ist halt 'ne Uni!\");\n\t\tlocation[2].getDescriptions().setAlreadyExploredDescription(\"Weißt du noch als du dich gefragt hast was in den ganzen Küchenschränken sein könnte und warum der Boden hier höher ist?\");\n\t\tlocation[3].getDescriptions().setAlreadyExploredDescription(\"Die Konferenz wird wohl nie zu Ende gehen. Der Ventilationssacht [ventilation shaft] ist auch echt auffällig.\");\n\t\tlocation[4].getDescriptions().setAlreadyExploredDescription(\"Eine deiner Notiz [note] liegt zwischen zwei Kartons.\");\n\t\tlocation[5].getDescriptions().setAlreadyExploredDescription(\"Aber immerhin liegt hier eine deiner Notizen\");\n\t\tlocation[6].getDescriptions().setAlreadyExploredDescription(\"Naja, hier liegt halt noch ein Skillbook [skillbook].\");\n\t\tlocation[7].getDescriptions().setAlreadyExploredDescription(\"Der Geruch ist wirklich unerträglich. Lange wirst du es hier nicht mehr aushalten können.\");\n\t\tlocation[8].getDescriptions().setAlreadyExploredDescription(\"Der Direktor hört noch immer laute Musik von Frederic Chopin.\");\n\t\tlocation[9].getDescriptions().setAlreadyExploredDescription(\"Auch ein Gullideckel ist hier noch. #normal\");\n\t\tlocation[10].getDescriptions().setAlreadyExploredDescription(\"Das Feuer blockiert dir immer noch den Weg in den ersten Stock [floor 1]!\");\n\t\tlocation[11].getDescriptions().setAlreadyExploredDescription(\"Grau. Und unspektakulär.\");\n\t\tlocation[12].getDescriptions().setAlreadyExploredDescription(\"Maribelle [student] stolziert hier immer noch herum.\");\n\t\tlocation[13].getDescriptions().setAlreadyExploredDescription(\"Jedoch sind sowohl die Normalen [locker] als auch der Besondere [shiny locker] relativ uninteressant.\");\n\t\tlocation[14].getDescriptions().setAlreadyExploredDescription(\"Hier liegt ein Spachtel [spatula], der eindeutig aus der Chemiesammlung genommen wurde.\");\n\t\tlocation[15].getDescriptions().setAlreadyExploredDescription(\"Der Professer liest noch immer aus dem Buch vor, während dir Jochen noch immer hinterher starrt.\");\n\t\tlocation[16].getDescriptions().setAlreadyExploredDescription(\"Anthon [student] bemerkt dich sofort, als du den Raum betrittst.\");\n\t\tlocation[17].getDescriptions().setAlreadyExploredDescription(\"Gerhards Blick bleibt sofort auf dir haften, als du in Raum gehst.\");\n\t\tlocation[18].getDescriptions().setAlreadyExploredDescription(\"Die Tratschtanten reden noch immer.\");\n\t\tlocation[19].getDescriptions().setAlreadyExploredDescription(\"Wilhelm von Kaiser [wilhelm] schleimt noch immer hier rum.\");\n\t\t\n\t\t\n\t\t/****************************AUSGÄNGE*********************************************/\n\t\tlocation[0].setExits(\"Korridor [corridor]\");\n\t\tlocation[1].setExits(\"Büro [office]\" + \"\\nKaffeeraum [coffeeroom]\" + \"\\nKonferenzraum [conference room]\" + \"\\nSchulleiterraum [principalsroom]\"\n\t\t\t\t\t\t\t+ \"\\nHerrentoilette [gentlemenstoilet]\" + \"\\nTreppenhaus [stairwell]\" + \"\\nFahrstuhl [elevator]\");\n\t\tlocation[2].setExits(\"Korridor [corridor]\" + \"\\nKonferenzraum [conference room]\");\n\t\tlocation[3].setExits(\"Korridor [corridor]\" + \"\\nKaffeeraum [coffeeroom]\");\n\t\tlocation[4].setExits(\"Kaffeeraum [coffeeroom]\");\n\t\tlocation[5].setExits(\"Konferenzraum [conference room]\");\n\t\tfor (int i = 6; i < 10; i++) {\n\t\t\tlocation[i].setExits(\"Korridor [corridor]\");\n\t\t}\n\t\tlocation[10].setExits(\"Lehreretage [floor 2]\" + \"\\nSchüleretage [floor 1]\");\n\t\tlocation[11].setExits(\"Hörsaal <1-4> [lecture hall <1-4>]\" + \"\\nSpindraum [lockerroom]\" + \"\\nAbstellraum [storeroom]\" + \"\\nDamentoilette [ladiestoilet]\"\n\t\t\t\t\t\t\t\t+ \"\\nHerrentoilette [gentlemenstoilet]\" + \"\\nFahrstuhl [elevator]\" + \"\\nTreppenhaus [stairwell]\");\n\t\tfor (int i = 12; i <= 19; i++) {\t\t// Die restlichen Räume haben anfangs alle den Korridor als einzigen Ausgang\n\t\t\tlocation[i].setExits(\"Korridor [corridor]\");\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/**********************ERSTELLEN VON GEGENSTÄNDEN*********************************/\n\t\tlocation[0].createItem(0, \"Schrank\", 0, 000);\t\t\t\t\t\t\t// wird nie benutzt oder erwähnt TODO\n\t\tlocation[0].createItem(1, \"Stuhl\", 0, 001);\n\t\tlocation[0].createItem(2, \"Schreibtisch\", 0, 002);\n\t\tlocation[0].createItem(3, \"Rätsellösung\", 0, 003, false);\n\t\tlocation[1].createItem(0, \"Kaffeelöscherkasten\", 1, 100, false);\n\t\tlocation[1].createItem(1, \"Kaffeelöscher\", 1, 101, false);\n\t\tlocation[2].createItem(0, \"Kaffeemaschine\", 2, 200);\n\t\tlocation[2].createItem(1, \"Küchenschränke\", 2, 201);\n\t\tlocation[3].createItem(0, \"Lüftungsschacht\", 3, 300, false);\n\t\tlocation[4].createItem(0, \"Notiz\", 4, 400, false);\n\t\tlocation[5].createItem(0, \"Notiz\", 5, 500, false);\n\t\tlocation[6].createItem(0, \"Skillbook\", 6, 600, false);\n\t\tlocation[9].createItem(0, \"Feueraxt\", 9, 900);\n\t\tlocation[9].createItem(1, \"Gulli\", 9, 901, false);\n\t\tlocation[13].createItem(0, \"Notiz\", 13, 1300, false);\n\t\tlocation[13].createItem(1, \"Spind 42\", 13, 1301, false);\n\t\tlocation[14].createItem(0, \"Spachtel\", 14, 1400, false);\n\t\tlocation[19].createItem(0, \"Notiz\", 19, 1900);\n\t\tlocation[20].createItem(0, \"Kaffeetasse\", 20, 2000, false);\n\t\t\n\t\t\n\t\t/***********************BESCHREIBUNGEN DER GEGENSTÄNDE****************************/\n\t\tlocation[0].getItemByName(\"Schrank\").setDescription(\"Funzt >> desSchrank!\");\n\t\tlocation[0].getItemByName(\"Stuhl\").setDescription(\"Ein Scott Chefsessel aus original Kunstleder im Wert von 500€, der nur dir gehört.\");\n\t\tlocation[0].getItemByName(\"Schreibtisch\").setDescription(\"Dieser Schreibtisch braucht eine neue Lackierung. Achso, und ein Putzkommando!\"\n\t\t\t\t+ \"\\nTrotz der Unordnung fällt dir ein vollgekritzeltes Papier [paper] auf, auf dem du dein letztes Meisterwerk, das Ergebnis der unendlichen Summe, niedergeschrieben hast!\");\n\t\tlocation[0].getItemByName(\"Rätsellösung\").setDescription(\"Du hast hier die Summe der Unendlichkeit errechnet. Sie lautet -1/12!\");\n\t\tlocation[1].getItemByName(\"Kaffeelöscherkasten\").setDescription(\"Dieser Kasten beinhaltet einen Kaffeelöscher [coffee extinguisher], dieser ist der (un)natürlichste Bestandteil einer Feuerwehrausrüstung! \"\n\t\t\t\t+ \"Der Kasten ist durch ein elektronisches Sicherheitsschloss gesichert!\");\n\t\tlocation[1].getItemByName(\"Kaffeelöscher\").setDescription(\"Ein Feuerlöscher mit komisch riechendem Kaffee gefüllt.\");\n\t\tlocation[2].getItemByName(\"Kaffeemaschine\").setDescription(\"Eine hochwertig billige Kaffeemaschine. Die nicht funktoniert, irgendwer muss wohl das Stromkabel rausgezogen haben.\");\n\t\tlocation[2].getItemByName(\"Küchenschränke\").setDescription(\"Unter einem der Schränke ist ein Hohlraum, welcher unter dem ganzen Kaffeeraum hindurch führt zu einem\"\n\t\t\t\t+ \"\\ngeheimen Raum [chamber].\");\n\t\tlocation[3].getItemByName(\"Lüftungsschacht\").setDescription(\"Du entdeckst einen Geheimraum [ventilationroom].\");\n\t\tlocation[4].getItemByName(\"Notiz\").setDescription(\"Funzt >> desNotiz4!\");\n\t\tlocation[5].getItemByName(\"Notiz\").setDescription(\"Funzt >> desNotiz5!\");\n\t\tlocation[6].getItemByName(\"Skillbook\").setDescription(\"Dies ist das verstaubte Skillbook des toten Beammeisters.\");\n\t\tlocation[9].getItemByName(\"Feueraxt\").setDescription(\"Es ist eine Feueraxt!\");\n\t\tlocation[9].getItemByName(\"Gulli\").setDescription(\"Ein Gullideckel... er ist eckig, er ist halt auch ein Individuum.\"\n\t\t\t\t+ \"\\nDu brauchst irgendeinen Trick um den Gullideckel anheben zu können.\");\n\t\tlocation[14].getItemByName(\"Spachtel\").setDescription(\"Du wolltest ihn eigentlich der Chemiesammlung wiedergeben, aber er glänzt so schön.\");\n\t\tlocation[20].getItemByName(\"Kaffeetasse\").setDescription(\"Frischer Kaffee... Yammy\");\n\t\t\n\t\t\n\t\t/**********************BESCHREIBUNGEN BEIM INTERAGIEREN***************************/\n\t\tlocation[0].getItemByName(\"Stuhl\").setInteractDescription(\"Du setzt dich auf deinen Stuhl.\"\n\t\t\t\t+ \"\\nEs macht knack und du sitzt auf'm Boden... Das Steak zum Frühstück war wohl doch zu viel.\");\n\t\tlocation[1].getItemByName(\"Kaffeelöscherkasten\").setInteractDescription(\"Das kannst du nicht machen. Das elektronische Sicherheitsschloss will das nicht! \"\n\t\t\t\t+ \"Ob du einen Weg findest es zu bezwingen?\");\n\t\tlocation[1].getItemByName(\"Kaffeelöscher\").setInteractDescription(\"Jetzt bist du ein wahrer Feuerwehrmann.... Naja, nicht ganz, aber fast.\");\n\t\tlocation[2].getItemByName(\"Kaffeemaschine\").setInteractDescription(\"Du willst den Stecker in die Steckdose stecken, aber die Steckdose will das nun halt nicht und gibt dir deswegen einen tödlichen Stromschlag.\");\n\t\tlocation[6].getItemByName(\"Skillbook\").setInteractDescription(\"Du kannst dich nun beamen!\");\n\t\tlocation[9].getItemByName(\"Feueraxt\").setInteractDescription(\"Diese Axt gehört zur Grundausstattung eines Feuerbekämpfers.\");\n\t\tlocation[20].getItemByName(\"Kaffeetasse\").setInteractDescription(\"Bei dem Versuch die Kaffeetasse hochzuheben, schmeißt du sie um, wodurch du einen schönen Kurzschluss verursachst.\"\n\t\t\t\t+ \"Wenn du Glück hast, hast du nur dich damit getötet und nicht gleich die ganze Welt!\");\n\t\t\n\t\t\n\t\t\n\t\t/*************************ERSTELLEN DER STUDENTEN*********************************/\n\t\tlocation[12].createStudent(\"Maribelle\", 12);\n\t\tlocation[15].createStudent(\"Jochen\", 15);\n\t\tlocation[16].createStudent(\"Anthon\", 16);\n\t\tlocation[17].createStudent(\"Gerhard\", 17);\n\t\t\n\t\t/****************************SETZEN DER FRAGE*************************************/\n\t\tlocation[12].getStudent().setQuestionText(\"Ahh, Sie lassen sich also hier blicken, Herr Euler! Beantworten sie mir doch, wie Chopin mit Vornamen hieß.\");\n\t\tlocation[15].getStudent().setQuestionText(\"Greetings Mate! Is english DLC working right know?\");\n\t\tlocation[16].getStudent().setQuestionText(\"Ehehe Euler, was sind Dreipacken minus Zweipacken?\");\n\t\tlocation[17].getStudent().setQuestionText(\"Moin Euler, sagen Sie doch mal Ihre Summe des Unendlichen!\");\n\t\t\n\t\t\n\t\t/***************************SETZEN DER ANTWORT************************************/\n\t\tlocation[12].getStudent().setAnswerText(\"Frederic\");\n\t\tlocation[15].getStudent().setAnswerText(\"No\");\n\t\tlocation[16].getStudent().setAnswerText(\"Einpacken\");\n\t\tlocation[17].getStudent().setAnswerText(\"-1/12\");\n\t\t\n\t\t/******************SETZEN DES HINWEISES AUF DIE NOTIZEN***************************/\n\t\tlocation[12].getStudent().setHint(\"Ahh, woher wissen Sie denn das. Als ich das letzte Mal im Konferenzraum war, war die Luft so stickig!\\nJemand müsste mal den Lüftungsschacht untersuchen.\");\n\t\tlocation[15].getStudent().setHint(\"Oh, I see. Do you think locker 42 is somewhat special? Because I do think so!\");\n\t\tlocation[16].getStudent().setHint(\"Ihihi, fürchte dich vor Kaffe, der ist Tödlich!\");\n\t\tlocation[17].getStudent().setHint(\"Boah, darauf wäre ich nicht gekommen!\\nWissen Sie, warum der Boden im Kaffeeraum so hoch ist? Na, egal...\");\n\t}", "public Cenario1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(900, 600, 1);\n adicionar();\n \n }", "public Plane(Point spawnPoint, boolean flyingHorizontally, Level parentLevel){\n // Initialize the variables for the plane\n this.flyingHorizontally = flyingHorizontally;\n this.drawOps = new DrawOptions();\n this.planeImage = new Image(\"res/images/airsupport.png\");\n this.parentLevel = parentLevel;\n this.isFinished = false;\n this.bombs = new ArrayList<>();\n\n // Initialize the timekeeper that will control when a bomb should be dropped\n // '1' is added to the RNG here as the upper bound is not inclusive\n int initialDropTime = ThreadLocalRandom.current().nextInt(DROP_TIME_LOWER_BOUND,DROP_TIME_UPPER_BOUND + 1);\n this.bombDropper = new Timekeeper(initialDropTime);\n this.justDropped = false;\n // The Plane can either fly horizontally or vertically, which is specified in its constructor\n if (flyingHorizontally){\n // Set the plane facing to the right, at the leftmost point of the window and at the correct\n // height given by the spawn position\n this.currPos = new Point(0, spawnPoint.y);\n this.drawOps.setRotation(Math.PI/2);\n this.flyingHorizontally = true;\n }\n else {\n // Set the plane facing downward, at the top of the window and at the correct\n // x co-ordinate given by the spawn position\n this.currPos = new Point(spawnPoint.x, 0);\n this.drawOps.setRotation(Math.PI);\n this.flyingHorizontally = false;\n }\n }", "public Ship(int l){\n this.lifePoints=l;\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n \n Player player = new Player();\n Point point0 = new Point();\n Point point1 = new Point();\n Point point2 = new Point();\n Point point3 = new Point();\n Point point4 = new Point();\n Danger danger0 = new Danger();\n Danger danger1 = new Danger();\n addObject(player, getWidth()/2, getHeight()/2);\n \n addObject(point0,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point1,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point2,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point3,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point4,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n \n addObject(danger0,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(danger1,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n }", "public EnemyGunBullet1() {\n super(DAMAGE, SPEED);\n setEnemyBullet(true);\n setShootSound(\"enemyShot.wav\");\n try {\n image = ImageIO.read(new File(\"res/images/tanks/bullets/enemyBullet1.png\"));\n }\n catch (IOException e) { }\n }", "public Wall(int x1, int y1,int x2,int y2) {\r\n\tthis.x1 = x1 + TRANSLATION;\r\n\tthis.x2 = x2 + TRANSLATION;\r\n\tthis.y1 = y1 + TRANSLATION;\r\n\tthis.y2 = y2 + TRANSLATION;\r\n\tbustedWall = false; \r\n}", "public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }", "public Ju(){\n\t\tsuper(STARTING_X, STARTING_Y);\n\t\tsetIsJumping(true);\n\t\tdy = STARTING_DY;\n\t\tjumpHeight = INITIAL_JUMP_HEIGHT;\n\t\thealth = STARTING_LIFE;\n\t\tisStageComplete = false;\n\t\tpoint = 0;\n\t\t//A Sound obj\n\t\t\n\t\t//LOAD THE IMAGES AND CREATE ANIMATION. #check\n\t\tBufferedImage[] rightImages = {ImageManipulator.loadImage(\"Data/Ju/stillRight.png\"), ImageManipulator.loadImage(\"Data/Ju/runRight1.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/runRight2.png\"), ImageManipulator.loadImage(\"Data/Ju/runRight3.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/runRight4.png\"), ImageManipulator.loadImage(\"Data/Ju/stillJumpRight1.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/stillJumpRight2.png\"), ImageManipulator.loadImage(\"Data/Ju/runningJumpRight1.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/runningJumpRight2.png\"), ImageManipulator.loadImage(\"Data/Ju/runningJumpRight3.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/stillSitRight.png\"), ImageManipulator.loadImage(\"Data/Ju/stillUpRight.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/deadRight1.png\"), ImageManipulator.loadImage(\"Data/Ju/deadRight2.png\"), \n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/deadRight3.png\"), ImageManipulator.loadImage(\"Data/Ju/runRight5.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/runRight6.png\"), ImageManipulator.loadImage(\"Data/Ju/runRight7.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/runRight8.png\"), ImageManipulator.loadImage(\"Data/Ju/runRightNew.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/stageWin1.png\"), ImageManipulator.loadImage(\"Data/Ju/stageWin2.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/stageWin3.png\"), ImageManipulator.loadImage(\"Data/Ju/stageWin4.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/stageWin5.png\")};\n\t\t//0 == still right\n\t\t//1-4 == walk & run right\n\t\t//5-6 == still jump right\n\t\t//7-9 == running jump right\n\t\t//10 == sit right\n\t\t//11 == still up right\n\t\t//12-14 == dead right\n\t\t//15-16 17 18 == walk & run right new\n\t\t// 19-20 == walk right new\n\t\t//21-24 == win\n\t\tBufferedImage[] leftImages = {null, null, null, null, null, null, null, null, null,\n\t\t\t\tnull, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null};\n\t\tfor(int i=0; i<rightImages.length; i++){\n\t\t\tleftImages[i] = ImageManipulator.horizontalFlip(rightImages[i]);\n\t\t}\n\t\t\n\t\tstillLeft = new Animation(ANIM_TIME).addFrame(leftImages[0]);\n\t\twalkLeft = new Animation(ANIM_TIME+30).addFrame(leftImages[1]).addFrame(leftImages[4]).addFrame(leftImages[15]).addFrame(leftImages[19]).addFrame(leftImages[18]);\n\t\trunLeft = new Animation(ANIM_TIME).addFrame(leftImages[1]).addFrame(leftImages[2]).addFrame(leftImages[3]).addFrame(leftImages[4]).addFrame(leftImages[15]).addFrame(leftImages[16]).addFrame(leftImages[17]).addFrame(leftImages[18]);\n\t\tsitLeft = new Animation(ANIM_TIME).addFrame(leftImages[10]);\n\t\tstillJumpLeft = new Animation(ANIM_TIME).addFrame(leftImages[5], 300).addFrame(leftImages[6], 4000);\n\t\trunningJumpLeft = new Animation(ANIM_TIME).addFrame(leftImages[7]).addFrame(leftImages[8], 400).addFrame(leftImages[9], 4000);\n\t\tchangeLeft = new Animation(ANIM_TIME).addFrame(leftImages[1]);\n\t\tstillUpLeft = new Animation(ANIM_TIME).addFrame(leftImages[11]);\n\t\tdeadLeft = new Animation(ANIM_TIME-30).addFrame(leftImages[12], 500).addFrame(leftImages[13]).addFrame(leftImages[14], 3000);\n\t\t\n\t\tstillRight = new Animation(ANIM_TIME).addFrame(rightImages[0]);\n\t\twalkRight = new Animation(ANIM_TIME+30).addFrame(rightImages[1]).addFrame(rightImages[4]).addFrame(rightImages[15]).addFrame(rightImages[19]).addFrame(rightImages[18]);\n\t\trunRight = new Animation(ANIM_TIME).addFrame(rightImages[1]).addFrame(rightImages[2]).addFrame(rightImages[3]).addFrame(rightImages[4]).addFrame(rightImages[15]).addFrame(rightImages[16]).addFrame(rightImages[17]).addFrame(rightImages[18]);\n\t\tsitRight = new Animation(ANIM_TIME).addFrame(rightImages[10]);\n\t\tstillJumpRight = new Animation(ANIM_TIME).addFrame(rightImages[5], 300).addFrame(rightImages[6], 4000);\n\t\trunningJumpRight = new Animation(ANIM_TIME).addFrame(rightImages[7]).addFrame(rightImages[8], 400).addFrame(rightImages[9], 4000);\n\t\tchangeRight = new Animation(ANIM_TIME).addFrame(rightImages[1]);\n\t\tstillUpRight = new Animation(ANIM_TIME).addFrame(rightImages[11]);\n\t\tdeadRight = new Animation(ANIM_TIME-60).addFrame(rightImages[12], 500).addFrame(rightImages[13]).addFrame(rightImages[14], 3000);\n\t\t\n\t\tstageWin = new Animation(ANIM_TIME+60).addFrame(rightImages[0]).addFrame(rightImages[20]).addFrame(rightImages[21]).addFrame(rightImages[22]).addFrame(rightImages[23]).addFrame(rightImages[24]);\n\t\t\n\t\tsetAnimation(stillRight);\n\t\tcurrLeftAnim = walkLeft;\n\t\tcurrRightAnim = walkRight;\n\t}", "public InGameDisplay(int x, int y) {\n super(ResourceManager.getImage(\"IngameHUD.png\"), 0, 600, 1200, ALLOCATED_HEIGHT);\n healthToDraw = 1;\n maxHealthToDraw = 1;\n minesToDraw = 0;\n maxMinesToDraw = 1;\n skillsToDraw = new Skill[4];\n }", "PlayableCharacter(int health, int attack, int intelligence, int defence, int speed, String type, String name, String description, Move[] moveset, String ability, StatItem heldItem, StatItem hatItem, StatItem shirtItem, StatItem pantsItem, StatItem shoesItem, BufferedImage[] sprites) {\n super(health, attack, intelligence, defence, speed, type, name, moveset, ability, heldItem, sprites);\n this.description = description;\n this.status = null;\n this.fainted = false;\n this.experience = 0;\n this.level = 1;\n this.hatItem = hatItem;\n this.shirtItem = shirtItem;\n this.pantsItem = pantsItem;\n this.shoesItem = shoesItem;\n }", "public Player(){\n this.health = 9;\n this.orientation = Orientation.FACING_NORTH;\n evaluateSprite();\n }", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "public HanoiTower(){\n\n }", "public GameObject(int x, int y, int width, int height, int[] velocity){\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.velocity= velocity;\n }", "Piece(int a, int b, int player)\n {\n x = a;\n y = b;\n this.player = player;\n }", "O_Game(JFrame inFrame) {\n \t\t// Initiate object variables\n \t\tgameWindow \t\t= inFrame;\n \t\trooms \t\t\t= new ArrayList<ArrayList<GameObjects>>();\n \t\tfigure \t\t\t= new Figure(0, 0, gameWindow);\n \t\tint element, line, column, dest; //for room generation, saves the current char (as int),the line its from, and the column its in\n \t\t\n \t\t\n \t\t// iterate over all objects and rooms within the level, all objects run within [0...800)x[0...600)\n \t\t// TODO: make that shit better!!, implement the current level\n \t\tfor (int i=0; i<3; i++) {\n \t\t\tArrayList<GameObjects> temp = new ArrayList<GameObjects>();\n \t\t\ttemp.add(figure);\n \t\t\t\n \t\t\ttry {\n \t\t\t\tInputStream roomStream = new FileInputStream(\"Level/raum\"+i+\".txt\");\n \t\t\t\tReader roomReader = new InputStreamReader (roomStream);\n \t\t\t\t\n \t\t\t\telement = 0;\n \t\t\t\tcolumn = 0; \n \t\t\t\tline = 0;\t\n \t\t\t\tdest = 0;\n \t\t\t\twhile ((element = roomReader.read()) != -1){ //Goes trough the whole raumX.txt, and spawns Objects at their Positions\n \t\t\t\t\t\n \t\t\t\t\tswitch (element) { \t//ASCII: W=87 D=68 E=69\n \t\t\t\t\tcase 87:\t\t\t//In order of probability\n \t\t\t\t\t\ttemp.add(new Wall(column-1, line-1, 0.5, 1)); \t//-1 because the top left corner seems to have\n \t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t//the coordinates 1:1\n \t\t\t\t\tcase 69:\n \t\t\t\t\t\ttemp.add(new Enemy(column-1, line-1, 0.5, gameWindow));\n \t\t\t\t\t\tbreak;\n \t\t\t\t\tcase 68: //looks where the door is, then sets destination accordingly\n \t\t\t\t\t\t\n \t\t\t\t\t\tif (line-1 == 0) \t{dest = 1;} //Door is on the upper edge of the field, door should lead up\n \t\t\t\t\t\tif (line-1 == 14) \t{dest = 3;} //Door is on the bottom edge of the field, door should lead down\n \t\t\t\t\t\tif (column-1==24)\t{dest = 2;} //Door is on the right edge of the field, door should lead right\n \t\t\t\t\t\tif (column-1==0) \t{dest = 4;} //Door is on the left edge of the field, door should lead left\n \t\t\t\t\t\t\n \t\t\t\t\t\ttemp.add(new Door(column-1, line-1, 0.5, true, true, dest)); //creating door with correct destination\n \t\t\t\t\t\tbreak;\t\n \t\t\t\t\t}\n \t\t\t\t\tcolumn++; //sets column up for the next cycle of the switch-case\n \t\t\t\t\t\tif (column==25){ //since we use 0-24 chars per line, the 25th should trigger the next line\n \t\t\t\t\t\t\tcolumn = 0;\n \t\t\t\t\t\t\tline++;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n\n \t\t\t\t} catch (IOException e) {\n \t\t\t\tSystem.out.println(\"File not found, system exiting.\");\n \t\t\t\tSystem.exit(1);\n \t\t\t}\n \t\t\t\n \t\t\trooms.add(i, temp);\n \t\t}\n \n \t\t// Initialize Logic and Graphics\n \t\tgraphics \t= new GameDrawer(rooms, gameWindow);\n \t\tlogic \t\t= new Logic(rooms, figure, this);\n \t\t\n \t\t// set contentPane to JPanel returned by GameDrawer, set GameIO as keyboard manager\n \t\tgameWindow.setContentPane(graphics.init(logic));\n \t\tKeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager();\n manager.addKeyEventDispatcher(new Game_IO(logic));\n \t}", "public Character(String name, int health, int armor, int attack, int stamina, int speed, int luck, File imagePath) {\r\n\t\tthis.name.set(name);\r\n\t\tthis.health.set(health);\r\n\t\tthis.armor.set(armor);\r\n\t\tthis.attack.set(attack);\r\n\t\tthis.stamina.set(stamina);\r\n\t\tthis.speed.set(speed);\r\n\t\tthis.luck.set(luck);\r\n\t\tportrait = imagePath;\r\n\t\tthis.level.set((armor + attack + stamina + speed + luck) / 100);\r\n\t}", "public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }", "BasicObject(){\n posX = -1;\n posY = -1;\n velX = 0;\n velY = 0;\n accX = 0;\n accY = 0;\n classOfObejct = 0;\n }", "public Gun() {\n\t\tgunName = \"pistol\";\n\t\tammo = 7;\n\t\taccuracy = 7;\n\t}", "public RollingBoulder(int x, int y, int type){\n\t\tsuper(x, y, type);\n\t\t\n\t\trotation = 0;\n\t\tvelocityX = rollSpeed;\n\t\t\n\t\tterrain = false;\n\t\tsetMoveable(true);\n\t\t\n\t\tvelocityY = 0;\n\t\taccelerationY = 0;\n\t\t\n\t\tif(type == 1){\n\t\t\trotationSpeed = 180;\n\t\t\thitbox = new HitBox((int)getX(), (int)getY(), (int)getWidth() - 20, (int)getHeight() - 20, this);\n\t\t\t\n\t\t} else if (type == 2){\n\t\t\trotationSpeed = 180 * 4;\n\t\t\thitbox = new HitBox((int)getX(), (int)getY(), (int)getWidth() - 10, (int)getHeight() - 15, this);\n\t\t}\n\t\t\n\t}", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "public Difficulty(int xAxis, int yAxis, int numOfMines) {\r\n\t\tthis.xAxis = xAxis;\r\n\t\tthis.yAxis = yAxis;\r\n\t\tthis.numOfMines = numOfMines;\r\n\t}", "Hero()\n\t{\n\t\t\n\t\tsuper(152,500,97,124);\n\t\tlife = 3;\n\t\tdoubleFire = 0;\n\t\t\n\t}", "public Weapon(MainPlayer p, ArrayList<MainPlayer> enemies, ArrayList<StaticObjects> s,\r\n\t\t\tArrayList<ReactiveObjects> r, boolean l, double velocity,\r\n\t\t\tdouble angle) {\r\n\t\ttrajectoryIncrements = calculateTrajectory(velocity, angle);\r\n\t\tvisible = true;\r\n\t\tstaticobjects = s;\r\n\t\treactiveobjects = r;\r\n\t\tthis.enemies = enemies;\r\n\t\tthis.velocity = velocity;\r\n\t\tthis.angle = angle;\r\n\r\n\t\tloadAnnimationImages();\r\n\t\tloadDestructionImages();\r\n\t\tthis.player = p;\r\n\t\tthis.player.setGrenadesAvailable(player.getGrenadesAvailable() - 1);\t\t\r\n\t\tif (l == true) {\r\n\t\t\tx = p.x + p.playerImage.getWidth(null);\r\n\t\t\ty = p.y;\r\n\t\t} else {\r\n\t\t\tx = p.x;\r\n\t\t\ty = p.y;\r\n\t\t}\r\n\r\n\t\tlaunchDirectionRight = l;\r\n\t\trectangle = new Rectangle(x, y, currentImage.getWidth(null),\r\n\t\t\t\tcurrentImage.getHeight(null));\r\n\t\timageHeight = currentImage.getHeight(null);\r\n\t\timageWidth = currentImage.getWidth(null);\r\n\t\ttimer = new Timer(20, this);\r\n\t\ttimer.start();\r\n\t}", "public RagdollController() {\n\t\tsuper(DEFAULT_WIDTH,DEFAULT_HEIGHT,WATER_GRAVITY);\n\t\tsetDebug(false);\n\t\tsetComplete(false);\n\t\tsetFailure(false);\n\t\tsoundCounter = 0;\n\t}", "public Tile(int x, int y, char type) {\n\t\tthis.tileX = x*Tile.TILE_SIDE;\n\t\tthis.tileY = LevelScreen.INFO_BAR_HEIGHT+y*Tile.TILE_SIDE;\n\t\tthis.type = type;\n\t\tthis.hasDefenseObject = false;\n\t\tthis.currentConstruct = null;\n\n\t\tif (type == TOWER_TERRAIN) {\n\t\t\ttileImage = Assets.tileEmptyTower;\n\t\t} else if (type == PATH) {\n\t\t\ttileImage = Assets.tilePath;\n\t\t} else if (type == MONSTER_GOAL) {\n\t\t\ttileImage = Assets.tileGoal;\n\t\t} else if (type == MONSTER_ENTRANCE) {\n\t\t\ttileImage = Assets.tileEntrance;\n\t\t}\n\t}", "public M_Bullet shoot() {\n Point leftCorner = this.getLocation();\n // get the center of the character\n int x = leftCorner.x;\n int y = leftCorner.y;\n Point dim = this.getDimensions();\n int h = dim.y;\n int w = dim.x;\n h = h / 2;\n w = w / 2;\n Point center = new Point(x + w, y + h);\n // get the velocity for the bullet\n Point vel = new Point(this.getDirection() * 3, 0);\n // set the enemy's shot cooldown to its shot interval.\n setShotCooldown(getShotInterval());\n // return the new bullet\n return new M_Bullet(center, this.getStrength(), vel, true);\n }", "public Character(final Vec2d position) {\n super(position);\n\n movement = new CharacterMovement(this);\n shield = new Shield(this);\n gun = new Gun<>(this, Vine.class);\n this.setScale(SCALE);\n getLevel().addEntity(shield);\n getLevel().addEntity(gun);\n\n setShape(new Rectangle(BOUNDING_BOX));\n setPhysicsBehaviour(new GravityBehaviour(this));\n }", "public Tower(int price, double damage, double range, double x, double y,\n\t\t\tdouble angle, int cooldown, Image[] imgs){\n\t\tthis.price = price;\n\t\tthis.damage = damage;\n\t\tthis.range = range;\n\t\tthis.imgs = imgs;\n\t\tthis.image = 0;\n\t\tthis.img = imgs[image];\n\t\tthis.temp = new ArrayList<Movable>();\n\t\tthis.initCooldown = cooldown;\n\t\tthis.cooldown = 0;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.angle = angle;\n\t\tthis.level = 0;\n\t}", "public IronArmour()\n {\n name = \"iron armour\";\n hitpoints = 10;\n damageBlocked = 5;\n }", "public WorldGenGrassUnderbean()\n {\n }", "public TestEnemy(Vector2 spawnPoint) {\n super(spawnPoint);\n this.health = MAX_HEALTH;\n this.speed = MAX_SPEED;\n this.damage = DAMAGE;\n this.moneyOnKill = MONEY_ON_KILL;\n this.bounds = new Circle(spawnPoint, RADIUS);\n this.ai = new RunnerAi(this);\n }", "public Asteroid(){\n\t\t\n\t\t//call Sprite constructor\n\t\tsuper();\n for(int i =0;i<arrowAmount;i++)\n {\n arrows.add(new Arrow(Game.R.nextInt(4),Game.R.nextBoolean()));\n }\n\t\tinitialize();\n\t\tint nDY = Game.R.nextInt(speedLevel);\n\t\tsetDeltaY((double)nDY*0.03*CommandCenter.getLevel()+1);\n\n\n\t\t\n\n\t}", "public Player(Point2D position, RvsB_World map) {\n\t\tsuper(position);\n\t\tsetHp(stats.getDEFAULT_MAX_HP());\n\t\tsetMaxHp(stats.getDEFAULT_MAX_HP());\n\t\tsetMap(map);\n\t\tsetPhysicalShape(new PhysicalRectangle((int) getPosition().x(), (int) getPosition().y(), stats.getWidth(),\n\t\t\t\tstats.getHeight()));\n\t\tsetLookingAt(Side.RIGHT);\n\t\tsetPush(new Point2D(0, 0));\n\t\tsetJump(100, 0.33);\n\n\t\tfor (int i = 0; i< INFECTION_STATE.length; i++) {\n\t\t\ttoraxs[i] = new RotationRectangle((int) getPosition().x(), (int) getPosition().y(),\n\t\t\t\t\tstats.getWidth(), stats.getHeight());\n\t\t\ttoraxs[i].setTexturePath(INFECTION_STATE[i]);\n//\t\t\tgetTorax().setPaint(Color.BLUE);\n//\t\t\tgetGraphicShapes().add(toraxs[i]);\n\t\t}\n\t\tsetTorax(toraxs[0]);\n\t\t// RotationRectangle legs = new RotationRectangle((int)\n\t\t// getPosition().x(), (int) getPosition().y(),\n\t\t// stats.getWidth(), stats.getHeight());\n\t\tfor (String path : LEG_SPRITES) {\n\t\t\tRotationRectangle legs = new RotationRectangle((int) getPosition().x(), (int) getPosition().y(),\n\t\t\t\t\tstats.getWidth(), stats.getHeight());\n\t\t\taddLegs(legs);\n\t\t\tlegs.setTexturePath(path);\n\t\t\tgetGraphicShapes().add(legs);\n\t\t}\n\t\t// addLegs(legs);\n\t\t// getGraphicShapes().add(legs);\n\t\t// getLegs().setPaint(Color.RED);\n\t\t// getGraphicShapes().get(stats.getBODY()).setPaint(Color.BLUE);\n\t\t// getGraphicShapes().add(null);\n\n\t\tsetScore(0);\n\t\t// setWeapon(new RocketLauncher(this));\n\t\tsetWeapon(new Knife(this));\n\t\tsetSpeed(new Point2D(0, 0));\n\t\tsetKillTracer(new Tracer(new Line_trace(getPosition(), getPosition().add(getSpeed()), this)));\n\n\t}", "private void initCharAreas() {\n\n characterAreas = new LinkedList<CharacterArea>();\n float x = 0;\n float y = 0;\n //TODO do this nice @me\n if (KeyboardHandler.character_set.length() > 36) {\n\n float width = mWidth / 10;\n float height = mHeight / 2;\n characterAreas.add(new CharacterArea(x, y, width * 3, height,\n KeyboardHandler.char_view_dark_color));\n characterAreas.add(new CharacterArea(x + width * 3, y, width * 4, height,\n KeyboardHandler.char_view_light_color));\n characterAreas.add(new CharacterArea(x + width * 7, y, width * 3, height,\n KeyboardHandler.char_view_dark_color));\n characterAreas.add(new CharacterArea(x, y + height, width * 3, height,\n KeyboardHandler.char_view_light_color));\n characterAreas.add(new CharacterArea(x + width * 3, y + height, width * 4,\n height, KeyboardHandler.char_view_dark_color));\n characterAreas.add(new CharacterArea(x + width * 7, y + height, width * 3,\n height, KeyboardHandler.char_view_light_color));\n } else {\n float width = mWidth / 3;\n float height = mHeight / 2;\n characterAreas.add(new CharacterArea(x, y, width, height,\n KeyboardHandler.char_view_dark_color));\n characterAreas.add(new CharacterArea(x + width, y, width, height,\n KeyboardHandler.char_view_light_color));\n characterAreas.add(new CharacterArea(x + 2 * width, y, width, height,\n KeyboardHandler.char_view_dark_color));\n characterAreas.add(new CharacterArea(x, y + height, width, height,\n KeyboardHandler.char_view_light_color));\n characterAreas.add(new CharacterArea(x + width, y + height, width,\n height, KeyboardHandler.char_view_dark_color));\n characterAreas.add(new CharacterArea(x + 2 * width, y + height, width,\n height, KeyboardHandler.char_view_light_color));\n }\n\n setLevelUpChars();\n }", "public ArcherTower() {\n\t\tsuper(defaultAttack, defaultRange, defaultAttackSpeed, name);\n\t}", "public void setUpBattleArea(int width, char height) throws SizeLimitExceededException {\r\n\t\tbattleArea = new BattleArea(width, height);\r\n\t\tcounter = 0;\r\n\r\n\t}", "public Room() {\n\t\twall=\"\";\n\t\tfloor=\"\";\n\t\twindows=0;\n\t}", "public void initMission() {\n\t\tinitNumOfMoves();\t//reset counter\n\t\t//Begin by creating a random board.\n\t\t/* 1st parameter: is the cell at (0,0) always empty?\n\t\t * 2nd parameter: will this board be accessed by the AI?\n\t\t * See the constructor comments in Board.java for more details. */\n\n\t\tboard = new Board(this.options.toUpperCase().contains(\"00\") ? true : false, false);\n\n\t\t//TODO OPTIONAL: instead of spawning a random board, we can customize\n\t\t//our own board! Just un-comment any of the below boards or paste your own!\n\n\t\t//Wastes to the right AND to the south! Watch how the AI would react.\n\t\t//try one-player AI version (aggressive or not, doesn't matter)\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"P\", \"W\", \"\", \"\", \"\"},\n//\t\t\t\t {\"W\", \"\", \"\", \"\", \"G\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"P\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t});\n\t\t//What's the most efficient way for the AI to find the victim?\n\t\t//Note there are no wastes or fire pits in this scenario.\n//\t\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\" \", \" \", \" \", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \" \", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \" \", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \"G\", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \" \", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \" \", \" \", \" \", \" \" }\n//\t\t\t\t});\n\n\t\t//Impossible one. Useful for explaining probability during presentation.\n//\t\t\t\t\t\tboard = new Board(new String[][]\n//\t\t\t\t\t\t\t\t{{\"\", \"\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"\", \"P\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"P\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"W\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"\", \"\", \"\", \"W\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"\", \"G\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t});\n\n\t\t/* Very tough board, but the AI is up to the task. */\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"P\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"W\", \"\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t {\"G\", \"\", \"\", \"W\", \"\", \"\"},\n//\t\t\t\t});\n\n\t\t//tough tough tough. The victim is surrounded by a wall of fire!\n\t\t//try it with 2 AI's, starting in random cell. One of them might die!\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"P\", \"\", \"G\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"P\", \"W\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"W\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"P\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t});\n\n\t\t//with aggressiveModeOn set to true, the AI will disinfect both wastes.\n\t\t//if set to false, the AI will disinfect only one.\n\t\t//Either way, AI gets the victim.\n\t\t//\t\t\t\tboard = new Board(new String[][]\n\t\t//\t\t\t\t\t\t{{\"\", \"\", \"\", \"\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t{\"\", \"\", \"\", \"P\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t{\"\", \"W\", \"\", \"\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t{\"\", \"W\", \"\", \"G\", \"\", \"P\"},\n\t\t//\t\t\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t{\"P\", \"\", \"\", \"\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t});\n\n\n\t\t//RARE situation (one-player mode) where setting aggressiveModeOn to true will result in death.\n\t\t//Non-aggressive mode will get the victim. Start at cell (0,0).\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"\", \"\", \"P\", \"G\", \"P\"},\n//\t\t\t\t{\"\", \"\", \"P\", \"W\", \"W\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"P\", \"P\", \"\"},\n//\t\t\t\t{\"P\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t});\n\n\n\t\t//Very rare instance. if both players are AI and start at cell (0,0),\n\t\t//they will BOTH die. However, note that it's not the AI's fault.\n\t\t//The AI still managed to MINIMIZE risk. They just got unlucky.\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"\", \"\", \"\", \"P\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t{\"\", \"W\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t{\"W\", \"\", \"\", \"\", \"G\", \"\"},\n//\t\t\t\t{\"P\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t});\n\n\t\t/* Use custom method in Board class to print the board to the console and save it to a text file.\n\t\t * See the method comments in Board.java class for more details. */\n\t\tboard.printBoard();\n\n\t\t/* Initialize the cell in which the players will start the mission. */\n\t\tCell startRoom;\n\t\tCellAsPerceivedByAI startRoomAI;\n\t\tCell[] startRooms = this.setStartRoomAndBoardAI(this.options.toUpperCase().contains(\"00\"));\n\t\tstartRoom = startRooms[0];\n\t\tstartRoomAI = (CellAsPerceivedByAI)startRooms[1];\n\n\t\tthis.createPlayers(startRoom, startRoomAI, this.p1Name, this.p2Name,\n\t\t\t\tthis.options.toUpperCase().contains(\"A1\"), this.options.toUpperCase().contains(\"A2\"), this.options.toUpperCase().contains(\"S\"),\n\t\t\t\tthis.options.toUpperCase().contains(\"H\") ? \"H\" : this.options.toUpperCase().contains(\"R\") ? \"R\" : \"B\");\t//create players\n\n\t\tthis.hideAllPics();\n\t\tgreyOutCell(startRoomAI.getX(), startRoomAI.getY());\n\t\trepaint();\n\t}", "public Ship(XGame game, Controller ctrl) {\r\n \tRADIUS = 8;\r\n \tlives = 5;\r\n \tspower = 100;\r\n \tshootdelay = 500; // amount of time in milliseconds between bullets\r\n \tbulletlife = 25; \r\n s = new Vector2D();\r\n v = new Vector2D();\r\n d = new Vector2D(2,2); \r\n this.game = game;\r\n this.ctrl = ctrl;\r\n reset(); // move the ship to its start position\r\n }", "public void movement(){\n\t\t\n\t\tdelayCounter++;\n\t\t\n\t\tif(direction == Direction.RIGHT){\n\t\t\txCoor += 1;\n\t\t\tbound.x = xCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[0] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[1];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[1] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[2];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[2] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[0];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\tif(direction == Direction.LEFT){\n\t\t\txCoor -= 1;\n\t\t\tbound.x = xCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[3] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[4];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[4] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[5];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[5] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[3];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\telse if(direction == Direction.UPWARD){\n\t\t\tyCoor += 1;\n\t\t\tbound.y = yCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[10] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[11];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[11] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[10];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\telse if(direction == Direction.DOWNWARD){\n\t\t\tyCoor -= 1;\n\t\t\tbound.y = yCoor+30;\n\t\t\t\n\n\t\t\tif ( image == Assets.enemySprite[6] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[7];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[7] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[8];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[8] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[6];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tenemyWalk += 1;\n\t\t\n\t\t//This parts checks to see if the enemy has to turn or not.\n\t\tif(enemyWalk == screen.maps[screen.currentMap].path.getTileWidth()){\n\t\t\tint x = xCoor;\n\t\t\tint y = yCoor;\n\t\t\t\n\t\t\tif(direction == Direction.RIGHT){\n\t\t\t\tx = xCoor + 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.LEFT){\n\t\t\t\tx = xCoor - 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.UPWARD){\n\t\t\t\ty = yCoor + 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.DOWNWARD){\n\t\t\t\ty = yCoor - 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\t\n\t\t\tint tileBlockX = (int) (x/screen.maps[screen.currentMap].path.getTileWidth());\n\t\t\tint tileBlockY = (int) (y/screen.maps[screen.currentMap].path.getTileHeight());\n\t\t\t\n\t\t\t//As long as the enemy has not gone the opposite direction, the enemy will continue to move in the direction is was going originally.\n\t\t\tif(tileBlockX < screen.maps[screen.currentMap].path.getWidth()-1 && tileBlockX > 0){\n\t\t\t\tif(tileBlockY < screen.maps[screen.currentMap].path.getHeight()-1 && tileBlockY > 0){\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY + 1).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.DOWNWARD){\n\t\t\t\t\t\tdirection = Direction.UPWARD;\n\t\t\t\t\t\timage = Assets.enemySprite[10];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY - 1).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.UPWARD){\n\t\t\t\t\t\tdirection = Direction.DOWNWARD;\n\t\t\t\t\t\timage = Assets.enemySprite[6];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX + 1, tileBlockY).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.LEFT){\n\t\t\t\t\t\tdirection = Direction.RIGHT;\n\t\t\t\t\t\timage = Assets.enemySprite[0];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX - 1, tileBlockY).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.RIGHT){\n\t\t\t\t\t\tdirection = Direction.LEFT;\n\t\t\t\t\t\timage = Assets.enemySprite[3];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If the enemy makes it to the end, it is no longer in game.\n\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY).getTile().getProperties().containsKey(\"finish\") == true){\n\t\t\t\tinGame = false;\n\t\t\t\tscreen.playerHealth--;\n\t\t\t}\n\t\t\t\n\t\t\tenemyWalk = 0;\n\t\t}\n\t}", "public void render(Graphics2D g,GameState state) {\n /**\n * information EnemyTank\n */\n AffineTransform tx = new AffineTransform();\n tx.setToTranslation(locX + state.xTransfer - smallEnemyBodyImage.getWidth() / 2 , locY + state.yTransfer - smallEnemyBodyImage.getHeight() / 2);\n tx.rotate(Math.toRadians(tankAngle), 50, 50);\n /**\n * information Enemy Gun\n */\n AffineTransform tx2 = new AffineTransform();\n tx2.setToTranslation(locX + state.xTransfer - smallEnemyGunImage.getWidth() / 5, locY + state.yTransfer - smallEnemyGunImage.getHeight() / 4.2);\n tx2.rotate(Math.toRadians(gunAngle), 20, 20);\n\n\n// Random random = new Random();\n// int angle = random.nextInt(360);\n// System.out.println(angle);\n /**\n * initialize is false\n */\n// if(j == 0)\n// limitMoving = false;\n//\n// if(limitMoving == false)\n// {\n// locX ++ ;\n// j++;\n// }\n// if(j == 100)\n// limitMoving = true;\n// if(limitMoving == true)\n// {\n// locX -- ;\n// j--;\n// }\n\n\n up = false;\n down = false;\n right = false;\n left = false;\n if(Math.abs(state.locX - (locX + state.xTransfer)) < 400 && Math.abs(state.locY - (locY + state.yTransfer)) < 400) {\n if (state.locX >= locX + state.xTransfer ) {\n locX++;\n right = true;\n left = false;\n }\n else {\n locX--;\n left = true;\n right = false;\n }\n\n if (state.locY >= locY + state.yTransfer) {\n locY++;\n up = false;\n down = true;\n }\n else {\n locY--;\n down = false;\n up = true;\n }\n ShapesIntersects shapesIntersects = new ShapesIntersects();\n for (Enemy01 e1 : GameFrame.getEnemyController().getE1()) {\n if (e1.locX != locX || e1.locY != locY) {\n // System.out.println(\"hi\");\n if (shapesIntersects.checkIntersect(locX + state.xTransfer - smallEnemyBodyImage.getWidth() / 2, locY + state.yTransfer - smallEnemyBodyImage.getHeight() / 2, smallEnemyBodyImage.getWidth(), smallEnemyBodyImage.getHeight()\n , e1.locX + state.xTransfer - smallEnemyBodyImage.getWidth() / 2, e1.locY + state.yTransfer - smallEnemyBodyImage.getHeight() / 2, smallEnemyBodyImage.getWidth(), smallEnemyBodyImage.getHeight())) {\n // System.out.println(\"intersects between enemy 01 is True\");\n if (right) {\n locX--;\n right = false;\n }\n if (left) {\n locX++;\n left = false;\n }\n if (up) {\n locY++;\n up = false;\n }\n if (down) {\n locY--;\n down = false;\n }\n }\n }\n }\n if (shapesIntersects.checkIntersect(locX + state.xTransfer - smallEnemyBodyImage.getWidth() / 2, locY + state.yTransfer - smallEnemyBodyImage.getHeight() / 2, smallEnemyBodyImage.getWidth(), smallEnemyBodyImage.getHeight()\n , state.locX - GameFrame.getMyTankImage().getWidth() / 2, state.locY - GameFrame.getMyTankImage().getHeight() / 2, GameFrame.getMyTankImage().getWidth(), GameFrame.getMyTankImage().getHeight()))\n {\n if (right) {\n locX--;\n right = false;\n }\n if (left) {\n locX++;\n left = false;\n }\n if (up) {\n locY++;\n up = false;\n }\n if (down) {\n locY--;\n down = false;\n }\n }\n for (HardWall hW : GameFrame.getWallController().getHardWalls())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2, GameFrame.getMyTankImage().getWidth(), GameFrame.getMyTankImage().getHeight()\n , hW.getLocX() + state.xTransfer, hW.getLocY() + state.yTransfer,hW.getHardWallImage().getWidth() ,hW.getHardWallImage().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n for (SoftWall sW : GameFrame.getWallController().getSoftWalls())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2 + 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2 + 2, GameFrame.getMyTankImage().getWidth() - 5, GameFrame.getMyTankImage().getHeight() - 5\n , sW.getLocX() + state.xTransfer, sW.getLocY() + state.yTransfer,sW.getSoftWall01Image().getWidth() ,sW.getSoftWall01Image().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n for (Teazel teazel : GameFrame.getWallController().getTeazels())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2, GameFrame.getMyTankImage().getWidth(), GameFrame.getMyTankImage().getHeight()\n , teazel.getLocX() + state.xTransfer, teazel.getLocY() + state.yTransfer,teazel.getTeazelImage().getWidth() ,teazel.getTeazelImage().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n for (Enemy02 e2 : GameFrame.getEnemyController().getE2())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2 + 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2 + 2, GameFrame.getMyTankImage().getWidth() - 5, GameFrame.getMyTankImage().getHeight() - 5\n , e2.getLocX() + state.xTransfer, e2.getLocY() + state.yTransfer,e2.getMovingEnemyImage().getWidth() ,e2.getMovingEnemyImage().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n for (Enemy03 e3 : GameFrame.getEnemyController().getE3())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2 + 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2 + 2, GameFrame.getMyTankImage().getWidth() - 5, GameFrame.getMyTankImage().getHeight() - 5\n , e3.getLocX() + state.xTransfer, e3.getLocY() + state.yTransfer,e3.getBigEnemyBodyImage().getWidth() ,e3.getBigEnemyBodyImage().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n\n tankAngle = enemyTankRotation.getAngle(up, down, left, right);\n enemyTankRotation.setTankAngle(tankAngle);\n gunAngle = Math.toDegrees(Math.atan2(state.locY - (locY + state.yTransfer), state.locX - (locX + state.xTransfer)));\n// Random random = new Random();\n// int n = random.nextInt(10);\n// if (n == 3)\n if(i % 50 == 0)\n GameFrame.getBulletController().addBullet(new Enemy01Bullet(locX,locY ,gunAngle,smallEnemyGunImage));\n\n i++;\n // angle = Math.toDegrees(Math.atan2(state.mouseY - state.locY - myTankImage.getHeight() / 2, state.mouseX - state.locX - myTankImage.getWidth() / 2));\n }\n// System.out.println(\"loc x = \" + locX);\n// System.out.println(\"loc y = \" + locY);\n g.drawImage(smallEnemyBodyImage,tx,null);\n g.drawImage(smallEnemyGunImage, tx2, null);\n// System.out.println(\"enemy 01 loc x = \" + locX);\n// System.out.println(\"enemy 01 loc y = \" + locY);\n }", "public Enemy(int x, int y, Sprite dead, double speed, int points) {\n super(x, y);\n this.points = points;\n this.speed = speed;\n MAX_STEPS = Game.TILES_SIZE / speed;\n rest = (MAX_STEPS - (int) MAX_STEPS) / MAX_STEPS;\n this.steps = MAX_STEPS;\n timeAfterDeath = 20;\n deadSprite = dead;\n }", "public FightController(Character character, Room room) {\n super(character, room);\n cardRewardGiven = false;\n relicRewardGiven = false;\n goldRewardGiven = false;\n potRewardGiven = false;\n isGameOver = false;\n turn = 0;\n enemies = ((EnemyRoom)room).getEnemies();\n enemyController = new EnemyController(room,character);\n System.out.println( \"number of cards in draw pile : \" + character.getDeck().getCards().size() );\n piles = new PileCollection( new Pile(),character.getDeck().getClone() , new Pile( ) , new Pile());\n\n effectHandler = new EffectHandler( enemies,enemyController,turn,3,piles,character);\n\n BuffFactory bF = new BuffFactory();\n //character.addBuff(bF.createBuff(\"Metallicize\",5) );\n //character.getBuffs().getBuffs().get(0).setRemainingTurn(5);//character\n // piles.getHandPile().addCard(CardFactory.getCard(\"PommelStrike\"));\n // character.getBuffs().getBuffs().get(0).setX(5);\n\n start();\n\n }" ]
[ "0.59691346", "0.57737166", "0.5718609", "0.5703097", "0.5678354", "0.56228316", "0.55792373", "0.55648506", "0.5562663", "0.5496738", "0.5494842", "0.5488543", "0.54721016", "0.54678565", "0.54331076", "0.5432737", "0.5415465", "0.54020584", "0.53593266", "0.5358608", "0.5354806", "0.5347376", "0.53449893", "0.53090143", "0.5307401", "0.53035355", "0.52933633", "0.5257486", "0.5257154", "0.5242918", "0.5241453", "0.5225846", "0.52243173", "0.5223749", "0.52228236", "0.5220993", "0.521683", "0.5206654", "0.51918364", "0.5188437", "0.5187839", "0.5186726", "0.5180065", "0.517639", "0.51678556", "0.5155509", "0.51535904", "0.5150649", "0.51355433", "0.5133078", "0.510501", "0.5099129", "0.50946534", "0.50931495", "0.5089966", "0.50772846", "0.5077009", "0.5071005", "0.506792", "0.50603944", "0.5059461", "0.5058361", "0.5056867", "0.505428", "0.50529104", "0.50491047", "0.5046194", "0.5044115", "0.50434905", "0.50389236", "0.5036064", "0.5036034", "0.50259614", "0.50242263", "0.5023148", "0.50202245", "0.5019481", "0.50185686", "0.5012208", "0.50092596", "0.5006754", "0.49977598", "0.49966156", "0.49935138", "0.4993135", "0.49889076", "0.4981844", "0.49792627", "0.49767208", "0.49700606", "0.496764", "0.49628413", "0.49598414", "0.49591437", "0.4956739", "0.49566516", "0.49498653", "0.49476308", "0.49464867", "0.49447846" ]
0.6781167
0
while the player shoots, the bullets objects are generated and stored
public void shoot(){ int bulletPosX = posX; int bulletPosY = posY; int bulletVelX = 0; int bulletVelY = -9; //add the new bullets to the array of bullets bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }", "public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }", "public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }", "private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}", "public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }", "public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }", "public void shoot()\n {\n\n if(reload<=0)//if the tower has reloaded\n {\n int randomizer=Greenfoot.getRandomNumber(20)-10; \n MinigunBullet bullet = new MinigunBullet(this.getRotation()+randomizer, damage,this);\n getWorld().addObject(bullet, getX(), getY());\n bullet.move(30);\n reload=3;\n }\n else//reload\n {\n reload--;\n }\n\n }", "void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirection(angle);\r\n\t\tbullets[slot].reset();\r\n\t\t// Reset the timer\r\n\t\tcount = RELOAD;\r\n\t}", "public void fireBullet(){\n\t\tBullet bullet = new Bullet(ship);\n\t\tbullets.add(bullet);\n\t\tsoundMan.playBulletSound();\n\t}", "public void shoot(ArrayList<Bullet> alienBullets)\r\n\t{\r\n\t\t//do nothing usually\r\n\t}", "public void trackBullets(){\n for (int i = 0; i < bullets.size(); i++){\n Bullet tempBullet = bullets.get(i);\n //update the position of the bullets\n tempBullet.update();\n tempBullet.drawBullet();\n //check if the bullet hit the boundary, remove the bullet from the list of the bullet\n if(tempBullet.detectBound()){\n bullets.remove(i);\n continue;\n }\n //detect if the bullet hit the boss and cause the damage if yes\n if(tempBullet.hitObject(Main.boss) && Main.boss.alive){\n Main.boss.decreaseHealth(attack);\n tempBullet.drawHit();\n bullets.remove(i);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n }\n }\n //detect if the bullet hit the enemy and cause the damage if yes\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n if(tempBullet.hitObject(tempEnemy) && tempEnemy.alive){\n tempBullet.drawHit();\n tempEnemy.decreaseHealth(attack);\n // if enemy is totally hitted, wait one 1s, and then removed\n if(tempEnemy.health <= 0){\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n }\n bullets.remove(i);\n break;\n }\n }\n }\n }", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }", "public void avatarShoot()\r\n\t{\r\n\t\tBullet avatarPew = avatar.shoot();\r\n\t\tif (avatarPew!= null)\r\n\t\t{\r\n\t\t\tbullets.add(avatarPew);\r\n\t\t}\r\n\t}", "public void enemyShoot()\r\n\t{\r\n\t\tfor (Enemy enemies : enemy)\r\n\t\t{\r\n\t\t\tif (enemies.getHasFired())\r\n\t\t\t{\r\n\t\t\t\tBullet enemyPew = enemies.shoot();\r\n\t\t\t\tif (enemyPew != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.add(enemyPew);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean shoot() {\n if (!isReloading && System.currentTimeMillis() - previousShotTime > shootInterval * 1000 && ammoRemaining > 0) {\n\n previousShotTime = System.currentTimeMillis();\n\n ammoRemaining--;\n audioPlayer.setSpatial(holder);\n audioPlayer.playOnce();\n // score -= 50;\n Vec2 angle = Vec2\n .Vector2FromAngleInDegrees(transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread));\n\n Vec2 spawnPosition = transform.getWorldPosition();\n\n Projectile p = new Projectile(spawnPosition,\n Vec2\n .Vector2FromAngleInDegrees(\n transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread)),\n new Sprite(projectilePath));\n p.setSpeed(speed);\n p.setSource(holder);\n p.getCollider().addInteractionLayer(\"Block\");\n p.getCollider().addInteractionLayer(\"Hittable\");\n p.getCollider().addInteractionLayer(\"Walk\");\n p.setOnCollisionListener(other -> {\n if (other.getGameObject() instanceof Player && other.getGameObject() != holder) {\n Player player = (Player) other.getGameObject();\n player.hit(alteredDmg);\n if (GameEngine.DEBUG) {\n System.out.println(\"Bullet Hit \" + other.getName());\n }\n p.destroy();\n\n// player.destroy();\n } else if (other.getGameObject() instanceof Enemy) {\n Enemy e = ((Enemy) other.getGameObject());\n e.hit(alteredDmg);\n if (!e.isAlive()) { // CHeck if enemy survived\n ((Player) p.getSource()).killedEnemy();\n }\n p.destroy();\n } else if (other.getTag() == \"Block\") {\n p.destroy();\n }\n\n });\n return true;\n } else if(ammoRemaining <= 0){\n reloadWeapon();\n return false;\n }else\n return false;\n }", "public void drawBullets(){\n if(!world.getPlayer().getWeapon().getBullets().isEmpty()) {\n for (Bullet b : world.getPlayer().getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y * ppuY,\n b.SIZE * ppuX, b.SIZE * ppuY);\n }\n }\n if(!world.getEnemies().isEmpty()) {\n for(Enemy e: world.getEnemies()){\n if(!e.getWeapon().getBullets().isEmpty()){\n for (Bullet b : e.getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }\n }\n if(!world.getBullets().isEmpty()) {\n for(Bullet b : world.getBullets()){\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }", "public void update(){\n\n // advance player and entity loader\n player.advance();\n entityloader.advance();\n\n // if the player is shooting\n if (player.isShooting){\n player.nextBullet--;\n if (player.nextBullet < 0){\n audioloader.play(\"plshoot\"); // play audio\n for (int i = -1; i <= 1; ++i){\n playerBullets.add(new Projectile<RectangleHitbox>(player.getCenterX(), player.getCenterY(), 500, 0, 270 + 2.5 * i, 0, 0, false, 1.5, true, 0,\n player.bulletSprite.getRectangleHitbox(player.bulletSize), player.bulletSprite.img.getScaledInstance(player.bulletSize, player.bulletSize, 1), 0, 0, this));\n } \n player.nextBullet = (int)(FPS / player.bulletsPerSecond);\n }\n }\n\n // Player bullets\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n if (bullet.advance()){\n nextPlayerBullets.add(bullet);\n }\n }\n playerBullets.clear();\n for (Projectile<RectangleHitbox> bullet : nextPlayerBullets){\n playerBullets.add(bullet);\n }\n nextPlayerBullets.clear();\n\n // Circle Enemies\n for (Projectile<CircleHitbox> enemy : circleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (!enemy.isBullet){ // if enemy is not a bullet, check if it is being hit by player bullets\n boolean hit = false; // each enemy can only be hit once each frame\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n hit |= bullet.getHitbox().intersects(enemy.getHitbox());\n if (hit)\n break;\n }\n if (hit){\n enemy.damageTaken += enemy.originalLifetime * enemy.percentDamage;\n }\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextCircleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n circleEnemies.clear();\n for (Projectile<CircleHitbox> enemy : nextCircleEnemies){ // swap nextCircleEnemies with circleEnemies\n circleEnemies.add(enemy);\n }\n nextCircleEnemies.clear();\n\n // Rectangle Enemies\n for (Projectile<RectangleHitbox> enemy : rectangleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextRectangleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n rectangleEnemies.clear();\n for (Projectile<RectangleHitbox> enemy : nextRectangleEnemies){ // swap nextRectangleEnemies with rectangleEnemies\n rectangleEnemies.add(enemy);\n }\n nextRectangleEnemies.clear();\n\n }", "private void shoot() {\n }", "private void shoot() {\n }", "@Override\n\t\t\tpublic void shoot() {\n\t\t\t}", "void shoot();", "public void shoot(float direction) {\n\t\tif(pause != 0) return;\n\t\tbullets.add(new Bullet(player.getPosition(),direction));\n\t\tpause = cooldown;\n\t}", "public M_Bullet shoot() {\n Point leftCorner = this.getLocation();\n // get the center of the character\n int x = leftCorner.x;\n int y = leftCorner.y;\n Point dim = this.getDimensions();\n int h = dim.y;\n int w = dim.x;\n h = h / 2;\n w = w / 2;\n Point center = new Point(x + w, y + h);\n // get the velocity for the bullet\n Point vel = new Point(this.getDirection() * 3, 0);\n // set the enemy's shot cooldown to its shot interval.\n setShotCooldown(getShotInterval());\n // return the new bullet\n return new M_Bullet(center, this.getStrength(), vel, true);\n }", "@Override\n public void attack(){\n int xBullet=0,yBullet=0;\n switch(direction){\n case 0:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()*3/4);\n break;\n case 1:\n xBullet=(int)(x+Sprite.python_left.getWidth()*3/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 2:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 3:\n xBullet=(int)(x+Sprite.python_left.getWidth()/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n }\n PythonBullet pythonBullet=new PythonBullet(xBullet,yBullet,board,Player.PLAYER_SPEED*1.5);\n pythonBullet.setDirection(direction);\n board.addBullets(pythonBullet);\n\n }", "public void createBullet(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player != null) {\r\n Bullet bullet = new Bullet(x, y);\r\n bullet.player = name;\r\n playAudio(\"shoot\");\r\n }\r\n }", "@Override\n\tpublic void shoot() {\n\t\tthis.fired = true;\n\t\tghost.shot=true;\n\t}", "private void multiBulletFire() {\n\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 20, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) - 10, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 50, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t}", "void smallgunHandler() {\n for (Sprite smb: smBullets) {\n \n smb.display();\n if(usingCoil){\n smb.forward(120);\n }else{\n smb.forward(40);\n }\n\n }\n}", "private void killBullet() {\r\n this.dead = true;\r\n }", "private void enemiesWillShoot(Graphics2D g2d, GameState state) {\n if (numOfRenderShoot == 75) {\n numOfRenderShoot = 0;\n for (int i = 0; i < state.getEnemyTanks().size(); i++) {\n if (state.getEnemyTanks().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTanks().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTanks().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTanks().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyMissiles().add(new EnemyMissile(this, state, 10\n , state.getEnemyTanks().get(i)));\n state.getEnemyMissiles().get(state.getEnemyMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyCars().size(); i++) {\n if (state.getEnemyCars().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyCars().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyCars().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyCars().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyBullets().add(new EnemyBullet(this, state, 20\n , state.getEnemyCars().get(i)));\n state.getEnemyBullets().get(state.getEnemyBullets().size() - 1).bulletDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyWallTurrets().size(); i++) {\n if (state.getEnemyWallTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyWallTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyWallTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyWallTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyWallTurretMissiles().add(new EnemyWallTurretMissile(this, state, 15\n , state.getEnemyWallTurrets().get(i)));\n state.getEnemyWallTurretMissiles().get(state.getEnemyWallTurretMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n\n for (int i = 0; i < state.getEnemyTurrets().size(); i++) {\n if (state.getEnemyTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyHomingMissiles().add(new EnemyHomingMissile(this, state, 15\n , state.getEnemyTurrets().get(i)));\n state.getEnemyHomingMissiles().get(state.getEnemyHomingMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n }\n for (EnemyMissile enemyMissile : state.getEnemyMissiles()) {\n enemyMissile.paint(g2d, state);\n }\n for (EnemyBullet enemyBullet : state.getEnemyBullets()) {\n enemyBullet.paint(g2d, state);\n }\n for (EnemyWallTurretMissile enemyWallTurretMissile : state.getEnemyWallTurretMissiles()) {\n enemyWallTurretMissile.paint(g2d, state);\n }\n for (EnemyHomingMissile enemyHomingMissile : state.getEnemyHomingMissiles()) {\n enemyHomingMissile.paint(g2d, state);\n }\n }", "public void shoot() {\n\t\tgetWeapon().triggerMain();\n\t\tsetShooting(true);\n\t}", "private void shoot() {\n\t\tif (playerList.size() > 0) {\n\t\t\tif (!someoneLose) {\n\t\t\t\tPlayer target = null;\n\t\t\t\tint remainingShips = SHIP_COUNT + 1;\n\t\t\t\tfor (Player player : playerList) {\n\t\t\t\t\tif (player.getRemainingShips() < remainingShips) {\n\t\t\t\t\t\ttarget = player;\n\t\t\t\t\t\tremainingShips = player.getRemainingShips();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSector targetSector = target.findFreeSector();\n\t\t\t\tlastTarget = targetSector.getMiddle();\n\t\t\t\tShootingThread st = new ShootingThread(chordImpl, targetSector.getMiddle());\n\t\t\t\tst.start();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}", "@Override\n\tpublic Bullet shoot(int hx, int hy) {\n\t\treturn null;\n\t}", "@Override\n public void fireBullet(ArrayList<ScreenObject> level) {\n level.add(new ShipBullet(position.x, position.y, 8, 8, direction));\n }", "public void shoot() {\r\n\t\twhile (rounds > 1) {\r\n\t\t\trounds--;\r\n\t\t\tSystem.out.println(gunType + \" is shooting now\\n\" + rounds + \" \\nCLACK! CLACK! CLAK! CLAK! CLAK!\");\r\n\t\t\tif (rounds == 1) {\r\n\t\t\t\tSystem.out.println(\"Magazine's Empty!! \\nRELOAD!!\\nRELOAD!!!\\nRELAOD!!!\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public void fireShot() {\n\t\tVector3 position = player.getPositionVector();\n\t\tVector3 rotation = player.getRotationVector();\n\t\tVector3 scale = player.getScaleVector();\n\t\tAsteroidsLaser laser = new AsteroidsLaser(GameObject.ROOT, this, rotation.z);\n\t\tlaser.translate(position);\n\t\tlaserShots.add(laser);\n\t}", "void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }", "private void shoot(GObject bottom, GObject bottomLeft, GObject topRight, GObject bottomRight, GObject topLeft) {\r\n\t\t//if(bullet == null && bottom != null && bottomLeft == null && topRight == null && bottomRight == null && topLeft == null) {\r\n\t\t\t{bullet = new GRect(BULLET_WIDTH, BULLET_HEIGHT);\r\n\t\t\tbullet.setFilled(true);\r\n\t\t\tbullet.setColor(Color.green);\r\n\t\t\tif(facingEast == true) {\r\n\t\t\t\tbulletVelocity = BULLET_SPEED;\r\n\t\t\t\tadd(bullet, player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() * 3/5.0);\r\n\t\t\t} else {\r\n\t\t\t\tbulletVelocity = -BULLET_SPEED;\r\n\t\t\t\tadd(bullet, player.getX() - BULLET_WIDTH, player.getY() + player.getHeight() * 3/5.0);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void handleFiring(double dt)\r\n\t{\r\n\t\t//Fire if the mouse button is pressed.\r\n\t\tif (input.getMouseButton(InputHandler.FIRE) && charge <= 0 && energy >= energyUse)\r\n\t\t{\r\n\t\t\tEntityBullet bullet = (EntityBullet)c.createEntity(w, EI.EntityBullet);\r\n\t\t\tdouble xDir = Math.cos(horizontalDir)*Math.cos(verticalDir),\r\n\t\t\t\t\tyDir = Math.sin(horizontalDir)*Math.cos(verticalDir), zDir = Math.sin(verticalDir);\r\n\t\t\t\r\n\t\t\tdouble xDisp = shotX*Math.cos(verticalDir) - shotZ*Math.sin(verticalDir);\r\n\t\t\tdouble zDisp = shotX*Math.sin(verticalDir) + shotZ*Math.cos(verticalDir);\r\n\t\t\t\r\n\t\t\tdouble yDisp = xDisp*Math.sin(horizontalDir) - shotY*Math.cos(horizontalDir);\r\n\t\t\txDisp = xDisp*Math.cos(horizontalDir) + shotY*Math.sin(horizontalDir);\r\n\t\t\t\r\n\t\t\t//t is to prevent bullets from spawning through walls.\r\n\t\t\t\r\n\t\t\tdouble t = w.getCollision().getBulletCollision(x, y, z, xDisp, yDisp, zDisp);\r\n\t\t\t\r\n\t\t\tif (t == 1)\r\n\t\t\t{\r\n\t\t\t\t//Create the bullet\r\n\t\t\t\tenergy -= energyUse;\r\n\t\t\t\tbullet.setPosition(x+xDisp, y+yDisp, z+zDisp);\r\n\t\t\t\tint vel = 60;\r\n\t\t\t\t\r\n\t\t\t\tbullet.setVelocity(vel*xDir, vel*yDir, vel*zDir);\r\n\t\t\t\tbullet.setDamage(1, 1);//damage, knockback\r\n\t\t\t\tbullet.setColor(0, 1, 0);\r\n\t\t\t\t\r\n\t\t\t\tbullet.setOwner(player);\r\n\t\t\t\t\r\n\t\t\t\tw.create(bullet);\r\n\t\t\t\t\r\n\t\t\t\tcharge = shotDelay;\r\n\t\t\t\t\r\n\t\t\t\t//Laser gun sound\r\n\t\t\t\tc.getSoundHandler().playSound(0);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Weapon recharging\r\n\t\tcharge -= dt;\r\n\t}", "private void UpdateBullets()\n\t {\n\t for(int i = 0; i < BulletList.size(); i++)\n\t {\n\t Bullet bullet = BulletList.get(i);\n\t \n\t // Move the bullet.\n\t bullet.Update();\n\t \n\t // checks if the bullet has it left the screen\n\t if(bullet.HasLeftScreen()){\n\t BulletList.remove(i);\n\t \n\t continue;\n\t }\n\t \n\t // checks if the bullet hit the enemy\n\t Rectangle BulletRectangle = new Rectangle((int)bullet.xCoord, (int)bullet.yCoord, bullet.BulletImage.getWidth(), bullet.BulletImage.getHeight());\n\t // Go trough all enemies.\n\t for(int j = 0; j < EnemyList.size(); j++)\n\t {\n\t Enemy eh = EnemyList.get(j);\n\n\t \n\t Rectangle EnemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\n\t // Checks whether the the bullet has hit the enemy\n\t if(BulletRectangle.intersects(EnemyRectangel))\n\t {\n\t // Bullet hit the enemy so we reduce his health.\n\t eh.Health -= Bullet.DamagePower;\n\t \n\t // Bullet was also destroyed so we remove it.\n\t BulletList.remove(i);\n\t \n\t \n\t }\n\t }\n\t }\n\t }", "public void shoot(double x, double y) {\n if (magazineCounter > 0 && !reloading) {\n magazineCounter--;\n new WeaponProjectile(new Point2D(x, y), mouseLocation(), projectileSpeed, testing);\n }\n }", "void fire() {\r\n // firing a shot takes energy\r\n if (!expendEnergy(BULLET_ENERGY))\r\n return;\r\n\r\n //create a bullet object so it doesn't hit the ship that's firing it\r\n double xV = getXVel() + BULLET_SPEED * (Math.cos(orientation));\r\n double yV = getYVel() + BULLET_SPEED * (Math.sin(orientation));\r\n\r\n // create the actual bullet\r\n new Bullet(\r\n getGame(),\r\n (getXPos() + ((getSize()/2 + 2) * (Math.cos(orientation))) + xV),\r\n (getYPos() + ((getSize()/2 + 2) * (Math.sin(orientation))) + yV),\r\n xV,\r\n yV);\r\n }", "public void shoot(GraphicsContext graphicsContext) {\n TankBullet bullet = new TankBullet(new FixedCoordinates(getCoordinates().getX() + 17, getCoordinates().getY() + 100), gameEnded, graphicsContext);\n bullet.draw(graphicsContext);\n CoordinatesCache.getInstance().getEnemyBullets().add(bullet);\n }", "private void tankWillShoot(Graphics2D g2d, GameState state) {\n if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() > 0 && state.getGunType() % 2 == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfCannonBullet(tankObject.getNumOfCannonBullet() - 1);\n if (tankObject.getCannonLevel() == 1) {\n state.getMissiles().add(new Missile(state, 15));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (tankObject.getCannonLevel() == 2) {\n state.getMissiles().add(new Missile(state, 30));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n } else if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() == 0 && state.getGunType() % 2 == 1) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n state.setMouseClicked(false);\n }\n for (Missile missile : state.getMissiles()) {\n missile.paint(g2d, state);\n }\n if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() > 0 && state.getGunType() % 2 == 0) {\n if (numOfRenderBullet1 == 0 && tankObject.getMachineGunLevel() == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 20));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet2 == 0 && tankObject.getMachineGunLevel() == 2) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 30));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet1 <= 7) {\n numOfRenderBullet1++;\n }\n if (numOfRenderBullet1 == 7) {\n numOfRenderBullet1 = 0;\n }\n if (numOfRenderBullet2 <= 3) {\n numOfRenderBullet2++;\n }\n if (numOfRenderBullet2 == 3) {\n numOfRenderBullet2 = 0;\n }\n }\n else if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() == 0 && state.getGunType() % 2 == 0) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n }\n for (Bullet bullet : state.getBullets()) {\n bullet.paint(g2d, state);\n }\n }", "public void fireBullet(int direction , int posX, int posY ){\n if ( clockBullet.getElapsedTime().asMilliseconds() > 100 ){\n int lowestbulletNo = 10;\n for( int i = 9; i > 0; i-- ){\n if ( bulletSpace.get(i).isEnabled() == false){\n lowestbulletNo = i;//find the first bullet in the gun barrol\n }\n }\n\n if ( lowestbulletNo < 10 ){\n bulletSpace.get(lowestbulletNo).setDirection(direction);\n bulletSpace.get(lowestbulletNo).setDistance(0);\n bulletSpace.get(lowestbulletNo).setPosX(posX - map.getX()) ;\n bulletSpace.get(lowestbulletNo).setPosY(posY - map.getY()) ;\n bulletSpace.get(lowestbulletNo).enabled(true);\n bulletSpace.get(lowestbulletNo).setRotation(direction+1);\n }\n }\n clockBullet.restart();\n }", "void playerHandler() {\n player.turnToPoint(mouseX, mouseY);\n if (firing && sTimer < 1) {\n\n Sprite smb = new Sprite(smbulletbase);\n smb.moveToSprite(player);\n if(usingCoil){\n clickEffect = new KTSound(this, coilshotURL);\n ktAudio.add(clickEffect);\n clickEffect.play();\n clickEffect = new KTSound(this, gunshotURL);\n ktAudio.add(clickEffect);\n }\n smBullets.add(smb);\n clickEffect.play();\n if(weapon == \"minigun\"){\n smb.turnToPoint(mouseX+(int)random(-90,90), mouseY+(int)random(-90,90));\n }\n else{\n smb.turnToPoint(mouseX, mouseY);\n }\n\n sTimer = firingSpeed;\n }\n sTimer -= 1;\n \n prevX = player.getX();\n prevY = player.getY();\n\n if (up) {\n player.moveY( - 5);\n // pAngle -= 1;\n }\n if (down) {\n player.moveY(5);\n // pAngle += 1;\n }\n if (left) {\n player.moveX( - 5);\n // pAngle -= 1;\n }\n if (right) {\n player.moveX(5);\n }\n if (player.getY() < player.getH() / 2) {\n player.setY(player.getH() / 2);\n }\n if (player.getY() > 2048 - player.getH() / 2) {\n player.setY(2048 - player.getH() / 2);\n }\n if (player.getX() < player.getH() / 2) {\n player.setX(player.getH() / 2);\n }\n if (player.getX() > 2048 - player.getH() / 2) {\n player.setX(2048 - player.getH() / 2);\n }\n \n \n\n // player.turnToDir(pAngle);\n player.display();\n // player.displayHitbox();\n}", "public void shoot(){\r\n\t\tif(numberOfArrows>0){\r\n\t\t\tnumberOfArrows--;\r\n\t\t\tPosition positionWumpus = b.getWumpus().getPosition();\r\n\t\t\tif (position.checkShoot(positionWumpus))\r\n\t\t\t\tb.getWumpus().kill();\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"There are no more arrows.\");\r\n\t}", "private void clearBullet()\n {\n if(playerBullets.size() > 0)\n {\n for(int i = 0; i < playerBullets.size(); ++i)\n {\n int x = playerBullets.get(i).getRectangle().centerX(), y = playerBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n playerBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n if(enemyBullets.size() > 0)\n {\n for(int i = 0; i < enemyBullets.size(); ++i)\n {\n int x = enemyBullets.get(i).getRectangle().centerX(), y = enemyBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n enemyBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n }", "private void fire(GameEngine gameEngine) {\n Bullet bullet1 = gameEngine.getBulletEnemy();\n if (bullet1 == null) {\n return;\n }\n bullet1.init(this, positionX + imageWidth/2, positionY, 0);\n gameEngine.addGameObject(bullet1);\n gameEngine.playSound(1);\n }", "private void attackPlayer()\n\t{\n\t\tif(shootTimer.done())\n\t\t{\n\t\t\tProjectile spiderWeb = new SpiderWeb(x, y);\n\t\t\tGame.objectWaitingRoom.add(spiderWeb);\n\t\t\tspiderWeb.shoot();\n\t\t\tshootTimer.setTime(200);\n\t\t}\n\t}", "public void shootGun() {\n\t\tammo--;\n\t}", "public void shoot(int bulletLeft) {\n float xValue = canon.getX();\n float yValue = canon.getY();\n bullets.get(bulletLeft).setVisibility(View.VISIBLE);\n shootingMotion(bullets.get(bulletLeft), xValue, yValue);\n\n }", "public void shoot(Point p, Graphics g, Player player){\r\n if(p.getX() > getXCoord()-20){ //not sure if -20 needed (it is to make cetner by the shoulder of arm)\r\n setFacing(1);\r\n } else{\r\n setFacing(0);\r\n }\r\n this.setAttackSpeedTimer(this.getAttackSpeedTimer() + 1);\r\n if(this.getAttackSpeedTimer() == this.getAttackSpeed()){\r\n\t\t Bullet bullet = new Bullet(this.getXCoord(), \r\n\t\t\t\t\t this.getYCoord(), this.getFacing(), g, findAngle(p), player);\r\n\t\t\t\t\t bullet.setAttack(50);\r\n\t\t bullet.setMouseY(this.getMouseY());\r\n\t\t bullet.setMouseX(this.getMouseX());\r\n\t\t bullet.setMouseAngle(this.getMouseAngle());\r\n\t \t bullet.setPlayerDirection(this.getPlayerDirection());\r\n\t\t this.addProjectile(bullet);\r\n\t\t this.setAttackSpeedTimer(0);\r\n\t\t //System.out.println(findAngle(p)*180/Math.PI);\r\n\t\t this.playSound();\r\n }\r\n }", "public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}", "private void update() {\n\t\t// checks to see if the w key is down\n\t\tif (wKeyDown) {\n\t\t\tplayer.setY((int) (player.getY() - 8));\n\t\t}\n\t\t// checks to see if the a key is down\n\t\tif (aKeyDown) {\n\t\t\tplayer.setX((int) (player.getX() - 8));\n\t\t}\n\t\t// checks to see if the s key is down\n\t\tif (sKeyDown) {\n\t\t\tplayer.setY((int) (player.getY() + 8));\n\t\t}\n\t\t// checks to see if the d key is down\n\t\tif (dKeyDown) {\n\t\t\tplayer.setX((int) (player.getX() + 8));\n\t\t}\n\t\t\n\t\t// checks to make sure the player is within the bounds\n\t\tcheckBounds();\n\t\t\n\t\t// checks to see if the left mouse button is clicked\n\t\tif (mouseDown) {\n\t\t\t// if doubleshot is activated\n\t\t\tif (doubleShot && bulletDelta > doubleShotShootingSpeed) {\n\t\t\t\t// plays the bullet shooting sound\n\t\t\t\tsound.get(\"shootEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t\n\t\t\t\t// adds the first bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the bullet\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble xChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble yChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\txChange = xChange / magnitude * 20;\n\t\t\t\tyChange = yChange / magnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) xChange);\n\t\t\t\tlastBullet.setYChange((int) yChange);\n\t\t\t\t\n\t\t\t\t// adds the second bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tlastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET2_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET2_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble doubleshotXChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble doubleshotYChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble doubleshotMagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\tdoubleshotXChange = xChange / doubleshotMagnitude * 20;\n\t\t\t\tdoubleshotYChange = yChange / doubleshotMagnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) doubleshotXChange);\n\t\t\t\tlastBullet.setYChange((int) doubleshotYChange);\n\t\t\t\t\n\t\t\t\tDelta.setLastBullet(Delta.getTime());\n\t\t\t}\n\t\t\t// if a bullet is shot and the time since the last bullet is at least shootingSpeed\n\t\t\telse if (bulletShot && bulletDelta > bulletShootingSpeed) {\n\t\t\t\t// plays the bullet shooting sound\n\t\t\t\tsound.get(\"shootEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t\n\t\t\t\t// adds the bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the bullet\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble xChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble yChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\txChange = xChange / magnitude * 20;\n\t\t\t\tyChange = yChange / magnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) xChange);\n\t\t\t\tlastBullet.setYChange((int) yChange);\n\t\t\t\t\n\t\t\t\tDelta.setLastBullet(Delta.getTime());\n\t\t\t}\n\t\t\t// if a laser is shot\n\t\t\telse if (laserShot) {\n\t\t\t\tif (Delta.getTime() % 6 == 0) {\n\t\t\t\t\t// plays the laser shooting sound\n\t\t\t\t\tsound.get(\"laserEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// adds the laser\n\t\t\t\tbullet.add(new Bullet(this, \"laser\", 0, 0, 20));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the laser\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"laserSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"laserSprite\").getHeight() + BULLET_Y_OFFSET);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Checks to see if the time since the last enemy is greater than the enemy interval\n\t\tif (!bossSpawned && enemyDelta > generateEnemyInterval()) {\n\t\t\tdouble enemyGenerate = randomGenerator.nextDouble();\n\t\t\tif (enemyGenerate >= 0.3 || Delta.getDelta(\"beginning\") <= 10000)\n\t\t\t\tenemy.add(new Enemy(this, \"green_box\", 0, 0, 300, Delta.getDelta(\"beginning\"), 300));\n\t\t\telse if (enemyGenerate < 0.3)\n\t\t\t\tenemy.add(new Enemy(this, \"red_box\", 0, 0, 400, Delta.getDelta(\"beginning\"), 400));\n\t\t\tEnemy lastEnemy = enemy.get(enemy.size() - 1);\n\t\t\t\n\t\t\tlastEnemy.setX(lastEnemy.generateEnemyX());\n\t\t\tlastEnemy.setY(-lastEnemy.getSprite().getHeight());\n\t\t\tDelta.setLastEnemy(Delta.getTime());\n\t\t}\n\t\t\n\t\tif (bossExplosionNum == 0) {\n\t\t\t// Checks to see if enemy bullets should be generated\n\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\tif (enemy.get(i).getName().equals(\"red_box\") && enemy.get(i).getTimeSinceLastBullet() >= 700) {\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"enemy_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tBullet lastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tSprite enemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tSprite enemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (enemy.get(i).getName().equals(\"boss\") && enemy.get(i).getTimeSinceLastBullet() >= 1000) {\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tBullet lastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tSprite enemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tSprite enemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\tdouble xChange = player.getX() - lastEnemyBullet.getX();\n\t\t\t\t\tdouble yChange = player.getY() - lastEnemyBullet.getY();\n\t\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t\t\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tenemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tenemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\txChange = player.getX() - lastEnemyBullet.getX() - 100;\n\t\t\t\t\tyChange = player.getY() - lastEnemyBullet.getY() - 100;\n\t\t\t\t\tmagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t\t\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tenemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tenemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\txChange = player.getX() - lastEnemyBullet.getX() + 100;\n\t\t\t\t\tyChange = player.getY() - lastEnemyBullet.getY() + 100;\n\t\t\t\t\tmagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// spawns the boss if 60 seconds has passed\n\t\tif (Delta.getDelta(\"beginning\") >= 60000 && !bossSpawned) {\n\t\t\tbossSpawned = true;\n\t\t\tenemy.add(new Enemy(this, \"boss\", 0, 0, 10000, Delta.getDelta(\"beginning\"), 500));\n\t\t\t\n\t\t\tEnemy boss = enemy.get(enemy.size() - 1);\n\t\t\tboss.setX(displayWidth / 2 - boss.getSprite().getWidth() / 2);\n\t\t\tboss.setY(-boss.getSprite().getHeight());\n\t\t}\n\t\t\n\t\t// checks for collisions\n\t\tif (bossExplosionNum == 0) {\n\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\tEntity entity1 = enemy.get(i);\n\t\t\t\t\n\t\t\t\t// if a bullet collides with an enemy\n\t\t\t\tfor (int j = 0; j < bullet.size(); j++) {\n\t\t\t\t\tEntity entity2 = bullet.get(j);\n\t\t\t\t\t\n\t\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tEntity entity2 = player;\n\t\t\t\t\n\t\t\t\t// if the player collides with an enemy\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tEntity entity1 = player;\n\t\t\t// if an enemy bullet collides with the player\n\t\t\tfor (int i = 0; i < enemy_bullet.size(); i++) {\n\t\t\t\tEntity entity2 = enemy_bullet.get(i);\n\t\t\t\t\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if a powerup collides with the player\n\t\t\tfor (int i = 0; i < powerup.size(); i++) {\n\t\t\t\tEntity entity2 = powerup.get(i);\n\t\t\t\t\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if the player has defeated the boss\n\t\tif (gameWon && bossSpawned) {\n\t\t\t// draw Congratulations\n\t\t\tString congrats = \"Congratulations! You were able to vanquish\";\n\t\t\tString congrats2 = \"all of your evil thoughts and achieve nirvana!\";\n\t\t\tcongratsFont.drawString(displayWidth / 2 - congratsFont.getWidth(congrats) / 2, displayHeight / 2\n\t\t\t\t\t- congratsFont.getHeight(congrats) / 2 - 50, congrats);\n\t\t\tcongratsFont.drawString(displayWidth / 2 - congratsFont.getWidth(congrats2) / 2, displayHeight\n\t\t\t\t\t/ 2 - congratsFont.getHeight(congrats2) / 2 - 15, congrats2);\n\t\t\t\n\t\t\t// draw the score\n\t\t\tscoreFont.drawString(displayWidth / 2 - scoreFont.getWidth(\"Score: \" + totalCash) / 2, displayHeight\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Game Over!\")\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Score: \" + totalCash)\n\t\t\t\t\t/ 2 + 10 - 50, \"Score: \" + totalCash);\n\t\t}\n\t}", "public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Paramos tudo o que estamos fazendo.\n\t\tstop();\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\n\t\t// Giramos a arma na direção do disparo\n\t\tdouble turnGunAmt = Utils.normalRelativeAngleDegrees(e.getBearing() + getHeading() - getGunHeading());\n\t\tturnGunRight(turnGunAmt);\n\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\t\tback(400); // Recuamos\n\t}", "public void placeAlienBullet() {\r\n\t\tif (alien != null) {\r\n\t\t\t// If the alien is large fires a bullet in a random direction\r\n\t\t\tif (alien.getSize() == 1 && ship != null) {\r\n\r\n\t\t\t\t// Create the alien bullet\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\r\n\t\t\t\t// give the alien bullet a random direction and the bullet speed velocity,\r\n\t\t\t\t// then add as participant\r\n\t\t\t\tdouble r = (2 * Math.PI) * RANDOM.nextDouble();\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, r);\r\n\t\t\t\taddParticipant(ab);\r\n\r\n\t\t\t\t// Sets the alien bullet to expire when it reaches the bullet duration time\r\n\t\t\t\t// limit\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\r\n\t\t\t// If the alien is small fires a bullet aimed directly at the ship\r\n\t\t\tif (alien.getSize() == 0 && ship != null) {\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\t\t\t\tab.setSpeed(BULLET_SPEED);\r\n\r\n\t\t\t\t// Aims the alien bullet directly at the ship\r\n\t\t\t\tdouble A = ship.getY() - alien.getY();\r\n\t\t\t\tdouble B = ship.getX() - alien.getX();\r\n\t\t\t\tdouble angle = Math.atan2(A, B);\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, angle);\r\n\r\n\t\t\t\t// Add the alien bullet as a participant and then set it to expire when it\r\n\t\t\t\t// reaches the bullet duration time limit\r\n\t\t\t\taddParticipant(ab);\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void speedBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Yellow\"));\n\n\t\tfor (int i = 0; i < bulletArrayList.size(); i++) {\n\t\t\tbulletArrayList.get(i).setSpeed(5);\n\t\t}\n\t}", "Bullet(int posX,int posY,int velX,int velY,int classOfObejct,int attack){\n this.posX = posX;\n this.posY = posY;\n this.velX = velX;\n this.velY = velY;\n this.classOfObejct = classOfObejct;\n this.attack = attack;\n\n }", "private void quickFireBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Pink\"));\n\t}", "void doGun() {\r\n\t\tlong time = getTime()\r\n\t\t\t\t+ (int) Math\r\n\t\t\t\t\t\t.round((getRange(getX(), getY(), target.x, target.y) / (20 - (3 * firePower))));\r\n\t\tPoint2D.Double p = target.guessPosition(time);\r\n\r\n\t\t// offsets the gun by the angle to the next shot based on linear\r\n\t\t// targeting provided by the enemy class\r\n\t\tdouble gunOffset = getGunHeadingRadians()\r\n\t\t\t\t- (Math.PI / 2 - Math.atan2(p.y - getY(), p.x - getX()));\r\n\t\tsetTurnGunLeftRadians(normaliseBearing(gunOffset));\r\n\t}", "@Override\r\n\tpublic void onThink() {\n\t\tint random = (shotsFired + 1) % 3 - 1;\r\n\t\tVacuumProjectile projectile = new VacuumProjectile(DAMAGE * this.owner.finalDamageOutputModifier, SPEED, this.owner.direction, Point.add(this.owner.gridLoc, new Point(0, random)), this.owner.teamID);\r\n\t\tthis.getMap().addGameElement(projectile);\r\n\t\tthis.shotsFired++;\r\n\t\tif(this.shotsFired >= NUM_SHOTS) {\r\n\t\t\tthis.finishSpell();\r\n\t\t}\r\n\t}", "public void tick() {\n boolean shouldHaltAfterTick = false;\n\n List<Pair<Movement, Bullet>> movements = new ArrayList<>();\n\n //Bullets on nodes\n Map<Coordinate, Bullet> capturedBullets = new HashMap<>(bullets);\n capturedBullets.keySet().retainAll(nodes.keySet());\n\n //Bullets not on nodes\n Map<Coordinate, Bullet> freeBullets = new HashMap<>(bullets);\n freeBullets.keySet().removeAll(capturedBullets.keySet());\n\n //Generate movements for free bullets\n for (Map.Entry<Coordinate, Bullet> entry : freeBullets.entrySet()) {\n Bullet bullet = entry.getValue();\n Coordinate coord = entry.getKey();\n Coordinate newCoord = entry.getKey().plus(bullet.getDirection()).wrap(width, height);\n movements.add(new Pair<>(new Movement(coord, newCoord), bullet));\n }\n\n //Update captured bullets\n for (Map.Entry<Coordinate, Bullet> entry : capturedBullets.entrySet()) {\n Coordinate coordinate = entry.getKey();\n INode node = nodes.get(coordinate);\n\n // special case\n if (node instanceof NodeHalt)\n shouldHaltAfterTick = true;\n\n //TODO this brings great shame onto my family\n Direction bulletDirection = entry.getValue().getDirection();\n Direction dir = Direction.UP;\n while (dir != node.getRotation()) {\n dir = dir.clockwise();\n bulletDirection = bulletDirection.antiClockwise();\n }\n Bullet bullet = new Bullet(bulletDirection, entry.getValue().getValue());\n\n Map<Direction, BigInteger> bulletParams = node.run(bullet);\n\n for (Map.Entry<Direction, BigInteger> newBulletEntry : bulletParams.entrySet()) {\n //TODO this too\n bulletDirection = newBulletEntry.getKey();\n dir = Direction.UP;\n while (dir != node.getRotation()) {\n dir = dir.clockwise();\n bulletDirection = bulletDirection.clockwise();\n }\n\n Bullet newBullet = new Bullet(bulletDirection, newBulletEntry.getValue());\n Coordinate newCoordinate = coordinate.plus(newBullet.getDirection()).wrap(width, height);\n Movement movement = new Movement(coordinate, newCoordinate);\n movements.add(new Pair<>(movement, newBullet));\n }\n }\n\n //Remove swapping bullets\n List<Movement> read = new ArrayList<>();\n Set<Coordinate> toDelete = new HashSet<>();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Coordinate from = movement.getFrom();\n Coordinate to = movement.getTo();\n boolean foundSwaps = read.stream().anyMatch(other -> from.equals(other.getTo()) && to.equals(other.getFrom()));\n if (foundSwaps) {\n toDelete.add(from);\n toDelete.add(to);\n }\n read.add(movement);\n }\n movements.removeIf(pair -> toDelete.contains(pair.getKey().getFrom()) || toDelete.contains(pair.getKey().getTo()));\n\n //Remove bullets that end in the same place\n read.clear();\n toDelete.clear();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Coordinate to = movement.getTo();\n boolean foundSameFinal = read.stream().anyMatch(other -> to.equals(other.getTo()));\n if (foundSameFinal) {\n toDelete.add(to);\n }\n read.add(movement);\n }\n movements.removeIf(pair -> toDelete.contains(pair.getKey().getTo()));\n\n //Move bullets\n Map<Coordinate, Bullet> newBullets = new HashMap<>();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Bullet bullet = pair.getValue();\n newBullets.put(movement.getTo(), bullet);\n }\n\n bullets.clear();\n bullets.putAll(newBullets);\n\n if (shouldHaltAfterTick)\n halt();\n }", "public void defensive_act()\r\n\t{\r\n\t\tBullet closestBullet = IMAGINARY_BULLET;\r\n\t//\tBullet secondClosestBullet = IMAGINARY_BULLET;\r\n\t\t\r\n\t\tActor machines;\r\n\t\tEnumeration<Actor> opponent = ((MachineInfo)data.get(TankFrame.PLAYER_1)).getHashtable().elements();\r\n\t\twhile(opponent.hasMoreElements())\r\n\t\t{\r\n\t\t\tmachines = (Actor) opponent.nextElement();\r\n\t\t\tif(machines instanceof Bullet)\r\n\t\t\t{\r\n\t\t\t\tif(machines.getPoint().distance(getPoint()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t{\r\n\t\t\t\t\tclosestBullet = (Bullet)machines;\r\n\t\t\t\t\tLine2D aim = new Line2D.Double(getCenterX(), getCenterY(), closestBullet.getPosX(), closestBullet.getPosY() );\r\n\t\t\t\t\tSystem.out.println(aim.getP1().distance(aim.getP2()));\r\n\t\t\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t\t\taimAndShoot(aim);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t/*\tif(machines.getPoint().distance(getPoint()) > secondClosestBullet.getPoint().distance(getPoint()) \r\n\t\t\t\t\t&& machines.getPoint().distance(getPoint()) < closestBullet.getPoint().distance(getPoint()))\r\n\t\t\t\t\tsecondClosestBullet = (Bullet)machines;*/\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 * Find the line\r\n\t\t */\r\n\t\t/*if(!closestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), closestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(getCenterX(), getCenterY(), (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\t/*bulletPath = new Line2D(getRightPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\tbulletPath = new Line2D(getPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);*/\r\n\t\t\t\r\n\t\t//}\r\n\t/*\tif(!secondClosestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), secondClosestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t}*/\r\n\r\n\t}", "private void placeBullet(double x, double y) {\r\n\t\tb = new Bullet(x, y);\r\n\t\taddParticipant(b);\r\n\t\tb.setVelocity(BULLET_SPEED, ship.getRotation());\r\n\t\tnew ParticipantCountdownTimer(b, \"expire\", BULLET_DURATION);\r\n\t}", "void dropHandler() {\n if (tickSpeed < 0) {\n if((int)random(1,6) == 1){ //every 6 medkits the handler drops a minigun\n Sprite mg = new Sprite(minigun);\n mg.moveToPoint(random(0,2048), random(0, 2048)); //moves drop to random point\n minigunDrop.add(mg);\n tickSpeed = (int)random(100,500);\n }else if((int)random(1,4) == 1){ //every 4 medkits the handler drops a coilgun\n Sprite cg = new Sprite(coilgun);\n cg.moveToPoint(random(0,2048), random(0,2048)); //moves drop to random point\n coilgunDrop.add(cg);\n tickSpeed = (int)random(100,500); //changes \n }\n else {\n \n \n Medkit hp = new Medkit();\n hp.med.moveToPoint(random(0, 2048), random(0, 2048));\n\n health.add(hp);\n\n tickSpeed = (int)random(100,500);\n }\n }\n tickSpeed--;\n for (Medkit hp: health) {\n hp.med.display();\n hp.timer--;\n\n }\n for (Sprite mg: minigunDrop){\n mg.display();\n }\n for (Sprite cg: coilgunDrop){\n cg.display();\n }\n // e.forward(5);\n}", "public void draw() {\n if (you.health() > 0 | lives >= 0) {\n if (aliens.isEmpty()) {\n win();\n }\n if (you.health() <= 0 & lives >= 0) {\n die();\n }\n \n you.act();\n \n if (fire & you.getWeapon() == Weapon.WEAPON_GOD) {\n for (Dot d : you.fire()) {\n this.moreBullets(d);\n }\n }\n for (Dot d : lazers){d.update(); d.draw(page);}\n for (Dot d : bullets) {d.update(); d.draw(page);}\n for (Alien loop : aliens) {\n loop.act();\n if (Math.random() > .993) {\n for (Dot d : loop.fire())\n lazers.add(d);\n }\n loop.draw(page);\n }\n \n if (collisionCheck() | fl) {\n flash();\n fl = !fl;\n }\n \n int index1 = 0, index2 = 0, size1 = bullets.size(), size2 = aliens.size();\n for (Alien al : aliens) {\n index2 = 0;\n while (index2 < size1) {\n if (al.collide(bullets.get(index2))) {\n bullets.remove(index2);\n size1--;\n score += 10;\n }\n index2++;\n }\n }\n\n index1 = 0; size1 = aliens.size();\n while (index1 < size1) {\n if (aliens.get(index1).health() <= 0) {\n aliens.remove(index1);\n index1--;\n size1--;\n score += 25;\n }\n index1++;\n }\n \n for (Dot d : lazers) {\n if (d.getX() < 0 | d.getX() > 512 | d.getY() < 0 | d.getY() > 496) {\n d.deactivate();\n }\n }\n index1 = 0; size1 = lazers.size();\n while (index1 < size1) {\n if (!lazers.get(index1).isActive()) {\n lazers.remove(index1);\n size1--;\n index1--;\n }\n index1++;\n }\n \n for (Dot d : bullets) {\n if (d.getX() < 0 | d.getX() > 512 | d.getY() < 0 | d.getY() > 512) {\n d.deactivate();\n }\n }\n index1 = 0; size1 = bullets.size();\n while (index1 < size1) {\n if (!bullets.get(index1).isActive()) {\n bullets.remove(index1);\n size1--;\n index1--;\n }\n index1++;\n }\n \n for (int i = 0; i < lives; i++) {\n page.drawImage(you.getImage(), i*20, 496, 16, 16, null);\n }\n page.setColor(Color.white);\n page.drawString(\"\" + you.health(), 420, 509);\n page.drawString(\"\" + score, 450, 509);\n you.draw(page);\n }\n else {\n lose();\n }\n }", "@Override\n public void update(GameContainer gc, StateBasedGame stateBasedGame, int delta) throws SlickException {\n timeSinceStart += delta;\n rtimeSinceStart += delta;\n Input input = gc.getInput();\n int mouseX = input.getMouseX();\n int mouseY = input.getMouseY();\n\n\n basicbulletSheet.rotate(90f);\n basicbulletSheet.setCenterOfRotation(16, 16);\n\n // Move this bullet\n for (int i = 0; i < bulletList.size(); i++) {\n bullet = bulletList.get(i);\n bullet.move();\n }\n\n //Add this tower to the this towerList\n if (Tower.isBasicPlaced()) {\n basicTowers.add(new BasicTower());\n System.out.println(basicTowers);\n Tower.setBasicPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isBomberPlaced()) {\n bomberTowers.add(new BomberTower());\n System.out.println(bomberTowers);\n Tower.setBomberPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isSniperPlaced()) {\n sniperTowers.add(new SniperTower());\n System.out.println(sniperTowers);\n Tower.setSniperPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isQuickPlaced()) {\n quickTowers.add(new QuickTower());\n System.out.println(quickTowers);\n Tower.setQuickPlaced(false);\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BasicTower basicTower1 : basicTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > basicTower1.rcoolDown + basicTower1.rlastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n basicTower1.basicClicked.setRotation((float) getTargetAngle(basicTower1.towerX,\n basicTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n basicTower1.basicClicked.setCenterOfRotation(32, 32);\n basicTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > basicTower1.coolDown + basicTower1.lastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n addNewBullet2(basicTower1.towerX, basicTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n basicTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BomberTower bomberTower1 : bomberTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > bomberTower1.rcoolDown + bomberTower1.rlastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n bomberTower1.bomberClicked.setRotation((float) getTargetAngle(bomberTower1.bombertowerX,\n bomberTower1.bombertowerY, enemy.getStartPosX(), enemy.getStartPosY()));\n bomberTower1.bomberClicked.setCenterOfRotation(32, 32);\n bomberTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > bomberTower1.coolDown + bomberTower1.lastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n addNewBullet2(bomberTower1.bombertowerX, bomberTower1.bombertowerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n bomberTower1.lastShot = timeSinceStart;\n }\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (SniperTower sniperTower1 : sniperTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > sniperTower1.rcoolDown + sniperTower1.rlastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n sniperTower1.sniperClicked.setRotation((float) getTargetAngle(sniperTower1.towerX,\n sniperTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n sniperTower1.sniperClicked.setCenterOfRotation(32, 32);\n sniperTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n if (timeSinceStart > sniperTower1.coolDown + sniperTower1.lastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n addNewBullet2(sniperTower1.towerX, sniperTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 50);\n sniperTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (QuickTower quickTower1 : quickTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > quickTower1.rcoolDown + quickTower1.rlastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n quickTower1.quickClicked.setRotation((float) getTargetAngle(quickTower1.towerX,\n quickTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n quickTower1.quickClicked.setCenterOfRotation(32, 32);\n quickTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n\n if (timeSinceStart > quickTower1.coolDown + quickTower1.lastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n radiusVisited = true;\n addNewBullet2(quickTower1.towerX, quickTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 5);\n quickTower1.lastShot = timeSinceStart;\n }\n }\n\n }\n }\n\n //A spawn is in progress\n if (spawninProgress) {\n timePassedEnemy += delta;\n if (timePassedEnemy > 800) {\n enemies.add(new Enemy());\n enemySpawns++;\n timePassedEnemy = 0;\n }\n }\n //When enough enemies has spawned, stop the spawninProgress\n if (enemySpawns == enemyCounter) {\n spawninProgress = false;\n //hasbeenDead = false;\n enemySpawns = 0;\n enemyCounter++;\n }\n\n //When no more enemies on maps\n if (enemies.size() == 0) {\n waveinProgress = false;\n startWaveCount = 0;\n }\n\n //Start a new level when there's no more enemies on the map\n if (loadMap.MAP[mouseY / w][mouseX / w] == 16) {\n if (input.isMousePressed(0) && startWaveCount == 0 && !waveinProgress) {\n startWaveCount++;\n if (startWaveCount == 1 && enemies.size() == 0 && !waveinProgress) {\n waveinProgress = true;\n gc.resume();\n spawninProgress = true;\n currentLevel++;\n }\n }\n }\n\n //For each new level, increase the HP of each enemy\n if (currentLevel < currentLevel + 1 && !waveinProgress) {\n for (Enemy enemyHP : enemies) {\n if (enemyHP.getStartPosX() <= 0 && enemyHP.getHP() < enemyHP.startHP + currentLevel) {\n enemyHP.setHP(enemyHP.getHP() + currentLevel);\n }\n }\n }\n\n\n //For each enemies, if enemies has finished their way, decrease player HP\n //and set them inactive\n for (Enemy enemyList : enemies) {\n if (enemyList.counter >= enemyList.path.getLength() - 1) {\n player.decreaseLife();\n bulletCount = 0;\n enemyList.isActive = false;\n }\n\n //If enemies' hp is zero, set them inactive and remove from the list\n if (enemyList.getHP() <= 0) {\n enemyList.isActive = false;\n bulletCount = 0;\n player.addCredits(20);\n }\n enemyList.update(gc, stateBasedGame, delta);\n }\n for (int i = 0; i < enemies.size(); i++) {\n if (!enemies.get(i).isActive) {\n enemies.remove(enemies.get(i));\n }\n }\n\n //For all objects, update\n for (GameObject obj : objects)\n try {\n obj.update(gc, stateBasedGame, delta);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //Go to Menu\n if (gc.getInput().isKeyPressed(Input.KEY_ESCAPE)) {\n gc.getInput().clearKeyPressedRecord();\n stateBasedGame.enterState(2);\n }\n\n\n }", "private void ShootListener() {\n shoot.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (presenter.canShoot()) {\n shoot(presenter.getBullet());\n presenter.checkLastBullet();\n }\n\n }\n });\n }", "public void mousePressed(MouseEvent e){\n\t\tint mx = (int) (e.getX() + camera.getX());\n\t\tint my = (int) (e.getY() + camera.getY());\n\t\n\t\tfor(int i=0; i < handler.object.size(); i++)\n\t\t{\n\t\t\tGameObject tempObject = handler.object.get(i);\n\t\t\tif(tempObject.getId() == ID.Player && game.ammo > 0)\n\t\t\t{\n\t\t\t\thandler.addObject(new Bullet(tempObject.getX()+16, tempObject.getY()+16, ID.Bullet, handler, mx, my, ss));\n\t\t\t\tgame.ammo--;\n\t\t\t}\n\t\t}\n\t}", "public void shoot() {\n _shooterMotor1.set(_targetRPM);\n }", "void tick() {\n\t\tif (playing) {\n\t\t\tdeadcannon = null;\n\t\t\t// sets general output message\n\t\t\tstatus.setText(\"Engaging alien wave \" + Integer.toString(level)+ \" \");\n\n\t\t\t// controls the first shot fired by the aliens\n\t\t\tif (shot1 == null) {\n\t\t\t\tint count1 = 0;\n\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\tif (alien3[i]!=null) {if (!alien3[i].Destroyed) count1++ ;}\n\t\t\t\t}\n\t\t\t\tif (count1 > 1) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\tshootbottom().pos_x + 18, shootbottom().pos_y); \n\t\t\t\telse {\n\t\t\t\t\tint count2 = 0;\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null) {if(!alien2[i].Destroyed)count2++;}\n\t\t\t\t\t}\n\t\t\t\t\tif (count2 > 1) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\tshootmiddle().pos_x + 18, shootmiddle().pos_y);\n\t\t\t\t\telse {\n\t\t\t\t\t\tint count3 = 0;\n\t\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\t\tif (alien1[i]!=null) {if(!alien1[i].Destroyed)count3++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count3 != 0) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\t\tshoottop().pos_x + 18, shoottop().pos_y);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// controls the second shot fired by the aliens\n\t\t\tif (shot2 == null) {\n\t\t\t\tint count4 = 0;\n\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\tif (alien3[i]!=null) {if (!alien3[i].Destroyed) count4++ ;}\n\t\t\t\t}\n\t\t\t\tif (count4 != 0) {shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\tshootbottom().pos_x + 18, shootbottom().pos_y); \n\t\t\t\tStdAudio.play(\"zap.wav\"); }\n\t\t\t\telse {\n\t\t\t\t\tint count5 = 0;\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null) {if(!alien2[i].Destroyed)count5++;}\n\t\t\t\t\t}\n\t\t\t\t\tif (count5 != 0) { shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\tshootmiddle().pos_x + 18, shootmiddle().pos_y);\n\t\t\t\t\tStdAudio.play(\"zap.wav\"); }\n\t\t\t\t\telse {\n\t\t\t\t\t\tint count6 = 0;\n\t\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\t\tif (alien1[i]!=null) {if(!alien1[i].Destroyed)count6++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count6 != 0) {shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\t\tshoottop().pos_x + 18, shoottop().pos_y);\n\t\t\t\t\t\tStdAudio.play(\"zap.wav\");}\n\t\t\t\t\t\telse {level = level + 1; \n\t\t\t\t\t\tnewlevel();\n\t\t\t\t\t\tthescore=thescore + 100;\n\t\t\t\t\t\tStdAudio.play(\"up.wav\");}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move bullet and delete if it reaches the roof\n\t\t\tif (bullet!= null) {\n\t\t\t\tbullet.move();\n\t\t\t\tif (bullet.pos_y == 0) bullet = null;\n\t\t\t}\n\n\t\t\t// controls movement of first shot\n\t\t\tif (shot1 != null) {\n\t\t\t\tshot1.move();\n\t\t\t\tif (shot1.pos_y > 435) shot1 = null;\n\t\t\t}\n\t\t\t// controls movement of second shot\n\t\t\tif (shot2 != null) {\n\t\t\t\tshot2.move();\n\t\t\t\tif (shot2.pos_y > 435) shot2 = null;\n\t\t\t}\n\n\t\t\t// For Top Row\n\n\t\t\t// change alien direction if a wall is reached\n\t\t\tif (alien1[0] != null && alien1[9] != null){\n\t\t\t\tif (alien1[0].pos_x == 0 || alien1[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\tif (alien1[i]!=null){alien1[i].v_x = -alien1[i].v_x;\n\t\t\t\t\t\talien1[i].pos_y=alien1[i].pos_y+15;\n\t\t\t\t\t\tif (alien1[i].pos_y >= 385 && !alien1[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false;\n\t\t\t\t\t\t\tstatus.setText(\"You have been overrun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\t \n\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\tif (alien1[i] != null) \n\t\t\t\t\talien1[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\tif (alien1[i] != null && bullet != null) {\n\t\t\t\t\tif (alien1[i].intersects(bullet) && !alien1[i].Destroyed) { \n\t\t\t\t\t\talien1[i].Destroyed=true;\n\t\t\t\t\t\tthescore += 20;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10 ) {\n\t\t\t\t\t\t\talien1[i].img_file = \"black.jpg\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For Second Row\n\n\t\t\t// change alien direction if a wall is reached\n\t\t\tif (alien2[0] != null && alien2[9] != null){\n\t\t\t\tif (alien2[0].pos_x == 0 || alien2[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null){alien2[i].v_x = -alien2[i].v_x;\n\t\t\t\t\t\talien2[i].pos_y=alien2[i].pos_y+15;\n\t\t\t\t\t\tif (alien2[i].pos_y >= 385 && !alien2[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false; \n\t\t\t\t\t\t\tstatus.setText(\"You have been ovverun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\tif (alien2[i] != null) \n\t\t\t\t\talien2[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\tif (alien2[i] != null && bullet != null) {\n\t\t\t\t\tif (alien2[i].intersects(bullet) && !alien2[i].Destroyed) { \n\t\t\t\t\t\talien2[i].Destroyed=true;\n\t\t\t\t\t\tthescore +=15;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10 ) {\n\t\t\t\t\t\t\talien2[i].img_file = \"black.jpg\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//For third row\n\n\t\t\t//change alien direction if a wall is reached\n\t\t\tif (alien3[0] != null && alien3[9] != null){\n\t\t\t\tif (alien3[0].pos_x == 0 || alien3[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\t\tif (alien3[i]!=null){alien3[i].v_x = -alien3[i].v_x;\n\t\t\t\t\t\talien3[i].pos_y=alien3[i].pos_y+15;\n\t\t\t\t\t\tif (alien3[i].pos_y >= 385 && !alien3[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false;\n\t\t\t\t\t\t\tstatus.setText(\"You have been ovverrun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\n\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\tif (alien3[i] != null) \n\t\t\t\t\talien3[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\tif (alien3[i] != null && bullet != null) {\n\t\t\t\t\tif (alien3[i].intersects(bullet) && !alien3[i].Destroyed) { \n\t\t\t\t\t\talien3[i].Destroyed=true;\n\t\t\t\t\t\tthescore += 10;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10) {\n\t\t\t\t\t\t\talien3[i].img_file = \"black.jpg\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// destroy cannon if shot\n\t\t\tif (shot1 != null) {\n\t\t\t\tif (shot1.intersects(cannon)){ dead = true; \n\t\t\t\tthelives = thelives - 1;\n\t\t\t\tStdAudio.play(\"bigboom.wav\");\n\t\t\t\tcannon.img_file = \"dead.jpg\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (shot2 != null) {\n\t\t\t\tif (shot2.intersects(cannon)){ dead = true; \n\t\t\t\tthelives = thelives - 1;\n\t\t\t\tStdAudio.play(\"bigboom.wav\");}\n\t\t\t\tcannon.img_file = \"dead.jpg\";\n\t\t\t}\n\n\t\t\t// ends the game when all lives are lost\n\t\t\tif (thelives <= 0) {\n\t\t\t\tplaying = false; \n\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\tstatus.setText(\"You have been killed and Earth has been \" +\n\t\t\t\t\t\t\"destroyed. You are a terrible defender \" +\n\t\t\t\t\t\t\"of humanity. \");\n\t\t\t}\n\n\t\t\t//makes sure lives cannot become negative\n\t\t\tif (thelives <= 0) {\n\t\t\t\tthelives = 0;\n\t\t\t\tdeadcannon = new DeadCannon(COURT_WIDTH, COURT_HEIGHT);\n\t\t\t\tdeadcannon.pos_x = cannon.pos_x;\n\t\t\t\tStdAudio.play(\"loss.wav\");\n\t\t\t}\n\n\t\t\t//set the text labels at the bottom of the screen\n\t\t\tmyscore.setText(\"Score = \"+ Integer.toString(thescore)+ \" \");\n\t\t\tmylives.setText(\"Lives = \"+ Integer.toString(thelives));\n\t\t\trepaint();\n\t\t\n\t\t\t//move cannon\n\t\t\tcannon.move();\n\t\t} \n\t}", "public void fire() {\n\n\t\t// A player cannot continually fire, there is a delay between each bullet.\n\t\tif (isAbleToFire) {\n\n\t\t\taudio.playMusic(\"Audio/Fire.wav\");\n\n\t\t\tif (multiBulletIsActive) {\n\n\t\t\t\tmultiBulletFire();\n\n\t\t\t} else if (speedBulletIsActive) {\n\n\t\t\t\tspeedBulletFire();\n\n\t\t\t} else if (quickFireBulletIsActive) {\n\n\t\t\t\tquickFireBulletFire();\n\n\t\t\t} else {\n\n\t\t\t\t// Single fire.\n\t\t\t\t// Adjust bullet position to be fired from the center of the player.\n\t\t\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition,\n\t\t\t\t\t\tbulletWidth, bulletHeight, \"Red\"));\n\t\t\t}\n\n\t\t\t// Stop the player from being able to fire for 'ticksBetweemFire' amount.\n\t\t\tticksToNextFire = currentTickCount + ticksBetweenFire;\n\t\t}\n\t}", "private void fire()\n {\n if (frames % 300 == 0 || frames == 0)\n {\n for(int i = 0; i <=6; i++)\n {\n FireBall fireBall = new FireBall();\n getWorld().addObject(fireBall, getX()+30, getY()); \n }\n }\n }", "private void checkForBulletCollisions() {\r\n\t\tbulletMoveOffScreen();\r\n\t\tbulletCollisionWithObject();\r\n\t}", "public void shoot() {\n\r\n switch (shootstate) {\r\n case down:\r\n tempbutton = Components.shootsinglespeed;\r\n templimit = islimitshooterup();\r\n\r\n if (Components.shootsinglespeed && islimitshooterup() && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(singlespeed);\r\n Components.shootermotorleft2.setX(singlespeed);\r\n Components.shootermotorright.setX(-singlespeed);\r\n Components.shootermotorright2.setX(-singlespeed);\r\n\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n\r\n }\r\n shootpothigh = shootsinglepot;\r\n shootstate = movingup;\r\n } else if (Components.trusshp == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(trusshpspeed);\r\n Components.shootermotorleft2.setX(trusshpspeed);\r\n Components.shootermotorright.setX(-trusshpspeed);\r\n Components.shootermotorright2.setX(-trusshpspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = trusshppothigh;\r\n shootstate = movingup;\r\n }else if (Components.truss == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(trussspeed);\r\n Components.shootermotorleft2.setX(trussspeed);\r\n Components.shootermotorright.setX(-trussspeed);\r\n Components.shootermotorright2.setX(-trussspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = trusspothigh;\r\n shootstate = movingup;\r\n } else if (Components.pass == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(passspeed);\r\n Components.shootermotorleft2.setX(passspeed);\r\n Components.shootermotorright.setX(-passspeed);\r\n Components.shootermotorright2.setX(-passspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = passpot;\r\n shootstate = movingup;\r\n } else if (Components.longdistanceshoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(longdistancespeed);\r\n Components.shootermotorleft2.setX(longdistancespeed);\r\n Components.shootermotorright.setX(-longdistancespeed);\r\n Components.shootermotorright2.setX(-longdistancespeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = longdistancepot;\r\n shootstate = movingup;\r\n }\r\n else if (Components.shoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(shooterspeed);\r\n Components.shootermotorleft2.setX(shooterspeed);\r\n Components.shootermotorright.setX(-shooterspeed);\r\n Components.shootermotorright2.setX(-shooterspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootpothigh = shootpot;\r\n shootstate = movingup;\r\n }else if (Components.slowmovingshoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(slowmovingspeed);\r\n Components.shootermotorleft2.setX(slowmovingspeed);\r\n Components.shootermotorright.setX(-slowmovingspeed);\r\n Components.shootermotorright2.setX(-slowmovingspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n slowmovingpot = shootpot;\r\n shootstate = movingup;\r\n }\r\n else if (Components.fastmovingshoot == true && islimitshooterup() == true && Components.DownPickupLimit.get()) {\r\n try {\r\n Components.shootermotorleft.setX(fastmovingspeed);\r\n Components.shootermotorleft2.setX(fastmovingspeed);\r\n Components.shootermotorright.setX(-fastmovingspeed);\r\n Components.shootermotorright2.setX(-fastmovingspeed);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n fastmovingpot = shootpot;\r\n\r\n }\r\n case movingup:\r\n if (islimitshooterup() == false || Components.potvalue >= shootpothigh) {\r\n shootstate = stopped;\r\n oldTime = DS.getMatchTime();\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n break;\r\n\r\n case stopped:\r\n try {\r\n if (/*Components.shooterdown && */time - oldTime > .2 && islimitshooterdown() == true && Components.DownPickupLimit.get()) {\r\n\r\n Components.shootermotorleft.setX(shootdownspeed);\r\n Components.shootermotorleft2.setX(shootdownspeed);\r\n\r\n Components.shootermotorright.setX(-shootdownspeed);\r\n Components.shootermotorright2.setX(-shootdownspeed);\r\n\r\n shootstate = movingdown;\r\n }\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n break;\r\n\r\n case movingdown:\r\n if ((islimitshooterdown() == false) || (Components.potvalue < shootpotdown)) {\r\n\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n shootstate = down;\r\n }\r\n }\r\n }", "private void shootMove() {\n for (int i = 0; i < fires.size(); i++) {\n //子弹往上移动\n fires.get(i).move();\n //注意这里remove需要放在下面\n if (fires.get(i).y < -1000) {\n fires.remove(fires.get(i));\n }\n }\n\n }", "@Override\n\tpublic void run()\n\t{\n\t\tlong startTime = System.currentTimeMillis();\n\t\tlong startTimeGun = startTime;\n\t\tlong startTimeEnemyGun = startTime;\n\t\tlong startTimeClouds = startTime;\n\t\tlong startTimeBoss = startTime;\n\t\tlong startTimeBossBullet = startTime;\n\t\t\n\t\t//start player gun sound, this will run till player dies\n\t\tif (GameState._weapons.get(0).getWeaponName()==(Constants.PLAYER) && GameState._weapons.get(0).getDestroyedFlag() == false)\n\t\t{\n\t\t\tAudioPlayer.resumePlayerGun();\n\t\t}\n\t\t\n\t\t//main game loop\n\t\twhile(GameState.mIsRunning == true)\n\t\t{\t\n\t\t\tlong currentTime = System.currentTimeMillis();\n\t\t\ttry\n\t\t\t{\t\n\t\t\t\t//create clouds \n\t\t\t\tint cloudCount = GameUtils.getTypeCount(Constants.CLOUD); \n\t\t\t\tlong currentTimeClouds = currentTime;\n\t\t\t\tif (currentTimeClouds - startTimeClouds > 1000 && cloudCount < 6)\n\t\t\t\t{\n\t\t\t\t\tstartTimeClouds = currentTimeClouds;\n\t\t\t\t\tEnvBuilder.generateCloud(GameState._weapons.get(0).getX(), GameState._weapons.get(0).getY(), GameState._weapons.get(0).getCurrentDirection());\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t \t//generate a new ship. \t\n\t\t \tint enemyCount = GameUtils.getTypeCount(Constants.ENEMY_FIGHTER); \n\t\t \t// System.out.println(\"enemyCount: \" + enemyCount);\n\t\t\t\tif (GameState.mWaitTimeBetweenLevels == false && (currentTime - startTime) > 300 && enemyCount < 4)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t \tEnvBuilder.generateEnemy(GameState._weapons.get(0).getX()\n\t\t\t \t\t\t, GameState._weapons.get(0).getY());\t\t\n\t\t\t \tstartTime = currentTime;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//generate a boss ship\t\t\t\t\n\t\t\t\tif (GameState.mWaitTimeBetweenLevels == false && (currentTime - startTimeBoss) > 6000)\n\t\t\t\t{\n\t\t\t\t\tEnvBuilder.generateEnemyBoss(GameState._weapons.get(0).getX()\n\t\t\t\t\t \t\t, GameState._weapons.get(0).getY());\n\t\t\t\t\tstartTimeBoss = currentTime;\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\t// fire enemy guns constantly\t\n\t\t\t\tlong currentTimeEnemyGun = System.currentTimeMillis();\n\t\t\t\tif (currentTimeEnemyGun - startTimeEnemyGun > 850 && GameState._weapons.get(0).getWeaponName()==(Constants.PLAYER) == true && GameState.sFireEnemyGuns == true)\n\t\t\t\t{\n\t\t\t\t\tfor(int i = 0; i < GameState._weapons.size(); i ++)\n\t\t\t\t\t{\t\n\t\t\t\t\t\tif (currentTime - startTimeBossBullet > 500)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (GameState._weapons.get(i).getWeaponName() == (Constants.ENEMY_BOSS))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tint targetTrack = (int)GameUtils.getTargetTrack(GameState._weapons.get(i), GameState._weapons.get(0));\t\n\t\t\t\t\t\t\t\tMovementEngine bossBullet = new BossBullet(targetTrack, targetTrack\n\t\t\t\t\t\t\t\t\t\t, (int)GameState._weapons.get(i).getX() \n\t\t\t\t\t\t\t\t\t\t, (int)GameState._weapons.get(i).getY()\n\t\t\t\t\t\t\t\t\t\t, 3, 3, 1, 1\n\t\t\t\t\t\t\t\t\t\t, Constants.GUN_ENEMY, GameState._weapons.get(i), 50, 1); \n\t\t\t\t\t\t\t\tGameState._weapons.add(bossBullet);\n\t\t\t\t\t\t\t\tstartTimeBossBullet = currentTime;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((int)(Math.random() * 100) > 98)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (Math.random() * 100 > 20)\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (GameState._weapons.get(i).getWeaponName()==(Constants.ENEMY_FIGHTER) && GameUtils.getRange(GameState._weapons.get(i), GameState._weapons.get(0)) > 100)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tstartTimeEnemyGun = currentTimeEnemyGun;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// get player track\n\t\t\t\t\t\t\t\t\tint targetTrack = (int)GameUtils.getTargetTrack(GameState._weapons.get(i), GameState._weapons.get(0));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tMovementEngine bullet = new Bullet(targetTrack, targetTrack\n\t\t\t\t\t\t\t\t\t\t\t, (int)GameState._weapons.get(i).getX() \n\t\t\t\t\t\t\t\t\t\t\t, (int)GameState._weapons.get(i).getY()\n\t\t\t\t\t\t\t\t\t\t\t, 3, 3, 1, 1\n\t\t\t\t\t\t\t\t\t\t\t, Constants.GUN_ENEMY, GameState._weapons.get(i), 100, 1); \n\t\t\t\t\t\t\t\t\tGameState._weapons.add(bullet);\n\t\t\t\t\t\t\t\t\tif (GameState._muted == false)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tAudioPlayer.playEnemyGun();\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\telse\n\t\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (GameState._weapons.get(i).getWeaponName()==(Constants.ENEMY_FIGHTER) && GameUtils.getRange(GameState._weapons.get(i), GameState._weapons.get(0)) > 100)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tstartTimeEnemyGun = currentTimeEnemyGun;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// get player track\n\t\t\t\t\t\t\t\t\tint targetTrack = (int)GameUtils.getTargetTrack(GameState._weapons.get(i), GameState._weapons.get(0));\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tMovementEngine missile = new Missile(targetTrack, targetTrack\n\t\t\t\t\t\t\t\t\t\t\t, (int)GameState._weapons.get(i).getX()\n\t\t\t\t\t\t\t\t\t\t\t, (int)GameState._weapons.get(i).getY()\n\t\t\t\t\t\t\t\t\t\t\t, GameState._weapons.get(i).getCurrentSpeed(), 3, 1, 1\n\t\t\t\t\t\t\t\t\t\t\t, Constants.MISSILE_ENEMY, GameState._weapons.get(0), GameState._weapons.get(i), 200); \n\t\t\t\t\t\t\t\t\tGameState._weapons.add(missile);\n\t\t\t\t\t\t\t\t\tif (GameState._muted == false)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tAudioPlayer.playMissileSound();\n\t\t\t\t\t\t\t\t\t}\n\t\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\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t// fire gun constantly\n\t\t\t\t// System.out.println(\"gunModifier:\" + _gunModifier);\n\t\t\t\tif (GameState._weapons.get(0).getDestroyedFlag() == false && (GameState._weapons.get(0).getWeaponName()==(Constants.PLAYER)))\n\t\t\t\t{\n\t\t\t\t\tlong currentTimeGun = currentTime;\n\t\t\t\t\tif (currentTimeGun - startTimeGun > 40)\n\t\t\t\t\t{\n\t\t\t\t\t\tstartTimeGun = currentTimeGun;\n\t\t\t\t\t\tMovementEngine bullet = new Bullet(GameState._weapons.get(0).getCurrentDirection() + _gunModifier, GameState._weapons.get(0).getCurrentDirection() + _gunModifier\n\t\t\t\t\t\t\t\t, (int)GameState._weapons.get(0).getX()\n\t\t\t\t\t\t\t\t, (int)GameState._weapons.get(0).getY(),10, 10, 1, 1, Constants.GUN_PLAYER, GameState._weapons.get(0), 200, 1); \n\t\t\t\t\t\tGameState._weapons.add(bullet);\n\t\t\t\t\t\tgunModifier();\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t// move the ships around, check for collisions.\n\t\t\t\tfor(int i = 0; i < GameState._weapons.size(); i ++)\n\t\t \t{\t\t \t\t\n\t\t \t\tMovementEngine ship = GameState._weapons.get(i);\n\t\t \t\tif(ship.getWeaponName()==(Constants.MISSILE_PLAYER) || ship.getWeaponName()==(Constants.MISSILE_ENEMY))\n\t\t\t\t\t{\n\t\t \t\t\t// make smoke trail\n\t\t \t\t\tMovementEngine missileSmokeTrail = new ExplosionParticle(ship.getCurrentDirection(), ship.getCurrentDirection()\n\t\t\t\t\t\t\t\t, (int)ship.getX()\n\t\t\t\t\t\t\t\t, (int)ship.getY(),0, 0, 0, 0, Constants.MISSILE_SMOKE, null, 5, 1); \t\t \t\t\t\n\t\t \t\t\tGameState._weapons.add(missileSmokeTrail);\n\t\t\t\t\t}\n\n\t\t \t\t// make boss damage smoke trail\n\t\t \t\tif (ship.getWeaponName()==(Constants.ENEMY_BOSS))\n\t\t \t\t{\n\t\t\t \t\tif (ship.getHitpoints() < 10 )\n\t\t\t \t\t{\t\t\t \t\t\n\t\t\t\t\t\t\tint particleDirection = (int)(Math.random() * 360);\n\t\t\t\t\t\t\tint particleSpeed = (int)(Math.random() * 10);\n\t\t\t\t\t\t\tint particleEndurance = (int)(Math.random() * 50);\n\t\t\t\t\t\t\tMovementEngine explosionParticle = new ExplosionParticle(particleDirection, particleDirection\n\t\t\t\t\t\t\t\t\t, ship.getX(), ship.getY(), particleSpeed, 1, 1, 1, Constants.BOSS_SMOKE\n\t\t\t\t\t\t\t\t\t, null, particleEndurance, 1); \n\t\t\t\t\t\t\tGameState._weapons.add(explosionParticle);\n\t\t\t \t\t}\n\t\t \t\t}\n\t\t \t\tship.run();\t\n\t\t \t\t\n\t\t \t\t//TODO O(n^2) function unfortunately, any other way to make this faster? \n\t\t \t\tcheckCollisions(ship);\n\t\t \t}\n\t\t\t\t\n\t\t\t\t//check destroyed and remove from list if so, remove all objects that are over 450 units away from the player\n\t\t\t\tfor(int i = 1; i < GameState._weapons.size(); i ++)\n\t\t \t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((i > 0 && GameUtils.getRange(GameState._weapons.get(0), GameState._weapons.get(i)) > 450) \n\t\t\t\t\t\t\t\t|| (GameState._weapons.get(i).getDestroyedFlag() == true))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tGameState._weapons.remove(i);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\tcatch(ArrayIndexOutOfBoundsException e)\n\t\t\t\t\t{\n\t\t\t\t\t\t// ignore and continue\n\t\t\t\t\t}\n\t\t \t}\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tlong singleLoopTime = System.currentTimeMillis() - currentTime;\n\t\t\t\tif (singleLoopTime < 16)\n\t\t\t\t{\n\t\t\t\t\tsleep(16 - singleLoopTime);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tshootBullet(arg0);\r\n\t\t\t}", "@Override\n public void update(float dt) {\n //bulletUpdate(dt,b2body);\n stateTime += dt;\n bulletUpdate(b2body,bulletSprite1);\n bulletUpdate(b2body2,bulletSprite2);\n bulletUpdate(b2body3,bulletSprite3);\n\n\n\n }", "void shoot_ship_missiles(long now) {\n if (pressed_key_codes.contains(KeyCode.SPACE)) {\n // Rate of fire cannot exceed 2 missiles per second\n if (now - missile_timer > 500000000) {\n missile_audio.play();\n Missile missile = ship.shootMissile();\n ImageView ship_missile_image_view = new ImageView(ship_missile_image);\n ship_missile_image_view.setX(missile.x_position);\n ship_missile_image_view.setY(missile.y_position);\n ship_missile_image_view.setFitWidth(Dimensions.SHIP_MISSILE_WIDTH);\n ship_missile_image_view.setFitHeight(Dimensions.SHIP_MISSILE_HEIGHT);\n ship_missile_image_views.add(ship_missile_image_view);\n game_pane.getChildren().add(ship_missile_image_view);\n missile_timer = now;\n }\n }\n }", "private void bulletCollisionWithObject() {\r\n\t\tif(bullet != null) {\r\n\t\t\tGObject collider = getElementAt(bullet.getX() -1 , bullet.getY() + 1);\r\n\t\t\tif (dragon1 != null && collider == dragon1) {\r\n\t\t\t\thit(dragon1);\r\n\t\t\t}\r\n\t\t\tif(dragon2 != null && collider == dragon2) {\r\n\t\t\t\thit(dragon2);\r\n\t\t\t}\r\n\t\t\tif(mehran != null && collider == mehran && bullet.getY() > mehran.getY() + mehran.getHeight() / 2.0) {\r\n\t\t\t\thit(mehran);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void isShooting(GameContainer gc) throws LineUnavailableException{\r\n\t\tif(gc.getInput().isKeyPressed(Input.KEY_SPACE) || gc.getInput().isKeyPressed(Input.KEY_UP)){\r\n\t\t\tif(!this.bullet.isMoved()){\r\n\t\t\t\tthis.playSound();\r\n\t\t\t\tanimation = this.shooting;\r\n\t\t\t\tthis.bullet.position.x = super.getShape().getCenterX();\r\n\t\t\t\tthis.bullet.position.y = super.getShape().getCenterY();\r\n\t\t\t\tthis.getBullet().setMoved(true);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.getBullet().isMoved()){\r\n\t\t\tthis.bullet.move();\r\n\t\t}\r\n\t}", "public Bullet(int bulletsDamage, @NotNull String bulletsType, Coordinate centerPointCoordinate, double angle, TankTroubleMap tankTroubleMap, boolean isUserTank, int tankIndex) {\n this.isUserTank = isUserTank;\n this.tankIndex = tankIndex;\n this.centerPointCoordinate = centerPointCoordinate;\n updateArrayListCoordinates();\n bulletsBlasted = false;\n damage = bulletsDamage;\n this.tankTroubleMap = tankTroubleMap;\n if (bulletsType.equals(\"NORMAL\")) {\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/normal.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (bulletsType.equals(\"LASER\")) { // ba else nazadam yevakht khastim emtiazi ezafe konim ye golule\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/laser.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n this.angle = angle;\n\n fireTime = LocalDateTime.now();\n Thread thread = new Thread(() -> {\n try {\n Thread.sleep(4000);\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n\n }", "public void update(float delta) {\n rangeTimer++;//update bullet distance\n //delete bullet if hit collison or met ranged\n if (rangeTimer == RANGE) {\n bullet.setShoot(false);\n rangeTimer = 0;\n } else {\n //update bullet timings\n bullet.updateTimer(delta);\n //make bullet go to p x y - follows player to increase difficulty\n if (this.bullet.x < playerX + 1.5) {\n this.bullet.x += Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.x >playerX + 1.5) {\n this.bullet.x -= Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.y < playerY + 0.5) {\n this.bullet.y += Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.y > playerY + 1.5) {\n this.bullet.y -= Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n }\n }", "public void update() {\r\n super.update();\r\n life -= 1;\r\n if(life <= 0) {\r\n killBullet();\r\n }\r\n }", "public void update() {\n if (player.getPlaying()) { //if player alive\n bg.update(); //update background\n player.update(); //update player\n //player collision detection, if player hits any baddies or their bullets is playing sets to false\n for (int i = 0; i < gargants.size(); i++) {\n if (collision(gargants.get(i), player)) {\n //gargants.remove(i);\n player.setPlaying(false);\n\n }\n for (int j = 0; j < demons.size(); j++) {\n if (collision(demons.get(j), player)) {\n //demons.remove(j);\n player.setPlaying(false);\n\n }\n for (int k = 0; k < dragons.size(); k++) {\n if (collision(dragons.get(k), player)) {\n //dragons.remove(k);\n player.setPlaying(false);\n\n }\n for (int l = 0; l < demonShots.size(); l++) {\n if (collision(demonShots.get(l), player)) {\n //demonShots.remove(l);\n player.setPlaying(false);\n\n }\n\n }\n }\n }\n }\n\n for (int i = 0; i < bullets.size(); i++) { //for each bullet\n bullets.get(i).update(); //update them\n if (bullets.get(i).getX() > WIDTH + 10) {\n bullets.remove(i); //if off screen delete\n }\n }\n\n for (int i = 0; i < demonShots.size(); i++) { // for each demon bullet\n demonShots.get(i).update(); //update them\n if (demonShots.get(i).getX() < -100) {\n demonShots.remove(i); //if off screen delete\n }\n }\n\n long gargantElapseTime = (System.nanoTime() - gargantStartTime) / 1000000;\n if (gargantElapseTime > (1200 - player.getScore() / 3)) { //as score increases, more will spawn\n gargants.add(new Gargant(BitmapFactory.decodeResource(getResources(), R.drawable.gargant), WIDTH + 10, (int) (rand.nextDouble() * (HEIGHT)), 64, 64, 8));\n if (gargants.size() >= 13) { //limit amount of this enemy to 13\n gargants.remove(gargants.size() - 1);\n }\n gargantStartTime = System.nanoTime();\n }\n for (int i = 0; i < gargants.size(); i++) { // for each gargant\n gargants.get(i).update(); //update them\n for (int j = 0; j < bullets.size(); j++) {\n if (collision(gargants.get(i), bullets.get(j))) {\n //when shot remove enemy and bullet\n gargants.remove(i);\n bullets.remove(j);\n player.addScore(10); //10 score for these guys\n break;\n }\n }\n if (gargants.get(i).getX() < -100) {\n gargants.remove(i); //if off screen remove\n }\n }\n\n if (level >= 3) { //only spawn demon above level 3\n long demonElapseTime = (System.nanoTime() - demonStartTime) / 1000000;\n if (demonElapseTime > (12000 - player.getScore() / 3)) { //as score increases, more will spawn\n demons.add(new Demon(BitmapFactory.decodeResource(getResources(), R.drawable.demon), WIDTH + 10, (int) (rand.nextDouble() * (HEIGHT)), 64, 64, 8));\n if (demons.size() >= 10) { //limit amount of this enemy to 10\n demons.remove(demons.size() - 1);\n }\n demonStartTime = System.nanoTime();\n }\n for (int i = 0; i < demons.size(); i++) { //for each demon\n demons.get(i).update(); //update them\n int n = rand.nextInt(1001); //random int between 1 and 1000\n if (n > 980) { //if random int > 980 shoot demon bullet\n demonShots.add(new HellFire(BitmapFactory.decodeResource(getResources(), R.drawable.hellfire_0), demons.get(i).getX(), demons.get(i).getY(), 64, 64));\n }\n for (int j = 0; j < bullets.size(); j++) {\n if (collision(demons.get(i), bullets.get(j))) {\n demonHitCount++; //each hit with bullet increases hitcount\n bullets.remove(j);\n if (demonHitCount >= 10) { //when hit more than 10 times it dies\n demonHitCount = 0;\n demons.remove(i);\n bullets.remove(j);\n player.addScore(100); //100 score for these big bois\n }\n }\n }\n if (demons.get(i).getX() < -100) {\n demons.remove(i); //if off screen delete\n }\n }\n }\n\n\n if (level >= 2) { //only spawn dragon above level 3\n long dragonElapseTime = (System.nanoTime() - dragonStartTime) / 1000000;\n if (dragonElapseTime > (6000 - player.getScore() / 3)) { //as score increases, more will spawn\n dragons.add(new Dragon(BitmapFactory.decodeResource(getResources(), R.drawable.dragon), WIDTH + 10, (int) (rand.nextDouble() * (HEIGHT)), 128, 128, 8));\n if (dragons.size() >= 5) { //dragons limitted to only 5\n dragons.remove(dragons.size() - 1);\n }\n dragonStartTime = System.nanoTime();\n }\n for (int i = 0; i < dragons.size(); i++) {\n dragons.get(i).update();\n for (int j = 0; j < bullets.size(); j++) {\n if (collision(dragons.get(i), bullets.get(j))) {\n dragonHitCount++; //if hit increase hitcount\n bullets.remove(j);\n if (dragonHitCount >= 4) { //when hit 4 times it dies\n dragonHitCount = 0;\n dragons.remove(i);\n bullets.remove(j);\n player.addScore(25); //25 score for dragons\n }\n break;\n }\n }\n if (dragons.get(i).getX() < -100) {\n dragons.remove(i); //when off screen remove\n }\n }\n }\n }\n }", "@Override\n public Bullet getBullet() {\n return new EnemyGunBullet1();\n }", "@Override\r\n public void init(GameContainer gc) throws SlickException {\r\n\r\n \tbulletsToRemove = new ArrayList<Body>();\r\n \tbulletsToAdd = new ArrayList<Float[]>();\r\n \tbulletList = new ArrayList<Bullet>();\r\n \t\r\n \t//Set camera coordinates and size.\r\n viewport = new Rectangle(0, 0, 1024, 600);\r\n \r\n //Load our map. (Made in a program called TILED)\r\n map1 = new TiledMap(\"data/2.tmx\");\r\n \r\n \r\n //Create our World, enter a gravity (100 default, bullets have a gravity variable of this*0.05)\r\n Vec2 gravity = new Vec2(0, 100);\r\n world = new World(gravity);\r\n \r\n //Create 2 players.\r\n //Player 1\r\n player1 = new Player(5, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player1.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n //Player 2\r\n player2 = new Player(15, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player2.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n hpbar = new Image(\"data/healthbar.png\");\r\n \r\n //If we want multiplayer, connect to the server.\r\n if(multiplayer) {\r\n \t//Connecting to someone\r\n \tisHosting = false;\r\n \tmyPlayer = player2;\r\n \thisPlayer = player1;\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Connected to server\";\r\n }\r\n else {\r\n \t//Connecting to ourselfs\r\n \tisHosting = true;\r\n \tmyPlayer = player1;\r\n \thisPlayer = player2;\r\n \tnew BFServer(true);\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Local server online\";\r\n }\r\n \r\n //Set player2's friction to only about half of ours, this will reduce \"lag\" and simulate running better.\r\n FixtureDef fd = hisPlayer.getFixture();\r\n fd.friction = 2;\r\n hisPlayer.getBody().createFixture(fd);\r\n \r\n //Get collision layer from map\r\n int collisionLayerIndex = map1.getLayerIndex(\"collision\");\r\n\r\n //Create our collision blocks in the physics engine.\r\n for(int row=0; row<map1.getWidth(); row++) {\r\n \tfor(int col=0; col<map1.getHeight(); col++) {\r\n \t\tif(map1.getTileId(row, col, collisionLayerIndex)==1) {\r\n \t\t\tBodyDef groundBodyDef = new BodyDef();\r\n \t\t\tgroundBodyDef.position.set(row*2, col*2);\r\n \t\t\tBody groundBody = world.createBody(groundBodyDef);\r\n \t\t\tPolygonShape groundBox = new PolygonShape();\r\n \t\t\tgroundBox.setAsBox(1, 1, new Vec2(1, 1), 0);\r\n \t\t\tgroundBody.createFixture(groundBox, 0);\r\n \t\t}\r\n \t}\r\n }\r\n \r\n\r\n //Setup physics world\r\n timeStep = 1.0f/60.0f;\r\n velocityIterations = 6;\r\n positionIterations = 2;\r\n \r\n //Add a new collision listener to our world.\r\n world.setContactListener(new BFContactListener());\r\n \r\n //Add Keylistener to our GameContainer.\r\n gc.getInput().addKeyListener(keylistener);\r\n \r\n //Physics debug draw. (DEPRECATED. I'm using JBox2d-2.3.0 SNAPSHOT, this debugdraw hasn't been updated for it yet)\r\n \r\n //Slick2dDebugDraw sDD = new Slick2dDebugDraw(gc.getGraphics(), gc);\r\n //sDD.setFlags(0x0001); //Setting the debug draw flags, draw polygons, no joints.\r\n //world.setDebugDraw(sDD);\r\n }", "public void shoot(Projectile p){\r\n\t\tp.facing = facing;\r\n\t\tp.x = x+(width/2)-(p.width/2);\r\n\t\tp.y = y+(height/2)-(p.height/2);\r\n\t\tp.fired = true;\r\n\t\tinAttackCooldown = true;\r\n\t}", "private void multi(EntityManager manager) {\r\n if (manager.getAmmo(4) == 0 && !testMode) {\r\n changeGuns(0, manager);\r\n manager.outOfAmmo();\r\n return;\r\n }\r\n\r\n float newRotationR = rotationZ - 90;\r\n float newRotationL = rotationZ + 90;\r\n float newRotationD = rotationZ + 180;\r\n\r\n float leftX = (float) Math.sin(Math.toRadians(newRotationL));\r\n float leftY = (float) -Math.cos(Math.toRadians(newRotationL));\r\n\r\n float rightX = (float) Math.sin(Math.toRadians(newRotationR));\r\n float rightY = (float) -Math.cos(Math.toRadians(newRotationR));\r\n\r\n float downX = (float) Math.sin(Math.toRadians(newRotationD));\r\n float downY = (float) -Math.cos(Math.toRadians(newRotationD));\r\n\r\n Shot leftshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, leftX * 100, leftY * 100, 150, 1.5f, 0, 1, 0, true, 200, false);\r\n\r\n Shot rightshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, rightX * 100, rightY * 100, 150, 1.5f, 0, 0, 1, true, 200, false);\r\n\r\n Shot upshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, forwardX * 100, forwardY * 100, 150, 1.5f, 1, 0, 0, true, 200, false);\r\n\r\n Shot downshot = new Shot(shotTexture, getX() + forwardX, getY() + forwardY, downX * 100, downY * 100, 150, 1.5f, 1, 1, 0.82f, true, 200, false);\r\n\r\n manager.addEntity(leftshot);\r\n manager.addEntity(rightshot);\r\n manager.addEntity(upshot);\r\n manager.addEntity(downshot);\r\n if (!testMode) manager.updateAmmo(4, -1, false);\r\n manager.shotFired(4);\r\n }", "public EnemyGunBullet1() {\n super(DAMAGE, SPEED);\n setEnemyBullet(true);\n setShootSound(\"enemyShot.wav\");\n try {\n image = ImageIO.read(new File(\"res/images/tanks/bullets/enemyBullet1.png\"));\n }\n catch (IOException e) { }\n }", "public void fire() {\n \tAlienMissile.Slope slps[] = {AlienMissile.Slope.ShallowLeft, \n AlienMissile.Slope.Down,\n AlienMissile.Slope.ShallowRight};\n for (AlienMissile.Slope i : slps) {\n AlienMissile m = new AlienMissile(this, i);\n m.setBounce(true, health/5);\n list.add(m);\n }\n }", "@Override\n\tpublic void collideWith(Bullet bullet) {\n\t\tbulletMoveForward(bullet);\n\t}", "public void Attack(){\n float randomx = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/10;\n float randomy = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/5;\n Vector2 target = GameView.instance.player.aimFor();\n float dx = target.x-creationPoint.x;\n float dy =target.y-creationPoint.y;\n float l= (float)Math.sqrt(dx*dx+dy*dy);\n dx = dx/l-((float)Math.random()-0.5f)/2;\n dy = dy/l-(float)(Math.random())/10;\n ProjectilePool.instance.shootArrow(creationPoint.x, creationPoint.y, 1, dx, dy, 3);\n }", "public void shoot(Graphics g) {\r\n\t\tlevelManager.shoot(g);\r\n\t}", "public ArrayList<Bullet> getNewBullets()\r\n\t{\r\n\t\tArrayList<Bullet> fire = new ArrayList<Bullet>();\r\n\t\tfor (Bullet bullet : bullets)\r\n\t\t{\r\n\t\t\tif (bullet instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\tfire.add(new AvatarBullet((AvatarBullet) bullet));\r\n\t\t\t}\r\n\t\t\telse if (bullet instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tfire.add(new EnemyBullet((EnemyBullet) bullet));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn fire;\r\n\t}" ]
[ "0.8404136", "0.8181316", "0.80864924", "0.80273134", "0.7885796", "0.7630087", "0.753199", "0.74717236", "0.7447477", "0.7433178", "0.73696953", "0.73660827", "0.73412627", "0.7306971", "0.72456586", "0.72431463", "0.7196031", "0.7162602", "0.71121615", "0.7109411", "0.7109411", "0.7099234", "0.70830816", "0.7080367", "0.7066945", "0.70183975", "0.6972949", "0.69684523", "0.69301504", "0.6919502", "0.69055396", "0.68816876", "0.6866819", "0.6864236", "0.68506944", "0.6810355", "0.679891", "0.6796961", "0.6784377", "0.6762812", "0.6756659", "0.67373323", "0.6726826", "0.67202413", "0.66979206", "0.6674808", "0.6673727", "0.66692305", "0.66612315", "0.66577816", "0.6646146", "0.6642241", "0.6640848", "0.6629072", "0.6580838", "0.657359", "0.65609825", "0.6547346", "0.65473217", "0.6533987", "0.6530666", "0.65293044", "0.65179896", "0.6505154", "0.64685875", "0.6461856", "0.64605707", "0.64549", "0.6445904", "0.6441056", "0.64265937", "0.6424261", "0.64183056", "0.6397578", "0.63944244", "0.63671505", "0.63616496", "0.63554543", "0.634652", "0.6339505", "0.6338891", "0.63309443", "0.6328284", "0.6306815", "0.63066316", "0.630418", "0.62707347", "0.6261457", "0.62443215", "0.62322557", "0.6232059", "0.62304443", "0.6217682", "0.62167543", "0.620962", "0.6201016", "0.6177936", "0.6164734", "0.6159296", "0.61572486" ]
0.8374001
1
track all the bullets. Cause 1 harm to enemy and boss
public void trackBullets(){ for (int i = 0; i < bullets.size(); i++){ Bullet tempBullet = bullets.get(i); //update the position of the bullets tempBullet.update(); tempBullet.drawBullet(); //check if the bullet hit the boundary, remove the bullet from the list of the bullet if(tempBullet.detectBound()){ bullets.remove(i); continue; } //detect if the bullet hit the boss and cause the damage if yes if(tempBullet.hitObject(Main.boss) && Main.boss.alive){ Main.boss.decreaseHealth(attack); tempBullet.drawHit(); bullets.remove(i); if(Main.boss.health <= 0){ Main.boss.alive = false; Main.boss.deadTime = millis(); Main.score += 100; } } //detect if the bullet hit the enemy and cause the damage if yes for(int j = 0; j < Main.enemies.size(); j++){ Enemy tempEnemy = Main.enemies.get(j); if(tempBullet.hitObject(tempEnemy) && tempEnemy.alive){ tempBullet.drawHit(); tempEnemy.decreaseHealth(attack); // if enemy is totally hitted, wait one 1s, and then removed if(tempEnemy.health <= 0){ tempEnemy.alive = false; tempEnemy.deadTime = millis(); } bullets.remove(i); break; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }", "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }", "public void enemyShoot()\r\n\t{\r\n\t\tfor (Enemy enemies : enemy)\r\n\t\t{\r\n\t\t\tif (enemies.getHasFired())\r\n\t\t\t{\r\n\t\t\t\tBullet enemyPew = enemies.shoot();\r\n\t\t\t\tif (enemyPew != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.add(enemyPew);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }", "private void UpdateBullets()\n\t {\n\t for(int i = 0; i < BulletList.size(); i++)\n\t {\n\t Bullet bullet = BulletList.get(i);\n\t \n\t // Move the bullet.\n\t bullet.Update();\n\t \n\t // checks if the bullet has it left the screen\n\t if(bullet.HasLeftScreen()){\n\t BulletList.remove(i);\n\t \n\t continue;\n\t }\n\t \n\t // checks if the bullet hit the enemy\n\t Rectangle BulletRectangle = new Rectangle((int)bullet.xCoord, (int)bullet.yCoord, bullet.BulletImage.getWidth(), bullet.BulletImage.getHeight());\n\t // Go trough all enemies.\n\t for(int j = 0; j < EnemyList.size(); j++)\n\t {\n\t Enemy eh = EnemyList.get(j);\n\n\t \n\t Rectangle EnemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\n\t // Checks whether the the bullet has hit the enemy\n\t if(BulletRectangle.intersects(EnemyRectangel))\n\t {\n\t // Bullet hit the enemy so we reduce his health.\n\t eh.Health -= Bullet.DamagePower;\n\t \n\t // Bullet was also destroyed so we remove it.\n\t BulletList.remove(i);\n\t \n\t \n\t }\n\t }\n\t }\n\t }", "public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }", "public void shoot(ArrayList<Bullet> alienBullets)\r\n\t{\r\n\t\t//do nothing usually\r\n\t}", "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "void smallgunHandler() {\n for (Sprite smb: smBullets) {\n \n smb.display();\n if(usingCoil){\n smb.forward(120);\n }else{\n smb.forward(40);\n }\n\n }\n}", "void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirection(angle);\r\n\t\tbullets[slot].reset();\r\n\t\t// Reset the timer\r\n\t\tcount = RELOAD;\r\n\t}", "private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}", "private void multiBulletFire() {\n\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 20, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) - 10, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 50, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t}", "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}", "public void fireBullet(){\n\t\tBullet bullet = new Bullet(ship);\n\t\tbullets.add(bullet);\n\t\tsoundMan.playBulletSound();\n\t}", "private void killBullet() {\r\n this.dead = true;\r\n }", "public void defensive_act()\r\n\t{\r\n\t\tBullet closestBullet = IMAGINARY_BULLET;\r\n\t//\tBullet secondClosestBullet = IMAGINARY_BULLET;\r\n\t\t\r\n\t\tActor machines;\r\n\t\tEnumeration<Actor> opponent = ((MachineInfo)data.get(TankFrame.PLAYER_1)).getHashtable().elements();\r\n\t\twhile(opponent.hasMoreElements())\r\n\t\t{\r\n\t\t\tmachines = (Actor) opponent.nextElement();\r\n\t\t\tif(machines instanceof Bullet)\r\n\t\t\t{\r\n\t\t\t\tif(machines.getPoint().distance(getPoint()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t{\r\n\t\t\t\t\tclosestBullet = (Bullet)machines;\r\n\t\t\t\t\tLine2D aim = new Line2D.Double(getCenterX(), getCenterY(), closestBullet.getPosX(), closestBullet.getPosY() );\r\n\t\t\t\t\tSystem.out.println(aim.getP1().distance(aim.getP2()));\r\n\t\t\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t\t\taimAndShoot(aim);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t/*\tif(machines.getPoint().distance(getPoint()) > secondClosestBullet.getPoint().distance(getPoint()) \r\n\t\t\t\t\t&& machines.getPoint().distance(getPoint()) < closestBullet.getPoint().distance(getPoint()))\r\n\t\t\t\t\tsecondClosestBullet = (Bullet)machines;*/\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 * Find the line\r\n\t\t */\r\n\t\t/*if(!closestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), closestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(getCenterX(), getCenterY(), (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\t/*bulletPath = new Line2D(getRightPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\tbulletPath = new Line2D(getPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);*/\r\n\t\t\t\r\n\t\t//}\r\n\t/*\tif(!secondClosestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), secondClosestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t}*/\r\n\r\n\t}", "public void drawBullets(){\n if(!world.getPlayer().getWeapon().getBullets().isEmpty()) {\n for (Bullet b : world.getPlayer().getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y * ppuY,\n b.SIZE * ppuX, b.SIZE * ppuY);\n }\n }\n if(!world.getEnemies().isEmpty()) {\n for(Enemy e: world.getEnemies()){\n if(!e.getWeapon().getBullets().isEmpty()){\n for (Bullet b : e.getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }\n }\n if(!world.getBullets().isEmpty()) {\n for(Bullet b : world.getBullets()){\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }", "public void detectCollisionPerBullet() {\n//\t\tfor (Bullet bullet : bulletList) {\n\t\tfor (int i=0; i<bulletList.size(); i++) {\n\t\t\tBullet bullet = bulletList.get(i);\n\t\t\tif (bullet != null && !bullet.isDead()) {\n\t\t\t\tdetectCollision(bullet);\n\t\t\t}\n\t\t}\n\t}", "public void tick(){\r\n scoreKeep++;\r\n if(scoreKeep >= 500){\r\n scoreKeep = 0;\r\n hud.setLevel(hud.getLevel()+1);\r\n // continuous addition of enemies at each new level\r\n if(game.diff == 0) {\r\n \tif((hud.getLevel() >= 2 && hud.getLevel() <= 3)||(hud.getLevel() >= 7 && hud.getLevel() <= 9))\r\n \thandler.addObject(new BasicEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.BasicEnemy, handler));\r\n if(hud.getLevel() == 4 || hud.getLevel() == 6)\r\n handler.addObject(new FastEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.FastEnemy, handler));\r\n if(hud.getLevel() == 5)\r\n \thandler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n if(hud.getLevel() == 10){\r\n handler.clearEnemies();\r\n handler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n handler.addObject(new BossEnemy((Game.width/2)-48, -100, ID.BossEnemy, handler));\r\n }\r\n }else if(game.diff == 1) {\r\n \tif((hud.getLevel() >= 2 && hud.getLevel() <= 3)||(hud.getLevel() >= 7 && hud.getLevel() <= 9))\r\n \thandler.addObject(new HardEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.BasicEnemy, handler));\r\n if(hud.getLevel() == 4 || hud.getLevel() == 6)\r\n handler.addObject(new FastEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.FastEnemy, handler));\r\n if(hud.getLevel() == 5)\r\n \thandler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n if(hud.getLevel() == 10){\r\n handler.clearEnemies();\r\n handler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n handler.addObject(new BossEnemy((Game.width/2)-48, -100, ID.BossEnemy, handler));\r\n }\r\n }\r\n }\r\n }", "public void checkCollision(){\n\r\n for(int i = 0; i < enemies.size(); i++){\r\n \r\n // Player and Enemy collision\r\n \r\n if(collide(this.player, enemies.get(i)) && this.player.isVisible() && enemies.get(i).isVisible()){\r\n System.out.println(\"Collide\");\r\n this.player.setHealth(this.player.getHealth() - 100);\r\n }\r\n\r\n // Player and Enemy bullet collision\r\n \r\n for(int j =0; j < enemies.get(i).getBullets().size(); j++){\r\n\r\n if(collide(this.player, enemies.get(i).getBullets().get(j)) && this.player.isVisible() && enemies.get(i).getBullets().get(j).isVisible()){\r\n\r\n enemies.get(i).getBullets().get(j).setVisible(false);\r\n this.player.setHealth(this.player.getHealth() - enemies.get(i).getBullets().get(j).getDamage());\r\n\r\n }\r\n }\r\n\r\n }\r\n //time = DEFAULT_TIME_DELAY;\r\n// }\r\n\r\n\r\n\r\n for(int i = 0; i < player.getBullets().size(); i++){\r\n\r\n\r\n // Player bullet and enemy collision\r\n\r\n for(int j = 0; j < enemies.size(); j++) {\r\n if (collide(enemies.get(j), player.getBullets().get(i)) && enemies.get(j).isVisible() && player.getBullets().get(i).isVisible()) {\r\n\r\n if (enemies.get(j).getHealth() < 0) {\r\n enemies.get(j).setVisible(false);\r\n score.addScore(100);\r\n }\r\n\r\n enemies.get(j).setHealth(enemies.get(j).getHealth() - player.getBullets().get(i).getDamage());\r\n // enemies.get(j).setColor(Color.RED);\r\n player.getBullets().get(i).setVisible(false);\r\n\r\n\r\n }\r\n }\r\n\r\n\r\n // Boss collision & player bullet collision\r\n\r\n if(collide(player.getBullets().get(i), this.boss1) && player.getBullets().get(i).isVisible() && boss1.isVisible()){\r\n\r\n if(boss1.getHealth() < 0){\r\n boss1.setVisible(false);\r\n score.addScore(1000);\r\n state = STATE.WIN;\r\n }\r\n this.boss1.setHealth(this.boss1.getHealth() - player.getBullets().get(i).getDamage());\r\n // this.boss1.setHealth(0);\r\n player.getBullets().get(i).setVisible(false);\r\n\r\n }\r\n\r\n }\r\n\r\n // Bullet vs Bullet Collision\r\n\r\n for(int k = 0 ; k < player.getBullets().size(); k++){\r\n\r\n if(player.getBullets().get(k).isVisible()) {\r\n for (int i = 0; i < enemies.size(); i++) {\r\n\r\n if(enemies.get(i).isVisible()) {\r\n for (int j = 0; j < enemies.get(i).getBullets().size(); j++) {\r\n\r\n if (collide(player.getBullets().get(k), enemies.get(i).getBullets().get(j)) && enemies.get(i).getBullets().get(j ).isVisible()) {\r\n\r\n\r\n System.out.println(\"bullets colliding\");\r\n\r\n player.getBullets().get(k).setVisible(false);\r\n enemies.get(i).getBullets().get(j).setColor(Color.yellow);\r\n enemies.get(i).getBullets().get(j).deflect(this.player.getX() + this.player.getW()/2, this.player.getY() + this.player.getH()/2);\r\n\r\n player.getBullets().add(enemies.get(i).getBullets().get(j));\r\n\r\n enemies.get(i).getBullets().remove(enemies.get(i).getBullets().get(j)); //removes bullet\r\n\r\n\r\n k++;\r\n j--;\r\n //enemies.get(i).getBullets().get(j).setVisible(false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n for(int i = 0; i < boss1.getBullets().size(); i++) {\r\n\r\n\r\n if (collide(player.getBullets().get(k), boss1.getBullets().get(i)) && boss1.getBullets().get(i).isVisible()) {\r\n\r\n System.out.println(\"boss bullets colliding\");\r\n player.getBullets().get(k).setVisible(false);\r\n boss1.getBullets().get(i).setColor(Color.yellow);\r\n boss1.getBullets().get(i).deflect(this.player.getX() + this.player.getW()/2, this.player.getY() + this.player.getH()/2);\r\n player.getBullets().add(boss1.getBullets().get(i));\r\n boss1.getBullets().remove(boss1.getBullets().get(i));\r\n k++;\r\n i--;\r\n\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Boss bullet and player collision\r\n\r\n for(Bullet b : boss1.getBullets() ){\r\n\r\n\r\n if(collide(player, b) && player.isVisible() && b.isVisible()){\r\n b.setVisible(false);\r\n player.setHealth(player.getHealth() - b.getDamage());\r\n }\r\n }\r\n\r\n\r\n // Power up collision\r\n\r\n for(PowerUp p : powerUps){\r\n\r\n if(collide(player, p) && p.isVisible()){\r\n\r\n p.executeEffect(this.player);\r\n p.setVisible(false);\r\n }\r\n }\r\n\r\n\r\n\r\n // Deleting out of bound bullets\r\n for(int i = 0; i < player.getBullets().size(); i++){\r\n if(player.getBullets().get(i).getY() < 0 || player.getBullets().get(i).getY() > GameWorld.SCREEN_H ||\r\n player.getBullets().get(i).getX()< 0 || player.getBullets().get(i).getX() > GameWorld.SCREEN_W) {\r\n\r\n player.getBullets().remove(player.getBullets().get(i));\r\n }\r\n }\r\n\r\n }", "public void gettingAttacked(HitByBulletEvent e) {\r\n\t\tif (gotTarget) {\r\n\t\t\tfor (int i = 0; i < enemyTracker.getEnemyList().size(); i++) {\r\n\t\t\t\tif (enemyTracker.getEnemyList().get(i).getName().equals(e.getName()) && (!e.getName().equals(radarTarget.getName()))) {\r\n\t\t\t\t\t\tmrRobot.sendMessage(5, \"2\");\r\n\t\t\t\t\t\tradarTarget = enemyTracker.getEnemyList().get(getIndexForEnemy(e.getName()));\r\n\t\t\t\t\t\ttargetTracking.get(getIndexForName(mrRobot.getName())).updateTarget(radarTarget);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "private void fire(GameEngine gameEngine) {\n Bullet bullet1 = gameEngine.getBulletEnemy();\n if (bullet1 == null) {\n return;\n }\n bullet1.init(this, positionX + imageWidth/2, positionY, 0);\n gameEngine.addGameObject(bullet1);\n gameEngine.playSound(1);\n }", "public void update(){\n\n // advance player and entity loader\n player.advance();\n entityloader.advance();\n\n // if the player is shooting\n if (player.isShooting){\n player.nextBullet--;\n if (player.nextBullet < 0){\n audioloader.play(\"plshoot\"); // play audio\n for (int i = -1; i <= 1; ++i){\n playerBullets.add(new Projectile<RectangleHitbox>(player.getCenterX(), player.getCenterY(), 500, 0, 270 + 2.5 * i, 0, 0, false, 1.5, true, 0,\n player.bulletSprite.getRectangleHitbox(player.bulletSize), player.bulletSprite.img.getScaledInstance(player.bulletSize, player.bulletSize, 1), 0, 0, this));\n } \n player.nextBullet = (int)(FPS / player.bulletsPerSecond);\n }\n }\n\n // Player bullets\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n if (bullet.advance()){\n nextPlayerBullets.add(bullet);\n }\n }\n playerBullets.clear();\n for (Projectile<RectangleHitbox> bullet : nextPlayerBullets){\n playerBullets.add(bullet);\n }\n nextPlayerBullets.clear();\n\n // Circle Enemies\n for (Projectile<CircleHitbox> enemy : circleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (!enemy.isBullet){ // if enemy is not a bullet, check if it is being hit by player bullets\n boolean hit = false; // each enemy can only be hit once each frame\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n hit |= bullet.getHitbox().intersects(enemy.getHitbox());\n if (hit)\n break;\n }\n if (hit){\n enemy.damageTaken += enemy.originalLifetime * enemy.percentDamage;\n }\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextCircleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n circleEnemies.clear();\n for (Projectile<CircleHitbox> enemy : nextCircleEnemies){ // swap nextCircleEnemies with circleEnemies\n circleEnemies.add(enemy);\n }\n nextCircleEnemies.clear();\n\n // Rectangle Enemies\n for (Projectile<RectangleHitbox> enemy : rectangleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextRectangleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n rectangleEnemies.clear();\n for (Projectile<RectangleHitbox> enemy : nextRectangleEnemies){ // swap nextRectangleEnemies with rectangleEnemies\n rectangleEnemies.add(enemy);\n }\n nextRectangleEnemies.clear();\n\n }", "private void enemiesWillShoot(Graphics2D g2d, GameState state) {\n if (numOfRenderShoot == 75) {\n numOfRenderShoot = 0;\n for (int i = 0; i < state.getEnemyTanks().size(); i++) {\n if (state.getEnemyTanks().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTanks().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTanks().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTanks().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyMissiles().add(new EnemyMissile(this, state, 10\n , state.getEnemyTanks().get(i)));\n state.getEnemyMissiles().get(state.getEnemyMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyCars().size(); i++) {\n if (state.getEnemyCars().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyCars().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyCars().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyCars().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyBullets().add(new EnemyBullet(this, state, 20\n , state.getEnemyCars().get(i)));\n state.getEnemyBullets().get(state.getEnemyBullets().size() - 1).bulletDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyWallTurrets().size(); i++) {\n if (state.getEnemyWallTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyWallTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyWallTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyWallTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyWallTurretMissiles().add(new EnemyWallTurretMissile(this, state, 15\n , state.getEnemyWallTurrets().get(i)));\n state.getEnemyWallTurretMissiles().get(state.getEnemyWallTurretMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n\n for (int i = 0; i < state.getEnemyTurrets().size(); i++) {\n if (state.getEnemyTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyHomingMissiles().add(new EnemyHomingMissile(this, state, 15\n , state.getEnemyTurrets().get(i)));\n state.getEnemyHomingMissiles().get(state.getEnemyHomingMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n }\n for (EnemyMissile enemyMissile : state.getEnemyMissiles()) {\n enemyMissile.paint(g2d, state);\n }\n for (EnemyBullet enemyBullet : state.getEnemyBullets()) {\n enemyBullet.paint(g2d, state);\n }\n for (EnemyWallTurretMissile enemyWallTurretMissile : state.getEnemyWallTurretMissiles()) {\n enemyWallTurretMissile.paint(g2d, state);\n }\n for (EnemyHomingMissile enemyHomingMissile : state.getEnemyHomingMissiles()) {\n enemyHomingMissile.paint(g2d, state);\n }\n }", "public void fire() {\n \tAlienMissile.Slope slps[] = {AlienMissile.Slope.ShallowLeft, \n AlienMissile.Slope.Down,\n AlienMissile.Slope.ShallowRight};\n for (AlienMissile.Slope i : slps) {\n AlienMissile m = new AlienMissile(this, i);\n m.setBounce(true, health/5);\n list.add(m);\n }\n }", "public void damage(Bullet bullet)\n {\n\n\thp -= bullet.getDamage();\n\tcheckHP();\n }", "public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}", "public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Replace the next line with any behavior you would like\n\t\t\n\t}", "private void checkForDeaths() {\n Iterator<Entity> entityIter = this.entities.iterator();\n\n //geht alle teilnehmer durch\n while ( entityIter.hasNext() ) {\n Entity entity = entityIter.next();\n\n //und entfernt sie wenn sie tot sind aus der liste und der engine\n if ( this.combatMapper.get(entity).curHealth <= 0 ) {\n entityIter.remove();\n\n //alle actions der entity entfernen, können ja nichts machen wenn sie tot sind\n Iterator<IAction> actionIter = this.actions.iterator();\n\n while ( actionIter.hasNext() ) {\n if ( actionIter.next().getOwner().equals(entity) ) {\n actionIter.remove();\n }\n }\n\n this.combatExp += this.combatMapper.get(entity).level * 5; //TODO\n\n EventSystem.getInstance().commitEvent(new Event(EventSystem.EventType.KILL_EVENT, entity));\n\n this.combatSystem.getEngine().removeEntity(entity);\n }\n }\n }", "@Override\n public void attack(){\n int xBullet=0,yBullet=0;\n switch(direction){\n case 0:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()*3/4);\n break;\n case 1:\n xBullet=(int)(x+Sprite.python_left.getWidth()*3/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 2:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 3:\n xBullet=(int)(x+Sprite.python_left.getWidth()/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n }\n PythonBullet pythonBullet=new PythonBullet(xBullet,yBullet,board,Player.PLAYER_SPEED*1.5);\n pythonBullet.setDirection(direction);\n board.addBullets(pythonBullet);\n\n }", "private void bulletCollisionWithObject() {\r\n\t\tif(bullet != null) {\r\n\t\t\tGObject collider = getElementAt(bullet.getX() -1 , bullet.getY() + 1);\r\n\t\t\tif (dragon1 != null && collider == dragon1) {\r\n\t\t\t\thit(dragon1);\r\n\t\t\t}\r\n\t\t\tif(dragon2 != null && collider == dragon2) {\r\n\t\t\t\thit(dragon2);\r\n\t\t\t}\r\n\t\t\tif(mehran != null && collider == mehran && bullet.getY() > mehran.getY() + mehran.getHeight() / 2.0) {\r\n\t\t\t\thit(mehran);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }", "@Override\n protected void doCheckEffect ()\n {\n List<LivingEntity> entities = getLivingEntities(1.5);\n if (entities.size() > 0)\n {\n for (LivingEntity entity : entities)\n {\n if (entity.getUniqueId() == player.getUniqueId())\n continue;\n\n entity.damage(usesModifier * 2, player);\n\n kill();\n return;\n }\n }\n\n // if the spell has hit a solid block, the projectile is stopped and wont go further so kill the spell\n if (hasHitTarget())\n kill();\n }", "public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Paramos tudo o que estamos fazendo.\n\t\tstop();\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\n\t\t// Giramos a arma na direção do disparo\n\t\tdouble turnGunAmt = Utils.normalRelativeAngleDegrees(e.getBearing() + getHeading() - getGunHeading());\n\t\tturnGunRight(turnGunAmt);\n\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\t\tback(400); // Recuamos\n\t}", "public void draw() {\n if (you.health() > 0 | lives >= 0) {\n if (aliens.isEmpty()) {\n win();\n }\n if (you.health() <= 0 & lives >= 0) {\n die();\n }\n \n you.act();\n \n if (fire & you.getWeapon() == Weapon.WEAPON_GOD) {\n for (Dot d : you.fire()) {\n this.moreBullets(d);\n }\n }\n for (Dot d : lazers){d.update(); d.draw(page);}\n for (Dot d : bullets) {d.update(); d.draw(page);}\n for (Alien loop : aliens) {\n loop.act();\n if (Math.random() > .993) {\n for (Dot d : loop.fire())\n lazers.add(d);\n }\n loop.draw(page);\n }\n \n if (collisionCheck() | fl) {\n flash();\n fl = !fl;\n }\n \n int index1 = 0, index2 = 0, size1 = bullets.size(), size2 = aliens.size();\n for (Alien al : aliens) {\n index2 = 0;\n while (index2 < size1) {\n if (al.collide(bullets.get(index2))) {\n bullets.remove(index2);\n size1--;\n score += 10;\n }\n index2++;\n }\n }\n\n index1 = 0; size1 = aliens.size();\n while (index1 < size1) {\n if (aliens.get(index1).health() <= 0) {\n aliens.remove(index1);\n index1--;\n size1--;\n score += 25;\n }\n index1++;\n }\n \n for (Dot d : lazers) {\n if (d.getX() < 0 | d.getX() > 512 | d.getY() < 0 | d.getY() > 496) {\n d.deactivate();\n }\n }\n index1 = 0; size1 = lazers.size();\n while (index1 < size1) {\n if (!lazers.get(index1).isActive()) {\n lazers.remove(index1);\n size1--;\n index1--;\n }\n index1++;\n }\n \n for (Dot d : bullets) {\n if (d.getX() < 0 | d.getX() > 512 | d.getY() < 0 | d.getY() > 512) {\n d.deactivate();\n }\n }\n index1 = 0; size1 = bullets.size();\n while (index1 < size1) {\n if (!bullets.get(index1).isActive()) {\n bullets.remove(index1);\n size1--;\n index1--;\n }\n index1++;\n }\n \n for (int i = 0; i < lives; i++) {\n page.drawImage(you.getImage(), i*20, 496, 16, 16, null);\n }\n page.setColor(Color.white);\n page.drawString(\"\" + you.health(), 420, 509);\n page.drawString(\"\" + score, 450, 509);\n you.draw(page);\n }\n else {\n lose();\n }\n }", "public void tick()\n{\n y+=speed;\n\n for(int i=0; i<game.ea.size(); i++)\n {\n EntityA tempEnt= game.ea.get(i);\n if(Physics.Coliision(this,tempEnt))\n {\n c.removeEntity(tempEnt); //zeby po trafieniu znikal pocisk\n c.removeEntity(this);\n game.setEnemy_killed(game.getEnemy_killed()+1);\n\n }\n }\n\n/*\n* If Enemy is out of bounds player get - points\n* and loses some stamina.\n*\n* Enemies are removed from list after disapears\n */\n\n if(y>(App.getHEIGHT()-20)*2)\n {\n App.addHealth(-10);\n App.addPOINTS(-3);\n c.removeEntity(this);\n }\n\n anim.runAnimation();\n\n /*\n * If App is not in game state it doesn't\n * need to have any enemies\n */\n\n if(App.State != App.STATE.GAME)\n {\n delEnemies();\n\n }\n}", "void garbageCollector() {\n Enemy ETR = null;\n Sprite BTR = null;\n Medkit MTR = null;\n for (Enemy e: enemies) {\n if (e.eTank.getX() < -100) {\n ETR = e;\n }\n }\n for (Sprite c: smBullets) {\n if (c.getX() > width + 100) {\n BTR = c;\n }\n if (c.getY() > height + 100) {\n BTR = c;\n }\n if (c.getX() < -100) {\n BTR = c;\n }\n if (c.getY() < -100) {\n BTR = c;\n }\n }\n \n for (Medkit med : health) {\n if (med.timer <= 0) {\n MTR = med;\n }\n }\n //gets rid of bullets that went off-screen\n if (BTR != null) {\n smBullets.remove(BTR);\n println(\"Deleted bullet\");\n }\n if (ETR != null) {\n enemies.remove(ETR);\n }\n //Medkits to despawn\n if (MTR != null) {\n health.remove(MTR);\n }\n}", "public void gotHit(Bullet bullet) {\n\t\tif (bullet.getOwner() != this) {\n\t\t\tDefaultModeScoring.addHitScore(bullet.getOwner());\n\t\t\tAudioManager.startAudio(bullet.getSoundName());\n\t\t\tif (!isDead())\n\t\t\t\tAudioManager.startAudio(getSoundName());\n\t\t\tsetHp(getHp() - bullet.getDamage());\n\t\t\tif (bullet.getSpeed().x() > 0)\n\t\t\t\tgetPush().setX(getPush().x() + bullet.getPush());\n\t\t\telse\n\t\t\t\tgetPush().setX(getPush().x() - bullet.getPush());\n\t\t\tif (getHp() <= 0 && !isDead())\n\t\t\t\tdie();\n\t\t}\n\t}", "public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }", "public void emptyBullets() {\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n bossBullets.remove(i);\n }\n }", "void tick() {\n\t\tif (playing) {\n\t\t\tdeadcannon = null;\n\t\t\t// sets general output message\n\t\t\tstatus.setText(\"Engaging alien wave \" + Integer.toString(level)+ \" \");\n\n\t\t\t// controls the first shot fired by the aliens\n\t\t\tif (shot1 == null) {\n\t\t\t\tint count1 = 0;\n\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\tif (alien3[i]!=null) {if (!alien3[i].Destroyed) count1++ ;}\n\t\t\t\t}\n\t\t\t\tif (count1 > 1) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\tshootbottom().pos_x + 18, shootbottom().pos_y); \n\t\t\t\telse {\n\t\t\t\t\tint count2 = 0;\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null) {if(!alien2[i].Destroyed)count2++;}\n\t\t\t\t\t}\n\t\t\t\t\tif (count2 > 1) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\tshootmiddle().pos_x + 18, shootmiddle().pos_y);\n\t\t\t\t\telse {\n\t\t\t\t\t\tint count3 = 0;\n\t\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\t\tif (alien1[i]!=null) {if(!alien1[i].Destroyed)count3++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count3 != 0) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\t\tshoottop().pos_x + 18, shoottop().pos_y);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// controls the second shot fired by the aliens\n\t\t\tif (shot2 == null) {\n\t\t\t\tint count4 = 0;\n\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\tif (alien3[i]!=null) {if (!alien3[i].Destroyed) count4++ ;}\n\t\t\t\t}\n\t\t\t\tif (count4 != 0) {shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\tshootbottom().pos_x + 18, shootbottom().pos_y); \n\t\t\t\tStdAudio.play(\"zap.wav\"); }\n\t\t\t\telse {\n\t\t\t\t\tint count5 = 0;\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null) {if(!alien2[i].Destroyed)count5++;}\n\t\t\t\t\t}\n\t\t\t\t\tif (count5 != 0) { shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\tshootmiddle().pos_x + 18, shootmiddle().pos_y);\n\t\t\t\t\tStdAudio.play(\"zap.wav\"); }\n\t\t\t\t\telse {\n\t\t\t\t\t\tint count6 = 0;\n\t\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\t\tif (alien1[i]!=null) {if(!alien1[i].Destroyed)count6++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count6 != 0) {shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\t\tshoottop().pos_x + 18, shoottop().pos_y);\n\t\t\t\t\t\tStdAudio.play(\"zap.wav\");}\n\t\t\t\t\t\telse {level = level + 1; \n\t\t\t\t\t\tnewlevel();\n\t\t\t\t\t\tthescore=thescore + 100;\n\t\t\t\t\t\tStdAudio.play(\"up.wav\");}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move bullet and delete if it reaches the roof\n\t\t\tif (bullet!= null) {\n\t\t\t\tbullet.move();\n\t\t\t\tif (bullet.pos_y == 0) bullet = null;\n\t\t\t}\n\n\t\t\t// controls movement of first shot\n\t\t\tif (shot1 != null) {\n\t\t\t\tshot1.move();\n\t\t\t\tif (shot1.pos_y > 435) shot1 = null;\n\t\t\t}\n\t\t\t// controls movement of second shot\n\t\t\tif (shot2 != null) {\n\t\t\t\tshot2.move();\n\t\t\t\tif (shot2.pos_y > 435) shot2 = null;\n\t\t\t}\n\n\t\t\t// For Top Row\n\n\t\t\t// change alien direction if a wall is reached\n\t\t\tif (alien1[0] != null && alien1[9] != null){\n\t\t\t\tif (alien1[0].pos_x == 0 || alien1[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\tif (alien1[i]!=null){alien1[i].v_x = -alien1[i].v_x;\n\t\t\t\t\t\talien1[i].pos_y=alien1[i].pos_y+15;\n\t\t\t\t\t\tif (alien1[i].pos_y >= 385 && !alien1[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false;\n\t\t\t\t\t\t\tstatus.setText(\"You have been overrun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\t \n\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\tif (alien1[i] != null) \n\t\t\t\t\talien1[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\tif (alien1[i] != null && bullet != null) {\n\t\t\t\t\tif (alien1[i].intersects(bullet) && !alien1[i].Destroyed) { \n\t\t\t\t\t\talien1[i].Destroyed=true;\n\t\t\t\t\t\tthescore += 20;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10 ) {\n\t\t\t\t\t\t\talien1[i].img_file = \"black.jpg\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For Second Row\n\n\t\t\t// change alien direction if a wall is reached\n\t\t\tif (alien2[0] != null && alien2[9] != null){\n\t\t\t\tif (alien2[0].pos_x == 0 || alien2[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null){alien2[i].v_x = -alien2[i].v_x;\n\t\t\t\t\t\talien2[i].pos_y=alien2[i].pos_y+15;\n\t\t\t\t\t\tif (alien2[i].pos_y >= 385 && !alien2[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false; \n\t\t\t\t\t\t\tstatus.setText(\"You have been ovverun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\tif (alien2[i] != null) \n\t\t\t\t\talien2[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\tif (alien2[i] != null && bullet != null) {\n\t\t\t\t\tif (alien2[i].intersects(bullet) && !alien2[i].Destroyed) { \n\t\t\t\t\t\talien2[i].Destroyed=true;\n\t\t\t\t\t\tthescore +=15;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10 ) {\n\t\t\t\t\t\t\talien2[i].img_file = \"black.jpg\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//For third row\n\n\t\t\t//change alien direction if a wall is reached\n\t\t\tif (alien3[0] != null && alien3[9] != null){\n\t\t\t\tif (alien3[0].pos_x == 0 || alien3[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\t\tif (alien3[i]!=null){alien3[i].v_x = -alien3[i].v_x;\n\t\t\t\t\t\talien3[i].pos_y=alien3[i].pos_y+15;\n\t\t\t\t\t\tif (alien3[i].pos_y >= 385 && !alien3[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false;\n\t\t\t\t\t\t\tstatus.setText(\"You have been ovverrun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\n\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\tif (alien3[i] != null) \n\t\t\t\t\talien3[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\tif (alien3[i] != null && bullet != null) {\n\t\t\t\t\tif (alien3[i].intersects(bullet) && !alien3[i].Destroyed) { \n\t\t\t\t\t\talien3[i].Destroyed=true;\n\t\t\t\t\t\tthescore += 10;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10) {\n\t\t\t\t\t\t\talien3[i].img_file = \"black.jpg\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// destroy cannon if shot\n\t\t\tif (shot1 != null) {\n\t\t\t\tif (shot1.intersects(cannon)){ dead = true; \n\t\t\t\tthelives = thelives - 1;\n\t\t\t\tStdAudio.play(\"bigboom.wav\");\n\t\t\t\tcannon.img_file = \"dead.jpg\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (shot2 != null) {\n\t\t\t\tif (shot2.intersects(cannon)){ dead = true; \n\t\t\t\tthelives = thelives - 1;\n\t\t\t\tStdAudio.play(\"bigboom.wav\");}\n\t\t\t\tcannon.img_file = \"dead.jpg\";\n\t\t\t}\n\n\t\t\t// ends the game when all lives are lost\n\t\t\tif (thelives <= 0) {\n\t\t\t\tplaying = false; \n\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\tstatus.setText(\"You have been killed and Earth has been \" +\n\t\t\t\t\t\t\"destroyed. You are a terrible defender \" +\n\t\t\t\t\t\t\"of humanity. \");\n\t\t\t}\n\n\t\t\t//makes sure lives cannot become negative\n\t\t\tif (thelives <= 0) {\n\t\t\t\tthelives = 0;\n\t\t\t\tdeadcannon = new DeadCannon(COURT_WIDTH, COURT_HEIGHT);\n\t\t\t\tdeadcannon.pos_x = cannon.pos_x;\n\t\t\t\tStdAudio.play(\"loss.wav\");\n\t\t\t}\n\n\t\t\t//set the text labels at the bottom of the screen\n\t\t\tmyscore.setText(\"Score = \"+ Integer.toString(thescore)+ \" \");\n\t\t\tmylives.setText(\"Lives = \"+ Integer.toString(thelives));\n\t\t\trepaint();\n\t\t\n\t\t\t//move cannon\n\t\t\tcannon.move();\n\t\t} \n\t}", "public void takeDamage()\n {\n if(getWorld()!= null)\n {\n if(this.isTouching(Enemies.class))\n {\n Life = Life - Enemies.damage;\n if(Life <=0)\n {\n getWorld().removeObject(this);\n Store.wealth += Game.credit;\n }\n }\n }\n }", "void dropHandler() {\n if (tickSpeed < 0) {\n if((int)random(1,6) == 1){ //every 6 medkits the handler drops a minigun\n Sprite mg = new Sprite(minigun);\n mg.moveToPoint(random(0,2048), random(0, 2048)); //moves drop to random point\n minigunDrop.add(mg);\n tickSpeed = (int)random(100,500);\n }else if((int)random(1,4) == 1){ //every 4 medkits the handler drops a coilgun\n Sprite cg = new Sprite(coilgun);\n cg.moveToPoint(random(0,2048), random(0,2048)); //moves drop to random point\n coilgunDrop.add(cg);\n tickSpeed = (int)random(100,500); //changes \n }\n else {\n \n \n Medkit hp = new Medkit();\n hp.med.moveToPoint(random(0, 2048), random(0, 2048));\n\n health.add(hp);\n\n tickSpeed = (int)random(100,500);\n }\n }\n tickSpeed--;\n for (Medkit hp: health) {\n hp.med.display();\n hp.timer--;\n\n }\n for (Sprite mg: minigunDrop){\n mg.display();\n }\n for (Sprite cg: coilgunDrop){\n cg.display();\n }\n // e.forward(5);\n}", "void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);", "public AvoidBullets(AIPlayer player) {\r\n\t\tsuper(player);\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\tAlly.update();\r\n\t\tEnemy.update();\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tif(GroundList.get(i).kill) {\r\n\t\t\t\tGroundList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BarelList.size(); i++) {\r\n\t\t\tif(BarelList.get(i).kill) {\r\n\t\t\t\tBarelList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tif(WoodList.get(i).kill) {\r\n\t\t\t\tWoodList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tif(FireBallList.get(i).kill) {\r\n\t\t\t\tFireBallList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tif(BulletList.get(i).kill) {\r\n\t\t\t\tBulletList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tGroundList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0 ; i < BarelList.size(); i++) {\r\n\t\t\tBarelList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tBulletList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tFireBallList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tWoodList.get(i).update();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(GamePanel.updateTimes%60 == 0) {\r\n\t\t\tEnemy.PushEntity(2, new Vector2f(width*1/2, height/4),enemy);\r\n\t\t}\r\n\t\tfor(int i = 0; i < AllyDeadList.size(); i++) {\r\n\t\t\tAlly.entityList.remove(AllyDeadList.get(i)-i);\r\n\t\t}\r\n\t\tfor(int i = 0; i < EnemyDeadList.size(); i++) {\r\n\t\t\tEnemy.entityList.remove(EnemyDeadList.get(i)-i);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tAllyDeadList.clear();\r\n\t\tEnemyDeadList.clear();\r\n\t\tfor(int i = 0; i < Ally.entityList.size(); i++) {\r\n\t\t\tif(Ally.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tAllyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < Enemy.entityList.size(); i++) {\r\n\t\t\tif(Enemy.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tEnemyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void avatarShoot()\r\n\t{\r\n\t\tBullet avatarPew = avatar.shoot();\r\n\t\tif (avatarPew!= null)\r\n\t\t{\r\n\t\t\tbullets.add(avatarPew);\r\n\t\t}\r\n\t}", "public void draw() {\r\n\r\n if (this.z == 2) {\r\n //--- Shooting//---\r\n for (Enemy e: this.td.getEnemies()) {\r\n if (e.getX() < this.x + this.size / 2\r\n && e.getX() + e.getSize() > this.x - this.size / 2) {\r\n if (e.getY() < this.y + this.size / 2\r\n && e.getY() + e.getSize() > this.y - this.size / 2) {\r\n if (!this.firing) {\r\n this.firing = true;\r\n this.target = e;\r\n }\r\n } else {\r\n this.firing = false;\r\n }\r\n }\r\n this.firing();\r\n }\r\n }\r\n this.update();\r\n\r\n }", "void updateEnemies() {\n getEnemies().forEach(e -> {\n if (!e.isAlive()) {\n e.die();\n SoundPlayer.play(SoundPlayer.enemyDestroyed);\n }\n });\n objectsInMap.removeIf(o -> o instanceof Enemy && !(((Enemy) o).isAlive()));//Removing Dead Enemies\n getEnemies().forEach(e -> e.setTarget(objectsInMap.stream().filter(p -> p.identifier.contains(\"PlayerTank0.\") &&\n p.isBlocking && ((Tank) p).isVisible()).collect(Collectors.toList())));//Giving Possible target to enemies to decide\n }", "public void update(float delta) {\n\t\tfor(DefenseTower tower : world.getDefenseTowers()) {\n\t\t for(Enemy enemy : world.getEnemies()) {\n\t\t\t if(tower.isPowered() == true && tower.inRange(enemy)) {\n\t\t\t\t\ttower.fireBullets(enemy, delta);\n\t\t\t\t\t//enemy.takeHit(tower.POWER*delta);\n\t\t\t\t\tif(!enemy.isAlive()) {\n\t\t\t\t\t world.getEnemies().removeValue(enemy, false);\n\t\t\t\t\t}\n\t\t\t } \n\t\t\t}\n\t\t}\n\t\n\t\t// Towncentre actions goes here. It shoots enemies here.\n\t\tTownCentre tCentre = world.getTownCentre();\n\t for(Enemy enemy : world.getEnemies()) {\n\t\t if(tCentre.inRange(enemy)) {\n\t\t\t\ttCentre.fireBullets(enemy, delta);\n\t\t\t\t//enemy.takeHit(tCentre.POWER*delta);\n\t\t\t\tif(!enemy.isAlive()) {\n\t\t\t\t world.getEnemies().removeValue(enemy, false);\n\t\t\t\t}\n\t\t } \n\t\t}\n\t \n\t // Soldiers attack enemies here.\n\t for(Soldier s: InstanceManager.getInstance().getSoldiers()) {\n\t \t//s.attackEveryEnemy(delta, InstanceManager.getInstance().getDefenseTowers());\n\t }\n\t\n\t /*for(Enemy enemy : world.getEnemies()) {\n\t\t\tfor(Tower tower : world.getTowers()) {\n\t\t\t if(enemy.inRange(tower)) {\n\t\t\t\t tower.takeHit(enemy.STRENGTH*delta);\n\t\t\t\t //System.out.println(\"tower \" + tower.UID + \"strength is \" + tower.STRENGTH);\n\t\t\t\t if(!tower.isAlive) {\n\t\t\t\t\t \tif(world.getTowers().indexOf(tower, false) !=-1)\n\t\t\t\t\t \t\tactiveTower=-1;\n\t\t\t\t\t world.getTowers().removeValue(tower, false);\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t\t// This makes townCentre take the hit.\n\t\t\tif(enemy.inRange(tCentre) && tCentre.isAlive) {\n\t\t\t\ttCentre.takeHit(enemy.STRENGTH*delta);\n\t\t\t\t //System.out.println(\"TownCenter \" + tCentre.UID + \"strength is \" + tCentre.STRENGTH);\n\t\t\t}\n\t }*/\n\t\t\n\t // Steams attackers attack towers and links here\n\t sAttackers.AttackTowersAndLinks(delta);\n\t\t\n\t\tfor(Tower tower : world.getTowers()) {\n\t\t tower.update(delta);\n\t\t}\n\t\t\n\t\tfor(Enemy enemy : world.getEnemies()) {\n\t\t enemy.update(delta);\n\t\t if(enemy.getPosition().x > 21 && enemy.getPosition().y > 14)\n\t\t \tworld.getEnemies().removeValue(enemy, false);\n\t\t}\n\t\t\n\t\tfor(Person p: InstanceManager.getInstance().getPeople()) {\n\t\t\tp.update(delta);\n\t\t}\n\t\t\n\t\tfor(Soldier s : InstanceManager.getInstance().getSoldiers()) {\n\t\t\ts.update(delta);\n\t\t}\n\t\t\n\t\t// A lot happens here.\n\t\tInstanceManager.getInstance().update(delta);\n\t\t\n\t\tfor(DefenseTower tower : world.getDefenseTowers()) {\n\t\t\ttower.update(delta);\n\t\t}\n\t\t// If game slows down you can limit updation timing here.\n\t\ttCentre.update(delta);\n\t\tgManager.update(delta);\n\t\tworld.update(delta);\n\t\tsController.update();\n\t\t\n }", "public void shoot()\n {\n\n if(reload<=0)//if the tower has reloaded\n {\n int randomizer=Greenfoot.getRandomNumber(20)-10; \n MinigunBullet bullet = new MinigunBullet(this.getRotation()+randomizer, damage,this);\n getWorld().addObject(bullet, getX(), getY());\n bullet.move(30);\n reload=3;\n }\n else//reload\n {\n reload--;\n }\n\n }", "void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }", "private void clearBullet()\n {\n if(playerBullets.size() > 0)\n {\n for(int i = 0; i < playerBullets.size(); ++i)\n {\n int x = playerBullets.get(i).getRectangle().centerX(), y = playerBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n playerBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n if(enemyBullets.size() > 0)\n {\n for(int i = 0; i < enemyBullets.size(); ++i)\n {\n int x = enemyBullets.get(i).getRectangle().centerX(), y = enemyBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n enemyBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n }", "private void intersectBulletWithEnemy(Entity bullet, Entity enemy){\n\n //TODO implement health/damage system for enemies\n room.removeEntity(enemy);\n room.getEntityManager().removeEntity(enemy);\n\n //delete the bullet\n room.getEntityManager().removeEntity(bullet);\n ((WeaponComponent) player.getComponent(ComponentType.WEAPON)).getBullets().removeEntity(bullet);\n\n }", "@Override\n public void fireBullet(ArrayList<ScreenObject> level) {\n level.add(new ShipBullet(position.x, position.y, 8, 8, direction));\n }", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t// Bullet //\r\n\t\t////////////\r\n\t\tArrayList msDOWN = GameCraft.getBulletDOWN();\r\n\t\tfor (int i = 0; i < msDOWN.size(); i++) {\r\n\t\t\tBulletDOWN m = (BulletDOWN) msDOWN.get(i);\r\n\t\t\tif (m.isVisible()) \r\n\t\t\t\tm.moveDOWN();\r\n\t\t\telse msDOWN.remove(i);\r\n\t\t}\r\n\r\n\t\tArrayList msUP = GameCraft.getBulletUP();\r\n\t\tfor (int i = 0; i < msUP.size(); i++) {\r\n\t\t\tBulletUP m = (BulletUP) msUP.get(i);\r\n\t\t\tif (m.isVisible()) \r\n\t\t\t\tm.moveUP();\r\n\t\t\telse msUP.remove(i);\r\n\t\t}\r\n\r\n\t\tArrayList msLEFT = GameCraft.getBulletLEFT();\r\n\t\tfor (int i = 0; i < msLEFT.size(); i++) {\r\n\t\t\tBulletLEFT m = (BulletLEFT) msLEFT.get(i);\r\n\t\t\tif (m.isVisible()) \r\n\t\t\t\tm.moveLEFT();\r\n\t\t\telse msLEFT.remove(i);\r\n\t\t}\r\n\r\n\t\tArrayList msRIGHT = GameCraft.getBulletRIGHT();\r\n\t\tfor (int i = 0; i < msRIGHT.size(); i++) {\r\n\t\t\tBulletRIGHT m = (BulletRIGHT) msRIGHT.get(i);\r\n\t\t\tif (m.isVisible()) \r\n\t\t\t\tm.moveRIGHT();\r\n\t\t\telse msRIGHT.remove(i);\r\n\t\t}\r\n\t\t\r\n\t\tArrayList msEnemys = GameCraft.getEnemys();\r\n\t\tif(moveamount >= 150){\r\n\t\t\tfor (int i = 0; i < msEnemys.size(); i++) {\r\n\t\t\t\tEnemys m = (Enemys) msEnemys.get(i);\r\n\t\t\t\tif (m.isVisible()){\r\n\t\t\t\t\tm.moveMe();\r\n\t\t\t\t}else{ \r\n\t\t\t\t\tmsEnemys.remove(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmoveamount = 0;\r\n\t\t}\r\n\t\tmoveamount++;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(int a = 0; a < msDOWN.size(); a++){\r\n\t\t\tfor(int b = 0; b < msEnemys.size(); b++){\r\n\t\t\t\tBulletDOWN bdown = (BulletDOWN) msDOWN.get(a);\r\n\t\t\t\tEnemys enemy = (Enemys) msEnemys.get(b);\r\n\t\t\t\tint xbul = bdown.getX();\r\n\t\t\t\tint ybul = bdown.getY();\r\n\t\t\t\tint xenemy = enemy.getX();\r\n\t\t\t\tint yenemy = enemy.getY();\r\n\t\t\t\t\r\n\t\t\t\tif((xbul - xenemy < 20 && xbul - xenemy > -20) && ( ybul - yenemy < 20 && xbul - yenemy > -20)){\r\n\t\t\t\t\tenemy.visible = false;\r\n\t\t\t\t\tscoreamount++;\r\n\t\t\t\t\t//GameCraft.SpawnEnemys();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int a = 0; a < msRIGHT.size(); a++){\r\n\t\t\tfor(int b = 0; b < msEnemys.size(); b++){\r\n\t\t\t\tBulletRIGHT bright = (BulletRIGHT) msRIGHT.get(a);\r\n\t\t\t\tEnemys enemy = (Enemys) msEnemys.get(b);\r\n\t\t\t\tint xbul = bright.getX();\r\n\t\t\t\tint ybul = bright.getY();\r\n\t\t\t\tint xenemy = enemy.getX();\r\n\t\t\t\tint yenemy = enemy.getY();\r\n\t\t\t\t\r\n\t\t\t\tif((xbul - xenemy < 20 && xbul - xenemy > -20) && ( ybul - yenemy < 20 && xbul - yenemy > -20)){\r\n\t\t\t\t\tenemy.visible = false;\r\n\t\t\t\t\tscoreamount++;\r\n\t\t\t\t\t//GameCraft.SpawnEnemys();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int a = 0; a < msLEFT.size(); a++){\r\n\t\t\tfor(int b = 0; b < msEnemys.size(); b++){\r\n\t\t\t\tBulletLEFT bleft = (BulletLEFT) msLEFT.get(a);\r\n\t\t\t\tEnemys enemy = (Enemys) msEnemys.get(b);\r\n\t\t\t\tint xbul = bleft.getX();\r\n\t\t\t\tint ybul = bleft.getY();\r\n\t\t\t\tint xenemy = enemy.getX();\r\n\t\t\t\tint yenemy = enemy.getY();\r\n\t\t\t\t\r\n\t\t\t\tif((xbul - xenemy < 20 && xbul - xenemy > -20) && ( ybul - yenemy < 20 && xbul - yenemy > -20)){\r\n\t\t\t\t\tenemy.visible = false;\r\n\t\t\t\t\tscoreamount++;\r\n\t\t\t\t\t//GameCraft.SpawnEnemys();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor(int a = 0; a < msUP.size(); a++){\r\n\t\t\tfor(int b = 0; b < msEnemys.size(); b++){\r\n\t\t\t\tBulletUP bup = (BulletUP) msUP.get(a);\r\n\t\t\t\tEnemys enemy = (Enemys) msEnemys.get(b);\r\n\t\t\t\tint xbul = bup.getX();\r\n\t\t\t\tint ybul = bup.getY();\r\n\t\t\t\tint xenemy = enemy.getX();\r\n\t\t\t\tint yenemy = enemy.getY();\r\n\t\t\t\t\r\n\t\t\t\tif((xbul - xenemy < 20 && xbul - xenemy > -20) && ( ybul - yenemy < 20 && xbul - yenemy > -20)){\r\n\t\t\t\t\tenemy.visible = false;\r\n\t\t\t\t\tscoreamount++;\r\n\t\t\t\t\t//GameCraft.SpawnEnemys();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tEnemy 500 500\r\n\t\tBullet 510 510\r\n\t\t510 < 500 && 480 < 500 || 500 > 510 && 500 > 480\r\n\t\t500 > 320 && 500 > 380\r\n\t\t\r\n\t\t*/\r\n\t\t\r\n\t\t////////////\r\n\t\t// Bullet //\r\n\t\t////////////\r\n\t\tGameCraft.move();\r\n\t\trepaint(); \r\n\t}", "public void placeAlienBullet() {\r\n\t\tif (alien != null) {\r\n\t\t\t// If the alien is large fires a bullet in a random direction\r\n\t\t\tif (alien.getSize() == 1 && ship != null) {\r\n\r\n\t\t\t\t// Create the alien bullet\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\r\n\t\t\t\t// give the alien bullet a random direction and the bullet speed velocity,\r\n\t\t\t\t// then add as participant\r\n\t\t\t\tdouble r = (2 * Math.PI) * RANDOM.nextDouble();\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, r);\r\n\t\t\t\taddParticipant(ab);\r\n\r\n\t\t\t\t// Sets the alien bullet to expire when it reaches the bullet duration time\r\n\t\t\t\t// limit\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\r\n\t\t\t// If the alien is small fires a bullet aimed directly at the ship\r\n\t\t\tif (alien.getSize() == 0 && ship != null) {\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\t\t\t\tab.setSpeed(BULLET_SPEED);\r\n\r\n\t\t\t\t// Aims the alien bullet directly at the ship\r\n\t\t\t\tdouble A = ship.getY() - alien.getY();\r\n\t\t\t\tdouble B = ship.getX() - alien.getX();\r\n\t\t\t\tdouble angle = Math.atan2(A, B);\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, angle);\r\n\r\n\t\t\t\t// Add the alien bullet as a participant and then set it to expire when it\r\n\t\t\t\t// reaches the bullet duration time limit\r\n\t\t\t\taddParticipant(ab);\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n public void update(float dt) {\n //bulletUpdate(dt,b2body);\n stateTime += dt;\n bulletUpdate(b2body,bulletSprite1);\n bulletUpdate(b2body2,bulletSprite2);\n bulletUpdate(b2body3,bulletSprite3);\n\n\n\n }", "public void fire() {\n\n\t\t// A player cannot continually fire, there is a delay between each bullet.\n\t\tif (isAbleToFire) {\n\n\t\t\taudio.playMusic(\"Audio/Fire.wav\");\n\n\t\t\tif (multiBulletIsActive) {\n\n\t\t\t\tmultiBulletFire();\n\n\t\t\t} else if (speedBulletIsActive) {\n\n\t\t\t\tspeedBulletFire();\n\n\t\t\t} else if (quickFireBulletIsActive) {\n\n\t\t\t\tquickFireBulletFire();\n\n\t\t\t} else {\n\n\t\t\t\t// Single fire.\n\t\t\t\t// Adjust bullet position to be fired from the center of the player.\n\t\t\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition,\n\t\t\t\t\t\tbulletWidth, bulletHeight, \"Red\"));\n\t\t\t}\n\n\t\t\t// Stop the player from being able to fire for 'ticksBetweemFire' amount.\n\t\t\tticksToNextFire = currentTickCount + ticksBetweenFire;\n\t\t}\n\t}", "@Override\n public void update() {\n for (Integer i : arrAttack) {\n //System.out.println(scene.entityManager.getEntityByID(i).getName());\n\n //if the weapon has not a -1\n if (scene.entityManager.getEntityComponentInstance(i, Tool.class).currentActive != - 1) {\n\n ArrayList<AttackCollider> arrColliders = scene.entityManager.getEntityComponentInstance(i, attackComponent.getClass()).arrColliders;\n\n //Check if it collides with a collidable entity\n for (Integer j : arrCollidable) {\n //if they are not the same and i is not a weapon of j, and if j is alive\n if (!Objects.equals(i, j) && !isWeaponOf(i, j) && scene.entityManager.getEntityComponentInstance(j, Playable.class).isAlive) {\n\n //for each collider that collides with the entity\n for (AttackCollider k : checkAttack(i, j)) {\n //Do something to the collidable entity\n executeAttack(i, j);\n }\n }\n }\n }\n }\n initializeEntities();\n }", "private void shoot() {\n }", "private void shoot() {\n }", "private void tankWillShoot(Graphics2D g2d, GameState state) {\n if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() > 0 && state.getGunType() % 2 == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfCannonBullet(tankObject.getNumOfCannonBullet() - 1);\n if (tankObject.getCannonLevel() == 1) {\n state.getMissiles().add(new Missile(state, 15));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (tankObject.getCannonLevel() == 2) {\n state.getMissiles().add(new Missile(state, 30));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n } else if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() == 0 && state.getGunType() % 2 == 1) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n state.setMouseClicked(false);\n }\n for (Missile missile : state.getMissiles()) {\n missile.paint(g2d, state);\n }\n if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() > 0 && state.getGunType() % 2 == 0) {\n if (numOfRenderBullet1 == 0 && tankObject.getMachineGunLevel() == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 20));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet2 == 0 && tankObject.getMachineGunLevel() == 2) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 30));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet1 <= 7) {\n numOfRenderBullet1++;\n }\n if (numOfRenderBullet1 == 7) {\n numOfRenderBullet1 = 0;\n }\n if (numOfRenderBullet2 <= 3) {\n numOfRenderBullet2++;\n }\n if (numOfRenderBullet2 == 3) {\n numOfRenderBullet2 = 0;\n }\n }\n else if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() == 0 && state.getGunType() % 2 == 0) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n }\n for (Bullet bullet : state.getBullets()) {\n bullet.paint(g2d, state);\n }\n }", "public void setBulletsFired(ArrayList<Bullet> bullets) {\n if(!bulletsFired.isEmpty()) {\n //System.out.println(bullets.get(0).getxPos() != bulletsFired.get(0).getxPos());\n this.bulletsFired = bullets;\n }\n }", "private void checkForBulletCollisions() {\r\n\t\tbulletMoveOffScreen();\r\n\t\tbulletCollisionWithObject();\r\n\t}", "@Override\n\tpublic void collideWith(Bullet bullet) {\n\t\tbulletMoveForward(bullet);\n\t}", "public void tick() {\n if (ShulkerEntity.this.world.getDifficulty() != Difficulty.PEACEFUL) {\n --this.attackTime;\n LivingEntity livingentity = ShulkerEntity.this.getAttackTarget();\n ShulkerEntity.this.getLookController().setLookPositionWithEntity(livingentity, 180.0F, 180.0F);\n double d0 = ShulkerEntity.this.getDistanceSq(livingentity);\n if (d0 < 400.0D) {\n if (this.attackTime <= 0) {\n this.attackTime = 20 + ShulkerEntity.this.rand.nextInt(10) * 20 / 2;\n ShulkerEntity.this.world.addEntity(new ShulkerBulletEntity(ShulkerEntity.this.world, ShulkerEntity.this, livingentity, ShulkerEntity.this.getAttachmentFacing().getAxis()));\n ShulkerEntity.this.playSound(SoundEvents.ENTITY_SHULKER_SHOOT, 2.0F, (ShulkerEntity.this.rand.nextFloat() - ShulkerEntity.this.rand.nextFloat()) * 0.2F + 1.0F);\n }\n } else {\n ShulkerEntity.this.setAttackTarget((LivingEntity)null);\n }\n\n super.tick();\n }\n }", "public void onBulletHit(BulletHitEvent event) {\n RobotReference hitRobot;\n hitRobot = robots.get(event.getName());\n\n if (hitRobot.isTeammate()) {\n setTurnRight(90);\n setAhead(400);\n setChargerTarget();\n }\n }", "private void speedBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Yellow\"));\n\n\t\tfor (int i = 0; i < bulletArrayList.size(); i++) {\n\t\t\tbulletArrayList.get(i).setSpeed(5);\n\t\t}\n\t}", "@Override\n public void performEffectOne(List<Object> targets) {\n checkEmptyTargets(targets);\n ArrayList<Player> roomPlayers = ((Square) targets.get(0)).findRoomPlayers();\n for (Player p : roomPlayers) {\n damage(p, 1);\n getDamagedPlayer().add(p);\n }\n effectControlFlow(1);\n }", "@Override\n\t\t\tpublic void shoot() {\n\t\t\t}", "public void update() {\r\n super.update();\r\n life -= 1;\r\n if(life <= 0) {\r\n killBullet();\r\n }\r\n }", "private void quickFireBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Pink\"));\n\t}", "@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tfor (Damage damage : actionAttack.damages) {\r\n\t\t\t\t\t\t\t\tBattlerSprite attacked = damage.target.getTag();\r\n\t\t\t\t\t\t\t\tattacked.takeHit(damage.damage);\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "public void dispara()\r\n {\r\n BulletEnemy bala = new BulletEnemy();\r\n getWorld().addObject(bala,getX(),getY()+25);\r\n }", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "public void damageTargets(List<Slicer> activeEnemies) {\n // Create list of explosives that have been detonated (regardless of they have hit enemies)\n // These explosives will be removed from the map\n List<Explosive> detExp = new ArrayList<>();\n for (int i=0; i<this.explosives.size(); i++) {\n Explosive explosive = this.explosives.get(i);\n if (explosive != null && explosive.getDetTime()>=DET_TIME) {\n numDetonated++;\n detExp.add(explosive);\n // Checks if enemy is in the area\n // Does damage accordingly\n for (Slicer target: activeEnemies) {\n if (explosive.getCenter().distanceTo(target.getCenter()) <= getEffectRadius()) {\n target.reduceHealth(getDamage());\n }\n }\n }\n }\n // Removes all explosives that have detonated\n explosives.removeAll(detExp);\n }", "public void playEnemy(){\n // System.out.println(\"staaaaaaaaaaaaaaaaaaaaar\"+character.getBlock());\n for(int i = 0 ; i < enemyController.getSize() ; i++){\n if (! enemies.get(i).isDead())\n effectHandler.playEnemy( i );\n }\n for( int i = 0 ; i < enemyController.getSize() ; i++){\n if (! enemies.get(i).isDead())\n effectHandler.endEnemyTurn(i);\n }\n\n }", "private void addEnemySheild() {\n this.enemyShield += 1;\n }", "public void notifyAlienKilled() {\n\t\talienCount--;\n\t\t\n\t\tif (alienCount <= 0) {\n\t\t\tround++;\n\t\t\tif(round % 1 == 0) {\n\t\t\t\tinitBoss();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tinitEntitiesNoShip();\n\t\t\t}\n//\t\t\tnotifyWin();\n\t\t\t// System.out.println(\"Score: \" + score);\n\t\t}\n\t\t\n\t\t// if there are still some aliens left then they all need to get faster, so\n\t\t// speed up all the existing aliens\n\t\tfor (int i=0;i<entities.size();i++) {\n\t\t\tEntity entity = (Entity) entities.get(i);\n\t\t\t\n\t\t\tif (entity instanceof AlienEntity) {\n\t\t\t\t// speed up by 2%\n\t\t\t\tentity.setHorizontalMovement(entity.getHorizontalMovement() * 1.02);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onTargetDamaged(LivingEntity user, Entity target, int level) {\n if(target instanceof LivingEntity) {\n\n //target.damage(DamageSource.LAVA, 3F);\n knockUp((PlayerEntity) user, (LivingEntity) target, 3F);\n }\n }", "@Override\n\tpublic void shoot() {\n\t\tthis.fired = true;\n\t\tghost.shot=true;\n\t}", "public void Fire()\n {\n Random random = new Random();\n int randNum = random.nextInt(limit);\n\n //Check to see if this bomb is dropped\n if(!owner.BehindInvader() && !this.Visible() && randNum == HIT_VAL)\n {\n //Set this bomb to visible\n this.Visible(true);\n this.PlaySound();\n this.x = this.owner.X();\n this.y = this.owner.Y();\n }\n\n //Check for collision with the defender\n if(Bomb.enemy.Visible() && this.Visible() && this.Collision(Bomb.enemy))\n {\n Bomb.enemy.Hit();\n this.Visible(false);\n }\n //Move the bomb down\n else if(this.Visible())\n {\n this.y++;\n\n //Check for collision with the floor\n if(this.y >= GameConstants.GROUND - this.imageHeight)\n {\n this.Visible(false);\n }\n //Check for collision with the barriers\n for(Barrier barrier : Bomb.barriers.Barriers())\n {\n for(BarrierBlock block : barrier.BarrierBlocks())\n {\n if(this.Collision(block))\n {\n block.Visible(false);\n //Removal could cause Comodification issue\n block.Damaged(true);\n this.Visible(false);\n //May not need this return\n return;\n }\n }\n }\n }\n }", "@Override\n\tpublic Bullet shoot(int hx, int hy) {\n\t\treturn null;\n\t}", "@Override\n public void onTypeAttack(Entity target) {\n if (target instanceof EntityLivingBase) {\n int time;\n switch (target.worldObj.difficultySetting) {\n case PEACEFUL:\n return;\n case EASY:\n time = 15;\n break;\n case NORMAL:\n time = 35;\n break;\n default:\n time = 75;\n }\n time *= 20;\n ((EntityLivingBase)target).addPotionEffect(new PotionEffect(Potion.resistance.id, time, -3));\n }\n }", "public int fire(ArrayList<Enemy> enemies) {\n\t\tint coins = 0;\n\t\tint index = 0;\n\t\tboolean findIt = true;\n\t\t//looking for the first rat\n\t\twhile (!(enemies.get(index) instanceof Rat) || enemies.get(index).getPosition() > position) {\n\t\t\tindex++;\n\t\t\tif (index >= enemies.size()) {\n\t\t\t\tfindIt = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (findIt) {\n\t\t\tEnemy e = enemies.get(index);\n\t\t\te.hit(new Slingshot(position));\n\t\t\tSystem.out.println(type + position + \" hit \" + e.getType() + e.getPosition() + \".\\nEnemy's health is \" + e.getHealth());\n\t\t\tif (e.getHealth() <= 0) {\n\t\t\t\tenemies.remove(e);\n\t\t\t\tcoins += e.getCoins();\n\t\t\t}\n\t\t}\n\t\t//looking for the first lizard\n\t\telse {\n\t\t\tindex = 0;\n\t\t\tfindIt = true;\n\t\t\twhile (!(enemies.get(index) instanceof Lizard) || enemies.get(index).getPosition() > position) {\n\t\t\t\tindex++;\n\t\t\t\tif (index >= enemies.size()) {\n\t\t\t\t\tfindIt = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (findIt) {\n\t\t\t\tEnemy e = enemies.get(index);\n\t\t\t\te.hit(new Slingshot(position));\n\t\t\t\tSystem.out.println(type + position + \" hit \" + e.getType() + e.getPosition() + \".\\nEnemy's health is \" + e.getHealth());\n\t\t\t\tif (e.getHealth() <= 0) {\n\t\t\t\t\tenemies.remove(e);\n\t\t\t\t\tcoins += e.getCoins();\n\t\t\t\t}\n\t\t\t}\n\t\t\t//looking for the first elephant\n\t\t\telse {\n\t\t\t\tindex = 0;\n\t\t\t\tfindIt = true;\n\t\t\t\twhile (!(enemies.get(index) instanceof Elephant) || enemies.get(index).getPosition() > position) {\n\t\t\t\t\tindex++;\n\t\t\t\t\tif (index >= enemies.size()) {\n\t\t\t\t\t\tfindIt = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (findIt) {\n\t\t\t\t\tEnemy e = enemies.get(index);\n\t\t\t\t\te.hit(new Slingshot(position));\n\t\t\t\t\tSystem.out.println(type + position + \" hit \" + e.getType() + e.getPosition() + \".\\nEnemy's health is \" + e.getHealth());\n\t\t\t\t\tif (e.getHealth() <= 0) {\n\t\t\t\t\t\tenemies.remove(e);\n\t\t\t\t\t\tcoins += e.getCoins();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn coins;\n\t}", "private void applyLavaDamageToWallsAndFences() {\n/* 1257 */ if (isLava()) {\n/* */ \n/* 1259 */ if (this.walls != null) {\n/* */ \n/* 1261 */ Wall[] lTempWalls = getWalls();\n/* 1262 */ for (int x = 0; x < lTempWalls.length; x++)\n/* */ {\n/* 1264 */ lTempWalls[x].setDamage(lTempWalls[x].getDamage() + 1.0F);\n/* */ }\n/* */ } \n/* 1267 */ if (this.fences != null)\n/* */ {\n/* 1269 */ for (Fence f : getFences()) {\n/* 1270 */ f.setDamage(f.getDamage() + 1.0F);\n/* */ }\n/* */ }\n/* */ } \n/* */ }", "public void shoot(int bulletLeft) {\n float xValue = canon.getX();\n float yValue = canon.getY();\n bullets.get(bulletLeft).setVisibility(View.VISIBLE);\n shootingMotion(bullets.get(bulletLeft), xValue, yValue);\n\n }", "boolean testBulletExplode(Tester t) {\n return t.checkExpect(\n new Bullet(2, Color.PINK, new MyPosn(50, 50), new MyPosn(0, -8), 1).explode(),\n new ConsLoGamePiece(new Bullet(4, Color.PINK, new MyPosn(50, 50), new MyPosn(8, 0), 2),\n new ConsLoGamePiece(new Bullet(4, Color.PINK, new MyPosn(50, 50), new MyPosn(-8, 0), 2),\n this.mt)))\n && t.checkExpect(\n new Bullet(4, Color.PINK, new MyPosn(100, 100), new MyPosn(0, 4), 2).explode(),\n new ConsLoGamePiece(\n new Bullet(6, Color.PINK, new MyPosn(100, 100), new MyPosn(4, 0), 3),\n new ConsLoGamePiece(\n new Bullet(6, Color.PINK, new MyPosn(100, 100), new MyPosn(-2, 3), 3),\n new ConsLoGamePiece(\n new Bullet(6, Color.PINK, new MyPosn(100, 100), new MyPosn(-2, -3), 3),\n this.mt))))\n && t.checkExpect(\n new Bullet(2, Color.PINK, new MyPosn(50, 50), new MyPosn(0, -8), -1).explode(),\n new MtLoGamePiece());\n }", "public void Hit()\n {\n this.numLives--;\n //Oscillate visible and not if the number of lives is greater than zero\n if(this.numLives > 0)\n {\n this.damaged = true;\n this.Blink(1);\n\n }\n }", "Bullet(int posX,int posY,int velX,int velY,int classOfObejct,int attack){\n this.posX = posX;\n this.posY = posY;\n this.velX = velX;\n this.velY = velY;\n this.classOfObejct = classOfObejct;\n this.attack = attack;\n\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tprivate void drawListEntity(ArrayList list) {\n\t\tArrayList listRemove = new ArrayList();\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tEntity ent = (Entity) list.get(i);\n\t\t\t\n\t\t\tdrawEntity(ent);\n\t\t\t\n\t\t\t// if the entity is still in the screen, update its position\n\t\t\tif (ent.continueDrawing()) {\n\t\t\t\tif (ent instanceof Bullet) {\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"bullet\")) {\n\t\t\t\t\t\tent.setX(ent.getX() + ((Bullet) ent).getXChange());\n\t\t\t\t\t\tent.setY(ent.getY() + ((Bullet) ent).getYChange());\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"enemy_bullet\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 8);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"laser\")) {\n\t\t\t\t\t\tlistRemove.add(list.get(i));\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"boss_bullet\")) {\n\t\t\t\t\t\tent.setX(ent.getX() + ((Bullet) ent).getXChange());\n\t\t\t\t\t\tent.setY(ent.getY() + ((Bullet) ent).getYChange());\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Enemy) {\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"green_box\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 5);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"red_box\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 3);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"boss\") && bossExplosionNum == 0) {\n\t\t\t\t\t\tif (ent.getX() <= 0)\n\t\t\t\t\t\t\tbossMovement = 3;\n\t\t\t\t\t\tif (ent.getX() >= displayWidth - ((Enemy) ent).getSprite().getWidth())\n\t\t\t\t\t\t\tbossMovement = -3;\n\t\t\t\t\t\tif (ent.getY() <= 30)\n\t\t\t\t\t\t\tent.setY(ent.getY() + 1);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tent.setX(ent.getX() + bossMovement);\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Explosion) {\n\t\t\t\t\tif (((Explosion) ent).getName().equals(\"player_hit\")) {\n\t\t\t\t\t\tent.setX(((Explosion) ent).getEntity().getX());\n\t\t\t\t\t\tent.setY(((Explosion) ent).getEntity().getY());\n\t\t\t\t\t} else if (((Explosion) ent).getName().equals(\"enemy_hit\")) {\n\t\t\t\t\t\tent.setX(((Explosion) ent).getEntity().getX() - 5);\n\t\t\t\t\t\tent.setY(((Explosion) ent).getEntity().getY() - 5);\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Powerup) {\n\t\t\t\t\tent.setY(ent.getY() + 4);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// else if the entity is outside of the screen, remove it\n\t\t\telse {\n\t\t\t\tlistRemove.add(list.get(i));\n\t\t\t\t\n\t\t\t\t// handles the boss explosions\n\t\t\t\thandleBossExplosions(list, listRemove, i);\n\t\t\t}\n\t\t\t\n\t\t\t// if the player is dead, notify the player of death\n\t\t\tif (stopDrawingPlayer || gameWon) {\n\t\t\t\tnotifyGameOver();\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < listRemove.size(); i++) {\n\t\t\tlist.remove(listRemove.get(i));\n\t\t}\n\t\tlistRemove.clear();\n\t}", "public void checkCollision()\r\n\t{\r\n\t\t//for Bullets against Avatar and Enemy\r\n\t\tfor(int bulletIndex = 0; bulletIndex < bullets.size(); bulletIndex++)\r\n\t\t{\r\n\t\t\tBullet b = bullets.get(bulletIndex);\r\n\t\t\tif (b instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tboolean collided = false;\r\n\t\t\t\tfor (int enemyIndex = 0; enemyIndex < enemy.size(); enemyIndex++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy e = enemy.get(enemyIndex);\r\n\t\t\t\t\tif(((AvatarBullet) b).collidedWith(e))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\t\tenemy.remove(enemyIndex);\r\n\t\t\t\t\t\tenemyIndex --;\r\n\t\t\t\t\t\tcollided = true;\r\n\t\t\t\t\t\tint score = getScore()+1;\r\n\t\t\t\t\t\tsetScore(score);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (b instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tif (((EnemyBullet) b).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\tint health = Avatar.getLives()-1;\r\n\t\t\t\t\tavatar.setLives(health);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int platformIndex = 0; platformIndex < platforms.size(); platformIndex++)\r\n\t\t{\r\n\t\t\tPlatforms p = platforms.get(platformIndex);\r\n\t\t\tif (p instanceof Platforms)\r\n\t\t\t{\r\n\t\t\t\t//boolean collided = false;\r\n\t\t\t\t//Avatar a = avatar.get(enemyIndex);\r\n\t\t\t\tif(((Platforms) p).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void tick() {\n\t\tif (Math.abs(disToPlayerX()) > Math.abs(disToPlayerY())) {\r\n\t\t\tif (disToPlayerX()<0) {\r\n\t\t\t\tx -= speed;\t//moves enemy to the left\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tx += speed; //moves enemy to the right\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (disToPlayerY()<0) {\r\n\t\t\t\ty-=speed; //moves enemy up\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ty+=speed; //moves enemy down\r\n\t\t\t}\r\n\t\t}\r\n\t\tenemyRectangle.setLocation((int)x,(int) y); //updates hitbox of enemy\r\n\r\n\t\t//checks all enemies and see if they run into player\r\n\t\tfor (int i=0;i<c.getEnemys().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(player.getRectangle().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes the enemy\r\n\t\t\t\tPlayer.health -=10; //removes 10 health\r\n\t\t\t\tbreak; //doesn't work without this BREAK. DO NOT REMOVE\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//checks all bullets if they hit an enemy\r\n\t\tfor (int i = 0;i<c.getBullets().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(c.getBullets().get(i).getRect().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes enemy\r\n\t\t\t\tc.removeBullet(c.getBullets().get(i)); //removes the bullet\r\n\t\t\t\tPlayer.score += 50; //adds 50 to the score\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "private void tick() {\n keyManager.tick();\n if (keyManager.pause == false) {\n if (gameOver) {\n\n // advancing player with colision\n player.tick();\n //if there's a shot.\n\n int alienBombIndex = (int) (Math.random() * aliens.size());\n for (int i = 0; i < aliens.size(); i++) {\n Alien alien = aliens.get(i);\n alien.tick();\n if (shotVisible && shot.intersectAlien(alien)) {\n Assets.hitSound.play();\n alien.setDying(true);\n alien.setDeadCounter(6);\n shotVisible = false;\n }\n \n if(alien.isDead()){\n aliens.remove(i);\n if (aliens.size() == 0) {\n gameOver = false;\n }\n }\n\n alien.act(direction);\n }\n\n //Controlar el movimiento de los aliens\n for (Alien alien : aliens) {\n int x = alien.getX();\n if (x >= getWidth() - 30 && direction != -1) {\n direction = -1;\n alien.setDirection(-1);\n Iterator i1 = aliens.iterator();\n while (i1.hasNext()) {\n Alien a2 = (Alien) i1.next();\n a2.setY(a2.getY() + 15);\n }\n }\n if (x <= 5 && direction != 1) {\n direction = 1;\n alien.setDirection(1);\n Iterator i2 = aliens.iterator();\n while (i2.hasNext()) {\n Alien a = (Alien) i2.next();\n a.setY(a.getY() + 15);\n }\n }\n }\n\n //Controlar el spawning de las bombas\n Random generator = new Random();\n for (Alien alien : aliens) {\n int num = generator.nextInt(15);\n Bomb b = alien.getBomb();\n\n if (num == CHANCE && b.isDestroyed()) {\n b.setDestroyed(false);\n b.setX(alien.getX());\n b.setY(alien.getY());\n }\n\n b.tick();\n if (b.intersecta(player)) {\n Assets.deathSound.play();\n player.die();\n gameOver = false;\n }\n\n }\n\n if (shotVisible) {\n shot.tick();\n }\n if (!player.isDead() && keyManager.spacebar) {\n shoot();\n Assets.shotSound.play();\n }\n for (int i = 0; i < aliens.size(); i++) {\n if (aliens.get(i).getY() > 500) {\n gameOver = false;\n }\n }\n\n }\n }\n /// Save game in file\n if (keyManager.save) {\n try {\n\n vec.add(player);\n vec.add(shot);\n if(keyManager.pause){\n vec.add(new String(\"Pause\")); \n } else if (!gameOver){\n vec.add(new String(\"Game Over\"));\n } else {\n vec.add(new String(\"Active\"));\n }\n for (Alien alien : aliens) {\n vec.add(alien);\n }\n //Graba el vector en el archivo.\n grabaArchivo();\n } catch (IOException e) {\n System.out.println(\"Error\");\n }\n }\n /// Load game\n if (keyManager.load == true) {\n try {\n //Graba el vector en el archivo.\n leeArchivo();\n } catch (IOException e) {\n System.out.println(\"Error en cargar\");\n }\n }\n\n }", "public void OnDamage(AI ai, int aTK, float f) {\n\tif(DamagedTimer < 0.8f)\n\t\treturn;\n\tvel.x = f;\n\tvel.y = 3;\n\tDamagedTimer = 0;\n\tgrounded = false;\n\taTK -= (getDEF()*0.8f);\n\tif(aTK <= 0)\n\t\taTK = 1;\n\tHP -= aTK;\n\tInventory.CurrentInventory.dmgTxts.add(new dmgText(pos.x, pos.y+1, aTK));\n\t\n\tSoundManager.PlaySound(\"playerHurt\",3);\n\t\n\t\n}" ]
[ "0.8007339", "0.7524266", "0.73961353", "0.7233", "0.7213758", "0.71450955", "0.714105", "0.7018318", "0.698173", "0.6922282", "0.6878834", "0.6824907", "0.6795273", "0.67805505", "0.67436635", "0.67387706", "0.6674429", "0.667368", "0.66517997", "0.6626859", "0.6605626", "0.65444815", "0.6539943", "0.65074855", "0.650417", "0.64943856", "0.6492065", "0.64099693", "0.6391181", "0.63909817", "0.6386583", "0.63796335", "0.637866", "0.6355518", "0.6344663", "0.6334322", "0.6319793", "0.6305214", "0.6304935", "0.6297151", "0.6288043", "0.6281094", "0.62693965", "0.6247421", "0.6222735", "0.6220818", "0.62121856", "0.62116605", "0.62052214", "0.6195666", "0.6191549", "0.6182283", "0.61797434", "0.6165975", "0.6160627", "0.61587936", "0.61449045", "0.61356074", "0.61032605", "0.6088634", "0.6088159", "0.6077947", "0.60699874", "0.60699874", "0.60642487", "0.60566396", "0.60384446", "0.60143954", "0.5991176", "0.59863156", "0.5980661", "0.5980482", "0.597502", "0.5973186", "0.5966497", "0.5963252", "0.59617764", "0.5957934", "0.59575814", "0.59567696", "0.59555215", "0.5951976", "0.5947262", "0.5937924", "0.59267545", "0.59248203", "0.5917352", "0.5898312", "0.5896413", "0.58939093", "0.5883299", "0.58741534", "0.58619183", "0.5852002", "0.58460534", "0.5843138", "0.5838008", "0.58360445", "0.58329165", "0.5832818" ]
0.81844455
0
use bomb, which killded all the enemies and cause huge harm to boss while bomb buttom pressed, bombUsed is set to true
public int useBomb(){ //do harm while the animation start //cause harm to the boss println("BEFORE Main.boss.health: "+Main.boss.health); int count = 0; if ((Main.boss.alive) && (Main.boss.posY != -1)){ Main.boss.decreaseHealth(10); if(Main.boss.health <= 0){ Main.boss.alive = false; Main.boss.deadTime = millis(); Main.score += 100; bossKilled = true; } } println("AFTER Main.boss.health: "+Main.boss.health); //remove all bullets Main.boss.emptyBullets(); //kill all the enemies for(int j = 0; j < Main.enemies.size(); j++){ Enemy tempEnemy = Main.enemies.get(j); tempEnemy.alive = false; tempEnemy.deadTime = millis(); count ++; } // fill(0,0,0); // rect(0,0,width,height); return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void tryToKillStuff(final Bomb b) {\n \t\tfor (Bomb bomb : bombs)\n \t\t\tif (bomb != b && !bomb.isCurrentlyExploding())\n \t\t\t\tif (eac.isInExplosionArea(b, bomb)) {\n \t\t\t\t\tbomb.goBomf();\n \t\t\t\t}\n \n \t\tif (eac.isInExplosionArea(b, bman.get(0))) {\n \t\t\talive = false;\n \t\t\tgui.lost();\n \t\t}\n \t}", "public void Fire()\n {\n Random random = new Random();\n int randNum = random.nextInt(limit);\n\n //Check to see if this bomb is dropped\n if(!owner.BehindInvader() && !this.Visible() && randNum == HIT_VAL)\n {\n //Set this bomb to visible\n this.Visible(true);\n this.PlaySound();\n this.x = this.owner.X();\n this.y = this.owner.Y();\n }\n\n //Check for collision with the defender\n if(Bomb.enemy.Visible() && this.Visible() && this.Collision(Bomb.enemy))\n {\n Bomb.enemy.Hit();\n this.Visible(false);\n }\n //Move the bomb down\n else if(this.Visible())\n {\n this.y++;\n\n //Check for collision with the floor\n if(this.y >= GameConstants.GROUND - this.imageHeight)\n {\n this.Visible(false);\n }\n //Check for collision with the barriers\n for(Barrier barrier : Bomb.barriers.Barriers())\n {\n for(BarrierBlock block : barrier.BarrierBlocks())\n {\n if(this.Collision(block))\n {\n block.Visible(false);\n //Removal could cause Comodification issue\n block.Damaged(true);\n this.Visible(false);\n //May not need this return\n return;\n }\n }\n }\n }\n }", "@Override\n public void action() throws Exception {\n if (!can_hit || count > 0)\n count++;\n if (count == 100) {\n can_hit = true;\n }\n else if (count == this.bombCountLimit) {\n bombPlaced--;\n count = 0;\n }\n\n if(Gdx.input.isKeyJustPressed(Input.Keys.SPACE)){\n go_ia=!go_ia;\n }\n if(go_ia){\n ia_count++;\n if(ia_count==11)\n ia_count=0;\n }\n if(go_ia&&ia_count==10) {\n\n int move = -1;\n int mode = 0;\n\n\n\n log.info(\"count bomb: \" + count);\n\n double enemyDist = sqrt(pow((playerX - enemyX), 2)+pow((playerY - enemyY), 2));\n if(powerUpFree) {\n currentGoalX = goalX;\n currentGoalY = goalY;\n if(deepSearch){\n currentGoalX = 1;\n currentGoalY = 1;\n }\n if(enemyDist < 7 && !enemyClean){\n if(enemyDist <= bombRange && sqrt(pow((playerX - goalX), 2)+pow((playerY - goalY), 2)) > 2)\n mode = 2;\n\n }\n }\n\n\n\n if (!can_hit) {\n mode = 1;\n log.info(\"can't hit\");\n }\n else if(doorLocked) {\n mode = 3;\n }\n /*if (count > 0 && count <= this.bombCountLimit && (playerX!=bombGoalX || playerY!=bombGoalY)){\n currentGoalX = bombGoalX;\n currentGoalY = bombGoalY;\n log.info(\"bomb goal\");\n }*/\n\n\n\n\n log.info(\"CURRENT goal x: \" + currentGoalX +\", CURRENT goal y: \" + currentGoalY);\n log.info(\"CURRENT bombgoal x: \" + bombGoalX +\", current bombgoal y: \" + bombGoalY);\n log.info(\"CURRENT player x: \" + playerX +\", current player y: \" + playerY);\n log.info(\"powerup free: \" + powerUpFree);\n log.info(\"CURRENT ENEMY: [\" + enemyX + \", \" + enemyY + \"] \");\n\n ArrayList<Action> actions = new ArrayList<>();\n ArrayList<Wall> walls = new ArrayList<>();\n ArrayList<EnemyPath> enemyPaths = new ArrayList<>();\n ArrayList<Around> around = new ArrayList<>();\n\n playerX = this.x/40;\n playerY = this.y/40;\n\n for( int i = 0; i < 4; i++ ){\n if (can_move[i]) {\n if (mode != 1 || checkSafe(i))\n actions.add(new Action(i));\n walls.add(new Wall(i, 0));\n }\n else if (can_destroy[i]){\n walls.add(new Wall(i, 1));\n if (mode != 1 || checkSafe(i))\n actions.add(new Action(i));\n }\n else\n walls.add(new Wall(i, 3));\n if(freeAround[i])\n around.add(new Around(i, 0));\n else\n around.add(new Around(i, 2));\n\n if ( !enemyFree[i] && enemyDist > bombRange)\n enemyPaths.add(new EnemyPath(i, 1));\n if( !enemyFree[i] && enemyDist <= bombRange || (bombRange == 1 && enemyDist <= 2))\n enemyPaths.add(new EnemyPath(i, 2));\n else if (enemyDist <= bombRange)\n enemyPaths.add(new EnemyPath(i, 1));\n else if(enemyFree[i])\n enemyPaths.add(new EnemyPath(i, 0));\n }\n if(sqrt(pow((playerX - bombGoalX), 2)+pow((playerY - bombGoalY), 2)) > bombRange ||\n mode != 1 || (playerX != bombGoalX && playerY != bombGoalY))\n actions.add(new Action(4));\n\n ai.load_fact( new Position(playerX, playerY),\n actions,\n makeDistances(buildDistances(currentGoalX, currentGoalY)),\n makeBombDistances(buildDistances(bombX, bombY)),\n makeEnemyDistances(buildDistances(enemyX, enemyY)),\n walls,\n around,\n enemyPaths,\n new Mode(mode)\n );\n\n AnswerSets answers = ai.getAnswerSets();\n while(answers.getAnswersets().get(0).getAnswerSet().isEmpty()){\n ai.load_fact( new Position(playerX, playerY),\n actions,\n makeDistances(buildDistances(currentGoalX, currentGoalY)),\n makeBombDistances(buildDistances(bombX, bombY)),\n makeEnemyDistances(buildDistances(enemyX, enemyY)),\n walls,\n around,\n enemyPaths,\n new Mode(mode)\n );\n answers = ai.getAnswerSets();\n }\n\n for (AnswerSet an : answers.getAnswersets()) {\n Pattern pattern = Pattern.compile(\"^choice\\\\((\\\\d+)\\\\)\");\n Matcher matcher;\n for (String atom : an.getAnswerSet()) {\n //System.out.println(atom);\n matcher = pattern.matcher(atom);\n\n if (matcher.find()) {\n log.info(\"DLV output: \" + matcher.group(1));\n move = Integer.parseInt(matcher.group(1));\n }\n }\n }\n if (move == 1) {\n set_allCan_move(0, true);\n this.x += 40;\n }\n else if (move == 2) {\n set_allCan_move(0, true);\n this.y += 40;\n }\n else if (move == 3) {\n set_allCan_move(0, true);\n this.y -= 40;\n }\n else if (move == 0) {\n set_allCan_move(0, true);\n this.x -= 40;\n }\n else if (move == 4 && can_hit && (playerX != goalX || playerY != goalY)) {\n ai_hit = true;\n can_hit = false;\n this.bombX=playerX;\n this.bombY=playerY;\n this.bombGoalX=playerX;\n this.bombGoalY=playerY;\n bombPlaced++;\n }\n moves.add(move);\n ai.clear();\n }\n else{\n playerX = this.x/40;\n playerY = this.y/40;\n }\n\n\n if (Gdx.input.isKeyPressed(Input.Keys.A)&&can_move[0]) {\n set_allCan_move(0, true);\n this.x -= 5;\n }\n if (Gdx.input.isKeyPressed(Input.Keys.D)&&can_move[1]) {\n set_allCan_move(0, true);\n this.x += 5;\n }\n if (Gdx.input.isKeyPressed((Input.Keys.W))&&can_move[2]) {\n this.y += 5;\n set_allCan_move(0, true);\n }\n if (Gdx.input.isKeyPressed((Input.Keys.S))&&can_move[3]){\n set_allCan_move(0, true);\n this.y -= 5;\n }\n if (Gdx.input.isKeyPressed((Input.Keys.Z)) && can_hit) {\n can_hit = false;\n this.bombX=playerX;\n this.bombY=playerY;\n this.bombGoalX=playerX;\n this.bombGoalY=playerY;\n bombPlaced++;\n }\n\n if (Gdx.input.isKeyPressed((Input.Keys.N)))\n log.info(\"CURRENT ENEMY: [\" + enemyX + \", \" + enemyY + \"] \");\n }", "public void bomb() {\n\t\tbomb.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = bomb;\n\t}", "public void plantBomb()\n {\n if(this.getBombs() > 0)\n {\n bController.addBomb(this.getxPos(), this.getyPos(), 25);\n this.setBombs(getBombs() - 1);\n }\n }", "public void placeBombIntent(View v){\n\n if(!myTurn){\n showToast(\"Wait for your turn imbecile\");\n return;\n }\n if(bombs>0 && canPlaceBomb){\n if(!bombIntent){\n showToast(\"Touch a tile to place a bomb\");\n bombIntent = true;\n }else{\n showToast(\"No longer placing bombs\");\n bombIntent = false;\n }\n }\n }", "public boolean isBomb() {\n return type.equalsIgnoreCase(\"bomb\");\n }", "public void checkBombs(final Integer tile){\n if(bombs_location.contains(tile)){\n if(invulnerable){\n showTimedAlertDialog(\"PHEW!\", \"Your GODMODE saved your life\", 5);\n invulnerable = false;\n return;\n }\n invulnerable = false;\n Lejos.makeSound_Boom();\n hp = hp-1;\n DrawHP();\n bombs_location.remove(tile);\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n MultiplayerManager.getInstance().SendMessage(\"bomb_remove \" + revertTile(tile).toString());\n }\n }, 1000);\n if(hp==0){\n onLose();\n }\n showTimedAlertDialog(\"PWNED!\", \"You just stepped on a mine\", 3);\n }\n }", "private void GenerateBomb(){\n\t\t\n\t\t//Update for the bomb powerup\n\t\tint randGen = rand.nextInt((int)((float)BOMB_FREQUENCY * RANDOM_DEVIATION));\n\t\trandGen = (rand.nextBoolean()) ?-randGen :randGen;\n\t\t\n\n\t\t\n\t\tif(timeSinceLastSpawns.get(CollectibleType.Bomb.ordinal()).intValue() > (BOMB_FREQUENCY + randGen)){\n\t\t\t\n\n\t\t\ttimeSinceLastSpawns.set(CollectibleType.Bomb.ordinal(), 0);\n\t\t\t\n\t\t\t//SPAWN BOMB COLLECTIBLE HERE\n\t\t}\n\t}", "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "public Bomb(){\n this.num_uses = 2147483647; // Constant set num times we can use this\n }", "public void updatePosition()\r\n\t{\r\n\t\tsuper.updatePosition();\r\n\t\t\r\n\t\t// Update the bomb's position\r\n\t\tPoint nextPosition = getPath().getLocation(t++);\r\n\t\tsetX(nextPosition.x + startX);\r\n\t\tint nextY = nextPosition.y + startY;\r\n\t\tsetY(nextY);\r\n\t\t\r\n\t\t// Blow the bomb up after it reaches mid screen\r\n\t\tif (t > 120 || (nextY < (Global.WINDOW_HEIGHT >> 1) && t > 30))\r\n\t\t{\r\n\t\t\tbombSound.stop();\r\n\t\t\tsuper.remove();\r\n\t\t\tGamePanel.makeExplosion(getX(), getY());\r\n\t\t\t\r\n\t\t\t// Injure all the enemies on the screen\r\n\t\t\t\r\n\t\t\tArrayList<Sprite> sprites = GamePanel.getSprites();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < sprites.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tif (sprites.get(i) instanceof Enemy)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy enemy = (Enemy) sprites.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t\tint currentYTop = GamePanel.getLevel().getCurrentY() +\r\n\t\t\t\t\t\tBLOCKS_PER_Y - 1;\r\n\t\t\t\t\tboolean visibleX = enemy.getX() + enemy.getWidth() >= 0 &&\r\n\t\t\t\t\t\tenemy.getX() <= Global.WINDOW_WIDTH;\r\n\t\t\t\t\tboolean yOnScreen = enemy.getY() <= Global.WINDOW_HEIGHT +\r\n\t\t\t\t\t\t100;\r\n\t\t\t\t\tboolean visibleY = enemy.getYBlock() >= currentYTop &&\r\n\t\t\t\t\t\tyOnScreen;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (visibleX && visibleY && enemy.isAlive())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tenemy.offsetHealth(-300);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (enemy.getHealth() <= 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tenemy.remove();\r\n\t\t\t\t\t\t\tGamePanel.offsetNumLevelPoints(100);\r\n\t\t\t\t\t\t\tGamePanel.makeExplosion(enemy.getX(), enemy.getY());\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}\r\n\t\t}\r\n\t}", "public void setBombExploding(boolean bombExploding) {\n this.bombExploding = bombExploding;\n }", "void removeBomb();", "private void placeBomb() {\n\t\tint x = ran.nextInt(worldWidth);\n\t\tint y = ran.nextInt(worldHeight);\n\n\t\tif (!tileArr[x][y].hasBomb()) {\n\t\t\ttileArr[x][y].setBomb(true);\n\n\t\t\tindex.add(\"Index\" + x + \",\" + y); // ADDED COMPONENT\n\t\t\trevealed.put(index, true);\n\t\t\tindex.removeFirst();\n\n\t\t} else {\n\t\t\tindex.add(\"Index\" + x + \",\" + y); // ADDED COMPONENT\n\t\t\trevealed.put(index, false);\n\t\t\tindex.removeFirst();\n\t\t\tplaceBomb();\n\t\t}\n\n\t}", "private GameObject spawnBoss(LogicEngine in_logicEngine,LevelManager in_manager)\r\n\t{\n\t\tGameObject go = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/redcube.png\",in_logicEngine.SCREEN_WIDTH/2,LogicEngine.rect_Screen.getHeight()+50,0);\r\n\t\tboss = go;\r\n\t\t\r\n\t\tboss.i_animationFrameRow = 1;\r\n\t\tboss.i_animationFrame =0;\r\n\t\tboss.i_animationFrameSizeWidth =75;\r\n\t\tboss.i_animationFrameSizeHeight =93;\r\n\t\t\r\n\t\tboss.v.setMaxForce(1);\r\n\t\tboss.v.setMaxVel(5);\r\n\t\tboss.stepHandlers.add( new BounceOfScreenEdgesStep());\r\n\t\t\r\n\t\t\r\n\t\tboss_arrive.setAttribute(\"arrivedistance\", \"50\", null);\r\n\t\tboss.stepHandlers.add( new CustomBehaviourStep(boss_arrive));\r\n\t\tboss.isBoss = true;\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(boss, 150, 40, true,1);\r\n\t\t\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\tc.f_numberOfHitpoints = 200;\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t\tc.f_numberOfHitpoints = 250;\r\n\t\t\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\ti_bossBubbleEvery = 125;\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t\ti_bossBubbleEvery = 100;\r\n\t\t\r\n\t\t\r\n\t\tc.addHitpointBossBar(in_logicEngine);\r\n\t\tc.setExplosion(Utils.getBossExplosion(boss));\r\n\t\tboss.collisionHandler = c;\r\n\t\t\r\n\t\tboss.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t//initial velocity of first one \r\n\t\tboss.v.setVel(new Vector2d(0,-5));\r\n\t\t\r\n\t\tGameObject Tadpole1 = in_manager.spawnTadpole(in_logicEngine);\r\n\t\tGameObject Tadpole2 = in_manager.spawnTadpole(in_logicEngine);\r\n\t\t\r\n\t\tGameObject Bubble = null;\r\n\t\t\r\n\t\t\r\n\t\tBubble = spawnBossBubble(in_logicEngine, 0, 3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tTadpole1.v.setVel(new Vector2d(-10,5));\r\n\t\tTadpole2.v.setVel(new Vector2d(10,5));\r\n\t\tBubble.v.setVel(new Vector2d(0,-5));\r\n\t\t\r\n\t\tLaunchShipsStep l1 = new LaunchShipsStep(Tadpole1 , 50, 5, 1, false);\r\n\t\tLaunchShipsStep l2 = new LaunchShipsStep(Tadpole2, 50, 5, 1, true);\r\n\t\tLaunchShipsStep l3 = new LaunchShipsStep(Bubble, i_bossBubbleEvery, 1, 1, true);\r\n\t\tl1.b_addToBullets = true;\r\n\t\tl2.b_addToBullets = true;\r\n\t\t\r\n\t\tboss.stepHandlers.add(l1);\r\n\t\tboss.stepHandlers.add(l2);\r\n\t\tboss.stepHandlers.add(l3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\td_eye = new Drawable();\r\n\t\td_eye.i_animationFrameSizeHeight=8;\r\n\t\td_eye.i_animationFrameSizeWidth=8;\r\n\t\td_eye.i_animationFrameRow = 3;\r\n\t\td_eye.str_spritename = \"data/\"+GameRenderer.dpiFolder+\"/eye.png\";\r\n\t\t\r\n\t\tboss.visibleBuffs.add(d_eye);\r\n\t\t\r\n\t\treturn boss;\r\n\t}", "public void Placebomb(long now){\n //Called if space is pressed\n if(game.getWorld().getGO(this.getPosition()) == null && nbrBombPlaced < nbrBombMax) {\n placeBomb = true;\n nbrBombPlaced += 1;\n }\n }", "public void boom() {\n\t\tboom.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = boom;\n\t}", "public void act() \n {\n moveAround(); \n addBomb(); \n touchGhost(); \n }", "public boolean wouldBeSafeFromBomb(Player playerposingbomb, Cell cellbomb, Cell refugecell){\n Maze maze = state.getMaze();\n Cell[][] tabcells = maze.getCells();\n int rangebomb = playerposingbomb.getBombRange();\n int x = cellbomb.getX();\n int y = cellbomb.getY();\n int i = 0;\n for(i=0;i<=rangebomb;i++){\n if((x-i>=0)){\n if(tabcells[x-i][y].equals(refugecell)){\n return false;\n }\n }\n if((x+i)<maze.getWidth()){\n if(tabcells[x+i][y].equals(refugecell)){\n return false;\n }\n }\n if((y-i)>=0){\n if(tabcells[x][y-i].equals(refugecell)){\n return false;\n }\n }\n if((y+i)<maze.getHeight()) {\n if(tabcells[x][y+i].equals(refugecell)){\n return false;\n }\n }\n }\n return true;\n }", "public void addBomb() \n {\n if (Greenfoot.isKeyDown(\"space\"))\n getWorld().addObject(new Bomb(), getX(), getY()); \n //add a bomb at the place they press space \n }", "public void draw_Bonus(boolean b) {\n if (b) {\n mazeEditor.mazeDrawMode = DRAW_BONUS_TILE;\n\n Tog1.setState(false); \n Tog2.setState(false); \n Tog3.setState(false); \n Tog4.setState(false);\n Tog5.setState(false);\n Tog6.setState(false);\n }\n }", "private void prepareBomb(int x, int y, GraphicsContext gc) {\n\t\t Bomb bomb = new Bomb(x, y);\n\t\t GameController.getCurrentMap().addEntity(bomb, x, y);\n\t\t Thread thread = new Thread(() -> {\n\t\t try {\n\t\t Thread.sleep(2000);\n\t\t Platform.runLater(new Runnable() {\n\n\t\t @Override\n\t\t public void run() {\n\t\t bomb.bomb();\n\t\t }\n\n\t\t });\n\t\t GameController.getCurrentMap().removeEntity(x, y);\n\t\t drawGameBoard(gc, index);\n\n\t\t // GameController.getCurrentMap().addEntity(bomb, x, y);\n\t\t } catch (InterruptedException e) {\n\t\t // TODO Auto-generated catch block\n\t\t e.printStackTrace();\n\t\t }\n\t\t });\n\t\t thread.start();\n\n\t}", "private void tick() {\n keyManager.tick();\n if (keyManager.pause == false) {\n if (gameOver) {\n\n // advancing player with colision\n player.tick();\n //if there's a shot.\n\n int alienBombIndex = (int) (Math.random() * aliens.size());\n for (int i = 0; i < aliens.size(); i++) {\n Alien alien = aliens.get(i);\n alien.tick();\n if (shotVisible && shot.intersectAlien(alien)) {\n Assets.hitSound.play();\n alien.setDying(true);\n alien.setDeadCounter(6);\n shotVisible = false;\n }\n \n if(alien.isDead()){\n aliens.remove(i);\n if (aliens.size() == 0) {\n gameOver = false;\n }\n }\n\n alien.act(direction);\n }\n\n //Controlar el movimiento de los aliens\n for (Alien alien : aliens) {\n int x = alien.getX();\n if (x >= getWidth() - 30 && direction != -1) {\n direction = -1;\n alien.setDirection(-1);\n Iterator i1 = aliens.iterator();\n while (i1.hasNext()) {\n Alien a2 = (Alien) i1.next();\n a2.setY(a2.getY() + 15);\n }\n }\n if (x <= 5 && direction != 1) {\n direction = 1;\n alien.setDirection(1);\n Iterator i2 = aliens.iterator();\n while (i2.hasNext()) {\n Alien a = (Alien) i2.next();\n a.setY(a.getY() + 15);\n }\n }\n }\n\n //Controlar el spawning de las bombas\n Random generator = new Random();\n for (Alien alien : aliens) {\n int num = generator.nextInt(15);\n Bomb b = alien.getBomb();\n\n if (num == CHANCE && b.isDestroyed()) {\n b.setDestroyed(false);\n b.setX(alien.getX());\n b.setY(alien.getY());\n }\n\n b.tick();\n if (b.intersecta(player)) {\n Assets.deathSound.play();\n player.die();\n gameOver = false;\n }\n\n }\n\n if (shotVisible) {\n shot.tick();\n }\n if (!player.isDead() && keyManager.spacebar) {\n shoot();\n Assets.shotSound.play();\n }\n for (int i = 0; i < aliens.size(); i++) {\n if (aliens.get(i).getY() > 500) {\n gameOver = false;\n }\n }\n\n }\n }\n /// Save game in file\n if (keyManager.save) {\n try {\n\n vec.add(player);\n vec.add(shot);\n if(keyManager.pause){\n vec.add(new String(\"Pause\")); \n } else if (!gameOver){\n vec.add(new String(\"Game Over\"));\n } else {\n vec.add(new String(\"Active\"));\n }\n for (Alien alien : aliens) {\n vec.add(alien);\n }\n //Graba el vector en el archivo.\n grabaArchivo();\n } catch (IOException e) {\n System.out.println(\"Error\");\n }\n }\n /// Load game\n if (keyManager.load == true) {\n try {\n //Graba el vector en el archivo.\n leeArchivo();\n } catch (IOException e) {\n System.out.println(\"Error en cargar\");\n }\n }\n\n }", "public void makeTombstone()\r\n\t\t{\r\n\t\t\tisTombstone = true;\r\n\t\t}", "void testBigBang(Tester t) {\r\n initData();\r\n FloodItWorld g = this.runGame;\r\n int worldWidth = 1000;\r\n int worldHeight = 1000;\r\n double tickRate = .012;\r\n g.bigBang(worldWidth, worldHeight, tickRate);\r\n }", "BossEnemy(){\n super();\n totallyDied = true;\n }", "private void tankWillShoot(Graphics2D g2d, GameState state) {\n if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() > 0 && state.getGunType() % 2 == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfCannonBullet(tankObject.getNumOfCannonBullet() - 1);\n if (tankObject.getCannonLevel() == 1) {\n state.getMissiles().add(new Missile(state, 15));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (tankObject.getCannonLevel() == 2) {\n state.getMissiles().add(new Missile(state, 30));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n } else if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() == 0 && state.getGunType() % 2 == 1) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n state.setMouseClicked(false);\n }\n for (Missile missile : state.getMissiles()) {\n missile.paint(g2d, state);\n }\n if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() > 0 && state.getGunType() % 2 == 0) {\n if (numOfRenderBullet1 == 0 && tankObject.getMachineGunLevel() == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 20));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet2 == 0 && tankObject.getMachineGunLevel() == 2) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 30));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet1 <= 7) {\n numOfRenderBullet1++;\n }\n if (numOfRenderBullet1 == 7) {\n numOfRenderBullet1 = 0;\n }\n if (numOfRenderBullet2 <= 3) {\n numOfRenderBullet2++;\n }\n if (numOfRenderBullet2 == 3) {\n numOfRenderBullet2 = 0;\n }\n }\n else if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() == 0 && state.getGunType() % 2 == 0) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n }\n for (Bullet bullet : state.getBullets()) {\n bullet.paint(g2d, state);\n }\n }", "private void bombDifficulty(int maxBombs) {\r\n int randomRow;\r\n int randomCol;\r\n for(int bombAmount = 0; bombAmount < maxBombs;){\r\n randomRow = rand.nextInt(map.length-1);\r\n randomCol = rand.nextInt(map[0].length-1);\r\n if(map[randomRow][randomCol].getSafe() == false){\r\n //Do nothing. Checks if same row col is not chosen again\r\n }\r\n else {\r\n map[randomRow][randomCol].setSafe(false);\r\n if (TESTING_MODE) {\r\n map[randomRow][randomCol].setVisual(bomb);\r\n\r\n }\r\n bombAmount++;\r\n }\r\n }\r\n }", "@Override\r\n public boolean dye() {\r\n if (getX() > 3100 || getX() < 10 || getY() < 10 || getY() > 3100) {\r\n return true;\r\n }\r\n// int pixel = mapRGB.getRGB((int) getX(), (int) getY());\r\n// int red = (pixel >> 16) & 0xff;\r\n// if(red==255){this.handler.getWaves().removeEnemy(); return true;}\r\n int k = collision(velX, velY, this.getX(), this.getY());\r\n if(k!=0) {\r\n this.handler.getWaves().removeEnemy(); \r\n return true;\r\n }\r\n else{\r\n zombie_x = getX(); \r\n zombie_y = getY();\r\n }\r\n //I proiettili hanno una portata limitata o se ha colpito il player o se è uscito dalla mappa o se è andato contro un muro\r\n if ((this.getHealth() == 0) || (handler.getPlayer().getBounds().contains(getX(), getY()))) {\r\n int n = (int) (Math.random() * 10);\r\n if(n>1) n=2;\r\n switch (n) {\r\n case 2:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 3, 200, 25, handler.getPlayer(), this.handler, 30, 60, 60, 5, new Animation(Assets.zombie, 20), new Animation(Assets.zombieAttack, 35), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 0:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 4, 70, 50, handler.getPlayer(), this.handler, 0, 60, 60, 20, new Animation(Assets.zombie2, 15), new Animation(Assets.zombie2Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 1:\r\n this.handler.addSprite(new SpittleZombie(zombie_x, zombie_y, 3, 500, 40, handler.getPlayer(), this.handler, 0, 60, 60, 45, new Animation(Assets.zombie3, 15), new Animation(Assets.zombie3Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n }\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "public boolean tick(){\n\t\tif(System.currentTimeMillis() - time > TICK_TIME){\n\t\t\tif(this.getSprite().equals(\"bomb1.gif\")){\n\t\t\t\tthis.setSprite(\"bomb2.gif\");\n\t\t\t}else{\n\t\t\t\tthis.setSprite(\"bomb1.gif\");\n\t\t\t}\n\t\t\ttime = System.currentTimeMillis();\n\t\t\tif(--maxTicks <= 0){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn exploded;\n\t}", "public void drawBomber(Graphics g){\n\t\t\tif (exists){\n\t\t\t\tif (!startredtimer){ //if everything is normal\n\t\t\t\t\t\n\t\t\t\t\tg.setColor(Color.white);\n\t\t\t\t\tg.fillOval(x,y+10,100,30);\n\t\t\t\t\tg.fillOval(x+25,y,50,20);\n\t\t\t\t}\n\t\t\t\telse{ //if it needs to be in red because it has recently been hit by something\n\t\t\t\t\t\n\t\t\t\t\tg.setColor(Color.red);\n\t\t\t\t\tg.fillOval(x,y +10,100,30);\n\t\t\t\t\tg.fillOval(x+25,y,50,20);\n\t\t\t\t}\n\t\t\t\tg.setColor(Color.RED);\n\t\t\t\tg.drawRect(x,y-15,100,4);\n\t\t\t//\tg.drawRect(x,y-15,100,2);\n\t\t\t\tg.fillRect(x, y-15, health*25, 4); \n\t\t\t\t\n\t\t\t}\n\t\t\telse if(startboomtimer) { //if the plane has been destroyed and you want to draw it in red\n\t\t\t\tif (boomtimer<5) { g.drawImage(boom, x,y, 100, 100, null);}\n\t\t\t\telse if (boomtimer < 10) g.drawImage(boom, x + 38, y + 12, 50, 50, null);\n\t\t\t\telse if (boomtimer == 15) startboomtimer = false;\n\t\t\t\tboomtimer++;\n\t\t\t\t\n\t\t\t}\t\n\t\t\tif (dropping)b.drawBomb(g); //draws the bomb if the bomb is dropping only\n\n\t\t}", "public void onScannedRobot(ScannedRobotEvent e)\n {\n BadBoy en = (BadBoy)enemies.get(e.getName());\n \n if(en == null){\n en = new BadBoy();\n enemies.put(e.getName(), en);\n }\n \n \n en.hp = true;\n en.energy = e.getEnergy();\n en.pos = hallarPunto(myPos, e.getDistance(), getHeadingRadians() + e.getBearingRadians());\n \n // normal target selection: the one closer to you is the most dangerous so attack him\n //si no le queda vida al objetivo actual CHANGE TARGET m8\n \n if(!objetivo.hp || e.getDistance() < myPos.distance(objetivo.pos)) {\n objetivo = en;\n }\n \n \n }", "public void tickBombs() {\r\n\t\tfor (int i = 0; i < bombs.length; i++) {\r\n\t\t\tBomb b = bombs[i];\r\n\t\t\tif (b != null) {\r\n\t\t\t\tif (b.isTicking()) {\r\n\t\t\t\t\tb.tick();\r\n\t\t\t\t} else if (b.isExploding()) {\r\n\t\t\t\t\tif (b.getExplosionTicks() == b.getMaxExplosionTicks()) {\r\n\t\t\t\t\t\texplodeBomb(b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tb.tick();\r\n\t\t\t\t} else if (b.hasFinished()) {\r\n\t\t\t\t\tclearExplosions(b);\r\n\t\t\t\t\tbombs[i] = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean checkBombCollision(){\n\t\tint tempNum=Physics.hitBomb(this, game.getBombList());\n\t\tif(tempNum!=-1){\n\t\t\tfor(int i=0;i<game.getBombList().get(tempNum).initiallyOnBomb.size();i++){\n\t\t\t\tif(game.getBombList().get(tempNum).initiallyOnBomb.get(i)==this){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void addBomb() {\n\t\tthis.nbSpiritBombs++;\n\t}", "public void plantBomb(Player plantingPlayer, Bomb plantedBomb) {\r\n\t\tarena.setTile(plantingPlayer.getTileCoordinate(), plantedBomb);\r\n\t\tint id = plantingPlayer.getId();\r\n\t\tfor (int curId = id; curId < id + plantingPlayer.getMaxBombs(); curId++) {\r\n\t\t\t// search the area in the bomb array of a player for free entries (=\r\n\t\t\t// null entries)\r\n\t\t\tif (bombs[curId] == null) {\r\n\t\t\t\tbombs[curId] = plantedBomb;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean canBombThisEnemyAndRunSafe(Player p1, Player p2){\n Maze maze = state.getMaze();\n Cell[][] tabcells = maze.getCells();\n //Cells in range of p1 corresponds to the cells p1 can put a bomb on associated with the number of moves needed\n //to go to the cell where p1 would be when putting the bomb\n ArrayList<Journey> journeysinrangeofp1 = new ArrayList<Journey>();\n //Available moves to flee represents how many moves p1 would still have to run away from its bomb\n int availablemovestoflee;\n //Available cells to flee represents the cells p1 can run to after putting the bomb\n List<Cell> availablecellstoflee = new ArrayList<>();\n List<Cell> bombingavailableslots = new ArrayList<Cell>();\n //Bombing available slots corresponds to the cells where a bomb could be placed to kill p2\n for(int i = 0; i<=p1.getBombRange();i++){\n if((p2.getX()-i)>=0){\n bombingavailableslots.add(tabcells[p2.getX()-i][p2.getY()]);\n }\n if((p2.getX()+i)<maze.getWidth()){\n bombingavailableslots.add(tabcells[p2.getX()+i][p2.getY()]);\n }\n if((p2.getY()-i)>=0){\n bombingavailableslots.add(tabcells[p2.getX()][p2.getY()-i]);\n }\n if((p2.getY()+i)<maze.getHeight()){\n bombingavailableslots.add(tabcells[p2.getX()][p2.getY()+i]);\n }\n }\n journeysinrangeofp1 = getReacheableCellsInRangeWithPath(tabcells[p1.getX()][p1.getY()],p1.getNumberMoveRemaining()+1);\n for(Journey j:journeysinrangeofp1){\n if(bombingavailableslots.contains(j.getDestinationcell())){\n availablemovestoflee = p1.getNumberMoveRemaining() - j.getNbmoves();\n availablecellstoflee = getReacheableCellsInRange(j.getDestinationcell(), availablemovestoflee);\n for(Cell c: availablecellstoflee){\n if(wouldBeSafeFromBomb(p1,j.getDestinationcell(),c)){\n if(isSafeFromAllPlayersExcept(c,p1,p2)){\n return true;\n }\n }\n }\n }\n }\n return false;\n }", "public void drop() {\n\t\t// Has player waited cooldown before trying to fire again?\n\t\tif (System.currentTimeMillis() - this.lastFired > Config.WEAPON_COOLDOWN_TIME * 1000) {\n\t\t\t\n\t\t\t// Can this airship drop bombs?\n\t\t\tif (this.properties.DROPS_BOMB) {\n\t\t\t\tBlock[] cannons = getCannons();\n\t\t\t\tint numfiredcannons = 0;\n\t\t\t\tfor (int i = 0; i < cannons.length; i++) {\n\t\t\t\t\tif (cannons[i] != null && cannons[i].getRelative(0, -1, 0).getType().equals(Material.AIR) && cannonHasTnt(cannons[i], Config.NUM_TNT_TO_DROP_BOMB)) {\n\t\t\t\t\t\tif (numfiredcannons < this.properties.MAX_NUMBER_OF_CANNONS ) {\n\t\t\t\t\t\t\tnumfiredcannons++;\n\t\t\t\t\t\t\tlastFired = System.currentTimeMillis();\n\t\t\t\t\t\t\twithdrawTnt(cannons[i], Config.NUM_TNT_TO_DROP_BOMB);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Spawn primed tnt firing downwards TODO: maybe add sound effects for tnt firing? :P\n\t\t\t\t\t\t\tTNTPrimed tnt = cannons[i].getWorld().spawn(cannons[i].getLocation().clone().add(0, -1, 0), TNTPrimed.class);\n\t\t\t\t\t\t\ttnt.setVelocity(new Vector(0, -0.5, 0));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// More cannons on ship than allowed. Not all fired - can break out of loop now.\n\t\t\t\t\t\t\tplayer.sendMessage(ChatColor.AQUA + \"Some cannons did not fire. Max cannon limit is \" + ChatColor.GOLD + this.properties.MAX_NUMBER_OF_CANNONS);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + this.properties.SHIP_TYPE + \" CANNOT DROP BOMBS\");\n\t\t} else\n\t\t\tplayer.sendMessage(ChatColor.GOLD + \"COOLING DOWN FOR \" + ChatColor.AQUA + (int)(Math.round(6 - (System.currentTimeMillis() - this.lastFired) / 1000)) + ChatColor.GOLD + \" MORE SECONDS\");\n\t}", "public GameObject spawnBomber(LogicEngine in_logicEngine){\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bomber.png\",((float)LogicEngine.SCREEN_WIDTH)+50,LogicEngine.SCREEN_HEIGHT-50,0);\r\n\t\tship.i_animationFrameSizeHeight = 58;\r\n\t\tship.i_animationFrameSizeWidth = 58;\r\n\t\t\r\n\t\t//fly back and forth\r\n\t\tLoopWaypointsStep s = new LoopWaypointsStep();\r\n\t\ts.waypoints.add(new Point2d(-30,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\ts.waypoints.add(new Point2d(LogicEngine.SCREEN_WIDTH+50,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\t\r\n\t\tship.b_mirrorImageHorizontal = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(s);\r\n\t\tship.v.setMaxForce(5.0f);\r\n\t\tship.v.setMaxVel(5.0f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\r\n\r\n\t\t//tadpole bullets\r\n\t\tGameObject go_tadpole = this.spawnTadpole(in_logicEngine);\r\n\t\tgo_tadpole.stepHandlers.clear();\r\n\t\tFlyStraightStep fly = new FlyStraightStep(new Vector2d(0,-0.5f));\r\n\t\tfly.setIsAccelleration(true);\r\n\t\t\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t{\tgo_tadpole.v.setMaxVel(5);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\telse\r\n\t\t{\tgo_tadpole.v.setMaxVel(10);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\tgo_tadpole.stepHandlers.add(fly);\r\n\t\tgo_tadpole.v.setVel(new Vector2d(-2.5f,0f));\r\n\t\t\r\n\t\t\r\n\t\t//bounce on hard and medium\r\n\t\tif(Difficulty.isHard() || Difficulty.isMedium())\r\n\t\t{\r\n\t\t\tBounceOfScreenEdgesStep bounce = new BounceOfScreenEdgesStep();\r\n\t\t\tbounce.b_sidesOnly = true;\r\n\t\t\tgo_tadpole.stepHandlers.add(bounce);\r\n\t\t}\r\n\t\t\r\n\t\t//drop bombs\r\n\t\tLaunchShipsStep launch = new LaunchShipsStep(go_tadpole, 20, 5, 3, true);\r\n\t\tlaunch.b_addToBullets = true;\r\n\t\tlaunch.b_forceVelocityChangeBasedOnParentMirror = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(launch);\r\n\t\tship.rotateToV=true;\r\n\t\t\r\n\t\t//give it some hp\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 50, 50f);\r\n\t\tc.setSimpleExplosion();\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t\r\n\t}", "@EventHandler\n\tpublic void attackMobs(EntityDamageByEntityEvent e) {\n\t\tMessages messagesConfig = plugin.getMsgs();\n\n\t\tif (e.getCause().equals(EntityDamageEvent.DamageCause.PROJECTILE)) { //Just my magic code w(o.o)w\n\t\t\treturn;\n\t\t}else if (e.getDamager() instanceof Player) {\n\t\t\tPlayer p = (Player) e.getDamager();\n\t\t\tItemStack pInv = p.getInventory().getItemInMainHand();\n\n\t\t\tif (!pInv.getType().name().contains(\"SWORD\") && !pInv.getType().name().contains(\"AXE\")) {\n\t\t\t\tif (!(e.getEntity() instanceof Chicken)) {\n\t\t\t\t\te.setCancelled(true);\n\n\t\t\t\t\tif (canSendMessage(p.getUniqueId()))\n\t\t\t\t\t\tp.sendMessage(StringUtil.inColor(messagesConfig.getCantHitWithoutSword()));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void Boom()\r\n {\r\n image1 = new GreenfootImage(\"Explosion1.png\");\r\n image2 = new GreenfootImage(\"Explosion2.png\");\r\n image3 = new GreenfootImage(\"Explosion3.png\");\r\n image4 = new GreenfootImage(\"Explosion4.png\");\r\n image5 = new GreenfootImage(\"Explosion5.png\");\r\n image6 = new GreenfootImage(\"Explosion6.png\");\r\n setImage(image1);\r\n\r\n }", "@Override\r\n public void onHit(int damage){\n if(box2body != null){\r\n hp -= damage;\r\n screen.getGameManager().get(\"Sounds/orc-34-hit.wav\", Sound.class).play();\r\n if(this.hp <= 0) {\r\n screen.bodiesToDelete.add(box2body);\r\n deleteFlag = true;\r\n screen.spawnedCreatures.remove(this);\r\n screen.getGameManager().get(\"Sounds/orc-32-death.wav\", Sound.class).play();\r\n\r\n //Award Experience\r\n screen.getPlayer().awardExperience(this.experienceValue);\r\n screen.getPlayer().increaseKillCount();\r\n }\r\n }\r\n //Attack player when damaged\r\n //Prevents player from sniping monsters using Wander AI\r\n if(currentState != State.ATTACKING){\r\n Vector2 orcPosition = new Vector2(box2body.getPosition().x, box2body.getPosition().y);\r\n Vector2 playerPosition = new Vector2(screen.getPlayer().box2body.getPosition().x, screen.getPlayer().box2body.getPosition().y);\r\n\r\n currentState = State.HASBEENATTACKED;\r\n velocity = new Vector2(playerPosition.x - orcPosition.x, playerPosition.y - orcPosition.y);\r\n box2body.setLinearVelocity(velocity.scl(speed));\r\n }\r\n }", "public void hitBJ() {\n\t\tif (blackjack.isOkBet()) {\n\t\t\tif (blackjack.getCount(1, false, 21)) {\n\t\t\t\t((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)).addCard(blackjack.giveCard(1), 1);\n\t\t\t\tif (blackjack.getCount(1, true, 21)) {\n\t\t\t\t\tblackjack.playerLoses();\n\t\t\t\t\tJOptionPane.showMessageDialog(manager.getPanel(Constants.BJ_VIEW_NAME), \"You lose!\", \"BUSTED\",\n\t\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\tresetBJTable();\n\t\t\t\t}\n\t\t\t}\n\t\t} else\n\t\t\tJOptionPane.showMessageDialog(manager.getPanel(Constants.BJ_VIEW_NAME), \"You must bet something\", \"ERROR\",\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t}", "public void activate(Player player) {\n\t\tstate = state.activateBomb(this, player);\n\t\tBomb bombRef = this;\n\t\t\n\t\tTimer timer = new Timer();\n\t\t\n\t\tTimerTask task = new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tstate.explode(bombRef, player);\n\t\t\t}\n\t\t};\n\t\t\n\t\tTimerTask task2 = new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\tplayer.getDungeon().removeEntity(bombRef);\n\t\t\t\tbombRef.setVisualStatus(1);\n\t\t\t}\n\t\t};\n\t\ttimer.schedule(task, 1500);\n\t\ttimer.schedule(task2, 2000);\n\t}", "private void killBullet() {\r\n this.dead = true;\r\n }", "public static void bullyAttack(){\n int punch = player.getHealth() - bullyHitPoints ;\n player.setHealth(punch);\n //Step 2: Conditional dialogue\n if(bullyHitPoints > 50) {\n System.out.println(textparser.getMassiveDamage() + bullyHitPoints + textparser.getToYou());\n }else if(bullyHitPoints > 25){\n System.out.println(textparser.getPunch() + bullyHitPoints + textparser.getToYou());\n }else{\n System.out.println(textparser.getDidntHurtMuch() + bullyHitPoints + textparser.getToYou());\n }\n }", "void bust() {\n\t\t_loses++;\n\t\t//_money -= _bet;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}", "public GameObject spawnBigBeamer(LogicEngine in_logicEngine) {\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bigbeamer.png\",((float)LogicEngine.SCREEN_WIDTH/2),LogicEngine.SCREEN_HEIGHT+64,0);\r\n\t\tship.i_animationFrameSizeHeight = 115;\r\n\t\tship.i_animationFrameSizeWidth = 115;\r\n\t\t\r\n\t\t\r\n\t\tship.stepHandlers.add(new FlyStraightStep(new Vector2d(0,-1f)));\r\n\t\t\r\n\t\r\n\t\tship.v.setMaxForce(2.5f);\r\n\t\tship.v.setMaxVel(2.5f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tint i_shootEvery = 80;\r\n\t\t\r\n\t\tBeamShot b = new BeamShot(i_shootEvery);\r\n\t\t\r\n\t\tb.b_flare=false;\r\n\t\tb.f_offsetX=-40;\r\n\t\tb.f_offsetY=-30;\r\n\t\tb.i_delay = 40;\r\n\t\tb.i_beamWidth = 15;\r\n\t\t\r\n\t\tBeamShot b2 = new BeamShot(i_shootEvery);\r\n\t\tb2.b_flare=false;\r\n\t\tb2.f_offsetX=40;\r\n\t\tb2.f_offsetY=-30;\r\n\t\tb2.i_delay = 40+(i_shootEvery/2);\r\n\t\tb2.i_beamWidth = 15;\r\n\t\tb.nextBeam = b2;\r\n\t\t\r\n\t\tship.shootEverySteps=1;\r\n\t\tship.shotHandler = b;\r\n\t\t\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 100, 50f);\r\n\t\t\r\n\t\tif(!Difficulty.isHard())\r\n\t\t\tc.f_numberOfHitpoints = 200;\r\n\t\tif(!Difficulty.isMedium())\r\n\t\t\tc.f_numberOfHitpoints = 160;\r\n\t\t\r\n\t\tc.setExplosion(Utils.getBossExplosion(ship));\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t}", "public void tick()\n{\n y+=speed;\n\n for(int i=0; i<game.ea.size(); i++)\n {\n EntityA tempEnt= game.ea.get(i);\n if(Physics.Coliision(this,tempEnt))\n {\n c.removeEntity(tempEnt); //zeby po trafieniu znikal pocisk\n c.removeEntity(this);\n game.setEnemy_killed(game.getEnemy_killed()+1);\n\n }\n }\n\n/*\n* If Enemy is out of bounds player get - points\n* and loses some stamina.\n*\n* Enemies are removed from list after disapears\n */\n\n if(y>(App.getHEIGHT()-20)*2)\n {\n App.addHealth(-10);\n App.addPOINTS(-3);\n c.removeEntity(this);\n }\n\n anim.runAnimation();\n\n /*\n * If App is not in game state it doesn't\n * need to have any enemies\n */\n\n if(App.State != App.STATE.GAME)\n {\n delEnemies();\n\n }\n}", "@Override\n\tpublic void action() {\n\t if (firingBall.getY() + firingBall.getRadius() < this.y) { \n\t //deactivate absorber locally and in GameBoard\n\t firingBall = null;\n\t gb.removeFromActiveList(this);\n\t }\n\t}", "private void deliverBomb(Player me, Location location) \n {\n for (int i = 0; i < NUMBER_OF_BOMBS; i++) \n {\n double plusX = Math.random() * 5;\n if ((Math.random() * 10) < 6) \n {\n \t plusX = (0 - plusX);\n }\t\t\t\n double plusZ = Math.random() * 5;\n if ((Math.random() * 10) < 6) \n {\n plusZ = (0 - plusZ);\n }\n Location newLocation = new Location(location.getWorld(),\n location.getX() + plusX, \n location.getY() + (Math.random() + 20),\n location.getZ() + plusZ);\n // This spawns the creeper at the location provided\n me.getWorld().spawn(newLocation, Creeper.class);\n } \n }", "static void removeBomb(int x, int y)\r\n {\r\n Map<Integer,Integer> map = new HashMap<Integer, Integer>();\r\n damagedBombs.put(x, map); \r\n damagedBombs.get(x).put(y,0);\r\n \r\n /*\r\n if(twoSecondBombs.get(x) != null)\r\n twoSecondBombs.get(x).remove(y);\r\n \r\n if(oneSecondBombs.get(x) != null)\r\n oneSecondBombs.get(x).remove(y);\r\n */\r\n }", "public void checkBombs() {\n for (Bomb bomb : bombs) {\n if (ship.intersects(bomb)) {\n ship.die();\n bomb.die();\n }\n\n if (bomb.getY() >= height)\n bomb.die();\n }\n }", "public void activar(Bomberman b) {\n \tmapa.destruirPowerUp(celda);\n \tcelda=null;\n \tb.masacrallity();\n \tb.aumentarPuntaje(puntosAOtorgar);\n }", "@Override\n\tpublic void onCollision(WorldObj obj) {\n\t\tif(obj.removalFlag)\n\t\t\treturn;\n\t\t\n\t\t\n\t\tif(obj.item != null) {\n\t\t\t\n\t\t\t\n\t\t\tif(obj.stateTime > 0.2f) {\n\t\t\t\tAddItemToBag(obj.item,obj.stack);\n\t\t\t\tobj.removalFlag = true;\n\t\t\t\t\n\t\t\t\tGdx.app.debug(\"\", \"\"+obj.stack);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tsuper.onCollision(obj);\n\t}", "private void BombAction(Bomb n, int i, int j) {\n\t\tModel model = this.board.getModel(i, j + 1);\n\t\tif (model instanceof AbstractZombie) {\n\t\t\tthis.board.removeModel(n, i, j);\n\t\t\tmodel.setHp(-1);\n\n\t\t}\n\t}", "private void attack() {\n final Random rnd = new Random();\n // Создаем WorkerThread\n attackerExecutor = Executors.newScheduledThreadPool(1);\n mAttackExecuter = attackerExecutor.scheduleWithFixedDelay(new Runnable() {\n @Override\n public void run() {\n for (int i =0; i<enemyPerWave;i++){\n int x = (int) (rnd.nextInt((int) (rightBorder-leftBorder))+leftBorder);\n\n createBossBall(x,0);\n }\n attackRatee-=attackLiveRate;\n if (attackRatee < 100){\n mAttackExecuter.cancel(true);\n attackerExecutor.shutdownNow();\n\n }\n }\n }, 0,attackLiveRate , TimeUnit.MILLISECONDS);\n\n }", "void dropHandler() {\n if (tickSpeed < 0) {\n if((int)random(1,6) == 1){ //every 6 medkits the handler drops a minigun\n Sprite mg = new Sprite(minigun);\n mg.moveToPoint(random(0,2048), random(0, 2048)); //moves drop to random point\n minigunDrop.add(mg);\n tickSpeed = (int)random(100,500);\n }else if((int)random(1,4) == 1){ //every 4 medkits the handler drops a coilgun\n Sprite cg = new Sprite(coilgun);\n cg.moveToPoint(random(0,2048), random(0,2048)); //moves drop to random point\n coilgunDrop.add(cg);\n tickSpeed = (int)random(100,500); //changes \n }\n else {\n \n \n Medkit hp = new Medkit();\n hp.med.moveToPoint(random(0, 2048), random(0, 2048));\n\n health.add(hp);\n\n tickSpeed = (int)random(100,500);\n }\n }\n tickSpeed--;\n for (Medkit hp: health) {\n hp.med.display();\n hp.timer--;\n\n }\n for (Sprite mg: minigunDrop){\n mg.display();\n }\n for (Sprite cg: coilgunDrop){\n cg.display();\n }\n // e.forward(5);\n}", "public void removeBomb(Bomb b) {\r\n this.bombs.remove(b);\r\n }", "public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }", "public void paintComponent(Graphics g){\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.black);\n\t\t\tg.fillRect(0,0,getWidth(), getHeight());//paints the background black\n\t\t\tt.drawTank(g);//draws the tank\n\t\t\tboolean b = false;\n\t\t\tfor (int i = 0; i < t.bullets.size(); i++){ //draws the bullets. if the bullets either hit a plane or go off the screen, they are removed from the array to not clog up memory\n\t\t\t\tt.bullets.get(i).drawBullet(g);\n\t\t\t\tt.bullets.get(i).move();\n\n\t\t\t\tfor (int j = 0; j < bombers.size(); j++){ //draws the bombers, removes them if they are shot down\n\t\t\t\t\tif (bombers.get(j).checkHit(t.bullets.get(i))) {t.bullets.remove(i); b = true; break;}\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif (!b)\n\t\t\t\t\tif (t.bullets.get(i).bx < 0 || t.bullets.get(i).bx > 1090 || t.bullets.get(i).by < 0 || t.bullets.get(i).by > 730) t.bullets.remove(i);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < bombers.size(); i ++){ \n\t\t\t\tbombers.get(i).drawBomber(g);\n\t\t\t}\n\t\t \tif (t.lost == true){ //manages the loosing of the game\n\t\t\t\t\n\t\t\t\tif (t.startboomtimer){\n\t\t\t\t\tif (t.boomtimer < 10) g.drawImage(boom2, t.x +25, 565, 100, 60, null);\n\t\t\t\t\telse if (t.boomtimer < 20) g.drawImage(boom2, t.x,535, 150,100,null);\n\t\t\t\t\telse if (t.boomtimer == 30) t.startboomtimer = false;\n\t\t\t\t\tt.boomtimer ++;\n\t\t\t\t}\n\t\t\t\tg.setColor(Color.WHITE);\n\t\t\t\tg.setFont(new Font(\"Times New Roman\", Font.BOLD, 50));\n\t\t\t\tg.drawString(\"YOU LOST :(\", 400, 300);\n\t\t\t\tif (t.onetime == 31){ //this method adds a question panel so that when you loose you can revive yourself with the questions\n\t\t\t\t\t\n\t\t\t\t\tmoveframe = new JFrame (\"Move on\");\n\t\t\t\t\t\n\t\t\t\t\tmoveframe.setSize(510,320);\n\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\tQuestion question1 = questions.get(rand.nextInt(questions.size())); //selects 2 seperate questions from the question array to be used\n\t\t\t\t\tQuestion question2;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tquestion2 = questions.get(rand.nextInt(questions.size()));\n\t\t\t\t\t} while(question2.equals(question1));\n\t\t\t\t\t\n\t\t\t\t\tmoveframe.getContentPane().add(new QuestionPanelLoss(question1, question2, 0), BorderLayout.CENTER); //adds the questionpanel\n\t\t\t\t\tmoveframe.setLocationRelativeTo(null);;\n\t\t\t\t\tmoveframe.setVisible(true);\n\n\t\t\t\t\t\n\t\t\t\t\ttime.stop();\n\t\t\t\t}\n\t\t\t\tt.onetime ++ ;\n\t\t\t\n\t\t\t}\n\n\n\t\t}", "public void breakWall() {\r\n\tbustedWall = true;\r\n}", "public void addBombStatus(final boolean bombDrop) {\n\t\tif (bombDrop) {\n\t\t\tbomb = \"bomb 1\";\n\t\t} else {\n\t\t\tbomb = \"bomb 0\";\n\t\t}\n\t}", "@Override\n void planted() {\n super.planted();\n TimerTask Task = new TimerTask() {\n @Override\n public void run() {\n\n for (Drawable drawables : gameState.getDrawables()) {\n if (drawables instanceof Zombie) {\n int distance = (int) Math.sqrt(Math.pow((drawables.x - x), 2) + Math.pow((drawables.y - y), 2));\n if (distance <= explosionradious) {\n ((Zombie) drawables).hurt(Integer.MAX_VALUE);\n }\n }\n }\n\n life = 0;\n }\n\n };\n\n Timer timer = new Timer();\n timer.schedule(Task, 2000);\n }", "public DumbEnemy(){\n setImage(new GreenfootImage(SPRITE_W,SPRITE_H));\n }", "public void bossReset(){\n bossTimer.start();\n this.getView().setTranslateX(x);\n this.getView().setTranslateY(y);\n this.getView().setRotate(0);\n bossTimer.start();\n setHitPoints(getDefaultHp());\n }", "void DoMining(float x, float y) {\n\t\tWorld world = World.CurrentWorld;\n\t\t\n\t\tMapRenderer.CurrentRenderer.ItemAnimation = null;\n\t\t\tmineTime = 0;\n\t\t\tlastDamaged.set(x,y);\n\t\t\n\t\t\tInvObject item = null;\n\t\t\tif(inventory.BagItem[inventory.currSelected][1] > 0)\n\t\t\t\titem = inventory.Items[inventory.BagItem[inventory.currSelected][0]];\n\t\t\tint delay = 100;\n\t\t\tif(item != null)\n\t\t\t\tdelay = item.Delay;\n\t\t\n//\t\t\tif(TimeUtils.millis() - LastUsed > delay)\n//\t\t\t{\n\t\t\t\tif(inventory.BagItem[inventory.currSelected][1] > 0)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tprog2.x = pos.x+0.5f;\n\t\t\t\t\tprog2.y = pos.y+0.5f;\n\t\t\t\t\tMapRenderer.CurrentCam.project(prog2);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tRay projectCoordinates = MapRenderer.CurrentCam.getPickRay(Gdx.input.getX(0), Gdx.input.getY(0));\n\t\t\t\t\tfloat x2 = (projectCoordinates.origin.x);\n\t\t\t\t\tfloat y2 = (projectCoordinates.origin.y);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tfloat angle = (float) Math.toDegrees(MathUtils.atan2(y-prog2.y, x-prog2.x));\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(World.CurrentWorld.isClient) {\n\n\t\t\t\t\t\tWorld.CurrentWorld.client.serverBob.remoteOnUse((int)x2,(int)y2,angle);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(World.CurrentWorld.server != null) {\n\t\t\t\t\t\tonServerUse(item,x2,y2,angle);\n\t\t\t\t\t}\n\t\t\t\t\tif(item.HoldTouch) {\n\t\t\t\t\titem.OnUse(this,x2, y2,angle);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(Gdx.input.justTouched())\n\t\t\t\t\t\t\titem.OnUse(this,x2, y2,angle);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tLastUsed = TimeUtils.millis();\n//\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t}", "@Override\n public boolean collide(Entity e) {\n if (e.isExplosion() || (e.isBomb() && (((Bomb) e).isMissile()))) {\n kill();\n ArrayList<Mob> m = Board.getInstance().getMobsAtExcluding(this.getXTile(), this.getYTile(), this);\n for (Mob mob1 : m) {\n if (mob1.isAlive()) {\n mob1.kill();\n }\n }\n return true;\n }\n return false;\n }", "void deathHandler(Enemy e) {\n\n if (e != null) {\n Explosion rip = new Explosion();\n rip.kaboom.moveToPoint(e.eTank.getX(), e.eTank.getY());\n // println(\"made enemy\");\n rip.kaboom.frontAngle(90);\n rip.kaboom.turn(90);\n explosion.add(rip);\n }\n for (Explosion exp: explosion) {\n if (exp.kaboomCounter > 1) {\n exp.kaboom.display();\n }\n // if (exp.kaboomCounter < 1) {\n // explosion.remove(exp);\n // }\n // else {\n exp.kaboomCounter -= 3;\n // println(exp.kaboomCounter);\n // println(explosion.size());\n // }\n }\n\n}", "private void showBomb() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (state[i][j] == 'X')\n stateGame[i][j] = 'X';\n }\n }\n }", "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "public void addBomb(Bomb b){\r\n this.bombs.add(b);\r\n }", "private void checkExplosionKill() {\n\t\t\n\t\texplosion.expand();\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tif (explosion.detectDownwardCollision(a.getX(), a.getY())) {\n\t\t\t\t\ta.setVisibility(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void buyFarm(){\n bought = !bought;\n }", "public void drawBomb(int x, int y) {\n pushMatrix();\n translate(x, y);\n scale(0.4f);\n smooth();\n fill(200);\n quad(10,21,53,21,53,55,10,55);\n fill(150);\n bezier(10,21,18,-4,45,-4,53,21);\n beginShape();\n vertex(3,65);\n vertex(7,95);\n vertex(22,81);\n vertex(40,81);\n vertex(54,95);\n vertex(59,65);\n vertex(49,60);\n vertex(12,60);\n endShape(CLOSE);\n fill(200);\n quad(10,55,53,55,42,77,20,77);\n quad(22,81,40,81,40,77,22,77);\n rect(29,65,3,30);\n fill(150);\n rect(29,58,3,7);\n fill(220);\n rect(10,45,43,10);\n for(int i=0; i<=6; i++){\n noStroke();\n fill(206,12,12);\n quad(13+6*i,46,16+6*i,46,13+6*i,55,10+6*i,55);\n }\n popMatrix();\n}", "public void takeDamage()\n {\n if(getWorld()!= null)\n {\n if(this.isTouching(Enemies.class))\n {\n Life = Life - Enemies.damage;\n if(Life <=0)\n {\n getWorld().removeObject(this);\n Store.wealth += Game.credit;\n }\n }\n }\n }", "private void bust() {\n //Dialog box pop-up\n JOptionPane.showMessageDialog(this, this.getPlayerName() + \" busted with a value of: \" + this.getValue(), \"BUSTED!\", JOptionPane.INFORMATION_MESSAGE);\n busted = true; //Hand busted\n }", "public void act() { \n check = borde(flag);\n if(check == true )\n restaura();\n moveRandom(move);\n if(animationE % 3 == 0){\n checkanimation();\n } \n animationE++; \n alive=checkfire();\n if(alive == true){\n enemyoff();\n } \n \n }", "@Override\n\t\tpublic boolean touchDown(InputEvent event, float x, float y,\n\t\t\t\tint pointer, int button) {\n\t\t\tif(Inventory.CurrentInventory.BagActive)\n\t\t\t\treturn false;\n\t\t\tattack_queue = true;\n\t\t\t\n\t\t\t\n\t\t\treturn super.touchDown(event, x, y, pointer, button);\n\t\t}", "private final void kill() {\n\t\tgrown=false;\t\t\n\t}", "@Test\r\n\tpublic void testDecrementBomb()\r\n\t{\r\n\t\ttestCanPlaceBombBehavior.decrementBomb();\r\n\t\tassertEquals(2,testCanPlaceBombBehavior.countBomb());\r\n\t\t\r\n\t\ttestCanPlaceBombBehavior.decrementBomb();\r\n\t\tassertEquals(1,testCanPlaceBombBehavior.countBomb());\r\n\t}", "@Override\n public void use(AbstractPlayer p, AbstractMonster m) {\n if (this.dontTriggerOnUseCard) {\n if (damage > 0) {\n AbstractDungeon.actionManager.addToBottom(new DamageAction(AbstractDungeon.getRandomMonster(), new DamageInfo(p, damage, damageTypeForTurn), AttackEffect.BLUNT_HEAVY));\n }\n otherCardsPlayed = 0;\n }\n }", "public void attack(Entity entity, boolean aoe) {\n if(aoe) entity.damaged((int) (this.damage*0.6));\n else entity.damaged(this.damage);\n if(entity.isDead()){\n incExp(entity.getLevel()*9);\n if(entity instanceof Boss) {\n this.bossesDefeated++;\n }\n }\n }", "private void startGame() {\n\t\tfor (int j = 0; j< this.game_.getSaveBaby().size();j++){\n\t\t\tBabyBunnies b = this.game_.getSaveBaby().get(j);\n this.object_batch.begin();\n this.object_batch.draw(img_baby,b.getPosition().y,b.getPosition().x,150,150);\n this.object_batch.end();\n\t\t\tthis.pos=b.getPosition();\n\t\t}\n\n/**\n * Apparition du loup et mv\n * et reset de position quand il va trop loin\n */\n\t\tif ((this.game_.getNbBunnies()%10) == 0 && this.game_.getNbBunnies()!= 0 ){\n\t\t\tthis.game_.hunt(this.pos);\n this.object_batch.begin();\n this.object_batch.draw(wolf,this.game_.getWolf().getPosition().y,this.game_.getWolf().getPosition().x,150,150);\n this.object_batch.end();\n\t\t\tthis.game_.getWolf().move(this.game_.getNbBunnies()/10);\n Gdx.app.log(\"wolf\",\"pos lapon \"+this.game_.getSaveBaby().get(0).getPosition());\n Gdx.app.log(\"wolf\",\"pos du loup \"+this.game_.getWolf().getPosition());\n\t\t}\n\t\tif (this.game_.getWolf().getPosition().y>=width || this.game_.getWolf().getPosition().y<0){\n\t\t\tthis.game_.getWolf().restPost();\n\t\t}\n\n/**\n * Check + mv accelerometre\n */\n\t\tif (this.isOnAccelerometer) {\n\t\t\tif (this.mvX < 0 ){\n this.mvX=height;\n\t\t\t}\n\t\t\tif (this.mvY < 0) {\n this.mvY = width;\n\t\t\t}\n\t\t\tif (this.mvX >height){\n this.mvX=0;\n\t\t\t}\n\t\t\tif (this.mvY> width){\n this.mvY = 0;\n\t\t\t}\n\n this.mvX +=-Gdx.input.getAccelerometerX()*1.50;\n this.mvY += Gdx.input.getAccelerometerY()*2.50;\n\t\t\tthis.game_.getBunnyHood().setPosition((int)(mvX),(int)(mvY));\n\t\t\tcollision();\n this.player_batch.begin();\n this.player_batch.draw(this.img_bunnyHood,this.game_.getBunnyHood().getPosition().y,this.game_.getBunnyHood().getPosition().x,200,200);\n this.player_batch.end();\n\n\t\t\tGdx.app.log(\"Score\",Integer.toString(this.game_.getNbBunnies()));\n\n\t\t}\n\t}", "public void act()\r\n {\n \r\n if (Background.enNum == 0)\r\n {\r\n length = Background.length;\r\n width = Background.width;\r\n getWorld().addObject (new YouWon(), length / 2, width / 2);\r\n \r\n //long lastAdded2 = System.currentTimeMillis();\r\n //long curTime3 = System.currentTimeMillis();\r\n //long curTime3 = System.currentTimeMillis();\r\n //long seconds = curTime3 / 1000;\r\n //sleep = 3;\r\n //try {\r\n //TimeUnit.SECONDS.sleep(sleep);\r\n //} catch(InterruptedException ex) {\r\n //Thread.currentThread().interrupt();\r\n //}\r\n //Greenfoot.delay(3);\r\n //long curTime3 = System.currentTimeMillis();\r\n //long secs2 = curTime3 / 1000;\r\n //long curTime4;\r\n //long secs3;\r\n //do\r\n //{\r\n //getWorld().addObject (new YouWon(), length / 2, width / 2);\r\n //curTime4 = System.currentTimeMillis();\r\n //secs3 = curTime3 / 1000;\r\n //} while (curTime4 / 1000 < curTime3 / 1000 + 3);\r\n //if (System.currentTimeMillis()/1000 - 3 >= secs2)\r\n //{\r\n //do\r\n //{\r\n pause(3000);\r\n Actor YouWon;\r\n YouWon = getOneObjectAtOffset(0, 0, YouWon.class);\r\n World world;\r\n world = getWorld();\r\n world.removeObject(this);\r\n Background.xp += 50;\r\n Background.myGold += 100;\r\n if (Background.xp >= 50 && Background.xp < 100){\r\n Background.myLevel = 2;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 100 && Background.xp < 200){\r\n Background.myLevel = 3;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 200 && Background.xp < 400){\r\n Background.myLevel = 4;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 400 && Background.xp < 800){\r\n Background.myLevel = 5;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 800 && Background.xp < 1600){\r\n Background.myLevel = 6;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 1600 && Background.xp < 3200){\r\n Background.myLevel = 7;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 3200 && Background.xp < 6400){\r\n Background.myLevel = 8;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 6400 && Background.xp < 12800){\r\n Background.myLevel = 9;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 12800){\r\n Background.myLevel = 10;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n }\r\n //curTime3 = System.currentTimeMillis();\r\n //secs2 = curTime3 / 1000;\r\n //index2++;\r\n //Greenfoot.setWorld(new YouWon());\r\n //lastAdded2 = curTime3;\r\n //}\r\n //} while (index2 <= 0);\r\n }\r\n }", "@Override\n protected boolean preUseCheck(Event event, ItemStack item) {\n return event instanceof EntityShootBowEvent && new Random().nextDouble()<level/20 && ((EntityShootBowEvent)event).getEntity().hasPermission(\"rayken.unsafe\");\n }", "public void playerHasInvincibility() {\n\t\tthis.state = canBeKilled;\n\t}", "public Bomb(Position posn) {\n\t\tthis.posn = posn;\n\t\tthis.fuseLength = Bomb.DEFAULT_FUSE_LENGTH;\n\t\tthis.dropTime = System.nanoTime();\n\t\tthis.explode = false;\n\t}", "public void throwBait() {\n\t\tpokemon.eatBait();;\n\t}", "public void moveTowards(){\n \n \n \n if(!exploded){\n \n \n move(speed);\n \n if(isTouching(Enemy.class)){\n move(explosionRadius); \n \n inRange = (ArrayList) getObjectsInRange(explosionRadius + 25, Enemy.class);\n for(Enemy e : inRange){\n e.hit(damage);\n }\n \n //explode\n exploded = true;\n \n image = new GreenfootImage(\"50x50 aoe.png\");\n image.scale(explosionRadius*2, explosionRadius*2);\n setImage(image);\n //getWorld().removeObject(this);\n }\n else if (isAtEdge())\n {\n getWorld().removeObject(this);\n }\n else if ( radius < distance) {\n getWorld().removeObject(this); \n }\n }\n else{\n setImage(image);\n image.setTransparency(image.getTransparency() - 5);\n if(image.getTransparency() <= 0) getWorld().removeObject(this);\n }\n }", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "public void setBdamage(int bdamage) {\r\n\t\tthis.bdamage = bdamage;\r\n\t}", "public void act() \n {\n if(timer > 0){\n timer--;\n }else{\n Greenfoot.playSound(\"explosionSound.wav\");\n getWorld().removeObject(this);\n }\n }", "@EventHandler\n\tpublic void onBuddingAmethystBreak(final BlockBreakEvent e) {\n\n\t\tItemStack heldItem = e.getPlayer().getInventory().getItemInMainHand();\n\n\t\tif (e.getBlock().getType() == Material.BUDDING_AMETHYST && isHoldingPickaxe(heldItem) && heldItem.containsEnchantment(Enchantment.SILK_TOUCH)) {\n\t\t\tLocation location = e.getBlock().getLocation();\n\t\t\tlocation.getWorld().dropItemNaturally(location, new ItemStack(Material.BUDDING_AMETHYST, 1));\n\t\t\tlocation.getBlock().setType(Material.AIR);\n\t\t}\n\t}", "@Override\r\n\tpublic boolean condition(WorldManager worldManager, WorldObjectManager gameObjectManager, BombManager bombManager,\r\n\t\t\tPlantManager plantManager, Player player) {\n\t\treturn bombManager.canPlace(player.transform);\r\n\t}", "private void boom() {\n showMessage(\"BOOM! Reload to try again\", \"boom\");\n }", "@Override\n public void attack(Creature target) {\n // Zombies attack any creature they land on,\n // as long as it isn't an instance of the Plant class\n // They inflict 10 points of damage when they attack\n if ((target != null) && !(target instanceof Plant)){\n target.takeDamage(10);\n }\n }", "@Override\n public void update(int timeModifier) {\n // Check if a bomb can be dropped and if the plane is still within the game window\n bombDropper.update(timeModifier);\n if (bombDropper.shouldRelease() && isInGameWindow()){\n justDropped = true;\n bombs.add(new Bomb(currPos, parentLevel));\n }\n\n // if we just dropped a bomb, reset the timer to a new random value\n if (justDropped){\n int dropTime = ThreadLocalRandom.current().nextInt(DROP_TIME_LOWER_BOUND, DROP_TIME_UPPER_BOUND + 1);\n bombDropper.setNewTime(dropTime);\n justDropped = false;\n }\n\n // Update all current bombs\n ArrayList<Bomb> bombsToRemove = new ArrayList<>();\n for (Bomb bomb : bombs){\n bomb.update(timeModifier);\n if (bomb.isFinished()){\n bombsToRemove.add(bomb);\n }\n }\n // Remove all finished bombs\n for (Bomb bomb : bombsToRemove){\n bombs.remove(bomb);\n }\n\n // update the current position\n if (flyingHorizontally) {\n double newX = currPos.x + PLANE_SPEED * timeModifier;\n currPos = new Point(newX, currPos.y);\n }\n else {\n double newY = currPos.y + PLANE_SPEED * timeModifier;\n currPos = new Point(currPos.x, newY);\n }\n\n // if the plane has moved outside the window, and has no remaining\n // bombs, it no longer needs to be updated\n if (!isInGameWindow() && bombs.size() == 0){\n isFinished = true;\n }\n render();\n\n }", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }" ]
[ "0.73411477", "0.69895", "0.6980242", "0.69531703", "0.6691935", "0.6661579", "0.6638964", "0.6635788", "0.6610201", "0.65154964", "0.64773285", "0.6441667", "0.64213645", "0.6335351", "0.6227456", "0.61579406", "0.6122354", "0.6120512", "0.6112585", "0.6060663", "0.6032827", "0.6018917", "0.6017489", "0.5961789", "0.5960062", "0.5921641", "0.59209454", "0.59032756", "0.59011155", "0.5887296", "0.58792377", "0.58751076", "0.5870745", "0.58675367", "0.586535", "0.5854624", "0.58451515", "0.583829", "0.58042467", "0.5774709", "0.57630724", "0.5758138", "0.575487", "0.57548004", "0.5753616", "0.57528794", "0.5751574", "0.57452893", "0.5741498", "0.57279855", "0.5715649", "0.5705946", "0.56968105", "0.5688685", "0.56795895", "0.56674194", "0.5663272", "0.5662452", "0.56394666", "0.5638411", "0.56377333", "0.56353134", "0.5621804", "0.56002474", "0.559457", "0.55924445", "0.5590156", "0.5587304", "0.5586859", "0.5582587", "0.5572504", "0.55708176", "0.55679864", "0.556707", "0.556467", "0.5558583", "0.55556506", "0.5553921", "0.5553257", "0.55529135", "0.55520874", "0.5550811", "0.5548758", "0.55473846", "0.55473846", "0.5547272", "0.55432445", "0.55404454", "0.5537841", "0.5534135", "0.5531326", "0.5529699", "0.5529596", "0.5518984", "0.55182755", "0.5518221", "0.5513864", "0.55130523", "0.5506132", "0.550532" ]
0.77424896
0
Create a text semantic service.
public CTextSemanticService() throws SemanticAnalysisException { this((short)0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SourceBuilder createService();", "Service newService();", "SemanticFactory getSemanticFactory();", "public CTextSemanticService(short index) throws SemanticAnalysisException {\t\n\t\t_taxonomyConnection = CTaxonomyConnectionsPool.getInstance().getLabelsConnection();\n\t\t_textIndex = index;\n\t}", "TxtUMLFactory getTxtUMLFactory();", "Fog_Services createFog_Services();", "public Collection<Service> createServices();", "@BearerAuth\n @HttpRequestHandler(paths = \"/api/v2/service/create\", methods = \"POST\")\n private void handleCreateRequest(@NonNull HttpContext context, @NonNull @RequestBody Document body) {\n var configuration = body.readObject(\"serviceConfiguration\", ServiceConfiguration.class);\n if (configuration == null) {\n // check for a provided service task\n var serviceTask = body.readObject(\"task\", ServiceTask.class);\n if (serviceTask != null) {\n configuration = ServiceConfiguration.builder(serviceTask).build();\n } else {\n // fallback to a service task name which has to exist\n var serviceTaskName = body.getString(\"serviceTaskName\");\n if (serviceTaskName != null) {\n var task = this.serviceTaskProvider.serviceTask(serviceTaskName);\n if (task != null) {\n configuration = ServiceConfiguration.builder(task).build();\n } else {\n // we got a task but it does not exist\n this.badRequest(context)\n .body(this.failure().append(\"reason\", \"Provided task is unknown\").toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n return;\n }\n } else {\n this.sendInvalidServiceConfigurationResponse(context);\n return;\n }\n }\n }\n\n var createResult = this.serviceFactory.createCloudService(configuration);\n var start = body.getBoolean(\"start\", false);\n if (start && createResult.state() == ServiceCreateResult.State.CREATED) {\n createResult.serviceInfo().provider().start();\n }\n\n this.ok(context)\n .body(this.success().append(\"result\", createResult).toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n }", "public TextConstruct(String name)\n\t{\n super(name);\n this.type = ContentType.TEXT;\n\t}", "Definition createDefinition();", "Documentation createDocumentation();", "Documentation createDocumentation();", "DocBook createDocBook();", "ProgramActuatorService createProgramActuatorService();", "Text createText();", "GeneralTerm createGeneralTerm();", "public void createServiceRequest() {\n getMainActivity().startService(new Intent(getMainActivity(), RequestService.class));\n }", "public abstract ServiceLocator create(String name);", "@Override\n public DocumentServiceEntry createDocument(String title, String contents) throws DocumentServiceException {\n DocsService svc = getDocsService();\n DocumentEntry newDocument = new DocumentEntry();\n newDocument.setTitle(new PlainTextConstruct(title));\n DocumentEntry entry;\n try {\n MediaByteArraySource source = new MediaByteArraySource(contents.getBytes(\"UTF8\"), \"text/plain\");\n newDocument.setMediaSource(source);\n entry = svc.insert(new URL(DOCS_SCOPE + \"default/private/full\"), newDocument);\n } catch (Exception e) {\n e.printStackTrace();\n throw new DocumentServiceException(e.getMessage());\n }\n return getDocumentReference(entry);\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tLog.e(\"androidtalk\", \"service created\") ;\n\t\tSystem.out.println(\"androidtalk-service created\") ;\n\t\t\n\t}", "public void markServiceCreate() throws JNCException {\n markLeafCreate(\"service\");\n }", "public static <T> T createService(Class<T> service) {\n return getInstanceRc().create(service);\n }", "public interface WordServices {\n /**\n * 根据单词和类型查询单词\n * @param word\n * @param type\n * @return\n */\n WordResult getWord(String word,int type);\n\n /**\n * 根据单词Id查询例句\n * @param wordId\n * @return\n */\n SentenceDefine getSentence(int wordId);\n\n /**\n * 根据单词Id查询单词\n * @param wordId\n * @return\n */\n WordResult getWordById(int wordId);\n\n\n}", "Service_Resource createService_Resource();", "Paragraph createParagraph();", "@PostMapping(\"/documents\")\r\n\tpublic ResponseEntity<String> create(String content) {\r\n\t\tString docId = this.documentHandler.createDocument(content);\r\n\t\tHttpHeaders headers = new HttpHeaders();\r\n\t\theaders.setContentType(MediaType.TEXT_PLAIN);\r\n\t\theaders.setAcceptCharset(Collections.singletonList(StandardCharsets.US_ASCII));\r\n\t\theaders.setContentLength(docId.length());\r\n\t\treturn new ResponseEntity<String>(docId, headers, HttpStatus.CREATED);\r\n\t}", "private Document createXMLDocumentStructure() {\r\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder builder = null;\r\n\t\ttry {\r\n\t\t\tbuilder = dbf.newDocumentBuilder();\r\n\t\t} catch (ParserConfigurationException 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\r\n\t\t// Creates the Document\r\n\t\tDocument serviceDoc = builder.newDocument();\r\n\t\t/*\r\n\t\t * Create the XML Tree\r\n\t\t */\r\n\t\tElement root = serviceDoc.createElement(\"service\");\r\n\r\n\t\tserviceDoc.appendChild(root);\r\n\t\treturn serviceDoc;\r\n\t}", "public void _createInstance() {\n requiredMethod(\"getAvailableServiceNames()\");\n\n if (services.length == 0) {\n services = (String[]) tEnv.getObjRelation(\"XMSF.serviceNames\");\n\n if (services == null) {\n log.println(\"No service to create.\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n }\n\n String needArgs = (String) tEnv.getObjRelation(\"needArgs\");\n\n if (needArgs != null) {\n log.println(\"The \" + needArgs + \n \" doesn't support createInstance without arguments\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n\n boolean res = true; \n\n for (int k = 0; k < services.length; k++) {\n try {\n log.println(\"Creating Instance: \" + services[k]);\n\n Object Inst = oObj.createInstance(services[k]);\n res = (Inst != null);\n } catch (com.sun.star.uno.Exception ex) {\n log.println(\"Exception occurred during createInstance()\");\n ex.printStackTrace(log);\n res = false;\n }\n }\n\n tRes.tested(\"createInstance()\", res);\n }", "public TypeSystemDescription inferCasTypeSystem(String serviceType) {\n for (String typeName : annotationTypes) {\n //UIMA Annotations are not allowed to contain dashes\n typeName = TypeSystemUtils.removeDashes(typeName);\n TypeDescription typeDescription = tsd.addType(TypeSystemUtils.UIMA_ANNOTATION_TYPES_PACKAGE + serviceType + \".\" + typeName,\n \"Automatically generated type for \" + typeName, \"uima.tcas.Annotation\");\n LOG.info(\">>>>>>>> Inserted new type -> \" + typeName);\n for (List<Annotation> annList : documentAnnotations) {\n Map<String, Object> features = annList.get(0).features;\n Set<String> featureNames = features.keySet();\n for (String feature : featureNames) {\n feature = TypeSystemUtils.patchMatchingFeatureNamesWithUimaReservedKeywords(feature);\n typeDescription.addFeature(feature, String.format(\"Feature <%s> for type <%s>\", feature, typeName), \"uima.cas.String\");\n LOG.info(\"\\t\\tInserted feature <{}> for type -> {}\", feature, typeName);\n }\n break;\n }\n }\n return tsd;\n }", "public com.google.cloud.servicedirectory.v1beta1.Service createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateServiceMethod(), getCallOptions(), request);\n }", "void createKeyword(String name);", "public Text getService() {\n return service;\n }", "public interface ITextService {\n\n\tList<TextEntity> findAllBetweenTextDates(String startDate, String endDate);\n\t\n\tList<TextEntity> findAllBetweenTextDates(Date startDate, Date endDate);\n\t\n\tTextEntity insert(TextEntity te);\n\n\tList<TextEntity> insertList(List<TextEntity> tes);\n\t\n}", "IServiceContext createService(Class<?>... serviceModules);", "Traditional createTraditional();", "private void setCorpus(){\n URL u = Converter.getURL(docName);\n FeatureMap params = Factory.newFeatureMap();\n params.put(\"sourceUrl\", u);\n params.put(\"markupAware\", true);\n params.put(\"preserveOriginalContent\", false);\n params.put(\"collectRepositioningInfo\", false);\n params.put(\"encoding\",\"windows-1252\");\n Print.prln(\"Creating doc for \" + u);\n Document doc = null;\n try {\n corpus = Factory.newCorpus(\"\");\n doc = (Document)\n Factory.createResource(\"gate.corpora.DocumentImpl\", params);\n } catch (ResourceInstantiationException ex) {\n ex.printStackTrace();\n }\n corpus.add(doc);\n annieController.setCorpus(corpus);\n params.clear();\n }", "public void create(){}", "public Service(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.Nullable imports.k8s.ServiceOptions options) {\n super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);\n software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, \"scope is required\"), java.util.Objects.requireNonNull(name, \"name is required\"), options });\n }", "LinkedService.DefinitionStages.Blank define(String name);", "public void setService(Text newService) {\n service = newService;\n }", "public interface AprioriCorpusFactory {\n \n /**\n * Initializes and populates an a priori index with documents whos text is known to be correct.\n *\n * @param dictionary dictionary to extract data from.\n * @param suggester suggester used to navigate the dictionary.\n * @param aprioriIndex lucene index, will be created/reinitialized.\n * @param aprioriIndexField index field used to store the a priori text.\n * @param aprioriAnalyzer analyzer used to tokenize a priori text.\n * @throws IOException\n * @throws QueryException\n */\n public abstract void factory(Dictionary dictionary, Suggester suggester, IndexFacade aprioriIndex, String aprioriIndexField, Analyzer aprioriAnalyzer, IndexWriter.MaxFieldLength mfl) throws IOException, QueryException;\n \n }", "public abstract T addService(ServerServiceDefinition service);", "public MyNLP()\n\t{\n\t\t//create StanfordNLP\n\t\tsnlp = new StanfordNLP();\n\t\t//create Recognizer\n\t\trec = new MyRecognizer();\n\t\t//build recognizers\n\t\trec.build();\n\t\t//create SentimentalAnalysis\n\t\tsa = new SentimentalAnalysis();\n\t}", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "Para createPara();", "void addService(ServiceInfo serviceInfo);", "public static Factory factory() {\n return text::new;\n }", "private static void generateMakefileFromTemplate(String serviceName, String targetFile) {\r\n\t\tClassLoader loader = ServiceGenerator.class.getClassLoader();\r\n\t\tURL makeFileTemplateUrl = loader.getResource(Constants.HE_SERVICE_TEMPLATE_FOLDER + Constants.HE_SERVICE_MAKEFILE_TEMPLATE_NAME);\r\n\r\n\t\t\r\n\t\tSTGroup impl = new STGroupFile(makeFileTemplateUrl, \"UTF-8\", '$', '$');\r\n\t\tST st = impl.getInstanceOf(\"make_file\");\r\n\t\tst.add(\"service_name\", serviceName);\t\t\r\n\t\tString result = st.render();\r\n\t\t\r\n\t\tUtils.writeToFile(result, targetFile);\r\n\t}", "public interface ServiceService {\n void createServices() throws IOException, TemplateException;\n\n void createService(String table) throws IOException, TemplateException;\n\n void createServiceImpls() throws IOException, TemplateException;\n\n void createServiceImpl(String table) throws IOException, TemplateException;\n}", "public ServiceAction(IElementManager manager, SystemID systemID, String name) {\r\n\t\tsuper(BaseUI.getText(UI_TEXT), BaseUI.getDescriptor(BaseUI.IMAGE_SERVICE));\r\n\t\tthis.manager = manager;\r\n\t\tthis.systemID = systemID;\r\n\t\tthis.name = name;\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tWord word = new Word(\"Look,\");\r\n\t\tWord word2 = new Word(\" I was \");\r\n\t\tWord word3 = new Word(\"gonna go \");\r\n\t\tWord word4 = new Word(\"easy on\");\r\n\t\tWord word5 = new Word(\" you and \");\r\n\r\n\t\tSentence sent = new Sentence();\r\n\r\n\t\tsent.add(word);\r\n\t\tsent.add(word2);\r\n\t\tsent.add(word3);\r\n\t\tsent.add(word4);\r\n\t\tsent.add(word5);\r\n\r\n\t\tSystem.out.println(\"--------------\");\r\n\r\n\t\tText text = new Text(sent.sh());\r\n//\t\t\r\n//\t\ttext.headline(\"dfgsdsd\");\r\n//\t\t\r\n//\t\ttext.add(\"efwefw\");\r\n//\t\t\r\n//\t\tSystem.out.println(text.displayAll());\r\n\r\n\t\tLogic lg = new Logic(text.getText());\r\n\r\n\t\tlg.headline(\"fdsfdf\");\r\n\t\tlg.add(\"sfasfas\");\r\n\r\n\t\tSystem.out.println(lg.displayAll());\r\n\r\n\t}", "Documento createDocumento();", "Operation createOperation();", "Operation createOperation();", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Service>\n createService(com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request);\n }", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "public Service(){\n\t\t\n\t}", "public Service(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String name) {\n super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);\n software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, \"scope is required\"), java.util.Objects.requireNonNull(name, \"name is required\") });\n }", "private void registerService() {\r\n DFAgentDescription desc = new DFAgentDescription();\r\n desc.setName(getAID());\r\n ServiceDescription sd = new ServiceDescription();\r\n sd.setType(SERVICE_TYPE);\r\n sd.setName(SERVICE_NAME);\r\n desc.addServices(sd);\r\n try {\r\n DFService.register(this, desc);\r\n } catch (FIPAException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "@Override\n public void run() throws SmartServiceException {\n UserProfile author = us.getUser(smartServiceCtx.getUsername());\n String username = author.getUsername();\n\n // Create a filename based on the user's name and MadLib title.\n String userFullName = author.getFirstName() + \" \" + author.getLastName();\n String docName = username + \" \" + madlib.getTitle();\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"Creating new document in folder %d with name %s and ext %s\", saveIn, docName,\n DOC_EXTENSION));\n }\n // Instantiate a new Document object with the necessary metadata\n Document newDoc = new Document(saveIn, docName, DOC_EXTENSION);\n try {\n // Creates a new document in the Appian engine. At this point the document is empty.\n // Content.UNIQUE_NONE specifies that we don't need to worry about document name uniqueness\n ContentOutputStream madlibOS = cs.upload(newDoc, Content.UNIQUE_NONE);\n\n // Save the id of the new document as our smartservice output\n madlibDoc = madlibOS.getContentId();\n\n // Write the madlib text and some footer information to the new document file on disk\n PrintWriter pw = new PrintWriter(madlibOS);\n pw.println(AppianMadLibUtil.createMadLibText(madlib));\n pw.println(\"By \" + userFullName);\n pw.println(\"Created \" + new Date());\n pw.close();\n\n } catch (PrivilegeException e) {\n LOG.error(\n String.format(\"User %s did not have permission to write to folder [id=%d]\", username, saveIn), e);\n throw createException(e, \"error.exception.permission\", smartServiceCtx.getUsername(), saveIn);\n } catch (Exception e) {\n LOG.error(\n String.format(\"Unexpected error creating new doc in folder [id=%d] as user %s\", saveIn, username), e);\n throw createException(e, \"error.exception.unknown\", smartServiceCtx.getUsername(), saveIn);\n }\n }", "public static <S> S createService(Context context, Class<S> serviceClass) {\n return ApiClient.getClient(RemoteConfiguration.BASE_URL).create(serviceClass);\n }", "public ServiceInfo(String type, String name, int port, String text)\n {\n this(type, name, port, 0, 0, text);\n }", "WithCreate withDescription(String description);", "WithCreate withDescription(String description);", "public void addText(IText text) {\n var name = \"Text\"; // TODO should texts have a name? E.g. the filename etc.?\n var textIndividual = ontologyConnector.addIndividualToClass(name, textClass);\n var uuid = ontologyConnector.getLocalName(textIndividual);\n ontologyConnector.addPropertyToIndividual(textIndividual, uuidProperty, uuid);\n\n ImmutableList<IWord> words = text.getWords();\n\n // first add all word individuals\n var wordIndividuals = new ArrayList<Individual>();\n var wordsToIndividuals = new HashMap<IWord, Individual>();\n for (var word : words) {\n var wordIndividual = addWord(word);\n wordIndividuals.add(wordIndividual);\n wordsToIndividuals.put(word, wordIndividual);\n }\n\n // add dependencies to words.\n // We only add outgoing dependencies as ingoing are the same (but viewed from another perspective)\n for (var word : words) {\n var wordIndividual = wordsToIndividuals.get(word);\n for (var dependencyType : DependencyTag.values()) {\n var outDependencies = word.getWordsThatAreDependencyOfThis(dependencyType);\n for (var outDep : outDependencies) {\n var outWordIndividual = wordsToIndividuals.get(outDep);\n addDependencyBetweenWords(wordIndividual, dependencyType, outWordIndividual);\n }\n }\n }\n\n // create the list that is used for the words property\n var olo = ontologyConnector.addList(\"WordsOf\" + name, wordIndividuals);\n var listIndividual = olo.getListIndividual();\n ontologyConnector.addPropertyToIndividual(textIndividual, wordsProperty, listIndividual);\n\n // add coref stuff\n var corefClusters = text.getCorefClusters();\n for (var corefCluster : corefClusters) {\n var representativeMention = corefCluster.getRepresentativeMention();\n var corefClusterIndividual = ontologyConnector.addIndividualToClass(representativeMention, corefClusterClass);\n ontologyConnector.addPropertyToIndividual(corefClusterIndividual, uuidProperty, \"\" + corefCluster.getId());\n ontologyConnector.addPropertyToIndividual(corefClusterIndividual, representativeMentionProperty, representativeMention);\n ontologyConnector.addPropertyToIndividual(textIndividual, hasCorefClusterProperty, corefClusterIndividual);\n\n var counter = 0;\n for (var mention : corefCluster.getMentions()) {\n var id = corefCluster.getId() + \"_\" + counter;\n counter += 1;\n var label = ICorefCluster.getTextForMention(mention);\n\n var mentionIndividual = ontologyConnector.addIndividualToClass(label, corefMentionClass);\n ontologyConnector.addPropertyToIndividual(mentionIndividual, uuidProperty, id);\n ontologyConnector.addPropertyToIndividual(corefClusterIndividual, mentionProperty, mentionIndividual);\n\n var mentionWordsIndividuals = getMentionWordIndividuals(mention, wordsToIndividuals);\n var mentionOlo = ontologyConnector.addList(\"WordsOf Mention \" + id, mentionWordsIndividuals);\n ontologyConnector.addPropertyToIndividual(mentionIndividual, wordsProperty, mentionOlo.getListIndividual());\n }\n }\n\n }", "public void create() {\n\t\t\n\t}", "default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }", "public ServiceInfo(String type, String name, int port, int weight, int priority, String text)\n {\n this(type, name, port, weight, priority, (byte[]) null);\n try\n {\n ByteArrayOutputStream out = new ByteArrayOutputStream(text.length());\n writeUTF(out, text);\n this.text = out.toByteArray();\n }\n catch (IOException e)\n {\n throw new RuntimeException(\"unexpected exception: \" + e);\n }\n }", "public interface TTSService {\r\n void TTS(String word);\r\n}", "public com.vodafone.global.er.decoupling.binding.request.TextType createTextType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.TextTypeImpl();\n }", "private void createStructuredDocumentTag(CTSdtPr sdtPr, String text) {\n\t\t// The properties contain (among others) aliases (<w:alias>), tag names (w:tag)\n\t\t// and a flag (<w:showingPlcHdr>) whether the content is placeholder or real content.\n\t\tString alias = getCTStringVal(getFirst(sdtPr.getAliasArray()));\n\t\tString tagName = getCTStringVal(getFirst(sdtPr.getTagArray()));\n\t\tboolean isPlaceholder = sdtPr.getShowingPlcHdrArray().length > 0;\n\n\t\tObject value = null;\n\t\t// If placeholder is set, the element is not filled by the user\n\t\tif (!isPlaceholder) {\n\t\t\tvalue = text;\n\n\t\t\t// The following child element can occur and determine the type of the structured\n\t\t\t// document tag: equation, comboBox (*), date (*), docPartObj, docPartList,\n\t\t\t// dropDownList (*), picture, richText (*), text (*), citation, group, bibliography.\n\n\t\t\t// Note that we can't use the typed method (e.g sdtPr.getComboBoxArray()) here\n\t\t\t// because in the small (poi-)ooxml-schemas.jar bundled with POI, the specialized\n\t\t\t// classes (e.g. CTStdComboBox) are missing. Trying to use these methods will fail\n\t\t\t// with a NoClassDefFoundError exception (cf. POI FAQ).\n\t\t\t// But we can work with the plain XmlObjects or DOM nodes, if we extract them by\n\t\t\t// a generic path expression.\n\t\t\tElement sdtType;\n\t\t\tif ((sdtType = getFirstAsDomElement(sdtPr, \"w:text\")) != null\n\t\t\t\t|| (sdtType = getFirstAsDomElement(sdtPr, \"w:richText\")) != null) {\n\t\t\t\t// Value is the text (in the case of richText without formatting)\n\t\t\t} else if ((sdtType = getFirstAsDomElement(sdtPr, \"w:date\")) != null) {\n\t\t\t\t// 17.5.2.7: fullDate contains the \"full date and time last entered\"\n\t\t\t\t// in XML Schema DateTime syntax\n\t\t\t\tString fullDate = sdtType.getAttributeNS(WORDPROCESSINGML_NS, \"fullDate\");\n\t\t\t\tif (fullDate != null) {\n\t\t\t\t\tXMLGregorianCalendar calendar;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(fullDate);\n\t\t\t\t\t\tlong timeMillis = calendar.toGregorianCalendar(null, null, null).getTimeInMillis();\n\t\t\t\t\t\tfinal String dateText = text;\n\t\t\t\t\t\tvalue = new Date(timeMillis) {\n\t\t\t\t\t\t\t@Override \n\t\t\t\t\t\t\tpublic String toString() { \n\t\t\t\t\t\t\t\treturn dateText; \n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t} catch(DatatypeConfigurationException e) {\n\t\t\t\t\t\tLOG.warn(\"createStructuredDocumentTag failed: \", e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ((sdtType = getFirstAsDomElement(sdtPr, \"w:comboBox\")) != null\n\t\t\t\t|| (sdtType = getFirstAsDomElement(sdtPr, \"w:dropDownList\")) != null) {\n\t\t\t\t// 17.5.2.5 (comboBox), 17.5.2.15 (dropDownList)\n\t\t\t\t// Try to find the associated value with the extract text (if possible)\n\t\t\t\tNodeList listItems = sdtType.getElementsByTagNameNS(WORDPROCESSINGML_NS, \"listItem\");\n\t\t\t\tfor (int i = 0, n = listItems.getLength(); i < n; i++) {\n\t\t\t\t\tElement listItem = (Element) listItems.item(i);\n\t\t\t\t\tString displayText = listItem.getAttributeNS(WORDPROCESSINGML_NS, \"displayText\");\n\t\t\t\t\tif (text.equals(displayText)) {\n\t\t\t\t\t\tvalue = listItem.getAttributeNS(WORDPROCESSINGML_NS, \"value\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ((getFirstAsDomElement(sdtPr, \"equation\") != null)\n\t\t\t\t\t|| (getFirstAsDomElement(sdtPr, \"docPartObj\") != null)\n\t\t\t\t\t|| (getFirstAsDomElement(sdtPr, \"docPartList\") != null)\n\t\t\t\t\t|| (getFirstAsDomElement(sdtPr, \"picture\") != null)\n\t\t\t\t\t|| (getFirstAsDomElement(sdtPr, \"citation\") != null)\n\t\t\t\t\t|| (getFirstAsDomElement(sdtPr, \"group\") != null)\n\t\t\t\t\t|| (getFirstAsDomElement(sdtPr, \"bibliography\") != null)) {\n\t\t\t\t// ignore (unsupported type)\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t// type is unspecified, treat as text\n\t\t\t}\n\t\t}\n\n\t\tStructuredDocumentTag sdt = new StructuredDocumentTag(alias, tagName, value, text);\n\t\tstructuredDocumentTags.add(sdt);\n\t}", "public interface ServiceFactory\n{\n /**\n * Retrieves a service instance. Is provided for extensibility beyond the core service\n * set.\n *\n * @param type The class name of the service to be retrieved.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n <T extends Service> T getService(Class<T> type)\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a WorkflowService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n WorkflowService getWorkflowService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a UserService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n UserService getUserService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns an AdministrationService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n AdministrationService getAdministrationService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a QueryService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n QueryService getQueryService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a document management service.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n DocumentManagementService getDocumentManagementService()\n throws ServiceNotAvailableException, LoginFailedException;;\n\n /**\n * Provides explicit service resource management. May be used to release resources\n * associated with a service (like connection handles or locked instances) early.\n * <p />\n * Explicitly releasing a service may be help conserving resources but is not necessary\n * as the <code>ServiceFactory</code> provides automatic resource cleanup.\n *\n * @param service The service to be released.\n *\n * @see #close()\n */\n void release(Service service);\n\n /**\n * Releases all resources hold by the service factory and its single services. All\n * services retrieved from this ServiceFactory will be closed too.\n */\n void close();\n\n void setCredentials(Map credentials);\n\n void setProperties(Map properties);\n\n /**\n * Gets the user session id\n * @return the user session id - may be null\n */\n String getSessionId();\n}", "Article createArticle();", "public void create() {\n PDDocument document = new PDDocument();\n PDPage page = new PDPage();\n document.addPage(page);\n\n // Create a new font object selecting one of the PDF base fonts\n PDFont font = PDType1Font.HELVETICA_BOLD;\n try (document) {\n // Start a new content stream which will \"hold\" the to be created content\n writeDataToDocument(document, page, font);\n // Save the results and ensure that the document is properly closed:\n document.save(\"Hello World.pdf\");\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n }", "abstract protected Parser createSACParser();", "public interface KeywordService {\n\n\t/**\n\t * creates and stores a new keyword entity\n\t * \n\t * @param name\n\t */\n\tvoid createKeyword(String name);\n\n\t/**\n\t * deletes a given keyword entity\n\t * \n\t * @param name\n\t */\n\tvoid deleteKeyword(String name);\n\n\t/**\n\t * lists all keywords currently stored in the database\n\t * \n\t * @return a list of keywords.\n\t */\n\tSet<Keyword> listKeywords();\n\n\t/**\n\t * returns the keyword identified by the given name\n\t * \n\t * @param name\n\t * @return the found keyword entity\n\t */\n\tKeyword findKeywordByName(String name);\n\n}", "public InitService(String name) {\n super(\"InitService\");\n }", "ServiceDeclaration services( Predicate<? super ServiceAssembly> specification );", "public abstract ServiceDelegate createServiceDelegate(java.net.URL wsdlDocumentLocation,\n QName serviceName, Class<? extends Service> serviceClass);", "public Content createContent();", "Object create(Document doc) throws IOException, SAXException, ParserConfigurationException;", "public Word(String text, String postag) {\n\t\tsuper();\n\t\tthis.text = text;\n\t\tthis.postag = postag;\n\t}", "public interface ButtonArticleService extends Service<ButtonArticle> {\n\n}", "public void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public interface ReviewServiceFactory extends ServiceFactory {\n}", "public abstract void setService(OntologyGenerationComponentServiceInterface<T,R> service);", "interface WithCreate\n extends DefinitionStages.WithRepoUrl,\n DefinitionStages.WithBranch,\n DefinitionStages.WithFolderPath,\n DefinitionStages.WithAutoSync,\n DefinitionStages.WithPublishRunbook,\n DefinitionStages.WithSourceType,\n DefinitionStages.WithSecurityToken,\n DefinitionStages.WithDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n SourceControl 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 SourceControl create(Context context);\n }", "public static void main(String[] args) {\n DepartmentServiceimpl deptservice=new DepartmentServiceimpl();\n Department deptobj=new Department();\n \n deptobj.setDepartmentNumber(22);\n deptobj.setDepartmentName(\"com\");\n deptobj.setDepatmentLocation(\"pune\");\ndeptservice.createDepartmentService(deptobj);\n\n}", "public InitService() {\n super(\"InitService\");\n }", "public interface MetadataService extends CrudService<Metadata, Integer>{\n\tMetadata createContentOfMetadata(Metadata metadata);\n}", "QuoteTerm createQuoteTerm();", "private static DocumentationImpl createDocumentation() {\n\t\treturn DocumentationImpl.Builder.info(\"A workspace in which other items can be placed, and top-level options can be configured.\")\n\t\t\t\t.param(\"Initialize\", \"Whether or not to execute the Initialize phase.\") // FIXME: STRING: srogers\n\t\t\t\t.param(\"Run\", \"Whether or not to execute the Run phase.\") // FIXME: STRING: srogers\n\t\t\t\t.param(\"Duration (minutes)\", \"The number of minutes this workspace will be alive.\") // FIXME: STRING: srogers\n\t\t\t\t.param(\"Retrieve Data\", \"Whether or not to execute the Retrieve Data phase.\") // FIXME: STRING: srogers\n\t\t\t\t.param(\"Cleanup\", \"Whether or not to execute the Cleanup phase.\") // FIXME: STRING: srogers\n\t\t\t\t.build(); // FIXME: srogers: extract string construction into a dedicated method\n\t}", "DomainConcept createDomainConcept();", "DocumentationFactory getDocumentationFactory();", "Object create(InputSource is) throws IOException, SAXException, ParserConfigurationException;", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttextualRepresentationEClass = createEClass(TEXTUAL_REPRESENTATION);\n\t\tcreateEReference(textualRepresentationEClass, TEXTUAL_REPRESENTATION__BASE_COMMENT);\n\t\tcreateEAttribute(textualRepresentationEClass, TEXTUAL_REPRESENTATION__LANGUAGE);\n\t}", "public abstract Anuncio creaAnuncioTematico();", "private String generateMetadata() {\n ServiceMetadata metadata = new ServiceMetadata();\n\n // Populate metadata using setX() methods\n metadata.setName(this.getClass().getName());\n metadata.setAllow(Discriminators.Uri.ANY);\n metadata.setDescription(\"Mallet Topic Modeling Trainer\");\n metadata.setVersion(\"1.0.0-SNAPSHOT\");\n metadata.setVendor(\"http://www.lappsgrid.org\");\n metadata.setLicense(Discriminators.Uri.APACHE2);\n\n // JSON for input information\n IOSpecification requires = new IOSpecification();\n requires.addFormat(Discriminators.Uri.TEXT); // Plain text (form)\n requires.addLanguage(\"en\"); // Source language\n\n // JSON for output information\n IOSpecification produces = new IOSpecification();\n produces.addFormat(Discriminators.Uri.LAPPS); // LIF (form)\n produces.addLanguage(\"en\"); // Target language\n\n // Embed I/O metadata JSON objects\n metadata.setRequires(requires);\n metadata.setProduces(produces);\n\n // Serialize the metadata into LEDS string and return\n Data<ServiceMetadata> data = new Data<>(Discriminators.Uri.META, metadata);\n return data.asPrettyJson();\n }", "public ServiceInfo(String type, String name, int port, int weight, int priority, byte text[])\n {\n this.type = type;\n this.name = name;\n this.port = port;\n this.weight = weight;\n this.priority = priority;\n this.text = text;\n }", "Directive createDirective();" ]
[ "0.6125445", "0.5979308", "0.59206283", "0.5791283", "0.57600266", "0.5698876", "0.55666226", "0.5559841", "0.5552007", "0.5527105", "0.5479638", "0.5479638", "0.5451799", "0.54195225", "0.53937954", "0.53852636", "0.5364425", "0.53379834", "0.5328483", "0.5312571", "0.5291597", "0.5285242", "0.52086866", "0.5200875", "0.51952225", "0.5181612", "0.51794", "0.516255", "0.512778", "0.5119767", "0.5116562", "0.51081353", "0.5093103", "0.50864893", "0.5084165", "0.50780034", "0.50670546", "0.50521857", "0.5050581", "0.5025693", "0.5013793", "0.50134104", "0.50115126", "0.5009004", "0.4998427", "0.49981785", "0.49979958", "0.49898738", "0.4988382", "0.49871314", "0.49830675", "0.49817082", "0.49812397", "0.49812397", "0.49767908", "0.49587825", "0.49519718", "0.49462876", "0.494164", "0.49344146", "0.4932607", "0.4927537", "0.492682", "0.492682", "0.49119335", "0.49091682", "0.49002528", "0.48922926", "0.4886755", "0.48753113", "0.4866269", "0.4864482", "0.48638186", "0.48623818", "0.48541224", "0.48512566", "0.48490775", "0.4838159", "0.48365092", "0.4831972", "0.48303038", "0.48296234", "0.48277", "0.48271456", "0.4815676", "0.48146966", "0.48132813", "0.4811555", "0.4798029", "0.479663", "0.4795907", "0.47898582", "0.47884563", "0.47844252", "0.47840473", "0.47795376", "0.4770607", "0.47701827", "0.47664008", "0.4765717" ]
0.6385527
0
Create a text semantic service.
public CTextSemanticService(short index) throws SemanticAnalysisException { _taxonomyConnection = CTaxonomyConnectionsPool.getInstance().getLabelsConnection(); _textIndex = index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CTextSemanticService() throws SemanticAnalysisException {\n\t\tthis((short)0);\n\t}", "SourceBuilder createService();", "Service newService();", "SemanticFactory getSemanticFactory();", "TxtUMLFactory getTxtUMLFactory();", "Fog_Services createFog_Services();", "public Collection<Service> createServices();", "@BearerAuth\n @HttpRequestHandler(paths = \"/api/v2/service/create\", methods = \"POST\")\n private void handleCreateRequest(@NonNull HttpContext context, @NonNull @RequestBody Document body) {\n var configuration = body.readObject(\"serviceConfiguration\", ServiceConfiguration.class);\n if (configuration == null) {\n // check for a provided service task\n var serviceTask = body.readObject(\"task\", ServiceTask.class);\n if (serviceTask != null) {\n configuration = ServiceConfiguration.builder(serviceTask).build();\n } else {\n // fallback to a service task name which has to exist\n var serviceTaskName = body.getString(\"serviceTaskName\");\n if (serviceTaskName != null) {\n var task = this.serviceTaskProvider.serviceTask(serviceTaskName);\n if (task != null) {\n configuration = ServiceConfiguration.builder(task).build();\n } else {\n // we got a task but it does not exist\n this.badRequest(context)\n .body(this.failure().append(\"reason\", \"Provided task is unknown\").toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n return;\n }\n } else {\n this.sendInvalidServiceConfigurationResponse(context);\n return;\n }\n }\n }\n\n var createResult = this.serviceFactory.createCloudService(configuration);\n var start = body.getBoolean(\"start\", false);\n if (start && createResult.state() == ServiceCreateResult.State.CREATED) {\n createResult.serviceInfo().provider().start();\n }\n\n this.ok(context)\n .body(this.success().append(\"result\", createResult).toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n }", "public TextConstruct(String name)\n\t{\n super(name);\n this.type = ContentType.TEXT;\n\t}", "Definition createDefinition();", "Documentation createDocumentation();", "Documentation createDocumentation();", "DocBook createDocBook();", "ProgramActuatorService createProgramActuatorService();", "Text createText();", "GeneralTerm createGeneralTerm();", "public void createServiceRequest() {\n getMainActivity().startService(new Intent(getMainActivity(), RequestService.class));\n }", "public abstract ServiceLocator create(String name);", "@Override\n public DocumentServiceEntry createDocument(String title, String contents) throws DocumentServiceException {\n DocsService svc = getDocsService();\n DocumentEntry newDocument = new DocumentEntry();\n newDocument.setTitle(new PlainTextConstruct(title));\n DocumentEntry entry;\n try {\n MediaByteArraySource source = new MediaByteArraySource(contents.getBytes(\"UTF8\"), \"text/plain\");\n newDocument.setMediaSource(source);\n entry = svc.insert(new URL(DOCS_SCOPE + \"default/private/full\"), newDocument);\n } catch (Exception e) {\n e.printStackTrace();\n throw new DocumentServiceException(e.getMessage());\n }\n return getDocumentReference(entry);\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tLog.e(\"androidtalk\", \"service created\") ;\n\t\tSystem.out.println(\"androidtalk-service created\") ;\n\t\t\n\t}", "public void markServiceCreate() throws JNCException {\n markLeafCreate(\"service\");\n }", "public static <T> T createService(Class<T> service) {\n return getInstanceRc().create(service);\n }", "public interface WordServices {\n /**\n * 根据单词和类型查询单词\n * @param word\n * @param type\n * @return\n */\n WordResult getWord(String word,int type);\n\n /**\n * 根据单词Id查询例句\n * @param wordId\n * @return\n */\n SentenceDefine getSentence(int wordId);\n\n /**\n * 根据单词Id查询单词\n * @param wordId\n * @return\n */\n WordResult getWordById(int wordId);\n\n\n}", "Service_Resource createService_Resource();", "Paragraph createParagraph();", "@PostMapping(\"/documents\")\r\n\tpublic ResponseEntity<String> create(String content) {\r\n\t\tString docId = this.documentHandler.createDocument(content);\r\n\t\tHttpHeaders headers = new HttpHeaders();\r\n\t\theaders.setContentType(MediaType.TEXT_PLAIN);\r\n\t\theaders.setAcceptCharset(Collections.singletonList(StandardCharsets.US_ASCII));\r\n\t\theaders.setContentLength(docId.length());\r\n\t\treturn new ResponseEntity<String>(docId, headers, HttpStatus.CREATED);\r\n\t}", "private Document createXMLDocumentStructure() {\r\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder builder = null;\r\n\t\ttry {\r\n\t\t\tbuilder = dbf.newDocumentBuilder();\r\n\t\t} catch (ParserConfigurationException 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\r\n\t\t// Creates the Document\r\n\t\tDocument serviceDoc = builder.newDocument();\r\n\t\t/*\r\n\t\t * Create the XML Tree\r\n\t\t */\r\n\t\tElement root = serviceDoc.createElement(\"service\");\r\n\r\n\t\tserviceDoc.appendChild(root);\r\n\t\treturn serviceDoc;\r\n\t}", "public void _createInstance() {\n requiredMethod(\"getAvailableServiceNames()\");\n\n if (services.length == 0) {\n services = (String[]) tEnv.getObjRelation(\"XMSF.serviceNames\");\n\n if (services == null) {\n log.println(\"No service to create.\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n }\n\n String needArgs = (String) tEnv.getObjRelation(\"needArgs\");\n\n if (needArgs != null) {\n log.println(\"The \" + needArgs + \n \" doesn't support createInstance without arguments\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n\n boolean res = true; \n\n for (int k = 0; k < services.length; k++) {\n try {\n log.println(\"Creating Instance: \" + services[k]);\n\n Object Inst = oObj.createInstance(services[k]);\n res = (Inst != null);\n } catch (com.sun.star.uno.Exception ex) {\n log.println(\"Exception occurred during createInstance()\");\n ex.printStackTrace(log);\n res = false;\n }\n }\n\n tRes.tested(\"createInstance()\", res);\n }", "public TypeSystemDescription inferCasTypeSystem(String serviceType) {\n for (String typeName : annotationTypes) {\n //UIMA Annotations are not allowed to contain dashes\n typeName = TypeSystemUtils.removeDashes(typeName);\n TypeDescription typeDescription = tsd.addType(TypeSystemUtils.UIMA_ANNOTATION_TYPES_PACKAGE + serviceType + \".\" + typeName,\n \"Automatically generated type for \" + typeName, \"uima.tcas.Annotation\");\n LOG.info(\">>>>>>>> Inserted new type -> \" + typeName);\n for (List<Annotation> annList : documentAnnotations) {\n Map<String, Object> features = annList.get(0).features;\n Set<String> featureNames = features.keySet();\n for (String feature : featureNames) {\n feature = TypeSystemUtils.patchMatchingFeatureNamesWithUimaReservedKeywords(feature);\n typeDescription.addFeature(feature, String.format(\"Feature <%s> for type <%s>\", feature, typeName), \"uima.cas.String\");\n LOG.info(\"\\t\\tInserted feature <{}> for type -> {}\", feature, typeName);\n }\n break;\n }\n }\n return tsd;\n }", "public com.google.cloud.servicedirectory.v1beta1.Service createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateServiceMethod(), getCallOptions(), request);\n }", "void createKeyword(String name);", "public Text getService() {\n return service;\n }", "public interface ITextService {\n\n\tList<TextEntity> findAllBetweenTextDates(String startDate, String endDate);\n\t\n\tList<TextEntity> findAllBetweenTextDates(Date startDate, Date endDate);\n\t\n\tTextEntity insert(TextEntity te);\n\n\tList<TextEntity> insertList(List<TextEntity> tes);\n\t\n}", "IServiceContext createService(Class<?>... serviceModules);", "Traditional createTraditional();", "private void setCorpus(){\n URL u = Converter.getURL(docName);\n FeatureMap params = Factory.newFeatureMap();\n params.put(\"sourceUrl\", u);\n params.put(\"markupAware\", true);\n params.put(\"preserveOriginalContent\", false);\n params.put(\"collectRepositioningInfo\", false);\n params.put(\"encoding\",\"windows-1252\");\n Print.prln(\"Creating doc for \" + u);\n Document doc = null;\n try {\n corpus = Factory.newCorpus(\"\");\n doc = (Document)\n Factory.createResource(\"gate.corpora.DocumentImpl\", params);\n } catch (ResourceInstantiationException ex) {\n ex.printStackTrace();\n }\n corpus.add(doc);\n annieController.setCorpus(corpus);\n params.clear();\n }", "public void create(){}", "public Service(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.Nullable imports.k8s.ServiceOptions options) {\n super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);\n software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, \"scope is required\"), java.util.Objects.requireNonNull(name, \"name is required\"), options });\n }", "LinkedService.DefinitionStages.Blank define(String name);", "public void setService(Text newService) {\n service = newService;\n }", "public interface AprioriCorpusFactory {\n \n /**\n * Initializes and populates an a priori index with documents whos text is known to be correct.\n *\n * @param dictionary dictionary to extract data from.\n * @param suggester suggester used to navigate the dictionary.\n * @param aprioriIndex lucene index, will be created/reinitialized.\n * @param aprioriIndexField index field used to store the a priori text.\n * @param aprioriAnalyzer analyzer used to tokenize a priori text.\n * @throws IOException\n * @throws QueryException\n */\n public abstract void factory(Dictionary dictionary, Suggester suggester, IndexFacade aprioriIndex, String aprioriIndexField, Analyzer aprioriAnalyzer, IndexWriter.MaxFieldLength mfl) throws IOException, QueryException;\n \n }", "public abstract T addService(ServerServiceDefinition service);", "public MyNLP()\n\t{\n\t\t//create StanfordNLP\n\t\tsnlp = new StanfordNLP();\n\t\t//create Recognizer\n\t\trec = new MyRecognizer();\n\t\t//build recognizers\n\t\trec.build();\n\t\t//create SentimentalAnalysis\n\t\tsa = new SentimentalAnalysis();\n\t}", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "Para createPara();", "public static Factory factory() {\n return text::new;\n }", "void addService(ServiceInfo serviceInfo);", "private static void generateMakefileFromTemplate(String serviceName, String targetFile) {\r\n\t\tClassLoader loader = ServiceGenerator.class.getClassLoader();\r\n\t\tURL makeFileTemplateUrl = loader.getResource(Constants.HE_SERVICE_TEMPLATE_FOLDER + Constants.HE_SERVICE_MAKEFILE_TEMPLATE_NAME);\r\n\r\n\t\t\r\n\t\tSTGroup impl = new STGroupFile(makeFileTemplateUrl, \"UTF-8\", '$', '$');\r\n\t\tST st = impl.getInstanceOf(\"make_file\");\r\n\t\tst.add(\"service_name\", serviceName);\t\t\r\n\t\tString result = st.render();\r\n\t\t\r\n\t\tUtils.writeToFile(result, targetFile);\r\n\t}", "public interface ServiceService {\n void createServices() throws IOException, TemplateException;\n\n void createService(String table) throws IOException, TemplateException;\n\n void createServiceImpls() throws IOException, TemplateException;\n\n void createServiceImpl(String table) throws IOException, TemplateException;\n}", "public ServiceAction(IElementManager manager, SystemID systemID, String name) {\r\n\t\tsuper(BaseUI.getText(UI_TEXT), BaseUI.getDescriptor(BaseUI.IMAGE_SERVICE));\r\n\t\tthis.manager = manager;\r\n\t\tthis.systemID = systemID;\r\n\t\tthis.name = name;\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tWord word = new Word(\"Look,\");\r\n\t\tWord word2 = new Word(\" I was \");\r\n\t\tWord word3 = new Word(\"gonna go \");\r\n\t\tWord word4 = new Word(\"easy on\");\r\n\t\tWord word5 = new Word(\" you and \");\r\n\r\n\t\tSentence sent = new Sentence();\r\n\r\n\t\tsent.add(word);\r\n\t\tsent.add(word2);\r\n\t\tsent.add(word3);\r\n\t\tsent.add(word4);\r\n\t\tsent.add(word5);\r\n\r\n\t\tSystem.out.println(\"--------------\");\r\n\r\n\t\tText text = new Text(sent.sh());\r\n//\t\t\r\n//\t\ttext.headline(\"dfgsdsd\");\r\n//\t\t\r\n//\t\ttext.add(\"efwefw\");\r\n//\t\t\r\n//\t\tSystem.out.println(text.displayAll());\r\n\r\n\t\tLogic lg = new Logic(text.getText());\r\n\r\n\t\tlg.headline(\"fdsfdf\");\r\n\t\tlg.add(\"sfasfas\");\r\n\r\n\t\tSystem.out.println(lg.displayAll());\r\n\r\n\t}", "Documento createDocumento();", "Operation createOperation();", "Operation createOperation();", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Service>\n createService(com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request);\n }", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "public Service(){\n\t\t\n\t}", "public Service(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String name) {\n super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);\n software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, \"scope is required\"), java.util.Objects.requireNonNull(name, \"name is required\") });\n }", "private void registerService() {\r\n DFAgentDescription desc = new DFAgentDescription();\r\n desc.setName(getAID());\r\n ServiceDescription sd = new ServiceDescription();\r\n sd.setType(SERVICE_TYPE);\r\n sd.setName(SERVICE_NAME);\r\n desc.addServices(sd);\r\n try {\r\n DFService.register(this, desc);\r\n } catch (FIPAException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "@Override\n public void run() throws SmartServiceException {\n UserProfile author = us.getUser(smartServiceCtx.getUsername());\n String username = author.getUsername();\n\n // Create a filename based on the user's name and MadLib title.\n String userFullName = author.getFirstName() + \" \" + author.getLastName();\n String docName = username + \" \" + madlib.getTitle();\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"Creating new document in folder %d with name %s and ext %s\", saveIn, docName,\n DOC_EXTENSION));\n }\n // Instantiate a new Document object with the necessary metadata\n Document newDoc = new Document(saveIn, docName, DOC_EXTENSION);\n try {\n // Creates a new document in the Appian engine. At this point the document is empty.\n // Content.UNIQUE_NONE specifies that we don't need to worry about document name uniqueness\n ContentOutputStream madlibOS = cs.upload(newDoc, Content.UNIQUE_NONE);\n\n // Save the id of the new document as our smartservice output\n madlibDoc = madlibOS.getContentId();\n\n // Write the madlib text and some footer information to the new document file on disk\n PrintWriter pw = new PrintWriter(madlibOS);\n pw.println(AppianMadLibUtil.createMadLibText(madlib));\n pw.println(\"By \" + userFullName);\n pw.println(\"Created \" + new Date());\n pw.close();\n\n } catch (PrivilegeException e) {\n LOG.error(\n String.format(\"User %s did not have permission to write to folder [id=%d]\", username, saveIn), e);\n throw createException(e, \"error.exception.permission\", smartServiceCtx.getUsername(), saveIn);\n } catch (Exception e) {\n LOG.error(\n String.format(\"Unexpected error creating new doc in folder [id=%d] as user %s\", saveIn, username), e);\n throw createException(e, \"error.exception.unknown\", smartServiceCtx.getUsername(), saveIn);\n }\n }", "public static <S> S createService(Context context, Class<S> serviceClass) {\n return ApiClient.getClient(RemoteConfiguration.BASE_URL).create(serviceClass);\n }", "public ServiceInfo(String type, String name, int port, String text)\n {\n this(type, name, port, 0, 0, text);\n }", "WithCreate withDescription(String description);", "WithCreate withDescription(String description);", "public void addText(IText text) {\n var name = \"Text\"; // TODO should texts have a name? E.g. the filename etc.?\n var textIndividual = ontologyConnector.addIndividualToClass(name, textClass);\n var uuid = ontologyConnector.getLocalName(textIndividual);\n ontologyConnector.addPropertyToIndividual(textIndividual, uuidProperty, uuid);\n\n ImmutableList<IWord> words = text.getWords();\n\n // first add all word individuals\n var wordIndividuals = new ArrayList<Individual>();\n var wordsToIndividuals = new HashMap<IWord, Individual>();\n for (var word : words) {\n var wordIndividual = addWord(word);\n wordIndividuals.add(wordIndividual);\n wordsToIndividuals.put(word, wordIndividual);\n }\n\n // add dependencies to words.\n // We only add outgoing dependencies as ingoing are the same (but viewed from another perspective)\n for (var word : words) {\n var wordIndividual = wordsToIndividuals.get(word);\n for (var dependencyType : DependencyTag.values()) {\n var outDependencies = word.getWordsThatAreDependencyOfThis(dependencyType);\n for (var outDep : outDependencies) {\n var outWordIndividual = wordsToIndividuals.get(outDep);\n addDependencyBetweenWords(wordIndividual, dependencyType, outWordIndividual);\n }\n }\n }\n\n // create the list that is used for the words property\n var olo = ontologyConnector.addList(\"WordsOf\" + name, wordIndividuals);\n var listIndividual = olo.getListIndividual();\n ontologyConnector.addPropertyToIndividual(textIndividual, wordsProperty, listIndividual);\n\n // add coref stuff\n var corefClusters = text.getCorefClusters();\n for (var corefCluster : corefClusters) {\n var representativeMention = corefCluster.getRepresentativeMention();\n var corefClusterIndividual = ontologyConnector.addIndividualToClass(representativeMention, corefClusterClass);\n ontologyConnector.addPropertyToIndividual(corefClusterIndividual, uuidProperty, \"\" + corefCluster.getId());\n ontologyConnector.addPropertyToIndividual(corefClusterIndividual, representativeMentionProperty, representativeMention);\n ontologyConnector.addPropertyToIndividual(textIndividual, hasCorefClusterProperty, corefClusterIndividual);\n\n var counter = 0;\n for (var mention : corefCluster.getMentions()) {\n var id = corefCluster.getId() + \"_\" + counter;\n counter += 1;\n var label = ICorefCluster.getTextForMention(mention);\n\n var mentionIndividual = ontologyConnector.addIndividualToClass(label, corefMentionClass);\n ontologyConnector.addPropertyToIndividual(mentionIndividual, uuidProperty, id);\n ontologyConnector.addPropertyToIndividual(corefClusterIndividual, mentionProperty, mentionIndividual);\n\n var mentionWordsIndividuals = getMentionWordIndividuals(mention, wordsToIndividuals);\n var mentionOlo = ontologyConnector.addList(\"WordsOf Mention \" + id, mentionWordsIndividuals);\n ontologyConnector.addPropertyToIndividual(mentionIndividual, wordsProperty, mentionOlo.getListIndividual());\n }\n }\n\n }", "public void create() {\n\t\t\n\t}", "default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }", "public ServiceInfo(String type, String name, int port, int weight, int priority, String text)\n {\n this(type, name, port, weight, priority, (byte[]) null);\n try\n {\n ByteArrayOutputStream out = new ByteArrayOutputStream(text.length());\n writeUTF(out, text);\n this.text = out.toByteArray();\n }\n catch (IOException e)\n {\n throw new RuntimeException(\"unexpected exception: \" + e);\n }\n }", "public interface TTSService {\r\n void TTS(String word);\r\n}", "public com.vodafone.global.er.decoupling.binding.request.TextType createTextType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.TextTypeImpl();\n }", "private void createStructuredDocumentTag(CTSdtPr sdtPr, String text) {\n\t\t// The properties contain (among others) aliases (<w:alias>), tag names (w:tag)\n\t\t// and a flag (<w:showingPlcHdr>) whether the content is placeholder or real content.\n\t\tString alias = getCTStringVal(getFirst(sdtPr.getAliasArray()));\n\t\tString tagName = getCTStringVal(getFirst(sdtPr.getTagArray()));\n\t\tboolean isPlaceholder = sdtPr.getShowingPlcHdrArray().length > 0;\n\n\t\tObject value = null;\n\t\t// If placeholder is set, the element is not filled by the user\n\t\tif (!isPlaceholder) {\n\t\t\tvalue = text;\n\n\t\t\t// The following child element can occur and determine the type of the structured\n\t\t\t// document tag: equation, comboBox (*), date (*), docPartObj, docPartList,\n\t\t\t// dropDownList (*), picture, richText (*), text (*), citation, group, bibliography.\n\n\t\t\t// Note that we can't use the typed method (e.g sdtPr.getComboBoxArray()) here\n\t\t\t// because in the small (poi-)ooxml-schemas.jar bundled with POI, the specialized\n\t\t\t// classes (e.g. CTStdComboBox) are missing. Trying to use these methods will fail\n\t\t\t// with a NoClassDefFoundError exception (cf. POI FAQ).\n\t\t\t// But we can work with the plain XmlObjects or DOM nodes, if we extract them by\n\t\t\t// a generic path expression.\n\t\t\tElement sdtType;\n\t\t\tif ((sdtType = getFirstAsDomElement(sdtPr, \"w:text\")) != null\n\t\t\t\t|| (sdtType = getFirstAsDomElement(sdtPr, \"w:richText\")) != null) {\n\t\t\t\t// Value is the text (in the case of richText without formatting)\n\t\t\t} else if ((sdtType = getFirstAsDomElement(sdtPr, \"w:date\")) != null) {\n\t\t\t\t// 17.5.2.7: fullDate contains the \"full date and time last entered\"\n\t\t\t\t// in XML Schema DateTime syntax\n\t\t\t\tString fullDate = sdtType.getAttributeNS(WORDPROCESSINGML_NS, \"fullDate\");\n\t\t\t\tif (fullDate != null) {\n\t\t\t\t\tXMLGregorianCalendar calendar;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(fullDate);\n\t\t\t\t\t\tlong timeMillis = calendar.toGregorianCalendar(null, null, null).getTimeInMillis();\n\t\t\t\t\t\tfinal String dateText = text;\n\t\t\t\t\t\tvalue = new Date(timeMillis) {\n\t\t\t\t\t\t\t@Override \n\t\t\t\t\t\t\tpublic String toString() { \n\t\t\t\t\t\t\t\treturn dateText; \n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t} catch(DatatypeConfigurationException e) {\n\t\t\t\t\t\tLOG.warn(\"createStructuredDocumentTag failed: \", e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ((sdtType = getFirstAsDomElement(sdtPr, \"w:comboBox\")) != null\n\t\t\t\t|| (sdtType = getFirstAsDomElement(sdtPr, \"w:dropDownList\")) != null) {\n\t\t\t\t// 17.5.2.5 (comboBox), 17.5.2.15 (dropDownList)\n\t\t\t\t// Try to find the associated value with the extract text (if possible)\n\t\t\t\tNodeList listItems = sdtType.getElementsByTagNameNS(WORDPROCESSINGML_NS, \"listItem\");\n\t\t\t\tfor (int i = 0, n = listItems.getLength(); i < n; i++) {\n\t\t\t\t\tElement listItem = (Element) listItems.item(i);\n\t\t\t\t\tString displayText = listItem.getAttributeNS(WORDPROCESSINGML_NS, \"displayText\");\n\t\t\t\t\tif (text.equals(displayText)) {\n\t\t\t\t\t\tvalue = listItem.getAttributeNS(WORDPROCESSINGML_NS, \"value\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ((getFirstAsDomElement(sdtPr, \"equation\") != null)\n\t\t\t\t\t|| (getFirstAsDomElement(sdtPr, \"docPartObj\") != null)\n\t\t\t\t\t|| (getFirstAsDomElement(sdtPr, \"docPartList\") != null)\n\t\t\t\t\t|| (getFirstAsDomElement(sdtPr, \"picture\") != null)\n\t\t\t\t\t|| (getFirstAsDomElement(sdtPr, \"citation\") != null)\n\t\t\t\t\t|| (getFirstAsDomElement(sdtPr, \"group\") != null)\n\t\t\t\t\t|| (getFirstAsDomElement(sdtPr, \"bibliography\") != null)) {\n\t\t\t\t// ignore (unsupported type)\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t// type is unspecified, treat as text\n\t\t\t}\n\t\t}\n\n\t\tStructuredDocumentTag sdt = new StructuredDocumentTag(alias, tagName, value, text);\n\t\tstructuredDocumentTags.add(sdt);\n\t}", "public interface ServiceFactory\n{\n /**\n * Retrieves a service instance. Is provided for extensibility beyond the core service\n * set.\n *\n * @param type The class name of the service to be retrieved.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n <T extends Service> T getService(Class<T> type)\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a WorkflowService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n WorkflowService getWorkflowService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a UserService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n UserService getUserService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns an AdministrationService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n AdministrationService getAdministrationService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a QueryService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n QueryService getQueryService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a document management service.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n DocumentManagementService getDocumentManagementService()\n throws ServiceNotAvailableException, LoginFailedException;;\n\n /**\n * Provides explicit service resource management. May be used to release resources\n * associated with a service (like connection handles or locked instances) early.\n * <p />\n * Explicitly releasing a service may be help conserving resources but is not necessary\n * as the <code>ServiceFactory</code> provides automatic resource cleanup.\n *\n * @param service The service to be released.\n *\n * @see #close()\n */\n void release(Service service);\n\n /**\n * Releases all resources hold by the service factory and its single services. All\n * services retrieved from this ServiceFactory will be closed too.\n */\n void close();\n\n void setCredentials(Map credentials);\n\n void setProperties(Map properties);\n\n /**\n * Gets the user session id\n * @return the user session id - may be null\n */\n String getSessionId();\n}", "Article createArticle();", "public void create() {\n PDDocument document = new PDDocument();\n PDPage page = new PDPage();\n document.addPage(page);\n\n // Create a new font object selecting one of the PDF base fonts\n PDFont font = PDType1Font.HELVETICA_BOLD;\n try (document) {\n // Start a new content stream which will \"hold\" the to be created content\n writeDataToDocument(document, page, font);\n // Save the results and ensure that the document is properly closed:\n document.save(\"Hello World.pdf\");\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n }", "abstract protected Parser createSACParser();", "public interface KeywordService {\n\n\t/**\n\t * creates and stores a new keyword entity\n\t * \n\t * @param name\n\t */\n\tvoid createKeyword(String name);\n\n\t/**\n\t * deletes a given keyword entity\n\t * \n\t * @param name\n\t */\n\tvoid deleteKeyword(String name);\n\n\t/**\n\t * lists all keywords currently stored in the database\n\t * \n\t * @return a list of keywords.\n\t */\n\tSet<Keyword> listKeywords();\n\n\t/**\n\t * returns the keyword identified by the given name\n\t * \n\t * @param name\n\t * @return the found keyword entity\n\t */\n\tKeyword findKeywordByName(String name);\n\n}", "public InitService(String name) {\n super(\"InitService\");\n }", "ServiceDeclaration services( Predicate<? super ServiceAssembly> specification );", "public abstract ServiceDelegate createServiceDelegate(java.net.URL wsdlDocumentLocation,\n QName serviceName, Class<? extends Service> serviceClass);", "public Content createContent();", "Object create(Document doc) throws IOException, SAXException, ParserConfigurationException;", "public Word(String text, String postag) {\n\t\tsuper();\n\t\tthis.text = text;\n\t\tthis.postag = postag;\n\t}", "public interface ButtonArticleService extends Service<ButtonArticle> {\n\n}", "public void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public interface ReviewServiceFactory extends ServiceFactory {\n}", "public abstract void setService(OntologyGenerationComponentServiceInterface<T,R> service);", "interface WithCreate\n extends DefinitionStages.WithRepoUrl,\n DefinitionStages.WithBranch,\n DefinitionStages.WithFolderPath,\n DefinitionStages.WithAutoSync,\n DefinitionStages.WithPublishRunbook,\n DefinitionStages.WithSourceType,\n DefinitionStages.WithSecurityToken,\n DefinitionStages.WithDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n SourceControl 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 SourceControl create(Context context);\n }", "public static void main(String[] args) {\n DepartmentServiceimpl deptservice=new DepartmentServiceimpl();\n Department deptobj=new Department();\n \n deptobj.setDepartmentNumber(22);\n deptobj.setDepartmentName(\"com\");\n deptobj.setDepatmentLocation(\"pune\");\ndeptservice.createDepartmentService(deptobj);\n\n}", "public InitService() {\n super(\"InitService\");\n }", "public interface MetadataService extends CrudService<Metadata, Integer>{\n\tMetadata createContentOfMetadata(Metadata metadata);\n}", "QuoteTerm createQuoteTerm();", "private static DocumentationImpl createDocumentation() {\n\t\treturn DocumentationImpl.Builder.info(\"A workspace in which other items can be placed, and top-level options can be configured.\")\n\t\t\t\t.param(\"Initialize\", \"Whether or not to execute the Initialize phase.\") // FIXME: STRING: srogers\n\t\t\t\t.param(\"Run\", \"Whether or not to execute the Run phase.\") // FIXME: STRING: srogers\n\t\t\t\t.param(\"Duration (minutes)\", \"The number of minutes this workspace will be alive.\") // FIXME: STRING: srogers\n\t\t\t\t.param(\"Retrieve Data\", \"Whether or not to execute the Retrieve Data phase.\") // FIXME: STRING: srogers\n\t\t\t\t.param(\"Cleanup\", \"Whether or not to execute the Cleanup phase.\") // FIXME: STRING: srogers\n\t\t\t\t.build(); // FIXME: srogers: extract string construction into a dedicated method\n\t}", "DomainConcept createDomainConcept();", "DocumentationFactory getDocumentationFactory();", "Object create(InputSource is) throws IOException, SAXException, ParserConfigurationException;", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttextualRepresentationEClass = createEClass(TEXTUAL_REPRESENTATION);\n\t\tcreateEReference(textualRepresentationEClass, TEXTUAL_REPRESENTATION__BASE_COMMENT);\n\t\tcreateEAttribute(textualRepresentationEClass, TEXTUAL_REPRESENTATION__LANGUAGE);\n\t}", "public abstract Anuncio creaAnuncioTematico();", "private String generateMetadata() {\n ServiceMetadata metadata = new ServiceMetadata();\n\n // Populate metadata using setX() methods\n metadata.setName(this.getClass().getName());\n metadata.setAllow(Discriminators.Uri.ANY);\n metadata.setDescription(\"Mallet Topic Modeling Trainer\");\n metadata.setVersion(\"1.0.0-SNAPSHOT\");\n metadata.setVendor(\"http://www.lappsgrid.org\");\n metadata.setLicense(Discriminators.Uri.APACHE2);\n\n // JSON for input information\n IOSpecification requires = new IOSpecification();\n requires.addFormat(Discriminators.Uri.TEXT); // Plain text (form)\n requires.addLanguage(\"en\"); // Source language\n\n // JSON for output information\n IOSpecification produces = new IOSpecification();\n produces.addFormat(Discriminators.Uri.LAPPS); // LIF (form)\n produces.addLanguage(\"en\"); // Target language\n\n // Embed I/O metadata JSON objects\n metadata.setRequires(requires);\n metadata.setProduces(produces);\n\n // Serialize the metadata into LEDS string and return\n Data<ServiceMetadata> data = new Data<>(Discriminators.Uri.META, metadata);\n return data.asPrettyJson();\n }", "public ServiceInfo(String type, String name, int port, int weight, int priority, byte text[])\n {\n this.type = type;\n this.name = name;\n this.port = port;\n this.weight = weight;\n this.priority = priority;\n this.text = text;\n }", "Directive createDirective();" ]
[ "0.6385629", "0.61257446", "0.5979454", "0.59206706", "0.5760084", "0.56989676", "0.55666095", "0.556004", "0.555225", "0.5527382", "0.54800767", "0.54800767", "0.54519385", "0.54195887", "0.5394007", "0.53853476", "0.53646195", "0.5338124", "0.5328684", "0.53127855", "0.5291598", "0.5285109", "0.5208772", "0.52010965", "0.51954097", "0.5181846", "0.5179515", "0.51626885", "0.5127591", "0.5119962", "0.5117084", "0.5108145", "0.5093023", "0.5086515", "0.50842476", "0.50781727", "0.50672984", "0.50524884", "0.5050915", "0.5025695", "0.5013818", "0.50133634", "0.5011853", "0.50089127", "0.49985608", "0.4998257", "0.4998115", "0.49901083", "0.498848", "0.4987268", "0.4983191", "0.49818227", "0.49814773", "0.49814773", "0.49769196", "0.49589634", "0.4952229", "0.49466598", "0.49415535", "0.4934583", "0.49325404", "0.49277663", "0.49271578", "0.49271578", "0.4911803", "0.4909375", "0.4900522", "0.48923954", "0.4886837", "0.48754147", "0.4866134", "0.48644882", "0.48639846", "0.48626202", "0.4854141", "0.48515016", "0.48493958", "0.48381674", "0.48367113", "0.4832098", "0.48306012", "0.48297998", "0.4827763", "0.48274013", "0.481577", "0.48145574", "0.48134542", "0.481162", "0.47983095", "0.47966996", "0.4796094", "0.47903347", "0.4788629", "0.47847354", "0.4784311", "0.4779672", "0.47706378", "0.47703803", "0.47664776", "0.4765988" ]
0.57914215
4
Extract the semantic components of a document using NLP algorithm to extract semantic NGrams, WordNet hypernyms and dbpedia entries.
public void execute(final String inputText, CTopicsMap topicsMap) { this.execute(inputText, null, topicsMap); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void process(JCas aJCas) throws AnalysisEngineProcessException {\n\t\tString text = aJCas.getDocumentText();\n\n\t\t// create an empty Annotation just with the given text\n\t\tAnnotation document = new Annotation(text);\n//\t\tAnnotation document = new Annotation(\"Barack Obama was born in Hawaii. He is the president. Obama was elected in 2008.\");\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document); \n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\t HelperDataStructures hds = new HelperDataStructures();\n\n\t\t\n\t\t//SPnew language-specific settings:\n\t\t//SPnew subject tags of the parser\n\t\t HashSet<String> subjTag = new HashSet<String>(); \n\t\t HashSet<String> dirObjTag = new HashSet<String>(); \n\t\t //subordinate conjunction tags\n\t\t HashSet<String> compTag = new HashSet<String>(); \n\t\t //pronoun tags\n\t\t HashSet<String> pronTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> passSubjTag = new HashSet<String>();\n\t\t HashSet<String> apposTag = new HashSet<String>(); \n\t\t HashSet<String> verbComplementTag = new HashSet<String>(); \n\t\t HashSet<String> infVerbTag = new HashSet<String>(); \n\t\t HashSet<String> relclauseTag = new HashSet<String>(); \n\t\t HashSet<String> aclauseTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> compLemma = new HashSet<String>(); \n\t\t HashSet<String> coordLemma = new HashSet<String>(); \n\t\t HashSet<String> directQuoteIntro = new HashSet<String>(); \n\t\t HashSet<String> indirectQuoteIntroChunkValue = new HashSet<String>();\n\t\t \n//\t\t HashSet<String> finiteVerbTag = new HashSet<String>();\n\t\t \n\n\t\t //OPEN ISSUES PROBLEMS:\n\t\t //the subject - verb relation finding does not account for several specific cases: \n\t\t //opinion verbs with passive subjects as opinion holder are not accounted for,\n\t\t //what is needed is a marker in the lex files like PASSSUBJ\n\t\t //ex: Obama is worried/Merkel is concerned\n\t\t //Many of the poorer countries are concerned that the reduction in structural funds and farm subsidies may be detrimental in their attempts to fulfill the Copenhagen Criteria.\n\t\t //Some of the more well off EU states are also worried about the possible effects a sudden influx of cheap labor may have on their economies. Others are afraid that regional aid may be diverted away from those who currently benefit to the new, poorer countries that join in 2004 and beyond. \n\t\t// Does not account for infinitival constructions, here again a marker is needed to specify\n\t\t //subject versus object equi\n\t\t\t//Christian Noyer was reported to have said that it is ok.\n\t\t\t//Reuters has reported Christian Noyer to have said that it is ok.\n\t\t //Obama is likely to have said.. \n\t\t //Several opinion holder- opinion verb pairs in one sentence are not accounted for, right now the first pair is taken.\n\t\t //what is needed is to run through all dependencies. For inderect quotes the xcomp value of the embedded verb points to the \n\t\t //opinion verb. For direct quotes the offsets closest to thwe quote are relevant.\n\t\t //a specific treatment of inverted subjects is necessary then. Right now the\n\t\t //strategy relies on the fact that after the first subj/dirobj - verb pair the\n\t\t //search is interrupted. Thus, if the direct object precedes the subject, it is taken as subject.\n\t\t // this is the case in incorrectly analysed inverted subjeects as: said Zwickel on Monday\n\t\t //coordination of subject not accounted for:employers and many economists\n\t\t //several subject-opinion verbs:\n\t\t //Zwickel has called the hours discrepancy between east and west a \"fairness gap,\" but employers and many economists point out that many eastern operations have a much lower productivity than their western counterparts.\n\t\t if (language.equals(\"en\")){\n \t subjTag.add(\"nsubj\");\n \t subjTag.add(\"xsubj\");\n \t subjTag.add(\"nmod:agent\");\n \t \n \t dirObjTag.add(\"dobj\"); //for inverted subject: \" \" said IG metall boss Klaus Zwickel on Monday morning.\n \t \t\t\t\t\t\t//works only with break DEPENDENCYSEARCH, otherwise \"Monday\" is nsubj \n \t \t\t\t\t\t\t//for infinitival subject of object equi: Reuters reports Obama to have said\n \tpassSubjTag.add(\"nsubjpass\");\n \tapposTag.add(\"appos\");\n \trelclauseTag.add(\"acl:relcl\");\n \taclauseTag.add(\"acl\");\n \t compTag.add(\"mark\");\n \t pronTag.add(\"prp\");\n \thds.pronTag.add(\"prp\");\n \tcompLemma.add(\"that\");\n \tcoordLemma.add(\"and\");\n \tverbComplementTag.add(\"ccomp\");\n \tverbComplementTag.add(\"parataxis\");\n\n \tinfVerbTag.add(\"xcomp\"); //Reuters reported Merkel to have said\n \tinfVerbTag.add(\"advcl\");\n \tdirectQuoteIntro.add(\":\");\n \tindirectQuoteIntroChunkValue.add(\"SBAR\");\n \thds.objectEqui.add(\"report\");\n \thds.objectEqui.add(\"quote\");\n \thds.potentialIndirectQuoteTrigger.add(\"say\");\n// \thds.objectEqui.add(\"confirm\");\n// \thds.subjectEqui.add(\"promise\");\n// \thds.subjectEqui.add(\"quote\");\n// \thds.subjectEqui.add(\"confirm\");\n }\n\t\t \n\t\t boolean containsSubordinateConjunction = false;\n\t\t\n\t\t \n\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tSystem.out.println(\"PREPROCESSING..\");\n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\t//SP Map offsets to NER\n\t\t\t\tList<NamedEntity> ners = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tNamedEntity.class, sentenceAnn);\n\t\t\t\tfor (NamedEntity ne : ners){\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.getCoveredText().toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.casTypeCode);\n\t\t\t\t\t//Person is 71, Location is 213, Organization is 68 geht anders besser siehe unten\n\t\t\t\t\tint nerStart = ne\n\t\t\t\t\t\t\t.getBegin();\n\t\t\t\t\tint nerEnd = ne.getEnd();\n//\t\t\t\t\tSystem.out.println(\"NER: \" + ne.getCoveredText() + \" \" + nerStart + \"-\" + nerEnd ); \n\t\t\t\t\tString offsetNer = \"\" + nerStart + \"-\" + nerEnd;\n\t\t\t\t\thds.offsetToNer.put(offsetNer, ne.getCoveredText());\n//\t\t\t\t\tNer.add(offsetNer);\n\t\t\t\t\thds.Ner.add(offsetNer);\n//\t\t\t\t\tSystem.out.println(\"NER: TYPE \" +ne.getValue().toString());\n\t\t\t\t\tif (ne.getValue().equals(\"PERSON\")){\n\t\t\t\t\t\thds.NerPerson.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t\telse if (ne.getValue().equals(\"ORGANIZATION\")){\n\t\t\t\t\t\thds.NerOrganization.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//DBpediaLink info: map offsets to links\n\t\t\t\tList<DBpediaResource> dbpeds = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tDBpediaResource.class, sentenceAnn);\n\t\t\t\tfor (DBpediaResource dbped : dbpeds){\n//\t\t\t\t\t\n//\t\t\t\t\tint dbStart = dbped\n//\t\t\t\t\t\t\t.getBegin();\n//\t\t\t\t\tint dbEnd = dbped.getEnd();\n\t\t\t\t\t// not found if dbpedia offsets are wrongly outside than sentences\n//\t\t\t\t\tSystem.out.println(\"DBPED SENT: \" + sentenceAnn.getBegin()+ \"-\" + sentenceAnn.getEnd() ); \n//\t\t\t\t\tString offsetDB = \"\" + dbStart + \"-\" + dbEnd;\n//\t\t\t\t\thds.labelToDBpediaLink.put(dbped.getLabel(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getLabel() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t\thds.dbpediaSurfaceFormToDBpediaLink.put(dbped.getCoveredText(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getCoveredText() + \"URI: \" + dbped.getUri() ); \n\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\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//SP Map offsets to lemma of opinion verb/noun; parser does not provide lemma\n\t\t\t\t for (CoreLabel token: sentence.get(TokensAnnotation.class)) {\n//\t\t\t\t\t System.out.println(\"LEMMA \" + token.lemma().toString());\n\t\t\t\t\t int beginTok = token.beginPosition();\n\t\t\t\t\t int endTok = token.endPosition();\n\t\t\t\t\t String offsets = \"\" + beginTok + \"-\" + endTok;\n\t\t\t\t\t hds.offsetToLemma.put(offsets, token.lemma().toString());\n\t\t\t\t\t \n\t\t\t\t\t \t if (opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t \n//\t\t\t \t System.out.println(\"offsetToLemmaOfOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\t\t\t\t\t \t if (passive_opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfPassiveOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n//\t\t\t \t System.out.println(\"offsetToLemmaOfPassiveOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\n\t\t\t\t } \n\n\t\t\t//SPnew parser\n\t\t\tTree tree = sentence.get(TreeAnnotation.class);\n\t\t\tTreebankLanguagePack tlp = new PennTreebankLanguagePack();\n\t\t\tGrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();\n\t\t\tGrammaticalStructure gs = gsf.newGrammaticalStructure(tree);\n\t\t\tCollection<TypedDependency> td = gs.typedDependenciesCollapsed();\n\n\t\t\t \n//\t\t\tSystem.out.println(\"TYPEDdep\" + td);\n\t\t\t\n\t\t\tObject[] list = td.toArray();\n//\t\t\tSystem.out.println(list.length);\n\t\t\tTypedDependency typedDependency;\nDEPENDENCYSEARCH: for (Object object : list) {\n\t\t\ttypedDependency = (TypedDependency) object;\n//\t\t\tSystem.out.println(\"DEP \" + typedDependency.dep().toString()+ \n//\t\t\t\t\t\" GOV \" + typedDependency.gov().toString()+ \n//\t\t\t\" :: \"+ \" RELN \"+typedDependency.reln().toString());\n\t\t\tString pos = null;\n String[] elements;\n String verbCand = null;\n int beginVerbCand = -5;\n\t\t\tint endVerbCand = -5;\n\t\t\tString offsetVerbCand = null;\n\n if (compTag.contains(typedDependency.reln().toString())) {\n \tcontainsSubordinateConjunction = true;\n// \tSystem.out.println(\"subordConj \" + typedDependency.dep().toString().toLowerCase());\n }\n \n else if (subjTag.contains(typedDependency.reln().toString())){\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \t\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tfor (HashMap.Entry<String, String> entry : hds.offsetToLemma.entrySet()) {\n//\t\t\t\t String key = entry.getKey();\n//\t\t\t\t Object value = entry.getValue();\n//\t\t\t\t System.out.println(\"OFFSET \" + key + \" LEMMA \" + value);\n//\t\t\t\t // FOR LOOP\n//\t\t\t\t}\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"SUBJCHAINHEAD1\");\n\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\tSystem.out.println(\"verbCand \" + verbCand);\n\t\t\t\t//hack for subj after obj said Zwickel (obj) on Monday morning (subj)\n\t\t\t\tif (language.equals(\"en\") \n\t\t\t\t\t\t&& hds.predicateToObject.containsKey(offsetVerbCand)\n\t\t\t\t\t\t){\n// \t\tSystem.out.println(\"CONTINUE DEP\");\n \t\tcontinue DEPENDENCYSEARCH;\n \t}\n\t\t\t\telse {\n\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n\t\t\t\t}\n }\n //Merkel is concerned\n else if (passSubjTag.contains(typedDependency.reln().toString())){\n \t//Merkel was reported\n \t//Merkel was concerned\n \t//Merkel was quoted\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n////\t\t\t\t\tSystem.out.println(\"LEMMA verbCand \" + verbCandLemma);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n \t\n \tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n// \tSystem.out.println(\"SUBJCHAINHEAD2\");\n \t//Merkel is concerned\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfPassiveOpinionVerb,\n \t\t\thds);\n }\n //Meanwhile, the ECB's vice-president, Christian Noyer, was reported at the start of the week to have said that the bank's future interest-rate moves\n// would depend on the behavior of wage negotiators as well as the pace of the economic recovery.\n\n else if (apposTag.contains(typedDependency.reln().toString())){\n \t\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tString appo = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tint beginAppo = typedDependency.dep().beginPosition();\n\t\t\t\tint endAppo = typedDependency.dep().endPosition();\n\t\t\t\tString offsetAppo = \"\" + beginAppo + \"-\" + endAppo;\n\t\t\t\t\n// \tSystem.out.println(\"APPOSITION1 \" + subjCand + \"::\"+ appo + \":\" + offsetSubjCand + \" \" + offsetAppo);\n \thds.subjectToApposition.put(offsetSubjCand, offsetAppo);\n }\n else if (relclauseTag.contains(typedDependency.reln().toString())){\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tverbCand = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.dep().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.dep().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\tString subjCandPos = null;\n\t\t\t\tif (hds.predicateToSubject.containsKey(offsetVerbCand)){\n\t\t\t\t\t\n\t\t\t\t\tif (subjCand.matches(\".+?/.+?\")) { \n\t\t\t\t\t\telements = subjCand.split(\"/\");\n\t\t\t\t\t\tsubjCand = elements[0];\n\t\t\t\t\t\tsubjCandPos = elements[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tString del = hds.predicateToSubject.get(offsetVerbCand);\n\t\t\t\t\thds.predicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToPredicate.remove(del);\n\t\t\t\t\thds.normalPredicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToNormalPredicate.remove(del);\n//\t\t\t\t\tSystem.out.println(\"REMOVE RELPRO \" + verbCand + \"/\" + hds.offsetToLemma.get(del));\n\t\t\t\t\thds.predicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToPredicate.put( offsetSubjCand, offsetVerbCand);\n\t\t\t\t\thds.normalPredicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToNormalPredicate.put( offsetSubjCand, offsetVerbCand);\n//\t\t\t\t\tSystem.out.println(\"RELCLAUSE \" + subjCand + \"::\" + \":\" + verbCand);\n\t\t\t\t\thds.offsetToSubjectHead.put(offsetSubjCand,subjCand);\n\t\t\t\t\thds.SubjectHead.add(offsetSubjCand);\n\t\t\t\t\t\n\t\t\t\t\tif (subjCandPos != null && hds.pronTag.contains(subjCandPos)){\n\t\t\t\t\t\thds.PronominalSubject.add(offsetSubjCand);\n\t\t\t\t\t}\n\t\t\t\t}\n \t\n \t\n }\n \n else if (dirObjTag.contains(typedDependency.reln().toString())\n \t\t){\n \tstoreRelations(typedDependency, hds.predicateToObject, hds.ObjectToPredicate, hds);\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\t\n\t\t\t\tString objCand = typedDependency.dep().toString().toLowerCase();\n \tint beginObjCand = typedDependency.dep().beginPosition();\n \tint endObjCand = typedDependency.dep().endPosition();\n \tString offsetObjCand = \"\" + beginObjCand + \"-\" + endObjCand;\n \tString objCandPos;\n \tif (objCand.matches(\".+?/.+?\")) { \n\t\t\t\t\telements = objCand.split(\"/\");\n\t\t\t\t\tobjCand = elements[0];\n\t\t\t\t\tobjCandPos = elements[1];\n//\t\t\t\t\tSystem.out.println(\"PRON OBJ \" + objCandPos);\n\t\t\t\t\tif (pronTag.contains(objCandPos)){\n\t\t\t\t\thds.PronominalSubject.add(offsetObjCand);\n\t\t\t\t\t}\n\t\t\t\t\t}\n// \tSystem.out.println(\"DIROBJ STORE ONLY\");\n \t//told Obama\n \t//said IG metall boss Klaus Zwickel\n \t// problem: pointing DO\n \t//explains David Gems, pointing out the genetically manipulated species.\n \t if (language.equals(\"en\") \n \t\t\t\t\t\t&& !hds.normalPredicateToSubject.containsKey(offsetVerbCand)\n \t\t\t\t\t\t){\n// \t\t System.out.println(\"INVERSE SUBJ HACK ENGLISH PREDTOOBJ\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t }\n }\n //was reported to have said\n else if (infVerbTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.mainToInfinitiveVerb, hds.infinitiveToMainVerb, hds);\n// \tSystem.out.println(\"MAIN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n else if (aclauseTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.nounToInfinitiveVerb, hds.infinitiveVerbToNoun, hds);\n// \tSystem.out.println(\"NOUN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n \n \n\n\t\t\t}\n\t\t\t\n//\t\t\tSemanticGraph dependencies = sentence.get(CollapsedCCProcessedDependenciesAnnotation.class);\n//\t\t\tSystem.out.println(\"SEM-DEP \" + dependencies);\t\n\t\t}\n\t\t\n\n\t\tMap<Integer, edu.stanford.nlp.dcoref.CorefChain> corefChains = document.get(CorefChainAnnotation.class);\n\t\t \n\t\t if (corefChains == null) { return; }\n\t\t //SPCOPY\n\t\t for (Entry<Integer, edu.stanford.nlp.dcoref.CorefChain> entry: corefChains.entrySet()) {\n//\t\t System.out.println(\"Chain \" + entry.getKey() + \" \");\n\t\t \tint chain = entry.getKey();\n\t\t String repMenNer = null;\n\t\t String repMen = null;\n\t\t String offsetRepMenNer = null;\n\n\t\t List<IaiCorefAnnotation> listCorefAnnotation = new ArrayList<IaiCorefAnnotation>();\n\t\t \n\t\t for (CorefMention m : entry.getValue().getMentionsInTextualOrder()) {\n\t\t \tboolean corefMentionContainsNer = false;\n\t\t \tboolean repMenContainsNer = false;\n\n//\t\t \n\n\t\t\t\t// We need to subtract one since the indices count from 1 but the Lists start from 0\n\t\t \tList<CoreLabel> tokens = sentences.get(m.sentNum - 1).get(TokensAnnotation.class);\n\t\t // We subtract two for end: one for 0-based indexing, and one because we want last token of mention not one following.\n//\t\t System.out.println(\" \" + m + \", i.e., 0-based character offsets [\" + tokens.get(m.startIndex - 1).beginPosition() +\n//\t\t \", \" + tokens.get(m.endIndex - 2).endPosition() + \")\");\n\t\t \n\t\t int beginCoref = tokens.get(m.startIndex - 1).beginPosition();\n\t\t\t\t int endCoref = tokens.get(m.endIndex - 2).endPosition();\n\t\t\t\t String offsetCorefMention = \"\" + beginCoref + \"-\" + endCoref;\n\t\t\t\t String corefMention = m.mentionSpan;\n\n\t\t\t\t CorefMention RepresentativeMention = entry.getValue().getRepresentativeMention();\n\t\t\t\t repMen = RepresentativeMention.mentionSpan;\n\t\t\t\t List<CoreLabel> repMenTokens = sentences.get(RepresentativeMention.sentNum - 1).get(TokensAnnotation.class);\n//\t\t\t\t System.out.println(\"REPMEN ANNO \" + \"\\\"\" + repMen + \"\\\"\" + \" is representative mention\" +\n// \", i.e., 0-based character offsets [\" + repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition() +\n//\t\t \", \" + repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition() + \")\");\n\t\t\t\t int beginRepMen = repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition();\n\t\t\t\t int endRepMen = repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition();\n\t\t\t\t String offsetRepMen = \"\" + beginRepMen + \"-\" + endRepMen;\n\t\t \t \n\t\t\t\t//Determine repMenNer that consists of largest NER (Merkel) to (Angela Merkel)\n\t\t\t\t //and \"Chancellor \"Angela Merkel\" to \"Angela Merkel\"\n\t\t \t //Further reduction to NER as in \"Chancellor Angela Merkel\" to \"Angela Merkel\" is\n\t\t\t\t //done in determineBestSubject. There, Chunk information and subjectHead info is available.\n\t\t\t\t //Chunk info and subjectHead info is used to distinguish \"Chancellor Angela Merkel\" to \"Angela Merkel\"\n\t\t\t\t //from \"The enemies of Angela Merkel\" which is not reduced to \"Angela Merkel\"\n\t\t\t\t //Problem solved: The corefMentions of a particular chain do not necessarily have the same RepMenNer (RepMen) \n\t\t\t\t // any more: Chancellor Angela Merkel repMenNer Chancellor Angela Merkel , then Angela Merkel has RepMenNer Angela Merkel\n\t\t\t\t if (offsetRepMenNer != null && hds.Ner.contains(offsetRepMenNer)){\n//\t\t\t\t\t System.out.println(\"NEWNer.contains(offsetRepMenNer)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetRepMen != null && hds.Ner.contains(offsetRepMen)){\n\t\t\t\t\t repMenNer = repMen;\n\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\tSystem.out.println(\"NEWNer.contains(offsetRepMen)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetCorefMention != null && hds.Ner.contains(offsetCorefMention)){\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"Ner.contains(offsetCorefMention)\");\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t corefMentionContainsNer = offsetsContainAnnotation(offsetCorefMention,hds.Ner);\n\t\t\t\t\t repMenContainsNer = offsetsContainAnnotation(offsetRepMen,hds.Ner);\n//\t\t\t\t\t System.out.println(\"ELSE Ner.contains(offsetCorefMention)\");\n\t\t\t\t }\n\t\t\t\t //Determine repMenNer that contains NER\n\t\t\t\t\tif (repMenNer == null){\n\t\t\t\t\t\tif (corefMentionContainsNer){\n\t\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (repMenContainsNer){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT2\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//no NER:\n\t\t\t\t\t\t//Pronoun -> repMen is repMenNer\n\t\t\t\t\t\telse if (hds.PronominalSubject.contains(offsetCorefMention) && repMen != null){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT3\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//other no NER: corefMention is repMenNer because it is closer to original\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"DEFAULT4\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \n \t IaiCorefAnnotation corefAnnotation = new IaiCorefAnnotation(aJCas);\n\t\t\t\n\t\t\t\t\t\n\n\n\t\t\t\t\tcorefAnnotation.setBegin(beginCoref);\n\t\t\t\t\tcorefAnnotation.setEnd(endCoref);\n\t\t\t\t\tcorefAnnotation.setCorefMention(corefMention);\n\t\t\t\t\tcorefAnnotation.setCorefChain(chain);\n\t\t\t\t\t//done below\n//\t\t\t\t\tcorefAnnotation.setRepresentativeMention(repMenNer);\n//\t\t\t\t\tcorefAnnotation.addToIndexes(); \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlistCorefAnnotation.add(corefAnnotation);\n\t\t\t\t\t\n//\t\t\t\t\tdone below:\n//\t\t\t\t\t offsetToRepMen.put(offsetCorefMention, repMenNer);\n//\t\t\t\t\t RepMen.add(offsetCorefMention);\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t }//end coref mention\n//\t\t System.out.println(\"END Chain \" + chain );\n//\t\t System.out.println(listCorefAnnotation.size());\n\t\t String offsetCorefMention = null;\n\t\t for (int i = 0; i < listCorefAnnotation.size(); i++) {\n\t\t \tIaiCorefAnnotation corefAnnotation = listCorefAnnotation.get(i);\n\t\t \tcorefAnnotation.setRepresentativeMention(repMenNer);\n\t\t \tcorefAnnotation.addToIndexes();\n\t\t \toffsetCorefMention = \"\" + corefAnnotation.getBegin() + \"-\" + corefAnnotation.getEnd();\n\t\t\t\t\thds.offsetToRepMen.put(offsetCorefMention, repMenNer);\n\t\t\t\t\thds.RepMen.add(offsetCorefMention);\n\t\t\t\t\t//COREF\n//\t\t\t\t\tSystem.out.println(\"Chain \" + corefAnnotation.getCorefChain());\n//\t\t\t\t\tSystem.out.println(\"corefMention \" + corefAnnotation.getCorefMention() + offsetCorefMention);\n//\t\t\t\t\tSystem.out.println(\"repMenNer \" + repMenNer);\n\t\t }\n\t\t } //end chains\n\n\n//\t\t System.out.println(\"NOW quote finder\");\n\n\n\t\t\n\t\t///* quote finder: begin find quote relation and quotee\n\t\t// direct quotes\n\t\t\n\t\t\n\t\tString quotee_left = null;\n\t\tString quotee_right = null; \n\t\t\n\t\tString representative_quotee_left = null;\n\t\tString representative_quotee_right = null; \n\t\t\n\t\tString quote_relation_left = null;\n\t\tString quote_relation_right = null;\n\t\t\n\t\tString quoteType = null;\n\t\tint quoteeReliability = 5;\n\t\tint quoteeReliability_left = 5;\n\t\tint quoteeReliability_right = 5;\n\t\tint quotee_end = -5;\n\t\tint quotee_begin = -5;\n\t\t\n\t\tboolean quoteeBeforeQuote = false;\n\n\n\t\n\t\t\n\t\t// these are all the quotes in this document\n\t\tList<CoreMap> quotes = document.get(QuotationsAnnotation.class);\n\t\tfor (CoreMap quote : quotes) {\n\t\t\tif (quote.get(TokensAnnotation.class).size() > 5) {\n\t\t\t\tQuoteAnnotation annotation = new QuoteAnnotation(aJCas);\n\n\t\t\t\tint beginQuote = quote.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endQuote = quote.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(quote.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tannotation.setBegin(beginQuote);\n\t\t\t\tannotation.setEnd(endQuote);\n\t\t\t\tannotation.addToIndexes();\n//\t\t\t}\n//\t\t}\n//\t\t\n//\t\tList<Q> newQuotes = document.get(QuotationsAnnotation.class);\t\t\n//\t\tfor (CoreMap annotation : newQuotes) {\n//\t\t\t\tif (1==1){\n//\t\t\t\tRe-initialize markup variables since they are also used for indirect quotes\n\t\t\t\tquotee_left = null;\n\t\t\t\tquotee_right = null; \n\t\t\t\t\n\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\n\t\t\t\tquote_relation_left = null;\n\t\t\t\tquote_relation_right = null;\n\t\t\t\tquoteeReliability = 5;\n\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\tquotee_end = -5;\n\t\t\t\tquotee_begin = -5;\n\t\t\t\tquoteType = \"direct\";\n\t\t\t\tquoteeBeforeQuote = false;\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> directQuoteTokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tToken.class, annotation);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n\t\t\t\t\n \n//\t\t\t\tfor (Token aFollowToken: followTokens){\n//\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\tChunk.class, aFollowToken);\n \n//direct quote quotee right:\n\t\t\t\t\n\t for (Token aFollow2Token: followTokens){\n\t\t\t\t\t List<SentenceAnnotation> sentencesFollowQuote = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t SentenceAnnotation.class, aFollow2Token);\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t for (SentenceAnnotation sentenceFollowsQuote: sentencesFollowQuote){\n\t\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tChunk.class, sentenceFollowsQuote);\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT\");\n\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"RIGHT\", \n\t\t\t\t\tchunks, hds, annotation);\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_right = quote_annotation_result[0];\n\t\t\t representative_quotee_right = quote_annotation_result[1];\n\t\t\t quote_relation_right = quote_annotation_result[2];\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_right = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t //Will Throw exception!\n\t\t\t //do something! anything to handle the exception.\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_right = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT RESULT quotee \" + quotee_right + \" representative_quotee \" + representative_quotee_right\n//\t\t\t\t\t+ \" quote_relation \" + quote_relation_right);\n\t\t \n\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> precedingTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n for (Token aPrecedingToken: precedingTokens){ \n \t\n \tif (directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString()) \n \t\t\t|| compLemma.contains(aPrecedingToken.getLemma().getValue().toString())) {\n// \t\tSystem.out.println(\"Hello, World lemma found\" + aPrecedingToken.getLemma().getValue());\n \t\tquoteeBeforeQuote = true;\n \t}\n \t\tList <NamedEntity> namedEntities = null;\n \t\tList <Token> tokens = null;\n \t\tList<Chunk> chunks = null;\n \t\t\n\t\t\t\t List<Sentence> precedingSentences = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken, 1);\n\t\t\t\t \n\t\t\t\t\t\tif (precedingSentences.isEmpty()){\n\t\t\t\t\t\t\tList<Sentence> firstSentence;\n\t\t\t\t \tfirstSentence = JCasUtil.selectCovering(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken);\n\n\t\t\t\t \tfor (Sentence aSentence: firstSentence){\n\t\t\t\t \t\t\n\n\t\t\t\t\t\t\t\tchunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\tChunk.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t \t\tnamedEntities = JCasUtil.selectCovered(aJCas,\n\t \t \t\tNamedEntity.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\ttokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\n\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t else {\t\n\t\t\t\t \tfor (Sentence aSentence: precedingSentences){\n//\t\t\t\t \t\tSystem.out.println(\"Hello, World sentence\" + aSentence);\n\t\t\t\t \t\tchunks = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tChunk.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\tnamedEntities = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tNamedEntity.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\ttokens = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence, aPrecedingToken);\n\t\t\t\t \t}\n\t\t\t\t }\n \t\n//\t\t\t\t \n//\t\t\t\t\t\tSystem.out.println(\"DIRECT QUOTE LEFT\");\n\t\t\t\t\t\tString[] quote_annotation_direct_left = determine_quotee_and_quote_relation(\"LEFT\", chunks,\n\t\t\t\t\t\t\t\t hds, annotation\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t );\n//\t\t\t\t\t\tSystem.out.println(\"QUOTE ANNOTATION \" + quote_annotation_direct_left.length);\t\t\n\t\tif (quote_annotation_direct_left.length>=4){\n//\t\t\tSystem.out.println(\"QUOTE ANNOTATION UPDATE \" + quote_annotation_direct_left[0] +\n//\t\t\t\t\t\" \" + quote_annotation_direct_left[1] + \" \" +\n//\t\t\t\t\tquote_annotation_direct_left[2]);\n\t\t quotee_left = quote_annotation_direct_left[0];\n\t\t representative_quotee_left = quote_annotation_direct_left[1];\n\t\t quote_relation_left = quote_annotation_direct_left[2];\n\t\t try {\n\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t} catch (NumberFormatException e) {\n\t\t //Will Throw exception!\n\t\t //do something! anything to handle the exception.\n\t\t\tquoteeReliability = -5;\n\t\t\tquoteeReliability_left = -5;\n\t\t\t}\t\t\t\t\t \n\t\t }\n//\t\tSystem.out.println(\"DIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t+ \" quote_relation \" + quote_relation_left);\n\t\t//no subject - predicate quotee quote_relation, quote introduced with colon: \n\t\tif (quotee_left == null && quote_relation_left == null && representative_quotee_left == null \n\t\t&& directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString())){\n//\t\t\tSystem.out.println(\"NER DIRECT QUOTE LEFT COLON\");\n\t\t\tString quoteeCandOffset = null; \n\t\t\tString quoteeCandText = null;\n\t\t if (namedEntities.size() == 1){\n \t \tfor (NamedEntity ne : namedEntities){\n// \t \t\tSystem.out.println(\"ONE NER \" + ne.getCoveredText());\n \t \t\tquoteeCandText = ne.getCoveredText();\n\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\tquotee_end = ne.getEnd();\n\t\t\t\t\tquotee_begin = ne.getBegin();\n\t\t\t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n\t\t\t\t\tquoteeReliability = 1;\n\t\t\t\t\tquoteeReliability_left = 1;\n \t }\n \t }\n \t else if (namedEntities.size() > 1) {\n \t \tint count = 0;\n \t \tString quotee_cand = null;\n// \t \tSystem.out.println(\"Hello, World ELSE SEVERAL NER\");\n \t \tfor (NamedEntity ner : namedEntities){\n// \t \t\tSystem.out.println(\"Hello, World NER TYPE\" + ner.getValue());\n \t \t\tif (ner.getValue().equals(\"PERSON\")){\n \t \t\t\tcount = count + 1;\n \t \t\t\tquotee_cand = ner.getCoveredText();\n \t \t\t\tquotee_end = ner.getEnd();\n \t \t\t\tquotee_begin = ner.getBegin();\n \t \t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n \t \t\t\t\n// \t \t\t\tSystem.out.println(\"Hello, World FOUND PERSON\" + quotee_cand);\n \t \t\t}\n \t \t}\n \t \tif (count == 1){ // there is exactly one NER.PERSON\n// \t \t\tSystem.out.println(\"ONE PERSON, SEVERAL NER \" + quotee_cand);\n \t \t\t\tquoteeCandText = quotee_cand;\n\t\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\t\tquoteeReliability = 3;\n\t\t\t\t\t\tquoteeReliability_left = 3;\n \t \t}\n \t }\n\t\t if(quoteeCandOffset != null && quoteeCandText != null ){\n//\t\t \t quotee_left = quoteeCandText;\n\t\t \t String result [] = determineBestRepMenSubject(\n\t\t \t\t\t quoteeCandOffset,quoteeCandOffset, quoteeCandText, hds);\n\t\t \t if (result.length>=2){\n\t\t \t\t quotee_left = result [0];\n\t\t \t\t representative_quotee_left = result [1];\n//\t\t \t System.out.println(\"RESULT2 NER quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left);\n\t\t \t }\n\t\t }\n\t\t}\n }\n\t\t\n \n\n\t\t\t\t\n\t\t\t\tif (quotee_left != null && quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"TWO QUOTEES\");\n\t\t\t\t\t\n\t\t\t\t\tif (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\") \n\t\t\t\t\t\t|| \tdirectQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t|| directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"PUNCT \" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\",\")){\n//\t\t\t\t\t\tSystem.out.println(\"COMMA \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse if (!directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"NO PUNCT \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n//\t\t\t\t\t\tSystem.out.println(\"UNCLEAR LEFT RIGHT \" + quotee_left + quote_relation_left + quote + quotee_right + quote_relation_right);\n\t\t\t\t\tannotation.setQuotee(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteRelation(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (quoteeBeforeQuote == true){\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_left != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE LEFT\" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE RIGHT FOUND\" + quotee_right + \" QUOTE RELATION \" + quote_relation_right + \":\" + quoteeReliability_right);\n\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_left != null ){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"NO QUOTEE FOUND\" + quote + quote_relation_left + quote_relation_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_right != null){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t}\n\t\t\t\telse if (quoteType != null){\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"Hello, World NO QUOTEE and NO QUOTE RELATION FOUND\" + quote);\n\t\t\t\t}\n\t\t\t\tif (annotation.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\tSystem.out.println(\"NOW!!\" + annotation.getRepresentativeQuoteeMention());\n\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(annotation.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\tannotation.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(annotation.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\tSystem.out.println(\"DBPRED FOUND\" + annotation.getRepresentativeQuoteeMention() + \" URI: \" + annotation.getQuoteeDBpediaUri());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} //for direct quote\n\t\t\n\t\t// annotate indirect quotes: opinion verb + 'that' ... until end of sentence: said that ...\n\n//\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class); //already instantiated above\nINDIRECTQUOTE:\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tif (sentence.get(TokensAnnotation.class).size() > 5) { \n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n//\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t \tint indirectQuoteBegin = -5;\n\t\t\t\tint indirectQuoteEnd = -5;\n\t\t\t\tboolean subsequentDirectQuoteInstance = false;\n\t\t\t\t\n\t\t\t\tList<Chunk> chunksIQ = JCasUtil.selectCovered(aJCas,\n\t\t\t\tChunk.class, sentenceAnn);\n\t\t\t\tList<Chunk> chunksBeforeIndirectQuote = null;\n\t\t\t\t\n\t\t\t\tint index = 0;\nINDIRECTCHUNK:\tfor (Chunk aChunk : chunksIQ) {\n\t\t\t\t\tindex++;\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE CHUNK VALUE \" + aChunk.getChunkValue().toString());\n//\t\t\t\t\tif (aChunk.getChunkValue().equals(\"SBAR\")) {\n\t\t\t\t\tif(indirectQuoteIntroChunkValue.contains(aChunk.getChunkValue())){\n//\t\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE INDEX \" + \"\" + index);\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<Token> tokensSbar = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tToken.class, aChunk);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (Token aTokenSbar : tokensSbar){\n//\t\t\t\t\t\t\tString that = \"that\";\n\t\t\t\t\t\t\tif (compLemma.contains(aTokenSbar.getLemma().getCoveredText())){\n\t\t\t\t\t\t// VP test: does that clause contain VP?\n//\t\t\t\t\t\t\t\tSystem.out.println(\"TOK1\" + aTokenSbar.getLemma().getCoveredText());\n//\t\t\t \tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\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\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\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\t//NEW\n//\t\t\t\t\t\t\t\tif (LANGUAGE == \"en\")\n\t\t\t\t\t\t\t\tList<Token> precedingSbarTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\t\t\t\t\tToken.class, aChunk, 1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (Token aPrecedingSbarToken: precedingSbarTokens){ \n//\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOK2\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \tif (coordLemma.contains(aPrecedingSbarToken.getLemma().getValue().toString())){\n//\t\t\t\t \t\tSystem.out.println(\"TOKK\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t \t\tint k = 0;\n\t\t\t\t \tSAY:\tfor (Chunk chunkBeforeAndThat : chunksBeforeIndirectQuote){\n//\t\t\t\t \t\t\txxxx\n\t\t\t\t \t\tk++;\n\t\t\t\t \t\t\tif (chunkBeforeAndThat.getChunkValue().equals(\"VP\")){\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\tList<Token> tokensInVp = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToken.class, chunkBeforeAndThat);\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Token aTokenInVp : tokensInVp){\n//\t\t\t\t\t\t\t\t\t\t\t\t\tString and;\n//\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOKK\" + aTokenInVp.getLemma().getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (aTokenInVp.getLemma().getValue().equals(\"say\")){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY OLD\" + indirectQuoteBegin + \":\" + sentenceAnn.getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, k);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindirectQuoteBegin = chunksBeforeIndirectQuote.get(chunksBeforeIndirectQuote.size()-1).getEnd()+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY NEW\" + indirectQuoteBegin + \":\" );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak SAY;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\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\t\n\t\t\t\t \t\t\t}\n\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\t\n\t\t\t\t \t}\n\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\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\t\t\n//\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\t\n\t\t\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuoteChunk = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class, aChunk);\n\t\t\t\t\t\t\t\tif (coveringDirectQuoteChunk.isEmpty()){\n//\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t indirectQuote.setBegin(indirectQuoteBegin);\n//\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t indirectQuoteEnd = sentenceAnn.getEnd();\n\t\t\t\t\t\t\t\t indirectQuote.setEnd(indirectQuoteEnd);\n\t\t\t\t\t\t\t\t indirectQuote.addToIndexes();\n\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = false;\n//\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FALSE\");\n\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\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t List<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tToken.class, indirectQuote, 1);\n\t\t\t\t\t\t\t\t for (Token aFollow3Token: followTokens){\n\t\t\t\t\t\t\t\t\t List<QuoteAnnotation> subsequentDirectQuotes = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class,aFollow3Token);\n\t\t\t\t\t\t\t\t\t if (!subsequentDirectQuotes.isEmpty()){\n\t\t\t\t\t\t\t\t\t\t for (QuoteAnnotation subsequentDirectQuote: subsequentDirectQuotes){\n\t\t\t\t\t\t\t\t\t\t\t if (subsequentDirectQuote.getRepresentativeQuoteeMention() != null\n\t\t\t\t\t\t\t\t\t\t\t\t && subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")){\n//\t\t\t\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FOUND\"); \n\t\t\t\t\t\t\t\t\t\t\t hds.subsequentDirectQuote = subsequentDirectQuote;\n\t\t\t\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = true;\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\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\t \n\t\t\t\t\t\t\t\t break INDIRECTCHUNK;\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}\t\t\n\t\t\t\t}\n\t\t\t\t\tif (indirectQuoteBegin >= 0 && indirectQuoteEnd >= 0){\n//\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuote = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n//\t\t\t\t\t\tif (coveringDirectQuote.isEmpty()){\n////\t\t\t\t\t\t\t\n//\t\t\t\t\t\tindirectQuote.addToIndexes();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//indirect quote is covered by direct quote and therefore discarded\n//\t\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n//\t\t\t\t\t\t}\n\t\t\t\t\tList<QuoteAnnotation> coveredDirectQuotes = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n\t\t\t\t\tfor (QuoteAnnotation coveredDirectQuote : coveredDirectQuotes){\n//\t\t\t\t\t\tSystem.out.println(\"Hello, World covered direct quote\" + coveredDirectQuote.getCoveredText());\n\t\t\t\t\t\t//delete coveredDirectQuoteIndex\n\t\t\t\t\t\tcoveredDirectQuote.removeFromIndexes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//no indirect quote in sentence\n\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n//\t\t\t\t\t\tRe-initialize markup variables since they are also used for direct quotes\n\t\t\t\t\t\tquotee_left = null;\n\t\t\t\t\t\tquotee_right = null; \n\t\t\t\t\t\t\n\t\t\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquote_relation_left = null;\n\t\t\t\t\t\tquote_relation_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquoteType = \"indirect\";\n\t\t\t\t\t\tquoteeReliability = 5;\n\t\t\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\t\t\tquotee_end = -5;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\tif (chunksBeforeIndirectQuote != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"chunksBeforeIndirectQuote FOUND!! \");\n\t\t\t\t\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"LEFT\", chunksBeforeIndirectQuote,\n\t\t\t\t\t\t\t\t\t hds, indirectQuote\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_left = quote_annotation_result[0];\n\t\t\t representative_quotee_left = quote_annotation_result[1];\n\t\t\t quote_relation_left = quote_annotation_result[2];\n//\t\t\t System.out.println(\"INDIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t\t + \" QUOTE RELATION \" + quote_relation_left);\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_left = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (quotee_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t\tindirectQuote.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\t\tindirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//indirect quote followed by direct quote:\n\t\t\t\t\t\t\t//the quotee and quote relation of the indirect quote are copied to the direct quote \n\t\t\t\t\t\t\t//Genetic researcher Otmar Wiestler hopes that the government's strict controls on genetic research \n\t\t\t\t\t\t\t//will be relaxed with the advent of the new ethics commission. \n\t\t\t\t\t\t\t//\"For one thing the government urgently needs advice, because of course it's such an extremely \n\t\t\t\t\t\t\t//complex field. And one of the reasons Chancellor Schröder formed this new commission was without \n\t\t\t\t\t\t\t//a doubt to create his own group of advisors.\"\n\n\t\t\t\t\t\t\tif (subsequentDirectQuoteInstance == true\n\t\t\t\t\t\t\t\t&&\thds.subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuotee().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuoteRelation().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t\t){\n//\t\t\t\t\t\t\t\tSystem.out.println(\"SUBSEQUENT UNCLEAR DIR QUOTE FOUND!!\"); \n\t\t\t\t\t\t\t\tint begin = hds.subsequentDirectQuote.getBegin();\n\t\t\t\t\t\t\t\tint end = hds.subsequentDirectQuote.getEnd();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteType(\"direct\");\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteeReliability(quoteeReliability_left + 2);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.addToIndexes();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE \" + quotee_left + quote_relation_left + quoteeReliability);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (quote_relation_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (quoteType != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE NOT FOUND\" + quote_relation_left);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (indirectQuote.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"NOW!!\" + indirectQuote.getRepresentativeQuoteeMention());\n\t\t\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(indirectQuote.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\t\t\tindirectQuote.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\t\t\tSystem.out.println(\"DBPEDIA \" + indirectQuote.getRepresentativeQuoteeMention() + \" URI: \" + hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n\t\t\t\t\t\t\t}\n\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\t}\n//\t\t\t\t}\n//\t\t\t }\n//\t\t\t} //for chunk\n//\t\t\t\tsay without that\n//\t\t\t}\t\t\n\t\t} //Core map sentences indirect quotes\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tprotected Map<Object, Object> rawTextParse(CharSequence text) {\n\n\t\tStanfordCoreNLP pipeline = null;\n\t\ttry {\n\t\t\tpipeline = pipelines.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tAnnotation document = new Annotation(text.toString());\n\t\tpipeline.annotate(document);\n\t\tMap<Object, Object> sentencesMap = new LinkedHashMap<Object, Object>();//maintain sentence order\n\t\tint id = 0;\n\t\tList<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n\t\tfor (CoreMap sentence : sentences) {\n\t\t\tStringBuilder processedText = new StringBuilder();\n\t\t\tfor (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n\t\t\t\tString word = token.get(CoreAnnotations.TextAnnotation.class);\n\t\t\t\tString lemma = token.get(CoreAnnotations.LemmaAnnotation.class);\n\t\t\t\tString pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n\t\t\t\t//todo this should really happen after parsing is done, because using lemmas might confuse the parser\n\t\t\t\tif (config().isUseLowercaseEntries()) {\n\t\t\t\t\tword = word.toLowerCase();\n\t\t\t\t\tlemma = lemma.toLowerCase();\n\t\t\t\t}\n\t\t\t\tif (config().isUseLemma()) {\n\t\t\t\t\tword = lemma;\n\t\t\t\t}\n\t\t\t\tprocessedText.append(word).append(POS_DELIMITER).append(lemma).append(POS_DELIMITER).append(pos).append(TOKEN_DELIM);\n //inserts a TOKEN_DELIM at the end too\n\t\t\t}\n\t\t\tsentencesMap.put(id, processedText.toString().trim());//remove the single trailing space\n\t\t\tid++;\n\t\t}\n\t\ttry {\n\t\t\tpipelines.put(pipeline);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn sentencesMap;\n\t}", "public void processDocument() {\n\n\t\t// compact concepts\n\t\tprocessConcepts(concepts);\n\t}", "public static void main(final String[] args)\r\n {\r\n // Set the path to the data files\r\n Dictionary.initialize(\"c:/Program Files/WordNet/2.1/dict\");\r\n \r\n // Get an instance of the Dictionary object\r\n Dictionary dict = Dictionary.getInstance();\r\n \r\n // Declare a filter for all terms starting with \"car\", ignoring case\r\n TermFilter filter = new WildcardFilter(\"car*\", true);\r\n \r\n // Get an iterator to the list of nouns\r\n Iterator<IndexTerm> iter = \r\n dict.getIndexTermIterator(PartOfSpeech.NOUN, 1, filter);\r\n \r\n // Go over the list items\r\n while (iter.hasNext())\r\n {\r\n // Get the next object\r\n IndexTerm term = iter.next();\r\n \r\n // Write out the object\r\n System.out.println(term.toString());\r\n \r\n // Write out the unique pointers for this term\r\n int nNumPtrs = term.getPointerCount();\r\n if (nNumPtrs > 0)\r\n {\r\n // Print out the number of pointers\r\n System.out.println(\"\\nThis term has \" + Integer.toString(nNumPtrs) +\r\n \" pointers\");\r\n \r\n // Print out all of the pointers\r\n String[] ptrs = term.getPointers();\r\n for (int i = 0; i < nNumPtrs; ++i)\r\n {\r\n String p = Pointer.getPointerDescription(term.getPartOfSpeech(), ptrs[i]);\r\n System.out.println(ptrs[i] + \": \" + p);\r\n }\r\n }\r\n \r\n // Get the definitions for this term\r\n int nNumSynsets = term.getSynsetCount();\r\n if (nNumSynsets > 0)\r\n {\r\n // Print out the number of synsets\r\n System.out.println(\"\\nThis term has \" + Integer.toString(nNumSynsets) +\r\n \" synsets\");\r\n \r\n // Print out all of the synsets\r\n Synset[] synsets = term.getSynsets();\r\n for (int i = 0; i < nNumSynsets; ++i)\r\n {\r\n System.out.println(synsets[i].toString());\r\n }\r\n }\r\n }\r\n \r\n System.out.println(\"Demo processing finished.\");\r\n }", "@Override\n protected List<Term> segSentence(char[] sentence)\n {\n WordNet wordNetAll = new WordNet(sentence);\n ////////////////生成词网////////////////////\n generateWordNet(wordNetAll);\n ///////////////生成词图////////////////////\n// System.out.println(\"构图:\" + (System.currentTimeMillis() - start));\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"粗分词网:\\n%s\\n\", wordNetAll);\n }\n// start = System.currentTimeMillis();\n List<Vertex> vertexList = viterbi(wordNetAll);\n// System.out.println(\"最短路:\" + (System.currentTimeMillis() - start));\n\n if (config.useCustomDictionary)\n {\n if (config.indexMode > 0)\n combineByCustomDictionary(vertexList, this.dat, wordNetAll);\n else combineByCustomDictionary(vertexList, this.dat);\n }\n\n if (HanLP.Config.DEBUG)\n {\n System.out.println(\"粗分结果\" + convert(vertexList, false));\n }\n\n // 数字识别\n if (config.numberQuantifierRecognize)\n {\n mergeNumberQuantifier(vertexList, wordNetAll, config);\n }\n\n // 实体命名识别\n if (config.ner)\n {\n WordNet wordNetOptimum = new WordNet(sentence, vertexList);\n int preSize = wordNetOptimum.size();\n if (config.nameRecognize)\n {\n PersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.translatedNameRecognize)\n {\n TranslatedPersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.japaneseNameRecognize)\n {\n JapanesePersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.placeRecognize)\n {\n PlaceRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.organizationRecognize)\n {\n // 层叠隐马模型——生成输出作为下一级隐马输入\n wordNetOptimum.clean();\n vertexList = viterbi(wordNetOptimum);\n wordNetOptimum.clear();\n wordNetOptimum.addAll(vertexList);\n preSize = wordNetOptimum.size();\n OrganizationRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (wordNetOptimum.size() != preSize)\n {\n vertexList = viterbi(wordNetOptimum);\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"细分词网:\\n%s\\n\", wordNetOptimum);\n }\n }\n }\n\n // 如果是索引模式则全切分\n if (config.indexMode > 0)\n {\n return decorateResultForIndexMode(vertexList, wordNetAll);\n }\n\n // 是否标注词性\n if (config.speechTagging)\n {\n speechTagging(vertexList);\n }\n\n return convert(vertexList, config.offset);\n }", "private void parseEntities() {\n // See: https://github.com/twitter/twitter-text/tree/master/java\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractCashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractHashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractMentionedScreennamesWithIndices(getText()));\n }", "private void startParsing(){\r\n pondred = new ArrayList<>();\r\n //extract docs from corpus\r\n for (String xml:parseDocsFile(docs_file))\r\n {\r\n try {\r\n pondred.add(loadXMLFromString(xml));\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n System.out.println(\"Ending parsing\");\r\n for (Core pon:pondred){\r\n for (String string:pon.abstractTerm){\r\n Double tf = pon.getAbstractFerq(string)/pon.getAbstractSize();\r\n Double idf = Math.log10(Core.count/countingDuplicates(string));\r\n pon.abstractFrequence.put(string,tf*idf);\r\n }\r\n pon.finish();\r\n }\r\n }", "public List<String> getRelatedWords(String word) throws IOException {\n List<String> result = new ArrayList<String>();\n IDictionary dict = new Dictionary(new File(WORDNET_LOCATION));\n try {\n dict.open();\n IStemmer stemmer = new WordnetStemmer(dict);\n for (POS pos : EnumSet.of(POS.ADJECTIVE, POS.ADVERB, POS.NOUN, POS.VERB)) {\n List<String> resultForPos = new ArrayList<String>();\n List<String> stems = new ArrayList<String>();\n stems.add(word);\n for (String stem : stemmer.findStems(word, pos)) {\n if (!stems.contains(stem))\n stems.add(stem);\n }\n for (String stem : stems) {\n if (!resultForPos.contains(stem)) {\n resultForPos.add(stem);\n IIndexWord idxWord = dict.getIndexWord(stem, pos);\n if (idxWord == null) continue;\n List<IWordID> wordIDs = idxWord.getWordIDs();\n if (wordIDs == null) continue;\n IWordID wordID = wordIDs.get(0);\n IWord iword = dict.getWord(wordID);\n \n ISynset synonyms = iword.getSynset();\n List<IWord> iRelatedWords = synonyms.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n \n List<ISynsetID> hypernymIDs = synonyms.getRelatedSynsets();\n if (hypernymIDs != null) {\n for (ISynsetID relatedSynsetID : hypernymIDs) {\n ISynset relatedSynset = dict.getSynset(relatedSynsetID);\n if (relatedSynset != null) {\n iRelatedWords = relatedSynset.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n }\n }\n }\n }\n }\n for (String relatedWord : resultForPos) {\n if (relatedWord.length() > 3\n && !relatedWord.contains(\"-\")\n && !result.contains(relatedWord)) {\n // TODO: Hack alert!\n // The - check is to prevent lucene from interpreting hyphenated words as negative search terms\n // Fix!\n result.add(relatedWord);\n }\n }\n }\n } finally {\n dict.close();\n }\n return result;\n }", "public WordNet(String synsets, String hypernyms) throws IOException {\n\n this.synsetsMap = new HashMap<Integer, ArrayList<String>>();\n this.nounsMap = new HashMap<String, ArrayList<Integer>>();\n this.edgesMap = new HashMap<Integer, ArrayList<Integer>>();\n int graphNodes = 0; \n \n // Process synsets.txt\n BufferedReader br = new BufferedReader(new FileReader(synsets));\n String line;\n while ((line = br.readLine()) != null) {\n String[] items = line.split(\",\");\n int synsetID = Integer.parseInt(items[0]);\n String[] nouns = items[1].split(\" \");\n \n for (String noun : nouns) {\n if (!nounsMap.containsKey(noun)) {\n nounsMap.put(noun, new ArrayList<Integer>());\n }\n nounsMap.get(noun).add(synsetID);\n }\n \n if (!synsetsMap.containsKey(synsetID)) {\n synsetsMap.put(synsetID, new ArrayList<String>());\n }\n \n for (String noun : nouns) {\n synsetsMap.get(synsetID).add(noun);\n }\n graphNodes++; \n }\n br.close();\n\n // Process hypernyms.txt\n br = new BufferedReader(new FileReader(hypernyms));\n while ((line = br.readLine()) != null) {\n String[] items = line.split(\",\");\n int hypernymID = Integer.parseInt(items[0]);\n \n if (!edgesMap.containsKey(hypernymID)) {\n edgesMap.put(hypernymID, new ArrayList<Integer>());\n }\n \n for (int i = 1; i < items.length; i++) {\n edgesMap.get(hypernymID).add(Integer.parseInt(items[i]));\n }\n }\n br.close();\n \n // Construct Graph\n this.G = new Digraph(graphNodes);\n for (Map.Entry<Integer, ArrayList<Integer>> entry : edgesMap.entrySet()) {\n for (int edge : entry.getValue()) {\n this.G.addEdge(entry.getKey(), edge);\n }\n }\n \n // Check if there's a cycle\n DirectedCycle cycle = new DirectedCycle(this.G);\n if (cycle.hasCycle()) {\n throw new java.lang.IllegalArgumentException();\n }\n \n // Construct SAP \n this.sap = new SAP(this.G);\n }", "public static void main(String[] args) throws Exception \n\t{\n\t\tList<String> stopWords = new ArrayList<String>();\n\t\tstopWords = stopWordsCreation();\n\n\n\t\t\n\t\tHashMap<Integer, String> hmap = new HashMap<Integer, String>();\t//Used in tittle, all terms are unique, and any dups become \" \"\n\t\n\t\t\n\t\tList<String> uniqueTerms = new ArrayList<String>();\n\t\tList<String> allTerms = new ArrayList<String>();\n\t\t\t\t\n\t\t\n\t\tHashMap<Integer, String> hmap2 = new HashMap<Integer, String>();\n\t\tHashMap<Integer, String> allValues = new HashMap<Integer, String>();\n\t\tHashMap<Integer, Double> docNorms = new HashMap<Integer, Double>();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMap<Integer, List<String>> postingsFileListAllWords = new HashMap<>();\t\t\n\t\tMap<Integer, List<String>> postingsFileList = new HashMap<>();\n\t\t\n\t\tMap<Integer, List<StringBuilder>> docAndTitles = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAbstract = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAuthors = new HashMap<>();\n\t\t\n\t\t\n\t\tMap<Integer, List<Double>> termWeights = new HashMap<>();\n\t\t\n\t\tList<Integer> docTermCountList = new ArrayList<Integer>();\n\t\t\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tString sCurrentLine;\n\n\t\tint documentCount = 0;\n\t\tint documentFound = 0;\n\t\tint articleNew = 0;\n\t\tint docTermCount = 0;\n\t\t\n\t\t\n\t\tboolean abstractReached = false;\n\n\t\ttry {\n\t\t\tfr = new FileReader(FILENAME);\n\t\t\tbr = new BufferedReader(fr);\n\n\t\t\t// Continues to get 1 line from document until it reaches the end of EVERY doc\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) \n\t\t\t{\n\t\t\t\t// sCurrentLine now contains the 1 line from the document\n\n\t\t\t\t// Take line and split each word and place them into array\n\t\t\t\tString[] arr = sCurrentLine.split(\" \");\n\n\n\t\t\t\t//Go through the entire array\n\t\t\t\tfor (String ss : arr) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * This section takes the array and checks to see if it has reached a new\n\t\t\t\t\t * document or not. If the current line begins with an .I, then it knows that a\n\t\t\t\t\t * document has just started. If it incounters another .I, then it knows that a\n\t\t\t\t\t * new document has started.\n\t\t\t\t\t */\n\t\t\t\t\t//System.out.println(\"Before anything: \"+sCurrentLine);\n\t\t\t\t\tif (arr[0].equals(\".I\")) \n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\tif (articleNew == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 1;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if (articleNew == 1) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 0;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t//System.out.println(documentFound);\n\t\t\t\t\t\t//count++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* This section detects that after a document has entered,\n\t\t\t\t\t * it has to gather all the words contained in the title \n\t\t\t\t\t * section.\n\t\t\t\t\t */\n\t\t\t\t\tif (arr[0].equals(\".T\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndTitles.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".B|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (String tittleWords : tittle)\n\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\ttittleWords = tittleWords.toLowerCase();\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'*{}|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\t//System.out.println(tittleWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(tittleWords)) \n\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\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\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(tittleWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(tittleWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\ttitle.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndTitles.get(documentFound).add(title);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (arr[0].equals(\".A\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndAuthors.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder author = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tauthor.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\tauthor.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndAuthors.get(documentFound).add(author);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* Since there may or may not be an asbtract after\n\t\t\t\t\t * the title, we need to check what the next section\n\t\t\t\t\t * is. We know that every doc has a publication date,\n\t\t\t\t\t * so it can end there, but if there is no abstract,\n\t\t\t\t\t * then it will keep scanning until it reaches the publication\n\t\t\t\t\t * date. If abstract is empty (in tests), it will also finish instantly\n\t\t\t\t\t * since it's blank and goes straight to .B (the publishing date).\n\t\t\t\t\t * Works EXACTLY like Title \t\t \n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (abstractReached) \n\t\t\t\t\t{\t\n\t\t\t\t\t\t//System.out.println(\"\\n\");\n\t\t\t\t\t\t//System.out.println(\"REACHED ABSTRACT and current line is: \" +sCurrentLine);\n\t\t\t\t\t\tdocAndAbstract.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\tStringBuilder totalAbstract = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".T|.I|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tString[] abstaract = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (abstaract[0].equals(\".B\") )\n\t\t\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\t\t\tabstractReached = false;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttotalAbstract.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] misc = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tfor (String miscWords : misc) \n\t\t\t\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\tmiscWords = miscWords.toLowerCase(); \n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|?{}!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\t//System.out.println(miscWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(miscWords)) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\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\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(miscWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(miscWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\ttotalAbstract.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocAndAbstract.get(documentFound).add(totalAbstract);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t//Once article is found, we enter all of of it's title and abstract terms \n\t\t\t\tif (articleNew == 0) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tdocumentFound = documentFound - 1;\n\t\t\t\t\t//System.out.println(\"Words found in Doc: \" + documentFound);\n\t\t\t\t\t//System.out.println(\"Map is\" +allValues);\n\t\t\t\t\tSet set = hmap.entrySet();\n\t\t\t\t\tIterator iterator = set.iterator();\n\n\t\t\t\t\tSet set2 = allValues.entrySet();\n\t\t\t\t\tIterator iterator2 = set2.iterator();\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileList.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\tdocTermCount++;\n\t\t\t\t\t}\n\t\t\t\t\t// \"BEFORE its put in, this is what it looks like\" + hmap);\n\t\t\t\t\thmap2.putAll(hmap);\n\t\t\t\t\thmap.clear();\n\t\t\t\t\tarticleNew = 1;\n\n\t\t\t\t\tdocTermCountList.add(docTermCount);\n\t\t\t\t\tdocTermCount = 0;\n\n\t\t\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry2 = (Map.Entry) iterator2.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\t// docTermCount++;\n\t\t\t\t\t}\n\n\t\t\t\t\tallValues.clear();\t\t\t\t\t\n\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\n\t\t\t\t\t// \"MEANWHILE THESE ARE ALL VALUES\" + postingsFileListAllWords);\n\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Looking at final doc!\");\n\t\t\t//Final loop for last sets\n\t\t\tSet set = hmap.entrySet();\n\t\t\tIterator iterator = set.iterator();\n\n\t\t\tSet setA = allValues.entrySet();\n\t\t\tIterator iteratorA = setA.iterator();\n\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t// //);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\tString term2 = mentry.getValue().toString();\n\t\t\t\tpostingsFileList.get(documentFound - 1).add(term2);\n\n\t\t\t\tdocTermCount++;\n\t\t\t}\n\t\t\t//System.out.println(\"Done looking at final doc!\");\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Sorting time!\");\n\t\t\twhile (iteratorA.hasNext()) {\n\t\t\t\tMap.Entry mentry2 = (Map.Entry) iteratorA.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t// //);\n\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t// docTermCount++;\n\t\t\t}\n\n\t\t\thmap2.putAll(hmap);\n\t\t\thmap.clear();\n\t\t\tdocTermCountList.add(docTermCount);\n\t\t\tdocTermCount = 0;\n\n\n\t\t\t\n\t\t\n\t\t\t// END OF LOOKING AT ALL DOCS\n\t\t\t\n\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms);\n\t\t\tString[] sortedArray = allTerms.toArray(new String[0]);\n\t\t\tString[] sortedArrayUnique = uniqueTerms.toArray(new String[0]);\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t\n\t\t\tArrays.sort(sortedArray);\n\t\t\tArrays.sort(sortedArrayUnique);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//Sortings \n\t\t\tSet set3 = hmap2.entrySet();\n\t\t\tIterator iterator3 = set3.iterator();\n\n\t\t\t// Sorting the map\n\t\t\t//System.out.println(\"Before sorting \" +hmap2);\t\t\t\n\t\t\tMap<Integer, String> map = sortByValues(hmap2);\n\t\t\t//System.out.println(\"after sorting \" +map);\n\t\t\t// //\"After Sorting:\");\n\t\t\tSet set2 = map.entrySet();\n\t\t\tIterator iterator2 = set2.iterator();\n\t\t\tint docCount = 1;\n\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\tMap.Entry me2 = (Map.Entry) iterator2.next();\n\t\t\t\t// (me2.getKey() + \": \");\n\t\t\t\t// //me2.getValue());\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"Done sorting!\");\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Posting starts \");\n\t\t\t//\"THIS IS START OF DICTIONARTY\" \n\t\t\tBufferedWriter bw = null;\n\t\t\tFileWriter fw = null;\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Start making an array thats big as every doc total \");\n\t\t\tfor (int z = 1; z < documentFound+1; z++)\n\t\t\t{\n\t\t\t\ttermWeights.put(z, new ArrayList<Double>());\n\t\t\t}\n\t\t\t//System.out.println(\"Done making that large array Doc \");\n\t\t\t\n\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms)\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t//System.out.println(Arrays.toString(sortedArrayUnique));\n\t\t\t//System.out.println(uniqueTerms);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//\tSystem.out.println(\"Posting starts \");\n\t\t\t// \tPOSTING FILE STARTS \n\t\t\ttry {\n\t\t\t\t// Posting File\n\t\t\t\t//System.out.println(\"postingsFileListAllWords: \"+postingsFileListAllWords); //Contains every word including Dups, seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileList: \"+postingsFileList); \t\t //Contains unique words, dups are \" \", seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileListAllWords.size(): \" +postingsFileListAllWords.size()); //Total # of docs \n\t\t\t\t//System.out.println(\"Array size: \"+sortedArrayUnique.length);\n\n\t\t\t\tfw = new FileWriter(POSTING);\n\t\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\tString temp = \" \";\n\t\t\t\tDouble termFreq = 0.0;\n\t\t\t\t// //postingsFileListAllWords);\n\t\t\t\tList<String> finalTermList = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t// //postingsFileList.get(i).size());\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(finalTermList.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//PART TO FIND DOCUMENT FREQ\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint docCountIDF = 0;\n\t\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\t\tfor (int totalWords = 0; totalWords < sortedArray.length; totalWords++) \t\t\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD \n\t\t\t\t\t\t\t\t\t//System.out.println(\"fOUND STOP WORD\");\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\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\t\tString temp2 = sortedArray[totalWords];\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tdocCountIDF++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"Total Number: \" +docCountIDF);\n\t\t\t\t\t\t\t//System.out.println(\"documentFound: \" +documentFound);\n\t\t\t\t\t\t\t//System.out.println(\"So its \" + documentFound + \" dividied by \" +docCountIDF);\n\t\t\t\t\t\t\t//docCountIDF = 1;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble idf = (Math.log10(((double)documentFound/(double)docCountIDF)));\n\t\t\t\t\t\t\t//System.out.println(\"Calculated IDF: \"+idf);\n\t\t\t\t\t\t\tif (idf < 0.0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tidf = 0.0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"IDF is: \" +idf);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Size of doc words: \" + postingsFileListAllWords.size());\n\t\t\t\t\t\t\tfor (int k = 0; k < postingsFileListAllWords.size(); k++) \t\t//Go thru each doc. Since only looking at 1 term, it does it once per doc\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//System.out.println(\"Current Doc: \" +(k+1));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttermFreq = 1 + (Math.log10(Collections.frequency(postingsFileListAllWords.get(k), temp)));\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Freq is: \" +Collections.frequency(postingsFileListAllWords.get(k), temp));\n\t\t\t\t\t\t\t\t\t//System.out.println(termFreq + \": \" + termFreq.isInfinite());\n\t\t\t\t\t\t\t\t\tif (termFreq.isInfinite() || termFreq <= 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttermFreq = 0.0;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"termFreq :\" +termFreq); \n\t\t\t\t\t\t\t\t\t//System.out.println(\"idf: \" +idf);\n\t\t\t\t\t\t\t\t\ttermWeights.get(k+1).add( (idf*termFreq) );\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t\t\tfinalTermList.add(temp);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//FINALCOUNTER\n\t\t\t\t\t\t//System.out.println(\"Done looking at word: \" +j);\n\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\twhile (true)\n\t\t\t\t {\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Enter a query: \");\n\t\t\t\t\t\n\t \tScanner scanner = new Scanner(System.in);\n\t \tString enterQuery = scanner.nextLine();\n\t \t\n\t \t\n\t\t\t\t\tList<Double> queryWeights = new ArrayList<Double>();\n\t\t\t\t\t\n\t\t\t\t\t// Query turn\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tenterQuery = enterQuery.toLowerCase();\t\t\n\t\t\t\t\tenterQuery = enterQuery.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"]\", \"\");\n\t\t\t\t\t//System.out.println(\"Query is: \" + enterQuery);\n\t\t\t\t\t\n\t\t\t\t\tif (enterQuery.equals(\"exit\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tString[] queryArray = enterQuery.split(\" \");\n\t\t\t\t\tArrays.sort(queryArray);\n\t\t\t\t\t\n\t\t\t\t\t//Find the query weights for each term in vocab\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tint docCountDF = 0;\n\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\tfor (int totalWords = 0; totalWords < queryArray.length; totalWords++) \t\t\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString temp2 = queryArray[totalWords];\n\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocCountDF++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tDouble queryWeight = 1 + (Math.log10(docCountDF));\n\t\t\t\t\t\tif (queryWeight.isInfinite())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueryWeight = 0.0;\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tqueryWeights.add(queryWeight);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query WEights is: \"+queryWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Finding the norms for DOCS\t\t\t\t\t\n\t\t\t\t\tfor (int norms = 1; norms < documentFound+1; norms++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble currentTotal = 0.0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < termWeights.get(norms).size(); weightsPerDoc++)\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble square = Math.pow(termWeights.get(norms).get(weightsPerDoc), 2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Current square: \" + termWeights.get(norms).get(weightsPerDoc));\n\t\t\t\t\t\t\tcurrentTotal = currentTotal + square;\n\t\t\t\t\t\t\t//System.out.println(\"Current total: \" + currentTotal);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"About to square root this: \" +currentTotal);\n\t\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\t\tdocNorms.put(norms, root);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"All of the docs norms: \"+docNorms);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Finding the norm for the query\n\t\t\t\t\tdouble currentTotal = 0.0;\t\t\t\t\t\n\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < queryWeights.size(); weightsPerDoc++)\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tdouble square = Math.pow(queryWeights.get(weightsPerDoc), 2);\n\t\t\t\t\t\tcurrentTotal = currentTotal + square;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\tdouble queryNorm = root; \t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query norm \" + queryNorm);\n\t\t\t\t\t\n\t\t\t\t\t//Finding the cosine sim\n\t\t\t\t\t//System.out.println(\"Term Weights \" + termWeights);\n\t\t\t\t\tHashMap<Integer, Double> cosineScore = new HashMap<Integer, Double>();\n\t\t\t\t\tfor (int cosineSim = 1; cosineSim < documentFound+1; cosineSim++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble total = 0.0;\n\t\t\t\t\t\tfor (int docTerms = 0; docTerms < termWeights.get(cosineSim).size(); docTerms++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble docTermWeight = termWeights.get(cosineSim).get(docTerms);\n\t\t\t\t\t\t\tdouble queryTermWeight = queryWeights.get(docTerms);\n\t\t\t\t\t\t\t//System.out.println(\"queryTermWeight \" + queryTermWeight);\n\t\t\t\t\t\t\t//System.out.println(\"docTermWeight \" + docTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttotal = total + (docTermWeight*queryTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdouble cosineSimScore = 0.0;\n\t\t\t\t\t\tif (!(total == 0.0 || (docNorms.get(cosineSim) * queryNorm) == 0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = total / (docNorms.get(cosineSim) * queryNorm);\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\tcosineSimScore = 0.0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tcosineScore.put(cosineSim, cosineSimScore);\n\t\t\t\t\t}\n\t\t\t\t\tcosineScore = sortByValues2(cosineScore);\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"This is the cosineScores: \" +cosineScore);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"docAndTitles: \"+ docAndTitles);\n\t\t\t\t\tint topK = 0;\n\t\t\t\t\tint noValue = 0;\n\t\t\t\t\tfor (Integer name: cosineScore.keySet())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (topK < 50)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\n\t\t\t\t String key =name.toString();\n\t\t\t\t //String value = cosineScore.get(name).toString(); \n\t\t\t\t if (!(cosineScore.get(name) <= 0))\n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"Doc: \"+key);\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \tStringBuilder builder = new StringBuilder();\n\t\t\t\t \tfor (StringBuilder value : docAndTitles.get(name)) {\n\t\t\t\t \t builder.append(value);\n\t\t\t\t \t}\n\t\t\t\t \tString text = builder.toString();\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Title:\\n\" +docAndTitles.get(name));\n\t\t\t\t \tSystem.out.println(\"Title: \" +text);\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Authors:\\n\" +docAndAuthors.get(name));\n\t\t\t\t \t\n\t\t\t\t \tif (docAndAuthors.get(name) == null || docAndAuthors.get(name).toString().equals(\"\"))\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Authors: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAuthors.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Authors found: \" +text2);\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/* ABSTRACT \n\t\t\t\t \tif (docAndAbstract.get(name) == null)\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Abstract: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAbstract.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Abstract: \" +text2);\n\t\t\t\t \t}\t\n\t\t\t\t \t*/\n\t\t\t\t \t\n\t\t\t\t \tSystem.out.println(\"\");\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t \tnoValue++;\n\t\t\t\t }\n\t\t\t\t topK++;\n\t\t\t\t \n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (noValue == documentFound)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"No documents contain query!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\ttopK=0;\n\t\t\t\t\tnoValue = 0;\n\t\t\t\t }\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bw != null)\n\t\t\t\t\t\tbw.close();\n\n\t\t\t\t\tif (fw != null)\n\t\t\t\t\t\tfw.close();\n\n\t\t\t\t} catch (IOException ex) {\n\n\t\t\t\t\tex.printStackTrace();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\n\t\t\t\tif (fr != null)\n\t\t\t\t\tfr.close();\n\n\t\t\t} catch (IOException ex) {\n\n\t\t\t\tex.printStackTrace();\n\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tint itemCount = uniqueTerms.size();\n\t\t\t//System.out.println(allValues);\n\t\t\tSystem.out.println(\"Total Terms BEFORE STEMING: \" +itemCount);\n\t\t\tSystem.out.println(\"Total Documents \" + documentFound);\n\t\t\t\t\t\t\n\t\t \n\t\t\t \n\t\t\t \n\t\t\t//END OF MAIN\n\t\t}", "public void set_graph() throws ParseException, IOException {\n \tg = new WeightedUndirectedGraph(words.length);\n //g = new WeightedUndirectedGraph(most_important_terms.size());\n \n Directory dir = new SimpleFSDirectory(new File(\".\\\\data\\\\lucene_index_r_r\"));\n Analyzer analyzer = new StandardAnalyzer(LUCENE_41);\n \n // creat a map that stores, for each word (in the cluster), a set of all the documents that contain that word\n HashMap<String,HashSet<Integer>> word_to_docs_map = new HashMap<String,HashSet<Integer>>();\n int n_strings = words.length; \n \n // for each word...\n for (int idx = 0; idx < n_strings; idx++) {\n // query the index with that given word and retrieve all the documents that contains that word\n String query = words[idx]; \n QueryParser parser = new QueryParser(Version.LUCENE_41, \"text\", analyzer); \n Query q = parser.parse(query); \n\n IndexReader reader = DirectoryReader.open(dir);\n IndexSearcher searcher = new IndexSearcher(reader);\n TopDocs docs = searcher.search(q, reader.numDocs());\n ScoreDoc[] hits = docs.scoreDocs;\n \n // update map from word to docs it appears in \n //HashSet<Integer> tmp = null;\n // tmp is the set of all the document ids in which the current word is contained\n HashSet<Integer> tmp = new HashSet<>();\n //word_to_docs_map.put(query, tmp);\n \n // for each document, retrieved from the query\n for(Integer i=0;i<hits.length;i++) {\n Integer docId = hits[i].doc;\n // tmp = word_to_docs_map.get(query); \n // if the document is a document written by an user of interest \n if(indices.contains(docId)) {\n tmp.add(docId);\n }\n //word_to_docs_map.put(query, tmp); \n }\n word_to_docs_map.put(query, tmp);\n\t }\n\t \n\t // add edges: iterate over possible term pairs ...\n\t for(int idx_1 = 0; idx_1 < n_strings - 1; idx_1++) {\n\t \n\t for(int idx_2 = idx_1 + 1 ; idx_2 < n_strings ; idx_2 ++ ) {\n\t \n\t // extract document sets associated with the considered terms \n\t HashSet<Integer> set_a = word_to_docs_map.get(words[idx_1]); \n\t HashSet<Integer> set_b = word_to_docs_map.get(words[idx_2]); \n\t \n\t // compute set intersection \n\t int n = intersectionSize(set_a, set_b);\n\t \n\t // if the terms appear in at least one common document\n\t if(n>0) {\n\t // add edge \n\t g.testAndAdd(idx_1, idx_2 , n); \n\t }\n\t } \n\t }\n\t}", "public void ComputeSimilarity() {\n\t\t\n\t\t//first construct the vector space representations for these five reviews\n\t\t// the our smaples vector, finally get the similarity metric \n\t\tanalyzequery(LoadJson(\"./data/samples/query.json\"));\n\t\n\t\t\n\t\tHashMap<String, Double> Similarity = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < m_reviews.size(); i++) {\n\t\t\tString content = m_reviews.get(i).getContent();\n\n\t\t\tHashMap<String, Integer> conunttf = new HashMap<String, Integer>();\n\n\t\t\tHashSet<String> biminiset = new HashSet<String>();\n \n\t\t\t//danci means word unit: one or two words\n\t\t\tArrayList danci = new ArrayList();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (token.isEmpty())\n\t\t\t\t\tcontinue;\n\n\t\t\t\tdanci.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t}\n \n\t\t\t//get word count in a document\n\t\t\tfor (int k = 0; k < danci.size(); k++) {\n\n\t\t\t\tif (conunttf.containsKey(danci.get(k).toString())) {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(),\n\t\t\t\t\t\t\tconunttf.get(danci.get(k).toString()) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(), 1);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\n\t\t\t\t\tN_gram.add(token);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tString[] fine = new String[N_gram.size()];\n \n\t\t\t//get rid of stopwords\n\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t}\n\n\t\t\t\n\t\t\tfor (String str2 : fine) {\n\n\t\t\t\tif (conunttf.containsKey(str2)) {\n\t\t\t\t\tconunttf.put(str2, conunttf.get(str2) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(str2, 1);\n\t\t\t\t}\n\t\t\t}\n \n\t\t\t//compute tf * idf for each document\n\t\t\tfor (String key : conunttf.keySet()) {\n\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\tdouble tf = conunttf.get(key);\n\n\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\tm_idf.put(key, result);\n\t\t\t\t} else {\n\t\t\t\t\tm_idf.put(key, 0.0);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\tHashMap<String, Double> query = new HashMap<String, Double>();\n\t\t\tHashMap<String, Double> test = new HashMap<String, Double>();\n \n\t\t\t//If query contains this word, store it for future computation \n\t\t\tfor (Map.Entry<String, Double> entry : m_idf.entrySet()) {\n\t\t\t\tString key = entry.getKey();\n\t\t\t\tif (query_idf.containsKey(key)) {\n\t\t\t\t\tquery.put(key, query_idf.get(key));\n\t\t\t\t\ttest.put(key, m_idf.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdouble dotProduct = 0.00;\n\t\t\tdouble magnitude1 = 0.0;\n\t\t\tdouble magnitude2 = 0.0;\n\t\t\tdouble magnitude3 = 0.0;\n\t\t\tdouble magnitude4 = 0.0;\n\t\t\tdouble cosineSimilarity = 0;\n \n\t\t\t\n\t\t\t//compute Compute similarity between query document and each document in file\n\t\t\tfor (String cal : test.keySet()) {\n\t\t\t\tdotProduct += query.get(cal) * test.get(cal); // a.b\n\t\t\t\tmagnitude1 += Math.pow(query.get(cal), 2); // (a^2)\n\t\t\t\tmagnitude2 += Math.pow(test.get(cal), 2); // (b^2)\n\n\t\t\t\tmagnitude3 = Math.sqrt(magnitude1);// sqrt(a^2)\n\t\t\t\tmagnitude4 = Math.sqrt(magnitude2);// sqrt(b^2)\n\t\t\t}\n\n\t\t\tif (magnitude3 != 0.0 | magnitude4 != 0.0)\n\t\t\t\tcosineSimilarity = dotProduct / (magnitude3 * magnitude4);\n\n\t\t\telse\n\t\t\t\tcosineSimilarity = 0;\n\n\t\t\tSimilarity.put(content, cosineSimilarity);\n\n\t\t\t\t\t\n\n\t\t}\n\n\t\t// sort output to get 3 reviews with the highest similarity with query review\n\t\tList<Map.Entry<String, Double>> infoIds = new ArrayList<Map.Entry<String, Double>>(\n\t\t\t\tSimilarity.entrySet());\n\n\t\tCollections.sort(infoIds, new Comparator<Map.Entry<String, Double>>() {\n\t\t\tpublic int compare(Map.Entry<String, Double> o1,\n\t\t\t\t\tMap.Entry<String, Double> o2) {\n\t\t\t\treturn (int) (o1.getValue() - o2.getValue());\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = infoIds.size() - 1; i > infoIds.size() - 4; i--) {\n\t\t\tEntry<String, Double> ent = infoIds.get(i);\n\t\t\tSystem.out.println(ent.getValue()+\"++\"+ent.getKey()+\"\\n\");\n\n\t\t}\n\n\t}", "private Map<String, Map<String,Integer>> openNLPParse(String text) {\n\t\tMap<String, Map<String,Integer>> result = new HashMap<String, Map<String,Integer>>();\n\t\tString path = \"\";\n\t\t\n\t\tfor (String type : this.entityTypes) {\n\t\t\tpath = \"en-ner-\" + type.toLowerCase() + \".bin\";\n\t\t\tthis.nlp = new OpenNLPNameFinder(type, path);\n\t\t\tMap<String,Integer> entities = nlp.recogniseWithCounts(text);\n\t\t\tresult.put(type, entities);\n\t\t}\n\n\t\treturn result;\n\t}", "public static List<ExtractedEntity> extractEntities(String text){\n\t\tList<ExtractedEntity> extractedConcepts = new ArrayList<ExtractedEntity>();\n\t\tZemanta zem = new Zemanta(ZEMAMTA_API_KEY);\t\n\t\tZemantaResult zemResult = zem.suggest(text);\n\t\tString cid = zemResult.rid;\n\t\tfor(Link link : zemResult.markup.links){\n\t\t\tString term = link.anchor;\n\t\t\tfor(Target target : link.targets){\n\t\t\t\tif(target.url != null && target.url.startsWith(\"http://en.wikipedia.org/wiki/\")){\n\t\t\t\t\tExtractedEntity entity = new AlchemyAnnotator().new ExtractedEntity();\n\t\t\t\t\tentity.name = target.title;\n\t\t\t\t\tentity.type = target.type.name();\n\t\t\t\t\tentity.uri = target.url.replace(\"http://en.wikipedia.org/wiki/\", \"http://dbpedia.org/resource/\");\n\t\t\t\t\tentity.score = new Float(link.confidence).doubleValue();\n\t\t\t\t\tentity.text = link.anchor;\n\t\t\t\t\textractedConcepts.add(entity);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn extractedConcepts;\n\t}", "@Override\n public void process(JCas jCas) throws AnalysisEngineProcessException {\n JCas viewJCas = jCas;\n if (!view.equals(VIEW_SYSTEM)) {\n try {\n viewJCas = jCas.getView(view);\n } catch (CASException e) {// just rethrow\n throw new AnalysisEngineProcessException(e);\n }\n }\n\n Collection<de.julielab.jules.types.Sentence> sentences = select(\n viewJCas, de.julielab.jules.types.Sentence.class);\n\n for (de.julielab.jules.types.Sentence julesSentence : sentences) {\n int sentence_start = julesSentence.getBegin();\n\n if (julesSentence.getCoveredText().length() > 0) {\n\n try {\n Sentence sentence = new Sentence(\n julesSentence.getCoveredText());\n bannerTokenizer.tokenize(sentence);\n crfTagger.tag(sentence);// error\n if (postProcessor != null)\n postProcessor.postProcess(sentence);\n\n for (Mention mention : sentence.getMentions()) {\n\n int startChar = mention.getStartChar() + sentence_start;\n int endChar = mention.getEndChar() + sentence_start;\n // LOG.debug(\"found NE:\" + mention.getText() + \" \" +\n // startChar\n // + \":\" + endChar);\n Protein prot = new Protein(viewJCas, startChar, endChar);\n prot.setName(mention.getText());\n prot.setTextualRepresentation(\"⊂PROT⊃\");\n prot.addToIndexes();\n }\n\n } catch (Throwable t) {\n // not sure why, but this happens sometimes after some time\n int docId = getHeaderIntDocId(viewJCas);\n LOG.warn(\"Banner exception at docId {}, skipping. {}\",\n docId, StringUtils.print(t));\n try {\n GarbageCollectorAnnotator.runGC();\n loadTagger(); // reload\n } catch (Exception e) {\n throw new AnalysisEngineProcessException(e);\n }\n }\n }\n }\n }", "public void analyzeDocumentDemo(JSONObject json) {\n\t\ttry {\n\t\t\tJSONArray jarray = json.getJSONArray(\"Reviews\");\n\t\t\tfor (int i = 0; i < jarray.length(); i++) {\n\t\t\t\tPost review = new Post(jarray.getJSONObject(i));\n\t\t\t\tString content = review.getContent();\n\n\n\t\t\t\tHashSet<String> uniminiset = new HashSet<String>();\n\t\t\t\tHashSet<String> biminiset = new HashSet<String>();\n\n\t\t\t\tString[] unigram = tokenizer.tokenize(content);\n\n\t\t\t\tfor (String token : unigram) {\n\t\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\n\t\t\t\t\tuniminiset.add(token);\n\t\t\t\t}\n\n\t\t\t\t// count word frequency for unigram\n\t\t\t\tfor (String token2 : uniminiset) {\n\t\t\t\t\tif (m_stopwords.contains(token2))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse {\n\t\t\t\t\t\ttoken2 = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token2)));\n\t\t\t\t\t\tif (m_stats.containsKey(token2)) {\n\t\t\t\t\t\t\tm_stats.put(token2, m_stats.get(token2) + 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tm_stats.put(token2, 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tN_gram.add(token);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tString[] fine = new String[N_gram.size()];\n // In bigram, neither two words should occur in the stopwords\n\t\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t\t}\n\n\t\t\t\tfor (String str : fine) {\n\n\t\t\t\t\tbiminiset.add(str);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// count word frequency for unigram\n\t\t\t\tfor (String str2 : biminiset) {\n\n\t\t\t\t\tif (m_stats.containsKey(str2)) {\n\t\t\t\t\t\tm_stats.put(str2, m_stats.get(str2) + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tm_stats.put(str2, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n \n\t\t\t\t// store review content on m_reviews so later on when want to use it \n\t\t\t\t// we do not have to reread it from file\n\t\t\t\tm_reviews.add(review);\n \n\t\t\t\t//monitor the process of the program\n\t\t\t\tSystem.out.println(\"level\" + m_reviews.size());\n\n\t\t\t}\n\t\t}\n\n\t\tcatch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static HashMultimap<Word, EntityMention> getWord2Entities(JCas aJCas) {\n HashMultimap<Word, EntityMention> word2EntityMentions = HashMultimap.create();\n for (EntityMention em : UimaConvenience.getAnnotationList(aJCas, EntityMention.class)) {\n List<Word> coveredWords = JCasUtil.selectCovered(Word.class, em);\n for (Word coveredWord : coveredWords) {\n word2EntityMentions.put(coveredWord, em);\n }\n }\n return word2EntityMentions;\n }", "public ArrayList<Relation> extractRelations(LexicalizedParser lp) {\n\t\tBreakIterator iterator = BreakIterator.getSentenceInstance(Locale.US);\n\t\titerator.setText(body);\n\t\tint start = iterator.first();\n\t\tint sentenceCounter = 0;\n\t\tfor (int end = iterator.next();\n\t\t\t\tend != BreakIterator.DONE;\n\t\t\t\tstart = end, end = iterator.next()) {\n\t\t\tsentenceCounter++;\n\t\t\t/* list of NP in the sentence */\n\t\t\tArrayList<Tree> NPList;\n\t\t\t/* two NP will be used to extract relations */\n\t\t\tTree e1, e2;\n\t\t\tint e1Index, e2Index;\n\t\t\t\n\t\t\t// parse sentence\n\t\t\tString sentence = body.substring(start,end);\n\t\t\tString nerSentence = Processor.ner.runNER(sentence);\n\t\t\tString taggedSentence = Processor.tagger.tagSentence(sentence);\n\t\t\tTree parse = lp.apply(sentence);\n\t\t\t\n\t\t\t// generateNPList\n\t\t\tNPList = generateNPList(parse);\n\n\t\t\t// walk through NP list, select all e1 & e2 paris and construct relations\n\t\t\tif (NPList.size() < 2) \n\t\t\t\tcontinue;\n\t\t\tfor (e1Index = 0; e1Index < NPList.size() - 1; ++e1Index) {\n\t\t\t\tfor (e2Index = e1Index + 1; e2Index < NPList.size(); ++e2Index) {\n\t\t\t\t\tTree NP1 = NPList.get(e1Index);\n\t\t\t\t\tTree NP2 = NPList.get(e2Index);\n\t\t\t\t\t/* If enable export flag is set, then processor is in mode of\n\t\t\t\t\t * reading in predicated labeling file and export records into DB\n\t\t\t\t\t * Otherwise, processor is in mode of labeling itself using set of\n\t\t\t\t\t * rules and output the result to file for training.\n\t\t\t\t\t */\n\t\t\t\t\tboolean mode = !Processor.enableExport;\n\t\t\t\t\trelations.add(new Relation(url, NP1, NP2, sentence, taggedSentence, nerSentence, \n\t\t\t\t\t\t\tparse, (e2Index - e1Index), mode));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"There're \" + sentenceCounter + \" number of sentences in article \" + url);\n\t\treturn relations;\n\t}", "private void analyze() {\n\t\tdouble org = 0;\n\t\tdouble avgIndPerDoc = 0;\n\t\tdouble avgTotalPerDoc = 0;\n\n\t\tfor (Instance instance : instanceProvider.getInstances()) {\n\n\t\t\tint g = 0;\n\t\t\tSet<AbstractAnnotation> orgM = new HashSet<>();\n\n//\t\t\torgM.addAll(instance.getGoldAnnotations().getAnnotations());\n//\t\t\tg += instance.getGoldAnnotations().getAnnotations().size();\n\n\t\t\tfor (AbstractAnnotation instance2 : instance.getGoldAnnotations().getAnnotations()) {\n\n\t\t\t\tResult r = new Result(instance2);\n\n\t\t\t\t{\n////\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getTrend());\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getInvestigationMethod());\n////\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(\n////\t\t\t\t\t\t\tr.getDefinedExperimentalGroups().stream().map(a -> a.get()).collect(Collectors.toList()));\n//\n//\t\t\t\t\torgM.addAll(aa);\n//\t\t\t\t\tg += aa.size();\n\t\t\t\t}\n\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * props of exp\n\t\t\t\t\t */\n\t\t\t\t\tfor (DefinedExperimentalGroup instance3 : r.getDefinedExperimentalGroups()) {\n\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getOrganismModel());\n//\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(instance3.getTreatments());\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> ab = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getDeliveryMethods().stream())\n\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n\t\t\t\t\t\taa.addAll(instance3.getTreatments().stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Treatment(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getDeliveryMethod()).filter(i -> i != null)\n\t\t\t\t\t\t\t\t.collect(Collectors.toList()));\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getAnaesthetics().stream())\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryDevice()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\t// List<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryLocation()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\torgM.addAll(aa);\n\t\t\t\t\t\tg += aa.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tavgIndPerDoc += orgM.size();\n\t\t\tavgTotalPerDoc += g;\n\n\t\t\torg += ((double) orgM.size()) / (g == 0 ? 1 : g);\n//\t\t\tSystem.out.println(((double) orgM.size()) / g);\n\n\t\t}\n\t\tSystem.out.println(\"avgTotalPerDoc = \" + avgTotalPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"avgIndPerDoc = \" + avgIndPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"org = \" + org);\n\t\tSystem.out.println(\"avg. org = \" + (org / instanceProvider.getInstances().size()));\n\t\tSystem.out.println(new DecimalFormat(\"0.00\").format(avgTotalPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(avgIndPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(org / instanceProvider.getInstances().size()));\n\t\tSystem.exit(1);\n\n\t\tStats.countVariables(0, instanceProvider.getInstances());\n\n\t\tint count = 0;\n\t\tfor (SlotType slotType : EntityType.get(\"Result\").getSlots()) {\n\n\t\t\tif (slotType.isExcluded())\n\t\t\t\tcontinue;\n\t\t\tcount++;\n\t\t\tSystem.out.println(slotType.name);\n\n\t\t}\n\t\tSystem.out.println(count);\n\t\tSystem.exit(1);\n\t}", "public ArrayList<Relation> extractRelations(LexicalizedParser lp) {\n \t\tBreakIterator iterator = BreakIterator.getSentenceInstance(Locale.US);\n \t\titerator.setText(body);\n \t\tint start = iterator.first();\n \t\tfor (int end = iterator.next();\n \t\t\t\tend != BreakIterator.DONE;\n \t\t\t\tstart = end, end = iterator.next()) {\n \t\t\t/* list of NP in the sentence */\n \t\t\tArrayList<Tree> NPList;\n \t\t\t/* two NP will be used to extract relations */\n \t\t\tTree e1, e2;\n \t\t\tint e1Index, e2Index;\n \t\t\t\n \t\t\t// parse sentence\n\t\t\tString sentence = \"Jaguar, the luxury auto maker sold 1,214 cars in the U.S.A. when Tom sat on the chair\";\n//\t\t\tString sentence = body.substring(start,end);\n \t\t\tString nerSentence = Processor.ner.runNER(sentence);\n \t\t\tString taggedSentence = Processor.tagger.tagSentence(sentence);\n \t\t\tTree parse = lp.apply(sentence);\n \t\t\t\n \t\t\t// generateNPList\n \t\t\tNPList = generateNPList(parse);\n \n \t\t\t// walk through NP list, select all e1 & e2 paris and construct relations\n \t\t\tif (NPList.size() < 2) \n \t\t\t\tcontinue;\n \t\t\tfor (e1Index = 0; e1Index < NPList.size() - 1; ++e1Index) {\n \t\t\t\tfor (e2Index = e1Index + 1; e2Index < NPList.size(); ++e2Index) {\n \t\t\t\t\tTree NP1 = NPList.get(e1Index);\n \t\t\t\t\tTree NP2 = NPList.get(e2Index);\n \t\t\t\t\t// we only compare NPs that have same depth\n \t\t\t\t\tif (NP1.depth() != NP2.depth()) \n \t\t\t\t\t\tcontinue;\n \t\t\t\t\trelations.add(new Relation(url, NP1, NP2, sentence, taggedSentence, nerSentence, \n \t\t\t\t\t\t\tparse, (e2Index - e1Index), true));\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\treturn relations;\n \t}", "public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}", "public static void Pubmed() throws IOException \n\t{\n\t\t\n\t\tMap<String,Map<String,List<String>>> trainset = null ; \n\t\t//Map<String, List<String>> titles = ReadXMLFile.ReadCDR_TestSet_BioC() ;\n\t File fFile = new File(\"F:\\\\TempDB\\\\PMCxxxx\\\\articals.txt\");\n\t List<String> sents = readfiles.readLinesbylines(fFile.toURL()); \n\t\t\n\t\tSentinfo sentInfo = new Sentinfo() ; \n\t\t\n\t\ttrainset = ReadXMLFile.DeserializeT(\"F:\\\\eclipse64\\\\eclipse\\\\TrainsetTest\") ;\n\t\tLinkedHashMap<String, Integer> TripleDict = new LinkedHashMap<String, Integer>();\n\t\tMap<String,List<Integer>> Labeling= new HashMap<String,List<Integer>>() ;\n\t\t\n\t\tMetaMapApi api = new MetaMapApiImpl();\n\t\tList<String> theOptions = new ArrayList<String>();\n\t theOptions.add(\"-y\"); // turn on Word Sense Disambiguation\n\t theOptions.add(\"-u\"); // unique abrevation \n\t theOptions.add(\"--negex\"); \n\t theOptions.add(\"-v\");\n\t theOptions.add(\"-c\"); // use relaxed model that containing internal syntactic structure, such as conjunction.\n\t if (theOptions.size() > 0) {\n\t api.setOptions(theOptions);\n\t }\n\t \n\t\t\n\t\tif (trainset == null )\n\t\t{\n\t\t\ttrainset = new HashMap<String, Map<String,List<String>>>();\n\t\t}\n\t\t\n\t\t\n\t\t/************************************************************************************************/\n\t\t//Map<String, Integer> bagofwords = semantic.getbagofwords(titles) ; \n\t\t//trainxmllabeling(trainset,bagofwords); \n\t\t/************************************************************************************************/\n\t\t\n\t\t\n\t\tint count = 0 ;\n\t\tint count1 = 0 ;\n\t\tModel candidategraph = ModelFactory.createDefaultModel(); \n\t\tMap<String,List<String>> TripleCandidates = new HashMap<String, List<String>>();\n\t\tfor(String title : sents)\n\t\t{\n\t\t\t\n\t\t\tModel Sentgraph = sentInfo.graph;\n\t\t\tif (trainset.containsKey(title))\n\t\t\t\tcontinue ; \n\t\t\t//8538\n\t\t\tcount++ ; \n\n\t\t\tMap<String, List<String>> triples = null ;\n\t\t\t// get the goldstandard concepts for current title \n\t\t\tList<String> GoldSndconcepts = new ArrayList<String> () ;\n\t\t\tMap<String, Integer> allconcepts = null ; \n\t\t\t\n\t\t\t// this is optional and not needed here , it used to measure the concepts recall \n\t\t\tMap<String, List<String>> temptitles = new HashMap<String, List<String>>(); \n\t\t\ttemptitles.put(title,GoldSndconcepts) ;\n\t\t\t\t\t\t\n\t\t\t// get the concepts \n\t\t\tallconcepts = ConceptsDiscovery.getconcepts(temptitles,api);\n\t\t\t\n\t\t\tArrayList<String> RelInstances1 = SyntaticPattern.getSyntaticPattern(title,allconcepts,FILE_NAME_Patterns) ;\n\t\t\t//Methylated-CpG island recovery assay: a new technique for the rapid detection of methylated-CpG islands in cancer\n\t\t\tif (RelInstances1 != null && RelInstances1.size() > 0 )\n\t\t\t{\n\t\t\t\tcount1++ ;\n\t\t\t\tTripleCandidates.put(title, RelInstances1) ;\n\t\t\t\t\n\t\t\t\tif (count1 == 30)\n\t\t\t\t{\n\t\t\t\t\tReadXMLFile.Serialized(TripleCandidates,\"F:\\\\eclipse64\\\\eclipse\\\\Relationdisc1\") ;\n\t\t\t\t\tcount1 = 0 ;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t\t\n\t\tint i = 0 ;\n\t\ti++ ; \n\t}", "public void calculate(Set<Article> articles) {\n \n Set<ArticleDocument> articleDocuments = new HashSet<>();\n for (Article article : articles) {\n articleDocuments.add(article.getDocument());\n }\n \n VSMDocument positiveWords = new TextDocument(\"positive_words.txt\");\n VSMDocument negativeWords = new TextDocument(\"negative_words.txt\");\n \n ArrayList<VSMDocument> documents = new ArrayList<VSMDocument>();\n documents.add(positiveWords);\n documents.add(negativeWords);\n documents.addAll(articleDocuments);\n \n Corpus corpus = new Corpus(documents);\n \n VectorSpaceModel vectorSpace = new VectorSpaceModel(corpus);\n \n double totalPositive = 0;\n double totalNegative = 0;\n \n \n for(ArticleDocument articleDoc : articleDocuments) {\n VSMDocument doc = (VSMDocument) articleDoc;\n System.out.println(\"\\nComparing to \" + doc);\n double positive = vectorSpace.cosineSimilarity(positiveWords, doc);\n double negative = vectorSpace.cosineSimilarity(negativeWords, doc);\n System.out.println(\"Positive: \" + positive);\n System.out.println(\"Negative: \" + negative);\n if (!Double.isNaN(positive)) {\n totalPositive += positive;\n }\n if (!Double.isNaN(negative)) {\n totalNegative += negative;\n }\n double difference = positive - negative;\n if (difference >= 0) {\n System.out.println(\"More positive by \" + difference);\n } else {\n System.out.println(\"More negative by \" + Math.abs(difference));\n }\n \n if (positive >= mostPositive) {\n mostPositive = positive;\n mostPositiveDoc = doc;\n }\n if (negative >= mostNegative) {\n mostNegative = negative;\n mostNegativeDoc = doc;\n }\n if (Math.abs(difference) >= Math.abs(biggestDifference)) {\n biggestDifference = difference;\n biggestDifferenceDoc = doc;\n }\n \n String publisher = articleDoc.getPublisher();\n String region = articleDoc.getRegion();\n LocalDate day = articleDoc.getDate().toLocalDate();\n DayOfWeek weekday = day.getDayOfWeek();\n if (!Double.isNaN(positive)) {\n if (publisherOptimism.containsKey(publisher)) {\n publisherOptimism.get(publisher).add(positive);\n } else {\n publisherOptimism.put(publisher, new LinkedList<Double>());\n publisherOptimism.get(publisher).add(positive);\n }\n \n if (publisherPessimism.containsKey(publisher)) {\n publisherPessimism.get(publisher).add(negative);\n } else {\n publisherPessimism.put(publisher, new LinkedList<Double>());\n publisherPessimism.get(publisher).add(negative);\n }\n \n if (regionOptimism.containsKey(region)) {\n regionOptimism.get(region).add(positive);\n } else {\n regionOptimism.put(region, new LinkedList<Double>());\n regionOptimism.get(region).add(positive);\n }\n \n if (regionPessimism.containsKey(region)) {\n regionPessimism.get(region).add(negative);\n } else {\n regionPessimism.put(region, new LinkedList<Double>());\n regionPessimism.get(region).add(negative);\n }\n \n if (dayOptimism.containsKey(day)) {\n dayOptimism.get(day).add(positive);\n } else {\n dayOptimism.put(day, new LinkedList<Double>());\n dayOptimism.get(day).add(positive);\n }\n \n if (dayPessimism.containsKey(day)) {\n dayPessimism.get(day).add(negative);\n } else {\n dayPessimism.put(day, new LinkedList<Double>());\n dayPessimism.get(day).add(negative);\n }\n \n if (weekdayOptimism.containsKey(weekday)) {\n weekdayOptimism.get(weekday).add(positive);\n } else {\n weekdayOptimism.put(weekday, new LinkedList<Double>());\n weekdayOptimism.get(weekday).add(positive);\n }\n \n if (weekdayPessimism.containsKey(weekday)) {\n weekdayPessimism.get(weekday).add(negative);\n } else {\n weekdayPessimism.put(weekday, new LinkedList<Double>());\n weekdayPessimism.get(weekday).add(negative);\n }\n }\n }\n \n size = articleDocuments.size();\n avgPositive = totalPositive / size;\n avgNegative = totalNegative / size;\n printInfo();\n }", "private void handleDocument(String name,InputStream ins)\n{\n Map<String,Integer> words = new HashMap<>();\n Map<String,Integer> kgrams = new HashMap<>();\n \n try {\n String cnts = IvyFile.loadFile(ins);\n CompilationUnit cu = JcompAst.parseSourceFile(cnts);\n words = handleDocumentText(cnts);\n kgrams = buildKgramCounts(cnts,cu);\n }\n catch (IOException e) {\n IvyLog.logI(\"Problem reading document file \" + name + \": \" + e);\n }\n \n if (words.size() > 0) {\n ++total_documents;\n for (String s : words.keySet()) {\n Integer v = document_counts.get(s);\n if (v == null) document_counts.put(s,1);\n else document_counts.put(s,v+1);\n }\n }\n if (kgrams.size() > 0) {\n ++total_kdocuments;\n for (String s : kgrams.keySet()) {\n Integer v = kgram_counts.get(s);\n if (v == null) kgram_counts.put(s,1);\n else kgram_counts.put(s,v+1);\n }\n }\n}", "@Test\n\tpublic void probandoConParser() {\n\t\tString dBoxUrl = \"/home/julio/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_4_text_mining/material/tp3/\";\n\t\tString modelUrl = dBoxUrl + \"NER/models/es-ner-person.bin\";\n\t\tString filesUrl = dBoxUrl + \"NER/archivoPrueba\";\n\t\tString sampleFile = filesUrl + \"/viernes-23-05-14-alan-fitzpatrick-gala-cordoba.html\";\n\t\tList<String> docs = getMyDocsFromSomewhere(filesUrl);\n\n\t\ttry {\n\t\t\t// detecting the file type\n\t\t\tBodyContentHandler handler = new BodyContentHandler();\n\t\t\tMetadata metadata = new Metadata();\n\t\t\tFileInputStream inputstream = new FileInputStream(new File(sampleFile));\n\t\t\tParseContext pcontext = new ParseContext();\n\n\t\t\t// Html parser\n\t\t\tHtmlParser htmlparser = new HtmlParser();\n\t\t\thtmlparser.parse(inputstream, handler, metadata, pcontext);\n\t\t\tSystem.out.println(\"Contents of the document:\" + handler.toString());\n\t\t\tSystem.out.println(\"Metadata of the document:\");\n\t\t\tString[] metadataNames = metadata.names();\n\n\t\t\tfor (String name : metadataNames) {\n\t\t\t\tSystem.out.println(name + \": \" + metadata.get(name));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\n\t}", "static Set<NLMeaning> extractMeanings(NLText nlText) {\n\t\tSet<NLMeaning> meanings = new HashSet();\n\t\t\n\t\tList<NLSentence> sentences = nlText.getSentences();\n\t\tNLSentence firstSentence = sentences.iterator().next();\n\t\tList<NLToken> tokens = firstSentence.getTokens();\n\t\tList<NLMultiWord> multiWords = firstSentence.getMultiWords();\n\t\tList<NLNamedEntity> namedEntities = firstSentence.getNamedEntities();\n\t\t\n\t\t// Add meanings of all tokens that are not part of multiwords or NEs\n\t\tIterator<NLToken> itToken = tokens.iterator();\n\t\twhile (itToken.hasNext()) {\n\t\t\tSet<NLMeaning> tokenMeanings = getTokenMeanings(itToken.next());\n\t\t\tif (tokenMeanings != null) {\n\t\t\t\tmeanings.addAll(tokenMeanings);\t\t\t\n\t\t\t}\n//\t\t\tNLToken token = itToken.next();\n//\t\t\tboolean hasMultiWords = token.getMultiWords() != null && !token.getMultiWords().isEmpty();\n//\t\t\tboolean hasNamedEntities = token.getNamedEntities() != null && !token.getNamedEntities().isEmpty();\n//\t\t\tif (!hasMultiWords && !hasNamedEntities) {\n//\t\t\t\tif (token.getMeanings() == null || token.getMeanings().isEmpty()) {\n//\t\t\t\t\t// This is a hack to handle a bug where the set of meanings\n//\t\t\t\t\t// is empty but there is a selected meaning.\n//\t\t\t\t\t\n//\t\t\t\t\tNLMeaning selectedMeaning = token.getSelectedMeaning();\n//\t\t\t\t\tif (selectedMeaning != null) {\n//\t\t\t\t\t\tmeanings.add(selectedMeaning);\n//\t\t\t\t\t}\n//\t\t\t\t} else {\n//\t\t\t\t\tmeanings.addAll(token.getMeanings());\n//\t\t\t\t}\n//\t\t\t}\n\t\t}\n\t\t\n\t\t// Add meanings of multiwords and NEs\n\t\tIterator<NLMultiWord> itMultiWord = multiWords.iterator();\n\t\twhile (itMultiWord.hasNext()) {\n\t\t\tNLMultiWord multiWord = itMultiWord.next();\n\t\t\tmeanings.addAll(multiWord.getMeanings());\n\t\t}\n\t\tIterator<NLNamedEntity> itNamedEntity = namedEntities.iterator();\n\t\twhile (itNamedEntity.hasNext()) {\n\t\t\tNLNamedEntity namedEntity = itNamedEntity.next();\n\t\t\tmeanings.addAll(namedEntity.getMeanings());\n\t\t}\n\t\t\n\t\treturn meanings;\n\t}", "static void allDocumentAnalyzer() throws IOException {\n\t\tFile allFiles = new File(\".\"); // current directory\n\t\tFile[] files = allFiles.listFiles(); // file array\n\n\t\t// recurse through all documents\n\t\tfor (File doc : files) {\n\t\t\t// other files we don't need\n\t\t\tif (doc.getName().contains(\".java\") || doc.getName().contains(\"words\") || doc.getName().contains(\"names\")\n\t\t\t\t\t|| doc.getName().contains(\"phrases\") || doc.getName().contains(\".class\")\n\t\t\t\t\t|| doc.getName().contains(\"Data\") || doc.getName().contains(\".sh\") || doc.isDirectory()\n\t\t\t\t\t|| !doc.getName().contains(\".txt\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString name = doc.getName();\n\t\t\tSystem.out.println(name);\n\t\t\tname = name.substring(0, name.length() - 11);\n\t\t\tSystem.out.println(name);\n\n\t\t\tif (!names.contains(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// make readers\n\t\t\tFileReader fr = new FileReader(doc);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\t// phrase list\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\n\t\t\t// retrieve all text, trim, refine and add to phrase list\n\t\t\tString nextLine = br.readLine();\n\t\t\twhile (nextLine != null) {\n\t\t\t\tnextLine = nextLine.replace(\"\\n\", \" \");\n\t\t\t\tnextLine = nextLine.trim();\n\n\t\t\t\tif (nextLine.contains(\"no experience listed\")) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString[] lineArray = nextLine.split(\"\\\\s+\");\n\n\t\t\t\t// recurse through every word to find phrases\n\t\t\t\tfor (int i = 0; i < lineArray.length - 1; i++) {\n\t\t\t\t\t// get the current word and refine\n\t\t\t\t\tString currentWord = lineArray[i];\n\n\t\t\t\t\tcurrentWord = currentWord.trim();\n\t\t\t\t\tcurrentWord = refineWord(currentWord);\n\n\t\t\t\t\tif (currentWord.equals(\"\") || currentWord.isEmpty()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\twords.add(currentWord);\n\t\t\t\t}\n\t\t\t\tnextLine = br.readLine();\n\t\t\t}\n\n\t\t\tbr.close();\n\n\t\t\t// continue if empty\n\t\t\tif (words.size() == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// otherwise, increment number of files in corpus\n\t\t\tsize++;\n\n\t\t\t// updating the phrase count map for tf\n\t\t\tString fileName = doc.getName();\n\t\t\tphraseCountMap.put(fileName, words.size());\n\n\t\t\t// recurse through every word\n\t\t\tfor (String word : words) {\n\t\t\t\t// get map from string to freq\n\t\t\t\tHashMap<String, Integer> textFreqMap = wordFreqMap.get(fileName);\n\n\t\t\t\t// if it's null, make one\n\t\t\t\tif (textFreqMap == null) {\n\t\t\t\t\ttextFreqMap = new HashMap<String, Integer>();\n\t\t\t\t\t// make freq as 1\n\t\t\t\t\ttextFreqMap.put(word, 1);\n\t\t\t\t\t// put that in wordFreq\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, get the current num\n\t\t\t\t\tInteger currentFreq = textFreqMap.get(word);\n\n\t\t\t\t\t// if it's null,\n\t\t\t\t\tif (currentFreq == null) {\n\t\t\t\t\t\t// the frequency is just 0\n\t\t\t\t\t\tcurrentFreq = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// increment the frequency\n\t\t\t\t\tcurrentFreq++;\n\n\t\t\t\t\t// put it in the textFreqMap\n\t\t\t\t\ttextFreqMap.put(word, currentFreq);\n\n\t\t\t\t\t// put that in the wordFreqMap\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t}\n\n\t\t\t\t// add this to record (map from phrases to docs with that\n\t\t\t\t// phrase)\n\t\t\t\tinvertedMap.addValue(word, doc);\n\t\t\t}\n\t\t}\n\t}", "public Duc2002Document getParsedDocument(Document document) throws Exception {\n\t\tDuc2002Document ducDoc=new Duc2002Document();\n\t\t// iterate through child elements of root\n\t\tElement root = document.getRootElement();\n\t\tfor ( Iterator i = root.elementIterator(); i.hasNext(); ) {\n\t\t\tElement element = (Element) i.next();\n\t\t\tString elementName=element.getQualifiedName();\n\t\t\tif(elementName.equals(\"DOCNO\"))\n\t\t\t\tducDoc.setDocNo(element.getStringValue());\n\t\t\telse if(elementName.equals(\"HEAD\"))\n\t\t\t\tducDoc.setTopic(element.getStringValue());\n\t\t\telse if(elementName.equals(\"TEXT\"))\n\t\t\t{\n\t\t\t\tducDoc.setText(element.getStringValue());\n\t\t\t\tString[] sentences = new String[element.elements().size()];\n\t\t\t\tint[] sentenceWordCounts = new int[element.elements().size()];\n\t\t\t\tint no=0;\n\t\t\t\tfor(Iterator j=element.elementIterator(); j.hasNext();) {\n\t\t\t\t\tElement sentence = (Element) j.next();\n\t\t\t\t\tsentences[no]=sentence.getStringValue();\n\t\t\t\t\tfor(Iterator k=sentence.attributeIterator(); k.hasNext(); ) {\n\t\t\t\t\t\tAttribute attribute=(Attribute) k.next();\n\t\t\t\t\t\tif(attribute.getQualifiedName().equals(\"wdcount\"))\n\t\t\t\t\t\t\tsentenceWordCounts[no]=Integer.parseInt(attribute.getStringValue());\n\t\t\t\t\t}\n\t\t\t\t\tno++;\n\t\t\t\t}\n\t\t\t\tducDoc.setSentences(sentences);\n\t\t\t\tducDoc.setSentenceWordCounts(sentenceWordCounts);\n\t\t\t}\n\t\t}\n\t\treturn ducDoc;\n\t}", "private Map<String,Map<String,List<String>>> buildDictionary(Document doc){\n\t\t\n\t\tElement root = doc.getDocumentElement();\n\t\t\n\t\t\n\t\tMap<String,Map<String,List<String>>> dictionary = new HashMap<String,Map<String,List<String>>>();\n\t\tthis.termSet = new TreeSet<String>();\n\t\t\n\t\tNodeList termList = doc.getElementsByTagName(\"term\");\n\t\tfor(int i = 0; i < termList.getLength(); i++){\n\t\t\tElement termElement = (Element) termList.item(i);\n\t\t\tElement nameElement = (Element) termElement.getElementsByTagName(\"name\").item(0);\n\t\t\tString name = nameElement.getTextContent();\n\t\t\tthis.termSet.add(name);\n\n\t\t\tMap<String,List<String>> synonymGroup = new HashMap<String,List<String>>();\n\t\t\tsynonymGroup.put(\"exact\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"related\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"broad\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"narrow\", new ArrayList<String>());\n\t\t\t\n\t\t\tNodeList synonyms = termElement.getElementsByTagName(\"synonym\");\n\t\t\tfor(int j=0; j<synonyms.getLength(); j++){\n\t\t\t\tElement synonymElement = (Element) synonyms.item(j);\n\t\t\t\tString synonym = synonymElement.getTextContent();\n\t\t\t\tString scope = synonymElement.getAttribute(\"scope\");\n\t\t\t\t//System.out.println(scope);\n\t\t\t\tList<String> synonymList = (List<String>) synonymGroup.get(scope);\n\t\t\t\t\n\t\t\t\t//System.out.println(synonym);\n\t\t\t\t\n\t\t\t\tsynonymList.add(synonym);\n\t\t\t}\n\t\t\t\n\t\t\tdictionary.put(name,synonymGroup);\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn dictionary;\n\t}", "public ArrayList getAttributeList() {\n nounList = new ArrayList();\n attributeLists = new ArrayList();\n ArrayList adjAtt = new ArrayList();\n int separator = 0;\n List<Tree> leaves;\n String phraseNotation = \"NP([<NNS|NN|NNP]![<JJ|VBG])!$VP\";// !<VBG\";//@\" + phrase + \"! << @\" + phrase;\n\n TregexPattern VBpattern = TregexPattern.compile(phraseNotation);\n TregexMatcher matcher = VBpattern.matcher(sTree);\n\n while (matcher.findNextMatchingNode()) {\n Tree match = matcher.getMatch();\n Tree[] innerChild = match.children();\n int adjectiveExist = 0;\n String adj = \"\";\n String attribute = \"\";\n String b = \"\";\n\n if (innerChild.length > 1) {\n int count = 1;\n\n for (Tree inChild : innerChild) {\n if (inChild.value().equals(\"CC\") || inChild.value().equals(\",\")) {\n separator = 1;\n }\n if ((inChild.value().equals(\"JJ\")) || (inChild.value().equals(\"VBG\"))) {\n adjectiveExist++;\n leaves = inChild.getLeaves();\n adj = leaves.get(0).toString();\n if (designEleList.contains(adj)) {\n adj = \"\";\n }\n }\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\")) || (inChild.value().equals(\"NNP\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n if (count == 1) {\n if (adjectiveExist == 1) {\n attribute = adj + \" \" + leaves.get(0).yieldWords().get(0).word();\n } else {\n attribute = leaves.get(0).yieldWords().get(0).word();\n }\n if (!designEleList.contains(attribute)) {\n String identifiedWord = attribute;\n if (!identifiedWord.contains(\"_\")) {\n attributeLists.add(morphology.stem(identifiedWord));\n } else {\n attributeLists.add(identifiedWord);\n }\n }\n\n } else if (count >= 2 && separator == 0) {\n if (!attribute.contains(\"_\")) {\n\n attributeLists.remove(morphology.stem(attribute));\n attributeLists.remove(attribute);\n } else {\n attributeLists.remove(attribute);\n }\n\n attribute += \" \" + (leaves.get(0).yieldWords()).get(0).word();\n attributeLists.add(attribute);\n } else if (count >= 2 && separator == 1) {\n attribute = (leaves.get(0).yieldWords()).get(0).word();\n if (!attribute.contains(\"_\")) {\n attributeLists.add(morphology.stem(attribute));\n } else {\n attributeLists.add(attribute);\n }\n separator = 0;\n }\n count++;\n }\n }\n } else {\n for (Tree inChild : innerChild) {\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n if (!identifiedWord.contains(\"_\")) {\n attributeLists.add(morphology.stem(identifiedWord));\n } else {\n attributeLists.add(identifiedWord);\n }\n }\n }\n }\n }\n adjAtt = getAdjectiveAttribute();\n if (!adjAtt.isEmpty()) {\n String att = \"\";\n for (int i = 0; i < adjAtt.size(); i++) {\n att = adjAtt.get(i).toString();\n if (!att.isEmpty() || !att.equals(\"\") || !(att.equals(\" \"))) {\n attributeLists.add(att.trim());\n }\n }\n }\n\n System.out.println(\"ATTRIBUTE LIST :\" + attributeLists);\n return attributeLists;\n\n }", "public void extract (Document document) {\n\t\tList<Token> tokenList = document.getTokenList();\n\t\t\n\t\tfor (Token token : tokenList) {\n\t\t\tFeatureSet fs = token.boundaryFeatureSet;\n\n\t\t\t// check for each pattern whether the feature set satisfies it\n\t\t\tfor (String[] features : patternList) {\n\t\t\t\tboolean matches = true;\n\t\t\t\tfor (String feature: features) {\n\t\t\t\t\tif (!fs.contains(feature)) {\n\t\t\t\t\t\tmatches = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if the pattern is satisfied, add the conjunction\n\t\t\t\tif (matches) {\n\t\t\t\t\tfs.add(\"CONJUNCTION:\" + StringUtils.join(\",\", features));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static String getCorrespondingNEPosSegment(String textConcept, CustomXMLRepresentation nePosText, boolean isConcept) {\n\n\t\tString output = \"\";\n\n\t\t//textConcept = textConcept.replaceAll(\"\\\\p{Punct} \",\" $0 \");\n\t\t/*textConcept = textConcept.replaceAll(\"[.]\",\". \").replaceAll(\"[,]\",\", \").replaceAll(\"[']\",\"' \")\n\t\t\t\t.replaceAll(\"[\\\\[]\",\" [ \" ).replaceAll(\"[\\\\]]\",\" ] \").replaceAll(\"[(]\", \" ( \").replaceAll(\"[)]\",\" ) \")\n\t\t\t\t.replaceAll(\"[<]\", \" < \").replaceAll(\"[>]\", \" > \");*/\n\t\t//textConcept = textConcept.replaceAll(\"[\\\\.,']\",\"$0 \").replaceAll(\"[\\\\[\\\\](){}!@#$%^&*+=]\",\" $0 \");\n\t\ttextConcept = textConcept.replaceAll(\"[']\",\"$0 \").replaceAll(\"[\\\\[\\\\](){}!@#$%^&*+=]\",\" $0 \");\n\t\tString[] lemmas = textConcept.split(\" \");\n\t\tArrayList<String> wordList = new ArrayList(Arrays.asList(lemmas));\n\n\t\tnePosText.escapeXMLCharacters();\n\n\t\tboolean goOn = true;\n\t\t//while wordList is not empty, repeat\n\t\twhile(wordList.size()>0 && goOn){\n\n\t\t\tDocument docNePos = null;\n\t\t\ttry {\n\t\t\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\t\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n\t\t\t\tInputStream streamNePos = new ByteArrayInputStream(nePosText.getXml().getBytes(StandardCharsets.UTF_8));\n\t\t\t\tdocNePos = docBuilder.parse(streamNePos);\n\t\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t\tSystem.err.print(\"KIndex :: Pipeline.getCorrespondingNEPosSegment() Could not create a document text.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tNodeList npSegments = docNePos.getElementsByTagName(\"content\").item(0).getChildNodes(); // concept or text segments (children of content)\n\n\t\t\tfor (int i = 0; i < npSegments.getLength(); i++) {\n\t\t\t\tNode n = npSegments.item(i);\n\t\t\t\tif (n.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tElement segment = (Element) n;\n\t\t\t\t\tString tag = segment.getNodeName();\n\t\t\t\t\tString stLemma = (segment.hasAttribute(\"lemma\")) ? segment.getAttribute(\"lemma\") : \"\";\n\t\t\t\t\tString lemma = segment.getTextContent();\n\n\t\t\t\t\t//Debug\n\t\t\t\t\t//if (wordList.get(0).equals(\"take\")){\n\t\t\t\t\t//\tSystem.out.println(\"take!\");\n\t\t\t\t\t//}\n\n\t\t\t\t\tif ((wordList.size() == 0) && (tag.equals(\"Punctuation\"))){\n\t\t\t\t\t\toutput += lemma + \" \" ;\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tint initSize = wordList.size();\n\t\t\t\t\tint initXMLSize = nePosText.getXml().length();\n\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").equals(\"\")){\n\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (tag.equals(\"ne\")){\n\t\t\t\t\t\tString NEtype = segment.getAttribute(\"type\");\n\t\t\t\t\t\tNodeList NEchildren = segment.getChildNodes();\n\t\t\t\t\t\t//if this text segment is concept, do not add the NamedEntity tag.\n\t\t\t\t\t\tString NEstring = (isConcept) ? \"\" : \"<ne type=\\\"\" + NEtype + \"\\\">\";\n\t\t\t\t\t\tfor (int c = 0; c < NEchildren.getLength(); c++) {\n\t\t\t\t\t\t\tNode child = NEchildren.item(c);\n\t\t\t\t\t\t\tif (child.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\t\tElement Echild = (Element) child;\n\t\t\t\t\t\t\t\tString Ctag = Echild.getNodeName();\n\t\t\t\t\t\t\t\tString OrigLemma = Echild.getAttribute(\"lemma\");\n\t\t\t\t\t\t\t\tString Clemma = Echild.getTextContent();\n\t\t\t\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase())) {\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (!Clemma.equals(\"\")){\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\tif (wordList.get(0).contains(Clemma)){\n\t\t\t\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replace(Clemma,\"\"));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\tString ClemmaRemaining = Clemma.replaceAll(\"[^\\\\x00-\\\\x7F]\", \"\"); //replace all non-ascii characters\n\t\t\t\t\t\t\t\t\t\twhile (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\t\tClemmaRemaining = ClemmaRemaining.replace(wordList.get(0),\" \");\n\t\t\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t\t\t\tif (Clemma.endsWith(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tClemmaRemaining = (ClemmaRemaining.startsWith(\" \")) ? ClemmaRemaining.replace(\" \",\"\") : ClemmaRemaining;\n\t\t\t\t\t\t\t\t\t\tif ((!ClemmaRemaining.equals(\"\")) && wordList.get(0).startsWith(ClemmaRemaining)){\n\t\t\t\t\t\t\t\t\t\t\twordList.set(0, wordList.get(0).replace(ClemmaRemaining,\"\"));\n\t\t\t\t\t\t\t\t\t\t}\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\t/*else if (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t\tif (Clemma.endsWith(wordList.get(0))) {\n\t\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\" + OrigLemma + \"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\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\t/*else if ((!Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase().equals(\"\")) &&\n\t\t\t\t\t\t\t\t\t\twordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().contains(Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase())){\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replace(OrigLemma,\"\"));\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\tNEstring += (isConcept) ? \"\" : \"</ne>\";\n\t\t\t\t\t\toutput += NEstring;\n\t\t\t\t\t\tNEstring = (isConcept) ? \"<ne type=\\\"\" + NEtype + \"\\\">\" + NEstring + \"</ne>\" : NEstring;\n\t\t\t\t\t\tnePosText.removeElement(NEstring);\n\n\t\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\t\tif (wordList.size() == initSize && NEstring.length() == initXMLSize){\n\t\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1200 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(tag.equals(\"NoPOS\") || tag.equals(\"Punctuation\")){\n\t\t\t\t\t\t//output += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\toutput += lemma + \" \" ;\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(lemma.toLowerCase())){\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\t\telse if (nePosText.getXml().length() == initXMLSize){\n\t\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1201 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma +\"\\r\\n nePosText: \"+ nePosText.getXml();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())) {\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//we have the example of \"Cannot\" -> <MD>Can</MD><RB>not</RB>\n\t\t\t\t\t//in that case, in the first loop the first lemma will be added\n\t\t\t\t\t//in second loop the lemma will be added and wordList.get(0) will be removed\n\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().contains(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\tif (wordList.get(0).startsWith(lemma)){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replaceFirst(Pattern.quote(lemma),\"\"));\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().startsWith(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replaceFirst(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\"),\"\"));\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).endsWith(lemma)){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().endsWith(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (lemma.contains(wordList.get(0))){\n\t\t\t\t\t\twhile(lemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\tif (lemma.endsWith(wordList.get(0))) {\n\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.size() == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (lemma.contains(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))){\n\t\t\t\t\t\twhile(lemma.contains(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))){\n\t\t\t\t\t\t\tif (lemma.endsWith(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))) {\n\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.size() == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\tif (wordList.size() == initSize){\n\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1202 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{ //if n.getNodeType() != Node.ELEMENT_NODE\n\t\t\t\t\tif (npSegments.getLength() == 1){\n\t\t\t\t\t\tgoOn = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wordList.size()>0 && wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").equals(\"\")){\n\t\t\t\twordList.remove(0);\n\t\t\t}\n\n\t\t\tif(npSegments.getLength() == 0 && wordList.size() == 1){\n\t\t\t\twordList.remove(0);\n\t\t\t}\n\t\t}\n\n\t\t//in case wordList is empty but the next element in nePosText is punctuation, this element has to be added in output\n\t\tDocument docNePos = null;\n\t\ttry {\n\t\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n\t\t\tInputStream streamNePos = new ByteArrayInputStream(nePosText.getXml().getBytes(StandardCharsets.UTF_8));\n\t\t\tdocNePos = docBuilder.parse(streamNePos);\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\tSystem.err.print(\"KIndex :: Pipeline.getCorrespondingNEPosSegment() Could not create a document text.\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tNodeList npSegments = docNePos.getElementsByTagName(\"content\").item(0).getChildNodes(); // concept or text segments (children of content)\n\t\tfor (int i = 0; i < npSegments.getLength(); i++) {\n\t\t\tNode n = npSegments.item(i);\n\t\t\tif (n.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tElement segment = (Element) n;\n\t\t\t\tString tag = segment.getNodeName();\n\t\t\t\tString lemma = segment.getTextContent();\n\t\t\t\tif (tag.equals(\"Punctuation\")){\n\t\t\t\t\toutput += lemma + \" \";\n\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+lemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t}\n\t\t\t\tbreak; // it will break after the first time an element will be checked\n\t\t\t}\n\t\t}\n\n\n\n\t\treturn output;\n\t}", "public static void extractGroups(CoNLLPart part) {\n\t\tHashMap<String, Integer> chainMap = EMUtil.formChainMap(part\n\t\t\t\t.getChains());\n\t\tArrayList<Mention> allMentions = EMUtil.extractMention(part);\n\t\tCollections.sort(allMentions);\n\t\tEMUtil.assignNE(allMentions, part.getNameEntities());\n\t\tfor (int i = 0; i < allMentions.size(); i++) {\n\t\t\tMention m = allMentions.get(i);\n\n\t\t\tif (m.gram == EMUtil.Grammatic.subject && m.start == m.end\n\t\t\t\t\t&& part.getWord(m.end).posTag.equals(\"PN\")) {\n\t\t\t}\n\n\t\t\tif (m.gram == EMUtil.Grammatic.subject\n\t\t\t\t\t&& EMUtil.pronouns.contains(m.extent)\n\t\t\t// && chainMap.containsKey(m.toName())\n\t\t\t) {\n\t\t\t\tArrayList<Mention> ants = new ArrayList<Mention>();\n\t\t\t\tint corefCount = 0;\n\t\t\t\tfor (int j = i - 1; j >= 0; j--) {\n\t\t\t\t\tMention ant = allMentions.get(j);\n\t\t\t\t\tants.add(ant);\n\t\t\t\t\tant.MI = Context.calMI(ant, m);\n\t\t\t\t\tboolean coref = isCoref(chainMap, m, ant);\n\t\t\t\t\tif (coref) {\n\t\t\t\t\t\tcorefCount++;\n\t\t\t\t\t}\n\t\t\t\t\tif (m.s.getSentenceIdx() - ant.s.getSentenceIdx() > 2) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tCollections.sort(ants);\n\t\t\t\tCollections.reverse(ants);\n\n\t\t\t\tif (corefCount == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (Mention ant : ants) {\n\t\t\t\t\tant.isBest = false;\n\t\t\t\t}\n\n\t\t\t\tApplyEM.findBest(m, ants);\n\n\t\t\t\tif (ants.size() > maxAnts) {\n\t\t\t\t\tmaxAnts = ants.size();\n\t\t\t\t}\n\t\t\t\tString origPro = m.extent;\n\n\t\t\t\tString ext = m.extent;\n\t\t\t\tif (map.containsKey(ext)) {\n\t\t\t\t\tmap.put(ext, map.get(ext) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tmap.put(ext, 1);\n\t\t\t\t}\n\t\t\t\tStringBuilder ysb = new StringBuilder();\n\t\t\t\tfor (int h = 0; h < EMUtil.pronounList.size(); h++) {\n\t\t\t\t\tm.extent = EMUtil.pronounList.get(h);\n\t\t\t\t\tgenerateInstance(part, chainMap, m, ants,\n\t\t\t\t\t\t\tcorefCount, origPro, h, ysb);\n\t\t\t\t}\n\t\t\t\tfor (int k = ants.size() * EMUtil.pronounList.size(); k < 840; k++) {\n\t\t\t\t\tysb.append(\"@ 0 NOCLASS 1 # \");\n\t\t\t\t}\n\t\t\t\tyasmet10.add(ysb.toString());\n\t\t\t\tm.extent = origPro;\n\t\t\t}\n\t\t}\n\t}", "public void getParsed(String text) {\n\t\tAnnotation document = new Annotation(text);\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document);\n\t\tsentences = document.get(SentencesAnnotation.class);\n\t\tsentIt = sentences.iterator();\n\t}", "public ArrayList<Ngram> getNgramsFromFileWithStopwordsListOnly(String content) {\n HashMap<String, Integer> ngramsTable = new HashMap<>();\n InputStream modelIn = null; //rules_POS = null;\n if (content != null) {\n try {\n\n modelIn = new FileInputStream(\"resources/en-token.bin\");\n TokenizerModel model = new TokenizerModel(modelIn);\n Tokenizer tokenizer = new TokenizerME(model);\n String paras[] = tokenizer.tokenize(content);\n\n //create the first ngram\n String[] ngram = new String[nrGrams];\n int i = 0, count = 0;\n while (count < nrGrams && i < paras.length) {\n if (paras[i].trim().length() > 0 && !paras[i].matches(\"[\\\\p{Punct}\\\\p{Digit}]+|'s\")) {\n String word = paras[i].toLowerCase();\n if (word.trim().length() > 0) {\n ngram[count] = word;\n count++;\n }\n }\n i++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int j = 0; j < ngram.length - 1; j++) {\n sb.append(ngram[j]).append(\"<>\");\n }\n sb.append(ngram[ngram.length - 1]);\n\n //adding to the frequencies table\n ngramsTable.put(sb.toString(), 1);\n\n //creating the remaining ngrams\n String word;\n while (i < paras.length) {\n if (paras[i].trim().length() > 0 && !paras[i].matches(\"[\\\\p{Punct}\\\\p{Digit}']+|'s\")) {\n word = paras[i].toLowerCase();\n\n if (word.trim().length() > 0) {\n String ng = addNextWord(ngram, word);\n\n //verify if the ngram already exist on the document\n if (ngramsTable.containsKey(ng)) {\n ngramsTable.put(ng, ngramsTable.get(ng) + 1);\n } else {\n ngramsTable.put(ng, 1);\n }\n }\n }\n i++;\n }\n } catch (IOException e) {\n Logger.getLogger(AbstractDatabaseImporter.class.getName()).log(Level.SEVERE, null, e);\n } finally {\n if (modelIn != null) {\n try {\n modelIn.close();\n } catch (IOException e) {\n }\n }\n }\n }\n\n\n\n\n ArrayList<Ngram> ngrams = new ArrayList<>();\n for (Entry<String, Integer> entry : ngramsTable.entrySet()) {\n ngrams.add(new Ngram(entry.getKey(), entry.getValue()));\n }\n Collections.sort(ngrams);\n return ngrams;\n }", "public void parseAndRankQuery(String stringNumber) throws Exception {\n\n if (this.semantics) { //if the user choose semantic\n semantic=new ArrayList<>();\n Word2VecModel model = Word2VecModel.fromTextFile(new File(\"word2vec.c.output.model.txt\"));\n com.medallia.word2vec.Searcher semanticSearchrt = model.forSearch();\n int num = 10;\n String[] semanQuery = query.split(\" \");\n for (String s : semanQuery)\n {\n try {\n List<com.medallia.word2vec.Searcher.Match> matches = semanticSearchrt.getMatches(s.toLowerCase(), num);\n for (com.medallia.word2vec.Searcher.Match match : matches) {\n match.match();\n }\n if(matches.get(0).equals(s)) {\n query = query + \" \" + matches.get(1);\n String dd=\"\"+matches.get(1);\n semantic.add(dd);\n }\n else {\n query = query + \" \" + matches.get(0); //add to query the high semantics 3 top words score\n String dd=\"\"+matches.get(0);\n semantic.add(dd);\n }\n } catch(com.medallia.word2vec.Searcher.UnknownWordException e){\n }\n }\n }\n\n ranker = new Ranker(this.indexer,stringNumber,path,originalString); // new ranker\n ArrayList<String> cleanQuery;\n ArrayList<String> parsedQueryList;\n ReadFile rd=new ReadFile();\n cleanQuery=rd.cleanLine(stemming,query); //clean the query from dots and other signs\n HashMap<String, Pair<Integer,String>> parsedQuery=new HashMap<>();\n parsedQuery=parser.Tokenizer(cleanQuery,\"\",stemming); //parse the query\n Iterator it = parsedQuery.entrySet().iterator();\n parsedQueryList=new ArrayList<>();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry)it.next();\n parsedQueryList.add((String)pair.getKey());\n it.remove(); // avoids a ConcurrentModificationException\n }\n ranker.setParseredQuery(parsedQueryList);\n try {\n ranker.orgByPostFile();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "SwiftScoredSet getTfIdf(String text,ASTNode n,boolean kgram)\n{\n Map<String,Integer> words = null;\n Map<String,Integer> totals = null;\n double tot = 0;\n if (kgram){\n words = buildKgramCounts(text,n);\n totals = kgram_counts;\n tot = total_kdocuments;\n } \n else {\n words = handleDocumentText(text);\n totals = document_counts;\n tot = total_documents;\n }\n double termtot = 1;\n \n for (Integer iv : words.values()) {\n termtot += iv;\n }\n \n SwiftScoredSet rslt = new SwiftScoredSet();\n for (Map.Entry<String,Integer> ent : words.entrySet()) {\n String wd = ent.getKey();\n double ct = ent.getValue();\n Integer docs = totals.get(wd);\n double docct = 0;\n if (docs != null) docct = docs;\n double idf = Math.log(tot/(1+docct));\n double tf = ct/termtot;\n double tfidf = tf*idf;\n rslt.add(wd,tfidf);\n }\n rslt.normalize();\n \n return rslt;\n}", "private void processContentEn() {\n if (this.content == null || this.content.equals(\"\")) {\r\n _logger.error(\"{} - The sentence is null or empty\", this.traceId);\r\n }\r\n\r\n // process input using ltp(Segmentation, POS, DP, SRL)\r\n this.nlp = new NLP(this.content, this.traceId, this.setting);\r\n }", "public static void main(String[] args) {\n\t\tString text = \"\\\"undifferentiated's thyroid carcinomas were carried out with antisera against calcitonin, calcitonin-gene related peptide (CGRP), somatostatin, and also thyroglobulin, using the PAP method. \";\n\t\ttext = text.replace('\\\"', ' ');\n\t\t\n\t\tStringUtil su = new StringUtil();\n\t\t\n\t\t// Extracting...\n\t\tString text2 = new String(text);\n\t\tEnvironmentVariable.setMoaraHome(\"./\");\n\t\tGeneRecognition gr = new GeneRecognition();\n\t\tArrayList<GeneMention> gms = gr.extract(MentionConstant.MODEL_BC2,text);\n\t\t// Listing mentions...\n\t\tSystem.out.println(\"Start\\tEnd\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.Text());\n\t\t\t//System.out.println(text2.substring(gm.Start(), gm.End()));\n\t\t\tSystem.out.println(su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t}\n\t\tif (true){\n\t\t\treturn;\n\t\t}\n\t\t// Normalizing mentions...\n\t\tOrganism yeast = new Organism(Constant.ORGANISM_YEAST);\n\t\tOrganism human = new Organism(Constant.ORGANISM_HUMAN);\n\t\tExactMatchingNormalization gn = new ExactMatchingNormalization(human);\n\t\tgms = gn.normalize(text,gms);\n\t\t// Listing normalized identifiers...\n\t\t\n\t\tSystem.out.println(\"\\nStart\\tEnd\\t#Pred\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tif (gm.GeneIds().size()>0) {\n\t\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.GeneIds().size() + \n\t\t\t\t\t\"\\t\" + su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t\t\tfor (int j=0; j<gm.GeneIds().size(); j++) {\n\t\t\t\t\tGenePrediction gp = gm.GeneIds().get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\" + gp.GeneId() + \" \" + gp.OriginalSynonym() + \" \" + gp.ScoreDisambig());\n\t\t\t\t\tSystem.out.println((gm.GeneId().GeneId().equals(gp.GeneId())?\" (*)\":\"\"));\n\t\t\t\t}\n\t\t\t}\n\t\t}\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 initializeToolsAndResourcesForDemo(IDictionary dict) throws MalformedURLException, IOException {\n wordnet_dict = dict;\n wordnet_dict.open();\n\n // Choose wordnet sources to be used\n wordnetResources.add(\"synonyms\");\n //wordnetResources.add(\"antonyms\");\n //wordnetResources.add(\"hypernyms\");\n\n Properties split_props = new Properties();\n //Properties including lemmatization\n //props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n //Properties without lemmatization\n split_props.put(\"annotators\", \"tokenize, ssplit, pos\");\n split_props.put(\"tokenize.language\", \"en\");\n split_pipeline = new StanfordCoreNLP(split_props);\n\n Properties lemma_props = new Properties();\n lemma_props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n lemma_props.put(\"tokenize.language\", \"en\");\n lemma_pipeline = new StanfordCoreNLP(lemma_props);\n\n Properties entityMentions_props = new Properties();\n entityMentions_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, lemma, ner, entitymentions\");\n entityMentions_props.put(\"tokenize.language\", \"en\");\n entityMentions_props.put(\"truecase.overwriteText\", \"true\");\n entityMentions_pipeline = new StanfordCoreNLP(entityMentions_props);\n\n Properties compound_props = new Properties();\n compound_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, parse\");\n compound_props.put(\"tokenize.language\", \"en\");\n compound_props.put(\"truecase.overwriteText\", \"true\");\n compounds_pipeline = new StanfordCoreNLP(compound_props);\n\n spotlight = new Spotlight();\n\n chanel = new LODSyndesisChanel();\n\n }", "public static void main(String[] args) {\n\t\tPropertyManager.setPropertyFilePath(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/TextDigesterConfig.properties\");\n\t\t\n\t\tString text = MultilingImport.readText(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/EXAMPLE_TEXTS/multilingMss2015Training/body/text/\" + lang + \"/\" + docName);\n\n\t\t/* Process text document */\n\t\tLangENUM languageOfHTMLdoc = FlProcessor.getLanguage(text);\n\t\t\n\t\tTDDocument TDdoc = FlProcessor.generateDocumentFromFreeText(text, null, languageOfHTMLdoc);\n\n\t\t// Store GATE document\n\t\tWriter out = null;\n\t\ttry {\n\t\t\tout = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/EXAMPLE_TEXTS/\" + lang + \"_\" + docName.replace(\".txt\", \"_GATE.xml\")), \"UTF-8\"));\n\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tout.write(TDdoc.getGATEdoc().toXml());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tout.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\ttry {\n\t\t\tLexRankSummarizer lexRank = new LexRankSummarizer(languageOfHTMLdoc, SentenceSimilarityENUM.cosineTFIDF, false, 0.01);\n\t\t\tMap<Annotation, Double> sortedSentences = lexRank.sortSentences(TDdoc);\n\t\t\t\n\t\t\tList<Annotation> sentListOrderedByRelevance = new ArrayList<Annotation>();\n\t\t\tfor(Entry<Annotation, Double> sentence : sortedSentences.entrySet()) {\n\t\t\t\tlogger.info(\"Score: \" + sentence.getValue() + \" - '\" + GtUtils.getTextOfAnnotation(sentence.getKey(), TDdoc.getGATEdoc()) + \"'\");\n\t\t\t\tsentListOrderedByRelevance.add(sentence.getKey());\n\t\t\t}\n\t\t\t\n\t\t\tlogger.info(\"Summary max 100 tokens: \");\n\t\t\tList<Annotation> summarySentences = GtUtils.orderAnnotations(sentListOrderedByRelevance, TDdoc.getGATEdoc(), 100);\n\t\t\tfor(Annotation ann : summarySentences) {\n\t\t\t\tlogger.info(GtUtils.getTextOfAnnotation(ann, TDdoc.getGATEdoc()));\n\t\t\t}\n\t\t} catch (TextDigesterException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t*/\n\t}", "public static void main(String[] args) throws InvalidFormatException, FileNotFoundException, IOException {\n\n int classNumber = 2;\n int Ngram = 2; // The default value is unigram.\n int lengthThreshold = 5; // Document length threshold\n int numberOfCores = Runtime.getRuntime().availableProcessors();\n\n String tokenModel = \"./data/Model/en-token.bin\"; // Token model.\n\n EmbeddingParameter param = new EmbeddingParameter(args);\n\n String providedCV = String.format(\"%s/%s/%sSelectedVocab.txt\", param.m_prefix, param.m_data, param.m_data);\n String userFolder = String.format(\"%s/%s/Users\", param.m_prefix, param.m_data);\n String friendFile = String.format(\"%s/%s/%sFriends.txt\", param.m_prefix, param.m_data, param.m_data);\n String cvIndexFile = String.format(\"%s/%s/%sCVIndex.txt\", param.m_prefix, param.m_data, param.m_data);\n String cvIndexFile4Interaction = String.format(\"%s/%s/%sCVIndex4Interaction_fold_%d_train.txt\", param.m_prefix, param.m_data, param.m_data, param.m_kFold);\n\n MultiThreadedNetworkAnalyzer analyzer = null;\n int kFold = 5;\n\n if(param.m_data.equals(\"StackOverflow\")){\n analyzer = new MultiThreadedStackOverflowAnalyzer(tokenModel, classNumber, providedCV, Ngram, lengthThreshold, numberOfCores, true);\n } else\n analyzer = new MultiThreadedNetworkAnalyzer(tokenModel, classNumber, providedCV, Ngram, lengthThreshold, numberOfCores, true);\n analyzer.setAllocateReviewFlag(false); // do not allocate reviews\n\n // we store the interaction information before-hand, load them directly\n analyzer.loadUserDir(userFolder);\n analyzer.constructUserIDIndex();\n\n // if it is cv for doc, use all the interactions + part of docs\n if(param.m_mode.equals(\"cv4doc\") && !param.m_coldStartFlag){\n analyzer.loadCVIndex(cvIndexFile, kFold);\n analyzer.loadInteractions(friendFile);\n }\n // if it is cv for edge, use all the docs + part of edges\n else if(param.m_mode.equals(\"cv4edge\") && !param.m_coldStartFlag){\n analyzer.loadInteractions(cvIndexFile4Interaction);\n }\n // cold start for doc, use all edges, test doc perplexity on light/medium/heavy users\n else if(param.m_mode.equals(\"cv4doc\") && param.m_coldStartFlag) {\n cvIndexFile = String.format(\"%s/%s/ColdStart/%s_cold_start_4docs_fold_%d.txt\", param.m_prefix, param.m_data,\n param.m_data, param.m_kFold);\n analyzer.loadCVIndex(cvIndexFile, kFold);\n analyzer.loadInteractions(friendFile);\n }\n // cold start for edge, use all edges, learn user embedding for light/medium/heavy users\n else if(param.m_mode.equals(\"cv4edge\") && param.m_coldStartFlag){\n cvIndexFile4Interaction = String.format(\"%s/%s/ColdStart/%s_cold_start_4edges_fold_%d_interactions.txt\",\n param.m_prefix, param.m_data, param.m_data, param.m_kFold);\n analyzer.loadInteractions(cvIndexFile4Interaction);\n }\n // answerer recommendation for stackoverflow data only\n else if(param.m_mode.equals(\"ansrec\")){\n cvIndexFile = String.format(\"%s/%s/AnswerRecommendation/%sCVIndex4Recommendation.txt\",\n param.m_prefix, param.m_data, param.m_data);\n friendFile = String.format(\"%s/%s/AnswerRecommendation/%sFriends4Recommendation.txt\",\n param.m_prefix, param.m_data, param.m_data);\n analyzer.loadCVIndex(cvIndexFile, kFold);\n analyzer.loadInteractions(friendFile);\n }\n /***Start running joint modeling of user embedding and topic embedding****/\n double emConverge = 1e-10, alpha = 1 + 1e-2, beta = 1 + 1e-3, lambda = 1 + 1e-3, varConverge = 1e-6;//these two parameters must be larger than 1!!!\n _Corpus corpus = analyzer.getCorpus();\n\n long start = System.currentTimeMillis();\n LDA_Variational tModel = null;\n\n if(param.m_multiFlag && param.m_coldStartFlag) {\n tModel = new EUB4ColdStart_multithreading(param.m_emIter, emConverge, beta, corpus, lambda, param.m_number_of_topics,\n alpha, param.m_varIter, varConverge, param.m_embeddingDim);\n } else if(param.m_multiFlag && !param.m_coldStartFlag){\n tModel = new EUB_multithreading(param.m_emIter, emConverge, beta, corpus, lambda, param.m_number_of_topics,\n alpha, param.m_varIter, varConverge, param.m_embeddingDim);\n } else{\n tModel = new EUB(param.m_emIter, emConverge, beta, corpus, lambda, param.m_number_of_topics, alpha,\n param.m_varIter, varConverge, param.m_embeddingDim);\n }\n\n ((EUB) tModel).initLookupTables(analyzer.getUsers());\n ((EUB) tModel).setModelParamsUpdateFlags(param.m_alphaFlag, param.m_gammaFlag, param.m_betaFlag,\n param.m_tauFlag, param.m_xiFlag, param.m_rhoFlag);\n ((EUB) tModel).setMode(param.m_mode);\n\n ((EUB) tModel).setTrainInferMaxIter(param.m_trainInferIter);\n ((EUB) tModel).setTestInferMaxIter(param.m_testInferIter);\n ((EUB) tModel).setParamMaxIter(param.m_paramIter);\n ((EUB) tModel).setStepSize(param.m_stepSize);\n ((EUB) tModel).setGamma(param.m_gamma);\n ((EUB) tModel).setData(param.m_data);\n\n if(param.m_mode.equals(\"ansrec\")){\n String questionIds = String.format(\"%s/%s/AnswerRecommendation/%sSelectedQuestions.txt\",\n param.m_prefix, param.m_data, param.m_data);\n ((EUB) tModel).loadQuestionIds(questionIds);\n }\n\n if(param.m_multiFlag && param.m_coldStartFlag){\n ((EUB4ColdStart_multithreading) tModel).fixedCrossValidation(param.m_kFold, param.m_saveDir);\n } else{\n ((EUB) tModel).fixedCrossValidation(param.m_kFold, param.m_saveDir);\n }\n\n String saveDir = param.m_saveDir + String.format(\"%s_nuTopics_%d_dim_%d_fold_%d\", param.m_data,\n param.m_number_of_topics, param.m_embeddingDim, param.m_kFold);\n File dir = new File(saveDir);\n if(!dir.exists())\n dir.mkdir();\n\n tModel.printBeta(param.m_saveDir);\n if(param.m_mode.equals(\"ansrec\")){\n ((EUB) tModel).printTopicEmbeddingAsMtx(param.m_saveDir);\n ((EUB) tModel).printTheta(param.m_saveDir);\n }\n long end = System.currentTimeMillis();\n\n // the total time of training and testing in the unit of hours\n double hours = (end - start)/((1000*60*60) * 1.0);\n System.out.print(String.format(\"[Time]This training+testing process took %.2f hours.\\n\", hours));\n\n }", "public static void main(String[] args) throws IOException{\n\t\tint termIndex = 1;\n\t\t\n\t\t// startOffset holds the start offset for each term in\n\t\t// the corpus.\n\t\tlong startOffset = 0;\n\t\t\t\n\t\t// unique_terms is true if there are atleast one more\n\t\t// unique term in corpus.\n\t\tboolean unique_terms = true;\n\t\t\n\t\t\n\t\t//load the stopwords from the HDD\n\t\tString stopwords = getStopWords();\n\t\t\n\t\t// allTokenHash contains all the terms and its termid\n\t\tHashMap<String, Integer> allTermHash = new HashMap<String, Integer>();\n\t\t\n\t\t// catalogHash contains the term and its position in\n\t\t// the inverted list present in the HDD.\n\t\tHashMap<Integer, Multimap> catalogHash = new HashMap<Integer, Multimap>();\n\t\t\n\t\t// finalCatalogHash contains the catalogHash for the invertedIndexHash\n\t\t// present in the HDD.\n\t\tHashMap<Integer, String> finalCatalogHash = new HashMap<Integer, String>();\n\t\t\n\t\t// token1000Hash contains the term and Dblocks for the first 1000\n\t\tHashMap<Integer, Multimap> token1000DocHash = new HashMap<Integer, Multimap>();\n\t\t\n\t\t// documentHash contains the doclength of all the documents in the corpus\n\t\tHashMap<String, String> documentHash = new HashMap<String, String>();\t\n\t\t\n\t\t// id holds the document id corresponding to the docNumber.\n\t\tint id = 1;\n\t\t\n\t\t// until all unique terms are exhausted\n\t\t// pass through the documents and index the terms.\n\t\t//while(unique_terms){\n\t\t\t\n\t\t\tFile folder = new File(\"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/ap89_collection\");\n\t\t\t//File folder = new File(\"C:/Users/Naveen/Desktop/TestFolder\");\n\t\t\tFile[] listOfFiles = folder.listFiles();\n\t\t\t\n\t\t\t//for each file in the folder \n\t\t\tfor (File file : listOfFiles) {\n\t\t\t if (file.isFile()) {\n\t\t\t \t\n\t\t\t \tString str = file.getPath().replace(\"\\\\\",\"//\");\n\t\t\t \t\n\t\t\t \t\n\t\t\t\t\t//Document doc = new Document();\n\t\t\t //System.out.println(\"\"+str);\n\t\t\t\t\t//variables to keep parse document.\n\t\t\t\t\tint docCount = 0;\n\t\t\t\t\tint docNumber = 0;\n\t\t\t\t\tint endDoc = 0;\n\t\t\t\t\tint textCount = 0;\n\t\t\t\t\tint noText = 0;\n\t\t\t\t\tPath path = Paths.get(str);\n\t\t\t\t\t\n\t\t\t\t\t//Document id and text\n\t\t\t\t\tString docID = null;\n\t\t\t\t\tString docTEXT = null;\n\t\t\t\t\t\n\t\t\t\t\t//Stringbuffer to hold the text of each document\n\t\t\t\t\tStringBuffer text = new StringBuffer();\n\t\t\t\t\t\n\t\t\t\t\tScanner scanner = new Scanner(path);\n\t\t\t\t\twhile(scanner.hasNext()){\n\t\t\t\t\t\tString line = scanner.nextLine();\n\t\t\t\t\t\tif(line.contains(\"<DOC>\")){\n\t\t\t\t\t\t\t++docCount;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"</DOC>\")){\n\t\t\t\t\t\t\t++endDoc;\n\t\t\t\t\t\t\tdocTEXT = text.toString();\n\t\t\t\t\t\t\t//docTEXT = docTEXT.replaceAll(\"[\\\\n]\",\" \");\n\t\t\t\t\t\t\tSystem.out.println(\"ID: \"+id);\n\t\t\t\t\t\t\t//System.out.println(\"TEXT: \"+docTEXT);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// text with stop words removed\n\t\t\t\t\t\t\tPattern pattern1 = Pattern.compile(\"\\\\b(?:\"+stopwords+\")\\\\b\\\\s*\", Pattern.CASE_INSENSITIVE);\n\t\t\t\t\t\t\tMatcher matcher1 = pattern1.matcher(docTEXT);\n\t\t\t\t\t\t\tdocTEXT = matcher1.replaceAll(\"\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// text with stemming\n\t\t\t\t\t\t\t//docTEXT = stemmer(docTEXT);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint docLength = 1;\n\t\t\t\t\t\t\t// regex to build the tokens from the document text\n\t\t\t\t\t\t\tPattern pattern = Pattern.compile(\"\\\\w+(\\\\.?\\\\w+)*\");\n\t\t\t\t\t\t\tMatcher matcher = pattern.matcher(docTEXT.toLowerCase());\n\t\t\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (int i = 0; i < matcher.groupCount(); i++) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// alltermHash contains term and term id\n\t\t\t\t\t\t\t\t\t// if term is present in the alltermHash\n\t\t\t\t\t\t\t\t\tif(allTermHash.containsKey(matcher.group(i))){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tint termId = allTermHash.get(matcher.group(i));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//if term is present in the token1000Hash\n\t\t\t\t\t\t\t\t\t\t//then update the dblock of the term.\n\t\t\t\t\t\t\t\t\t\tif(token1000DocHash.containsKey(termId)){\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockUpdate = token1000DocHash.get(termId);\n\t\t\t\t\t\t\t\t\t\t\t//Multimap<Integer, Integer> dBlockUpdate = token1000DocHash.get(matcher.group(i));\n\t\t\t\t\t\t\t\t\t\t\tif(dBlockUpdate.containsKey(id)){\n\t\t\t\t\t\t\t\t\t\t\t\tdBlockUpdate.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tdBlockUpdate.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//if term is not present in the token1000hash\n\t\t\t\t\t\t\t\t\t\t//then add the token with its dBlock\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\t\tdBlockInsert.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\ttoken1000DocHash.put(termId, dBlockInsert);\t\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// if the term is not present I will put the term into allTermHash\n\t\t\t\t\t\t\t\t\t// put corresponding value into the token1000DocHash and increment\n\t\t\t\t\t\t\t\t\t// termIndex\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tallTermHash.put(matcher.group(i),termIndex);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\tdBlockInsert.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\ttoken1000DocHash.put(termIndex, dBlockInsert);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\ttermIndex++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocLength++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(id%1000 == 0){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// then dump index file to HDD\n\t\t\t\t\t\t\t\t\twriteInvertedIndex(token1000DocHash,\"token1000DocHash\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// update catalog file\n\t\t\t\t\t\t\t\t\t// to populate catalogHash with the offset\n\t\t\t\t\t\t\t\t\tfor(Entry<Integer, Multimap> entry : token1000DocHash.entrySet()){\n\t\t\t\t\t\t\t\t\t\tif(catalogHash.containsKey(entry.getKey())){\n\t\t\t\t\t\t\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t\t\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> catUpdate = catalogHash.get(entry.getKey());\n\t\t\t\t\t\t\t\t\t\t\tcatUpdate.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\t\t\t\t\t\t\tcatalogHash.put(entry.getKey(), catUpdate);\n\t\t\t\t\t\t\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t\t\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\t\tcatInsert.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\t\t\t\t\t\t\tcatalogHash.put(entry.getKey(), catInsert);//entry.getValue());\n\t\t\t\t\t\t\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//clear the token1000DocHash\n\t\t\t\t\t\t\t\t\ttoken1000DocHash.clear();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdocumentHash.put(docID, \"\"+id+\":\"+docLength);\n\t\t\t\t\t\t\tid++;\n\t\t\t\t\t\t\ttext = new StringBuffer();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"<DOCNO>\")){\n\t\t\t\t\t\t\t++docNumber;\n\t\t\t\t\t\t\tdocID = line.substring(8, 21);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"<TEXT>\")){\n\t\t\t\t\t\t\t++textCount;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if((line.contains(\"<DOC>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</DOC>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<DOCNO>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<FILEID>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<FIRST>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<SECOND>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<HEAD>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</HEAD>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<BYLINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</BYLINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<UNK>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</UNK>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<DATELINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<NOTE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</NOTE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</TEXT>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<TEXT>\"))){\n\t\t\t\t\t\t\t ++noText;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(endDoc == docCount - 1){\n\t\t\t\t\t\t\ttext.append(line);\n\t\t\t\t\t\t\ttext.append(\" \");\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\n\t\t\t }//end of if - to check if this is a file and parse.\n\t\t\t \n\t\t\t}//end of for loop to load each file\n\t\t\t\n\t\t//}//end of while loop \n\t\t\n\t// write catalogfile to the hdd to check.\n\t\t\t\n\t\t\t// then dump index file to HDD\n\t\t\twriteInvertedIndex(token1000DocHash,\"token1000DocHash\");\n\t\t\t\n\t\t\t// update catalog file\n\t\t\t// to populate catalogHash with the offset\n\t\t\tfor(Entry<Integer, Multimap> entry : token1000DocHash.entrySet()){\n\t\t\t\tif(catalogHash.containsKey(entry.getKey())){\n\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\tMultimap<String, String> catUpdate = catalogHash.get(entry.getKey());\n\t\t\t\t\tcatUpdate.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\tcatalogHash.put(entry.getKey(), catUpdate);\n\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\tMultimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t\tcatInsert.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\tcatalogHash.put(entry.getKey(), catInsert);//entry.getValue());\n\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\twriteInvertedIndex(catalogHash,\"catalogHash\");\n\t\t\tprintHashMapSI(allTermHash);\n\t\t\tprintHashMapSS(documentHash);\n\t\t\t\n\t\t\tlong InvIndstartOffset = 0;\n\t\t\t\n\t\t\t//write it to file\n \n\t\t\t//change the finalcatalogHash to the form termid:startoffset:length\n\t\t\tfor (Integer name: catalogHash.keySet()){\n\t String key = name.toString();\n\t String value = catalogHash.get(name).toString(); \n\t //System.out.println(key + \" \" + value); \n\t String finalTermIndex = genInvertedIndex(key, value);\n\t finalTermIndex = key+\":\"+finalTermIndex;\n\t int indexLength = finalTermIndex.length();\n\t \n\t \n\t PrintWriter writer = new PrintWriter(new BufferedWriter\n\t \t\t(new FileWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/InvertedIndex\", true)));\n\t writer.println(finalTermIndex);\n\t writer.close();\n\t \n\t //update the finalcatalogHash\n\t //Multimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t//catInsert.put(String.valueOf(InvIndstartOffset), String.valueOf(indexLength));\n\t\t\t\tfinalCatalogHash.put(name, String.valueOf(InvIndstartOffset)+\":\"+String.valueOf(indexLength));//entry.getValue());\n\t\t\t\tInvIndstartOffset += indexLength+2;\n\t \n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tprintHashMapIS(finalCatalogHash);\n\t\t\t\n\t}", "public ArrayList<GrammarMatch> extract(String text) {\n text = text.replaceAll(\"\\\\s+\", \" \");\n\n ArrayList<GrammarMatch> bigResult = new ArrayList();\n\n List<ParserToken> stream = this.tokenizer.transform(text);\n\n /**\n * Get morfological data for whole list of tokens\n */\n // TODO make this flexible \n // provide tagger as a parameter to parser\n // add posibility to skip tagging to boost performance\n List<AnalyzedTokenReadings> tags = null;\n\n try {\n UkrainianTagger ut = new UkrainianTagger();\n List<String> sentence = new ArrayList();\n\n stream.forEach(t -> {\n sentence.add(t.value);\n });\n\n tags = ut.tag(sentence);\n\n } catch (IOException ex) {\n Logger.getLogger(GrammarMatch.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n // merge pos tags with ParserTokens\n int currentIndex = 0;\n for (ParserToken token : stream) {\n AnalyzedTokenReadings forms = tags.get(currentIndex);\n\n if (forms != null) {\n token.setRawForms(forms);\n }\n currentIndex++;\n }\n\n // preprocess tokens\n for (ParserTokenPreprocessor preprocessor : this.preprocessors) {\n stream = preprocessor.proceed(stream);\n }\n\n // match with grammars\n// int tokenIndex = 0;\n// int lastInsertTokenIndex = 0;\n this.currentTokens = stream;\n\n for (ParserToken token : stream) {\n for (GrammarRuleI grule : this.grammars) {\n\n // TODO get rid of this. use based on interface implementation\n ParserGrammar grammar = (ParserGrammar) grule;\n\n boolean recheck = grammar.shift(token);\n // TODO substitute ParserMatch with parserToken\n ArrayList<ParserMatch> match = grammar.reduce();\n\n if (match.size() > 0) {\n bigResult.add(new GrammarMatch(grammar, match));\n }\n\n if (recheck) {\n grammar.shift(token);\n match = grammar.reduce();\n\n if (match.size() > 0) {\n bigResult.add(new GrammarMatch(grammar, match));\n }\n\n }\n\n }\n\n }\n\n // shift repeatable rules to the terminal symbol if any\n// for (GrammarRuleI gr : this.grammars) {\n//\n// visitAllRules(null,gr, (rule,parent) -> {\n// if (!rule.isSimple()) {\n//\n// ParserGrammar pg = (ParserGrammar) rule;\n// System.out.print(\" %%% -> [\"+parent+\"]\" + ((ParserGrammar) rule).getName());\n// if (pg.isRepeatable()) {\n// System.out.print(\" repeatable\");\n// if (pg.isInserted()) {\n// System.out.print(\" is_inserted\");\n// } else {\n// System.out.print(\" not_inserted\");\n//\n// if (!pg.isFirstRun() && pg.getCurrentIndex() == 0) {\n// System.out.print(\" dirty\");\n// \n// pg.setCurrentIndex(pg.rulesCount());\n// \n// if (parent != null) {\n// ParserGrammar pgp = (ParserGrammar) parent;\n// \n// \n// pgp.setCurrentIndex(pgp.getCurrentIndex()+1);\n// System.out.print(\" shift_head[\"+pgp.getCurrentIndex()+\"->\"+(pgp.getCurrentIndex()+1)+\"]\");\n// }\n// \n// \n// }\n// \n// }\n//\n// }\n// System.out.println(\"\");\n//\n// } else {\n//// System.out.println(\" [%%%] -> \");\n// }\n// });\n// }\n\n for (GrammarRuleI grule : this.grammars) {\n\n ParserGrammar grammar = (ParserGrammar) grule;\n\n ArrayList<ParserMatch> match = grammar.reduce(true, false);\n\n if (match.size() > 0) {\n bigResult.add(new GrammarMatch(grammar, match));\n\n }\n grammar.reset();\n }\n\n return bigResult;\n }", "@Override\n public void processCas(CAS aCas) throws ResourceProcessException {\nSystem.out.println(\"Retrival evaluator...\");\n JCas jcas;\n try {\n jcas = aCas.getJCas();\n } catch (CASException e) {\n throw new ResourceProcessException(e);\n }\n\n FSIterator it = jcas.getAnnotationIndex(Document.type).iterator();\n \n// if (it.hasNext()) {\n// Document doc = (Document) it.next();\n// cnt++;\n// }\n// log(cnt);\n it = jcas.getAnnotationIndex(Document.type).iterator();\n\n if (it.hasNext()) {\n Document doc = (Document) it.next();\n int queryid = doc.getQueryID();\n int rel = doc.getRelevanceValue();\n // Make sure that your previous annotators have populated this in CAS\n FSList fsTokenList = doc.getTokenList();\n ArrayList<Token> tokenList = Utils.fromFSListToCollection(fsTokenList, Token.class);\n Map<String, Integer> queryVector = new HashMap<String, Integer>();\n Map<String, Integer> docVector = new HashMap<String, Integer>();\n if (rel == 99) {\n for (Token t : tokenList) {\n queryVector.put(t.getText(), t.getFrequency());\n }\n queryVectorlist.add(queryVector);\n } else {\n for (Token t : tokenList) {\n docVector.put(t.getText(), t.getFrequency());\n }\n double cos = computeCosineSimilarity(queryVectorlist.get(queryid - 1), docVector);\n coslist.add(cos);\n\n if (rel == 1) {\n gold = lines;\n goldcos = cos;\n System.out.println(\"goldcos\"+goldcos);\n }\n }\n \n if (qIdList.size() >= 1 && qIdList.get(qIdList.size() - 1) != queryid) {\n// System.out.println(\"lines:\"+lines);\n sortSimilarity(coslist);\n log(coslist);\n int rank=findRank(coslist,goldcos);\n rankList.add(rank);\n coslist = new ArrayList<Double>();\n }\n\n qIdList.add(doc.getQueryID());// 有啥用???\n relList.add(doc.getRelevanceValue());\n\n // Do something useful here\n lines++;\n }\n //log(coslist);\n\n }", "public List<MinedDocument> parseCompareArtifacts() {\n//\t\tSystem.out.println(\"parseCompareArtifacts()\");\n\t\tList<MinedDocument> compareDocs = new ArrayList<MinedDocument>();\n\t\t\n\t\tInputStream is;\n\t\tDocxParser docx;\n\t\tString title = null;\n\t\tString text;\n\t\t\n\t\tfor(IArtefact artefact : this.artefacts) {\n\t\t\ttext = null;\n\t\t\t\n\t\t\tif(artefact instanceof NuxeoDocArtefact) {\t// Nuxeo Document:\n\t\t\t\ttry {\n\t\t\t\t\tis = getNuxeoInstance().getDocumentInputStream(artefact.getId());\n\t\t\t\t\t\n\t\t\t\t\ttitle = this.getNuxeoInstance().getLastDocTitle();\n\t\t\t\t\tif(title==null) title = NO_TITLE;\n\t\t\t\t\t\n\t\t\t\t\tif(this.getNuxeoInstance().getLastDocFilePath().endsWith(\".docx\")) {\n\t\t\t\t\t\tdocx = new DocxParser(is);\n\t\t\t\t\t\tdocx.parseDocxSimple();\n\t\t\t\t\t\ttext = docx.getFullText();\n\t\t\t\t\t} else if(this.getNuxeoInstance().getLastDocFilePath().endsWith(\".doc\")) {\n\t\t\t\t\t\ttext = DocxParser.parseDocSimple(is);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read nuxeo doc with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof LiferayBlogArtefact) { // Liferay Blog Entry:\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject blogEntry = this.getLiferayInstance().getBlogEntry(artefact.getId());\n\t\t\t\t\ttitle = blogEntry.getString(\"title\");\n\t\t\t\t\ttext = blogEntry.getString(\"content\");\n\t\t\t\t\ttext = TextParser.parseHtml(text);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read Liferay blog entry with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof LiferayForumArtefact) { // Liferay Forum Message\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject forumEntry = this.getLiferayInstance().getMessageBoardMessage(artefact.getId());\n\t\t\t\t\ttitle = forumEntry.getString(\"subject\");\n\t\t\t\t\ttext = forumEntry.getString(\"body\");\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read Liferay forum message with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof LiferayWebContentArtefact) { // Liferay Web Content Article (Journal)\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject webContentArticle = this.getLiferayInstance().getWebContentArticle(artefact.getId());\n\t\t\t\t\ttitle = webContentArticle.getString(WEBCONTENT_TITLE);\n\t\t\t\t\ttext = webContentArticle.getString(WEBCONTENT_CONTENT);\n\t\t\t\t\t// check if is \"meeting minutes\" content:\n\t\t\t\t\tJSONObject webContentTemplate = this.getLiferayInstance().getWebContentTemplate(\n\t\t\t\t\t\t\twebContentArticle.getString(WEBCONTENT_TEMPLATE_ID), webContentArticle.getString(WEBCONTENT_GROUP_ID));\n\t\t\t\t\tString templateName = webContentTemplate.getString(WEBCONTENTTEMPLATE_NAME);\n\t\t\t\t\tif(templateName.contains(WEBCONTENTTEMPLATE_MEETING_MINUTES)) {\n\t\t\t\t\t\t((LiferayWebContentArtefact)artefact).setIsMeetingMinutes(true);\n\t\t\t\t\t}\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read Liferay web content with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof LiferayWikiArtefact) { // Liferay Wiki Page\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject wikiPage = this.getLiferayInstance().getWikiPage(artefact.getId());\n\t\t\t\t\ttitle = wikiPage.getString(\"title\");\n\t\t\t\t\ttext = wikiPage.getString(\"content\");\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read Liferay wiki page with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof SocialMessageArtefact) { // Shindig Message\n\t\t\t\tShindigConnector shindigCon;\n\t\t\t\tif(Config.SHINDIG_USAGE.getValue().equals(Config.VAL_SHINDIG_DIRECT))\n\t\t\t\t // disabled\n//\t\t\t\t\tshindigCon = new ShindigDirectConnector();\n\t\t\t\t shindigCon = null;\n\t\t\t\telse\n\t\t\t\t\tshindigCon = new ShindigRESTConnector();\n\t\t\t\tJSONObject message = shindigCon.getOutboxMessage(((SocialMessageArtefact) artefact).getUserId(), artefact.getId());\n\t\t\t\tif(message!=null) {\n\t\t\t\t\ttitle = message.getString(\"title\");\n\t\t\t\t\ttext = message.getString(\"body\");\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"MinedDocument is a SocialMessageArtefact\");\n\t\t\t} else if(artefact instanceof MailArtefact) { // Email via ElastiSearch\n\t\t\t\ttitle = ((MailArtefact)artefact).getSubject();\n\t\t\t\ttext = ((MailArtefact)artefact).getContent();\n\t\t\t}\n\t\t\t\n\t\t\tif(title==null)\n\t\t\t\ttitle = NO_TITLE;\n\t\t\t\n\t\t\tif(text!=null)\n\t\t\t\tcompareDocs.add(new MinedDocument(title, text));\n\t\t\telse\n\t\t\t\tcompareDocs.add(null);\n\t\t}\n\t\t\n\t\treturn compareDocs;\n\t}", "public void extractKnowledge()\n {\n }", "public static Document parse(String filename) throws ParserException {\n\t\t// TODO YOU MUST IMPLEMENT THIS\n\t\t// girish - All the code below is mine\n\t\t\t\n\t\t// Creating the object for the new Document\n\t\t\n\t\t\n\t\tif (filename == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\t// Variable indexPos to track the current pointer location in the String Array\n\t\tint indexPos = 0;\n\t\t\n\t\t// Creating an instance of the document class to store the parsed content\n\t\tDocument d = new Document();\n\t\t\n\t\t// to store the result sent from the regexAuthor method and regexPlaceDate method\n\t\tObject[] resultAuthor = {null, null, null};\n\t\tObject[] resultPlaceDate = {null, null, null};\n\t\tStringBuilder news = new StringBuilder();\n\t\t\n\t\t// Next 4 lines contains the code to get the fileID and Category metadata\n\t\tString[] fileCat = new String[2];\n\t\t\n\t\tfileCat = regexFileIDCat(\"/((?:[a-z]|-)+)/([0-9]{7})\", filename);\n\t\t// System.out.println(filename);\n\t\t// throw an exception if the file is blank, junk or null\n\t\tif (fileCat[0] == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\td.setField(FieldNames.CATEGORY, fileCat[0]);\n\t\td.setField(FieldNames.FILEID, fileCat[1]);\n\t\t\n\t\t\n\t\t// Now , parsing the file\n\t\tFile fileConnection = new File(filename);\n\t\t\n\t\t// newscollated - it will store the parsed file content on a line by line basis\n\t\tArrayList<String> newscollated = new ArrayList<String>();\n\t\t\n\t\t// String that stores the content obtained from the . readline() operation\n\t\tString temp = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tBufferedReader getInfo = new BufferedReader(new FileReader(fileConnection));\n\t\t\twhile ((temp = getInfo.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(temp.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\ttemp = temp + \" \";\n\t\t\t\t\tnewscollated.add(temp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tgetInfo.close();\n\t\t\t\n\t\t\t//-- deprecated (REMOVE THIS IF OTHER WORKS)\n\t\t\t// setting the title using the arraylist's 0th index element\n\t\t\t//d.setField(FieldNames.TITLE, newscollated.get(0));\n\t\t\t\n\t\t\t// Appending the lines into one big string using StringBuilder\n\t\t\t\n\t\t\tfor (String n: newscollated)\n\t\t\t{\n\t\t\t\tnews.append(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Obtaining the TITLE of the file\n\t\t\tObject[] titleInfo = new Object[2];\n\t\t\t\n\t\t\ttitleInfo = regexTITLE(\"([^a-z]+)\\\\s{2,}\", news.toString());\n\t\t\td.setField(FieldNames.TITLE, titleInfo[0].toString().trim());\n\t\t\tindexPos = (Integer) titleInfo[1];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Getting the Author and Author Org\n\t\t\tresultAuthor = regexAuthor(\"<AUTHOR>(.*)</AUTHOR>\", news.toString());\n\t\t\t\n\t\t\tif (resultAuthor[0] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHOR, resultAuthor[0].toString());\n\t\t\t}\n\t\t\t\n\t\t\tif (resultAuthor[1] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHORORG, resultAuthor[1].toString());\n\t\t\t}\n\t\t \n\t\t \n\t\t \n\t\t if ((Integer) resultAuthor[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultAuthor[2];\n\t\t }\n\t\t\t\n\t\t \n\t\t \n\t\t // Getting the Place and Date\n \t\t\tresultPlaceDate = regexPlaceDate(\"\\\\s{2,}(.+),\\\\s(?:([A-Z][a-z]+\\\\s[0-9]{1,})\\\\s{1,}-)\", news.toString());\n \t\t\t\n \t\t\tif (resultPlaceDate[0] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.PLACE, resultPlaceDate[0].toString().trim());\n \t\t\t}\n \t\t \n \t\t\tif (resultPlaceDate[1] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.NEWSDATE, resultPlaceDate[1].toString().trim());\n \t\t\t}\n \t\t\t\n \t\t // getting the content\n \t\t \n \t\t if ((Integer) resultPlaceDate[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultPlaceDate[2];\n\t\t }\n \t\t \n \t\t \n \t\t d.setField(FieldNames.CONTENT, news.substring(indexPos + 1));\n \t\t \n \t\t return d;\n \t\t \n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException e){\n\t\t\tthrow new ParserException();\n\t\t\t\n\t\t}\n\n\t\tcatch(IOException e){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn d;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public Object getContent() {\n\t\tManageProperties properties = ManageProperties.getInstance();\n\t\tDocument gateDoc = null;\n\t\ttry {\n\t\t\tgateDoc = (Document) Factory.createResource(\"gate.corpora.DocumentImpl\", Utils.featureMap(\"encoding\", properties.getValue(PropertiesFields.ENCODING.toString())));\n\t\t\tDocumentType doc = xmldoc.getDocument();\n\t\t\tgateDoc.setContent(new DocumentContentImpl(doc.getText()));\n\t\t\tAnnotationSet defaultSet = gateDoc.getAnnotations();\n\t\t\tTokensType tokens = doc.getTokens();\n\t\t\tIterator<TokenType> iterTokens = tokens.getToken().iterator();\n\t\t\twhile(iterTokens.hasNext()) {\n\t\t\t\tTokenType token = iterTokens.next();\n\t\t\t\tFeatureMap tokenFeatures = Factory.newFeatureMap();\n\t\t\t\ttokenFeatures.put(\"string\", token.getForm());\n\t\t\t\ttokenFeatures.put(\"root\", token.getLemma());\n\t\t\t\ttokenFeatures.put(\"category\", token.getCategory());\n\t\t\t\tdefaultSet.add(token.getBeginspan().longValue(), token.getEndspan().longValue(), \"Token\", tokenFeatures);\n\t\t\t}\n\t\t\t\n\t\t\tIterator<SentenceType> iterSentences = doc.getSentence().iterator();\n\t\t\twhile(iterSentences.hasNext()) {\n\t\t\t\tSentenceType sent = iterSentences.next();\n\t\t\t\tdefaultSet.add(sent.getBeginspan().longValue(), sent.getEndspan().longValue(), \"Sentence\", Factory.newFeatureMap());\n\t\t\t}\n\t\t} catch (ResourceInstantiationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidOffsetException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn (gateDoc);\n\t}", "@Override\n public void process(JCas aJCas) throws AnalysisEngineProcessException {\n // TODO Auto-generated method stub\n String text = aJCas.getSofaDataString();\n // get top 1 chunking \n ScoredObject<Chunking> chunkres = chunker.nBest(text.toCharArray(), 0, text.length(), 1).next();\n double conf = chunkres.score();\n for(Chunk chunk : chunkres.getObject().chunkSet())\n {\n // adapt indices to non whitespace\n int begin = text.substring(0, chunk.start()).replaceAll(\"\\\\s\", \"\").length(); \n int end = -1+text.substring(0, chunk.end()).replaceAll(\"\\\\s\", \"\").length(); \n // add mention to CAS\n GeneEntitybyLingpipe mention = new GeneEntitybyLingpipe(aJCas, begin, end);\n mention.setEntityText(text.substring(chunk.start(), chunk.end()));\n mention.setCasProcessorId(this.getClass().getName());\n mention.setConfidence(conf);\n mention.addToIndexes();\n }\n }", "public ArrayList<String> makeSentences(String text) {\n \t\t/*\n \t\t * Quick check so we're not trying to split up an empty\n \t\t * String. This only happens right before the user types\n \t\t * at the end of a document and we don't have anything to\n \t\t * split, so return.\n \t\t */\n \t\tif (text.equals(\"\")) {\n \t\t\tArrayList<String> sents = new ArrayList<String>();\n \t\t\tsents.add(\"\");\n \t\t\treturn sents;\n \t\t}\n \t\t\n \t\t/**\n \t\t * Because the eosTracker isn't initialized until the TaggedDocument is,\n \t\t * it won't be ready until near the end of DocumentProcessor, in which\n \t\t * case we want to set it to the correct\n \t\t */\n \t\tthis.eosTracker = main.editorDriver.taggedDoc.eosTracker;\n \t\tthis.editorDriver = main.editorDriver;\n \t\t\n \t\tArrayList<String> sents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tArrayList<String> finalSents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tboolean mergeNext = false;\n \t\tboolean mergeWithLast = false;\n \t\tboolean forceNoMerge = false;\n \t\tint currentStart = 1;\n \t\tint currentStop = 0;\n \t\tString temp;\n \n \t\t/**\n \t\t * replace unicode format characters that will ruin the regular\n \t\t * expressions (because non-printable characters in the document still\n \t\t * take up indices, but you won't know they're there untill you\n \t\t * \"arrow\" though the document and have to hit the same arrow twice to\n \t\t * move past a certain point. Note that we must use \"Cf\" rather than\n \t\t * \"C\". If we use \"C\" or \"Cc\" (which includes control characters), we\n \t\t * remove our newline characters and this screws up the document. \"Cf\"\n \t\t * is \"other, format\". \"Cc\" is \"other, control\". Using \"C\" will match\n \t\t * both of them.\n \t\t */\n \t\ttext = text.replaceAll(\"\\u201C\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\u201D\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\\\p{Cf}\",\"\");\n \n \t\tint lenText = text.length();\n \t\tint index = 0;\n \t\tint buffer = editorDriver.sentIndices[0];\n \t\tString safeString = \"\";\n \t\tMatcher abbreviationFinder = ABBREVIATIONS_PATTERN.matcher(text);\n \t\t\n \t\t//================ SEARCHING FOR ABBREVIATIONS ================\n \t\twhile (index < lenText-1 && abbreviationFinder.find(index)) {\n \t\t\tindex = abbreviationFinder.start();\n \t\t\t\n \t\t\ttry {\n \t\t\t\tint abbrevLength = index;\n \t\t\t\twhile (text.charAt(abbrevLength) != ' ') {\n \t\t\t\t\tabbrevLength--;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (ABBREVIATIONS.contains(text.substring(abbrevLength+1, index+1))) {\n \t\t\t\t\teosTracker.setIgnore(index+buffer, true);\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \t\t\t\n \t\t\tindex++;\n \t\t}\t\t\n \t\t\n \t\tMatcher sent = EOS_chars.matcher(text);\n \t\tboolean foundEOS = sent.find(currentStart); // xxx TODO xxx take this EOS character, and if not in quotes, swap it for a permanent replacement, and create and add an EOS to the calling TaggedDocument's eosTracker.\n \t\t\n \t\t/*\n \t\t * We want to check and make sure that the EOS character (if one was found) is not supposed to be ignored. If it is, we will act like we did not\n \t\t * find it. If there are multiple sentences with multiple EOS characters passed it will go through each to check, foundEOS will only be true if\n \t\t * an EOS exists in \"text\" that would normally be an EOS character and is not set to be ignored.\n \t\t */\n \t\t\n \t\tindex = 0;\n \t\tif (foundEOS) {\t\n \t\t\ttry {\n \t\t\t\twhile (index < lenText-1 && sent.find(index)) {\n \t\t\t\t\tindex = sent.start();\n \t\t\t\t\tif (!eosTracker.sentenceEndAtIndex(index+buffer)) {\n \t\t\t\t\t\tfoundEOS = false;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tfoundEOS = true;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tindex++;\n \t\t\t\t}\n \t\t\t} catch (IllegalStateException e) {}\n \t\t}\n \t\t//We need to reset the Matcher for the code below\n \t\tsent = EOS_chars.matcher(text);\n \t\tsent.find(currentStart);\n \t\t\n \t\tMatcher sentEnd;\n \t\tMatcher citationFinder;\n \t\tboolean hasCitation = false;\n \t\tint charNum = 0;\n \t\tint lenTemp = 0;\n \t\tint lastQuoteAt = 0;\n \t\tint lastParenAt = 0;\n \t\tboolean foundQuote = false;\n \t\tboolean foundParentheses = false;\n \t\tboolean isSentence;\n \t\tboolean foundAtLeastOneEOS = foundEOS;\n \t\t\n \t\t/**\n \t\t * Needed otherwise when the user has text like below:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two. This is the last sentence.\n \t\t * and they begin to delete the EOS character as such:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two This is the last sentence.\n \t\t * Everything gets screwed up. This is because the operations below operate as expected only when there actually is an EOS character\n \t\t * at the end of the text, it expects it there in order to function properly. Now usually if there is no EOS character at the end it wouldn't\n \t\t * matter since the while loop and !foundAtLeastOneEOS conditional are executed properly, BUT as you can see the quotes, or more notably the EOS character inside\n \t\t * the quotes, triggers this initial test and thus the operation breaks. This is here just to make sure that does not happen.\n \t\t */\n \t\tString trimmedText = text.trim();\n \t\tint trimmedTextLength = trimmedText.length();\n \n \t\t//We want to make sure that if there is an EOS character at the end that it is not supposed to be ignored\n \t\tboolean EOSAtSentenceEnd = true;\n \t\tif (trimmedTextLength != 0) {\n \t\t\tEOSAtSentenceEnd = EOS.contains(trimmedText.substring(trimmedTextLength-1, trimmedTextLength)) && eosTracker.sentenceEndAtIndex(editorDriver.sentIndices[1]-1);\n \t\t} else {\n \t\t\tEOSAtSentenceEnd = false;\n \t\t}\n \t\t\n \t\t//Needed so that if we are deleting abbreviations like \"Ph.D.\" this is not triggered.\n \t\tif (!EOSAtSentenceEnd && (editorDriver.taggedDoc.watchForEOS == -1))\n \t\t\tEOSAtSentenceEnd = true;\n \n \t\twhile (foundEOS == true) {\n \t\t\tcurrentStop = sent.end();\n \t\t\t\n \t\t\t//We want to make sure currentStop skips over ignored EOS characters and stops only when we hit a true EOS character\n \t\t\ttry {\n \t\t\t\twhile (!eosTracker.sentenceEndAtIndex(currentStop+buffer-1) && currentStop != lenText) {\n \t\t\t\t\tsent.find(currentStop+1);\n \t\t\t\t\tcurrentStop = sent.end();\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \n \t\t\ttemp = text.substring(currentStart-1,currentStop);\n \t\t\tlenTemp = temp.length();\n \t\t\tlastQuoteAt = 0;\n \t\t\tlastParenAt = 0;\n \t\t\tfoundQuote = false;\n \t\t\tfoundParentheses = false;\n \t\t\t\n \t\t\tfor(charNum = 0; charNum < lenTemp; charNum++){\n \t\t\t\tif (temp.charAt(charNum) == '\\\"') {\n \t\t\t\t\tlastQuoteAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundQuote == true)\n \t\t\t\t\t\tfoundQuote = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundQuote = true;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (temp.charAt(charNum) == '(') {\n \t\t\t\t\tlastParenAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundParentheses)\n \t\t\t\t\t\tfoundParentheses = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundParentheses = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundQuote == true && ((temp.indexOf(\"\\\"\",lastQuoteAt+1)) == -1)) { // then we found an EOS character that shouldn't split a sentence because it's within an open quote.\n \t\t\t\tif ((currentStop = text.indexOf(\"\\\"\",currentStart +lastQuoteAt+1)) == -1) {\n \t\t\t\t\tcurrentStop = text.length(); // if we can't find a closing quote in the rest of the input text, then we assume the author forgot to put a closing quote, and act like it's at the end of the input text.\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tcurrentStop +=1;\n \t\t\t\t\tmergeNext=true;// the EOS character we are looking for is not in this section of text (section being defined as a substring of 'text' between two EOS characters.)\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\n \t\t\tif (foundParentheses && ((temp.indexOf(\")\", lastParenAt+1)) == -1)) {\n \t\t\t\tif ((currentStop = text.indexOf(\")\", currentStart + lastParenAt + 1)) == -1)\n \t\t\t\t\tcurrentStop = text.length();\n \t\t\t\telse {\n \t\t\t\t\tcurrentStop += 1;\n \t\t\t\t\tmergeNext = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \n \t\t\tif (foundQuote) {\n \t\t\t\tsentEnd = SENTENCE_QUOTE.matcher(text);\t\n \t\t\t\tisSentence = sentEnd.find(currentStop-2); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \n \t\t\t\tif (isSentence == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\t\tcurrentStop = text.indexOf(\"\\\"\",sentEnd.start())+1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundParentheses) {\n \t\t\t\tsentEnd = SENTENCE_PARENTHESES.matcher(text);\n \t\t\t\tisSentence = sentEnd.find(currentStop-2);\n \t\t\t\t\n \t\t\t\tif (isSentence == true) {\n \t\t\t\t\tcurrentStop = text.indexOf(\")\", sentEnd.start()) + 1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1, currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// now check to see if there is a CITATION after the sentence (doesn't just apply to quotes due to paraphrasing)\n \t\t\t// The rule -- at least as of now -- is if after the EOS mark there is a set of parenthesis containing either one word (name) or a name and numbers (name 123) || (123 name) || (123-456 name) || (name 123-456) || etc..\n \t\t\tcitationFinder = CITATION.matcher(text.substring(currentStop));\t\n \t\t\thasCitation = citationFinder.find(); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \t\t\t\n \t\t\tif (hasCitation == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\tcurrentStop = text.indexOf(\")\",citationFinder.start()+currentStop)+1;\n \t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\tmergeNext = false;\n \t\t\t}\t\n \t\t\t\n \t\t\tif (mergeWithLast) {\n \t\t\t\tmergeWithLast=false;\n \t\t\t\tString prev=sents.remove(sents.size()-1);\n \t\t\t\tsafeString=prev+safeString;\n \t\t\t}\n \t\t\t\n \t\t\tif (mergeNext && !forceNoMerge) {//makes the merge happen on the next pass through\n \t\t\t\tmergeNext=false;\n \t\t\t\tmergeWithLast=true;\n \t\t\t} else {\n \t\t\t\tforceNoMerge = false;\n \t\t\t\tfinalSents.add(safeString);\n \t\t\t}\n \t\t\n \t\t\tsents.add(safeString);\n \t\t\t\n \t\t\t//// xxx xxx xxx return the safeString_subbedEOS too!!!!\n \t\t\tif (currentStart < 0 || currentStop < 0) {\n \t\t\t\tLogger.logln(NAME+\"Something went really wrong making sentence tokens.\", LogOut.STDERR);\n \t\t\t\tErrorHandler.fatalProcessingError(null);\n \t\t\t}\n \n \t\t\tcurrentStart = currentStop+1;\n \t\t\tif (currentStart >= lenText) {\n \t\t\t\tfoundEOS = false;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tfoundEOS = sent.find(currentStart);\n \t\t}\n \n \t\tif (!foundAtLeastOneEOS || !EOSAtSentenceEnd) {\n \t\t\tArrayList<String> wrapper = new ArrayList<String>(1);\n \t\t\twrapper.add(text);\n \t\t\treturn wrapper;\n \t\t}\n \t\t\n \t\treturn finalSents;\n \t}", "public void analyzeDocument(String text) {\n\t\tString[] tokens = m_tokenizer.tokenize(text.toLowerCase());\n\t\tfor (int j = 0; j < tokens.length; j++)\n\t\t\ttokens[j] = SnowballStemmingDemo(NormalizationDemo(tokens[j]));\n\t\tHashMap<String, Integer> document_tf = new HashMap<String, Integer>();\n\t\tfor (String token : tokens) {\n\t\t\tif (!document_tf.containsKey(token))\n\t\t\t\tdocument_tf.put(token, 1);\n\t\t\telse\n\t\t\t\tdocument_tf.put(token, document_tf.get(token) + 1);\n\t\t\tif (!df.containsKey(token))\n\t\t\t\tdf.put(token, 1);\n\t\t\telse\n\t\t\t\tdf.put(token, df.get(token) + 1);\n\t\t}\n\t\ttf.add(document_tf);\n\t\t/*\n\t\t * for(String token : document_tf.keySet()) { if(!df.containsKey(token))\n\t\t * df.put(token, 1); else df.put(token, df.get(token) + 1); if(!) }\n\t\t */\n\t\tm_reviews.add(text);\n\t}", "public static void testDictionary() throws IOException {\n String wnhome=\"c:\\\\Users\\\\Katherine\\\\Documents\\\\2nd sem\\\\IR\\\\project\\\\WordNet_3.1\";\n String path = wnhome + File.separator + \"dict\";\n\n\n URL url = new URL(\"file\", null, path);\n\n IDictionary dictionary = new Dictionary(url);\n dictionary.open();\n // /Users/Ward/Downloads\n IIndexWord indexWord = dictionary.getIndexWord(\"use\", POS.VERB);\n\n for (IWordID wordID : indexWord.getWordIDs()) {\n\n IWord word = dictionary.getWord(wordID);\n for (IWord word1 : word.getSynset().getWords()) {\n System.out.println(word1.getLemma());\n }\n// System.out.println(\"Id = \" + wordID);\n// System.out.println(\" Lemma = \" + word.getLemma());\n// System.out.println(\" Gloss = \" + word.getSynset().getGloss());\n\n List<ISynsetID> hypernyms =\n word.getSynset().getRelatedSynsets(Pointer.HYPERNYM);\n // print out each h y p e r n y m s id and synonyms\n List<IWord> words;\n for (ISynsetID sid : hypernyms) {\n words = dictionary.getSynset(sid).getWords();\n System.out.print(sid + \" {\");\n for (Iterator<IWord> i = words.iterator(); i.hasNext(); ) {\n System.out.print(i.next().getLemma());\n if (i.hasNext())\n System.out.print(\", \");\n }\n System.out.println(\"}\");\n }\n }\n }", "public void getNounPhrases(Parse p) {\n if (p.getType().equals(\"NN\") || p.getType().equals(\"NNS\") || p.getType().equals(\"NNP\") \n || p.getType().equals(\"NNPS\")) {\n nounPhrases.add(p.getCoveredText()); //extracting the noun parse\n }\n \n if (p.getType().equals(\"VB\") || p.getType().equals(\"VBP\") || p.getType().equals(\"VBG\")|| \n p.getType().equals(\"VBD\") || p.getType().equals(\"VBN\")) {\n \n verbPhrases.add(p.getCoveredText()); //extracting the verb parse\n }\n \n for (Parse child : p.getChildren()) {\n getNounPhrases(child);\n }\n}", "@Override\r\n protected void parseDocuments()\r\n {\n\r\n }", "public static void main(String[] args) throws Exception\n\t{\n\t\tList<Artifact> docs = Artifact.listByType(Type.Document,false);\n\t\tint counter = 0;\n\t\tfor(Artifact doc : docs)\n\t\t{\n\t\t\t\tMLExample.hibernateSession = HibernateUtil.clearSession(MLExample.hibernateSession);\n\t\t\t\tString doc_path = doc.getAssociatedFilePath();\n//\t\t\t\tList<MLExample> trainExamples = \n//\t\t\t\t\tMLExample.getExamplesInDocument(LinkExampleBuilder.ExperimentGroupTimexEvent, doc_path);\n//\t\t\t\tList<MLExample> trainExamples2 = \n//\t\t\t\t\tMLExample.getExamplesInDocument(LinkExampleBuilder.ExperimentGroupEventEvent, doc_path);\n\n\t\t\t\tList<MLExample> trainExamples3 = \n\t\t\t\t\tMLExample.getExamplesInDocument(SecTimeEventExampleBuilder.ExperimentGroupSecTimeEvent,\n\t\t\t\t\t\t\tdoc_path);\n\t\t\t\t\n\t\t\t\tList<MLExample> all_train_examples = new ArrayList<MLExample>();\n//\t\t\t\tall_train_examples.addAll(trainExamples);\n//\t\t\t\tall_train_examples.addAll(trainExamples2);\n\t\t\t\tall_train_examples.addAll(trainExamples3);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(MLExample example_to_process: all_train_examples)\n\t\t\t\t{\n\t\t\t\t\tNormalizedDependencyFeatures ndf = new NormalizedDependencyFeatures();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tndf.calculateFeatures(example_to_process);\n\n\t\t\t\t\tHibernateUtil.clearLoaderSession();\n\t\t\t\t}\n\t\t\t\tcounter++;\n\t\t\t\tFileUtil.logLine(null, \"Doc processed:\"+counter);\n\t\t//\t\tMLExample example_to_process = MLExample.getInstanceForLink\n\t\t//\t\t(PhraseLink.getInstance(4117), experimentgroup);\n\t\t}\n\t\t\n\t}", "private CText getTaxonomyList(\tfinal String inputText, \n\t\t\t\t\t\t\t\t\tfinal String title, \n\t\t\t\t\t\t\t\t\tboolean breakdown) {\n\t\tCText document = new CText(title);\n\t\t\t\t\n\t\t\t/*\n\t\t\t * Step 2:Extract the N-Grams from the document\n\t\t\t */\n\t\tCNGramsExtractor nGramsExtract = new CNGramsExtractor();\n\t\t\n\t\t//INFO\n\t\tSystem.out.println(\"Last execution\");\n\t\tif( nGramsExtract.extract(document, inputText) ) {\n\t\t\tdocument.setState(CText.E_STATES.NGRAMS);\n\t\t\tSystem.out.println(\"NGram extracted\");\n\t\t\t\n\t\t\t/*\n\t\t\t * Step 3: Extract Composite and semantics \n\t\t\t */\n\t\t\tCTaxonomyExtractor taxonomyExtractor = new CTaxonomyExtractor(_taxonomyConnection, breakdown);\n\t\t\tif( taxonomyExtractor.extract(document) ) {\n\t\t\t\tdocument.setState(CText.E_STATES.TAXONOMY);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn document;\n\t}", "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}", "String getNodeAndWordVec(String nodeId, ArmifiedAttributeValuePair avp,\n String docArmId, NodeVecs ndvecs) throws IOException {\n \n boolean isIntervention = avp.getAttribute().getType()== AttributeType.INTERVENTION;\n \n /*\n if (avp.getAttribute().getId().equals(\"3673298\") && docArmId.startsWith(\"Ellerbeck\"))\n avp = avp;\n */\n \n // Write out the words following the node... which are to\n // be loaded from the PubMed pretrained embeddings \n String textValue =\n isIntervention?\n quantized?\n ((NormalizedAttributeValuePair)((NormalizedAttributeValuePair)avp).getOriginal()).getOriginal().getValue()\n :\n ((NormalizedAttributeValuePair)avp).getOriginal().getValue()\n :\n avp.getValue();\n \n textValue = DataInstanceManager.selectWindowOfWords(avp.getContext(), textValue);\n \n \n // If just a single token, then get a longer context (if the flag to use it is true by the caller)\n String analyzedContext = PaperIndexer.analyze(analyzer, textValue);\n if (useLargerContext && !isIntervention && analyzedContext.split(\" \").length == 1)\n textValue = avp.getContext();\n \n analyzedContext = PaperIndexer.analyze(analyzer, textValue);\n String pseudoWord = avp.getAttribute().getType().getShortString() +\n \":\" + avp.getAttribute().getId() +\n \":\" + docArmId;\n \n WordVec sumvec = new WordVec(wvec_dimension);\n int numWordMatches = 0;\n float[] extractedNumbersFormAnnotations = new float[NUM_ADDITIONAL_DIMENSIONS_FOR_NUMERIC];\n float val = 0;\n int numbersFound = 0;\n \n for (String token: analyzedContext.split(\" \")) {\n \n // First check if this token is a number. If so, we know that its vector\n // won't exist in the PubMed vecs\n try {\n val = Float.parseFloat(token);\n }\n catch (NumberFormatException nex) { val = 0; }\n if (val > 0 && !isIntervention) {\n if (numbersFound < NUM_ADDITIONAL_DIMENSIONS_FOR_NUMERIC)\n extractedNumbersFormAnnotations[numbersFound++] = val;\n continue;\n }\n \n // Next check if the PubMed pre-trained vector for this word exists.\n WordVec wvec = this.wvecs.getVec(token);\n if (wvec == null) { \n // Keep OOV count here...\n oov++;\n continue;\n }\n \n sumvec = WordVec.sum(sumvec, wvec);\n numWordMatches++;\n totalWordsSeen++;\n }\n if (numWordMatches > 0)\n sumvec.scalarMutiply(1/(float)numWordMatches); // take the average vector\n \n WordVec sumvecWithNumbers = appendNumbersToContext(sumvec, pseudoWord, extractedNumbersFormAnnotations);\n WordVec concatenatedVec = constructConcatenatedVec(avp, ndvecs, sumvecWithNumbers);\n \n nodeAndWordVecMap.put(concatenatedVec.getWord(), concatenatedVec);\n \n return pseudoWord; // the key is written in the node sequence i/p file\n }", "public WordNet(String synsets, String hypernyms) {\n if (synsets == null || hypernyms == null) {\n throw new IllegalArgumentException(\"synsets and hypernyms can't be empty\");\n }\n int lineCount = 0;\n In inputFile = new In(synsets);\n while (inputFile.hasNextLine()) {\n String aLine = inputFile.readLine();\n String[] splitArr = aLine.split(\",\");\n int synID = Integer.parseInt(splitArr[0]);\n String[] nounSyn = splitArr[1].split(\" \");\n nouns.put(synID, nounSyn);\n for (String word : nounSyn) {\n LinkedList<Integer> nounList = synsetList.get(word);\n if (nounList == null) {\n nounList = new LinkedList<Integer>();\n }\n nounList.add(synID);\n synsetList.put(word, nounList);\n\n }\n lineCount += 1;\n\n }\n inputFile.close();\n aDigraph = new Digraph(lineCount);\n In hyperInput = new In(hypernyms);\n while (hyperInput.hasNextLine()) {\n String aLine = hyperInput.readLine();\n String[] splitArr = aLine.split(\",\");\n int synID = Integer.parseInt(splitArr[0]);\n for (int i = 1; i < splitArr.length; i++) {\n aDigraph.addEdge(synID, Integer.parseInt(splitArr[i]));\n }\n }\n hyperInput.close();\n shortestCA = new ShortestCommonAncestor(aDigraph);\n\n\n }", "private static Positional_inverted_index posindexCorpus(DocumentCorpus corpus) throws ClassNotFoundException, InstantiationException, IllegalAccessException, FileNotFoundException, IOException {\n\n NewTokenProcessor processor = new NewTokenProcessor();\n Iterable<Document> docs = corpus.getDocuments(); //call registerFileDocumentFactory first?\n\n List<Double> Doc_length = new ArrayList<>();\n Positional_inverted_index index = new Positional_inverted_index();\n\n double token_count = 0;\n\n // Iterate through the documents, and:\n for (Document d : docs) {\n //File f = new File(path + \"\\\\\" + d.getTitle());\n File f = new File(path + \"\\\\\" + d.getFileName().toString());\n double Filesize = f.length();\n //edited by bhavya\n double doc_weight = 0; //first entry in docweights.bin\n double doc_tokens = 0;\n double doc_length = 0;\n HashMap<String, Integer> tftd = new HashMap<>();\n // Tokenize the document's content by constructing an EnglishTokenStream around the document's content.\n Reader reader = d.getContent();\n EnglishTokenStream stream = new EnglishTokenStream(reader); //can access tokens through this stream\n N++;\n // Iterate through the tokens in the document, processing them using a BasicTokenProcessor,\n //\t\tand adding them to the HashSet vocabulary.\n Iterable<String> tokens = stream.getTokens();\n int i = 0;\n\n for (String token : tokens) {\n\n //adding token in index\n List<String> word = new ArrayList<String>();\n word = processor.processToken(token);\n //System.out.println(word.get(0));\n if (word.get(0).matches(\"\")) {\n continue;\n } else {\n\n index.addTerm(word.get(0), i, d.getId());\n\n }\n i = i + 1;\n\n //we check if token already exists in hashmap or not. \n //if it exists, increase its freq by 1 else make a new entry.\n if (tftd.containsKey(word.get(0))) {\n doc_tokens++;\n int count = tftd.get(word.get(0));\n tftd.replace(word.get(0), count + 1);\n } else {\n doc_tokens++;\n// token_count++; //gives total number of tokens.\n tftd.put(word.get(0), 1);\n }\n\n }\n double length = 0;\n double wdt = 0;\n\n double total_tftd = 0;\n for (Map.Entry<String, Integer> entry : tftd.entrySet()) {\n\n wdt = 1 + log(entry.getValue());\n\n length = length + pow(wdt, 2);\n total_tftd = total_tftd + entry.getValue();\n }\n token_count = token_count + doc_tokens;\n doc_weight = pow(length, 0.5);\n double avg_tftd = total_tftd / (double) tftd.size();\n\n Doc_length.add(doc_weight);\n Doc_length.add(avg_tftd);\n Doc_length.add(doc_tokens);\n Doc_length.add(Filesize);\n }\n Doc_length.add(token_count / N);\n\n DiskIndexWriter d = new DiskIndexWriter();\n d.write_doc(path, Doc_length);\n\n return index;\n }", "public List<Document> retrieveQuery( Query aQuery, int TopN ) throws IOException {\n\t\t// NT: you will find our IndexingLucene.Myindexreader provides method: docLength()\n\t\t// implement your retrieval model here, and for each input query, return the topN retrieved documents\n\t\t// sort the documents based on their relevance score, from high to low\n\n\t\tHashMap<Integer, HashMap<String,Integer>> idTokenDocFrequencyMap = new HashMap<>();\t//docid - (token - document frequency) map\n\t\tHashMap<String, Long> tokenColFrequencyMap = new HashMap<>();\t// token - collection frequency map\n\t\tString content = aQuery.GetQueryContent();\n\t\tString[] tokens = content.split(\" \");\n\n\t\tfor(String token : tokens){\n\t\t\ttokenColFrequencyMap.put(token, indexReader.CollectionFreq(token)); \t// update the second map\n\t\t\tint [][]postingList = indexReader.getPostingList(token);\n\t\t\tif(postingList == null) continue;\n\t\t\tfor(int i = 0; i < postingList.length; i++){\n\t\t\t\tint docid = postingList[i][0];\n\t\t\t\tint freq = postingList[i][1];\n\t\t\t\tif(idTokenDocFrequencyMap.containsKey(docid)){\t\t// update the first map\n\t\t\t\t\tidTokenDocFrequencyMap.get(docid).put(token,freq);\n\t\t\t\t}else {\n\t\t\t\t\tHashMap<String,Integer> tokenFrequencyMap = new HashMap<>();\n\t\t\t\t\ttokenFrequencyMap.put(token,freq);\n\t\t\t\t\tidTokenDocFrequencyMap.put(docid,tokenFrequencyMap);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdouble U = 2000.0;\n\t\tList<Document> documentList = new ArrayList<>();\n\t\t// if use a docidList, it will have some duplicates.\n\t\tfor(Map.Entry<Integer, HashMap<String,Integer>> entry : idTokenDocFrequencyMap.entrySet()){\n\t\t\tdouble score = 1.0;\t\t\t// each document have one score\n\t\t\tint docid = entry.getKey();\n\t\t\tint docLen = indexReader.docLength(docid);\t// get document length\n\t\t\tHashMap<String,Integer> tokenDocFrequencyMap = idTokenDocFrequencyMap.get(docid);\n\t\t\tfor(String token : tokens){\t\t// for each token, not the token just exist in the document\n\t\t\t\tlong colFreq = tokenColFrequencyMap.getOrDefault(token,0l);\t// get collection frequency\n\t\t\t\tif(colFreq != 0){\n\t\t\t\t\tint docFreq = 0;\t// if this document don't have token, just set document frequency as 0\n\t\t\t\t\tif(tokenDocFrequencyMap.containsKey(token)){\n\t\t\t\t\t\tdocFreq = tokenDocFrequencyMap.get(token);\n\t\t\t\t\t}\n\t\t\t\t\tscore = score * (docFreq + U * ((double)colFreq / colLen)) / (docLen + U);\t//equation\n\t\t\t\t}\n\t\t\t}\n\t\t\tDocument document = new Document(docid+\"\", indexReader.getDocno(docid),score);\n\t\t\tdocumentList.add(document);\n\t\t}\n\n\t\tCollections.sort(documentList, new Comparator<Document>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Document o1, Document o2) {\n\t\t\t\treturn Double.compare(o2.score(),o1.score());\n\t\t\t}\n\t\t});\n\t\tList<Document> res = new ArrayList<>();\n\t\tfor(int i = 0 ; i < TopN; i++){\n\t\t\tres.add(documentList.get(i));\n\t\t}\n\t\treturn res;\n\t}", "String extractContentFromDocument(BotswanaCourtDocument bcd, String htmlfile,int startpage,int endpage){\n\t\t//dom tree structured in two formats example for 1st format(47-98) USA.1947.002 and for 2nd format(1998.25 - 2013) USA.2000.003\n\t\tDocument document = null;\n\t\tFile input = new File(htmlfile);\n\t\tString textContent = null;\n\t \t\n\t\tif( htmlfile == null ){\n\t\t\tSystem.out.println(\"File name is not valid\");\n\t\t}\n\t\telse{\n\t\t\ttry{\n\t\t\t\tdocument = Jsoup.parse(input,\"UTF-8\");\n\t\t\t\tString htmlText = document.body().toString();\n\t\t\t\tString textToBeExtracted = document.select(\"title\").text();\n\t \tSystem.out.println(\"text extracted =\"+textToBeExtracted);\n\t \t\n\t \t\n\t \tPattern pattern = Pattern.compile(\"\\\\((.*?)\\\\)\");\n\t \tMatcher matcher = pattern.matcher(textToBeExtracted);\n\t \tArrayList<String> matchedDataArray = new ArrayList<String>();\n\t \twhile(matcher.find()){\n\t \t\tmatchedDataArray.add(matcher.group());\n\t \t}\n\t \tif(matchedDataArray.size()>0){\n\t \t\tint firstIndex = textToBeExtracted.indexOf(matchedDataArray.get(matchedDataArray.size()-2)); \n\t\t \tif(firstIndex == -1){\n\t\t \t\tbcd.setParticipantsName(textToBeExtracted);\n\t\t \t}\n\t\t \telse{\n\t\t \t\tbcd.setParticipantsName(textToBeExtracted.substring(0,firstIndex-1));\n\t\t \t}\n\t\t \tbcd.setDecisionDate( matchedDataArray.get(matchedDataArray.size()-1));\n\t\t \tbcd.setCaseId(matchedDataArray.get(matchedDataArray.size()-2));\n\t\t \t\n\t \t}\n\t \telse{\n\t \t\tbcd.setParticipantsName(textToBeExtracted);\n\t \t\tbcd.setDecisionDate(\"\");\n\t\t \tbcd.setCaseId(\"\");\n\t \t}\n\t \t\n//\t \tint indexOfParticipantsEnd = textToBeExtracted.indexOf(\"[\");\n//\t \tString participantsName = textToBeExtracted.substring(0,indexOfParticipantsEnd-1);\n//\t \tbcd.setParticipantsName(participantsName);\n//\t \t\n//\t \tint indexOfDateStart = textToBeExtracted.indexOf(\"(\");\n//\t \tint indexOfDateEnd = textToBeExtracted.indexOf(\")\");\n//\t \tString decideDate = textToBeExtracted.substring(indexOfDateStart+1, indexOfDateEnd-1);\n//\t \tbcd.setDecisionDate(decideDate);\n//\t \t\n//\t \t\n//\t \tString caseIDPatternString = \"SC ([0-9]+/[0-9]+|CRI [0-9]+/[0-9]+)\";\n//\t \tPattern caseidPattern = Pattern.compile(caseIDPatternString);\n//\t \tMatcher caseidMatcher = caseidPattern.matcher(htmlText);\n//\t \t\n//\t \tString caseID =\"\";\n//\t \twhile (caseidMatcher.find()) {\n//\t \t\tcaseID = caseidMatcher.group();\n//\t \t \n//\t \t}\n//\t \tbcd.setCaseId(caseID);\n\t \t\n\t \ttextContent = htmlText;\n\t \t\n\t \t\n\t \t}\n\t \tcatch(Exception e){\n\t \t\tSystem.out.println(\"Error in parsing html : \" + e.getMessage());\n\t \t}\n\t\t}\n\t\treturn textContent;\n\t}", "public Map<String, Object> getIE(String text, FallBackListBased pd) {\n\t\ttext = text.replaceAll(\" � \", \", \");\n\t\ttext = text.replaceAll(\"'s \", \" \");\n\t\ttext = text.replaceAll(\"'s\", \"\");\n\t\ttext = text.replaceAll(\"�s \", \" \");\n\t\ttext = text.replaceAll(\"�s \", \" \");\n\t\ttext = text.replaceAll(\"\\\\?\", \"\");\n\t\ttext = text.replaceAll(\":\", \"\");\n\t\tMap<String, Object> entities_map = new TreeMap<String, Object>();\n\t\tMap<String, Object> extractedEntities = new TreeMap<String, Object>();\n\t\tList<TreeMap<String, String>> entities = new ArrayList<TreeMap<String, String>>();\n\t\tList<TreeMap<String, String>> intents= new ArrayList<TreeMap<String, String>>();\n\t\tSet<String> intentsList=new HashSet<String>();\n\t\tSet<String> entitiesList=new HashSet<String>();\n\t\t\n\t\tString input = text;\n\t\t// text=text.replaceAll(\" \", \" \");\n\t\tSpan spanSentences[] = pd.sentenceDetector.sentPosDetect(input);\n\t\tint sentenceId = 1;\n\t\tTreeMap<String, String> intents_map = new TreeMap<String, String>();\n\t\tDouble entites_highest_cofidence = 0.0;\n\t\tDouble intents_highest_cofidence = 0.0;\n\t\tfor (Span sentence : spanSentences) {\n\t\t\tArrayList<PhraseTemplate> phrases = pd.GetPhrases(sentence\n\t\t\t\t\t.getCoveredText(input).toString(), sentenceId++);\n\t\t\t\n\t\t\tfor (PhraseTemplate svo : phrases) {\n\t\t\t\tString key = svo.phrase;\n\t\t\t\tkey = key.replaceAll(\" is \", \"\");\n\t\t\t\tkey = key.replaceAll(\"What \", \"\");\n\t\t\t\tkey = key.replaceAll(\"what \", \"\");\n\t\t\t\tkey = key.replaceAll(\" the \", \"\");\n\n\t\t\t\tif (key.length() > 1) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString resolvedEntity = lss.resolveEntity(key\n\t\t\t\t\t\t\t\t.toLowerCase().trim().toString(),\n\t\t\t\t\t\t\t\t\"entitesIndex\");\n\t\t\t\t\t\tString tokens[] = resolvedEntity.split(\"__\");\n//\t\t\t\t\t\tSystem.out.println(resolvedEntity+\" :: \"+key);\n\t\t\t\t\t\tif (tokens.length < 2)\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"entity\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim())>0.9)\n\t\t\t\t\t\t\tentitiesList.add(tokens[5].trim());\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"entity\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim()) > entites_highest_cofidence) {\n\t\t\t\t\t\t\tentities_map.clear();\n\t\t\t\t\t\t\tentities_map.put(\"Entity\", key.trim());\n\t\t\t\t\t\t\tentities_map.put(\"MappedEntity\", tokens[4].trim());\n\t\t\t\t\t\t\tentities_map.put(\"EntityConfidenceScore\", tokens[5].trim());\n\t\t\t\t\t\t\tentities_map.put(\"MappedEntityType\", tokens[2].trim());\n\t\t\t\t\t\t\tentites_highest_cofidence = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(tokens[5].trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"intent\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim())>0.9)\n\t\t\t\t\t\t\tintentsList.add(tokens[5].trim());\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"intent\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim()) > intents_highest_cofidence) {\n\t\t\t\t\t\t\tintents_map.clear();\n\t\t\t\t\t\t\tintents_map.put(\"Id\", tokens[0].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Extracted Entity\", key.trim());\n\t\t\t\t\t\t\tintents_map.put(\"Mapped Entity\", tokens[4].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Confidence\", tokens[5].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Class\", tokens[1].trim());\n\t\t\t\t\t\t\tintents_highest_cofidence = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(tokens[5].trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tentities_map.put(\"Intent\", intents_map.get(\"Extracted Entity\"));\n\t\tentities_map.put(\"MappedIntent\", intents_map.get(\"Mapped Entity\"));\n\t\tentities_map.put(\"IntentConfidenceScore\", intents_map.get(\"Confidence\"));\n\n\t\treturn entities_map;\n\t}", "public void makeWord(String inputText,String pageId,createIndex createindex,String contentType)\n {\n int length,i;\n char c;\n boolean linkFound=false;\n int count1,count2,count3,count4,count5,count6,count7,count8,count9;\n\n\n\n StringBuilder word=new StringBuilder();\n // String finalWord=null,stemmedWord=null;\n docId=Integer.parseInt(pageId.trim());\n\n ci=createindex;\n // Stemmer st=new Stemmer();\n //createIndex createindex=new createIndex();\n\n length=inputText.length();\n\n for(i=0;i<length;i++)\n {\n c=inputText.charAt(i);\n if(c<123 && c>96)\n {\n word.append(c);\n }\n\n else if(c=='{')\n {\n if ( i+9 < length && inputText.substring(i+1,i+9).equals(\"{infobox\") )\n {\n\n StringBuilder infoboxString = new StringBuilder();\n\n count1 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n infoboxString.append(c);\n if ( c == '{') {\n count1++;\n }\n else if ( c == '}') {\n count1--;\n }\n if ( count1 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {infoboxString.deleteCharAt(infoboxString.length()-1);}\n break;\n }\n }\n\n processInfobox(infoboxString);\n\n }\n\n else if ( i+8 < length && inputText.substring(i+1,i+8).equals(\"{geobox\") )\n {\n\n StringBuilder geoboxString = new StringBuilder();\n\n count2 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n geoboxString.append(c);\n if ( c == '{') {\n count2++;\n }\n else if ( c == '}') {\n count2--;\n }\n if ( count2 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {geoboxString.deleteCharAt(geoboxString.length()-1);}\n break;\n }\n }\n\n // processGeobox(geoboxString);\n }\n\n else if ( i+6 < length && inputText.substring(i+1,i+6).equals(\"{cite\") )\n {\n\n /*\n * Citations are to be removed.\n */\n\n count3 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '{') {\n count3++;\n }\n else if ( c == '}') {\n count3--;\n }\n if ( count3 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n else if ( i+4 < length && inputText.substring(i+1,i+4).equals(\"{gr\") )\n {\n\n /*\n * {{GR .. to be removed\n */\n\n count4 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '{') {\n count4++;\n }\n else if ( c == '}') {\n count4--;\n }\n if ( count4 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n else if ( i+7 < length && inputText.substring(i+1,i+7).equals(\"{coord\") )\n {\n\n /**\n * Coords to be removed\n */\n\n count5 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n\n if ( c == '{') {\n count5++;\n }\n else if ( c == '}') {\n count5--;\n }\n if ( count5 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n //System.out.println(\"process infobox\");\n }\n else if(c=='[')\n {\n // System.out.println(\"process square brace\");\n\n if ( i+11 < length && inputText.substring(i+1,i+11).equalsIgnoreCase(\"[category:\"))\n {\n\n StringBuilder categoryString = new StringBuilder();\n\n count6 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n categoryString.append(c);\n if ( c == '[') {\n count6++;\n }\n else if ( c == ']') {\n count6--;\n }\n if ( count6 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {categoryString.deleteCharAt(categoryString.length()-1);}\n break;\n }\n }\n\n // System.out.println(\"category string=\"+categoryString.toString());\n processCategories(categoryString);\n\n }\n else if ( i+8 < length && inputText.substring(i+1,i+8).equalsIgnoreCase(\"[image:\") ) {\n\n /**\n * Images to be removed\n */\n\n count7 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '[') {\n count7++;\n }\n else if ( c == ']') {\n count7--;\n }\n if ( count7 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n else if ( i+7 < length && inputText.substring(i+1,i+7).equalsIgnoreCase(\"[file:\") ) {\n\n /**\n * File to be removed\n */\n\n count8 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n\n if ( c == '[') {\n count8++;\n }\n else if ( c == ']') {\n count8--;\n }\n if ( count8 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n }\n else if(c=='<')\n {\n //System.out.println(\"Process < >\");\n\n if ( i+4 < length && inputText.substring(i+1,i+4).equalsIgnoreCase(\"!--\") ) {\n\n /**\n * Comments to be removed\n */\n\n int locationClose = inputText.indexOf(\"-->\" , i+1);\n if ( locationClose == -1 || locationClose+2 > length ) {\n i = length-1;\n }\n else {\n i = locationClose+2;\n }\n\n }\n else if ( i+5 < length && inputText.substring(i+1,i+5).equalsIgnoreCase(\"ref>\") ) {\n\n /**\n * References to be removed\n */\n int locationClose = inputText.indexOf(\"</ref>\" , i+1);\n if ( locationClose == -1 || locationClose+5 > length ) {\n i = length-1;\n }\n else {\n i = locationClose+5;\n }\n\n }\n else if ( i+8 < length && inputText.substring(i+1,i+8).equalsIgnoreCase(\"gallery\") ) {\n\n /**\n * Gallery to be removed\n */\n int locationClose = inputText.indexOf(\"</gallery>\" , i+1);\n if ( locationClose == -1 || locationClose+9 > length) {\n i = length-1;\n }\n else {\n i = locationClose+9;\n }\n }\n\n }\n else if ( c == '=' && i+1 < length && inputText.charAt(i+1) == '=')\n {\n\n linkFound = false;\n i+=2;\n while ( i < length && ((c = inputText.charAt(i)) == ' ' || (c = inputText.charAt(i)) == '\\t') )\n {\n i++;\n }\n\n if ( i+14 < length && inputText.substring(i , i+14 ).equals(\"external links\") )\n {\n //System.out.println(\"External link found\");\n linkFound = true;\n i+= 14;\n }\n\n }\n else if ( c == '*' && linkFound == true )\n {\n\n //System.out.println(\"Link found\");\n count9 = 0;\n boolean spaceParsed = false;\n StringBuilder link = new StringBuilder();\n while ( count9 != 2 && i < length )\n {\n c = inputText.charAt(i);\n if ( c == '[' || c == ']' )\n {\n count9++;\n }\n if ( count9 == 1 && spaceParsed == true)\n {\n link.append(c);\n }\n else if ( count9 != 0 && spaceParsed == false && c == ' ')\n {\n spaceParsed = true;\n }\n i++;\n }\n\n StringBuilder linkWord = new StringBuilder();\n for ( int j = 0 ; j < link.length() ; j++ )\n {\n char currentCharTemp = link.charAt(j);\n if ( (int)currentCharTemp >= 'a' && (int)currentCharTemp <= 'z' )\n {\n linkWord.append(currentCharTemp);\n }\n else\n {\n\n // System.out.println(\"link : \" + linkWord.toString());\n processLink(linkWord);\n linkWord.setLength(0);\n }\n }\n if ( linkWord.length() > 1 )\n {\n //System.out.println(\"link : \" + linkWord.toString());\n processLink(linkWord);\n linkWord.setLength(0);\n }\n\n }\n else\n {\n if(word.length()>1)\n filterAndAddWord(word,contentType);\n\n word.setLength(0);\n }\n }\n\n\n if(word.length()>1)\n filterAndAddWord(word,contentType);\n\n word.setLength(0);\n /*\n if(word.length()>0)\n {\n finalWord=new String(word);\n if(!(checkStopword(finalWord)))\n {\n st.add(finalWord.toCharArray(),finalWord.length());\n stemmedWord=st.stem();\n\n createindex.addToTreeSet(stemmedWord,docId);\n\n }\n\n word.delete(0, word.length());\n } */\n\n }", "public static void readDatafiles() throws FileNotFoundException {\n int docNumber = 0;\n\n while(docNumber<totaldocument) { // loop will run until all 0 - 55 speech data is read\n String tempBuffer = \"\";\n\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/speech_\"+docNumber+\".txt\"));\n sc_obj.nextLine(); //skip the first line of every document\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n tempBuffer = tempBuffer.replaceAll(\"[^a-zA-Z]+\",\" \");\n\n String[] wordTerm = tempBuffer.split(\" |//.\"); // the read data will convert into single word from whole stream of characters\n // it will split according to white spaces . - , like special characters\n\n for (int i=0; i < wordTerm.length; i++) {\n\n String term = wordTerm[i].toLowerCase();\t\t//each splitted word will be converted into lower case\n term = RemoveSpecialCharacter(term);\t\t\t// it will remove all the characters apart from the english letters\n term = removeStopWords(term);\t\t\t\t\t// it will remove the stopWords and final version of the term in the form of tokens will form\n\n if(!term.equalsIgnoreCase(\"\") && term.length()>1) {\n term = Lemmatize(term);\t\t\t\t\t//all the words in the form of tokens will be lemmatized\n //increment frequency of word if it is already present in dictionary\n if(dictionary.containsKey(term)) {\t\t//all the lemmatized words will be placed in HashMap dictionary\n List<Integer> presentList = dictionary.get(term);\n int wordFrequency = presentList.get(docNumber);\n wordFrequency++;\n presentList.set(docNumber, wordFrequency);\t\t//frequency of all the lemmatized words in dictionary is maintained \t\t\t\t\t\t\t\t\t//i.e: Word <2.0,1.0,3.0,0.0 ...> here hashmap<String,List<Double> is used\n }\t\t\t\t\t\t\t\t\t\t//the 0th index shows the word appared 2 times in doc 0 and 1 times in doc 1 and so forth..\n else { // if word was not in the dictionary then it will be added\n // if word was found in 5 doc so from 0 to 4 index representing doc 0 to doc 4 (0.0) will be placed\n List<Integer>newList = new ArrayList<>();\n for(int j=0; j<57; j++) {\n if(j != docNumber)\n newList.add(0);\n else\n newList.add(1);\n }\n dictionary.put(term, newList);\n }\n }\n }\n\n }\n docNumber++;\n }\n }", "public static void runExample() {\n\t\tString wnhome = \"C:\\\\bdaduy\\\\Software\\\\Wordnet3.1\\\\WordNet-3.0\";\n\t\tString path = wnhome + File.separator + \"dict\";\n\t\tURL url = null;\n\t\ttry {\n\t\t\turl = new URL(\"file\", null, path);\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (url == null)\n\t\t\treturn;\n\n\t\t// construct the dictionary object and open it\n\t\tIDictionary dict = new Dictionary(url);\n\t\ttry {\n\t\t\tdict.open();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// look up first sense of the word \"dog\"\n\t\tWordnetStemmer s=new WordnetStemmer(dict);\n\t\tList<String> stems=s.findStems(\"food\", POS.NOUN);\n\t\tDebug.print(stems);\n\t\tIIndexWord idxWord = dict.getIndexWord(\"food\", POS.NOUN);\n\t\tIWordID wordID = idxWord.getWordIDs().get(0);\n\t\tIWord word = dict.getWord(wordID);\n\t\tSystem.out.println(\"Id = \" + wordID);\n\t\tSystem.out.println(\"Lemma = \" + word.getLemma());\n\t\tSystem.out.println(\"Gloss = \" + word.getSynset().getGloss());\n\t\tSystem.out.println(\"test = \" + word.getSynset().getLexicalFile());\n\n\n\t}", "public String StemWordWithWordNet ( String word )\n {\n if ( !IsInitialized )\n return word;\n if ( word == null ) return null;\n if ( morph == null ) morph = dic.getMorphologicalProcessor();\n\n IndexWord w;\n try\n {\n w = morph.lookupBaseForm( POS.VERB, word );\n if ( w != null )\n return w.getLemma().toString ();\n w = morph.lookupBaseForm( POS.NOUN, word );\n if ( w != null )\n return w.getLemma().toString();\n w = morph.lookupBaseForm( POS.ADJECTIVE, word );\n if ( w != null )\n return w.getLemma().toString();\n w = morph.lookupBaseForm( POS.ADVERB, word );\n if ( w != null )\n return w.getLemma().toString();\n }\n catch ( JWNLException e )\n {\n }\n return null;\n }", "private Node estimateRelevance(Node original) throws Exception {\n Node combineNode = new Node(\"combine\", new NodeParameters(), original.getInternalNodes(), original.getPosition());\n\n // Only get as many as we need\n Parameters localParameters = retrieval.getGlobalParameters().clone();\n int fbDocs = (int) retrieval.getGlobalParameters().get(\"fbDocs\", 10);\n localParameters.set(\"requested\", fbDocs);\n\n // transform and run\n Node transformedCombineNode = retrieval.transformQuery(combineNode, localParameters);\n List<ScoredDocument> initialResults = retrieval.executeQuery(transformedCombineNode, localParameters).scoredDocuments;\n \n // Gather content\n ArrayList<String> names = new ArrayList<String>();\n for (ScoredDocument sd : initialResults) {\n names.add(sd.documentName);\n }\n List<Document> docs = getDocuments(names);\n\n // Now the maps from the different information sources\n // Each of these is a term -> field -> score double-mapping\n HashMap<String, TObjectDoubleHashMap<String>> uCFSs = null;\n double ucfw = p.get(\"ucfw\", 1.0);\n if (ucfw != 0.0) {\n uCFSs = getUnigramCollFieldScores();\n }\n\n HashMap<String, TObjectDoubleHashMap<String>> bCFSs = null;\n double bcfw = p.get(\"bcfw\", 1.0);\n if (bcfw != 0.0) {\n bCFSs = getBigramCollFieldScores();\n }\n\n HashMap<String, TObjectDoubleHashMap<String>> uPRFSs = null;\n double uprfw = p.get(\"uprfw\", 1.0);\n if (uprfw != 0.0) {\n uPRFSs = getUnigramPRFScores(docs);\n }\n\n HashMap<String, TObjectDoubleHashMap<String>> bPRFSs = null;\n double bprfw = p.get(\"bprfw\", 1.0);\n if (bprfw != 0.0) {\n bPRFSs = getBigramPRFScores(docs);\n }\n\n // We can now construct term-field weights using our supplied lambdas\n // and scores\n Node termNodes = new Node(\"combine\", new NodeParameters(), new ArrayList<Node>(), 0);\n termNodes.getNodeParameters().set(\"norm\", false);\n TObjectDoubleHashMap<String> weights = new TObjectDoubleHashMap<String>();\n for (String term : queryTerms) {\n weights.clear();\n for (String field : fields) {\n double sum = 0.0;\n if (uCFSs != null) {\n sum += (ucfw * uCFSs.get(term).get(field));\n }\n\n if (bCFSs != null) {\n TObjectDoubleHashMap<String> termMap = bCFSs.get(term);\n if (termMap != null) {\n sum += (bcfw * termMap.get(field));\n }\n }\n\n if (uPRFSs != null) {\n sum += (uprfw * uPRFSs.get(term).get(field));\n }\n\n if (bPRFSs != null) {\n TObjectDoubleHashMap<String> termMap = bPRFSs.get(term);\n if (termMap != null) {\n sum += (bprfw * termMap.get(field));\n }\n }\n weights.put(field, sum);\n }\n termNodes.addChild(createTermFieldNodes(term, weights));\n }\n return termNodes;\n }", "public ArrayList<Publication> parseXML(){\n ArrayList<Publication> publications = new ArrayList<Publication>();\n try {\n System.out.println(\"Starting parse xml\");\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n Document document = builder.parse(new File(\"dblp_abstract_dataset.xml\"));\n document.getDocumentElement().normalize();\n NodeList nodeList = document.getDocumentElement().getChildNodes();\n parseChannelNodes(nodeList,publications);\n System.out.println(\"publications count: \"+publications.size());\n }catch (ParserConfigurationException ex){\n ex.printStackTrace();\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return publications;\n }", "public void process (String text) {\n\t\tProperties props = new Properties();\n\t\tprops.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner, parse, dcoref\");\n\t\tStanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\t\tAnnotation document = new Annotation(text);\n\t\tpipeline.annotate(document);\n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\tfor(CoreMap sentence: sentences) {\n\t\t\tsgs.add(sentence.get(CollapsedCCProcessedDependenciesAnnotation.class));\n\t\t}\n\t\tccg = document.get(CorefChainAnnotation.class);\n\t}", "public WordNet(String synsets, String hypernyms)\n {\n if (synsets==null || hypernyms==null) throw new IllegalArgumentException();\n h=new TreeMap<>();\n In i1=new In(synsets);\n int i=0;\n h2=new ArrayList<>();\n while(!i1.isEmpty())\n {\n String[] temp=i1.readLine().split(\",\");\n String[] temp2=temp[1].trim().split(\"\\\\s+\");\n String t=\"\";\n for (String s:temp2)\n {\n if (h.containsKey(s))\n {\n h.get(s).add(i);\n }\n else\n {\n ArrayList<Integer> a=new ArrayList<>();\n a.add(i);\n h.put(s,a);\n }\n\n t=t+s+\" \";\n }\n h2.add(t);\n i++;\n }\n\n g=new Digraph(i);\n In i2=new In(hypernyms);\n while (!i2.isEmpty())\n {\n String[] temp=i2.readLine().split(\",\");\n int j=Integer.parseInt(temp[0].trim());\n for (int k=1;k<temp.length;k++)\n g.addEdge(j, Integer.parseInt(temp[k].trim()));\n }\n\n sap=new SAP(g);\n\n //All the below lines check for Illegal Arguments\n DirectedCycle obj=new DirectedCycle(g);\n boolean b=obj.hasCycle();\n if (b) throw new IllegalArgumentException();\n\n int numberOfRoots=0;\n for (int j=0;j<g.V() && numberOfRoots < 2;j++)\n if (g.outdegree(j)==0) numberOfRoots++;\n\n //System.out.println(\"The number of roots is \"+numberOfRoots);\n if (numberOfRoots!=1) throw new IllegalArgumentException();\n }", "@Override\n\tpublic List<ClusteredMention> runCoreference(Document doc) {\n\t\t//(variables)\n\t\t//Put all in one hash, then build at the end....\n\t\tMap<Mention,Mention> corefs = new HashMap<Mention,Mention>();\n\t\t//if mention isnt in corefs, add it as a singleton cluster\n\t\t//Otherwise markcoref, and add to clusters\n\t\t\n\t\tMap<String,Mention> stringMatches = new HashMap<String,Mention>();\n\t\t//Map of string to mention...\n\t\t\n\t\t//Map<Mention,Entity> pronounClusters = new HashMap<Mention,Entity>();\n\t\tboolean clustered;\n\t\t//Evaluate all non pronoun mentions\n\t\tfor(Mention m : doc.getMentions()){\n\t\t\tclustered = false;\n\t\t\t//(...get its text)\n\t\t\tString mentionString = m.gloss();\n\t\t\t//If its not a pronoun\n\t\t\tif (!checkPronoun(m.headWord(),m.headToken())) {\n\t\t\t\t//(...if we've seen this text before...)\n\t\t\t\tif(stringMatches.containsKey(mentionString)){\n\t\t\t\t\t//Mark coreferent\n\t\t\t\t\tcorefs.put(m,stringMatches.get(mentionString));\n\t\t\t\t\tclustered=true;\n\t\t\t\t} else {\n\t\t\t\t\t//try to find a head word match to m's head word\n\t\t\t\t\t//(for each previous mention...)\n\t\t\t\t\tfor (int i=doc.indexOfMention(m)-1; i>=0 && !clustered;i--) {\n\t\t\t\t\t\tMention h = doc.getMentions().get(i);\n\t\t\t\t\t\tString otherMention = h.gloss();\n\t\t\t\t\t\t//If head words are identical, or head words are coreferent\n\t\t\t\t\t\tif (m.headWord().equalsIgnoreCase(h.headWord()) || \n\t\t\t\t\t\t\t\t(coreferentHeads.containsKey(m.headWord()) && \n\t\t\t\t\t\t\t\t\t\tcoreferentHeads.get(m.headWord()).contains(h.headWord()))) {\n\t\t\t\t\t\t\t//Mark as coreferent\n\t\t\t\t\t\t\tstringMatches.put(mentionString, m);\n\t\t\t\t\t\t\tcorefs.put(m,stringMatches.get(otherMention));\n\t\t\t\t\t\t\tclustered=true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!clustered){\n\t\t\t\t\t//(...else create a new singleton cluster)\n\t\t\t\t\tstringMatches.put(mentionString, m);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(Mention m : doc.getMentions()){\n\t\t\t//If it is a pronoun of interest\n\t\t\tif (checkPronoun(m.headWord(),m.headToken())) {\n\t\t\t\tMention hco = hobbsCoreferent(m);\n\t\t\t\tif (hco!=null && !hco.equals(m)){\n\t\t\t\t\tString hcoString = hco.gloss();\n\t\t\t\t\t//System.out.printf(\"Found coreference %s\\n\", hcoString);\n\t\t\t\t\tif (stringMatches.containsKey(hcoString)){\n\t\t\t\t\t\t//mentions.add(m.markCoreferent(stringClusters.get(hcoString)));\n\t\t\t\t\t\tcorefs.put(m,stringMatches.get(hcoString));\n\t\t\t\t\t} else{\n\t\t\t\t\t\t//Add as coreferent\n\t\t\t\t\t\tcorefs.put(m, hco);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\n\t\t//Build list of mentions\n\t\tList<ClusteredMention> cMentions = new ArrayList<ClusteredMention>();\n\t\tMap<Mention,ClusteredMention> clusters = new HashMap<Mention,ClusteredMention>();\n\t\tList<Mention> mentions = new ArrayList<Mention>(doc.getMentions());\n\t\twhile (!mentions.isEmpty()){\n\t\t\tMention m = mentions.get(0);\n\t\t\tif (corefs.containsKey(m) && corefs.get(m)!=null){\n\t\t\t\tMention h = corefs.get(m);\n\t\t\t\tif(!clusters.containsKey(h)) {\n\t\t\t\t\tint hIndex = mentions.indexOf(h);\n\t\t\t\t\tmentions.set(0, h);\n\t\t\t\t\tmentions.set(hIndex,m);\n\t\t\t\t\tif (hIndex > 0){\n\t\t\t\t\t\tClusteredMention newCluster = h.markSingleton();\n\t\t\t\t\t\tcMentions.add(newCluster);\n\t\t\t\t\t\tmentions.remove(hIndex);\n\t\t\t\t\t\tclusters.put(h,newCluster);\n\t\t\t\t\t\tcMentions.add(m.markCoreferent(clusters.get(h)));\n\t\t\t\t\t\tmentions.remove(0);\n\t\t\t\t\t\tclusters.put(m,clusters.get(h));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\tcMentions.add(m.markCoreferent(clusters.get(h)));\n\t\t\t\tmentions.remove(0);\n\t\t\t\tclusters.put(m,clusters.get(h));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tClusteredMention newCluster = m.markSingleton();\n\t\t\t\tcMentions.add(newCluster);\n\t\t\t\tmentions.remove(0);\n\t\t\t\tclusters.put(m,newCluster);\n\t\t\t}\n\t\t}\n\t\treturn cMentions;\n\t}", "@SuppressWarnings(\"unchecked\")\r\npublic static void ruleResolvePronouns(AnnotationSet basenp, Document doc)\r\n{\n Annotation[] basenpArray = basenp.toArray();\r\n\r\n // Initialize coreference clusters\r\n int maxID = basenpArray.length;\r\n\r\n // Create an array of pointers\r\n // clust = new UnionFind(maxID);\r\n fvm = new RuleResolvers.FeatureVectorMap();\r\n ptrs = new int[maxID];\r\n clusters = new HashSet[maxID];\r\n for (int i = 0; i < clusters.length; i++) {\r\n ptrs[i] = i;\r\n HashSet<Annotation> cluster = new HashSet<Annotation>();\r\n cluster.add(basenpArray[i]);\r\n clusters[i] = cluster;\r\n }\r\n Annotation zero = new Annotation(-1, -1, -1, \"zero\");\r\n\r\n for (int i = 1; i < basenpArray.length; i++) {\r\n Annotation np2 = basenpArray[i];\r\n if (FeatureUtils.isPronoun(np2, doc)) {\r\n Annotation ant = ruleResolvePronoun(basenpArray, i, doc);\r\n if (ant != null) {\r\n np2.setProperty(Property.PRO_ANTES, ant);\r\n }\r\n else {\r\n np2.setProperty(Property.PRO_ANTES, zero);\r\n }\r\n }\r\n }\r\n}", "public Ngram_Type(JCas jcas, Type casType) {\n super(jcas, casType);\n casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());\n\n \n casFeat_n = jcas.getRequiredFeatureDE(casType, \"n\", \"uima.cas.Integer\", featOkTst);\n casFeatCode_n = (null == casFeat_n) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_n).getCode();\n\n \n casFeat_tokens = jcas.getRequiredFeatureDE(casType, \"tokens\", \"uima.cas.FSList\", featOkTst);\n casFeatCode_tokens = (null == casFeat_tokens) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_tokens).getCode();\n\n \n casFeat_rawText = jcas.getRequiredFeatureDE(casType, \"rawText\", \"uima.cas.String\", featOkTst);\n casFeatCode_rawText = (null == casFeat_rawText) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_rawText).getCode();\n\n \n casFeat_sentimentScore = jcas.getRequiredFeatureDE(casType, \"sentimentScore\", \"uima.cas.FloatList\", featOkTst);\n casFeatCode_sentimentScore = (null == casFeat_sentimentScore) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_sentimentScore).getCode();\n\n \n casFeat_negationScore = jcas.getRequiredFeatureDE(casType, \"negationScore\", \"uima.cas.FloatList\", featOkTst);\n casFeatCode_negationScore = (null == casFeat_negationScore) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_negationScore).getCode();\n\n \n casFeat_amplificationScore = jcas.getRequiredFeatureDE(casType, \"amplificationScore\", \"uima.cas.FloatList\", featOkTst);\n casFeatCode_amplificationScore = (null == casFeat_amplificationScore) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_amplificationScore).getCode();\n\n }", "protected void assembleDocument() {\n\n // Create the missive\n this.createMissive();\n }", "public Collection<ConceptLabel> processSentence(Sentence sentence, List messages) {\n\t\t// long time = System.currentTimeMillis();\n\t\t// search in lexicon\n\t\tList<Concept> keys = lookupConcepts(sentence);\n\t\t\t\n\t\t// filter out overlapping numbers\n\t\tfilterNumbers(keys);\n\t\tfilterOverlap(keys);\t\t\t\n\t\t\n\t\t// take out concepts that overlap with new concepts\n\t\tList<ReportConcept> reparsedConcepts = new ArrayList<ReportConcept>();\n\t\tfor (ReportConcept c : concepts) {\n\t\t\t// if existing concept intersects this sentence\n\t\t\tif (intersects(c,sentence.getSpan())) {\n\t\t\t\treparsedConcepts.add(c);\n\t\t\t}\n\t\t}\n\n\t\t// take out concepts that will be reparsed anyway\n\t\tconcepts.removeAll(reparsedConcepts);\n\n\t\t// process phrase\n\t\tList<ConceptLabel> labels = new ArrayList<ConceptLabel>();\n\n\t\tfor (Concept concept : keys) {\n\t\t\t// create new labels\n\t\t\tCollection<ConceptLabel> lbl = createConceptLabels(concept,sentence.getCharOffset());\n\t\t\tlabels.addAll(lbl);\n\n\t\t\t// get entry or create it\n\t\t\tReportConcept entry = createReportConcept(concept);\n\t\t\tentry.addLabels(lbl);\n\n\t\t\t// add to all concepts\n\t\t\tconcepts.add(entry);\n\t\t\t// negatedConcepts.remove(entry);\n\n\t\t\t// process numbers\n\t\t\tfor (ConceptLabel l : lbl)\n\t\t\t\tprocessNumericValues(entry, l);\n\t\t}\n\n\t\t// take care of negation\n\t\tnegex.clear();\n\t\tnegex.process(sentence, keys);\n\t\tlabels.addAll(processNegation(negex, messages));\n\n\t\t// backup concepts so that concepts that were merged outside of parsed\n\t\t// sentence could be removed after processing\n\t\tList<ReportConcept> backup = new ArrayList<ReportConcept>(concepts);\n\t\tbackup.removeAll(reparsedConcepts);\n\t\t\n\t\t// compact concepts to more specific constructs\n\t\tprocessConcepts(concepts);\n\t\n\t\t// at this point we can potentially have a situation where\n\t\t// one concept from this sentence subsumed another from the previous or next \n\t\t// sentence\n\t\tfor(ReportConcept c: backup){\n\t\t\tif(!concepts.contains(c))\n\t\t\t\tremovedConcepts.add(c);\n\t\t}\n\t\t\n\t\t// remove dangling digits and units, cause they are likely to be junk\n\t\tremoveDanglingAttributes();\t\t\n\t\t\n\t\t// now that we may have reparsed some concepts, lets\n\t\t// see if we can retain some of the old data\n\t\tfor (ReportConcept rc : reparsedConcepts) {\n\t\t\t// reparsed concept is in the list, then retain its data, if not\n\t\t\t// then it should be removed\n\t\t\tReportConcept nc = TextHelper.get(concepts, rc);\n\t\t\tif (nc != null) {\n\t\t\t\tnc.setConceptEntry(rc.getConceptEntry());\n\t\t\t} else {\n\t\t\t\tremovedConcepts.add(rc);\n\t\t\t}\n\t\t}\n\n\t\t// negate concepts and proces numbers\n\t\tfor (ReportConcept e : negatedConcepts) {\n\t\t\tReportConcept n = TextHelper.get(concepts, e);\n\t\t\tif (n != null) {\n\t\t\t\tn.setNegation(e.getNegation());\n\t\t\t}\n\t\t}\n\n\t\t// clear negation\n\t\tnegatedConcepts.clear();\n\n\t\t// do eggs\n\t\tEggs.processText(sentence.getOriginalString());\n\t\n\t\t// sync to interface\n\t\tsync();\n\t\t\n\t\treturn labels;\n\t}", "public List<Section> processDocument(String path) throws FileNotFoundException {\n\t\tList<Section> finalSections = new ArrayList<Section>();\r\n\t\t// Load file to process...\r\n\t\tInputStream input = new FileInputStream(\r\n\t\t\t\tpath.replace(\"\\\\\", \"/\").substring(1, path.replace(\"\\\\\", \"/\").length() - 1));\r\n\t\tFile file = new File(path);\r\n\t\ttry {\r\n\t\t\t// Use PdfBox library to load PDF Stream with their geometric descriptors...\r\n\t\t\tPDDocument doc = PDDocument.load(input);\r\n\t\t\tDocument resultDoc = new Document();\r\n\t\t\t// Create maps to hold fonts used in the processed document .\r\n\t\t\tfinal Map<Object, Integer> fonts = new HashMap<Object, Integer>();\r\n\t\t\tfinal Map<Integer, Font> idToFont = new HashMap<Integer, Font>();\r\n\t\t\t// If the document have multiple pages, manages the segmentation page by page...\r\n\t\t\tfor (int i = 0; i < doc.getNumberOfPages(); i++) {\r\n\t\t\t\tPDPage page = (PDPage) doc.getDocumentCatalog().getAllPages().get(i);\r\n\t\t\t\t// Set up pdf page object.\r\n\t\t\t\tPage pdfPage = new Page();\r\n\t\t\t\tpdfPage.setPageRotation(page.findRotation());\r\n\t\t\t\tpdfPage.setPageWidth(page.findMediaBox().getWidth());\r\n\t\t\t\tpdfPage.setPageHeight(page.findMediaBox().getHeight());\r\n\t\t\t\tpdfPage.setOffsetUpperRightX(\r\n\t\t\t\t\t\tpage.findMediaBox().getUpperRightX() - page.findCropBox().getUpperRightX());\r\n\t\t\t\tpdfPage.setOffsetUpperRightY(\r\n\t\t\t\t\t\tpage.findMediaBox().getUpperRightY() - page.findCropBox().getUpperRightY());\r\n\t\t\t\tpdfPage.setNumber(i);\r\n\t\t\t\t// Extracting textual content of each page.\r\n\t\t\t\tPDStream contents = page.getContents();\r\n\t\t\t\tif (contents != null) {\r\n\t\t\t\t\tif (true) {\r\n\t\t\t\t\t\tTextExtractor extractor = new TextExtractor(pdfPage, idToFont, fonts);\r\n\t\t\t\t\t\textractor.processStream(page, page.findResources(), contents.getStream());\r\n\t\t\t\t\t\tpdfPage.setLines(extractor.getLines());\r\n\t\t\t\t\t\textractor.getTextMatrix();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Add pages decorated by geometric descriptors to the doc to segment ...\r\n\t\t\t\tresultDoc.getPages().add(pdfPage);\r\n\t\t\t\tfor (Entry<Integer, Font> e : idToFont.entrySet()) {\r\n\t\t\t\t\tresultDoc.getFonts().add(e.getValue());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Process extracting document Sections...\r\n\t\t\tPdfBlockExtractor pdfExtractor = new PdfBlockExtractor();\r\n\t\t\tList<Block> extractedBlocks = pdfExtractor.extractBlocks(resultDoc,\r\n\t\t\t\t\tpath.split(File.separator + File.separator)[1]);\r\n\r\n\t\t\t// Generating final result....\r\n\t\t\tgenerateFinalSegmentationResults(finalSections, extractedBlocks);\r\n\r\n\t\t\tdoc.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn finalSections;\r\n\t}", "public static Annotation ruleResolvePronoun(Annotation[] basenps, int num, Document doc)\r\n{\n Annotation np2 = basenps[num];\r\n // Get some properties of the np\r\n FeatureUtils.PRTypeEnum type2 = Pronoun.getValue(np2, doc);\r\n String str2 = doc.getAnnotString(np2);\r\n boolean reflexive = FeatureUtils.isReflexive(str2);\r\n // Get the possible antecedents\r\n ArrayList<Annotation> antes = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums = new ArrayList<Integer>();\r\n if (DEBUG) {\r\n System.err.println(\"Pronoun: \" + doc.getAnnotText(np2));\r\n }\r\n if (FeatureUtils.getPronounPerson(str2) == PersonPronounTypeEnum.FIRST) {\r\n if (NumberEnum.SINGLE.equals(Number.getValue(np2, doc)))\r\n return ruleResolvePronounI(np2, basenps, num, doc);\r\n else\r\n return ruleResolvePronounWe(np2, basenps, num, doc);\r\n }\r\n if (FeatureUtils.getPronounPerson(str2) == PersonPronounTypeEnum.SECOND)\r\n return ruleResolvePronounYou(np2, basenps, num, doc);\r\n else {\r\n int sentnum = 0;\r\n for (int i = num - 1; i >= 0 && sentnum <= 3; i--) {\r\n Annotation np1 = basenps[i];\r\n sentnum = sentNum(np1, np2, doc);\r\n if (DEBUG) {\r\n System.err.println(\"Possible antecedent: \" + i + \" :\" + doc.getAnnotText(np1));\r\n }\r\n if (!isNumberIncompatible(np1, np2, doc) && !isGenderIncompatible(np1, np2, doc)\r\n && !isAnimacyIncompatible(np1, np2, doc) && isWNClassComp(np1, np2, doc) && isProComp(np1, np2, doc)\r\n && !Embedded.getValue(np1, doc) && isSyntax(np1, np2, doc)) {\r\n if (DEBUG) {\r\n System.err.println(\"Candidate antecedent: \" + i + \" :\" + doc.getAnnotText(np1));\r\n }\r\n antes.add(0, np1);\r\n nums.add(0, i);\r\n }\r\n }\r\n }\r\n if (antes.size() == 0) return null;\r\n // Check for reflexsives\r\n if (FeatureUtils.isReflexive(doc.getAnnotText(np2))) {\r\n union(nums.get(nums.size() - 1).intValue(), num);\r\n return antes.get(antes.size() - 1);\r\n }\r\n if (antes.size() == 1) {\r\n // Rule 1: Unique in discourse\r\n if (DEBUG) {\r\n System.err.println(\"Rule 1 match!!!\");\r\n }\r\n union(nums.get(0).intValue(), num);\r\n return antes.get(0);\r\n }\r\n // Rule 2: Reflexive -- the last possible antecedent\r\n if (reflexive) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 2 match!!!\");\r\n }\r\n union(nums.get(nums.size() - 1).intValue(), num);\r\n return antes.get(antes.size() - 1);\r\n }\r\n // Rule 3: Unique current + Prior\r\n ArrayList<Annotation> antes1 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums1 = new ArrayList<Integer>();\r\n int counter = 0;\r\n for (Annotation np1 : antes) {\r\n if (sentNum(np1, np2, doc) < 2) {\r\n antes1.add(np1);\r\n nums1.add(nums.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (antes1.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 3 match!!!\");\r\n }\r\n union(nums1.get(0).intValue(), num);\r\n return antes1.get(0);\r\n }\r\n // Rule 4: Possesive Pro\r\n\r\n if (FeatureUtils.isPossesive(str2) && antes1.size() > 0) {\r\n Integer found = null;\r\n Annotation ant = null;\r\n boolean multiple = false;\r\n for (int i = 0; i < antes1.size() && !multiple; i++) {\r\n Annotation np1 = antes1.get(i);\r\n if (doc.getAnnotText(np1).equalsIgnoreCase(str2) && sentNum(np1, np2, doc) == 1) {\r\n if (found == null) {\r\n found = nums1.get(i);\r\n ant = antes1.get(i);\r\n }\r\n else {\r\n multiple = true;\r\n }\r\n }\r\n }\r\n if (!multiple && found != null) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 4 match!!!\");\r\n }\r\n union(found.intValue(), num);\r\n return ant;\r\n }\r\n }\r\n // Rule #5: Unique in the current sentence\r\n ArrayList<Annotation> antes2 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums2 = new ArrayList<Integer>();\r\n counter = 0;\r\n for (Annotation np1 : antes1) {\r\n if (sentNum(np1, np2, doc) < 1) {\r\n antes2.add(np1);\r\n nums2.add(nums1.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (antes2.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 5 match!!!\");\r\n }\r\n union(nums2.get(0).intValue(), num);\r\n return antes2.get(0);\r\n }\r\n // Extra Rule: Unique in the current clause (or parent clauses\r\n AnnotationSet parse = doc.getAnnotationSet(Constants.PARSE);\r\n Annotation clause = SyntaxUtils.getClause(np2, parse);\r\n while (clause != null) {\r\n ArrayList<Annotation> antes3 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums3 = new ArrayList<Integer>();\r\n counter = 0;\r\n for (Annotation np1 : antes2) {\r\n if (clause.covers(np1)) {\r\n antes3.add(np1);\r\n nums3.add(nums2.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (DEBUG) {\r\n System.err.println(antes3.size() + \" antecedents in the clause\");\r\n }\r\n if (antes3.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Clause rule match!!!\");\r\n }\r\n union(nums3.get(0).intValue(), num);\r\n return antes3.get(0);\r\n }\r\n clause = SyntaxUtils.getParentClause(clause, parse);\r\n }\r\n\r\n // Rule #6: Unique Subject\r\n\r\n // //Look for the subject in the current sentence\r\n // boolean unique = true;\r\n // Annotation subject = null;\r\n // Integer subjectNum = null;\r\n // for(int i=antes.size()-1; i>=0; i--){\r\n // Annotation np1 = antes.get(i);\r\n // if(sentNum(np1, np2, annotations, text)==0){\r\n // if(FeatureUtils.getGramRole(np1, annotations, text).equals(\"SUBJECT\")){\r\n // //&&SyntaxUtils.isMainClause(np1, parse)){\r\n // if(DEBUG)\r\n // System.err.println(\"Rule 6 match!!!\");\r\n // if(subjectNum!=null)\r\n // unique=false;\r\n // subjectNum = nums.get(i);\r\n // subject = antes.get(i);\r\n // }\r\n // }\r\n // }\r\n\r\n // if(subject!=null&&unique){\r\n // union(subjectNum.intValue(), num);\r\n // return subject;\r\n // }\r\n\r\n // Look for the subject in the previous sentence\r\n boolean unique = true;\r\n Annotation subject = null;\r\n Integer subjectNum = null;\r\n if (GramRole.getValue(np2, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np2, parse)){\r\n for (int i = antes.size() - 1; i >= 0; i--) {\r\n Annotation np1 = antes.get(i);\r\n if (sentNum(np1, np2, doc) == 1) {\r\n if (GramRole.getValue(np1, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np1, parse)){\r\n if (DEBUG) {\r\n System.err.println(\"Rule 6 match!!!\");\r\n }\r\n if (subjectNum != null) {\r\n unique = false;\r\n }\r\n subjectNum = nums.get(i);\r\n subject = antes.get(i);\r\n }\r\n }\r\n }\r\n }\r\n if (subject != null && unique) {\r\n union(subjectNum.intValue(), num);\r\n return subject;\r\n }\r\n subjectNum = null;\r\n subject = null;\r\n\r\n // One more Rule -- assign possessive pronouns to the last subject\r\n if (type2.equals(FeatureUtils.PRTypeEnum.POSSESSIVE)) {\r\n for (int i = antes.size() - 1; i >= 0; i--) {\r\n Annotation np1 = antes.get(i);\r\n if (sentNum(np1, np2, doc) == 0) {\r\n if (GramRole.getValue(np1, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np1, parse)){\r\n if (DEBUG) {\r\n System.err.println(\"Rule 6a match!!!\");\r\n }\r\n if (subject == null) {\r\n subjectNum = nums.get(i);\r\n subject = antes.get(i);\r\n }\r\n }\r\n }\r\n }\r\n if (subject != null) {\r\n union(subjectNum.intValue(), num);\r\n return subject;\r\n }\r\n }\r\n\r\n return null;\r\n}", "private ArrayList<Ngram> getNgramsFromFile(String content) {\n if (this.removeStopwordsByTagging) {\n return this.getNgramsFromFileRemovingStopwordsByTagging(content);\n } else {\n return this.getNgramsFromFileWithStopwordsListOnly(content);\n }\n }", "public String[] prepareText(String text) {\n\n Properties props = new Properties();\n\n props.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner\");\n StanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\n //apply\n Annotation document = new Annotation(text);\n pipeline.annotate(document);\n\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n ArrayList<String> result = new ArrayList<>();\n\n for (CoreMap sentence : sentences) {\n\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n // this is the text of the token\n String word = token.get(CoreAnnotations.LemmaAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(PartOfSpeechAnnotation.class);\n // this is the NER label of the token\n String ne = token.get(CoreAnnotations.NamedEntityTagAnnotation.class);\n\n if (!StringUtils.isStopWord(word)) {\n result.add(word);\n }\n\n }\n\n }\n String[] result_ar = new String[result.size()];\n\n return result.toArray(result_ar);\n }", "public VSM(String[] docs) {\n\t\tmyDocs = docs;\n\t\ttermList = new ArrayList<String>();\n\t\tdocLists = new ArrayList<ArrayList<Doc>>();\n\t\tArrayList<Doc> docList;\n\t\t// parse the documents to construct the index and collect the raw\n\t\t// frequencies.\n\t\tfor (int i = 0; i < myDocs.length; i++) {\n\t\t\tString[] tokens = myDocs[i].split(\" \");\n\t\t\tString token;\n\t\t\tfor (int j = 0; j < tokens.length; j++) {\n\t\t\t\ttoken = tokens[j];\n\t\t\t\tif (!termList.contains(token)) {\n\t\t\t\t\ttermList.add(token);\n\t\t\t\t\tdocList = new ArrayList<Doc>();\n\t\t\t\t\tDoc doc = new Doc(i, 1); // initial raw frequency is 1\n\t\t\t\t\tdocList.add(doc);\n\t\t\t\t\tdocLists.add(docList);\n\t\t\t\t} else {\n\t\t\t\t\tint index = termList.indexOf(token);\n\t\t\t\t\tdocList = docLists.get(index);\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tboolean match = false;\n\n\t\t\t\t\t// search the postings list for a document id, if match,\n\t\t\t\t\t// insert a new position number to the document id\n\t\t\t\t\tfor (Doc doc : docList) {\n\t\t\t\t\t\tif (doc.docId == i) {\n\t\t\t\t\t\t\tdoc.tw++; // increase word count\n\t\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tk++;\n\t\t\t\t\t}\n\t\t\t\t\t// if no match, add a new document id along with the\n\t\t\t\t\t// position number\n\t\t\t\t\tif (!match) {\n\t\t\t\t\t\tDoc doc = new Doc(i, 1);\n\t\t\t\t\t\tdocList.add(doc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//\n\t\t}// end with parsing\n\n\t\t// compute the tf-idf term weights and the doc lengths\n\t\tint N = myDocs.length;\n\t\tdocLength = new double[N];\n\t\tfor (int i = 0; i < termList.size(); i++) {\n\t\t\tdocList = docLists.get(i);\n\t\t\tint df = docList.size();\n\t\t\tDoc doc;\n\t\t\tfor (int j = 0; j < docList.size(); j++) {\n\t\t\t\tdoc = docList.get(j);\n\t\t\t\tdouble tfidf = (1 + Math.log(doc.tw))\n\t\t\t\t\t\t* Math.log(N / (df * 1.0));\n\t\t\t\tdocLength[doc.docId] += Math.pow(tfidf, 2);\n\t\t\t\tdoc.tw = tfidf;\n\t\t\t\tdocList.set(j, doc);\n\t\t\t}\n\t\t}\n\t\t// update the length\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tdocLength[i] = Math.sqrt(docLength[i]);\n\t\t}\n\n\t}", "public CGrammar getGrammarStructure();", "private void buildLanguageModel() {\n int total = 0;\n Map<Integer, Integer> wordCount = new HashMap<>();\n for (List<Integer> story : corpus.getStories()) {\n for (Integer word : story) {\n total++;\n if (wordCount.get(word) == null) wordCount.put(word, 0);\n wordCount.put(word, wordCount.get(word) + 1);\n }\n }\n wordValues = new HashMap<>();\n for (Map.Entry<Integer, Integer> entry : wordCount.entrySet()) {\n wordValues.put(entry.getKey(), total * 1.0 / entry.getValue());\n }\n }", "public void processCas(CAS cas) {\n\n FSIndex<AnnotationFS> sentenceAnnotations = cas.getAnnotationIndex(mSentenceType);\n\n for (AnnotationFS sentence : sentenceAnnotations) {\n process(cas, sentence);\n }\n }", "private void doBayesianClassification() {\n\t\tList<MutualInformation> mutualInformationList = new ArrayList<MutualInformation>();\r\n\t\tint k = 5;\r\n\t\tSystem.out.println(\"k = \" + k);\r\n\t\tdouble N = fileNames.size();\r\n\t\t\r\n\t\tList<Set<String>> classifiedDocsList = new ArrayList<Set<String>>();\r\n\t\tclassifiedDocsList.add(setOfHamiltonDocs);\r\n\t\tclassifiedDocsList.add(setOfMadisonDocs);\r\n\t\tclassifiedDocsList.add(setOfJayDocs);\r\n\t\t\r\n\t\tfor (String term : corpusVocab) {\r\n\r\n\t\t\t// All docs containing this term\r\n\t\t\tSet<String> matchingDocs = new HashSet<String>();\r\n\t\t\t\r\n\t\t\tfor (PositionalPosting posting : pInvertedIndex.getPostings(term)) {\r\n\t\t\t\tmatchingDocs.add(fileNames.get(posting.getDocumentId()));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// iterate through all classes (Hamilton, Madison, Jay)\r\n\t\t\tfor (int i = 0; i < classifiedDocsList.size(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tSet<String> classifiedDocs = classifiedDocsList.get(i);\r\n\t\t\t\t\r\n\t\t\t\tSet<String> intersection = new HashSet<String>(matchingDocs);\r\n\t\t\t\tintersection.retainAll(classifiedDocs);\r\n\t\t\t\tdouble N11 = intersection.size();\r\n\t\t\t\t\r\n\t\t\t\tSet<String> difference = new HashSet<String>(matchingDocs);\r\n\t\t\t\tdifference.removeAll(classifiedDocs);\r\n\t\t\t\tdouble N10 = difference.size();\r\n\t\t\t\t\r\n\t\t\t\tdouble N01 = classifiedDocs.size() - N11;\r\n\t\t\t\tdouble N00 = fileNames.size() - classifiedDocs.size() - N10;\r\n\r\n\t\t\t\t// Calculate I(t,c)\r\n\t\t\t\tdouble Itc = (N11 / N) * log2((N * N11) / ((N11 + N10) * (N11 + N01)))\r\n\t\t\t\t\t\t+ (N01 / N) * log2((N * N01) / ((N01 + N00) * (N11 + N01)))\r\n\t\t\t\t\t\t+ (N10 / N) * log2((N * N10) / ((N11 + N10) * (N10 + N00)))\r\n\t\t\t\t\t\t+ (N00 / N) * log2((N * N00) / ((N01 + N00) * (N10 + N00)));\r\n\t\t\t\tif (!Double.isNaN(Itc)) {\r\n\t\t\t\t\tmutualInformationList.add(new MutualInformation(term, Itc));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Build Discriminating Set of vocab terms by sorting mutual information\r\n\t\t// list and keep the first k values\r\n\t\tSet<String> terms = new HashSet<String>();\r\n\t\tCollections.sort(mutualInformationList, Collections.reverseOrder());\r\n\t\tfor (int i = 0; i < k; i++) {\r\n\t\t\tterms.add(mutualInformationList.get(i).getTerm());\r\n\t\t}\r\n\t\t\r\n\t\t// get term counts in classified (trainer) docs\t\t\r\n\t\tint[] classifiedDocsTermFreq = new int[classifiedDocsList.size()];\r\n\t\t\r\n\t\tclassifiedDocsTermFreq[0] = getTermFreq(hamiltonDocs, terms);\r\n\t\tclassifiedDocsTermFreq[1] = getTermFreq(madisonDocs, terms);\r\n\t\tclassifiedDocsTermFreq[2] = getTermFreq(jayDocs, terms);\r\n\t\t\r\n\t\t// Calculate p(t|c)\r\n\t\t// maps term to list of p(t|c) for each class\r\n\t\tMap<String, List<Double>> ptc = new HashMap<String, List<Double>>();\r\n\t\t\r\n\t\tfor (String term : terms) {\r\n\t\t\tptc.put(term, new ArrayList<Double>());\r\n\t\t\tfor (int i = 0; i < classifiedDocsList.size(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tint ftc = 0;\r\n\t\t\t\tfor (PositionalPosting posting : pInvertedIndex.getPostings(term)) {\r\n\t\t\t\t\tif (classifiedDocsList.get(i).contains(fileNames.get(posting.getDocumentId()))) {\r\n\t\t\t\t\t\tftc += posting.getPositions().size();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tptc.get(term).add((double) (ftc + 1) / (double) (classifiedDocsTermFreq[i] + terms.size()));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// visit each unclassified document\r\n\t\ttry {\r\n\t\t\tPath currentWorkingPath = Paths.get(toBeClassified).toAbsolutePath();\r\n\t\t\t// This is our standard \"walk through all .txt files\" code.\r\n\t\t\tFiles.walkFileTree(currentWorkingPath, new SimpleFileVisitor<Path>() {\r\n\r\n\t\t\t\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\r\n\t\t\t\t\t// make sure we only process the current working directory\r\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpublic FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {\r\n\r\n\t\t\t\t\tif (file.toString().endsWith(\".txt\")) {\r\n\r\n\t\t\t\t\t\tTokenStream tokenStream = null;\r\n\t\t\t\t\t\t// terms in this document\r\n\t\t\t\t\t\tSet<String> docTerms = new HashSet<String>();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\ttokenStream = Utils.getTokenStreams(file.toFile());\r\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\twhile (tokenStream.hasNextToken()) {\r\n\t\t\t\t\t\t\tString token = Utils.processWord(tokenStream.nextToken().trim(), false);\r\n\t\t\t\t\t\t\tdocTerms.add(token);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// only keep terms in discriminating set\r\n\t\t\t\t\t\tdocTerms.retainAll(terms);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// calculate log(p(c) + sum(log(p(ti|c))) for each class\r\n\t\t\t\t\t\tdouble[] pce = new double[classifiedDocsList.size()];\r\n\t\t\t\t\t\tfor (int i = 0; i < classifiedDocsList.size(); i++) {\r\n\t\t\t\t\t\t\tdouble sum = 0;\r\n\t\t\t\t\t\t\tfor (String term : docTerms) {\r\n\t\t\t\t\t\t\t\tsum += Math.log(ptc.get(term).get(i));\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\tpce[i] = Math.log(classifiedDocsTermFreq[i] / terms.size()) + sum;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (pce[0] > pce[1] && pce[0] > pce[2]) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Document : \" + file.getFileName().toString() + \" : belongs to Hamilton\");\r\n\t\t\t\t\t\t} else if (pce[1] > pce[0] && pce[1] > pce[2]) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Document : \" + file.getFileName().toString() + \" : belongs to Madison\");\r\n\t\t\t\t\t\t} else if (pce[2] > pce[0] && pce[2] > pce[1]) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Document : \" + file.getFileName().toString() + \" : belongs to Jay\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"I don't know whom document : \" + file.getFileName().toString() + \" : belongs to.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// don't throw exceptions if files are locked/other errors occur\r\n\t\t\t\tpublic FileVisitResult visitFileFailed(Path file, IOException e) {\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void start(){\n mngr.getStpWds();\n mngr.getDocuments();\n mngr.calculateWeights();\n mngr.getInvertedIndex();\n mngr.getClusters();\n mngr.getCategories();\n mngr.getUserProfiles();\n mngr.makeDocTermMatrix();\n\n }", "void process(Document document, Repository repository) throws Exception;", "@Override\r\n\tboolean parseDoc(String content, int documentID, int invertedIndexTableID) {\r\n\t\tDocumentInfo docInfo = new DocumentInfo();\r\n\t\tdocInfo.docID = documentID;\r\n\r\n\t\tString wordList[] = content.trim().split(\"\\\\s+\");\r\n\t\t\r\n\t\tArrayList<String> nGramMaker = new ArrayList<String>();\r\n\t\tStringBuilder ngramMaker = new StringBuilder();\r\n\t\t\r\n\t\tint ngramCheckIndex = 0;\r\n\t\tint ngramChecker = 0;\r\n\t\tfor (int i = 0; i < wordList.length; i++) {\r\n\t\t\tint postFixChecker = wordList[i].length();\r\n\t\t\tString word = deletePostFix(wordList[i]);\r\n\t\t\tif (word.length() != postFixChecker) {\r\n\t\t\t\t\r\n\t\t\t\tngramChecker++;\r\n\t\t\t\tngramMaker.append(word);\r\n\t\t\t\tnGramMaker.add(word);\r\n\t\t\t\t\r\n\t\t\t\tif(ngramChecker != this.nGramSetting){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tngramChecker--;\r\n\t\t\t\tif(ngramCheckIndex != 0){\r\n\t\t\t\t\tngramMaker.replace(0, ngramCheckIndex, \"\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\taddHash(docInfo, ngramMaker.toString());\r\n\t\t\t\tngramCheckIndex = nGramMaker.get(0).length();\r\n\t\t\t\tnGramMaker.remove(0);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn DBManager.getInstance().insertBulkToHashTable(docInfo, invertedIndexTableID);\r\n\t\t\r\n\t}", "public Map<String, String> partsOfSpeech(String input) {\n Map<String, String> output = new HashMap();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n document.get(CoreAnnotations.TokensAnnotation.class).stream().forEach((token) -> {\n // this is the text of the token\n String word = token.get(CoreAnnotations.TextAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n output.put(word, pos);\n });\n\n return output;\n }", "public void parseThesaurus() throws IOException {\r\n\t\t\t//We create an object below to read the thesaurus file\r\n\t\t\tFileInputStream fis = new FileInputStream(\"src//ie//gmit//dip//resources//MobyThesaurus3.txt\");\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(fis));\r\n\t\t\t List <List<String>> listOflist= new ArrayList<>();\r\n\t\t\t// HashMap<String,List> tMap = new HashMap<>();\t\t\r\n\t\t\t List <String> individualListOfSynonyms= new ArrayList <String>();\r\n\r\n\t\t\t \r\n\t\t\t //we create a hashmap with the first word being the key value and the rest a list of synonims we will use\r\n\t\t\twhile(br.readLine()!=null) {\r\n\t\t\t\t\r\n\t\t\t\tString somestring = br.readLine();\r\n\t\t\t\tString[] testsplit= somestring.split(\",\");\r\n\t\t\t\tindividualListOfSynonyms=Arrays.asList(testsplit);\r\n\t\t\t\tString indexvalue=individualListOfSynonyms.get(0).toString();\r\n\t\t\t tMap.put(indexvalue, individualListOfSynonyms);\r\n\t\t\t //br.close();\r\n\t\t\t //System.out.println(tMap);\r\n\t\t\t }\r\n\t\t\t}", "public String extractRelevantSentences(String paragraph, Collection<String> terms, boolean lemmatised, int maxSentenceLength) {\n String result = \"\";\n boolean checkSentenceLength = (maxSentenceLength != -1);\n\n // Create an empty Annotation just with the given text\n document = new Annotation(paragraph);\n // Run Annotators on this text\n pipeline.annotate(document);\n\n // Use map to track sentences so that a sentence is not returned twice\n sentences = new HashMap();\n int key = 0;\n for (CoreMap coreMap : document.get(CoreAnnotations.SentencesAnnotation.class)) {\n String string = coreMap.toString();\n if (checkSentenceLength)// if checking sentences, skip is sentence is long\n if (StringOps.getWordLength(string) > maxSentenceLength)\n continue;\n sentences.put(key, coreMap.toString());\n key++;\n }\n\n Set keySet = sentences.keySet();\n Set<Integer> returnedSet = new HashSet();\n Iterator keyIterator = keySet.iterator();\n // These are all the sentences in this document\n while (keyIterator.hasNext()) {\n int id = (int) keyIterator.next();\n String content = sentences.get(id);\n // This is the current sentence\n String thisSentence = content;\n // Select sentence if it contains any of the terms and is not already returned\n for (String t : terms) {\n if (!returnedSet.contains(id)) { // ensure sentence not already used\n String label = StringOps.stemSentence(t, true);\n if (StringUtils.contains(StringOps.stemSentence(thisSentence, false), label)\n || StringUtils.contains(StringOps.stemSentence(StringOps.stripAllParentheses(thisSentence), false), label)) { // lookup stemmed strings\n result = result + \" \" + thisSentence.trim(); // Concatenate new sentence\n returnedSet.add(id);\n }\n }\n }\n }\n\n if (lemmatised && null != result) {\n result = lemmatise(result);\n }\n\n return result;\n }", "public void analyzequery(JSONObject json) {\n\t\ttry {\n\t\t\t\n\t\t\tJSONArray jarray = json.getJSONArray(\"Reviews\");\n\t\t\t\n\t\t\tfor (int i = 0; i < jarray.length(); i++) {\n\t\t\t\t\n\t\t\t\tPost review = new Post(jarray.getJSONObject(i));\n\t\t\t\tSystem.out.println(\"55\");\n\t\t\t\tString content = review.getContent();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tHashMap<String, Integer> querytf = new HashMap<String, Integer>();\n\n\t\t\t\tHashSet<String> biminiset = new HashSet<String>();\n\n\t\t\t\tArrayList uniquery = new ArrayList();\n\n\t\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif (token.isEmpty())\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tuniquery.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t\t}\n\n\t\t\t\tfor (int k = 0; k < uniquery.size(); k++) {\n\n\t\t\t\t\tif (querytf.containsKey(uniquery.get(i).toString())) {\n\t\t\t\t\t\tquerytf.put(uniquery.get(i).toString(),\n\t\t\t\t\t\t\t\tquerytf.get(uniquery.get(i).toString()) + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tquerytf.put(uniquery.get(i).toString(), 1);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tN_gram.add(token);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tString[] fine = new String[N_gram.size()];\n\n\t\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tfor (String str2 : fine) {\n\n\t\t\t\t\tif (querytf.containsKey(str2)) {\n\t\t\t\t\t\tquerytf.put(str2, querytf.get(str2) + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tquerytf.put(str2, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (String key : querytf.keySet()) {\n\t\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\t\tdouble tf = querytf.get(key);\n\n\t\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\t\tquery_idf.put(key, result);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tquery_idf.put(key, 0.0);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t}", "static TreeSet<Noun> parseNouns(Scanner data, int declension){\n\t\tassert(declension != Values.INDEX_ENDINGS_DECLENSION_THIRD && declension != Values.INDEX_ENDINGS_DECLENSION_THIRD_I_N && declension != Values.INDEX_ENDINGS_DECLENSION_THIRD_I_N); //there's a separate function for these guys.\n\t\tArrayList<String[]> raw = parseDataToArray(data);\n\t\tTreeSet<Noun> output = new TreeSet<Noun>();\n\n\t\tfor(String[] current : raw){ //iterate over each line from the original file.\n\n\t\t\tif(current.length != Values.NOUN_DATA_ARRAY_LENGTH_CORRECT){\n\t\t\t\tSystem.err.println(\"Error parsing a line.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//System.out.println(\"Raw: \" + Arrays.toString(current));\n\n\t\t\t//current[] contains a split based on tabs. Generally {chapter, nom/gen/gender, definition}.\n\n\t\t\tint chapter = 0;\n\t\t\tString nominative = null;\n\t\t\tString genitive = null;\n\t\t\tchar gender = '-';\n\t\t\tArrayList<String> definitions = new ArrayList<String>();\n\n\t\t\t//Values.betterStringArrayPrint(current);\n\n\t\t\ttry{ //try to read a noun, assuming that the chapter IS specified\n\t\t\t\tchapter = Integer.parseInt(current[0]);\n\t\t\t\tnominative = current[1].split(\", \")[0];\n\t\t\t\tgenitive = current[1].split(\", \")[1];\n\t\t\t\tgender = current[1].split(\", \")[2].charAt(0);\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(NumberFormatException e){ //can happen if a chapter isn't specified. Read the noun from a null chapter.\n\t\t\t\tchapter = Values.CHAPTER_VOID;\n\t\t\t\tnominative = current[1].split(\", \")[0];\n\t\t\t\tgenitive = current[1].split(\", \")[1];\n\t\t\t\tgender = current[1].split(\", \")[2].charAt(0);\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(Exception e){\n\t\t\t\tSystem.err.println(\"Could not read a line!\");\n\t\t\t\tcontinue; //We can't make a noun out of the botrked line.\n\t\t\t}\n\t\t\tint genderIndex = Values.getGenderIndex(gender);\n\t\t\ttrimAll(definitions);\n\t\t\tNoun currentNoun = new Noun(nominative, genitive, chapter, genderIndex, declension, definitions);\n\t\t\tSystem.out.println(\"Added: \" + currentNoun);\n\t\t\toutput.add(currentNoun);\n\t\t}\n\n\t\treturn output;\n\t}", "public Document readDocument();", "public WordNet(String synsetFilename, String hyponymFilename) {\n In synsets = new In(synsetFilename);\n In hyponyms = new In(hyponymFilename);\n int count = 0;\n while (synsets.hasNextLine()) {\n String line = synsets.readLine();\n String[] linesplit = line.split(\",\");\n String[] wordsplit = linesplit[1].split(\" \");\n Set<String> synset = new HashSet<String>();\n Set<Integer> wordIndexes = new HashSet<Integer>();\n for (int i = 0; i < wordsplit.length; i += 1) {\n synset.add(wordsplit[i]);\n if (wnetsi.containsKey(wordsplit[i])) {\n wordIndexes = wnetsi.get(wordsplit[i]);\n wordIndexes.add(Integer.parseInt(linesplit[0]));\n wnetsi.put(wordsplit[i], wordIndexes);\n } else {\n wordIndexes.add(Integer.parseInt(linesplit[0]));\n wnetsi.put(wordsplit[i], wordIndexes);\n }\n }\n wnetis.put(Integer.parseInt(linesplit[0]), synset);\n count += 1;\n }\n \n \n \n String[] allVerts = hyponyms.readAllLines();\n g = new Digraph(count);\n for (int i = 0; i < allVerts.length; i += 1) {\n String[] linesplit = allVerts[i].split(\",\");\n for (int j = 0; j < linesplit.length; j += 1) {\n g.addEdge(Integer.parseInt(linesplit[0]), Integer.parseInt(linesplit[j]));\n }\n }\n \n }", "private static void extractCoNLL(ArrayList<ResolveGroup> groups) {\n\t\tCoNLLDocument d = new CoNLLDocument(\"train_gold_conll\");\n\t\tparts.addAll(d.getParts());\n\t\tint i = d.getParts().size();\n\t\tfor (CoNLLPart part : parts) {\n\t\t\textractGroups(part);\n\t\t\tSystem.out.println(i--);\n\t\t}\n\t}", "static Content getLigandContent (List<Ligand> ligands) throws Exception {\n if (true || ligands.size() == 1) {\n Ligand ligand = ligands.iterator().next();\n \n List<Keyword> breadcrumb = new ArrayList<Keyword>();\n for (Keyword kw : ligand.synonyms) {\n if (kw.label.equals(WHO_ATC)\n // don't include the leaf node\n && kw.term.length() < 7) {\n breadcrumb.add(kw);\n }\n }\n \n if (!breadcrumb.isEmpty()) {\n Collections.sort(breadcrumb, new Comparator<Keyword>() {\n public int compare (Keyword kw1, Keyword kw2) {\n return kw1.term.compareTo(kw2.term);\n }\n });\n for (Keyword kw : breadcrumb) {\n try {\n Keyword atc = getATC (kw);\n if (atc != null) {\n kw.term = atc.term;\n kw.href = atc.href;\n }\n }\n catch (Exception ex) {\n Logger.error(\"Can't retreive ATC \"+kw.term, ex);\n ex.printStackTrace();\n }\n }\n }\n \n List<LigandActivity> acts = new ArrayList<LigandActivity>();\n for (XRef ref : ligand.getLinks()) {\n if (ref.kind.equals(Target.class.getName())) {\n acts.add(new LigandActivity (ref));\n }\n }\n \n return ix.idg.views.html\n .liganddetails.render(ligand, acts, breadcrumb);\n }\n else {\n TextIndexer indexer = _textIndexer.createEmptyInstance();\n for (Ligand lig : ligands)\n indexer.add(lig);\n \n TextIndexer.SearchResult result = SearchFactory.search\n (indexer, Ligand.class, null, indexer.size(), 0, FACET_DIM,\n request().queryString());\n if (result.count() < ligands.size()) {\n ligands.clear();\n for (int i = 0; i < result.count(); ++i) {\n ligands.add((Ligand)result.getMatches().get(i));\n }\n }\n TextIndexer.Facet[] facets = filter\n (result.getFacets(), LIGAND_FACETS);\n indexer.shutdown();\n \n return ix.idg.views.html.ligands.render\n (1, result.count(), result.count(),\n new int[0], decorate (facets), ligands);\n }\n }", "public Stemmer ()\n {\n AllWords = new HashMap<String,String>();\n dictionary = Dictionary.getInstance();\n p = PointerUtils.getInstance();\n\n try\n {\n // JWNL.initialize(new FileInputStream(\"file_properties.xml\"));\n JWNLConnecter.initializeJWNL();\n dic = Dictionary.getInstance();\n morph = dic.getMorphologicalProcessor();\n // ((AbstractCachingDictionary)dic).\n //\tsetCacheCapacity (10000);\n IsInitialized = true;\n }\n catch (Exception e){\n System.err.println(e.getMessage());\n }\n /*catch ( FileNotFoundException e )\n {\n System.out.println ( \"Error initializing Stemmer: JWNLproperties.xml not found\" );\n }\n catch ( JWNLException e )\n {\n System.out.println ( \"Error initializing Stemmer: \"\n + e.toString() );\n }*/\n\n }", "void computeHTMLFeatures() throws Exception{\n\t\tcountTagStatistics();\n\t\thtmlGlobalTagStatistics();\n\t\ttagInHeadStatistics();\n\t\thtmlStatisticsDiv();\n\t\thtmlStaticsticsParagraphs();\n\t\thtmlKeyWords();\n\t\tnormalizeData();\n\t}" ]
[ "0.58878475", "0.56439185", "0.56227577", "0.55646574", "0.5496911", "0.5492575", "0.54729885", "0.54580325", "0.5456363", "0.5438005", "0.5433442", "0.5398272", "0.5395945", "0.539273", "0.5359939", "0.5359641", "0.53288", "0.5312437", "0.52981895", "0.5273751", "0.52379096", "0.522705", "0.5203778", "0.5158749", "0.5154902", "0.51445365", "0.51440203", "0.51403326", "0.5136783", "0.5122756", "0.51207745", "0.5106479", "0.50994384", "0.50792485", "0.5077628", "0.505043", "0.50383466", "0.5031966", "0.5029943", "0.50205404", "0.49836147", "0.49823973", "0.49726638", "0.49718773", "0.49622262", "0.4960714", "0.4954147", "0.4938866", "0.49338737", "0.49267274", "0.49210444", "0.49035892", "0.49006644", "0.4900119", "0.48874334", "0.48873582", "0.48835552", "0.48829857", "0.48671967", "0.48669925", "0.48658222", "0.4859379", "0.48459578", "0.48368564", "0.4836716", "0.481388", "0.48084873", "0.4806622", "0.48035592", "0.4801356", "0.48001787", "0.47974327", "0.4793958", "0.4776219", "0.47650594", "0.4745818", "0.47432944", "0.47420484", "0.4741243", "0.47378483", "0.47283533", "0.47093642", "0.47040564", "0.47015008", "0.47001263", "0.46848866", "0.46719298", "0.46629035", "0.46587119", "0.46548346", "0.46450847", "0.46424738", "0.46282434", "0.46275556", "0.46213087", "0.46190915", "0.46153584", "0.46145976", "0.46134588", "0.4609253", "0.46020246" ]
0.0
-1
Extract the semantic components of a document using NLP algorithm to extract semantic NGrams, WordNet hypernyms and dbpedia entries.
public void execute(final String inputText, final String title, CTopicsMap topicsMap) { if(inputText == null) { throw new IllegalArgumentException("Cannot extract semantics data from an undefined document"); } CText document = getTaxonomyList(inputText, title, false); if( document.getState() == CText.E_STATES.TAXONOMY) { CTopicsExtractor topicsExtractor = new CTopicsExtractor(); if( topicsExtractor.extract(document, topicsMap, _textIndex) ) { document.setState(CText.E_STATES.TOPICS); topicsMap.addSentences(document.getSentences()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void process(JCas aJCas) throws AnalysisEngineProcessException {\n\t\tString text = aJCas.getDocumentText();\n\n\t\t// create an empty Annotation just with the given text\n\t\tAnnotation document = new Annotation(text);\n//\t\tAnnotation document = new Annotation(\"Barack Obama was born in Hawaii. He is the president. Obama was elected in 2008.\");\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document); \n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\t HelperDataStructures hds = new HelperDataStructures();\n\n\t\t\n\t\t//SPnew language-specific settings:\n\t\t//SPnew subject tags of the parser\n\t\t HashSet<String> subjTag = new HashSet<String>(); \n\t\t HashSet<String> dirObjTag = new HashSet<String>(); \n\t\t //subordinate conjunction tags\n\t\t HashSet<String> compTag = new HashSet<String>(); \n\t\t //pronoun tags\n\t\t HashSet<String> pronTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> passSubjTag = new HashSet<String>();\n\t\t HashSet<String> apposTag = new HashSet<String>(); \n\t\t HashSet<String> verbComplementTag = new HashSet<String>(); \n\t\t HashSet<String> infVerbTag = new HashSet<String>(); \n\t\t HashSet<String> relclauseTag = new HashSet<String>(); \n\t\t HashSet<String> aclauseTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> compLemma = new HashSet<String>(); \n\t\t HashSet<String> coordLemma = new HashSet<String>(); \n\t\t HashSet<String> directQuoteIntro = new HashSet<String>(); \n\t\t HashSet<String> indirectQuoteIntroChunkValue = new HashSet<String>();\n\t\t \n//\t\t HashSet<String> finiteVerbTag = new HashSet<String>();\n\t\t \n\n\t\t //OPEN ISSUES PROBLEMS:\n\t\t //the subject - verb relation finding does not account for several specific cases: \n\t\t //opinion verbs with passive subjects as opinion holder are not accounted for,\n\t\t //what is needed is a marker in the lex files like PASSSUBJ\n\t\t //ex: Obama is worried/Merkel is concerned\n\t\t //Many of the poorer countries are concerned that the reduction in structural funds and farm subsidies may be detrimental in their attempts to fulfill the Copenhagen Criteria.\n\t\t //Some of the more well off EU states are also worried about the possible effects a sudden influx of cheap labor may have on their economies. Others are afraid that regional aid may be diverted away from those who currently benefit to the new, poorer countries that join in 2004 and beyond. \n\t\t// Does not account for infinitival constructions, here again a marker is needed to specify\n\t\t //subject versus object equi\n\t\t\t//Christian Noyer was reported to have said that it is ok.\n\t\t\t//Reuters has reported Christian Noyer to have said that it is ok.\n\t\t //Obama is likely to have said.. \n\t\t //Several opinion holder- opinion verb pairs in one sentence are not accounted for, right now the first pair is taken.\n\t\t //what is needed is to run through all dependencies. For inderect quotes the xcomp value of the embedded verb points to the \n\t\t //opinion verb. For direct quotes the offsets closest to thwe quote are relevant.\n\t\t //a specific treatment of inverted subjects is necessary then. Right now the\n\t\t //strategy relies on the fact that after the first subj/dirobj - verb pair the\n\t\t //search is interrupted. Thus, if the direct object precedes the subject, it is taken as subject.\n\t\t // this is the case in incorrectly analysed inverted subjeects as: said Zwickel on Monday\n\t\t //coordination of subject not accounted for:employers and many economists\n\t\t //several subject-opinion verbs:\n\t\t //Zwickel has called the hours discrepancy between east and west a \"fairness gap,\" but employers and many economists point out that many eastern operations have a much lower productivity than their western counterparts.\n\t\t if (language.equals(\"en\")){\n \t subjTag.add(\"nsubj\");\n \t subjTag.add(\"xsubj\");\n \t subjTag.add(\"nmod:agent\");\n \t \n \t dirObjTag.add(\"dobj\"); //for inverted subject: \" \" said IG metall boss Klaus Zwickel on Monday morning.\n \t \t\t\t\t\t\t//works only with break DEPENDENCYSEARCH, otherwise \"Monday\" is nsubj \n \t \t\t\t\t\t\t//for infinitival subject of object equi: Reuters reports Obama to have said\n \tpassSubjTag.add(\"nsubjpass\");\n \tapposTag.add(\"appos\");\n \trelclauseTag.add(\"acl:relcl\");\n \taclauseTag.add(\"acl\");\n \t compTag.add(\"mark\");\n \t pronTag.add(\"prp\");\n \thds.pronTag.add(\"prp\");\n \tcompLemma.add(\"that\");\n \tcoordLemma.add(\"and\");\n \tverbComplementTag.add(\"ccomp\");\n \tverbComplementTag.add(\"parataxis\");\n\n \tinfVerbTag.add(\"xcomp\"); //Reuters reported Merkel to have said\n \tinfVerbTag.add(\"advcl\");\n \tdirectQuoteIntro.add(\":\");\n \tindirectQuoteIntroChunkValue.add(\"SBAR\");\n \thds.objectEqui.add(\"report\");\n \thds.objectEqui.add(\"quote\");\n \thds.potentialIndirectQuoteTrigger.add(\"say\");\n// \thds.objectEqui.add(\"confirm\");\n// \thds.subjectEqui.add(\"promise\");\n// \thds.subjectEqui.add(\"quote\");\n// \thds.subjectEqui.add(\"confirm\");\n }\n\t\t \n\t\t boolean containsSubordinateConjunction = false;\n\t\t\n\t\t \n\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tSystem.out.println(\"PREPROCESSING..\");\n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\t//SP Map offsets to NER\n\t\t\t\tList<NamedEntity> ners = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tNamedEntity.class, sentenceAnn);\n\t\t\t\tfor (NamedEntity ne : ners){\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.getCoveredText().toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.casTypeCode);\n\t\t\t\t\t//Person is 71, Location is 213, Organization is 68 geht anders besser siehe unten\n\t\t\t\t\tint nerStart = ne\n\t\t\t\t\t\t\t.getBegin();\n\t\t\t\t\tint nerEnd = ne.getEnd();\n//\t\t\t\t\tSystem.out.println(\"NER: \" + ne.getCoveredText() + \" \" + nerStart + \"-\" + nerEnd ); \n\t\t\t\t\tString offsetNer = \"\" + nerStart + \"-\" + nerEnd;\n\t\t\t\t\thds.offsetToNer.put(offsetNer, ne.getCoveredText());\n//\t\t\t\t\tNer.add(offsetNer);\n\t\t\t\t\thds.Ner.add(offsetNer);\n//\t\t\t\t\tSystem.out.println(\"NER: TYPE \" +ne.getValue().toString());\n\t\t\t\t\tif (ne.getValue().equals(\"PERSON\")){\n\t\t\t\t\t\thds.NerPerson.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t\telse if (ne.getValue().equals(\"ORGANIZATION\")){\n\t\t\t\t\t\thds.NerOrganization.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//DBpediaLink info: map offsets to links\n\t\t\t\tList<DBpediaResource> dbpeds = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tDBpediaResource.class, sentenceAnn);\n\t\t\t\tfor (DBpediaResource dbped : dbpeds){\n//\t\t\t\t\t\n//\t\t\t\t\tint dbStart = dbped\n//\t\t\t\t\t\t\t.getBegin();\n//\t\t\t\t\tint dbEnd = dbped.getEnd();\n\t\t\t\t\t// not found if dbpedia offsets are wrongly outside than sentences\n//\t\t\t\t\tSystem.out.println(\"DBPED SENT: \" + sentenceAnn.getBegin()+ \"-\" + sentenceAnn.getEnd() ); \n//\t\t\t\t\tString offsetDB = \"\" + dbStart + \"-\" + dbEnd;\n//\t\t\t\t\thds.labelToDBpediaLink.put(dbped.getLabel(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getLabel() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t\thds.dbpediaSurfaceFormToDBpediaLink.put(dbped.getCoveredText(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getCoveredText() + \"URI: \" + dbped.getUri() ); \n\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\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//SP Map offsets to lemma of opinion verb/noun; parser does not provide lemma\n\t\t\t\t for (CoreLabel token: sentence.get(TokensAnnotation.class)) {\n//\t\t\t\t\t System.out.println(\"LEMMA \" + token.lemma().toString());\n\t\t\t\t\t int beginTok = token.beginPosition();\n\t\t\t\t\t int endTok = token.endPosition();\n\t\t\t\t\t String offsets = \"\" + beginTok + \"-\" + endTok;\n\t\t\t\t\t hds.offsetToLemma.put(offsets, token.lemma().toString());\n\t\t\t\t\t \n\t\t\t\t\t \t if (opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t \n//\t\t\t \t System.out.println(\"offsetToLemmaOfOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\t\t\t\t\t \t if (passive_opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfPassiveOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n//\t\t\t \t System.out.println(\"offsetToLemmaOfPassiveOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\n\t\t\t\t } \n\n\t\t\t//SPnew parser\n\t\t\tTree tree = sentence.get(TreeAnnotation.class);\n\t\t\tTreebankLanguagePack tlp = new PennTreebankLanguagePack();\n\t\t\tGrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();\n\t\t\tGrammaticalStructure gs = gsf.newGrammaticalStructure(tree);\n\t\t\tCollection<TypedDependency> td = gs.typedDependenciesCollapsed();\n\n\t\t\t \n//\t\t\tSystem.out.println(\"TYPEDdep\" + td);\n\t\t\t\n\t\t\tObject[] list = td.toArray();\n//\t\t\tSystem.out.println(list.length);\n\t\t\tTypedDependency typedDependency;\nDEPENDENCYSEARCH: for (Object object : list) {\n\t\t\ttypedDependency = (TypedDependency) object;\n//\t\t\tSystem.out.println(\"DEP \" + typedDependency.dep().toString()+ \n//\t\t\t\t\t\" GOV \" + typedDependency.gov().toString()+ \n//\t\t\t\" :: \"+ \" RELN \"+typedDependency.reln().toString());\n\t\t\tString pos = null;\n String[] elements;\n String verbCand = null;\n int beginVerbCand = -5;\n\t\t\tint endVerbCand = -5;\n\t\t\tString offsetVerbCand = null;\n\n if (compTag.contains(typedDependency.reln().toString())) {\n \tcontainsSubordinateConjunction = true;\n// \tSystem.out.println(\"subordConj \" + typedDependency.dep().toString().toLowerCase());\n }\n \n else if (subjTag.contains(typedDependency.reln().toString())){\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \t\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tfor (HashMap.Entry<String, String> entry : hds.offsetToLemma.entrySet()) {\n//\t\t\t\t String key = entry.getKey();\n//\t\t\t\t Object value = entry.getValue();\n//\t\t\t\t System.out.println(\"OFFSET \" + key + \" LEMMA \" + value);\n//\t\t\t\t // FOR LOOP\n//\t\t\t\t}\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"SUBJCHAINHEAD1\");\n\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\tSystem.out.println(\"verbCand \" + verbCand);\n\t\t\t\t//hack for subj after obj said Zwickel (obj) on Monday morning (subj)\n\t\t\t\tif (language.equals(\"en\") \n\t\t\t\t\t\t&& hds.predicateToObject.containsKey(offsetVerbCand)\n\t\t\t\t\t\t){\n// \t\tSystem.out.println(\"CONTINUE DEP\");\n \t\tcontinue DEPENDENCYSEARCH;\n \t}\n\t\t\t\telse {\n\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n\t\t\t\t}\n }\n //Merkel is concerned\n else if (passSubjTag.contains(typedDependency.reln().toString())){\n \t//Merkel was reported\n \t//Merkel was concerned\n \t//Merkel was quoted\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n////\t\t\t\t\tSystem.out.println(\"LEMMA verbCand \" + verbCandLemma);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n \t\n \tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n// \tSystem.out.println(\"SUBJCHAINHEAD2\");\n \t//Merkel is concerned\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfPassiveOpinionVerb,\n \t\t\thds);\n }\n //Meanwhile, the ECB's vice-president, Christian Noyer, was reported at the start of the week to have said that the bank's future interest-rate moves\n// would depend on the behavior of wage negotiators as well as the pace of the economic recovery.\n\n else if (apposTag.contains(typedDependency.reln().toString())){\n \t\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tString appo = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tint beginAppo = typedDependency.dep().beginPosition();\n\t\t\t\tint endAppo = typedDependency.dep().endPosition();\n\t\t\t\tString offsetAppo = \"\" + beginAppo + \"-\" + endAppo;\n\t\t\t\t\n// \tSystem.out.println(\"APPOSITION1 \" + subjCand + \"::\"+ appo + \":\" + offsetSubjCand + \" \" + offsetAppo);\n \thds.subjectToApposition.put(offsetSubjCand, offsetAppo);\n }\n else if (relclauseTag.contains(typedDependency.reln().toString())){\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tverbCand = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.dep().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.dep().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\tString subjCandPos = null;\n\t\t\t\tif (hds.predicateToSubject.containsKey(offsetVerbCand)){\n\t\t\t\t\t\n\t\t\t\t\tif (subjCand.matches(\".+?/.+?\")) { \n\t\t\t\t\t\telements = subjCand.split(\"/\");\n\t\t\t\t\t\tsubjCand = elements[0];\n\t\t\t\t\t\tsubjCandPos = elements[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tString del = hds.predicateToSubject.get(offsetVerbCand);\n\t\t\t\t\thds.predicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToPredicate.remove(del);\n\t\t\t\t\thds.normalPredicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToNormalPredicate.remove(del);\n//\t\t\t\t\tSystem.out.println(\"REMOVE RELPRO \" + verbCand + \"/\" + hds.offsetToLemma.get(del));\n\t\t\t\t\thds.predicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToPredicate.put( offsetSubjCand, offsetVerbCand);\n\t\t\t\t\thds.normalPredicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToNormalPredicate.put( offsetSubjCand, offsetVerbCand);\n//\t\t\t\t\tSystem.out.println(\"RELCLAUSE \" + subjCand + \"::\" + \":\" + verbCand);\n\t\t\t\t\thds.offsetToSubjectHead.put(offsetSubjCand,subjCand);\n\t\t\t\t\thds.SubjectHead.add(offsetSubjCand);\n\t\t\t\t\t\n\t\t\t\t\tif (subjCandPos != null && hds.pronTag.contains(subjCandPos)){\n\t\t\t\t\t\thds.PronominalSubject.add(offsetSubjCand);\n\t\t\t\t\t}\n\t\t\t\t}\n \t\n \t\n }\n \n else if (dirObjTag.contains(typedDependency.reln().toString())\n \t\t){\n \tstoreRelations(typedDependency, hds.predicateToObject, hds.ObjectToPredicate, hds);\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\t\n\t\t\t\tString objCand = typedDependency.dep().toString().toLowerCase();\n \tint beginObjCand = typedDependency.dep().beginPosition();\n \tint endObjCand = typedDependency.dep().endPosition();\n \tString offsetObjCand = \"\" + beginObjCand + \"-\" + endObjCand;\n \tString objCandPos;\n \tif (objCand.matches(\".+?/.+?\")) { \n\t\t\t\t\telements = objCand.split(\"/\");\n\t\t\t\t\tobjCand = elements[0];\n\t\t\t\t\tobjCandPos = elements[1];\n//\t\t\t\t\tSystem.out.println(\"PRON OBJ \" + objCandPos);\n\t\t\t\t\tif (pronTag.contains(objCandPos)){\n\t\t\t\t\thds.PronominalSubject.add(offsetObjCand);\n\t\t\t\t\t}\n\t\t\t\t\t}\n// \tSystem.out.println(\"DIROBJ STORE ONLY\");\n \t//told Obama\n \t//said IG metall boss Klaus Zwickel\n \t// problem: pointing DO\n \t//explains David Gems, pointing out the genetically manipulated species.\n \t if (language.equals(\"en\") \n \t\t\t\t\t\t&& !hds.normalPredicateToSubject.containsKey(offsetVerbCand)\n \t\t\t\t\t\t){\n// \t\t System.out.println(\"INVERSE SUBJ HACK ENGLISH PREDTOOBJ\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t }\n }\n //was reported to have said\n else if (infVerbTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.mainToInfinitiveVerb, hds.infinitiveToMainVerb, hds);\n// \tSystem.out.println(\"MAIN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n else if (aclauseTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.nounToInfinitiveVerb, hds.infinitiveVerbToNoun, hds);\n// \tSystem.out.println(\"NOUN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n \n \n\n\t\t\t}\n\t\t\t\n//\t\t\tSemanticGraph dependencies = sentence.get(CollapsedCCProcessedDependenciesAnnotation.class);\n//\t\t\tSystem.out.println(\"SEM-DEP \" + dependencies);\t\n\t\t}\n\t\t\n\n\t\tMap<Integer, edu.stanford.nlp.dcoref.CorefChain> corefChains = document.get(CorefChainAnnotation.class);\n\t\t \n\t\t if (corefChains == null) { return; }\n\t\t //SPCOPY\n\t\t for (Entry<Integer, edu.stanford.nlp.dcoref.CorefChain> entry: corefChains.entrySet()) {\n//\t\t System.out.println(\"Chain \" + entry.getKey() + \" \");\n\t\t \tint chain = entry.getKey();\n\t\t String repMenNer = null;\n\t\t String repMen = null;\n\t\t String offsetRepMenNer = null;\n\n\t\t List<IaiCorefAnnotation> listCorefAnnotation = new ArrayList<IaiCorefAnnotation>();\n\t\t \n\t\t for (CorefMention m : entry.getValue().getMentionsInTextualOrder()) {\n\t\t \tboolean corefMentionContainsNer = false;\n\t\t \tboolean repMenContainsNer = false;\n\n//\t\t \n\n\t\t\t\t// We need to subtract one since the indices count from 1 but the Lists start from 0\n\t\t \tList<CoreLabel> tokens = sentences.get(m.sentNum - 1).get(TokensAnnotation.class);\n\t\t // We subtract two for end: one for 0-based indexing, and one because we want last token of mention not one following.\n//\t\t System.out.println(\" \" + m + \", i.e., 0-based character offsets [\" + tokens.get(m.startIndex - 1).beginPosition() +\n//\t\t \", \" + tokens.get(m.endIndex - 2).endPosition() + \")\");\n\t\t \n\t\t int beginCoref = tokens.get(m.startIndex - 1).beginPosition();\n\t\t\t\t int endCoref = tokens.get(m.endIndex - 2).endPosition();\n\t\t\t\t String offsetCorefMention = \"\" + beginCoref + \"-\" + endCoref;\n\t\t\t\t String corefMention = m.mentionSpan;\n\n\t\t\t\t CorefMention RepresentativeMention = entry.getValue().getRepresentativeMention();\n\t\t\t\t repMen = RepresentativeMention.mentionSpan;\n\t\t\t\t List<CoreLabel> repMenTokens = sentences.get(RepresentativeMention.sentNum - 1).get(TokensAnnotation.class);\n//\t\t\t\t System.out.println(\"REPMEN ANNO \" + \"\\\"\" + repMen + \"\\\"\" + \" is representative mention\" +\n// \", i.e., 0-based character offsets [\" + repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition() +\n//\t\t \", \" + repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition() + \")\");\n\t\t\t\t int beginRepMen = repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition();\n\t\t\t\t int endRepMen = repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition();\n\t\t\t\t String offsetRepMen = \"\" + beginRepMen + \"-\" + endRepMen;\n\t\t \t \n\t\t\t\t//Determine repMenNer that consists of largest NER (Merkel) to (Angela Merkel)\n\t\t\t\t //and \"Chancellor \"Angela Merkel\" to \"Angela Merkel\"\n\t\t \t //Further reduction to NER as in \"Chancellor Angela Merkel\" to \"Angela Merkel\" is\n\t\t\t\t //done in determineBestSubject. There, Chunk information and subjectHead info is available.\n\t\t\t\t //Chunk info and subjectHead info is used to distinguish \"Chancellor Angela Merkel\" to \"Angela Merkel\"\n\t\t\t\t //from \"The enemies of Angela Merkel\" which is not reduced to \"Angela Merkel\"\n\t\t\t\t //Problem solved: The corefMentions of a particular chain do not necessarily have the same RepMenNer (RepMen) \n\t\t\t\t // any more: Chancellor Angela Merkel repMenNer Chancellor Angela Merkel , then Angela Merkel has RepMenNer Angela Merkel\n\t\t\t\t if (offsetRepMenNer != null && hds.Ner.contains(offsetRepMenNer)){\n//\t\t\t\t\t System.out.println(\"NEWNer.contains(offsetRepMenNer)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetRepMen != null && hds.Ner.contains(offsetRepMen)){\n\t\t\t\t\t repMenNer = repMen;\n\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\tSystem.out.println(\"NEWNer.contains(offsetRepMen)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetCorefMention != null && hds.Ner.contains(offsetCorefMention)){\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"Ner.contains(offsetCorefMention)\");\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t corefMentionContainsNer = offsetsContainAnnotation(offsetCorefMention,hds.Ner);\n\t\t\t\t\t repMenContainsNer = offsetsContainAnnotation(offsetRepMen,hds.Ner);\n//\t\t\t\t\t System.out.println(\"ELSE Ner.contains(offsetCorefMention)\");\n\t\t\t\t }\n\t\t\t\t //Determine repMenNer that contains NER\n\t\t\t\t\tif (repMenNer == null){\n\t\t\t\t\t\tif (corefMentionContainsNer){\n\t\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (repMenContainsNer){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT2\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//no NER:\n\t\t\t\t\t\t//Pronoun -> repMen is repMenNer\n\t\t\t\t\t\telse if (hds.PronominalSubject.contains(offsetCorefMention) && repMen != null){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT3\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//other no NER: corefMention is repMenNer because it is closer to original\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"DEFAULT4\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \n \t IaiCorefAnnotation corefAnnotation = new IaiCorefAnnotation(aJCas);\n\t\t\t\n\t\t\t\t\t\n\n\n\t\t\t\t\tcorefAnnotation.setBegin(beginCoref);\n\t\t\t\t\tcorefAnnotation.setEnd(endCoref);\n\t\t\t\t\tcorefAnnotation.setCorefMention(corefMention);\n\t\t\t\t\tcorefAnnotation.setCorefChain(chain);\n\t\t\t\t\t//done below\n//\t\t\t\t\tcorefAnnotation.setRepresentativeMention(repMenNer);\n//\t\t\t\t\tcorefAnnotation.addToIndexes(); \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlistCorefAnnotation.add(corefAnnotation);\n\t\t\t\t\t\n//\t\t\t\t\tdone below:\n//\t\t\t\t\t offsetToRepMen.put(offsetCorefMention, repMenNer);\n//\t\t\t\t\t RepMen.add(offsetCorefMention);\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t }//end coref mention\n//\t\t System.out.println(\"END Chain \" + chain );\n//\t\t System.out.println(listCorefAnnotation.size());\n\t\t String offsetCorefMention = null;\n\t\t for (int i = 0; i < listCorefAnnotation.size(); i++) {\n\t\t \tIaiCorefAnnotation corefAnnotation = listCorefAnnotation.get(i);\n\t\t \tcorefAnnotation.setRepresentativeMention(repMenNer);\n\t\t \tcorefAnnotation.addToIndexes();\n\t\t \toffsetCorefMention = \"\" + corefAnnotation.getBegin() + \"-\" + corefAnnotation.getEnd();\n\t\t\t\t\thds.offsetToRepMen.put(offsetCorefMention, repMenNer);\n\t\t\t\t\thds.RepMen.add(offsetCorefMention);\n\t\t\t\t\t//COREF\n//\t\t\t\t\tSystem.out.println(\"Chain \" + corefAnnotation.getCorefChain());\n//\t\t\t\t\tSystem.out.println(\"corefMention \" + corefAnnotation.getCorefMention() + offsetCorefMention);\n//\t\t\t\t\tSystem.out.println(\"repMenNer \" + repMenNer);\n\t\t }\n\t\t } //end chains\n\n\n//\t\t System.out.println(\"NOW quote finder\");\n\n\n\t\t\n\t\t///* quote finder: begin find quote relation and quotee\n\t\t// direct quotes\n\t\t\n\t\t\n\t\tString quotee_left = null;\n\t\tString quotee_right = null; \n\t\t\n\t\tString representative_quotee_left = null;\n\t\tString representative_quotee_right = null; \n\t\t\n\t\tString quote_relation_left = null;\n\t\tString quote_relation_right = null;\n\t\t\n\t\tString quoteType = null;\n\t\tint quoteeReliability = 5;\n\t\tint quoteeReliability_left = 5;\n\t\tint quoteeReliability_right = 5;\n\t\tint quotee_end = -5;\n\t\tint quotee_begin = -5;\n\t\t\n\t\tboolean quoteeBeforeQuote = false;\n\n\n\t\n\t\t\n\t\t// these are all the quotes in this document\n\t\tList<CoreMap> quotes = document.get(QuotationsAnnotation.class);\n\t\tfor (CoreMap quote : quotes) {\n\t\t\tif (quote.get(TokensAnnotation.class).size() > 5) {\n\t\t\t\tQuoteAnnotation annotation = new QuoteAnnotation(aJCas);\n\n\t\t\t\tint beginQuote = quote.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endQuote = quote.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(quote.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tannotation.setBegin(beginQuote);\n\t\t\t\tannotation.setEnd(endQuote);\n\t\t\t\tannotation.addToIndexes();\n//\t\t\t}\n//\t\t}\n//\t\t\n//\t\tList<Q> newQuotes = document.get(QuotationsAnnotation.class);\t\t\n//\t\tfor (CoreMap annotation : newQuotes) {\n//\t\t\t\tif (1==1){\n//\t\t\t\tRe-initialize markup variables since they are also used for indirect quotes\n\t\t\t\tquotee_left = null;\n\t\t\t\tquotee_right = null; \n\t\t\t\t\n\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\n\t\t\t\tquote_relation_left = null;\n\t\t\t\tquote_relation_right = null;\n\t\t\t\tquoteeReliability = 5;\n\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\tquotee_end = -5;\n\t\t\t\tquotee_begin = -5;\n\t\t\t\tquoteType = \"direct\";\n\t\t\t\tquoteeBeforeQuote = false;\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> directQuoteTokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tToken.class, annotation);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n\t\t\t\t\n \n//\t\t\t\tfor (Token aFollowToken: followTokens){\n//\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\tChunk.class, aFollowToken);\n \n//direct quote quotee right:\n\t\t\t\t\n\t for (Token aFollow2Token: followTokens){\n\t\t\t\t\t List<SentenceAnnotation> sentencesFollowQuote = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t SentenceAnnotation.class, aFollow2Token);\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t for (SentenceAnnotation sentenceFollowsQuote: sentencesFollowQuote){\n\t\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tChunk.class, sentenceFollowsQuote);\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT\");\n\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"RIGHT\", \n\t\t\t\t\tchunks, hds, annotation);\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_right = quote_annotation_result[0];\n\t\t\t representative_quotee_right = quote_annotation_result[1];\n\t\t\t quote_relation_right = quote_annotation_result[2];\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_right = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t //Will Throw exception!\n\t\t\t //do something! anything to handle the exception.\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_right = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT RESULT quotee \" + quotee_right + \" representative_quotee \" + representative_quotee_right\n//\t\t\t\t\t+ \" quote_relation \" + quote_relation_right);\n\t\t \n\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> precedingTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n for (Token aPrecedingToken: precedingTokens){ \n \t\n \tif (directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString()) \n \t\t\t|| compLemma.contains(aPrecedingToken.getLemma().getValue().toString())) {\n// \t\tSystem.out.println(\"Hello, World lemma found\" + aPrecedingToken.getLemma().getValue());\n \t\tquoteeBeforeQuote = true;\n \t}\n \t\tList <NamedEntity> namedEntities = null;\n \t\tList <Token> tokens = null;\n \t\tList<Chunk> chunks = null;\n \t\t\n\t\t\t\t List<Sentence> precedingSentences = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken, 1);\n\t\t\t\t \n\t\t\t\t\t\tif (precedingSentences.isEmpty()){\n\t\t\t\t\t\t\tList<Sentence> firstSentence;\n\t\t\t\t \tfirstSentence = JCasUtil.selectCovering(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken);\n\n\t\t\t\t \tfor (Sentence aSentence: firstSentence){\n\t\t\t\t \t\t\n\n\t\t\t\t\t\t\t\tchunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\tChunk.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t \t\tnamedEntities = JCasUtil.selectCovered(aJCas,\n\t \t \t\tNamedEntity.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\ttokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\n\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t else {\t\n\t\t\t\t \tfor (Sentence aSentence: precedingSentences){\n//\t\t\t\t \t\tSystem.out.println(\"Hello, World sentence\" + aSentence);\n\t\t\t\t \t\tchunks = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tChunk.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\tnamedEntities = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tNamedEntity.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\ttokens = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence, aPrecedingToken);\n\t\t\t\t \t}\n\t\t\t\t }\n \t\n//\t\t\t\t \n//\t\t\t\t\t\tSystem.out.println(\"DIRECT QUOTE LEFT\");\n\t\t\t\t\t\tString[] quote_annotation_direct_left = determine_quotee_and_quote_relation(\"LEFT\", chunks,\n\t\t\t\t\t\t\t\t hds, annotation\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t );\n//\t\t\t\t\t\tSystem.out.println(\"QUOTE ANNOTATION \" + quote_annotation_direct_left.length);\t\t\n\t\tif (quote_annotation_direct_left.length>=4){\n//\t\t\tSystem.out.println(\"QUOTE ANNOTATION UPDATE \" + quote_annotation_direct_left[0] +\n//\t\t\t\t\t\" \" + quote_annotation_direct_left[1] + \" \" +\n//\t\t\t\t\tquote_annotation_direct_left[2]);\n\t\t quotee_left = quote_annotation_direct_left[0];\n\t\t representative_quotee_left = quote_annotation_direct_left[1];\n\t\t quote_relation_left = quote_annotation_direct_left[2];\n\t\t try {\n\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t} catch (NumberFormatException e) {\n\t\t //Will Throw exception!\n\t\t //do something! anything to handle the exception.\n\t\t\tquoteeReliability = -5;\n\t\t\tquoteeReliability_left = -5;\n\t\t\t}\t\t\t\t\t \n\t\t }\n//\t\tSystem.out.println(\"DIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t+ \" quote_relation \" + quote_relation_left);\n\t\t//no subject - predicate quotee quote_relation, quote introduced with colon: \n\t\tif (quotee_left == null && quote_relation_left == null && representative_quotee_left == null \n\t\t&& directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString())){\n//\t\t\tSystem.out.println(\"NER DIRECT QUOTE LEFT COLON\");\n\t\t\tString quoteeCandOffset = null; \n\t\t\tString quoteeCandText = null;\n\t\t if (namedEntities.size() == 1){\n \t \tfor (NamedEntity ne : namedEntities){\n// \t \t\tSystem.out.println(\"ONE NER \" + ne.getCoveredText());\n \t \t\tquoteeCandText = ne.getCoveredText();\n\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\tquotee_end = ne.getEnd();\n\t\t\t\t\tquotee_begin = ne.getBegin();\n\t\t\t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n\t\t\t\t\tquoteeReliability = 1;\n\t\t\t\t\tquoteeReliability_left = 1;\n \t }\n \t }\n \t else if (namedEntities.size() > 1) {\n \t \tint count = 0;\n \t \tString quotee_cand = null;\n// \t \tSystem.out.println(\"Hello, World ELSE SEVERAL NER\");\n \t \tfor (NamedEntity ner : namedEntities){\n// \t \t\tSystem.out.println(\"Hello, World NER TYPE\" + ner.getValue());\n \t \t\tif (ner.getValue().equals(\"PERSON\")){\n \t \t\t\tcount = count + 1;\n \t \t\t\tquotee_cand = ner.getCoveredText();\n \t \t\t\tquotee_end = ner.getEnd();\n \t \t\t\tquotee_begin = ner.getBegin();\n \t \t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n \t \t\t\t\n// \t \t\t\tSystem.out.println(\"Hello, World FOUND PERSON\" + quotee_cand);\n \t \t\t}\n \t \t}\n \t \tif (count == 1){ // there is exactly one NER.PERSON\n// \t \t\tSystem.out.println(\"ONE PERSON, SEVERAL NER \" + quotee_cand);\n \t \t\t\tquoteeCandText = quotee_cand;\n\t\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\t\tquoteeReliability = 3;\n\t\t\t\t\t\tquoteeReliability_left = 3;\n \t \t}\n \t }\n\t\t if(quoteeCandOffset != null && quoteeCandText != null ){\n//\t\t \t quotee_left = quoteeCandText;\n\t\t \t String result [] = determineBestRepMenSubject(\n\t\t \t\t\t quoteeCandOffset,quoteeCandOffset, quoteeCandText, hds);\n\t\t \t if (result.length>=2){\n\t\t \t\t quotee_left = result [0];\n\t\t \t\t representative_quotee_left = result [1];\n//\t\t \t System.out.println(\"RESULT2 NER quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left);\n\t\t \t }\n\t\t }\n\t\t}\n }\n\t\t\n \n\n\t\t\t\t\n\t\t\t\tif (quotee_left != null && quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"TWO QUOTEES\");\n\t\t\t\t\t\n\t\t\t\t\tif (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\") \n\t\t\t\t\t\t|| \tdirectQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t|| directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"PUNCT \" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\",\")){\n//\t\t\t\t\t\tSystem.out.println(\"COMMA \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse if (!directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"NO PUNCT \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n//\t\t\t\t\t\tSystem.out.println(\"UNCLEAR LEFT RIGHT \" + quotee_left + quote_relation_left + quote + quotee_right + quote_relation_right);\n\t\t\t\t\tannotation.setQuotee(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteRelation(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (quoteeBeforeQuote == true){\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_left != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE LEFT\" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE RIGHT FOUND\" + quotee_right + \" QUOTE RELATION \" + quote_relation_right + \":\" + quoteeReliability_right);\n\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_left != null ){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"NO QUOTEE FOUND\" + quote + quote_relation_left + quote_relation_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_right != null){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t}\n\t\t\t\telse if (quoteType != null){\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"Hello, World NO QUOTEE and NO QUOTE RELATION FOUND\" + quote);\n\t\t\t\t}\n\t\t\t\tif (annotation.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\tSystem.out.println(\"NOW!!\" + annotation.getRepresentativeQuoteeMention());\n\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(annotation.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\tannotation.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(annotation.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\tSystem.out.println(\"DBPRED FOUND\" + annotation.getRepresentativeQuoteeMention() + \" URI: \" + annotation.getQuoteeDBpediaUri());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} //for direct quote\n\t\t\n\t\t// annotate indirect quotes: opinion verb + 'that' ... until end of sentence: said that ...\n\n//\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class); //already instantiated above\nINDIRECTQUOTE:\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tif (sentence.get(TokensAnnotation.class).size() > 5) { \n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n//\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t \tint indirectQuoteBegin = -5;\n\t\t\t\tint indirectQuoteEnd = -5;\n\t\t\t\tboolean subsequentDirectQuoteInstance = false;\n\t\t\t\t\n\t\t\t\tList<Chunk> chunksIQ = JCasUtil.selectCovered(aJCas,\n\t\t\t\tChunk.class, sentenceAnn);\n\t\t\t\tList<Chunk> chunksBeforeIndirectQuote = null;\n\t\t\t\t\n\t\t\t\tint index = 0;\nINDIRECTCHUNK:\tfor (Chunk aChunk : chunksIQ) {\n\t\t\t\t\tindex++;\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE CHUNK VALUE \" + aChunk.getChunkValue().toString());\n//\t\t\t\t\tif (aChunk.getChunkValue().equals(\"SBAR\")) {\n\t\t\t\t\tif(indirectQuoteIntroChunkValue.contains(aChunk.getChunkValue())){\n//\t\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE INDEX \" + \"\" + index);\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<Token> tokensSbar = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tToken.class, aChunk);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (Token aTokenSbar : tokensSbar){\n//\t\t\t\t\t\t\tString that = \"that\";\n\t\t\t\t\t\t\tif (compLemma.contains(aTokenSbar.getLemma().getCoveredText())){\n\t\t\t\t\t\t// VP test: does that clause contain VP?\n//\t\t\t\t\t\t\t\tSystem.out.println(\"TOK1\" + aTokenSbar.getLemma().getCoveredText());\n//\t\t\t \tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\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\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\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\t//NEW\n//\t\t\t\t\t\t\t\tif (LANGUAGE == \"en\")\n\t\t\t\t\t\t\t\tList<Token> precedingSbarTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\t\t\t\t\tToken.class, aChunk, 1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (Token aPrecedingSbarToken: precedingSbarTokens){ \n//\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOK2\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \tif (coordLemma.contains(aPrecedingSbarToken.getLemma().getValue().toString())){\n//\t\t\t\t \t\tSystem.out.println(\"TOKK\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t \t\tint k = 0;\n\t\t\t\t \tSAY:\tfor (Chunk chunkBeforeAndThat : chunksBeforeIndirectQuote){\n//\t\t\t\t \t\t\txxxx\n\t\t\t\t \t\tk++;\n\t\t\t\t \t\t\tif (chunkBeforeAndThat.getChunkValue().equals(\"VP\")){\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\tList<Token> tokensInVp = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToken.class, chunkBeforeAndThat);\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Token aTokenInVp : tokensInVp){\n//\t\t\t\t\t\t\t\t\t\t\t\t\tString and;\n//\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOKK\" + aTokenInVp.getLemma().getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (aTokenInVp.getLemma().getValue().equals(\"say\")){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY OLD\" + indirectQuoteBegin + \":\" + sentenceAnn.getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, k);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindirectQuoteBegin = chunksBeforeIndirectQuote.get(chunksBeforeIndirectQuote.size()-1).getEnd()+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY NEW\" + indirectQuoteBegin + \":\" );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak SAY;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\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\t\n\t\t\t\t \t\t\t}\n\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\t\n\t\t\t\t \t}\n\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\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\t\t\n//\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\t\n\t\t\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuoteChunk = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class, aChunk);\n\t\t\t\t\t\t\t\tif (coveringDirectQuoteChunk.isEmpty()){\n//\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t indirectQuote.setBegin(indirectQuoteBegin);\n//\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t indirectQuoteEnd = sentenceAnn.getEnd();\n\t\t\t\t\t\t\t\t indirectQuote.setEnd(indirectQuoteEnd);\n\t\t\t\t\t\t\t\t indirectQuote.addToIndexes();\n\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = false;\n//\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FALSE\");\n\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\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t List<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tToken.class, indirectQuote, 1);\n\t\t\t\t\t\t\t\t for (Token aFollow3Token: followTokens){\n\t\t\t\t\t\t\t\t\t List<QuoteAnnotation> subsequentDirectQuotes = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class,aFollow3Token);\n\t\t\t\t\t\t\t\t\t if (!subsequentDirectQuotes.isEmpty()){\n\t\t\t\t\t\t\t\t\t\t for (QuoteAnnotation subsequentDirectQuote: subsequentDirectQuotes){\n\t\t\t\t\t\t\t\t\t\t\t if (subsequentDirectQuote.getRepresentativeQuoteeMention() != null\n\t\t\t\t\t\t\t\t\t\t\t\t && subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")){\n//\t\t\t\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FOUND\"); \n\t\t\t\t\t\t\t\t\t\t\t hds.subsequentDirectQuote = subsequentDirectQuote;\n\t\t\t\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = true;\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\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\t \n\t\t\t\t\t\t\t\t break INDIRECTCHUNK;\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}\t\t\n\t\t\t\t}\n\t\t\t\t\tif (indirectQuoteBegin >= 0 && indirectQuoteEnd >= 0){\n//\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuote = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n//\t\t\t\t\t\tif (coveringDirectQuote.isEmpty()){\n////\t\t\t\t\t\t\t\n//\t\t\t\t\t\tindirectQuote.addToIndexes();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//indirect quote is covered by direct quote and therefore discarded\n//\t\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n//\t\t\t\t\t\t}\n\t\t\t\t\tList<QuoteAnnotation> coveredDirectQuotes = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n\t\t\t\t\tfor (QuoteAnnotation coveredDirectQuote : coveredDirectQuotes){\n//\t\t\t\t\t\tSystem.out.println(\"Hello, World covered direct quote\" + coveredDirectQuote.getCoveredText());\n\t\t\t\t\t\t//delete coveredDirectQuoteIndex\n\t\t\t\t\t\tcoveredDirectQuote.removeFromIndexes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//no indirect quote in sentence\n\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n//\t\t\t\t\t\tRe-initialize markup variables since they are also used for direct quotes\n\t\t\t\t\t\tquotee_left = null;\n\t\t\t\t\t\tquotee_right = null; \n\t\t\t\t\t\t\n\t\t\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquote_relation_left = null;\n\t\t\t\t\t\tquote_relation_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquoteType = \"indirect\";\n\t\t\t\t\t\tquoteeReliability = 5;\n\t\t\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\t\t\tquotee_end = -5;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\tif (chunksBeforeIndirectQuote != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"chunksBeforeIndirectQuote FOUND!! \");\n\t\t\t\t\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"LEFT\", chunksBeforeIndirectQuote,\n\t\t\t\t\t\t\t\t\t hds, indirectQuote\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_left = quote_annotation_result[0];\n\t\t\t representative_quotee_left = quote_annotation_result[1];\n\t\t\t quote_relation_left = quote_annotation_result[2];\n//\t\t\t System.out.println(\"INDIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t\t + \" QUOTE RELATION \" + quote_relation_left);\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_left = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (quotee_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t\tindirectQuote.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\t\tindirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//indirect quote followed by direct quote:\n\t\t\t\t\t\t\t//the quotee and quote relation of the indirect quote are copied to the direct quote \n\t\t\t\t\t\t\t//Genetic researcher Otmar Wiestler hopes that the government's strict controls on genetic research \n\t\t\t\t\t\t\t//will be relaxed with the advent of the new ethics commission. \n\t\t\t\t\t\t\t//\"For one thing the government urgently needs advice, because of course it's such an extremely \n\t\t\t\t\t\t\t//complex field. And one of the reasons Chancellor Schröder formed this new commission was without \n\t\t\t\t\t\t\t//a doubt to create his own group of advisors.\"\n\n\t\t\t\t\t\t\tif (subsequentDirectQuoteInstance == true\n\t\t\t\t\t\t\t\t&&\thds.subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuotee().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuoteRelation().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t\t){\n//\t\t\t\t\t\t\t\tSystem.out.println(\"SUBSEQUENT UNCLEAR DIR QUOTE FOUND!!\"); \n\t\t\t\t\t\t\t\tint begin = hds.subsequentDirectQuote.getBegin();\n\t\t\t\t\t\t\t\tint end = hds.subsequentDirectQuote.getEnd();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteType(\"direct\");\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteeReliability(quoteeReliability_left + 2);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.addToIndexes();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE \" + quotee_left + quote_relation_left + quoteeReliability);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (quote_relation_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (quoteType != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE NOT FOUND\" + quote_relation_left);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (indirectQuote.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"NOW!!\" + indirectQuote.getRepresentativeQuoteeMention());\n\t\t\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(indirectQuote.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\t\t\tindirectQuote.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\t\t\tSystem.out.println(\"DBPEDIA \" + indirectQuote.getRepresentativeQuoteeMention() + \" URI: \" + hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n\t\t\t\t\t\t\t}\n\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\t}\n//\t\t\t\t}\n//\t\t\t }\n//\t\t\t} //for chunk\n//\t\t\t\tsay without that\n//\t\t\t}\t\t\n\t\t} //Core map sentences indirect quotes\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tprotected Map<Object, Object> rawTextParse(CharSequence text) {\n\n\t\tStanfordCoreNLP pipeline = null;\n\t\ttry {\n\t\t\tpipeline = pipelines.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tAnnotation document = new Annotation(text.toString());\n\t\tpipeline.annotate(document);\n\t\tMap<Object, Object> sentencesMap = new LinkedHashMap<Object, Object>();//maintain sentence order\n\t\tint id = 0;\n\t\tList<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n\t\tfor (CoreMap sentence : sentences) {\n\t\t\tStringBuilder processedText = new StringBuilder();\n\t\t\tfor (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n\t\t\t\tString word = token.get(CoreAnnotations.TextAnnotation.class);\n\t\t\t\tString lemma = token.get(CoreAnnotations.LemmaAnnotation.class);\n\t\t\t\tString pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n\t\t\t\t//todo this should really happen after parsing is done, because using lemmas might confuse the parser\n\t\t\t\tif (config().isUseLowercaseEntries()) {\n\t\t\t\t\tword = word.toLowerCase();\n\t\t\t\t\tlemma = lemma.toLowerCase();\n\t\t\t\t}\n\t\t\t\tif (config().isUseLemma()) {\n\t\t\t\t\tword = lemma;\n\t\t\t\t}\n\t\t\t\tprocessedText.append(word).append(POS_DELIMITER).append(lemma).append(POS_DELIMITER).append(pos).append(TOKEN_DELIM);\n //inserts a TOKEN_DELIM at the end too\n\t\t\t}\n\t\t\tsentencesMap.put(id, processedText.toString().trim());//remove the single trailing space\n\t\t\tid++;\n\t\t}\n\t\ttry {\n\t\t\tpipelines.put(pipeline);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn sentencesMap;\n\t}", "public void processDocument() {\n\n\t\t// compact concepts\n\t\tprocessConcepts(concepts);\n\t}", "public static void main(final String[] args)\r\n {\r\n // Set the path to the data files\r\n Dictionary.initialize(\"c:/Program Files/WordNet/2.1/dict\");\r\n \r\n // Get an instance of the Dictionary object\r\n Dictionary dict = Dictionary.getInstance();\r\n \r\n // Declare a filter for all terms starting with \"car\", ignoring case\r\n TermFilter filter = new WildcardFilter(\"car*\", true);\r\n \r\n // Get an iterator to the list of nouns\r\n Iterator<IndexTerm> iter = \r\n dict.getIndexTermIterator(PartOfSpeech.NOUN, 1, filter);\r\n \r\n // Go over the list items\r\n while (iter.hasNext())\r\n {\r\n // Get the next object\r\n IndexTerm term = iter.next();\r\n \r\n // Write out the object\r\n System.out.println(term.toString());\r\n \r\n // Write out the unique pointers for this term\r\n int nNumPtrs = term.getPointerCount();\r\n if (nNumPtrs > 0)\r\n {\r\n // Print out the number of pointers\r\n System.out.println(\"\\nThis term has \" + Integer.toString(nNumPtrs) +\r\n \" pointers\");\r\n \r\n // Print out all of the pointers\r\n String[] ptrs = term.getPointers();\r\n for (int i = 0; i < nNumPtrs; ++i)\r\n {\r\n String p = Pointer.getPointerDescription(term.getPartOfSpeech(), ptrs[i]);\r\n System.out.println(ptrs[i] + \": \" + p);\r\n }\r\n }\r\n \r\n // Get the definitions for this term\r\n int nNumSynsets = term.getSynsetCount();\r\n if (nNumSynsets > 0)\r\n {\r\n // Print out the number of synsets\r\n System.out.println(\"\\nThis term has \" + Integer.toString(nNumSynsets) +\r\n \" synsets\");\r\n \r\n // Print out all of the synsets\r\n Synset[] synsets = term.getSynsets();\r\n for (int i = 0; i < nNumSynsets; ++i)\r\n {\r\n System.out.println(synsets[i].toString());\r\n }\r\n }\r\n }\r\n \r\n System.out.println(\"Demo processing finished.\");\r\n }", "@Override\n protected List<Term> segSentence(char[] sentence)\n {\n WordNet wordNetAll = new WordNet(sentence);\n ////////////////生成词网////////////////////\n generateWordNet(wordNetAll);\n ///////////////生成词图////////////////////\n// System.out.println(\"构图:\" + (System.currentTimeMillis() - start));\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"粗分词网:\\n%s\\n\", wordNetAll);\n }\n// start = System.currentTimeMillis();\n List<Vertex> vertexList = viterbi(wordNetAll);\n// System.out.println(\"最短路:\" + (System.currentTimeMillis() - start));\n\n if (config.useCustomDictionary)\n {\n if (config.indexMode > 0)\n combineByCustomDictionary(vertexList, this.dat, wordNetAll);\n else combineByCustomDictionary(vertexList, this.dat);\n }\n\n if (HanLP.Config.DEBUG)\n {\n System.out.println(\"粗分结果\" + convert(vertexList, false));\n }\n\n // 数字识别\n if (config.numberQuantifierRecognize)\n {\n mergeNumberQuantifier(vertexList, wordNetAll, config);\n }\n\n // 实体命名识别\n if (config.ner)\n {\n WordNet wordNetOptimum = new WordNet(sentence, vertexList);\n int preSize = wordNetOptimum.size();\n if (config.nameRecognize)\n {\n PersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.translatedNameRecognize)\n {\n TranslatedPersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.japaneseNameRecognize)\n {\n JapanesePersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.placeRecognize)\n {\n PlaceRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.organizationRecognize)\n {\n // 层叠隐马模型——生成输出作为下一级隐马输入\n wordNetOptimum.clean();\n vertexList = viterbi(wordNetOptimum);\n wordNetOptimum.clear();\n wordNetOptimum.addAll(vertexList);\n preSize = wordNetOptimum.size();\n OrganizationRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (wordNetOptimum.size() != preSize)\n {\n vertexList = viterbi(wordNetOptimum);\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"细分词网:\\n%s\\n\", wordNetOptimum);\n }\n }\n }\n\n // 如果是索引模式则全切分\n if (config.indexMode > 0)\n {\n return decorateResultForIndexMode(vertexList, wordNetAll);\n }\n\n // 是否标注词性\n if (config.speechTagging)\n {\n speechTagging(vertexList);\n }\n\n return convert(vertexList, config.offset);\n }", "private void parseEntities() {\n // See: https://github.com/twitter/twitter-text/tree/master/java\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractCashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractHashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractMentionedScreennamesWithIndices(getText()));\n }", "private void startParsing(){\r\n pondred = new ArrayList<>();\r\n //extract docs from corpus\r\n for (String xml:parseDocsFile(docs_file))\r\n {\r\n try {\r\n pondred.add(loadXMLFromString(xml));\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n System.out.println(\"Ending parsing\");\r\n for (Core pon:pondred){\r\n for (String string:pon.abstractTerm){\r\n Double tf = pon.getAbstractFerq(string)/pon.getAbstractSize();\r\n Double idf = Math.log10(Core.count/countingDuplicates(string));\r\n pon.abstractFrequence.put(string,tf*idf);\r\n }\r\n pon.finish();\r\n }\r\n }", "public List<String> getRelatedWords(String word) throws IOException {\n List<String> result = new ArrayList<String>();\n IDictionary dict = new Dictionary(new File(WORDNET_LOCATION));\n try {\n dict.open();\n IStemmer stemmer = new WordnetStemmer(dict);\n for (POS pos : EnumSet.of(POS.ADJECTIVE, POS.ADVERB, POS.NOUN, POS.VERB)) {\n List<String> resultForPos = new ArrayList<String>();\n List<String> stems = new ArrayList<String>();\n stems.add(word);\n for (String stem : stemmer.findStems(word, pos)) {\n if (!stems.contains(stem))\n stems.add(stem);\n }\n for (String stem : stems) {\n if (!resultForPos.contains(stem)) {\n resultForPos.add(stem);\n IIndexWord idxWord = dict.getIndexWord(stem, pos);\n if (idxWord == null) continue;\n List<IWordID> wordIDs = idxWord.getWordIDs();\n if (wordIDs == null) continue;\n IWordID wordID = wordIDs.get(0);\n IWord iword = dict.getWord(wordID);\n \n ISynset synonyms = iword.getSynset();\n List<IWord> iRelatedWords = synonyms.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n \n List<ISynsetID> hypernymIDs = synonyms.getRelatedSynsets();\n if (hypernymIDs != null) {\n for (ISynsetID relatedSynsetID : hypernymIDs) {\n ISynset relatedSynset = dict.getSynset(relatedSynsetID);\n if (relatedSynset != null) {\n iRelatedWords = relatedSynset.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n }\n }\n }\n }\n }\n for (String relatedWord : resultForPos) {\n if (relatedWord.length() > 3\n && !relatedWord.contains(\"-\")\n && !result.contains(relatedWord)) {\n // TODO: Hack alert!\n // The - check is to prevent lucene from interpreting hyphenated words as negative search terms\n // Fix!\n result.add(relatedWord);\n }\n }\n }\n } finally {\n dict.close();\n }\n return result;\n }", "public WordNet(String synsets, String hypernyms) throws IOException {\n\n this.synsetsMap = new HashMap<Integer, ArrayList<String>>();\n this.nounsMap = new HashMap<String, ArrayList<Integer>>();\n this.edgesMap = new HashMap<Integer, ArrayList<Integer>>();\n int graphNodes = 0; \n \n // Process synsets.txt\n BufferedReader br = new BufferedReader(new FileReader(synsets));\n String line;\n while ((line = br.readLine()) != null) {\n String[] items = line.split(\",\");\n int synsetID = Integer.parseInt(items[0]);\n String[] nouns = items[1].split(\" \");\n \n for (String noun : nouns) {\n if (!nounsMap.containsKey(noun)) {\n nounsMap.put(noun, new ArrayList<Integer>());\n }\n nounsMap.get(noun).add(synsetID);\n }\n \n if (!synsetsMap.containsKey(synsetID)) {\n synsetsMap.put(synsetID, new ArrayList<String>());\n }\n \n for (String noun : nouns) {\n synsetsMap.get(synsetID).add(noun);\n }\n graphNodes++; \n }\n br.close();\n\n // Process hypernyms.txt\n br = new BufferedReader(new FileReader(hypernyms));\n while ((line = br.readLine()) != null) {\n String[] items = line.split(\",\");\n int hypernymID = Integer.parseInt(items[0]);\n \n if (!edgesMap.containsKey(hypernymID)) {\n edgesMap.put(hypernymID, new ArrayList<Integer>());\n }\n \n for (int i = 1; i < items.length; i++) {\n edgesMap.get(hypernymID).add(Integer.parseInt(items[i]));\n }\n }\n br.close();\n \n // Construct Graph\n this.G = new Digraph(graphNodes);\n for (Map.Entry<Integer, ArrayList<Integer>> entry : edgesMap.entrySet()) {\n for (int edge : entry.getValue()) {\n this.G.addEdge(entry.getKey(), edge);\n }\n }\n \n // Check if there's a cycle\n DirectedCycle cycle = new DirectedCycle(this.G);\n if (cycle.hasCycle()) {\n throw new java.lang.IllegalArgumentException();\n }\n \n // Construct SAP \n this.sap = new SAP(this.G);\n }", "public static void main(String[] args) throws Exception \n\t{\n\t\tList<String> stopWords = new ArrayList<String>();\n\t\tstopWords = stopWordsCreation();\n\n\n\t\t\n\t\tHashMap<Integer, String> hmap = new HashMap<Integer, String>();\t//Used in tittle, all terms are unique, and any dups become \" \"\n\t\n\t\t\n\t\tList<String> uniqueTerms = new ArrayList<String>();\n\t\tList<String> allTerms = new ArrayList<String>();\n\t\t\t\t\n\t\t\n\t\tHashMap<Integer, String> hmap2 = new HashMap<Integer, String>();\n\t\tHashMap<Integer, String> allValues = new HashMap<Integer, String>();\n\t\tHashMap<Integer, Double> docNorms = new HashMap<Integer, Double>();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMap<Integer, List<String>> postingsFileListAllWords = new HashMap<>();\t\t\n\t\tMap<Integer, List<String>> postingsFileList = new HashMap<>();\n\t\t\n\t\tMap<Integer, List<StringBuilder>> docAndTitles = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAbstract = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAuthors = new HashMap<>();\n\t\t\n\t\t\n\t\tMap<Integer, List<Double>> termWeights = new HashMap<>();\n\t\t\n\t\tList<Integer> docTermCountList = new ArrayList<Integer>();\n\t\t\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tString sCurrentLine;\n\n\t\tint documentCount = 0;\n\t\tint documentFound = 0;\n\t\tint articleNew = 0;\n\t\tint docTermCount = 0;\n\t\t\n\t\t\n\t\tboolean abstractReached = false;\n\n\t\ttry {\n\t\t\tfr = new FileReader(FILENAME);\n\t\t\tbr = new BufferedReader(fr);\n\n\t\t\t// Continues to get 1 line from document until it reaches the end of EVERY doc\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) \n\t\t\t{\n\t\t\t\t// sCurrentLine now contains the 1 line from the document\n\n\t\t\t\t// Take line and split each word and place them into array\n\t\t\t\tString[] arr = sCurrentLine.split(\" \");\n\n\n\t\t\t\t//Go through the entire array\n\t\t\t\tfor (String ss : arr) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * This section takes the array and checks to see if it has reached a new\n\t\t\t\t\t * document or not. If the current line begins with an .I, then it knows that a\n\t\t\t\t\t * document has just started. If it incounters another .I, then it knows that a\n\t\t\t\t\t * new document has started.\n\t\t\t\t\t */\n\t\t\t\t\t//System.out.println(\"Before anything: \"+sCurrentLine);\n\t\t\t\t\tif (arr[0].equals(\".I\")) \n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\tif (articleNew == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 1;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if (articleNew == 1) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 0;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t//System.out.println(documentFound);\n\t\t\t\t\t\t//count++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* This section detects that after a document has entered,\n\t\t\t\t\t * it has to gather all the words contained in the title \n\t\t\t\t\t * section.\n\t\t\t\t\t */\n\t\t\t\t\tif (arr[0].equals(\".T\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndTitles.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".B|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (String tittleWords : tittle)\n\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\ttittleWords = tittleWords.toLowerCase();\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'*{}|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\t//System.out.println(tittleWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(tittleWords)) \n\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\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\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(tittleWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(tittleWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\ttitle.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndTitles.get(documentFound).add(title);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (arr[0].equals(\".A\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndAuthors.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder author = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tauthor.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\tauthor.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndAuthors.get(documentFound).add(author);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* Since there may or may not be an asbtract after\n\t\t\t\t\t * the title, we need to check what the next section\n\t\t\t\t\t * is. We know that every doc has a publication date,\n\t\t\t\t\t * so it can end there, but if there is no abstract,\n\t\t\t\t\t * then it will keep scanning until it reaches the publication\n\t\t\t\t\t * date. If abstract is empty (in tests), it will also finish instantly\n\t\t\t\t\t * since it's blank and goes straight to .B (the publishing date).\n\t\t\t\t\t * Works EXACTLY like Title \t\t \n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (abstractReached) \n\t\t\t\t\t{\t\n\t\t\t\t\t\t//System.out.println(\"\\n\");\n\t\t\t\t\t\t//System.out.println(\"REACHED ABSTRACT and current line is: \" +sCurrentLine);\n\t\t\t\t\t\tdocAndAbstract.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\tStringBuilder totalAbstract = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".T|.I|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tString[] abstaract = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (abstaract[0].equals(\".B\") )\n\t\t\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\t\t\tabstractReached = false;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttotalAbstract.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] misc = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tfor (String miscWords : misc) \n\t\t\t\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\tmiscWords = miscWords.toLowerCase(); \n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|?{}!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\t//System.out.println(miscWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(miscWords)) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\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\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(miscWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(miscWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\ttotalAbstract.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocAndAbstract.get(documentFound).add(totalAbstract);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t//Once article is found, we enter all of of it's title and abstract terms \n\t\t\t\tif (articleNew == 0) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tdocumentFound = documentFound - 1;\n\t\t\t\t\t//System.out.println(\"Words found in Doc: \" + documentFound);\n\t\t\t\t\t//System.out.println(\"Map is\" +allValues);\n\t\t\t\t\tSet set = hmap.entrySet();\n\t\t\t\t\tIterator iterator = set.iterator();\n\n\t\t\t\t\tSet set2 = allValues.entrySet();\n\t\t\t\t\tIterator iterator2 = set2.iterator();\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileList.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\tdocTermCount++;\n\t\t\t\t\t}\n\t\t\t\t\t// \"BEFORE its put in, this is what it looks like\" + hmap);\n\t\t\t\t\thmap2.putAll(hmap);\n\t\t\t\t\thmap.clear();\n\t\t\t\t\tarticleNew = 1;\n\n\t\t\t\t\tdocTermCountList.add(docTermCount);\n\t\t\t\t\tdocTermCount = 0;\n\n\t\t\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry2 = (Map.Entry) iterator2.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\t// docTermCount++;\n\t\t\t\t\t}\n\n\t\t\t\t\tallValues.clear();\t\t\t\t\t\n\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\n\t\t\t\t\t// \"MEANWHILE THESE ARE ALL VALUES\" + postingsFileListAllWords);\n\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Looking at final doc!\");\n\t\t\t//Final loop for last sets\n\t\t\tSet set = hmap.entrySet();\n\t\t\tIterator iterator = set.iterator();\n\n\t\t\tSet setA = allValues.entrySet();\n\t\t\tIterator iteratorA = setA.iterator();\n\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t// //);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\tString term2 = mentry.getValue().toString();\n\t\t\t\tpostingsFileList.get(documentFound - 1).add(term2);\n\n\t\t\t\tdocTermCount++;\n\t\t\t}\n\t\t\t//System.out.println(\"Done looking at final doc!\");\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Sorting time!\");\n\t\t\twhile (iteratorA.hasNext()) {\n\t\t\t\tMap.Entry mentry2 = (Map.Entry) iteratorA.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t// //);\n\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t// docTermCount++;\n\t\t\t}\n\n\t\t\thmap2.putAll(hmap);\n\t\t\thmap.clear();\n\t\t\tdocTermCountList.add(docTermCount);\n\t\t\tdocTermCount = 0;\n\n\n\t\t\t\n\t\t\n\t\t\t// END OF LOOKING AT ALL DOCS\n\t\t\t\n\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms);\n\t\t\tString[] sortedArray = allTerms.toArray(new String[0]);\n\t\t\tString[] sortedArrayUnique = uniqueTerms.toArray(new String[0]);\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t\n\t\t\tArrays.sort(sortedArray);\n\t\t\tArrays.sort(sortedArrayUnique);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//Sortings \n\t\t\tSet set3 = hmap2.entrySet();\n\t\t\tIterator iterator3 = set3.iterator();\n\n\t\t\t// Sorting the map\n\t\t\t//System.out.println(\"Before sorting \" +hmap2);\t\t\t\n\t\t\tMap<Integer, String> map = sortByValues(hmap2);\n\t\t\t//System.out.println(\"after sorting \" +map);\n\t\t\t// //\"After Sorting:\");\n\t\t\tSet set2 = map.entrySet();\n\t\t\tIterator iterator2 = set2.iterator();\n\t\t\tint docCount = 1;\n\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\tMap.Entry me2 = (Map.Entry) iterator2.next();\n\t\t\t\t// (me2.getKey() + \": \");\n\t\t\t\t// //me2.getValue());\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"Done sorting!\");\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Posting starts \");\n\t\t\t//\"THIS IS START OF DICTIONARTY\" \n\t\t\tBufferedWriter bw = null;\n\t\t\tFileWriter fw = null;\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Start making an array thats big as every doc total \");\n\t\t\tfor (int z = 1; z < documentFound+1; z++)\n\t\t\t{\n\t\t\t\ttermWeights.put(z, new ArrayList<Double>());\n\t\t\t}\n\t\t\t//System.out.println(\"Done making that large array Doc \");\n\t\t\t\n\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms)\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t//System.out.println(Arrays.toString(sortedArrayUnique));\n\t\t\t//System.out.println(uniqueTerms);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//\tSystem.out.println(\"Posting starts \");\n\t\t\t// \tPOSTING FILE STARTS \n\t\t\ttry {\n\t\t\t\t// Posting File\n\t\t\t\t//System.out.println(\"postingsFileListAllWords: \"+postingsFileListAllWords); //Contains every word including Dups, seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileList: \"+postingsFileList); \t\t //Contains unique words, dups are \" \", seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileListAllWords.size(): \" +postingsFileListAllWords.size()); //Total # of docs \n\t\t\t\t//System.out.println(\"Array size: \"+sortedArrayUnique.length);\n\n\t\t\t\tfw = new FileWriter(POSTING);\n\t\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\tString temp = \" \";\n\t\t\t\tDouble termFreq = 0.0;\n\t\t\t\t// //postingsFileListAllWords);\n\t\t\t\tList<String> finalTermList = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t// //postingsFileList.get(i).size());\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(finalTermList.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//PART TO FIND DOCUMENT FREQ\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint docCountIDF = 0;\n\t\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\t\tfor (int totalWords = 0; totalWords < sortedArray.length; totalWords++) \t\t\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD \n\t\t\t\t\t\t\t\t\t//System.out.println(\"fOUND STOP WORD\");\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\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\t\tString temp2 = sortedArray[totalWords];\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tdocCountIDF++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"Total Number: \" +docCountIDF);\n\t\t\t\t\t\t\t//System.out.println(\"documentFound: \" +documentFound);\n\t\t\t\t\t\t\t//System.out.println(\"So its \" + documentFound + \" dividied by \" +docCountIDF);\n\t\t\t\t\t\t\t//docCountIDF = 1;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble idf = (Math.log10(((double)documentFound/(double)docCountIDF)));\n\t\t\t\t\t\t\t//System.out.println(\"Calculated IDF: \"+idf);\n\t\t\t\t\t\t\tif (idf < 0.0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tidf = 0.0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"IDF is: \" +idf);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Size of doc words: \" + postingsFileListAllWords.size());\n\t\t\t\t\t\t\tfor (int k = 0; k < postingsFileListAllWords.size(); k++) \t\t//Go thru each doc. Since only looking at 1 term, it does it once per doc\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//System.out.println(\"Current Doc: \" +(k+1));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttermFreq = 1 + (Math.log10(Collections.frequency(postingsFileListAllWords.get(k), temp)));\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Freq is: \" +Collections.frequency(postingsFileListAllWords.get(k), temp));\n\t\t\t\t\t\t\t\t\t//System.out.println(termFreq + \": \" + termFreq.isInfinite());\n\t\t\t\t\t\t\t\t\tif (termFreq.isInfinite() || termFreq <= 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttermFreq = 0.0;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"termFreq :\" +termFreq); \n\t\t\t\t\t\t\t\t\t//System.out.println(\"idf: \" +idf);\n\t\t\t\t\t\t\t\t\ttermWeights.get(k+1).add( (idf*termFreq) );\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t\t\tfinalTermList.add(temp);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//FINALCOUNTER\n\t\t\t\t\t\t//System.out.println(\"Done looking at word: \" +j);\n\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\twhile (true)\n\t\t\t\t {\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Enter a query: \");\n\t\t\t\t\t\n\t \tScanner scanner = new Scanner(System.in);\n\t \tString enterQuery = scanner.nextLine();\n\t \t\n\t \t\n\t\t\t\t\tList<Double> queryWeights = new ArrayList<Double>();\n\t\t\t\t\t\n\t\t\t\t\t// Query turn\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tenterQuery = enterQuery.toLowerCase();\t\t\n\t\t\t\t\tenterQuery = enterQuery.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"]\", \"\");\n\t\t\t\t\t//System.out.println(\"Query is: \" + enterQuery);\n\t\t\t\t\t\n\t\t\t\t\tif (enterQuery.equals(\"exit\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tString[] queryArray = enterQuery.split(\" \");\n\t\t\t\t\tArrays.sort(queryArray);\n\t\t\t\t\t\n\t\t\t\t\t//Find the query weights for each term in vocab\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tint docCountDF = 0;\n\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\tfor (int totalWords = 0; totalWords < queryArray.length; totalWords++) \t\t\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString temp2 = queryArray[totalWords];\n\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocCountDF++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tDouble queryWeight = 1 + (Math.log10(docCountDF));\n\t\t\t\t\t\tif (queryWeight.isInfinite())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueryWeight = 0.0;\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tqueryWeights.add(queryWeight);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query WEights is: \"+queryWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Finding the norms for DOCS\t\t\t\t\t\n\t\t\t\t\tfor (int norms = 1; norms < documentFound+1; norms++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble currentTotal = 0.0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < termWeights.get(norms).size(); weightsPerDoc++)\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble square = Math.pow(termWeights.get(norms).get(weightsPerDoc), 2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Current square: \" + termWeights.get(norms).get(weightsPerDoc));\n\t\t\t\t\t\t\tcurrentTotal = currentTotal + square;\n\t\t\t\t\t\t\t//System.out.println(\"Current total: \" + currentTotal);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"About to square root this: \" +currentTotal);\n\t\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\t\tdocNorms.put(norms, root);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"All of the docs norms: \"+docNorms);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Finding the norm for the query\n\t\t\t\t\tdouble currentTotal = 0.0;\t\t\t\t\t\n\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < queryWeights.size(); weightsPerDoc++)\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tdouble square = Math.pow(queryWeights.get(weightsPerDoc), 2);\n\t\t\t\t\t\tcurrentTotal = currentTotal + square;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\tdouble queryNorm = root; \t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query norm \" + queryNorm);\n\t\t\t\t\t\n\t\t\t\t\t//Finding the cosine sim\n\t\t\t\t\t//System.out.println(\"Term Weights \" + termWeights);\n\t\t\t\t\tHashMap<Integer, Double> cosineScore = new HashMap<Integer, Double>();\n\t\t\t\t\tfor (int cosineSim = 1; cosineSim < documentFound+1; cosineSim++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble total = 0.0;\n\t\t\t\t\t\tfor (int docTerms = 0; docTerms < termWeights.get(cosineSim).size(); docTerms++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble docTermWeight = termWeights.get(cosineSim).get(docTerms);\n\t\t\t\t\t\t\tdouble queryTermWeight = queryWeights.get(docTerms);\n\t\t\t\t\t\t\t//System.out.println(\"queryTermWeight \" + queryTermWeight);\n\t\t\t\t\t\t\t//System.out.println(\"docTermWeight \" + docTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttotal = total + (docTermWeight*queryTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdouble cosineSimScore = 0.0;\n\t\t\t\t\t\tif (!(total == 0.0 || (docNorms.get(cosineSim) * queryNorm) == 0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = total / (docNorms.get(cosineSim) * queryNorm);\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\tcosineSimScore = 0.0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tcosineScore.put(cosineSim, cosineSimScore);\n\t\t\t\t\t}\n\t\t\t\t\tcosineScore = sortByValues2(cosineScore);\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"This is the cosineScores: \" +cosineScore);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"docAndTitles: \"+ docAndTitles);\n\t\t\t\t\tint topK = 0;\n\t\t\t\t\tint noValue = 0;\n\t\t\t\t\tfor (Integer name: cosineScore.keySet())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (topK < 50)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\n\t\t\t\t String key =name.toString();\n\t\t\t\t //String value = cosineScore.get(name).toString(); \n\t\t\t\t if (!(cosineScore.get(name) <= 0))\n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"Doc: \"+key);\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \tStringBuilder builder = new StringBuilder();\n\t\t\t\t \tfor (StringBuilder value : docAndTitles.get(name)) {\n\t\t\t\t \t builder.append(value);\n\t\t\t\t \t}\n\t\t\t\t \tString text = builder.toString();\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Title:\\n\" +docAndTitles.get(name));\n\t\t\t\t \tSystem.out.println(\"Title: \" +text);\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Authors:\\n\" +docAndAuthors.get(name));\n\t\t\t\t \t\n\t\t\t\t \tif (docAndAuthors.get(name) == null || docAndAuthors.get(name).toString().equals(\"\"))\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Authors: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAuthors.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Authors found: \" +text2);\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/* ABSTRACT \n\t\t\t\t \tif (docAndAbstract.get(name) == null)\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Abstract: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAbstract.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Abstract: \" +text2);\n\t\t\t\t \t}\t\n\t\t\t\t \t*/\n\t\t\t\t \t\n\t\t\t\t \tSystem.out.println(\"\");\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t \tnoValue++;\n\t\t\t\t }\n\t\t\t\t topK++;\n\t\t\t\t \n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (noValue == documentFound)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"No documents contain query!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\ttopK=0;\n\t\t\t\t\tnoValue = 0;\n\t\t\t\t }\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bw != null)\n\t\t\t\t\t\tbw.close();\n\n\t\t\t\t\tif (fw != null)\n\t\t\t\t\t\tfw.close();\n\n\t\t\t\t} catch (IOException ex) {\n\n\t\t\t\t\tex.printStackTrace();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\n\t\t\t\tif (fr != null)\n\t\t\t\t\tfr.close();\n\n\t\t\t} catch (IOException ex) {\n\n\t\t\t\tex.printStackTrace();\n\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tint itemCount = uniqueTerms.size();\n\t\t\t//System.out.println(allValues);\n\t\t\tSystem.out.println(\"Total Terms BEFORE STEMING: \" +itemCount);\n\t\t\tSystem.out.println(\"Total Documents \" + documentFound);\n\t\t\t\t\t\t\n\t\t \n\t\t\t \n\t\t\t \n\t\t\t//END OF MAIN\n\t\t}", "public void set_graph() throws ParseException, IOException {\n \tg = new WeightedUndirectedGraph(words.length);\n //g = new WeightedUndirectedGraph(most_important_terms.size());\n \n Directory dir = new SimpleFSDirectory(new File(\".\\\\data\\\\lucene_index_r_r\"));\n Analyzer analyzer = new StandardAnalyzer(LUCENE_41);\n \n // creat a map that stores, for each word (in the cluster), a set of all the documents that contain that word\n HashMap<String,HashSet<Integer>> word_to_docs_map = new HashMap<String,HashSet<Integer>>();\n int n_strings = words.length; \n \n // for each word...\n for (int idx = 0; idx < n_strings; idx++) {\n // query the index with that given word and retrieve all the documents that contains that word\n String query = words[idx]; \n QueryParser parser = new QueryParser(Version.LUCENE_41, \"text\", analyzer); \n Query q = parser.parse(query); \n\n IndexReader reader = DirectoryReader.open(dir);\n IndexSearcher searcher = new IndexSearcher(reader);\n TopDocs docs = searcher.search(q, reader.numDocs());\n ScoreDoc[] hits = docs.scoreDocs;\n \n // update map from word to docs it appears in \n //HashSet<Integer> tmp = null;\n // tmp is the set of all the document ids in which the current word is contained\n HashSet<Integer> tmp = new HashSet<>();\n //word_to_docs_map.put(query, tmp);\n \n // for each document, retrieved from the query\n for(Integer i=0;i<hits.length;i++) {\n Integer docId = hits[i].doc;\n // tmp = word_to_docs_map.get(query); \n // if the document is a document written by an user of interest \n if(indices.contains(docId)) {\n tmp.add(docId);\n }\n //word_to_docs_map.put(query, tmp); \n }\n word_to_docs_map.put(query, tmp);\n\t }\n\t \n\t // add edges: iterate over possible term pairs ...\n\t for(int idx_1 = 0; idx_1 < n_strings - 1; idx_1++) {\n\t \n\t for(int idx_2 = idx_1 + 1 ; idx_2 < n_strings ; idx_2 ++ ) {\n\t \n\t // extract document sets associated with the considered terms \n\t HashSet<Integer> set_a = word_to_docs_map.get(words[idx_1]); \n\t HashSet<Integer> set_b = word_to_docs_map.get(words[idx_2]); \n\t \n\t // compute set intersection \n\t int n = intersectionSize(set_a, set_b);\n\t \n\t // if the terms appear in at least one common document\n\t if(n>0) {\n\t // add edge \n\t g.testAndAdd(idx_1, idx_2 , n); \n\t }\n\t } \n\t }\n\t}", "public void ComputeSimilarity() {\n\t\t\n\t\t//first construct the vector space representations for these five reviews\n\t\t// the our smaples vector, finally get the similarity metric \n\t\tanalyzequery(LoadJson(\"./data/samples/query.json\"));\n\t\n\t\t\n\t\tHashMap<String, Double> Similarity = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < m_reviews.size(); i++) {\n\t\t\tString content = m_reviews.get(i).getContent();\n\n\t\t\tHashMap<String, Integer> conunttf = new HashMap<String, Integer>();\n\n\t\t\tHashSet<String> biminiset = new HashSet<String>();\n \n\t\t\t//danci means word unit: one or two words\n\t\t\tArrayList danci = new ArrayList();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (token.isEmpty())\n\t\t\t\t\tcontinue;\n\n\t\t\t\tdanci.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t}\n \n\t\t\t//get word count in a document\n\t\t\tfor (int k = 0; k < danci.size(); k++) {\n\n\t\t\t\tif (conunttf.containsKey(danci.get(k).toString())) {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(),\n\t\t\t\t\t\t\tconunttf.get(danci.get(k).toString()) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(), 1);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\n\t\t\t\t\tN_gram.add(token);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tString[] fine = new String[N_gram.size()];\n \n\t\t\t//get rid of stopwords\n\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t}\n\n\t\t\t\n\t\t\tfor (String str2 : fine) {\n\n\t\t\t\tif (conunttf.containsKey(str2)) {\n\t\t\t\t\tconunttf.put(str2, conunttf.get(str2) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(str2, 1);\n\t\t\t\t}\n\t\t\t}\n \n\t\t\t//compute tf * idf for each document\n\t\t\tfor (String key : conunttf.keySet()) {\n\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\tdouble tf = conunttf.get(key);\n\n\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\tm_idf.put(key, result);\n\t\t\t\t} else {\n\t\t\t\t\tm_idf.put(key, 0.0);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\tHashMap<String, Double> query = new HashMap<String, Double>();\n\t\t\tHashMap<String, Double> test = new HashMap<String, Double>();\n \n\t\t\t//If query contains this word, store it for future computation \n\t\t\tfor (Map.Entry<String, Double> entry : m_idf.entrySet()) {\n\t\t\t\tString key = entry.getKey();\n\t\t\t\tif (query_idf.containsKey(key)) {\n\t\t\t\t\tquery.put(key, query_idf.get(key));\n\t\t\t\t\ttest.put(key, m_idf.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdouble dotProduct = 0.00;\n\t\t\tdouble magnitude1 = 0.0;\n\t\t\tdouble magnitude2 = 0.0;\n\t\t\tdouble magnitude3 = 0.0;\n\t\t\tdouble magnitude4 = 0.0;\n\t\t\tdouble cosineSimilarity = 0;\n \n\t\t\t\n\t\t\t//compute Compute similarity between query document and each document in file\n\t\t\tfor (String cal : test.keySet()) {\n\t\t\t\tdotProduct += query.get(cal) * test.get(cal); // a.b\n\t\t\t\tmagnitude1 += Math.pow(query.get(cal), 2); // (a^2)\n\t\t\t\tmagnitude2 += Math.pow(test.get(cal), 2); // (b^2)\n\n\t\t\t\tmagnitude3 = Math.sqrt(magnitude1);// sqrt(a^2)\n\t\t\t\tmagnitude4 = Math.sqrt(magnitude2);// sqrt(b^2)\n\t\t\t}\n\n\t\t\tif (magnitude3 != 0.0 | magnitude4 != 0.0)\n\t\t\t\tcosineSimilarity = dotProduct / (magnitude3 * magnitude4);\n\n\t\t\telse\n\t\t\t\tcosineSimilarity = 0;\n\n\t\t\tSimilarity.put(content, cosineSimilarity);\n\n\t\t\t\t\t\n\n\t\t}\n\n\t\t// sort output to get 3 reviews with the highest similarity with query review\n\t\tList<Map.Entry<String, Double>> infoIds = new ArrayList<Map.Entry<String, Double>>(\n\t\t\t\tSimilarity.entrySet());\n\n\t\tCollections.sort(infoIds, new Comparator<Map.Entry<String, Double>>() {\n\t\t\tpublic int compare(Map.Entry<String, Double> o1,\n\t\t\t\t\tMap.Entry<String, Double> o2) {\n\t\t\t\treturn (int) (o1.getValue() - o2.getValue());\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = infoIds.size() - 1; i > infoIds.size() - 4; i--) {\n\t\t\tEntry<String, Double> ent = infoIds.get(i);\n\t\t\tSystem.out.println(ent.getValue()+\"++\"+ent.getKey()+\"\\n\");\n\n\t\t}\n\n\t}", "private Map<String, Map<String,Integer>> openNLPParse(String text) {\n\t\tMap<String, Map<String,Integer>> result = new HashMap<String, Map<String,Integer>>();\n\t\tString path = \"\";\n\t\t\n\t\tfor (String type : this.entityTypes) {\n\t\t\tpath = \"en-ner-\" + type.toLowerCase() + \".bin\";\n\t\t\tthis.nlp = new OpenNLPNameFinder(type, path);\n\t\t\tMap<String,Integer> entities = nlp.recogniseWithCounts(text);\n\t\t\tresult.put(type, entities);\n\t\t}\n\n\t\treturn result;\n\t}", "public static List<ExtractedEntity> extractEntities(String text){\n\t\tList<ExtractedEntity> extractedConcepts = new ArrayList<ExtractedEntity>();\n\t\tZemanta zem = new Zemanta(ZEMAMTA_API_KEY);\t\n\t\tZemantaResult zemResult = zem.suggest(text);\n\t\tString cid = zemResult.rid;\n\t\tfor(Link link : zemResult.markup.links){\n\t\t\tString term = link.anchor;\n\t\t\tfor(Target target : link.targets){\n\t\t\t\tif(target.url != null && target.url.startsWith(\"http://en.wikipedia.org/wiki/\")){\n\t\t\t\t\tExtractedEntity entity = new AlchemyAnnotator().new ExtractedEntity();\n\t\t\t\t\tentity.name = target.title;\n\t\t\t\t\tentity.type = target.type.name();\n\t\t\t\t\tentity.uri = target.url.replace(\"http://en.wikipedia.org/wiki/\", \"http://dbpedia.org/resource/\");\n\t\t\t\t\tentity.score = new Float(link.confidence).doubleValue();\n\t\t\t\t\tentity.text = link.anchor;\n\t\t\t\t\textractedConcepts.add(entity);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn extractedConcepts;\n\t}", "@Override\n public void process(JCas jCas) throws AnalysisEngineProcessException {\n JCas viewJCas = jCas;\n if (!view.equals(VIEW_SYSTEM)) {\n try {\n viewJCas = jCas.getView(view);\n } catch (CASException e) {// just rethrow\n throw new AnalysisEngineProcessException(e);\n }\n }\n\n Collection<de.julielab.jules.types.Sentence> sentences = select(\n viewJCas, de.julielab.jules.types.Sentence.class);\n\n for (de.julielab.jules.types.Sentence julesSentence : sentences) {\n int sentence_start = julesSentence.getBegin();\n\n if (julesSentence.getCoveredText().length() > 0) {\n\n try {\n Sentence sentence = new Sentence(\n julesSentence.getCoveredText());\n bannerTokenizer.tokenize(sentence);\n crfTagger.tag(sentence);// error\n if (postProcessor != null)\n postProcessor.postProcess(sentence);\n\n for (Mention mention : sentence.getMentions()) {\n\n int startChar = mention.getStartChar() + sentence_start;\n int endChar = mention.getEndChar() + sentence_start;\n // LOG.debug(\"found NE:\" + mention.getText() + \" \" +\n // startChar\n // + \":\" + endChar);\n Protein prot = new Protein(viewJCas, startChar, endChar);\n prot.setName(mention.getText());\n prot.setTextualRepresentation(\"⊂PROT⊃\");\n prot.addToIndexes();\n }\n\n } catch (Throwable t) {\n // not sure why, but this happens sometimes after some time\n int docId = getHeaderIntDocId(viewJCas);\n LOG.warn(\"Banner exception at docId {}, skipping. {}\",\n docId, StringUtils.print(t));\n try {\n GarbageCollectorAnnotator.runGC();\n loadTagger(); // reload\n } catch (Exception e) {\n throw new AnalysisEngineProcessException(e);\n }\n }\n }\n }\n }", "public void analyzeDocumentDemo(JSONObject json) {\n\t\ttry {\n\t\t\tJSONArray jarray = json.getJSONArray(\"Reviews\");\n\t\t\tfor (int i = 0; i < jarray.length(); i++) {\n\t\t\t\tPost review = new Post(jarray.getJSONObject(i));\n\t\t\t\tString content = review.getContent();\n\n\n\t\t\t\tHashSet<String> uniminiset = new HashSet<String>();\n\t\t\t\tHashSet<String> biminiset = new HashSet<String>();\n\n\t\t\t\tString[] unigram = tokenizer.tokenize(content);\n\n\t\t\t\tfor (String token : unigram) {\n\t\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\n\t\t\t\t\tuniminiset.add(token);\n\t\t\t\t}\n\n\t\t\t\t// count word frequency for unigram\n\t\t\t\tfor (String token2 : uniminiset) {\n\t\t\t\t\tif (m_stopwords.contains(token2))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse {\n\t\t\t\t\t\ttoken2 = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token2)));\n\t\t\t\t\t\tif (m_stats.containsKey(token2)) {\n\t\t\t\t\t\t\tm_stats.put(token2, m_stats.get(token2) + 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tm_stats.put(token2, 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tN_gram.add(token);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tString[] fine = new String[N_gram.size()];\n // In bigram, neither two words should occur in the stopwords\n\t\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t\t}\n\n\t\t\t\tfor (String str : fine) {\n\n\t\t\t\t\tbiminiset.add(str);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// count word frequency for unigram\n\t\t\t\tfor (String str2 : biminiset) {\n\n\t\t\t\t\tif (m_stats.containsKey(str2)) {\n\t\t\t\t\t\tm_stats.put(str2, m_stats.get(str2) + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tm_stats.put(str2, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n \n\t\t\t\t// store review content on m_reviews so later on when want to use it \n\t\t\t\t// we do not have to reread it from file\n\t\t\t\tm_reviews.add(review);\n \n\t\t\t\t//monitor the process of the program\n\t\t\t\tSystem.out.println(\"level\" + m_reviews.size());\n\n\t\t\t}\n\t\t}\n\n\t\tcatch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static HashMultimap<Word, EntityMention> getWord2Entities(JCas aJCas) {\n HashMultimap<Word, EntityMention> word2EntityMentions = HashMultimap.create();\n for (EntityMention em : UimaConvenience.getAnnotationList(aJCas, EntityMention.class)) {\n List<Word> coveredWords = JCasUtil.selectCovered(Word.class, em);\n for (Word coveredWord : coveredWords) {\n word2EntityMentions.put(coveredWord, em);\n }\n }\n return word2EntityMentions;\n }", "public ArrayList<Relation> extractRelations(LexicalizedParser lp) {\n\t\tBreakIterator iterator = BreakIterator.getSentenceInstance(Locale.US);\n\t\titerator.setText(body);\n\t\tint start = iterator.first();\n\t\tint sentenceCounter = 0;\n\t\tfor (int end = iterator.next();\n\t\t\t\tend != BreakIterator.DONE;\n\t\t\t\tstart = end, end = iterator.next()) {\n\t\t\tsentenceCounter++;\n\t\t\t/* list of NP in the sentence */\n\t\t\tArrayList<Tree> NPList;\n\t\t\t/* two NP will be used to extract relations */\n\t\t\tTree e1, e2;\n\t\t\tint e1Index, e2Index;\n\t\t\t\n\t\t\t// parse sentence\n\t\t\tString sentence = body.substring(start,end);\n\t\t\tString nerSentence = Processor.ner.runNER(sentence);\n\t\t\tString taggedSentence = Processor.tagger.tagSentence(sentence);\n\t\t\tTree parse = lp.apply(sentence);\n\t\t\t\n\t\t\t// generateNPList\n\t\t\tNPList = generateNPList(parse);\n\n\t\t\t// walk through NP list, select all e1 & e2 paris and construct relations\n\t\t\tif (NPList.size() < 2) \n\t\t\t\tcontinue;\n\t\t\tfor (e1Index = 0; e1Index < NPList.size() - 1; ++e1Index) {\n\t\t\t\tfor (e2Index = e1Index + 1; e2Index < NPList.size(); ++e2Index) {\n\t\t\t\t\tTree NP1 = NPList.get(e1Index);\n\t\t\t\t\tTree NP2 = NPList.get(e2Index);\n\t\t\t\t\t/* If enable export flag is set, then processor is in mode of\n\t\t\t\t\t * reading in predicated labeling file and export records into DB\n\t\t\t\t\t * Otherwise, processor is in mode of labeling itself using set of\n\t\t\t\t\t * rules and output the result to file for training.\n\t\t\t\t\t */\n\t\t\t\t\tboolean mode = !Processor.enableExport;\n\t\t\t\t\trelations.add(new Relation(url, NP1, NP2, sentence, taggedSentence, nerSentence, \n\t\t\t\t\t\t\tparse, (e2Index - e1Index), mode));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"There're \" + sentenceCounter + \" number of sentences in article \" + url);\n\t\treturn relations;\n\t}", "private void analyze() {\n\t\tdouble org = 0;\n\t\tdouble avgIndPerDoc = 0;\n\t\tdouble avgTotalPerDoc = 0;\n\n\t\tfor (Instance instance : instanceProvider.getInstances()) {\n\n\t\t\tint g = 0;\n\t\t\tSet<AbstractAnnotation> orgM = new HashSet<>();\n\n//\t\t\torgM.addAll(instance.getGoldAnnotations().getAnnotations());\n//\t\t\tg += instance.getGoldAnnotations().getAnnotations().size();\n\n\t\t\tfor (AbstractAnnotation instance2 : instance.getGoldAnnotations().getAnnotations()) {\n\n\t\t\t\tResult r = new Result(instance2);\n\n\t\t\t\t{\n////\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getTrend());\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getInvestigationMethod());\n////\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(\n////\t\t\t\t\t\t\tr.getDefinedExperimentalGroups().stream().map(a -> a.get()).collect(Collectors.toList()));\n//\n//\t\t\t\t\torgM.addAll(aa);\n//\t\t\t\t\tg += aa.size();\n\t\t\t\t}\n\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * props of exp\n\t\t\t\t\t */\n\t\t\t\t\tfor (DefinedExperimentalGroup instance3 : r.getDefinedExperimentalGroups()) {\n\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getOrganismModel());\n//\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(instance3.getTreatments());\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> ab = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getDeliveryMethods().stream())\n\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n\t\t\t\t\t\taa.addAll(instance3.getTreatments().stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Treatment(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getDeliveryMethod()).filter(i -> i != null)\n\t\t\t\t\t\t\t\t.collect(Collectors.toList()));\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getAnaesthetics().stream())\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryDevice()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\t// List<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryLocation()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\torgM.addAll(aa);\n\t\t\t\t\t\tg += aa.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tavgIndPerDoc += orgM.size();\n\t\t\tavgTotalPerDoc += g;\n\n\t\t\torg += ((double) orgM.size()) / (g == 0 ? 1 : g);\n//\t\t\tSystem.out.println(((double) orgM.size()) / g);\n\n\t\t}\n\t\tSystem.out.println(\"avgTotalPerDoc = \" + avgTotalPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"avgIndPerDoc = \" + avgIndPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"org = \" + org);\n\t\tSystem.out.println(\"avg. org = \" + (org / instanceProvider.getInstances().size()));\n\t\tSystem.out.println(new DecimalFormat(\"0.00\").format(avgTotalPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(avgIndPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(org / instanceProvider.getInstances().size()));\n\t\tSystem.exit(1);\n\n\t\tStats.countVariables(0, instanceProvider.getInstances());\n\n\t\tint count = 0;\n\t\tfor (SlotType slotType : EntityType.get(\"Result\").getSlots()) {\n\n\t\t\tif (slotType.isExcluded())\n\t\t\t\tcontinue;\n\t\t\tcount++;\n\t\t\tSystem.out.println(slotType.name);\n\n\t\t}\n\t\tSystem.out.println(count);\n\t\tSystem.exit(1);\n\t}", "public ArrayList<Relation> extractRelations(LexicalizedParser lp) {\n \t\tBreakIterator iterator = BreakIterator.getSentenceInstance(Locale.US);\n \t\titerator.setText(body);\n \t\tint start = iterator.first();\n \t\tfor (int end = iterator.next();\n \t\t\t\tend != BreakIterator.DONE;\n \t\t\t\tstart = end, end = iterator.next()) {\n \t\t\t/* list of NP in the sentence */\n \t\t\tArrayList<Tree> NPList;\n \t\t\t/* two NP will be used to extract relations */\n \t\t\tTree e1, e2;\n \t\t\tint e1Index, e2Index;\n \t\t\t\n \t\t\t// parse sentence\n\t\t\tString sentence = \"Jaguar, the luxury auto maker sold 1,214 cars in the U.S.A. when Tom sat on the chair\";\n//\t\t\tString sentence = body.substring(start,end);\n \t\t\tString nerSentence = Processor.ner.runNER(sentence);\n \t\t\tString taggedSentence = Processor.tagger.tagSentence(sentence);\n \t\t\tTree parse = lp.apply(sentence);\n \t\t\t\n \t\t\t// generateNPList\n \t\t\tNPList = generateNPList(parse);\n \n \t\t\t// walk through NP list, select all e1 & e2 paris and construct relations\n \t\t\tif (NPList.size() < 2) \n \t\t\t\tcontinue;\n \t\t\tfor (e1Index = 0; e1Index < NPList.size() - 1; ++e1Index) {\n \t\t\t\tfor (e2Index = e1Index + 1; e2Index < NPList.size(); ++e2Index) {\n \t\t\t\t\tTree NP1 = NPList.get(e1Index);\n \t\t\t\t\tTree NP2 = NPList.get(e2Index);\n \t\t\t\t\t// we only compare NPs that have same depth\n \t\t\t\t\tif (NP1.depth() != NP2.depth()) \n \t\t\t\t\t\tcontinue;\n \t\t\t\t\trelations.add(new Relation(url, NP1, NP2, sentence, taggedSentence, nerSentence, \n \t\t\t\t\t\t\tparse, (e2Index - e1Index), true));\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\treturn relations;\n \t}", "public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}", "public static void Pubmed() throws IOException \n\t{\n\t\t\n\t\tMap<String,Map<String,List<String>>> trainset = null ; \n\t\t//Map<String, List<String>> titles = ReadXMLFile.ReadCDR_TestSet_BioC() ;\n\t File fFile = new File(\"F:\\\\TempDB\\\\PMCxxxx\\\\articals.txt\");\n\t List<String> sents = readfiles.readLinesbylines(fFile.toURL()); \n\t\t\n\t\tSentinfo sentInfo = new Sentinfo() ; \n\t\t\n\t\ttrainset = ReadXMLFile.DeserializeT(\"F:\\\\eclipse64\\\\eclipse\\\\TrainsetTest\") ;\n\t\tLinkedHashMap<String, Integer> TripleDict = new LinkedHashMap<String, Integer>();\n\t\tMap<String,List<Integer>> Labeling= new HashMap<String,List<Integer>>() ;\n\t\t\n\t\tMetaMapApi api = new MetaMapApiImpl();\n\t\tList<String> theOptions = new ArrayList<String>();\n\t theOptions.add(\"-y\"); // turn on Word Sense Disambiguation\n\t theOptions.add(\"-u\"); // unique abrevation \n\t theOptions.add(\"--negex\"); \n\t theOptions.add(\"-v\");\n\t theOptions.add(\"-c\"); // use relaxed model that containing internal syntactic structure, such as conjunction.\n\t if (theOptions.size() > 0) {\n\t api.setOptions(theOptions);\n\t }\n\t \n\t\t\n\t\tif (trainset == null )\n\t\t{\n\t\t\ttrainset = new HashMap<String, Map<String,List<String>>>();\n\t\t}\n\t\t\n\t\t\n\t\t/************************************************************************************************/\n\t\t//Map<String, Integer> bagofwords = semantic.getbagofwords(titles) ; \n\t\t//trainxmllabeling(trainset,bagofwords); \n\t\t/************************************************************************************************/\n\t\t\n\t\t\n\t\tint count = 0 ;\n\t\tint count1 = 0 ;\n\t\tModel candidategraph = ModelFactory.createDefaultModel(); \n\t\tMap<String,List<String>> TripleCandidates = new HashMap<String, List<String>>();\n\t\tfor(String title : sents)\n\t\t{\n\t\t\t\n\t\t\tModel Sentgraph = sentInfo.graph;\n\t\t\tif (trainset.containsKey(title))\n\t\t\t\tcontinue ; \n\t\t\t//8538\n\t\t\tcount++ ; \n\n\t\t\tMap<String, List<String>> triples = null ;\n\t\t\t// get the goldstandard concepts for current title \n\t\t\tList<String> GoldSndconcepts = new ArrayList<String> () ;\n\t\t\tMap<String, Integer> allconcepts = null ; \n\t\t\t\n\t\t\t// this is optional and not needed here , it used to measure the concepts recall \n\t\t\tMap<String, List<String>> temptitles = new HashMap<String, List<String>>(); \n\t\t\ttemptitles.put(title,GoldSndconcepts) ;\n\t\t\t\t\t\t\n\t\t\t// get the concepts \n\t\t\tallconcepts = ConceptsDiscovery.getconcepts(temptitles,api);\n\t\t\t\n\t\t\tArrayList<String> RelInstances1 = SyntaticPattern.getSyntaticPattern(title,allconcepts,FILE_NAME_Patterns) ;\n\t\t\t//Methylated-CpG island recovery assay: a new technique for the rapid detection of methylated-CpG islands in cancer\n\t\t\tif (RelInstances1 != null && RelInstances1.size() > 0 )\n\t\t\t{\n\t\t\t\tcount1++ ;\n\t\t\t\tTripleCandidates.put(title, RelInstances1) ;\n\t\t\t\t\n\t\t\t\tif (count1 == 30)\n\t\t\t\t{\n\t\t\t\t\tReadXMLFile.Serialized(TripleCandidates,\"F:\\\\eclipse64\\\\eclipse\\\\Relationdisc1\") ;\n\t\t\t\t\tcount1 = 0 ;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t\t\n\t\tint i = 0 ;\n\t\ti++ ; \n\t}", "public void calculate(Set<Article> articles) {\n \n Set<ArticleDocument> articleDocuments = new HashSet<>();\n for (Article article : articles) {\n articleDocuments.add(article.getDocument());\n }\n \n VSMDocument positiveWords = new TextDocument(\"positive_words.txt\");\n VSMDocument negativeWords = new TextDocument(\"negative_words.txt\");\n \n ArrayList<VSMDocument> documents = new ArrayList<VSMDocument>();\n documents.add(positiveWords);\n documents.add(negativeWords);\n documents.addAll(articleDocuments);\n \n Corpus corpus = new Corpus(documents);\n \n VectorSpaceModel vectorSpace = new VectorSpaceModel(corpus);\n \n double totalPositive = 0;\n double totalNegative = 0;\n \n \n for(ArticleDocument articleDoc : articleDocuments) {\n VSMDocument doc = (VSMDocument) articleDoc;\n System.out.println(\"\\nComparing to \" + doc);\n double positive = vectorSpace.cosineSimilarity(positiveWords, doc);\n double negative = vectorSpace.cosineSimilarity(negativeWords, doc);\n System.out.println(\"Positive: \" + positive);\n System.out.println(\"Negative: \" + negative);\n if (!Double.isNaN(positive)) {\n totalPositive += positive;\n }\n if (!Double.isNaN(negative)) {\n totalNegative += negative;\n }\n double difference = positive - negative;\n if (difference >= 0) {\n System.out.println(\"More positive by \" + difference);\n } else {\n System.out.println(\"More negative by \" + Math.abs(difference));\n }\n \n if (positive >= mostPositive) {\n mostPositive = positive;\n mostPositiveDoc = doc;\n }\n if (negative >= mostNegative) {\n mostNegative = negative;\n mostNegativeDoc = doc;\n }\n if (Math.abs(difference) >= Math.abs(biggestDifference)) {\n biggestDifference = difference;\n biggestDifferenceDoc = doc;\n }\n \n String publisher = articleDoc.getPublisher();\n String region = articleDoc.getRegion();\n LocalDate day = articleDoc.getDate().toLocalDate();\n DayOfWeek weekday = day.getDayOfWeek();\n if (!Double.isNaN(positive)) {\n if (publisherOptimism.containsKey(publisher)) {\n publisherOptimism.get(publisher).add(positive);\n } else {\n publisherOptimism.put(publisher, new LinkedList<Double>());\n publisherOptimism.get(publisher).add(positive);\n }\n \n if (publisherPessimism.containsKey(publisher)) {\n publisherPessimism.get(publisher).add(negative);\n } else {\n publisherPessimism.put(publisher, new LinkedList<Double>());\n publisherPessimism.get(publisher).add(negative);\n }\n \n if (regionOptimism.containsKey(region)) {\n regionOptimism.get(region).add(positive);\n } else {\n regionOptimism.put(region, new LinkedList<Double>());\n regionOptimism.get(region).add(positive);\n }\n \n if (regionPessimism.containsKey(region)) {\n regionPessimism.get(region).add(negative);\n } else {\n regionPessimism.put(region, new LinkedList<Double>());\n regionPessimism.get(region).add(negative);\n }\n \n if (dayOptimism.containsKey(day)) {\n dayOptimism.get(day).add(positive);\n } else {\n dayOptimism.put(day, new LinkedList<Double>());\n dayOptimism.get(day).add(positive);\n }\n \n if (dayPessimism.containsKey(day)) {\n dayPessimism.get(day).add(negative);\n } else {\n dayPessimism.put(day, new LinkedList<Double>());\n dayPessimism.get(day).add(negative);\n }\n \n if (weekdayOptimism.containsKey(weekday)) {\n weekdayOptimism.get(weekday).add(positive);\n } else {\n weekdayOptimism.put(weekday, new LinkedList<Double>());\n weekdayOptimism.get(weekday).add(positive);\n }\n \n if (weekdayPessimism.containsKey(weekday)) {\n weekdayPessimism.get(weekday).add(negative);\n } else {\n weekdayPessimism.put(weekday, new LinkedList<Double>());\n weekdayPessimism.get(weekday).add(negative);\n }\n }\n }\n \n size = articleDocuments.size();\n avgPositive = totalPositive / size;\n avgNegative = totalNegative / size;\n printInfo();\n }", "private void handleDocument(String name,InputStream ins)\n{\n Map<String,Integer> words = new HashMap<>();\n Map<String,Integer> kgrams = new HashMap<>();\n \n try {\n String cnts = IvyFile.loadFile(ins);\n CompilationUnit cu = JcompAst.parseSourceFile(cnts);\n words = handleDocumentText(cnts);\n kgrams = buildKgramCounts(cnts,cu);\n }\n catch (IOException e) {\n IvyLog.logI(\"Problem reading document file \" + name + \": \" + e);\n }\n \n if (words.size() > 0) {\n ++total_documents;\n for (String s : words.keySet()) {\n Integer v = document_counts.get(s);\n if (v == null) document_counts.put(s,1);\n else document_counts.put(s,v+1);\n }\n }\n if (kgrams.size() > 0) {\n ++total_kdocuments;\n for (String s : kgrams.keySet()) {\n Integer v = kgram_counts.get(s);\n if (v == null) kgram_counts.put(s,1);\n else kgram_counts.put(s,v+1);\n }\n }\n}", "@Test\n\tpublic void probandoConParser() {\n\t\tString dBoxUrl = \"/home/julio/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_4_text_mining/material/tp3/\";\n\t\tString modelUrl = dBoxUrl + \"NER/models/es-ner-person.bin\";\n\t\tString filesUrl = dBoxUrl + \"NER/archivoPrueba\";\n\t\tString sampleFile = filesUrl + \"/viernes-23-05-14-alan-fitzpatrick-gala-cordoba.html\";\n\t\tList<String> docs = getMyDocsFromSomewhere(filesUrl);\n\n\t\ttry {\n\t\t\t// detecting the file type\n\t\t\tBodyContentHandler handler = new BodyContentHandler();\n\t\t\tMetadata metadata = new Metadata();\n\t\t\tFileInputStream inputstream = new FileInputStream(new File(sampleFile));\n\t\t\tParseContext pcontext = new ParseContext();\n\n\t\t\t// Html parser\n\t\t\tHtmlParser htmlparser = new HtmlParser();\n\t\t\thtmlparser.parse(inputstream, handler, metadata, pcontext);\n\t\t\tSystem.out.println(\"Contents of the document:\" + handler.toString());\n\t\t\tSystem.out.println(\"Metadata of the document:\");\n\t\t\tString[] metadataNames = metadata.names();\n\n\t\t\tfor (String name : metadataNames) {\n\t\t\t\tSystem.out.println(name + \": \" + metadata.get(name));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\n\t}", "static Set<NLMeaning> extractMeanings(NLText nlText) {\n\t\tSet<NLMeaning> meanings = new HashSet();\n\t\t\n\t\tList<NLSentence> sentences = nlText.getSentences();\n\t\tNLSentence firstSentence = sentences.iterator().next();\n\t\tList<NLToken> tokens = firstSentence.getTokens();\n\t\tList<NLMultiWord> multiWords = firstSentence.getMultiWords();\n\t\tList<NLNamedEntity> namedEntities = firstSentence.getNamedEntities();\n\t\t\n\t\t// Add meanings of all tokens that are not part of multiwords or NEs\n\t\tIterator<NLToken> itToken = tokens.iterator();\n\t\twhile (itToken.hasNext()) {\n\t\t\tSet<NLMeaning> tokenMeanings = getTokenMeanings(itToken.next());\n\t\t\tif (tokenMeanings != null) {\n\t\t\t\tmeanings.addAll(tokenMeanings);\t\t\t\n\t\t\t}\n//\t\t\tNLToken token = itToken.next();\n//\t\t\tboolean hasMultiWords = token.getMultiWords() != null && !token.getMultiWords().isEmpty();\n//\t\t\tboolean hasNamedEntities = token.getNamedEntities() != null && !token.getNamedEntities().isEmpty();\n//\t\t\tif (!hasMultiWords && !hasNamedEntities) {\n//\t\t\t\tif (token.getMeanings() == null || token.getMeanings().isEmpty()) {\n//\t\t\t\t\t// This is a hack to handle a bug where the set of meanings\n//\t\t\t\t\t// is empty but there is a selected meaning.\n//\t\t\t\t\t\n//\t\t\t\t\tNLMeaning selectedMeaning = token.getSelectedMeaning();\n//\t\t\t\t\tif (selectedMeaning != null) {\n//\t\t\t\t\t\tmeanings.add(selectedMeaning);\n//\t\t\t\t\t}\n//\t\t\t\t} else {\n//\t\t\t\t\tmeanings.addAll(token.getMeanings());\n//\t\t\t\t}\n//\t\t\t}\n\t\t}\n\t\t\n\t\t// Add meanings of multiwords and NEs\n\t\tIterator<NLMultiWord> itMultiWord = multiWords.iterator();\n\t\twhile (itMultiWord.hasNext()) {\n\t\t\tNLMultiWord multiWord = itMultiWord.next();\n\t\t\tmeanings.addAll(multiWord.getMeanings());\n\t\t}\n\t\tIterator<NLNamedEntity> itNamedEntity = namedEntities.iterator();\n\t\twhile (itNamedEntity.hasNext()) {\n\t\t\tNLNamedEntity namedEntity = itNamedEntity.next();\n\t\t\tmeanings.addAll(namedEntity.getMeanings());\n\t\t}\n\t\t\n\t\treturn meanings;\n\t}", "static void allDocumentAnalyzer() throws IOException {\n\t\tFile allFiles = new File(\".\"); // current directory\n\t\tFile[] files = allFiles.listFiles(); // file array\n\n\t\t// recurse through all documents\n\t\tfor (File doc : files) {\n\t\t\t// other files we don't need\n\t\t\tif (doc.getName().contains(\".java\") || doc.getName().contains(\"words\") || doc.getName().contains(\"names\")\n\t\t\t\t\t|| doc.getName().contains(\"phrases\") || doc.getName().contains(\".class\")\n\t\t\t\t\t|| doc.getName().contains(\"Data\") || doc.getName().contains(\".sh\") || doc.isDirectory()\n\t\t\t\t\t|| !doc.getName().contains(\".txt\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString name = doc.getName();\n\t\t\tSystem.out.println(name);\n\t\t\tname = name.substring(0, name.length() - 11);\n\t\t\tSystem.out.println(name);\n\n\t\t\tif (!names.contains(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// make readers\n\t\t\tFileReader fr = new FileReader(doc);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\t// phrase list\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\n\t\t\t// retrieve all text, trim, refine and add to phrase list\n\t\t\tString nextLine = br.readLine();\n\t\t\twhile (nextLine != null) {\n\t\t\t\tnextLine = nextLine.replace(\"\\n\", \" \");\n\t\t\t\tnextLine = nextLine.trim();\n\n\t\t\t\tif (nextLine.contains(\"no experience listed\")) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString[] lineArray = nextLine.split(\"\\\\s+\");\n\n\t\t\t\t// recurse through every word to find phrases\n\t\t\t\tfor (int i = 0; i < lineArray.length - 1; i++) {\n\t\t\t\t\t// get the current word and refine\n\t\t\t\t\tString currentWord = lineArray[i];\n\n\t\t\t\t\tcurrentWord = currentWord.trim();\n\t\t\t\t\tcurrentWord = refineWord(currentWord);\n\n\t\t\t\t\tif (currentWord.equals(\"\") || currentWord.isEmpty()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\twords.add(currentWord);\n\t\t\t\t}\n\t\t\t\tnextLine = br.readLine();\n\t\t\t}\n\n\t\t\tbr.close();\n\n\t\t\t// continue if empty\n\t\t\tif (words.size() == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// otherwise, increment number of files in corpus\n\t\t\tsize++;\n\n\t\t\t// updating the phrase count map for tf\n\t\t\tString fileName = doc.getName();\n\t\t\tphraseCountMap.put(fileName, words.size());\n\n\t\t\t// recurse through every word\n\t\t\tfor (String word : words) {\n\t\t\t\t// get map from string to freq\n\t\t\t\tHashMap<String, Integer> textFreqMap = wordFreqMap.get(fileName);\n\n\t\t\t\t// if it's null, make one\n\t\t\t\tif (textFreqMap == null) {\n\t\t\t\t\ttextFreqMap = new HashMap<String, Integer>();\n\t\t\t\t\t// make freq as 1\n\t\t\t\t\ttextFreqMap.put(word, 1);\n\t\t\t\t\t// put that in wordFreq\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, get the current num\n\t\t\t\t\tInteger currentFreq = textFreqMap.get(word);\n\n\t\t\t\t\t// if it's null,\n\t\t\t\t\tif (currentFreq == null) {\n\t\t\t\t\t\t// the frequency is just 0\n\t\t\t\t\t\tcurrentFreq = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// increment the frequency\n\t\t\t\t\tcurrentFreq++;\n\n\t\t\t\t\t// put it in the textFreqMap\n\t\t\t\t\ttextFreqMap.put(word, currentFreq);\n\n\t\t\t\t\t// put that in the wordFreqMap\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t}\n\n\t\t\t\t// add this to record (map from phrases to docs with that\n\t\t\t\t// phrase)\n\t\t\t\tinvertedMap.addValue(word, doc);\n\t\t\t}\n\t\t}\n\t}", "public Duc2002Document getParsedDocument(Document document) throws Exception {\n\t\tDuc2002Document ducDoc=new Duc2002Document();\n\t\t// iterate through child elements of root\n\t\tElement root = document.getRootElement();\n\t\tfor ( Iterator i = root.elementIterator(); i.hasNext(); ) {\n\t\t\tElement element = (Element) i.next();\n\t\t\tString elementName=element.getQualifiedName();\n\t\t\tif(elementName.equals(\"DOCNO\"))\n\t\t\t\tducDoc.setDocNo(element.getStringValue());\n\t\t\telse if(elementName.equals(\"HEAD\"))\n\t\t\t\tducDoc.setTopic(element.getStringValue());\n\t\t\telse if(elementName.equals(\"TEXT\"))\n\t\t\t{\n\t\t\t\tducDoc.setText(element.getStringValue());\n\t\t\t\tString[] sentences = new String[element.elements().size()];\n\t\t\t\tint[] sentenceWordCounts = new int[element.elements().size()];\n\t\t\t\tint no=0;\n\t\t\t\tfor(Iterator j=element.elementIterator(); j.hasNext();) {\n\t\t\t\t\tElement sentence = (Element) j.next();\n\t\t\t\t\tsentences[no]=sentence.getStringValue();\n\t\t\t\t\tfor(Iterator k=sentence.attributeIterator(); k.hasNext(); ) {\n\t\t\t\t\t\tAttribute attribute=(Attribute) k.next();\n\t\t\t\t\t\tif(attribute.getQualifiedName().equals(\"wdcount\"))\n\t\t\t\t\t\t\tsentenceWordCounts[no]=Integer.parseInt(attribute.getStringValue());\n\t\t\t\t\t}\n\t\t\t\t\tno++;\n\t\t\t\t}\n\t\t\t\tducDoc.setSentences(sentences);\n\t\t\t\tducDoc.setSentenceWordCounts(sentenceWordCounts);\n\t\t\t}\n\t\t}\n\t\treturn ducDoc;\n\t}", "private Map<String,Map<String,List<String>>> buildDictionary(Document doc){\n\t\t\n\t\tElement root = doc.getDocumentElement();\n\t\t\n\t\t\n\t\tMap<String,Map<String,List<String>>> dictionary = new HashMap<String,Map<String,List<String>>>();\n\t\tthis.termSet = new TreeSet<String>();\n\t\t\n\t\tNodeList termList = doc.getElementsByTagName(\"term\");\n\t\tfor(int i = 0; i < termList.getLength(); i++){\n\t\t\tElement termElement = (Element) termList.item(i);\n\t\t\tElement nameElement = (Element) termElement.getElementsByTagName(\"name\").item(0);\n\t\t\tString name = nameElement.getTextContent();\n\t\t\tthis.termSet.add(name);\n\n\t\t\tMap<String,List<String>> synonymGroup = new HashMap<String,List<String>>();\n\t\t\tsynonymGroup.put(\"exact\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"related\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"broad\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"narrow\", new ArrayList<String>());\n\t\t\t\n\t\t\tNodeList synonyms = termElement.getElementsByTagName(\"synonym\");\n\t\t\tfor(int j=0; j<synonyms.getLength(); j++){\n\t\t\t\tElement synonymElement = (Element) synonyms.item(j);\n\t\t\t\tString synonym = synonymElement.getTextContent();\n\t\t\t\tString scope = synonymElement.getAttribute(\"scope\");\n\t\t\t\t//System.out.println(scope);\n\t\t\t\tList<String> synonymList = (List<String>) synonymGroup.get(scope);\n\t\t\t\t\n\t\t\t\t//System.out.println(synonym);\n\t\t\t\t\n\t\t\t\tsynonymList.add(synonym);\n\t\t\t}\n\t\t\t\n\t\t\tdictionary.put(name,synonymGroup);\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn dictionary;\n\t}", "public ArrayList getAttributeList() {\n nounList = new ArrayList();\n attributeLists = new ArrayList();\n ArrayList adjAtt = new ArrayList();\n int separator = 0;\n List<Tree> leaves;\n String phraseNotation = \"NP([<NNS|NN|NNP]![<JJ|VBG])!$VP\";// !<VBG\";//@\" + phrase + \"! << @\" + phrase;\n\n TregexPattern VBpattern = TregexPattern.compile(phraseNotation);\n TregexMatcher matcher = VBpattern.matcher(sTree);\n\n while (matcher.findNextMatchingNode()) {\n Tree match = matcher.getMatch();\n Tree[] innerChild = match.children();\n int adjectiveExist = 0;\n String adj = \"\";\n String attribute = \"\";\n String b = \"\";\n\n if (innerChild.length > 1) {\n int count = 1;\n\n for (Tree inChild : innerChild) {\n if (inChild.value().equals(\"CC\") || inChild.value().equals(\",\")) {\n separator = 1;\n }\n if ((inChild.value().equals(\"JJ\")) || (inChild.value().equals(\"VBG\"))) {\n adjectiveExist++;\n leaves = inChild.getLeaves();\n adj = leaves.get(0).toString();\n if (designEleList.contains(adj)) {\n adj = \"\";\n }\n }\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\")) || (inChild.value().equals(\"NNP\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n if (count == 1) {\n if (adjectiveExist == 1) {\n attribute = adj + \" \" + leaves.get(0).yieldWords().get(0).word();\n } else {\n attribute = leaves.get(0).yieldWords().get(0).word();\n }\n if (!designEleList.contains(attribute)) {\n String identifiedWord = attribute;\n if (!identifiedWord.contains(\"_\")) {\n attributeLists.add(morphology.stem(identifiedWord));\n } else {\n attributeLists.add(identifiedWord);\n }\n }\n\n } else if (count >= 2 && separator == 0) {\n if (!attribute.contains(\"_\")) {\n\n attributeLists.remove(morphology.stem(attribute));\n attributeLists.remove(attribute);\n } else {\n attributeLists.remove(attribute);\n }\n\n attribute += \" \" + (leaves.get(0).yieldWords()).get(0).word();\n attributeLists.add(attribute);\n } else if (count >= 2 && separator == 1) {\n attribute = (leaves.get(0).yieldWords()).get(0).word();\n if (!attribute.contains(\"_\")) {\n attributeLists.add(morphology.stem(attribute));\n } else {\n attributeLists.add(attribute);\n }\n separator = 0;\n }\n count++;\n }\n }\n } else {\n for (Tree inChild : innerChild) {\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n if (!identifiedWord.contains(\"_\")) {\n attributeLists.add(morphology.stem(identifiedWord));\n } else {\n attributeLists.add(identifiedWord);\n }\n }\n }\n }\n }\n adjAtt = getAdjectiveAttribute();\n if (!adjAtt.isEmpty()) {\n String att = \"\";\n for (int i = 0; i < adjAtt.size(); i++) {\n att = adjAtt.get(i).toString();\n if (!att.isEmpty() || !att.equals(\"\") || !(att.equals(\" \"))) {\n attributeLists.add(att.trim());\n }\n }\n }\n\n System.out.println(\"ATTRIBUTE LIST :\" + attributeLists);\n return attributeLists;\n\n }", "public void extract (Document document) {\n\t\tList<Token> tokenList = document.getTokenList();\n\t\t\n\t\tfor (Token token : tokenList) {\n\t\t\tFeatureSet fs = token.boundaryFeatureSet;\n\n\t\t\t// check for each pattern whether the feature set satisfies it\n\t\t\tfor (String[] features : patternList) {\n\t\t\t\tboolean matches = true;\n\t\t\t\tfor (String feature: features) {\n\t\t\t\t\tif (!fs.contains(feature)) {\n\t\t\t\t\t\tmatches = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if the pattern is satisfied, add the conjunction\n\t\t\t\tif (matches) {\n\t\t\t\t\tfs.add(\"CONJUNCTION:\" + StringUtils.join(\",\", features));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static String getCorrespondingNEPosSegment(String textConcept, CustomXMLRepresentation nePosText, boolean isConcept) {\n\n\t\tString output = \"\";\n\n\t\t//textConcept = textConcept.replaceAll(\"\\\\p{Punct} \",\" $0 \");\n\t\t/*textConcept = textConcept.replaceAll(\"[.]\",\". \").replaceAll(\"[,]\",\", \").replaceAll(\"[']\",\"' \")\n\t\t\t\t.replaceAll(\"[\\\\[]\",\" [ \" ).replaceAll(\"[\\\\]]\",\" ] \").replaceAll(\"[(]\", \" ( \").replaceAll(\"[)]\",\" ) \")\n\t\t\t\t.replaceAll(\"[<]\", \" < \").replaceAll(\"[>]\", \" > \");*/\n\t\t//textConcept = textConcept.replaceAll(\"[\\\\.,']\",\"$0 \").replaceAll(\"[\\\\[\\\\](){}!@#$%^&*+=]\",\" $0 \");\n\t\ttextConcept = textConcept.replaceAll(\"[']\",\"$0 \").replaceAll(\"[\\\\[\\\\](){}!@#$%^&*+=]\",\" $0 \");\n\t\tString[] lemmas = textConcept.split(\" \");\n\t\tArrayList<String> wordList = new ArrayList(Arrays.asList(lemmas));\n\n\t\tnePosText.escapeXMLCharacters();\n\n\t\tboolean goOn = true;\n\t\t//while wordList is not empty, repeat\n\t\twhile(wordList.size()>0 && goOn){\n\n\t\t\tDocument docNePos = null;\n\t\t\ttry {\n\t\t\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\t\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n\t\t\t\tInputStream streamNePos = new ByteArrayInputStream(nePosText.getXml().getBytes(StandardCharsets.UTF_8));\n\t\t\t\tdocNePos = docBuilder.parse(streamNePos);\n\t\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t\tSystem.err.print(\"KIndex :: Pipeline.getCorrespondingNEPosSegment() Could not create a document text.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tNodeList npSegments = docNePos.getElementsByTagName(\"content\").item(0).getChildNodes(); // concept or text segments (children of content)\n\n\t\t\tfor (int i = 0; i < npSegments.getLength(); i++) {\n\t\t\t\tNode n = npSegments.item(i);\n\t\t\t\tif (n.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tElement segment = (Element) n;\n\t\t\t\t\tString tag = segment.getNodeName();\n\t\t\t\t\tString stLemma = (segment.hasAttribute(\"lemma\")) ? segment.getAttribute(\"lemma\") : \"\";\n\t\t\t\t\tString lemma = segment.getTextContent();\n\n\t\t\t\t\t//Debug\n\t\t\t\t\t//if (wordList.get(0).equals(\"take\")){\n\t\t\t\t\t//\tSystem.out.println(\"take!\");\n\t\t\t\t\t//}\n\n\t\t\t\t\tif ((wordList.size() == 0) && (tag.equals(\"Punctuation\"))){\n\t\t\t\t\t\toutput += lemma + \" \" ;\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tint initSize = wordList.size();\n\t\t\t\t\tint initXMLSize = nePosText.getXml().length();\n\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").equals(\"\")){\n\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (tag.equals(\"ne\")){\n\t\t\t\t\t\tString NEtype = segment.getAttribute(\"type\");\n\t\t\t\t\t\tNodeList NEchildren = segment.getChildNodes();\n\t\t\t\t\t\t//if this text segment is concept, do not add the NamedEntity tag.\n\t\t\t\t\t\tString NEstring = (isConcept) ? \"\" : \"<ne type=\\\"\" + NEtype + \"\\\">\";\n\t\t\t\t\t\tfor (int c = 0; c < NEchildren.getLength(); c++) {\n\t\t\t\t\t\t\tNode child = NEchildren.item(c);\n\t\t\t\t\t\t\tif (child.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\t\tElement Echild = (Element) child;\n\t\t\t\t\t\t\t\tString Ctag = Echild.getNodeName();\n\t\t\t\t\t\t\t\tString OrigLemma = Echild.getAttribute(\"lemma\");\n\t\t\t\t\t\t\t\tString Clemma = Echild.getTextContent();\n\t\t\t\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase())) {\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (!Clemma.equals(\"\")){\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\tif (wordList.get(0).contains(Clemma)){\n\t\t\t\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replace(Clemma,\"\"));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\tString ClemmaRemaining = Clemma.replaceAll(\"[^\\\\x00-\\\\x7F]\", \"\"); //replace all non-ascii characters\n\t\t\t\t\t\t\t\t\t\twhile (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\t\tClemmaRemaining = ClemmaRemaining.replace(wordList.get(0),\" \");\n\t\t\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t\t\t\tif (Clemma.endsWith(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tClemmaRemaining = (ClemmaRemaining.startsWith(\" \")) ? ClemmaRemaining.replace(\" \",\"\") : ClemmaRemaining;\n\t\t\t\t\t\t\t\t\t\tif ((!ClemmaRemaining.equals(\"\")) && wordList.get(0).startsWith(ClemmaRemaining)){\n\t\t\t\t\t\t\t\t\t\t\twordList.set(0, wordList.get(0).replace(ClemmaRemaining,\"\"));\n\t\t\t\t\t\t\t\t\t\t}\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\t/*else if (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t\tif (Clemma.endsWith(wordList.get(0))) {\n\t\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\" + OrigLemma + \"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\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\t/*else if ((!Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase().equals(\"\")) &&\n\t\t\t\t\t\t\t\t\t\twordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().contains(Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase())){\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replace(OrigLemma,\"\"));\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\tNEstring += (isConcept) ? \"\" : \"</ne>\";\n\t\t\t\t\t\toutput += NEstring;\n\t\t\t\t\t\tNEstring = (isConcept) ? \"<ne type=\\\"\" + NEtype + \"\\\">\" + NEstring + \"</ne>\" : NEstring;\n\t\t\t\t\t\tnePosText.removeElement(NEstring);\n\n\t\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\t\tif (wordList.size() == initSize && NEstring.length() == initXMLSize){\n\t\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1200 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(tag.equals(\"NoPOS\") || tag.equals(\"Punctuation\")){\n\t\t\t\t\t\t//output += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\toutput += lemma + \" \" ;\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(lemma.toLowerCase())){\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\t\telse if (nePosText.getXml().length() == initXMLSize){\n\t\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1201 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma +\"\\r\\n nePosText: \"+ nePosText.getXml();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())) {\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//we have the example of \"Cannot\" -> <MD>Can</MD><RB>not</RB>\n\t\t\t\t\t//in that case, in the first loop the first lemma will be added\n\t\t\t\t\t//in second loop the lemma will be added and wordList.get(0) will be removed\n\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().contains(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\tif (wordList.get(0).startsWith(lemma)){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replaceFirst(Pattern.quote(lemma),\"\"));\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().startsWith(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replaceFirst(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\"),\"\"));\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).endsWith(lemma)){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().endsWith(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (lemma.contains(wordList.get(0))){\n\t\t\t\t\t\twhile(lemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\tif (lemma.endsWith(wordList.get(0))) {\n\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.size() == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (lemma.contains(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))){\n\t\t\t\t\t\twhile(lemma.contains(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))){\n\t\t\t\t\t\t\tif (lemma.endsWith(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))) {\n\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.size() == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\tif (wordList.size() == initSize){\n\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1202 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{ //if n.getNodeType() != Node.ELEMENT_NODE\n\t\t\t\t\tif (npSegments.getLength() == 1){\n\t\t\t\t\t\tgoOn = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wordList.size()>0 && wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").equals(\"\")){\n\t\t\t\twordList.remove(0);\n\t\t\t}\n\n\t\t\tif(npSegments.getLength() == 0 && wordList.size() == 1){\n\t\t\t\twordList.remove(0);\n\t\t\t}\n\t\t}\n\n\t\t//in case wordList is empty but the next element in nePosText is punctuation, this element has to be added in output\n\t\tDocument docNePos = null;\n\t\ttry {\n\t\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n\t\t\tInputStream streamNePos = new ByteArrayInputStream(nePosText.getXml().getBytes(StandardCharsets.UTF_8));\n\t\t\tdocNePos = docBuilder.parse(streamNePos);\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\tSystem.err.print(\"KIndex :: Pipeline.getCorrespondingNEPosSegment() Could not create a document text.\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tNodeList npSegments = docNePos.getElementsByTagName(\"content\").item(0).getChildNodes(); // concept or text segments (children of content)\n\t\tfor (int i = 0; i < npSegments.getLength(); i++) {\n\t\t\tNode n = npSegments.item(i);\n\t\t\tif (n.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tElement segment = (Element) n;\n\t\t\t\tString tag = segment.getNodeName();\n\t\t\t\tString lemma = segment.getTextContent();\n\t\t\t\tif (tag.equals(\"Punctuation\")){\n\t\t\t\t\toutput += lemma + \" \";\n\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+lemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t}\n\t\t\t\tbreak; // it will break after the first time an element will be checked\n\t\t\t}\n\t\t}\n\n\n\n\t\treturn output;\n\t}", "public static void extractGroups(CoNLLPart part) {\n\t\tHashMap<String, Integer> chainMap = EMUtil.formChainMap(part\n\t\t\t\t.getChains());\n\t\tArrayList<Mention> allMentions = EMUtil.extractMention(part);\n\t\tCollections.sort(allMentions);\n\t\tEMUtil.assignNE(allMentions, part.getNameEntities());\n\t\tfor (int i = 0; i < allMentions.size(); i++) {\n\t\t\tMention m = allMentions.get(i);\n\n\t\t\tif (m.gram == EMUtil.Grammatic.subject && m.start == m.end\n\t\t\t\t\t&& part.getWord(m.end).posTag.equals(\"PN\")) {\n\t\t\t}\n\n\t\t\tif (m.gram == EMUtil.Grammatic.subject\n\t\t\t\t\t&& EMUtil.pronouns.contains(m.extent)\n\t\t\t// && chainMap.containsKey(m.toName())\n\t\t\t) {\n\t\t\t\tArrayList<Mention> ants = new ArrayList<Mention>();\n\t\t\t\tint corefCount = 0;\n\t\t\t\tfor (int j = i - 1; j >= 0; j--) {\n\t\t\t\t\tMention ant = allMentions.get(j);\n\t\t\t\t\tants.add(ant);\n\t\t\t\t\tant.MI = Context.calMI(ant, m);\n\t\t\t\t\tboolean coref = isCoref(chainMap, m, ant);\n\t\t\t\t\tif (coref) {\n\t\t\t\t\t\tcorefCount++;\n\t\t\t\t\t}\n\t\t\t\t\tif (m.s.getSentenceIdx() - ant.s.getSentenceIdx() > 2) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tCollections.sort(ants);\n\t\t\t\tCollections.reverse(ants);\n\n\t\t\t\tif (corefCount == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (Mention ant : ants) {\n\t\t\t\t\tant.isBest = false;\n\t\t\t\t}\n\n\t\t\t\tApplyEM.findBest(m, ants);\n\n\t\t\t\tif (ants.size() > maxAnts) {\n\t\t\t\t\tmaxAnts = ants.size();\n\t\t\t\t}\n\t\t\t\tString origPro = m.extent;\n\n\t\t\t\tString ext = m.extent;\n\t\t\t\tif (map.containsKey(ext)) {\n\t\t\t\t\tmap.put(ext, map.get(ext) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tmap.put(ext, 1);\n\t\t\t\t}\n\t\t\t\tStringBuilder ysb = new StringBuilder();\n\t\t\t\tfor (int h = 0; h < EMUtil.pronounList.size(); h++) {\n\t\t\t\t\tm.extent = EMUtil.pronounList.get(h);\n\t\t\t\t\tgenerateInstance(part, chainMap, m, ants,\n\t\t\t\t\t\t\tcorefCount, origPro, h, ysb);\n\t\t\t\t}\n\t\t\t\tfor (int k = ants.size() * EMUtil.pronounList.size(); k < 840; k++) {\n\t\t\t\t\tysb.append(\"@ 0 NOCLASS 1 # \");\n\t\t\t\t}\n\t\t\t\tyasmet10.add(ysb.toString());\n\t\t\t\tm.extent = origPro;\n\t\t\t}\n\t\t}\n\t}", "public void getParsed(String text) {\n\t\tAnnotation document = new Annotation(text);\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document);\n\t\tsentences = document.get(SentencesAnnotation.class);\n\t\tsentIt = sentences.iterator();\n\t}", "public ArrayList<Ngram> getNgramsFromFileWithStopwordsListOnly(String content) {\n HashMap<String, Integer> ngramsTable = new HashMap<>();\n InputStream modelIn = null; //rules_POS = null;\n if (content != null) {\n try {\n\n modelIn = new FileInputStream(\"resources/en-token.bin\");\n TokenizerModel model = new TokenizerModel(modelIn);\n Tokenizer tokenizer = new TokenizerME(model);\n String paras[] = tokenizer.tokenize(content);\n\n //create the first ngram\n String[] ngram = new String[nrGrams];\n int i = 0, count = 0;\n while (count < nrGrams && i < paras.length) {\n if (paras[i].trim().length() > 0 && !paras[i].matches(\"[\\\\p{Punct}\\\\p{Digit}]+|'s\")) {\n String word = paras[i].toLowerCase();\n if (word.trim().length() > 0) {\n ngram[count] = word;\n count++;\n }\n }\n i++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int j = 0; j < ngram.length - 1; j++) {\n sb.append(ngram[j]).append(\"<>\");\n }\n sb.append(ngram[ngram.length - 1]);\n\n //adding to the frequencies table\n ngramsTable.put(sb.toString(), 1);\n\n //creating the remaining ngrams\n String word;\n while (i < paras.length) {\n if (paras[i].trim().length() > 0 && !paras[i].matches(\"[\\\\p{Punct}\\\\p{Digit}']+|'s\")) {\n word = paras[i].toLowerCase();\n\n if (word.trim().length() > 0) {\n String ng = addNextWord(ngram, word);\n\n //verify if the ngram already exist on the document\n if (ngramsTable.containsKey(ng)) {\n ngramsTable.put(ng, ngramsTable.get(ng) + 1);\n } else {\n ngramsTable.put(ng, 1);\n }\n }\n }\n i++;\n }\n } catch (IOException e) {\n Logger.getLogger(AbstractDatabaseImporter.class.getName()).log(Level.SEVERE, null, e);\n } finally {\n if (modelIn != null) {\n try {\n modelIn.close();\n } catch (IOException e) {\n }\n }\n }\n }\n\n\n\n\n ArrayList<Ngram> ngrams = new ArrayList<>();\n for (Entry<String, Integer> entry : ngramsTable.entrySet()) {\n ngrams.add(new Ngram(entry.getKey(), entry.getValue()));\n }\n Collections.sort(ngrams);\n return ngrams;\n }", "public void parseAndRankQuery(String stringNumber) throws Exception {\n\n if (this.semantics) { //if the user choose semantic\n semantic=new ArrayList<>();\n Word2VecModel model = Word2VecModel.fromTextFile(new File(\"word2vec.c.output.model.txt\"));\n com.medallia.word2vec.Searcher semanticSearchrt = model.forSearch();\n int num = 10;\n String[] semanQuery = query.split(\" \");\n for (String s : semanQuery)\n {\n try {\n List<com.medallia.word2vec.Searcher.Match> matches = semanticSearchrt.getMatches(s.toLowerCase(), num);\n for (com.medallia.word2vec.Searcher.Match match : matches) {\n match.match();\n }\n if(matches.get(0).equals(s)) {\n query = query + \" \" + matches.get(1);\n String dd=\"\"+matches.get(1);\n semantic.add(dd);\n }\n else {\n query = query + \" \" + matches.get(0); //add to query the high semantics 3 top words score\n String dd=\"\"+matches.get(0);\n semantic.add(dd);\n }\n } catch(com.medallia.word2vec.Searcher.UnknownWordException e){\n }\n }\n }\n\n ranker = new Ranker(this.indexer,stringNumber,path,originalString); // new ranker\n ArrayList<String> cleanQuery;\n ArrayList<String> parsedQueryList;\n ReadFile rd=new ReadFile();\n cleanQuery=rd.cleanLine(stemming,query); //clean the query from dots and other signs\n HashMap<String, Pair<Integer,String>> parsedQuery=new HashMap<>();\n parsedQuery=parser.Tokenizer(cleanQuery,\"\",stemming); //parse the query\n Iterator it = parsedQuery.entrySet().iterator();\n parsedQueryList=new ArrayList<>();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry)it.next();\n parsedQueryList.add((String)pair.getKey());\n it.remove(); // avoids a ConcurrentModificationException\n }\n ranker.setParseredQuery(parsedQueryList);\n try {\n ranker.orgByPostFile();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "SwiftScoredSet getTfIdf(String text,ASTNode n,boolean kgram)\n{\n Map<String,Integer> words = null;\n Map<String,Integer> totals = null;\n double tot = 0;\n if (kgram){\n words = buildKgramCounts(text,n);\n totals = kgram_counts;\n tot = total_kdocuments;\n } \n else {\n words = handleDocumentText(text);\n totals = document_counts;\n tot = total_documents;\n }\n double termtot = 1;\n \n for (Integer iv : words.values()) {\n termtot += iv;\n }\n \n SwiftScoredSet rslt = new SwiftScoredSet();\n for (Map.Entry<String,Integer> ent : words.entrySet()) {\n String wd = ent.getKey();\n double ct = ent.getValue();\n Integer docs = totals.get(wd);\n double docct = 0;\n if (docs != null) docct = docs;\n double idf = Math.log(tot/(1+docct));\n double tf = ct/termtot;\n double tfidf = tf*idf;\n rslt.add(wd,tfidf);\n }\n rslt.normalize();\n \n return rslt;\n}", "private void processContentEn() {\n if (this.content == null || this.content.equals(\"\")) {\r\n _logger.error(\"{} - The sentence is null or empty\", this.traceId);\r\n }\r\n\r\n // process input using ltp(Segmentation, POS, DP, SRL)\r\n this.nlp = new NLP(this.content, this.traceId, this.setting);\r\n }", "public static void main(String[] args) {\n\t\tString text = \"\\\"undifferentiated's thyroid carcinomas were carried out with antisera against calcitonin, calcitonin-gene related peptide (CGRP), somatostatin, and also thyroglobulin, using the PAP method. \";\n\t\ttext = text.replace('\\\"', ' ');\n\t\t\n\t\tStringUtil su = new StringUtil();\n\t\t\n\t\t// Extracting...\n\t\tString text2 = new String(text);\n\t\tEnvironmentVariable.setMoaraHome(\"./\");\n\t\tGeneRecognition gr = new GeneRecognition();\n\t\tArrayList<GeneMention> gms = gr.extract(MentionConstant.MODEL_BC2,text);\n\t\t// Listing mentions...\n\t\tSystem.out.println(\"Start\\tEnd\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.Text());\n\t\t\t//System.out.println(text2.substring(gm.Start(), gm.End()));\n\t\t\tSystem.out.println(su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t}\n\t\tif (true){\n\t\t\treturn;\n\t\t}\n\t\t// Normalizing mentions...\n\t\tOrganism yeast = new Organism(Constant.ORGANISM_YEAST);\n\t\tOrganism human = new Organism(Constant.ORGANISM_HUMAN);\n\t\tExactMatchingNormalization gn = new ExactMatchingNormalization(human);\n\t\tgms = gn.normalize(text,gms);\n\t\t// Listing normalized identifiers...\n\t\t\n\t\tSystem.out.println(\"\\nStart\\tEnd\\t#Pred\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tif (gm.GeneIds().size()>0) {\n\t\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.GeneIds().size() + \n\t\t\t\t\t\"\\t\" + su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t\t\tfor (int j=0; j<gm.GeneIds().size(); j++) {\n\t\t\t\t\tGenePrediction gp = gm.GeneIds().get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\" + gp.GeneId() + \" \" + gp.OriginalSynonym() + \" \" + gp.ScoreDisambig());\n\t\t\t\t\tSystem.out.println((gm.GeneId().GeneId().equals(gp.GeneId())?\" (*)\":\"\"));\n\t\t\t\t}\n\t\t\t}\n\t\t}\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\tPropertyManager.setPropertyFilePath(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/TextDigesterConfig.properties\");\n\t\t\n\t\tString text = MultilingImport.readText(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/EXAMPLE_TEXTS/multilingMss2015Training/body/text/\" + lang + \"/\" + docName);\n\n\t\t/* Process text document */\n\t\tLangENUM languageOfHTMLdoc = FlProcessor.getLanguage(text);\n\t\t\n\t\tTDDocument TDdoc = FlProcessor.generateDocumentFromFreeText(text, null, languageOfHTMLdoc);\n\n\t\t// Store GATE document\n\t\tWriter out = null;\n\t\ttry {\n\t\t\tout = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/EXAMPLE_TEXTS/\" + lang + \"_\" + docName.replace(\".txt\", \"_GATE.xml\")), \"UTF-8\"));\n\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tout.write(TDdoc.getGATEdoc().toXml());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tout.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\ttry {\n\t\t\tLexRankSummarizer lexRank = new LexRankSummarizer(languageOfHTMLdoc, SentenceSimilarityENUM.cosineTFIDF, false, 0.01);\n\t\t\tMap<Annotation, Double> sortedSentences = lexRank.sortSentences(TDdoc);\n\t\t\t\n\t\t\tList<Annotation> sentListOrderedByRelevance = new ArrayList<Annotation>();\n\t\t\tfor(Entry<Annotation, Double> sentence : sortedSentences.entrySet()) {\n\t\t\t\tlogger.info(\"Score: \" + sentence.getValue() + \" - '\" + GtUtils.getTextOfAnnotation(sentence.getKey(), TDdoc.getGATEdoc()) + \"'\");\n\t\t\t\tsentListOrderedByRelevance.add(sentence.getKey());\n\t\t\t}\n\t\t\t\n\t\t\tlogger.info(\"Summary max 100 tokens: \");\n\t\t\tList<Annotation> summarySentences = GtUtils.orderAnnotations(sentListOrderedByRelevance, TDdoc.getGATEdoc(), 100);\n\t\t\tfor(Annotation ann : summarySentences) {\n\t\t\t\tlogger.info(GtUtils.getTextOfAnnotation(ann, TDdoc.getGATEdoc()));\n\t\t\t}\n\t\t} catch (TextDigesterException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t*/\n\t}", "public static void initializeToolsAndResourcesForDemo(IDictionary dict) throws MalformedURLException, IOException {\n wordnet_dict = dict;\n wordnet_dict.open();\n\n // Choose wordnet sources to be used\n wordnetResources.add(\"synonyms\");\n //wordnetResources.add(\"antonyms\");\n //wordnetResources.add(\"hypernyms\");\n\n Properties split_props = new Properties();\n //Properties including lemmatization\n //props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n //Properties without lemmatization\n split_props.put(\"annotators\", \"tokenize, ssplit, pos\");\n split_props.put(\"tokenize.language\", \"en\");\n split_pipeline = new StanfordCoreNLP(split_props);\n\n Properties lemma_props = new Properties();\n lemma_props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n lemma_props.put(\"tokenize.language\", \"en\");\n lemma_pipeline = new StanfordCoreNLP(lemma_props);\n\n Properties entityMentions_props = new Properties();\n entityMentions_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, lemma, ner, entitymentions\");\n entityMentions_props.put(\"tokenize.language\", \"en\");\n entityMentions_props.put(\"truecase.overwriteText\", \"true\");\n entityMentions_pipeline = new StanfordCoreNLP(entityMentions_props);\n\n Properties compound_props = new Properties();\n compound_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, parse\");\n compound_props.put(\"tokenize.language\", \"en\");\n compound_props.put(\"truecase.overwriteText\", \"true\");\n compounds_pipeline = new StanfordCoreNLP(compound_props);\n\n spotlight = new Spotlight();\n\n chanel = new LODSyndesisChanel();\n\n }", "public static void main(String[] args) throws InvalidFormatException, FileNotFoundException, IOException {\n\n int classNumber = 2;\n int Ngram = 2; // The default value is unigram.\n int lengthThreshold = 5; // Document length threshold\n int numberOfCores = Runtime.getRuntime().availableProcessors();\n\n String tokenModel = \"./data/Model/en-token.bin\"; // Token model.\n\n EmbeddingParameter param = new EmbeddingParameter(args);\n\n String providedCV = String.format(\"%s/%s/%sSelectedVocab.txt\", param.m_prefix, param.m_data, param.m_data);\n String userFolder = String.format(\"%s/%s/Users\", param.m_prefix, param.m_data);\n String friendFile = String.format(\"%s/%s/%sFriends.txt\", param.m_prefix, param.m_data, param.m_data);\n String cvIndexFile = String.format(\"%s/%s/%sCVIndex.txt\", param.m_prefix, param.m_data, param.m_data);\n String cvIndexFile4Interaction = String.format(\"%s/%s/%sCVIndex4Interaction_fold_%d_train.txt\", param.m_prefix, param.m_data, param.m_data, param.m_kFold);\n\n MultiThreadedNetworkAnalyzer analyzer = null;\n int kFold = 5;\n\n if(param.m_data.equals(\"StackOverflow\")){\n analyzer = new MultiThreadedStackOverflowAnalyzer(tokenModel, classNumber, providedCV, Ngram, lengthThreshold, numberOfCores, true);\n } else\n analyzer = new MultiThreadedNetworkAnalyzer(tokenModel, classNumber, providedCV, Ngram, lengthThreshold, numberOfCores, true);\n analyzer.setAllocateReviewFlag(false); // do not allocate reviews\n\n // we store the interaction information before-hand, load them directly\n analyzer.loadUserDir(userFolder);\n analyzer.constructUserIDIndex();\n\n // if it is cv for doc, use all the interactions + part of docs\n if(param.m_mode.equals(\"cv4doc\") && !param.m_coldStartFlag){\n analyzer.loadCVIndex(cvIndexFile, kFold);\n analyzer.loadInteractions(friendFile);\n }\n // if it is cv for edge, use all the docs + part of edges\n else if(param.m_mode.equals(\"cv4edge\") && !param.m_coldStartFlag){\n analyzer.loadInteractions(cvIndexFile4Interaction);\n }\n // cold start for doc, use all edges, test doc perplexity on light/medium/heavy users\n else if(param.m_mode.equals(\"cv4doc\") && param.m_coldStartFlag) {\n cvIndexFile = String.format(\"%s/%s/ColdStart/%s_cold_start_4docs_fold_%d.txt\", param.m_prefix, param.m_data,\n param.m_data, param.m_kFold);\n analyzer.loadCVIndex(cvIndexFile, kFold);\n analyzer.loadInteractions(friendFile);\n }\n // cold start for edge, use all edges, learn user embedding for light/medium/heavy users\n else if(param.m_mode.equals(\"cv4edge\") && param.m_coldStartFlag){\n cvIndexFile4Interaction = String.format(\"%s/%s/ColdStart/%s_cold_start_4edges_fold_%d_interactions.txt\",\n param.m_prefix, param.m_data, param.m_data, param.m_kFold);\n analyzer.loadInteractions(cvIndexFile4Interaction);\n }\n // answerer recommendation for stackoverflow data only\n else if(param.m_mode.equals(\"ansrec\")){\n cvIndexFile = String.format(\"%s/%s/AnswerRecommendation/%sCVIndex4Recommendation.txt\",\n param.m_prefix, param.m_data, param.m_data);\n friendFile = String.format(\"%s/%s/AnswerRecommendation/%sFriends4Recommendation.txt\",\n param.m_prefix, param.m_data, param.m_data);\n analyzer.loadCVIndex(cvIndexFile, kFold);\n analyzer.loadInteractions(friendFile);\n }\n /***Start running joint modeling of user embedding and topic embedding****/\n double emConverge = 1e-10, alpha = 1 + 1e-2, beta = 1 + 1e-3, lambda = 1 + 1e-3, varConverge = 1e-6;//these two parameters must be larger than 1!!!\n _Corpus corpus = analyzer.getCorpus();\n\n long start = System.currentTimeMillis();\n LDA_Variational tModel = null;\n\n if(param.m_multiFlag && param.m_coldStartFlag) {\n tModel = new EUB4ColdStart_multithreading(param.m_emIter, emConverge, beta, corpus, lambda, param.m_number_of_topics,\n alpha, param.m_varIter, varConverge, param.m_embeddingDim);\n } else if(param.m_multiFlag && !param.m_coldStartFlag){\n tModel = new EUB_multithreading(param.m_emIter, emConverge, beta, corpus, lambda, param.m_number_of_topics,\n alpha, param.m_varIter, varConverge, param.m_embeddingDim);\n } else{\n tModel = new EUB(param.m_emIter, emConverge, beta, corpus, lambda, param.m_number_of_topics, alpha,\n param.m_varIter, varConverge, param.m_embeddingDim);\n }\n\n ((EUB) tModel).initLookupTables(analyzer.getUsers());\n ((EUB) tModel).setModelParamsUpdateFlags(param.m_alphaFlag, param.m_gammaFlag, param.m_betaFlag,\n param.m_tauFlag, param.m_xiFlag, param.m_rhoFlag);\n ((EUB) tModel).setMode(param.m_mode);\n\n ((EUB) tModel).setTrainInferMaxIter(param.m_trainInferIter);\n ((EUB) tModel).setTestInferMaxIter(param.m_testInferIter);\n ((EUB) tModel).setParamMaxIter(param.m_paramIter);\n ((EUB) tModel).setStepSize(param.m_stepSize);\n ((EUB) tModel).setGamma(param.m_gamma);\n ((EUB) tModel).setData(param.m_data);\n\n if(param.m_mode.equals(\"ansrec\")){\n String questionIds = String.format(\"%s/%s/AnswerRecommendation/%sSelectedQuestions.txt\",\n param.m_prefix, param.m_data, param.m_data);\n ((EUB) tModel).loadQuestionIds(questionIds);\n }\n\n if(param.m_multiFlag && param.m_coldStartFlag){\n ((EUB4ColdStart_multithreading) tModel).fixedCrossValidation(param.m_kFold, param.m_saveDir);\n } else{\n ((EUB) tModel).fixedCrossValidation(param.m_kFold, param.m_saveDir);\n }\n\n String saveDir = param.m_saveDir + String.format(\"%s_nuTopics_%d_dim_%d_fold_%d\", param.m_data,\n param.m_number_of_topics, param.m_embeddingDim, param.m_kFold);\n File dir = new File(saveDir);\n if(!dir.exists())\n dir.mkdir();\n\n tModel.printBeta(param.m_saveDir);\n if(param.m_mode.equals(\"ansrec\")){\n ((EUB) tModel).printTopicEmbeddingAsMtx(param.m_saveDir);\n ((EUB) tModel).printTheta(param.m_saveDir);\n }\n long end = System.currentTimeMillis();\n\n // the total time of training and testing in the unit of hours\n double hours = (end - start)/((1000*60*60) * 1.0);\n System.out.print(String.format(\"[Time]This training+testing process took %.2f hours.\\n\", hours));\n\n }", "public static void main(String[] args) throws IOException{\n\t\tint termIndex = 1;\n\t\t\n\t\t// startOffset holds the start offset for each term in\n\t\t// the corpus.\n\t\tlong startOffset = 0;\n\t\t\t\n\t\t// unique_terms is true if there are atleast one more\n\t\t// unique term in corpus.\n\t\tboolean unique_terms = true;\n\t\t\n\t\t\n\t\t//load the stopwords from the HDD\n\t\tString stopwords = getStopWords();\n\t\t\n\t\t// allTokenHash contains all the terms and its termid\n\t\tHashMap<String, Integer> allTermHash = new HashMap<String, Integer>();\n\t\t\n\t\t// catalogHash contains the term and its position in\n\t\t// the inverted list present in the HDD.\n\t\tHashMap<Integer, Multimap> catalogHash = new HashMap<Integer, Multimap>();\n\t\t\n\t\t// finalCatalogHash contains the catalogHash for the invertedIndexHash\n\t\t// present in the HDD.\n\t\tHashMap<Integer, String> finalCatalogHash = new HashMap<Integer, String>();\n\t\t\n\t\t// token1000Hash contains the term and Dblocks for the first 1000\n\t\tHashMap<Integer, Multimap> token1000DocHash = new HashMap<Integer, Multimap>();\n\t\t\n\t\t// documentHash contains the doclength of all the documents in the corpus\n\t\tHashMap<String, String> documentHash = new HashMap<String, String>();\t\n\t\t\n\t\t// id holds the document id corresponding to the docNumber.\n\t\tint id = 1;\n\t\t\n\t\t// until all unique terms are exhausted\n\t\t// pass through the documents and index the terms.\n\t\t//while(unique_terms){\n\t\t\t\n\t\t\tFile folder = new File(\"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/ap89_collection\");\n\t\t\t//File folder = new File(\"C:/Users/Naveen/Desktop/TestFolder\");\n\t\t\tFile[] listOfFiles = folder.listFiles();\n\t\t\t\n\t\t\t//for each file in the folder \n\t\t\tfor (File file : listOfFiles) {\n\t\t\t if (file.isFile()) {\n\t\t\t \t\n\t\t\t \tString str = file.getPath().replace(\"\\\\\",\"//\");\n\t\t\t \t\n\t\t\t \t\n\t\t\t\t\t//Document doc = new Document();\n\t\t\t //System.out.println(\"\"+str);\n\t\t\t\t\t//variables to keep parse document.\n\t\t\t\t\tint docCount = 0;\n\t\t\t\t\tint docNumber = 0;\n\t\t\t\t\tint endDoc = 0;\n\t\t\t\t\tint textCount = 0;\n\t\t\t\t\tint noText = 0;\n\t\t\t\t\tPath path = Paths.get(str);\n\t\t\t\t\t\n\t\t\t\t\t//Document id and text\n\t\t\t\t\tString docID = null;\n\t\t\t\t\tString docTEXT = null;\n\t\t\t\t\t\n\t\t\t\t\t//Stringbuffer to hold the text of each document\n\t\t\t\t\tStringBuffer text = new StringBuffer();\n\t\t\t\t\t\n\t\t\t\t\tScanner scanner = new Scanner(path);\n\t\t\t\t\twhile(scanner.hasNext()){\n\t\t\t\t\t\tString line = scanner.nextLine();\n\t\t\t\t\t\tif(line.contains(\"<DOC>\")){\n\t\t\t\t\t\t\t++docCount;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"</DOC>\")){\n\t\t\t\t\t\t\t++endDoc;\n\t\t\t\t\t\t\tdocTEXT = text.toString();\n\t\t\t\t\t\t\t//docTEXT = docTEXT.replaceAll(\"[\\\\n]\",\" \");\n\t\t\t\t\t\t\tSystem.out.println(\"ID: \"+id);\n\t\t\t\t\t\t\t//System.out.println(\"TEXT: \"+docTEXT);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// text with stop words removed\n\t\t\t\t\t\t\tPattern pattern1 = Pattern.compile(\"\\\\b(?:\"+stopwords+\")\\\\b\\\\s*\", Pattern.CASE_INSENSITIVE);\n\t\t\t\t\t\t\tMatcher matcher1 = pattern1.matcher(docTEXT);\n\t\t\t\t\t\t\tdocTEXT = matcher1.replaceAll(\"\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// text with stemming\n\t\t\t\t\t\t\t//docTEXT = stemmer(docTEXT);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint docLength = 1;\n\t\t\t\t\t\t\t// regex to build the tokens from the document text\n\t\t\t\t\t\t\tPattern pattern = Pattern.compile(\"\\\\w+(\\\\.?\\\\w+)*\");\n\t\t\t\t\t\t\tMatcher matcher = pattern.matcher(docTEXT.toLowerCase());\n\t\t\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (int i = 0; i < matcher.groupCount(); i++) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// alltermHash contains term and term id\n\t\t\t\t\t\t\t\t\t// if term is present in the alltermHash\n\t\t\t\t\t\t\t\t\tif(allTermHash.containsKey(matcher.group(i))){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tint termId = allTermHash.get(matcher.group(i));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//if term is present in the token1000Hash\n\t\t\t\t\t\t\t\t\t\t//then update the dblock of the term.\n\t\t\t\t\t\t\t\t\t\tif(token1000DocHash.containsKey(termId)){\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockUpdate = token1000DocHash.get(termId);\n\t\t\t\t\t\t\t\t\t\t\t//Multimap<Integer, Integer> dBlockUpdate = token1000DocHash.get(matcher.group(i));\n\t\t\t\t\t\t\t\t\t\t\tif(dBlockUpdate.containsKey(id)){\n\t\t\t\t\t\t\t\t\t\t\t\tdBlockUpdate.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tdBlockUpdate.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//if term is not present in the token1000hash\n\t\t\t\t\t\t\t\t\t\t//then add the token with its dBlock\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\t\tdBlockInsert.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\ttoken1000DocHash.put(termId, dBlockInsert);\t\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// if the term is not present I will put the term into allTermHash\n\t\t\t\t\t\t\t\t\t// put corresponding value into the token1000DocHash and increment\n\t\t\t\t\t\t\t\t\t// termIndex\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tallTermHash.put(matcher.group(i),termIndex);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\tdBlockInsert.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\ttoken1000DocHash.put(termIndex, dBlockInsert);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\ttermIndex++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocLength++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(id%1000 == 0){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// then dump index file to HDD\n\t\t\t\t\t\t\t\t\twriteInvertedIndex(token1000DocHash,\"token1000DocHash\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// update catalog file\n\t\t\t\t\t\t\t\t\t// to populate catalogHash with the offset\n\t\t\t\t\t\t\t\t\tfor(Entry<Integer, Multimap> entry : token1000DocHash.entrySet()){\n\t\t\t\t\t\t\t\t\t\tif(catalogHash.containsKey(entry.getKey())){\n\t\t\t\t\t\t\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t\t\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> catUpdate = catalogHash.get(entry.getKey());\n\t\t\t\t\t\t\t\t\t\t\tcatUpdate.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\t\t\t\t\t\t\tcatalogHash.put(entry.getKey(), catUpdate);\n\t\t\t\t\t\t\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t\t\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\t\tcatInsert.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\t\t\t\t\t\t\tcatalogHash.put(entry.getKey(), catInsert);//entry.getValue());\n\t\t\t\t\t\t\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//clear the token1000DocHash\n\t\t\t\t\t\t\t\t\ttoken1000DocHash.clear();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdocumentHash.put(docID, \"\"+id+\":\"+docLength);\n\t\t\t\t\t\t\tid++;\n\t\t\t\t\t\t\ttext = new StringBuffer();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"<DOCNO>\")){\n\t\t\t\t\t\t\t++docNumber;\n\t\t\t\t\t\t\tdocID = line.substring(8, 21);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"<TEXT>\")){\n\t\t\t\t\t\t\t++textCount;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if((line.contains(\"<DOC>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</DOC>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<DOCNO>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<FILEID>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<FIRST>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<SECOND>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<HEAD>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</HEAD>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<BYLINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</BYLINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<UNK>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</UNK>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<DATELINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<NOTE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</NOTE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</TEXT>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<TEXT>\"))){\n\t\t\t\t\t\t\t ++noText;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(endDoc == docCount - 1){\n\t\t\t\t\t\t\ttext.append(line);\n\t\t\t\t\t\t\ttext.append(\" \");\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\n\t\t\t }//end of if - to check if this is a file and parse.\n\t\t\t \n\t\t\t}//end of for loop to load each file\n\t\t\t\n\t\t//}//end of while loop \n\t\t\n\t// write catalogfile to the hdd to check.\n\t\t\t\n\t\t\t// then dump index file to HDD\n\t\t\twriteInvertedIndex(token1000DocHash,\"token1000DocHash\");\n\t\t\t\n\t\t\t// update catalog file\n\t\t\t// to populate catalogHash with the offset\n\t\t\tfor(Entry<Integer, Multimap> entry : token1000DocHash.entrySet()){\n\t\t\t\tif(catalogHash.containsKey(entry.getKey())){\n\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\tMultimap<String, String> catUpdate = catalogHash.get(entry.getKey());\n\t\t\t\t\tcatUpdate.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\tcatalogHash.put(entry.getKey(), catUpdate);\n\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\tMultimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t\tcatInsert.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\tcatalogHash.put(entry.getKey(), catInsert);//entry.getValue());\n\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\twriteInvertedIndex(catalogHash,\"catalogHash\");\n\t\t\tprintHashMapSI(allTermHash);\n\t\t\tprintHashMapSS(documentHash);\n\t\t\t\n\t\t\tlong InvIndstartOffset = 0;\n\t\t\t\n\t\t\t//write it to file\n \n\t\t\t//change the finalcatalogHash to the form termid:startoffset:length\n\t\t\tfor (Integer name: catalogHash.keySet()){\n\t String key = name.toString();\n\t String value = catalogHash.get(name).toString(); \n\t //System.out.println(key + \" \" + value); \n\t String finalTermIndex = genInvertedIndex(key, value);\n\t finalTermIndex = key+\":\"+finalTermIndex;\n\t int indexLength = finalTermIndex.length();\n\t \n\t \n\t PrintWriter writer = new PrintWriter(new BufferedWriter\n\t \t\t(new FileWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/InvertedIndex\", true)));\n\t writer.println(finalTermIndex);\n\t writer.close();\n\t \n\t //update the finalcatalogHash\n\t //Multimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t//catInsert.put(String.valueOf(InvIndstartOffset), String.valueOf(indexLength));\n\t\t\t\tfinalCatalogHash.put(name, String.valueOf(InvIndstartOffset)+\":\"+String.valueOf(indexLength));//entry.getValue());\n\t\t\t\tInvIndstartOffset += indexLength+2;\n\t \n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tprintHashMapIS(finalCatalogHash);\n\t\t\t\n\t}", "public ArrayList<GrammarMatch> extract(String text) {\n text = text.replaceAll(\"\\\\s+\", \" \");\n\n ArrayList<GrammarMatch> bigResult = new ArrayList();\n\n List<ParserToken> stream = this.tokenizer.transform(text);\n\n /**\n * Get morfological data for whole list of tokens\n */\n // TODO make this flexible \n // provide tagger as a parameter to parser\n // add posibility to skip tagging to boost performance\n List<AnalyzedTokenReadings> tags = null;\n\n try {\n UkrainianTagger ut = new UkrainianTagger();\n List<String> sentence = new ArrayList();\n\n stream.forEach(t -> {\n sentence.add(t.value);\n });\n\n tags = ut.tag(sentence);\n\n } catch (IOException ex) {\n Logger.getLogger(GrammarMatch.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n // merge pos tags with ParserTokens\n int currentIndex = 0;\n for (ParserToken token : stream) {\n AnalyzedTokenReadings forms = tags.get(currentIndex);\n\n if (forms != null) {\n token.setRawForms(forms);\n }\n currentIndex++;\n }\n\n // preprocess tokens\n for (ParserTokenPreprocessor preprocessor : this.preprocessors) {\n stream = preprocessor.proceed(stream);\n }\n\n // match with grammars\n// int tokenIndex = 0;\n// int lastInsertTokenIndex = 0;\n this.currentTokens = stream;\n\n for (ParserToken token : stream) {\n for (GrammarRuleI grule : this.grammars) {\n\n // TODO get rid of this. use based on interface implementation\n ParserGrammar grammar = (ParserGrammar) grule;\n\n boolean recheck = grammar.shift(token);\n // TODO substitute ParserMatch with parserToken\n ArrayList<ParserMatch> match = grammar.reduce();\n\n if (match.size() > 0) {\n bigResult.add(new GrammarMatch(grammar, match));\n }\n\n if (recheck) {\n grammar.shift(token);\n match = grammar.reduce();\n\n if (match.size() > 0) {\n bigResult.add(new GrammarMatch(grammar, match));\n }\n\n }\n\n }\n\n }\n\n // shift repeatable rules to the terminal symbol if any\n// for (GrammarRuleI gr : this.grammars) {\n//\n// visitAllRules(null,gr, (rule,parent) -> {\n// if (!rule.isSimple()) {\n//\n// ParserGrammar pg = (ParserGrammar) rule;\n// System.out.print(\" %%% -> [\"+parent+\"]\" + ((ParserGrammar) rule).getName());\n// if (pg.isRepeatable()) {\n// System.out.print(\" repeatable\");\n// if (pg.isInserted()) {\n// System.out.print(\" is_inserted\");\n// } else {\n// System.out.print(\" not_inserted\");\n//\n// if (!pg.isFirstRun() && pg.getCurrentIndex() == 0) {\n// System.out.print(\" dirty\");\n// \n// pg.setCurrentIndex(pg.rulesCount());\n// \n// if (parent != null) {\n// ParserGrammar pgp = (ParserGrammar) parent;\n// \n// \n// pgp.setCurrentIndex(pgp.getCurrentIndex()+1);\n// System.out.print(\" shift_head[\"+pgp.getCurrentIndex()+\"->\"+(pgp.getCurrentIndex()+1)+\"]\");\n// }\n// \n// \n// }\n// \n// }\n//\n// }\n// System.out.println(\"\");\n//\n// } else {\n//// System.out.println(\" [%%%] -> \");\n// }\n// });\n// }\n\n for (GrammarRuleI grule : this.grammars) {\n\n ParserGrammar grammar = (ParserGrammar) grule;\n\n ArrayList<ParserMatch> match = grammar.reduce(true, false);\n\n if (match.size() > 0) {\n bigResult.add(new GrammarMatch(grammar, match));\n\n }\n grammar.reset();\n }\n\n return bigResult;\n }", "@Override\n public void processCas(CAS aCas) throws ResourceProcessException {\nSystem.out.println(\"Retrival evaluator...\");\n JCas jcas;\n try {\n jcas = aCas.getJCas();\n } catch (CASException e) {\n throw new ResourceProcessException(e);\n }\n\n FSIterator it = jcas.getAnnotationIndex(Document.type).iterator();\n \n// if (it.hasNext()) {\n// Document doc = (Document) it.next();\n// cnt++;\n// }\n// log(cnt);\n it = jcas.getAnnotationIndex(Document.type).iterator();\n\n if (it.hasNext()) {\n Document doc = (Document) it.next();\n int queryid = doc.getQueryID();\n int rel = doc.getRelevanceValue();\n // Make sure that your previous annotators have populated this in CAS\n FSList fsTokenList = doc.getTokenList();\n ArrayList<Token> tokenList = Utils.fromFSListToCollection(fsTokenList, Token.class);\n Map<String, Integer> queryVector = new HashMap<String, Integer>();\n Map<String, Integer> docVector = new HashMap<String, Integer>();\n if (rel == 99) {\n for (Token t : tokenList) {\n queryVector.put(t.getText(), t.getFrequency());\n }\n queryVectorlist.add(queryVector);\n } else {\n for (Token t : tokenList) {\n docVector.put(t.getText(), t.getFrequency());\n }\n double cos = computeCosineSimilarity(queryVectorlist.get(queryid - 1), docVector);\n coslist.add(cos);\n\n if (rel == 1) {\n gold = lines;\n goldcos = cos;\n System.out.println(\"goldcos\"+goldcos);\n }\n }\n \n if (qIdList.size() >= 1 && qIdList.get(qIdList.size() - 1) != queryid) {\n// System.out.println(\"lines:\"+lines);\n sortSimilarity(coslist);\n log(coslist);\n int rank=findRank(coslist,goldcos);\n rankList.add(rank);\n coslist = new ArrayList<Double>();\n }\n\n qIdList.add(doc.getQueryID());// 有啥用???\n relList.add(doc.getRelevanceValue());\n\n // Do something useful here\n lines++;\n }\n //log(coslist);\n\n }", "public List<MinedDocument> parseCompareArtifacts() {\n//\t\tSystem.out.println(\"parseCompareArtifacts()\");\n\t\tList<MinedDocument> compareDocs = new ArrayList<MinedDocument>();\n\t\t\n\t\tInputStream is;\n\t\tDocxParser docx;\n\t\tString title = null;\n\t\tString text;\n\t\t\n\t\tfor(IArtefact artefact : this.artefacts) {\n\t\t\ttext = null;\n\t\t\t\n\t\t\tif(artefact instanceof NuxeoDocArtefact) {\t// Nuxeo Document:\n\t\t\t\ttry {\n\t\t\t\t\tis = getNuxeoInstance().getDocumentInputStream(artefact.getId());\n\t\t\t\t\t\n\t\t\t\t\ttitle = this.getNuxeoInstance().getLastDocTitle();\n\t\t\t\t\tif(title==null) title = NO_TITLE;\n\t\t\t\t\t\n\t\t\t\t\tif(this.getNuxeoInstance().getLastDocFilePath().endsWith(\".docx\")) {\n\t\t\t\t\t\tdocx = new DocxParser(is);\n\t\t\t\t\t\tdocx.parseDocxSimple();\n\t\t\t\t\t\ttext = docx.getFullText();\n\t\t\t\t\t} else if(this.getNuxeoInstance().getLastDocFilePath().endsWith(\".doc\")) {\n\t\t\t\t\t\ttext = DocxParser.parseDocSimple(is);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read nuxeo doc with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof LiferayBlogArtefact) { // Liferay Blog Entry:\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject blogEntry = this.getLiferayInstance().getBlogEntry(artefact.getId());\n\t\t\t\t\ttitle = blogEntry.getString(\"title\");\n\t\t\t\t\ttext = blogEntry.getString(\"content\");\n\t\t\t\t\ttext = TextParser.parseHtml(text);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read Liferay blog entry with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof LiferayForumArtefact) { // Liferay Forum Message\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject forumEntry = this.getLiferayInstance().getMessageBoardMessage(artefact.getId());\n\t\t\t\t\ttitle = forumEntry.getString(\"subject\");\n\t\t\t\t\ttext = forumEntry.getString(\"body\");\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read Liferay forum message with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof LiferayWebContentArtefact) { // Liferay Web Content Article (Journal)\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject webContentArticle = this.getLiferayInstance().getWebContentArticle(artefact.getId());\n\t\t\t\t\ttitle = webContentArticle.getString(WEBCONTENT_TITLE);\n\t\t\t\t\ttext = webContentArticle.getString(WEBCONTENT_CONTENT);\n\t\t\t\t\t// check if is \"meeting minutes\" content:\n\t\t\t\t\tJSONObject webContentTemplate = this.getLiferayInstance().getWebContentTemplate(\n\t\t\t\t\t\t\twebContentArticle.getString(WEBCONTENT_TEMPLATE_ID), webContentArticle.getString(WEBCONTENT_GROUP_ID));\n\t\t\t\t\tString templateName = webContentTemplate.getString(WEBCONTENTTEMPLATE_NAME);\n\t\t\t\t\tif(templateName.contains(WEBCONTENTTEMPLATE_MEETING_MINUTES)) {\n\t\t\t\t\t\t((LiferayWebContentArtefact)artefact).setIsMeetingMinutes(true);\n\t\t\t\t\t}\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read Liferay web content with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof LiferayWikiArtefact) { // Liferay Wiki Page\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject wikiPage = this.getLiferayInstance().getWikiPage(artefact.getId());\n\t\t\t\t\ttitle = wikiPage.getString(\"title\");\n\t\t\t\t\ttext = wikiPage.getString(\"content\");\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error: Can not read Liferay wiki page with id: \"+artefact.getId());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if(artefact instanceof SocialMessageArtefact) { // Shindig Message\n\t\t\t\tShindigConnector shindigCon;\n\t\t\t\tif(Config.SHINDIG_USAGE.getValue().equals(Config.VAL_SHINDIG_DIRECT))\n\t\t\t\t // disabled\n//\t\t\t\t\tshindigCon = new ShindigDirectConnector();\n\t\t\t\t shindigCon = null;\n\t\t\t\telse\n\t\t\t\t\tshindigCon = new ShindigRESTConnector();\n\t\t\t\tJSONObject message = shindigCon.getOutboxMessage(((SocialMessageArtefact) artefact).getUserId(), artefact.getId());\n\t\t\t\tif(message!=null) {\n\t\t\t\t\ttitle = message.getString(\"title\");\n\t\t\t\t\ttext = message.getString(\"body\");\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"MinedDocument is a SocialMessageArtefact\");\n\t\t\t} else if(artefact instanceof MailArtefact) { // Email via ElastiSearch\n\t\t\t\ttitle = ((MailArtefact)artefact).getSubject();\n\t\t\t\ttext = ((MailArtefact)artefact).getContent();\n\t\t\t}\n\t\t\t\n\t\t\tif(title==null)\n\t\t\t\ttitle = NO_TITLE;\n\t\t\t\n\t\t\tif(text!=null)\n\t\t\t\tcompareDocs.add(new MinedDocument(title, text));\n\t\t\telse\n\t\t\t\tcompareDocs.add(null);\n\t\t}\n\t\t\n\t\treturn compareDocs;\n\t}", "public void extractKnowledge()\n {\n }", "public static Document parse(String filename) throws ParserException {\n\t\t// TODO YOU MUST IMPLEMENT THIS\n\t\t// girish - All the code below is mine\n\t\t\t\n\t\t// Creating the object for the new Document\n\t\t\n\t\t\n\t\tif (filename == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\t// Variable indexPos to track the current pointer location in the String Array\n\t\tint indexPos = 0;\n\t\t\n\t\t// Creating an instance of the document class to store the parsed content\n\t\tDocument d = new Document();\n\t\t\n\t\t// to store the result sent from the regexAuthor method and regexPlaceDate method\n\t\tObject[] resultAuthor = {null, null, null};\n\t\tObject[] resultPlaceDate = {null, null, null};\n\t\tStringBuilder news = new StringBuilder();\n\t\t\n\t\t// Next 4 lines contains the code to get the fileID and Category metadata\n\t\tString[] fileCat = new String[2];\n\t\t\n\t\tfileCat = regexFileIDCat(\"/((?:[a-z]|-)+)/([0-9]{7})\", filename);\n\t\t// System.out.println(filename);\n\t\t// throw an exception if the file is blank, junk or null\n\t\tif (fileCat[0] == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\td.setField(FieldNames.CATEGORY, fileCat[0]);\n\t\td.setField(FieldNames.FILEID, fileCat[1]);\n\t\t\n\t\t\n\t\t// Now , parsing the file\n\t\tFile fileConnection = new File(filename);\n\t\t\n\t\t// newscollated - it will store the parsed file content on a line by line basis\n\t\tArrayList<String> newscollated = new ArrayList<String>();\n\t\t\n\t\t// String that stores the content obtained from the . readline() operation\n\t\tString temp = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tBufferedReader getInfo = new BufferedReader(new FileReader(fileConnection));\n\t\t\twhile ((temp = getInfo.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(temp.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\ttemp = temp + \" \";\n\t\t\t\t\tnewscollated.add(temp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tgetInfo.close();\n\t\t\t\n\t\t\t//-- deprecated (REMOVE THIS IF OTHER WORKS)\n\t\t\t// setting the title using the arraylist's 0th index element\n\t\t\t//d.setField(FieldNames.TITLE, newscollated.get(0));\n\t\t\t\n\t\t\t// Appending the lines into one big string using StringBuilder\n\t\t\t\n\t\t\tfor (String n: newscollated)\n\t\t\t{\n\t\t\t\tnews.append(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Obtaining the TITLE of the file\n\t\t\tObject[] titleInfo = new Object[2];\n\t\t\t\n\t\t\ttitleInfo = regexTITLE(\"([^a-z]+)\\\\s{2,}\", news.toString());\n\t\t\td.setField(FieldNames.TITLE, titleInfo[0].toString().trim());\n\t\t\tindexPos = (Integer) titleInfo[1];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Getting the Author and Author Org\n\t\t\tresultAuthor = regexAuthor(\"<AUTHOR>(.*)</AUTHOR>\", news.toString());\n\t\t\t\n\t\t\tif (resultAuthor[0] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHOR, resultAuthor[0].toString());\n\t\t\t}\n\t\t\t\n\t\t\tif (resultAuthor[1] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHORORG, resultAuthor[1].toString());\n\t\t\t}\n\t\t \n\t\t \n\t\t \n\t\t if ((Integer) resultAuthor[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultAuthor[2];\n\t\t }\n\t\t\t\n\t\t \n\t\t \n\t\t // Getting the Place and Date\n \t\t\tresultPlaceDate = regexPlaceDate(\"\\\\s{2,}(.+),\\\\s(?:([A-Z][a-z]+\\\\s[0-9]{1,})\\\\s{1,}-)\", news.toString());\n \t\t\t\n \t\t\tif (resultPlaceDate[0] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.PLACE, resultPlaceDate[0].toString().trim());\n \t\t\t}\n \t\t \n \t\t\tif (resultPlaceDate[1] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.NEWSDATE, resultPlaceDate[1].toString().trim());\n \t\t\t}\n \t\t\t\n \t\t // getting the content\n \t\t \n \t\t if ((Integer) resultPlaceDate[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultPlaceDate[2];\n\t\t }\n \t\t \n \t\t \n \t\t d.setField(FieldNames.CONTENT, news.substring(indexPos + 1));\n \t\t \n \t\t return d;\n \t\t \n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException e){\n\t\t\tthrow new ParserException();\n\t\t\t\n\t\t}\n\n\t\tcatch(IOException e){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn d;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public Object getContent() {\n\t\tManageProperties properties = ManageProperties.getInstance();\n\t\tDocument gateDoc = null;\n\t\ttry {\n\t\t\tgateDoc = (Document) Factory.createResource(\"gate.corpora.DocumentImpl\", Utils.featureMap(\"encoding\", properties.getValue(PropertiesFields.ENCODING.toString())));\n\t\t\tDocumentType doc = xmldoc.getDocument();\n\t\t\tgateDoc.setContent(new DocumentContentImpl(doc.getText()));\n\t\t\tAnnotationSet defaultSet = gateDoc.getAnnotations();\n\t\t\tTokensType tokens = doc.getTokens();\n\t\t\tIterator<TokenType> iterTokens = tokens.getToken().iterator();\n\t\t\twhile(iterTokens.hasNext()) {\n\t\t\t\tTokenType token = iterTokens.next();\n\t\t\t\tFeatureMap tokenFeatures = Factory.newFeatureMap();\n\t\t\t\ttokenFeatures.put(\"string\", token.getForm());\n\t\t\t\ttokenFeatures.put(\"root\", token.getLemma());\n\t\t\t\ttokenFeatures.put(\"category\", token.getCategory());\n\t\t\t\tdefaultSet.add(token.getBeginspan().longValue(), token.getEndspan().longValue(), \"Token\", tokenFeatures);\n\t\t\t}\n\t\t\t\n\t\t\tIterator<SentenceType> iterSentences = doc.getSentence().iterator();\n\t\t\twhile(iterSentences.hasNext()) {\n\t\t\t\tSentenceType sent = iterSentences.next();\n\t\t\t\tdefaultSet.add(sent.getBeginspan().longValue(), sent.getEndspan().longValue(), \"Sentence\", Factory.newFeatureMap());\n\t\t\t}\n\t\t} catch (ResourceInstantiationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidOffsetException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn (gateDoc);\n\t}", "@Override\n public void process(JCas aJCas) throws AnalysisEngineProcessException {\n // TODO Auto-generated method stub\n String text = aJCas.getSofaDataString();\n // get top 1 chunking \n ScoredObject<Chunking> chunkres = chunker.nBest(text.toCharArray(), 0, text.length(), 1).next();\n double conf = chunkres.score();\n for(Chunk chunk : chunkres.getObject().chunkSet())\n {\n // adapt indices to non whitespace\n int begin = text.substring(0, chunk.start()).replaceAll(\"\\\\s\", \"\").length(); \n int end = -1+text.substring(0, chunk.end()).replaceAll(\"\\\\s\", \"\").length(); \n // add mention to CAS\n GeneEntitybyLingpipe mention = new GeneEntitybyLingpipe(aJCas, begin, end);\n mention.setEntityText(text.substring(chunk.start(), chunk.end()));\n mention.setCasProcessorId(this.getClass().getName());\n mention.setConfidence(conf);\n mention.addToIndexes();\n }\n }", "public ArrayList<String> makeSentences(String text) {\n \t\t/*\n \t\t * Quick check so we're not trying to split up an empty\n \t\t * String. This only happens right before the user types\n \t\t * at the end of a document and we don't have anything to\n \t\t * split, so return.\n \t\t */\n \t\tif (text.equals(\"\")) {\n \t\t\tArrayList<String> sents = new ArrayList<String>();\n \t\t\tsents.add(\"\");\n \t\t\treturn sents;\n \t\t}\n \t\t\n \t\t/**\n \t\t * Because the eosTracker isn't initialized until the TaggedDocument is,\n \t\t * it won't be ready until near the end of DocumentProcessor, in which\n \t\t * case we want to set it to the correct\n \t\t */\n \t\tthis.eosTracker = main.editorDriver.taggedDoc.eosTracker;\n \t\tthis.editorDriver = main.editorDriver;\n \t\t\n \t\tArrayList<String> sents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tArrayList<String> finalSents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tboolean mergeNext = false;\n \t\tboolean mergeWithLast = false;\n \t\tboolean forceNoMerge = false;\n \t\tint currentStart = 1;\n \t\tint currentStop = 0;\n \t\tString temp;\n \n \t\t/**\n \t\t * replace unicode format characters that will ruin the regular\n \t\t * expressions (because non-printable characters in the document still\n \t\t * take up indices, but you won't know they're there untill you\n \t\t * \"arrow\" though the document and have to hit the same arrow twice to\n \t\t * move past a certain point. Note that we must use \"Cf\" rather than\n \t\t * \"C\". If we use \"C\" or \"Cc\" (which includes control characters), we\n \t\t * remove our newline characters and this screws up the document. \"Cf\"\n \t\t * is \"other, format\". \"Cc\" is \"other, control\". Using \"C\" will match\n \t\t * both of them.\n \t\t */\n \t\ttext = text.replaceAll(\"\\u201C\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\u201D\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\\\p{Cf}\",\"\");\n \n \t\tint lenText = text.length();\n \t\tint index = 0;\n \t\tint buffer = editorDriver.sentIndices[0];\n \t\tString safeString = \"\";\n \t\tMatcher abbreviationFinder = ABBREVIATIONS_PATTERN.matcher(text);\n \t\t\n \t\t//================ SEARCHING FOR ABBREVIATIONS ================\n \t\twhile (index < lenText-1 && abbreviationFinder.find(index)) {\n \t\t\tindex = abbreviationFinder.start();\n \t\t\t\n \t\t\ttry {\n \t\t\t\tint abbrevLength = index;\n \t\t\t\twhile (text.charAt(abbrevLength) != ' ') {\n \t\t\t\t\tabbrevLength--;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (ABBREVIATIONS.contains(text.substring(abbrevLength+1, index+1))) {\n \t\t\t\t\teosTracker.setIgnore(index+buffer, true);\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \t\t\t\n \t\t\tindex++;\n \t\t}\t\t\n \t\t\n \t\tMatcher sent = EOS_chars.matcher(text);\n \t\tboolean foundEOS = sent.find(currentStart); // xxx TODO xxx take this EOS character, and if not in quotes, swap it for a permanent replacement, and create and add an EOS to the calling TaggedDocument's eosTracker.\n \t\t\n \t\t/*\n \t\t * We want to check and make sure that the EOS character (if one was found) is not supposed to be ignored. If it is, we will act like we did not\n \t\t * find it. If there are multiple sentences with multiple EOS characters passed it will go through each to check, foundEOS will only be true if\n \t\t * an EOS exists in \"text\" that would normally be an EOS character and is not set to be ignored.\n \t\t */\n \t\t\n \t\tindex = 0;\n \t\tif (foundEOS) {\t\n \t\t\ttry {\n \t\t\t\twhile (index < lenText-1 && sent.find(index)) {\n \t\t\t\t\tindex = sent.start();\n \t\t\t\t\tif (!eosTracker.sentenceEndAtIndex(index+buffer)) {\n \t\t\t\t\t\tfoundEOS = false;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tfoundEOS = true;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tindex++;\n \t\t\t\t}\n \t\t\t} catch (IllegalStateException e) {}\n \t\t}\n \t\t//We need to reset the Matcher for the code below\n \t\tsent = EOS_chars.matcher(text);\n \t\tsent.find(currentStart);\n \t\t\n \t\tMatcher sentEnd;\n \t\tMatcher citationFinder;\n \t\tboolean hasCitation = false;\n \t\tint charNum = 0;\n \t\tint lenTemp = 0;\n \t\tint lastQuoteAt = 0;\n \t\tint lastParenAt = 0;\n \t\tboolean foundQuote = false;\n \t\tboolean foundParentheses = false;\n \t\tboolean isSentence;\n \t\tboolean foundAtLeastOneEOS = foundEOS;\n \t\t\n \t\t/**\n \t\t * Needed otherwise when the user has text like below:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two. This is the last sentence.\n \t\t * and they begin to delete the EOS character as such:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two This is the last sentence.\n \t\t * Everything gets screwed up. This is because the operations below operate as expected only when there actually is an EOS character\n \t\t * at the end of the text, it expects it there in order to function properly. Now usually if there is no EOS character at the end it wouldn't\n \t\t * matter since the while loop and !foundAtLeastOneEOS conditional are executed properly, BUT as you can see the quotes, or more notably the EOS character inside\n \t\t * the quotes, triggers this initial test and thus the operation breaks. This is here just to make sure that does not happen.\n \t\t */\n \t\tString trimmedText = text.trim();\n \t\tint trimmedTextLength = trimmedText.length();\n \n \t\t//We want to make sure that if there is an EOS character at the end that it is not supposed to be ignored\n \t\tboolean EOSAtSentenceEnd = true;\n \t\tif (trimmedTextLength != 0) {\n \t\t\tEOSAtSentenceEnd = EOS.contains(trimmedText.substring(trimmedTextLength-1, trimmedTextLength)) && eosTracker.sentenceEndAtIndex(editorDriver.sentIndices[1]-1);\n \t\t} else {\n \t\t\tEOSAtSentenceEnd = false;\n \t\t}\n \t\t\n \t\t//Needed so that if we are deleting abbreviations like \"Ph.D.\" this is not triggered.\n \t\tif (!EOSAtSentenceEnd && (editorDriver.taggedDoc.watchForEOS == -1))\n \t\t\tEOSAtSentenceEnd = true;\n \n \t\twhile (foundEOS == true) {\n \t\t\tcurrentStop = sent.end();\n \t\t\t\n \t\t\t//We want to make sure currentStop skips over ignored EOS characters and stops only when we hit a true EOS character\n \t\t\ttry {\n \t\t\t\twhile (!eosTracker.sentenceEndAtIndex(currentStop+buffer-1) && currentStop != lenText) {\n \t\t\t\t\tsent.find(currentStop+1);\n \t\t\t\t\tcurrentStop = sent.end();\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \n \t\t\ttemp = text.substring(currentStart-1,currentStop);\n \t\t\tlenTemp = temp.length();\n \t\t\tlastQuoteAt = 0;\n \t\t\tlastParenAt = 0;\n \t\t\tfoundQuote = false;\n \t\t\tfoundParentheses = false;\n \t\t\t\n \t\t\tfor(charNum = 0; charNum < lenTemp; charNum++){\n \t\t\t\tif (temp.charAt(charNum) == '\\\"') {\n \t\t\t\t\tlastQuoteAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundQuote == true)\n \t\t\t\t\t\tfoundQuote = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundQuote = true;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (temp.charAt(charNum) == '(') {\n \t\t\t\t\tlastParenAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundParentheses)\n \t\t\t\t\t\tfoundParentheses = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundParentheses = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundQuote == true && ((temp.indexOf(\"\\\"\",lastQuoteAt+1)) == -1)) { // then we found an EOS character that shouldn't split a sentence because it's within an open quote.\n \t\t\t\tif ((currentStop = text.indexOf(\"\\\"\",currentStart +lastQuoteAt+1)) == -1) {\n \t\t\t\t\tcurrentStop = text.length(); // if we can't find a closing quote in the rest of the input text, then we assume the author forgot to put a closing quote, and act like it's at the end of the input text.\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tcurrentStop +=1;\n \t\t\t\t\tmergeNext=true;// the EOS character we are looking for is not in this section of text (section being defined as a substring of 'text' between two EOS characters.)\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\n \t\t\tif (foundParentheses && ((temp.indexOf(\")\", lastParenAt+1)) == -1)) {\n \t\t\t\tif ((currentStop = text.indexOf(\")\", currentStart + lastParenAt + 1)) == -1)\n \t\t\t\t\tcurrentStop = text.length();\n \t\t\t\telse {\n \t\t\t\t\tcurrentStop += 1;\n \t\t\t\t\tmergeNext = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \n \t\t\tif (foundQuote) {\n \t\t\t\tsentEnd = SENTENCE_QUOTE.matcher(text);\t\n \t\t\t\tisSentence = sentEnd.find(currentStop-2); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \n \t\t\t\tif (isSentence == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\t\tcurrentStop = text.indexOf(\"\\\"\",sentEnd.start())+1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundParentheses) {\n \t\t\t\tsentEnd = SENTENCE_PARENTHESES.matcher(text);\n \t\t\t\tisSentence = sentEnd.find(currentStop-2);\n \t\t\t\t\n \t\t\t\tif (isSentence == true) {\n \t\t\t\t\tcurrentStop = text.indexOf(\")\", sentEnd.start()) + 1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1, currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// now check to see if there is a CITATION after the sentence (doesn't just apply to quotes due to paraphrasing)\n \t\t\t// The rule -- at least as of now -- is if after the EOS mark there is a set of parenthesis containing either one word (name) or a name and numbers (name 123) || (123 name) || (123-456 name) || (name 123-456) || etc..\n \t\t\tcitationFinder = CITATION.matcher(text.substring(currentStop));\t\n \t\t\thasCitation = citationFinder.find(); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \t\t\t\n \t\t\tif (hasCitation == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\tcurrentStop = text.indexOf(\")\",citationFinder.start()+currentStop)+1;\n \t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\tmergeNext = false;\n \t\t\t}\t\n \t\t\t\n \t\t\tif (mergeWithLast) {\n \t\t\t\tmergeWithLast=false;\n \t\t\t\tString prev=sents.remove(sents.size()-1);\n \t\t\t\tsafeString=prev+safeString;\n \t\t\t}\n \t\t\t\n \t\t\tif (mergeNext && !forceNoMerge) {//makes the merge happen on the next pass through\n \t\t\t\tmergeNext=false;\n \t\t\t\tmergeWithLast=true;\n \t\t\t} else {\n \t\t\t\tforceNoMerge = false;\n \t\t\t\tfinalSents.add(safeString);\n \t\t\t}\n \t\t\n \t\t\tsents.add(safeString);\n \t\t\t\n \t\t\t//// xxx xxx xxx return the safeString_subbedEOS too!!!!\n \t\t\tif (currentStart < 0 || currentStop < 0) {\n \t\t\t\tLogger.logln(NAME+\"Something went really wrong making sentence tokens.\", LogOut.STDERR);\n \t\t\t\tErrorHandler.fatalProcessingError(null);\n \t\t\t}\n \n \t\t\tcurrentStart = currentStop+1;\n \t\t\tif (currentStart >= lenText) {\n \t\t\t\tfoundEOS = false;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tfoundEOS = sent.find(currentStart);\n \t\t}\n \n \t\tif (!foundAtLeastOneEOS || !EOSAtSentenceEnd) {\n \t\t\tArrayList<String> wrapper = new ArrayList<String>(1);\n \t\t\twrapper.add(text);\n \t\t\treturn wrapper;\n \t\t}\n \t\t\n \t\treturn finalSents;\n \t}", "public void analyzeDocument(String text) {\n\t\tString[] tokens = m_tokenizer.tokenize(text.toLowerCase());\n\t\tfor (int j = 0; j < tokens.length; j++)\n\t\t\ttokens[j] = SnowballStemmingDemo(NormalizationDemo(tokens[j]));\n\t\tHashMap<String, Integer> document_tf = new HashMap<String, Integer>();\n\t\tfor (String token : tokens) {\n\t\t\tif (!document_tf.containsKey(token))\n\t\t\t\tdocument_tf.put(token, 1);\n\t\t\telse\n\t\t\t\tdocument_tf.put(token, document_tf.get(token) + 1);\n\t\t\tif (!df.containsKey(token))\n\t\t\t\tdf.put(token, 1);\n\t\t\telse\n\t\t\t\tdf.put(token, df.get(token) + 1);\n\t\t}\n\t\ttf.add(document_tf);\n\t\t/*\n\t\t * for(String token : document_tf.keySet()) { if(!df.containsKey(token))\n\t\t * df.put(token, 1); else df.put(token, df.get(token) + 1); if(!) }\n\t\t */\n\t\tm_reviews.add(text);\n\t}", "public static void testDictionary() throws IOException {\n String wnhome=\"c:\\\\Users\\\\Katherine\\\\Documents\\\\2nd sem\\\\IR\\\\project\\\\WordNet_3.1\";\n String path = wnhome + File.separator + \"dict\";\n\n\n URL url = new URL(\"file\", null, path);\n\n IDictionary dictionary = new Dictionary(url);\n dictionary.open();\n // /Users/Ward/Downloads\n IIndexWord indexWord = dictionary.getIndexWord(\"use\", POS.VERB);\n\n for (IWordID wordID : indexWord.getWordIDs()) {\n\n IWord word = dictionary.getWord(wordID);\n for (IWord word1 : word.getSynset().getWords()) {\n System.out.println(word1.getLemma());\n }\n// System.out.println(\"Id = \" + wordID);\n// System.out.println(\" Lemma = \" + word.getLemma());\n// System.out.println(\" Gloss = \" + word.getSynset().getGloss());\n\n List<ISynsetID> hypernyms =\n word.getSynset().getRelatedSynsets(Pointer.HYPERNYM);\n // print out each h y p e r n y m s id and synonyms\n List<IWord> words;\n for (ISynsetID sid : hypernyms) {\n words = dictionary.getSynset(sid).getWords();\n System.out.print(sid + \" {\");\n for (Iterator<IWord> i = words.iterator(); i.hasNext(); ) {\n System.out.print(i.next().getLemma());\n if (i.hasNext())\n System.out.print(\", \");\n }\n System.out.println(\"}\");\n }\n }\n }", "@Override\r\n protected void parseDocuments()\r\n {\n\r\n }", "public void getNounPhrases(Parse p) {\n if (p.getType().equals(\"NN\") || p.getType().equals(\"NNS\") || p.getType().equals(\"NNP\") \n || p.getType().equals(\"NNPS\")) {\n nounPhrases.add(p.getCoveredText()); //extracting the noun parse\n }\n \n if (p.getType().equals(\"VB\") || p.getType().equals(\"VBP\") || p.getType().equals(\"VBG\")|| \n p.getType().equals(\"VBD\") || p.getType().equals(\"VBN\")) {\n \n verbPhrases.add(p.getCoveredText()); //extracting the verb parse\n }\n \n for (Parse child : p.getChildren()) {\n getNounPhrases(child);\n }\n}", "private CText getTaxonomyList(\tfinal String inputText, \n\t\t\t\t\t\t\t\t\tfinal String title, \n\t\t\t\t\t\t\t\t\tboolean breakdown) {\n\t\tCText document = new CText(title);\n\t\t\t\t\n\t\t\t/*\n\t\t\t * Step 2:Extract the N-Grams from the document\n\t\t\t */\n\t\tCNGramsExtractor nGramsExtract = new CNGramsExtractor();\n\t\t\n\t\t//INFO\n\t\tSystem.out.println(\"Last execution\");\n\t\tif( nGramsExtract.extract(document, inputText) ) {\n\t\t\tdocument.setState(CText.E_STATES.NGRAMS);\n\t\t\tSystem.out.println(\"NGram extracted\");\n\t\t\t\n\t\t\t/*\n\t\t\t * Step 3: Extract Composite and semantics \n\t\t\t */\n\t\t\tCTaxonomyExtractor taxonomyExtractor = new CTaxonomyExtractor(_taxonomyConnection, breakdown);\n\t\t\tif( taxonomyExtractor.extract(document) ) {\n\t\t\t\tdocument.setState(CText.E_STATES.TAXONOMY);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn document;\n\t}", "public static void main(String[] args) throws Exception\n\t{\n\t\tList<Artifact> docs = Artifact.listByType(Type.Document,false);\n\t\tint counter = 0;\n\t\tfor(Artifact doc : docs)\n\t\t{\n\t\t\t\tMLExample.hibernateSession = HibernateUtil.clearSession(MLExample.hibernateSession);\n\t\t\t\tString doc_path = doc.getAssociatedFilePath();\n//\t\t\t\tList<MLExample> trainExamples = \n//\t\t\t\t\tMLExample.getExamplesInDocument(LinkExampleBuilder.ExperimentGroupTimexEvent, doc_path);\n//\t\t\t\tList<MLExample> trainExamples2 = \n//\t\t\t\t\tMLExample.getExamplesInDocument(LinkExampleBuilder.ExperimentGroupEventEvent, doc_path);\n\n\t\t\t\tList<MLExample> trainExamples3 = \n\t\t\t\t\tMLExample.getExamplesInDocument(SecTimeEventExampleBuilder.ExperimentGroupSecTimeEvent,\n\t\t\t\t\t\t\tdoc_path);\n\t\t\t\t\n\t\t\t\tList<MLExample> all_train_examples = new ArrayList<MLExample>();\n//\t\t\t\tall_train_examples.addAll(trainExamples);\n//\t\t\t\tall_train_examples.addAll(trainExamples2);\n\t\t\t\tall_train_examples.addAll(trainExamples3);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(MLExample example_to_process: all_train_examples)\n\t\t\t\t{\n\t\t\t\t\tNormalizedDependencyFeatures ndf = new NormalizedDependencyFeatures();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tndf.calculateFeatures(example_to_process);\n\n\t\t\t\t\tHibernateUtil.clearLoaderSession();\n\t\t\t\t}\n\t\t\t\tcounter++;\n\t\t\t\tFileUtil.logLine(null, \"Doc processed:\"+counter);\n\t\t//\t\tMLExample example_to_process = MLExample.getInstanceForLink\n\t\t//\t\t(PhraseLink.getInstance(4117), experimentgroup);\n\t\t}\n\t\t\n\t}", "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}", "String getNodeAndWordVec(String nodeId, ArmifiedAttributeValuePair avp,\n String docArmId, NodeVecs ndvecs) throws IOException {\n \n boolean isIntervention = avp.getAttribute().getType()== AttributeType.INTERVENTION;\n \n /*\n if (avp.getAttribute().getId().equals(\"3673298\") && docArmId.startsWith(\"Ellerbeck\"))\n avp = avp;\n */\n \n // Write out the words following the node... which are to\n // be loaded from the PubMed pretrained embeddings \n String textValue =\n isIntervention?\n quantized?\n ((NormalizedAttributeValuePair)((NormalizedAttributeValuePair)avp).getOriginal()).getOriginal().getValue()\n :\n ((NormalizedAttributeValuePair)avp).getOriginal().getValue()\n :\n avp.getValue();\n \n textValue = DataInstanceManager.selectWindowOfWords(avp.getContext(), textValue);\n \n \n // If just a single token, then get a longer context (if the flag to use it is true by the caller)\n String analyzedContext = PaperIndexer.analyze(analyzer, textValue);\n if (useLargerContext && !isIntervention && analyzedContext.split(\" \").length == 1)\n textValue = avp.getContext();\n \n analyzedContext = PaperIndexer.analyze(analyzer, textValue);\n String pseudoWord = avp.getAttribute().getType().getShortString() +\n \":\" + avp.getAttribute().getId() +\n \":\" + docArmId;\n \n WordVec sumvec = new WordVec(wvec_dimension);\n int numWordMatches = 0;\n float[] extractedNumbersFormAnnotations = new float[NUM_ADDITIONAL_DIMENSIONS_FOR_NUMERIC];\n float val = 0;\n int numbersFound = 0;\n \n for (String token: analyzedContext.split(\" \")) {\n \n // First check if this token is a number. If so, we know that its vector\n // won't exist in the PubMed vecs\n try {\n val = Float.parseFloat(token);\n }\n catch (NumberFormatException nex) { val = 0; }\n if (val > 0 && !isIntervention) {\n if (numbersFound < NUM_ADDITIONAL_DIMENSIONS_FOR_NUMERIC)\n extractedNumbersFormAnnotations[numbersFound++] = val;\n continue;\n }\n \n // Next check if the PubMed pre-trained vector for this word exists.\n WordVec wvec = this.wvecs.getVec(token);\n if (wvec == null) { \n // Keep OOV count here...\n oov++;\n continue;\n }\n \n sumvec = WordVec.sum(sumvec, wvec);\n numWordMatches++;\n totalWordsSeen++;\n }\n if (numWordMatches > 0)\n sumvec.scalarMutiply(1/(float)numWordMatches); // take the average vector\n \n WordVec sumvecWithNumbers = appendNumbersToContext(sumvec, pseudoWord, extractedNumbersFormAnnotations);\n WordVec concatenatedVec = constructConcatenatedVec(avp, ndvecs, sumvecWithNumbers);\n \n nodeAndWordVecMap.put(concatenatedVec.getWord(), concatenatedVec);\n \n return pseudoWord; // the key is written in the node sequence i/p file\n }", "public WordNet(String synsets, String hypernyms) {\n if (synsets == null || hypernyms == null) {\n throw new IllegalArgumentException(\"synsets and hypernyms can't be empty\");\n }\n int lineCount = 0;\n In inputFile = new In(synsets);\n while (inputFile.hasNextLine()) {\n String aLine = inputFile.readLine();\n String[] splitArr = aLine.split(\",\");\n int synID = Integer.parseInt(splitArr[0]);\n String[] nounSyn = splitArr[1].split(\" \");\n nouns.put(synID, nounSyn);\n for (String word : nounSyn) {\n LinkedList<Integer> nounList = synsetList.get(word);\n if (nounList == null) {\n nounList = new LinkedList<Integer>();\n }\n nounList.add(synID);\n synsetList.put(word, nounList);\n\n }\n lineCount += 1;\n\n }\n inputFile.close();\n aDigraph = new Digraph(lineCount);\n In hyperInput = new In(hypernyms);\n while (hyperInput.hasNextLine()) {\n String aLine = hyperInput.readLine();\n String[] splitArr = aLine.split(\",\");\n int synID = Integer.parseInt(splitArr[0]);\n for (int i = 1; i < splitArr.length; i++) {\n aDigraph.addEdge(synID, Integer.parseInt(splitArr[i]));\n }\n }\n hyperInput.close();\n shortestCA = new ShortestCommonAncestor(aDigraph);\n\n\n }", "private static Positional_inverted_index posindexCorpus(DocumentCorpus corpus) throws ClassNotFoundException, InstantiationException, IllegalAccessException, FileNotFoundException, IOException {\n\n NewTokenProcessor processor = new NewTokenProcessor();\n Iterable<Document> docs = corpus.getDocuments(); //call registerFileDocumentFactory first?\n\n List<Double> Doc_length = new ArrayList<>();\n Positional_inverted_index index = new Positional_inverted_index();\n\n double token_count = 0;\n\n // Iterate through the documents, and:\n for (Document d : docs) {\n //File f = new File(path + \"\\\\\" + d.getTitle());\n File f = new File(path + \"\\\\\" + d.getFileName().toString());\n double Filesize = f.length();\n //edited by bhavya\n double doc_weight = 0; //first entry in docweights.bin\n double doc_tokens = 0;\n double doc_length = 0;\n HashMap<String, Integer> tftd = new HashMap<>();\n // Tokenize the document's content by constructing an EnglishTokenStream around the document's content.\n Reader reader = d.getContent();\n EnglishTokenStream stream = new EnglishTokenStream(reader); //can access tokens through this stream\n N++;\n // Iterate through the tokens in the document, processing them using a BasicTokenProcessor,\n //\t\tand adding them to the HashSet vocabulary.\n Iterable<String> tokens = stream.getTokens();\n int i = 0;\n\n for (String token : tokens) {\n\n //adding token in index\n List<String> word = new ArrayList<String>();\n word = processor.processToken(token);\n //System.out.println(word.get(0));\n if (word.get(0).matches(\"\")) {\n continue;\n } else {\n\n index.addTerm(word.get(0), i, d.getId());\n\n }\n i = i + 1;\n\n //we check if token already exists in hashmap or not. \n //if it exists, increase its freq by 1 else make a new entry.\n if (tftd.containsKey(word.get(0))) {\n doc_tokens++;\n int count = tftd.get(word.get(0));\n tftd.replace(word.get(0), count + 1);\n } else {\n doc_tokens++;\n// token_count++; //gives total number of tokens.\n tftd.put(word.get(0), 1);\n }\n\n }\n double length = 0;\n double wdt = 0;\n\n double total_tftd = 0;\n for (Map.Entry<String, Integer> entry : tftd.entrySet()) {\n\n wdt = 1 + log(entry.getValue());\n\n length = length + pow(wdt, 2);\n total_tftd = total_tftd + entry.getValue();\n }\n token_count = token_count + doc_tokens;\n doc_weight = pow(length, 0.5);\n double avg_tftd = total_tftd / (double) tftd.size();\n\n Doc_length.add(doc_weight);\n Doc_length.add(avg_tftd);\n Doc_length.add(doc_tokens);\n Doc_length.add(Filesize);\n }\n Doc_length.add(token_count / N);\n\n DiskIndexWriter d = new DiskIndexWriter();\n d.write_doc(path, Doc_length);\n\n return index;\n }", "public List<Document> retrieveQuery( Query aQuery, int TopN ) throws IOException {\n\t\t// NT: you will find our IndexingLucene.Myindexreader provides method: docLength()\n\t\t// implement your retrieval model here, and for each input query, return the topN retrieved documents\n\t\t// sort the documents based on their relevance score, from high to low\n\n\t\tHashMap<Integer, HashMap<String,Integer>> idTokenDocFrequencyMap = new HashMap<>();\t//docid - (token - document frequency) map\n\t\tHashMap<String, Long> tokenColFrequencyMap = new HashMap<>();\t// token - collection frequency map\n\t\tString content = aQuery.GetQueryContent();\n\t\tString[] tokens = content.split(\" \");\n\n\t\tfor(String token : tokens){\n\t\t\ttokenColFrequencyMap.put(token, indexReader.CollectionFreq(token)); \t// update the second map\n\t\t\tint [][]postingList = indexReader.getPostingList(token);\n\t\t\tif(postingList == null) continue;\n\t\t\tfor(int i = 0; i < postingList.length; i++){\n\t\t\t\tint docid = postingList[i][0];\n\t\t\t\tint freq = postingList[i][1];\n\t\t\t\tif(idTokenDocFrequencyMap.containsKey(docid)){\t\t// update the first map\n\t\t\t\t\tidTokenDocFrequencyMap.get(docid).put(token,freq);\n\t\t\t\t}else {\n\t\t\t\t\tHashMap<String,Integer> tokenFrequencyMap = new HashMap<>();\n\t\t\t\t\ttokenFrequencyMap.put(token,freq);\n\t\t\t\t\tidTokenDocFrequencyMap.put(docid,tokenFrequencyMap);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdouble U = 2000.0;\n\t\tList<Document> documentList = new ArrayList<>();\n\t\t// if use a docidList, it will have some duplicates.\n\t\tfor(Map.Entry<Integer, HashMap<String,Integer>> entry : idTokenDocFrequencyMap.entrySet()){\n\t\t\tdouble score = 1.0;\t\t\t// each document have one score\n\t\t\tint docid = entry.getKey();\n\t\t\tint docLen = indexReader.docLength(docid);\t// get document length\n\t\t\tHashMap<String,Integer> tokenDocFrequencyMap = idTokenDocFrequencyMap.get(docid);\n\t\t\tfor(String token : tokens){\t\t// for each token, not the token just exist in the document\n\t\t\t\tlong colFreq = tokenColFrequencyMap.getOrDefault(token,0l);\t// get collection frequency\n\t\t\t\tif(colFreq != 0){\n\t\t\t\t\tint docFreq = 0;\t// if this document don't have token, just set document frequency as 0\n\t\t\t\t\tif(tokenDocFrequencyMap.containsKey(token)){\n\t\t\t\t\t\tdocFreq = tokenDocFrequencyMap.get(token);\n\t\t\t\t\t}\n\t\t\t\t\tscore = score * (docFreq + U * ((double)colFreq / colLen)) / (docLen + U);\t//equation\n\t\t\t\t}\n\t\t\t}\n\t\t\tDocument document = new Document(docid+\"\", indexReader.getDocno(docid),score);\n\t\t\tdocumentList.add(document);\n\t\t}\n\n\t\tCollections.sort(documentList, new Comparator<Document>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Document o1, Document o2) {\n\t\t\t\treturn Double.compare(o2.score(),o1.score());\n\t\t\t}\n\t\t});\n\t\tList<Document> res = new ArrayList<>();\n\t\tfor(int i = 0 ; i < TopN; i++){\n\t\t\tres.add(documentList.get(i));\n\t\t}\n\t\treturn res;\n\t}", "public Map<String, Object> getIE(String text, FallBackListBased pd) {\n\t\ttext = text.replaceAll(\" � \", \", \");\n\t\ttext = text.replaceAll(\"'s \", \" \");\n\t\ttext = text.replaceAll(\"'s\", \"\");\n\t\ttext = text.replaceAll(\"�s \", \" \");\n\t\ttext = text.replaceAll(\"�s \", \" \");\n\t\ttext = text.replaceAll(\"\\\\?\", \"\");\n\t\ttext = text.replaceAll(\":\", \"\");\n\t\tMap<String, Object> entities_map = new TreeMap<String, Object>();\n\t\tMap<String, Object> extractedEntities = new TreeMap<String, Object>();\n\t\tList<TreeMap<String, String>> entities = new ArrayList<TreeMap<String, String>>();\n\t\tList<TreeMap<String, String>> intents= new ArrayList<TreeMap<String, String>>();\n\t\tSet<String> intentsList=new HashSet<String>();\n\t\tSet<String> entitiesList=new HashSet<String>();\n\t\t\n\t\tString input = text;\n\t\t// text=text.replaceAll(\" \", \" \");\n\t\tSpan spanSentences[] = pd.sentenceDetector.sentPosDetect(input);\n\t\tint sentenceId = 1;\n\t\tTreeMap<String, String> intents_map = new TreeMap<String, String>();\n\t\tDouble entites_highest_cofidence = 0.0;\n\t\tDouble intents_highest_cofidence = 0.0;\n\t\tfor (Span sentence : spanSentences) {\n\t\t\tArrayList<PhraseTemplate> phrases = pd.GetPhrases(sentence\n\t\t\t\t\t.getCoveredText(input).toString(), sentenceId++);\n\t\t\t\n\t\t\tfor (PhraseTemplate svo : phrases) {\n\t\t\t\tString key = svo.phrase;\n\t\t\t\tkey = key.replaceAll(\" is \", \"\");\n\t\t\t\tkey = key.replaceAll(\"What \", \"\");\n\t\t\t\tkey = key.replaceAll(\"what \", \"\");\n\t\t\t\tkey = key.replaceAll(\" the \", \"\");\n\n\t\t\t\tif (key.length() > 1) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString resolvedEntity = lss.resolveEntity(key\n\t\t\t\t\t\t\t\t.toLowerCase().trim().toString(),\n\t\t\t\t\t\t\t\t\"entitesIndex\");\n\t\t\t\t\t\tString tokens[] = resolvedEntity.split(\"__\");\n//\t\t\t\t\t\tSystem.out.println(resolvedEntity+\" :: \"+key);\n\t\t\t\t\t\tif (tokens.length < 2)\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"entity\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim())>0.9)\n\t\t\t\t\t\t\tentitiesList.add(tokens[5].trim());\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"entity\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim()) > entites_highest_cofidence) {\n\t\t\t\t\t\t\tentities_map.clear();\n\t\t\t\t\t\t\tentities_map.put(\"Entity\", key.trim());\n\t\t\t\t\t\t\tentities_map.put(\"MappedEntity\", tokens[4].trim());\n\t\t\t\t\t\t\tentities_map.put(\"EntityConfidenceScore\", tokens[5].trim());\n\t\t\t\t\t\t\tentities_map.put(\"MappedEntityType\", tokens[2].trim());\n\t\t\t\t\t\t\tentites_highest_cofidence = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(tokens[5].trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"intent\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim())>0.9)\n\t\t\t\t\t\t\tintentsList.add(tokens[5].trim());\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"intent\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim()) > intents_highest_cofidence) {\n\t\t\t\t\t\t\tintents_map.clear();\n\t\t\t\t\t\t\tintents_map.put(\"Id\", tokens[0].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Extracted Entity\", key.trim());\n\t\t\t\t\t\t\tintents_map.put(\"Mapped Entity\", tokens[4].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Confidence\", tokens[5].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Class\", tokens[1].trim());\n\t\t\t\t\t\t\tintents_highest_cofidence = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(tokens[5].trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tentities_map.put(\"Intent\", intents_map.get(\"Extracted Entity\"));\n\t\tentities_map.put(\"MappedIntent\", intents_map.get(\"Mapped Entity\"));\n\t\tentities_map.put(\"IntentConfidenceScore\", intents_map.get(\"Confidence\"));\n\n\t\treturn entities_map;\n\t}", "String extractContentFromDocument(BotswanaCourtDocument bcd, String htmlfile,int startpage,int endpage){\n\t\t//dom tree structured in two formats example for 1st format(47-98) USA.1947.002 and for 2nd format(1998.25 - 2013) USA.2000.003\n\t\tDocument document = null;\n\t\tFile input = new File(htmlfile);\n\t\tString textContent = null;\n\t \t\n\t\tif( htmlfile == null ){\n\t\t\tSystem.out.println(\"File name is not valid\");\n\t\t}\n\t\telse{\n\t\t\ttry{\n\t\t\t\tdocument = Jsoup.parse(input,\"UTF-8\");\n\t\t\t\tString htmlText = document.body().toString();\n\t\t\t\tString textToBeExtracted = document.select(\"title\").text();\n\t \tSystem.out.println(\"text extracted =\"+textToBeExtracted);\n\t \t\n\t \t\n\t \tPattern pattern = Pattern.compile(\"\\\\((.*?)\\\\)\");\n\t \tMatcher matcher = pattern.matcher(textToBeExtracted);\n\t \tArrayList<String> matchedDataArray = new ArrayList<String>();\n\t \twhile(matcher.find()){\n\t \t\tmatchedDataArray.add(matcher.group());\n\t \t}\n\t \tif(matchedDataArray.size()>0){\n\t \t\tint firstIndex = textToBeExtracted.indexOf(matchedDataArray.get(matchedDataArray.size()-2)); \n\t\t \tif(firstIndex == -1){\n\t\t \t\tbcd.setParticipantsName(textToBeExtracted);\n\t\t \t}\n\t\t \telse{\n\t\t \t\tbcd.setParticipantsName(textToBeExtracted.substring(0,firstIndex-1));\n\t\t \t}\n\t\t \tbcd.setDecisionDate( matchedDataArray.get(matchedDataArray.size()-1));\n\t\t \tbcd.setCaseId(matchedDataArray.get(matchedDataArray.size()-2));\n\t\t \t\n\t \t}\n\t \telse{\n\t \t\tbcd.setParticipantsName(textToBeExtracted);\n\t \t\tbcd.setDecisionDate(\"\");\n\t\t \tbcd.setCaseId(\"\");\n\t \t}\n\t \t\n//\t \tint indexOfParticipantsEnd = textToBeExtracted.indexOf(\"[\");\n//\t \tString participantsName = textToBeExtracted.substring(0,indexOfParticipantsEnd-1);\n//\t \tbcd.setParticipantsName(participantsName);\n//\t \t\n//\t \tint indexOfDateStart = textToBeExtracted.indexOf(\"(\");\n//\t \tint indexOfDateEnd = textToBeExtracted.indexOf(\")\");\n//\t \tString decideDate = textToBeExtracted.substring(indexOfDateStart+1, indexOfDateEnd-1);\n//\t \tbcd.setDecisionDate(decideDate);\n//\t \t\n//\t \t\n//\t \tString caseIDPatternString = \"SC ([0-9]+/[0-9]+|CRI [0-9]+/[0-9]+)\";\n//\t \tPattern caseidPattern = Pattern.compile(caseIDPatternString);\n//\t \tMatcher caseidMatcher = caseidPattern.matcher(htmlText);\n//\t \t\n//\t \tString caseID =\"\";\n//\t \twhile (caseidMatcher.find()) {\n//\t \t\tcaseID = caseidMatcher.group();\n//\t \t \n//\t \t}\n//\t \tbcd.setCaseId(caseID);\n\t \t\n\t \ttextContent = htmlText;\n\t \t\n\t \t\n\t \t}\n\t \tcatch(Exception e){\n\t \t\tSystem.out.println(\"Error in parsing html : \" + e.getMessage());\n\t \t}\n\t\t}\n\t\treturn textContent;\n\t}", "public void makeWord(String inputText,String pageId,createIndex createindex,String contentType)\n {\n int length,i;\n char c;\n boolean linkFound=false;\n int count1,count2,count3,count4,count5,count6,count7,count8,count9;\n\n\n\n StringBuilder word=new StringBuilder();\n // String finalWord=null,stemmedWord=null;\n docId=Integer.parseInt(pageId.trim());\n\n ci=createindex;\n // Stemmer st=new Stemmer();\n //createIndex createindex=new createIndex();\n\n length=inputText.length();\n\n for(i=0;i<length;i++)\n {\n c=inputText.charAt(i);\n if(c<123 && c>96)\n {\n word.append(c);\n }\n\n else if(c=='{')\n {\n if ( i+9 < length && inputText.substring(i+1,i+9).equals(\"{infobox\") )\n {\n\n StringBuilder infoboxString = new StringBuilder();\n\n count1 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n infoboxString.append(c);\n if ( c == '{') {\n count1++;\n }\n else if ( c == '}') {\n count1--;\n }\n if ( count1 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {infoboxString.deleteCharAt(infoboxString.length()-1);}\n break;\n }\n }\n\n processInfobox(infoboxString);\n\n }\n\n else if ( i+8 < length && inputText.substring(i+1,i+8).equals(\"{geobox\") )\n {\n\n StringBuilder geoboxString = new StringBuilder();\n\n count2 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n geoboxString.append(c);\n if ( c == '{') {\n count2++;\n }\n else if ( c == '}') {\n count2--;\n }\n if ( count2 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {geoboxString.deleteCharAt(geoboxString.length()-1);}\n break;\n }\n }\n\n // processGeobox(geoboxString);\n }\n\n else if ( i+6 < length && inputText.substring(i+1,i+6).equals(\"{cite\") )\n {\n\n /*\n * Citations are to be removed.\n */\n\n count3 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '{') {\n count3++;\n }\n else if ( c == '}') {\n count3--;\n }\n if ( count3 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n else if ( i+4 < length && inputText.substring(i+1,i+4).equals(\"{gr\") )\n {\n\n /*\n * {{GR .. to be removed\n */\n\n count4 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '{') {\n count4++;\n }\n else if ( c == '}') {\n count4--;\n }\n if ( count4 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n else if ( i+7 < length && inputText.substring(i+1,i+7).equals(\"{coord\") )\n {\n\n /**\n * Coords to be removed\n */\n\n count5 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n\n if ( c == '{') {\n count5++;\n }\n else if ( c == '}') {\n count5--;\n }\n if ( count5 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n //System.out.println(\"process infobox\");\n }\n else if(c=='[')\n {\n // System.out.println(\"process square brace\");\n\n if ( i+11 < length && inputText.substring(i+1,i+11).equalsIgnoreCase(\"[category:\"))\n {\n\n StringBuilder categoryString = new StringBuilder();\n\n count6 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n categoryString.append(c);\n if ( c == '[') {\n count6++;\n }\n else if ( c == ']') {\n count6--;\n }\n if ( count6 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {categoryString.deleteCharAt(categoryString.length()-1);}\n break;\n }\n }\n\n // System.out.println(\"category string=\"+categoryString.toString());\n processCategories(categoryString);\n\n }\n else if ( i+8 < length && inputText.substring(i+1,i+8).equalsIgnoreCase(\"[image:\") ) {\n\n /**\n * Images to be removed\n */\n\n count7 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '[') {\n count7++;\n }\n else if ( c == ']') {\n count7--;\n }\n if ( count7 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n else if ( i+7 < length && inputText.substring(i+1,i+7).equalsIgnoreCase(\"[file:\") ) {\n\n /**\n * File to be removed\n */\n\n count8 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n\n if ( c == '[') {\n count8++;\n }\n else if ( c == ']') {\n count8--;\n }\n if ( count8 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n }\n else if(c=='<')\n {\n //System.out.println(\"Process < >\");\n\n if ( i+4 < length && inputText.substring(i+1,i+4).equalsIgnoreCase(\"!--\") ) {\n\n /**\n * Comments to be removed\n */\n\n int locationClose = inputText.indexOf(\"-->\" , i+1);\n if ( locationClose == -1 || locationClose+2 > length ) {\n i = length-1;\n }\n else {\n i = locationClose+2;\n }\n\n }\n else if ( i+5 < length && inputText.substring(i+1,i+5).equalsIgnoreCase(\"ref>\") ) {\n\n /**\n * References to be removed\n */\n int locationClose = inputText.indexOf(\"</ref>\" , i+1);\n if ( locationClose == -1 || locationClose+5 > length ) {\n i = length-1;\n }\n else {\n i = locationClose+5;\n }\n\n }\n else if ( i+8 < length && inputText.substring(i+1,i+8).equalsIgnoreCase(\"gallery\") ) {\n\n /**\n * Gallery to be removed\n */\n int locationClose = inputText.indexOf(\"</gallery>\" , i+1);\n if ( locationClose == -1 || locationClose+9 > length) {\n i = length-1;\n }\n else {\n i = locationClose+9;\n }\n }\n\n }\n else if ( c == '=' && i+1 < length && inputText.charAt(i+1) == '=')\n {\n\n linkFound = false;\n i+=2;\n while ( i < length && ((c = inputText.charAt(i)) == ' ' || (c = inputText.charAt(i)) == '\\t') )\n {\n i++;\n }\n\n if ( i+14 < length && inputText.substring(i , i+14 ).equals(\"external links\") )\n {\n //System.out.println(\"External link found\");\n linkFound = true;\n i+= 14;\n }\n\n }\n else if ( c == '*' && linkFound == true )\n {\n\n //System.out.println(\"Link found\");\n count9 = 0;\n boolean spaceParsed = false;\n StringBuilder link = new StringBuilder();\n while ( count9 != 2 && i < length )\n {\n c = inputText.charAt(i);\n if ( c == '[' || c == ']' )\n {\n count9++;\n }\n if ( count9 == 1 && spaceParsed == true)\n {\n link.append(c);\n }\n else if ( count9 != 0 && spaceParsed == false && c == ' ')\n {\n spaceParsed = true;\n }\n i++;\n }\n\n StringBuilder linkWord = new StringBuilder();\n for ( int j = 0 ; j < link.length() ; j++ )\n {\n char currentCharTemp = link.charAt(j);\n if ( (int)currentCharTemp >= 'a' && (int)currentCharTemp <= 'z' )\n {\n linkWord.append(currentCharTemp);\n }\n else\n {\n\n // System.out.println(\"link : \" + linkWord.toString());\n processLink(linkWord);\n linkWord.setLength(0);\n }\n }\n if ( linkWord.length() > 1 )\n {\n //System.out.println(\"link : \" + linkWord.toString());\n processLink(linkWord);\n linkWord.setLength(0);\n }\n\n }\n else\n {\n if(word.length()>1)\n filterAndAddWord(word,contentType);\n\n word.setLength(0);\n }\n }\n\n\n if(word.length()>1)\n filterAndAddWord(word,contentType);\n\n word.setLength(0);\n /*\n if(word.length()>0)\n {\n finalWord=new String(word);\n if(!(checkStopword(finalWord)))\n {\n st.add(finalWord.toCharArray(),finalWord.length());\n stemmedWord=st.stem();\n\n createindex.addToTreeSet(stemmedWord,docId);\n\n }\n\n word.delete(0, word.length());\n } */\n\n }", "public static void readDatafiles() throws FileNotFoundException {\n int docNumber = 0;\n\n while(docNumber<totaldocument) { // loop will run until all 0 - 55 speech data is read\n String tempBuffer = \"\";\n\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/speech_\"+docNumber+\".txt\"));\n sc_obj.nextLine(); //skip the first line of every document\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n tempBuffer = tempBuffer.replaceAll(\"[^a-zA-Z]+\",\" \");\n\n String[] wordTerm = tempBuffer.split(\" |//.\"); // the read data will convert into single word from whole stream of characters\n // it will split according to white spaces . - , like special characters\n\n for (int i=0; i < wordTerm.length; i++) {\n\n String term = wordTerm[i].toLowerCase();\t\t//each splitted word will be converted into lower case\n term = RemoveSpecialCharacter(term);\t\t\t// it will remove all the characters apart from the english letters\n term = removeStopWords(term);\t\t\t\t\t// it will remove the stopWords and final version of the term in the form of tokens will form\n\n if(!term.equalsIgnoreCase(\"\") && term.length()>1) {\n term = Lemmatize(term);\t\t\t\t\t//all the words in the form of tokens will be lemmatized\n //increment frequency of word if it is already present in dictionary\n if(dictionary.containsKey(term)) {\t\t//all the lemmatized words will be placed in HashMap dictionary\n List<Integer> presentList = dictionary.get(term);\n int wordFrequency = presentList.get(docNumber);\n wordFrequency++;\n presentList.set(docNumber, wordFrequency);\t\t//frequency of all the lemmatized words in dictionary is maintained \t\t\t\t\t\t\t\t\t//i.e: Word <2.0,1.0,3.0,0.0 ...> here hashmap<String,List<Double> is used\n }\t\t\t\t\t\t\t\t\t\t//the 0th index shows the word appared 2 times in doc 0 and 1 times in doc 1 and so forth..\n else { // if word was not in the dictionary then it will be added\n // if word was found in 5 doc so from 0 to 4 index representing doc 0 to doc 4 (0.0) will be placed\n List<Integer>newList = new ArrayList<>();\n for(int j=0; j<57; j++) {\n if(j != docNumber)\n newList.add(0);\n else\n newList.add(1);\n }\n dictionary.put(term, newList);\n }\n }\n }\n\n }\n docNumber++;\n }\n }", "public static void runExample() {\n\t\tString wnhome = \"C:\\\\bdaduy\\\\Software\\\\Wordnet3.1\\\\WordNet-3.0\";\n\t\tString path = wnhome + File.separator + \"dict\";\n\t\tURL url = null;\n\t\ttry {\n\t\t\turl = new URL(\"file\", null, path);\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (url == null)\n\t\t\treturn;\n\n\t\t// construct the dictionary object and open it\n\t\tIDictionary dict = new Dictionary(url);\n\t\ttry {\n\t\t\tdict.open();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// look up first sense of the word \"dog\"\n\t\tWordnetStemmer s=new WordnetStemmer(dict);\n\t\tList<String> stems=s.findStems(\"food\", POS.NOUN);\n\t\tDebug.print(stems);\n\t\tIIndexWord idxWord = dict.getIndexWord(\"food\", POS.NOUN);\n\t\tIWordID wordID = idxWord.getWordIDs().get(0);\n\t\tIWord word = dict.getWord(wordID);\n\t\tSystem.out.println(\"Id = \" + wordID);\n\t\tSystem.out.println(\"Lemma = \" + word.getLemma());\n\t\tSystem.out.println(\"Gloss = \" + word.getSynset().getGloss());\n\t\tSystem.out.println(\"test = \" + word.getSynset().getLexicalFile());\n\n\n\t}", "private Node estimateRelevance(Node original) throws Exception {\n Node combineNode = new Node(\"combine\", new NodeParameters(), original.getInternalNodes(), original.getPosition());\n\n // Only get as many as we need\n Parameters localParameters = retrieval.getGlobalParameters().clone();\n int fbDocs = (int) retrieval.getGlobalParameters().get(\"fbDocs\", 10);\n localParameters.set(\"requested\", fbDocs);\n\n // transform and run\n Node transformedCombineNode = retrieval.transformQuery(combineNode, localParameters);\n List<ScoredDocument> initialResults = retrieval.executeQuery(transformedCombineNode, localParameters).scoredDocuments;\n \n // Gather content\n ArrayList<String> names = new ArrayList<String>();\n for (ScoredDocument sd : initialResults) {\n names.add(sd.documentName);\n }\n List<Document> docs = getDocuments(names);\n\n // Now the maps from the different information sources\n // Each of these is a term -> field -> score double-mapping\n HashMap<String, TObjectDoubleHashMap<String>> uCFSs = null;\n double ucfw = p.get(\"ucfw\", 1.0);\n if (ucfw != 0.0) {\n uCFSs = getUnigramCollFieldScores();\n }\n\n HashMap<String, TObjectDoubleHashMap<String>> bCFSs = null;\n double bcfw = p.get(\"bcfw\", 1.0);\n if (bcfw != 0.0) {\n bCFSs = getBigramCollFieldScores();\n }\n\n HashMap<String, TObjectDoubleHashMap<String>> uPRFSs = null;\n double uprfw = p.get(\"uprfw\", 1.0);\n if (uprfw != 0.0) {\n uPRFSs = getUnigramPRFScores(docs);\n }\n\n HashMap<String, TObjectDoubleHashMap<String>> bPRFSs = null;\n double bprfw = p.get(\"bprfw\", 1.0);\n if (bprfw != 0.0) {\n bPRFSs = getBigramPRFScores(docs);\n }\n\n // We can now construct term-field weights using our supplied lambdas\n // and scores\n Node termNodes = new Node(\"combine\", new NodeParameters(), new ArrayList<Node>(), 0);\n termNodes.getNodeParameters().set(\"norm\", false);\n TObjectDoubleHashMap<String> weights = new TObjectDoubleHashMap<String>();\n for (String term : queryTerms) {\n weights.clear();\n for (String field : fields) {\n double sum = 0.0;\n if (uCFSs != null) {\n sum += (ucfw * uCFSs.get(term).get(field));\n }\n\n if (bCFSs != null) {\n TObjectDoubleHashMap<String> termMap = bCFSs.get(term);\n if (termMap != null) {\n sum += (bcfw * termMap.get(field));\n }\n }\n\n if (uPRFSs != null) {\n sum += (uprfw * uPRFSs.get(term).get(field));\n }\n\n if (bPRFSs != null) {\n TObjectDoubleHashMap<String> termMap = bPRFSs.get(term);\n if (termMap != null) {\n sum += (bprfw * termMap.get(field));\n }\n }\n weights.put(field, sum);\n }\n termNodes.addChild(createTermFieldNodes(term, weights));\n }\n return termNodes;\n }", "public String StemWordWithWordNet ( String word )\n {\n if ( !IsInitialized )\n return word;\n if ( word == null ) return null;\n if ( morph == null ) morph = dic.getMorphologicalProcessor();\n\n IndexWord w;\n try\n {\n w = morph.lookupBaseForm( POS.VERB, word );\n if ( w != null )\n return w.getLemma().toString ();\n w = morph.lookupBaseForm( POS.NOUN, word );\n if ( w != null )\n return w.getLemma().toString();\n w = morph.lookupBaseForm( POS.ADJECTIVE, word );\n if ( w != null )\n return w.getLemma().toString();\n w = morph.lookupBaseForm( POS.ADVERB, word );\n if ( w != null )\n return w.getLemma().toString();\n }\n catch ( JWNLException e )\n {\n }\n return null;\n }", "public ArrayList<Publication> parseXML(){\n ArrayList<Publication> publications = new ArrayList<Publication>();\n try {\n System.out.println(\"Starting parse xml\");\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n Document document = builder.parse(new File(\"dblp_abstract_dataset.xml\"));\n document.getDocumentElement().normalize();\n NodeList nodeList = document.getDocumentElement().getChildNodes();\n parseChannelNodes(nodeList,publications);\n System.out.println(\"publications count: \"+publications.size());\n }catch (ParserConfigurationException ex){\n ex.printStackTrace();\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return publications;\n }", "public void process (String text) {\n\t\tProperties props = new Properties();\n\t\tprops.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner, parse, dcoref\");\n\t\tStanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\t\tAnnotation document = new Annotation(text);\n\t\tpipeline.annotate(document);\n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\tfor(CoreMap sentence: sentences) {\n\t\t\tsgs.add(sentence.get(CollapsedCCProcessedDependenciesAnnotation.class));\n\t\t}\n\t\tccg = document.get(CorefChainAnnotation.class);\n\t}", "public WordNet(String synsets, String hypernyms)\n {\n if (synsets==null || hypernyms==null) throw new IllegalArgumentException();\n h=new TreeMap<>();\n In i1=new In(synsets);\n int i=0;\n h2=new ArrayList<>();\n while(!i1.isEmpty())\n {\n String[] temp=i1.readLine().split(\",\");\n String[] temp2=temp[1].trim().split(\"\\\\s+\");\n String t=\"\";\n for (String s:temp2)\n {\n if (h.containsKey(s))\n {\n h.get(s).add(i);\n }\n else\n {\n ArrayList<Integer> a=new ArrayList<>();\n a.add(i);\n h.put(s,a);\n }\n\n t=t+s+\" \";\n }\n h2.add(t);\n i++;\n }\n\n g=new Digraph(i);\n In i2=new In(hypernyms);\n while (!i2.isEmpty())\n {\n String[] temp=i2.readLine().split(\",\");\n int j=Integer.parseInt(temp[0].trim());\n for (int k=1;k<temp.length;k++)\n g.addEdge(j, Integer.parseInt(temp[k].trim()));\n }\n\n sap=new SAP(g);\n\n //All the below lines check for Illegal Arguments\n DirectedCycle obj=new DirectedCycle(g);\n boolean b=obj.hasCycle();\n if (b) throw new IllegalArgumentException();\n\n int numberOfRoots=0;\n for (int j=0;j<g.V() && numberOfRoots < 2;j++)\n if (g.outdegree(j)==0) numberOfRoots++;\n\n //System.out.println(\"The number of roots is \"+numberOfRoots);\n if (numberOfRoots!=1) throw new IllegalArgumentException();\n }", "@Override\n\tpublic List<ClusteredMention> runCoreference(Document doc) {\n\t\t//(variables)\n\t\t//Put all in one hash, then build at the end....\n\t\tMap<Mention,Mention> corefs = new HashMap<Mention,Mention>();\n\t\t//if mention isnt in corefs, add it as a singleton cluster\n\t\t//Otherwise markcoref, and add to clusters\n\t\t\n\t\tMap<String,Mention> stringMatches = new HashMap<String,Mention>();\n\t\t//Map of string to mention...\n\t\t\n\t\t//Map<Mention,Entity> pronounClusters = new HashMap<Mention,Entity>();\n\t\tboolean clustered;\n\t\t//Evaluate all non pronoun mentions\n\t\tfor(Mention m : doc.getMentions()){\n\t\t\tclustered = false;\n\t\t\t//(...get its text)\n\t\t\tString mentionString = m.gloss();\n\t\t\t//If its not a pronoun\n\t\t\tif (!checkPronoun(m.headWord(),m.headToken())) {\n\t\t\t\t//(...if we've seen this text before...)\n\t\t\t\tif(stringMatches.containsKey(mentionString)){\n\t\t\t\t\t//Mark coreferent\n\t\t\t\t\tcorefs.put(m,stringMatches.get(mentionString));\n\t\t\t\t\tclustered=true;\n\t\t\t\t} else {\n\t\t\t\t\t//try to find a head word match to m's head word\n\t\t\t\t\t//(for each previous mention...)\n\t\t\t\t\tfor (int i=doc.indexOfMention(m)-1; i>=0 && !clustered;i--) {\n\t\t\t\t\t\tMention h = doc.getMentions().get(i);\n\t\t\t\t\t\tString otherMention = h.gloss();\n\t\t\t\t\t\t//If head words are identical, or head words are coreferent\n\t\t\t\t\t\tif (m.headWord().equalsIgnoreCase(h.headWord()) || \n\t\t\t\t\t\t\t\t(coreferentHeads.containsKey(m.headWord()) && \n\t\t\t\t\t\t\t\t\t\tcoreferentHeads.get(m.headWord()).contains(h.headWord()))) {\n\t\t\t\t\t\t\t//Mark as coreferent\n\t\t\t\t\t\t\tstringMatches.put(mentionString, m);\n\t\t\t\t\t\t\tcorefs.put(m,stringMatches.get(otherMention));\n\t\t\t\t\t\t\tclustered=true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!clustered){\n\t\t\t\t\t//(...else create a new singleton cluster)\n\t\t\t\t\tstringMatches.put(mentionString, m);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(Mention m : doc.getMentions()){\n\t\t\t//If it is a pronoun of interest\n\t\t\tif (checkPronoun(m.headWord(),m.headToken())) {\n\t\t\t\tMention hco = hobbsCoreferent(m);\n\t\t\t\tif (hco!=null && !hco.equals(m)){\n\t\t\t\t\tString hcoString = hco.gloss();\n\t\t\t\t\t//System.out.printf(\"Found coreference %s\\n\", hcoString);\n\t\t\t\t\tif (stringMatches.containsKey(hcoString)){\n\t\t\t\t\t\t//mentions.add(m.markCoreferent(stringClusters.get(hcoString)));\n\t\t\t\t\t\tcorefs.put(m,stringMatches.get(hcoString));\n\t\t\t\t\t} else{\n\t\t\t\t\t\t//Add as coreferent\n\t\t\t\t\t\tcorefs.put(m, hco);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\n\t\t//Build list of mentions\n\t\tList<ClusteredMention> cMentions = new ArrayList<ClusteredMention>();\n\t\tMap<Mention,ClusteredMention> clusters = new HashMap<Mention,ClusteredMention>();\n\t\tList<Mention> mentions = new ArrayList<Mention>(doc.getMentions());\n\t\twhile (!mentions.isEmpty()){\n\t\t\tMention m = mentions.get(0);\n\t\t\tif (corefs.containsKey(m) && corefs.get(m)!=null){\n\t\t\t\tMention h = corefs.get(m);\n\t\t\t\tif(!clusters.containsKey(h)) {\n\t\t\t\t\tint hIndex = mentions.indexOf(h);\n\t\t\t\t\tmentions.set(0, h);\n\t\t\t\t\tmentions.set(hIndex,m);\n\t\t\t\t\tif (hIndex > 0){\n\t\t\t\t\t\tClusteredMention newCluster = h.markSingleton();\n\t\t\t\t\t\tcMentions.add(newCluster);\n\t\t\t\t\t\tmentions.remove(hIndex);\n\t\t\t\t\t\tclusters.put(h,newCluster);\n\t\t\t\t\t\tcMentions.add(m.markCoreferent(clusters.get(h)));\n\t\t\t\t\t\tmentions.remove(0);\n\t\t\t\t\t\tclusters.put(m,clusters.get(h));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\tcMentions.add(m.markCoreferent(clusters.get(h)));\n\t\t\t\tmentions.remove(0);\n\t\t\t\tclusters.put(m,clusters.get(h));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tClusteredMention newCluster = m.markSingleton();\n\t\t\t\tcMentions.add(newCluster);\n\t\t\t\tmentions.remove(0);\n\t\t\t\tclusters.put(m,newCluster);\n\t\t\t}\n\t\t}\n\t\treturn cMentions;\n\t}", "@SuppressWarnings(\"unchecked\")\r\npublic static void ruleResolvePronouns(AnnotationSet basenp, Document doc)\r\n{\n Annotation[] basenpArray = basenp.toArray();\r\n\r\n // Initialize coreference clusters\r\n int maxID = basenpArray.length;\r\n\r\n // Create an array of pointers\r\n // clust = new UnionFind(maxID);\r\n fvm = new RuleResolvers.FeatureVectorMap();\r\n ptrs = new int[maxID];\r\n clusters = new HashSet[maxID];\r\n for (int i = 0; i < clusters.length; i++) {\r\n ptrs[i] = i;\r\n HashSet<Annotation> cluster = new HashSet<Annotation>();\r\n cluster.add(basenpArray[i]);\r\n clusters[i] = cluster;\r\n }\r\n Annotation zero = new Annotation(-1, -1, -1, \"zero\");\r\n\r\n for (int i = 1; i < basenpArray.length; i++) {\r\n Annotation np2 = basenpArray[i];\r\n if (FeatureUtils.isPronoun(np2, doc)) {\r\n Annotation ant = ruleResolvePronoun(basenpArray, i, doc);\r\n if (ant != null) {\r\n np2.setProperty(Property.PRO_ANTES, ant);\r\n }\r\n else {\r\n np2.setProperty(Property.PRO_ANTES, zero);\r\n }\r\n }\r\n }\r\n}", "public Ngram_Type(JCas jcas, Type casType) {\n super(jcas, casType);\n casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());\n\n \n casFeat_n = jcas.getRequiredFeatureDE(casType, \"n\", \"uima.cas.Integer\", featOkTst);\n casFeatCode_n = (null == casFeat_n) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_n).getCode();\n\n \n casFeat_tokens = jcas.getRequiredFeatureDE(casType, \"tokens\", \"uima.cas.FSList\", featOkTst);\n casFeatCode_tokens = (null == casFeat_tokens) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_tokens).getCode();\n\n \n casFeat_rawText = jcas.getRequiredFeatureDE(casType, \"rawText\", \"uima.cas.String\", featOkTst);\n casFeatCode_rawText = (null == casFeat_rawText) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_rawText).getCode();\n\n \n casFeat_sentimentScore = jcas.getRequiredFeatureDE(casType, \"sentimentScore\", \"uima.cas.FloatList\", featOkTst);\n casFeatCode_sentimentScore = (null == casFeat_sentimentScore) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_sentimentScore).getCode();\n\n \n casFeat_negationScore = jcas.getRequiredFeatureDE(casType, \"negationScore\", \"uima.cas.FloatList\", featOkTst);\n casFeatCode_negationScore = (null == casFeat_negationScore) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_negationScore).getCode();\n\n \n casFeat_amplificationScore = jcas.getRequiredFeatureDE(casType, \"amplificationScore\", \"uima.cas.FloatList\", featOkTst);\n casFeatCode_amplificationScore = (null == casFeat_amplificationScore) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_amplificationScore).getCode();\n\n }", "protected void assembleDocument() {\n\n // Create the missive\n this.createMissive();\n }", "public List<Section> processDocument(String path) throws FileNotFoundException {\n\t\tList<Section> finalSections = new ArrayList<Section>();\r\n\t\t// Load file to process...\r\n\t\tInputStream input = new FileInputStream(\r\n\t\t\t\tpath.replace(\"\\\\\", \"/\").substring(1, path.replace(\"\\\\\", \"/\").length() - 1));\r\n\t\tFile file = new File(path);\r\n\t\ttry {\r\n\t\t\t// Use PdfBox library to load PDF Stream with their geometric descriptors...\r\n\t\t\tPDDocument doc = PDDocument.load(input);\r\n\t\t\tDocument resultDoc = new Document();\r\n\t\t\t// Create maps to hold fonts used in the processed document .\r\n\t\t\tfinal Map<Object, Integer> fonts = new HashMap<Object, Integer>();\r\n\t\t\tfinal Map<Integer, Font> idToFont = new HashMap<Integer, Font>();\r\n\t\t\t// If the document have multiple pages, manages the segmentation page by page...\r\n\t\t\tfor (int i = 0; i < doc.getNumberOfPages(); i++) {\r\n\t\t\t\tPDPage page = (PDPage) doc.getDocumentCatalog().getAllPages().get(i);\r\n\t\t\t\t// Set up pdf page object.\r\n\t\t\t\tPage pdfPage = new Page();\r\n\t\t\t\tpdfPage.setPageRotation(page.findRotation());\r\n\t\t\t\tpdfPage.setPageWidth(page.findMediaBox().getWidth());\r\n\t\t\t\tpdfPage.setPageHeight(page.findMediaBox().getHeight());\r\n\t\t\t\tpdfPage.setOffsetUpperRightX(\r\n\t\t\t\t\t\tpage.findMediaBox().getUpperRightX() - page.findCropBox().getUpperRightX());\r\n\t\t\t\tpdfPage.setOffsetUpperRightY(\r\n\t\t\t\t\t\tpage.findMediaBox().getUpperRightY() - page.findCropBox().getUpperRightY());\r\n\t\t\t\tpdfPage.setNumber(i);\r\n\t\t\t\t// Extracting textual content of each page.\r\n\t\t\t\tPDStream contents = page.getContents();\r\n\t\t\t\tif (contents != null) {\r\n\t\t\t\t\tif (true) {\r\n\t\t\t\t\t\tTextExtractor extractor = new TextExtractor(pdfPage, idToFont, fonts);\r\n\t\t\t\t\t\textractor.processStream(page, page.findResources(), contents.getStream());\r\n\t\t\t\t\t\tpdfPage.setLines(extractor.getLines());\r\n\t\t\t\t\t\textractor.getTextMatrix();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Add pages decorated by geometric descriptors to the doc to segment ...\r\n\t\t\t\tresultDoc.getPages().add(pdfPage);\r\n\t\t\t\tfor (Entry<Integer, Font> e : idToFont.entrySet()) {\r\n\t\t\t\t\tresultDoc.getFonts().add(e.getValue());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Process extracting document Sections...\r\n\t\t\tPdfBlockExtractor pdfExtractor = new PdfBlockExtractor();\r\n\t\t\tList<Block> extractedBlocks = pdfExtractor.extractBlocks(resultDoc,\r\n\t\t\t\t\tpath.split(File.separator + File.separator)[1]);\r\n\r\n\t\t\t// Generating final result....\r\n\t\t\tgenerateFinalSegmentationResults(finalSections, extractedBlocks);\r\n\r\n\t\t\tdoc.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn finalSections;\r\n\t}", "public Collection<ConceptLabel> processSentence(Sentence sentence, List messages) {\n\t\t// long time = System.currentTimeMillis();\n\t\t// search in lexicon\n\t\tList<Concept> keys = lookupConcepts(sentence);\n\t\t\t\n\t\t// filter out overlapping numbers\n\t\tfilterNumbers(keys);\n\t\tfilterOverlap(keys);\t\t\t\n\t\t\n\t\t// take out concepts that overlap with new concepts\n\t\tList<ReportConcept> reparsedConcepts = new ArrayList<ReportConcept>();\n\t\tfor (ReportConcept c : concepts) {\n\t\t\t// if existing concept intersects this sentence\n\t\t\tif (intersects(c,sentence.getSpan())) {\n\t\t\t\treparsedConcepts.add(c);\n\t\t\t}\n\t\t}\n\n\t\t// take out concepts that will be reparsed anyway\n\t\tconcepts.removeAll(reparsedConcepts);\n\n\t\t// process phrase\n\t\tList<ConceptLabel> labels = new ArrayList<ConceptLabel>();\n\n\t\tfor (Concept concept : keys) {\n\t\t\t// create new labels\n\t\t\tCollection<ConceptLabel> lbl = createConceptLabels(concept,sentence.getCharOffset());\n\t\t\tlabels.addAll(lbl);\n\n\t\t\t// get entry or create it\n\t\t\tReportConcept entry = createReportConcept(concept);\n\t\t\tentry.addLabels(lbl);\n\n\t\t\t// add to all concepts\n\t\t\tconcepts.add(entry);\n\t\t\t// negatedConcepts.remove(entry);\n\n\t\t\t// process numbers\n\t\t\tfor (ConceptLabel l : lbl)\n\t\t\t\tprocessNumericValues(entry, l);\n\t\t}\n\n\t\t// take care of negation\n\t\tnegex.clear();\n\t\tnegex.process(sentence, keys);\n\t\tlabels.addAll(processNegation(negex, messages));\n\n\t\t// backup concepts so that concepts that were merged outside of parsed\n\t\t// sentence could be removed after processing\n\t\tList<ReportConcept> backup = new ArrayList<ReportConcept>(concepts);\n\t\tbackup.removeAll(reparsedConcepts);\n\t\t\n\t\t// compact concepts to more specific constructs\n\t\tprocessConcepts(concepts);\n\t\n\t\t// at this point we can potentially have a situation where\n\t\t// one concept from this sentence subsumed another from the previous or next \n\t\t// sentence\n\t\tfor(ReportConcept c: backup){\n\t\t\tif(!concepts.contains(c))\n\t\t\t\tremovedConcepts.add(c);\n\t\t}\n\t\t\n\t\t// remove dangling digits and units, cause they are likely to be junk\n\t\tremoveDanglingAttributes();\t\t\n\t\t\n\t\t// now that we may have reparsed some concepts, lets\n\t\t// see if we can retain some of the old data\n\t\tfor (ReportConcept rc : reparsedConcepts) {\n\t\t\t// reparsed concept is in the list, then retain its data, if not\n\t\t\t// then it should be removed\n\t\t\tReportConcept nc = TextHelper.get(concepts, rc);\n\t\t\tif (nc != null) {\n\t\t\t\tnc.setConceptEntry(rc.getConceptEntry());\n\t\t\t} else {\n\t\t\t\tremovedConcepts.add(rc);\n\t\t\t}\n\t\t}\n\n\t\t// negate concepts and proces numbers\n\t\tfor (ReportConcept e : negatedConcepts) {\n\t\t\tReportConcept n = TextHelper.get(concepts, e);\n\t\t\tif (n != null) {\n\t\t\t\tn.setNegation(e.getNegation());\n\t\t\t}\n\t\t}\n\n\t\t// clear negation\n\t\tnegatedConcepts.clear();\n\n\t\t// do eggs\n\t\tEggs.processText(sentence.getOriginalString());\n\t\n\t\t// sync to interface\n\t\tsync();\n\t\t\n\t\treturn labels;\n\t}", "public static Annotation ruleResolvePronoun(Annotation[] basenps, int num, Document doc)\r\n{\n Annotation np2 = basenps[num];\r\n // Get some properties of the np\r\n FeatureUtils.PRTypeEnum type2 = Pronoun.getValue(np2, doc);\r\n String str2 = doc.getAnnotString(np2);\r\n boolean reflexive = FeatureUtils.isReflexive(str2);\r\n // Get the possible antecedents\r\n ArrayList<Annotation> antes = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums = new ArrayList<Integer>();\r\n if (DEBUG) {\r\n System.err.println(\"Pronoun: \" + doc.getAnnotText(np2));\r\n }\r\n if (FeatureUtils.getPronounPerson(str2) == PersonPronounTypeEnum.FIRST) {\r\n if (NumberEnum.SINGLE.equals(Number.getValue(np2, doc)))\r\n return ruleResolvePronounI(np2, basenps, num, doc);\r\n else\r\n return ruleResolvePronounWe(np2, basenps, num, doc);\r\n }\r\n if (FeatureUtils.getPronounPerson(str2) == PersonPronounTypeEnum.SECOND)\r\n return ruleResolvePronounYou(np2, basenps, num, doc);\r\n else {\r\n int sentnum = 0;\r\n for (int i = num - 1; i >= 0 && sentnum <= 3; i--) {\r\n Annotation np1 = basenps[i];\r\n sentnum = sentNum(np1, np2, doc);\r\n if (DEBUG) {\r\n System.err.println(\"Possible antecedent: \" + i + \" :\" + doc.getAnnotText(np1));\r\n }\r\n if (!isNumberIncompatible(np1, np2, doc) && !isGenderIncompatible(np1, np2, doc)\r\n && !isAnimacyIncompatible(np1, np2, doc) && isWNClassComp(np1, np2, doc) && isProComp(np1, np2, doc)\r\n && !Embedded.getValue(np1, doc) && isSyntax(np1, np2, doc)) {\r\n if (DEBUG) {\r\n System.err.println(\"Candidate antecedent: \" + i + \" :\" + doc.getAnnotText(np1));\r\n }\r\n antes.add(0, np1);\r\n nums.add(0, i);\r\n }\r\n }\r\n }\r\n if (antes.size() == 0) return null;\r\n // Check for reflexsives\r\n if (FeatureUtils.isReflexive(doc.getAnnotText(np2))) {\r\n union(nums.get(nums.size() - 1).intValue(), num);\r\n return antes.get(antes.size() - 1);\r\n }\r\n if (antes.size() == 1) {\r\n // Rule 1: Unique in discourse\r\n if (DEBUG) {\r\n System.err.println(\"Rule 1 match!!!\");\r\n }\r\n union(nums.get(0).intValue(), num);\r\n return antes.get(0);\r\n }\r\n // Rule 2: Reflexive -- the last possible antecedent\r\n if (reflexive) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 2 match!!!\");\r\n }\r\n union(nums.get(nums.size() - 1).intValue(), num);\r\n return antes.get(antes.size() - 1);\r\n }\r\n // Rule 3: Unique current + Prior\r\n ArrayList<Annotation> antes1 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums1 = new ArrayList<Integer>();\r\n int counter = 0;\r\n for (Annotation np1 : antes) {\r\n if (sentNum(np1, np2, doc) < 2) {\r\n antes1.add(np1);\r\n nums1.add(nums.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (antes1.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 3 match!!!\");\r\n }\r\n union(nums1.get(0).intValue(), num);\r\n return antes1.get(0);\r\n }\r\n // Rule 4: Possesive Pro\r\n\r\n if (FeatureUtils.isPossesive(str2) && antes1.size() > 0) {\r\n Integer found = null;\r\n Annotation ant = null;\r\n boolean multiple = false;\r\n for (int i = 0; i < antes1.size() && !multiple; i++) {\r\n Annotation np1 = antes1.get(i);\r\n if (doc.getAnnotText(np1).equalsIgnoreCase(str2) && sentNum(np1, np2, doc) == 1) {\r\n if (found == null) {\r\n found = nums1.get(i);\r\n ant = antes1.get(i);\r\n }\r\n else {\r\n multiple = true;\r\n }\r\n }\r\n }\r\n if (!multiple && found != null) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 4 match!!!\");\r\n }\r\n union(found.intValue(), num);\r\n return ant;\r\n }\r\n }\r\n // Rule #5: Unique in the current sentence\r\n ArrayList<Annotation> antes2 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums2 = new ArrayList<Integer>();\r\n counter = 0;\r\n for (Annotation np1 : antes1) {\r\n if (sentNum(np1, np2, doc) < 1) {\r\n antes2.add(np1);\r\n nums2.add(nums1.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (antes2.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 5 match!!!\");\r\n }\r\n union(nums2.get(0).intValue(), num);\r\n return antes2.get(0);\r\n }\r\n // Extra Rule: Unique in the current clause (or parent clauses\r\n AnnotationSet parse = doc.getAnnotationSet(Constants.PARSE);\r\n Annotation clause = SyntaxUtils.getClause(np2, parse);\r\n while (clause != null) {\r\n ArrayList<Annotation> antes3 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums3 = new ArrayList<Integer>();\r\n counter = 0;\r\n for (Annotation np1 : antes2) {\r\n if (clause.covers(np1)) {\r\n antes3.add(np1);\r\n nums3.add(nums2.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (DEBUG) {\r\n System.err.println(antes3.size() + \" antecedents in the clause\");\r\n }\r\n if (antes3.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Clause rule match!!!\");\r\n }\r\n union(nums3.get(0).intValue(), num);\r\n return antes3.get(0);\r\n }\r\n clause = SyntaxUtils.getParentClause(clause, parse);\r\n }\r\n\r\n // Rule #6: Unique Subject\r\n\r\n // //Look for the subject in the current sentence\r\n // boolean unique = true;\r\n // Annotation subject = null;\r\n // Integer subjectNum = null;\r\n // for(int i=antes.size()-1; i>=0; i--){\r\n // Annotation np1 = antes.get(i);\r\n // if(sentNum(np1, np2, annotations, text)==0){\r\n // if(FeatureUtils.getGramRole(np1, annotations, text).equals(\"SUBJECT\")){\r\n // //&&SyntaxUtils.isMainClause(np1, parse)){\r\n // if(DEBUG)\r\n // System.err.println(\"Rule 6 match!!!\");\r\n // if(subjectNum!=null)\r\n // unique=false;\r\n // subjectNum = nums.get(i);\r\n // subject = antes.get(i);\r\n // }\r\n // }\r\n // }\r\n\r\n // if(subject!=null&&unique){\r\n // union(subjectNum.intValue(), num);\r\n // return subject;\r\n // }\r\n\r\n // Look for the subject in the previous sentence\r\n boolean unique = true;\r\n Annotation subject = null;\r\n Integer subjectNum = null;\r\n if (GramRole.getValue(np2, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np2, parse)){\r\n for (int i = antes.size() - 1; i >= 0; i--) {\r\n Annotation np1 = antes.get(i);\r\n if (sentNum(np1, np2, doc) == 1) {\r\n if (GramRole.getValue(np1, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np1, parse)){\r\n if (DEBUG) {\r\n System.err.println(\"Rule 6 match!!!\");\r\n }\r\n if (subjectNum != null) {\r\n unique = false;\r\n }\r\n subjectNum = nums.get(i);\r\n subject = antes.get(i);\r\n }\r\n }\r\n }\r\n }\r\n if (subject != null && unique) {\r\n union(subjectNum.intValue(), num);\r\n return subject;\r\n }\r\n subjectNum = null;\r\n subject = null;\r\n\r\n // One more Rule -- assign possessive pronouns to the last subject\r\n if (type2.equals(FeatureUtils.PRTypeEnum.POSSESSIVE)) {\r\n for (int i = antes.size() - 1; i >= 0; i--) {\r\n Annotation np1 = antes.get(i);\r\n if (sentNum(np1, np2, doc) == 0) {\r\n if (GramRole.getValue(np1, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np1, parse)){\r\n if (DEBUG) {\r\n System.err.println(\"Rule 6a match!!!\");\r\n }\r\n if (subject == null) {\r\n subjectNum = nums.get(i);\r\n subject = antes.get(i);\r\n }\r\n }\r\n }\r\n }\r\n if (subject != null) {\r\n union(subjectNum.intValue(), num);\r\n return subject;\r\n }\r\n }\r\n\r\n return null;\r\n}", "private ArrayList<Ngram> getNgramsFromFile(String content) {\n if (this.removeStopwordsByTagging) {\n return this.getNgramsFromFileRemovingStopwordsByTagging(content);\n } else {\n return this.getNgramsFromFileWithStopwordsListOnly(content);\n }\n }", "public String[] prepareText(String text) {\n\n Properties props = new Properties();\n\n props.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner\");\n StanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\n //apply\n Annotation document = new Annotation(text);\n pipeline.annotate(document);\n\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n ArrayList<String> result = new ArrayList<>();\n\n for (CoreMap sentence : sentences) {\n\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n // this is the text of the token\n String word = token.get(CoreAnnotations.LemmaAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(PartOfSpeechAnnotation.class);\n // this is the NER label of the token\n String ne = token.get(CoreAnnotations.NamedEntityTagAnnotation.class);\n\n if (!StringUtils.isStopWord(word)) {\n result.add(word);\n }\n\n }\n\n }\n String[] result_ar = new String[result.size()];\n\n return result.toArray(result_ar);\n }", "public VSM(String[] docs) {\n\t\tmyDocs = docs;\n\t\ttermList = new ArrayList<String>();\n\t\tdocLists = new ArrayList<ArrayList<Doc>>();\n\t\tArrayList<Doc> docList;\n\t\t// parse the documents to construct the index and collect the raw\n\t\t// frequencies.\n\t\tfor (int i = 0; i < myDocs.length; i++) {\n\t\t\tString[] tokens = myDocs[i].split(\" \");\n\t\t\tString token;\n\t\t\tfor (int j = 0; j < tokens.length; j++) {\n\t\t\t\ttoken = tokens[j];\n\t\t\t\tif (!termList.contains(token)) {\n\t\t\t\t\ttermList.add(token);\n\t\t\t\t\tdocList = new ArrayList<Doc>();\n\t\t\t\t\tDoc doc = new Doc(i, 1); // initial raw frequency is 1\n\t\t\t\t\tdocList.add(doc);\n\t\t\t\t\tdocLists.add(docList);\n\t\t\t\t} else {\n\t\t\t\t\tint index = termList.indexOf(token);\n\t\t\t\t\tdocList = docLists.get(index);\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tboolean match = false;\n\n\t\t\t\t\t// search the postings list for a document id, if match,\n\t\t\t\t\t// insert a new position number to the document id\n\t\t\t\t\tfor (Doc doc : docList) {\n\t\t\t\t\t\tif (doc.docId == i) {\n\t\t\t\t\t\t\tdoc.tw++; // increase word count\n\t\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tk++;\n\t\t\t\t\t}\n\t\t\t\t\t// if no match, add a new document id along with the\n\t\t\t\t\t// position number\n\t\t\t\t\tif (!match) {\n\t\t\t\t\t\tDoc doc = new Doc(i, 1);\n\t\t\t\t\t\tdocList.add(doc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//\n\t\t}// end with parsing\n\n\t\t// compute the tf-idf term weights and the doc lengths\n\t\tint N = myDocs.length;\n\t\tdocLength = new double[N];\n\t\tfor (int i = 0; i < termList.size(); i++) {\n\t\t\tdocList = docLists.get(i);\n\t\t\tint df = docList.size();\n\t\t\tDoc doc;\n\t\t\tfor (int j = 0; j < docList.size(); j++) {\n\t\t\t\tdoc = docList.get(j);\n\t\t\t\tdouble tfidf = (1 + Math.log(doc.tw))\n\t\t\t\t\t\t* Math.log(N / (df * 1.0));\n\t\t\t\tdocLength[doc.docId] += Math.pow(tfidf, 2);\n\t\t\t\tdoc.tw = tfidf;\n\t\t\t\tdocList.set(j, doc);\n\t\t\t}\n\t\t}\n\t\t// update the length\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tdocLength[i] = Math.sqrt(docLength[i]);\n\t\t}\n\n\t}", "public CGrammar getGrammarStructure();", "private void buildLanguageModel() {\n int total = 0;\n Map<Integer, Integer> wordCount = new HashMap<>();\n for (List<Integer> story : corpus.getStories()) {\n for (Integer word : story) {\n total++;\n if (wordCount.get(word) == null) wordCount.put(word, 0);\n wordCount.put(word, wordCount.get(word) + 1);\n }\n }\n wordValues = new HashMap<>();\n for (Map.Entry<Integer, Integer> entry : wordCount.entrySet()) {\n wordValues.put(entry.getKey(), total * 1.0 / entry.getValue());\n }\n }", "public void processCas(CAS cas) {\n\n FSIndex<AnnotationFS> sentenceAnnotations = cas.getAnnotationIndex(mSentenceType);\n\n for (AnnotationFS sentence : sentenceAnnotations) {\n process(cas, sentence);\n }\n }", "private void doBayesianClassification() {\n\t\tList<MutualInformation> mutualInformationList = new ArrayList<MutualInformation>();\r\n\t\tint k = 5;\r\n\t\tSystem.out.println(\"k = \" + k);\r\n\t\tdouble N = fileNames.size();\r\n\t\t\r\n\t\tList<Set<String>> classifiedDocsList = new ArrayList<Set<String>>();\r\n\t\tclassifiedDocsList.add(setOfHamiltonDocs);\r\n\t\tclassifiedDocsList.add(setOfMadisonDocs);\r\n\t\tclassifiedDocsList.add(setOfJayDocs);\r\n\t\t\r\n\t\tfor (String term : corpusVocab) {\r\n\r\n\t\t\t// All docs containing this term\r\n\t\t\tSet<String> matchingDocs = new HashSet<String>();\r\n\t\t\t\r\n\t\t\tfor (PositionalPosting posting : pInvertedIndex.getPostings(term)) {\r\n\t\t\t\tmatchingDocs.add(fileNames.get(posting.getDocumentId()));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// iterate through all classes (Hamilton, Madison, Jay)\r\n\t\t\tfor (int i = 0; i < classifiedDocsList.size(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tSet<String> classifiedDocs = classifiedDocsList.get(i);\r\n\t\t\t\t\r\n\t\t\t\tSet<String> intersection = new HashSet<String>(matchingDocs);\r\n\t\t\t\tintersection.retainAll(classifiedDocs);\r\n\t\t\t\tdouble N11 = intersection.size();\r\n\t\t\t\t\r\n\t\t\t\tSet<String> difference = new HashSet<String>(matchingDocs);\r\n\t\t\t\tdifference.removeAll(classifiedDocs);\r\n\t\t\t\tdouble N10 = difference.size();\r\n\t\t\t\t\r\n\t\t\t\tdouble N01 = classifiedDocs.size() - N11;\r\n\t\t\t\tdouble N00 = fileNames.size() - classifiedDocs.size() - N10;\r\n\r\n\t\t\t\t// Calculate I(t,c)\r\n\t\t\t\tdouble Itc = (N11 / N) * log2((N * N11) / ((N11 + N10) * (N11 + N01)))\r\n\t\t\t\t\t\t+ (N01 / N) * log2((N * N01) / ((N01 + N00) * (N11 + N01)))\r\n\t\t\t\t\t\t+ (N10 / N) * log2((N * N10) / ((N11 + N10) * (N10 + N00)))\r\n\t\t\t\t\t\t+ (N00 / N) * log2((N * N00) / ((N01 + N00) * (N10 + N00)));\r\n\t\t\t\tif (!Double.isNaN(Itc)) {\r\n\t\t\t\t\tmutualInformationList.add(new MutualInformation(term, Itc));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Build Discriminating Set of vocab terms by sorting mutual information\r\n\t\t// list and keep the first k values\r\n\t\tSet<String> terms = new HashSet<String>();\r\n\t\tCollections.sort(mutualInformationList, Collections.reverseOrder());\r\n\t\tfor (int i = 0; i < k; i++) {\r\n\t\t\tterms.add(mutualInformationList.get(i).getTerm());\r\n\t\t}\r\n\t\t\r\n\t\t// get term counts in classified (trainer) docs\t\t\r\n\t\tint[] classifiedDocsTermFreq = new int[classifiedDocsList.size()];\r\n\t\t\r\n\t\tclassifiedDocsTermFreq[0] = getTermFreq(hamiltonDocs, terms);\r\n\t\tclassifiedDocsTermFreq[1] = getTermFreq(madisonDocs, terms);\r\n\t\tclassifiedDocsTermFreq[2] = getTermFreq(jayDocs, terms);\r\n\t\t\r\n\t\t// Calculate p(t|c)\r\n\t\t// maps term to list of p(t|c) for each class\r\n\t\tMap<String, List<Double>> ptc = new HashMap<String, List<Double>>();\r\n\t\t\r\n\t\tfor (String term : terms) {\r\n\t\t\tptc.put(term, new ArrayList<Double>());\r\n\t\t\tfor (int i = 0; i < classifiedDocsList.size(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tint ftc = 0;\r\n\t\t\t\tfor (PositionalPosting posting : pInvertedIndex.getPostings(term)) {\r\n\t\t\t\t\tif (classifiedDocsList.get(i).contains(fileNames.get(posting.getDocumentId()))) {\r\n\t\t\t\t\t\tftc += posting.getPositions().size();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tptc.get(term).add((double) (ftc + 1) / (double) (classifiedDocsTermFreq[i] + terms.size()));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// visit each unclassified document\r\n\t\ttry {\r\n\t\t\tPath currentWorkingPath = Paths.get(toBeClassified).toAbsolutePath();\r\n\t\t\t// This is our standard \"walk through all .txt files\" code.\r\n\t\t\tFiles.walkFileTree(currentWorkingPath, new SimpleFileVisitor<Path>() {\r\n\r\n\t\t\t\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\r\n\t\t\t\t\t// make sure we only process the current working directory\r\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpublic FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {\r\n\r\n\t\t\t\t\tif (file.toString().endsWith(\".txt\")) {\r\n\r\n\t\t\t\t\t\tTokenStream tokenStream = null;\r\n\t\t\t\t\t\t// terms in this document\r\n\t\t\t\t\t\tSet<String> docTerms = new HashSet<String>();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\ttokenStream = Utils.getTokenStreams(file.toFile());\r\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\twhile (tokenStream.hasNextToken()) {\r\n\t\t\t\t\t\t\tString token = Utils.processWord(tokenStream.nextToken().trim(), false);\r\n\t\t\t\t\t\t\tdocTerms.add(token);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// only keep terms in discriminating set\r\n\t\t\t\t\t\tdocTerms.retainAll(terms);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// calculate log(p(c) + sum(log(p(ti|c))) for each class\r\n\t\t\t\t\t\tdouble[] pce = new double[classifiedDocsList.size()];\r\n\t\t\t\t\t\tfor (int i = 0; i < classifiedDocsList.size(); i++) {\r\n\t\t\t\t\t\t\tdouble sum = 0;\r\n\t\t\t\t\t\t\tfor (String term : docTerms) {\r\n\t\t\t\t\t\t\t\tsum += Math.log(ptc.get(term).get(i));\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\tpce[i] = Math.log(classifiedDocsTermFreq[i] / terms.size()) + sum;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (pce[0] > pce[1] && pce[0] > pce[2]) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Document : \" + file.getFileName().toString() + \" : belongs to Hamilton\");\r\n\t\t\t\t\t\t} else if (pce[1] > pce[0] && pce[1] > pce[2]) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Document : \" + file.getFileName().toString() + \" : belongs to Madison\");\r\n\t\t\t\t\t\t} else if (pce[2] > pce[0] && pce[2] > pce[1]) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Document : \" + file.getFileName().toString() + \" : belongs to Jay\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"I don't know whom document : \" + file.getFileName().toString() + \" : belongs to.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// don't throw exceptions if files are locked/other errors occur\r\n\t\t\t\tpublic FileVisitResult visitFileFailed(Path file, IOException e) {\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void start(){\n mngr.getStpWds();\n mngr.getDocuments();\n mngr.calculateWeights();\n mngr.getInvertedIndex();\n mngr.getClusters();\n mngr.getCategories();\n mngr.getUserProfiles();\n mngr.makeDocTermMatrix();\n\n }", "void process(Document document, Repository repository) throws Exception;", "@Override\r\n\tboolean parseDoc(String content, int documentID, int invertedIndexTableID) {\r\n\t\tDocumentInfo docInfo = new DocumentInfo();\r\n\t\tdocInfo.docID = documentID;\r\n\r\n\t\tString wordList[] = content.trim().split(\"\\\\s+\");\r\n\t\t\r\n\t\tArrayList<String> nGramMaker = new ArrayList<String>();\r\n\t\tStringBuilder ngramMaker = new StringBuilder();\r\n\t\t\r\n\t\tint ngramCheckIndex = 0;\r\n\t\tint ngramChecker = 0;\r\n\t\tfor (int i = 0; i < wordList.length; i++) {\r\n\t\t\tint postFixChecker = wordList[i].length();\r\n\t\t\tString word = deletePostFix(wordList[i]);\r\n\t\t\tif (word.length() != postFixChecker) {\r\n\t\t\t\t\r\n\t\t\t\tngramChecker++;\r\n\t\t\t\tngramMaker.append(word);\r\n\t\t\t\tnGramMaker.add(word);\r\n\t\t\t\t\r\n\t\t\t\tif(ngramChecker != this.nGramSetting){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tngramChecker--;\r\n\t\t\t\tif(ngramCheckIndex != 0){\r\n\t\t\t\t\tngramMaker.replace(0, ngramCheckIndex, \"\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\taddHash(docInfo, ngramMaker.toString());\r\n\t\t\t\tngramCheckIndex = nGramMaker.get(0).length();\r\n\t\t\t\tnGramMaker.remove(0);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn DBManager.getInstance().insertBulkToHashTable(docInfo, invertedIndexTableID);\r\n\t\t\r\n\t}", "public Map<String, String> partsOfSpeech(String input) {\n Map<String, String> output = new HashMap();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n document.get(CoreAnnotations.TokensAnnotation.class).stream().forEach((token) -> {\n // this is the text of the token\n String word = token.get(CoreAnnotations.TextAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n output.put(word, pos);\n });\n\n return output;\n }", "public void parseThesaurus() throws IOException {\r\n\t\t\t//We create an object below to read the thesaurus file\r\n\t\t\tFileInputStream fis = new FileInputStream(\"src//ie//gmit//dip//resources//MobyThesaurus3.txt\");\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(fis));\r\n\t\t\t List <List<String>> listOflist= new ArrayList<>();\r\n\t\t\t// HashMap<String,List> tMap = new HashMap<>();\t\t\r\n\t\t\t List <String> individualListOfSynonyms= new ArrayList <String>();\r\n\r\n\t\t\t \r\n\t\t\t //we create a hashmap with the first word being the key value and the rest a list of synonims we will use\r\n\t\t\twhile(br.readLine()!=null) {\r\n\t\t\t\t\r\n\t\t\t\tString somestring = br.readLine();\r\n\t\t\t\tString[] testsplit= somestring.split(\",\");\r\n\t\t\t\tindividualListOfSynonyms=Arrays.asList(testsplit);\r\n\t\t\t\tString indexvalue=individualListOfSynonyms.get(0).toString();\r\n\t\t\t tMap.put(indexvalue, individualListOfSynonyms);\r\n\t\t\t //br.close();\r\n\t\t\t //System.out.println(tMap);\r\n\t\t\t }\r\n\t\t\t}", "public String extractRelevantSentences(String paragraph, Collection<String> terms, boolean lemmatised, int maxSentenceLength) {\n String result = \"\";\n boolean checkSentenceLength = (maxSentenceLength != -1);\n\n // Create an empty Annotation just with the given text\n document = new Annotation(paragraph);\n // Run Annotators on this text\n pipeline.annotate(document);\n\n // Use map to track sentences so that a sentence is not returned twice\n sentences = new HashMap();\n int key = 0;\n for (CoreMap coreMap : document.get(CoreAnnotations.SentencesAnnotation.class)) {\n String string = coreMap.toString();\n if (checkSentenceLength)// if checking sentences, skip is sentence is long\n if (StringOps.getWordLength(string) > maxSentenceLength)\n continue;\n sentences.put(key, coreMap.toString());\n key++;\n }\n\n Set keySet = sentences.keySet();\n Set<Integer> returnedSet = new HashSet();\n Iterator keyIterator = keySet.iterator();\n // These are all the sentences in this document\n while (keyIterator.hasNext()) {\n int id = (int) keyIterator.next();\n String content = sentences.get(id);\n // This is the current sentence\n String thisSentence = content;\n // Select sentence if it contains any of the terms and is not already returned\n for (String t : terms) {\n if (!returnedSet.contains(id)) { // ensure sentence not already used\n String label = StringOps.stemSentence(t, true);\n if (StringUtils.contains(StringOps.stemSentence(thisSentence, false), label)\n || StringUtils.contains(StringOps.stemSentence(StringOps.stripAllParentheses(thisSentence), false), label)) { // lookup stemmed strings\n result = result + \" \" + thisSentence.trim(); // Concatenate new sentence\n returnedSet.add(id);\n }\n }\n }\n }\n\n if (lemmatised && null != result) {\n result = lemmatise(result);\n }\n\n return result;\n }", "public void analyzequery(JSONObject json) {\n\t\ttry {\n\t\t\t\n\t\t\tJSONArray jarray = json.getJSONArray(\"Reviews\");\n\t\t\t\n\t\t\tfor (int i = 0; i < jarray.length(); i++) {\n\t\t\t\t\n\t\t\t\tPost review = new Post(jarray.getJSONObject(i));\n\t\t\t\tSystem.out.println(\"55\");\n\t\t\t\tString content = review.getContent();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tHashMap<String, Integer> querytf = new HashMap<String, Integer>();\n\n\t\t\t\tHashSet<String> biminiset = new HashSet<String>();\n\n\t\t\t\tArrayList uniquery = new ArrayList();\n\n\t\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif (token.isEmpty())\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tuniquery.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t\t}\n\n\t\t\t\tfor (int k = 0; k < uniquery.size(); k++) {\n\n\t\t\t\t\tif (querytf.containsKey(uniquery.get(i).toString())) {\n\t\t\t\t\t\tquerytf.put(uniquery.get(i).toString(),\n\t\t\t\t\t\t\t\tquerytf.get(uniquery.get(i).toString()) + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tquerytf.put(uniquery.get(i).toString(), 1);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tN_gram.add(token);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tString[] fine = new String[N_gram.size()];\n\n\t\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tfor (String str2 : fine) {\n\n\t\t\t\t\tif (querytf.containsKey(str2)) {\n\t\t\t\t\t\tquerytf.put(str2, querytf.get(str2) + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tquerytf.put(str2, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (String key : querytf.keySet()) {\n\t\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\t\tdouble tf = querytf.get(key);\n\n\t\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\t\tquery_idf.put(key, result);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tquery_idf.put(key, 0.0);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t}", "static TreeSet<Noun> parseNouns(Scanner data, int declension){\n\t\tassert(declension != Values.INDEX_ENDINGS_DECLENSION_THIRD && declension != Values.INDEX_ENDINGS_DECLENSION_THIRD_I_N && declension != Values.INDEX_ENDINGS_DECLENSION_THIRD_I_N); //there's a separate function for these guys.\n\t\tArrayList<String[]> raw = parseDataToArray(data);\n\t\tTreeSet<Noun> output = new TreeSet<Noun>();\n\n\t\tfor(String[] current : raw){ //iterate over each line from the original file.\n\n\t\t\tif(current.length != Values.NOUN_DATA_ARRAY_LENGTH_CORRECT){\n\t\t\t\tSystem.err.println(\"Error parsing a line.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//System.out.println(\"Raw: \" + Arrays.toString(current));\n\n\t\t\t//current[] contains a split based on tabs. Generally {chapter, nom/gen/gender, definition}.\n\n\t\t\tint chapter = 0;\n\t\t\tString nominative = null;\n\t\t\tString genitive = null;\n\t\t\tchar gender = '-';\n\t\t\tArrayList<String> definitions = new ArrayList<String>();\n\n\t\t\t//Values.betterStringArrayPrint(current);\n\n\t\t\ttry{ //try to read a noun, assuming that the chapter IS specified\n\t\t\t\tchapter = Integer.parseInt(current[0]);\n\t\t\t\tnominative = current[1].split(\", \")[0];\n\t\t\t\tgenitive = current[1].split(\", \")[1];\n\t\t\t\tgender = current[1].split(\", \")[2].charAt(0);\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(NumberFormatException e){ //can happen if a chapter isn't specified. Read the noun from a null chapter.\n\t\t\t\tchapter = Values.CHAPTER_VOID;\n\t\t\t\tnominative = current[1].split(\", \")[0];\n\t\t\t\tgenitive = current[1].split(\", \")[1];\n\t\t\t\tgender = current[1].split(\", \")[2].charAt(0);\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(Exception e){\n\t\t\t\tSystem.err.println(\"Could not read a line!\");\n\t\t\t\tcontinue; //We can't make a noun out of the botrked line.\n\t\t\t}\n\t\t\tint genderIndex = Values.getGenderIndex(gender);\n\t\t\ttrimAll(definitions);\n\t\t\tNoun currentNoun = new Noun(nominative, genitive, chapter, genderIndex, declension, definitions);\n\t\t\tSystem.out.println(\"Added: \" + currentNoun);\n\t\t\toutput.add(currentNoun);\n\t\t}\n\n\t\treturn output;\n\t}", "public Document readDocument();", "private static void extractCoNLL(ArrayList<ResolveGroup> groups) {\n\t\tCoNLLDocument d = new CoNLLDocument(\"train_gold_conll\");\n\t\tparts.addAll(d.getParts());\n\t\tint i = d.getParts().size();\n\t\tfor (CoNLLPart part : parts) {\n\t\t\textractGroups(part);\n\t\t\tSystem.out.println(i--);\n\t\t}\n\t}", "static Content getLigandContent (List<Ligand> ligands) throws Exception {\n if (true || ligands.size() == 1) {\n Ligand ligand = ligands.iterator().next();\n \n List<Keyword> breadcrumb = new ArrayList<Keyword>();\n for (Keyword kw : ligand.synonyms) {\n if (kw.label.equals(WHO_ATC)\n // don't include the leaf node\n && kw.term.length() < 7) {\n breadcrumb.add(kw);\n }\n }\n \n if (!breadcrumb.isEmpty()) {\n Collections.sort(breadcrumb, new Comparator<Keyword>() {\n public int compare (Keyword kw1, Keyword kw2) {\n return kw1.term.compareTo(kw2.term);\n }\n });\n for (Keyword kw : breadcrumb) {\n try {\n Keyword atc = getATC (kw);\n if (atc != null) {\n kw.term = atc.term;\n kw.href = atc.href;\n }\n }\n catch (Exception ex) {\n Logger.error(\"Can't retreive ATC \"+kw.term, ex);\n ex.printStackTrace();\n }\n }\n }\n \n List<LigandActivity> acts = new ArrayList<LigandActivity>();\n for (XRef ref : ligand.getLinks()) {\n if (ref.kind.equals(Target.class.getName())) {\n acts.add(new LigandActivity (ref));\n }\n }\n \n return ix.idg.views.html\n .liganddetails.render(ligand, acts, breadcrumb);\n }\n else {\n TextIndexer indexer = _textIndexer.createEmptyInstance();\n for (Ligand lig : ligands)\n indexer.add(lig);\n \n TextIndexer.SearchResult result = SearchFactory.search\n (indexer, Ligand.class, null, indexer.size(), 0, FACET_DIM,\n request().queryString());\n if (result.count() < ligands.size()) {\n ligands.clear();\n for (int i = 0; i < result.count(); ++i) {\n ligands.add((Ligand)result.getMatches().get(i));\n }\n }\n TextIndexer.Facet[] facets = filter\n (result.getFacets(), LIGAND_FACETS);\n indexer.shutdown();\n \n return ix.idg.views.html.ligands.render\n (1, result.count(), result.count(),\n new int[0], decorate (facets), ligands);\n }\n }", "public WordNet(String synsetFilename, String hyponymFilename) {\n In synsets = new In(synsetFilename);\n In hyponyms = new In(hyponymFilename);\n int count = 0;\n while (synsets.hasNextLine()) {\n String line = synsets.readLine();\n String[] linesplit = line.split(\",\");\n String[] wordsplit = linesplit[1].split(\" \");\n Set<String> synset = new HashSet<String>();\n Set<Integer> wordIndexes = new HashSet<Integer>();\n for (int i = 0; i < wordsplit.length; i += 1) {\n synset.add(wordsplit[i]);\n if (wnetsi.containsKey(wordsplit[i])) {\n wordIndexes = wnetsi.get(wordsplit[i]);\n wordIndexes.add(Integer.parseInt(linesplit[0]));\n wnetsi.put(wordsplit[i], wordIndexes);\n } else {\n wordIndexes.add(Integer.parseInt(linesplit[0]));\n wnetsi.put(wordsplit[i], wordIndexes);\n }\n }\n wnetis.put(Integer.parseInt(linesplit[0]), synset);\n count += 1;\n }\n \n \n \n String[] allVerts = hyponyms.readAllLines();\n g = new Digraph(count);\n for (int i = 0; i < allVerts.length; i += 1) {\n String[] linesplit = allVerts[i].split(\",\");\n for (int j = 0; j < linesplit.length; j += 1) {\n g.addEdge(Integer.parseInt(linesplit[0]), Integer.parseInt(linesplit[j]));\n }\n }\n \n }", "public Stemmer ()\n {\n AllWords = new HashMap<String,String>();\n dictionary = Dictionary.getInstance();\n p = PointerUtils.getInstance();\n\n try\n {\n // JWNL.initialize(new FileInputStream(\"file_properties.xml\"));\n JWNLConnecter.initializeJWNL();\n dic = Dictionary.getInstance();\n morph = dic.getMorphologicalProcessor();\n // ((AbstractCachingDictionary)dic).\n //\tsetCacheCapacity (10000);\n IsInitialized = true;\n }\n catch (Exception e){\n System.err.println(e.getMessage());\n }\n /*catch ( FileNotFoundException e )\n {\n System.out.println ( \"Error initializing Stemmer: JWNLproperties.xml not found\" );\n }\n catch ( JWNLException e )\n {\n System.out.println ( \"Error initializing Stemmer: \"\n + e.toString() );\n }*/\n\n }", "void computeHTMLFeatures() throws Exception{\n\t\tcountTagStatistics();\n\t\thtmlGlobalTagStatistics();\n\t\ttagInHeadStatistics();\n\t\thtmlStatisticsDiv();\n\t\thtmlStaticsticsParagraphs();\n\t\thtmlKeyWords();\n\t\tnormalizeData();\n\t}" ]
[ "0.5886296", "0.56433153", "0.5621128", "0.5561394", "0.5496086", "0.5493071", "0.5472561", "0.54560524", "0.5453613", "0.5437753", "0.5433524", "0.5397829", "0.53958225", "0.53940165", "0.5359288", "0.53587174", "0.53304535", "0.53113645", "0.52980137", "0.52726156", "0.5237937", "0.52251285", "0.5202515", "0.51572907", "0.5153434", "0.5144176", "0.5142732", "0.5138937", "0.5136802", "0.51219493", "0.51213115", "0.510432", "0.50992876", "0.50788414", "0.50763535", "0.504982", "0.5037907", "0.5030254", "0.5029292", "0.50174755", "0.49814963", "0.49814487", "0.4971962", "0.4971146", "0.49620166", "0.4960636", "0.49537912", "0.49381036", "0.49327418", "0.49254137", "0.4921352", "0.4904103", "0.4899963", "0.48975632", "0.48862925", "0.48842552", "0.48829406", "0.48823583", "0.486631", "0.48650324", "0.4862827", "0.48588896", "0.48446196", "0.4838583", "0.48366976", "0.4813487", "0.4807883", "0.48042297", "0.4801113", "0.480103", "0.48001084", "0.47968793", "0.47915772", "0.47761527", "0.47630334", "0.4744367", "0.47424197", "0.47420052", "0.47405326", "0.47348967", "0.4727835", "0.4709096", "0.47030476", "0.47019577", "0.4699056", "0.46848089", "0.46718884", "0.4662448", "0.465784", "0.46551007", "0.46440798", "0.46403033", "0.462831", "0.4627521", "0.4620192", "0.4617288", "0.46146104", "0.46134067", "0.46125862", "0.46074694", "0.46033445" ]
0.0
-1
/ Step 1: Create a document model
private CText getTaxonomyList( final String inputText, final String title, boolean breakdown) { CText document = new CText(title); /* * Step 2:Extract the N-Grams from the document */ CNGramsExtractor nGramsExtract = new CNGramsExtractor(); //INFO System.out.println("Last execution"); if( nGramsExtract.extract(document, inputText) ) { document.setState(CText.E_STATES.NGRAMS); System.out.println("NGram extracted"); /* * Step 3: Extract Composite and semantics */ CTaxonomyExtractor taxonomyExtractor = new CTaxonomyExtractor(_taxonomyConnection, breakdown); if( taxonomyExtractor.extract(document) ) { document.setState(CText.E_STATES.TAXONOMY); } } return document; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "springfox.documentation.schema.Model create(ModelContext context);", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Documento createDocumento();", "void create(Model model) throws Exception;", "public CreateDocumentController() {\n }", "public void newDocument();", "void saveDocument(SingleDocumentModel model, Path newPath);", "protected Document createDefaultModel()\n\t{\n\t\treturn new IntegerDocument();\n\t}", "protected Document createDefaultModel() {\n return new PlainDocument();\n }", "Document saveDocument(Document document) throws EntityExistsException;", "Documentable createDocumentable();", "DomainModel createDomainModel();", "SingleDocumentModel loadDocument(Path path);", "void documentAdded(SingleDocumentModel model);", "EisModel createEisModel();", "public Document() {\n }", "@Override\n public DocumentModel createDocument(CoreSession session, Blob content, DocumentModel mainDoc, DocumentModel folder)\n throws IOException {\n\n return createDocument(session, content, mainDoc, folder, false);\n }", "GoalModel createGoalModel();", "public static void createDocument(String[] attributes) {\n\t\tattributes[2] = attributes[2].toUpperCase();\n\t\tint orgID = OrganizationService.getOrgByUsername(attributes[2]).getId();\n\t\ttry {\n\t\t\t\n\t\t\tDocument docu = DocumentService.getDocumentByTitleAndOrg(attributes[5], orgID);\n\t\t\t//System.out.println(orgID);\n\t\t\tif(docu == null) {\n\t\t\t\t//create document\n\t\t\t\tDocument document = new Document();\n\t\t\t\t//System.out.println(attributes[2]);\n\t\t\t\t\n\t\t\t\tdocument.setOrgID(orgID);\n\t\t\t\tdocument.setTitle(attributes[5]);\n\t\t\t\tdocument.setTerm(attributes[1]);\n\t\t\t\t\n\t\t\t\tDocumentService.addDocument(document);\n\n\t\t\t} \n\t\t\tcreateActivity(attributes, docu.getId(), orgID);\n\t\t} catch(Exception e){\n\t\t\tSystem.out.println(\"Error\");\n\t\t}\n\t\t/*else if(attributes.length >= 20) {\n\t\t\tif (attributes[19].equals(\"In Case of Change\")\n\t\t\t\t || attributes[19].equals(\"Activity Not in GOSM\")) {\n\t\t\t\tcreateActivity(attributes);\n\t\t\t} else {\n\t\t\t\tcreateSubmission(attributes);\n\t\t\t}\n\t\t} else {\n\t\t\tcreateSubmission(attributes);\n\t\t}*/\n\t\t\n\t}", "@POST\n\t@Path(\"{projectId}\")\n\t@Consumes({ \"application/json+nxentity\", \"application/json\" })\n\tpublic Response doPost(DocumentModel inputDoc, @PathParam(\"projectId\") String projectId) {\n\t\tCoreSession session = ctx.getCoreSession();\n\n\t\tif (StringUtils.isBlank(inputDoc.getType()) || StringUtils.isBlank(inputDoc.getName())) {\n\t\t\treturn Response.status(Status.BAD_REQUEST).entity(\"type or name property is missing\").build();\n\t\t}\n\n\t\tDocumentModel parent = getProjectContainer(projectId);\n\n\t\tString parentPath = parent.getPathAsString();\n\n\t\tif (\"AI_Model\".equals(inputDoc.getType())) {\n\t\t\tparentPath = parent.getPath().append(\"models\").toString();\n\t\t} else if (\"AI_Corpus\".equals(inputDoc.getType())) {\n\t\t\tparentPath = parent.getPath().append(\"datasets\").toString();\n\t\t} else if (\"AI_Training\".equals(inputDoc.getType())) {\n\t\t\tparentPath = parent.getPath().append(\"trainings\").toString();\n\t\t} else {\n\t\t\treturn Response.status(Status.BAD_REQUEST).entity(\"Unexpected Document Type\").build();\n\t\t}\n\n\t\tDocumentModel createdDoc = session.createDocumentModel(parentPath, inputDoc.getName(), inputDoc.getType());\n\t\tDocumentModelJsonReader.applyPropertyValues(inputDoc, createdDoc);\n\t\tcreatedDoc = session.createDocument(createdDoc);\n\t\tsession.save();\n\t\treturn Response.ok(createdDoc).status(Status.CREATED).build();\n\t}", "@Override\n public void run() throws SmartServiceException {\n UserProfile author = us.getUser(smartServiceCtx.getUsername());\n String username = author.getUsername();\n\n // Create a filename based on the user's name and MadLib title.\n String userFullName = author.getFirstName() + \" \" + author.getLastName();\n String docName = username + \" \" + madlib.getTitle();\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"Creating new document in folder %d with name %s and ext %s\", saveIn, docName,\n DOC_EXTENSION));\n }\n // Instantiate a new Document object with the necessary metadata\n Document newDoc = new Document(saveIn, docName, DOC_EXTENSION);\n try {\n // Creates a new document in the Appian engine. At this point the document is empty.\n // Content.UNIQUE_NONE specifies that we don't need to worry about document name uniqueness\n ContentOutputStream madlibOS = cs.upload(newDoc, Content.UNIQUE_NONE);\n\n // Save the id of the new document as our smartservice output\n madlibDoc = madlibOS.getContentId();\n\n // Write the madlib text and some footer information to the new document file on disk\n PrintWriter pw = new PrintWriter(madlibOS);\n pw.println(AppianMadLibUtil.createMadLibText(madlib));\n pw.println(\"By \" + userFullName);\n pw.println(\"Created \" + new Date());\n pw.close();\n\n } catch (PrivilegeException e) {\n LOG.error(\n String.format(\"User %s did not have permission to write to folder [id=%d]\", username, saveIn), e);\n throw createException(e, \"error.exception.permission\", smartServiceCtx.getUsername(), saveIn);\n } catch (Exception e) {\n LOG.error(\n String.format(\"Unexpected error creating new doc in folder [id=%d] as user %s\", saveIn, username), e);\n throw createException(e, \"error.exception.unknown\", smartServiceCtx.getUsername(), saveIn);\n }\n }", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "private Document createDocumentForTest() {\r\n\r\n EntityManager em = com.topcoder.service.studio.contest.bean.MockEntityManager.EMF.createEntityManager();\r\n em.getTransaction().begin();\r\n\r\n FilePath path = new FilePath();\r\n path.setModifyDate(new Date());\r\n path.setPath(\"path\");\r\n\r\n StudioFileType studioFileType = new StudioFileType();\r\n studioFileType.setDescription(\"description\");\r\n studioFileType.setExtension(\"extension\");\r\n studioFileType.setImageFile(true);\r\n studioFileType.setSort(1);\r\n em.persist(studioFileType);\r\n\r\n MimeType mimeType = new MimeType();\r\n mimeType.setDescription(\"description\");\r\n mimeType.setStudioFileType(studioFileType);\r\n mimeType.setMimeTypeId(1L);\r\n em.persist(mimeType);\r\n\r\n DocumentType type = new DocumentType();\r\n type.setDescription(\"description\");\r\n type.setDocumentTypeId(1L);\r\n em.persist(type);\r\n\r\n em.getTransaction().commit();\r\n em.close();\r\n\r\n Document document = new Document();\r\n document.setOriginalFileName(\"originalFileName\");\r\n document.setSystemFileName(\"systemFileName\");\r\n document.setPath(path);\r\n document.setMimeType(mimeType);\r\n document.setType(type);\r\n document.setCreateDate(new Date());\r\n\r\n return document;\r\n }", "void insertOne(Document person);", "Book createBook();", "public boolean create(ModelObject obj);", "@Override\n protected void generateDocument(Object object, Document document) throws Exception {\n\n if (object instanceof Record) {\n createRecord((Record) object, document);\n } else if (object instanceof RecordCompleteEvent) {\n \tcreateRecordCompleteEvent((RecordCompleteEvent) object, document);\n } else if (object instanceof RecordPauseCommand) {\n createPauseCommand((RecordPauseCommand) object, document);\n } else if (object instanceof RecordResumeCommand) {\n createResumeCommand((RecordResumeCommand) object, document);\n }\n }", "public MyDocument() {\r\n }", "@Override\n\tpublic boolean create(Document obj) {\n\t\tSystem.out.println(obj);\n\t\tString sql = \"INSERT INTO public.documents( nom, etape_id, process_id)\\r\\n\"\n\t\t\t\t+ \"\tVALUES ('\" + obj.getNom() + \"', \" + obj.getId_etape()+ \" , \"+obj.getId_process()+\");\";\n\t\ttry {\n\t\t\tSystem.out.println(sql);\n\t\t\tPreparedStatement statement = this.connect.prepareStatement(sql);\n\t\t\tstatement.execute();\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n protected void buildPdfDocument(Map<String, Object> model, Document document, PdfWriter writer,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n createNewPdfByTemplate(model,document,writer,request,response);\n\n }", "@Override\n public DocumentServiceEntry createDocument(String title, String contents) throws DocumentServiceException {\n DocsService svc = getDocsService();\n DocumentEntry newDocument = new DocumentEntry();\n newDocument.setTitle(new PlainTextConstruct(title));\n DocumentEntry entry;\n try {\n MediaByteArraySource source = new MediaByteArraySource(contents.getBytes(\"UTF8\"), \"text/plain\");\n newDocument.setMediaSource(source);\n entry = svc.insert(new URL(DOCS_SCOPE + \"default/private/full\"), newDocument);\n } catch (Exception e) {\n e.printStackTrace();\n throw new DocumentServiceException(e.getMessage());\n }\n return getDocumentReference(entry);\n }", "public DocType createDocument(String id, String value) {\n\t\tDocType doc = mappingFactory.createDocType();\n\t\tdoc.setId(\"\" + id);\n\t\tdoc.setValue(value);\n\t\treturn doc;\n\t}", "ZenModel createZenModel();", "public Doc() {\n\n }", "public DefaultObjectModel ()\n {\n this (new Schema ());\n }", "public Documento() {\n\n\t}", "private SingleDocumentModel addNewDocument(Path path, String content) {\n\t\tSingleDocumentModel document = new DefaultSingleDocumentModel(path, content);\n\t\tmodels.add(document);\n\t\tnotifyNewDocument(document);\n\t\tnotifyDocumentChanged(current, document);\n\t\tdocument.addSingleDocumentListener(new SingleDocumentListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void documentModifyStatusUpdated(SingleDocumentModel model) {\n\t\t\t\tchangeIcon(model);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void documentFilePathUpdated(SingleDocumentModel model) {\n\t\t\t\tchangeTitle(model);\n\t\t\t\tchangeToolTip(model);\n\t\t\t}\n\t\t});\n\t\taddNewTab(document);\n\t\treturn document;\n\t}", "public JestResult createNewDocument(GTData data) throws IOException {\n Gson gson = new Gson();\n String json = gson.toJson(data);\n Index request = new Index.Builder(json)\n .index(INDEX_NAME)\n .type(data.getClass().toString())\n .id(data.getObjectID())\n .build();\n\n JestResult result = client.execute(request);\n return result;\n }", "Documentation createDocumentation();", "Documentation createDocumentation();", "@Test\n public void testDocuments() throws InterruptedException {\n Document document = new Document(\"newFolder\", \"Folder\");\n document.set(\"dc:title\", \"The new folder\");\n document.set(\"dc:description\", \"Folder created via the REST API\");\n document = nuxeoClient.repository().createDocumentByPath(\"/default-domain/workspaces/testWorkspace\", document);\n assertNotNull(document);\n assertEquals(\"document\", document.getEntityType());\n assertEquals(\"Folder\", document.getType());\n assertEquals(\"/default-domain/workspaces/testWorkspace/newFolder\", document.getPath());\n assertEquals(\"The new folder\", document.getTitle());\n assertEquals(\"The new folder\", document.get(\"dc:title\"));\n assertEquals(\"Folder created via the REST API\", document.get(\"dc:description\"));\n\n // Create a File document by parent id\n // TODO\n\n // Get a document by id\n // TODO\n\n // Get a document by path\n // TODO\n\n // Update a document\n // TODO\n\n // Delete a document\n // TODO\n }", "@RequestMapping(value = \"/add-document\", method = RequestMethod.POST)\n public String addOwnership(@Valid @ModelAttribute Document document, ModelMap modelMap){\n documentService.addDocument(document);\n List<Document> documents= documentService.retrieveAllDocuments(document.getEntity().getId());\n modelMap.addAttribute(\"documents\", documents);\n modelMap.addAttribute(\"entityId\", document.getEntity().getId());\n return \"documents\";\n }", "Article createArticle();", "public void newFileCreated(OpenDefinitionsDocument doc) { }", "public void newFileCreated(OpenDefinitionsDocument doc) { }", "public void doNew() {\n\n if (!canChangeDocuments()) {\n return;\n }\n \n setDocument(fApplication.createNewDocument());\n }", "public DocumentBase() {\n \n }", "public ODocument create(@Generic(\"T\") final Class<?> type) {\n dbProvider.get();\n return new ODocument(type.getSimpleName());\n }", "@Override\n public CreateDocumentClassifierResult createDocumentClassifier(CreateDocumentClassifierRequest request) {\n request = beforeClientExecution(request);\n return executeCreateDocumentClassifier(request);\n }", "Definition createDefinition();", "@POST\r\n public DocumentoDTO crearDocumento(DocumentoDTO documento){\r\n return new DocumentoDTO(logic.crearDocumento(documento.toEntity()));\r\n }", "@PostMapping(\"/documents\")\r\n\tpublic ResponseEntity<String> create(String content) {\r\n\t\tString docId = this.documentHandler.createDocument(content);\r\n\t\tHttpHeaders headers = new HttpHeaders();\r\n\t\theaders.setContentType(MediaType.TEXT_PLAIN);\r\n\t\theaders.setAcceptCharset(Collections.singletonList(StandardCharsets.US_ASCII));\r\n\t\theaders.setContentLength(docId.length());\r\n\t\treturn new ResponseEntity<String>(docId, headers, HttpStatus.CREATED);\r\n\t}", "@Override\n public DocumentServiceEntry saveDocument(String documentId, String etag, String title,\n String contents) throws DocumentServiceException {\n if (documentId == null || documentId.equals(\"\")) {\n return createDocument(title, contents);\n } else {\n return setDocumentContents(documentId, etag, contents);\n }\n }", "public com.huqiwen.demo.book.model.Books create(long bookId);", "@POST( CONTROLLER )\n VersionedObjectKey createObject( @Body CreateObjectRequest request );", "DataModel createDataModel();", "public Document(String title, CopyOnWriteArrayList<String> docModel,\r\n\t\t\tString location, int id) {\r\n\t\tthis.docModel = docModel;\r\n\t\tthis.name = title;\r\n\t\tthis.location = location;\r\n\t\tthis.id = id;\r\n\r\n\t\t/* Starts up command listener for document */\r\n\t\tThread t = new Thread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tif (!commandsQueue.isEmpty()) {\r\n\t\t\t\t\t\tString[] currCommand = commandsQueue.remove();\r\n\t\t\t\t\t\tif (currCommand[0].equals(\"insert\")) {\r\n\t\t\t\t\t\t\tinsert(Integer.parseInt(currCommand[1]),\r\n\t\t\t\t\t\t\t\t\tcurrCommand[2]);\r\n\t\t\t\t\t\t} else if (currCommand[0].equals(\"remove\")) {\r\n\t\t\t\t\t\t\tremove(Integer.parseInt(currCommand[1]));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tupdateActiveUsers();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tt.start();\r\n\t}", "public DocumentController(String date, String content) {\n document = new DocumentSchema();\n document.setDocumentStr(content);\n document.setPublicationDate(date);\n document.setDocId(UUID.randomUUID().toString());\n }", "com.exacttarget.wsdl.partnerapi.ObjectDefinition addNewObjectDefinition();", "private Document createMapping() {\n return getIndexOperations().createMapping();\n }", "@POST( CONTROLLER + METADATA_PATH )\n VersionedObjectKey createMetadataObject( @Body CreateMetadataObjectRequest request );", "void create(Book book);", "public void testCreate () throws IOException {\n\t PDDocument document = new PDDocument(); \r\n\t \r\n\t //Saving the document\r\n\t document.save(\"./my_doc.pdf\");\r\n\t \r\n\t System.out.println(\"PDF created\"); \r\n\t \r\n\t //Closing the document \r\n\t document.close();\r\n\t}", "SingleDocumentModel getCurrentDocument();", "RoomModel createRoomModel(RoomModel roomModel);", "public manageDoc() {\r\r\r\n\r\r\r\n }", "public T createModel(Cursor cursor, String id);", "private void createDocs() {\n\t\t\n\t\tArrayList<Document> docs=new ArrayList<>();\n\t\tString foldername=\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\input\";\n\t\tFile folder=new File(foldername);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tfor (File file : listOfFiles) {\n\t\t\ttry {\n\t\t\t\tFileInputStream fisTargetFile = new FileInputStream(new File(foldername+\"\\\\\"+file.getName()));\n\t\t\t\tString fileContents = IOUtils.toString(fisTargetFile, \"UTF-8\");\n\t\t\t\tString[] text=fileContents.split(\"ParseText::\");\n\t\t\t\tif(text.length>1){\n\t\t\t\t\tString snippet=text[1].trim().length()>100 ? text[1].trim().substring(0, 100): text[1].trim();\n\t\t\t\t\tDocument doc=new Document();\n\t\t\t\t\tdoc.setFileName(file.getName().replace(\".txt\", \"\"));\n\t\t\t\t\tdoc.setUrl(text[0].split(\"URL::\")[1].trim());\n\t\t\t\t\tdoc.setText(snippet+\"...\");\n\t\t\t\t\tdocs.add(doc);\n\t\t\t\t}\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\n\t\t}\t\n\t\tDBUtil.insertDocs(docs);\n\t}", "public void saveOneWord(Pojo.OneWord e){ \n template.save(e); \n}", "public NewDocumentRequestDto() {\n }", "DataGenModel()\n {\n }", "public M create(P model);", "private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}", "@PostMapping(\"/document-entities\")\n public ResponseEntity<DocumentEntityDTO> createDocumentEntity(@Valid @RequestBody DocumentEntityDTO documentEntityDTO) throws URISyntaxException {\n log.debug(\"REST request to save DocumentEntity : {}\", documentEntityDTO);\n if (documentEntityDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new documentEntity cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n DocumentEntityDTO result = documentEntityService.save(documentEntityDTO);\n return ResponseEntity.created(new URI(\"/api/document-entities/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "protected void assembleDocument() {\n\n // Create the missive\n this.createMissive();\n }", "public void createNoteEditModel() {\n \t\tif (this.mNoteItemModel == null)\n \t\t\tthis.mNoteItemModel = new NoteItemModel(this.getContext());\n \t\tthis.status = STATUS_CREATE;\n \t}", "public void save(){\r\n\t\t//System.out.println(\"call save\");\r\n\t\tmodel.printDoc();\r\n\t}", "public Document()\n {\n index = 0;\n words = 0;\n sentences = 0;\n syllables = 0;\n }", "public CouchDoc() {\n super();\n docType = getClass().getSimpleName();\n }", "com.exacttarget.wsdl.partnerapi.ObjectDefinition insertNewObjectDefinition(int i);", "public Document addDocument(Document arg0) throws ContestManagementException {\r\n return null;\r\n }", "void create(int id, int authorId, String title);", "public TargetGeneratorModel()\n {\n }", "ShippingDocument createShippingDocument();", "public static opCode createDocument(String name, int nsection)\n {\n Operation request = new Operation(username);\n request.setPassword(password);\n request.setCode(opCode.CREATE);\n\n request.setFilename(name);\n request.setSection(nsection);\n\n sendReq(clientSocketChannel,request);\n\n return getAnswer();\n }", "@Override\n\tpublic void saveDocument(String path, String name) {\n\t\t\n\t}", "UserModel createUserModel(UserModel userModel);", "@Override\n public DocumentServiceEntry getNewDocument() {\n UserService userService = UserServiceFactory.getUserService();\n DocumentServiceEntry doc = new DocumentServiceEntry();\n doc.setTitle(\"Untitled Document\");\n doc.setIdentifier(doc.getTitle().replaceAll(\"[^a-zA-Z0-9_\\\\-\\\\.]\", \"\"));\n doc.setAuthor(userService.getCurrentUser().getEmail());\n doc.setEditor(userService.getCurrentUser().getNickname());\n return doc;\n }", "Schema createSchema();", "@POST\r\n public Response createResearchObject()\r\n throws BadRequestException, IllegalArgumentException, UriBuilderException, ConflictException,\r\n DigitalLibraryException, NotFoundException {\r\n LOGGER.debug(String.format(\"%s\\t\\tInit create RO\", new DateTime().toString()));\r\n String researchObjectId = request.getHeader(Constants.SLUG_HEADER);\r\n if (researchObjectId == null || researchObjectId.isEmpty()) {\r\n throw new BadRequestException(\"Research object ID is null or empty\");\r\n }\r\n URI uri = uriInfo.getAbsolutePathBuilder().path(researchObjectId).path(\"/\").build();\r\n ResearchObject researchObject = ResearchObject.findByUri(uri);\r\n if (researchObject != null) {\r\n throw new ConflictException(\"RO already exists\");\r\n }\r\n researchObject = new ResearchObject(uri);\r\n URI researchObjectURI = ROSRService.createResearchObject(researchObject);\r\n LOGGER.debug(String.format(\"%s\\t\\tRO created\", new DateTime().toString()));\r\n \r\n RDFFormat format = RDFFormat.forMIMEType(request.getHeader(Constants.ACCEPT_HEADER), RDFFormat.RDFXML);\r\n InputStream manifest = ROSRService.SMS.get().getNamedGraph(researchObject.getManifestUri(), format);\r\n ContentDisposition cd = ContentDisposition.type(format.getDefaultMIMEType())\r\n .fileName(ResearchObject.MANIFEST_PATH).build();\r\n \r\n LOGGER.debug(String.format(\"%s\\t\\tReturning\", new DateTime().toString()));\r\n return Response.created(researchObjectURI).entity(manifest).header(\"Content-disposition\", cd).build();\r\n }", "protected ObjectModel createObjectModel(String uid, String xml) {\r\n throw new IllegalStateException(\"You must register the same object model on all sites.\");\r\n }", "public void setDocumentType(String documentType);", "public void create(Blog Blog) {\n\t\t mongoTemplate.insert(Blog);\n\t}", "protected EObject createInitialModel() {\r\n \t\tReqIF root = reqif10Factory.createReqIF();\r\n \r\n \t\tReqIFHeader header = reqif10Factory.createReqIFHeader();\r\n \t\troot.setTheHeader(header);\r\n \r\n \t\t// Setting the time gets more and more complicated...\r\n \t\ttry {\r\n \t\t\tGregorianCalendar cal = new GregorianCalendar();\r\n \t\t\tcal.setTime(new Date());\r\n \t\t\theader.setCreationTime(DatatypeFactory.newInstance()\r\n \t\t\t\t\t.newXMLGregorianCalendar(cal));\r\n \t\t} catch (DatatypeConfigurationException e) {\r\n \t\t\tthrow new RuntimeException(e);\r\n \t\t}\r\n \r\n \t\theader.setSourceToolId(\"ProR (http://pror.org)\");\r\n //\t\theader.setAuthor(System.getProperty(\"user.name\"));\r\n \r\n \t\tReqIFContent content = reqif10Factory.createReqIFContent();\r\n \t\troot.setCoreContent(content);\r\n \r\n \t\t// Add a DatatypeDefinition\r\n \t\tDatatypeDefinitionString ddString = reqif10Factory\r\n \t\t\t\t.createDatatypeDefinitionString();\r\n \t\tddString.setLongName(\"T_String32k\");\r\n \t\tddString.setMaxLength(new BigInteger(\"32000\"));\r\n \t\tcontent.getDatatypes().add(ddString);\r\n \r\n \t\t// Add a Specification\r\n \t\tSpecification spec = reqif10Factory.createSpecification();\r\n \t\tspec.setLongName(\"Specification Document\");\r\n \t\tcontent.getSpecifications().add(spec);\r\n \r\n \t\t// Add a SpecType\r\n \t\tSpecObjectType specType = reqif10Factory.createSpecObjectType();\r\n \t\tspecType.setLongName(\"Requirement Type\");\r\n \t\tcontent.getSpecTypes().add(specType);\r\n \r\n \t\t// Add an AttributeDefinition\r\n \t\tAttributeDefinitionString ad = reqif10Factory\r\n \t\t\t\t.createAttributeDefinitionString();\r\n \t\tad.setType(ddString);\r\n \t\tad.setLongName(\"Description\");\r\n \t\tspecType.getSpecAttributes().add(ad);\r\n \r\n \t\t// Configure the Specification View\r\n \t\tProrToolExtension extension = ConfigurationFactory.eINSTANCE\r\n \t\t\t\t.createProrToolExtension();\r\n \t\troot.getToolExtensions().add(extension);\r\n \t\tProrSpecViewConfiguration prorSpecViewConfiguration = ConfigurationFactory.eINSTANCE\r\n \t\t\t\t.createProrSpecViewConfiguration();\r\n \t\textension.getSpecViewConfigurations().add(prorSpecViewConfiguration);\r\n \t\tprorSpecViewConfiguration.setSpecification(spec);\r\n \t\tColumn col = ConfigurationFactory.eINSTANCE.createColumn();\r\n \t\tcol.setLabel(\"Description\");\r\n \t\tcol.setWidth(400);\r\n \t\tprorSpecViewConfiguration.getColumns().add(col);\r\n \r\n \t\tColumn leftHeaderColumn = ConfigFactory.eINSTANCE.createColumn();\r\n \t\tleftHeaderColumn\r\n \t\t\t\t.setWidth(ConfigurationUtil.DEFAULT_LEFT_HEADER_COLUMN_WIDTH);\r\n \t\tleftHeaderColumn\r\n \t\t\t\t.setLabel(ConfigurationUtil.DEFAULT_LEFT_HEADER_COLUMN_NAME);\r\n \t\tprorSpecViewConfiguration.setLeftHeaderColumn(leftHeaderColumn);\r\n \r\n \t\t// Configure the Label configuration\r\n \t\tProrGeneralConfiguration generalConfig = ConfigurationFactory.eINSTANCE\r\n \t\t\t\t.createProrGeneralConfiguration();\r\n \t\tLabelConfiguration labelConfig = ConfigurationFactory.eINSTANCE\r\n \t\t\t\t.createLabelConfiguration();\r\n \t\tlabelConfig.getDefaultLabel().add(\"Description\");\r\n \t\tgeneralConfig.setLabelConfiguration(labelConfig);\r\n \t\textension.setGeneralConfiguration(generalConfig);\r\n \r\n \t\t// Create one Requirement\r\n \t\tSpecObject specObject = reqif10Factory.createSpecObject();\r\n \t\tspecObject.setType(specType);\r\n \t\tcontent.getSpecObjects().add(specObject);\r\n \t\tAttributeValueString value = reqif10Factory.createAttributeValueString();\r\n \t\tvalue.setTheValue(\"Start editing here.\");\r\n \t\tvalue.setDefinition(ad);\r\n \t\tspecObject.getValues().add(value);\r\n \r\n \t\t// Add the requirement to the Specification\r\n \t\tSpecHierarchy specHierarchy = reqif10Factory.createSpecHierarchy();\r\n \t\tspec.getChildren().add(specHierarchy);\r\n \t\tspecHierarchy.setObject(specObject);\t\r\n \t\treturn root;\r\n \t}", "public interface IModelDocumentProvider {\r\n\t/** \r\n\t * Locate an existing document or load it. Listen for future changes\r\n\t * to the document and to the file. \r\n\t * @param file full pathed file\r\n\t * @return IDocument instance; return null only if the file does not exist. \r\n\t */\r\n\tIDocument getDocument(File file);\r\n}" ]
[ "0.70205176", "0.6881119", "0.6881119", "0.6881119", "0.6881119", "0.6881119", "0.6881119", "0.6881119", "0.68733084", "0.656277", "0.6488176", "0.64642835", "0.6448614", "0.64366287", "0.64222765", "0.63004565", "0.62790906", "0.6271133", "0.6179309", "0.6170327", "0.61272293", "0.61218613", "0.6120622", "0.6091066", "0.6089225", "0.60804707", "0.60514474", "0.6041631", "0.603308", "0.6024731", "0.60106677", "0.6010287", "0.5995015", "0.59896404", "0.59743583", "0.5942206", "0.5931917", "0.5902095", "0.5901208", "0.58965135", "0.58947784", "0.58723783", "0.5869318", "0.5857599", "0.58517224", "0.58517224", "0.5831671", "0.5816744", "0.5798624", "0.5796799", "0.5796799", "0.57855916", "0.5781869", "0.57800716", "0.5770936", "0.5732622", "0.57247216", "0.57144874", "0.5703276", "0.5703241", "0.5694699", "0.5693334", "0.56891644", "0.5674074", "0.5668179", "0.56511223", "0.5650371", "0.56427914", "0.5636605", "0.56343555", "0.56281", "0.5619736", "0.5619035", "0.56099916", "0.5608888", "0.56066525", "0.5593136", "0.5587589", "0.55859345", "0.5563707", "0.5557058", "0.5549436", "0.5543403", "0.5538381", "0.5523268", "0.55225646", "0.5513918", "0.55058646", "0.55027", "0.549019", "0.5480109", "0.5476943", "0.54750705", "0.5472019", "0.5460239", "0.54566395", "0.54535156", "0.544151", "0.54390764", "0.5437773", "0.5436805" ]
0.0
-1
Close all the connections used in this service.
public void close() { _taxonomyConnection.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void closeAllConnections() {\n\t\tstop();\n\t}", "public void closeConnections() {\n for (Object i : connections.keySet().toArray()) {\n connections.get(i).closeConnection();\n }\n\n }", "public void shutdown() {\n for (Connection connection : connections) { //Try closing all connections\n closeConnection(connection);\n }\n }", "@Override\r\n @SuppressWarnings(\"empty-statement\")\r\n public void close()\r\n {\r\n curDb_ = null;\r\n curConnection_ = null;\r\n try\r\n {\r\n for(Map.Entry<Db_db, Connection> entry: connections_.entrySet())\r\n {\r\n entry.getValue().close();\r\n }\r\n }catch(Exception e){};\r\n \r\n connections_.clear();\r\n }", "public synchronized void closeAllConnections() {\n closeConnections(availableConnections);\n availableConnections = new Vector();\n closeConnections(busyConnections);\n busyConnections = new Vector();\n }", "public synchronized void closeAllConnections() {\n closeConnections(availableConnections);\n availableConnections = new Vector();\n closeConnections(busyConnections);\n busyConnections = new Vector();\n }", "@PreDestroy\n public void close() {\n connectionManagers.values().forEach(ConnectionManager::close);\n }", "public void close()\n {\n getConnectionManager().shutdown();\n }", "@Override\n public void close() {\n for ( TunnelConnection tunnelConnection : tunnelConnections ) {\n IOUtils.closeAndLogException( tunnelConnection );\n }\n }", "public void closeConnections() {\r\n\t\t\ttry {\r\n\t\t\t\toutStream.close();\r\n\t\t\t\tinStream.close();\r\n\t\t\t\tpeerToPeerSocket.close();\r\n\t\t\t\t//System.out.println(\"Connection closing...\");\r\n\t\t\t}\r\n\t\t\tcatch(Exception e) {\r\n\t\t\t\tSystem.out.println(\"Couldn't close connections...\");\r\n\t\t\t}\r\n\t\t}", "private void closeConnections() {\r\n for (Iterator<Connection> it = connections.values().iterator(); it.hasNext();) {\r\n TransConnection conn = (TransConnection) it.next();\r\n try {\r\n conn.setCloseAllowed(true);\r\n conn.close();\r\n } catch (SQLException ex) {\r\n log.severe(\"Connection close failure: \" + ex.getMessage());\r\n }\r\n }\r\n connections.clear();\r\n }", "@Override\n\t\tpublic void closeAll() {\n\t\t\tfor (ClientHandler clientHandler : new ArrayList<ClientHandler>(this.running)) {\n\t\t\t\tclientHandler.close();\n\t\t\t}\n\t\t}", "public void close() {\n synchronized(this) {\n for(Enumeration e = connections.elements();e.hasMoreElements();) {\n try {\n ((Socket)e.nextElement()).close();\n } catch(InterruptedIOException ex) {\n Thread.currentThread().interrupt();\n } catch(IOException ex) {\n } catch(RuntimeException ex) {\n }\n }\n }\n\n try {\n serverSocket.close();\n } catch(InterruptedIOException ex) {\n Thread.currentThread().interrupt();\n } catch(IOException ex) {\n } catch(RuntimeException ex) {\n }\n }", "public void close() {\n if (mLeakedException != null) {\n getConnectionManager().shutdown();\n mLeakedException = null;\n }\n }", "public void closeAll(){\n\t\t\n\t\tshowMessage(\"\\n Closing all connections...\");\n\t\tableToType(false);\n\t\ttry {\n\t\t\t\n\t\t\tinput.close();\n\t\t\toutput.close();\n\t\t\tconnection.close();\n\t\t\t\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\n public void close() throws Exception {\n for (Connection connection: hbaseConnections)\n connection.close();\n hBaseOperation.close();\n }", "final private void closeAll() throws IOException {\n // This method is final since version 2.2\n\n try {\n // Close the socket\n if (clientSocket != null)\n clientSocket.close();\n\n // Close the output stream\n if (output != null)\n output.close();\n\n // Close the input stream\n if (input != null)\n input.close();\n } finally {\n // Set the streams and the sockets to NULL no matter what\n // Doing so allows, but does not require, any finalizers\n // of these objects to reclaim system resources if and\n // when they are garbage collected.\n output = null;\n input = null;\n clientSocket = null;\n }\n }", "private void terminateAllClientConnections() {\n log.info(\"Terminate command received; Closing sockets..\");\n log.info(\"Attempting closing client sockets..\");\n this.socketList.forEach(socket -> {\n try {\n socket.close();\n } catch (Exception e) {\n log.error(\"Error closing client socket address\", socket.getRemoteSocketAddress().toString());\n }\n });\n log.info(\"Attempting closing server listening socket\");\n try {\n this.serverSocket.close();\n this.running.set(false);\n } catch (Exception e) {\n log.error(\"Error closing server socket port\", port);\n }\n }", "public synchronized void close() {\n\t\t/**\n\t\t * DISCONNECT FROM SERVER\n\t\t */\n\t\tsrvDisconnect();\n\t}", "@Override\n public synchronized void close() {\n mOpenConnections--;\n if (mOpenConnections == 0) {\n super.close();\n }\n }", "@Override\n public synchronized void close() {\n mOpenConnections--;\n if (mOpenConnections == 0) {\n super.close();\n }\n }", "public void close() {\n if (adminPool != null) {\n try {\n adminPool.close();\n } catch (Exception e) {\n log.warn(\"Error while closing LDAP connection pool\", e);\n }\n adminPool = null;\n }\n if (userPool != null) {\n try {\n userPool.close();\n } catch (Exception e) {\n log.warn(\"Error while closing LDAP connection pool\", e);\n }\n userPool = null;\n }\n }", "void closeConnectionsPool();", "public void close() {\n for (final BasicServerMetrics metrics : myServerMetrics.values()) {\n metrics.close();\n }\n myServerMetrics.clear();\n }", "private void closeConnection() {\n\t\t_client.getConnectionManager().shutdown();\n\t}", "public static void closeAllDb() {\r\n\t\tlogger.info(\"Close all database connections\");\r\n\t\tcloseAllMsiDb();\r\n\t\tcloseUdsDb();\r\n\t}", "protected void close() {\n\t\tthis.connection.close();\n\t\tthis.connection = null;\n\t}", "@Override\n public void close() throws Exception {\n\n socketAcceptor.close();\n rmiAcceptor.close();\n connectedViews.clear();\n\n synchronized (threadPool) {\n threadPool.shutdown();\n }\n while (!threadPool.awaitTermination(5, TimeUnit.SECONDS)) {\n logger.warning(\"Thread pool hasn't shut down yet, waiting...\");\n }\n }", "@Override\r\n\tpublic void close() throws IOException {\r\n\t\t List<Connection> connections = new ArrayList<>();\r\n\t\t connections.addAll(busyConnection);\r\n\t\t connections.addAll(freeConnection);\r\n\t\t \r\n\t\t for (Connection connection : connections) {\r\n\t\t\ttry {\r\n\t\t\t\tif(connection.isClosed()== false){\r\n\t\t\t\t\tconnection.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tlogger.error(ErrorMessageDAO.ERROR_SQL_CLOSE + e);\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "private void closeConnections() throws IOException {\n\t\twhile(Server.clients != null && !Server.clients.isEmpty()){\n\t\t\tServerThread client = (Server.clients.removeFirst());\n\t\t\tclient.sendMessage(new Message(Message.CLOSE_CONNECTION));\n\t\t\t//client.close();\n\t\t}\n\t}", "public void closeAll() throws IOException {\r\n\t\ttry {\r\n\t\t\t// Close the socket\r\n\t\t\tif (this.clientSocket != null)\r\n\t\t\t\tthis.clientSocket.close();\r\n\t\t\t// Close the output stream\r\n\t\t\tif (this.out != null)\r\n\t\t\t\tthis.out.close();\r\n\t\t\t// Close the input stream\r\n\t\t\tif (this.in != null)\r\n\t\t\t\tthis.in.close();\r\n\t\t} finally {\r\n\t\t\t// Set the streams and the sockets to NULL no matter what.\r\n\t\t\tthis.in = null;\r\n\t\t\tthis.in = null;\r\n\t\t\tthis.clientSocket = null;\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void closeIdleConnections()\n {\n \n }", "public static void closeAllMsiDb() {\r\n\t\tconnectionByProjectIdMap.forEach((k, v) -> {\r\n\t\t\ttry {\r\n\t\t\t\tif (v != null && !v.isClosed()) {\r\n\t\t\t\t\tlogger.info(\"Close msi_db_project_{} connection\", k);\r\n\t\t\t\t\tv.close();\r\n\t\t\t\t\tv = null;\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tlogger.error(\"Error while trying to close msi_db database connections\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public synchronized void closeAllSocket()\n {\n \ttry {\n \t\toutput.close();\n \t}\n \tcatch(Exception e)\n \t{\n \t\terror(e);\n \t}\t\n }", "public synchronized void closeConnection() throws SQLException {\n\t\tfor(Connection y : a) {\n\t\t\ty.close();\n\t\t}\n\t}", "public void close()\n {\n ServiceLocator.getInstance().shutdown();\n }", "public void close() {\n this.consoleListenerAndSender.shutdownNow();\n this.serverListenerAndConsoleWriter.shutdownNow();\n try {\n this.getter.close();\n this.sender.close();\n this.socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void close() {\n\n\t\tdebug();\n\n\t\tif (isDebug == true) {\n\t\t\tlog.debug(\"=== CLOSE === \");\n\t\t}\n\n\t\ttry {\n\n\t\t\tif (connection != null) {\n\n\t\t\t\tlog.debug(\"Antes Connection Close\");\n\t\t\t\tconnection.close();\n\t\t\t\tlog.debug(\"Pos Connection Close\");\n\t\t\t}\n\n\t\t\tif (m_dbConn != null) {\n\t\t\t\tm_dbConn.close();\n\t\t\t}\n\n\t\t\tif (isDebug == true) {\n\t\t\t\tlog.debug(\"Connection Close\");\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tlog.debug(\"ERRO Connection Close\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tconnection = null;\n\t\tm_dbConn = null;\n\n\t}", "public void closeAll()\n {\n closeAllTopicPublishers();\n closeAllTopicSubscribers();\n closeAllTopicDurableSubscribers();\n }", "@Override\n\tpublic void close() {\n\t\tfor (Communication communication: listCommunication) {\n\t\t\tcommunication.close();\n\t\t}\n\t}", "public void dispose() {\n if (exporterContainer != null) {\n exporterContainer.close();\n exporterContainer = null;\n }\n\n if (applicationContainer != null) {\n applicationContainer.close();\n applicationContainer = null;\n }\n\n if (network != null) {\n network.close();\n network = null;\n }\n\n httpClient = null;\n }", "@Override\n public void close() {\n try {\n if (tunnelSession != null) {\n tunnelSession.close();\n tunnelSession = null;\n }\n if (sshclient != null) {\n sshclient.stop();\n sshclient = null;\n }\n } catch (final Throwable t) {\n throw new RuntimeException(t);\n }\n }", "public static void close() {\n HashMap<String, Transaction> map = instance.getTransactions();\n for (Transaction transaction : map.values()) {\n transaction.destroy();\n }\n map.clear();\n instance.transactions.remove();\n }", "private void closeConnection() {\n try {\n fromClient.close();\n toClient.close();\n client.close();\n } catch (IOException e) {\n System.err.println(\"Unable to close connection:\" + e.getMessage());\n }\n }", "public void closeAllSessions() {\n\n // don't disconnect system user; need it to save database\n Session[] sessions = getAllSessions();\n\n for (int i = 0; i < sessions.length; i++) {\n sessions[i].close();\n }\n\n synchronized(this) {\n sessionMap.clear();\n }\n }", "public void close() {\n if (subscriptionAdminClient != null) {\n try {\n subscriptionAdminClient.close();\n } catch (Exception e) {\n log.error(\"Could not clean up subscription admin client\", e);\n }\n }\n if (adminClient != null) {\n try {\n adminClient.close();\n } catch (Exception e) {\n log.error(\"Could not clean up admin client\", e);\n }\n }\n if (pubsubChannel != null) {\n pubsubChannel.shutdown();\n }\n }", "private void close() {\n\t\ttry {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog(e);\n\t\t} finally {\n\t\t\tisConnected = false;\n\t\t}\n\t}", "public void close() {\n\t\tcloseConnection();\n\t\tcloseStatement();\n\t\tcloseResultSet();\n\t}", "@Override\n\tpublic void deinit() throws Exception{\n\t\tfor (Map.Entry<Integer, ServerConnection> entry : pidToConnMap.entrySet()) {\n\t\t\tConnection conn = entry.getValue();\n\t\t\tconn.close();\n\t\t}\n\t\tsuper.deinit();\n\t}", "private void close()\n {\n try\n {\n if (outputStream != null)\n {\n outputStream.close();\n }\n } catch (Exception e)\n {\n\n }\n try\n {\n if (inputStream != null)\n {\n inputStream.close();\n }\n } catch (Exception e)\n {\n\n }\n try\n {\n if (socket != null)\n {\n socket.close();\n }\n } catch (Exception e)\n {\n\n }\n }", "public void close() {\n\t\tshutdownClient(clientRef.get());\n\t}", "protected void cleanup() {\n try {\n if (_in != null) {\n _in.close();\n _in = null;\n }\n if (_out != null) {\n _out.close();\n _out = null;\n }\n if (_socket != null) {\n _socket.close();\n _socket = null;\n }\n } catch (java.io.IOException e) {\n }\n }", "synchronized void close() {\n\n closeAllSessions();\n sysSession.close();\n sysLobSession.close();\n }", "private void closeEverything() {\n\t \t// free up I/O streams and close the socket connection\n \ttry {\n \tif (in != null)\n \t\tin.close();\n \t} catch (Exception ignored) {}\n \ttry {\n \tif (out != null)\n \t\tout.close();\n \t} catch (Exception ignored) {}\n \ttry {\n \tif (out != null)\n \t\tout.close();\n \t} catch (Exception ignored) {}\n \ttry {\n \tif (in != null)\n \t\tin.close();\n \t} catch (Exception ignored) {}\n \ttry {\n \t\tif (inToRobot != null){\n \t\t\tinToRobot.close();\n \t\t}\n \t} catch (Exception ignored) {}\n \ttry {\n \t\tif (outFromRobot != null){\n \t\t\toutFromRobot.close();\n \t\t}\n \t} catch (Exception ignored) {}\n\t}", "void closeAll();", "private void close()\r\n {\r\n try \r\n {\r\n if(out != null) out.close();\r\n }\r\n catch(Exception e) {\r\n \r\n }\r\n try \r\n {\r\n if(in != null) in.close();\r\n }\r\n\r\n catch(Exception e) {\r\n \r\n };\r\n try \r\n {\r\n if(socket != null) socket.close();\r\n }\r\n catch (Exception e) {\r\n \r\n }\r\n }", "public void closeConnection(){\r\n\t\t_instance.getServerConnection().logout();\r\n\t}", "public void close() {\n connection.close();\n running = false;\n }", "public void close() {\n try {\n socket.close();\n outputStream.close();\n inputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void close_DB() {\n try {\n for (int i=0; i<conns; i++) {\n if (con_pool[i]!=null)\n con_pool[i].close();\n }\n } catch (SQLException ex) {\n Logger.getLogger(DB_Backend.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic void closeAndCleanupAllData() throws Exception {\n\t\tclose();\n\t}", "public void closeConnection() {\n try {\n dis.close();\n dos.close();\n socket.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic final void destroy() {\n\t\tsynchronized (this.connectionMonitor) {\n\t\t\tif (connection != null) {\n\t\t\t\tthis.connection.destroy();\n\t\t\t\tthis.connection = null;\n\t\t\t}\n\t\t}\n\t\treset();\n\t}", "public void clearAllConnections() {\r\n clearAllConnections(false);\r\n }", "@Override\n public void stop() {\n try {\n serverSocket.close();\n }\n catch (IOException e) {\n getExceptionHandler().receivedException(e);\n }\n\n // Close all open connections.\n synchronized (listConnections) {\n for (TcpConnectionHandler tch : listConnections)\n tch.kill();\n listConnections.clear();\n }\n\n // Now close the executor service.\n executorService.shutdown();\n try {\n executorService.awaitTermination(3, TimeUnit.SECONDS);\n }\n catch (InterruptedException e) {\n getExceptionHandler().receivedException(e);\n }\n }", "private void cleanUp() {\n System.out.println(\"ConnectionHandler: ... cleaning up and exiting ...\");\n try {\n br.close();\n is.close();\n conn.close();\n log.close();\n } catch (IOException ioe) {\n System.err.println(\"ConnectionHandler:cleanup: \" + ioe.getMessage());\n }\n }", "public void close()\n {\n synchronized (m_lock)\n {\n // We are closed hence, decouple all threads from the pool\n for (int i = 0; i < m_pool.length; i++)\n {\n if (null != m_pool[i])\n {\n m_pool[i].release();\n \n m_pool[i] = null;\n }\n }\n \n m_closed = true;\n }\n }", "@Override\n public void close() {\n for (PipelineDataSourceWrapper each : cachedDataSources.values()) {\n try {\n each.close();\n } catch (final SQLException ex) {\n log.error(\"An exception occurred while closing the data source\", ex);\n }\n }\n cachedDataSources.clear();\n }", "public void close() {\n\t\ttry {\n\t\t\t_inputStream.close();\n\t\t\t_outputStream.close();\n\t\t\t_socket.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void close() {\n try {\n connect.close();\n } catch (SQLException ex) {\n System.err.println(\"Error while closing db connection\" + ex.toString());\n }\n }", "public synchronized void terminate() throws SQLException{\n\t\tshutdown = true;\n\t\t\n\t\tIterator<Connection> iter = allConnections.iterator();\n\t\t\n\t\twhile ( iter.hasNext() ){\n\t\t\tConnection conn = iter.next();\n\t\t\tconn.close();\n\t\t\tidlePool.remove(conn);\n\t\t\titer.remove();\n\t\t}\n\t}", "final public void closeConnection() throws IOException {\n\n readyToStop = true;\n closeAll();\n }", "@Override\n public void releaseResources() {\n if (cluster != null) {\n cluster.close();\n }\n if (cpds != null) {\n cpds.close();\n }\n }", "public void close() {\n try {\n closeConnection(socket);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public void close() {\n // close socket\n if (socket != null) {\n try {\n socket.close();\n } catch (IOException e) {\n // ignore\n }\n }\n\n socket = null;\n in = null;\n out = null;\n\n // try to stop dispather\n if (dispatcher != null) {\n dispatcher.setStopped(true);\n dispatcher.interrupt();\n }\n\n // notify all blocked thread\n if (requests != null) {\n for (Element element : requests.values()) {\n if (element.lock != null) {\n synchronized (element.lock) {\n element.lock.notify();\n }\n } else {\n // TODO notify persistent search listeners\n }\n }\n requests.clear();\n requests = null;\n }\n\n }", "void close()\n {\n DisconnectInfo disconnectInfo = connection.getDisconnectInfo();\n if (disconnectInfo == null)\n {\n disconnectInfo = connection.setDisconnectInfo(\n new DisconnectInfo(connection, DisconnectType.UNKNOWN, null, null));\n }\n\n // Determine if this connection was closed by a finalizer.\n final boolean closedByFinalizer =\n ((disconnectInfo.getType() == DisconnectType.CLOSED_BY_FINALIZER) &&\n socket.isConnected());\n\n\n // Make sure that the connection reader is no longer running.\n try\n {\n connectionReader.close(false);\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n try\n {\n outputStream.close();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n try\n {\n socket.close();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n if (saslClient != null)\n {\n try\n {\n saslClient.dispose();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n finally\n {\n saslClient = null;\n }\n }\n\n debugDisconnect(host, port, connection, disconnectInfo.getType(),\n disconnectInfo.getMessage(), disconnectInfo.getCause());\n if (closedByFinalizer && debugEnabled(DebugType.LDAP))\n {\n debug(Level.WARNING, DebugType.LDAP,\n \"Connection closed by LDAP SDK finalizer: \" + toString());\n }\n disconnectInfo.notifyDisconnectHandler();\n }", "public void close() {\n // Don't close anything, leave the GeoPackage connection open\n }", "public void closeConnection() {\n try {\n stdIn.close();\n socketIn.close();\n socketOut.close();\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n }", "public void close() {\n\t\ttry {\n\t\t\tif (resultSet != null) {\n\t\t\t\tresultSet.close();\n\t\t\t}\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (connect != null) {\n\t\t\t\tconnect.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "private void closeConnection() {\n\t\t\tSystem.out.println(\"\\nTerminating connection \" + myConID + \"\\n\");\n\t\t\ttry {\n\t\t\t\toutput.close(); // close output stream\n\t\t\t\tinput.close(); // close input stream\n\t\t\t\tconnection.close(); // close socket\n\t\t\t} catch (IOException ioException) {\n\t\t\t\tSystem.out.println(\"Exception occured in closing connection\"\n\t\t\t\t\t\t+ ioException);\n\t\t\t}\n\t\t}", "public void terminate() {\n config.closeConnection();\n }", "private void closeConnection () {\n setConnection (null);\n }", "protected void close() {\n if (conn == null)\n return;\n // Close our prepared statements (if any) \n try {\n ps.close();\n } catch (Throwable f) {\n ExceptionUtils.handleThrowable(f);\n }\n this.ps = null;\n // Close this database connection, and log any errors \n try {\n conn.close();\n } catch (SQLException e) {\n container.getLogger().error(sm.getString(\"jdbcAccessLogValeve.close\"), e);\n } finally {\n this.conn = null;\n }\n}", "public static void clearPool() throws SQLException {\n\t\tfor (Connection c : instance.connectionPool) {\n\t\t\tc.close();\n\t\t}\n\t\tinstance.connectionPool.clear();\n\t}", "public void closeConnection() {\n try {\n socket.close();\n oStream.close();\n } catch (Exception e) { }\n }", "public static void close()\n\t{\n\t\t\n\t\ttry \n\t\t{\t\t\t\n\t\t\t\n\t\t\tif (RESULT_SET != null)\n\t\t\t{\n\t\t\t\tRESULT_SET.close();\n\t\t\t}\n\t\t\t\n\t\t\tSTATEMENT.close();\n\t\t\tCONNECTION.close();\t\t\n\t\t\n\t\t} catch (Exception e)\n\t\t{\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void close() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Chiusura connessione\");\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.CLOSE;\n\t\t\tsend(rp);\n\t\t\tClient.LoggedUser.anagrafica = null;\n\t\t\tois.close();\n\t\t\toos.close();\n\t\t\ts.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Errore close client connection\");\n\t\t}\n\t}", "public void closeConnections() throws MessagingException;", "protected void disconnectFromAllEndpoints() {\n for (Endpoint endpoint : mEstablishedConnections.values()) {\n mConnectionsClient.disconnectFromEndpoint(endpoint.getId());\n }\n mEstablishedConnections.clear();\n }", "public void close() {\n try {\n inputStream.close();\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not close the socket's input stream!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n try {\n outputStream.close();\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not close the socket's output stream!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n try {\n commSocket.close();\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not close the communication socket!\");\n e.printStackTrace();\n System.exit(1);\n }\n }", "@Override\n\tpublic void close() {\n\t\t\n\t\t\t\n\t\t\t\n\t\n\t\tif(flightGear!=null)\n\t\t\ttry {\n\t\t\t\tflightGear.getInputStream().close();\n\t\t\t\tflightGear.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\tif(server!=null)\n\t\t\ttry {\n\t\t\t\tserver.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\tif(telnetConnection!=null)\n\t\t\ttry {\n\t\t\t\ttelnetConnection.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t}", "public void close() {\n\t\ttry {\n\t\t\texecutorService.shutdownNow();\n\t\t\toutput.close();\n\t\t\tinput.close();\n\t\t\tconnection.close();\n\t\t} catch (IOException ioe) {\n\t\t\tMain.LOGGER.log(Level.SEVERE, \"Error closing GameHandler\", ioe);\n\t\t} \n\t}", "@Override\n public void close()\n {\n this.disconnect();\n }", "public void destroyAllResource() {\r\n\t\ttry {\r\n\t\t\tif(outrs != null){\r\n\t\t\t\toutrs.close();\r\n\t\t\t\toutrs=null;\r\n\t\t\t}\r\n\t\t\tif(outstmt != null ){\r\n\t\t\t\toutstmt.close();\r\n\t\t\t\toutstmt=null;\r\n\t\t\t} \r\n\t\t\tif (dbConnection != null){\r\n\t\t\t\tdbConnection.close();\r\n\t\t\t\tdbConnection=null;\r\n\t\t\t} \r\n\t\t}catch (SQLException ex) {\r\n\t\t}\r\n\t}", "public void closeAll() throws IOException {\n\t\tscMessages.close();\n\t\tscFiles.close();\n\t}", "private void closeConnection()\n\t{\n\t\tif(result != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tresult.close();\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t\tif(con != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tcon.close();\n\t\t\t\tcon = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t}", "public void closeConnection() {\n try {\n if (connection != null) {\n connection.close();\n connection = null;\n }\n } catch (Exception e) {\n System.out.print(e.getMessage());\n }\n }", "public void close() {\n if (connection == null) {\n LOGGER.error(\"DB : Uninitialized DB Connection.\");\n return;\n }\n\n try {\n if (connection.isClosed()) {\n LOGGER.warn(\"Connection is already closed.\");\n return;\n }\n connection.close();\n } catch (SQLException e) {\n LOGGER.error(\"Error closing the connection.\", e);\n }\n\n }", "public static void closePool(){\n\t\t\n\t\t// TODO signal to kill all pool.\n\t\t\n\t}", "public void close()\n\t{\n\t\thdbTsDb.closeConnection();\n\t\thdbTsDb = null;\n\t\tif (timeSeriesDAO != null)\n\t\t\ttimeSeriesDAO.close();\n\t}" ]
[ "0.79862034", "0.78810763", "0.7737673", "0.7660676", "0.7650036", "0.7650036", "0.74505603", "0.7431709", "0.7301249", "0.7296764", "0.7247197", "0.71567404", "0.7070721", "0.70169336", "0.70134467", "0.7005576", "0.6963829", "0.693124", "0.6901369", "0.68847287", "0.68847287", "0.68339044", "0.68206257", "0.680412", "0.6783962", "0.6773243", "0.67565155", "0.6708843", "0.6705336", "0.6701844", "0.6696878", "0.6689063", "0.66889435", "0.6658536", "0.66584295", "0.6655378", "0.6650323", "0.664092", "0.663654", "0.661625", "0.65946174", "0.6591679", "0.6566413", "0.65498376", "0.65475225", "0.652967", "0.65157104", "0.6513107", "0.6503461", "0.64998364", "0.6479532", "0.6474604", "0.647135", "0.64621675", "0.6451802", "0.64449024", "0.64350635", "0.6424448", "0.6411184", "0.64110726", "0.64099157", "0.6401168", "0.63970125", "0.63951695", "0.6393189", "0.6393158", "0.6392554", "0.6382335", "0.63704246", "0.6368118", "0.6366502", "0.6362919", "0.6361337", "0.63597983", "0.63585883", "0.63550454", "0.63527787", "0.63455695", "0.6344071", "0.63401127", "0.6327929", "0.63183904", "0.63157713", "0.63139987", "0.63091516", "0.6302924", "0.6299469", "0.6299201", "0.6292871", "0.6287106", "0.6273751", "0.6270271", "0.6269673", "0.62680864", "0.62565935", "0.62508076", "0.6250145", "0.624692", "0.62465835", "0.6239301" ]
0.62706834
91
Writes data, collected for a particular form version, to a stream in a CSV format.
@Override public void export(Writer printWriter,Integer formId, Date fromDate, Date toDate, Integer userId) { // Check to ensure that we have such a form version as identified by the formId. FormDefVersion formDefVersion = dataExportService.getFormDefVersion(formId); if (formDefVersion == null) return; // Parse the xform and generate the model Document xformDoc = XmlUtil.fromString2Doc(formDefVersion.getXform()); List<String> gpsFields = getGPSFields(xformDoc); List<String> multimediaFields = getMultimediaFields(xformDoc); Map<String,List<String>> multiSelFields = getMultSelFields(xformDoc); // Get and write the CSV header. List<String> header = getHeader(xformDoc, multimediaFields, gpsFields, multiSelFields); try { printWriter.write(StringUtils.collectionToCommaDelimitedString(header) + "\n"); } catch (IOException ex) { throw new UnexpectedException(ex); } // Get the data list to export. List<Object[]> data = dataExportService.getFormDataWithAuditing(formId, fromDate, toDate, userId); if (data == null || data.size() == 0) return; // Export the data SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy"); for (Object[] o : data) { Map<String, String> dataLine = new HashMap<String, String>(); // auditing data dataLine.put("ID", o[0].toString()); dataLine.put("CAPTURER", (String)o[1]); dataLine.put("CREATION DATE", df.format((Date)o[2])); // other data String xml = (String)o[3]; NodeList nodes = XmlUtil.fromString2Doc(xml).getDocumentElement().getChildNodes(); for (int index=0, length=nodes.getLength(); index<length; index++) { Node node = nodes.item(index); if (node.getNodeType() != Node.ELEMENT_NODE) continue; String name = node.getNodeName(); String value = node.getTextContent(); if (multimediaFields.contains(name)) // we do not export multimedia field values at the moment. continue; if (gpsFields.contains(node.getNodeName())) { // split it into its various pieces (latitude, longitude and altitude) if (value != null && value.trim().length() > 0) { String[] coordinates = value.split(","); if (coordinates.length >= 3) { dataLine.put(name.toUpperCase()+"_LATITUDE", coordinates[0]); dataLine.put(name.toUpperCase()+"_LONGITUDE", coordinates[1]); dataLine.put(name.toUpperCase()+"_ALTITUDE", coordinates[2]); } } } else if (multiSelFields.keySet().contains(name)) { List<String> options = multiSelFields.get(name); if (options != null) { for (String option : options) { String selected = (value.contains(option)) ? "1" : "0"; dataLine.put(name.toUpperCase()+"_"+option.toUpperCase(), selected); } } } else { dataLine.put(name.toUpperCase(), formatCSV(value)); } } // output in the correct order StringBuilder line = new StringBuilder(); for (String h : header) { String d = dataLine.get(h); if (line.length() > 0) { line.append(","); } line.append(d); } try { printWriter.write(line + "\n"); } catch (IOException ex) { throw new UnexpectedException(ex); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void csv() throws IOException {\n\t\t\n\t\tSystem.out.println(); //spacing\\\n\t\tFileWriter f;\n\t\t\n\t\tif (bundle.getString(\"csvName\").endsWith(\".csv\")) {\n\t\t\tf = new FileWriter(bundle.getString(\"csvName\"));\n\t\t}\n\t\t\n\t\telse {\n\t\t\tf = new FileWriter(bundle.getString(\"csvName\") + \".csv\");\n\t\t}\n\t\t\n\t\tPrintWriter p = new PrintWriter(f);\n\t\tObject[][] input = {revisionsToo, flowOfTime};\n\t\tCSVWork(input, p, f);\n\t\t\n\t\tObject[][] nextInput = {revisions, ratings};\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tnextInput[1] = irrelevants;\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tnextInput[1] = relevants;\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tnextInput[0] = intervals;\n\t\tnextInput[1] = commits;\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tspecialCSV(existsHere, p);\n\t\t\n\t\tp.flush();\n\t\tp.close();\n\t\tf.close();\n\t}", "public void writeToCsv()\r\n {\r\n //listeye urunler eklendiginde cagrılacak (Products.csv)\r\n PrintWriter pWrite = null;\r\n try {\r\n pWrite = new PrintWriter(new File(\"Products.csv\"));\r\n }\r\n catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n StringBuilder sBuilder = new StringBuilder();\r\n for (Product theProduct : allProducts ) {\r\n if (theProduct.getSize() == null && theProduct.getGender()!= null){\r\n sBuilder.append(theProduct.getName() + \";\" + theProduct.getPrice() + \";\"\r\n + theProduct.getGender() + \";\" + theProduct.getTag() + \";\"\r\n + theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n else if(theProduct.getGender() == null && theProduct.getSize() == null){\r\n sBuilder.append( theProduct.getName() + \";\" + theProduct.getPrice() + \";\"\r\n + theProduct.getTag() + \";\"+\r\n theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n else {\r\n sBuilder.append( theProduct.getName() + \";\" + theProduct.getPrice() + \";\" + theProduct.getSize() + \";\"\r\n + (theProduct).getGender() + \";\" + theProduct.getTag() + \";\"\r\n + theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n\r\n }\r\n pWrite.write(sBuilder.toString());\r\n pWrite.flush();\r\n pWrite.close();\r\n }", "@Override\n\tpublic void exportToCSV() {\n\n\t}", "public void exportToCSV();", "public static void writeToCSV() {\n final String CSV_SEPARATOR = \",\";\n final String QUOTE = \"\\\"\";\n if (!Crawler.getKeyWordsHits().isEmpty()) {\n try (BufferedWriter bufferedWriter =\n new BufferedWriter(\n new OutputStreamWriter(\n new FileOutputStream(\"results.csv\", true), StandardCharsets.UTF_8))) {\n\n Crawler.getKeyWordsHits().forEach((keyWord, hitsNumber) -> {\n String oneLine = QUOTE + keyWord + QUOTE +\n CSV_SEPARATOR +\n hitsNumber;\n try {\n bufferedWriter.write(oneLine);\n bufferedWriter.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n String lastLine = QUOTE + Crawler.getUrl() + QUOTE + CSV_SEPARATOR + Crawler.getTotalHits();\n bufferedWriter.write(lastLine);\n bufferedWriter.newLine();\n bufferedWriter.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n Crawler.setKeyWordsHits(new HashMap<>());\n Crawler.setTotalHits(0);\n }", "public void saveAsCsv() {\n\n try(BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(\"saves/data.csv\"))){\n for(Publication book : library){\n StringBuilder stringBuilder = new StringBuilder();\n\n stringBuilder.append(\"\\\"\").append(book.getClass().getSimpleName()).append(\"\\\"\"); // type\n stringBuilder.append(\",\"); // delimiter\n stringBuilder.append(\"\\\"\").append(book.getTitle()).append(\"\\\"\"); // title\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getAuthor().toString()).append(\"\\\"\"); // author\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getPages()).append(\"\\\"\"); // pages\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getIsbn()).append(\"\\\"\"); // isbn\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getReleaseYear()).append(\"\\\"\"); // year\n stringBuilder.append(\"\\n\");\n\n bufferedWriter.write(stringBuilder.toString()); // creates a line of one publication information and puts it to file\n }\n } catch (IOException e){\n System.out.println(\"IOException occurred: \" + e.getMessage());\n }\n }", "public static void writeCSV(Calendar cal) {\n\n try {\n\n BufferedWriter bw = null;\n\n String fileString = \"P5Calendar.csv\";\n String fileLine = \"\";\n\n FileWriter fw = new FileWriter(fileString, false);\n bw = new BufferedWriter(fw);\n\n ArrayList<Activity> activities = cal.getActivities();\n\n for (int j = 0; j < 1; j++) {\n bw.write(\"Year\" + \",\" + \"Month\" + \",\" + \"Activity\" + \",\" + \"Role\" + \"\\n\");\n }\n\n for (int i = 0; i < activities.size(); i++) {\n Activity activity = activities.get(i);\n bw.append(activity.Year + \",\" + activity.Month + \",\" + activity.Name + \",\" + activity.Roles);\n }\n\n bw.close();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n\n }", "public void openCSVStream() {\n\t\ttry {\n\t\t\twriter = new CSVWriter(new FileWriter(getCSVFolder() + File.separator + getFileName() + \".csv\"), ',');\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void createCSV() {\n\t\t// Need to integrate CSV calling logic\n\t}", "public void write()\n {\n getCsvParser().parse(getReader());\n }", "void serializeContents(OutputStream stream, TargetType o) throws IOException {\n val writeVersion = this.versions[getWriteVersion()];\n stream.write(writeVersion.getVersion());\n stream.write(writeVersion.getRevisions().size());\n\n // Write each Revision for this Version, in turn.\n for (val r : writeVersion.getRevisions()) {\n stream.write(r.getRevision());\n try (val revisionOutput = RevisionDataOutputStream.wrap(stream)) {\n r.getWriter().accept(o, revisionOutput);\n }\n }\n }", "public void writeDataToCsv(String filename , ArrayList<TestDataInstance> inputData) {\n \n String header = \"\";\n \n File outFile = null;\n int dataCount = 0;\n try {\n outFile = new File(filename);\n \n FileWriter fw = new FileWriter(outFile);\n \n BufferedWriter bw = new BufferedWriter(fw);\n \n bw.write(header);\n \n for(TestDataInstance data : inputData) {\n bw.newLine();\n bw.write(data.toSamiamCsvString());\n dataCount++;\n }\n \n System.out.println(\"Written \" + dataCount + \" rows of data to SAMIAM CSV format @ \" + filename);\n \n } catch(Exception e) {\n e.printStackTrace();\n }\n \n }", "public static void writeNewCSV(Calendar cal) {\n\n try {\n\n BufferedWriter bw = null;\n\n String fileString = \"P5Calendar.csv\";\n String fileLine = \"\";\n\n FileWriter fw = new FileWriter(fileString, true);\n bw = new BufferedWriter(fw);\n\n ArrayList<Activity> activities = cal.getActivities();\n\n int lastElement = activities.size();\n Activity activity = activities.get(lastElement - 1);\n bw.write(activity.Year + \",\" + activity.Month + \",\" + activity.Name + \",\" + activity.Roles.name + \" \" + \"(\"\n + activity.Roles.subRole + \")\" + \"\\n\");\n\n bw.close();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n }", "private Result outputCsv(Request request, Entry entry) throws Exception {\r\n Result result = getCsvResult(request, entry);\r\n result.setReturnFilename(\r\n IOUtil.stripExtension(getStorageManager().getFileTail(entry))\r\n + \".csv\");\r\n result.setMimeType(\"text/csv\");\r\n\r\n return result;\r\n }", "public void outputToCSV() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"test_data.csv\", \"UTF-8\");\n\n //For every object in array list, print surname, initials and extension, separated by commmas\n for (int i=0; i<toArrayList().size(); i++) {\n writer.println(toArrayList().get(i).getSurname() + \",\" + toArrayList().get(i).getInitials() + \",\" +\n toArrayList().get(i).getExtension());\n }\n writer.close();\n }", "private void writeCSVToFile(List<String[]> dataRows, String filepath) {\n try {\n FileWriter output = new FileWriter(filepath);\n CSVWriter csvWriter = new CSVWriter(output);\n\n csvWriter.writeAll(dataRows);\n\n csvWriter.close();\n\n System.out.println(\"Your order has been succesfully sent to Foodora\");\n\n } catch (IOException e) {\n System.out.println(\"Could not write to Foodora output file\");\n }\n\n }", "public void writeCSVtable(String outBuffer) throws IOException\n {\n String csvFile;\n // Create a file chooser\n File currentDir = new File(\"\").getAbsoluteFile();\n final JFileChooser fc = new JFileChooser(currentDir);\n // In response to a button click:\n int returnVal = fc.showSaveDialog(null);\n // open file\n File file = fc.getSelectedFile();\n // obtain filename\n csvFile = file.getName();\n\n // open the file\n fWriter = new FileWriter(csvFile); \n // write ALL the to the file in 1 burst\n fWriter.write(outBuffer); \n // close the file\n fWriter.close();\n }", "public void exportCsv() throws IOException\n {\n File csvOutputFile = new File(\"datas.csv\");\n try (PrintWriter writer = new PrintWriter(csvOutputFile)) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Temps\");\n sb.append(\",\");\n for (String title : this.getModelLabels())\n {\n sb.append(title);\n sb.append(\",\");\n }\n sb.append(\"\\n\");\n for (int i = 0; i < this.getEtatPopulation().size(); i++)\n {\n sb.append(i);\n sb.append(\",\");\n for (double value : this.getEtatPopulation().get(i))\n {\n sb.append(value);\n sb.append(\",\");\n }\n sb.append(\"\\n\");\n }\n writer.write(sb.toString());\n System.out.println(\"Datas Successfully Exported !\");\n }\n catch (Exception e)\n {\n System.out.println(e.getMessage());\n }\n\n }", "@Override\n protected void getSummaryCSV() throws IOException {\n if (!\"\".equals(config.statsfile.trim()))\n ((IVoltDBConnection)connection).writeSummaryCSV(fullStatsContext.fetch().getStats(), config.statsfile);\n }", "private static void memberExport(String club, HttpServletResponse resp, PrintWriter out, HttpServletRequest req, Connection con) {\r\n\r\n \r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n \r\n //\r\n // First, verify club name and key as a security measure (all new clubs must be added here!)\r\n //\r\n if (!club.equals(\"interlachen\") || !req.getParameter(\"key\").equals(\"asdf\")) {\r\n \r\n Utilities.logError(\"dataLoader.memberExport - Unknown Club or Key: Club = \" +club+ \", key = \" +req.getParameter(\"key\")+ \", todo = memberExport\");\r\n out.print(\"Error: Improper request. Invalid club or key.\");\r\n return;\r\n }\r\n \r\n resp.setContentType(\"text/csv\"); // text-csv file\r\n resp.setHeader(\"Content-Disposition\", \"attachment;filename=\\\"\"+club+\"-login-counts.csv\\\"\"); \r\n \r\n StringBuffer sb = new StringBuffer(\"\"); // Use a stringbuffer to hold the records\r\n \r\n //\r\n // Add header row\r\n //\r\n sb.append(\"\\\"ForeTees Id\\\",\");\r\n sb.append(\"\\\"Member #\\\",\");\r\n sb.append(\"\\\"Membership\\\",\");\r\n sb.append(\"\\\"Member Type\\\",\");\r\n sb.append(\"\\\"Total Logins\\\",\");\r\n sb.append(\"\\\"Mobile Logins\\\",\");\r\n sb.append(\"\\\"App Logins\\\"\\n\");\r\n \r\n try {\r\n\r\n //\r\n // Get member info and output as table rows\r\n //\r\n if (con != null) {\r\n \r\n stmt = con.createStatement(); \r\n \r\n String sql = \"\" +\r\n \"SELECT id, username, count, m_ship, m_type, mobile_count, mobile_app_count \" +\r\n \"FROM member2b \" +\r\n \"WHERE inact=0 AND billable = 1\";\r\n \r\n rs = stmt.executeQuery(sql);\r\n \r\n while (rs.next()) {\r\n\r\n sb.append(\"\\\"\" + rs.getInt(\"id\") + \"\\\",\");\r\n sb.append(\"\\\"\" + rs.getString(\"username\") + \"\\\",\");\r\n sb.append(\"\\\"\" + rs.getString(\"m_ship\") + \"\\\",\");\r\n sb.append(\"\\\"\" + rs.getString(\"m_type\") + \"\\\",\");\r\n sb.append(\"\\\"\" + rs.getInt(\"count\") + \"\\\",\");\r\n sb.append(\"\\\"\" + rs.getInt(\"mobile_count\") + \"\\\",\");\r\n sb.append(\"\\\"\" + rs.getInt(\"mobile_app_count\") + \"\\\"\\n\");\r\n }\r\n \r\n stmt.close();\r\n }\r\n \r\n out.print(sb.toString()); // output the file\r\n \r\n } catch (Exception e) {\r\n\r\n Utilities.logError(\"Error in dataLoader.memberExport for club: \" + club + \". Exception= \" + org.apache.commons.lang.exception.ExceptionUtils.getStackTrace(e));\r\n out.print(\"Error: Database error gathering member data.\");\r\n\r\n } finally {\r\n\r\n try { rs.close(); }\r\n catch (Exception ignore) {}\r\n\r\n try { stmt.close(); }\r\n catch (Exception ignore) {}\r\n }\r\n\r\n }", "public ValidationInfo createCsv() {\n LocaleModule lm = LocaleManager.getInstance().getModule(LocaleModuleResource.Main);\n\n ValidationInfo vi = new ValidationInfo();\n if (_rows == null || _rows.size() == 0) {\n vi.setMessageWarning(lm.getString(\"general_export_nothing\"));\n return vi;\n }\n\n String fullFilePath = getFileName();\n\n StringBuilder sb = new StringBuilder();\n\n //create header\n String headerRow = _rows.get(0).createCsvRow(true);\n\n sb.append(headerRow + System.lineSeparator());\n\n try {\n //create rows\n for (Exportable e : _rows) {\n String rowString = e.createCsvRow(false);\n sb.append(rowString + System.lineSeparator());\n }\n\n //Output\n String strContent = sb.toString();\n Utils.writeFile(strContent, fullFilePath);\n\n vi.setMessageSuccess(String.format(lm.getString(\"general_export_success\"),\n _rows.size(), fullFilePath));\n } catch (Exception ex) {\n vi.setMessageError(lm.getString(\"general_export_error\"));\n }\n\n //open\n Utils.openFolder(fullFilePath);\n\n return vi;\n }", "private void writeCsv(float[] vals, String stimulus, PrintWriter outfile) throws FileNotFoundException {\n for (int i = 0; i < vals.length; i++) {\n outfile.append(vals[i] + \",\");\n }\n outfile.append(stimulus);\n outfile.append(\"\\n\");\n\n }", "public void exportShowingsToCsv() {\n filmEdit.exportShowingsToCsv();\n }", "private void miSalvareActionPerformed(java.awt.event.ActionEvent evt) { \n if (!model.isEmpty()) {\n int response = JOptionPane.showConfirmDialog(this, \"Doriti sa salvati lista de contacte?\", \"Salvare\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (response == JOptionPane.YES_OPTION) {\n try {\n JFileChooser chooser = new JFileChooser();\n chooser.showSaveDialog(this);\n File list = new File(chooser.getSelectedFile().getAbsolutePath() + \".csv\");\n PrintWriter writer = new PrintWriter(list);\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"Nume\");\n sb.append(\",\");\n sb.append(\"Prenume\");\n sb.append(\",\");\n sb.append(\"Data nasterii\");\n sb.append(\",\");\n sb.append(\"Numar Telefon\");\n sb.append(\",\");\n sb.append(\"\\r\\n\");\n\n listaContacte.stream().map((c) -> {\n sb.append(c.getNume());\n return c;\n }).map((c) -> {\n sb.append(\",\");\n sb.append(c.getPrenume());\n return c;\n }).map((c) -> {\n sb.append(\",\");\n String dataNasterii[] = c.getDataNasterii().toString().split(\"-\");\n String a = dataNasterii[0];\n String l = dataNasterii[1];\n String z = dataNasterii[2];\n String dt = z + \".\" + l + \".\" + a;\n sb.append(dt);\n sb.append(\",\");\n sb.append(c.getNrTel().toString());\n return c;\n }).forEachOrdered((_item) -> {\n sb.append(\"\\r\\n\");\n });\n\n writer.write(sb.toString());\n writer.close();\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MainForm.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n }", "public void closeCSVStream() {\n\t\ttry {\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void PrintToCsv() throws Exception {\n\t\tBufferedWriter bw1 = new BufferedWriter(new FileWriter(\"./data/output1.csv\"));\n\t\tBufferedWriter bw2 = new BufferedWriter(new FileWriter(\"./data/output2.csv\"));\n\t\tBufferedWriter bw3 = new BufferedWriter(new FileWriter(\"./data/output3.csv\"));\n\t\tBufferedWriter bw4 = new BufferedWriter(new FileWriter(\"./data/output4.csv\"));\n\t\t\n\t\t//print the name of attributes in Table\n\t\tPrint_attribute(bw1,bw2,bw3,bw4);\n\t\tIterator<String> iter = BugDBConnection.Domain.keySet().iterator();\n\t\ttry{\n\t\t\twhile(iter.hasNext()){\n\t\t\t\tString key = iter.next();\n\t\t\t\tdomain = key.split(\"-\")[0];\n\t\t\t\tproject = key.split(\"-\")[1];\n\n\t\t\t\tFieldSet fieldset = BugDBConnection.Domain.get(key);\n\t\t\t\tPrintQ1(bw1,fieldset.field);\n\t\t\t\tPrintQ2(bw2, fieldset.refield);\n\t\t\t\tPrintQ3(bw3, fieldset.f1, fieldset.f2, fieldset.f3, fieldset.f4);\n\t\t\t\tPrintQ4(bw4, fieldset.avg, fieldset.min, fieldset.max);\n\t\t\t\t\n\t\t\t}\n\t\t\tbw1.close();\n\t\t\tbw2.close();\n\t\t\tbw3.close();\n\t\t\tbw4.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void writeCSV(Collection<? extends CSVable> src, File to) throws IOException {\r\n\t\tfinal String SYSTEM_LINE_END = System.getProperty(\"line.separator\");\r\n\t\t\r\n\t\tFileWriter fw = null;\r\n\t\tBufferedWriter bw = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Create the file if it doesn't exist yet\r\n\t\t\tif ( ! to.exists() ) {\r\n\t\t\t\tto.createNewFile();\r\n\t\t\t}\r\n\r\n\t\t\tfw = new FileWriter(to.getAbsoluteFile(), false);\r\n\t\t\tbw = new BufferedWriter(fw);\r\n\r\n\t\t\tsynchronized (src) {\r\n\t\t\t\tfor ( CSVable obj : src ) {\r\n\t\t\t\t\tbw.write(obj.toCSVRow() + SYSTEM_LINE_END);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (bw != null) {\r\n\t\t\t\t\tbw.close();\r\n\t\t\t\t}\r\n\t\t\t\tif (fw != null) {\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (IOException e) {\r\n\t\t\t\tSystem.err.println(\"I'm having really bad luck today - I couldn't even close the CSV file!\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void writeResultsIntoFile(Constituency constituency, CSVPrinter csvp){\n\n try{\n for (Candidate c:constituency.candidates){\n List candidateData = new ArrayList();\n candidateData.add(c.constituency);\n candidateData.add(c.name);\n candidateData.add(c.sex);\n candidateData.add(c.age);\n candidateData.add(c.category);\n candidateData.add(c.party);\n candidateData.add(c.general);\n candidateData.add(c.postal);\n candidateData.add(c.total);\n csvp.printRecord(candidateData);\n }\n }catch (IOException e){\n System.out.println(e);\n }\n }", "public void dataFileCreate() {\r\n\t\tString COMMA_DELIMITER = \",\";\r\n\t\tString NEW_LINE_SEPERATOR = \"\\n\";\r\n\t\tString FILE_HEADER = \"Title,First Name,Last Name,Email,Phone Number\";\r\n\t\ttry {\r\n\t\t\tList<Customer> dataList = new ArrayList<Customer>();\r\n\t\t\tdataList.add(\r\n\t\t\t\t\tnew Customer(title, customerFirstName, customerLastName, custromerEmailId, customerPhoneNumber));\r\n\r\n\t\t\tFileWriter fileWriter = new FileWriter(\"CustomerDetails.csv\");\r\n\t\t\tBufferedWriter bufferWriter = new BufferedWriter(fileWriter);\r\n\t\t\tbufferWriter.append(FILE_HEADER);\r\n\r\n\t\t\tfor (Customer c : dataList) {\r\n\t\t\t\tbufferWriter.write(NEW_LINE_SEPERATOR);\r\n\t\t\t\tbufferWriter.write(c.getTitle());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getFirstName());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getLastName());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getEmailAddress());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(String.valueOf(c.getPhone()));\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t}\r\n\r\n\t\t\tbufferWriter.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public static void writeIntoCSVFromTable() {\n try {\n backItUp(ROOT);\n backItUp(ROOT + Calendar.getInstance().getTime() + \"/\");\n } catch (Throwable e) {\n itsLogger.error(e.getMessage(), e);\n }\n\n }", "public static void queryAndDataToCSV() throws IOException {\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(\"Graph\"+x+\".csv\"));\r\n\t\tArrayList<ArrayList<String>> dataset =ReadInDataset.finalDataset;\r\n\t\tfor (int i=0; i< dataset.size(); i++) {\r\n\t\t\tString entry= dataset.get(i).get(1)+\",\"+ dataset.get(i).get(2);\r\n\t\t\tif (i< Queries.NumberOfQueries) {\r\n\t\t\t\tfor (int x=0; x<(Queries.NumberOfDimensions/2)-1;x++) {\r\n\t\t\t\tentry = entry+\",\"+query.get(i).get(x).get(0) +\",\" +query.get(i).get(x).get(1);\r\n\t\t\t\tentry = entry+\",\"+query.get(i).get(x+1).get(0) +\",\" +query.get(i).get(x+1).get(1);\r\n\t\t\t\t\r\n\t\t\t}}\r\n\t\t\twriter.write(entry);\r\n\t\t\twriter.newLine();\r\n\t\t}\r\n\t\twriter.close();\r\n\t}", "public void writeToStream(DataOutputStream ostream) throws IOException{\r\n Iterator fieldIterator = headerFields.entrySet().iterator();\r\n while (fieldIterator.hasNext()){\r\n Map.Entry entry = (Map.Entry)fieldIterator.next();\r\n ostream.write((entry.getKey() + \": \" + entry.getValue() + \"\\r\\n\").getBytes());\r\n }\r\n ostream.write(\"\\r\\n\".getBytes());\r\n if(messageBody != null)\r\n ostream.write(messageBody);\r\n ostream.flush();\r\n }", "CSV createCSV();", "private static void writeRecords(Collection<Record> values)\n throws IOException {\n for (Record record : values) {\n writer2.writeRecord(record.makeup());\n // over write, update writer\n // System.out.println(lineNum);\n if (++lineNum > Merge.lineNumbers.get(fileNum)) {\n writer2.flush();\n writer2.close();\n\n fileNum++;\n lineNum = 0;\n writer2 = new CsvWriter(new OutputStreamWriter(\n new FileOutputStream(SORT_USER_FN + fileNum + \".csv\"),\n \"UTF-8\"), ',');\n }\n }\n\n }", "public static void writeDataToCsvUsingStringArrayForActivity(PrintWriter writer, List<ActivityTabDTO> activityTabList, List<AssayTabDTO> assayTabDTOList, List<ReferenceTabDTO> referenceTabDTOList, List<StructureDetailsTabDTO> structureDetailsTabDTOList) {\n\n String[] CSV_ACTIVITY_TITLE = {\"Activity Details\"};\n String[] CSV_ACTIVITY_NEWLINE = {\"\"};\n\n String[] CSV_ACTIVITY_HEADER = {\"ACT_ID\", \"ASSAY_ID\", \"REF_ID\", \"GVK_ID\", \"ACTIVITY_TYPE\", \"STD_ACTIVITY_TYPE\", \"ACTIVITY_UOM\", \"STANDARD_UOM\", \"ACTIVITY_PREFIX\", \"STD_ACT_PREFIX\", \"ACTIVITY_VALUE\", \"SD\", \"ACTIVITY_REMARKS\", \"MICRO_MOLARVALUE\", \"ASSAY_TYPE\", \"ENZYME_CELL_ASSAY\", \"COMMON_NAME\", \"ACTIVITY_MECHANISM\", \"SOURCE\", \"CELLS_CELLLINE_ORGAN\", \"MEASURED\", \"ROA\", \"ASSAY_METHOD_NAME\", \"DOSE\", \"DOSE_UOM\", \"DOSE_PREFIX\", \"ACTIVITY\", \"PARAMETER\", \"REFERENCE\"};\n\n try (\n CSVWriter csvWriter = new CSVWriter(writer,\n CSVWriter.DEFAULT_SEPARATOR,\n CSVWriter.DEFAULT_ESCAPE_CHARACTER,\n CSVWriter.DEFAULT_LINE_END);\n ) {\n csvWriter.writeNext(CSV_ACTIVITY_TITLE);\n csvWriter.writeNext(CSV_ACTIVITY_HEADER);\n if (Objects.nonNull(activityTabList)) {\n for (ActivityTabDTO activityTabDataReturn : activityTabList) {\n for (AssayTabDTO assayTabDTO : assayTabDTOList) {\n for (ReferenceTabDTO referenceTabDTO : referenceTabDTOList) {\n for (StructureDetailsTabDTO reStructureDetailsTabDTO : structureDetailsTabDTOList) {\n String[] activityData = new String[]{\n activityTabDataReturn.getActId() + \"\",\n assayTabDTO.getAssayId() + \"\",\n referenceTabDTO.getRefId() + \"\",\n reStructureDetailsTabDTO.getGvkId() + \"\",\n activityTabDataReturn.getActivityType(),\n activityTabDataReturn.getStdActivityType() + \"\",\n activityTabDataReturn.getActivityUom() + \"\",\n activityTabDataReturn.getStandardUom() + \"\",\n activityTabDataReturn.getActivityPrefix() + \"\",\n activityTabDataReturn.getStdActPrefix() + \"\",\n activityTabDataReturn.getActivityValue() + \"\",\n activityTabDataReturn.getSd() + \"\",\n activityTabDataReturn.getActivityRemarks() + \"\",\n activityTabDataReturn.getMicroMolarvalue() + \"\",\n activityTabDataReturn.getAssayType() + \"\",\n activityTabDataReturn.getEnzymeCellAssay() + \"\",\n activityTabDataReturn.getCommonName() + \"\",\n activityTabDataReturn.getActivityMechanism() + \"\",\n activityTabDataReturn.getSource() + \"\",\n activityTabDataReturn.getCellsCelllineOrgan() + \"\",\n activityTabDataReturn.getMeasured() + \"\",\n activityTabDataReturn.getRoa() + \"\",\n activityTabDataReturn.getAssayMethodName() + \"\",\n activityTabDataReturn.getDose() + \"\",\n activityTabDataReturn.getDoseUom() + \"\",\n activityTabDataReturn.getDosePrefix() + \"\",\n activityTabDataReturn.getActivity() + \"\",\n activityTabDataReturn.getParameter() + \"\",\n activityTabDataReturn.getReference() + \"\",\n\n };\n\n csvWriter.writeNext(activityData);\n }\n }\n }\n }\n csvWriter.writeNext(CSV_ACTIVITY_NEWLINE);\n csvWriter.writeNext(CSV_ACTIVITY_NEWLINE);\n }\n\n\n } catch (Exception e) {\n System.out.println(\"Exception occured into the ActivityTab Data Export\" + e.getMessage());\n e.printStackTrace();\n }\n\n }", "public interface ICsvListWriter extends ICsvWriter {\n\t\n\t/**\n\t * Writes a List of Objects as columns of a CSV file. <tt>toString()</tt> will be called on each element prior to\n\t * writing.\n\t * \n\t * @param columns\n\t * the columns to write\n\t * @throws IllegalArgumentException\n\t * if columns.size == 0\n\t * @throws IOException\n\t * If an I/O error occurs\n\t * @throws NullPointerException\n\t * if columns is null\n\t * @throws SuperCsvException\n\t * if there was a general exception while writing\n\t * @since 1.0\n\t */\n\tvoid write(List<?> columns) throws IOException;\n\t\n\t/**\n\t * Writes a List of Objects as columns of a CSV file, performing any necessary processing beforehand.\n\t * <tt>toString()</tt> will be called on each (processed) element prior to writing.\n\t * \n\t * @param columns\n\t * the columns to write\n\t * @param processors\n\t * an array of CellProcessors used to further process data before it is written (each element in the\n\t * processors array corresponds with a CSV column - the number of processors should match the number of\n\t * columns). A <tt>null</tt> entry indicates no further processing is required (the value returned by\n\t * toString() will be written as the column value).\n\t * @throws IllegalArgumentException\n\t * if columns.size == 0\n\t * @throws IOException\n\t * If an I/O error occurs\n\t * @throws NullPointerException\n\t * if columns or processors is null\n\t * @throws SuperCsvConstraintViolationException\n\t * if a CellProcessor constraint failed\n\t * @throws SuperCsvException\n\t * if there was a general exception while writing/processing\n\t * @since 1.0\n\t */\n\tvoid write(List<?> columns, CellProcessor[] processors) throws IOException;\n\t\n\t/**\n\t * Writes a array of Objects as columns of a CSV file. <tt>toString()</tt> will be called on each element prior to\n\t * writing.\n\t * \n\t * @param columns\n\t * the columns to write\n\t * @throws IllegalArgumentException\n\t * if columns.length == 0\n\t * @throws IOException\n\t * If an I/O error occurs\n\t * @throws NullPointerException\n\t * if columns is null\n\t * @throws SuperCsvException\n\t * if there was a general exception while writing\n\t * @since 1.0\n\t */\n\tvoid write(Object... columns) throws IOException;\n\t\n\t/**\n\t * Writes an array of strings as columns of a CSV file.\n\t * \n\t * @param columns\n\t * the columns to write\n\t * @throws IllegalArgumentException\n\t * if columns.length == 0\n\t * @throws IOException\n\t * If an I/O error occurs\n\t * @throws NullPointerException\n\t * if columns is null\n\t * @throws SuperCsvException\n\t * if there was a general exception while writing\n\t * @since 1.0\n\t */\n\tvoid write(String... columns) throws IOException;\n\t\n}", "public void save() {\n CSVWriter csvWriter = new CSVWriter();\n csvWriter.writeToTalks(\"phase1/src/Resources/Talks.csv\", this.getTalkManager()); //Not implemented yet\n }", "private void writePzIntoCsv(double[] vals, PrintWriter outfile) {\n for (int i = 0; i < vals.length; i++) {\n outfile.append(vals[i] + \",\");\n }\n //outfile.append(stimulus);\n outfile.append(\"\\n\");\n }", "@Override\n\tpublic void createCSVOutput() {\n\t\tFile file = new File(\"rejectedByEsteticalRestructurationRejector.csv\"); \n\t\t\n\t\t//test if the file already exist\n\t\tif(file.exists()) {\n\t\t\tSystem.out.println(\"le fichier rejectedByEstheticalRestructurationRejector.csv existe deja\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\t//create the different column for the CSV file\n\t\tString[] titles = { \"before\" , \"after\", \"id\"};\n\t\ttry {\n\t\t\toutputFile = new CsvFileWriter(file, '\\t', titles);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "private void exportFiles()\n\t{\n\t\tloading.setVisibility(View.VISIBLE);\n\t\t\n\t\t// Report String\n\t\t//----------------\n\t\tString reportString = \"Date,Location Latitude, Location Longitude,Vehicle,Description\\n\";\t\n\t\t\n\t\tStringBuilder reportBuilder = new StringBuilder();\n\t\treportBuilder.append(reportString);\n\t\t\n\t\tString objectString = \"\"+ \n\t\t\t\tincident.getDate()+\",\" +\n\t\t\t\tincident.getLatitude() + \",\" +\n\t\t\t\tincident.getLongitude()+\",\" +\n\t\t\t\tincident.getVehicleReg()+\",\" +\n\t\t\t\tincident.getDescription()+\",\" + \"\\n\";\n\t\t\n\t\treportBuilder.append(objectString);\n\t\t\n\t\t// Witnesses String\n\t\t//----------------\n\t\tString witnessString = \"witnessName,witnessEmail,witnessNumber,witnessStatement\\n\";\n\t\t\n\t\tStringBuilder witnessesBuilder = new StringBuilder();\n\t\twitnessesBuilder.append(witnessString);\n\t\t\n\t\tfor(int i=0; i<incident.getWitnesses().size(); i++)\n\t\t{\n\t\t\tobjectString = \"\"+ \n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessName\")+\",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessEmail\") + \",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessNumber\")+\",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessStatement\")+\",\" + \"\\n\";\n\t\t\t\n\t\t\twitnessesBuilder.append(objectString);\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Create file\n\t\t//===========================================\n\t\t// Incident Report\n\t\t//-------------------------------------------------\n\t\tfinal File reportFile = new File(getFilesDir() + \"/\" + \"incident_report.csv\");\n\t\treportFile.setReadable(true,false);\n\t\t\n\t\tif( reportFile != null )\n\t\t{\n\t\t try \n\t\t {\n\t\t \tFileOutputStream fOut = openFileOutput(\"incident_report.csv\", Context.MODE_WORLD_READABLE);\n\t\t \tOutputStreamWriter osw = new OutputStreamWriter(fOut); \n\t\t \tosw.write(reportBuilder.toString());\n\t\t\t\tosw.flush();\n\t\t\t\tosw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Witnesses file\n\t\t//-------------------------------------------------\n\t\tfinal File witnessesFile = new File(getFilesDir() + \"/\" + \"witnesses.csv\");\n\t\twitnessesFile.setReadable(true,false);\n\t\t\n\t\tif( witnessesFile != null )\n\t\t{\n\t\t try \n\t\t {\n\t\t \tFileOutputStream fOut = openFileOutput(\"witnesses.csv\", Context.MODE_WORLD_READABLE);\n\t\t \tOutputStreamWriter osw = new OutputStreamWriter(fOut); \n\t\t \tosw.write(witnessesBuilder.toString());\n\t\t\t\tosw.flush();\n\t\t\t\tosw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Media files\n\t\t//-------------------------------------------------\t\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"DCIncident\");\n\t\tquery.getInBackground(incident.getId(),new GetCallback<ParseObject>() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic void done(final ParseObject parseIncident, ParseException e) \n\t\t\t{\n\t\t\t\tif(e == null)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t// Get number of photos attached\n\t\t\t\t\tParseQuery<ParseObject> queryPhotos = parseIncident.getRelation(\"incidentPhotos\").getQuery();\n\t\t\t\t\tqueryPhotos.findInBackground(new FindCallback<ParseObject>()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void done(List<ParseObject> parsePhotos, ParseException e) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tArrayList<byte[]> bytes = new ArrayList<byte[]>();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int i=0; i<parsePhotos.size(); i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Get photo from the parse\n\t\t\t\t\t\t\t\tParseFile photo = (ParseFile) parsePhotos.get(i).get(\"photoFile\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tbytes.add(photo.getData());\n\t\t\t\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tphotoFiles = AssetsUtilities.saveIncidentPhoto(ReviewReportActivity.this, bytes);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Video\n\t\t\t\t\t\t\tParseFile parseVideo = (ParseFile) parseIncident.get(\"incidentVideo\");\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(parseVideo != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tparseVideo.getDataInBackground(new GetDataCallback()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void done(byte[] data, ParseException e) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(e == null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// Save file\n\t\t\t\t\t\t\t\t\t\t\tvideoFile = AssetsUtilities.saveIncidentVideo(ReviewReportActivity.this,data);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfinishSendingEmail(reportFile, witnessesFile);\n\t\t\t\t\t\t\t\t\t\t}\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\telse\n\t\t\t\t\t\t\t\tfinishSendingEmail(reportFile, witnessesFile);\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}", "private void writeToCsvForShinyDash(List<AnnotatedItem> allLineItems) throws IOException {\n String outName = CrossPlatformUtils.getRootPathIncludingTrailingSlash().orElseThrow() + \"out/extracted.csv\";\n try (PrintWriter writer = new PrintWriter(outName, StandardCharsets.UTF_8)) {\n writer.println(String.join(CSV_DELIMITER, \"date\", \"value\", \"lineItemType\", \"comment\", \"isExpense\"));\n allLineItems\n .forEach(ai -> {\n final List<String> row = ImmutableList.of(\n SIMPLE_DATE_FORMAT.format(ai.getDate()),\n ai.getValue().toString(),\n ai.getLineItemType().getFullName(),\n ai.getComment(),\n Boolean.toString(ai.getLineItemType().isExpense())\n );\n writer.println(String.join(CSV_DELIMITER, row));\n });\n }\n }", "public void ExportCSV(Event event) {\n\t\t\ttry {\n\t\t\t\tcsvWriter = new FileWriter(\"Test.csv\",true);\n\t \t csvWriter.append(event.getEvent_name());\n\t \t csvWriter.append(\",\");\n\t\t csvWriter.append(event.getEvent_date());\n\t\t csvWriter.append(\",\");\n\t\t csvWriter.append(\"N/A\");\n\t\t csvWriter.append(\",\");\n\t\t csvWriter.append(event.getEvent_StartTime());\n\t\t csvWriter.append(\",\");\n\t\t csvWriter.append(event.getEvent_EndTime());\n\t\t csvWriter.append(\",\");\n\t\t csvWriter.append(event.getEvent_description());\n\t\t csvWriter.append(\",\");\n\t\t csvWriter.append(\"N/A\");\n\t\t csvWriter.append(\"\\n\");\n\t\t csvWriter.flush();\n\t\t csvWriter.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n }", "public static void writeDataToCsvUsingStringArrayForAssay(PrintWriter writer, List<AssayTabDTO> assayTabList, List<ReferenceTabDTO> referenceTabDTOList, List<StructureDetailsTabDTO> structureDetailsTabDTOList) {\n\n String[] CSV_ASSAY_TITLE = {\"Assay Details\"};\n\n String[] CSV_ASSAY_HEADER = {\"ASSAY_ID\", \"REF_ID\", \"GVK_ID\", \"PROTEIN\", \"STANDARD_NAME\", \"MUTANT\", \"WILD_TYPE\", \"NEW_RESIDUE\", \"OLD_RESIDUE\", \"OPERATION\", \"ASSAY_POSITION\", \"TARGET_PROFILE\", \"P_S_M\", \"BUFFER\", \"BUFFER_CONC\", \"BUFFER_PREFIX\", \"BUFFER_UOM\", \"SUBSTRATE\", \"SUBSTRATE_CONC\", \"SUBSTRATE_PREFIX\", \"SUBSTRATE_UOM\", \"RADIO_LIGAND\", \"RADIO_LIGAND_PREFIX\", \"RADIO_LIGAND_UOM\", \"RADIO_LIGAND_CONC\", \"CO_ADMINISTERED\", \"CO_ADMINISTERED_PREFIX\", \"CO_ADMINISTERED_UOM\", \"CO_ADMINISTERED_VALUE\", \"IN_PRESENCE_OF\", \"IN_PRESENCE_OF_CONC\", \"IN_PRESENCE_OF_PREFIX\", \"IN_PRESENCE_OF_UOM\", \"INCUBATION_TIME\", \"INCUBATION_PREFIX\", \"INCUBATION_UOM\", \"TEMPERATURE\", \"TEMPERATURE_PREFIX\", \"TEMPERATURE_UOM\", \"PH_PREFIX\", \"PH\"};\n\n try (\n CSVWriter csvWriter = new CSVWriter(writer,\n CSVWriter.DEFAULT_SEPARATOR,\n CSVWriter.DEFAULT_ESCAPE_CHARACTER,\n CSVWriter.DEFAULT_LINE_END);\n ) {\n csvWriter.writeNext(CSV_ASSAY_TITLE);\n csvWriter.writeNext(CSV_ASSAY_HEADER);\n for (AssayTabDTO assayTabDataReturn : assayTabList) {\n for (ReferenceTabDTO referenceTabDTO : referenceTabDTOList) {\n for (StructureDetailsTabDTO structureDetailsTabDTO : structureDetailsTabDTOList) {\n String[] assayData = new String[]{\n assayTabDataReturn.getAssayId() + \"\",\n referenceTabDTO.getRefId() + \"\",\n structureDetailsTabDTO.getGvkId() + \"\",\n assayTabDataReturn.getProtein() + \"\",\n assayTabDataReturn.getStandardName() + \"\",\n assayTabDataReturn.getMutant() + \"\",\n assayTabDataReturn.getWildType() + \"\",\n assayTabDataReturn.getNewResidue() + \"\",\n assayTabDataReturn.getOldResidue() + \"\",\n assayTabDataReturn.getOperation() + \"\",\n assayTabDataReturn.getAssayPosition() + \"\",\n assayTabDataReturn.getTargetProfile() + \"\",\n assayTabDataReturn.getP_s_m() + \"\",\n assayTabDataReturn.getBuffer() + \"\",\n assayTabDataReturn.getBufferConc() + \"\",\n assayTabDataReturn.getBufferPrefix() + \"\",\n assayTabDataReturn.getBufferUom() + \"\",\n assayTabDataReturn.getSubstrate() + \"\",\n assayTabDataReturn.getSubstrateConc() + \"\",\n assayTabDataReturn.getSubstratePrefix() + \"\",\n assayTabDataReturn.getSubstrateUom() + \"\",\n assayTabDataReturn.getRadioLigand() + \"\",\n assayTabDataReturn.getRadioLigandPrefix() + \"\",\n assayTabDataReturn.getRadioLigandUom() + \"\",\n assayTabDataReturn.getRadioLigandConc() + \"\",\n assayTabDataReturn.getCoAdministered() + \"\",\n assayTabDataReturn.getCoAdministeredPrefix() + \"\",\n assayTabDataReturn.getCoAdministeredUom() + \"\",\n assayTabDataReturn.getCoAdministeredValue() + \"\",\n assayTabDataReturn.getInPresenceOf() + \"\",\n assayTabDataReturn.getInPresenceOfConc() + \"\",\n assayTabDataReturn.getInPresenceOfPrefix() + \"\",\n assayTabDataReturn.getInPresenceOfUom() + \"\",\n assayTabDataReturn.getIncubationTime() + \"\",\n assayTabDataReturn.getIncubationPrefix() + \"\",\n assayTabDataReturn.getIncubationUom() + \"\",\n assayTabDataReturn.getTemperature() + \"\",\n assayTabDataReturn.getTemperaturePrefix() + \"\",\n assayTabDataReturn.getTemperatureUom() + \"\",\n assayTabDataReturn.getPhPrefix() + \"\",\n assayTabDataReturn.getPh() + \"\"\n\n };\n\n csvWriter.writeNext(assayData);\n }\n }\n\n }\n\n\n } catch (Exception e) {\n System.out.println(\"Exception occured into the AssayTab Data Export\" + e.getMessage());\n e.printStackTrace();\n }\n\n }", "public void writeToCSV(String path) throws IOException, SQLException {\n\t\tWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), \"UTF-8\"));\n\t\t// Title\n\t\tout.write(\"pageId;title;earliest year;latest year;mean year;\");\n\t\t// IBM\n\t\tout.write(\n\t\t\t\t\"Anger;Disgust;Fear;Joy;Sadness;Analytical;Confident;Tentative;Openness;Conscientiousness;Extraversion;Agreeableness;Emotional Range;\");\n\t\t// LIWC\n\t\tout.write(\n\t\t\t\t\"LIWC;Word Count;Analytical thinking;Clout;Authentic;Emotional tone;Dictionary Words;Positive Emotion;Negative Emotion;Anxiety;Anger;Sadness;Tentative;Certainty;Power;Risk;Death;\");\n\t\tout.write(\"AlchemyTone;mixed;score;type;\");\n\t\tout.write(\"\\n\");\n\t\tfor (Page page : this.getExtractsFromDatabase()) {\n\t\t\tint pageId = page.getPageId();\n\t\t\tString title = page.getTitle();\n\t\t\tToneAnalysis ibmTone = page.getIbmTone();\n\t\t\tReceptivitiAnalysis liwcTone = page.getLiwcTone();\n\t\t\tDocumentSentiment docSentiment = page.getDocumentSentiment();\n\t\t\tint earliestYear = page.getEarliestYear();\n\t\t\tint latestYear = page.getLatestYear();\n\t\t\tint meanYear = 0;\n\t\t\tif (earliestYear == 0) {\n\t\t\t\tmeanYear = latestYear;\n\t\t\t} else {\n\t\t\t\tmeanYear = (earliestYear + latestYear) / 2;\n\t\t\t}\n\t\t\tif (ibmTone != null) {\n\t\t\t\tout.write(pageId + \";\" + title + \";\" + earliestYear + \";\" + latestYear + \";\" + meanYear + \";\");\n\t\t\t\tElementTone documentTone = ibmTone.getDocumentTone();\n\t\t\t\tList<ToneCategory> toneCategories = documentTone.getTones();\n\t\t\t\tfor (ToneCategory toneCategory : toneCategories) {\n\t\t\t\t\tList<ToneScore> toneScores = toneCategory.getTones();\n\t\t\t\t\tfor (ToneScore toneScore : toneScores) {\n\t\t\t\t\t\t// String name = toneScore.getName();\n\t\t\t\t\t\tdouble score = toneScore.getScore();\n\t\t\t\t\t\tout.write(String.valueOf(score).replace('.', ','));\n\t\t\t\t\t\tout.write(\";\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tout.write(\";\");\n\n\t\t\t\tif (liwcTone != null) {\n\t\t\t\t\tDouble wordCount = liwcTone.getLiwcScores().getWc();\n\t\t\t\t\tDouble analyticalThinking = liwcTone.getLiwcScores().getAnalytic();\n\t\t\t\t\tDouble clout = liwcTone.getLiwcScores().getClout();\n\t\t\t\t\tDouble authentic = liwcTone.getLiwcScores().getAuthentic();\n\t\t\t\t\tDouble emotionalTone = liwcTone.getLiwcScores().getTone();\n\t\t\t\t\tDouble dictionaryWords = liwcTone.getLiwcScores().getDic();\n\n\t\t\t\t\tDouble posEmo = liwcTone.getLiwcScores().getCategories().getPosemo();\n\t\t\t\t\tDouble negEmo = liwcTone.getLiwcScores().getCategories().getNegemo();\n\t\t\t\t\tDouble anxiety = liwcTone.getLiwcScores().getCategories().getAnx();\n\t\t\t\t\tDouble anger = liwcTone.getLiwcScores().getCategories().getAnger();\n\t\t\t\t\tDouble sadness = liwcTone.getLiwcScores().getCategories().getSad();\n\t\t\t\t\tDouble tentative = liwcTone.getLiwcScores().getCategories().getTentat();\n\t\t\t\t\tDouble certainty = liwcTone.getLiwcScores().getCategories().getCertain();\n\t\t\t\t\tDouble power = liwcTone.getLiwcScores().getCategories().getPower();\n\t\t\t\t\tDouble risk = liwcTone.getLiwcScores().getCategories().getRisk();\n\t\t\t\t\tDouble death = liwcTone.getLiwcScores().getCategories().getDeath();\n\n\t\t\t\t\tout.write(wordCount + \";\");\n\t\t\t\t\tout.write(String.valueOf(analyticalThinking).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(clout).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(authentic).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(emotionalTone).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(dictionaryWords).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(posEmo).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(negEmo).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(anxiety).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(anger).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(sadness).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(tentative).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(certainty).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(power).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(risk).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(death).replace('.', ',') + \";\");\n\t\t\t\t}\n\t\t\t\tout.write(\";\");\n\t\t\t\tif (docSentiment != null) {\n\t\t\t\t\tString mixed = docSentiment.getSentiment().getMixed();\n\t\t\t\t\tDouble score = docSentiment.getSentiment().getScore();\n\t\t\t\t\tString type = docSentiment.getSentiment().getType().toString();\n\t\t\t\t\tout.write(String.valueOf(mixed).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(score).replace('.', ',') + \";\");\n\t\t\t\t\tout.write(String.valueOf(type).replace('.', ',') + \";\");\n\t\t\t\t}\n\t\t\t\tout.write(\"\\n\");\n\t\t\t}\n\t\t}\n\t\tout.close();\n\t\tSystem.out.println(\"Export finished.\");\n\n\t}", "public void writeTourResultsAllCarrier() {\n\t\tString fileName = this.outputFolder + \"total_tour_infos_per_vehicleType.csv\";\n\t\tFile file = new File(fileName);\n\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(file));\n\t\t\tbw.write(fileName);\n\t\t\tbw.newLine();\n\t\t\tbw.write(\"____________________________________________________________________________\");\n\t\t\tbw.newLine();\n\n\t\t\tbw.write(\"personId; vehType Id;distance [m] ; distance [km] ;TravelTime [s]; TravelTime [h];\" +\n\t\t\t\t\t\"FuelConsumption[l]; Emission [t Co2]; FuelConsumptionRate[l/100m]; \" +\n\t\t\t\t\t\"EmissionRate [g/m]; \");\n\t\t\tbw.newLine();\n\n\n\n\t\t\t//\t\t\tKT:\n\t\t\tMap<Id<Person>, Double> personId2tourDistance = this.handler.getPersonId2TourDistances();\n\t\t\tMap<Id<Person>, Double> personId2tourTravelTimes = this.handler.getPersonId2TravelTimes();\n\n\t\t\tMap<Id<VehicleType>, VehicleTypeSpezificCapabilities> vehTypId2Capabilities = new TreeMap<Id<VehicleType>, VehicleTypeSpezificCapabilities>();\n\n\t\t\tCarrierVehicleTypes vehicleTypes = this.handler.getVehicleTypes();\n\n\t\t\t//preparation:\n\t\t\tfor (Id<VehicleType> vehicleTypeId : vehicleTypes.getVehicleTypes().keySet()){\n\t\t\t\tVehicleTypeSpezificCapabilities capabilities = this.handler.getVehTypId2Capabilities().get(vehicleTypeId);\n\t\t\t\tif (capabilities != null){\n\t\t\t\t\tvehTypId2Capabilities.put(vehicleTypeId, capabilities);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//write results:\n\t\t\tfor (Id<Person> personId :personId2tourDistance.keySet()) {\n\n\t\t\t\tDouble tourDistanceMeter = personId2tourDistance.get(personId);\n\t\t\t\tDouble tourTravelTimeSec = personId2tourTravelTimes.get(personId);\n\n\t\t\t\tId<VehicleType> vehTypeId = null;\n\n\t\t\t\tfor (Id<VehicleType> vehTypeIdsAvail : vehicleTypes.getVehicleTypes().keySet()) {\n\t\t\t\t\tif(personId.toString().contains(\"_\"+vehTypeIdsAvail.toString()+\"_\")){\n\t\t\t\t\t\tif (vehTypeIdsAvail.toString().endsWith(\"frozen\") == personId.toString().contains(\"frozen\")) {//only frozen\n\t\t\t\t\t\t\tvehTypeId = vehTypeIdsAvail;\n\t\t\t\t\t\t} else { //not \"frozen\"\n\t\t\t\t\t\t\tvehTypeId = vehTypeIdsAvail;\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\tif (vehTypeId == null) {\n\t\t\t\t\tlog.error(\"Vehicle type for person not defined: \" + personId);\n\t\t\t\t}\n\n\t\t\t\tdouble fuelConsuptionRate = (vehTypId2Capabilities.get(vehTypeId)).getFuelConsumtion()*1000; // Usually in l/100km\n\t\t\t\tdouble emissionsRatePerMeter = vehTypId2Capabilities.get(vehTypeId).getEmissionsPerMeter(); \n\n\t\t\t\tbw.write(personId + \";\" +\n\t\t\t\t\t\tvehTypeId + \";\" +\n\t\t\t\t\t\ttourDistanceMeter + \";\" + \n\t\t\t\t\t\ttourDistanceMeter/1000 + \";\" + //km\n\t\t\t\t\t\ttourTravelTimeSec + \";\" + \n\t\t\t\t\t\ttourTravelTimeSec/3600 + \";\" + \t//h\n\t\t\t\t\t\ttourDistanceMeter*fuelConsuptionRate/100/1000 + \";\" + // rate is in [liter/100km]\n\t\t\t\t\t\ttourDistanceMeter*emissionsRatePerMeter /1000000 +\";\" + \t// CO2-Ausstoss in t (= 1Mio g)\n\t\t\t\t\t\tfuelConsuptionRate+ \";\" + \n\t\t\t\t\t\temissionsRatePerMeter \n\t\t\t\t\t\t);\n\t\t\t\tbw.newLine();\n\n\t\t\t}\t\n\t\t\t\n\t\t\tlog.info(\"Output written to \" + fileName);\n\t\t\tbw.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void createCsv(String location);", "@Test\n public void testOutputCsvStream() throws Throwable {\n testOutputCSV(true);\n }", "String toCSVString();", "public void createCsvString(StringBuilder builder, Frequency e) {\r\n\r\n\t\tbuilder.append(\"\\\"\"\r\n\t\t\t\t+ (e.getName() != null ? e.getName().replace(\",\", \"\") : \"\")\r\n\t\t\t\t+ \"\\\",\");\r\n\r\n\t\tbuilder.append(\"\\\"\"\r\n\t\t\t\t+ (e.getQtyPerDay() != null ? e.getQtyPerDay() : \"\") + \"\\\",\");\r\n\r\n\t\tbuilder.append(\"\\r\\n\");\r\n\t}", "@Override\n public String getDataInCSV() {\n return String.format(Locale.US, \"%d,%s\", this.timestamp, this.getStatusString());\n }", "public static void deviationCSV(List<Float> deviations) throws IOException {\n\n try (BufferedWriter writer = Files.newBufferedWriter(Paths.get(DEVIATION_LIST));\n\n CSVPrinter csvPrinter = new CSVPrinter(writer, CSVFormat.EXCEL.withHeader(\"deviation\"));\n ) {\n for (Float i: deviations) {\n csvPrinter.printRecord(i);\n }\n csvPrinter.flush();\n }\n }", "public void generateCSV(numList l) {\r\n\t\tFile file = new File(\"E:\\\\altruism results/\" + filename + \".csv\"); //the storage path of the csv file\r\n\t\ttry {\r\n\t\t\tif (file.exists() == false) {\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t}\r\n\t\t\tFileWriter fw = new FileWriter(file);\r\n\t\t\tBufferedWriter writer = new BufferedWriter(fw);\r\n\t\t\twriter.write(\"altruism,selfish\\r\\n\");\r\n\t\t\tfor (int i = 0; i < numList.TIME; i++) {\r\n\t\t\t\twriter.write(l.aList[i] + \",\");\r\n\t\t\t\twriter.write(l.sList[i] + \"\\r\\n\");\r\n\t\t\t}\r\n\r\n\t\t\twriter.flush();\r\n\t\t\twriter.close();\r\n\t\t\tfw.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void writeDataToCSV(Context context, String competition) throws IOException {\n\n fileExists = false;\n\n String FILE_PATH = \"Scouting_Data_\" + competition + \".csv\";\n File file = new File(context.getExternalFilesDir(\n Environment.DIRECTORY_DOCUMENTS), FILE_PATH);\n\n// if (!file.exists()) {\n// FileWriter fw = new FileWriter(file);\n// BufferedWriter bw = new BufferedWriter(fw);\n// bw.write(str);\n// bw.close();\n// }\n//\n// else {\n// FileOutputStream fileinput = new FileOutputStream(file, true);\n// PrintStream printstream = new PrintStream(fileinput);\n// printstream.print(\"\\n\" + str);\n// fileinput.close();\n// fileExists = true;\n// }\n }", "public void createCsv(View view) {\n try {\n databaseHandler.makeCSV(experimentNumber);\n } catch (IOException e) {\n e.printStackTrace();\n }\n completeLocationValues(DatabaseHandler.SENDER_LATITUDE);\n }", "void copyToCSV(List<Elements> elements, int numOfArticles, PrintWriter out) {\r\n\r\n out.print(HEADER + \"\\n\");\r\n\r\n for (int i = 0; i < numOfArticles; i++) {\r\n String dateTime = elements.get(1).get(i).text().substring(10);\r\n out.print(\"\\\"\" + dateTime + \"\\\",\"); \r\n \r\n String articleTitle = elements.get(2).get(i).text();\r\n out.write(\"\\\"\" + articleTitle + \"\\\",\"); \r\n \r\n String authorName = elements.get(3).get(i).text();\r\n out.print(\"\\\"\" + authorName + \"\\\",\"); \r\n \r\n String bannerImage = elements.get(0).get(i).attr(\"src\");\r\n out.print(\"\\\"\" + bannerImage + \"\\\",\"); \r\n \r\n String bodyContentHTML = elements.get(4).get(i).html().replace('\\n', ' ');\r\n out.write(\"\\\"\" + bodyContentHTML + \"\\\"\\n\"); \r\n }\r\n out.close();\r\n }", "protected void write(CCompatibleOutputStream os) throws Exception {\n java.util.Vector fieldVector = getFieldVector();\n for (int i = 0; i < fieldVector.size(); i++) {\n Field field = (Field) (fieldVector.elementAt(i));\n Class type = field.getType();\n if (type == Byte.TYPE) {\n os.writeByte(field.getByte(this));\n }\n else if (type == Short.TYPE) {\n os.writeShortReverse(field.getShort(this));\n }\n else if (type == Integer.TYPE) {\n os.writeIntReverse(field.getInt(this));\n }\n else if (type == Long.TYPE) {\n os.writeLongReverse(field.getLong(this));\n }\n else if (type == Double.TYPE) {\n os.writeDouble(field.getDouble(this));\n }\n else if (type.getName().equals(\"[B\")) {\n os.write( (byte[]) (field.get(this)));\n }\n }\n }", "private void save(List<String[]> data, Integer numFichier, String nomFichier) throws IOException {\n FileWriter fileWriter = null;\n CSVWriter cSVWriter2 = null;\n //-------------------------------------------------------------\n // Construction du nom de fichier\n //-------------------------------------------------------------\n\n\n// String nomFichier = constructionNomFichier(flux);\n\n// // Mini rappel sur les ternaire en java : variable = (condition) ? valeur_si_vrai : valeur_si_faux; \n// String pays = (flux.getJournalLie() != null && flux.getJournalLie().getPays() != null && !flux.getJournalLie().getPays().isEmpty()) ? flux.getJournalLie().getPays() : \"XX\";\n// String ville = (flux.getJournalLie() != null && flux.getJournalLie().getCodeVille() != null && !flux.getJournalLie().getCodeVille().isEmpty()) ? flux.getJournalLie().getCodeVille() : \"XX\";\n// String langue = (flux.getJournalLie() != null && flux.getJournalLie().getLangue() != null && !flux.getJournalLie().getLangue().isEmpty()) ? flux.getJournalLie().getLangue() : \"XX\";\n// String codeJournal = (flux.getJournalLie() != null && flux.getJournalLie().getCodeJournal() != null && !flux.getJournalLie().getCodeJournal().isEmpty()) ? flux.getJournalLie().getCodeJournal() : \"XX\";\n// String codeTypeFlux = (flux.getTypeFlux() != null && flux.getTypeFlux().getCodeType() != null && !flux.getTypeFlux().getCodeType().isEmpty()) ? flux.getTypeFlux().getCodeType() : \"XXX\";\n//\n// nomFichier = langue + \"_\" + pays + \"_\" + codeJournal + \"_\" + codeTypeFlux;\n\n //--------------------------------------------------------------------------------\n // Enregistrement \n //--------------------------------------------------------------------------------\n try {\n fileWriter = new FileWriter(exportPath + nomFichier + \"__F__\" + numFichier.toString() + \".csv\");\n\n if (escapebySlash) {\n cSVWriter2 = new CSVWriter(fileWriter, '\\t', '\"', '\\\\');\n } else {\n cSVWriter2 = new CSVWriter(fileWriter, '\\t', '\"');\n }\n\n cSVWriter2.writeAll(data);\n\n\n } catch (Exception e) {\n logger.debug(\"Erreur lors de l'enregistrement\");\n } finally {\n if (cSVWriter2 != null) {\n try {\n cSVWriter2.close();\n } catch (Exception e) {\n }\n }\n\n if (fileWriter != null) {\n try {\n fileWriter.close();\n } catch (Exception e) {\n }\n }\n }\n\n data.clear(); // On purge le fichier data\n //---------------------------------------------------------------------------\n // Assemblage \n //---------------------------------------------------------------------------\n // Si ce n'est pas le premier fichier. Il faut réassembler\n// if (numFichier != 0) {\n// File f1 = new File(exportPath + nomFichier + \"__F__0.csv\");\n// File fCurrent = new File(exportPath + nomFichier + \"__F__\" + numFichier.toString() + \".csv\");\n// \n// String content = FileUtils.readFileToString(fCurrent);\n// FileUtils.write(f1, content, true);\n// \n// fCurrent.delete();\n// }\n }", "public Builder setCsv(\n com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.Builder builderForValue) {\n if (csvBuilder_ == null) {\n schema_ = builderForValue.build();\n onChanged();\n } else {\n csvBuilder_.setMessage(builderForValue.build());\n }\n schemaCase_ = 6;\n return this;\n }", "private void storeToCsvFile( final File aSelectedFile, final Asm45DataSet aAnalysisResult )\n {\n try\n {\n final CsvExporter exporter = ExportUtils.createCsvExporter( aSelectedFile );\n\n exporter.setHeaders( \"index\", \"clocks\", \"block\", \"address\", \"value\", \"bus grant\", \"type\", \"event\" );\n\n final List<Asm45Data> dataSet = aAnalysisResult.getData();\n for ( int i = 0; i < dataSet.size(); i++ )\n {\n final Asm45Data ds = dataSet.get( i );\n exporter.addRow( Integer.valueOf( i ), Integer.valueOf( ds.getClocks() ),\n StringUtils.integerToHexString( ds.getBlock(), 2 ), StringUtils.integerToHexString( ds.getAddress(), 4 ),\n StringUtils.integerToHexString( ds.getValue(), 4 ), ds.getBusGrant() ? \"X\" : \"-\", ds.getType(),\n ds.getEvent() );\n }\n\n exporter.close();\n }\n catch ( final IOException exception )\n {\n // Make sure to handle IO-interrupted exceptions properly!\n if ( !HostUtils.handleInterruptedException( exception ) )\n {\n LOG.log( Level.WARNING, \"CSV export failed!\", exception );\n }\n }\n }", "@java.lang.Override\n public com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchemaOrBuilder getCsvOrBuilder() {\n if ((schemaCase_ == 6) && (csvBuilder_ != null)) {\n return csvBuilder_.getMessageOrBuilder();\n } else {\n if (schemaCase_ == 6) {\n return (com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema) schema_;\n }\n return com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.getDefaultInstance();\n }\n }", "private static void generateCsvFileWithFinalData(File path) // String sFileName\n {\n String COMMA_DELIMITER = \",\";\n String NEW_LINE_SEPARATOR = \"\\n\";\n try\n {\n // String path to our created output data file\n String finalFilePath = String.valueOf(path.getParent()) + \"\\\\test.csv\";\n FileWriter writer = new FileWriter(finalFilePath);\n\n for (Player player : sortedFinalPlayerList) {\n writer.append(player.getLastName());\n writer.append(COMMA_DELIMITER);\n writer.append(player.getFirstName());\n writer.append(COMMA_DELIMITER);\n writer.append(player.getCountry());\n writer.append(COMMA_DELIMITER);\n writer.append(String.valueOf(player.getLongCommSubsCounter()));\n writer.append(NEW_LINE_SEPARATOR);\n }\n\n //generate whatever data you want\n writer.flush();\n writer.close();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "private void openCsvDialog(){\n JFileChooser aFileChooser = new JFileChooser();\n aFileChooser.setFileFilter(new MyFileFilterCSV());\n if (lastUsedFileCSV != null){\n aFileChooser.setCurrentDirectory(lastUsedFileCSV.getParentFile());\n aFileChooser.setSelectedFile(lastUsedFileCSV);\n }else{\n File file = new File(aFileChooser.getCurrentDirectory(), dataset.getName()+\".csv\");\n aFileChooser.setSelectedFile(file);\n }\n int r = aFileChooser.showSaveDialog(this);\n if (r == JFileChooser.APPROVE_OPTION){\n setCursor(new Cursor(Cursor.WAIT_CURSOR));\n File file = aFileChooser.getSelectedFile();\n if(!MyUtilities.isCSVFile(file)){\n file = MyUtilities.getCSVFile(file);\n }\n lastUsedFileCSV = file;\n String sep = getCSVSeparator();\n PrintWriter writer = null;\n try{\n writer = new PrintWriter(new BufferedWriter (new OutputStreamWriter(new FileOutputStream(file), \"utf-8\")));\n // header\n String s = \"\";\n for(int j=0; j<dataset.getListDataHeader().length; j++){\n s += dataset.getListDataHeader()[j] == null? \"\" : dataset.getListDataHeader()[j].getValue();\n if(j <dataset.getListDataHeader().length -1)\n s+= sep;\n }\n writer.println(s);\n // data\n Data[][] data = dataset.getData();\n int nbR = dataset.getNbRows();\n int nbC = dataset.getNbCol();\n for(int i=0; i<nbR; i++){\n s = \"\";\n for(int j=0; j<nbC; j++){\n if(data[i][j] != null){\n if(data[i][j].isDoubleValue()){\n if(!Double.isNaN(data[i][j].getDoubleValue()))\n s += NumberFormat.getNumberInstance(getLocale()).format(data[i][j].getDoubleValue());\n }else{\n s += data[i][j].getValue();\n }\n }\n if(j <nbC -1)\n s+= sep;\n }\n writer.println(s);\n }\n //log\n\t\tdataProcessToolPanel.logExportCSV(dataset, file.getPath());\n }catch (IOException e){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(new CopexReturn(getBundleString(\"MSG_ERROR_CSV\"), false), getBundleString(\"TITLE_DIALOG_ERROR\"));\n }\n finally{\n if (writer != null)\n try{\n writer.close();\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }catch (Exception e){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(new CopexReturn(getBundleString(\"MSG_ERROR_CSV\"), false), getBundleString(\"TITLE_DIALOG_ERROR\"));\n }\n }\n }\n }", "private static void createCSV(String filename, ArrayList<Long> sizes, ArrayList<Long> times){\n File csv = new File(\"\"+filename);\n try {\n if(csv.createNewFile()) {\n PrintWriter file = new PrintWriter(new FileWriter(csv));\n file.print(\"Size (n)\");\n for (Long size : sizes)\n file.print(\",\" + size);\n file.print(\"\\nTimes (ms)\");\n for(Long time:times)\n file.print(\",\"+time);\n file.println();\n file.close();\n\n } else {\n Scanner fileReader = new Scanner(csv);\n String currentSizes = fileReader.nextLine();\n int size=currentSizes.split(\",\").length-1;\n if(size<sizes.size()){\n for(int i=size;i<sizes.size();i++)\n currentSizes+=\",\"+sizes.get(i);\n currentSizes+=\"\\n\";\n while(fileReader.hasNextLine())\n currentSizes+=fileReader.nextLine()+\"\\n\";\n FileWriter writer = new FileWriter(csv);\n writer.write(currentSizes);\n writer.close();\n }\n\n PrintWriter file = new PrintWriter(new FileWriter(csv,true));\n file.print(\"Times (ms)\");\n for(Long time:times)\n file.print(\",\"+time);\n file.println();\n file.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "String[] toCSV() throws Exception;", "static void saveVertexesInfoToCSV(\r\n ITaxonomy taxonomy,\r\n String strCSVFilename,\r\n boolean includeProb) throws IOException, Exception\r\n {\r\n BufferedWriter writer; // Writer\r\n \r\n String strLine; // Line written\r\n \r\n char sep = ';'; // Separator dield\r\n \r\n // We create a writer for the text file\r\n \r\n writer = new BufferedWriter(new FileWriter(strCSVFilename, false));\r\n \r\n // We write the titles\r\n \r\n strLine = \"Synset ID\" + sep\r\n + \"Words\" + sep\r\n + \"ParentsID\" + sep\r\n + \"IC value\" + sep;\r\n \r\n if (includeProb)\r\n {\r\n strLine += \"Probability\" + sep;\r\n }\r\n \r\n strLine += \"Depth\" + sep\r\n + \"Longest depth\" + sep\r\n + \"# Children\" + sep\r\n + \"# Parents\" + sep\r\n + \"# Subsumers\" + sep\r\n + \"# Hyponyms\" + sep\r\n + \"# Leaves\" + \"\\n\";\r\n \r\n writer.write(strLine);\r\n \r\n // We write the info for each taxonomy node\r\n \r\n for (IVertex vertex: taxonomy.getVertexes())\r\n {\r\n // We get the vertx info into a linte\r\n \r\n strLine = getVertexLine(vertex, sep, includeProb);\r\n \r\n // We write the vertx line\r\n \r\n writer.write(strLine);\r\n }\r\n \r\n // We close the file\r\n \r\n writer.close();\r\n }", "public static void writeDataToCsvUsingStringArrayForStructure(PrintWriter writer, List<StructureDetailsTabDTO> structureTabList, List<ReferenceTabDTO> referenceTabDTOList) {\n\n String[] CSV_STRUCTURE_TITLE = {\"Structure Details\"};\n\n String[] CSV_STRUCTURE_HEADER = {\"GVK_ID\", \"REF_ID\", \"COMPOUND_NAMES\", \"SUB_SMILES\", \"INCHIKEY\", \"ORIGINATOR\", \"DERIVATIVES\", \"BIO_ASSAY\", \"PRIMARY_TARGETS\", \"MECHANISMS\", \"COMPOUND_STATUS\", \"MOL_FORMULA\", \"MOL_WEIGHT\"};\n\n try (\n CSVWriter csvWriter = new CSVWriter(writer,\n CSVWriter.DEFAULT_SEPARATOR,\n CSVWriter.DEFAULT_ESCAPE_CHARACTER,\n CSVWriter.DEFAULT_LINE_END);\n ) {\n csvWriter.writeNext(CSV_STRUCTURE_TITLE);\n csvWriter.writeNext(CSV_STRUCTURE_HEADER);\n for (StructureDetailsTabDTO structureTabDataReturn : structureTabList) {\n\n for (ReferenceTabDTO referenceTabDTO : referenceTabDTOList) {\n String[] structureData = new String[]{\n structureTabDataReturn.getGvkId() + \"\",\n referenceTabDTO.getRefId() + \"\",\n structureTabDataReturn.getCompoundNames() + \"\",\n structureTabDataReturn.getSubSmiles() + \"\",\n structureTabDataReturn.getInchiKey() + \"\",\n structureTabDataReturn.getOriginator() + \"\",\n structureTabDataReturn.getDerivatives() + \"\",\n structureTabDataReturn.getBioAssay() + \"\",\n structureTabDataReturn.getPrimaryTargets() + \"\",\n structureTabDataReturn.getMechanisms() + \"\",\n structureTabDataReturn.getCompoundStatus() + \"\",\n structureTabDataReturn.getMolFormula() + \"\",\n structureTabDataReturn.getMolWeight() + \"\"\n };\n csvWriter.writeNext(structureData);\n }\n\n }\n\n\n } catch (Exception e) {\n System.out.println(\"Exception occured into the StructureTab Data Export\" + e.getMessage());\n e.printStackTrace();\n }\n\n }", "public static void writeCsvFile(List<Person> currentState, Path exportPath) {\n requireNonNull(currentState);\n File dir = new File(exportPath.toString());\n dir.mkdirs();\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yy HH-mm-ss\");\n Date date = new Date();\n String exportUniqueName = \"export[\" + dateFormat.format(date) + \"].csv\";\n Path exportFilePath = Paths.get(exportPath.toString() , exportUniqueName);\n try {\n FileUtil.createIfMissing(exportFilePath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n try {\n serializeObjectToCsvFile(exportFilePath, currentState);\n } catch (IOException e) {\n logger.warning(\"Error writing from CsvFile file \" + exportFilePath);\n }\n }", "private void startLogFile() {\n try {\n createLogFile();\n // First line of file contains field names\n String [] header = new String [] {\"Job\", \"Step\", \"Total Residents\", \"Domestic\", \"Employed\", \"Student\", \"Rebel\", \"Heard original rumor\", \"Heard new rumor\", \"Run\"};\n dataCSVFile_identity.writeLine(header);\n\n // activity\n String [] header_actions = new String [] {\"Job\",\"Step\",\"total residents\", \"At Home\", \"Work\", \"Searching for Work\",\n \"School\", \"Socialiazing\", \"Church\", \"Getting Water\", \"Rebel\", \"Run\"};\n\n dataCSVFile_action.writeLine(header_actions);\n\n String [] header_network = new String [] {\"Job\", \"Step\", \"node1\", \"node2\", \"weight\"};\n dataCSVFile_network.writeLine(header_network);\n\n String [] header_working = new String [] {\"Job\", \"Step\", \"Business\", \"School\", \"Health Facility\", \"Religious Facility\", \n \"Formal\", \"Informal\", \"Searching\", \"Inactive\", \"Formal at home\", \"Informal at home\", \"Run\"};\n dataCSVFile_working.writeLine(header_working);\n \n String [] header_rebels = new String [] {\"Job\", \"Step\", \"AgeGroup\", \"HHDiscrepancy\", \"Identity\", \"Count\" };\n dataCSVFile_rebels.writeLine(header_rebels);\n\n String[] header_residents = new String [] {\"Job\", \"Step\", \"Resident\", \"Age\", \"Employment status\", \"Laid off\", \"Action\", \n \"Daily water use\", \"Remaining water\", \"Required water\",\n \"Identity\",\"Is initial rebel\", \n \"Heard original rumor\", \"Heard new rumor\", \"Energy\", \"Current Aggression\", \"Aggression Rate\", \"Formal Business Capacity\", \n \"Informal Business Capacity\", \"School Capacity\", \"Has School\", \"Has formal employer\", \"Has informal Employer\", \n \"Formal income\", \"Informal income\", \"Searching income\", \"Inactive income\", \"Household Income\", \"Has electricity\", \"Has sanitation\",\n \"Has water\", \"Household expenditures\", \"Rent cost\", \"Water cost\", \"Electric cost\", \"Sanitation cost\", \n \"Transportation cost\", \"Other cost\", \"Food cost\", \"Discrepancy\", \"Run\", \"Preference\"};\n \n \n dataCSVFile_residents.writeLine(header_residents);\n\n String [] header_degreestats = new String [] {\"Job\", \"Step\", \"max degree\", \"min degree\", \"mean degree\", \"sum degree\", \"mean connections\", \"Run\"};\n dataCSVFile_degreestats.writeLine(header_degreestats);\n\n }\n\n catch (IOException ex) {\n Logger.getLogger(Kibera.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void saveMarkovToCSVFileInformation(){\n //Clear out the current NewCensusColumnDetails before saving.\n this.currentMarkovChain.setNewCensusColumnDetails(new ArrayList<NewCensusColumnDetails>());\n \n ArrayList<NewCensusColumnDetails> newCensusColumnDetails = new ArrayList<>();\n \n ArrayList<cerl.gui.utilities.Class> censusClasses = this.currentMarkovChain.getCensusClasses();\n List<SurveyColumnValuesGrouping> surveyGroupings = this.currentMarkovChain.getSelectSurveyClass().getSurveyColumnValuesGroupings();\n\n /**\n * These will be used to find the min and max values stored in the grid. \n * \n * Row data starts at index 1.\n * Column data starts at index 2.\n */\n int rowToStartAt = START_EDITABLE_ROW;\n \n for(int surveyCounter = 0; surveyCounter < surveyGroupings.size(); surveyCounter++){ //rows\n int currentColumnNumber = START_EDITABLE_COL;\n SurveyColumnValuesGrouping surveyGrouping = surveyGroupings.get(surveyCounter);\n\n double newTotalRandomNumber = 0;\n ArrayList<Integer> oldValueLookUpColumns = new ArrayList<Integer>();\n\n for(int censusCounter = 0; censusCounter < censusClasses.size(); censusCounter++){ //columns\n cerl.gui.utilities.Class censusClass = censusClasses.get(censusCounter);\n oldValueLookUpColumns.add(censusClass.getColumnNumber());\n\n double[] minMaxValues = this.myTable.getMinMaxObject(rowToStartAt + surveyCounter, currentColumnNumber);\n\n double foundMin = minMaxValues[0];\n double foundMax = minMaxValues[1];\n\n double foundRandomNumber = 0.0;\n if(foundMin == foundMax){\n foundRandomNumber = foundMax;\n }else {\n foundRandomNumber = ThreadLocalRandom.current().nextDouble(foundMin, foundMax);\n foundRandomNumber = Math.round(foundRandomNumber * 100.0) / 100.0;\n }\n\n newTotalRandomNumber += foundRandomNumber;\n if(currentColumnNumber < END_EDITABLE_COL){\n currentColumnNumber++;\n }\n }\n\n //set min and max numbers\n //New column header that will appear in the new csv file\n NewCensusColumnDetails details = new NewCensusColumnDetails(\n surveyGrouping.toString(), \n newTotalRandomNumber,\n oldValueLookUpColumns,\n 0\n );\n\n newCensusColumnDetails.add(details);\n }\n \n newCensusColumnDetails = setCensusTotalColumns(newCensusColumnDetails);\n \n //Add the new NewCensusColumnDetails to the current MarkovChain object\n this.currentMarkovChain.setNewCensusColumnDetails(newCensusColumnDetails);\n }", "public static void writeDataToCsvUsingStringArrayForReference(PrintWriter writer, List<ReferenceTabDTO> referenceTabList) {\n\n String[] CSV_REFERENCE_TITLE = {\"Reference Details\"};\n\n String[] CSV_REFERENCE_HEADER = {\"REF_ID\", \"REF_TYPE\", \"JOURNAL_PATENT_NAME\", \"REFERENCE\", \"YEAR\", \"VOLUME\", \"ISSUE\", \"START_PAGE\", \"END_PAGE\", \"DOI\", \"PUBMED_ID\", \"PATENT_NO\", \"APPLICATION_TYPE\", \"ISSN_NO\", \"TITLE\", \"ABSTRACT\", \"AUTHORS\", \"COMPANY_NAMES\", \"COMPANY_ADDRESSES\"};\n try (\n CSVWriter csvWriter = new CSVWriter(writer,\n CSVWriter.DEFAULT_SEPARATOR,\n CSVWriter.DEFAULT_ESCAPE_CHARACTER,\n CSVWriter.DEFAULT_LINE_END);\n ) {\n csvWriter.writeNext(CSV_REFERENCE_TITLE);\n csvWriter.writeNext(CSV_REFERENCE_HEADER);\n\n for (ReferenceTabDTO referenceTabDataReturn : referenceTabList) {\n String[] referenceData = new String[]{\n referenceTabDataReturn.getRefId() + \"\",\n referenceTabDataReturn.getRefType() + \"\",\n referenceTabDataReturn.getJournalPatentName(),\n referenceTabDataReturn.getReference(),\n referenceTabDataReturn.getYear() + \"\",\n referenceTabDataReturn.getVolume() + \"\",\n referenceTabDataReturn.getIssue() + \"\",\n referenceTabDataReturn.getStartPage() + \"\",\n referenceTabDataReturn.getEndPage() + \"\",\n referenceTabDataReturn.getDoi() + \"\",\n referenceTabDataReturn.getPubmedId() + \"\",\n referenceTabDataReturn.getPatentNo() + \"\",\n referenceTabDataReturn.getApplicationType() + \"\",\n referenceTabDataReturn.getIssnNo() + \"\",\n referenceTabDataReturn.getTitle() + \"\",\n referenceTabDataReturn.getAbstrac(),\n referenceTabDataReturn.getAuthors() + \"\",\n referenceTabDataReturn.getCompanyNames() + \"\",\n referenceTabDataReturn.getCompanyAddresses() + \"\"\n\n };\n csvWriter.writeNext(referenceData);\n }\n\n } catch (Exception e) {\n System.out.println(\"Exception occured into the ReferenceTab Data Export\" + e.getMessage());\n e.printStackTrace();\n }\n\n }", "public void exportToCSV(final File theFile) {\n FileOutputStream f = null;\n\n try {\n f = new FileOutputStream(theFile);\n } catch (Exception e) {\n System.err.println(\"Could not open file stream: \" + e.toString());\n }\n\n if (f == null) {\n return;\n }\n\n CSVPrinter thePrinter = new CSVPrinter(f);\n\n // thePrinter.printlnComment(\"\");\n // /thePrinter.printlnComment(\"File: \" + theFile.getName());\n // thePrinter.printlnComment(\"\");\n // thePrinter.println();\n thePrinter.println(this.getDoubleStrings());\n\n thePrinter.println();\n }", "public static void save() {\r\n\t\ttry {\r\n\t\t\tFile csv = new File(\"src/transaction.csv\");\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(csv, false));\r\n\t\t\tbw.write(\"type,account number,amount,year,month,date,cleared\");\r\n\t\t\tbw.newLine();\r\n\t\t\tfor (int i = 0; i < transList.size(); i++) {\r\n\t\t\t\tbw.write(transList.get(i).toFile());\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@java.lang.Override\n public com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchemaOrBuilder getCsvOrBuilder() {\n if (schemaCase_ == 6) {\n return (com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema) schema_;\n }\n return com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.getDefaultInstance();\n }", "public void writeToCsv(ArrayList<Invoice> items) throws IOException {\n String[] header = {\"ID\", \"Items\", \"Subtotal\", \"State\", \"CreatedAt\", \"CompletedAt\", \"StaffID\", \"TableID\", \"Total\", \"AmountPaid\", \"PaymentType\", \"Receipt\"};\n BufferedWriter csvFile = FileIOHelper.getFileBufferedWriter(this.orderCsv);\n ArrayList<String[]> toWrite = new ArrayList<>();\n toWrite.add(header);\n items.forEach((i) -> toWrite.add(i.toCsv()));\n writeToCsvFile(toWrite, csvFile);\n }", "public StringBuffer toStringCSV( Date fechaCierre ) {\n \tStringBuffer respuesta \t\t= new StringBuffer();\n \tfinal String COMA = \",\";\n \tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n \t//llenar el string buffer\n \trespuesta.append(this.numContrato\t \t\t!= null ? this.numContrato : \"\");\n \trespuesta.append(COMA);\n \trespuesta.append(this.producto \t\t\t\t!= null ? this.producto : \"\");\n \trespuesta.append(COMA);\n \trespuesta.append(fechaCierre \t\t\t\t!= null ? sdf.format(fechaCierre) : \"Fecha Invalida\"); //Dia Pago\n \trespuesta.append(COMA);\n \trespuesta.append(this.numGrupo\t\t\t\t!= null ? this.numGrupo : \"\");\n \trespuesta.append(COMA);\n \trespuesta.append(this.nombreGrupo\t\t\t!= null ? this.nombreGrupo : \"\");\n \trespuesta.append(COMA);\n \trespuesta.append(this.pagadoCapital\t\t\t!= null ? this.pagadoCapital.doubleValue() : 0.0d);\n \trespuesta.append(COMA);\n \trespuesta.append(this.pagadoInteres\t\t\t!= null ? this.pagadoInteres.doubleValue() : 0.0d );\n \trespuesta.append(COMA);\n \t\tthis.pagadoCapital = this.pagadoCapital != null ? this.pagadoCapital : 0.0d;\n \t\tthis.pagadoInteres = this.pagadoInteres != null ? this.pagadoInteres : 0.0d;\n \trespuesta.append(this.pagadoCapital.doubleValue() + this.pagadoInteres.doubleValue() ); //Pagado Total\n \trespuesta.append(COMA);\n \trespuesta.append(this.codigoSucursal\t\t!= null ? this.codigoSucursal \t : \"\");\n \trespuesta.append(COMA);\n \trespuesta.append(this.nombreSucursal\t\t!= null ? this.nombreSucursal : \"\");\n \trespuesta.append(COMA);\n \trespuesta.append(this.parcialidad\t\t\t!= null ? this.parcialidad : \"\" );\n \trespuesta.append( \"\\n\" );\n\n \treturn respuesta;\n }", "public void writeTo(OutputStream os) throws IOException, MessagingException {\n/* 96 */ LineOutputStream los = null;\n/* 97 */ if (os instanceof LineOutputStream) {\n/* 98 */ los = (LineOutputStream)os;\n/* */ } else {\n/* 100 */ los = new LineOutputStream(os);\n/* */ } \n/* */ \n/* */ \n/* 104 */ Enumeration hdrLines = getAllHeaderLines();\n/* 105 */ while (hdrLines.hasMoreElements()) {\n/* 106 */ los.writeln(hdrLines.nextElement());\n/* */ }\n/* */ \n/* 109 */ los.writeln();\n/* */ \n/* */ \n/* 112 */ getDataHandler().writeTo(os);\n/* 113 */ os.flush();\n/* */ }", "@RequestMapping(\"/generatecsv\")\r\n\tpublic String generateCsvFile() throws CsvDataTypeMismatchException, CsvRequiredFieldEmptyException {\r\n\r\n\t\tList<FinalCritExtDTO> list = service.generateDataForCsvFile();\r\n\r\n\t\tif (Objects.nonNull(list) && !list.isEmpty()) {\r\n\t\t\tlogger.info(\"data fetched from db and mapped of size \" + list.size());\r\n\t\t\twriter.writeDataAtOnce(list);\r\n\t\t} else\r\n\t\t\tlogger.info(\"No records found in db to be written\");\r\n\t\tlogger.debug(\"File successfully generated\");\r\n\t\treturn \"SUCCESS\";\r\n\t}", "static void saveEdgesInfoToCSV(\r\n ITaxonomy taxonomy,\r\n String strCSVFilename) throws IOException, Exception\r\n {\r\n BufferedWriter writer; // Writer\r\n \r\n String strLine; // Line written\r\n \r\n char sep = ';'; // Separator dield\r\n \r\n // We create a writer for the text file\r\n \r\n writer = new BufferedWriter(new FileWriter(strCSVFilename, false));\r\n \r\n // We write the titles\r\n \r\n strLine = \"Source ID\" + sep\r\n + \"Target ID\" + sep\r\n + \"CondProbability\" + sep\r\n + \"IC weight\" + \"\\n\";\r\n \r\n writer.write(strLine);\r\n \r\n // We write the info for each taxonomy node\r\n \r\n for (IEdge edge: taxonomy.getEdges())\r\n {\r\n // We get the vertx info into a linte\r\n \r\n strLine = getEdgeLine(edge, sep);\r\n \r\n // We write the vertx line\r\n \r\n writer.write(strLine);\r\n }\r\n \r\n // We close the file\r\n \r\n writer.close();\r\n }", "public static void writeCSV(List<Item> items) throws IOException {\n\n try (BufferedWriter writer = Files.newBufferedWriter(Paths.get(USER_ITEMS_FILE));\n\n CSVPrinter csvPrinter = new CSVPrinter(writer, CSVFormat.EXCEL.withHeader(\"itemNo\",\"Room\",\"Category\",\"Type\",\"make\",\"model\",\"serial\",\"receipt\",\"photo\",\"value\",\"comments\",\"lastupdate\",\"delete\",\"email_own\"));//4/30 JGP added email_own header\n ) {\n for (Item i: items) {\n if (!\"itemNo\".equals(i.getItemNo())) {\n csvPrinter.printRecord(i.getItemNo(), i.getRoom().getStatus(), i.getCategory().getCategory(), i.getType().getProductTypeString(), i.getMake(), i.getModel(), i.getSerial(), i.getReceipt(), i.getPhoto(), i.getValue(), i.getComments(), FORMATTER.format(new Date()).toString(), i.isDeleted().booleanValue(), i.email);//4/30 JGP added i.email string\n }\n }\n csvPrinter.flush();\n }\n\n /* EventBus eventBus = EventBusFactory.getEventBus();\n ParseEvent pevent = new ParseEvent(items);\n eventBus.register(pevent);\n eventBus.post(pevent);*/\n }", "private static void writeToOrder() throws IOException {\n FileWriter write = new FileWriter(path5, append);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Order> orders = Inventory.getOrderHistory();\n for (int i = 0; i < orders.size(); i++) {\n Order o = (Order) orders.get(i);\n\n String orderNum = String.valueOf(o.getOrderNumber());\n String UPC = String.valueOf(o.getUpc());\n String productName = o.getProductName();\n String distName = o.getDistributorName();\n String cost = String.valueOf(o.getCost());\n String quantity = String.valueOf(o.getQuantity());\n String isProcesed = String.valueOf(o.isProcessed());\n\n textLine =\n orderNum + \", \" + UPC + \", \" + quantity + \",\" + productName + \", \" + distName + \", \" + cost\n + \", \" + isProcesed;\n print_line.printf(\"%s\" + \"%n\", textLine);\n\n }\n print_line.close();\n\n }", "int writeTo(byte[] iStream, int pos, ORecordVersion version);", "@Override\r\n\tpublic void serialize() throws Exception {\n\t\tFile dtRowFile = new File(twcnbOutputDir, Constant.TWCNB_META_FILE);\r\n\t\tFileWriter fw = new FileWriter(dtRowFile);\r\n\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\r\n\t\tbw.write(String.valueOf(this.documentCnt));\r\n\t\tbw.newLine();\r\n\t\tbw.write(String.valueOf(this.labelCnt));\r\n\t\tbw.newLine();\r\n\t\tbw.write(String.valueOf(this.featureCnt));\r\n\t\tbw.newLine();\r\n\r\n\t\tbw.flush();\r\n\t\tbw.close();\r\n\t\tfw.close();\r\n\t}", "public String getCSVString() {\n StringBuilder builder = new StringBuilder();\n\n // key / value header\n builder.append(\"key,\\tvalue\");\n builder.append(System.getProperty(\"line.separator\").toString());\n\n // key / value pairs\n for (Entry<String, String> entry : results.entrySet()) {\n builder.append(entry.getKey());\n builder.append(\",\");\n builder.append(entry.getValue());\n builder.append(System.getProperty(\"line.separator\").toString());\n }\n\n builder.deleteCharAt(builder.length() - 1);\n return builder.toString();\n }", "@java.lang.Override\n public com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema getCsv() {\n if (csvBuilder_ == null) {\n if (schemaCase_ == 6) {\n return (com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema) schema_;\n }\n return com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.getDefaultInstance();\n } else {\n if (schemaCase_ == 6) {\n return csvBuilder_.getMessage();\n }\n return com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.getDefaultInstance();\n }\n }", "public String getCSVData()\n {\n return (Integer.toString(this.getID()) + \",\" +\n this.getName());\n }", "public CSVExporter() {\n super(NAME, CONTENTTYPE);\n }", "public static void createCSV(Passengers passengers) {\n String csvFile = \"miles_per_existing_member_NEW.csv\";\n try {\n writer = new FileWriter(csvFile);\n \n \n \n Map<Long,Integer> Members = passengers.getMembers();\n \n writeLine(Arrays.asList(\"memberID\",\"miles\"));\n for(Map.Entry<Long, Integer> entry : Members.entrySet()) {\n writeLine(Arrays.asList( entry.getKey().toString() , entry.getValue().toString() ));\n }\n\n writer.flush();\n writer.close();\n } \n catch (IOException ex) {\n Logger.getLogger(CSVUtilities.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public String createTSV() throws IOException {\n\t\tStringBuilder sb = null;\n\t\tif (recordList != null) {\n\t\t\tsb = new StringBuilder();\n\t\t\tCSVPrinter csvPrinter = new CSVPrinter(sb, CSVFormat.TDF);\n\t\t\tfor (CSVRecord record : recordList) {\n\t\t\t\ttry {\n\t\t\t\t\tcsvPrinter.printRecord(record);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tcsvPrinter.close();\n\t\t\t\t\tthrow new IOException(\"cannot write record \", e);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcsvPrinter.close();\n\t\t}\n\t\treturn sb == null ? null : sb.toString();\n\t}", "@java.lang.Override\n public com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema getCsv() {\n if (schemaCase_ == 6) {\n return (com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema) schema_;\n }\n return com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.getDefaultInstance();\n }", "public void exportLocations(List<MyLocation> locationList) {\n\n StringBuilder data = new StringBuilder();\n // Adding File Header\n data.append(\"ID,Latitude,Longitude,Provider,startTime,endTime,accuracy,adminArea,countryCode,featureName,Locality,subAdminArea,addressLine,Interactions\");\n\n // Adding Data\n for(MyLocation location : locationList) {\n data.append(\"\\n\"\n +location.getId()+\",\"\n +location.getLatitude()+\",\"\n +location.getLongitude()+\",\"\n +location.getProvider()+\",\"\n +location.getStartTime()+\",\"\n +location.getEndTime()+\",\"\n +location.getAccuracy()+\",\"\n +location.getAdminArea()+\",\"\n +location.getCountryCode()+\",\"\n +location.getFeatureName()+\",\"\n +location.getLocality()+\",\"\n +location.getSubAdminArea()+\",\"\n +location.getAddressLine()+\",\"\n +location.getNumOfInteractions());\n }\n\n try{\n // Saving file onto device\n FileOutputStream out = context.openFileOutput(\"locations_export.csv\", Context.MODE_PRIVATE);\n out.write((data.toString()).getBytes());\n out.close();\n\n // Exporting\n File fileLocation = new File(context.getFilesDir(), \"locations_export.csv\");\n Uri path = FileProvider.getUriForFile(context, \"com.kdkvit.wherewasi.provider\", fileLocation);\n Intent fileIntent = new Intent(Intent.ACTION_SEND);\n fileIntent.setType(\"text/csv\");\n fileIntent.putExtra(Intent.EXTRA_SUBJECT, \"Data\");\n fileIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n fileIntent.putExtra(Intent.EXTRA_STREAM, path);\n context.startActivity(Intent.createChooser(fileIntent, \"Export CSV\"));\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void write(OutputStream out) throws Exception {\r\n\r\n\t\ttry {\r\n\r\n\t\t\tif (this.raf == null) {\r\n\r\n\t\t\t\tDataOutputStream outStream = new DataOutputStream(out);\r\n\r\n\t\t\t\tthis.header.numberOfRecords = v_records.size();\r\n\t\t\t\tthis.header.write(outStream);\r\n\r\n\t\t\t\t/* Now write all the records */\r\n\t\t\t\tint t_recCount = v_records.size();\r\n\t\t\t\tfor (int i = 0; i < t_recCount; i++) { /*\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * iterate through\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * records\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t */\r\n\r\n\t\t\t\t\tObject[] t_values = (Object[]) v_records.elementAt(i);\r\n\r\n\t\t\t\t\twriteRecord(outStream, t_values);\r\n\t\t\t\t}\r\n\r\n\t\t\t\toutStream.write(END_OF_DATA);\r\n\t\t\t\toutStream.flush();\r\n\t\t\t} else {\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * everything is written already. just update the header for\r\n\t\t\t\t * record count and the END_OF_DATA mark\r\n\t\t\t\t */\r\n\t\t\t\tthis.header.numberOfRecords = this.recordCount;\r\n\t\t\t\tthis.raf.seek(0);\r\n\t\t\t\tthis.header.write(this.raf);\r\n\t\t\t\tthis.raf.seek(raf.length());\r\n\t\t\t\tthis.raf.writeByte(END_OF_DATA);\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\tthrow new DBFException(e.getMessage());\r\n\t\t}\r\n\t}", "public static void writeQueriesToCSV(ArrayList<ArrayList<ArrayList<Double>>> query, String name) throws IOException {\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(name+\".csv\"));\r\n\t\tfor (int i=0; i<query.size();i++){\r\n\t\t\tint a=0;\r\n\t\t\tString entry=\"\";\r\n\t\t\tfor(a=0; a<query.get(i).size()-1;a++) {\r\n\t\t\t\tentry+=query.get(i).get(a).get(0) +\",\"+ query.get(i).get(a).get(1)+\",\" ;\t\r\n\t\t\t}\r\n\t\t\tentry+= query.get(i).get(a).get(0)+\",\" +\";\";\r\n\t\t\twriter.write(entry);\r\n\t\t\twriter.newLine();\r\n\r\n\t\t} \t\t\twriter.flush();\r\n\t\t\t\t\twriter.close();}", "public void writeToFileCSV(InputStream uploadedInputStream,\n String uploadedFileLocation) throws Exception {\n\n OutputStream out = null;\n try {\n int read = 0;\n byte[] bytes = new byte[1024];\n\n out = new FileOutputStream(new File(uploadedFileLocation));\n while ((read = uploadedInputStream.read(bytes)) != -1) {\n out.write(bytes, 0, read);\n }\n }\n finally{\n if (out != null) {\n out.flush();\n out.close();\n }\n }\n }", "public void closeCsvFile()\n{\n try {\n \n fileWriter.flush(); \n fileWriter.close(); \n \n } catch (IOException e) { \n \n System.out.println(\"Error while flushing/closing fileWriter !!!\"); \n e.printStackTrace(); \n } \n \n}", "@Override\n\t\tprotected void writeStreamHeader() throws IOException {\n\t\t}", "private void fechaBuffer() {\n\t\tif (buffer != null){\n\t\t\ttry {\n\t\t\t\tbuffer.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"[ERRO] Erro ao fechar stream do arquivo csv.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void saveStage1(String format)\n {\n super.saveStage1(format);\n try{\n writer.write(\"CB336\");\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(33).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(34).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(35).getText()));\n writer.write(\"\\r\\n\");\n\n writer.write(\"CB714\");\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(36).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(37).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(38).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(39).getText())); \n writer.close();\n }\n catch(IOException e){\n JOptionPane.showMessageDialog(null, \"Error in exporting file\", \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n }", "public void createCSV(ArrayList<String> result, String output){\t\r\n\t\ttry{\r\n\t\t\tFileOutputStream fileOutputStream = new FileOutputStream(output);\r\n\t\t\tOutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream, \"MS949\");\r\n\t\t\tBufferedWriter fw = new BufferedWriter(outputStreamWriter);\r\n\t\t\tfor(String line : result){\r\n\t\t\t\tfw.write(line+\"\\n\");\r\n\t\t\t}\r\n\t\t\tfw.flush();\r\n\t\t\tfw.close();\r\n\t\t}catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\t// if(StringUtils.isNotEmpty(empId)) {\n\t\t\t\t// filePath += \"/\" + empId;\n\t\t\t\t// }\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(EMPLOYEE_DETAIL_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\t// Write a new student object list to the CSV file\n\t\t\t\t\tfor (EmployeeDTO transaction : content) {\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\t// log.debug(\"Writing transaction record for Employee id :\"+\n\t\t\t\t\t\t// transaction.getEmployeeEmpId());\n\t\t\t\t\t\trecord.add(transaction.getEmpId());\n\t\t\t\t\t\trecord.add(transaction.getName());\n\t\t\t\t\t\trecord.add(transaction.getDesignation());\n\t\t\t\t\t\trecord.add(transaction.getManagerName());\n\t\t\t\t\t\trecord.add(transaction.getProjectName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getActive());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "public ArrayList<String> toCSV() {\n ArrayList<String> record = new ArrayList<>();\n record.add(Double.toString(getLocation().getLatitude()));\n record.add(Double.toString(getLocation().getLongitude()));\n record.add(getName());\n return record;\n }" ]
[ "0.5819185", "0.5805892", "0.5756761", "0.57003576", "0.5567343", "0.55664027", "0.54749554", "0.5462708", "0.5423026", "0.53906614", "0.53898597", "0.537499", "0.5374974", "0.53614044", "0.5327506", "0.5323045", "0.53080523", "0.52709347", "0.5249778", "0.52437675", "0.5229931", "0.5225059", "0.52234375", "0.5213345", "0.5210896", "0.5210094", "0.5196208", "0.51872116", "0.5129249", "0.5113921", "0.5113221", "0.5110873", "0.5107247", "0.5097697", "0.5092263", "0.5075125", "0.506782", "0.5060557", "0.5059877", "0.5055973", "0.5050695", "0.504825", "0.5043003", "0.5036133", "0.50168097", "0.5008712", "0.500553", "0.49950594", "0.4994309", "0.49772525", "0.49749097", "0.49635074", "0.49550033", "0.49539953", "0.4947324", "0.4934952", "0.49316213", "0.49214333", "0.49061507", "0.48976153", "0.4897012", "0.4863754", "0.48549178", "0.4851258", "0.48474708", "0.48407423", "0.48382592", "0.48199213", "0.47981122", "0.47927287", "0.47852758", "0.47803017", "0.4779315", "0.47608212", "0.47456524", "0.47454154", "0.47426194", "0.47381872", "0.472778", "0.4724276", "0.47201648", "0.4714856", "0.4711654", "0.47096407", "0.47081575", "0.46986556", "0.46967304", "0.4683819", "0.46832013", "0.4670771", "0.46639526", "0.46573025", "0.46571586", "0.4645581", "0.4636757", "0.46361688", "0.46285453", "0.46225885", "0.4618714", "0.46165055" ]
0.5702173
3
Formats a value in in the CSV style.
private String formatCSV(String value){ return value.replaceAll("\"","\"\""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getDataInCSV() {\n return String.format(Locale.US, \"%d,%s\", this.timestamp, this.getStatusString());\n }", "String toCSVString();", "public String csvEscapeString(String value){\n\t\tif(value==null)\n\t\t\tvalue=\"\";\n\t\treturn value.replaceAll(\"\\\"\", \"'\");\n\t}", "public void formatValue(ElementFormatter elemFormatter, Row row, String ordinalValue, CallingContext cc) throws ODKDatastoreException;", "private String getCSVSeparator(){\n DecimalFormatSymbols s = new DecimalFormatSymbols(getLocale());\n if(s.getDecimalSeparator() == ',')\n return \";\";\n else\n return \",\";\n }", "public String delimitValue(String value){\n\t\tif(value==null)\n\t\t\tvalue=\"\";\n\t\tvalue = csvEscapeString(value);\n\t\treturn \"\\\"\" + value + \"\\\"\";\n\t}", "public String getCSVString() {\n return getId() + \",\" + noOfRounds + \",\" + caliber + \",\" + manufacturer + \",\" + price;\n }", "public static String csvFormat(RowData data, RowData.FieldGetter[] fieldGetters,\n Map<String, String> labels, String fieldDelimiter) {\n StringJoiner result = csvFormatForLabels(labels, fieldDelimiter);\n for (int i = 0; i < data.getArity(); i++) {\n Object value = fieldGetters[i].getFieldOrNull(data);\n result.add(value != null ? value.toString() : NULL_VALUE);\n }\n return result.toString();\n }", "protected String formatValue (Object value)\n {\n return String.valueOf(value);\n }", "public String toCsvRow() {\r\n\t return Stream.of(String.valueOf(TxnsRefNo),Description)\r\n\t .map(value -> value.replaceAll(\"\\\"\", \"\\\"\\\"\"))\r\n\t .map(value -> Stream.of(\"\\\"\", \",\").anyMatch(value::contains) ? \"\\\"\" + value + \"\\\"\" : value)\r\n\t .collect(Collectors.joining(\",\"));\r\n\t}", "public String format(Object value);", "private void writeCsv(float[] vals, String stimulus, PrintWriter outfile) throws FileNotFoundException {\n for (int i = 0; i < vals.length; i++) {\n outfile.append(vals[i] + \",\");\n }\n outfile.append(stimulus);\n outfile.append(\"\\n\");\n\n }", "@Override\r\n public Object formatValue(Object value) {\r\n return value;\r\n }", "public String[] toCsv();", "R format(O value);", "public static String csvFormat(Object data, Map<String, String> labels, String fieldDelimiter) {\n StringJoiner result = csvFormatForLabels(labels, fieldDelimiter);\n result.add(data == null ? NULL_VALUE : data.toString());\n return result.toString();\n }", "public String getCSVString() {\n StringBuilder builder = new StringBuilder();\n\n // key / value header\n builder.append(\"key,\\tvalue\");\n builder.append(System.getProperty(\"line.separator\").toString());\n\n // key / value pairs\n for (Entry<String, String> entry : results.entrySet()) {\n builder.append(entry.getKey());\n builder.append(\",\");\n builder.append(entry.getValue());\n builder.append(System.getProperty(\"line.separator\").toString());\n }\n\n builder.deleteCharAt(builder.length() - 1);\n return builder.toString();\n }", "CSV createCSV();", "String[] toCSV() throws Exception;", "@Override\n\tpublic void exportToCSV() {\n\n\t}", "private String array2CSV(){\r\n String returnMsg = \"\";\r\n for(String[] line : this.linesToPrint){\r\n for(String item : line){\r\n returnMsg += item;\r\n returnMsg += \";\";\r\n }\r\n returnMsg = returnMsg.substring(0,returnMsg.length()-1);\r\n returnMsg += \"\\n\";\r\n }\r\n return returnMsg;\r\n }", "public StringBuffer format(double val, StringBuffer toAppendTo, FieldPosition pos) {\n\t\t\treturn formattedStringBuffer( val );\n }", "public String toCSV() {\n // conflict count, time (seconds), Board Count\n return String\n .format(\"%d,%f,%d\\n\", BoardState.countConflicts(board.getBoard()), time * 0.000000001, BoardState.COUNT);\n }", "@Override\n protected String formatValue(Object value) {\n String formatted = \"float\".equals(format) ? formatWithDigits(value, this.digits) : String.valueOf(value);\n return formatted + \" \" + this.unitText;\n }", "String getValueFormatted();", "public void writeCSVLine(int[] entries) {\n\t\tint size = entries.length;\n\t\tString[] convertedEntries = new String[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tconvertedEntries[i] = Integer.toString(entries[i]);\n\t\t}\n\t\twriter.writeNext(convertedEntries);\n\t}", "private StringBuffer formattedStringBuffer( final double value ) {\n\t\t\tStringBuffer strb = new StringBuffer(\" \");\n\t\t\tif (barColumns != null && barColumns.size() > 0) {\n\t\t\t\tint ind = (int) Math.round(value - 1.0);\n\t\t\t\t//System.out.println(\"debug ind=\" + ind);\n\t\t\t\tif (ind >= 0 && ind < barColumns.size()) {\n\t\t\t\t\tstrb.append( barColumns.get( ind ).marker() );\n\t\t\t\t} else {\n\t\t\t\t\tstrb.append(emptyStr);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstrb.append(emptyStr);\n\t\t\t}\n\n\t\t\t//System.out.println(\"debug strb=\" + strb);\n\n\t\t\tstrb.append(\" \");\n\n\t\t\treturn strb;\n\t\t}", "public void exportToCSV();", "private String format(boolean showTimeSpans, double value){\n\t\tNumberFormat numberForm = NumberFormat.getInstance(locale);\n\t\tString out = numberForm.format(value);\n\t\tif(showTimeSpans && value < 0.0) \t\t\t\t\tout += \"\";\n\t\telse if(showTimeSpans && value >= Long.MAX_VALUE) \tout += \"\";\n\t\telse if(showTimeSpans){\n\t\t\tout = this.format(new TimeSpan(value));\n\t\t}\n\t\treturn out;\n\t}", "@Override\n public String getFormattedValue(float value, Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler) {\n return \"\";\n }", "@Override\n\tprotected String objectToCSVRecord(Object object) {\n\t\tStringBuilder str = new StringBuilder();\n\t\tstr.append(((Item) object).getItemno());\n\t\tstr.append(\",\");\n\t\tstr.append(((Item) object).getItemName());\n\t\tstr.append(\",\");\n\t\tstr.append(((Item) object).getUnitPrice());\n\t\tstr.append(\",\");\n \tString one=str.toString();\n \treturn one;\n\t\t\n\t\t \n\t}", "public void createCsvString(StringBuilder builder, Category e) {\r\n\r\n\t\tbuilder.append(\"\\\"\"\r\n\t\t\t\t+ (e.getName() != null ? e.getName().replace(\",\", \"\") : \"\")\r\n\t\t\t\t+ \"\\\",\");\r\n\r\n\t\tbuilder.append(\"\\r\\n\");\r\n\t}", "String getValueFormat();", "String format(T value);", "public String getCSVData()\n {\n return (Integer.toString(this.getID()) + \",\" +\n this.getName());\n }", "public void createCsvString(StringBuilder builder, Frequency e) {\r\n\r\n\t\tbuilder.append(\"\\\"\"\r\n\t\t\t\t+ (e.getName() != null ? e.getName().replace(\",\", \"\") : \"\")\r\n\t\t\t\t+ \"\\\",\");\r\n\r\n\t\tbuilder.append(\"\\\"\"\r\n\t\t\t\t+ (e.getQtyPerDay() != null ? e.getQtyPerDay() : \"\") + \"\\\",\");\r\n\r\n\t\tbuilder.append(\"\\r\\n\");\r\n\t}", "public static void csvWrite(FileWriter csvWriter, String[] data) {\n try {\n for(int j = 0; j < data.length; j++) {\n if(j < data.length -1) {\n csvWriter.write(data[j] + \", \");\n } else {\n csvWriter.write(data[j] + \"\\n\");\n }\n }\n } catch (IOException e) {\n System.out.println(\"Writing error: \" + e.getMessage());\n }\n }", "public void createCSV() {\n\t\t// Need to integrate CSV calling logic\n\t}", "public static String format(Object val, String pattern, char groupsepa, char decimalsepa)\n {\n if(val == null)\n {\n\t return \"\";\n } \n try\n {\n\t DecimalFormat _df = new DecimalFormat();\n\t _df.setRoundingMode(RoundingMode.HALF_UP);\n\t _df.applyPattern(pattern);\n\n\t String standardFrmt = _df.format(val);\n\t // need first to replace by #grpSep# so that in case the group separator is equal to dot . the replacement will be correct\n\t String returnFrmt = standardFrmt.replace(\",\",\"#grp#\");\n\t returnFrmt = returnFrmt.replace(\".\",decimalsepa+\"\");\n\t returnFrmt = returnFrmt.replace(\"#grp#\",groupsepa+\"\");\n\t return returnFrmt;\n\n }\n catch(Exception ex)\n {\n\t log.error(ex, \"[NumberUtil] Error caught in method format\");\n\t return \"\";\n }\n}", "public String toCSVString() {\n return pokeNumber + \",\" +\n pokeName + \",\" +\n pokeType_1 + \",\" +\n pokeType_2 + \",\" +\n total + \",\" +\n hitPoints + \",\" +\n attackPoints + \",\" +\n defensePoints + \",\" +\n specAtkPoints + \",\" +\n specDefPoints + \",\" +\n pokeSpeed + \",\" +\n pokeGeneration + \",\" +\n legendaryStatus;\n }", "private void writePzIntoCsv(double[] vals, PrintWriter outfile) {\n for (int i = 0; i < vals.length; i++) {\n outfile.append(vals[i] + \",\");\n }\n //outfile.append(stimulus);\n outfile.append(\"\\n\");\n }", "private static String format(String value) {\n String result = value;\n if (result.contains(\"\\\"\")) {\n result = result.replace(\"\\\"\", \"\\\"\\\"\");\n }\n return result;\n\n }", "@Override\r\n\t\t\t\tpublic String textFormatter(String value) {\n\t\t\t\t\tString label = \"(\" + value + \")\";\r\n\t\t\t\t\treturn (label);\r\n\t\t\t\t}", "public String toString() {\n/* 46 */ return ModelUtil.toCommaSeparatedList((Object[])getValue());\n/* */ }", "@Override\n public String getFormattedValue(float value, AxisBase axis) {\n try {\n return dateFormat.parse(\"\" + value).toString();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void buildCsvFormatData(List<BulkRequestItem> exceptionBulkRequestItems, StringBuilder csvFormatDataBuilder) {\n for (BulkRequestItem bulkRequestItem : exceptionBulkRequestItems) {\n csvFormatDataBuilder.append(\"\\n\");\n csvFormatDataBuilder.append(bulkRequestItem.getItemBarcode()).append(\",\");\n csvFormatDataBuilder.append(bulkRequestItem.getCustomerCode()).append(\",\");\n csvFormatDataBuilder.append(bulkRequestItem.getRequestId()).append(\",\");\n csvFormatDataBuilder.append(bulkRequestItem.getRequestStatus()).append(\",\");\n csvFormatDataBuilder.append(StringEscapeUtils.escapeCsv(bulkRequestItem.getStatus()));\n }\n }", "public void writeLine(List<String> values) throws Exception {\n boolean firstVal = true;\n for (String val : values) {\n if (!firstVal) {\n dataWriter.write(\",\");\n }\n //dataWriter.write(\"\\\"\");\n for (int i=0; i<val.length(); i++) {\n char ch = val.charAt(i);\n if (ch=='\\\"') {\n dataWriter.write(\"\\\"\"); //extra quote\n }\n dataWriter.write(ch);\n }\n //dataWriter.write(\"\\\"\");\n firstVal = false;\n }\n dataWriter.write(\"\\n\");\n dataWriter.flush();\n }", "public void createCsvString(StringBuilder builder, MarketingMessageMetrics e) {\r\n\r\n\t\tbuilder.append(\"\\\"\"\r\n\t\t\t\t+ (e.getDateClicked() != null ? e.getDateClicked() : \"\")\r\n\t\t\t\t+ \"\\\",\");\r\n\r\n\t\tbuilder.append(\"\\\"\"\r\n\t\t\t\t+ (e.getMessageTranslation() != null ? e\r\n\t\t\t\t\t\t.getMessageTranslation().getDisplayName().replace(\",\",\r\n\t\t\t\t\t\t\t\t\"\") : \"\") + \"\\\",\");\r\n\r\n\t\tbuilder.append(\"\\r\\n\");\r\n\t}", "@Override\n protected void accept(ParameterVisitor visitor, Object value) {\n if (FormatType.INTEGRAL.canFormat(value)) {\n visitor.visit(value, FormatChar.DECIMAL, WITH_GROUPING);\n } else if (FormatType.FLOAT.canFormat(value)) {\n // Technically floating point formatting via {0} differs from \"%,f\", but as \"%,f\" results in\n // more precision it seems better to mimic \"%,f\" rather than discard both precision and type\n // information by calling visitPreformatted().\n visitor.visit(value, FormatChar.FLOAT, WITH_GROUPING);\n } else if (value instanceof Date) {\n // MessageFormat is not thread safe, so we always clone().\n String formatted = ((MessageFormat) prototypeMessageFormatter.clone())\n .format(new Object[] {value}, new StringBuffer(), null /* field position */)\n .toString();\n visitor.visitPreformatted(value, formatted);\n } else if (value instanceof Calendar) {\n visitor.visitDateTime(value, DateTimeFormat.DATETIME_FULL, getFormatOptions());\n } else {\n visitor.visit(value, FormatChar.STRING, getFormatOptions());\n }\n }", "@Override\n\tprotected String objectToCSVRecord(Object object) {\n\t\tStringBuilder str = new StringBuilder();\n\t\tstr.append(((Customer) object).getCustomerId());\n\t\tstr.append(\",\");\n\t\tstr.append(((Customer) object).getCustomerName());\n\t\tstr.append(\",\");\n\t\tstr.append(((Customer) object).getCustomerAddress());\n\t\tstr.append(\",\");\n\t\tstr.append(((Customer) object).getCustomeremail());\n \tString one=str.toString();\n \treturn one;\n\t}", "@Override\n public String getFormattedValue(float value, AxisBase axis) {\n return mFormat.format(new Date((long) value));\n }", "@Override\n\tpublic Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) \n\t{\n\t\tif (value instanceof Double) {\n\t\t\tvalue = CURRENCY_FORMAT.format(value);\n\t\t}\n\t\treturn super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);\n\t}", "public static String getDisplayCurrencyFormat(double val) {\n\n\t\tjava.text.NumberFormat format = new java.text.DecimalFormat(\n\t\t\t\t\"###,###.##\");\n\t\tformat.setMaximumFractionDigits(2);\n\n\t\treturn format.format(val);\n\n\t}", "static double formatNumber(double d) {\n\tDecimalFormat df= new DecimalFormat(COMMA_SEPERATED);\n\tSystem.out.println(\"number \"+df.format(d));\n\treturn d;\n\t\n\t\n\t}", "@NotNull\n protected String format(@NotNull final Object value) {\n return value != null\n ? value.toString()\n : \"\";\n }", "public String formatDoubles(double value) {\r\n\t\treturn String.format(\"%-5.1f\", value);\r\n\t}", "void createCsv(String location);", "public String CurrencyFormatter(double val) {\n\n\n NumberFormat nf = NumberFormat.getCurrencyInstance();\n DecimalFormatSymbols decimalFormatSymbols = ((DecimalFormat) nf).getDecimalFormatSymbols();\n decimalFormatSymbols.setCurrencySymbol(\"\");\n ((DecimalFormat) nf).setDecimalFormatSymbols(decimalFormatSymbols);\n String ft=nf.format(val).trim();\n return ft;\n\n }", "public void outputToCSV() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"test_data.csv\", \"UTF-8\");\n\n //For every object in array list, print surname, initials and extension, separated by commmas\n for (int i=0; i<toArrayList().size(); i++) {\n writer.println(toArrayList().get(i).getSurname() + \",\" + toArrayList().get(i).getInitials() + \",\" +\n toArrayList().get(i).getExtension());\n }\n writer.close();\n }", "public static String csvFormat(JsonNode data, Map<String, String> labels, String fieldDelimiter) {\n StringJoiner result = csvFormatForLabels(labels, fieldDelimiter);\n Iterator<Entry<String, JsonNode>> iterator = data.fields();\n while (iterator.hasNext()) {\n Entry<String, JsonNode> kv = iterator.next();\n result.add(kv.getValue() != null ? kv.getValue().asText() : NULL_VALUE);\n }\n return result.toString();\n }", "public static String getTableDataInCSVFormat(final TableModel inputTableModel) {\r\n\t\t\r\n\t\tfinal StringBuffer output = new StringBuffer();\r\n\t\tfinal int totalRows = inputTableModel.getRowCount();\r\n\t\tfinal int totalColumns = inputTableModel.getColumnCount();\r\n\t\t\r\n\t\tif (totalRows < 1) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tfor (int currentRow = 0; currentRow < totalRows; currentRow++) {\r\n\r\n\t\t\tfor (int currentColumn = 0; currentColumn < totalColumns; currentColumn++) {\r\n\t\t\t\toutput.append(inputTableModel.getValueAt(currentRow, currentColumn));\r\n\t\t\t\t// Append a ',' but not for the last value\r\n\t\t\t\tif (currentColumn != totalColumns - 1) {\r\n\t\t\t\t\toutput.append(',');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Append a new line, but not for the last line\r\n\t\t\tif (currentRow != totalRows - 1) {\r\n\t\t\t\toutput.append('\\n');\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn output.toString();\r\n\r\n\t}", "@Override\n public String getFormattedValue(float value, AxisBase axis) {\n return mValues.get((int) value);\n }", "public static String formatAsCSV(String jsonData){\n String csvData = \"\";\n try {\n JSONParser parser = new JSONParser();\n JSONArray records = null;\n String headerRow = \"\";\n String dataRows = \"\";\n \n String[] arrColNames = {\"recordType\",\"project\",\"projectId\",\"projectName\",\"projectLeadUser\",\"issueKey\",\"issueId\",\"issueCreated\",\"issueUpdated\",\"issueCreatorUserName\",\"issueDueDate\",\"issueRemainingEstimate\",\"issueOriginalEstimate\",\"issuePriority\",\"issueReporter\",\"issueStatus\",\"issueTotalTimeSpent\",\"issueVotes\",\"issueWatches\",\"issueResolution\",\"issueResolutionDate\",\"commentId\",\"commentAuthor\",\"commentAuthorKey\",\"commentCreated\",\"commentUpdated\",\"commentUpdateAuthor\",\"worklogId\",\"worklogAuthor\",\"worklogAuthorKey\",\"worklogCreated\",\"worklogStarted\",\"worklogUpdated\",\"worklogTimeSpent\",\"commentText\",\"worklogText\"};\n List<String>colNames = Arrays.asList(arrColNames);\n \n for(int i=0;i<colNames.size();i++)\n {\n headerRow += colNames.get(i) + \",\";\n }\n headerRow = headerRow.replaceAll(\",$\",\"\\n\");\n \n Object obj = parser.parse(jsonData);\n JSONObject jsonValue = (JSONObject) obj;\n records = (JSONArray) jsonValue.get(\"records\");\n Iterator iterRecords = records.iterator();\n \n while(iterRecords.hasNext())\n {\n JSONObject thisRecord = (JSONObject) iterRecords.next();\n String strRecord = \"\";\n for(int i=0;i<colNames.size();i++)\n {\n String thisColName = colNames.get(i);\n strRecord += \"\\\"\" + (String) thisRecord.get(thisColName) + \"\\\",\";\n }\n strRecord = strRecord.replaceAll(\",$\", \"\\n\");\n dataRows += strRecord;\n }\n \n csvData = headerRow + dataRows;\n \n } catch (Exception ex) {\n System.out.println(\"Error in formatAsCSV: \" + ex.getMessage());\n csvData = \"ERROR\";\n }\n System.out.println(\"\\ncsvData:\");\n System.out.println(csvData); \n return csvData;\n }", "private static void writeRow(PrintStream out, String[] row) {\n for (int i = 0; i < row.length; i++)\n assert row[i].indexOf(',') < 0; // quoting not supported here\n\n out.println(Stream.of(row).collect(Collectors.joining(\",\")).toString());\n }", "@Override\r\n\t\t\t\tpublic String textFormatter(String value) {\n\t\t\t\t\tDouble tmp = Double.parseDouble(value);\r\n\t\t\t\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\r\n\t\t\t\t\tString label = df.format(tmp).toString();\r\n\t\t\t\t\treturn (label);\r\n\t\t\t\t}", "public static void CSVExport(String output, LinkedList<Patient> src, boolean[] shouldEx) {\n\t\tExportSepValuesFile(output, src, \",\", shouldEx);\n\t}", "public StringBuffer format(com.ibm.icu.math.BigDecimal number, StringBuffer toAppendTo, FieldPosition pos)\n/* */ {\n/* 1162 */ return format(number.doubleValue(), toAppendTo, pos);\n/* */ }", "@Override\n\tprotected String formatted(Walue _) {\n\t\treturn \"\";\n\t}", "private StringBuffer formattedStringBuffer( final long value ) {\n\t\t\treturn formattedStringBuffer( (double)value );\n\t\t}", "public void setFormat(String value) {\n/* 198 */ setValue(\"format\", value);\n/* */ }", "static String formatString(Timestamp value) {\n return formatString(value, null, true, true, 0);\n }", "private Result outputCsv(Request request, Entry entry) throws Exception {\r\n Result result = getCsvResult(request, entry);\r\n result.setReturnFilename(\r\n IOUtil.stripExtension(getStorageManager().getFileTail(entry))\r\n + \".csv\");\r\n result.setMimeType(\"text/csv\");\r\n\r\n return result;\r\n }", "public static void writeCSV(Collection<? extends CSVable> src, File to) throws IOException {\r\n\t\tfinal String SYSTEM_LINE_END = System.getProperty(\"line.separator\");\r\n\t\t\r\n\t\tFileWriter fw = null;\r\n\t\tBufferedWriter bw = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Create the file if it doesn't exist yet\r\n\t\t\tif ( ! to.exists() ) {\r\n\t\t\t\tto.createNewFile();\r\n\t\t\t}\r\n\r\n\t\t\tfw = new FileWriter(to.getAbsoluteFile(), false);\r\n\t\t\tbw = new BufferedWriter(fw);\r\n\r\n\t\t\tsynchronized (src) {\r\n\t\t\t\tfor ( CSVable obj : src ) {\r\n\t\t\t\t\tbw.write(obj.toCSVRow() + SYSTEM_LINE_END);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (bw != null) {\r\n\t\t\t\t\tbw.close();\r\n\t\t\t\t}\r\n\t\t\t\tif (fw != null) {\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (IOException e) {\r\n\t\t\t\tSystem.err.println(\"I'm having really bad luck today - I couldn't even close the CSV file!\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public ArrayList<String> toCSV() {\n ArrayList<String> record = new ArrayList<>();\n record.add(Double.toString(getLocation().getLatitude()));\n record.add(Double.toString(getLocation().getLongitude()));\n record.add(getName());\n return record;\n }", "static public String getListAsCSV(List<String> list) {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\r\n\t\tif (list != null) {\r\n\t\t\tfor (Iterator<String> i = list.iterator(); i.hasNext();) {\r\n\t\t\t\tString str = i.next();\r\n\r\n\t\t\t\t// If the string contains a slash make it appear as \\\\ in the\r\n\t\t\t\t// protocol\r\n\t\t\t\t// 1 slash in Java/regex is \\\\\\\\\r\n\t\t\t\tstr = str.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\");\r\n\t\t\t\tstr = str.replaceAll(\",\", \"\\\\\\\\,\");\r\n\t\t\t\tsb.append(str);\r\n\r\n\t\t\t\tif (i.hasNext()) {\r\n\t\t\t\t\tsb.append('\\\\');\r\n\t\t\t\t\tsb.append(',');\r\n\t\t\t\t\tsb.append(\" \");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn sb.toString();\r\n\t}", "public final void updateFormat(CsvFormat format) {\n\t\tnewLine = format.getNormalizedNewline();\n\t\tmultiDelimiter = format.getDelimiterString().toCharArray();\n\t\tif (multiDelimiter.length == 1) {\n\t\t\tmultiDelimiter = null;\n\t\t\tdelimiter = format.getDelimiter();\n\t\t\tdelimiters = new char[]{delimiter, newLine};\n\t\t} else {\n\t\t\tdelimiters = new char[]{multiDelimiter[0], newLine};\n\t\t}\n\t\tquote = format.getQuote();\n\t\tquoteEscape = format.getQuoteEscape();\n\t\tescapeEscape = format.getCharToEscapeQuoteEscaping();\n\t}", "@Override\n public String getFormattedValue(float value, Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler) {\n return mFormat.format((int)value) + \" kcal\"; // e.g. append a dollar-sign\n }", "public static String toCSV(String[][] table){\n\n\t\tif(table == null || table.length == 0){\n\t\t\treturn \"null\";\n\t\t}\n\t\t\n\t\t\n\t\tStringBuilder str = new StringBuilder();\n\n\t\tfor(int rows = 0; rows < table.length; rows++){\n\t\t\tfor(int columns = 0; columns < table[0].length; columns++){\n\t\t\t\tstr.append(\"'\"+table[rows][columns]+\"'\");\n\t\t\t\t\n\t\t\t\tif(columns < table[0].length-1){\n\t\t\t\t\tstr.append(',');\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\tstr.append(\"\\n\");\n\t\t}\n\n\t\treturn str.toString();\n\t}", "public static String multiFormatNumber(Number theValue, String format, String groupSep, String decimalSep) throws BaseException\n {\n try\n {\n \tString result = null;\n \tNumber value = theValue;\n \tDecimalFormat _df = new DecimalFormat();\n \t_df.setRoundingMode(RoundingMode.HALF_UP);\n \tif(format.indexOf(\";\") == -1)\n \t{\n \t _df.applyPattern(format);\n\t result = _df.format(value);\n\t \n \t}\n \telse\n \t{\n\n \t String[] formatting = null;\n \t String[] formatType = { \"posFrmt\", \"negFrmt\", \"zeroFrmt\", \"nullFrmt\" };\n \t HashMap<String,String> formatMap = new HashMap<String,String>();\n \t formatting = format.split(\";\");\n\n \t for(int i = 0; i < formatting.length; i++)\n \t {\n \t\tformatMap.put(formatType[i], formatting[i]);\n \t }\n\n \t \n \t if(value == null)\n \t {\n \t\tif(formatMap.get(\"nullFrmt\") != null)\n \t\t{\n \t\t _df.applyPattern(formatMap.get(\"nullFrmt\"));\n \t\t result = _df.format(0);\n \t\t}\n \t }\n \t else\n \t {\n \t\tDouble valDouble = value.doubleValue();\n \t\tif(valDouble > 0)\n \t\t{\n \t\t if(formatMap.get(\"posFrmt\") != null)\n \t\t {\n \t\t\t_df.applyPattern(formatMap.get(\"posFrmt\"));\n \t\t\tresult = _df.format(value);\n \t\t }\n \t\t}\n \t\telse if(valDouble < 0)\n \t\t{\n \t\t if(formatMap.get(\"negFrmt\") != null)\n \t\t {\n \t\t\t_df.applyPattern(formatMap.get(\"negFrmt\"));\n \t\t\tvalue = Math.abs(valDouble);\n \t\t\tresult = _df.format(value);\n \t\t }\n \t\t}\n \t\telse if(valDouble == 0)\n \t\t{\n \t\t if(formatMap.get(\"zeroFrmt\") == null)\n \t\t {\n \t\t\t_df.applyPattern(formatMap.get(\"posFrmt\"));\n \t\t }\n \t\t else\n \t\t {\n \t\t\t_df.applyPattern(formatMap.get(\"zeroFrmt\")); \t\t\t\n \t\t }\n \t\t result = _df.format(valDouble);\n \t\t}\n \t }\n \t}\n \t\n \tString returnFrmt = null;\n \tif(result != null)\n \t{\n \t String theGrpSep = groupSep;\n \t String theDecSep = decimalSep;\n \t if(theGrpSep == null || theGrpSep.isEmpty() || theDecSep == null || theDecSep.isEmpty())\n \t {\n \t\t// return group and decimal separator from session if any\n \t\tString[] grpDecArr = returnGroupDecimalSep();\n \t\tif(theGrpSep == null || theGrpSep.isEmpty())\n \t\t{\n \t\t theGrpSep = grpDecArr[0];\n \t\t}\n \t\tif(theDecSep == null || theDecSep.isEmpty())\n \t\t{\n \t\t theDecSep = grpDecArr[1];\n \t\t}\n \t }\n \t // need first to replace by #grpSep# so that in case the group separator is equal to dot . the replacement will be correct\n \t returnFrmt = result.replace(\",\",\"#grp#\");\n \t returnFrmt = returnFrmt.replace(\".\",theDecSep+\"\");\n \t returnFrmt = returnFrmt.replace(\"#grp#\",theGrpSep+\"\");\n \t}\n\t \n\t return returnFrmt;\n }\n catch(Exception e)\n {\n \t throw new BaseException(e);\n }\n }", "private String format(TimeSpan value){\n\t\tString out = \"\";\n\t\tif(value == null){\n\t\t\tfor(int j=this.timeSpanForm.length-1; j>=0; j--){\n\t\t\t\tif(this.timeSpanForm[j]) out += TimeUnit.values()[j]+\":\";\n\t\t\t}\n\t\t\tout = out.substring(0, out.length()-2);\n\t\t}else{\n\t\t\tfor(int j=this.timeSpanForm.length-1; j>=0; j--){\n\t\t\t\tif(this.timeSpanForm[j]){\n\t\t\t\t\tif(this.timeSpanForm[j-1])\n\t\t\t\t\t\tout += value.getTimeTruncated(TimeUnit.values()[j])+\":\";\n\t\t\t\t\telse\n\t\t\t\t\t\tout += value.getTimeAsDouble(TimeUnit.values()[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}", "public CSVCustomFormat getCustomFormatData() {\n return csvCustomFormat.getValue();\n }", "public static String arrayListToCSV(List<String> list) {\n StringBuilder csv = new StringBuilder();\n for (String str : list) {\n csv.append(str);\n csv.append(\",\");\n }\n int lastIndex = csv.length() - 1;\n char last = csv.charAt(lastIndex);\n if (last == ',') {\n return csv.substring(0, lastIndex);\n }\n return csv.toString();\n }", "public String compile(String separator, NumberFormat numberFormat) {\r\n\t\t// set up header\r\n\t\tString content = \"'Format=4\" + System.lineSeparator();\r\n\t\t\r\n\t\tif(header.checkUnit.length() > 0) {\r\n\t\t\tcontent += \"'CheckUnit=\" + header.checkUnit + System.lineSeparator(); // implied by format=4\r\n\t\t}\r\n\t\tif(header.checkPlausibility.length() > 0) {\r\n\t\t\tcontent += \"'CheckPlausibility=\" + header.checkPlausibility + System.lineSeparator();\t\r\n\t\t}\r\n\t\tif(header.source.length() > 0) {\r\n\t\t\tcontent += \"'Source=\" + header.source + System.lineSeparator();\r\n\t\t}\r\n\t\tif(header.timeZone.length() > 0) {\r\n\t\t\tcontent += \"'TimeZone=\" + header.timeZone + System.lineSeparator();\r\n\t\t}\r\n\t\t\r\n\t\t// compile rows\r\n\t\tfor(Row row : rows) {\r\n\t\t\tcontent += row.toCsv(separator, numberFormat);\r\n\t\t}\r\n\t\t\r\n\t\treturn content;\r\n\t}", "public static String toCsv(List<String> list) {\r\n\t\tString res = \"\";\r\n\t\tIterator<String> it = list.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tres += it.next();\r\n\t\t\tif (it.hasNext()) {\r\n\t\t\t\tres += \", \";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "public StringBuffer toStringCSV( Date fechaCierre ) {\n \tStringBuffer respuesta \t\t= new StringBuffer();\n \tfinal String COMA = \",\";\n \tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n \t//llenar el string buffer\n \trespuesta.append(this.numContrato\t \t\t!= null ? this.numContrato : \"\");\n \trespuesta.append(COMA);\n \trespuesta.append(this.producto \t\t\t\t!= null ? this.producto : \"\");\n \trespuesta.append(COMA);\n \trespuesta.append(fechaCierre \t\t\t\t!= null ? sdf.format(fechaCierre) : \"Fecha Invalida\"); //Dia Pago\n \trespuesta.append(COMA);\n \trespuesta.append(this.numGrupo\t\t\t\t!= null ? this.numGrupo : \"\");\n \trespuesta.append(COMA);\n \trespuesta.append(this.nombreGrupo\t\t\t!= null ? this.nombreGrupo : \"\");\n \trespuesta.append(COMA);\n \trespuesta.append(this.pagadoCapital\t\t\t!= null ? this.pagadoCapital.doubleValue() : 0.0d);\n \trespuesta.append(COMA);\n \trespuesta.append(this.pagadoInteres\t\t\t!= null ? this.pagadoInteres.doubleValue() : 0.0d );\n \trespuesta.append(COMA);\n \t\tthis.pagadoCapital = this.pagadoCapital != null ? this.pagadoCapital : 0.0d;\n \t\tthis.pagadoInteres = this.pagadoInteres != null ? this.pagadoInteres : 0.0d;\n \trespuesta.append(this.pagadoCapital.doubleValue() + this.pagadoInteres.doubleValue() ); //Pagado Total\n \trespuesta.append(COMA);\n \trespuesta.append(this.codigoSucursal\t\t!= null ? this.codigoSucursal \t : \"\");\n \trespuesta.append(COMA);\n \trespuesta.append(this.nombreSucursal\t\t!= null ? this.nombreSucursal : \"\");\n \trespuesta.append(COMA);\n \trespuesta.append(this.parcialidad\t\t\t!= null ? this.parcialidad : \"\" );\n \trespuesta.append( \"\\n\" );\n\n \treturn respuesta;\n }", "public Builder setCsv(com.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema value) {\n if (csvBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n schema_ = value;\n onChanged();\n } else {\n csvBuilder_.setMessage(value);\n }\n schemaCase_ = 6;\n return this;\n }", "public void csv() throws IOException {\n\t\t\n\t\tSystem.out.println(); //spacing\\\n\t\tFileWriter f;\n\t\t\n\t\tif (bundle.getString(\"csvName\").endsWith(\".csv\")) {\n\t\t\tf = new FileWriter(bundle.getString(\"csvName\"));\n\t\t}\n\t\t\n\t\telse {\n\t\t\tf = new FileWriter(bundle.getString(\"csvName\") + \".csv\");\n\t\t}\n\t\t\n\t\tPrintWriter p = new PrintWriter(f);\n\t\tObject[][] input = {revisionsToo, flowOfTime};\n\t\tCSVWork(input, p, f);\n\t\t\n\t\tObject[][] nextInput = {revisions, ratings};\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tnextInput[1] = irrelevants;\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tnextInput[1] = relevants;\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tnextInput[0] = intervals;\n\t\tnextInput[1] = commits;\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tspecialCSV(existsHere, p);\n\t\t\n\t\tp.flush();\n\t\tp.close();\n\t\tf.close();\n\t}", "private void openCsvDialog(){\n JFileChooser aFileChooser = new JFileChooser();\n aFileChooser.setFileFilter(new MyFileFilterCSV());\n if (lastUsedFileCSV != null){\n aFileChooser.setCurrentDirectory(lastUsedFileCSV.getParentFile());\n aFileChooser.setSelectedFile(lastUsedFileCSV);\n }else{\n File file = new File(aFileChooser.getCurrentDirectory(), dataset.getName()+\".csv\");\n aFileChooser.setSelectedFile(file);\n }\n int r = aFileChooser.showSaveDialog(this);\n if (r == JFileChooser.APPROVE_OPTION){\n setCursor(new Cursor(Cursor.WAIT_CURSOR));\n File file = aFileChooser.getSelectedFile();\n if(!MyUtilities.isCSVFile(file)){\n file = MyUtilities.getCSVFile(file);\n }\n lastUsedFileCSV = file;\n String sep = getCSVSeparator();\n PrintWriter writer = null;\n try{\n writer = new PrintWriter(new BufferedWriter (new OutputStreamWriter(new FileOutputStream(file), \"utf-8\")));\n // header\n String s = \"\";\n for(int j=0; j<dataset.getListDataHeader().length; j++){\n s += dataset.getListDataHeader()[j] == null? \"\" : dataset.getListDataHeader()[j].getValue();\n if(j <dataset.getListDataHeader().length -1)\n s+= sep;\n }\n writer.println(s);\n // data\n Data[][] data = dataset.getData();\n int nbR = dataset.getNbRows();\n int nbC = dataset.getNbCol();\n for(int i=0; i<nbR; i++){\n s = \"\";\n for(int j=0; j<nbC; j++){\n if(data[i][j] != null){\n if(data[i][j].isDoubleValue()){\n if(!Double.isNaN(data[i][j].getDoubleValue()))\n s += NumberFormat.getNumberInstance(getLocale()).format(data[i][j].getDoubleValue());\n }else{\n s += data[i][j].getValue();\n }\n }\n if(j <nbC -1)\n s+= sep;\n }\n writer.println(s);\n }\n //log\n\t\tdataProcessToolPanel.logExportCSV(dataset, file.getPath());\n }catch (IOException e){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(new CopexReturn(getBundleString(\"MSG_ERROR_CSV\"), false), getBundleString(\"TITLE_DIALOG_ERROR\"));\n }\n finally{\n if (writer != null)\n try{\n writer.close();\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }catch (Exception e){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(new CopexReturn(getBundleString(\"MSG_ERROR_CSV\"), false), getBundleString(\"TITLE_DIALOG_ERROR\"));\n }\n }\n }\n }", "public static String exportFieldData(Hashtable data, String delimiter, DateFormat df, NumberFormat numberFormat) {\r\n\r\n // format : key1 + delimiter + value1 + delimiter + key2 + delimiter +\r\n // value2 + delimiter + ... + keyN + delimiter + valueN\r\n if (data == null) {\r\n throw new IllegalArgumentException(\"exportFieldData: data is null\");\r\n }\r\n\r\n StringBuilder res = new StringBuilder();\r\n\r\n Object[] keys = data.keySet().toArray();\r\n for (int i = 0; i < keys.length; i++) {\r\n Object key = keys[i];\r\n res.append(key);\r\n res.append(delimiter);\r\n if (data.get(key) instanceof Vector) {\r\n if (((Vector) data.get(key)).get(0) != null) {\r\n Object currentData = ((Vector) data.get(key)).get(0);\r\n if ((df != null) && (currentData instanceof Date)) {\r\n res.append(df.format(currentData));\r\n } else {\r\n res.append(currentData.toString());\r\n }\r\n\r\n } else {\r\n res.append(\" \");\r\n }\r\n } else {\r\n if ((df != null) && (data.get(key) instanceof Date)) {\r\n res.append(df.format(data.get(key)));\r\n } else if (data.get(key) instanceof Number) {\r\n res.append(AbstractTemplateGenerator.parseNumber((Number) data.get(key), numberFormat));\r\n } else {\r\n res.append(data.get(key).toString());\r\n }\r\n\r\n }\r\n if (i < (keys.length - 1)) {\r\n res.append(delimiter);\r\n }\r\n }\r\n return res.toString();\r\n }", "@Test\n public void testOutputCSV() throws Throwable {\n testOutputCSV(false);\n }", "public static String format(Object val, String pattern, String groupsepa, String decimalsepa)\n {\n try\n {\n \t String theGrpSep = groupsepa;\n \t String theDecSep = decimalsepa;\n \t if(theGrpSep == null || theGrpSep.isEmpty() || theDecSep == null || theDecSep.isEmpty())\n \t {\n \t // return group and decimal separator from session if any\n \t String[] grpDecArr = returnGroupDecimalSep();\n \t if(theGrpSep == null || theGrpSep.isEmpty())\n \t {\n \t\t theGrpSep = grpDecArr[0];\n \t }\n \t if(theDecSep == null || theDecSep.isEmpty())\n \t {\n \t\t theDecSep = grpDecArr[1];\n \t }\n \t }\n \t return format(val,pattern, theGrpSep.charAt(0), theDecSep.charAt(0));\n }\n catch(Exception e )\n {\n \t log.error(e, \"[NumberUtil] Error caught in method format\");\n \t return \"\";\n }\n }", "public void generateCSV(numList l) {\r\n\t\tFile file = new File(\"E:\\\\altruism results/\" + filename + \".csv\"); //the storage path of the csv file\r\n\t\ttry {\r\n\t\t\tif (file.exists() == false) {\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t}\r\n\t\t\tFileWriter fw = new FileWriter(file);\r\n\t\t\tBufferedWriter writer = new BufferedWriter(fw);\r\n\t\t\twriter.write(\"altruism,selfish\\r\\n\");\r\n\t\t\tfor (int i = 0; i < numList.TIME; i++) {\r\n\t\t\t\twriter.write(l.aList[i] + \",\");\r\n\t\t\t\twriter.write(l.sList[i] + \"\\r\\n\");\r\n\t\t\t}\r\n\r\n\t\t\twriter.flush();\r\n\t\t\twriter.close();\r\n\t\t\tfw.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void exportToCSV(final File theFile) {\n FileOutputStream f = null;\n\n try {\n f = new FileOutputStream(theFile);\n } catch (Exception e) {\n System.err.println(\"Could not open file stream: \" + e.toString());\n }\n\n if (f == null) {\n return;\n }\n\n CSVPrinter thePrinter = new CSVPrinter(f);\n\n // thePrinter.printlnComment(\"\");\n // /thePrinter.printlnComment(\"File: \" + theFile.getName());\n // thePrinter.printlnComment(\"\");\n // thePrinter.println();\n thePrinter.println(this.getDoubleStrings());\n\n thePrinter.println();\n }", "public void createCsvFile(String fileName) { \n \n try { \n \n fileWriter = new FileWriter(fileName); \n \n //Write the CSV file header \n fileWriter.append(FILE_HEADER.toString()); \n \n //Add a new line separator after the header \n fileWriter.append(NEW_LINE_SEPARATOR); \n \n System.out.println(\"CSV file was created successfully !!!\"); \n \n } catch (Exception e) { \n \n System.out.println(\"Error in CsvFileWriter !!!\"); \n e.printStackTrace(); \n \n } finally { \n \n try {\n \n fileWriter.flush(); \n //fileWriter.close(); \n \n } catch (IOException e) { \n \n System.out.println(\"Error while flushing/closing fileWriter !!!\"); \n e.printStackTrace(); \n } \n \n } \n \n}", "public static String format(double value) {\n \tif(Double.valueOf(value).equals(Double.NaN)) return \"NaN\";\n \t\n if (value == 0) {\n return basicFormat.format(value);\n } else if (Math.abs(value) < 1E-4 || Math.abs(value) > 1E6)\n return scienceFormat.format(value);\n else\n return basicFormat.format(value);\n }", "public String[] format(Number[] values) {\r\n return formatter.format(values);\r\n }", "public static String formatNumber(Number value)\n {\n NumberFormat formatter = NumberFormat.getInstance();\n formatter.setGroupingUsed(false);\n formatter.setMaximumFractionDigits(9);\n return formatter.format(value);\n }", "public void writeToCsv()\r\n {\r\n //listeye urunler eklendiginde cagrılacak (Products.csv)\r\n PrintWriter pWrite = null;\r\n try {\r\n pWrite = new PrintWriter(new File(\"Products.csv\"));\r\n }\r\n catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n StringBuilder sBuilder = new StringBuilder();\r\n for (Product theProduct : allProducts ) {\r\n if (theProduct.getSize() == null && theProduct.getGender()!= null){\r\n sBuilder.append(theProduct.getName() + \";\" + theProduct.getPrice() + \";\"\r\n + theProduct.getGender() + \";\" + theProduct.getTag() + \";\"\r\n + theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n else if(theProduct.getGender() == null && theProduct.getSize() == null){\r\n sBuilder.append( theProduct.getName() + \";\" + theProduct.getPrice() + \";\"\r\n + theProduct.getTag() + \";\"+\r\n theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n else {\r\n sBuilder.append( theProduct.getName() + \";\" + theProduct.getPrice() + \";\" + theProduct.getSize() + \";\"\r\n + (theProduct).getGender() + \";\" + theProduct.getTag() + \";\"\r\n + theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n\r\n }\r\n pWrite.write(sBuilder.toString());\r\n pWrite.flush();\r\n pWrite.close();\r\n }", "@Override\n public String toString(Object value, String formatString, Locale locale) {\n return toString((String) value, formatString, locale);\n }", "@Override\n\t\t protected String formatPropertyValue(Object rowId,\n\t\t Object colId, Property property) {\n\t\t if (property.getType() == Date.class && property.getValue() != null) {\n\t\t SimpleDateFormat df = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t return df.format((Date)property.getValue());\n\t\t }\n\t\t \n//\t\t if (property.getType()==Boolean.class){\n\t//\t\t \tif ((Boolean) property.getValue()==true) {\n\t//\t\t \t\treturn \"Active\";\n\t//\t\t \t} else {\n\t//\t\t \t\treturn \"-\";\n\t//\t\t \t}\n//\t\t }\n\t\t return super.formatPropertyValue(rowId, colId, property);\n\t\t }" ]
[ "0.6449744", "0.6429301", "0.6386248", "0.6271231", "0.6160498", "0.6151067", "0.605142", "0.593121", "0.5901781", "0.5878475", "0.5801636", "0.5800979", "0.57937044", "0.578034", "0.57784635", "0.57784283", "0.5753869", "0.57232505", "0.5718223", "0.56762457", "0.5674677", "0.5628552", "0.5608744", "0.56083083", "0.5592395", "0.5537642", "0.5511494", "0.54860985", "0.54588145", "0.5438852", "0.54293174", "0.542693", "0.54138434", "0.5405458", "0.5394625", "0.5381085", "0.53538567", "0.535166", "0.53329116", "0.5330369", "0.5308871", "0.53032076", "0.52860934", "0.52857655", "0.5273807", "0.52657294", "0.52587736", "0.5257781", "0.5253472", "0.5245407", "0.5241065", "0.52346545", "0.52291924", "0.52251774", "0.5193247", "0.5189768", "0.51758134", "0.5165931", "0.5157417", "0.5139518", "0.51312107", "0.5130331", "0.51241213", "0.51127225", "0.5110686", "0.50981957", "0.5096109", "0.50910807", "0.5090769", "0.50898296", "0.5089037", "0.5071131", "0.5026915", "0.5019887", "0.5019632", "0.5014118", "0.5012408", "0.5008862", "0.50033504", "0.5001585", "0.4985495", "0.4982984", "0.497972", "0.49787134", "0.49777514", "0.496468", "0.49552396", "0.49519962", "0.49496263", "0.4943914", "0.4938489", "0.493665", "0.49311352", "0.4926677", "0.49194318", "0.49175426", "0.49118277", "0.4898995", "0.4896234", "0.48898935" ]
0.75507
0
Export database scripts for the given domain locations.
@Test public void exportOracleDatabaseScriptFromAnnotations() throws Exception { Properties props = PropertyLoader.loadProperties("./build.properties"); String classesDirPath = props.getProperty("classes.dir"); SchemaGenerator sgen = new SchemaGenerator(new String[] {"uk.co.utilisoft.parms.domain"}, classesDirPath, new String[] {".*UnitTest.*", ".*Test.*", ".*Interface.*", ".*\\$.*"}); sgen.generate(Dialect.ORACLE, mTestFilePath); mTestFiles = getSavedFiles(mTestFilePath); assertTrue(!mTestFiles.isEmpty()); for (int i = 0; i < mTestFiles.size(); i++) { File file = mTestFiles.get(i); InputStream is = new FileInputStream(file); long length = file.length(); if (length > Integer.MAX_VALUE) { fail("Failed to read file " + file.getName() + " because file length " + length + " is too long"); } byte[] bytes = new byte[(int)length]; int offset = 0; int numRead = 0; while (offset < bytes.length && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0) { offset += numRead; } if (offset < bytes.length) { fail("Failed to finish reading file " + file.getName()); } is.close(); // test file contains some data assertNotNull(bytes); assertTrue("File " + file.getName() + " contains zero bytes", bytes.length > 0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void insertTestDataExport() throws ArcException {\n\t\tinsertTestData(\"BdDTest/script_test_export.sql\");\n\t}", "protected void doRun() {\n\n\t\tFile dirFile = null;\n\t\ttry {\n\t\t\tdirFile = new File(exportConfig.getDataFileFolder() + File.separator + \"ddl\");\n\t\t\tif (!dirFile.exists()) {\n\t\t\t\tdirFile.mkdir();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"create schema dir error : \", e);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tString schemaFile = null;\n\t\t\tString indexFile = null;\n\t\t\tString triggerFile = null;\n\t\t\tif (exportConfig.isExportSchema()) {\n\t\t\t\tschemaFile = dirFile + File.separator + \"schema.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t}\n\t\t\tif (exportConfig.isExportIndex()) {\n\t\t\t\tindexFile = dirFile + File.separator + \"index.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t}\n\t\t\tif (exportConfig.isExportTrigger()) {\n\t\t\t\ttriggerFile = dirFile + File.separator + \"trigger.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t}\n\n\t\t\tSet<String> tableSet = new HashSet<String>();\n\t\t\ttableSet.addAll(exportConfig.getTableNameList());\n\t\t\tExprotToOBSHandler.exportSchemaToOBSFile(dbInfo, exportDataEventHandler, tableSet,\n\t\t\t\t\tschemaFile, indexFile, triggerFile, exportConfig.getFileCharset(),\n\t\t\t\t\texportConfig.isExportSerialStartValue(), false);\n\n\t\t\tif (exportConfig.isExportSchema()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t}\n\t\t\tif (exportConfig.isExportIndex()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t}\n\t\t\tif (exportConfig.isExportTrigger()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tif (exportConfig.isExportSchema()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t}\n\t\t\tif (exportConfig.isExportIndex()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t}\n\t\t\tif (exportConfig.isExportTrigger()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t}\n\t\t\tLOGGER.error(\"create schema index trigger error : \", e);\n\t\t}\n\n\t\ttry {\n\t\t\tif (exportConfig.isExportSerial()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\t\tString serialFile = dirFile + File.separator + \"serial.sql\";\n\t\t\t\texportSerial(serialFile);\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\tLOGGER.error(\"create serial.sql error : \", e);\n\t\t}\n\n\t\ttry {\n\t\t\tif (exportConfig.isExportView()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\t\tString viewFile = dirFile + File.separator + \"view.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\t\texportView(viewFile);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\tLOGGER.error(\"create view.sql error : \", e);\n\t\t}\n\t}", "private List<String> generateDropStatementsForDomainIndexes() throws SQLException {\n List<String> dropStatements = new ArrayList<String>();\n\n List<String> objectNames = jdbcTemplate.queryForStringList(\n \"SELECT INDEX_NAME FROM ALL_INDEXES WHERE OWNER = ? AND INDEX_TYPE LIKE '%DOMAIN%'\", name);\n\n for (String objectName : objectNames) {\n dropStatements.add(generateDefaultDropStatement(\"INDEX\", objectName, \"FORCE\"));\n }\n return dropStatements;\n }", "protected void exportScriptToFile() {\n\t\ttry {\n\t\t\tfinal MigrationConfiguration cfg = getMigrationWizard()\n\t\t\t\t\t.getMigrationConfig();\n\t\t\tprepare4SaveScript();\n\t\t\tExportScriptDialog.exportScript(cfg, isSaveSchema());\n\t\t} catch (Exception e) {\n\t\t\t// MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),\n\t\t\t// Messages.msgWarning, Messages.setOptionPageErrMsg);\n\t\t}\n\t}", "private void generate(Dialect dialect, String directory) {\n cfg.setProperty(\"hibernate.dialect\", dialect.getDialectClass());\n SchemaExport export = new SchemaExport(cfg);\n export.setFormat(true);\n export.setDelimiter(\";\");\n export.setOutputFile(directory + \"create_db_\" + dialect.name().toLowerCase() + \".sql\");\n export.create(true, false);\n export.setOutputFile(directory + \"drop_db_\" + dialect.name().toLowerCase() + \".sql\");\n export.drop(true, false);\n }", "public void dumpIndexScriptsAll(OmcEnvironment.Environment envionment, boolean isParallelOption);", "void export(UtilityDataExportQuery query) throws ApplicationException;", "public void execute() throws XDocletException {\n\t\tsetPublicId(DD_PUBLICID_20);\n\t\tsetSystemId(DD_SYSTEMID_20);\n\n\t\t// will not work .... dumper.xdt does not exist\n\t\t/*\n\t\tsetTemplateURL(getClass().getResource(\"resources/dumper.xdt\"));\n\t\tsetDestinationFile(\"dump\");\n\t\tSystem.out.println(\"Generating dump\");\n\t\tstartProcess();\n\t\t*/\n\n\n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_EJB_JAR_XML_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"ejb-jar.xml\");\n\t\tSystem.out.println(\"Generating ejb-jar.xml\");\n\t\tstartProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_BND_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_BND_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_BND_FILE_NAME);\n startProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_FILE_NAME);\n startProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_PME_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_PME_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_PME_FILE_NAME);\n startProcess();\n\n /*\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_ACCESS_BEAN_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_ACCESS_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_ACCESS_FILE_NAME);\n startProcess();\n */\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_MAPXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tstartProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_DBXMI_TEMPLATE_FILE));\n setDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n System.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n startProcess();\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_SCHXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tstartProcess();\n\t\t\n\t\tCollection classes = getXJavaDoc().getSourceClasses();\n\t\tfor (ClassIterator i = XCollections.classIterator(classes); i.hasNext();) {\n\t\t\tXClass clazz = i.next();\n\t\t\t//System.out.print(\">> \" + clazz.getName());\n\t\t\t// check tag ejb:persistence + sub tag table-name\n\t\t\tXTag tag = clazz.getDoc().getTag(\"ejb:persistence\");\n\t\t\tif (tag != null) {\n\t\t\t\tString tableName = tag.getAttributeValue(\"table-name\");\n\t\t\t\t//System.out.println(\"ejb:persistence table-name = '\" + tableName + \"'\");\n\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\tSystem.out.println(\"Generating \" + destinationFileName);\n\t\t\t\t\n\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_TBLXMI_TEMPLATE_FILE));\n\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\tsetHavingClassTag(\"ejb:persistence\");\n\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\tstartProcess();\n\t\t\t}\n\t\t\t// Now, check for relationships \n\t\t\tfor (Iterator methods = clazz.getMethods().iterator(); methods.hasNext();) {\n\t\t\t\tXMethod method = (XMethod)methods.next();\n\t\t\t\tif (method.getDoc().hasTag(\"websphere:relation\")) {\n\t\t\t\t\tString tableName = method.getDoc().getTagAttributeValue(\"websphere:relation\",\"table-name\");\n\t\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_RELATIONSHIP_TBLXMI_TEMPLATE_FILE));\n\t\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\t\tsetCurrentMethod(method);\n\t\t\t\t\tSystem.out.println(\"\\tGenerating M-M Relationship table: \" + destinationFileName);\n\t\t\t\t\tstartProcess();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\n\t\t}\n\n/*\n if (atLeastOneCmpEntityBeanExists()) {\n setTemplateURL(getClass().getResource(WEBSPHERE_SCHEMA_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_SCHEMA_FILE_NAME);\n startProcess();\n }\n*/\n }", "public static void provideDAOsImports(final FileWriterWrapper writer,\n final String entityCodeName)\n throws IOException {\n writer.write(\"import java.sql.Connection;\\n\");\n writer.write(\"import java.sql.PreparedStatement;\\n\");\n writer.write(\"import java.sql.ResultSet;\\n\");\n writer.write(\"import java.sql.SQLException;\\n\");\n writer.write(\"import java.util.ArrayList;\\n\\n\");\n\n writer.write(\"import pojos.\" + entityCodeName + \";\\n\\n\");\n }", "public void exportFiles() \r\n\t{\r\n\t\tif(!fDictionaryFile().exists())\r\n\t\t{\r\n\t\t\texportDictionary();\r\n\t\t}\r\n\t}", "String initializeExport(String dsID, int records) throws RepoxException;", "public static void main(String args[]) \n{\n\nDomainBlender domainBlender = new DomainBlender();\n\n/**DECLARE THE COMMANDS**/\n\n//String typoFinder=\"~/domainBlender/typofinder/TypoMagic/custom_typofinder.py\";\n//String dnsTwist=\"cat ~/domainBlender/domains | while read line; do dnstwist -r -t 4000 -f csv \\\"$line\\\" >> ~/domainBlender/dnstwist_results.csv; done\";\n//./data_merger.py \"['value1', 'value2']\"\n\n\n/**BANNER DISPLAY FOR CONSOLE**/\t\nbanner();\n\n\n\n/**Commands**/\t\n//command(squatCobbler);\n//command(urlCrazy);\n//command(typoFinder);\n//command(dnsTwist);\n\t\n\t\n/**CONVERT CSV files to JSON\nThis is just running a python script csv2json.py that takes two arguments an input and an output which you can see below:\ncsvJSON(\"~/domainBlender/dnstwist_results.csv\",\"~/domainBlender/dnstwist_results.json\");\ncsvJSON(\"~/domainBlender/urlcrazy_results.csv\",\"~/domainBlender/urlcrazy_results.json\");\n**/\n}", "public static void main(String[] args) {\n MySQLScriptGen databaseobject = new MySQLScriptGen();\n\n //this is same for every model\n JsonFileReader jsonFileReader = JsonFileReader.getInstance();\n JSONObject pim = jsonFileReader.getplatformIndependentModel();\n String ddl_script = databaseobject.createDDLScript(pim);\n String dml_script = databaseobject.createDMLScript(pim);\n String dql_script = databaseobject.createDQLScript(pim);\n System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\\n\");\n System.out.println(ddl_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dml_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dql_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n }", "public <T> void exportToExcel(String location, List<T>... values) throws IOException, WriteException, DALException;", "protected void executePostProcessingScripts(List<Script> postProcessingScripts) {\n for (Script script : postProcessingScripts) {\n try {\n logger.info(\"Executing post processing script \" + script.getFileName());\n scriptRunner.execute(script.getScriptContentHandle());\n\n } catch (UnitilsException e) {\n logger.error(\"Error while executing post processing script \" + script.getFileName(), e);\n throw e;\n }\n }\n }", "@Test\n\tpublic void bddScriptTest() throws ArcException {\n\t\t\n\t\t// test an arc database\n\t\tcreateDatabase(userWithRestrictedRights);\n\t\ttestDatabaseCreation();\n\n\t\tcreateDatabase(\"\");\n\t\ttestDatabaseCreation();\n\t\t\n\t\tcreateDatabase(null);\n\t\ttestDatabaseCreation();\n\t}", "protected static void exportData(ProcessSteps step){\n try {\n Runtime.getRuntime().exec(\"mongoexport --host localhost --port 27017 \" +\n \"-d\" + step.toString() +\n \"-o ./dump/\" + step.toString() + \".json\");\n }\n catch (IOException e){\n e.printStackTrace();\n }\n }", "public void export(\n Path generationPath,\n SqlTableMetamodelRepository sqlTableModelRepository,\n String tablePrefix,\n String context) {\n Map<String, Object> dataModel = new HashMap<>();\n dataModel.put(\"representation\", sqlTableModelRepository);\n dataModel.put(\"tablePrefix\", tablePrefix);\n\n freemarkerService.export(\n dataModel,\n \"polygenesis-generator-java-sql-flyway/script.sql.ftl\",\n makeFileName(generationPath, context));\n }", "@Test\r\n public void exportSQLServerDatabaseScriptFromAnnotations() throws Exception\r\n {\r\n Properties props = PropertyLoader.loadProperties(\"./build.properties\");\r\n String classesDirPath = props.getProperty(\"classes.dir\");\r\n SchemaGenerator sgen = new SchemaGenerator(new String[] {\"uk.co.utilisoft.parms.domain\"},\r\n classesDirPath,\r\n new String[] {\".*UnitTest.*\", \".*Test.*\", \".*Interface.*\", \".*\\\\$.*\"});\r\n sgen.generate(Dialect.SQLSERVER, mTestFilePath);\r\n mTestFiles = getSavedFiles(mTestFilePath);\r\n assertTrue(!mTestFiles.isEmpty());\r\n\r\n for (int i = 0; i < mTestFiles.size(); i++)\r\n {\r\n File file = mTestFiles.get(i);\r\n InputStream is = new FileInputStream(file);\r\n long length = file.length();\r\n\r\n if (length > Integer.MAX_VALUE)\r\n {\r\n fail(\"Failed to read file \" + file.getName() + \" because file length \" + length + \" is too long\");\r\n }\r\n\r\n byte[] bytes = new byte[(int)length];\r\n int offset = 0;\r\n int numRead = 0;\r\n\r\n while (offset < bytes.length\r\n && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)\r\n {\r\n offset += numRead;\r\n }\r\n\r\n if (offset < bytes.length)\r\n {\r\n fail(\"Failed to finish reading file \" + file.getName());\r\n }\r\n\r\n is.close();\r\n\r\n // test file contains some data\r\n assertNotNull(bytes);\r\n assertTrue(\"File \" + file.getName() + \" contains zero bytes\", bytes.length > 0);\r\n }\r\n }", "@Override\n public void doExportCreate(StorageSystem storage, ExportMask exportMask,\n Map<URI, Integer> volumeMap, List<Initiator> initiators, List<URI> targets,\n TaskCompleter taskCompleter) throws DeviceControllerException {\n _log.info(\"{} doExportCreate START ...\", storage.getSerialNumber());\n VolumeURIHLU[] volumeLunArray = ControllerUtils.getVolumeURIHLUArray(\n storage.getSystemType(), volumeMap, dbClient);\n xtremioExportOperationHelper.createExportMask(storage, exportMask.getId(), volumeLunArray,\n targets, initiators, taskCompleter);\n _log.info(\"{} doExportCreate END ...\", storage.getSerialNumber());\n\n }", "String export(UserDataExportQuery query) throws ApplicationException;", "@Override\n public void onRepositoryInitialized(String dataSourceName,\n String repositoryName,\n ServiceBindingType sbt,\n List<Field> fields,\n List<Property> properties) throws Exception {\n\n if (properties == null || properties.isEmpty()) {\n logger.warn(\"No properties were provided to the RunSqlScript init handler.\");\n logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);\n return;\n }\n\n // First, run a sequence of SQL scripts, where those scripts may\n // optionally be packaged in a resources directory within the\n // current code's packaged JAR file.\n String scriptContents;\n List<String> scriptNames = getSqlScriptNames(properties);\n if (scriptNames == null || scriptNames.isEmpty()) {\n logger.warn(\"Could not obtain the name of any SQL script to run.\");\n logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);\n return;\n }\n for (String scriptName : scriptNames) {\n String scriptPath = getSqlScriptPath(dataSourceName, repositoryName, scriptName);\n if (Tools.isBlank(scriptPath)) {\n logger.warn(\"Could not get path to SQL script.\");\n logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);\n continue;\n }\n scriptContents = getSqlScriptContents(scriptPath);\n if (Tools.isBlank(scriptContents)) {\n logger.warn(\"Could not get contents of SQL script from resource \" + scriptPath);\n logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);\n continue;\n }\n runScript(dataSourceName, repositoryName, scriptContents, \"resource path \" + scriptPath);\n }\n\n // Next, run a second sequence of SQL scripts, where those scripts may be\n // stored on disk, in a resources directory within the server directory.\n List<File> scriptFiles = getSqlScriptFiles(dataSourceName, repositoryName);\n // Run these scripts in a sequence based on the ascending order of their filenames.\n // FIXME: consider adding functionality to specify the locale for filename\n // sorting here. (The current sort order is based on the system's default locale.)\n Collections.sort(scriptFiles, new Comparator<File>() {\n @Override\n public int compare(File f1, File f2) {\n return Collator.getInstance().compare(f1.getName(), f2.getName());\n }\n });\n\n for (File scriptFile : scriptFiles) {\n logger.trace(\"Reading script file \" + scriptFile.getCanonicalPath());\n scriptContents = FileTools.readFile(scriptFile);\n if (Tools.isBlank(scriptContents)) {\n logger.warn(\"Could not get contents of SQL script from file \" + scriptFile.getCanonicalPath());\n logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);\n continue;\n }\n runScript(dataSourceName, repositoryName, scriptContents, \"file \" + scriptFile.getName());\n }\n\n }", "public void export(List<double[]> allBounds)\n {\n\t if(!filePath.endsWith(\".csv\"))\n\t \tfilePath = filePath + \".csv\";\n \n try ( CSVWriter writer = new CSVWriter(new FileWriter(filePath)) ) \n {\n writer.writeNext(new String[] {\"mzMin\",\"mzMax\",\"rtMin\",\"rtMax\",\"pointNumber\"});\n \n // write away!\n for (double[] bounds : allBounds)\n writer.writeNext( new String[] {Double.toString(bounds[0]), Double.toString(bounds[1]), Double.toString(bounds[2]), Double.toString(bounds[3]), Double.toString(bounds[4]) });\n \n } catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n return;\n }", "public void exportAllLists(){\n }", "void export(String path, Events<?> events);", "public void backupCustom(String... tableName) throws Exception {\n // back up specific files\n QueryDataSet qds = new QueryDataSet(conn);\n for (String str : tableName) {\n\n qds.addTable(str);\n }\n FlatXmlDataSet.write(qds, new FileWriter(backupFile), \"UTF-8\");\n new XlsDataSetWriter().write(qds, new FileOutputStream(backupFile));\n }", "public abstract boolean exportStatistics(String statsFileName) throws SQLException;", "public static void main(String[] args) throws SQLException {\n\tGregorianCalendar calender = new GregorianCalendar();\n calender.add(Calendar.DAY_OF_MONTH, -1);\n String dtYesterdday = new SimpleDateFormat(\"yyyyMMdd\").format(calender.getTime());\n System.out.println(dtYesterdday);\n \n try {\n Class.forName(driverName);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n logger.error(e);\n System.exit(1);\n }\n //replace \"hive\" here with the name of the user the queries should run as\n Connection con = DriverManager.getConnection(\"jdbc:hive2://117.121.97.2:10000/yuanjk\", \"yuanjk\", \"7REYo1jF\");\n Statement stmt = con.createStatement();\n \n //insert available urls to yuanjk.wexin_official_account_url_overwrite_daily_tmp table\n String hiveInsertSql=hiveInsertSqlP1+dtYesterdday+\" LIMIT 40\";\n System.out.println(\"Running: \" + hiveInsertSql);\n stmt.execute(hiveInsertSql);\n \n //filter out crawled urls\n// System.out.println(\"Running: \" + hiveCleanSql);\n// stmt.execute(hiveCleanSql);\n /*\n //export available urls to local file\n System.out.println(\"Running: \" + hiveExportSql);\n ResultSet res = stmt.executeQuery(hiveExportSql);\n try{\n \tFileWriter fileWriter = new FileWriter(rootWorkDirectory);\n \tBufferedWriter writer = new BufferedWriter(fileWriter);\n \ttry{\n while (res.next()) {\n System.out.println(res.getString(1) + \"\\t\" + res.getString(2));\n writer.write(res.getString(1) + \"\\t\" + res.getString(2));\n }\n \t}finally{\n \t\twriter.flush();\n \t\twriter.close();\n \t}\n }catch(IOException e){\n \tlogger.error(e);\n }\n */\n// String tableName = \"yuanjk.wexin_official_account_url_overwrite_daily\";\n// stmt.execute(\"drop table if exists \" + tableName);\n// stmt.execute(\"create table \" + tableName + \" (key int, value string)\");\n \n\n // show tables\n// String sql = \"show tables '\" + tableName + \"'\";\n \n /*\n System.out.println(\"Running: \" + sql);\n ResultSet res = stmt.executeQuery(sql);\n if (res.next()) {\n System.out.println(res.getString(1));\n }\n */\n /*\n // describe table\n sql = \"describe \" + tableName;\n System.out.println(\"Running: \" + sql);\n res = stmt.executeQuery(sql);\n while (res.next()) {\n System.out.println(res.getString(1) + \"\\t\" + res.getString(2));\n }\n */\n /*\n // load data into table\n // NOTE: filepath has to be local to the hive server\n // NOTE: /tmp/a.txt is a ctrl-A separated file with two fields per line\n String filepath = \"/tmp/a.txt\";\n sql = \"load data local inpath '\" + filepath + \"' into table \" + tableName;\n System.out.println(\"Running: \" + sql);\n stmt.execute(sql);\n \n // select * query\n sql = \"select * from \" + tableName;\n System.out.println(\"Running: \" + sql);\n res = stmt.executeQuery(sql);\n while (res.next()) {\n System.out.println(String.valueOf(res.getInt(1)) + \"\\t\" + res.getString(2));\n }\n \n // regular hive query\n sql = \"select count(1) from \" + tableName;\n System.out.println(\"Running: \" + sql);\n res = stmt.executeQuery(sql);\n while (res.next()) {\n System.out.println(res.getString(1));\n }\n */\n }", "public void run(File repositoryFolder, File exportFolder, boolean transformToEdmInternal, final int maxExportRecords, String provider, String dataProvider) throws Exception {\n\t\tFile dbFile = new File(repositoryFolder, \"db.bin\");\r\n\t\tif(!dbFile.exists()) {\r\n\t\t\tSystem.out.println(\"Repository is empty. Exiting.\");\r\n\t\t\treturn;\r\n\t\t}\t\t\r\n\t\tSystem.out.println(new Date(dbFile.lastModified()));\r\n\t\t\r\n\t\tfinal int maxExportRecordsPerFile=300;\r\n\t\tif(!exportFolder.exists())\r\n\t\t\texportFolder.mkdirs();\r\n\t\t\r\n\t\tDatabase db;\r\n//\t\tdb=new Database(repositoryFolder, AccessMode.WRITE);\r\n\t\tdb=new Database(repositoryFolder, AccessMode.READ_ONLY);\r\n\t\tEdmFileExport metadataExporter=new EdmFileExport(maxExportRecordsPerFile, exportFolder);\r\n\t\tmetadataExporter.setTransformToEdmInternal(transformToEdmInternal); \r\n\t\tmetadataExporter.init();\r\n\t\t\r\n\t\tDataConverter dcToEdmConverter = DataConversionManager.getInstance().getConverter(null, null);\r\n\t\t\r\n\t\tint cnt=0;\r\n\t\tfor(byte[] mdBytes : db.getAllRecordsData()) {\r\n\t\t\tcnt++;\r\n\t\t\tObject metadata = IoUtil.fromByteArray(mdBytes);\r\n\t\t\ttry {\r\n\t\t\t\tif(metadata instanceof String) {\r\n\t\t\t\t\tString fromByteArray = (String) metadata;\r\n\t\t\t\t\tmetadataExporter.export(fromByteArray);\r\n\t\t\t\t} else if(metadata instanceof IiifPresentationMetadata) {\r\n\t\t\t\t\tIiifPresentationMetadata iiifMetadata = (IiifPresentationMetadata) metadata;\r\n\t\t\t\t\tfor(Iterator<RawDataRecord> it=iiifMetadata.getSeeAlso().iterator(); it.hasNext() ; ) {\r\n\t\t\t\t\t\tRawDataRecord seeAlso = it.next();\r\n\t\t\t\t\t\ttry {\r\n//\t\t\t\t\t\t\tSystem.out.println(iiifMetadata.getManifestUrl());\r\n//\t\t\t\t\tSystem.out.println(seeAlso.getFormat());\r\n//\t\t\t\t\t\t\tSystem.out.println(seeAlso.getProfile());\r\n\t\t\t\t\t\t\tif(seeAlso.getProfile()!=null && seeAlso.getProfile().equalsIgnoreCase(\"http://www.europeana.eu/schemas/edm/\")) {\r\n\t\t\t\t\t\t\t\tString fromByteArray = new String(seeAlso.getContent(), \"UTF-8\");\r\n\t\t\t\t\t\t\t\tmetadataExporter.export(fromByteArray);\r\n\t\t\t\t\t\t\t\tif(maxExportRecords>0 && metadataExporter.getExportRecordsCount()>=maxExportRecords)\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\tSystem.err.println(seeAlso);\r\n\t\t\t\t\t\t\tSystem.err.println(new String(seeAlso.getContent(), \"UTF-8\"));\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(metadata instanceof IiifManifest) {\r\n\t\t\t\t\tIiifManifest manifest=(IiifManifest) metadata;\r\n\t\t\t\t\tfor(RawDataRecord seeAlso: manifest.getMetadata().getSeeAlso()) {\r\n\t\t\t\t\t\tif(seeAlso.getProfile()!=null && seeAlso.getProfile().equalsIgnoreCase(\"http://www.europeana.eu/schemas/edm/\")) {\r\n\t\t\t\t\t\t\tString fromByteArray = new String(seeAlso.getContent(), \"UTF-8\");\r\n\t\t\t\t\t\t\tmetadataExporter.export(fromByteArray);\r\n\t\t\t\t\t\t} else {//TODO\r\n\t\t\t\t\t\t\t//testing DC data from wellcome\r\n\t\t\t\t\t\t\tseeAlso.setUrl(manifest.getUri());\r\n\t\t\t\t\t\t\tRawDataRecord convertedEdm = dcToEdmConverter.convert(seeAlso, getEdmStatements(manifest, provider, dataProvider));\r\n\t\t\t\t\t\t\tString fromByteArray = new String(convertedEdm.getContent(), \"UTF-8\");\r\n\t\t\t\t\t\t\tmetadataExporter.export(fromByteArray);\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} catch (Exception e) {\r\n\t\t\t\tSystem.err.println(metadata);\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif(cnt % 1000 == 0) \r\n\t\t\t\tSystem.out.println(\"Progress: \"+ cnt+\" records (\"+metadataExporter.getExportRecordsCount() + \" exported)\");\r\n\r\n\t\t\tif(maxExportRecords>0 && metadataExporter.getExportRecordsCount()>=maxExportRecords) {\r\n\t\t\t\tSystem.out.println(\"Max record reached. Exiting early.\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(metadataExporter.getExportRecordsCount() + \" records exported\");\r\n\t\tmetadataExporter.close();\r\n\t\tdb.shutdown();\r\n//\t\tObject data = db.getData(\"http://dams.llgc.org.uk/iiif/newspaper/issue/3101048/manifest.json\");\r\n//\t\tSystem.out.println(data);\r\n\t}", "public void setScriptLocations(String scriptLocations) {\r\n this.scriptLocations = scriptLocations;\r\n }", "@Override\n\tpublic void saveOrUpdateAll(Collection<Export> entitys) {\n\t\t\n\t}", "List<String> generateDeleteAllScript();", "public static String getDatabaseExportDirectory() {\n\t\tif (xml == null) return \"\";\n\t\treturn databaseExportDir;\n\t}", "void export(DataExportOptions options, Pageable pageable, OutputStream outputStream);", "private List<String> generateDropStatementsForNonDomainIndexes() throws SQLException {\n List<String> dropStatements = new ArrayList<String>();\n\n List<String> objectNames = jdbcTemplate.queryForStringList(\n \"SELECT INDEX_NAME FROM ALL_INDEXES WHERE OWNER = ? AND INDEX_TYPE NOT LIKE '%DOMAIN%'\", name);\n\n for (String objectName : objectNames) {\n dropStatements.add(generateDefaultDropStatement(\"INDEX\", objectName, \"\"));\n }\n return dropStatements;\n }", "@Before\n public void seedDatabase() {\n final String seedDataScript = loadAsString(\"pacmabooks.sql\");\n\n try (Connection connection = ds.getConnection()) {\n for (String statement : splitStatements(new StringReader(\n seedDataScript), \";\")) {\n connection.prepareStatement(statement).execute();\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n System.out.println(\"--------------------------------------------------- Seeding DID NOT WOKK\");\n e.printStackTrace();\n throw new RuntimeException(\"Failed seeding database\", e);\n }\n System.out.println(\"Seeding works\");\n\n }", "public void exportDictionary() \r\n\t{\t\r\n\t\tInputStream is = this.getClass().getResourceAsStream(\"/dictionary.sqlite\");\t\t\r\n\t\tOutputStream os = null;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tos = new FileOutputStream(fDictionaryFile());\r\n\t\t\tbyte[] buffer = new byte[1024];\r\n\t\t\tint length;\r\n\t\t\t\r\n\t\t\t//copy the file content in bytes \r\n\t\t\twhile ((length = is.read(buffer)) > 0) \r\n\t\t\t{\r\n\t\t\t\tos.write(buffer, 0, length);\r\n\t\t\t}\r\n\r\n\t\t\tis.close();\r\n\t\t\tos.close();\r\n\r\n\t\t\tSystem.out.println(\"/* Dictionary export successful! */\");\r\n\t\t} \r\n\t\tcatch(IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void doExport() {\n\t\tSQLiteDatabase db = null;\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tdb = openOrCreateDatabase(MyDbHelper.DATABASE_NAME, SQLiteDatabase.OPEN_READWRITE, null);\n\t\t\tcursor = db.rawQuery(\"SELECT * \" +\n \" FROM \" + LocationTable.TABLE_NAME +\n \" ORDER BY \" + LocationTable.COLUMN_TIMESTAMP + \" ASC\",\n null);\n \n\t\t\tint timestampColumnIndex = cursor.getColumnIndexOrThrow(LocationTable.COLUMN_TIMESTAMP);\n int latitudeColumnIndex = cursor.getColumnIndexOrThrow(LocationTable.COLUMN_LATITUDE);\n int longitudeColumnIndex = cursor.getColumnIndexOrThrow(LocationTable.COLUMN_LONGITUDE);\n int accuracyColumnIndex = cursor.getColumnIndexOrThrow(LocationTable.COLUMN_ACCURANCY);\n \n\t\t\tif (cursor.moveToFirst()) {\n\t\t\t\tStringBuffer fileBuf = new StringBuffer();\n\t\t\t\tString beginTimestamp = null;\n\t\t\t\tString endTimestamp = null;\n\t\t\t\tString timestamp = null;\n\t\t\t\tdo {\n\t\t\t\t\ttimestamp = cursor.getString(timestampColumnIndex);\n\t\t\t\t\tif (beginTimestamp == null) {\n\t\t\t\t\t\tbeginTimestamp = timestamp;\n\t\t\t\t\t}\n\t\t\t\t\tdouble latitude = cursor.getDouble(latitudeColumnIndex);\n\t\t\t\t\tdouble longitude = cursor.getDouble(longitudeColumnIndex);\n\t\t\t\t\tdouble accuracy = cursor.getDouble(accuracyColumnIndex);\n\t\t\t\t\tfileBuf.append(sevenSigDigits.format(longitude)+\",\"+sevenSigDigits.format(latitude)+\"\\n\");\n\t\t\t\t} while (cursor.moveToNext());\n\t\t\t\t\n\t\t\t\tendTimestamp = timestamp;\n\t\t\t\t\n\t\t\t\tcloseFileBuf(fileBuf, beginTimestamp, endTimestamp);\n\t\t\t\tString fileContents = fileBuf.toString();\n\t\t\t\tLog.d(ActivityName, fileContents);\n\t\t\t\tFile sdcard_path = Environment.getExternalStorageDirectory();\n\t\t\t\tFile sdDir = new File(sdcard_path, \"GPSLogger\");\n\t\t\t\tsdDir.mkdirs();\n\t\t\t\tFile file = new File(sdDir, zuluFormat(beginTimestamp) + \".kml\");\n\t\t\t\tFileWriter sdWriter = new FileWriter(file, false);\n\t\t\t\tsdWriter.write(fileContents);\n\t\t\t\tsdWriter.close();\n \t\t\tToast.makeText(getBaseContext(),\n \t\t\t\t\t\"Export completed!\",\n \t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t} else {\n\t\t\t\tToast.makeText(getBaseContext(),\n\t\t\t\t\t\t\"I didn't find any location points in the database, so no KML file was exported.\",\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t}\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\tToast.makeText(getBaseContext(),\n\t\t\t\t\t\"Error trying access the SD card. Make sure your handset is not connected to a computer and the SD card is properly installed\",\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t} catch (Exception e) {\n\t\t\tToast.makeText(getBaseContext(),\n\t\t\t\t\t\"Error trying to export: \" + e.getMessage(),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t} finally {\n\t\t\tif (cursor != null && !cursor.isClosed()) {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t\tif (db != null && db.isOpen()) {\n\t\t\t\tdb.close();\n\t\t\t}\n\t\t}\n\t}", "public void exportLocations(List<MyLocation> locationList) {\n\n StringBuilder data = new StringBuilder();\n // Adding File Header\n data.append(\"ID,Latitude,Longitude,Provider,startTime,endTime,accuracy,adminArea,countryCode,featureName,Locality,subAdminArea,addressLine,Interactions\");\n\n // Adding Data\n for(MyLocation location : locationList) {\n data.append(\"\\n\"\n +location.getId()+\",\"\n +location.getLatitude()+\",\"\n +location.getLongitude()+\",\"\n +location.getProvider()+\",\"\n +location.getStartTime()+\",\"\n +location.getEndTime()+\",\"\n +location.getAccuracy()+\",\"\n +location.getAdminArea()+\",\"\n +location.getCountryCode()+\",\"\n +location.getFeatureName()+\",\"\n +location.getLocality()+\",\"\n +location.getSubAdminArea()+\",\"\n +location.getAddressLine()+\",\"\n +location.getNumOfInteractions());\n }\n\n try{\n // Saving file onto device\n FileOutputStream out = context.openFileOutput(\"locations_export.csv\", Context.MODE_PRIVATE);\n out.write((data.toString()).getBytes());\n out.close();\n\n // Exporting\n File fileLocation = new File(context.getFilesDir(), \"locations_export.csv\");\n Uri path = FileProvider.getUriForFile(context, \"com.kdkvit.wherewasi.provider\", fileLocation);\n Intent fileIntent = new Intent(Intent.ACTION_SEND);\n fileIntent.setType(\"text/csv\");\n fileIntent.putExtra(Intent.EXTRA_SUBJECT, \"Data\");\n fileIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n fileIntent.putExtra(Intent.EXTRA_STREAM, path);\n context.startActivity(Intent.createChooser(fileIntent, \"Export CSV\"));\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void gExport() throws SQLException, ClassNotFoundException, IOException{\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\tGephi g = new Gephi(conn);\n\t\tg.gpMake();\n\t\tconn.close();\n\t}", "public void generatePatientSQL(HttpServletResponse response, String ids, Integer pid){\n\t\tresponse.setHeader( \"Content-Disposition\", \"attachment;filename=\"+\"patientExportSummary\"+\".sql\");\n\t\ttry{\n\t\t\tStringBuffer sb = new StringBuffer(\"\");\n\n\t\t\tList<PersonAttributeType> pat = getSavedPersonAttributeList(pid);\n\t\t\tList<Integer> idsList = multipleIds(ids);\n\t\t\tPatientService ps = Context.getPatientService();\n\t\t\tfor(int j=0 ; j<idsList.size();j++){\n\t\t\t\tPatient pt = ps.getPatient(idsList.get(j));\n\t\t\t\tfor(int i=0; i<pat.size();i++){\n\t\t\t\t\tPersonAttribute pa = pt.getAttribute(pat.get(i));\n\t\t\t\t\tif(pa!=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tsb.append(\"insert into person_attribute (person_id, value,person_attribute_type_id,creator,date_created,changed_by,date_changed,voided, voided_by,date_voided, void_reason,uuid ) values(\");\n\t\t\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t\t\t\t\t\tDate d = new Date();\n\t\t\t\t\t\tsb.append( pt.getId().toString()+ \",'\" + pa.getValue().toString()+ \"',\" + pat.get(i).getId().toString() + \",\"+ \"1\"+ \",'\" +dateFormat.format(d) +\"',null,null,0,null,null,null,null\" +\" );\\n\\n\" );\n\t\t\t\t\t\tsb.append(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t\t\t\tDate date = new Date();\n\n\t\t\t\tsb.append(\"insert into person_name (preferred,person_id,prefix,given_name, middle_name,family_name_prefix,family_name, family_name2, family_name_suffix, degree, creator, date_created,voided, voided_by,date_voided, void_reason,changed_by,date_changed, uuid ) values(\");\n\t\t\t\tsb.append(\"1,\" + pt.getId().toString()+ \",\" + \"null\" +\",'\" + pt.getGivenName().toString()+ \"','\" + pt.getMiddleName().toString() + \"',\" +\"null\" + \",'\" +pt.getFamilyName() +\"',\" +\"null\" +\",\" + \"null\" +\",\" + \"null\" + \",\" +\"1\" +\",'\" + dateFormat.format(date) + \"',0,null,null,null,null,null,null,\" + \" );\\n\\n\" );\n\t\t\t\tsb.append(\"\");\n\n\t\t\t\tsb.append(\"insert into person (gender,birthdate, birthdate_estimated,dead,death_date,cause_of_death,creator, date_created,changed_by,date_changed,voided, voided_by,date_voided, void_reason, uuid,deathdate_estimated) values(\");\n\t\t\t\tsb.append( \"'\" + pt.getGender().toString() +\"','\" + pt.getBirthdate().toString() + \"',0,0,null,null,1,'\");\n\t\t\t\tsb.append(dateFormat.format(date)+ \"',null,null,0,null,null,null,null,0\" + \");\\n\\n\" );\n\t\t\t\tsb.append(\"\");\n\n\n\t\t\t\tList<Obs> obs1 = new ArrayList<Obs>();\n\t\t\t\tContext.clearSession();\n\t\t\t\tObsService obsService = Context.getObsService();\n\t\t\t\tList<Obs> ob = getOriginalObsList(pt, obsService);\n\t\t\t\tobs1 = getEncountersOfPatient(pt,ob,pid); //New obs list - updated\n\t\t\t\tList<ConceptSource> cs = getConceptMapping(obs1);\n\t\t\t\tfor(int i=0; i<obs1.size();i++){\n\n\n\t\t\t\t\tsb.append(\"insert into obs (person_id,concept_id, encounter_id, order_id, obs_datetime, location_id, obs_group_id, accession_number, value_group_id,value_boolean,value_coded, value_coded_name_id,value_drug,value_datetime,value_numeric,value_modifier,value_text,value_complex, comments, creator, date_created,voided, voided_by,date_voided, void_reason, uuid,previous_version) values(\");\n\t\t\t\t\tsb.append(pt.getId().toString() );\n\t\t\t\t\tsb.append(\",\" + obs1.get(i).getConcept().getConceptId().toString());\n\t\t\t\t\tsb.append(\",\" + obs1.get(i).getEncounter().getEncounterId().toString());\n\t\t\t\t\tsb.append( \",null,'\" + obs1.get(i).getObsDatetime().toString() );\n\t\t\t\t\tsb.append( \"',null,null,null,null,\" );\n\t\t\t\t\tif(obs1.get(i).getValueBoolean() != null)\n\t\t\t\t\t\tsb.append(obs1.get(i).getValueBoolean().toString());\n\t\t\t\t\telse\n\t\t\t\t\t\tsb.append(\"null\");\n\t\t\t\t\tsb.append( \",\" );\n\t\t\t\t\tif(obs1.get(i).getValueCoded() != null)\n\t\t\t\t\t\tsb.append(obs1.get(i).getValueCoded().toString());\n\t\t\t\t\telse\n\t\t\t\t\t\tsb.append(\"null\");\n\n\n\t\t\t\t\tsb.append(\",null,null,null,\" );\n\t\t\t\t\tif(obs1.get(i).getValueNumeric() != null)\n\t\t\t\t\t\tsb.append(obs1.get(i).getValueNumeric().toString());\n\t\t\t\t\telse\n\t\t\t\t\t\tsb.append(\"null\");\n\n\t\t\t\t\tsb.append( \",null,null,null,null,1,'\" + dateFormat.format(date) +\"',0,null,null,null,null,null\" + \" );\\n\\n\" );\n\t\t\t\t\tsb.append(\"\");\n\n\n\t\t\t\t\tsb.append(\"insert into encounter (encounter_type, patient_id, location_id, form_id, encounter_datetime, creator, date_created,voided, voided_by,date_voided, void_reason, changed_by, date_changed,visit_id, uuid) values(\");\n\t\t\t\t\tsb.append(obs1.get(i).getEncounter().getEncounterType().getEncounterTypeId().toString() + \",\");\n\t\t\t\t\tsb.append(pt.getId().toString() + \",null,null,'\");\n\t\t\t\t\tsb.append(dateFormat.format(obs1.get(i).getEncounter().getEncounterDatetime()).toString() + \"',1,'\");\n\t\t\t\t\tsb.append(dateFormat.format(date) + \"',0,null,null,null,null,null,null,null);\\n\\n\");\n\t\t\t\t\tsb.append(\"\");\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tString a = sb.toString();\n\t\t\t// Finally, send the response\n\t\t\tbyte[] res = a.getBytes(Charset.forName(\"UTF-8\"));\n\t\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\t\t\tresponse.getOutputStream().write(res);\n\t\t\tresponse.flushBuffer();\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tlog.error(\"IO Exception in generating SQL\", e);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tlog.error(\"Exception in generating SQL\", e);\n\t\t}\n\n\t}", "public static void main(String[] args){\n String importPath = \"import.CSV\";\n String exportQuery = \"SELECT * FROM PAIS\";\n SQLUtils t = new SQLUtilsImpl();\n File export = t.importCSV(exportQuery);\n //t.runFile(file);\n //t.importCSV(importF);\n //System.out.println(t.executeQuery(\"SELECT * FROM CIDADE WHERE ID = 3000\")); \n \n System.out.println(\"termino\");\n }", "private void exportToInsertSql() {\n\n if (destTableNameList.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"No table is selected.\");\n return;\n }\n final StringBuilder sb = new StringBuilder();\n for (final String tableName : destTableNameList) {\n utils.executeQuerySql(\"SELECT * FROM \" + tableName + \" WHERE 1=2\", new DataMetaUtils.QueryAction<Object>() {\n @Override\n public Object callback(ResultSet rs) throws SQLException {\n StringBuilder tableTriggerSb = new StringBuilder();\n ResultSetMetaData metaData = rs.getMetaData();\n String auditTableName = tableName + \"_AL\";\n tableTriggerSb.append(\"CREATE TABLE \").append(auditTableName).append(\" (\\n\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n tableTriggerSb.append(\" \");\n tableTriggerSb.append(metaData.getColumnName(i + 1));\n String typeName = metaData.getColumnTypeName(i + 1);\n tableTriggerSb.append(\" \")\n .append(typeName);\n if (metaData.getPrecision(i + 1) > 0) {\n tableTriggerSb.append(\"(\")\n .append(metaData.getPrecision(i + 1));\n if (metaData.getScale(i + 1) > 0) {\n tableTriggerSb.append(\",\")\n .append(metaData.getScale(i + 1));\n }\n tableTriggerSb.append(\")\");\n }\n\n tableTriggerSb.append(\",\\n\");\n\n }\n tableTriggerSb.append(\" ACT_TYPE CHAR(1),\\n\")\n .append(\" ACT_BY VARCHAR2(50),\\n\")\n .append(\" ACT_TIME DATE\\n\");\n tableTriggerSb.append(\");\\n\");\n\n\n //create trigger\n StringBuilder newInsert = new StringBuilder();\n StringBuilder delInsert = new StringBuilder();\n newInsert.append(\"INSERT INTO \").append(auditTableName).append(\"(\");\n delInsert.append(\"INSERT INTO \").append(auditTableName).append(\"(\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n\n newInsert.append(metaData.getColumnName(i + 1));\n newInsert.append(\",\");\n delInsert.append(metaData.getColumnName(i + 1));\n delInsert.append(\",\");\n }\n newInsert.append(\"ACT_TYPE,\")\n .append(\"ACT_BY,\")\n .append(\"ACT_TIME) VALUES(\");\n delInsert.append(\"ACT_TYPE,\")\n .append(\"ACT_BY,\")\n .append(\"ACT_TIME) VALUES(\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n\n newInsert.append(\":NEWROW.\").append(metaData.getColumnName(i + 1));\n newInsert.append(\",\");\n delInsert.append(\":OLDROW.\").append(metaData.getColumnName(i + 1));\n delInsert.append(\",\");\n }\n newInsert.append(\"v_actType,\")\n .append(\":NEWROW.UPDATED_BY,\")\n .append(\"sysdate);\\n\");\n delInsert.append(\"'D',\")\n .append(\"USER,\")\n .append(\"sysdate);\\n\");\n\n tableTriggerSb.append(\"CREATE OR REPLACE TRIGGER \")\n .append(\"TR_AL_\")\n .append(tableName)\n .append(\" \\n\")\n .append(\"AFTER INSERT OR DELETE OR UPDATE ON \")\n .append(tableName)\n .append(\" \\n\")\n .append(\"REFERENCING OLD AS \\\"OLDROW\\\" NEW AS \\\"NEWROW\\\" \\n\"\n + \"FOR EACH ROW \\n\"\n + \"ENABLE\\n\")\n .append(\"DECLARE\\n\")\n .append(\"v_actType char(1);\\n\")\n .append(\"BEGIN\\n\")\n .append(\"IF INSERTING OR UPDATING THEN \\n\"\n + \"BEGIN \\n\"\n + \"IF INSERTING THEN \\n v_actType := 'I'; \\nELSE\\n v_actType := 'U';\\n END IF;\\n\");\n tableTriggerSb.append(newInsert.toString());\n tableTriggerSb.append(\"END;\\n\"\n + \" ELSIF DELETING THEN \\n\"\n + \" BEGIN \\n\");\n\n tableTriggerSb.append(delInsert.toString());\n tableTriggerSb.append(\"END;\\n\"\n + \"END IF;\\n\"\n + \"END;\\n/\\n\");\n sb.append(tableTriggerSb.toString());\n\n return null;\n }\n });\n }\n\n SqlResultForm form = new SqlResultForm(null, true);\n form.setLocationRelativeTo(null);\n form.setSqlResult(sb.toString());\n form.setTestDsKey(((ValueName) cmbDs.getSelectedItem()).getValue());\n form.setVisible(true);\n\n }", "public void toSql(String baseDir, String out) throws IOException {\n Path pBase = Paths.get(baseDir);\n final String format = \"insert into files values(null,'%s','%s');\";\n List<String> files = new ArrayList<>();\n Files.walkFileTree(pBase, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n String fileName = file.getFileName().toString();\n String path = file.toAbsolutePath().toString();\n if (filter(path) || filter(fileName)) {\n return FileVisitResult.CONTINUE;\n }\n if (fileName.length() > 128 || path.length() > 8096) {\n System.out.println(String.format(\"warning : %s %s exced the limit\", fileName, path));\n }\n\n\n String insert = String.format(format, fileName, path);\n files.add(insert);\n if (files.size() >= 10240) {\n write2File(out, files);\n files.clear();\n }\n return FileVisitResult.CONTINUE;\n }\n });\n write2File(out, files);\n }", "void exportToDirectory(File targetDirectory) throws IOException;", "DataFrameExport export();", "public void writeToDatabase(List<Page> pageList) {\n\t\tDbConnector db = null;\n\t\ttry {\n\t\t\tdb = new DbConnector();\n\t\t} catch (ClassNotFoundException | SQLException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tfor (Page page : pageList) {\n\t\t\ttry {\n\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_INSERT, Arrays.asList(String.valueOf(page.getPageId()),\n\t\t\t\t\t\tpage.getTitle(), String.valueOf(page.getNs()), \"EN\"));\n\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_CONTENT_INSERT,\n\t\t\t\t\t\tArrays.asList(String.valueOf(page.getPageId()), page.getExtract()));\n\t\t\t\tint position = 0;\n\t\t\t\tfor (String key : page.getExtractMap().keySet()) {\n\t\t\t\t\tString fullText = \"\";\n\t\t\t\t\tLinkedHashMap<String, String> textMap = page.getExtractMap().get(key);\n\t\t\t\t\tfor (String textMapKey : textMap.keySet()) {\n\t\t\t\t\t\tfullText += textMap.get(textMapKey);\n\t\t\t\t\t}\n\t\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_EXTRACT_INSERT,\n\t\t\t\t\t\t\tArrays.asList(String.valueOf(page.getPageId()), key, fullText, String.valueOf(position)));\n\t\t\t\t\tposition++;\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tdb.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void setupDBs()\n {\n\t mSetupDBTask = new SetupDBTask(this);\n\t\tmSetupDBTask.execute((Void[])null);\n }", "public static void main(String[] args) throws FileNotFoundException, ParseException {\n\t\tCreateLocations.main(args);// create default locations\n\t\t\n\t\t// Create Apex Consulting\n\t\t\n\t\tLegalName = \"Apex Consulting\";//compose the company's name\n\t\tDBAName = LegalName;\n\t\tDomain = \"apexconsulting.com\";//compose the company's domain\n\t\tToken = \"0_NJTIPIpaJTl1XOyn9SmfFFrK0=\";// OAuth access token\n\t\tIndustry = \"Consulting\";\n\t\tcity = \"Bellevue\";\n\t\t\n\t\tHQ = location.getCity(locCollection, city);\n\t\tHQ.display();\n\t\tif (HQ.getCountryCode().equals(\"CA\")) {//then it's a Canadian company\n\t\t\tPostingCurrency = \"CAD\";\n\t\t} else if (HQ.getCountryCode().equals(\"GB\")) {//then it's a United Kingdom company\n\t\t\tPostingCurrency = \"GBP\";\n\t\t} else if (HQ.getCountryCode().equals(\"AU\")) {//then it's a Australian company\n\t\t\tPostingCurrency = \"AUD\";\n\t\t}else {//then its an American company\n\t\t\tPostingCurrency = \"USD\";\n\t\t}// if block\n\t\n\t\t\n\t\tcompany.setID(GUID.getGUID(4));\n\t\tcompany.setDBAName(DBAName);\n\t\tcompany.setLegalName(LegalName);\n\t\tcompany.setDomain(Domain);\n\t\tcompany.setIndustry(Industry);\n\t\tcompany.setHQ(HQ);\n\t\tcompany.setPostingCurrency(PostingCurrency);\n\n\t\t\n\t\tcoid = company.getID();\n\t\tout.println(\"----------------------\");\n\t\tcompany.display();\n\t\tmyDoc = company.getDocument();//convert the Company object into a BasicDBObject document\n\t\tmyMongoCompanyFunctions.addDoc(comCollection, myDoc);\n\t\t\n\t\tlogin=\"Support@\" + Domain;\n\t\t\n\t\temployee.setID(GUID.getGUID(4));\n\t\temployee.setDisplayName(firstname + \" \"+ lastname);\n\t\temployee.setEmployerCompanyID(coid);\n\t\temployee.setEmployerCompanyName(LegalName);\n\t\temployee.setHome(HQ);\n\t\temployee.setLastName(lastname);\n\t\temployee.setFirstName(firstname);\n\t\temployee.setLoginID(login);\n\n\t\tout.println(\"----------------------\");\n\t\temployee.display();\n\t\tmyDoc = employee.getDocument();// convert this Employee object into a BasicDBObject\n\t\tmyMongoCompanyFunctions.addDoc(empCollection, myDoc);// add this BasicDBObject to the MongoDB\n\t\t\n\t\tString strDate = \"11/21/2017 04:58:55 AM\";// assign the Expriration_Date to this \"String date\"\n\t\tDate ExpirationDate = sdf.parse(strDate);// parse the \"String date\" into a Date object using the SimpleDateFormat object sdf\n\t\t\n\n\t\tEmployeeID = employee.getID();// assign the ID for this Employee\n\t\tCompanyID = employee.getEmployerCompanyID();// assign the Company ID for this employee\n\t\t\n\t\ttoken.setID(GUID.getGUID(4));\n\t\ttoken.setInstanceURL(Instance);\n\t\ttoken.setToken(Token);\n\t\ttoken.setExpirationDate(ExpirationDate);\n\t\ttoken.setEmployeeID(EmployeeID);\n\t\ttoken.setCompanyID(CompanyID);\n\n\t\tout.println(\"----------------------\");\n\t\ttoken.display();\n\t\tmyDoc = token.getDocument();// convert the OAuthToken object into a BasicDBObject document\n\t\tmyMongoCompanyFunctions.addDoc(tokenCollection, myDoc);// add the BasicDBObject to the Tokens collection\n\t\t\n\t\t\n\t\t\n\t\n\n\t}", "public void exportAllSpaces(String confluenceUrl, String username, String password, File targetDir) {\n\t\tPhantomJSDriver driver = new PhantomJSDriver();\n\t\tdriver.manage().window().setSize(new Dimension(1920, 1080));\n\n\t\ttry {\n\t\t\tdriver.get(confluenceUrl);\n\n\t\t\t// login\n\t\t\tWebElement inputUsername = driver.findElement(By.id(\"os_username\"));\n\t\t\tWebElement inputPassword = driver.findElement(By.id(\"os_password\"));\n\t\t\tWebElement loginButton = driver.findElement(By.id(\"loginButton\"));\n\n\t\t\tinputUsername.sendKeys(username);\n\t\t\tinputPassword.sendKeys(password);\n\t\t\tloginButton.click();\n\n\t\t\t// open \"all spaces\"\n\t\t\tdriver.findElement(By.cssSelector(\"a.all-spaces-link\")).click();\n\n\t\t\t// collect spaces\n\t\t\tList<String> spacesURLs = new ArrayList<>();\n\t\t\tString currentPage = getCurrentPage(driver);\n\t\t\tdo {\n\t\t\t\tnew WebDriverWait(driver, 30).until(d -> findSpacesListElements(d).size() > 0);\n\t\t\t\tfindSpacesListElements(driver).forEach(webElement -> spacesURLs.add(webElement.getAttribute(\"href\")));\n\n\t\t\t\t// search next button\n\t\t\t\tWebElement nextButton = driver.findElement(By.cssSelector(\"#space-search-result .aui-nav-next>a\"));\n\t\t\t\tif (nextButton != null && nextButton.getAttribute(\"href\") != null) {\n\t\t\t\t\tfinal String prevPage = currentPage;\n\t\t\t\t\tnextButton.click();\n\t\t\t\t\tnew WebDriverWait(driver, 30).until(d -> !StringUtils.equals(getCurrentPage(d), prevPage));\n\t\t\t\t\tcurrentPage = getCurrentPage(driver);\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (true);\n\n\t\t\t// go to each space\n\t\t\tfor (String spacesURL : spacesURLs) {\n\t\t\t\tdriver.navigate().to(spacesURL);\n\t\t\t\tString spaceKey = extractSpaceKey(driver);\n\t\t\t\tif (spaceKey != null) {\n\n\t\t\t\t\t// got to space export page\n\t\t\t\t\tdriver.navigate().to(confluenceUrl + \"/spaces/exportspacewelcome.action?key=\" + spaceKey);\n\n\t\t\t\t\t// select PDF radio button\n\t\t\t\t\tdriver.findElement(By.id(\"format-export-format-pdf\")).click();\n\n\t\t\t\t\t// click next button\n\t\t\t\t\tdriver.findElement(By.cssSelector(\"form[name=\\\"export-space-choose-format\\\"] input[name=\\\"confirm\\\"]\")).click();\n\n\t\t\t\t\t// select standard export\n\t\t\t\t\tWebElement contentOptionAll;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcontentOptionAll = driver.findElement(By.id(\"contentOptionAll\"));\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// radio button not found -> no pages in space?\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tcontentOptionAll.click();\n\n\t\t\t\t\t// click export button\n\t\t\t\t\tdriver.findElement(By.cssSelector(\"form[name=\\\"exportspaceform\\\"] input[name=\\\"confirm\\\"]\")).click();\n\n\t\t\t\t\t// wait for download link\n\t\t\t\t\tnew WebDriverWait(driver, 600).until(d -> d.findElement(By.cssSelector(\"#taskCurrentStatus>a\")));\n\t\t\t\t\tWebElement downloadButton = driver.findElement(By.cssSelector(\"#taskCurrentStatus>a\"));\n\n\t\t\t\t\t// download\n\t\t\t\t\tString downloadLink = downloadButton.getAttribute(\"href\");\n\t\t\t\t\tdownloadPDF(driver, downloadLink, targetDir);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tmakeScreenshot(driver);\n\t\t}\n\t}", "private final void exportAll() {\n\t\tfinal JFileChooser chooser = new JFileChooser(System.getProperty(\"user.home\"));\n\t\tint returnVal = chooser.showSaveDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = chooser.getSelectedFile();\n\t\t\tserializeToFile(file);\n\t }\t\n\t}", "public File getOutputDb();", "@Override\n public void exportTables(FileEnvVar exportFile,\n List<TableInfo> tableDefs,\n boolean includeBuildInformation,\n boolean replaceMacros,\n boolean includeVariablePaths,\n CcddVariableHandler variableHandler,\n String[] separators,\n String outputType,\n Object... extraInfo) throws JAXBException,\n MarshalException,\n CCDDException,\n Exception\n {\n\n // Convert the table data into XTCE XML format\n convertTablesToXTCE(tableDefs,\n includeBuildInformation,\n (EndianType) extraInfo[0],\n (boolean) extraInfo[1],\n (String) extraInfo[2],\n (String) extraInfo[3],\n (String) extraInfo[4],\n (String) extraInfo[5],\n (String) extraInfo[6]);\n\n // Output the XML to the specified file. The marshaller has a hard-coded limit of 8 levels;\n // once exceeded it starts back at the first column. Therefore, a Transformer is used to\n // set the indentation amount (it doesn't have an indentation level limit)\n DOMResult domResult = new DOMResult();\n marshaller.marshal(project, domResult);\n Transformer transformer = TransformerFactory.newInstance().newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"3\");\n transformer.transform(new DOMSource(domResult.getNode()), new StreamResult(exportFile));\n }", "public static void PrintToCsv() throws Exception {\n\t\tBufferedWriter bw1 = new BufferedWriter(new FileWriter(\"./data/output1.csv\"));\n\t\tBufferedWriter bw2 = new BufferedWriter(new FileWriter(\"./data/output2.csv\"));\n\t\tBufferedWriter bw3 = new BufferedWriter(new FileWriter(\"./data/output3.csv\"));\n\t\tBufferedWriter bw4 = new BufferedWriter(new FileWriter(\"./data/output4.csv\"));\n\t\t\n\t\t//print the name of attributes in Table\n\t\tPrint_attribute(bw1,bw2,bw3,bw4);\n\t\tIterator<String> iter = BugDBConnection.Domain.keySet().iterator();\n\t\ttry{\n\t\t\twhile(iter.hasNext()){\n\t\t\t\tString key = iter.next();\n\t\t\t\tdomain = key.split(\"-\")[0];\n\t\t\t\tproject = key.split(\"-\")[1];\n\n\t\t\t\tFieldSet fieldset = BugDBConnection.Domain.get(key);\n\t\t\t\tPrintQ1(bw1,fieldset.field);\n\t\t\t\tPrintQ2(bw2, fieldset.refield);\n\t\t\t\tPrintQ3(bw3, fieldset.f1, fieldset.f2, fieldset.f3, fieldset.f4);\n\t\t\t\tPrintQ4(bw4, fieldset.avg, fieldset.min, fieldset.max);\n\t\t\t\t\n\t\t\t}\n\t\t\tbw1.close();\n\t\t\tbw2.close();\n\t\t\tbw3.close();\n\t\t\tbw4.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static Output<GetDomainsResult> getDomains(GetDomainsArgs args) {\n return getDomains(args, InvokeOptions.Empty);\n }", "public void saveDatabase() {\r\n\t\ttry {\r\n\t\t\tFile databaseDirectory = new File (System.getProperty(\"user.home\")\r\n\t\t\t\t\t+ File.separator + \"Documents\" + File.separator + \"DatabaseUniverse\"\r\n\t\t\t\t\t+ File.separator + name);\r\n\t\t\tdatabaseDirectory.mkdirs();\r\n\t\t\tFile[] files = databaseDirectory.listFiles();\r\n\t\t\tSystem.gc();\r\n\t\t\tfor (File file : files) {\r\n\t\t\t\tFiles.delete(file.toPath());\r\n\t\t\t}\r\n\t\t\tfor (Table table : tables) {\r\n\t\t\t\ttable.saveTable(databaseDirectory.getPath());\r\n\t\t\t}\r\n\t\t} catch (SecurityException e) {\r\n\t\t\tSystem.out.println(\"Access Denied in Documents folder. Please check your security settings\"\r\n\t\t\t\t\t+ \"to enable file saving\");\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.err.print(e);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\t}", "void deleteByDomainIds(List<String> domainIds) throws SrdmDataAccessException;", "public static void geoExport() throws ClassNotFoundException, SQLException, IOException{\n\t\t\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\tGeoExport ge = new GeoExport(conn, \"/Users/Brian/Desktop/PreDeb1_Geo.csv\", \"SELECT * FROM TWEETS WHERE GEOLOCATION IS NOT NULL\");\n\t\tge.geoMake();\n\t\tconn.close();\n\t\t\n\t}", "private static DataSources toDataSources(OutputGenerator outputGenerator, List<DataSource> sharedDataSources) {\n final List<DataSource> dataSources = outputGenerator.getDataSources();\n final SeedType seedType = outputGenerator.getSeedType();\n\n if (seedType == SeedType.TEMPLATE) {\n return new DataSources(ListUtils.concatenate(dataSources, sharedDataSources));\n } else if (seedType == SeedType.DATASOURCE) {\n // Since every data source shall generate an output there can be only 1 datasource supplied.\n Validate.isTrue(dataSources.size() == 1, \"One data source expected for generation driven by data sources\");\n return new DataSources(dataSources);\n } else {\n throw new IllegalArgumentException(\"Don't know how to handle the seed type: \" + seedType);\n }\n }", "public static File getDatabaseExportDirectoryFile() {\n\t\tif (xml == null) return null;\n\t\treturn new File(basepath + databaseExportDir);\n\t}", "protected void exportRecords( ExportArguments arguments, String username, String password, List<Record> records ){\n\t\tif ( records.size() > 0 ){\n\t\t\tthis.getLogger().log( LogLevel.INFO, \"SensLink 3.0 Export All Adapter: export {} records to the SensLink System.\", records.size() );\n\n\t\t\tSensLinkApiV3 api;\n\t\t\tOAuthToken token;\n\t\t\ttry {\n\t\t\t\t// Login SensLink 3.0 by OAuth 2.0\n\t\t\t\tif ( arguments.isCustom() ){\n\t\t\t\t\tapi = SensLinkApiV3Runtime.buildRuntime( arguments.getHost() );\n\t\t\t\t\ttoken = api.requestAccessToken( username, password, arguments.getHost() );\n\t\t\t\t} else {\n\t\t\t\t\tapi = SensLinkApiV3Runtime.DEFAULT;\n\t\t\t\t\ttoken = api.requestAccessToken( username, password, SensLinkApiV3Host.IOW );\n\t\t\t\t}\n\t\t\t\tif ( token.isSuccessful() ){\n\t\t\t\t\tthis.getLogger().log( LogLevel.INFO, \"SensLink 3.0 Export Adapter: The SensLink 3.0 system login successfully, try to write records to the SensLink 3.0 system.\" );\n\t\t\t\t\tResultMessage message = api.write( token.getAccess(), records );\n\t\t\t\t\tif ( message.isSuccessful() ) {\n\t\t\t\t\t\tthis.getLogger().log( LogLevel.INFO,\"SensLink 3.0 Export Adapter: success to write {} records to the SensLink System.\", records.size() );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.getLogger().log( LogLevel.WARN,\"SensLink 3.0 Export Adapter: Failed to write records to the SensLink System.\" );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.getLogger().log( LogLevel.WARN, \"SensLink 3.0 Export Adapter: SensLink System Login failed.\" );\n\t\t\t\t}\n\t\t\t} catch ( IOException e ){\n\t\t\t\tthis.getLogger().log( LogLevel.ERROR, \"SensLink 3.0 Export Adapter: Connection to SensLink 3.0 system timeout. {}\", e ) ;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.getLogger().log( LogLevel.WARN, \"SensLink 3.0 Export Adapter: PI-XML hasn't data to export.\" );\n\t\t}\n\t}", "private void deleteExpiredTemporaryExportFiles(List<COSite> cosites) {\r\n\tint timeOut = getDeleteExportDelay();\r\n\tfor (Iterator<COSite> iter = cosites.iterator(); iter.hasNext();) {\r\n\t try {\r\n\t\tSite site =\r\n\t\t\tsiteService.getSite(((COSite) iter.next()).getSiteId());\r\n\t\tString id = getSiteReference(site) + TEMP_DIRECTORY;\r\n\t\tid = id.substring(8) + \"/\";\r\n\t\t// enableSecurityAdvisor();\r\n\t\tlog.info(\"*** deleteExpiredTemporaryExportFiles enableSecurityAdvisor() { OsylManagerServiceImpl *** \");\r\n\r\n\t\tif (collectionExist(id)) {\r\n\t\t ContentCollection contentCollection =\r\n\t\t\t contentHostingService.getCollection(id);\r\n\t\t @SuppressWarnings(\"unchecked\")\r\n\t\t List<ContentEntity> members =\r\n\t\t\t contentCollection.getMemberResources();\r\n\r\n\t\t // process members\r\n\t\t boolean hasContent = false;\r\n\t\t for (Iterator<ContentEntity> iMbrs = members.iterator(); iMbrs\r\n\t\t\t .hasNext();) {\r\n\t\t\tContentEntity next = (ContentEntity) iMbrs.next();\r\n\t\t\tString thisEntityRef = next.getId();\r\n\t\t\tContentResource contentResource =\r\n\t\t\t\tcontentHostingService\r\n\t\t\t\t\t.getResource(thisEntityRef);\r\n\r\n\t\t\tTime creationDate =\r\n\t\t\t\t(Time) contentResource\r\n\t\t\t\t\t.getProperties()\r\n\t\t\t\t\t.getTimeProperty(\r\n\t\t\t\t\t\tResourceProperties.PROP_CREATION_DATE);\r\n\t\t\tTime now = timeService.newTime();\r\n\t\t\tTime expirationTime = timeService.newTime();\r\n\t\t\texpirationTime.setTime(creationDate.getTime() + timeOut\r\n\t\t\t\t* 60000);\r\n\t\t\tif (now.after(expirationTime)) {\r\n\t\t\t contentHostingService.removeResource(thisEntityRef);\r\n\t\t\t} else {\r\n\t\t\t hasContent = true;\r\n\t\t\t}\r\n\t\t }\r\n\t\t if (!hasContent) {\r\n\t\t\tcontentHostingService.removeCollection(id);\r\n\t\t }\r\n\t\t}\r\n\t\t// securityService.popAdvisor();\r\n\t } catch (Exception e) {\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}\r\n }", "public static void main(String[] args) throws Exception {\n\t\tConvertDB2ToOracle_v2 convert = getInstance();\n\t\tconvert.provide(\"D:\\\\others\\\\temp\\\\db2-extra-tables.txt\");\n\t\tconvert.extractSQL(\"D:\\\\others\\\\temp\\\\ddlfile.sql\");\n\t}", "@Override\r\n\t@Transactional(readOnly=false,value=\"transactionManager2\")\r\n\tpublic List<ApplMstOrderTypeDest> save(List<ApplMstOrderTypeDest> domain, int bulkRecord) {\n\t\treturn applMstOrderTypeDestDAO.save(domain, bulkRecord);\r\n\t}", "public void convertCsvDataToSQLScrip(List<CorruptionIndex> data, String destinationFile){\n\n }", "public abstract String getExportLocation();", "public static List<JdbcOption> getDatabaseList(String baseDir) throws Exception {\n\t\tProjectConfig projectConfig = getProjectConfig(getCommonConfigFile(baseDir));\n\t\treturn getDatabaseListFromFile(projectConfig.getDatabasesPath() + Constants.FILE_SEPERATOR + Constants.DB_SETTINGS_XML_FILE);\n\t}", "@Override\n public <T> void exportToExcel(String location, List<T>... values) throws IOException, WriteException, DALException {\n ExcelWriter newFile = new ExcelWriter();\n newFile.setOutputFile(location);\n newFile.createNewExcel(\"Rapport over frivillige\");\n\n newFile.createCaptions(0, \"Frivillig\", \"Email\", \"Telefon\", \"Antal timer i laug\");\n\n writeDataToFile(newFile, values[0], 1);\n\n //If a second list is parsed, prints its information under the first list.\n if (values.length > 1 && values[1] != null) {\n newFile.createCaptions(values[0].size() + 1, \"Inaktive Frivillige\");\n\n writeDataToFile(newFile, values[1], values[1].size() + 2);\n }\n\n newFile.writeExcelToFile();\n }", "public String[] getDatabaseCleanScripts() throws AdaFrameworkException {\r\n\t\tString[] returnedValue = null;\r\n\t\tList<String> scriptsList = new ArrayList<String>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString[] existingTables = getTables();\r\n\t\t\tif (existingTables != null && existingTables.length > 0) {\r\n\t\t\t\tif (processedTables != null && processedTables.size() > 0) {\r\n\t\t\t\t\tfor(String databaseTable : existingTables) {\r\n\t\t\t\t\t\tboolean tableFound = false;\r\n\t\t\t\t\t\tfor (String modelTable : processedTables) {\r\n\t\t\t\t\t\t\tif (databaseTable.trim().toLowerCase().equals(modelTable.trim().toLowerCase())) {\r\n\t\t\t\t\t\t\t\ttableFound = true;\r\n\t\t\t\t\t\t\t\tbreak;\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\r\n\t\t\t\t\t\tif (!tableFound) {\r\n\t\t\t\t\t\t\tif (!databaseTable.contains(DataUtils.DATABASE_LINKED_TABLE_NAME_PREFIX)) {\r\n\t\t\t\t\t\t\t\tscriptsList.add(String.format(DataUtils.DATABASE_DROP_TABLE_PATTERN, databaseTable));\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}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (scriptsList.size() > 0) {\r\n\t\t\t\treturnedValue = scriptsList.toArray(new String[scriptsList.size()]);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tExceptionsHelper.manageException(e);\r\n\t\t} finally {\r\n\t\t\tscriptsList.clear();\r\n\t\t\tscriptsList = null;\r\n\t\t}\r\n\t\t\r\n\t\treturn returnedValue;\r\n\t}", "private void writeDataToDatabase(InfluxDB influxDB, Target target, Point[] data) {\n for (Point p : data) {\n influxDB.write(target.getDatabase(), \"default\", p);\n }\n }", "public boolean backupAllTablesToCsv(Context ctx, SQLiteDatabase db, String suffix) {\n\t\tboolean allSucceeded = true;\n\t\tfor (TableHelper table : getTableHelpers()) {\n\t\t\tallSucceeded &= table.backup(db, ctx, suffix);\n\t\t}\n\t\treturn allSucceeded;\n\t}", "public static void main(String[] args) {\n\t\tnew DBImport().importDB(Config.getContextRealPath() + \"WEB-INF/data/installer/Install.dat\");\n\t}", "private File exportAndZip(String siteId, String webappDir) throws Exception {\r\n\tlog.info(\"user [\" + sessionManager.getCurrentSession().getUserEid()\r\n\t\t+ \"] exports site: [\" + siteId + \"]\");\r\n\r\n\t// opening a new temporary zipfile\r\n\tFile zipFile = File.createTempFile(\"osyl-package-export\", \".zip\");\r\n\tZipOutputStream zos =\r\n\t\tnew ZipOutputStream(new FileOutputStream(zipFile));\r\n\r\n\t// retrieving the xml file\r\n\tCOSerialized coSerialized =\r\n\t\tosylSiteService.getCourseOutlineForExport(siteId, webappDir);\r\n\r\n\tbyte[] xmlBytes = coSerialized.getContent().getBytes(\"UTF-8\");\r\n\twriteToZip(zos, OsylManagerService.CO_XML_FILENAME, xmlBytes);\r\n\r\n\t// retrieving other resources\r\n\tString resourceDir = contentHostingService.getSiteCollection(siteId);\r\n\r\n\ttry {\r\n\t ContentCollection workContent =\r\n\t\t contentHostingService.getCollection(resourceDir);\r\n\t // recursively retrieve all files\r\n\t retrieveFiles(zos, workContent, resourceDir);\r\n\t} catch (Exception e) {\r\n\t log.error(e);\r\n\t e.printStackTrace();\r\n\t throw new Exception(\"Cannot retrieve files in site for zipping\", e);\r\n\t}\r\n\tzos.close();\r\n\treturn zipFile;\r\n }", "public static boolean exportStatement(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"exportStatement\")) return false;\n if (!nextTokenIs(b, \"<export statement>\", AT, EXPORT)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, EXPORT_STATEMENT, \"<export statement>\");\n r = exportStatement_0(b, l + 1);\n r = r && consumeToken(b, EXPORT);\n r = r && uriElement(b, l + 1);\n p = r; // pin = 3\n r = r && report_error_(b, exportStatement_3(b, l + 1));\n r = p && report_error_(b, exportStatement_4(b, l + 1)) && r;\n r = p && consumeToken(b, SEMICOLON) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "private void createDBProcedure() {\r\n try {\r\n Class.forName(myDriver);\r\n Connection conn = DriverManager.getConnection(myUrl, myUser, myPass);\r\n for (File sentiment : sentimentsFoldersList) {\r\n try {\r\n String queryCreate\r\n = \"CREATE TABLE \" + sentiment.getName().toUpperCase()\r\n + \" (WORD VARCHAR(50), COUNT_RES INT, PERC_RES FLOAT, COUNT_TWEET INT, PRIMARY KEY(WORD) )\";\r\n Statement st_create = conn.createStatement();\r\n st_create.executeUpdate(queryCreate);\r\n System.out.println(\"TABLE \" + sentiment.getName().toLowerCase() + \" CREATED\");\r\n st_create.close();\r\n } catch (SQLException ex) {\r\n if (ex.getErrorCode() == 955) {\r\n System.out.println(\"TABLE \" + sentiment.getName().toLowerCase() + \" WAS ALREADY PRESENT...\");\r\n }\r\n }\r\n }\r\n conn.close();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n System.out.println(ex.toString());\r\n }\r\n }", "public boolean writePlicSnapshotToFile(File f, String dbSchema, String dataSource){\n try{\n //Obtener la conexion JDBC del proyecto\n InitialContext ctx = new InitialContext();\n DataSource ds = (DataSource) ctx.lookup(dataSource);\n Connection connection = ds.getConnection();\n\n\t String query = \"SELECT '\\\"'||REPLACE(COALESCE(globaluniqueidentifier,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(scientificname,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(institutioncode,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||COALESCE(to_char(datelastmodified,'YYYY-MM-DD HH24:MI:SS'),'')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(taxonrecordid,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(language,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(creators,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(distribution,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(abstract,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(kingdomtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(phylumtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(classtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(ordertaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(familytaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(genustaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(synonyms,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(authoryearofscientificname,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(speciespublicationreference,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(commonnames,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(typification,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(contributors,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||COALESCE(to_char(datecreated,'YYYY-MM-DD'),'')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(habit,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(lifecycle,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(reproduction,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(annualcycle,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(scientificdescription,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(briefdescription,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(feeding,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(behavior,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(interactions,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(chromosomicnumbern,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(moleculardata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(populationbiology,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(threatstatus,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(legislation,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(habitat,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(territory,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(endemicity,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(theuses,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(themanagement,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(folklore,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(thereferences,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(unstructureddocumentation,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(otherinformationsources,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(papers,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(identificationkeys,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(migratorydata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(ecologicalsignificance,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(unstructurednaturalhistory,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(invasivenessdata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(targetaudiences,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(version,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage1,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage1,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage2,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage2,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage3,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage3,''),'\\r\\n', ' ')||'\\\"'\"+\n\t\t\t \" AS aux \"+\n\t\t\t \"FROM \"+dbSchema+\".plic_snapshot;\";\n\n System.out.println(query);\n\n\t\t\tStatement st = connection.createStatement();\n\t\t\tResultSet rs = st.executeQuery(query); \n\n //Imprimir los datos en el archivo\n BufferedWriter out = new BufferedWriter(new FileWriter(f));\n\t\t\twhile (rs.next()) {\n\t\t\t\tout.write(rs.getString(\"aux\")+\"\\n\");\n\t\t\t}\n out.close();\n\n //Cerrar el resultset y el statement\n rs.close();\n\t\t\tst.close();\n\n //Resultado\n return true;\n }\n catch(Exception e){\n e.printStackTrace();\n return false;}\n }", "public abstract String [] listDatabases();", "public void writeResultData() {\n\n// DatabaseLoader databaseLoader = new DatabaseLoader();\n TestResultDeployer testResultDeployer = new TestResultDeployer();\n MySqlDatabaseManager mySqlDatabaseManager;\n try {\n EnvironmentBuilder environmentBuilder = new EnvironmentBuilder();\n DashboardVariables dashboardVariables = environmentBuilder.getFrameworkSettings().getDashboardVariables();\n if (dashboardVariables.getEnableDashboard().equalsIgnoreCase(\"true\")) {\n String databaseName = dashboardVariables.getDbName();\n\n mySqlDatabaseManager = new MySqlDatabaseManager(dashboardVariables.getJdbcUrl(), dashboardVariables.\n getDbUserName(), dashboardVariables.getDbPassword());\n// databaseLoader.createDatabase();\n mySqlDatabaseManager.execute(\"INSERT INTO \" + databaseName + \".WA_BUILD_HISTORY VALUES()\");\n DirectoryScanner scan = new DirectoryScanner();\n scan.setBasedir(ProductConstant.REPORT_LOCATION + File.separator + \"reports\" + File.separator);\n String[] fileList = new String[]{\"*/testng-results.xml\"};\n scan.setIncludes(fileList);\n scan.scan();\n String[] fileset = scan.getIncludedFiles();\n for (int i = 0; i <= fileset.length - 1; i++) {\n testResultDeployer.writeResult(ProductConstant.REPORT_LOCATION + \"reports\" +\n File.separator + fileset[i]);\n log.info(fileset[i] + \" write to database\");\n }\n }\n } catch (ClassNotFoundException e) {\n log.error(e);\n } catch (SQLException e) {\n log.error(e);\n } /*catch (IOException e) {\n log.error(e);\n }*/\n }", "public static Output<GetDomainsResult> getDomains() {\n return getDomains(GetDomainsArgs.Empty, InvokeOptions.Empty);\n }", "Downloadable export(ExportType exportType, String query, Pageable pageable);", "public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {\n\t\tString \tmongoHost \t= \"localhost\";\n\t\tint \tmongoPort\t= 27017;\n\t\tString mongoDb\t\t= \"grits-net-meteor\";\n\t\tString airportsCol\t= \"airports\";\n\t\t\n\t\tList<String> countries = getUniqueCountryList(mongoHost, mongoPort, mongoDb, airportsCol );\n\t\t\n\t\tPrintWriter writer = new PrintWriter(\"./res/output.txt\", \"UTF-8\");\n\t\tfor(String country : countries) {\n\t\t\twriter.println(\" \");\n\t\t\twriter.println(\"Now analyzing country: \" + country);\n\t\t\t\n\t\t\t//Our database has a country that is \"Unknown Country\"\n\t\t\tif(!country.equals(\"Unknown Country\")) {\n\t\t\t\tCoordinates countryCenter = getCountryCenter(country);\n\t\t\t\t\n\t\t\t\tList<Airport> airports = getAirportsInCountry(mongoHost, mongoPort, mongoDb, airportsCol, country);\n\t\t\t\twriter.println(\"Number airports in country: \" + airports.size());\n\t\t\t\t\n\t\t\t\tDescriptiveStatistics stats = new DescriptiveStatistics();\n\t\t\t\tfor(Airport airport : airports){\n\t\t\t\t\tdouble lat1 = airport.getCoordinates().getLatitude();\n\t\t\t\t\tdouble lon1 = airport.getCoordinates().getLongitude();\n\t\t\t\t\tdouble lat2 = countryCenter.getLatitude();\n\t\t\t\t\tdouble lon2 = countryCenter.getLongitude();\n\t\t\t\t\tdouble distance = Haversine.haversine(lat1, lon1, lat2, lon2);\n\t\t\t\t\tstats.addValue(distance);\n\t\t\t\t}\n \n\t\t\t\t// Compute some statistics\n\t\t\t\tdouble mean = stats.getMean();\n\t\t\t\tdouble std \t= stats.getStandardDeviation();\n\t\t\t\t\n\t\t\t\t//Only remove outliers if relatively normal\n\t\t\t\tif(std > 0 && airports.size() > 5) {\n\t\t\t\t\t\n\t\t\t\t\tNormalDistribution normalDistribution = new NormalDistribution(mean, std);\n\t\t\t\t\tfor(Airport airport : airports) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tdouble lat1 = airport.getCoordinates().getLatitude();\n\t\t\t\t\t\tdouble lon1 = airport.getCoordinates().getLongitude();\n\t\t\t\t\t\tdouble lat2 = countryCenter.getLatitude();\n\t\t\t\t\t\tdouble lon2 = countryCenter.getLongitude();\n\t\t\t\t\t\tdouble distance = Haversine.haversine(lat1, lon1, lat2, lon2);\n\t\t\t\t\t\tdouble pValue = normalDistribution.cumulativeProbability(distance);\n\t\t\t\t\t\t \n\t\t\t\t\t\t//Could tighten up RIGHT HERE. TODO Add significance value maybe\n\t\t\t\t\t\tif( (pValue > 0.97) && distance > mean) \n{\n\t\t\t\t\t\t\twriter.println(\"Possible Outlier: \" + airport.getId() + \" distance to country center: \" + distance + \" pValue: \" + pValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\t\t\n\t\twriter.close();\n\t}", "protected void exportSynonymList(RepositoryItem synonymList, Locale locale) throws RepositoryException, SearchServerException {\n SolrZkClient client = getZkClient(locale);\n\n if (client != null) {\n if (isLoggingInfo()) {\n logInfo(\"Exporting synoymym list '\" + synonymList.getItemDisplayName() + \"' to ZooKeeper\");\n }\n \n \n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n PrintWriter out = new PrintWriter(byteStream);\n \n out.println(\"# This file has been auto-generated. Do not modify\");\n \n RepositoryView view = getSearchRepository().getView(SearchRepositoryItemDescriptor.SYNONYM);\n Object params[] = {new String(synonymList.getRepositoryId())};\n RepositoryItem[] synonymMappings = getSynonymRql().executeQuery(view, params);\n\n if (synonymMappings != null) {\n for (RepositoryItem synonym : synonymMappings) {\n out.println((String) synonym.getPropertyValue(SynonymProperty.MAPPING));\n }\n }\n \n out.close();\n\n String environment = \"preview\";\n\n if (getCatalogCollection().endsWith(\"Public\")) {\n environment = \"public\";\n }\n\n for (String config : Arrays.asList(getCatalogConfig(), getRulesConfig())) {\n byte[] data = byteStream.toByteArray();\n String path = new StringBuffer(\"/configs/\").append(config).append(\"/synonyms-\").append(environment).append(\"/\")\n .append(formatSynonymListFileName((String)synonymList.getPropertyValue(SynonymListProperty.FILENAME))).toString();\n\n try {\n if (!client.exists(path, true)) {\n client.makePath(path, data, CreateMode.PERSISTENT, true);\n } else {\n client.setData(path, data, true);\n }\n } catch (KeeperException ex) {\n throw create(EXPORT_SYNONYM_EXCEPTION, ex);\n } catch (InterruptedException ex) {\n throw create(EXPORT_SYNONYM_EXCEPTION, ex); \n }\n }\n }\n }", "protected URL[] getDAOJavaFiles() {\r\n\t\treturn FileUtils.getUrls(getDaoInDir(), DEFAULT_JAVA_SUFFIX,\r\n\t\t\t\tgetDAOFileNameFilter());\r\n\t}", "public static void main(String args[])\r\n {\r\n try\r\n {\r\n PrintWriter outLog = new PrintWriter(System.out);\r\n for (int i = 0; i <args.length; i++)\r\n {\r\n outLog.println(args[i]+\": generating Access Jet DDL\");\r\n in = new ObjectInputStream(new FileInputStream(args[i]));\r\n Database database = (Database)in.readObject();\r\n generate(database, \"\", outLog);\r\n }\r\n outLog.flush();\r\n }\r\n catch (Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }", "private static void loadQuads$(BulkStreamRDF dest, List<String> urls) {\n dest.startBulk();\n for ( String url : urls ) {\n loadLogger.info(\"Load: \" + url + \" -- \" + DateTimeUtils.nowAsString());\n Lang lang = RDFLanguages.filenameToLang(url, Lang.NQUADS);\n RDFParser.source(url).lang(lang).parse(dest);\n }\n dest.finishBulk();\n }", "private void loadDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Check to make sure the Bmod Database is there, if not, try \n\t\t\t\t// downloading from the website.\n\t\t\t\tif(!Files.exists(m_databaseFile))\n\t\t\t\t{\n\t\t\t\t\tFiles.createDirectories(m_databaseFile.getParent());\n\t\t\t\t\n\t\t\t\t\tbyte[] file = ExtensionPoints.readURLAsBytes(\"http://\" + Constants.API_HOST + HSQL_DATABASE_PATH);\n\t\t\t\t\tif(file.length != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t\t\t\tFiles.write(m_databaseFile, file, StandardOpenOption.CREATE, StandardOpenOption.WRITE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// make sure we have the proper scriptformat.\n\t\t\t\tsetScriptFormatCorrectly();\n\t\t\t}catch(NullPointerException|IOException ex)\n\t\t\t{\n\t\t\t\tm_logger.error(\"Could not fetch database from web.\", ex);\n\t\t\t}\n\t\t\t\n\t\n\t\t\t\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\n\t\t\n\t\t\t\n\t\t\tString db = ExtensionPoints.getBmodDirectory(\"database\").toUri().getPath();\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:file:\" + db, \"sa\", \"\");\n\t\t\t\n\t\t\t// Setup Connection\n\t\t\tCSVRecordLoader ldr = new CSVRecordLoader();\n\t\t\n\t\t\t// Load all of the building independent plugins\n\t\t\tfor(Record<?> cp : ldr.getRecordPluginManagers())\n\t\t\t{\n\t\t\t\tm_logger.debug(\"Creating table: \" + cp.getTableName());\n\t\t\t\t// Create a new table\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgetPreparedStatement(cp.getSQLTableDefn()).execute();\n\t\t\t\t} catch(SQLException ex)\n\t\t\t\t{\n\t\t\t\t\t// Table exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tm_logger.debug(\"Doing index:\" + cp.getIndexDefn());\n\t\t\t\t\tif(cp.getIndexDefn() != null)\n\t\t\t\t\t\tgetPreparedStatement(cp.getIndexDefn()).execute();\n\t\t\t\t}catch(SQLException ex)\n\t\t\t\t{\t// index exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\tif(ex instanceof DatabaseIntegrityException)\n\t\t\t\tDatabase.handleCriticalError((DatabaseIntegrityException)ex);\n\t\t\telse\n\t\t\t\tDatabase.handleCriticalError(new DatabaseIntegrityException(ex));\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n Map<String, TableInfo> map = TableContext.tables;\n for (TableInfo t : map.values()) {\n createJavaPOFile(t, new MySqlTypeConvertor());\n }\n }", "private static void deleteDomainData(Class...domainClasses) throws ApplicationRuntimeException {\n if (domainClasses == null || domainClasses.length == 0)\n return;\n \n DomainAppTool.runSetUp(Cmd.DeleteDomainData, domainClasses);\n }", "public void dumpAll() throws Exception{\n for(String key : filesmap.keySet()){\n this.write(filesmap.get(key) + DATA_EXT_NAME,key);\n }\n }", "private void createDatabase(final String databaseName) {\n\n try {\n final Connection connection =\n DriverManager.getConnection(url + databaseName, databaseProperties);\n\n try {\n NaviLogger.info(\"[i] Generating database tables for %s.\", databaseName);\n connection.prepareStatement(AbstractSQLProvider.parseResourceAsSQLFile(\n this.getClass().getResourceAsStream(TEST_DATA_DIRECTORY + \"database_schema.sql\")))\n .execute();\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n\n final File testDataDir = new File(\n \"./third_party/zynamics/javatests/com/google/security/zynamics/binnavi/testdata/\"\n + databaseName + \"/\");\n\n final CopyManager manager = new CopyManager((BaseConnection) connection);\n\n for (final File currentFile : testDataDir.listFiles()) {\n try (FileReader reader = new FileReader(currentFile)) {\n final String tableName = currentFile.getName().split(\".sql\")[0];\n NaviLogger.info(\"[i] Importing: %s.%s from %s\", databaseName, tableName,\n currentFile.getAbsolutePath());\n manager.copyIn(\"COPY \" + tableName + \" FROM STDIN\", reader);\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n }\n\n try {\n NaviLogger.warning(\"[i] Generating constraints for %s.\", databaseName);\n connection.prepareStatement(AbstractSQLProvider.parseResourceAsSQLFile(\n this.getClass().getResourceAsStream(TEST_DATA_DIRECTORY + \"database_constraints.sql\")))\n .execute();\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n\n final String findSequencesQuery = \"SELECT 'SELECT SETVAL(' ||quote_literal(S.relname)|| \"\n + \"', MAX(' ||quote_ident(C.attname)|| ') ) FROM ' ||quote_ident(T.relname)|| ';' \"\n + \" FROM pg_class AS S, pg_depend AS D, pg_class AS T, pg_attribute AS C \"\n + \" WHERE S.relkind = 'S' AND S.oid = D.objid AND D.refobjid = T.oid \"\n + \" AND D.refobjid = C.attrelid AND D.refobjsubid = C.attnum ORDER BY S.relname; \";\n\n try (PreparedStatement statement = connection.prepareStatement(findSequencesQuery);\n ResultSet resultSet = statement.executeQuery()) {\n while (resultSet.next()) {\n final PreparedStatement fixSequence = connection.prepareStatement(resultSet.getString(1));\n fixSequence.execute();\n }\n } catch (final SQLException exception) {\n CUtilityFunctions.logException(exception);\n }\n\n } catch (final SQLException exception) {\n CUtilityFunctions.logException(exception);\n }\n }", "protected void prepare4SaveScript() {\n\t\tMigrationConfiguration cfg = getMigrationWizard().getMigrationConfig();\n\t\tcfg.cleanNoUsedConfigForStart();\n\t}", "public static void main(String[] args) throws Exception {\n\t\texport();\r\n\t}", "public static void backup3(String args[]) {\n\t\tRuntime runtime = Runtime.getRuntime();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyyMMdd_HHmmss\");\n\t\tString currentTime = dateFormat.format(calendar.getTime());\n\t\tProcess p = null;\n\t\tPrintStream print = null;\n\t\tStringBuilder buf = new StringBuilder();\n\t\tfor (String a : args) {\n\t\t\tbuf.append(a);\n\t\t\tbuf.append(\" \");\n\t\t}\n\t\tString databases = buf.toString();\n\t\tSystem.out.println(databases);\n\t\ttry {\n\t\t\tp = runtime.exec(\"cmd /c mysqldump -uroot -p1234 -B \" + databases\n\t\t\t\t\t+ \">\" + currentTime + \".sql.bak\");\n\t\t} catch (IOException e) {\n\t\t\tif (p != null) {\n\t\t\t\tp.destroy();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tprint = new PrintStream(currentTime + \"_backup_err.log\");\n\t\t\t\tdateFormat.applyPattern(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\tcurrentTime = dateFormat.format(calendar.getTime());\n\t\t\t\tprint.println(currentTime + \" backup failed.\");\n\t\t\t\te.printStackTrace(print);\n\t\t\t\tprint.flush();\n\t\t\t} catch (IOException e2) {\n\n\t\t\t} finally {\n\t\t\t\tif (print != null) {\n\t\t\t\t\tprint.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\tif (StringUtils.isNotEmpty(empId)) {\n\t\t\t\t\tfilePath += \"/\" + empId;\n\t\t\t\t}\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\tString siteName = null;\n\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(CONSOLIDATED_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\tfor (ReportResult transaction : content) {\n\t\t\t\t\t\tif (StringUtils.isEmpty(siteName) || !siteName.equalsIgnoreCase(transaction.getSiteName())) {\n\t\t\t\t\t\t\tcsvFilePrinter.printRecord(\"\");\n\t\t\t\t\t\t\tcsvFilePrinter\n\t\t\t\t\t\t\t\t\t.printRecord(\"CLIENT - \" + projName + \" SITE - \" + transaction.getSiteName());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\tlog.debug(\"Writing transaction record for site :\" + transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getLocatinName());\n\t\t\t\t\t\trecord.add(transaction.getAssignedJobCount());\n\t\t\t\t\t\trecord.add(transaction.getCompletedJobCount());\n\t\t\t\t\t\trecord.add(transaction.getOverdueJobCount());\n\t\t\t\t\t\trecord.add(transaction.getTat());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "public static void main(String[] args) throws Exception {\n\t\t\n\t\tDatabaseExecuter adminExecuter = new DatabaseExecuterProxy(\"Admin\", \"Admin@123\");\n\t\tadminExecuter.executeDatabase(\"DELETE\");\n\t\t\n\t\tDatabaseExecuter nonAdminExecuter = new DatabaseExecuterProxy(\"NonAdmin\", \"Admin@123\");\n\t\tnonAdminExecuter.executeDatabase(\"DELETE\");\n\n\t}", "public static void main(String[] args) {\n String fileDirectoryPath = \"D:\\\\My WorkSpace\\\\New folder\\\\FBCO Worklist\";\n String[] sysEnvDetails = {\"SrcSystem\", \"SrcEnv\", \"TgtSystem\", \"TgtEnv\"};\n File dir = new File(fileDirectoryPath);\n search(\".*\\\\.sql\", dir, sysEnvDetails);\n\n }", "public static void main(String[] args) throws IOException, QizxException {\n int min = 0;\n int max = Integer.MAX_VALUE;\n //fichero para recoger cada script XQuery de consulta\n File scriptFile;\n //objeto file 'directorioGrupo' apuntando a la ruta del Library Group\n File directorioGrupo = new File(directorioGrupoRoot);\n // Conexión o apertura del gestor del grupo\n LibraryManager bdManager = Configuration.openLibraryGroup(directorioGrupo);\n //Conexión a la BD\n Library bd = bdManager.openLibrary(bdNombre);\n\n try {\n //Para cada script con consulta XQuery\n for (int i = 0; i < scriptNombre.length; ++i) {\n //recoge la ruta del fichero de script con consulta XQuery\n scriptFile = new File(directorioScriptsRoot + scriptNombre[i]);\n //mensaje indicando el script XQuery que se ejecutará\n System.out.println(\"Ejecutando '\" + scriptFile + \"'...\");\n\n //carga el contenido del script XQuery en una cadena\n String consultaXquery = cargaScript(scriptFile);\n //imprime la expresión de consulta XQuery\n System.out.println(\"---\\n\" + consultaXquery + \"\\n---\");\n\n //compila la consulta, almacenado resultado en expr\n Expression expr = compileExpression(bd, consultaXquery);\n //evalúa la consulta para mostrar resultados en el rango [min, max]\n evaluarExpression(expr, min, max);\n }\n } finally {\n //cierra conexión con BD\n cerrar(bd, bdManager);\n }\n }", "protected <T> void exportTable(final Class<T> c, final String[] primaryKeys, final int batchSize, final File exportFile,\n final String persistenceUnit, final boolean verifyIntegrity, final OutputFormat outputFormat) {\n boolean includeFailed = true;\n final DatabaseReader<T> dbReader = new DatabaseReader<T>(c, primaryKeys, batchSize, includeFailed, 1000, verifyIntegrity);\n\n try {\n ObjectOutputStream outputStream;\n /*\n * Using private classes for the actual export job in order to be able to reuse\n * as much of the below code as possible.\n */\n switch (outputFormat) {\n case XML:\n outputStream = new XStream().createObjectOutputStream(new FileWriter(exportFile));\n break;\n case BINARY:\n default:\n outputStream = new ObjectOutputStream(new FileOutputStream(exportFile));\n }\n while (!dbReader.isDone()) {\n final EntityManager entityManager = getEntityManager(persistenceUnit);\n final List<T> chunk = dbReader.getNextVerifiedChunk(entityManager);\n // Reduce memory footprint by killing off the database connection after each batch (slow, but necessary for large databases)\n entityManager.clear();\n entityManager.close();\n entityManagers.remove(persistenceUnit);\n entityManagerFactories.get(persistenceUnit).close();\n entityManagerFactories.remove(persistenceUnit);\n LOG.info(c.getSimpleName() + \": \" + dbReader.getTotalRowCount() + \" rows exported so far.\");\n for (T entity : chunk) {\n outputStream.writeObject(entity);\n }\n chunk.clear();\n }\n outputStream.close();\n LOG.info(c.getSimpleName() + \": \" + (dbReader.getTotalRowCount() - (includeFailed ? 0 : dbReader.getErrorCount())) + \"/\"\n + dbReader.getTotalRowCount() + \" exported.\");\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public static void saveDrops() {\n DropTable.serialize(file);\n }", "private static File[] listScripts(File baseDir) {\n\n return baseDir.listFiles(new FilenameFilter() {\n @Override\n public boolean accept(File dir, String name) {\n boolean hasJsonFileExtension = \"json\".equals(Files.getFileExtension(name));\n if (!(hasJsonFileExtension || new File(dir, name).isDirectory())) {\n System.err.println(\"Ignoring script \" + name + \". File name must be have .json extension.\");\n return false;\n }\n Integer index = getIndex(name);\n if (index == null) {\n System.err.println(\"Ignoring script \" + name + \". File name must start with an index number followed by an underscore and a description.\");\n return false;\n }\n return true;\n }\n });\n }" ]
[ "0.564677", "0.5194825", "0.5152799", "0.510916", "0.508214", "0.4995753", "0.49475017", "0.49457383", "0.4839066", "0.48173153", "0.4713042", "0.47109315", "0.4696362", "0.46892864", "0.46826854", "0.4672768", "0.46548244", "0.46447545", "0.46360937", "0.46252066", "0.4615891", "0.45892236", "0.4559389", "0.454799", "0.45413318", "0.4535791", "0.4514136", "0.45091003", "0.4483651", "0.44750857", "0.4469839", "0.4464664", "0.44493097", "0.44334495", "0.44279885", "0.44279101", "0.44056347", "0.43996853", "0.4398668", "0.43970865", "0.43925276", "0.43765238", "0.43743733", "0.4367219", "0.43480837", "0.43440822", "0.43429244", "0.4342686", "0.43266127", "0.43209496", "0.43200007", "0.43147865", "0.43004644", "0.42697164", "0.4267419", "0.4262842", "0.42543316", "0.42517766", "0.4246172", "0.42437965", "0.42423218", "0.42350754", "0.42211702", "0.42129585", "0.42074186", "0.41961703", "0.41947895", "0.41945916", "0.41926506", "0.41868296", "0.41858912", "0.41789445", "0.4177481", "0.4160881", "0.4148092", "0.41368484", "0.41257352", "0.41248298", "0.41204867", "0.41192618", "0.4115887", "0.41141155", "0.4112716", "0.41072857", "0.40997934", "0.40977708", "0.40931147", "0.40928295", "0.4092418", "0.40865147", "0.40813792", "0.40794152", "0.40763324", "0.4075629", "0.40648466", "0.40636176", "0.40606755", "0.40590206", "0.40573338", "0.40492108" ]
0.44973746
28
Export database scripts for the given domain locations.
@Test public void exportSQLServerDatabaseScriptFromAnnotations() throws Exception { Properties props = PropertyLoader.loadProperties("./build.properties"); String classesDirPath = props.getProperty("classes.dir"); SchemaGenerator sgen = new SchemaGenerator(new String[] {"uk.co.utilisoft.parms.domain"}, classesDirPath, new String[] {".*UnitTest.*", ".*Test.*", ".*Interface.*", ".*\\$.*"}); sgen.generate(Dialect.SQLSERVER, mTestFilePath); mTestFiles = getSavedFiles(mTestFilePath); assertTrue(!mTestFiles.isEmpty()); for (int i = 0; i < mTestFiles.size(); i++) { File file = mTestFiles.get(i); InputStream is = new FileInputStream(file); long length = file.length(); if (length > Integer.MAX_VALUE) { fail("Failed to read file " + file.getName() + " because file length " + length + " is too long"); } byte[] bytes = new byte[(int)length]; int offset = 0; int numRead = 0; while (offset < bytes.length && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0) { offset += numRead; } if (offset < bytes.length) { fail("Failed to finish reading file " + file.getName()); } is.close(); // test file contains some data assertNotNull(bytes); assertTrue("File " + file.getName() + " contains zero bytes", bytes.length > 0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void insertTestDataExport() throws ArcException {\n\t\tinsertTestData(\"BdDTest/script_test_export.sql\");\n\t}", "protected void doRun() {\n\n\t\tFile dirFile = null;\n\t\ttry {\n\t\t\tdirFile = new File(exportConfig.getDataFileFolder() + File.separator + \"ddl\");\n\t\t\tif (!dirFile.exists()) {\n\t\t\t\tdirFile.mkdir();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"create schema dir error : \", e);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tString schemaFile = null;\n\t\t\tString indexFile = null;\n\t\t\tString triggerFile = null;\n\t\t\tif (exportConfig.isExportSchema()) {\n\t\t\t\tschemaFile = dirFile + File.separator + \"schema.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t}\n\t\t\tif (exportConfig.isExportIndex()) {\n\t\t\t\tindexFile = dirFile + File.separator + \"index.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t}\n\t\t\tif (exportConfig.isExportTrigger()) {\n\t\t\t\ttriggerFile = dirFile + File.separator + \"trigger.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t}\n\n\t\t\tSet<String> tableSet = new HashSet<String>();\n\t\t\ttableSet.addAll(exportConfig.getTableNameList());\n\t\t\tExprotToOBSHandler.exportSchemaToOBSFile(dbInfo, exportDataEventHandler, tableSet,\n\t\t\t\t\tschemaFile, indexFile, triggerFile, exportConfig.getFileCharset(),\n\t\t\t\t\texportConfig.isExportSerialStartValue(), false);\n\n\t\t\tif (exportConfig.isExportSchema()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t}\n\t\t\tif (exportConfig.isExportIndex()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t}\n\t\t\tif (exportConfig.isExportTrigger()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tif (exportConfig.isExportSchema()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t}\n\t\t\tif (exportConfig.isExportIndex()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t}\n\t\t\tif (exportConfig.isExportTrigger()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t}\n\t\t\tLOGGER.error(\"create schema index trigger error : \", e);\n\t\t}\n\n\t\ttry {\n\t\t\tif (exportConfig.isExportSerial()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\t\tString serialFile = dirFile + File.separator + \"serial.sql\";\n\t\t\t\texportSerial(serialFile);\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\tLOGGER.error(\"create serial.sql error : \", e);\n\t\t}\n\n\t\ttry {\n\t\t\tif (exportConfig.isExportView()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\t\tString viewFile = dirFile + File.separator + \"view.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\t\texportView(viewFile);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\tLOGGER.error(\"create view.sql error : \", e);\n\t\t}\n\t}", "private List<String> generateDropStatementsForDomainIndexes() throws SQLException {\n List<String> dropStatements = new ArrayList<String>();\n\n List<String> objectNames = jdbcTemplate.queryForStringList(\n \"SELECT INDEX_NAME FROM ALL_INDEXES WHERE OWNER = ? AND INDEX_TYPE LIKE '%DOMAIN%'\", name);\n\n for (String objectName : objectNames) {\n dropStatements.add(generateDefaultDropStatement(\"INDEX\", objectName, \"FORCE\"));\n }\n return dropStatements;\n }", "protected void exportScriptToFile() {\n\t\ttry {\n\t\t\tfinal MigrationConfiguration cfg = getMigrationWizard()\n\t\t\t\t\t.getMigrationConfig();\n\t\t\tprepare4SaveScript();\n\t\t\tExportScriptDialog.exportScript(cfg, isSaveSchema());\n\t\t} catch (Exception e) {\n\t\t\t// MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),\n\t\t\t// Messages.msgWarning, Messages.setOptionPageErrMsg);\n\t\t}\n\t}", "private void generate(Dialect dialect, String directory) {\n cfg.setProperty(\"hibernate.dialect\", dialect.getDialectClass());\n SchemaExport export = new SchemaExport(cfg);\n export.setFormat(true);\n export.setDelimiter(\";\");\n export.setOutputFile(directory + \"create_db_\" + dialect.name().toLowerCase() + \".sql\");\n export.create(true, false);\n export.setOutputFile(directory + \"drop_db_\" + dialect.name().toLowerCase() + \".sql\");\n export.drop(true, false);\n }", "public void dumpIndexScriptsAll(OmcEnvironment.Environment envionment, boolean isParallelOption);", "void export(UtilityDataExportQuery query) throws ApplicationException;", "public void execute() throws XDocletException {\n\t\tsetPublicId(DD_PUBLICID_20);\n\t\tsetSystemId(DD_SYSTEMID_20);\n\n\t\t// will not work .... dumper.xdt does not exist\n\t\t/*\n\t\tsetTemplateURL(getClass().getResource(\"resources/dumper.xdt\"));\n\t\tsetDestinationFile(\"dump\");\n\t\tSystem.out.println(\"Generating dump\");\n\t\tstartProcess();\n\t\t*/\n\n\n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_EJB_JAR_XML_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"ejb-jar.xml\");\n\t\tSystem.out.println(\"Generating ejb-jar.xml\");\n\t\tstartProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_BND_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_BND_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_BND_FILE_NAME);\n startProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_FILE_NAME);\n startProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_PME_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_PME_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_PME_FILE_NAME);\n startProcess();\n\n /*\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_ACCESS_BEAN_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_ACCESS_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_ACCESS_FILE_NAME);\n startProcess();\n */\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_MAPXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tstartProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_DBXMI_TEMPLATE_FILE));\n setDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n System.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n startProcess();\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_SCHXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tstartProcess();\n\t\t\n\t\tCollection classes = getXJavaDoc().getSourceClasses();\n\t\tfor (ClassIterator i = XCollections.classIterator(classes); i.hasNext();) {\n\t\t\tXClass clazz = i.next();\n\t\t\t//System.out.print(\">> \" + clazz.getName());\n\t\t\t// check tag ejb:persistence + sub tag table-name\n\t\t\tXTag tag = clazz.getDoc().getTag(\"ejb:persistence\");\n\t\t\tif (tag != null) {\n\t\t\t\tString tableName = tag.getAttributeValue(\"table-name\");\n\t\t\t\t//System.out.println(\"ejb:persistence table-name = '\" + tableName + \"'\");\n\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\tSystem.out.println(\"Generating \" + destinationFileName);\n\t\t\t\t\n\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_TBLXMI_TEMPLATE_FILE));\n\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\tsetHavingClassTag(\"ejb:persistence\");\n\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\tstartProcess();\n\t\t\t}\n\t\t\t// Now, check for relationships \n\t\t\tfor (Iterator methods = clazz.getMethods().iterator(); methods.hasNext();) {\n\t\t\t\tXMethod method = (XMethod)methods.next();\n\t\t\t\tif (method.getDoc().hasTag(\"websphere:relation\")) {\n\t\t\t\t\tString tableName = method.getDoc().getTagAttributeValue(\"websphere:relation\",\"table-name\");\n\t\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_RELATIONSHIP_TBLXMI_TEMPLATE_FILE));\n\t\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\t\tsetCurrentMethod(method);\n\t\t\t\t\tSystem.out.println(\"\\tGenerating M-M Relationship table: \" + destinationFileName);\n\t\t\t\t\tstartProcess();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\n\t\t}\n\n/*\n if (atLeastOneCmpEntityBeanExists()) {\n setTemplateURL(getClass().getResource(WEBSPHERE_SCHEMA_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_SCHEMA_FILE_NAME);\n startProcess();\n }\n*/\n }", "public static void provideDAOsImports(final FileWriterWrapper writer,\n final String entityCodeName)\n throws IOException {\n writer.write(\"import java.sql.Connection;\\n\");\n writer.write(\"import java.sql.PreparedStatement;\\n\");\n writer.write(\"import java.sql.ResultSet;\\n\");\n writer.write(\"import java.sql.SQLException;\\n\");\n writer.write(\"import java.util.ArrayList;\\n\\n\");\n\n writer.write(\"import pojos.\" + entityCodeName + \";\\n\\n\");\n }", "public void exportFiles() \r\n\t{\r\n\t\tif(!fDictionaryFile().exists())\r\n\t\t{\r\n\t\t\texportDictionary();\r\n\t\t}\r\n\t}", "String initializeExport(String dsID, int records) throws RepoxException;", "public static void main(String args[]) \n{\n\nDomainBlender domainBlender = new DomainBlender();\n\n/**DECLARE THE COMMANDS**/\n\n//String typoFinder=\"~/domainBlender/typofinder/TypoMagic/custom_typofinder.py\";\n//String dnsTwist=\"cat ~/domainBlender/domains | while read line; do dnstwist -r -t 4000 -f csv \\\"$line\\\" >> ~/domainBlender/dnstwist_results.csv; done\";\n//./data_merger.py \"['value1', 'value2']\"\n\n\n/**BANNER DISPLAY FOR CONSOLE**/\t\nbanner();\n\n\n\n/**Commands**/\t\n//command(squatCobbler);\n//command(urlCrazy);\n//command(typoFinder);\n//command(dnsTwist);\n\t\n\t\n/**CONVERT CSV files to JSON\nThis is just running a python script csv2json.py that takes two arguments an input and an output which you can see below:\ncsvJSON(\"~/domainBlender/dnstwist_results.csv\",\"~/domainBlender/dnstwist_results.json\");\ncsvJSON(\"~/domainBlender/urlcrazy_results.csv\",\"~/domainBlender/urlcrazy_results.json\");\n**/\n}", "public static void main(String[] args) {\n MySQLScriptGen databaseobject = new MySQLScriptGen();\n\n //this is same for every model\n JsonFileReader jsonFileReader = JsonFileReader.getInstance();\n JSONObject pim = jsonFileReader.getplatformIndependentModel();\n String ddl_script = databaseobject.createDDLScript(pim);\n String dml_script = databaseobject.createDMLScript(pim);\n String dql_script = databaseobject.createDQLScript(pim);\n System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\\n\");\n System.out.println(ddl_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dml_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dql_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n }", "public <T> void exportToExcel(String location, List<T>... values) throws IOException, WriteException, DALException;", "protected void executePostProcessingScripts(List<Script> postProcessingScripts) {\n for (Script script : postProcessingScripts) {\n try {\n logger.info(\"Executing post processing script \" + script.getFileName());\n scriptRunner.execute(script.getScriptContentHandle());\n\n } catch (UnitilsException e) {\n logger.error(\"Error while executing post processing script \" + script.getFileName(), e);\n throw e;\n }\n }\n }", "@Test\n\tpublic void bddScriptTest() throws ArcException {\n\t\t\n\t\t// test an arc database\n\t\tcreateDatabase(userWithRestrictedRights);\n\t\ttestDatabaseCreation();\n\n\t\tcreateDatabase(\"\");\n\t\ttestDatabaseCreation();\n\t\t\n\t\tcreateDatabase(null);\n\t\ttestDatabaseCreation();\n\t}", "protected static void exportData(ProcessSteps step){\n try {\n Runtime.getRuntime().exec(\"mongoexport --host localhost --port 27017 \" +\n \"-d\" + step.toString() +\n \"-o ./dump/\" + step.toString() + \".json\");\n }\n catch (IOException e){\n e.printStackTrace();\n }\n }", "public void export(\n Path generationPath,\n SqlTableMetamodelRepository sqlTableModelRepository,\n String tablePrefix,\n String context) {\n Map<String, Object> dataModel = new HashMap<>();\n dataModel.put(\"representation\", sqlTableModelRepository);\n dataModel.put(\"tablePrefix\", tablePrefix);\n\n freemarkerService.export(\n dataModel,\n \"polygenesis-generator-java-sql-flyway/script.sql.ftl\",\n makeFileName(generationPath, context));\n }", "@Override\n public void doExportCreate(StorageSystem storage, ExportMask exportMask,\n Map<URI, Integer> volumeMap, List<Initiator> initiators, List<URI> targets,\n TaskCompleter taskCompleter) throws DeviceControllerException {\n _log.info(\"{} doExportCreate START ...\", storage.getSerialNumber());\n VolumeURIHLU[] volumeLunArray = ControllerUtils.getVolumeURIHLUArray(\n storage.getSystemType(), volumeMap, dbClient);\n xtremioExportOperationHelper.createExportMask(storage, exportMask.getId(), volumeLunArray,\n targets, initiators, taskCompleter);\n _log.info(\"{} doExportCreate END ...\", storage.getSerialNumber());\n\n }", "String export(UserDataExportQuery query) throws ApplicationException;", "@Override\n public void onRepositoryInitialized(String dataSourceName,\n String repositoryName,\n ServiceBindingType sbt,\n List<Field> fields,\n List<Property> properties) throws Exception {\n\n if (properties == null || properties.isEmpty()) {\n logger.warn(\"No properties were provided to the RunSqlScript init handler.\");\n logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);\n return;\n }\n\n // First, run a sequence of SQL scripts, where those scripts may\n // optionally be packaged in a resources directory within the\n // current code's packaged JAR file.\n String scriptContents;\n List<String> scriptNames = getSqlScriptNames(properties);\n if (scriptNames == null || scriptNames.isEmpty()) {\n logger.warn(\"Could not obtain the name of any SQL script to run.\");\n logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);\n return;\n }\n for (String scriptName : scriptNames) {\n String scriptPath = getSqlScriptPath(dataSourceName, repositoryName, scriptName);\n if (Tools.isBlank(scriptPath)) {\n logger.warn(\"Could not get path to SQL script.\");\n logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);\n continue;\n }\n scriptContents = getSqlScriptContents(scriptPath);\n if (Tools.isBlank(scriptContents)) {\n logger.warn(\"Could not get contents of SQL script from resource \" + scriptPath);\n logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);\n continue;\n }\n runScript(dataSourceName, repositoryName, scriptContents, \"resource path \" + scriptPath);\n }\n\n // Next, run a second sequence of SQL scripts, where those scripts may be\n // stored on disk, in a resources directory within the server directory.\n List<File> scriptFiles = getSqlScriptFiles(dataSourceName, repositoryName);\n // Run these scripts in a sequence based on the ascending order of their filenames.\n // FIXME: consider adding functionality to specify the locale for filename\n // sorting here. (The current sort order is based on the system's default locale.)\n Collections.sort(scriptFiles, new Comparator<File>() {\n @Override\n public int compare(File f1, File f2) {\n return Collator.getInstance().compare(f1.getName(), f2.getName());\n }\n });\n\n for (File scriptFile : scriptFiles) {\n logger.trace(\"Reading script file \" + scriptFile.getCanonicalPath());\n scriptContents = FileTools.readFile(scriptFile);\n if (Tools.isBlank(scriptContents)) {\n logger.warn(\"Could not get contents of SQL script from file \" + scriptFile.getCanonicalPath());\n logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);\n continue;\n }\n runScript(dataSourceName, repositoryName, scriptContents, \"file \" + scriptFile.getName());\n }\n\n }", "public void export(List<double[]> allBounds)\n {\n\t if(!filePath.endsWith(\".csv\"))\n\t \tfilePath = filePath + \".csv\";\n \n try ( CSVWriter writer = new CSVWriter(new FileWriter(filePath)) ) \n {\n writer.writeNext(new String[] {\"mzMin\",\"mzMax\",\"rtMin\",\"rtMax\",\"pointNumber\"});\n \n // write away!\n for (double[] bounds : allBounds)\n writer.writeNext( new String[] {Double.toString(bounds[0]), Double.toString(bounds[1]), Double.toString(bounds[2]), Double.toString(bounds[3]), Double.toString(bounds[4]) });\n \n } catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n return;\n }", "public void exportAllLists(){\n }", "void export(String path, Events<?> events);", "public void backupCustom(String... tableName) throws Exception {\n // back up specific files\n QueryDataSet qds = new QueryDataSet(conn);\n for (String str : tableName) {\n\n qds.addTable(str);\n }\n FlatXmlDataSet.write(qds, new FileWriter(backupFile), \"UTF-8\");\n new XlsDataSetWriter().write(qds, new FileOutputStream(backupFile));\n }", "public abstract boolean exportStatistics(String statsFileName) throws SQLException;", "public static void main(String[] args) throws SQLException {\n\tGregorianCalendar calender = new GregorianCalendar();\n calender.add(Calendar.DAY_OF_MONTH, -1);\n String dtYesterdday = new SimpleDateFormat(\"yyyyMMdd\").format(calender.getTime());\n System.out.println(dtYesterdday);\n \n try {\n Class.forName(driverName);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n logger.error(e);\n System.exit(1);\n }\n //replace \"hive\" here with the name of the user the queries should run as\n Connection con = DriverManager.getConnection(\"jdbc:hive2://117.121.97.2:10000/yuanjk\", \"yuanjk\", \"7REYo1jF\");\n Statement stmt = con.createStatement();\n \n //insert available urls to yuanjk.wexin_official_account_url_overwrite_daily_tmp table\n String hiveInsertSql=hiveInsertSqlP1+dtYesterdday+\" LIMIT 40\";\n System.out.println(\"Running: \" + hiveInsertSql);\n stmt.execute(hiveInsertSql);\n \n //filter out crawled urls\n// System.out.println(\"Running: \" + hiveCleanSql);\n// stmt.execute(hiveCleanSql);\n /*\n //export available urls to local file\n System.out.println(\"Running: \" + hiveExportSql);\n ResultSet res = stmt.executeQuery(hiveExportSql);\n try{\n \tFileWriter fileWriter = new FileWriter(rootWorkDirectory);\n \tBufferedWriter writer = new BufferedWriter(fileWriter);\n \ttry{\n while (res.next()) {\n System.out.println(res.getString(1) + \"\\t\" + res.getString(2));\n writer.write(res.getString(1) + \"\\t\" + res.getString(2));\n }\n \t}finally{\n \t\twriter.flush();\n \t\twriter.close();\n \t}\n }catch(IOException e){\n \tlogger.error(e);\n }\n */\n// String tableName = \"yuanjk.wexin_official_account_url_overwrite_daily\";\n// stmt.execute(\"drop table if exists \" + tableName);\n// stmt.execute(\"create table \" + tableName + \" (key int, value string)\");\n \n\n // show tables\n// String sql = \"show tables '\" + tableName + \"'\";\n \n /*\n System.out.println(\"Running: \" + sql);\n ResultSet res = stmt.executeQuery(sql);\n if (res.next()) {\n System.out.println(res.getString(1));\n }\n */\n /*\n // describe table\n sql = \"describe \" + tableName;\n System.out.println(\"Running: \" + sql);\n res = stmt.executeQuery(sql);\n while (res.next()) {\n System.out.println(res.getString(1) + \"\\t\" + res.getString(2));\n }\n */\n /*\n // load data into table\n // NOTE: filepath has to be local to the hive server\n // NOTE: /tmp/a.txt is a ctrl-A separated file with two fields per line\n String filepath = \"/tmp/a.txt\";\n sql = \"load data local inpath '\" + filepath + \"' into table \" + tableName;\n System.out.println(\"Running: \" + sql);\n stmt.execute(sql);\n \n // select * query\n sql = \"select * from \" + tableName;\n System.out.println(\"Running: \" + sql);\n res = stmt.executeQuery(sql);\n while (res.next()) {\n System.out.println(String.valueOf(res.getInt(1)) + \"\\t\" + res.getString(2));\n }\n \n // regular hive query\n sql = \"select count(1) from \" + tableName;\n System.out.println(\"Running: \" + sql);\n res = stmt.executeQuery(sql);\n while (res.next()) {\n System.out.println(res.getString(1));\n }\n */\n }", "@Test\r\n public void exportOracleDatabaseScriptFromAnnotations() throws Exception\r\n {\r\n Properties props = PropertyLoader.loadProperties(\"./build.properties\");\r\n String classesDirPath = props.getProperty(\"classes.dir\");\r\n SchemaGenerator sgen = new SchemaGenerator(new String[] {\"uk.co.utilisoft.parms.domain\"},\r\n classesDirPath,\r\n new String[] {\".*UnitTest.*\", \".*Test.*\", \".*Interface.*\", \".*\\\\$.*\"});\r\n sgen.generate(Dialect.ORACLE, mTestFilePath);\r\n mTestFiles = getSavedFiles(mTestFilePath);\r\n assertTrue(!mTestFiles.isEmpty());\r\n\r\n for (int i = 0; i < mTestFiles.size(); i++)\r\n {\r\n File file = mTestFiles.get(i);\r\n InputStream is = new FileInputStream(file);\r\n long length = file.length();\r\n\r\n if (length > Integer.MAX_VALUE)\r\n {\r\n fail(\"Failed to read file \" + file.getName() + \" because file length \" + length + \" is too long\");\r\n }\r\n\r\n byte[] bytes = new byte[(int)length];\r\n int offset = 0;\r\n int numRead = 0;\r\n\r\n while (offset < bytes.length\r\n && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)\r\n {\r\n offset += numRead;\r\n }\r\n\r\n if (offset < bytes.length)\r\n {\r\n fail(\"Failed to finish reading file \" + file.getName());\r\n }\r\n\r\n is.close();\r\n\r\n // test file contains some data\r\n assertNotNull(bytes);\r\n assertTrue(\"File \" + file.getName() + \" contains zero bytes\", bytes.length > 0);\r\n }\r\n }", "public void run(File repositoryFolder, File exportFolder, boolean transformToEdmInternal, final int maxExportRecords, String provider, String dataProvider) throws Exception {\n\t\tFile dbFile = new File(repositoryFolder, \"db.bin\");\r\n\t\tif(!dbFile.exists()) {\r\n\t\t\tSystem.out.println(\"Repository is empty. Exiting.\");\r\n\t\t\treturn;\r\n\t\t}\t\t\r\n\t\tSystem.out.println(new Date(dbFile.lastModified()));\r\n\t\t\r\n\t\tfinal int maxExportRecordsPerFile=300;\r\n\t\tif(!exportFolder.exists())\r\n\t\t\texportFolder.mkdirs();\r\n\t\t\r\n\t\tDatabase db;\r\n//\t\tdb=new Database(repositoryFolder, AccessMode.WRITE);\r\n\t\tdb=new Database(repositoryFolder, AccessMode.READ_ONLY);\r\n\t\tEdmFileExport metadataExporter=new EdmFileExport(maxExportRecordsPerFile, exportFolder);\r\n\t\tmetadataExporter.setTransformToEdmInternal(transformToEdmInternal); \r\n\t\tmetadataExporter.init();\r\n\t\t\r\n\t\tDataConverter dcToEdmConverter = DataConversionManager.getInstance().getConverter(null, null);\r\n\t\t\r\n\t\tint cnt=0;\r\n\t\tfor(byte[] mdBytes : db.getAllRecordsData()) {\r\n\t\t\tcnt++;\r\n\t\t\tObject metadata = IoUtil.fromByteArray(mdBytes);\r\n\t\t\ttry {\r\n\t\t\t\tif(metadata instanceof String) {\r\n\t\t\t\t\tString fromByteArray = (String) metadata;\r\n\t\t\t\t\tmetadataExporter.export(fromByteArray);\r\n\t\t\t\t} else if(metadata instanceof IiifPresentationMetadata) {\r\n\t\t\t\t\tIiifPresentationMetadata iiifMetadata = (IiifPresentationMetadata) metadata;\r\n\t\t\t\t\tfor(Iterator<RawDataRecord> it=iiifMetadata.getSeeAlso().iterator(); it.hasNext() ; ) {\r\n\t\t\t\t\t\tRawDataRecord seeAlso = it.next();\r\n\t\t\t\t\t\ttry {\r\n//\t\t\t\t\t\t\tSystem.out.println(iiifMetadata.getManifestUrl());\r\n//\t\t\t\t\tSystem.out.println(seeAlso.getFormat());\r\n//\t\t\t\t\t\t\tSystem.out.println(seeAlso.getProfile());\r\n\t\t\t\t\t\t\tif(seeAlso.getProfile()!=null && seeAlso.getProfile().equalsIgnoreCase(\"http://www.europeana.eu/schemas/edm/\")) {\r\n\t\t\t\t\t\t\t\tString fromByteArray = new String(seeAlso.getContent(), \"UTF-8\");\r\n\t\t\t\t\t\t\t\tmetadataExporter.export(fromByteArray);\r\n\t\t\t\t\t\t\t\tif(maxExportRecords>0 && metadataExporter.getExportRecordsCount()>=maxExportRecords)\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\tSystem.err.println(seeAlso);\r\n\t\t\t\t\t\t\tSystem.err.println(new String(seeAlso.getContent(), \"UTF-8\"));\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(metadata instanceof IiifManifest) {\r\n\t\t\t\t\tIiifManifest manifest=(IiifManifest) metadata;\r\n\t\t\t\t\tfor(RawDataRecord seeAlso: manifest.getMetadata().getSeeAlso()) {\r\n\t\t\t\t\t\tif(seeAlso.getProfile()!=null && seeAlso.getProfile().equalsIgnoreCase(\"http://www.europeana.eu/schemas/edm/\")) {\r\n\t\t\t\t\t\t\tString fromByteArray = new String(seeAlso.getContent(), \"UTF-8\");\r\n\t\t\t\t\t\t\tmetadataExporter.export(fromByteArray);\r\n\t\t\t\t\t\t} else {//TODO\r\n\t\t\t\t\t\t\t//testing DC data from wellcome\r\n\t\t\t\t\t\t\tseeAlso.setUrl(manifest.getUri());\r\n\t\t\t\t\t\t\tRawDataRecord convertedEdm = dcToEdmConverter.convert(seeAlso, getEdmStatements(manifest, provider, dataProvider));\r\n\t\t\t\t\t\t\tString fromByteArray = new String(convertedEdm.getContent(), \"UTF-8\");\r\n\t\t\t\t\t\t\tmetadataExporter.export(fromByteArray);\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} catch (Exception e) {\r\n\t\t\t\tSystem.err.println(metadata);\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif(cnt % 1000 == 0) \r\n\t\t\t\tSystem.out.println(\"Progress: \"+ cnt+\" records (\"+metadataExporter.getExportRecordsCount() + \" exported)\");\r\n\r\n\t\t\tif(maxExportRecords>0 && metadataExporter.getExportRecordsCount()>=maxExportRecords) {\r\n\t\t\t\tSystem.out.println(\"Max record reached. Exiting early.\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(metadataExporter.getExportRecordsCount() + \" records exported\");\r\n\t\tmetadataExporter.close();\r\n\t\tdb.shutdown();\r\n//\t\tObject data = db.getData(\"http://dams.llgc.org.uk/iiif/newspaper/issue/3101048/manifest.json\");\r\n//\t\tSystem.out.println(data);\r\n\t}", "public void setScriptLocations(String scriptLocations) {\r\n this.scriptLocations = scriptLocations;\r\n }", "@Override\n\tpublic void saveOrUpdateAll(Collection<Export> entitys) {\n\t\t\n\t}", "List<String> generateDeleteAllScript();", "public static String getDatabaseExportDirectory() {\n\t\tif (xml == null) return \"\";\n\t\treturn databaseExportDir;\n\t}", "void export(DataExportOptions options, Pageable pageable, OutputStream outputStream);", "private List<String> generateDropStatementsForNonDomainIndexes() throws SQLException {\n List<String> dropStatements = new ArrayList<String>();\n\n List<String> objectNames = jdbcTemplate.queryForStringList(\n \"SELECT INDEX_NAME FROM ALL_INDEXES WHERE OWNER = ? AND INDEX_TYPE NOT LIKE '%DOMAIN%'\", name);\n\n for (String objectName : objectNames) {\n dropStatements.add(generateDefaultDropStatement(\"INDEX\", objectName, \"\"));\n }\n return dropStatements;\n }", "@Before\n public void seedDatabase() {\n final String seedDataScript = loadAsString(\"pacmabooks.sql\");\n\n try (Connection connection = ds.getConnection()) {\n for (String statement : splitStatements(new StringReader(\n seedDataScript), \";\")) {\n connection.prepareStatement(statement).execute();\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n System.out.println(\"--------------------------------------------------- Seeding DID NOT WOKK\");\n e.printStackTrace();\n throw new RuntimeException(\"Failed seeding database\", e);\n }\n System.out.println(\"Seeding works\");\n\n }", "public void exportDictionary() \r\n\t{\t\r\n\t\tInputStream is = this.getClass().getResourceAsStream(\"/dictionary.sqlite\");\t\t\r\n\t\tOutputStream os = null;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tos = new FileOutputStream(fDictionaryFile());\r\n\t\t\tbyte[] buffer = new byte[1024];\r\n\t\t\tint length;\r\n\t\t\t\r\n\t\t\t//copy the file content in bytes \r\n\t\t\twhile ((length = is.read(buffer)) > 0) \r\n\t\t\t{\r\n\t\t\t\tos.write(buffer, 0, length);\r\n\t\t\t}\r\n\r\n\t\t\tis.close();\r\n\t\t\tos.close();\r\n\r\n\t\t\tSystem.out.println(\"/* Dictionary export successful! */\");\r\n\t\t} \r\n\t\tcatch(IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void doExport() {\n\t\tSQLiteDatabase db = null;\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tdb = openOrCreateDatabase(MyDbHelper.DATABASE_NAME, SQLiteDatabase.OPEN_READWRITE, null);\n\t\t\tcursor = db.rawQuery(\"SELECT * \" +\n \" FROM \" + LocationTable.TABLE_NAME +\n \" ORDER BY \" + LocationTable.COLUMN_TIMESTAMP + \" ASC\",\n null);\n \n\t\t\tint timestampColumnIndex = cursor.getColumnIndexOrThrow(LocationTable.COLUMN_TIMESTAMP);\n int latitudeColumnIndex = cursor.getColumnIndexOrThrow(LocationTable.COLUMN_LATITUDE);\n int longitudeColumnIndex = cursor.getColumnIndexOrThrow(LocationTable.COLUMN_LONGITUDE);\n int accuracyColumnIndex = cursor.getColumnIndexOrThrow(LocationTable.COLUMN_ACCURANCY);\n \n\t\t\tif (cursor.moveToFirst()) {\n\t\t\t\tStringBuffer fileBuf = new StringBuffer();\n\t\t\t\tString beginTimestamp = null;\n\t\t\t\tString endTimestamp = null;\n\t\t\t\tString timestamp = null;\n\t\t\t\tdo {\n\t\t\t\t\ttimestamp = cursor.getString(timestampColumnIndex);\n\t\t\t\t\tif (beginTimestamp == null) {\n\t\t\t\t\t\tbeginTimestamp = timestamp;\n\t\t\t\t\t}\n\t\t\t\t\tdouble latitude = cursor.getDouble(latitudeColumnIndex);\n\t\t\t\t\tdouble longitude = cursor.getDouble(longitudeColumnIndex);\n\t\t\t\t\tdouble accuracy = cursor.getDouble(accuracyColumnIndex);\n\t\t\t\t\tfileBuf.append(sevenSigDigits.format(longitude)+\",\"+sevenSigDigits.format(latitude)+\"\\n\");\n\t\t\t\t} while (cursor.moveToNext());\n\t\t\t\t\n\t\t\t\tendTimestamp = timestamp;\n\t\t\t\t\n\t\t\t\tcloseFileBuf(fileBuf, beginTimestamp, endTimestamp);\n\t\t\t\tString fileContents = fileBuf.toString();\n\t\t\t\tLog.d(ActivityName, fileContents);\n\t\t\t\tFile sdcard_path = Environment.getExternalStorageDirectory();\n\t\t\t\tFile sdDir = new File(sdcard_path, \"GPSLogger\");\n\t\t\t\tsdDir.mkdirs();\n\t\t\t\tFile file = new File(sdDir, zuluFormat(beginTimestamp) + \".kml\");\n\t\t\t\tFileWriter sdWriter = new FileWriter(file, false);\n\t\t\t\tsdWriter.write(fileContents);\n\t\t\t\tsdWriter.close();\n \t\t\tToast.makeText(getBaseContext(),\n \t\t\t\t\t\"Export completed!\",\n \t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t} else {\n\t\t\t\tToast.makeText(getBaseContext(),\n\t\t\t\t\t\t\"I didn't find any location points in the database, so no KML file was exported.\",\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t}\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\tToast.makeText(getBaseContext(),\n\t\t\t\t\t\"Error trying access the SD card. Make sure your handset is not connected to a computer and the SD card is properly installed\",\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t} catch (Exception e) {\n\t\t\tToast.makeText(getBaseContext(),\n\t\t\t\t\t\"Error trying to export: \" + e.getMessage(),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t} finally {\n\t\t\tif (cursor != null && !cursor.isClosed()) {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t\tif (db != null && db.isOpen()) {\n\t\t\t\tdb.close();\n\t\t\t}\n\t\t}\n\t}", "public void exportLocations(List<MyLocation> locationList) {\n\n StringBuilder data = new StringBuilder();\n // Adding File Header\n data.append(\"ID,Latitude,Longitude,Provider,startTime,endTime,accuracy,adminArea,countryCode,featureName,Locality,subAdminArea,addressLine,Interactions\");\n\n // Adding Data\n for(MyLocation location : locationList) {\n data.append(\"\\n\"\n +location.getId()+\",\"\n +location.getLatitude()+\",\"\n +location.getLongitude()+\",\"\n +location.getProvider()+\",\"\n +location.getStartTime()+\",\"\n +location.getEndTime()+\",\"\n +location.getAccuracy()+\",\"\n +location.getAdminArea()+\",\"\n +location.getCountryCode()+\",\"\n +location.getFeatureName()+\",\"\n +location.getLocality()+\",\"\n +location.getSubAdminArea()+\",\"\n +location.getAddressLine()+\",\"\n +location.getNumOfInteractions());\n }\n\n try{\n // Saving file onto device\n FileOutputStream out = context.openFileOutput(\"locations_export.csv\", Context.MODE_PRIVATE);\n out.write((data.toString()).getBytes());\n out.close();\n\n // Exporting\n File fileLocation = new File(context.getFilesDir(), \"locations_export.csv\");\n Uri path = FileProvider.getUriForFile(context, \"com.kdkvit.wherewasi.provider\", fileLocation);\n Intent fileIntent = new Intent(Intent.ACTION_SEND);\n fileIntent.setType(\"text/csv\");\n fileIntent.putExtra(Intent.EXTRA_SUBJECT, \"Data\");\n fileIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n fileIntent.putExtra(Intent.EXTRA_STREAM, path);\n context.startActivity(Intent.createChooser(fileIntent, \"Export CSV\"));\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void gExport() throws SQLException, ClassNotFoundException, IOException{\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\tGephi g = new Gephi(conn);\n\t\tg.gpMake();\n\t\tconn.close();\n\t}", "public void generatePatientSQL(HttpServletResponse response, String ids, Integer pid){\n\t\tresponse.setHeader( \"Content-Disposition\", \"attachment;filename=\"+\"patientExportSummary\"+\".sql\");\n\t\ttry{\n\t\t\tStringBuffer sb = new StringBuffer(\"\");\n\n\t\t\tList<PersonAttributeType> pat = getSavedPersonAttributeList(pid);\n\t\t\tList<Integer> idsList = multipleIds(ids);\n\t\t\tPatientService ps = Context.getPatientService();\n\t\t\tfor(int j=0 ; j<idsList.size();j++){\n\t\t\t\tPatient pt = ps.getPatient(idsList.get(j));\n\t\t\t\tfor(int i=0; i<pat.size();i++){\n\t\t\t\t\tPersonAttribute pa = pt.getAttribute(pat.get(i));\n\t\t\t\t\tif(pa!=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tsb.append(\"insert into person_attribute (person_id, value,person_attribute_type_id,creator,date_created,changed_by,date_changed,voided, voided_by,date_voided, void_reason,uuid ) values(\");\n\t\t\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t\t\t\t\t\tDate d = new Date();\n\t\t\t\t\t\tsb.append( pt.getId().toString()+ \",'\" + pa.getValue().toString()+ \"',\" + pat.get(i).getId().toString() + \",\"+ \"1\"+ \",'\" +dateFormat.format(d) +\"',null,null,0,null,null,null,null\" +\" );\\n\\n\" );\n\t\t\t\t\t\tsb.append(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t\t\t\tDate date = new Date();\n\n\t\t\t\tsb.append(\"insert into person_name (preferred,person_id,prefix,given_name, middle_name,family_name_prefix,family_name, family_name2, family_name_suffix, degree, creator, date_created,voided, voided_by,date_voided, void_reason,changed_by,date_changed, uuid ) values(\");\n\t\t\t\tsb.append(\"1,\" + pt.getId().toString()+ \",\" + \"null\" +\",'\" + pt.getGivenName().toString()+ \"','\" + pt.getMiddleName().toString() + \"',\" +\"null\" + \",'\" +pt.getFamilyName() +\"',\" +\"null\" +\",\" + \"null\" +\",\" + \"null\" + \",\" +\"1\" +\",'\" + dateFormat.format(date) + \"',0,null,null,null,null,null,null,\" + \" );\\n\\n\" );\n\t\t\t\tsb.append(\"\");\n\n\t\t\t\tsb.append(\"insert into person (gender,birthdate, birthdate_estimated,dead,death_date,cause_of_death,creator, date_created,changed_by,date_changed,voided, voided_by,date_voided, void_reason, uuid,deathdate_estimated) values(\");\n\t\t\t\tsb.append( \"'\" + pt.getGender().toString() +\"','\" + pt.getBirthdate().toString() + \"',0,0,null,null,1,'\");\n\t\t\t\tsb.append(dateFormat.format(date)+ \"',null,null,0,null,null,null,null,0\" + \");\\n\\n\" );\n\t\t\t\tsb.append(\"\");\n\n\n\t\t\t\tList<Obs> obs1 = new ArrayList<Obs>();\n\t\t\t\tContext.clearSession();\n\t\t\t\tObsService obsService = Context.getObsService();\n\t\t\t\tList<Obs> ob = getOriginalObsList(pt, obsService);\n\t\t\t\tobs1 = getEncountersOfPatient(pt,ob,pid); //New obs list - updated\n\t\t\t\tList<ConceptSource> cs = getConceptMapping(obs1);\n\t\t\t\tfor(int i=0; i<obs1.size();i++){\n\n\n\t\t\t\t\tsb.append(\"insert into obs (person_id,concept_id, encounter_id, order_id, obs_datetime, location_id, obs_group_id, accession_number, value_group_id,value_boolean,value_coded, value_coded_name_id,value_drug,value_datetime,value_numeric,value_modifier,value_text,value_complex, comments, creator, date_created,voided, voided_by,date_voided, void_reason, uuid,previous_version) values(\");\n\t\t\t\t\tsb.append(pt.getId().toString() );\n\t\t\t\t\tsb.append(\",\" + obs1.get(i).getConcept().getConceptId().toString());\n\t\t\t\t\tsb.append(\",\" + obs1.get(i).getEncounter().getEncounterId().toString());\n\t\t\t\t\tsb.append( \",null,'\" + obs1.get(i).getObsDatetime().toString() );\n\t\t\t\t\tsb.append( \"',null,null,null,null,\" );\n\t\t\t\t\tif(obs1.get(i).getValueBoolean() != null)\n\t\t\t\t\t\tsb.append(obs1.get(i).getValueBoolean().toString());\n\t\t\t\t\telse\n\t\t\t\t\t\tsb.append(\"null\");\n\t\t\t\t\tsb.append( \",\" );\n\t\t\t\t\tif(obs1.get(i).getValueCoded() != null)\n\t\t\t\t\t\tsb.append(obs1.get(i).getValueCoded().toString());\n\t\t\t\t\telse\n\t\t\t\t\t\tsb.append(\"null\");\n\n\n\t\t\t\t\tsb.append(\",null,null,null,\" );\n\t\t\t\t\tif(obs1.get(i).getValueNumeric() != null)\n\t\t\t\t\t\tsb.append(obs1.get(i).getValueNumeric().toString());\n\t\t\t\t\telse\n\t\t\t\t\t\tsb.append(\"null\");\n\n\t\t\t\t\tsb.append( \",null,null,null,null,1,'\" + dateFormat.format(date) +\"',0,null,null,null,null,null\" + \" );\\n\\n\" );\n\t\t\t\t\tsb.append(\"\");\n\n\n\t\t\t\t\tsb.append(\"insert into encounter (encounter_type, patient_id, location_id, form_id, encounter_datetime, creator, date_created,voided, voided_by,date_voided, void_reason, changed_by, date_changed,visit_id, uuid) values(\");\n\t\t\t\t\tsb.append(obs1.get(i).getEncounter().getEncounterType().getEncounterTypeId().toString() + \",\");\n\t\t\t\t\tsb.append(pt.getId().toString() + \",null,null,'\");\n\t\t\t\t\tsb.append(dateFormat.format(obs1.get(i).getEncounter().getEncounterDatetime()).toString() + \"',1,'\");\n\t\t\t\t\tsb.append(dateFormat.format(date) + \"',0,null,null,null,null,null,null,null);\\n\\n\");\n\t\t\t\t\tsb.append(\"\");\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tString a = sb.toString();\n\t\t\t// Finally, send the response\n\t\t\tbyte[] res = a.getBytes(Charset.forName(\"UTF-8\"));\n\t\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\t\t\tresponse.getOutputStream().write(res);\n\t\t\tresponse.flushBuffer();\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tlog.error(\"IO Exception in generating SQL\", e);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tlog.error(\"Exception in generating SQL\", e);\n\t\t}\n\n\t}", "public static void main(String[] args){\n String importPath = \"import.CSV\";\n String exportQuery = \"SELECT * FROM PAIS\";\n SQLUtils t = new SQLUtilsImpl();\n File export = t.importCSV(exportQuery);\n //t.runFile(file);\n //t.importCSV(importF);\n //System.out.println(t.executeQuery(\"SELECT * FROM CIDADE WHERE ID = 3000\")); \n \n System.out.println(\"termino\");\n }", "private void exportToInsertSql() {\n\n if (destTableNameList.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"No table is selected.\");\n return;\n }\n final StringBuilder sb = new StringBuilder();\n for (final String tableName : destTableNameList) {\n utils.executeQuerySql(\"SELECT * FROM \" + tableName + \" WHERE 1=2\", new DataMetaUtils.QueryAction<Object>() {\n @Override\n public Object callback(ResultSet rs) throws SQLException {\n StringBuilder tableTriggerSb = new StringBuilder();\n ResultSetMetaData metaData = rs.getMetaData();\n String auditTableName = tableName + \"_AL\";\n tableTriggerSb.append(\"CREATE TABLE \").append(auditTableName).append(\" (\\n\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n tableTriggerSb.append(\" \");\n tableTriggerSb.append(metaData.getColumnName(i + 1));\n String typeName = metaData.getColumnTypeName(i + 1);\n tableTriggerSb.append(\" \")\n .append(typeName);\n if (metaData.getPrecision(i + 1) > 0) {\n tableTriggerSb.append(\"(\")\n .append(metaData.getPrecision(i + 1));\n if (metaData.getScale(i + 1) > 0) {\n tableTriggerSb.append(\",\")\n .append(metaData.getScale(i + 1));\n }\n tableTriggerSb.append(\")\");\n }\n\n tableTriggerSb.append(\",\\n\");\n\n }\n tableTriggerSb.append(\" ACT_TYPE CHAR(1),\\n\")\n .append(\" ACT_BY VARCHAR2(50),\\n\")\n .append(\" ACT_TIME DATE\\n\");\n tableTriggerSb.append(\");\\n\");\n\n\n //create trigger\n StringBuilder newInsert = new StringBuilder();\n StringBuilder delInsert = new StringBuilder();\n newInsert.append(\"INSERT INTO \").append(auditTableName).append(\"(\");\n delInsert.append(\"INSERT INTO \").append(auditTableName).append(\"(\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n\n newInsert.append(metaData.getColumnName(i + 1));\n newInsert.append(\",\");\n delInsert.append(metaData.getColumnName(i + 1));\n delInsert.append(\",\");\n }\n newInsert.append(\"ACT_TYPE,\")\n .append(\"ACT_BY,\")\n .append(\"ACT_TIME) VALUES(\");\n delInsert.append(\"ACT_TYPE,\")\n .append(\"ACT_BY,\")\n .append(\"ACT_TIME) VALUES(\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n\n newInsert.append(\":NEWROW.\").append(metaData.getColumnName(i + 1));\n newInsert.append(\",\");\n delInsert.append(\":OLDROW.\").append(metaData.getColumnName(i + 1));\n delInsert.append(\",\");\n }\n newInsert.append(\"v_actType,\")\n .append(\":NEWROW.UPDATED_BY,\")\n .append(\"sysdate);\\n\");\n delInsert.append(\"'D',\")\n .append(\"USER,\")\n .append(\"sysdate);\\n\");\n\n tableTriggerSb.append(\"CREATE OR REPLACE TRIGGER \")\n .append(\"TR_AL_\")\n .append(tableName)\n .append(\" \\n\")\n .append(\"AFTER INSERT OR DELETE OR UPDATE ON \")\n .append(tableName)\n .append(\" \\n\")\n .append(\"REFERENCING OLD AS \\\"OLDROW\\\" NEW AS \\\"NEWROW\\\" \\n\"\n + \"FOR EACH ROW \\n\"\n + \"ENABLE\\n\")\n .append(\"DECLARE\\n\")\n .append(\"v_actType char(1);\\n\")\n .append(\"BEGIN\\n\")\n .append(\"IF INSERTING OR UPDATING THEN \\n\"\n + \"BEGIN \\n\"\n + \"IF INSERTING THEN \\n v_actType := 'I'; \\nELSE\\n v_actType := 'U';\\n END IF;\\n\");\n tableTriggerSb.append(newInsert.toString());\n tableTriggerSb.append(\"END;\\n\"\n + \" ELSIF DELETING THEN \\n\"\n + \" BEGIN \\n\");\n\n tableTriggerSb.append(delInsert.toString());\n tableTriggerSb.append(\"END;\\n\"\n + \"END IF;\\n\"\n + \"END;\\n/\\n\");\n sb.append(tableTriggerSb.toString());\n\n return null;\n }\n });\n }\n\n SqlResultForm form = new SqlResultForm(null, true);\n form.setLocationRelativeTo(null);\n form.setSqlResult(sb.toString());\n form.setTestDsKey(((ValueName) cmbDs.getSelectedItem()).getValue());\n form.setVisible(true);\n\n }", "public void toSql(String baseDir, String out) throws IOException {\n Path pBase = Paths.get(baseDir);\n final String format = \"insert into files values(null,'%s','%s');\";\n List<String> files = new ArrayList<>();\n Files.walkFileTree(pBase, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n String fileName = file.getFileName().toString();\n String path = file.toAbsolutePath().toString();\n if (filter(path) || filter(fileName)) {\n return FileVisitResult.CONTINUE;\n }\n if (fileName.length() > 128 || path.length() > 8096) {\n System.out.println(String.format(\"warning : %s %s exced the limit\", fileName, path));\n }\n\n\n String insert = String.format(format, fileName, path);\n files.add(insert);\n if (files.size() >= 10240) {\n write2File(out, files);\n files.clear();\n }\n return FileVisitResult.CONTINUE;\n }\n });\n write2File(out, files);\n }", "void exportToDirectory(File targetDirectory) throws IOException;", "DataFrameExport export();", "public void writeToDatabase(List<Page> pageList) {\n\t\tDbConnector db = null;\n\t\ttry {\n\t\t\tdb = new DbConnector();\n\t\t} catch (ClassNotFoundException | SQLException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tfor (Page page : pageList) {\n\t\t\ttry {\n\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_INSERT, Arrays.asList(String.valueOf(page.getPageId()),\n\t\t\t\t\t\tpage.getTitle(), String.valueOf(page.getNs()), \"EN\"));\n\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_CONTENT_INSERT,\n\t\t\t\t\t\tArrays.asList(String.valueOf(page.getPageId()), page.getExtract()));\n\t\t\t\tint position = 0;\n\t\t\t\tfor (String key : page.getExtractMap().keySet()) {\n\t\t\t\t\tString fullText = \"\";\n\t\t\t\t\tLinkedHashMap<String, String> textMap = page.getExtractMap().get(key);\n\t\t\t\t\tfor (String textMapKey : textMap.keySet()) {\n\t\t\t\t\t\tfullText += textMap.get(textMapKey);\n\t\t\t\t\t}\n\t\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_EXTRACT_INSERT,\n\t\t\t\t\t\t\tArrays.asList(String.valueOf(page.getPageId()), key, fullText, String.valueOf(position)));\n\t\t\t\t\tposition++;\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tdb.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void setupDBs()\n {\n\t mSetupDBTask = new SetupDBTask(this);\n\t\tmSetupDBTask.execute((Void[])null);\n }", "public static void main(String[] args) throws FileNotFoundException, ParseException {\n\t\tCreateLocations.main(args);// create default locations\n\t\t\n\t\t// Create Apex Consulting\n\t\t\n\t\tLegalName = \"Apex Consulting\";//compose the company's name\n\t\tDBAName = LegalName;\n\t\tDomain = \"apexconsulting.com\";//compose the company's domain\n\t\tToken = \"0_NJTIPIpaJTl1XOyn9SmfFFrK0=\";// OAuth access token\n\t\tIndustry = \"Consulting\";\n\t\tcity = \"Bellevue\";\n\t\t\n\t\tHQ = location.getCity(locCollection, city);\n\t\tHQ.display();\n\t\tif (HQ.getCountryCode().equals(\"CA\")) {//then it's a Canadian company\n\t\t\tPostingCurrency = \"CAD\";\n\t\t} else if (HQ.getCountryCode().equals(\"GB\")) {//then it's a United Kingdom company\n\t\t\tPostingCurrency = \"GBP\";\n\t\t} else if (HQ.getCountryCode().equals(\"AU\")) {//then it's a Australian company\n\t\t\tPostingCurrency = \"AUD\";\n\t\t}else {//then its an American company\n\t\t\tPostingCurrency = \"USD\";\n\t\t}// if block\n\t\n\t\t\n\t\tcompany.setID(GUID.getGUID(4));\n\t\tcompany.setDBAName(DBAName);\n\t\tcompany.setLegalName(LegalName);\n\t\tcompany.setDomain(Domain);\n\t\tcompany.setIndustry(Industry);\n\t\tcompany.setHQ(HQ);\n\t\tcompany.setPostingCurrency(PostingCurrency);\n\n\t\t\n\t\tcoid = company.getID();\n\t\tout.println(\"----------------------\");\n\t\tcompany.display();\n\t\tmyDoc = company.getDocument();//convert the Company object into a BasicDBObject document\n\t\tmyMongoCompanyFunctions.addDoc(comCollection, myDoc);\n\t\t\n\t\tlogin=\"Support@\" + Domain;\n\t\t\n\t\temployee.setID(GUID.getGUID(4));\n\t\temployee.setDisplayName(firstname + \" \"+ lastname);\n\t\temployee.setEmployerCompanyID(coid);\n\t\temployee.setEmployerCompanyName(LegalName);\n\t\temployee.setHome(HQ);\n\t\temployee.setLastName(lastname);\n\t\temployee.setFirstName(firstname);\n\t\temployee.setLoginID(login);\n\n\t\tout.println(\"----------------------\");\n\t\temployee.display();\n\t\tmyDoc = employee.getDocument();// convert this Employee object into a BasicDBObject\n\t\tmyMongoCompanyFunctions.addDoc(empCollection, myDoc);// add this BasicDBObject to the MongoDB\n\t\t\n\t\tString strDate = \"11/21/2017 04:58:55 AM\";// assign the Expriration_Date to this \"String date\"\n\t\tDate ExpirationDate = sdf.parse(strDate);// parse the \"String date\" into a Date object using the SimpleDateFormat object sdf\n\t\t\n\n\t\tEmployeeID = employee.getID();// assign the ID for this Employee\n\t\tCompanyID = employee.getEmployerCompanyID();// assign the Company ID for this employee\n\t\t\n\t\ttoken.setID(GUID.getGUID(4));\n\t\ttoken.setInstanceURL(Instance);\n\t\ttoken.setToken(Token);\n\t\ttoken.setExpirationDate(ExpirationDate);\n\t\ttoken.setEmployeeID(EmployeeID);\n\t\ttoken.setCompanyID(CompanyID);\n\n\t\tout.println(\"----------------------\");\n\t\ttoken.display();\n\t\tmyDoc = token.getDocument();// convert the OAuthToken object into a BasicDBObject document\n\t\tmyMongoCompanyFunctions.addDoc(tokenCollection, myDoc);// add the BasicDBObject to the Tokens collection\n\t\t\n\t\t\n\t\t\n\t\n\n\t}", "public void exportAllSpaces(String confluenceUrl, String username, String password, File targetDir) {\n\t\tPhantomJSDriver driver = new PhantomJSDriver();\n\t\tdriver.manage().window().setSize(new Dimension(1920, 1080));\n\n\t\ttry {\n\t\t\tdriver.get(confluenceUrl);\n\n\t\t\t// login\n\t\t\tWebElement inputUsername = driver.findElement(By.id(\"os_username\"));\n\t\t\tWebElement inputPassword = driver.findElement(By.id(\"os_password\"));\n\t\t\tWebElement loginButton = driver.findElement(By.id(\"loginButton\"));\n\n\t\t\tinputUsername.sendKeys(username);\n\t\t\tinputPassword.sendKeys(password);\n\t\t\tloginButton.click();\n\n\t\t\t// open \"all spaces\"\n\t\t\tdriver.findElement(By.cssSelector(\"a.all-spaces-link\")).click();\n\n\t\t\t// collect spaces\n\t\t\tList<String> spacesURLs = new ArrayList<>();\n\t\t\tString currentPage = getCurrentPage(driver);\n\t\t\tdo {\n\t\t\t\tnew WebDriverWait(driver, 30).until(d -> findSpacesListElements(d).size() > 0);\n\t\t\t\tfindSpacesListElements(driver).forEach(webElement -> spacesURLs.add(webElement.getAttribute(\"href\")));\n\n\t\t\t\t// search next button\n\t\t\t\tWebElement nextButton = driver.findElement(By.cssSelector(\"#space-search-result .aui-nav-next>a\"));\n\t\t\t\tif (nextButton != null && nextButton.getAttribute(\"href\") != null) {\n\t\t\t\t\tfinal String prevPage = currentPage;\n\t\t\t\t\tnextButton.click();\n\t\t\t\t\tnew WebDriverWait(driver, 30).until(d -> !StringUtils.equals(getCurrentPage(d), prevPage));\n\t\t\t\t\tcurrentPage = getCurrentPage(driver);\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (true);\n\n\t\t\t// go to each space\n\t\t\tfor (String spacesURL : spacesURLs) {\n\t\t\t\tdriver.navigate().to(spacesURL);\n\t\t\t\tString spaceKey = extractSpaceKey(driver);\n\t\t\t\tif (spaceKey != null) {\n\n\t\t\t\t\t// got to space export page\n\t\t\t\t\tdriver.navigate().to(confluenceUrl + \"/spaces/exportspacewelcome.action?key=\" + spaceKey);\n\n\t\t\t\t\t// select PDF radio button\n\t\t\t\t\tdriver.findElement(By.id(\"format-export-format-pdf\")).click();\n\n\t\t\t\t\t// click next button\n\t\t\t\t\tdriver.findElement(By.cssSelector(\"form[name=\\\"export-space-choose-format\\\"] input[name=\\\"confirm\\\"]\")).click();\n\n\t\t\t\t\t// select standard export\n\t\t\t\t\tWebElement contentOptionAll;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcontentOptionAll = driver.findElement(By.id(\"contentOptionAll\"));\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// radio button not found -> no pages in space?\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tcontentOptionAll.click();\n\n\t\t\t\t\t// click export button\n\t\t\t\t\tdriver.findElement(By.cssSelector(\"form[name=\\\"exportspaceform\\\"] input[name=\\\"confirm\\\"]\")).click();\n\n\t\t\t\t\t// wait for download link\n\t\t\t\t\tnew WebDriverWait(driver, 600).until(d -> d.findElement(By.cssSelector(\"#taskCurrentStatus>a\")));\n\t\t\t\t\tWebElement downloadButton = driver.findElement(By.cssSelector(\"#taskCurrentStatus>a\"));\n\n\t\t\t\t\t// download\n\t\t\t\t\tString downloadLink = downloadButton.getAttribute(\"href\");\n\t\t\t\t\tdownloadPDF(driver, downloadLink, targetDir);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tmakeScreenshot(driver);\n\t\t}\n\t}", "private final void exportAll() {\n\t\tfinal JFileChooser chooser = new JFileChooser(System.getProperty(\"user.home\"));\n\t\tint returnVal = chooser.showSaveDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = chooser.getSelectedFile();\n\t\t\tserializeToFile(file);\n\t }\t\n\t}", "public File getOutputDb();", "@Override\n public void exportTables(FileEnvVar exportFile,\n List<TableInfo> tableDefs,\n boolean includeBuildInformation,\n boolean replaceMacros,\n boolean includeVariablePaths,\n CcddVariableHandler variableHandler,\n String[] separators,\n String outputType,\n Object... extraInfo) throws JAXBException,\n MarshalException,\n CCDDException,\n Exception\n {\n\n // Convert the table data into XTCE XML format\n convertTablesToXTCE(tableDefs,\n includeBuildInformation,\n (EndianType) extraInfo[0],\n (boolean) extraInfo[1],\n (String) extraInfo[2],\n (String) extraInfo[3],\n (String) extraInfo[4],\n (String) extraInfo[5],\n (String) extraInfo[6]);\n\n // Output the XML to the specified file. The marshaller has a hard-coded limit of 8 levels;\n // once exceeded it starts back at the first column. Therefore, a Transformer is used to\n // set the indentation amount (it doesn't have an indentation level limit)\n DOMResult domResult = new DOMResult();\n marshaller.marshal(project, domResult);\n Transformer transformer = TransformerFactory.newInstance().newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"3\");\n transformer.transform(new DOMSource(domResult.getNode()), new StreamResult(exportFile));\n }", "public static void PrintToCsv() throws Exception {\n\t\tBufferedWriter bw1 = new BufferedWriter(new FileWriter(\"./data/output1.csv\"));\n\t\tBufferedWriter bw2 = new BufferedWriter(new FileWriter(\"./data/output2.csv\"));\n\t\tBufferedWriter bw3 = new BufferedWriter(new FileWriter(\"./data/output3.csv\"));\n\t\tBufferedWriter bw4 = new BufferedWriter(new FileWriter(\"./data/output4.csv\"));\n\t\t\n\t\t//print the name of attributes in Table\n\t\tPrint_attribute(bw1,bw2,bw3,bw4);\n\t\tIterator<String> iter = BugDBConnection.Domain.keySet().iterator();\n\t\ttry{\n\t\t\twhile(iter.hasNext()){\n\t\t\t\tString key = iter.next();\n\t\t\t\tdomain = key.split(\"-\")[0];\n\t\t\t\tproject = key.split(\"-\")[1];\n\n\t\t\t\tFieldSet fieldset = BugDBConnection.Domain.get(key);\n\t\t\t\tPrintQ1(bw1,fieldset.field);\n\t\t\t\tPrintQ2(bw2, fieldset.refield);\n\t\t\t\tPrintQ3(bw3, fieldset.f1, fieldset.f2, fieldset.f3, fieldset.f4);\n\t\t\t\tPrintQ4(bw4, fieldset.avg, fieldset.min, fieldset.max);\n\t\t\t\t\n\t\t\t}\n\t\t\tbw1.close();\n\t\t\tbw2.close();\n\t\t\tbw3.close();\n\t\t\tbw4.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static Output<GetDomainsResult> getDomains(GetDomainsArgs args) {\n return getDomains(args, InvokeOptions.Empty);\n }", "public void saveDatabase() {\r\n\t\ttry {\r\n\t\t\tFile databaseDirectory = new File (System.getProperty(\"user.home\")\r\n\t\t\t\t\t+ File.separator + \"Documents\" + File.separator + \"DatabaseUniverse\"\r\n\t\t\t\t\t+ File.separator + name);\r\n\t\t\tdatabaseDirectory.mkdirs();\r\n\t\t\tFile[] files = databaseDirectory.listFiles();\r\n\t\t\tSystem.gc();\r\n\t\t\tfor (File file : files) {\r\n\t\t\t\tFiles.delete(file.toPath());\r\n\t\t\t}\r\n\t\t\tfor (Table table : tables) {\r\n\t\t\t\ttable.saveTable(databaseDirectory.getPath());\r\n\t\t\t}\r\n\t\t} catch (SecurityException e) {\r\n\t\t\tSystem.out.println(\"Access Denied in Documents folder. Please check your security settings\"\r\n\t\t\t\t\t+ \"to enable file saving\");\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.err.print(e);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\t}", "void deleteByDomainIds(List<String> domainIds) throws SrdmDataAccessException;", "public static void geoExport() throws ClassNotFoundException, SQLException, IOException{\n\t\t\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\tGeoExport ge = new GeoExport(conn, \"/Users/Brian/Desktop/PreDeb1_Geo.csv\", \"SELECT * FROM TWEETS WHERE GEOLOCATION IS NOT NULL\");\n\t\tge.geoMake();\n\t\tconn.close();\n\t\t\n\t}", "private static DataSources toDataSources(OutputGenerator outputGenerator, List<DataSource> sharedDataSources) {\n final List<DataSource> dataSources = outputGenerator.getDataSources();\n final SeedType seedType = outputGenerator.getSeedType();\n\n if (seedType == SeedType.TEMPLATE) {\n return new DataSources(ListUtils.concatenate(dataSources, sharedDataSources));\n } else if (seedType == SeedType.DATASOURCE) {\n // Since every data source shall generate an output there can be only 1 datasource supplied.\n Validate.isTrue(dataSources.size() == 1, \"One data source expected for generation driven by data sources\");\n return new DataSources(dataSources);\n } else {\n throw new IllegalArgumentException(\"Don't know how to handle the seed type: \" + seedType);\n }\n }", "public static File getDatabaseExportDirectoryFile() {\n\t\tif (xml == null) return null;\n\t\treturn new File(basepath + databaseExportDir);\n\t}", "protected void exportRecords( ExportArguments arguments, String username, String password, List<Record> records ){\n\t\tif ( records.size() > 0 ){\n\t\t\tthis.getLogger().log( LogLevel.INFO, \"SensLink 3.0 Export All Adapter: export {} records to the SensLink System.\", records.size() );\n\n\t\t\tSensLinkApiV3 api;\n\t\t\tOAuthToken token;\n\t\t\ttry {\n\t\t\t\t// Login SensLink 3.0 by OAuth 2.0\n\t\t\t\tif ( arguments.isCustom() ){\n\t\t\t\t\tapi = SensLinkApiV3Runtime.buildRuntime( arguments.getHost() );\n\t\t\t\t\ttoken = api.requestAccessToken( username, password, arguments.getHost() );\n\t\t\t\t} else {\n\t\t\t\t\tapi = SensLinkApiV3Runtime.DEFAULT;\n\t\t\t\t\ttoken = api.requestAccessToken( username, password, SensLinkApiV3Host.IOW );\n\t\t\t\t}\n\t\t\t\tif ( token.isSuccessful() ){\n\t\t\t\t\tthis.getLogger().log( LogLevel.INFO, \"SensLink 3.0 Export Adapter: The SensLink 3.0 system login successfully, try to write records to the SensLink 3.0 system.\" );\n\t\t\t\t\tResultMessage message = api.write( token.getAccess(), records );\n\t\t\t\t\tif ( message.isSuccessful() ) {\n\t\t\t\t\t\tthis.getLogger().log( LogLevel.INFO,\"SensLink 3.0 Export Adapter: success to write {} records to the SensLink System.\", records.size() );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.getLogger().log( LogLevel.WARN,\"SensLink 3.0 Export Adapter: Failed to write records to the SensLink System.\" );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.getLogger().log( LogLevel.WARN, \"SensLink 3.0 Export Adapter: SensLink System Login failed.\" );\n\t\t\t\t}\n\t\t\t} catch ( IOException e ){\n\t\t\t\tthis.getLogger().log( LogLevel.ERROR, \"SensLink 3.0 Export Adapter: Connection to SensLink 3.0 system timeout. {}\", e ) ;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.getLogger().log( LogLevel.WARN, \"SensLink 3.0 Export Adapter: PI-XML hasn't data to export.\" );\n\t\t}\n\t}", "private void deleteExpiredTemporaryExportFiles(List<COSite> cosites) {\r\n\tint timeOut = getDeleteExportDelay();\r\n\tfor (Iterator<COSite> iter = cosites.iterator(); iter.hasNext();) {\r\n\t try {\r\n\t\tSite site =\r\n\t\t\tsiteService.getSite(((COSite) iter.next()).getSiteId());\r\n\t\tString id = getSiteReference(site) + TEMP_DIRECTORY;\r\n\t\tid = id.substring(8) + \"/\";\r\n\t\t// enableSecurityAdvisor();\r\n\t\tlog.info(\"*** deleteExpiredTemporaryExportFiles enableSecurityAdvisor() { OsylManagerServiceImpl *** \");\r\n\r\n\t\tif (collectionExist(id)) {\r\n\t\t ContentCollection contentCollection =\r\n\t\t\t contentHostingService.getCollection(id);\r\n\t\t @SuppressWarnings(\"unchecked\")\r\n\t\t List<ContentEntity> members =\r\n\t\t\t contentCollection.getMemberResources();\r\n\r\n\t\t // process members\r\n\t\t boolean hasContent = false;\r\n\t\t for (Iterator<ContentEntity> iMbrs = members.iterator(); iMbrs\r\n\t\t\t .hasNext();) {\r\n\t\t\tContentEntity next = (ContentEntity) iMbrs.next();\r\n\t\t\tString thisEntityRef = next.getId();\r\n\t\t\tContentResource contentResource =\r\n\t\t\t\tcontentHostingService\r\n\t\t\t\t\t.getResource(thisEntityRef);\r\n\r\n\t\t\tTime creationDate =\r\n\t\t\t\t(Time) contentResource\r\n\t\t\t\t\t.getProperties()\r\n\t\t\t\t\t.getTimeProperty(\r\n\t\t\t\t\t\tResourceProperties.PROP_CREATION_DATE);\r\n\t\t\tTime now = timeService.newTime();\r\n\t\t\tTime expirationTime = timeService.newTime();\r\n\t\t\texpirationTime.setTime(creationDate.getTime() + timeOut\r\n\t\t\t\t* 60000);\r\n\t\t\tif (now.after(expirationTime)) {\r\n\t\t\t contentHostingService.removeResource(thisEntityRef);\r\n\t\t\t} else {\r\n\t\t\t hasContent = true;\r\n\t\t\t}\r\n\t\t }\r\n\t\t if (!hasContent) {\r\n\t\t\tcontentHostingService.removeCollection(id);\r\n\t\t }\r\n\t\t}\r\n\t\t// securityService.popAdvisor();\r\n\t } catch (Exception e) {\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}\r\n }", "public static void main(String[] args) throws Exception {\n\t\tConvertDB2ToOracle_v2 convert = getInstance();\n\t\tconvert.provide(\"D:\\\\others\\\\temp\\\\db2-extra-tables.txt\");\n\t\tconvert.extractSQL(\"D:\\\\others\\\\temp\\\\ddlfile.sql\");\n\t}", "@Override\r\n\t@Transactional(readOnly=false,value=\"transactionManager2\")\r\n\tpublic List<ApplMstOrderTypeDest> save(List<ApplMstOrderTypeDest> domain, int bulkRecord) {\n\t\treturn applMstOrderTypeDestDAO.save(domain, bulkRecord);\r\n\t}", "public void convertCsvDataToSQLScrip(List<CorruptionIndex> data, String destinationFile){\n\n }", "public abstract String getExportLocation();", "@Override\n public <T> void exportToExcel(String location, List<T>... values) throws IOException, WriteException, DALException {\n ExcelWriter newFile = new ExcelWriter();\n newFile.setOutputFile(location);\n newFile.createNewExcel(\"Rapport over frivillige\");\n\n newFile.createCaptions(0, \"Frivillig\", \"Email\", \"Telefon\", \"Antal timer i laug\");\n\n writeDataToFile(newFile, values[0], 1);\n\n //If a second list is parsed, prints its information under the first list.\n if (values.length > 1 && values[1] != null) {\n newFile.createCaptions(values[0].size() + 1, \"Inaktive Frivillige\");\n\n writeDataToFile(newFile, values[1], values[1].size() + 2);\n }\n\n newFile.writeExcelToFile();\n }", "public static List<JdbcOption> getDatabaseList(String baseDir) throws Exception {\n\t\tProjectConfig projectConfig = getProjectConfig(getCommonConfigFile(baseDir));\n\t\treturn getDatabaseListFromFile(projectConfig.getDatabasesPath() + Constants.FILE_SEPERATOR + Constants.DB_SETTINGS_XML_FILE);\n\t}", "public String[] getDatabaseCleanScripts() throws AdaFrameworkException {\r\n\t\tString[] returnedValue = null;\r\n\t\tList<String> scriptsList = new ArrayList<String>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString[] existingTables = getTables();\r\n\t\t\tif (existingTables != null && existingTables.length > 0) {\r\n\t\t\t\tif (processedTables != null && processedTables.size() > 0) {\r\n\t\t\t\t\tfor(String databaseTable : existingTables) {\r\n\t\t\t\t\t\tboolean tableFound = false;\r\n\t\t\t\t\t\tfor (String modelTable : processedTables) {\r\n\t\t\t\t\t\t\tif (databaseTable.trim().toLowerCase().equals(modelTable.trim().toLowerCase())) {\r\n\t\t\t\t\t\t\t\ttableFound = true;\r\n\t\t\t\t\t\t\t\tbreak;\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\r\n\t\t\t\t\t\tif (!tableFound) {\r\n\t\t\t\t\t\t\tif (!databaseTable.contains(DataUtils.DATABASE_LINKED_TABLE_NAME_PREFIX)) {\r\n\t\t\t\t\t\t\t\tscriptsList.add(String.format(DataUtils.DATABASE_DROP_TABLE_PATTERN, databaseTable));\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}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (scriptsList.size() > 0) {\r\n\t\t\t\treturnedValue = scriptsList.toArray(new String[scriptsList.size()]);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tExceptionsHelper.manageException(e);\r\n\t\t} finally {\r\n\t\t\tscriptsList.clear();\r\n\t\t\tscriptsList = null;\r\n\t\t}\r\n\t\t\r\n\t\treturn returnedValue;\r\n\t}", "public boolean backupAllTablesToCsv(Context ctx, SQLiteDatabase db, String suffix) {\n\t\tboolean allSucceeded = true;\n\t\tfor (TableHelper table : getTableHelpers()) {\n\t\t\tallSucceeded &= table.backup(db, ctx, suffix);\n\t\t}\n\t\treturn allSucceeded;\n\t}", "private void writeDataToDatabase(InfluxDB influxDB, Target target, Point[] data) {\n for (Point p : data) {\n influxDB.write(target.getDatabase(), \"default\", p);\n }\n }", "private File exportAndZip(String siteId, String webappDir) throws Exception {\r\n\tlog.info(\"user [\" + sessionManager.getCurrentSession().getUserEid()\r\n\t\t+ \"] exports site: [\" + siteId + \"]\");\r\n\r\n\t// opening a new temporary zipfile\r\n\tFile zipFile = File.createTempFile(\"osyl-package-export\", \".zip\");\r\n\tZipOutputStream zos =\r\n\t\tnew ZipOutputStream(new FileOutputStream(zipFile));\r\n\r\n\t// retrieving the xml file\r\n\tCOSerialized coSerialized =\r\n\t\tosylSiteService.getCourseOutlineForExport(siteId, webappDir);\r\n\r\n\tbyte[] xmlBytes = coSerialized.getContent().getBytes(\"UTF-8\");\r\n\twriteToZip(zos, OsylManagerService.CO_XML_FILENAME, xmlBytes);\r\n\r\n\t// retrieving other resources\r\n\tString resourceDir = contentHostingService.getSiteCollection(siteId);\r\n\r\n\ttry {\r\n\t ContentCollection workContent =\r\n\t\t contentHostingService.getCollection(resourceDir);\r\n\t // recursively retrieve all files\r\n\t retrieveFiles(zos, workContent, resourceDir);\r\n\t} catch (Exception e) {\r\n\t log.error(e);\r\n\t e.printStackTrace();\r\n\t throw new Exception(\"Cannot retrieve files in site for zipping\", e);\r\n\t}\r\n\tzos.close();\r\n\treturn zipFile;\r\n }", "public static void main(String[] args) {\n\t\tnew DBImport().importDB(Config.getContextRealPath() + \"WEB-INF/data/installer/Install.dat\");\n\t}", "public static boolean exportStatement(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"exportStatement\")) return false;\n if (!nextTokenIs(b, \"<export statement>\", AT, EXPORT)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, EXPORT_STATEMENT, \"<export statement>\");\n r = exportStatement_0(b, l + 1);\n r = r && consumeToken(b, EXPORT);\n r = r && uriElement(b, l + 1);\n p = r; // pin = 3\n r = r && report_error_(b, exportStatement_3(b, l + 1));\n r = p && report_error_(b, exportStatement_4(b, l + 1)) && r;\n r = p && consumeToken(b, SEMICOLON) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "private void createDBProcedure() {\r\n try {\r\n Class.forName(myDriver);\r\n Connection conn = DriverManager.getConnection(myUrl, myUser, myPass);\r\n for (File sentiment : sentimentsFoldersList) {\r\n try {\r\n String queryCreate\r\n = \"CREATE TABLE \" + sentiment.getName().toUpperCase()\r\n + \" (WORD VARCHAR(50), COUNT_RES INT, PERC_RES FLOAT, COUNT_TWEET INT, PRIMARY KEY(WORD) )\";\r\n Statement st_create = conn.createStatement();\r\n st_create.executeUpdate(queryCreate);\r\n System.out.println(\"TABLE \" + sentiment.getName().toLowerCase() + \" CREATED\");\r\n st_create.close();\r\n } catch (SQLException ex) {\r\n if (ex.getErrorCode() == 955) {\r\n System.out.println(\"TABLE \" + sentiment.getName().toLowerCase() + \" WAS ALREADY PRESENT...\");\r\n }\r\n }\r\n }\r\n conn.close();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n System.out.println(ex.toString());\r\n }\r\n }", "public boolean writePlicSnapshotToFile(File f, String dbSchema, String dataSource){\n try{\n //Obtener la conexion JDBC del proyecto\n InitialContext ctx = new InitialContext();\n DataSource ds = (DataSource) ctx.lookup(dataSource);\n Connection connection = ds.getConnection();\n\n\t String query = \"SELECT '\\\"'||REPLACE(COALESCE(globaluniqueidentifier,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(scientificname,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(institutioncode,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||COALESCE(to_char(datelastmodified,'YYYY-MM-DD HH24:MI:SS'),'')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(taxonrecordid,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(language,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(creators,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(distribution,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(abstract,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(kingdomtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(phylumtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(classtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(ordertaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(familytaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(genustaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(synonyms,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(authoryearofscientificname,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(speciespublicationreference,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(commonnames,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(typification,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(contributors,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||COALESCE(to_char(datecreated,'YYYY-MM-DD'),'')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(habit,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(lifecycle,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(reproduction,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(annualcycle,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(scientificdescription,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(briefdescription,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(feeding,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(behavior,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(interactions,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(chromosomicnumbern,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(moleculardata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(populationbiology,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(threatstatus,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(legislation,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(habitat,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(territory,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(endemicity,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(theuses,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(themanagement,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(folklore,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(thereferences,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(unstructureddocumentation,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(otherinformationsources,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(papers,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(identificationkeys,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(migratorydata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(ecologicalsignificance,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(unstructurednaturalhistory,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(invasivenessdata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(targetaudiences,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(version,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage1,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage1,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage2,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage2,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage3,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage3,''),'\\r\\n', ' ')||'\\\"'\"+\n\t\t\t \" AS aux \"+\n\t\t\t \"FROM \"+dbSchema+\".plic_snapshot;\";\n\n System.out.println(query);\n\n\t\t\tStatement st = connection.createStatement();\n\t\t\tResultSet rs = st.executeQuery(query); \n\n //Imprimir los datos en el archivo\n BufferedWriter out = new BufferedWriter(new FileWriter(f));\n\t\t\twhile (rs.next()) {\n\t\t\t\tout.write(rs.getString(\"aux\")+\"\\n\");\n\t\t\t}\n out.close();\n\n //Cerrar el resultset y el statement\n rs.close();\n\t\t\tst.close();\n\n //Resultado\n return true;\n }\n catch(Exception e){\n e.printStackTrace();\n return false;}\n }", "public abstract String [] listDatabases();", "public void writeResultData() {\n\n// DatabaseLoader databaseLoader = new DatabaseLoader();\n TestResultDeployer testResultDeployer = new TestResultDeployer();\n MySqlDatabaseManager mySqlDatabaseManager;\n try {\n EnvironmentBuilder environmentBuilder = new EnvironmentBuilder();\n DashboardVariables dashboardVariables = environmentBuilder.getFrameworkSettings().getDashboardVariables();\n if (dashboardVariables.getEnableDashboard().equalsIgnoreCase(\"true\")) {\n String databaseName = dashboardVariables.getDbName();\n\n mySqlDatabaseManager = new MySqlDatabaseManager(dashboardVariables.getJdbcUrl(), dashboardVariables.\n getDbUserName(), dashboardVariables.getDbPassword());\n// databaseLoader.createDatabase();\n mySqlDatabaseManager.execute(\"INSERT INTO \" + databaseName + \".WA_BUILD_HISTORY VALUES()\");\n DirectoryScanner scan = new DirectoryScanner();\n scan.setBasedir(ProductConstant.REPORT_LOCATION + File.separator + \"reports\" + File.separator);\n String[] fileList = new String[]{\"*/testng-results.xml\"};\n scan.setIncludes(fileList);\n scan.scan();\n String[] fileset = scan.getIncludedFiles();\n for (int i = 0; i <= fileset.length - 1; i++) {\n testResultDeployer.writeResult(ProductConstant.REPORT_LOCATION + \"reports\" +\n File.separator + fileset[i]);\n log.info(fileset[i] + \" write to database\");\n }\n }\n } catch (ClassNotFoundException e) {\n log.error(e);\n } catch (SQLException e) {\n log.error(e);\n } /*catch (IOException e) {\n log.error(e);\n }*/\n }", "Downloadable export(ExportType exportType, String query, Pageable pageable);", "public static Output<GetDomainsResult> getDomains() {\n return getDomains(GetDomainsArgs.Empty, InvokeOptions.Empty);\n }", "public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {\n\t\tString \tmongoHost \t= \"localhost\";\n\t\tint \tmongoPort\t= 27017;\n\t\tString mongoDb\t\t= \"grits-net-meteor\";\n\t\tString airportsCol\t= \"airports\";\n\t\t\n\t\tList<String> countries = getUniqueCountryList(mongoHost, mongoPort, mongoDb, airportsCol );\n\t\t\n\t\tPrintWriter writer = new PrintWriter(\"./res/output.txt\", \"UTF-8\");\n\t\tfor(String country : countries) {\n\t\t\twriter.println(\" \");\n\t\t\twriter.println(\"Now analyzing country: \" + country);\n\t\t\t\n\t\t\t//Our database has a country that is \"Unknown Country\"\n\t\t\tif(!country.equals(\"Unknown Country\")) {\n\t\t\t\tCoordinates countryCenter = getCountryCenter(country);\n\t\t\t\t\n\t\t\t\tList<Airport> airports = getAirportsInCountry(mongoHost, mongoPort, mongoDb, airportsCol, country);\n\t\t\t\twriter.println(\"Number airports in country: \" + airports.size());\n\t\t\t\t\n\t\t\t\tDescriptiveStatistics stats = new DescriptiveStatistics();\n\t\t\t\tfor(Airport airport : airports){\n\t\t\t\t\tdouble lat1 = airport.getCoordinates().getLatitude();\n\t\t\t\t\tdouble lon1 = airport.getCoordinates().getLongitude();\n\t\t\t\t\tdouble lat2 = countryCenter.getLatitude();\n\t\t\t\t\tdouble lon2 = countryCenter.getLongitude();\n\t\t\t\t\tdouble distance = Haversine.haversine(lat1, lon1, lat2, lon2);\n\t\t\t\t\tstats.addValue(distance);\n\t\t\t\t}\n \n\t\t\t\t// Compute some statistics\n\t\t\t\tdouble mean = stats.getMean();\n\t\t\t\tdouble std \t= stats.getStandardDeviation();\n\t\t\t\t\n\t\t\t\t//Only remove outliers if relatively normal\n\t\t\t\tif(std > 0 && airports.size() > 5) {\n\t\t\t\t\t\n\t\t\t\t\tNormalDistribution normalDistribution = new NormalDistribution(mean, std);\n\t\t\t\t\tfor(Airport airport : airports) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tdouble lat1 = airport.getCoordinates().getLatitude();\n\t\t\t\t\t\tdouble lon1 = airport.getCoordinates().getLongitude();\n\t\t\t\t\t\tdouble lat2 = countryCenter.getLatitude();\n\t\t\t\t\t\tdouble lon2 = countryCenter.getLongitude();\n\t\t\t\t\t\tdouble distance = Haversine.haversine(lat1, lon1, lat2, lon2);\n\t\t\t\t\t\tdouble pValue = normalDistribution.cumulativeProbability(distance);\n\t\t\t\t\t\t \n\t\t\t\t\t\t//Could tighten up RIGHT HERE. TODO Add significance value maybe\n\t\t\t\t\t\tif( (pValue > 0.97) && distance > mean) \n{\n\t\t\t\t\t\t\twriter.println(\"Possible Outlier: \" + airport.getId() + \" distance to country center: \" + distance + \" pValue: \" + pValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\t\t\n\t\twriter.close();\n\t}", "protected void exportSynonymList(RepositoryItem synonymList, Locale locale) throws RepositoryException, SearchServerException {\n SolrZkClient client = getZkClient(locale);\n\n if (client != null) {\n if (isLoggingInfo()) {\n logInfo(\"Exporting synoymym list '\" + synonymList.getItemDisplayName() + \"' to ZooKeeper\");\n }\n \n \n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n PrintWriter out = new PrintWriter(byteStream);\n \n out.println(\"# This file has been auto-generated. Do not modify\");\n \n RepositoryView view = getSearchRepository().getView(SearchRepositoryItemDescriptor.SYNONYM);\n Object params[] = {new String(synonymList.getRepositoryId())};\n RepositoryItem[] synonymMappings = getSynonymRql().executeQuery(view, params);\n\n if (synonymMappings != null) {\n for (RepositoryItem synonym : synonymMappings) {\n out.println((String) synonym.getPropertyValue(SynonymProperty.MAPPING));\n }\n }\n \n out.close();\n\n String environment = \"preview\";\n\n if (getCatalogCollection().endsWith(\"Public\")) {\n environment = \"public\";\n }\n\n for (String config : Arrays.asList(getCatalogConfig(), getRulesConfig())) {\n byte[] data = byteStream.toByteArray();\n String path = new StringBuffer(\"/configs/\").append(config).append(\"/synonyms-\").append(environment).append(\"/\")\n .append(formatSynonymListFileName((String)synonymList.getPropertyValue(SynonymListProperty.FILENAME))).toString();\n\n try {\n if (!client.exists(path, true)) {\n client.makePath(path, data, CreateMode.PERSISTENT, true);\n } else {\n client.setData(path, data, true);\n }\n } catch (KeeperException ex) {\n throw create(EXPORT_SYNONYM_EXCEPTION, ex);\n } catch (InterruptedException ex) {\n throw create(EXPORT_SYNONYM_EXCEPTION, ex); \n }\n }\n }\n }", "protected URL[] getDAOJavaFiles() {\r\n\t\treturn FileUtils.getUrls(getDaoInDir(), DEFAULT_JAVA_SUFFIX,\r\n\t\t\t\tgetDAOFileNameFilter());\r\n\t}", "public static void main(String args[])\r\n {\r\n try\r\n {\r\n PrintWriter outLog = new PrintWriter(System.out);\r\n for (int i = 0; i <args.length; i++)\r\n {\r\n outLog.println(args[i]+\": generating Access Jet DDL\");\r\n in = new ObjectInputStream(new FileInputStream(args[i]));\r\n Database database = (Database)in.readObject();\r\n generate(database, \"\", outLog);\r\n }\r\n outLog.flush();\r\n }\r\n catch (Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }", "private static void loadQuads$(BulkStreamRDF dest, List<String> urls) {\n dest.startBulk();\n for ( String url : urls ) {\n loadLogger.info(\"Load: \" + url + \" -- \" + DateTimeUtils.nowAsString());\n Lang lang = RDFLanguages.filenameToLang(url, Lang.NQUADS);\n RDFParser.source(url).lang(lang).parse(dest);\n }\n dest.finishBulk();\n }", "private void loadDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Check to make sure the Bmod Database is there, if not, try \n\t\t\t\t// downloading from the website.\n\t\t\t\tif(!Files.exists(m_databaseFile))\n\t\t\t\t{\n\t\t\t\t\tFiles.createDirectories(m_databaseFile.getParent());\n\t\t\t\t\n\t\t\t\t\tbyte[] file = ExtensionPoints.readURLAsBytes(\"http://\" + Constants.API_HOST + HSQL_DATABASE_PATH);\n\t\t\t\t\tif(file.length != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t\t\t\tFiles.write(m_databaseFile, file, StandardOpenOption.CREATE, StandardOpenOption.WRITE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// make sure we have the proper scriptformat.\n\t\t\t\tsetScriptFormatCorrectly();\n\t\t\t}catch(NullPointerException|IOException ex)\n\t\t\t{\n\t\t\t\tm_logger.error(\"Could not fetch database from web.\", ex);\n\t\t\t}\n\t\t\t\n\t\n\t\t\t\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\n\t\t\n\t\t\t\n\t\t\tString db = ExtensionPoints.getBmodDirectory(\"database\").toUri().getPath();\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:file:\" + db, \"sa\", \"\");\n\t\t\t\n\t\t\t// Setup Connection\n\t\t\tCSVRecordLoader ldr = new CSVRecordLoader();\n\t\t\n\t\t\t// Load all of the building independent plugins\n\t\t\tfor(Record<?> cp : ldr.getRecordPluginManagers())\n\t\t\t{\n\t\t\t\tm_logger.debug(\"Creating table: \" + cp.getTableName());\n\t\t\t\t// Create a new table\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgetPreparedStatement(cp.getSQLTableDefn()).execute();\n\t\t\t\t} catch(SQLException ex)\n\t\t\t\t{\n\t\t\t\t\t// Table exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tm_logger.debug(\"Doing index:\" + cp.getIndexDefn());\n\t\t\t\t\tif(cp.getIndexDefn() != null)\n\t\t\t\t\t\tgetPreparedStatement(cp.getIndexDefn()).execute();\n\t\t\t\t}catch(SQLException ex)\n\t\t\t\t{\t// index exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\tif(ex instanceof DatabaseIntegrityException)\n\t\t\t\tDatabase.handleCriticalError((DatabaseIntegrityException)ex);\n\t\t\telse\n\t\t\t\tDatabase.handleCriticalError(new DatabaseIntegrityException(ex));\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n Map<String, TableInfo> map = TableContext.tables;\n for (TableInfo t : map.values()) {\n createJavaPOFile(t, new MySqlTypeConvertor());\n }\n }", "public void dumpAll() throws Exception{\n for(String key : filesmap.keySet()){\n this.write(filesmap.get(key) + DATA_EXT_NAME,key);\n }\n }", "private static void deleteDomainData(Class...domainClasses) throws ApplicationRuntimeException {\n if (domainClasses == null || domainClasses.length == 0)\n return;\n \n DomainAppTool.runSetUp(Cmd.DeleteDomainData, domainClasses);\n }", "private void createDatabase(final String databaseName) {\n\n try {\n final Connection connection =\n DriverManager.getConnection(url + databaseName, databaseProperties);\n\n try {\n NaviLogger.info(\"[i] Generating database tables for %s.\", databaseName);\n connection.prepareStatement(AbstractSQLProvider.parseResourceAsSQLFile(\n this.getClass().getResourceAsStream(TEST_DATA_DIRECTORY + \"database_schema.sql\")))\n .execute();\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n\n final File testDataDir = new File(\n \"./third_party/zynamics/javatests/com/google/security/zynamics/binnavi/testdata/\"\n + databaseName + \"/\");\n\n final CopyManager manager = new CopyManager((BaseConnection) connection);\n\n for (final File currentFile : testDataDir.listFiles()) {\n try (FileReader reader = new FileReader(currentFile)) {\n final String tableName = currentFile.getName().split(\".sql\")[0];\n NaviLogger.info(\"[i] Importing: %s.%s from %s\", databaseName, tableName,\n currentFile.getAbsolutePath());\n manager.copyIn(\"COPY \" + tableName + \" FROM STDIN\", reader);\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n }\n\n try {\n NaviLogger.warning(\"[i] Generating constraints for %s.\", databaseName);\n connection.prepareStatement(AbstractSQLProvider.parseResourceAsSQLFile(\n this.getClass().getResourceAsStream(TEST_DATA_DIRECTORY + \"database_constraints.sql\")))\n .execute();\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n\n final String findSequencesQuery = \"SELECT 'SELECT SETVAL(' ||quote_literal(S.relname)|| \"\n + \"', MAX(' ||quote_ident(C.attname)|| ') ) FROM ' ||quote_ident(T.relname)|| ';' \"\n + \" FROM pg_class AS S, pg_depend AS D, pg_class AS T, pg_attribute AS C \"\n + \" WHERE S.relkind = 'S' AND S.oid = D.objid AND D.refobjid = T.oid \"\n + \" AND D.refobjid = C.attrelid AND D.refobjsubid = C.attnum ORDER BY S.relname; \";\n\n try (PreparedStatement statement = connection.prepareStatement(findSequencesQuery);\n ResultSet resultSet = statement.executeQuery()) {\n while (resultSet.next()) {\n final PreparedStatement fixSequence = connection.prepareStatement(resultSet.getString(1));\n fixSequence.execute();\n }\n } catch (final SQLException exception) {\n CUtilityFunctions.logException(exception);\n }\n\n } catch (final SQLException exception) {\n CUtilityFunctions.logException(exception);\n }\n }", "public static void main(String[] args) throws Exception {\n\t\texport();\r\n\t}", "protected void prepare4SaveScript() {\n\t\tMigrationConfiguration cfg = getMigrationWizard().getMigrationConfig();\n\t\tcfg.cleanNoUsedConfigForStart();\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\tif (StringUtils.isNotEmpty(empId)) {\n\t\t\t\t\tfilePath += \"/\" + empId;\n\t\t\t\t}\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\tString siteName = null;\n\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(CONSOLIDATED_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\tfor (ReportResult transaction : content) {\n\t\t\t\t\t\tif (StringUtils.isEmpty(siteName) || !siteName.equalsIgnoreCase(transaction.getSiteName())) {\n\t\t\t\t\t\t\tcsvFilePrinter.printRecord(\"\");\n\t\t\t\t\t\t\tcsvFilePrinter\n\t\t\t\t\t\t\t\t\t.printRecord(\"CLIENT - \" + projName + \" SITE - \" + transaction.getSiteName());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\tlog.debug(\"Writing transaction record for site :\" + transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getLocatinName());\n\t\t\t\t\t\trecord.add(transaction.getAssignedJobCount());\n\t\t\t\t\t\trecord.add(transaction.getCompletedJobCount());\n\t\t\t\t\t\trecord.add(transaction.getOverdueJobCount());\n\t\t\t\t\t\trecord.add(transaction.getTat());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "public static void backup3(String args[]) {\n\t\tRuntime runtime = Runtime.getRuntime();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyyMMdd_HHmmss\");\n\t\tString currentTime = dateFormat.format(calendar.getTime());\n\t\tProcess p = null;\n\t\tPrintStream print = null;\n\t\tStringBuilder buf = new StringBuilder();\n\t\tfor (String a : args) {\n\t\t\tbuf.append(a);\n\t\t\tbuf.append(\" \");\n\t\t}\n\t\tString databases = buf.toString();\n\t\tSystem.out.println(databases);\n\t\ttry {\n\t\t\tp = runtime.exec(\"cmd /c mysqldump -uroot -p1234 -B \" + databases\n\t\t\t\t\t+ \">\" + currentTime + \".sql.bak\");\n\t\t} catch (IOException e) {\n\t\t\tif (p != null) {\n\t\t\t\tp.destroy();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tprint = new PrintStream(currentTime + \"_backup_err.log\");\n\t\t\t\tdateFormat.applyPattern(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\tcurrentTime = dateFormat.format(calendar.getTime());\n\t\t\t\tprint.println(currentTime + \" backup failed.\");\n\t\t\t\te.printStackTrace(print);\n\t\t\t\tprint.flush();\n\t\t\t} catch (IOException e2) {\n\n\t\t\t} finally {\n\t\t\t\tif (print != null) {\n\t\t\t\t\tprint.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n\t\t\n\t\tDatabaseExecuter adminExecuter = new DatabaseExecuterProxy(\"Admin\", \"Admin@123\");\n\t\tadminExecuter.executeDatabase(\"DELETE\");\n\t\t\n\t\tDatabaseExecuter nonAdminExecuter = new DatabaseExecuterProxy(\"NonAdmin\", \"Admin@123\");\n\t\tnonAdminExecuter.executeDatabase(\"DELETE\");\n\n\t}", "public static void main(String[] args) {\n String fileDirectoryPath = \"D:\\\\My WorkSpace\\\\New folder\\\\FBCO Worklist\";\n String[] sysEnvDetails = {\"SrcSystem\", \"SrcEnv\", \"TgtSystem\", \"TgtEnv\"};\n File dir = new File(fileDirectoryPath);\n search(\".*\\\\.sql\", dir, sysEnvDetails);\n\n }", "protected <T> void exportTable(final Class<T> c, final String[] primaryKeys, final int batchSize, final File exportFile,\n final String persistenceUnit, final boolean verifyIntegrity, final OutputFormat outputFormat) {\n boolean includeFailed = true;\n final DatabaseReader<T> dbReader = new DatabaseReader<T>(c, primaryKeys, batchSize, includeFailed, 1000, verifyIntegrity);\n\n try {\n ObjectOutputStream outputStream;\n /*\n * Using private classes for the actual export job in order to be able to reuse\n * as much of the below code as possible.\n */\n switch (outputFormat) {\n case XML:\n outputStream = new XStream().createObjectOutputStream(new FileWriter(exportFile));\n break;\n case BINARY:\n default:\n outputStream = new ObjectOutputStream(new FileOutputStream(exportFile));\n }\n while (!dbReader.isDone()) {\n final EntityManager entityManager = getEntityManager(persistenceUnit);\n final List<T> chunk = dbReader.getNextVerifiedChunk(entityManager);\n // Reduce memory footprint by killing off the database connection after each batch (slow, but necessary for large databases)\n entityManager.clear();\n entityManager.close();\n entityManagers.remove(persistenceUnit);\n entityManagerFactories.get(persistenceUnit).close();\n entityManagerFactories.remove(persistenceUnit);\n LOG.info(c.getSimpleName() + \": \" + dbReader.getTotalRowCount() + \" rows exported so far.\");\n for (T entity : chunk) {\n outputStream.writeObject(entity);\n }\n chunk.clear();\n }\n outputStream.close();\n LOG.info(c.getSimpleName() + \": \" + (dbReader.getTotalRowCount() - (includeFailed ? 0 : dbReader.getErrorCount())) + \"/\"\n + dbReader.getTotalRowCount() + \" exported.\");\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public static void main(String[] args) throws IOException, QizxException {\n int min = 0;\n int max = Integer.MAX_VALUE;\n //fichero para recoger cada script XQuery de consulta\n File scriptFile;\n //objeto file 'directorioGrupo' apuntando a la ruta del Library Group\n File directorioGrupo = new File(directorioGrupoRoot);\n // Conexión o apertura del gestor del grupo\n LibraryManager bdManager = Configuration.openLibraryGroup(directorioGrupo);\n //Conexión a la BD\n Library bd = bdManager.openLibrary(bdNombre);\n\n try {\n //Para cada script con consulta XQuery\n for (int i = 0; i < scriptNombre.length; ++i) {\n //recoge la ruta del fichero de script con consulta XQuery\n scriptFile = new File(directorioScriptsRoot + scriptNombre[i]);\n //mensaje indicando el script XQuery que se ejecutará\n System.out.println(\"Ejecutando '\" + scriptFile + \"'...\");\n\n //carga el contenido del script XQuery en una cadena\n String consultaXquery = cargaScript(scriptFile);\n //imprime la expresión de consulta XQuery\n System.out.println(\"---\\n\" + consultaXquery + \"\\n---\");\n\n //compila la consulta, almacenado resultado en expr\n Expression expr = compileExpression(bd, consultaXquery);\n //evalúa la consulta para mostrar resultados en el rango [min, max]\n evaluarExpression(expr, min, max);\n }\n } finally {\n //cierra conexión con BD\n cerrar(bd, bdManager);\n }\n }", "public static void saveDrops() {\n DropTable.serialize(file);\n }", "private static File[] listScripts(File baseDir) {\n\n return baseDir.listFiles(new FilenameFilter() {\n @Override\n public boolean accept(File dir, String name) {\n boolean hasJsonFileExtension = \"json\".equals(Files.getFileExtension(name));\n if (!(hasJsonFileExtension || new File(dir, name).isDirectory())) {\n System.err.println(\"Ignoring script \" + name + \". File name must be have .json extension.\");\n return false;\n }\n Integer index = getIndex(name);\n if (index == null) {\n System.err.println(\"Ignoring script \" + name + \". File name must start with an index number followed by an underscore and a description.\");\n return false;\n }\n return true;\n }\n });\n }" ]
[ "0.56466335", "0.5195439", "0.5152003", "0.5108896", "0.50820905", "0.49952504", "0.49498224", "0.49456307", "0.48389953", "0.48181078", "0.4713296", "0.4711531", "0.46951035", "0.46903425", "0.46823716", "0.46715692", "0.46559805", "0.4644176", "0.4625507", "0.46189585", "0.4587408", "0.4560444", "0.45497656", "0.4542638", "0.45363253", "0.45164254", "0.45100328", "0.44971216", "0.44859108", "0.4472235", "0.4470009", "0.4464117", "0.4450299", "0.44355762", "0.44273874", "0.44261107", "0.4406225", "0.44019216", "0.4400255", "0.43983433", "0.4393148", "0.43770263", "0.43739617", "0.43669927", "0.43496343", "0.4346221", "0.43442804", "0.43412268", "0.43263897", "0.43226063", "0.43209666", "0.4316007", "0.43014455", "0.42694512", "0.4266474", "0.42633158", "0.4254563", "0.42539996", "0.42450336", "0.42449677", "0.4243926", "0.42362604", "0.4222246", "0.42132", "0.4207847", "0.41977513", "0.4195358", "0.4194611", "0.4191858", "0.41863492", "0.41863367", "0.41788352", "0.41784394", "0.41615558", "0.4148971", "0.4137515", "0.41267717", "0.41252038", "0.41221726", "0.41198727", "0.41164413", "0.41148254", "0.41136009", "0.41066167", "0.4099119", "0.40978298", "0.4093084", "0.40925443", "0.40916827", "0.4085818", "0.4080377", "0.4078646", "0.40767667", "0.40757975", "0.40658388", "0.40640962", "0.40610078", "0.40595478", "0.4056511", "0.40479684" ]
0.46358737
18
/ Asginar Elementos html
public void asignarID(Object id) { propiedad temporal; for (int i = 0; i < this.listadoElementos.size(); i++) { temporal = listadoElementos.get(i); if (temporal instanceof propiedadId) { propiedadId v = (propiedadId) temporal; if (!id.toString().equalsIgnoreCase("")) { v.idElemento = id.toString(); this.listadoElementos.set(i, v); break; } } } propiedadId n =new propiedadId(id); this.listadoElementos.add(n); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HTML createHTML();", "private HTMLElement generateHTMLElement() {\n \t\t// this is the outermost element, so it has no indent\n \t\tint indentLevel = 0;\n \t\tHTMLElement html = new FormattedHTMLElement(\n \t\t\t\tIIntroHTMLConstants.ELEMENT_HTML, indentLevel, true);\n \t\tHTMLElement head = generateHeadElement(indentLevel + 1);\n \t\tHTMLElement body = generateBodyElement(indentLevel + 1);\n \t\thtml.addContent(head);\n \t\thtml.addContent(body);\n \t\treturn html;\n \t}", "public PoaMaestroMultivaloresHTML() {\n/* 253 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 255 */ buildDocument();\n/* */ }", "public String toString(){\n String html = \"<html>\\n<head>\\n</head>\\n<body>\";\n for (int i=0; i< dom.size(); i++){\n html+= dom.get(i);\n }\n /* TODO\nLoop through the elemments of the dom and append them to html */\n return html+\"</body>\\n</html>\";\n }", "public IndicadoresEficaciaHTML() {\n/* 163 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 165 */ buildDocument();\n/* */ }", "public String html() {\n\t\treturn HtmlFunction.html(this);\n\t}", "protected SafeHtml getInnerHtml() {\n return html;\n }", "String renderHTML();", "@DISPID(-2147417084)\n @PropGet\n java.lang.String outerHTML();", "public String getHtml() {\n return html;\n }", "public Element generateElement(Document dom);", "private void render(Element element) {\n main.clear();\n Widget content = createElementWidget(element);\n main.add(content);\n }", "@Override\n\tpublic void createHtml(ModelItemList list) {\n\t\t\n\t}", "public Element getElement(Document doc) {\r\n\t\t\r\n\t\tElement helicoptero = doc.createElement(\"Helicoptero\");\r\n\t\t\r\n\t\tElement atributos = doc.createElement(\"Atributos\");\r\n\t\thelicoptero.appendChild(atributos);\r\n\t\t\r\n\t\tsuper.writeElement(atributos, doc);\r\n\t\t\r\n\t\t\t\r\n\t\tElement radioGiro = doc.createElement(\"RadioGiro\");\r\n\t\tatributos.appendChild(radioGiro);\r\n\t\tradioGiro.setTextContent(String.valueOf(this.radioGiro));\r\n\t\t\r\n\t\tElement centroGiroX = doc.createElement(\"CentroGiroX\");\r\n\t\tatributos.appendChild(centroGiroX);\r\n\t\tcentroGiroX.setTextContent(String.valueOf(this.centroGiroX));\r\n\t\t\r\n\t\tElement centroGiroY = doc.createElement(\"CentroGiroY\");\r\n\t\tatributos.appendChild(centroGiroY);\r\n\t\tcentroGiroY.setTextContent(String.valueOf(this.centroGiroY));\r\n\t\t\r\n\t\tElement regresando = doc.createElement(\"Regresando\");\r\n\t\tatributos.appendChild(regresando);\r\n\t\tregresando.setTextContent(String.valueOf(this.regresando));\r\n\t\t\r\n\t\tElement entroAlCirculo = doc.createElement(\"EntroAlCirculo\");\r\n\t\tatributos.appendChild(entroAlCirculo);\r\n\t\tentroAlCirculo.setTextContent(String.valueOf(this.entroAlCirculo));\r\n\r\n\r\n\t\treturn helicoptero;\r\n\t}", "@Override\n\tpublic String generateHTML() {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tString level = \"\\t\";\n\t\tstringBuilder.append(level.repeat(levelCount)+\"<div>\\n\");\n\t\tlevelCount++;\n\t\tfor (HTMLGenerator htmlGenerator : tags) {\n\t\t\tstringBuilder.append(level.repeat(levelCount)+htmlGenerator.generateHTML());\n\t\t}\n\t\tstringBuilder.append(\"</div>\\n\");\n\t\treturn stringBuilder.toString();\n\t}", "Element getElement();", "Element createElement();", "Element() {\n\t}", "public String getHtml() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tfor(StringContainer sc : container) {\n\t\t\tsb.append(sc.getString());\n\t\t}\n\t\treturn \"<html><body>\"+sb.toString()+\"</body></html>\";\n\t}", "private DefaultHTMLs(String contents){\r\n\t\tthis.contents = contents;\r\n\t}", "public <T> String renderElementMarkup(FormElement<T> element) {\n\t\tStringBuilder sb = new StringBuilder(\"\");\n\t\tif (element.isVisible()) {\n\t\t\tsb.append(renderVisibleElement(element));\n\t\t}\n\t\treturn sb.toString();\n\t}", "public AdmClientePreferencialHTML() {\n/* 191 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 193 */ buildDocument();\n/* */ }", "@Override\n public Element createDomImpl(Renderable element) {\n Element e = Document.get().createDivElement();\n e.getStyle().setDisplay(Display.INLINE);\n // Do the things that the doodad API should be doing by default.\n DomHelper.setContentEditable(e, false, false);\n DomHelper.makeUnselectable(e);\n // ContentElement attempts this, and fails, so we have to do this ourselves.\n e.getStyle().setProperty(\"whiteSpace\", \"normal\");\n e.getStyle().setProperty(\"lineHeight\", \"normal\");\n return e;\n }", "@DISPID(-2147417086)\n @PropGet\n java.lang.String innerHTML();", "public static String getHTML() {\n if (create()) {\n return tag.getInnerHTML();\n }\n return \"\";\n }", "public String toString()\n {\n return getHtml();\n }", "public ElementoInicial() {\r\n\t\tsuper();\r\n\t}", "private void htmlStatisticsDiv() throws Exception{\n\t\tElements selectedDiv = new Elements(selectDiv());\n\t\tMap<String, Boolean> option = new HashMap<>();\n\t\toption.put(\"currency\", true);\n\t\toption.put(\"table\", true);\n\t\toption.put(\"list\", true);\n\t\toption.put(\"p\", true);\n\t\ttextStatisticsElements(selectedDiv,\"div\", option);\n\t\tcomputeElementstatistics(selectedDiv,\"div\", option);\n\t}", "private void createDOMTree(){\n\t\t\tElement rootEle = dom.createElement(\"html\");\r\n\t\t\tdom.appendChild(rootEle);\r\n\t\t\t\r\n\t\t\t//\t\t\tcreates <head> and <title> tag\r\n\t\t\tElement headEle = dom.createElement(\"head\");\r\n\t\t\tElement titleEle = dom.createElement(\"title\");\r\n\t\t\t\r\n\t\t\t//\t\t\tset value to <title> tag\r\n\t\t\tText kuerzelText = dom.createTextNode(\"Auswertung\");\r\n\t\t\ttitleEle.appendChild(kuerzelText);\r\n\t\t\theadEle.appendChild(titleEle);\r\n\t\t\t\r\n\t\t\tElement linkEle = dom.createElement(\"link\");\r\n\t\t\tlinkEle.setAttribute(\"rel\", \"stylesheet\");\r\n\t\t\tlinkEle.setAttribute(\"type\", \"text/css\");\r\n\t\t\tlinkEle.setAttribute(\"href\", \"./format.css\");\r\n\t\t\theadEle.appendChild(linkEle);\r\n\t\t\t\r\n\t\t\trootEle.appendChild(headEle);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tElement bodyEle = dom.createElement(\"body\");\r\n\t\t\tElement divEle = dom.createElement(\"div\");\r\n\t\t\tdivEle.setAttribute(\"id\", \"cont\");\r\n\t\t\t\r\n\t\t\tVector<String> tmp = myData.get(0);\r\n\t\t\tElement h2Ele = dom.createElement(\"h2\");\r\n\t\t\tString h1Str = \"\";\r\n\t\t\tfor(Iterator i = tmp.iterator(); i.hasNext(); )\r\n\t\t\t{\r\n\t\t\t\th1Str = h1Str + (String)i.next() + \" \";\r\n\t\t\t}\r\n\t\t\tText aText = dom.createTextNode(h1Str);\r\n\t\t\th2Ele.appendChild(aText);\r\n\t\t\tdivEle.appendChild(h2Ele);\r\n\t\t\tmyData.remove(0);\r\n\t\t\t\r\n\t\t\tElement tableEle = dom.createElement(\"table\");\r\n//\t\t\ttableEle.setAttribute(\"border\", \"1\");\r\n\t\t\t\r\n\t\t\ttmp = myData.get(0);\r\n\t\t\tElement trHeadEle = createTrHeadElement(tmp);\r\n\t\t\ttableEle.appendChild(trHeadEle);\r\n\t\t\tmyData.remove(0);\r\n\t\t\t\r\n\t\t\tIterator it = myData.iterator();\r\n\t\t\twhile(it.hasNext()) {\r\n\t\t\t\ttmp = (Vector<String>)it.next();\r\n\t\t\t\tElement trEle = createTrElement(tmp);\r\n\t\t\t\ttableEle.appendChild(trEle);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdivEle.appendChild(tableEle);\r\n\t\t\tbodyEle.appendChild(divEle);\r\n\t\t\trootEle.appendChild(bodyEle);\r\n\t\t\t\r\n\t\t}", "ElementText createElementText();", "private HTMLElement generateEmbeddedIntroHTML(IntroHTML element,\n \t\t\tint indentLevel) {\n \t\tHTMLElement objectElement = new FormattedHTMLElement(\n \t\t\t\tIIntroHTMLConstants.ELEMENT_OBJECT, indentLevel, true);\n \t\tobjectElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_TYPE,\n \t\t\t\tIIntroHTMLConstants.OBJECT_TYPE);\n \t\tif (element.getId() != null)\n \t\t\tobjectElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_ID,\n \t\t\t\t\telement.getId());\n \t\tif (element.getSrc() != null)\n \t\t\tobjectElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_DATA,\n \t\t\t\t\telement.getSrc());\n \t\t// The alternative content is added in case the browser can not render\n \t\t// the specified content\n \t\tif (element.getText() != null) {\n \t\t\tHTMLElement text = generateTextElement(\n \t\t\t\t\tIIntroHTMLConstants.ELEMENT_PARAGRAPH, null,\n \t\t\t\t\tIIntroHTMLConstants.SPAN_CLASS_TEXT, element.getText(),\n \t\t\t\t\tindentLevel);\n \t\t\tif (text != null)\n \t\t\t\tobjectElement.addContent(text);\n \t\t}\n \t\tif (element.getIntroImage() != null) {\n \t\t\tHTMLElement img = generateIntroImage(element.getIntroImage(),\n \t\t\t\t\tindentLevel);\n \t\t\tif (img != null)\n \t\t\t\tobjectElement.addContent(img);\n \t\t}\n \t\treturn objectElement;\n \t}", "public HTMLDivElement getElementDivCreacionRegistro() { return this.$element_DivCreacionRegistro; }", "@GET\r\n @Produces(\"text/html\")\r\n public String getHtml() {\r\n return \"<html><body>the solution is :</body></html> \";\r\n }", "public HTMLDivElement getElementDivEdicion() { return this.$element_DivEdicion; }", "private HTMLElement generateInlineIntroHTML(IntroHTML element,\n \t\t\tint indentLevel) {\n \t\tStringBuffer content = readFromFile(element.getSrc());\n \t\tif (content != null && content.length() > 0) {\n \t\t\t// Create the outer div element\n \t\t\tHTMLElement divElement = generateDivElement(element.getId(),\n \t\t\t\t\tIIntroHTMLConstants.DIV_CLASS_INLINE_HTML, indentLevel);\n \t\t\t// add the content of the specified file into the div element\n \t\t\tdivElement.addContent(content);\n \t\t\treturn divElement;\n \t\t}\n \t\treturn null;\n \t}", "public String createHtml()\n {\n StringBuffer strEditor = new StringBuffer();\n\n strEditor.append(\"<div>\");\n String encodedValue = escapeXml(value.replaceAll(\"((\\r?\\n)+|\\t*)\", \"\"));\n\n if (check(request.getHeader(\"user-agent\")))\n {\n strEditor.append(createInputForVariable(instanceName, instanceName, encodedValue));\n // create config html\n String configStr = config.getUrlParams();\n if (configStr != null && configStr.length() > 0)\n {\n configStr = configStr.substring(1);\n strEditor.append(createInputForVariable(null, instanceName.concat(\"___Config\"), configStr));\n }\n\n // create IFrame\n String sLink = basePath.concat(\"/editor/fckeditor.html?InstanceName=\").concat(instanceName);\n if (toolbarSet != null && toolbarSet.length() > 0)\n {\n sLink += \"&Toolbar=\".concat(toolbarSet);\n }\n XHtmlTagTool iframeTag = new XHtmlTagTool(\"iframe\", XHtmlTagTool.SPACE);\n iframeTag.addAttribute(\"id\", instanceName.concat(\"___Frame\"));\n iframeTag.addAttribute(\"src\", sLink);\n iframeTag.addAttribute(\"width\", width);\n iframeTag.addAttribute(\"height\", height);\n iframeTag.addAttribute(\"frameborder\", \"no\");\n iframeTag.addAttribute(\"scrolling\", \"no\");\n strEditor.append(iframeTag);\n\n }\n else\n {\n XHtmlTagTool textareaTag = new XHtmlTagTool(\"textarea\", encodedValue);\n textareaTag.addAttribute(\"name\", instanceName);\n textareaTag.addAttribute(\"rows\", \"4\");\n textareaTag.addAttribute(\"cols\", \"40\");\n textareaTag.addAttribute(\"wrap\", \"virtual\");\n textareaTag.addAttribute(\"style\", \"width: \".concat(width).concat(\"; height: \").concat(height));\n }\n strEditor.append(\"</div>\");\n return strEditor.toString();\n }", "public ContainerTag generateBody(List<HtmlData> data) {\n return div();\n }", "public String getHTMLPage() {\r\n String s = \"<html><body>\" + MySystem.lineBreak;\r\n s += \"<h1>Room Control module</h1>\" + MySystem.lineBreak;\r\n s += \"<p>This module controls any on/off-node connected to ARNE bus.</p>\" + MySystem.lineBreak;\r\n s += \"<h2>Controls:</h2>\";\r\n s += \"<center><p><table border=\\\"1\\\" cellpadding=\\\"3\\\" cellspacing=\\\"0\\\">\";\r\n Iterator it = roomObjects.keySet().iterator();\r\n while (it.hasNext()) {\r\n GenRoomObject o = (GenRoomObject)roomObjects.get(it.next());\r\n if (o!=null) {\r\n if (o.displHTML) { //if display this object (configured in modGenRoomControl.xml)\r\n s += \"<tr><td>\" + o.name + \"</td><td>[<a href=\\\"toggle:\" + o.name + \"\\\">toggle</a>]</td><td>[<a href=\\\"on:\" + o.name + \"\\\">ON</a>]</td><td>[<a href=\\\"off:\" + o.name + \"\\\">OFF</a>]</td></tr></tr>\";\r\n }\r\n }\r\n }\r\n s += \"</table></center>\";\r\n s += \"</body></html>\";\r\n return s;\r\n }", "private void dibujar() {\n\n\t\tdiv.setWidth(\"99%\");\n\t\tdiv.setHeight(\"99%\");\n\t\treporte.setWidth(\"99%\");\n\t\treporte.setHeight(\"99%\");\n\t\treporte.setType(type);\n\t\treporte.setSrc(url);\n\t\treporte.setParameters(parametros);\n\t\treporte.setDatasource(dataSource);\n\n\t\tdiv.appendChild(reporte);\n\n\t\tthis.appendChild(div);\n\n\t}", "public <T> String renderElement(FormElement<T> element) {\n\t\tString markup = renderMarkupElementPlaceholder(element, renderElementMarkup(element));\n\t\tif (element instanceof FormField<?>) {\n\t\t\tFormField<?> field = (FormField<?>)element;\n\t\t\tif (!Field.HIDDEN.getType().equals(field.getType())) {\n\t\t\t\tmarkup = renderMarkupFormGroup(field, markup);\n\t\t\t}\n\t\t}\n\t\treturn markup;\n\t}", "public static native String markup(DomConfig config)/*-{\r\n\t\tvar configJS = [email protected]::getJsObject()();\r\n\t\treturn $wnd.Ext.DomHelper.markup(elem);\r\n\t}-*/;", "String getElement();", "public HTMLDivElement getElementDivConsulta() { return this.$element_DivConsulta; }", "public HTMLDivElement getElementDivConsulta() { return this.$element_DivConsulta; }", "private HTMLElement generateIntroHTML(IntroHTML element, int indentLevel) {\n \t\tif (element.isInlined())\n \t\t\treturn generateInlineIntroHTML(element, indentLevel);\n \t\telse\n \t\t\treturn generateEmbeddedIntroHTML(element, indentLevel);\n \t}", "@Override\n\tpublic void visitTag(Tag tag){\n\t\t\n if (tag instanceof Div) { \n Div div = (Div) tag; \n String attr = div.getAttribute(\"class\"); //detailed_rig\n //System.out.println(\"attr:\" + attr);\n if(\"detailed_rig\".equals(attr)){ //小区div\n \t\n \t//System.out.println(\"=========================\"+div.toHtml());\n \tSpanVisitor sv = new SpanVisitor();\n \t//LinkVisitor lv = new LinkVisitor();\n \t//div.accept(lv);\n \t//link = lv.getLink();\n \tdiv.accept(sv);\n \tCommunity com = new Community(sv.getName(), sv.getLink()+\"esf/\", sv.getPrice());\n \tcommunityList.add(com);\n// \tSystem.out.println(\"name:\"+name +\" price:\"+price + \" link:\"+link);\n }\n if(\"fanye\".equals(attr)){\n \tNextPageVisitor np = new NextPageVisitor();\n \tdiv.accept(np);\n \tnextPageLink =np.getLink();\n \t//System.out.println(\"link:\" +np.getLink() );\n }\n //line = textnode.toPlainTextString().trim(); \n //line = textnode.getText(); \n } \t\t\n\t}", "protected abstract void renderControlOn(KmHtmlBuilder out);", "HtmlPackage getHtmlPackage();", "public abstract Element getDescription();", "String getElem();", "private String generateHtmlLayout(String title, List<HtmlData> data) {\n return html(\n head(\n title(title),\n link().withRel(\"stylesheet\").withHref(\"asciidoctor.css\")\n ),\n body(\n generateHeader(title),\n generateBody(data)\n )\n ).withStyle(\"padding: 10px 30px\").renderFormatted();\n }", "public String create()\n {\n return createHtml();\n }", "Elem getElem();", "HTMLElement createHTMLElement();", "UmlElement getUmlElement();", "@CssSelector(\"${williamsSProducts}\")\n\tpublic AspireWebElements williamsSProducts();", "public <T> String renderVisibleElement(FormElement<T> element) {\n\t\tString html = null;\n\t\tif (element instanceof FormMapping) {\n\t\t\thtml = renderVisibleMapping((FormMapping<?>)element);\n\t\t} else if (element instanceof FormField) {\n\t\t\thtml = renderVisibleField((FormField<?>)element);\n\t\t} else if (element != null) {\n\t\t\tthrow new UnsupportedOperationException(\"Unsupported element \" + element.getClass().getName());\n\t\t}\n\t\treturn html;\n\t}", "public PoaMaestroMultivaloresHTML(PoaMaestroMultivaloresHTML src) {\n/* 271 */ this.fDocumentLoader = src.getDocumentLoader();\n/* */ \n/* 273 */ setDocument((Document)src.getDocument().cloneNode(true), src.getMIMEType(), src.getEncoding());\n/* */ \n/* 275 */ syncAccessMethods();\n/* */ }", "public void setHTML(String html);", "Element toXML();", "public IndicadoresEficaciaHTML(IndicadoresEficaciaHTML src) {\n/* 181 */ this.fDocumentLoader = src.getDocumentLoader();\n/* */ \n/* 183 */ setDocument((Document)src.getDocument().cloneNode(true), src.getMIMEType(), src.getEncoding());\n/* */ \n/* 185 */ syncAccessMethods();\n/* */ }", "public native final String html()/*-{\n\t\treturn this.html();\n\t}-*/;", "@Override\n\tprotected abstract OpenableElementInfo createElementInfo();", "protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}", "public HomePageHelper writeTextOfButtons(){\n System.out.println (\"Quantity of elements: \" + languagesButtons.size());\n for(WebElement el : languagesButtons){\n System.out.println(\"Tag Name: \" + el.getTagName());\n System.out.println(\"attr: ng-click - \" + el.getAttribute(\"ng-click\"));\n }\n return this;\n }", "ViewElement getViewElement();", "private DOMs() {\n }", "private void commonLoadTestForHtml(){\n\t\tWebElement tree = getElement(\"id=tree\");\n\t\tlog(\"Found Element for id=tree \" + tree.toString());\n\n\t\t//Make sure News attributes are correct\n\t\tWebElement news = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#news']['title']\\\"}\");\n\t\tAssert.assertNotNull(news);\n\t\tnews.click();\n\n\t\tString content = getText(RESULTS_CONTAINER);\n\t\tlog(\"content\"+content);\n waitForText(RESULTS_CONTAINER, \"id=news\");\n\n\n\t\t// Finds the blogs node and make sure its not null\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\t\tWebElement blogs = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\n\t\tlog(\"Node: \" + blogs);\n\n\t\tAssert.assertNotNull(blogs);\n\n\t\tblogs.click(); // This should expand the node blogs\n\n\t\t//Find the children of blogs node: Today\n\t\tWebElement today = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#today']['title']\\\"}\");\n\n\t\t//Find the children of blogs node: Previous\n\t\tWebElement previous = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['title']\\\"}\");\n\n\t\tWebElement previousDiscIcon = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['disclosure']\\\"}\");\n\n\t\tAssert.assertNotNull(previousDiscIcon);\n\n\t\t//Click on Previous Node\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['disclosure']\\\"}\");\n\t\tpreviousDiscIcon.click();\n\n\t\t//Find the children of previous node: Yesterday\n\t\tWebElement yesterday = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#yesterday']['title']\\\"}\");\n\n\t\t//Find the children of previous node: 2DaysBack\n\t\tWebElement twodaysback = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#daysback2']['title']\\\"}\");\n\n\n\n\n\t}", "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 URL getHtmlDescription();", "public void run() {\n\t\t\t\tVerticalPanel panelCompteRendu = new VerticalPanel();\r\n\t\t\t\thtmlCompteRendu = new HTML();\r\n\t\t\t\tpanelCompteRendu.add(htmlCompteRendu);\r\n\t\t\t\tRootPanel.get(\"compteRendu\").add(panelCompteRendu);\r\n\t\t\t\t\r\n\t\t\t\tVerticalPanel panelLegende = new VerticalPanel();\r\n\t\t\t\thtmlLegende = new HTML();\r\n\t\t\t\tpanelLegende.add(htmlLegende);\r\n\t\t\t\tRootPanel.get(\"legende\").add(htmlLegende);\r\n\t\t\t\t\r\n\t\t\t\t// temps d'intˇgration restant\r\n\t\t\t\tLabel tempsDIntegrationRestant = new Label();\r\n\t\t\t\tRootPanel.get(\"tempsDIntegrationRestant\").add(tempsDIntegrationRestant);\r\n\t\t\t\t\r\n\t\t\t\t// ajout de la carte\r\n\t\t\t\twMap = new MapFaWidget2(htmlCompteRendu);\r\n\t\t\t\tRootPanel.get(\"carte\").add(wMap);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// ajout du bouton reset\r\n\t\t\t\tButton boutonReset = new Button(\"Nettoyer la carte\");\r\n\t\t\t\tboutonReset.addClickHandler(actionBoutonReset());\r\n\t\t\t\tRootPanel.get(\"boutonReset\").add(boutonReset);\r\n\r\n\t\t\t\t// ajout du formulaire d'intˇgration\r\n\t\t\t\tnew FileUploadView(wMap,htmlLegende, htmlCompteRendu,tempsDIntegrationRestant);\r\n\r\n\t\t\t}", "public WebElement apply(WebDriver driver ) {\n return driver.findElement(By.xpath(\"/html/body/div[1]/section/div[2]/div/div[1]/div/div[1]/div/div/div/div[2]/div[2]/div/div/div/div/div[1]/div/div/a/i\"));\n }", "public abstract String visualizar();", "public void elementView() {\n\t\tsetTitle(\"Envío de E-mail\");\n\t\tsetLocation(370, 150);\n\t\tsetBounds(100, 100, 600, 400);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(UIManager.getColor(\"TextField.selectionBackground\"));\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\tcontentPane.setLayout(null);\n\t\tJLabel lblNewLabel = new JLabel(model.getNameTags().get(0));\n\t\tlblNewLabel.setBounds(10, 11, 66, 14);\n\t\tcontentPane.add(lblNewLabel);\n\t\t\n\t\tto = new JTextField();\n\t\tto.setBounds(86, 8, 488, 20);\n\t\tcontentPane.add(to);\n\t\tto.setColumns(10);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(model.getNameTags().get(1));\n\t\tlblNewLabel_1.setBounds(10, 45, 66, 14);\n\t\tcontentPane.add(lblNewLabel_1);\n\t\t\n\t\tsubject = new JTextField();\n\t\tsubject.setBounds(86, 42, 488, 20);\n\t\tcontentPane.add(subject);\n\t\tsubject.setColumns(10);\n\t\t\n\t\tsend = new JButton(model.getNameButtons().get(0));\n\t\tsend.setBounds(10, 327, 89, 23);\n\t\tcontentPane.add(send);\n\t\t\n\t\tcloseProgram = new JButton(model.getNameButtons().get(1));\n\t\tcloseProgram.setBounds(213, 327, 150, 23);\n\t\tcontentPane.add(closeProgram);\n\t\t\n\t\tclearBox = new JButton(model.getNameButtons().get(2));\n\t\tclearBox.setBounds(424, 327, 150, 23);\n\t\tcontentPane.add(clearBox);\n\t\t\n\t\tscrollPane = new JScrollPane();\n\t\tscrollPane.setBounds(10, 100, 564, 203);\n\t\tcontentPane.add(scrollPane);\n\t\t\n\t\tmessage = new JTextArea();\n\t\tscrollPane.setViewportView(message);\n\t}", "public static String getElementText(Element e) {\n\t\tString text = e.getText();\n\t\tfor (int i = 1; i < 10; i++) {\n\t\t\tString n = Integer.toString(i);\n\t\t\tString link = e.attributeValue(\"link\" + n);\n\t\t\tString url = e.attributeValue(\"url\" + n);\n\t\t\tString style = e.attributeValue(\"style\" + n);\n\n\t\t\tif (link == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttext = applyMarkup(text, link, url, style);\n\t\t}\n\t\treturn text;\n\t}", "protected GuiTestObject html_main() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"html_main\"));\n\t}", "@DISPID(-2147417084)\n @PropPut\n void outerHTML(\n java.lang.String rhs);", "public static String getArticleHtml(Document document) {\n Elements article = document.select(\".widget.widget-richtext.6 .text\").first().children();\n return article.toString();\n }", "protected String exportElements() {\n\t\treturn \"\";\n\t}", "public HTMLDivElement getElementDivResultados() { return this.$element_DivResultados; }", "protected String getReferenceNameElement(WebElement elemento) {\n \tField[] fields = (Field[]) ArrayUtils.addAll(\n \t\t\tgetClass().getSuperclass().getDeclaredFields(),\n getClass().getDeclaredFields());\n \t\n \tfor (Field field : fields) {\n \tif(field.getType().getName().toLowerCase().contains(\"menu\")) {\n \t\tfor (Field fieldMenu: field.getType().getDeclaredFields()) {\n if (fieldMenu.getType().getName().toString().contains(\"pageObject\")) {\n \tfields = (Field[]) ArrayUtils.add(fields,fieldMenu);\n }\t\t\t\t\t\n\t\t\t\t}\t\n \t}\n\t\t}\n \treturn \"<b>\" + getFieldFinder(fields, elemento) + \"</b>\";\n }", "Object element();", "Object element();", "public Element getElement() {\n return super.getElement();\n }", "public String getTagName() {\n return \"element\";\n }", "@Override\n\tpublic String toString()\n\t{\n\t\t//Builds the html looking string.\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"<\").append(type.toString().toLowerCase());\n\t\tfor(Entry<String, String> attrEntry : attributes.entrySet())\n\t\t{\n\t\t\tbuilder.append(\" \")\n\t\t\t\t.append(attrEntry.getKey())\n\t\t\t\t.append(\"=\")\n\t\t\t\t.append(attrEntry.getValue());\n\t\t}\n\t\tbuilder.append(\">\");\n\t\tif(getText() != null)\n\t\t{\n\t\t\tbuilder.append(\"\\n\").append(getText()).append(\"\\n\");\n\t\t}\n\t\t//Append each of the children.\n\t\tfor(HtmlTag child : getChildren())\n\t\t{\n\t\t\tbuilder.append(child.toString().replaceAll(\"(?m)^\", \" \"));\n\t\t}\n\t\t//Append the closing tag.\n\t\tbuilder.append(\"\\n</\").append(type.toString().toLowerCase()).append(\">\");\n\t\treturn builder.toString();\n\t}", "public WebElement() {}", "private String getReleaseNotesHtml() {\r\n\t\tString pkgName = _act.getPackageName();\r\n\t\tResources res = _act.getResources();\r\n\t\tint resId = res.getIdentifier(releaseNotesXml, \"xml\", pkgName);\r\n\t\tXmlResourceParser parser = res.getXml(resId);\r\n\r\n\t\tString html = \"<html><head>\" + css + \"</head><body>\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint eventType = parser.getEventType();\r\n\t\t\twhile (eventType != XmlPullParser.END_DOCUMENT) {\r\n\t\t\t\tif ((eventType == XmlPullParser.START_TAG) && (parser.getName().equals(\"release\"))){\r\n\t\t\t\t\thtml = html + parseReleaseNotesXML(parser);\r\n\t\t\t\t}\r\n\t\t\t\teventType = parser.next();\r\n\t\t\t}\r\n\t\t} \r\n\t\tcatch (XmlPullParserException e)\r\n\t\t{\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tparser.close();\r\n\t\t}\r\n\t\thtml = html + \"</body></html>\";\r\n\t\treturn html;\r\n\t}", "@Override\n\tpublic void outputHtml(ModelItemList list) {\n\t\t\n\t}", "public void update(){\n\t\tresponse = buildHtml(new ArrayList<HtmlElement>(elements));\n\t}", "private String getHtmlWithInjectedAttributes(String html) {\n StringBuilder jsAttributes = new StringBuilder();\n jsAttributes.append(getHtmlAttr(OPTION_ASYNC, async));\n jsAttributes.append(getHtmlAttr(OPTION_DEFER, defer));\n jsAttributes.append(getHtmlAttr(OPTION_CROSSORIGIN, crossorigin));\n jsAttributes.append(getHtmlAttr(OPTION_ONLOAD, onload));\n StringBuilder cssAttributes = new StringBuilder();\n cssAttributes.append(getHtmlAttr(OPTION_MEDIA, media));\n String updatedHtml = StringUtils.replace(html,\"<script \", \"<script \" + jsAttributes.toString());\n return StringUtils.replace(updatedHtml,\"<link \", \"<link \" + cssAttributes.toString());\n }", "public static String saveDomToString(Document doc, String encoding, boolean bIndent,String output)\n throws Exception {\n if (doc == null) {\n throw (new Exception(\"No_dom_to_save\"));\n }\n // find out how we should form output\n // make sure we have some encoding\n if (encoding == null) {\n encoding = doc.getXmlEncoding();\n }\n if (encoding == null) {\n encoding = default_encoding;\n }\n\n try {\n DOMSource xmlDomSource = new DOMSource(doc);\n\n // make an identity transformation\n TransformerFactory transFac = TransformerFactory.newInstance();\n Transformer trans = transFac.newTransformer();\n // set transformatoion properties\n // this is an identity transformation\n // and no properties are set exept defaults\n\n //NOTE: we have a problem with HTML5 which wants a simple header: \n // <!DOCTYPE HTML>\n // we assume that the template is set accordingly\n // This will not give us PublicID and SystemID as null\n // we will have to detect this situastion before we return\n // the text, see below, after transformation\n\n // problem:\n // this will kill other transformed input that make html root\n // use explicit: html5 output option ? (yes)\n\n DocumentType dt = doc.getDoctype();\n String pid = null;\n String sid = null;\n String name = null;\n if (dt != null) {\n pid = dt.getPublicId();\n sid = dt.getSystemId();\n name = dt.getName();\n }\n\n boolean is_HTML5 = false;\n output=output.toLowerCase();\n switch(output){\n case Options.TEXT:\n trans.setOutputProperty(OutputKeys.MEDIA_TYPE, \"text/plain; charset=\" + encoding);\n break;\n \n case Options.XML:\n trans.setOutputProperty(OutputKeys.METHOD, Options.XML);\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n if (pid != null) {\n trans.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, pid);\n }\n if (sid != null) {\n trans.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, sid);\n }\n break;\n \n case Options.XHTML:\n trans.setOutputProperty(OutputKeys.METHOD, Options.XML);\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\");\n if (pid != null) {\n trans.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, pid);\n }\n if (sid != null) {\n trans.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, sid);\n }\n break;\n \n case Options.HTML5:\n case Options.HTML:\n trans.setOutputProperty(OutputKeys.METHOD, Options.XML);\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\");\n is_HTML5 = true;\n break;\n \n default:\n throw new Exception(\"bad output type: \" + output);\n }\n \n\n trans.setOutputProperty(OutputKeys.STANDALONE, \"yes\");\n trans.setOutputProperty(OutputKeys.ENCODING, encoding);\n\n if (bIndent) {\n trans.setOutputProperty(OutputKeys.INDENT, \"yes\");\n trans.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"0\");\n } else {\n // use no to avoid prince-problems with toc targets ?????\n trans.setOutputProperty(OutputKeys.INDENT, \"no\");\n }\n\n java.io.StringWriter out = new java.io.StringWriter();\n java.io.BufferedWriter bos = new java.io.BufferedWriter(out);\n StreamResult outStream = new StreamResult(bos);\n trans.transform(xmlDomSource, outStream);\n bos.flush();\n\n // this is where we can clean up a doctype\n // prepared for html 5\n\n String result = out.toString().trim();\n if (is_HTML5 && ( (result.startsWith(\"<html\")) \n || (result.startsWith(\"<HTML\")))) {\n result = \"<!DOCTYPE HTML>\\n\" + result;\n }\n\n return result;\n } catch (java.io.UnsupportedEncodingException ex) {\n System.out.println(\"domer:saveDomToString. \" + ex.getMessage());\n throw new Exception(ex.getMessage());\n } catch (TransformerConfigurationException tce) {\n System.out.println(\"domer:saveDomToString. \" + tce.getMessage());\n throw new Exception(tce.getMessage());\n } catch (TransformerException te) {\n System.out.println(\"domer:saveDomToString. \" + te.getMessage());\n throw new Exception(te.getMessage());\n } catch (FactoryConfigurationError f) {\n System.out.println(\"domer:saveDomToString. \" + f.getMessage());\n throw new Exception(f.getMessage());\n } catch (IllegalArgumentException iae) {\n System.out.println(\"domer:saveDomToString. \" + iae.getMessage());\n throw new Exception(iae.getMessage());\n } catch (Exception e) {\n System.out.println(\"domer:saveDomToString. \" + e.getMessage());\n throw new Exception(e.getMessage());\n }\n }", "public void buildDocument() {\n/* 220 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 222 */ syncAccessMethods();\n/* */ }", "public PoaMaestroMultivaloresHTML(boolean buildDOM) { this(StandardDocumentLoader.getInstance(), buildDOM); }", "private StringBuilder createHtml(Match match)\r\n {\r\n\r\n MatchEquipe bleu = match.getBleu();\r\n MatchEquipe gris = match.getGris();\r\n MatchEquipe noir = match.getNoir();\r\n\r\n StringBuilder html = new StringBuilder();\r\n\r\n html.append(\"<input id=\\\"buttonMatch\" + match.getIdMatch() + \"\\\" src=\\\" \" + PLUS_SRC\r\n + \"\\\" type=\\\"image\\\" onclick=\\\"toggleVisibility('Match\" + match.getIdMatch() + \"');\\\">\" + RN);\r\n\r\n html.append(\"<div id=\\\"Match\" + match.getIdMatch() + \"Plus\\\" style=\\\"visibility: visible; display: block;\\\">\"\r\n + RN);\r\n html.append(\"D�tail du match<br><br>\" + RN);\r\n html.append(\"<table class=\\\"tableau_match\\\" cellspacing=\\\"0\\\">\" + RN);\r\n html.append(\"<tbody><tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Match #\" + match.getIdMatch() + \"</td>\" + RN);\r\n\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"bleu\\\">\" + bleu.getNomEquipe() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"gris\\\">\" + gris.getNomEquipe() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"noir\\\">\" + noir.getNomEquipe() + \"</td>\" + RN);\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">P�riodes gagn�es</td>\" + RN);\r\n\r\n if(!bleu.isForfait())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + bleu.getNbPeriode() + \"</td>\" + RN);\r\n }\r\n else\r\n {\r\n html.append(\"<td colspan=\\\"7\\\"> Forfait </td>\" + RN);\r\n }\r\n\r\n if(!gris.isForfait())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + gris.getNbPeriode() + \"</td>\" + RN);\r\n }\r\n else\r\n {\r\n html.append(\"<td colspan=\\\"7\\\"> Forfait </td>\" + RN);\r\n }\r\n\r\n if(!noir.isForfait())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + noir.getNbPeriode() + \"</td>\" + RN);\r\n }\r\n else\r\n {\r\n html.append(\"<td colspan=\\\"7\\\"> Forfait </td>\" + RN);\r\n }\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"</tbody></table>\" + RN);\r\n html.append(\"</div>\" + RN);\r\n\r\n html.append(\"<div id=\\\"Match\" + match.getIdMatch() + \"Moins\\\" style=\\\"display: none;\\\">\" + RN);\r\n\r\n html.append(\"Réduire le détail du match\" + RN);\r\n html.append(\"<br><br>\" + RN);\r\n\r\n html.append(\"<table class=\\\"tableau_match\\\" cellspacing=\\\"0\\\">\" + RN);\r\n html.append(\"<tbody><tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\"> Match #\" + idMatch.getText() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"bleu\\\">\" + equipeBleu.getText() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"gris\\\">\" + equipeGris.getText() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"noir\\\">\" + equipeNoir.getText() + \"</td>\" + RN);\r\n html.append(\"</tr> \" + RN);\r\n html.append(\"<tr> \" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">P�riode</td>\" + RN);\r\n\r\n if(forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td class=\\\"p1\\\" rowspan=\\\"7\\\" colspan=\\\"7\\\">Forfait</td>\" + RN);\r\n }\r\n\r\n if(forfaitGris.isSelected())\r\n {\r\n html.append(\"<td class=\\\"p1\\\" rowspan=\\\"7\\\" colspan=\\\"7\\\">Forfait</td>\" + RN);\r\n }\r\n\r\n if(forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td class=\\\"p1\\\" rowspan=\\\"7\\\" colspan=\\\"7\\\">Forfait</td>\" + RN);\r\n }\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td>1</td>\" + RN);\r\n html.append(\"<td>2</td>\" + RN);\r\n html.append(\"<td>3</td>\" + RN);\r\n html.append(\"<td>4</td>\" + RN);\r\n html.append(\"<td>5</td>\" + RN);\r\n html.append(\"<td>6</td>\" + RN);\r\n html.append(\"<td>7</td>\" + RN);\r\n }\r\n\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td>1</td>\" + RN);\r\n html.append(\"<td>2</td>\" + RN);\r\n html.append(\"<td>3</td>\" + RN);\r\n html.append(\"<td>4</td>\" + RN);\r\n html.append(\"<td>5</td>\" + RN);\r\n html.append(\"<td>6</td>\" + RN);\r\n html.append(\"<td>7</td>\" + RN);\r\n }\r\n\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td>1</td>\" + RN);\r\n html.append(\"<td>2</td>\" + RN);\r\n html.append(\"<td>3</td>\" + RN);\r\n html.append(\"<td>4</td>\" + RN);\r\n html.append(\"<td>5</td>\" + RN);\r\n html.append(\"<td>6</td>\" + RN);\r\n html.append(\"<td>7</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Pointage</td>\" + RN);\r\n\r\n // p�riodes Bleu\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td>\" + P1B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P2B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P3B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P4B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P5B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P6B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P7B.getText() + \"</td>\" + RN);\r\n }\r\n\r\n // P�riode Gris\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td>\" + P1G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P2G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P3G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P4G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P5G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P6G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P7G.getText() + \"</td>\" + RN);\r\n }\r\n\r\n // P�riode noir\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td>\" + P1N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P2N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P3N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P4N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P5N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P6N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P7N.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Prolongation 1</td>\" + RN);\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td>\" + prol1B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol2B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol3B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol4B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol5B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol6B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol7B.getText() + \"</td>\" + RN);\r\n }\r\n\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td>\" + prol1G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol2G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol3G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol4G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol5G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol6G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol7G.getText() + \"</td>\" + RN);\r\n }\r\n\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td>\" + prol1N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol2N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol3N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol4N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol5N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol6N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol7N.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">P�riodes gagn�es</td>\" + RN);\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + periodeGagneeBleu.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + periodeGagneeGris.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + periodeGagneeNoir.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Prolongation 2�me position</td>\" + RN);\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + prol22B.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + prol22G.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + prol22N.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Esprit sportif</td>\" + RN);\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + espritSportifBleu.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + espritSportifGris.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + espritSportifNoir.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Points championnats</td>\" + RN);\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + pointBleu.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + pointGris.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + pointNoir.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\" </tr>\" + RN);\r\n html.append(\"</tbody>\" + RN);\r\n html.append(\"</table>\" + RN);\r\n\r\n html.append(\"<strong>Arbitres</strong> : \" + arbitreChef.getText() + \" & \" + arbitreAdjoint.getText() + RN);\r\n\r\n return html.append(\"</div>\" + RN);\r\n }", "@Override\n\tpublic Html makeHtml(Map<String, String> attributes, Head headObj, Body bodyObj) {\n\t\treturn new Html( attributes, headObj, bodyObj );\n\t}", "public String getHtmlRepresentation() {\n\t\treturn getHtmlRepresentation(constraintSets);\n\t}", "public AdmClientePreferencialHTML(boolean buildDOM) { this(StandardDocumentLoader.getInstance(), buildDOM); }", "public interface GroupFour extends DomElement {\n\n /**\n * Gets constructor.\n *\n * @return the constructor\n */\n @SubTag(\"constructor\")\n Constructor getConstructor();\n\n /**\n * Gets ids.\n *\n * @return the ids\n */\n @SubTagList(\"id\")\n List<Id> getIds();\n\n /**\n * Gets results.\n *\n * @return the results\n */\n @SubTagList(\"result\")\n List<Result> getResults();\n\n /**\n * Gets associations.\n *\n * @return the associations\n */\n @SubTagList(\"association\")\n List<Association> getAssociations();\n\n /**\n * Gets collections.\n *\n * @return the collections\n */\n @SubTagList(\"collection\")\n List<Collection> getCollections();\n\n /**\n * Gets discriminator.\n *\n * @return the discriminator\n */\n @SubTag(\"discriminator\")\n Discriminator getDiscriminator();\n}", "public void buildDocument() {\n/* 310 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 312 */ syncAccessMethods();\n/* */ }", "public HTMLScreenFragment() {}" ]
[ "0.65762967", "0.6249598", "0.6137576", "0.6119031", "0.6059459", "0.60150534", "0.5995912", "0.5942424", "0.5901615", "0.5800099", "0.57988745", "0.5765785", "0.5749955", "0.5724951", "0.5677983", "0.56441015", "0.56133014", "0.560796", "0.5592005", "0.5567573", "0.5561017", "0.5551416", "0.55334526", "0.55320424", "0.54486084", "0.54366887", "0.5416634", "0.5410851", "0.54107416", "0.54096043", "0.53976166", "0.5394583", "0.53914833", "0.53812057", "0.5379786", "0.53789663", "0.53788155", "0.5376868", "0.5369804", "0.53559166", "0.53555256", "0.53361744", "0.5332576", "0.5332576", "0.5324075", "0.5320325", "0.5318316", "0.5311123", "0.52991813", "0.52942985", "0.5292228", "0.5285787", "0.5285652", "0.5282602", "0.5276269", "0.5265231", "0.5248151", "0.52450794", "0.52442545", "0.5232363", "0.52261233", "0.5225039", "0.5222851", "0.52217615", "0.5220971", "0.5220295", "0.5215649", "0.52153367", "0.5212047", "0.5206453", "0.5199431", "0.5188877", "0.5188131", "0.5177896", "0.51755625", "0.51748097", "0.51701504", "0.51694304", "0.51657975", "0.5161413", "0.51600367", "0.5157199", "0.5157199", "0.5156616", "0.515165", "0.5151082", "0.51473355", "0.513948", "0.5127404", "0.51049995", "0.51030064", "0.5098957", "0.5098544", "0.50984037", "0.5093452", "0.50925714", "0.50909185", "0.5088239", "0.50879055", "0.5080148", "0.5078218" ]
0.0
-1
display transaction context message
protected abstract String transactionContextMessage();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void printTransdetails() {\n\t\t\r\n\t}", "String showPreparedTransactions();", "public void printCurrentTransaction() {\n\t\tregister[registerSelected].printCurrentTransaction();\n\t}", "public void printTransaction() {\n\t\tdao.printTransaction();\r\n\t\t\r\n\t}", "public String reportTransaction() {\n String verb = type.equals(\"buy\") ? \"bought\" : \"sold\";\n return volume + \" stocks of \" + symbol + \" \" + verb + \" @\" + price +\n \" USD (total value \" + String.format(\"%.2f\", getTransactionAmount()) + \" USD).\";\n }", "public void transactionMenu(){\n\t\tstate = ATM_State.TRANSACTION;\n\t\tgui.setDisplay(\"Transaction menu\\n\"\n\t\t\t\t+ \"1. Balance\\n\"\n\t\t\t\t+ \"2. Deposit\\n\"\n\t\t\t\t+ \"3. Withdraw\\n\"\n\t\t\t\t+ \"4. Log out\\n\"\n\t\t\t\t+ \"Enter choice: \");\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\tString chaine = \"\\t * Transaction * \\t\\n\";\r\n\t\tchaine = chaine + \"[somme : \"+ this.somme + \"] \";\r\n\t\tchaine = chaine + \"[payeur : \"+ this.payeur + \"] \";\r\n\t\tchaine = chaine + \"[receveur :\"+ this.receveur + \"] \";\r\n\t\treturn chaine;\r\n\t}", "private String getTxAsString()\n {\n if (tx == null)\n return null;\n\n return tx.getClass().getName() + \"@\" + System.identityHashCode(tx);\n }", "public String doInTransaction(TransactionStatus status) {\n Session session = sessionFactory.getCurrentSession();\n List<Message> messages = session.createQuery(\"from Message\").list();\n if (messages == null || messages.isEmpty()) {\n return DEFAULT_MESSAGE;\n } else {\n return messages.get(random.nextInt(messages.size())).getMessage();\n }\n }", "@Override\r\n\tpublic String toStringFormat() {\n\t\treturn transactionId + \" \" + merhcantId\r\n\t\t\t\t+ \" \" + transactionVolume + \" \" + transactionAmount\r\n\t\t\t\t+ \" \" + transactionDate+\"\\n\";\r\n\t}", "public String getTransaction() {\n return transaction;\n }", "@Override \r\n\tpublic String toString(){\r\n\t\t\r\n\t\treturn transCode + id;\r\n\t}", "public void print(StringBuffer toStringBuffer) {\n\ttoStringBuffer.append(\"Container Transaction: \").append(this.getTransactionAttribute()).append(\"@\").append(this.getDescription());\n }", "String getTransactionId();", "String getTransactionId();", "private String context(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n return iMessage.substring(0, iIndex)+\" ^ \"+iMessage.substring(iIndex);//return parse context\r\n \r\n }", "public EObject displayInfo(EObject context, String title, String message) {\r\n\t\tMessageDialog.openInformation(Display.getCurrent().getActiveShell(), title, message);\r\n\t\treturn context;\r\n\t}", "public String getContextString();", "public void showDetails (Player player) {\r\n\t\tString \tc\t= Term.COLOR_INACTIVE.get();\r\n\t\t\r\n\t\t// Get the color\r\n\t\tif (getActivity() == Activity.SELL\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_SELL.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.BUY\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_BUY.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.EXCHANGE\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_EXCHANGE.get();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tList<String>\tmessage\t= new ArrayList<String>();\r\n\t\t\t\t\t\tmessage.add(Term.INFO_1.get() + c + getActivity().toString() \t+ Term.INFO_2.get() + c +scs.formatCurrency(getPrice())\t\t+ Term.INFO_9.get() + c + getOwner());\r\n\t\t\r\n\t\tString \ttext\t= null;\r\n\t\tString\tname\t= getItemName();\r\n\t\t\r\n\t\tif (!isUnlimited()) {\r\n\t\t\tif (getActivity() == Activity.BUY)\r\n\t\t\t\ttext = getAmount()+ \"/\" + getMaxAmount();\r\n\t\t\telse\r\n\t\t\t\ttext = \"\" + getAmount();\r\n\t\t} else {\r\n\t\t\ttext = Term.INFO_UNLIMITED.get();\r\n\t\t}\r\n\t\t\r\n\t\tif (getItemStack().getType() == Material.WRITTEN_BOOK)\r\n\t\t\tname = getNBTStorage().getBookTitle();\r\n\t\t\r\n\t\tmessage.add(Term.INFO_4.get() + c + name\t\t\t\t+ Term.INFO_3.get() + c + text);\r\n//\t\t\t\t\t\tmessage.add(Term.INFO_4.get() + c + getItemName()\t\t\t\t+ Term.INFO_3.get() + c + (!isUnlimited() ? (getActivity() == Activity.BUY ? getMaxAmount() : getAmount()) : Term.INFO_UNLIMITED.get()));\r\n\t\t\r\n\t\tStringBuffer\tbuffer \t= new StringBuffer();\r\n\t\tString\t\t\tdelim\t= \"\";\r\n\t\r\n\t\tfor (Enchantment en : getEnchantments().keySet()) {\r\n\t\t\tint lvl\t= getEnchantments().get(en);\r\n\t\t\t\r\n\t\t\tbuffer.append(delim + en.getName() + \" lvl \" + lvl);\r\n\t\t\tdelim\t= \", \";\r\n\t\t}\r\n\t\t\r\n\t\tif (buffer.toString().length() > 0)\r\n\t\t\tmessage.add(Term.INFO_8.get() + c + buffer.toString());\r\n\t\t\r\n\t\tif (player.hasPermission(Properties.permAdmin))\r\n\t\t\tmessage.add(c + getSHA1());\r\n\t\t\r\n\t\tMessaging.mlSend(player, message);\r\n\t}", "public String toString() {\n\treturn state.toString() + \" \" + context.toString();\n }", "public void printTransactions() {\n for (int i = 0; i < transactions.size(); i++) {\n\t\t\tint indeks = i+1;\n\t\t\tSystem.out.println(\"Transactions \" + indeks + \": \" + transactions.get(i).getType() + \" \" + transactions.get(i).getAmount());\n\t\t}\n }", "void confirmTrans(ITransaction trans);", "@Override\r\n public void cancelMsg() {\n System.out.println(\"Transaction has been cancelled for gas pump #1..\");\r\n }", "java.lang.String getContext();", "@Override\n\t\tpublic void displayMessage() {\n\t\t\tsuper.displayMessage();\n\t\t}", "public String getTransactionState();", "@Override\n\tpublic void onTransactionCanceled() {\n\t\tToast.makeText(getActivity(), R.string.ibs_error_billing_transactionCancelled, Toast.LENGTH_SHORT).show();\n\t}", "public String getTransactionId() {\n return this.transactionId;\n }", "public String toString()\n {\n /**\n * Set the format as [timestamp] account number : command\n */\n String transaction = \"[\" + timestamp + \"] \" + accountInfo.getAccountNumber() + \" : \" + command.name(); \n \n /**\n * Return the string.\n */\n return transaction;\n }", "public String toString(boolean printDetails)\n {\n if (!printDetails)\n {\n return toString();\n }\n StringBuilder sb = new StringBuilder();\n sb.append(\"LocalTransactions: \").append(tx2gtxMap.size()).append(\"\\n\");\n sb.append(\"GlobalTransactions: \").append(gtx2ContextMap.size()).append(\"\\n\");\n sb.append(\"tx2gtxMap:\\n\");\n for (Map.Entry<Transaction, GlobalTransaction> entry : tx2gtxMap.entrySet())\n {\n sb.append(entry.getKey()).append(\": \").append(entry.getValue()).append(\"\\n\");\n }\n sb.append(\"gtx2EntryMap:\\n\");\n for (Map.Entry<GlobalTransaction, TransactionContext> transactionContextEntry : gtx2ContextMap.entrySet())\n {\n sb.append(transactionContextEntry.getKey()).append(\": \").append(transactionContextEntry.getValue()).append(\"\\n\");\n }\n return sb.toString();\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"# \" + title + \" :\\n\" + context ;\n\t}", "public String getTransactionId() {\n return transactionId;\n }", "public String getTransactionId() {\n return transactionId;\n }", "@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}", "private void reportTransactionStatus(boolean success){\n if(success){\n sendMessage(\"<st>\");\n }else{\n sendMessage(\"<f>\");\n }\n }", "@Override\n public void executeTransaction() {\n System.out.println(\"Please make a selection first\");\n }", "public String getTraceContextString() {\n Map<String, String> traceInfo = getTraceContext();\n if (traceInfo == null) {\n DDLogger.getLoggerImpl().debug(\"No Trace/Log correlation IDs returned\");\n return \"\";\n }\n\n String traceID = traceInfo.get(this.tracing.TRACE_ID_KEY);\n String spanID = traceInfo.get(this.tracing.SPAN_ID_KEY);\n return formatTraceContext(this.tracing.TRACE_ID_KEY, traceID, this.tracing.SPAN_ID_KEY, spanID);\n }", "public void print(){\t\t\r\n\t\tSystem.out.println(\"===\\nCommit \" + id +\"\\n\"+ Time + \"\\n\" + message + \"\\n\");\r\n\t}", "@Override\n\tprotected String showConfirmation() {\n\t\treturn \"Payment is successful. Check your credit card statement for PetSitters, Inc.\";\n\t}", "public String tooltip()\n\t{\n\t if (contextURI==null)\n\t return \"(no context specified)\";\n\t \n\t if (contextURI.equals(Vocabulary.SYSTEM_CONTEXT.METACONTEXT))\n\t return \"MetaContext (stores data about contexts)\";\n\t \n\t if(contextURI.equals(Vocabulary.SYSTEM_CONTEXT.VOIDCONTEXT))\n\t \treturn \"VoID Context (stores statistics about contexts)\";\n\t \n\t if (type!=null && timestamp!=null)\n\t {\n\t GregorianCalendar c = new GregorianCalendar();\n\t c.setTimeInMillis(timestamp);\n\t \n\t String date = ReadWriteDataManagerImpl.dateToISOliteral(c.getTime()); \n\t \n\t if (!StringUtil.isNullOrEmpty(date))\n\t date = ValueResolver.resolveSysDate(date);\n\t \n\t String ret = \"Created by \" + type;\n\t if (type.equals(ContextType.USER))\n\t ret += \" '\"\n\t + source.getLocalName()\n\t + \"'\";\n\t else\n\t {\n\t String displaySource = null;\n\t if(source!=null)\n\t {\n\t displaySource = EndpointImpl.api().getNamespaceService().getAbbreviatedURI(source);\n\t if (StringUtil.isNullOrEmpty(displaySource))\n\t displaySource = source.stringValue(); // fallback solution: full URI\n\t }\n\t String displayGroup = null;\n\t if (group!=null)\n\t {\n\t displayGroup = EndpointImpl.api().getNamespaceService().getAbbreviatedURI(group);\n\t if (StringUtil.isNullOrEmpty(displayGroup))\n\t displayGroup = group.stringValue(); // fallback solution: full URI\n\t }\n\t \n\t ret += \" (\";\n\t ret += source==null ? \"\" : \"source='\" + displaySource + \"'\";\n\t ret += source!=null && group!=null ? \"/\" : \"\";\n\t ret += group==null ? \"\" : \"group='\" + displayGroup + \"'\";\n\t ret += \")\";\n\t }\n\t ret += \" on \" + date;\n\t if (label!=null)\n\t ret += \" (\" + label.toString() + \")\";\n\t if (state!=null && !state.equals(ContextState.PUBLISHED))\n\t ret += \" (\" + state + \")\"; \n\t return ret;\n\t }\n\t else\n\t return contextURI.stringValue();\n\t}", "String getTransactionStatus();", "public String getTransactionId()\n\t{\n\t\treturn transactionId;\n\t}", "public static String SPgetMessageText(Context context){\n ArrayList<Outfit> list = getOutfitList(context);\n if(list.size()>0){\n StringBuilder sb = new StringBuilder();\n for(int i = 0 ; i<list.size(); i++){\n sb.append(list.get(i).getFunCharacter());\n }\n return sb.toString();\n }else{\n return InitialOutfit.startingText();\n }\n\n\n }", "private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\ttransactionLogger.info(\"\"); // don't really need a msg here\n\t\t\t\n\t\t\t// TODO MDC maybe conflic with existing MDC using in the project\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\t\n\t\t\ttranslog.getAttributesOnce().clear();\n\t\t}\n\t\t\n\t}", "Transaction getCurrentTransaction();", "protected String getTransactionId() {\n return transactionId;\n }", "public String doInTransaction(final TransactionStatus status) {\n final ServiceTicket st = newST((TicketGrantingTicket) jpaTicketRegistry.getTicket(parentTgtId));\n jpaTicketRegistry.addTicket(st);\n return st.getId();\n }", "public static void helper(){\n System.out.println(\"\\n0: Search Transaction\");\n System.out.println(\"1: New Transaction\");\n System.out.println(\"2: Query Transaction Detail\");\n System.out.println(\"back: return last menu\");\n }", "@Override\n public String toString() {\n String completeStatus;\n if (this.getTransactionCompleteness()) {\n completeStatus = \"This transaction is complete.\";\n } else {\n completeStatus = \"This transaction is incomplete.\";\n }\n return \"This is a one-way trade where \" + this.getBorrowerName() + \" borrows \" + this.item.getName() + \" from \" +\n this.getLenderName() + \". \\nMeeting time & place: \" + this.getMeetingTime().toString() + \" at \" +\n this.getMeetingLocation() + \". \\n\" + completeStatus;\n }", "public void fireOnTransaction(final TransactionContext context){\r\n\t\tnotify(new ListenerCaller(){\r\n\t\t\tpublic void call(DBListener listener){\r\n\t\t\t\tlistener.onTransaction(context);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void audit( String message )\n {\n _getAuditLogger().info( ILogger.EVENT_CODE.TRANSACTION, message );\n }", "@Attribute(order = 300, validators = { RequiredValueValidator.class })\n\t\tdefault String transactionDescription() {\n\t\t\treturn \"OpenAM has Requested an Authentication\";\n\t\t}", "void finalConfirm(ITransaction trans,boolean confirmation, String userId);", "public TransactionDetailResp transaction_show(String txId) throws Exception {\n String s = main(\"transaction_show\", \"[{\\\"txid\\\":\\\"\" + txId +\"\\\"}]\");\n return JsonHelper.jsonStr2Obj(s, TransactionDetailResp.class);\n }", "private String appendContextMessage(String msg) {\n\t\treturn msg;\r\n\t}", "public String toString()\n\t{\n\t\treturn \"[MessageSentConfirmation] - \" + plate + \", \" + state + \", \" + text;\n\t}", "public String getTransactionId() {\n\t\treturn transactionId;\n\t}", "public String getTransactionId() {\n\t\treturn transactionId;\n\t}", "public String getContext() {\n int l=code.getCurLine();\n String s=\"\\t\\t at line:\" + l + \" \";\n if (l>-1) {\n s+=\"\\n\\t\\t\\t \"+code.getLineAsString(l-2);\n s+=\"\\n\\t\\t\\t \"+code.getLineAsString(l-1);\n s+=\"\\n\\t\\t\\t> \"+code.getLineAsString(l)+\" <\";\n s+=\"\\n\\t\\t\\t \"+code.getLineAsString(l+1);\n s+=\"\\n\\t\\t\\t \"+code.getLineAsString(l+2);\n s=s+ \"\\n\\t\\t current token:\" + tok.toString();;\n s=s+ \"\\n\\t\\t Variable dump:\" + vars;\n if (gVars!=null) {\n s=s+ \"\\n\\t\\t Globals:\" + gVars;\n }\n } else s+=\"\\n\\t\\t\\t> \"+tok.getLine()+\" <\";\n\n return s;\n }", "java.lang.String getTxId();", "public void displayMessage(){//displayMessage body start\n\t\tSystem.out.printf(\"course name = %s\\n\", getCourseName());\n\t}", "public java.lang.String getTransactionId() {\n return transactionId;\n }", "public java.lang.String getTransactionId() {\n return transactionId;\n }", "public java.lang.String getTransactionId() {\r\n return transactionId;\r\n }", "void showDataGeneratedMsg();", "public void showMessage(){\n\t jsfMessageHelper.addInfo(\"Mesaj:\", (messageTxt==null?\"?\":messageTxt));\r\n\t}", "public String toString(){\r\n //your code here\r\n return(\"Withdrawal of: $\" + amount + \"Date: \" + date + \"from account: \" + account);\r\n }", "public void Display(){\n System.out.println(\"************************************************************\");\n System.out.println(\"Customer Account Number: \"+getAccountNo());\n System.out.println(\"Customer Account Id: \"+getAccountId());\n System.out.println(\"Customer Type: \"+getAccountType());\n System.out.println(\"Customer Balance: $\"+getAccountBal());\n System.out.println(\"Thank you for banking with us!\");\n System.out.println(\"************************************************************\");\n }", "public interface TransactionContext extends Serializable {\n\n\n class Factory {\n public static TransactionContext getInstance() {\n TransactionContext instance = TransactionContextImpl.getInstance();\n if (instance == null) {\n instance = TransactionContextImpl.newInstance();\n }\n return instance;\n }\n }\n\n void setContextData(String key, Object value);\n\n <T> T getContextData(String key, Class<T> valueType);\n\n EncodeProtocol getProtocol();\n\n String getServiceName();\n\n String getMethod();\n\n String getVersion();\n\n /** 获取option整个值(int型) */\n int getOptions();\n\n /** 判断option中二进制第index位是否为1 */\n boolean getOption(int index);\n\n int getSequence();\n\n String getCallerId();\n\n long getSessionTid();\n\n long getCallerTid();\n\n long getCalleeTid();\n\n @Deprecated\n long getUid();\n\n long getStartTime();\n\n @Deprecated\n int getConcurrentCount();\n\n String getUip();\n\n String getForwardedFor();\n\n String getProxyIP();\n\n InetAddress getCallerIP();\n\n int getCallerPort();\n\n Map<String, String> getCookie();\n\n TransactionContext setCookie(Map<String, String> cookie);\n\n TransactionContext setCookie(String key, String value);\n\n String getUserSign();\n\n TransactionContext setTimeout(long timeout);\n\n long getTimeout();\n\n String getReturnCode();\n\n void setReturnCode(String returnCode);\n\n String getReturnMessage();\n\n void setReturnMessage(String returnMessage);\n\n String getErrorGroup();\n\n void setErrorGroup(String errorGroup);\n\n String getErrorLevel();\n\n String getErrorLocation();\n\n boolean isCircuitBroken();\n\n void setCircuitBroken(boolean circuitBroken);\n\n /** 是否重试 */\n boolean isRetry();\n\n void setRetry(boolean retry);\n\n @Deprecated\n long getReceivedTime();\n\n @Deprecated\n int getCalleeTime1();\n\n @Deprecated\n int getCalleeTime2();\n\n @Deprecated\n int getSendLength();\n\n @Deprecated\n int getRecvLength();\n\n @Deprecated\n Long getMscTraceId();\n\n @Deprecated\n Long getMscSpanId();\n\n String getRemoteAddress();\n\n String getLocalAddress();\n\n String getDomain();\n}", "public int getTransactionId() {\n return transactionId;\n }", "private void showOrderDetails(Order order) {\n\t\tString status, shownOption;\n\n\t\tif (order.getStatus()) {\n\t\t\tstatus = new String();\n\t\t\tstatus = \"Processed\";\n\n\t\t\tshownOption = new String();\n\t\t\tshownOption = \"Return\";\n\t\t}\n\t\telse {\n\t\t\tstatus = new String();\n\t\t\tshownOption = new String();\n\n\t\t\tstatus = \"Pending\";\n\t\t\tshownOption = \"Set Processed\";\n\t\t}\n\n\t\tString orderDetailsMessage = \"ORDER DATE : \" + order.getDate();\n\t\torderDetailsMessage += \"\\nSTATUS: \" + status;\n\t\torderDetailsMessage += \"\\nITEMS: \";\n\t\tfor (StockItem stockItem : order.getOrderEntryList()) {\n\t\t\torderDetailsMessage += \"\\n \" + stockItem.getQuantity() + \" \\t x \\t \"\n\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \\t\\t\\t Subtotal: \\t\\u20ac\"\n\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity());\n\t\t}\n\n\t\torderDetailsMessage += \"\\n\\nCUSTOMER ID: \" + order.getPerson().getId()\n\t\t\t\t+ \"\\nPersonal Details: \";\n\t\torderDetailsMessage += \"\\n Name: \\t\" + order.getPerson().getName();\n\t\torderDetailsMessage += \"\\n Phone: \\t\" + order.getPerson().getContactNumber();\n\t\torderDetailsMessage += \"\\n Address: \\t\" + order.getPerson().getAddress();\n\t\torderDetailsMessage += \"\\n\\nThe total order value is \\t\\u20ac\"\n\t\t\t\t+ order.getGrandTotalOfOrder() + \"\\n\";\n\n\t\tObject[] options = { \"OK\", shownOption };\n\t\tint n = JOptionPane.showOptionDialog(null, orderDetailsMessage, \"ORDER ID: \"\n\t\t\t\t+ (order.getId()) + \" STAFF ID: \" + order.getCurrentlyLoggedInStaff().getId()\n\t\t\t\t+ \" STATUS : \" + status /* order.isStatus() */, JOptionPane.YES_NO_OPTION,\n\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, options, options[0]);\n\t\tif (n == 1) {\n\t\t\torder.setStatus(true);\n\t\t}\n\t}", "private static void debug(Context context, String p){\n\t\tToast.makeText(context, p, Toast.LENGTH_SHORT).show();\n\t}", "String transactionChangeString() {\n return transaction_mod_list.toString();\n }", "@Override\n\tpublic String summarize(Context context) {\n\t\treturn \"FINISHED\";\n\t\t\n//\t\treturn String.format(\"Normal:\\n%s\\n\" +\n//\t\t\t\t\"========================================\\n\" +\n//\t\t\t\t\"Modified:\\n%s\", machine1.formatedResume(), machine2.formatedResume());\n\t}", "protected abstract String defaultExceptionMessage(TransactionCommand transactionCommand);", "public java.lang.String getTransactionId() {\n return transactionId;\n }", "public java.lang.String getTransactionId() {\n return transactionId;\n }", "@Override\n public String getDescription() {\n return \"Account information\";\n }", "String getTransactionID();", "public String toString(EdaContext xContext) {\n\n\t\t// Get the class specific data\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(\"ID: \" + getId() + \"\\n\");\n\t\tif (getFromChangeReq() != null) {\n\t\t\tbuffer.append(\"From CR ID: \" + getFromChangeReq().getId() + \"\\n\");\n\t\t}\n\t\telse {\n\t\t\tbuffer.append(\"From CR ID: NULL\\n\");\n\t\t}\n\t\tif (getToChangeReq() != null) {\n\t\t\tbuffer.append(\"To CR ID: \" + getToChangeReq().getId() + \"\\n\");\n\t\t}\n\t\telse {\n\t\t\tbuffer.append(\"To CR ID: NULL\\n\");\n\t\t}\n\t\tbuffer.append(\"Relationship: \" + getRelationshipb() + \"\\n\");\n\n\t\treturn buffer.toString();\n\n\t}", "@Override\n public String toString() {\n return String.format( \"%1$s UTC: Cancel Order: (%2$s) - %3$s\", getTime(), orderId, getTag() ) + \" Status: \" + getStatus();\n }", "long getTxid();", "public String getTransactionID() {\n\t return this.transactionID;\n\t}", "@Test\n public void resultMessageTest() {\n assertEquals(\"System: Accepted Transaction\", authResponse.getResultMessage());\n }", "public void display() {\n System.out.println(\"Displaying Order properties:\\n Order ID number: \" + getOrderID() + \"\\n Customer ID Number: \" + getCustomerID() + \"\\n Order Status: \" + getStatus());\n }", "@Override public String toString() {\n return \"\" + \"Context=\" + \"[LLVMContext]\" // NOI18N\n + \", GlobalList=\" + NativeTrace.getIdentityStr(GlobalList) // NOI18N\n + \", FunctionList=\" + NativeTrace.getIdentityStr(FunctionList) // NOI18N\n + \", AliasList=\" + NativeTrace.getIdentityStr(AliasList) // NOI18N\n + \", IFuncList=\" + NativeTrace.getIdentityStr(IFuncList) // NOI18N\n + \", NamedMDList=\" + NativeTrace.getIdentityStr(NamedMDList) // NOI18N\n + \", GlobalScopeAsm=\" + GlobalScopeAsm // NOI18N\n + \", ValSymTab=\" + NativeTrace.getIdentityStr(ValSymTab) // NOI18N\n + \", ComdatSymTab=\" + NativeTrace.getIdentityStr(ComdatSymTab) // NOI18N\n + \", Materializer=\" + Materializer // NOI18N\n + \", ModuleID=\" + ModuleID // NOI18N\n + \", SourceFileName=\" + SourceFileName // NOI18N\n + \", TargetTriple=\" + TargetTriple // NOI18N\n + \", NamedMDSymTab=\" + NativeTrace.getIdentityStr(NamedMDSymTab) // NOI18N\n + \", DL=\" + DL; // NOI18N\n }", "@Override\n public String toString()\n {\n StringBuilder sb = new StringBuilder();\n sb.append(tx2gtxMap.size()).append(\" mappings, \");\n sb.append(gtx2ContextMap.size()).append(\" transactions\");\n return sb.toString();\n }", "@Override\n public void run() {\n System.out.println(\"Sent coins onwards! Transaction hash is \" + sendResult.tx.getTxId());\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"CTSbean [message \"+ message+\"]\";\n\t}", "void showOrderText(int ID) throws OrderNotFoundException;", "@Override\n public String toString() {\n return \"--------------------------------------------\\n\" +\n \"Transfer Details\\n\" +\n \"--------------------------------------------\\n\" +\n \"Id: \" + transferId +\"\\n\"+\n \"From: \" + accountFromId +\"\\n\"+\n \"To: \" + accountToId +\"\\n\"+\n \"Amount: \" + amount +\"\\n\"+\n \"Type:\" + transferTypeId +\"\\n\"+\n \"Status:\" + transferStatusId +\"\\n\";\n }", "public String s (TContext contextData, TArg1 arg1)\n {\n MessageFormat messageFormat = this.obtainMessageFormat (contextData);\n return messageFormat.format (new Object [] { arg1 },\n new StringBuffer (),\n null)\n .toString ();\n }", "void showOrdersText();", "public String getMessage()\n {\n return String.format(\"MessageType=%s,TransactionId=%s,TerminalId=%s,MerchantId=%s,FingerData=%s,CustomerId=%s,IdData=%s, CustomerData=%s\", this.messageType, this.transactionId, this.terminalId, this.merchantId, this.fingerData, this.customerId, this.idData, this.customerData);\n }", "public long getTransactionId();", "@Override\r\n public final void outputTransaction(String receiptOutput) {\r\n JOptionPane.showMessageDialog(null, receiptOutput, EZ, JOptionPane.PLAIN_MESSAGE, icon);\r\n }", "@Override\n public String getDescription() {\n return \"Transfer currency\";\n }", "public Long getTransactionId() {\n return this.transactionId;\n }", "public Object getTransactionId() throws StandardException;", "public String toString() {\n\t\treturn getMessage();\n\t}" ]
[ "0.6617942", "0.64784753", "0.64525914", "0.63300806", "0.5880915", "0.5759866", "0.5745321", "0.57007164", "0.5688226", "0.5676422", "0.5676092", "0.5670248", "0.56312793", "0.5630073", "0.5630073", "0.5621586", "0.56189466", "0.5613395", "0.55737495", "0.5554164", "0.5489259", "0.5477637", "0.5472846", "0.54691255", "0.54648477", "0.54592985", "0.5445322", "0.54106104", "0.5396402", "0.5395919", "0.5391632", "0.53842455", "0.53842455", "0.5376252", "0.53725755", "0.5367652", "0.5364379", "0.53583413", "0.53512585", "0.53459233", "0.53261554", "0.532028", "0.5319448", "0.53111005", "0.53097504", "0.5305545", "0.5305374", "0.5301952", "0.5288964", "0.52781945", "0.52756107", "0.52702403", "0.5259311", "0.5243209", "0.5233969", "0.52291703", "0.5223256", "0.5223256", "0.52059954", "0.51981723", "0.5192017", "0.5189128", "0.5189128", "0.5189078", "0.518247", "0.517196", "0.5168049", "0.51624405", "0.5162277", "0.5161967", "0.5153024", "0.51491725", "0.51408815", "0.5131741", "0.511736", "0.5102969", "0.5102969", "0.5095055", "0.5089014", "0.50854", "0.50783086", "0.5052824", "0.5052335", "0.5049533", "0.50472665", "0.50468826", "0.5046153", "0.50446695", "0.5044616", "0.5022558", "0.50183606", "0.50170124", "0.5010419", "0.5009415", "0.5005752", "0.500216", "0.4998434", "0.49950078", "0.49883443", "0.49846023" ]
0.765857
0
display error message when insufficient parameter exception occur
protected abstract String insufficientParameterExceptionMessage(TransactionCommand transactionCommand);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void ImproperFillOutException() {\n JOptionPane.showMessageDialog(null, \"Fill out the form properly\");\n }", "private static void printErrorMessage() {\n System.out.println(\"Oh no! It looks like I wasn't able to understand the arguments you passed in :(\"\n + \"\\nI can only handle arguments passed in a format like the following: 1/2 * 3/4\\n\");\n }", "public void showBadInputMessage() {\n\t\tJOptionPane.showMessageDialog(frame, \"Vänligen skriv siffror mellan 1 och \" + size);\n\t}", "void showError(String message);", "void showError(String message);", "public void exibeDataNascimentoInvalida() {\n JOptionPane.showMessageDialog(\n null,\n Constantes.GERENCIAR_FUNCIONARIO_DATA_NASCIMENTO_INVALIDA,\n Constantes.GERENCIAR_FUNCIONARIO_TITULO,\n JOptionPane.PLAIN_MESSAGE\n );\n }", "public StatsParamException(String toDisplay)\r\n\t{\r\n\t\tsuper(toDisplay);\r\n\t}", "private ErrorCode checkParameters() {\n\t\t\n\t\t// Check Batch Size\n\t\ttry {\n\t\t\tInteger.parseInt(batchSizeField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.BatchSize;\n\t\t}\n\t\t\n\t\t// Check confidenceFactor\n\t\ttry {\n\t\t\tDouble.parseDouble(confidenceFactorField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.ConfidenceFactor;\n\t\t}\n\t\t\n\t\t// Check minNumObj\n\t\ttry {\n\t\t\tInteger.parseInt(minNumObjField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.MinNumObj;\n\t\t}\n\t\t\n\t\t// Check numDecimalPlaces\n\t\ttry {\n\t\t\tInteger.parseInt(numDecimalPlacesField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.NumDecimalPlaces;\n\t\t}\n\t\t\n\t\t// Check numFolds\n\t\ttry {\n\t\t\tInteger.parseInt(numFoldsField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.NumFolds;\n\t\t}\n\t\t\n\t\t// Check seed\n\t\ttry {\n\t\t\tInteger.parseInt(seedField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.Seed;\n\t\t}\n\t\t\n\t\treturn ErrorCode.Fine;\n\t\t\n\t}", "void showError(String errorMessage);", "void showErrorMsg(String string);", "private static void throwExceptionForRequire() {\n LOG.debug(\"Field 'require' must not be empty\");\n throw new ParametersException(\"Field 'require' must not be empty\");\n }", "public void showError(String errorMessage);", "void showAlertForInvalidNumber();", "private void validateInputParameters(){\n\n }", "void displayErrorMessage(String message);", "String getInvalidMessage();", "void displayLoadingErrorMessage();", "public void showError(String error);", "@Override\n\tpublic void error(String message, Object... params) {\n\n\t}", "void errorBox(String title, String message);", "public org.apache.spark.ml.param.Param<java.lang.String> handleInvalid () { throw new RuntimeException(); }", "@Override\n public void showError() {\n }", "void displayNoItemsSelectedErrorMessage();", "public ParamException( String msg ) {\n\t\tsuper( msg );\n\t}", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "public void error();", "public void InvalidFormat();", "String errorMessage();", "private void checkParams() throws InvalidParamException{\r\n String error = svm.svm_check_parameter(this.problem, this.param);\r\n if(error != null){\r\n throw new InvalidParamException(\"Invalid parameter setting!\" + error);\r\n }\r\n }", "@Override\n\tpublic void showError(String message) {\n\t\t\n\t}", "@Override\n\tpublic void error(String message, Supplier<?>... paramSuppliers) {\n\n\t}", "public abstract void showErrorBox(Throwable error);", "public void checkParameters() {\n }", "void displayWhiteboardTakenError(){\n createWhiteboard.setText(\"Whiteboard ID already taken. Select it from below or choose a new integer.\");\n\n }", "void drawError(String message);", "private String getGUIErrorMsg(long errorcode) {\n\t\tif (errorcode == 0) {\n\t\t\treturn \"This popup shouldn't have launched!\";\n\t\t} else if (errorcode == 9) {\n\t\t\treturn \"Latitude input format incorrect!\\nValid Latitude values are -90 to 90 with negative values being south Latitude.\";\n\t\t} else if (errorcode == 10) {\n\t\t\treturn \"Longitude input format incorrect!\\nValid Longitude values are -180 to 180 with negative values being west latitude.\";\n\t\t} else if (errorcode == 11) {\n\t\t\treturn \"Date input format incorrect!\\nValid dates go <year>-<month>-<day>\\nValid month values are 1- 12 and valid day values are 1 - 31.\";\n\t\t} else if (errorcode == 12) {\n\t\t\treturn \"Time input format incorrect!\\nValid times go <hour>-<minute>-<second>\\nValid hour values are 0 - 23 and valid minute and second values are 0 - 59\";\n\t\t} else if (errorcode == 1) {\n\t\t\treturn \"Invalid latitude!\\nValid Latitude values are -90 to 90 with negative values being south Latitude.\";\n\t\t} else if (errorcode == 2) {\n\t\t\treturn \"Invalid Longitude!\\nValid Longitude values are -180 to 180 with negative values being west latitude.\";\n\t\t} else if (errorcode == 3) {\n\t\t\treturn \"Invalid Year!\\nValid year values are \" + Integer.MIN_VALUE + \" - \" + Integer.MAX_VALUE + \".\";\n\t\t} else if (errorcode == 4) {\n\t\t\treturn \"Invalid Month!\\nValid month values are 1 - 12\";\n\t\t} else if (errorcode == 5) {\n\t\t\treturn \"Invalid Day!\\nValid day values are 1 - 31\";\n\t\t} else if (errorcode == 6) {\n\t\t\treturn \"Invalid Hour!\\nValid hour values are 0 - 23\";\n\t\t} else if (errorcode == 7) {\n\t\t\treturn \"Invalid Minute!\\nValid minute values are 0 - 59\";\n\t\t} else if (errorcode == 8) {\n\t\t\treturn \"Invalid Second!\\nValid second values are 0 - 59\";\n\t\t} \n\t\treturn \"Undefined Error Message!\";\n\t}", "private void missingRequiredParameter(HttpServletResponse response, String key)\r\n throws IOException {\r\n PrintWriter pw = response.getWriter();\r\n pw.println(Messages.missingRequiredParameter(key));\r\n pw.flush();\r\n\r\n response.setStatus(HttpServletResponse.SC_PRECONDITION_FAILED);\r\n }", "public static void userInputError(int input) //users inputs option that is out of bounds\n\t{\n\t\tSystem.out.println(\"ERROR: Selection Out Of Bounds! \\nOption \" + input + \" Does Not Exist\"); //error message\n\t\tSystem.out.println(\"Press 'Enter' To try Again\"); // prompt to try again\n\t}", "@Override public String toString(){\n return \"Logic Parameter Exception\";\n }", "@Override\r\n\tpublic void displayError(EntityPropertyCode code, String message) {\n\t}", "@Override\n\tpublic void error(Marker marker, String message, Supplier<?>... paramSuppliers) {\n\n\t}", "@Override\n\tprotected String showErrorMessage() {\n\t\treturn \"There has been an error. Payment cannot process at this time. Please check with your credit card compay.\";\n\t}", "protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify at least one component\");\n else {\n \t\t//TODO add more checks\n \t\tok();\n }\n }", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "boolean hasErrormessage();", "public withdrawException() {\n super(\"The Sum you entered is greater than your available money... \");\n }", "public void error(String message);", "void notSupported(String errorcode);", "public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}", "public void inquiryError() {\n\t\t\n\t}", "void error(String messageKey, Object... args);", "private void validateParameter(){\n\t\tif(hrNum > upperBound){\n\t\t\thrNum = upperBound;\n\t\t}\n\t\telse if(hrNum < lowerBound){\n\t\t\thrNum = lowerBound;\n\t\t}\n\t}", "public void sendError()\n {\n \tString resultText = Integer.toString(stdID);\n \tresultText += \": \";\n\t\tfor(int i = 0; i<registeredCourses.size();i++)\n\t\t{\n\t\t\tresultText += registeredCourses.get(i);\n\t\t\tresultText += \" \";\n\t\t}\n\t\tresultText += \"--\";\n\t\tresultText += \" \";\n\t\tresultText += Integer.toString(semesterNum);\n\t\tresultText += \" \";\n\t\tresultText += Integer.toString(0); \n\t\tresultText += \" \";\n\t\tprintResults.writeResult(resultText);\n \tSystem.exit(1);\n }", "String getErrorMessage();", "String getErrorMessage();", "public void validationErr()\r\n\t{\n\t\tSystem.out.println(\"validation err\");\r\n\t}", "static GitletException error(String msgFormat, Object... arguments) {\n return new GitletException(String.format(msgFormat, arguments));\n }", "private void showErrorDialog(int errorCode) {\n\t\t\n }", "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getError();", "private String makeIllegalArgumentExceptionMessage(Object owner, String methodName, Object argument) {\n\n StringBuilder builder = new StringBuilder();\n\n String message = errorMessagePreamble(owner, methodName, argument);\n builder.append(message);\n\n builder.append(\" should have worked but did not. Please contact the tech team and tell it to change the jvm.\");\n\n return builder.toString();\n }", "public InvalidUsage(String cause){\n super(\" InvalidUsage \", cause);\n }", "public RoomTidakDitemukanException(Hotel hotel_input,String room_input){\n super(\"Kamar yang terletak di : \");\n hotel_error=hotel_input;\n room_error=room_input;\n }", "@Override\n\tprotected boolean validateRequiredParameters() throws Exception {\n\t\treturn true;\n\t}", "void showResultMoError(String e);", "private static void throwError(ApplicationContext context) {\n DisplayService displayService = (DisplayService) context.getBean(DisplayService.class);\n throw new IllegalArgumentException(displayService.getMessage(Constants.USAGE_MESSAGE, ProductService.getProductsNames()));\n }", "public ExceptionParamJeu(error type){\r\n\t\tthis.explication = type;\r\n\t}", "@Override\r\n\tprotected ResponseEntity<Object> handleMissingServletRequestParameter(\r\n\t MissingServletRequestParameterException ex, HttpHeaders headers, \r\n\t HttpStatus status, WebRequest request) {\r\n\t String error = ex.getParameterName() + \" parameter is missing\";\r\n\t \r\n\t ApiError apiError = \r\n\t new ApiError(HttpStatus.BAD_REQUEST, ex.getLocalizedMessage(), error);\r\n\t return new ResponseEntity<Object>(\r\n\t apiError, new HttpHeaders(), apiError.getStatus());\r\n\t}", "public void displayError(String e){\n\t\tJOptionPane.showMessageDialog(null, e, \"Error\", JOptionPane.ERROR_MESSAGE);\n\t}", "private void displayError(Exception e)\n\t{\n\t\tJOptionPane.showMessageDialog(frame,\n\t\t\t\te.toString(),\n\t\t\t\t\"EXCEPTION\",\n\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t}", "public void showInputError() {\n\n resultLabel.setText(\"Choose another space!\");\n\n }", "@ExceptionHandler(MethodArgumentNotValidException.class)\n public ResponseEntity<String> invalidException(MethodArgumentNotValidException e) {\n\n StringBuilder sb = new StringBuilder();\n BindingResult result = e.getBindingResult();\n for (FieldError error : result.getFieldErrors()) {\n sb.append(\"\\\"\" + error.getField() + \"\\\" (\\\"\" + error.getRejectedValue() + \"\\\") \");\n }\n\n return new ResponseEntity<String>(\"Invalid parameters: \" + sb.toString(), httpHeaders, HttpStatus.BAD_REQUEST);\n }", "public void printError(String arg0) {\n\n }", "public void messageToUser() {\n // show a message dialog - the message is an error message.\n JOptionPane.showMessageDialog(new JFrame(),\n \"You are missing some parameters in the level definitions, Please check it\", \"Error!\",\n JOptionPane.ERROR_MESSAGE);\n // exit the program\n System.exit(0);\n }", "@Override\n\tpublic void error(Marker marker, String message, Object... params) {\n\n\t}", "static int errorMsg(int eCode)\n {\n if (eCode == 0) return 0;\n String message = \"\";\n switch (eCode){\n case 1: message = \"Division by zero\"; break;\n case 2: message = \"Non-matching parenthesis in function\"; break;\n case 3: message = \"Must enclose negative exponents in parentheses\"; break;\n case 4: message = \"Incorrect Operator Syntax\"; break;\n case 5: message = \"Rightfunctions must use parenthesis. (example: ABS(-2);\"; break;\n case 6: message = \"Unrecognized token in function srtring.\"; break;\n case 8: message = \"Can not raise negative number to a fractional power.\"; break;\n case 10:message = \"Input a real number with no operators\"; break;\n }\n JOptionPane.showMessageDialog(null, message, \"Error \"+eCode, JOptionPane.ERROR_MESSAGE);\n return 0;\n }", "public void helpByParamsError() {\n System.err.println(\"The command syntax is wrong.\");\n System.err.println(\"You can write the command in the following way:\");\n System.err.println(\"java -jar portScanner-1.5.jar ipOrElseDomain minPortRange maxPortRange [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar 127.0.0.1 0 65535 file.txt\");\n System.err.println(\"or else\");\n System.err.println(\"java -jar PortScanner-1.5.jar ipOrElseDomain [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar cloudflare.com file.txt\");\n System.err.println(\"The file is not obligatory option.\");\n System.exit(1);\n }", "@DefaultMessage(\"\\\"Select\\\" permission must not be unchecked for a module\")\n @Key(\"gen.selectPermRequiredException\")\n String gen_selectPermRequiredException();", "public String error();", "public void stinException(String nameField, Editable stringAnalize, int max) throws Exceptions {\n if(stringAnalize.toString().isEmpty()){\n throw new Exceptions(\"You need to insert the \"+nameField);\n }\n if(stringAnalize.length()>max){\n throw new Exceptions(\"You need to insert less than \"+max+\" characters\");\n }\n try{\n if(Double.parseDouble(stringAnalize.toString())!=321312.123) {\n throw new Exceptions(\"The \" + nameField + \" could not be a number\");\n }\n }catch(Exceptions fs){\n throw new Exceptions(\"The \" + nameField + \" could not be a number\");\n }catch(Exception e){\n }\n }", "public void validationError(\n IPSComponent component,\n int errorCode,\n Object[] args)\n throws PSSystemValidationException;", "public void addError(String message);", "@Override\r\n\tpublic final void showCommandError(String command, String message) {\n\t}", "public void sendeFehlerHelo();", "public void alertInvalid(){\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.setTitle(\"Herencia invalida\");\n alert.setHeaderText(\"Un hijo no puede ser hijo de su padre o un padre no puede ser padre de su padre,\"\n + \"No puede crear herencia con entidades debiles.\");\n alert.showAndWait();\n }" ]
[ "0.68822736", "0.68354475", "0.67237484", "0.65544623", "0.65544623", "0.653305", "0.6518276", "0.6435296", "0.6433679", "0.6404856", "0.63968205", "0.6374628", "0.6373396", "0.6364507", "0.63166773", "0.6310477", "0.63089365", "0.63060606", "0.6274891", "0.627338", "0.62702763", "0.62696385", "0.6262789", "0.6252635", "0.62507576", "0.62507576", "0.62507576", "0.62507576", "0.62308156", "0.6226237", "0.6225827", "0.6198034", "0.6182121", "0.6181474", "0.6173228", "0.61663103", "0.61327296", "0.6097045", "0.609354", "0.60845023", "0.6076757", "0.60704774", "0.6068016", "0.6061433", "0.6055964", "0.6038999", "0.6030168", "0.6030168", "0.6030168", "0.6030168", "0.6030168", "0.6030168", "0.6030168", "0.6030168", "0.6030168", "0.6030168", "0.6030168", "0.6030168", "0.60301036", "0.60265476", "0.60167855", "0.6015251", "0.600273", "0.597434", "0.59654206", "0.5962881", "0.5956981", "0.59548134", "0.59548134", "0.59518266", "0.59502226", "0.5944587", "0.593394", "0.593394", "0.593394", "0.59281063", "0.5926322", "0.5920077", "0.5918343", "0.5917742", "0.591125", "0.59047997", "0.5901964", "0.58993113", "0.5885395", "0.5880768", "0.5879997", "0.58789515", "0.58786833", "0.5877192", "0.5872822", "0.58550596", "0.58463657", "0.5846204", "0.5845262", "0.5842261", "0.5839581", "0.5835589", "0.58337826", "0.5833319" ]
0.7471868
0
display default error exception message
protected abstract String defaultExceptionMessage(TransactionCommand transactionCommand);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showError(String message);", "void showError(String message);", "@Override\n\tpublic void showError(String message) {\n\t\t\n\t}", "@Override\r\n\tpublic void displayError(EntityPropertyCode code, String message) {\n\t}", "@Override\n public void showError() {\n }", "private void displayError(Exception e)\n\t{\n\t\tJOptionPane.showMessageDialog(frame,\n\t\t\t\te.toString(),\n\t\t\t\t\"EXCEPTION\",\n\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t}", "void displayErrorMessage(String message);", "public void showError(String error);", "public abstract void showErrorBox(Throwable error);", "public void showError(String errorMessage);", "void showError(String errorMessage);", "public void displayError(String e){\n\t\tJOptionPane.showMessageDialog(null, e, \"Error\", JOptionPane.ERROR_MESSAGE);\n\t}", "void errorBox(String title, String message);", "void showErrorMsg(String string);", "@Test\n public void test078() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try {\n Component component0 = errorPage0.title(\"%n.Is\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Override\r\n public final void displayError(final String message) {\r\n displayMessage(message, \"Error!\", SWT.ICON_ERROR);\r\n }", "String getInvalidMessage();", "void Alert(IErrorDisplayer displayer, T ex, String message);", "String errorMessage();", "@Override\n\tprotected String generateMessage() {\n\t\treturn \"Script evaluation exception \" + generateSimpleMessage();\n\t}", "@Override\n\tpublic String getMessage() {\n\t\treturn \"ATTENZIONE: nel progetto Eccezioni Java si è verificato un errore!\";\n\t}", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "protected void displayErrorMessage(String message, Exception ex) {\n JPanel messagePanel = new JPanel(new BorderLayout()); \n JLabel label = new JLabel(message);\n messagePanel.add(label);\n if (ex != null) {\n JComponent panel = new JXPanel(new BorderLayout());\n panel.setBorder(new RoundedBorder());\n \n // remind(aim): provide way to allow user to see exception only if desired\n StringWriter writer = new StringWriter();\n ex.printStackTrace(new PrintWriter(writer));\n JTextArea exceptionText = new JTextArea();\n exceptionText.setText(\"Cause of error:\\n\" +\n writer.getBuffer().toString());\n exceptionText.setBorder(new RoundedBorder());\n exceptionText.setOpaque(false);\n exceptionText.setBackground(\n Utilities.deriveColorHSB(UIManager.getColor(\"Panel.background\"),\n 0, 0, -.2f));\n JScrollPane scrollpane = new JScrollPane(exceptionText);\n scrollpane.setBorder(EMPTY_BORDER);\n scrollpane.setPreferredSize(new Dimension(600,240));\n panel.add(scrollpane);\n messagePanel.add(panel, BorderLayout.SOUTH); \n }\n JOptionPane.showMessageDialog(getMainFrame(), messagePanel, \n resourceMap.getString(\"error.title\"),\n JOptionPane.ERROR_MESSAGE);\n \n }", "void showError(Throwable throwable);", "public void error(String message);", "private void displayError(Exception ex)\n {\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Error dialog\");\n alert.setHeaderText(null);\n alert.setContentText(ex.getMessage());\n\n alert.showAndWait();\n }", "static void showError(Exception ex, String title, String message)\n {\n try\n {\n if(title == null)\n title = SipActivator.getResources().getI18NString(\n \"impl.protocol.sip.XCAP_ERROR_TITLE\");\n\n if(message == null)\n message = title + \"\\n\" +\n ex.getClass().getName() + \": \" +\n ex.getLocalizedMessage();\n\n\n if(SipActivator.getUIService() != null)\n SipActivator.getUIService().getPopupDialog()\n .showMessagePopupDialog(\n message,\n title,\n PopupDialog.ERROR_MESSAGE);\n }\n catch(Throwable t)\n {\n logger.error(\"Error for error dialog\", t);\n }\n }", "void showResultMoError(String e);", "private void ImproperFillOutException() {\n JOptionPane.showMessageDialog(null, \"Fill out the form properly\");\n }", "private void showError(String message){\n\t\tsetupErrorState();\n\t\tsynapseAlert.showError(message);\n\t}", "public String error();", "public void showNamedError(String message) {\n\t\ttextUI.showNamedError(this.name, message);\n\t}", "public void displayError(String message){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setContentText(message);\n //alert.initOwner(owner);\n alert.show();\n }", "String getErrorMessage();", "String getErrorMessage();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "public String getMessage() {\n return super.getMessage()+\"\\n error code=\"+error_code+\" error value=\"+error_value; //$NON-NLS-1$ //$NON-NLS-2$\n }", "public abstract void showInitError(String s);", "private void setErrorMessage() {\n messageLabel.setText(NbBundle.getMessage(JavaFXPlatformCustomizer.class, \"Customizer_Invalid_Platform_Msg\")); // NOI18N\n }", "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getError();", "ErrorMessageDisplayInterface getErrorMessageDisplay();", "protected void errorPopup(String msg, Exception ex) {\n Message.showErrorMessage(getComponent(), ex, msg);\n }", "@DefaultMessage(\"Field is required\")\n @Key(\"gen.fieldRequiredException\")\n String gen_fieldRequiredException();", "@Override\n public String getMessage() {\n return super.getMessage() + bonus_error + \"Not Found\";\n }", "@Override\r\n\tpublic final void showCommandError(String command, String message) {\n\t}", "java.lang.String getErrmsg();", "public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}", "@Override\n\tpublic String doError() {\n\t\treturn null;\n\t}", "public void fatalError(ValidationType type, String validationName, String content);", "public static void showError (Exception e)\n\t{\n\t\tString message = getErrorMessage(e);\n\t\n\t\t// filter out cancelled actions by the user which end up as\n\t\t// ModelExceptions after veto\n\t\tif (message != null)\n\t\t{\n\t\t\tNotifyDescriptor desc = new NotifyDescriptor.Message(\n\t\t\t\tmessage, NotifyDescriptor.ERROR_MESSAGE);\n\n\t\t\tDialogDisplayer.getDefault().notify(desc);\n\t\t}\n\t}", "private void update () {\n // JST: this can be improved in future...\n String lm = current.getLocalizedMessage ();\n String nm = current.getMessage ();\n boolean isLocalized = lm != null && !lm.equals (nm);\n\n next.setVisible (exceptions.hasMoreElements ());\n details.setText (\n showDetails\n ?\n org.openide.util.NbBundle.getBundle(NotifyException.class).getString(\"CTL_Exception_Hide_Details\")\n :\n org.openide.util.NbBundle.getBundle(NotifyException.class).getString(\"CTL_Exception_Show_Details\")\n );\n\n\n if (current instanceof InvocationTargetException) {\n // go in\n current = ((InvocationTargetException)current).getTargetException ();\n }\n\n // setText (current.getLocalizedMessage ());\n String title = org.openide.util.NbBundle.getBundle(NotifyException.class).getString(\"CTL_Title_Exception\");\n\n if (showDetails) {\n descriptor.setMessage (createDetails ());\n } else {\n if (isLocalized) {\n String msg = current.getLocalizedMessage ();\n if (msg == null || \"\".equals(msg)) { // NOI18N\n msg = org.openide.util.Utilities.wrapString (\n msg, MAXIMUM_TEXT_WIDTH, false, false\n );\n }\n descriptor.setMessage (msg);\n } else {\n // emphasize user-non-friendly exceptions\n // if (this.getMessage() == null || \"\".equals(this.getMessage())) { // NOI18N\n descriptor.setMessage (\n java.text.MessageFormat.format(\n NbBundle.getBundle (NotifyDescriptor.class).getString(\"NTF_ExceptionalException\"),\n new Object[] {\n current.getClass().getName()\n }\n )\n );\n\n title = NbBundle.getBundle (NotifyDescriptor.class).getString(\n \"NTF_ExceptionalExceptionTitle\" // NOI18N\n );\n }\n }\n\n descriptor.setTitle (title);\n }", "private void printErrorMenu() {\n System.out.println(\"Invalid input. Please check inputs and try again.\");\n }", "private void printErrorAlert(String title, String header, String message) {\r\n\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\r\n\t\tif(title.length()>0)\r\n\t\t\talert.setTitle(title);\r\n\t\tif(header.length()>0)\r\n\t\t\talert.setHeaderText(header);\r\n\t\tif(message.length()>0)\r\n\t\t\talert.setContentText(message);\r\n\t\tStage stage = (Stage) alert.getDialogPane().getScene().getWindow();\r\n\t\tstage.getIcons().add(new Image(this.getClass().getResource(\"x.png\").toString()));\r\n\t\talert.showAndWait();\r\n\t}", "public void exception(String message) {\n JOptionPane.showMessageDialog(frame, message, \"exception\", JOptionPane.ERROR_MESSAGE);\n }", "String getException();", "String getException();", "NotANumberException() { /* This is the exception constructor that is ran */\r\n\t\tsuper(\"Sorry Not A Number!\"); /* This will print off custom text to the console */\r\n\t\tJOptionPane.showMessageDialog(null, \"Sorry, Not a Number!\", \"Wrong Input\", JOptionPane.ERROR_MESSAGE);\r\n\t\t/* Above line of code will show a text box with the message \"Sorry, Not a Number\" */\r\n\t}", "void displayLoadingErrorMessage();", "@Override\n\tpublic String getMessage()\n\t{\n\t\treturn errMessage;\n\t}", "public void show(Object errorMessage){\n\t\tSystem.out.println(\"Woops, something bad happened\");\n\t\tSystem.out.println(errorMessage);\n\t}", "void drawError(String message);", "public void error(String message) {\n ui.say(\"ERROR: \" + message);\n }", "public void showErrorMessage(String message){\n System.out.println(LocalTime.now() + \": Error: \" + message);\n }", "public void error();", "public void displayNoSuchMovieException(NoSuchMediaException ex) {\n JOptionPane.showMessageDialog(frame, ex.getMessage());\n\n }", "void printError(String errorMsg, boolean displayHelp);", "private static void printErrorMessage() {\n System.out.println(\"Oh no! It looks like I wasn't able to understand the arguments you passed in :(\"\n + \"\\nI can only handle arguments passed in a format like the following: 1/2 * 3/4\\n\");\n }", "public String getErrorTextDefault()\n {\n return errorTextDefault;\n }", "java.lang.String getErr();", "public String getExceptionMessage() {\n\t\treturn \"Error while publishing JSON reports. Please contact system administrator or try again later!\";\n\t}", "public void showError(String message) {\n JOptionPane.showMessageDialog(this, message, \"Error!\", JOptionPane.ERROR_MESSAGE);\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"com.cg.Exercise4Exception\"+super.getMessage();\r\n\t}", "public notHumanBeingException(String message){// Message parameted created\n super(message);\n \n }", "public void showInputError() {\n\n resultLabel.setText(\"Choose another space!\");\n\n }", "public void addError(String message);", "public void displayError(String title, String message, Throwable error) {\n\t\tMessageDialog.openError(getShell(), title, message);\n\t\terror.printStackTrace();\n\t}", "private void showInvalidFileFormatError()\n {\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Image Load Error\");\n alert.setHeaderText(null);\n alert.setContentText(\"The file was not recognized as an image file.\");\n\n alert.showAndWait();\n }", "public static void displayLaunchError(Shell shell, ILaunchConfiguration config, Exception e) {\n\t\tString title = \"Problem Occured\"; \n\t\tString message = \"Opening the configuration dialog has encoutered a problem.\\n\\n\" + e.getLocalizedMessage();\n\t\tMessageDialog.openError(shell, title, message);\n\t}", "private void error(String message) { \n Alert alert = new Alert(Alert.AlertType.ERROR, message);\n alert.setTitle(I18n.tr(\"imagesizedialog.error.title\"));\n alert.setContentText(message);\n alert.showAndWait();\n }", "protected String formatErrorMessage() throws SQLException {\n \tint errCode = SQLite.extendederrcode(getConnection().getSqliteDb());\r\n \tString message = SQLite.errmsg(getConnection().getSqliteDb());\r\n\t\tString s = StringUtil.format(\"Code:{0}\\n{1}\", errCode, message);\r\n\t\treturn s;\r\n\t}", "private void showError(String text, String title){\n JOptionPane.showMessageDialog(this,\n text, title, JOptionPane.ERROR_MESSAGE);\n }", "public String getMessage()\n {\n return super.getMessage()+promo_error+\"not found\";\n }", "@Override\n public String getErrorMessage() {\n return null;\n }", "static GitletException error(String msgFormat, Object... arguments) {\n return new GitletException(String.format(msgFormat, arguments));\n }" ]
[ "0.71806073", "0.71806073", "0.7157379", "0.7079116", "0.69336325", "0.67983115", "0.6794317", "0.6770365", "0.6766058", "0.67577493", "0.67523634", "0.6708956", "0.66848654", "0.665835", "0.6581043", "0.6571107", "0.65678734", "0.6563143", "0.6549576", "0.65410733", "0.6535798", "0.6493368", "0.6493368", "0.6493368", "0.6493368", "0.6493368", "0.6493368", "0.6493368", "0.6493368", "0.6493368", "0.6493368", "0.6493368", "0.6493368", "0.64923286", "0.6491106", "0.6468245", "0.64663637", "0.6453105", "0.6451582", "0.64384925", "0.6436192", "0.6425417", "0.6420159", "0.64163953", "0.6399591", "0.6399591", "0.6387817", "0.6387817", "0.6387817", "0.6387817", "0.6376558", "0.63624406", "0.6360797", "0.63588613", "0.63588613", "0.63588613", "0.6358485", "0.63436174", "0.6324817", "0.631167", "0.6311544", "0.63096917", "0.62869555", "0.62807906", "0.6279329", "0.6262775", "0.6258825", "0.62532836", "0.6251781", "0.6249391", "0.6247985", "0.6247985", "0.6237233", "0.6206928", "0.62054676", "0.62024", "0.6195203", "0.61905646", "0.6184186", "0.6177539", "0.61738014", "0.61701477", "0.61675894", "0.61658305", "0.61601", "0.61464095", "0.6142935", "0.6138336", "0.6136753", "0.61256814", "0.61225593", "0.6105032", "0.6104851", "0.6104271", "0.6104089", "0.610395", "0.6103015", "0.60985917", "0.60889274", "0.60868275" ]
0.6920852
5
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); b1 = (Button) findViewById(R.id.btn_webbrowser); b1.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { Intent i = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://www.amazon.com")); // could use i.setData(Uri.....) startActivity(i); } }); b2 = (Button) findViewById(R.id.btn_makecalls); b2.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { Intent i = new Intent(android.content.Intent.ACTION_DIAL, Uri.parse("tel:+2105228311")); startActivity(i); } }); b3 = (Button) findViewById(R.id.btn_showMap); b3.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { Intent i = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("geo:37.827500,-122.481670")); startActivity(i); } }); b4 = (Button) findViewById(R.id.btn_chooseContact); b4.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { Intent i = new Intent(android.content.Intent.ACTION_PICK); i.setType(ContactsContract.Contacts.CONTENT_TYPE); startActivityForResult(i, theRequestCode); } }); b5 = (Button) findViewById(R.id.btn_launchMyBrowser); b5.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { Intent i = new Intent("com.maranr.MyBrowser"); i.setData(Uri.parse("http://www.amazon.com")); startActivityForResult(i, theRequestCode); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\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}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "@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 }", "protected void onCreate() {\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n public void onCreate() {\n initData();\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 onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}", "protected void onFirstTimeLaunched() {\n }", "@Override\n public void onActivityCreated(@Nullable Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n initData(savedInstanceState);\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n public void onCreate() {\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}", "@Override\n public void onCreate() {\n\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitViewPager();\r\n\t\t\r\n\t\tinitView();\r\n\r\n\t\tinitCursor();\r\n\t\t\r\n\t\tinithuanxin(savedInstanceState);\r\n\t\r\n \r\n\t}", "public void onCreate() {\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.caifushi_record);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitview();\n\t\tMyApplication.getInstance().addActivity(this);\n\t\t\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_recent_activity);\n\t\tsetTitleFromActivityLabel(R.id.title_text);\n\t\tsetupStartUp();\n\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }", "@Override\n public void onCreate()\n {\n\n\n }", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.act_myinfo);\n\t\tinitView();\n\t\tinitEvents();\n\n\t}", "public void onCreate();", "public void onCreate();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.auth_activity);\n connectVariablesToViews();\n listenToFields();\n WorkSpace.authorizationCompleted = false;\n }", "@Override\n public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tDisplayMetrics dm = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(dm);\n\n\t\tintScreenX = dm.widthPixels;\n\t\tintScreenY = dm.heightPixels;\n\t\tscreenRect = new Rect(0, 0, intScreenX, intScreenY);\n\n\t\thideTheWindowTitle();\n\n\t\tSampleView view = new SampleView(this);\n\t\tsetContentView(view);\n\n\t\tsetupRecord();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo();\n\t\t} else {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo();\n\t\t}\n\t\tBaseApplication.totalList.add(this);\n\t}", "@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\t\n\t\tappManager = AppManager.getAppManager();\n\t\tappManager.addActivity(this);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.listexcursionscreen);\n\n ActionsDelegator.getInstance().synchronizeActionsWithServer(this);\n runId = PropertiesAdapter.getInstance(this).getCurrentRunId();\n\n RunDelegator.getInstance().loadRun(this, runId);\n ResponseDelegator.getInstance().synchronizeResponsesWithServer(this, runId);\n\n }", "@Override\n\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}", "@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAppManager.getInstance().addActivity(this);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n\tpublic void onCreate() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate();\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.add_daily_task);\n init_database();\n init_view();\n init_click();\n init_data();\n init_picker();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t\n\t\tactivity = (MainActivity)getActivity(); \n\t\t\n\t\tactivity.setContListener(this);\n\t\t\n\t\tif(MODE == Const.MODE_DEFAULT){\n\t\t\tinitializeInfoForm();\n\t\t}else{\n\t\t\tinitializeAddEditForm();\t\t\t\n\t\t}\n\t\t\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tinitView();\n\n\t\tinitData();\n\n\t\tinitEvent();\n\n\t\tinitAnimation();\n\n\t\tshowUp();\n\t}", "@Override\n public void onCreate() {\n Thread.setDefaultUncaughtExceptionHandler(new TryMe());\n\n super.onCreate();\n\n // Write the content of the current application\n context = getApplicationContext();\n display = context.getResources().getDisplayMetrics();\n\n\n // Initializing DB\n App.databaseManager.initial(App.context);\n\n // Initialize user secret\n App.accountModule.initial();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }" ]
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879", "0.74805456", "0.7475343", "0.7469598", "0.7469598", "0.7455178", "0.743656", "0.74256307", "0.7422192", "0.73934627", "0.7370002", "0.73569906", "0.73569906", "0.7353011", "0.7347353", "0.7347353", "0.7333878", "0.7311508", "0.72663945", "0.72612154", "0.7252271", "0.72419256", "0.72131634", "0.71865886", "0.718271", "0.71728176", "0.7168954", "0.7166841", "0.71481615", "0.7141478", "0.7132933", "0.71174103", "0.7097966", "0.70979583", "0.7093163", "0.7093163", "0.7085773", "0.7075851", "0.7073558", "0.70698684", "0.7049258", "0.704046", "0.70370424", "0.7013127", "0.7005552", "0.7004414", "0.7004136", "0.69996923", "0.6995201", "0.69904065", "0.6988358", "0.69834954", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69783133", "0.6977392", "0.69668365", "0.69660246", "0.69651115", "0.6962911", "0.696241", "0.6961096", "0.69608897", "0.6947069", "0.6940148", "0.69358927", "0.6933102", "0.6927288", "0.69265485", "0.69247025" ]
0.0
-1
Returns the valid policy tree from the validation.
@DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2014-08-13 13:14:15.602 -0400", hash_original_method = "4B5496A79468DEC2FA84449A5CCBD295", hash_generated_method = "06016682917508DEF780A2C1DA1531D4") public PolicyNode getPolicyTree() { return policyTree; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private LispTree getRuleLispTree() {\n LispTree tree = LispTree.proto.newList();\n tree.addChild(\"rules\");\n getRuleLispTreeRecurs(tree);\n return tree;\n }", "public SoftAssert validator() {\n return pageValidator;\n }", "public ValidationContext buildValidationContext() {\n return validationContextObjectFactory.getObject();\n }", "public PhaseValidator getPhaseValidator() {\r\n return this.delegate.getPhaseValidator();\r\n }", "PolicyDecision getDecision();", "public Node computePostPrunedTree(Node parent, int M,\n\t\t\tArrayList<ArrayList<String>> validationData) {\n\t\tprunedTree = new Node();\n\t\tcopyTree(parent, prunedTree);\n\t\tdouble accuracyPrunedTree = computeAccuracy(prunedTree, validationData);\n\t\t// System.out.println(\"Here the accuracy : \" + accuracyPrunedTree);\n\t\ttempTree = new Node();\n\t\t// for (int i = 1; i <= l; i++) {\n\t\tcopyTree(parent, tempTree);\n\t\tRandom random = new Random();\n\t\t// int M = 1 + random.nextInt(k);\n\t\tfor (int j = 1; j <= M; j++) {\n\t\t\t// System.out.println(\"\\n***Loop \" + j + \"***\");\n\t\t\tcalculateNumLeafNodes(tempTree); // sets the number of leafnodes\n\t\t\t\t\t\t\t\t\t\t\t\t// in the class variable\n\t\t\tint N = getNumberNonLeafNodes();\n\t\t\t// System.out.print(\"N : \" + N);\n\t\t\tif (N > 1) {\n\t\t\t\tint P = random.nextInt(N) + 1;\n\t\t\t\t// System.out.print(\" ; P : \" + P);\n\t\t\t\treplaceNode(tempTree, P);\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdouble accuracyTempTree = computeAccuracy(tempTree, validationData);\n\t\t\t// System.out.println(\"accuracyTempTree : \" + accuracyTempTree\n\t\t\t// + \" ; accuracyPrunedTree : \" + accuracyPrunedTree);\n\t\t\tif (accuracyTempTree < accuracyPrunedTree) {\n\t\t\t\taccuracyPrunedTree = accuracyTempTree;\n\t\t\t\tcopyTree(tempTree, prunedTree);\n\t\t\t\t// System.out.println(\"Copy Happened\");\n\t\t\t}\n\t\t}\n\t\treturn prunedTree;\n\t}", "public PMQuadtree(Validator validator) {\n\t\tthis.validator = validator;\n\t\troot = whiteSingleton;\n\t\t\n\t\tspatialOrigin = new Point2D.Float(0, 0);\n\t\t\n\t}", "private JPanel getValidationPanel() {\r\n\t\tif (validationPanel == null) {\r\n\t\t\tjava.awt.FlowLayout flowLayout3 = new FlowLayout();\r\n\t\t\tvalidationPanel = new JPanel();\r\n\t\t\tvalidationPanel.setLayout(flowLayout3);\r\n\t\t\tflowLayout3.setHgap(10);\r\n\t\t\tflowLayout3.setVgap(10);\r\n\t\t\tvalidationPanel.add(getOkButton(), null);\r\n\t\t\tvalidationPanel.add(getCancelButton(), null);\r\n\t\t}\r\n\t\treturn validationPanel;\r\n\t}", "public boolean isValidateRoot() {\n/* 246 */ return true;\n/* */ }", "public boolean isValidateRoot() {\n/* 463 */ return true;\n/* */ }", "public String getValidation() {\n return this.validation;\n }", "public ID getValidation() { \r\n\t\tID retVal = this.getTypedField(47, 0);\r\n\t\treturn retVal;\r\n }", "public ID getPsl47_Validation() { \r\n\t\tID retVal = this.getTypedField(47, 0);\r\n\t\treturn retVal;\r\n }", "public String getPolicy() {\r\n String policy = \"\";\r\n if (!policyRules.isEmpty()) {\r\n policy += policyRules.get(0).getRule().trim();\r\n for (int i = 1; i < policyRules.size(); i++) {\r\n policy += \",\" + policyRules.get(i).getRule().trim();\r\n }\r\n }\r\n\r\n return policy.trim();\r\n }", "@Override\r\n\tpublic Validation<Escala> getValidation() {\n\t\treturn new EscalaValidation();\r\n\t\t\r\n\t}", "Status validate(RevisionInternal newRev, RevisionInternal prevRev, String parentRevID);", "public Validator getValidator() {\n return _validator;\n }", "public int getValidationLevel() {\n return validationLevel;\n }", "public Validator<V> getValidator();", "public boolean getValidation() {\n return validate;\n }", "List<Subscription> validated() {\n return expressions;\n }", "public ValidationData getValidationData() {\n return validationData;\n }", "public ExprNode validate(ExprValidationContext validationContext) throws ExprValidationException {\n if (this.getChildNodes().length != 1) {\n throw new ExprValidationException(\"The NOT node requires exactly 1 child node\");\n }\n\n ExprForge forge = this.getChildNodes()[0].getForge();\n Class childType = forge.getEvaluationType();\n if (!JavaClassHelper.isBoolean(childType)) {\n throw new ExprValidationException(\"Incorrect use of NOT clause, sub-expressions do not return boolean\");\n }\n evaluator = forge.getExprEvaluator();\n return null;\n }", "public interface ValidParserRules {\n String getName();\n String getPrefix();\n PropertyType getType();\n ValidParserRules getParent();\n}", "@Override\n protected TopLevelPolicyElementEvaluator resolvePolicyWithRefDepthCheck(final EvaluationContext evalCtx, final Optional<EvaluationContext> mdpCtx) throws IllegalArgumentException, IndeterminateEvaluationException\n {\n return resolvePolicy(null, evalCtx, mdpCtx);\n }", "public Boolean getValid() {\n\t\treturn valid;\n\t}", "public Map getValidatorMap();", "@java.lang.Override\n public boolean getValid() {\n return valid_;\n }", "@Override\r\n public ValidState getValidState() {\n return ValidState.getTrueInstance();\r\n }", "@java.lang.Override\n public boolean getValid() {\n return valid_;\n }", "public String validate() {\n if (rootName == null) {\n return \"Missing root name.\";\n }\n return null;\n }", "ValidationResponse validate();", "public Node validate(Source source) {\n\n\t\t// get a transformer\n\t\tTransformer t = null;\n\t\ttry {\n\t\t\tt = schematronTemplates.newTransformer();\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\tthrow new Error(\"There was a problem configuring the transformer.\",\n\t\t\t\t\te);\n\t\t}\n\n\t\t// call the transform\n\t\tDOMResult svrlRes = new DOMResult();\n\t\ttry {\n\t\t\tt.transform(source, svrlRes);\n\t\t} catch (TransformerException e) {\n\t\t\tthrow new Error(\n\t\t\t\t\t\"There was a problem running Schematron validation XSL.\", e);\n\t\t}\n\t\treturn svrlRes.getNode();\n\t}", "public IContextInformationValidator getContextInformationValidator() {\n\t\treturn fValidator;\n\t}", "Set<OptionDTO> getRequiredOptionTree(Integer optionId);", "public Tree<String> parse(Tree<State> tree) {\n\t\tTree<String> parsed = null;\n\t\ttry { // do NOT expect it to crash\n\t\t\tviterbiParse(tree);\n\t\t\tparsed = StateTreeList.stateTreeToStringTree(tree, Inferencer.grammar.numberer);\n\t\t\tparsed = Inferencer.extractBestMaxRuleParse(chart, parsed.getYield());\n\t\t} catch (Exception e) {\n\t\t\tparsed = new Tree<String>(Inferencer.DUMMY_TAG);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn parsed;\n\t}", "public JTree getTreeOfInputs(){\n return this.tree;\n }", "public StaticApplicablePolicyView getStaticApplicablePolicies()\n\t{\n\t\treturn this.rootPolicyEvaluator.getStaticApplicablePolicies();\n\t}", "private static JsonNode validate (Request req, Response res) {\n FeedVersion version = requestFeedVersion(req, \"manage\");\n\n // FIXME: Update for sql-loader validation process?\n return null;\n// return version.retrieveValidationResult(true);\n }", "public Document getDocumentForValidation() {\n return documentForValidation;\n }", "public Element getSelectedPolicyElement() {\n Element selectedPolicyElement = null;\n IStructuredSelection categoriesCompositeSelection =\n (IStructuredSelection) getTreeViewer().getSelection();\n\n if (!categoriesCompositeSelection.isEmpty()) {\n Element selectedElement = (Element)\n categoriesCompositeSelection.getFirstElement();\n\n if (selectedElement.getName().\n equals(DeviceRepositorySchemaConstants.\n POLICY_ELEMENT_NAME)) {\n selectedPolicyElement = selectedElement;\n }\n }\n return selectedPolicyElement;\n }", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public ValidationModel getValidationModel() {\n \n Logger logger = Logger.getLogger(AvdSupport.class.getName());\n \n\n logger.log(Level.SEVERE, \"Creatig valiation model\");\n logger.log(Level.SEVERE, \"Reading file: \");\n FileObject fo = avdDataObject.getPrimaryFile();\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(fo.getInputStream()));\n \n String line = null;\n while ((line = br.readLine()) != null) {\n logger.log(Level.SEVERE, \"line: {0}\", line);\n }\n \n } catch (FileNotFoundException ex) {\n Exceptions.printStackTrace(ex);\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n \n \n // TODO: implement\n // throw new UnsupportedOperationException(\"Not supported yet.\");\n \n \n \n return null;\n }", "public Type evaluateRootType() {\n\t\t\tNode parsedTreeNode = this.parsedTree.get(); // Gets the Node from the Optional\n //ensures that tree is valid before analyzing it\n if (TypeUtilities.isTreeValid(parsedTreeNode)) {\n \treturn traverseTree(parsedTreeNode);\n }\n throw new UndeterminableTypeException(\"Input Tree was Invalid.\");\n }", "public YangTreeNode getSchemaTree() {\n\t\treturn schemaTree;\n\t}", "protected java.security.Policy getPolicy(){\n\tif (stateIs(INSERVICE_STATE)) {\n\t return this.policy;\n\t} \n\tif (logger.isLoggable(Level.FINEST)) {\n\t logger.finest(\"JACC Policy Provider: getPolicy (\"+CONTEXT_ID+\") is NOT in service\");\n\t}\n\treturn null;\n }", "boolean getValid();", "public String getValid() {\n return valid;\n }", "public String validate() {\n\t\treturn \"valid\";\n\t}", "@Override\n protected void checkPolicyRefChain(final TopLevelPolicyElementEvaluator nonNullRefResultPolicy, final EvaluationContext evalCtx, final Optional<EvaluationContext> mdpCtx)\n {\n }", "private Node<E> validate(Position<E> p) throws IllegalArgumentException {\n\t\tif (!(p instanceof Node)) throw new IllegalArgumentException(\"Invalid p\");\n\t\tNode<E> node = (Node<E>) p;\n\t\tif (node.getNext() == null)\n\t\t\tthrow new IllegalArgumentException(\"p is no longer in the list\");\n\t\treturn node;\n\t}", "public void assertValid(adamant.global.v1.CreatePolicyResponse proto, io.envoyproxy.pgv.ValidatorIndex index) throws io.envoyproxy.pgv.ValidationException {\n\n\t\n\t}", "public List<ModelValidator> getDetailedValidators() {\n return detailedValidators;\n }", "public boolean isValidateRoot()\r\n\t{\r\n\t\treturn(true);\r\n\t}", "public ValidationController getValidationController()\r\n\t{\r\n\t\treturn validationController;\r\n\t}", "public ShortestPathStateSpaceValidator(StateValidator validator) {\n\t\tsuper();\n\t\tif (validator==null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.validator = validator;\n\t}", "public TypeCheckerProofRule getRule ( ) ;", "private void IfTreeIsValid(HttpServletRequest request, HttpServletResponse response) throws IOException {\n XMLTree tree;\n tree = XMLTree.getInstance();\n response.getWriter().write(tree.validate());\n }", "@DISPID(1611006004) //= 0x60060034. The runtime will prefer the VTID if present\n @VTID(79)\n boolean constraintsNodeInTree();", "@Override\n public String toString() {\n if (valid())\n return \"valid\";\n return print(errors + \":\" + validator);\n }", "public ValidationModule getModuleDefinition();", "private <T extends Operation>void generateVisibilityLevels(TreeNode <T>tn) {\n Policy opp = new Policy();\n MetaChoke f = tn.getInfo();\n if (f.hasFeature(Features.PUBLIC)) {\n opp = applyPublicVF();\n } else if (f.hasFeature(Features.RESERVED)) {\n opp = applyReservedVF();\n } else if (f.hasFeature(Features.CONFIDENTIAL)) {\n opp = applyConfidentialVF();\n } else if (f.hasFeature(Features.SECRET)) {\n opp = applySecretVF();\n }\n else{\n //IN CASE NO FEATURE WAS PROVIDED TO LEAF SET IT TO PUBLIC\n f.addFeature(Features.PUBLIC);\n }\n //V2 INCOMPATIBLE tn.getElement().setPolicy(opp);\n }", "public String getValidatorProperty() {\n return _validatorProperty;\n }", "public String getTree ( ) {\n\n String tree;\n StringWriter s = new StringWriter();\n PrintWriter out = null;\n\n try {\n out = new PrintWriter(s);\n } catch ( Exception ex ) {};\n\n program.printIndividual(param.Parameters.STATE, out);\n\n tree = s.toString();\n String list2[] = tree.split(\"\\n\");\n\n out.close();\n try { s.close(); } catch ( Exception e ) {};\n\n return list2[list2.length - 1];\n\n }", "public void validate() throws ValidationException {\r\n/* 522 */ Validator validator = new Validator();\r\n/* 523 */ validator.validate(this);\r\n/* */ }", "public boolean getValidated(Player p) {\n return this.getInstance(p).getValidated();\n }", "public IValidator[] getValidators();", "public HtmlValidatorText getValidator() {\r\n\t\treturn _validator;\r\n\t}", "public static ResolutionNode generateResolutionTree(){\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = getConnection();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t};\n\t\tResolutionNode tree = new ResolutionNode();\n\t\ttree.setAc_id(0);\n\t\ttree.setName(\"root\");\n\t\ttree.setPath(\"\");\n\t\ttree.setSupertype(tree);\n\t\tResolutionNode r = generateResolutionTree(0, tree, new ArrayList<ContextParameterType>(), new ArrayList<QualityParameterType>(), new ArrayList<CostParameterType>(), new ArrayList<RankingParameterType>(), \"root\");\n\t\tcloseConnnection(con);\n\t\treturn r;\n\t}", "Policy _get_policy(int policy_type);", "public interface IValidator {\n\n\tvoid validate(Version version);\n\t\n\tboolean matchProblems(Problem validationErrorA, Problem validationErrorB);\n\t\n\tEObject getContextElement(Problem validationError);\n}", "public String toString()\n\t\t{\n\t\t\tsynchronized(ExecutionPolicy.class)\n\t\t\t{\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\ttoStringIndent++;\n\t\t\t\tif (rules == null) sb.append(indent()).append(\"null\\n\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor (ExecutionPolicy ep: rules) sb.append(ep.toString());\n\t\t\t\t}\n\t\t\t\ttoStringIndent--;\n\t\t\t\treturn sb.toString();\n\t\t\t}\n\t\t}", "public Boolean getValidate(){\n return validated;\n }", "public ViewObjectImpl getDcmValidationView() {\r\n return (ViewObjectImpl)findViewObject(\"DcmValidationView\");\r\n }", "public String validationKey() {\n return this.validationKey;\n }", "public List<Validator> getValidators() {\n return Collections.unmodifiableList(validators);\n }", "public static SigningPolicy getPolicy(String fileName, \n String requiredCaDN) \n throws SigningPolicyParserException {\n \n if ((fileName == null) || (fileName.trim().equals(\"\"))) {\n throw new IllegalArgumentException();\n }\n \n logger.debug(\"Signing policy file name \" + fileName + \" with CA DN \"\n + requiredCaDN);\n\n FileReader fileReader = null;\n \n try {\n fileReader = new FileReader(fileName);\n } catch (FileNotFoundException exp) {\n if (fileReader != null) {\n try {\n fileReader.close();\n } catch (Exception e) {\n }\n }\n throw new SigningPolicyParserException(exp.getMessage(), exp);\n }\n\n SigningPolicy policy = getPolicy(fileReader, requiredCaDN);\n policy.setFileName(fileName);\n logger.debug(\"Policy file parsing completed, policy is \" + \n (policy == null));\n return policy;\n }", "@Override\n protected Validator getValidator() {\n return super.getValidator();\n }", "public Tree getDepTree() {\r\n return depTree;\r\n }", "public void checkTree() {\r\n checkTreeFromNode(treeRoot);\r\n }", "public PolicyMap getPolicyMap();", "protected Validator createValidator (PrintStream out)\n {\n return new Validator(out);\n }", "public boolean getValidity();", "public Element createValidateElement(ValidateTask task) {\n\t\tElement result = this.document.createElement(\"validate\");\n//\t\tBPELUtil.setStandardAttributes(result, task);\n\t\t\n\t\tList<VariableDataObject> variables = \n\t\t\tthis.diagram.getStandardVariables(task, false);\n\t\tString variablesStr = \"\";\n\t\tfor (Iterator<VariableDataObject> it = variables.iterator(); it.hasNext();) {\n\t\t\tif (variablesStr.equals(\"\")) {\n\t\t\t\tvariablesStr += it.next().getName();\n\t\t\t} else {\n\t\t\t\tvariablesStr += \" \" + it.next().getName();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (variablesStr.equals(\"\")) {\n\t\t\tthis.output.addError(\"The variables for this validate task could not be determined.\", task.getId() );\n\t\t} else {\n\t\t\tresult.setAttribute(\"variables\", variablesStr);\n\t\t}\n\t\t\n//\t\treturn createScopeForAttachedHandlers(result, task);\n\t\treturn null;\n\t}", "public ViewObjectImpl getDcmTemplateValidationView() {\r\n return (ViewObjectImpl)findViewObject(\"DcmTemplateValidationView\");\r\n }", "public void parseValidPres(XPRParser.Validate_presenceContext ctx, State rootState) {\n\n String name_state = rootState.getname();\n for (int i = 0; i < ctx.ID_GLOBAL().size(); i++) {\n String name = ctx.ID_GLOBAL().get(i).getText().substring(1);\n\n Sort sort1 = rootState.getSort(name_state);\n // this field is related to one of association rules\n if (rootState.getRelation(name) != null) {\n Sort sort2 = z3ctx.mkUninterpretedSort(z3ctx.mkSymbol(name));\n\n\n Expr item1 = z3ctx.mkConst(sort2.getName(), sort2);\n Expr item2 = z3ctx.mkConst(sort1.getName(), sort1);\n\n Expr[] argOwner = new Expr[2];\n argOwner[0] = item1;\n argOwner[1] = item2;\n\n Invariant inv = new presenceInv(sort1, sort2, name_state, name);\n db.addInv(inv);\n } else {\n Sort sort2 = z3ctx.mkUninterpretedSort(z3ctx.mkSymbol(name));\n if (rootState.getSort(name) == null) {\n rootState.addSort(sort2);\n }\n TupleSort t_sort = z3ctx.mkTupleSort(z3ctx.mkSymbol(\"mk_field_tuple\"), // name of\n new Symbol[]{sort2.getName(), sort1.getName()}, // names\n new Sort[]{sort2, sort1});\n\n SetSort sortRel = z3ctx.mkSetSort(t_sort);\n Expr relation = z3ctx.mkConst(name + \"_field\", sortRel);\n rootState.putSort(name, sort2);\n rootState.addFileds(name);\n\n rootState.putSort(rootState + name, sortRel);\n\n SetSort ss = z3ctx.mkSetSort(sort2);\n Expr field_set = z3ctx.mkConst(name, ss);\n rootState.putExpr(name, field_set);\n rootState.putExpr(name_state + name, relation);\n Invariant inv = new checkFieldInv(sort1, sort2, name_state, name);\n db.addInv(inv);\n }\n }\n }", "StoragePolicyDecisionPoint getStoragePolicyDecisionPoint();", "TypeDescription validated();", "public IContextInformationValidator getContextInformationValidator() {\n return null;\r\n }", "public abstract List<AbstractPolicy> getPolicies();", "public final EObject ruleValidation() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_pourcentage_1_0=null;\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:394:2: ( (otherlv_0= 'Validation' ( (lv_pourcentage_1_0= RULE_INT ) ) ) )\n // InternalMyDsl.g:395:2: (otherlv_0= 'Validation' ( (lv_pourcentage_1_0= RULE_INT ) ) )\n {\n // InternalMyDsl.g:395:2: (otherlv_0= 'Validation' ( (lv_pourcentage_1_0= RULE_INT ) ) )\n // InternalMyDsl.g:396:3: otherlv_0= 'Validation' ( (lv_pourcentage_1_0= RULE_INT ) )\n {\n otherlv_0=(Token)match(input,19,FOLLOW_16); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getValidationAccess().getValidationKeyword_0());\n \t\t\n // InternalMyDsl.g:400:3: ( (lv_pourcentage_1_0= RULE_INT ) )\n // InternalMyDsl.g:401:4: (lv_pourcentage_1_0= RULE_INT )\n {\n // InternalMyDsl.g:401:4: (lv_pourcentage_1_0= RULE_INT )\n // InternalMyDsl.g:402:5: lv_pourcentage_1_0= RULE_INT\n {\n lv_pourcentage_1_0=(Token)match(input,RULE_INT,FOLLOW_2); \n\n \t\t\t\t\tnewLeafNode(lv_pourcentage_1_0, grammarAccess.getValidationAccess().getPourcentageINTTerminalRuleCall_1_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getValidationRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"pourcentage\",\n \t\t\t\t\t\tlv_pourcentage_1_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.INT\");\n \t\t\t\t\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public String getIsValid() {\n return isValid;\n }", "public int getValidParentSetCount() {\r\n\t\t\treturn validParentSetCount;\r\n\t\t}", "public interface ValidatingRule extends NormalisationRule\n{\n /**\n * Performs validation for the given stage by validating the input object using the criteria\n * defined for this rule.\n * \n * @param stage\n * A URI denoting the stage to use. This stage must be a valid stage for this type of\n * rule based on the result of validForStage(stage)\n * @param input\n * The input object to be validated by this rule.\n * @return True if the validation succeeded, or false otherwise.\n * @throws InvalidStageException\n * If the given stage was not valid.\n * @throws ValidationFailedException\n * If the validation failed.\n * @throws QueryAllException\n * If the validation process did not complete.\n */\n boolean normaliseByStage(URI stage, Object input) throws InvalidStageException, ValidationFailedException,\n QueryAllException;\n \n /**\n * Validates the given input object in the stage after query creation, but before query parsing.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageAfterQueryCreation(Object input) throws ValidationFailedException;\n \n /**\n * Validates the given input object in the stage after query parsing, but before query\n * submission to the provider.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageAfterQueryParsing(Object input) throws ValidationFailedException;\n \n /**\n * Validates the given input object in the stage after the RDF results have been imported from\n * the results for a provider, but before they have been merged into a pool with results from\n * other providers.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageAfterResultsImport(Object input) throws ValidationFailedException;\n \n /**\n * Validates the given input object in the stage after the combined RDF statements in the pool\n * have been serialised to the results document.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageAfterResultsToDocument(Object input) throws ValidationFailedException;\n \n /**\n * Validates the given input object in the stage after the RDF results have been merged into a\n * pool of RDF statements, but before they have been serialised to the results document.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageAfterResultsToPool(Object input) throws ValidationFailedException;\n \n /**\n * Validates the given input object in the stage after results have been returned from a\n * provider, but before they have been parsed into RDF statements.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;\n \n /**\n * Validates the given input object in the stage where query variables are being normalised\n * based on the context of the provider.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageQueryVariables(Object input) throws ValidationFailedException;\n}", "private IAVLNode findSuccessor(IAVLNode node) \r\n\t {\r\n\t\t if(node.getRight().getHeight() != -1) \r\n\t\t\t return minPointer(node.getRight());\r\n\t\t IAVLNode parent = node.getParent();\r\n\t\t while(parent.getHeight() != -1 && node == parent.getRight())\r\n\t\t {\r\n\t\t\t node = parent;\r\n\t\t\t parent = node.getParent();\r\n\t\t }\r\n\t\t return parent;\t \r\n\t\t}", "public Collection getFullValidationList ()\n\t{\n\t\tArrayList list = new ArrayList(getBasicValidationList());\n\t\tString className = getClassName();\n\t\tPersistenceClassElement persistenceClass = \n\t\t\tgetPersistenceClass(className);\n\n\t\tif (persistenceClass != null)\n\t\t{\n\t\t\tPersistenceFieldElement[] fields = persistenceClass.getFields();\n\t\t\tint i, count = ((fields != null) ? fields.length : 0);\n\n\t\t\tlist.add(createSerializableClassComponent(className));\n\t\t\tlist.add(createKeyClassComponent(persistenceClass.getKeyClass()));\n\t\t\tlist.add(createClassMappingComponent(persistenceClass));\n\t\t\tlist.add(createKeyColumnMappingComponent(persistenceClass));\n\n\t\t\tfor (i = 0; i < count; i++)\n\t\t\t{\n\t\t\t\tPersistenceFieldElement field = fields[i];\n\n\t\t\t\tlist.add(createFieldCardinalityComponent(field));\n\t\t\t\tlist.add(createFieldMappingComponent(field));\n\t\t\t\tlist.add(createFieldBlobMappingComponent(field));\n\t\t\t\tlist.addAll(getRelatedClassValidationList(field));\n\t\t\t}\n\t\t}\n\n\t\treturn Collections.unmodifiableCollection(list);\n\t}", "amdocs.iam.pd.webservices.productrelations.checkproducteligibilityoutput.CheckProductEligibilityOutput getROOT();", "protected boolean getValidatedFlag() {\n createFlags();\n return flags[VALIDATED];\n }", "public final File getValidationOutputFolder() {\n\t\treturn validationOutputFolder;\n\t}", "public org.exolab.castor.xml.TypeValidator getValidator()\n {\n return this;\n }" ]
[ "0.5271666", "0.52428424", "0.50144935", "0.49873105", "0.4944026", "0.48447168", "0.48327783", "0.4826771", "0.48032534", "0.47990507", "0.47662166", "0.4734122", "0.47230652", "0.47097462", "0.46949282", "0.46691784", "0.4665935", "0.46481165", "0.46269605", "0.4622753", "0.46023312", "0.4598541", "0.45888704", "0.45821685", "0.45790797", "0.45548508", "0.45536485", "0.45263094", "0.45156458", "0.44883585", "0.4462133", "0.4455776", "0.44549918", "0.44432607", "0.44427782", "0.44197172", "0.44130063", "0.4393324", "0.43933207", "0.43918064", "0.43899718", "0.43848792", "0.4383522", "0.43835044", "0.43781504", "0.4377841", "0.43590158", "0.43552586", "0.43536875", "0.43384683", "0.4321263", "0.43172514", "0.43099976", "0.43088895", "0.43025905", "0.43017536", "0.42987266", "0.42932108", "0.4278662", "0.4268618", "0.42630696", "0.42620775", "0.42581034", "0.425384", "0.42463955", "0.42411983", "0.4237824", "0.42354026", "0.4225851", "0.42107877", "0.41806814", "0.41772932", "0.41725934", "0.41725525", "0.41712207", "0.4161235", "0.41499317", "0.41493267", "0.414851", "0.41479233", "0.4147103", "0.41460696", "0.41416365", "0.41381416", "0.4129272", "0.41280255", "0.41245833", "0.4123881", "0.41223407", "0.41212565", "0.41180587", "0.41136208", "0.4112061", "0.41049004", "0.4104474", "0.41036743", "0.40783632", "0.40765944", "0.40725645", "0.40717632" ]
0.54638344
0
Returns the subject public key from the validation.
@DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2014-08-13 13:14:15.603 -0400", hash_original_method = "9CA51125BBD9928A127E75CF99CB1D14", hash_generated_method = "10D7CA0C3FC5B5A6A133BC7DAAF5C8C5") public PublicKey getPublicKey() { return subjectPublicKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getSubjectKeyID();", "java.lang.String getSubjectKeyID();", "String publicKey();", "java.lang.String getPublicKey();", "public PublicKey getPubKey(){\r\n\t\treturn this.myCert.getPublicKey();\r\n\t}", "java.lang.String getPublicEciesKey();", "java.lang.String getPubkey();", "public String getPublicKey();", "String getPublicKey();", "public PublicKey getPublicKey() {\n return pk;\n }", "OctetString getPublicKey();", "@Nullable\n private String getCaptchaPublicKey() {\n return RegistrationToolsKt.getCaptchaPublicKey(mRegistrationResponse);\n }", "public PublicKey getPublicKey() {\n return publicKey;\n }", "public PublicKey getPublicKey() {\r\n return publicKey;\r\n }", "public byte[] getSubjectKeyIdentifier() {\n return x509SubjectKeyIdentifier;\n }", "public PublicKey getPublicKey() {\n File keyFile = new File(baseDirectory, pubKeyFileName);\n if (!keyFile.exists()) {\n if (!generateKeys()) {\n return null;\n }\n }\n if (!keyFile.exists()) {\n return null;\n }\n try {\n byte[] bytes = FileUtils.readFileToByteArray(keyFile);\n X509EncodedKeySpec ks = new X509EncodedKeySpec(bytes);\n KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n PublicKey pub = kf.generatePublic(ks);\n return pub;\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public String getAuthPublicKey() {\n return authPublicKey;\n }", "public String getPublicKeyIdentifier();", "public String getPublicKey() {\n return publicKey;\n }", "public String getPublicSubject() {\n return this.publicSubject;\n }", "com.google.protobuf.ByteString\n getSubjectKeyIDBytes();", "com.google.protobuf.ByteString\n getSubjectKeyIDBytes();", "public CPubkeyInterface getPubKey() {\n return new SaplingPubKey(this.f12197e.mo42966a(), mo42979b(), false);\n }", "com.google.protobuf.ByteString getPublicKeyBytes();", "public java.lang.String getSubjectKeyID() {\n java.lang.Object ref = subjectKeyID_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n subjectKeyID_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSubjectKeyID() {\n java.lang.Object ref = subjectKeyID_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n subjectKeyID_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static PublicKey load3tierTestRootCAPublicKey() {\n return load3tierTestRootCACertificate().getPublicKey();\n }", "public byte[] getPubKey() {\n return pub.getEncoded();\n }", "java.lang.String getExtendedPublicKey();", "public java.lang.String getSubjectKeyID() {\n java.lang.Object ref = subjectKeyID_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n subjectKeyID_ = s;\n return s;\n }\n }", "public java.lang.String getSubjectKeyID() {\n java.lang.Object ref = subjectKeyID_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n subjectKeyID_ = s;\n return s;\n }\n }", "public BigInteger getPublicKey()\n {\n\treturn publicKey;\n }", "public PublicKey getPublicKey(){\n\t\treturn this.publickey;\n\t}", "public String validationKey() {\n return this.validationKey;\n }", "public SubjectPublicKeyInfo (\n AlgorithmIdentifier algorithm_,\n Asn1BitString subjectPublicKey_\n ) {\n super();\n algorithm = algorithm_;\n subjectPublicKey = subjectPublicKey_;\n }", "public Class<PUB> getPublicKeyClass() {\n return pubKeyType;\n }", "protected PublicKey getCAPublicKey(SOAPMessageContext smc) throws Exception {\n Certificate certCA = readCertificateFile(\"/home/dziergwa/Desktop/SD/T_27-project/transporter-ws/src/main/resources/UpaCA.cer\");\n return certCA.getPublicKey();\n }", "com.google.protobuf.ByteString getPublicEciesKeyBytes();", "public ECP getPublicKGCKey(){return pkS;}", "public java.lang.String getExtendedPublicKey() {\n java.lang.Object ref = extendedPublicKey_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n extendedPublicKey_ = s;\n }\n return s;\n }\n }", "public com.google.protobuf.ByteString\n getSubjectKeyIDBytes() {\n java.lang.Object ref = subjectKeyID_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n subjectKeyID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSubjectKeyIDBytes() {\n java.lang.Object ref = subjectKeyID_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n subjectKeyID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "String getLocaleKey(String subject);", "public PublicKey GetPublicKey(String filename)\n\t\t\t throws Exception {\n\t\t\t \n\t\t\t File f = new File(filename);\n\t\t\t FileInputStream fis = new FileInputStream(f);\n\t\t\t DataInputStream dis = new DataInputStream(fis);\n\t\t\t byte[] keyBytes = new byte[(int)f.length()];\n\t\t\t dis.readFully(keyBytes);\n\t\t\t dis.close();\n\n\t\t\t X509EncodedKeySpec spec =\n\t\t\t new X509EncodedKeySpec(keyBytes);\n\t\t\t KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n\t\t\t return kf.generatePublic(spec);\n\t\t\t }", "public com.google.protobuf.ByteString\n getSubjectKeyIDBytes() {\n java.lang.Object ref = subjectKeyID_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n subjectKeyID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSubjectKeyIDBytes() {\n java.lang.Object ref = subjectKeyID_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n subjectKeyID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public ECPoint getPubKeyPoint() {\n return pub.get();\n }", "com.google.protobuf.ByteString getSubjectBytes();", "public static RSAPublicKey getPublicKey(String filename)\n\t\t\tthrows IOException, GeneralSecurityException {\n\t\tString publicKeyPEM = getKey(filename);\n\t\treturn getPublicKeyFromString(publicKeyPEM);\n\t}", "public java.lang.String getExtendedPublicKey() {\n java.lang.Object ref = extendedPublicKey_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n extendedPublicKey_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "com.google.protobuf.ByteString\n getSubjectBytes();", "com.google.protobuf.ByteString\n getSubjectBytes();", "X500Principal getSubject();", "com.google.protobuf.ByteString\n getPubkeyBytes();", "public PublicKey makePublicKey() {\n return new PublicKey(encryptingBigInt, primesMultiplied);\n }", "public static RSAPublicKey getPublicKeyFromString(String key)\n\t\t\tthrows IOException, GeneralSecurityException {\n\t\tString publicKeyPEM = key;\n\n\t\t// Remove the first and last lines\n\t\tpublicKeyPEM = publicKeyPEM.replace(\"-----BEGIN PUBLIC KEY-----\", \"\");\n\t\tpublicKeyPEM = publicKeyPEM.replace(\"-----END PUBLIC KEY-----\", \"\");\n\n\t\t// Base64 decode data\n\t\tbyte[] encoded = org.bouncycastle.util.encoders.Base64\n\t\t\t\t.decode(publicKeyPEM);\n\n\t\tKeyFactory kf = KeyFactory.getInstance(\"RSA\");\n\t\tRSAPublicKey pubKey = (RSAPublicKey) kf\n\t\t\t\t.generatePublic(new X509EncodedKeySpec(encoded));\n\t\treturn pubKey;\n\t}", "public byte[] getPublicEncoded() throws NoSuchAlgorithmException, InvalidKeySpecException {\n\t\t\n\t\tKey publicKey = getPublic();\n\t\t\n\t\t //Key factory, for key-key specification transformations\n KeyFactory kfac = KeyFactory.getInstance(\"RSA\");\n //Generate plain-text key specification\n RSAPublicKeySpec keyspec = (RSAPublicKeySpec)kfac.getKeySpec(publicKey, RSAPublicKeySpec.class);\n \n\t\tSystem.out.println(\"Public key, RSA modulus: \" +\n\t\t\tkeyspec.getModulus() + \"\\nexponent: \" +\n\t\t\tkeyspec.getPublicExponent() + \"\\n\");\n\t\t\n\t\t//Building public key from the plain-text specification\n\t\t//Key recoveredPublicFromSpec = kfac.generatePublic(keyspec);\n\t\t\n\t\t//Encode a version of the public key in a byte-array\n\t\n\t\tSystem.out.print(\"Public key encoded in \" +\n\t\t_kpair.getPublic().getFormat() + \" format: \");\n\t\tbyte[] encodedPublicKey = _kpair.getPublic().getEncoded();\n\t\t\n\t\tSystem.out.println(Arrays.toString(encodedPublicKey) + \"\\n\");\n\t\t\n\t\tSystem.out.println(\"Length: \" + encodedPublicKey.length);\n\t\treturn encodedPublicKey;\n\t}", "protected PublicKey getPublicKey(X509Certificate cert) {\n PublicKey pk = null;\n if (cert != null) {\n pk = cert.getPublicKey();\n }\n return pk;\n }", "private PublicKey generatePublicKey(KeyFactory factory)\n throws InvalidKeySpecException, IOException {\n PemFile pemFile = new PemFile(RESOURCES_DIR + PUBLIC_KEY_FILE_NAME);\n byte[] content = pemFile.getPemObject().getContent();\n X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(content);\n return factory.generatePublic(pubKeySpec);\n }", "public final long getExternalSubjectId() {\n\t\treturn Long.parseLong(getExternalSubjectIdAsString());\n\t}", "public interface PublicKey {\n\n /**\n * Returns id of the public key.\n *\n * @return id of key\n */\n String getId();\n\n /**\n * Returns ids from gpg sub keys.\n *\n * @return sub key ids\n * @since 2.19.0\n */\n default Set<String> getSubkeys() {\n return Collections.emptySet();\n }\n\n /**\n * Returns the username of the owner or an empty optional.\n *\n * @return owner or empty optional\n */\n Optional<String> getOwner();\n\n /**\n * Returns raw of the public key.\n *\n * @return raw of key\n */\n String getRaw();\n\n /**\n * Returns the contacts of the publickey.\n *\n * @return owner or empty optional\n */\n Set<Person> getContacts();\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param stream stream of data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n boolean verify(InputStream stream, byte[] signature);\n\n /**\n * Verifies that the signature is valid for the given data.\n *\n * @param data data to verify\n * @param signature signature\n * @return {@code true} if the signature is valid for the given data\n */\n default boolean verify(byte[] data, byte[] signature) {\n return verify(new ByteArrayInputStream(data), signature);\n }\n}", "private static PublicKey getPublicKey(String keyStr)\n throws Exception\n {\n return KeyFactory.getInstance(RSA).generatePublic(new X509EncodedKeySpec(Base64.decode(keyStr)));\n }", "public javax.security.auth.Subject getSubject()\n {\n return __m_Subject;\n }", "private static PublicKey buildPublicKeyFromString(String publicKeyAsString) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, KeyStoreException, CertificateException {\n String publicKeyStrWithoutHeaderFooter = publicKeyAsString.\n replaceAll(\"-----BEGIN PUBLIC KEY-----\\n\", \"\").\n replaceAll(\"-----END PUBLIC KEY-----\\n\", \"\").\n replaceAll(\"\\n\", \"\");\n ;\n byte[] publicKeyBytes = Base64.getDecoder().decode(publicKeyStrWithoutHeaderFooter.getBytes(\"UTF-8\"));\n X509EncodedKeySpec spec = new X509EncodedKeySpec(publicKeyBytes);\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n return keyFactory.generatePublic(spec);\n }", "public T participationPublicKeyBase64(String pk) {\n this.votePK = new ParticipationPublicKey(Encoder.decodeFromBase64(pk));\n return (T) this;\n\n }", "public byte[] getPubkey() {\n return pubkey;\n }", "@Override\n\tpublic ECKey toPublicJWK() {\n\n\t\treturn new ECKey(\n\t\t\tgetCurve(), getX(), getY(),\n\t\t\tgetKeyUse(), getKeyOperations(), getAlgorithm(), getKeyID(),\n\t\t\tgetX509CertURL(), getX509CertThumbprint(), getX509CertSHA256Thumbprint(), getX509CertChain(),\n\t\t\tgetKeyStore());\n\t}", "com.google.protobuf.ByteString\n getExtendedPublicKeyBytes();", "public com.google.protobuf.ByteString\n getSubjectBytes() {\n java.lang.Object ref = subject_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n subject_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSubjectBytes() {\n java.lang.Object ref = subject_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n subject_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "java.lang.String getSubject();", "java.lang.String getSubject();", "java.lang.String getSubject();", "public java.lang.String getSubject() {\n java.lang.Object ref = subject_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n subject_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSubject() {\n java.lang.Object ref = subject_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n subject_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private PublicKey getPublicKey(byte[] publicKeyBytes) {\n try {\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n X509EncodedKeySpec keySpec = new X509EncodedKeySpec(publicKeyBytes);\n return keyFactory.generatePublic(keySpec);\n } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {\n Log.e(TAG, \"getPublicKey: \" + e.getMessage());\n }\n return null;\n }", "public com.google.protobuf.ByteString\n getSubjectBytes() {\n java.lang.Object ref = subject_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n subject_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSubjectBytes() {\n java.lang.Object ref = subject_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n subject_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "protected PublicKey getX509PublicKey(Document doc, KeyInfo keyinfo) {\n \tPublicKey pk = null;\n try {\n if (keyinfo != null) {\n if (isJKSKeyStore) {\n StorageResolver storageResolver = new StorageResolver(\n new KeyStoreResolver(((JKSKeyProvider)\n keystore).getKeyStore()));\n keyinfo.addStorageResolver(storageResolver);\n keyinfo.registerInternalKeyResolver(new\n X509IssuerSerialResolver());\n keyinfo.registerInternalKeyResolver(new\n X509CertificateResolver());\n keyinfo.registerInternalKeyResolver(new X509SKIResolver());\n keyinfo.registerInternalKeyResolver(new\n X509SubjectNameResolver());\n }\n if (keyinfo.containsX509Data()) {\n if (SAMLUtilsCommon.debug.messageEnabled()) {\n SAMLUtilsCommon.debug.message(\"Found X509Data\" +\n \" element in the KeyInfo\");\n }\n X509Certificate certificate =\n keyinfo.getX509Certificate();\n //use a systemproperty com.sun.identity.saml.checkcert\n //defined in AMConfig.properties, as a nob to check the\n // the validity of the cert. \n if (checkCert) {\n // validate the X509Certificate\n if (keystore.getCertificateAlias(certificate)==null) {\n SAMLUtilsCommon.debug.error (\"verifyXMLSignature:\"\n + \" certificate is not trusted.\");\n throw new XMLSignatureException (\n SAMLUtilsCommon.bundle.getString(\n \"untrustedCertificate\"));\n } else {\n if (SAMLUtilsCommon.debug.messageEnabled ()) {\n SAMLUtilsCommon.debug.message(\n \"verifyXMLSignature:\"+ \n \" certificate is trused.\");\n }\n }\n } else {\n if (SAMLUtilsCommon.debug.messageEnabled()) {\n SAMLUtilsCommon.debug.message(\n \"Skip checking whether the\"\n +\" cert in the cert db.\"); \n }\n }\n \t\t pk = getPublicKey(certificate);\n } else {\n \t\t // Do we need to check if the public key is in the\n \t\t // keystore!?\n \t\t pk = getWSSTokenProfilePublicKey(doc);\n }\n }\n } catch (Exception e) {\n SAMLUtilsCommon.debug.error( \n \"getX509Certificate(KeyInfo) Exception: \", e);\n }\n \n \treturn pk;\n }", "public Key getPublicKey(String alias) throws CryptoException {\n\t\treturn getPublicKey(alias, null);\n\t}", "public java.lang.String getSubject() {\n java.lang.Object ref = subject_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n subject_ = s;\n return s;\n }\n }", "public java.lang.String getSubject() {\n java.lang.Object ref = subject_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n subject_ = s;\n return s;\n }\n }", "public Ed25519PublicKey derivePublicKey() {\r\n\t\tif(this.pubKey==null) {\r\n\t\t\tthis.pubKey = new Ed25519PublicKey(new EdDSAPublicKey(new EdDSAPublicKeySpec(this.key.getA(), this.key.getParams())));\r\n\t\t}\r\n\t\treturn this.pubKey;\r\n\t}", "public PGPPublicKey getEncryptionKey() {\n\t\tIterator iter = base.getPublicKeys();\n\t\tPGPPublicKey encKey = null;\n\t\twhile (iter.hasNext()) {\n\t\t\tPGPPublicKey k = (PGPPublicKey) iter.next();\n\t\t\tif (k.isEncryptionKey())\n\t\t\t\tencKey = k;\n\t\t}\n\n\t\treturn encKey;\n\t}", "OpenSSLKey mo134201a();", "private byte[] getKeyHashFromCertHolder(X509CertificateHolder certHolder)\n {\n SubjectPublicKeyInfo info = certHolder.getSubjectPublicKeyInfo();\n try\n {\n return MessageDigest.getInstance(\"SHA-1\").digest(info.getPublicKeyData().getBytes());\n }\n catch (NoSuchAlgorithmException ex)\n {\n // should not happen\n LOG.error(\"SHA-1 Algorithm not found\", ex);\n return new byte[0];\n }\n }", "public static PublicKey getPublicKey(String pubKey) {\n try {\n PemReader pemReader = new PemReader(new StringReader(pubKey));\n byte[] content = pemReader.readPemObject().getContent();\n X509EncodedKeySpec spec = new X509EncodedKeySpec(content);\n KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n return kf.generatePublic(spec);\n } catch (IOException | NoSuchAlgorithmException | InvalidKeySpecException | NullPointerException ex) {\n return getPublicKeyFromNonPem(pubKey);\n }\n }", "public int getSubjectStart()\n\t{\n\t\treturn mySubjectStart;\n\t}", "public static KeyPair generatePublicKeyPair(){\r\n\t\ttry {\r\n\t\t\tKeyPairGenerator keyGen = KeyPairGenerator.getInstance(publicKeyAlgorithm);\r\n\t\t\tkeyGen.initialize(PUBLIC_KEY_LENGTH, new SecureRandom());\r\n\t\t\treturn keyGen.generateKeyPair();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// should not happen\r\n\t\t\tthrow new ModelException(\"Internal key generation error - \"+publicKeyAlgorithm+\"[\"+PUBLIC_KEY_LENGTH+\"]\",e);\r\n\t\t}\r\n\t}", "public static PublicKey\nparseRecord(DNSKEYRecord r) {\n\tint alg = r.getAlgorithm();\n\tbyte [] data = r.getKey();\n\treturn parseRecord(alg, data);\n}", "public com.google.protobuf.ByteString\n getExtendedPublicKeyBytes() {\n java.lang.Object ref = extendedPublicKey_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n extendedPublicKey_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSubject() {\n\t\treturn txtSubject.getText();\n\t}", "public com.google.protobuf.ByteString\n getExtendedPublicKeyBytes() {\n java.lang.Object ref = extendedPublicKey_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n extendedPublicKey_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "protected PublicKeyInfo getFirstKey() {\n nextKeyToGet = 0;\n return getNextKey();\n }", "public void testPubliKeyField() throws Exception {\r\n // Create new key pair\r\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\", \"BC\");\r\n keyGen.initialize(1024, new SecureRandom());\r\n KeyPair keyPair = keyGen.generateKeyPair();\r\n\r\n PublicKeyRSA rsa1 = (PublicKeyRSA)KeyFactory.createInstance(keyPair.getPublic(), \"SHA1WITHRSA\", null);\r\n byte[] der = rsa1.getEncoded();\r\n\r\n CVCObject cvcObj = CertificateParser.parseCVCObject(der);\r\n assertTrue(\"Parsed array was not a PublicKeyRSA\", (cvcObj instanceof PublicKeyRSA));\r\n\r\n RSAPublicKey rsaKey = (RSAPublicKey)keyPair.getPublic();\r\n\r\n RSAPublicKey rsa2 = (RSAPublicKey)cvcObj; // This casting should be successful\r\n assertEquals(\"Key modulus\", rsaKey.getModulus(), rsa2.getModulus());\r\n assertEquals(\"Key exponent\", rsaKey.getPublicExponent(), rsa2.getPublicExponent());\r\n assertEquals(\"Key algorithm\", \"RSA\", rsa2.getAlgorithm());\r\n \r\n PublicKeyRSA rsa3 = (PublicKeyRSA)rsa2;\r\n assertEquals(\"OIDs\", rsa1.getObjectIdentifier(), rsa3.getObjectIdentifier());\r\n }", "public abstract PublicKey generatePublic(KeySpec keySpec)\n\t throws InvalidKeySpecException;", "String getSubject();", "String getSubject();", "public PrivateKey getKey();", "public String getSubject() {\n\t\treturn subject;\n\t}" ]
[ "0.6951922", "0.6951922", "0.68670017", "0.68474287", "0.6817221", "0.67602336", "0.6731144", "0.6654726", "0.66501594", "0.66441447", "0.66216844", "0.6515185", "0.6398187", "0.63930476", "0.63879347", "0.63820314", "0.63570166", "0.6334961", "0.6331263", "0.6330961", "0.6325838", "0.6325838", "0.63201207", "0.6297628", "0.6272896", "0.6272896", "0.6263841", "0.6259693", "0.6248367", "0.62349635", "0.62349635", "0.6230192", "0.620017", "0.613165", "0.60942245", "0.6068723", "0.60257435", "0.6009058", "0.6009037", "0.5935436", "0.59289765", "0.59289765", "0.5926011", "0.5914318", "0.5906428", "0.5906428", "0.59021455", "0.5897391", "0.5897148", "0.58952117", "0.58824223", "0.58824223", "0.58151877", "0.57924265", "0.57905793", "0.57730806", "0.57385916", "0.5736974", "0.5728765", "0.571803", "0.57025117", "0.56937504", "0.5687779", "0.56810576", "0.56711507", "0.56684643", "0.5668397", "0.5664181", "0.5639017", "0.5639017", "0.5637491", "0.5637491", "0.5637491", "0.5624559", "0.5624559", "0.5620616", "0.5616786", "0.5616786", "0.561653", "0.5613294", "0.56108385", "0.56108385", "0.56083244", "0.5601511", "0.5596616", "0.55822146", "0.5572471", "0.55635804", "0.55545604", "0.5534733", "0.5524824", "0.55135876", "0.5495735", "0.5485165", "0.5477383", "0.5474465", "0.5462532", "0.5462532", "0.54484874", "0.54427606" ]
0.70107627
0
Returns the trust anchor describing the certification authority (CA) that served as trust anchor for this certification path.
@DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2014-08-13 13:14:15.604 -0400", hash_original_method = "D53C3DAE7394798EE5A7C498CACBD5AF", hash_generated_method = "13DD0364106557B654A3555DA9860FB0") public TrustAnchor getTrustAnchor() { return trustAnchor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getCACertificate() throws IOException {\n LOGGER.debug(\"Getting CA certificate.\");\n try {\n return getPEMEncodedString(\n scmCertificateServer.getCaCertPath());\n } catch (CertificateException e) {\n throw new SCMSecurityException(\"getRootCertificate operation failed. \",\n e, GET_CA_CERT_FAILED);\n }\n }", "public X509Certificate getAikCa() {\n log.debug(\"target: {}\", getTarget().getUri().toString());\n X509Certificate aik = getTarget()\n .path(\"/aik/ca\")\n .request()\n .accept(CryptoMediaType.APPLICATION_PKIX_CERT)\n .get(X509Certificate.class);\n return aik;\n }", "@Nullable\n public X509Certificate getRemoteCaCert() {\n if (mTrustAnchor == null) return null;\n return mTrustAnchor.getTrustedCert();\n }", "private X509Certificate getTrustedCert() {\n\t\tSystem.out.println(\"Beginning getTrustedCert ...\");\n\t\tESTClient ec = new ESTClient();\n\t\tX509Certificate newCert = null;\n\t\t\n\t\tassertNotNull(ec);\n\t\t\n\t\tmCerts = Helpers.loadTA(mTrustDB);\n\t\tec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setHTTPCredentials(\"estuser\", \"estpwd\");\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to provision a new certificate\n\t\t */\n\t\ttry {\n\t\t\tnewCert = ec.sendSimpleEnrollRequest(mCSR, ESTClient.AuthMode.authHTTPonly, mKey, Boolean.FALSE);\n\t\t} catch (InvalidKeyException\n\t\t\t\t| CertificateException | IOException | EncodingException\n\t\t\t\t| EnrollException | EnrollRetryAfterException | BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn newCert;\n\t}", "public String getSslTrustProperty() {\n\n return unmaskProperty(EmailConnectionConstants.PROPERTY_SSL_TRUST);\n }", "public String getServerRootCaCertificate() {\n return this.serverRootCaCertificate;\n }", "public String getTlsCertPath();", "public X509Certificate getRootCertificate() throws CertException;", "public URL getTrustStore() {\n URL trustStore = null;\n if (trustStoreLocation != null) {\n try {\n trustStore = new URL(\"file:\" + trustStoreLocation);\n }\n catch (Exception e) {\n log.error(\"Truststore has a malformed name: \" + trustStoreLocation, e);\n }\n }\n return trustStore;\n }", "public X509Certificate getCACertificate() throws DorianInternalException;", "public X509Certificate getAik() {\n log.debug(\"target: {}\", getTarget().getUri().toString());\n X509Certificate aik = getTarget()\n .path(\"/aik\")\n .request()\n .accept(CryptoMediaType.APPLICATION_PKIX_CERT)\n .get(X509Certificate.class);\n return aik;\n }", "@ZAttr(id=1201)\n public String getReverseProxyClientCertCA() {\n return getAttr(Provisioning.A_zimbraReverseProxyClientCertCA, null);\n }", "public String getTrustStore() {\n return trustStore;\n }", "public Optional<String> caCertFile() {\n return Codegen.stringProp(\"caCertFile\").config(config).get();\n }", "public String getRootCa();", "public static TrustAnchorsResolver createTrustAnchorProviderWith2tierTestRootCACertificate() {\n return (aaguid) -> {\n Set<TrustAnchor> set = new HashSet<>();\n set.add(new TrustAnchor(load2tierTestRootCACertificate(), null));\n return set;\n };\n }", "public Optional<String> caCertDir() {\n return Codegen.stringProp(\"caCertDir\").config(config).get();\n }", "X509Certificate getCertAlias(String alias) throws KeyStoreException\n\t{\n\t\tX509Certificate x509 = (X509Certificate) keyStore.getCertificate(alias);\n\t\treturn x509;\n\t}", "@Nullable public String getTrustStore() {\n return trustStore;\n }", "public CertPath getSignerCertPath() {\n return signerCertPath;\n }", "public java.lang.String getCertUri() {\n return certUri;\n }", "public String getRootCertPemPath() {\n try {\n synchronized (mImplMonitor) {\n checkServiceLocked();\n return mImpl.getRootCertPemPath();\n }\n } catch (RemoteException e) {\n throw new EmbeddedTestServerFailure(\"Failed to get root cert's path\", e);\n }\n }", "public CertPath getCertPath() {\n/* 99 */ return this.certPath;\n/* */ }", "public java.lang.String getCA() {\n return CA;\n }", "String getCertificate();", "public String getTlsCert();", "liubaninc.m0.pki.CertificateOuterClass.Certificate getCertificate();", "public String getCertificateArn() {\n return this.certificateArn;\n }", "private java.security.cert.Certificate[] getJCACertificateChain() throws KeyStoreException, CertificateException {\n\tjava.security.cert.Certificate[] cert;\n\tcert = keyStore.getCertificateChain(alias);\n\tif (cert == null) {\n\t throw new CertificateException(\"Unknown alias.\");\n\t}\n\treturn cert;\n }", "@Override\n public int hashCode() {\n return Objects.hash(\n super.hashCode(),\n (mTrustAnchor == null) ? null : mTrustAnchor.getTrustedCert());\n }", "@Override\n\tpublic String getAuthority() {\n\t\treturn authority;\n\t}", "public String getAuthority() {\n return this.authority;\n }", "@NonNull\n public List<X509Certificate> getIntermediateCertificates() {\n return mIntermediateCerts;\n }", "public String getCertification() {\n return certification;\n }", "@Test\n\tpublic void testGetCACerts_untrustedTA() {\n\t\tSystem.out.println(\"Beginning TC2013\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tassertNotNull(ec);\n\n\t\t// note - using untrusted trust anchor\n\t\tec.setTrustAnchor(mUntrustedCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (CertificateException | IOException | BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (CACertsException cae) {\n\t\t\tSystem.out.println(\"Caught CACertsException as expected: \"\n\t\t\t\t\t+ cae.getMessage());\n\t\t}\n\t\tassertNull(newCACerts);\n\t\tSystem.out.println(\"Ending TC2013\");\n\t}", "public File getMySQLSSLTrustStore() throws GuacamoleException {\n return getProperty(MySQLGuacamoleProperties.MYSQL_SSL_TRUST_STORE);\n }", "public static SSLSocketFactory getSSLSocketFactory() throws CertificateException, KeyStoreException, IOException, NoSuchAlgorithmException, KeyManagementException {\n CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n // From https://www.washington.edu/itconnect/security/ca/load-der.crt\n InputStream caInput = new BufferedInputStream(BaseApplication.getAppContext().getAssets().open(\"www.baseurl.com.crt\"));\n Certificate ca;\n try {\n ca = cf.generateCertificate(caInput);\n System.out.println(\"ca=\" + ((X509Certificate) ca).getSubjectDN());\n } finally {\n caInput.close();\n }\n\n // Create a KeyStore containing our trusted CAs\n String keyStoreType = KeyStore.getDefaultType();\n KeyStore keyStore = KeyStore.getInstance(keyStoreType);\n keyStore.load(null, null);\n keyStore.setCertificateEntry(\"ca\", ca);\n\n // Create a TrustManager that trusts the CAs in our KeyStore\n String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();\n TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);\n tmf.init(keyStore);\n\n // Create an SSLContext that uses our TrustManager\n SSLContext context = SSLContext.getInstance(\"TLS\");\n context.init(null, tmf.getTrustManagers(), null);\n\n return context.getSocketFactory();\n }", "public StandardAuthority getAuthority()\n {\n return authority;\n }", "public String getCertificationRequest() {\n if (signingRequest == null) return null;\n return signingRequest.getCertificationRequest().getContent();\n }", "public X509Certificate getCertificate(KeyStore keystore, String certificateAlias) throws CertException;", "public String getCertification() {\r\n\t\treturn certification;\r\n\t}", "@Override\n public String getSCMCertificate(ScmNodeDetailsProto scmNodeDetails,\n String certSignReq) throws IOException {\n return getSCMCertificate(scmNodeDetails, certSignReq, false);\n }", "X509Cert caCert(String caName, ReqRespDebug debug) throws CmpClientException, PkiErrorException;", "public X509Certificate[] getCertificateChain();", "public String aadAuthority() {\n return this.aadAuthority;\n }", "@Override\n public InputStream getCertStream() {\n if (Strings.isEmpty(certPath)) {\n throw new NotFoundException(\"cert path not configured\");\n }\n if (certBytes == null) {\n Path path = Paths.get(certPath).toAbsolutePath();\n try {\n certBytes = readAllBytes(path);\n } catch (IOException e) {\n throw new UncheckedIOException(\"read cert failed\", e);\n }\n }\n return new ByteArrayInputStream(certBytes);\n }", "public X509Certificate[] getServerCertificateChain() {\n/* */ try {\n/* 208 */ return this.delegate.getServerCertificateChain();\n/* 209 */ } catch (SSLPeerUnverifiedException sSLPeerUnverifiedException) {\n/* */ \n/* */ \n/* */ \n/* 213 */ return null;\n/* */ } \n/* */ }", "public X509Certificate getCertificate();", "public XSSFClientAnchor getAnchor() {\n\t\treturn anchor;\n\t}", "EObject getAnchor();", "@Test\n\tpublic void testGetCACerts() {\n\t\tSystem.out.println(\"Beginning TC2001\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tassertNotNull(ec);\n\n\t\tec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (CertificateException | IOException | CACertsException\n\t\t\t\t| BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertNotNull(newCACerts);\n\t\tif (newCACerts != null) {\n\t\t\tassertFalse(newCACerts.isEmpty());\n\t\t}\n\n\t\tfor (X509Certificate c : newCACerts) {\n\t\t\t// System.out.println(c.toString());\n\t\t\tSystem.out.println(\"Issuer: \" + c.getIssuerDN().getName());\n\t\t\tassertNotNull(c.getIssuerDN().getName());\n\t\t\tassertFalse(c.getIssuerDN().getName().equals(\"\"));\n\t\t}\n\t\tSystem.out.println(\"Ending TC2001\");\n\t}", "public Long getAuthorityId() {\n return authorityId;\n }", "liubaninc.m0.pki.CertificateOuterClass.Certificate getCertificate(int index);", "public String getEpaCertNo() {\n return epaCertNo;\n }", "public String getAnchor()\r\n {\r\n return this.anchor;\r\n }", "@Test\n\tpublic void testGetCACerts_unTA_ClientCert() {\n\t\tSystem.out.println(\"Beginning TC2017\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\t\tX509Certificate myCert1 = null;\n\t\t\n\t\tassertNotNull(ec);\n\t\t// get a good cert to use for tls authentication\n\t\tmyCert1 = getTrustedCert();\n\n\t\tassertNotNull(myCert1);\n\n\t\tSystem.out.println(\"\\nSetting TLS authentication credentials ...\");\n\n\t\tec.setTLSAuthenticationCredentials(myCert1, mKey);\n\t\t\n\t\t// note - using untrusted trust anchor\n\t\tec.setTrustAnchor(mUntrustedCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Caught Exception as expected: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\tassertNull(newCACerts);\n\t\t\n\t\tSystem.out.println(\"Ending TC2017\");\n\t}", "public static File installBrokerCertificate(AsyncTestSpecification specification) throws Exception {\n String caCertPem = specification.getSecret().getCaCertPem();\n\n // First compute a stripped PEM certificate and decode it from base64.\n String strippedPem = caCertPem.replaceAll(BEGIN_CERTIFICATE, \"\")\n .replaceAll(END_CERTIFICATE, \"\");\n InputStream is = new ByteArrayInputStream(org.apache.commons.codec.binary.Base64.decodeBase64(strippedPem));\n\n // Generate a new x509 certificate from the stripped decoded pem.\n CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n X509Certificate caCert = (X509Certificate)cf.generateCertificate(is);\n\n // Create a new TrustStore using KeyStore API.\n char[] password = TRUSTSTORE_PASSWORD.toCharArray();\n KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());\n ks.load(null, password);\n ks.setCertificateEntry(\"root\", caCert);\n\n File trustStore = File.createTempFile(\"microcks-truststore-\" + System.currentTimeMillis(), \".jks\");\n\n try (FileOutputStream fos = new FileOutputStream(trustStore)) {\n ks.store(fos, password);\n }\n\n return trustStore;\n }", "public static AttestationCertificatePath load3tierTestAttestationCertificatePath() {\n return new AttestationCertificatePath(Arrays.asList(load3tierTestAuthenticatorAttestationCertificate(), load3tierTestIntermediateCACertificate()));\n }", "@Test\n\tpublic void testGetCACerts_ClientCert() {\n\t\tSystem.out.println(\"Beginning TC2011\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\t\tX509Certificate myCert1 = null;\n\t\t\n\t\tassertNotNull(ec);\n\t\t// get a good cert to use for tls authentication\n\t\tmyCert1 = getTrustedCert();\n\n\t\tassertNotNull(myCert1);\n\n\t\tSystem.out.println(\"\\nSetting TLS authentication credentials ...\");\n\n\t\tec.setTLSAuthenticationCredentials(myCert1, mKey);\n\t\t\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Caught Exception as expected: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\tassertNull(newCACerts);\n\t\t\n\t\tSystem.out.println(\"Ending TC2011\");\n\t}", "protected TrustManager[] getTrustManager()\n {\n TrustManager[] trustAllCerts = new TrustManager[]\n { \n new AllFACeTrustedManager() \n }; \n \n return trustAllCerts;\n }", "public static SSLSocketFactory getSSLSocktet(String caPath) throws Exception {\n CertificateFactory cAf = CertificateFactory.getInstance(\"X.509\");\n FileInputStream caIn = new FileInputStream(caPath);\n X509Certificate ca = (X509Certificate) cAf.generateCertificate(caIn);\n KeyStore caKs = KeyStore.getInstance(\"JKS\");\n caKs.load(null, null);\n caKs.setCertificateEntry(\"ca-certificate\", ca);\n TrustManagerFactory tmf = TrustManagerFactory.getInstance(\"PKIX\");\n tmf.init(caKs);\n\n // finally, create SSL socket factory\n SSLContext context = SSLContext.getInstance(\"TLSv1\");\n context.init(null, tmf.getTrustManagers(), new SecureRandom());\n\n return context.getSocketFactory();\n }", "@Test\n\tpublic void testGetCACerts_noTA() {\n\t\tSystem.out.println(\"Beginning TC2010\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tassertNotNull(ec);\n\n\t\t// ec.setTrustAnchor(certs);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (CertificateException | IOException | BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (CACertsException cae) {\n\t\t\tSystem.out.println(\"Caught CACertsException as expected: \"\n\t\t\t\t\t+ cae.getMessage());\n\t\t}\n\t\tassertNull(newCACerts);\n\t\tSystem.out.println(\"Ending TC2010\");\n\t}", "@Value.Redacted\n List<X509Certificate> caCert();", "@Test\n\tpublic void testGetCACerts_TAandTLS() {\n\t\tSystem.out.println(\"Beginning TC2002\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\t\tX509Certificate myCert1 = null;\n\n\t\tassertNotNull(ec);\n\n\t\tec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t// get a good cert to use for tls credentials\n\t\tmyCert1 = getTrustedCert();\n\t\tec.setTLSAuthenticationCredentials(myCert1, mKey);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (CertificateException | IOException | CACertsException\n\t\t\t\t| BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertNotNull(newCACerts);\n\t\tif (newCACerts != null) {\n\t\t\tassertFalse(newCACerts.isEmpty());\n\t\t}\n\n\t\tfor (X509Certificate c : newCACerts) {\n\t\t\t// System.out.println(c.toString());\n\t\t\tSystem.out.println(\"Issuer: \" + c.getIssuerDN().getName());\n\t\t\tassertNotNull(c.getIssuerDN().getName());\n\t\t\tassertFalse(c.getIssuerDN().getName().equals(\"\"));\n\t\t}\n\t\tSystem.out.println(\"Ending TC2002\");\n\t}", "public final X509Certificate[] getCertificateChain() {\n return this.certChain;\n }", "public String toString() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"(\");\n sb.append(\"timestamp: \" + timestamp);\n List<? extends Certificate> certs = signerCertPath.getCertificates();\n if (!certs.isEmpty()) {\n sb.append(\"TSA: \" + certs.get(0));\n } else {\n sb.append(\"TSA: <empty>\");\n }\n sb.append(\")\");\n return sb.toString();\n }", "public String toString() {\n/* 110 */ StringBuffer stringBuffer = new StringBuffer();\n/* 111 */ stringBuffer.append(\"PKIXCertPathBuilderResult: [\\n\");\n/* 112 */ stringBuffer.append(\" Certification Path: \" + this.certPath + \"\\n\");\n/* 113 */ stringBuffer.append(\" Trust Anchor: \" + getTrustAnchor().toString() + \"\\n\");\n/* 114 */ stringBuffer.append(\" Policy Tree: \" + String.valueOf(getPolicyTree()) + \"\\n\");\n/* 115 */ stringBuffer.append(\" Subject Public Key: \" + getPublicKey() + \"\\n\");\n/* 116 */ stringBuffer.append(\"]\");\n/* 117 */ return stringBuffer.toString();\n/* */ }", "public Certificate[] getCertificateChainAsArray(String signatureAlias) throws CryptoException {\n\t\tList<Certificate> chain = getCertificateChain(signatureAlias);\n\t\tif(chain != null && chain.size() > 0) {\n\t\t\tCertificate [] certificates = new Certificate[chain.size()];\n\t\t\tchain.toArray(certificates);\n\t\t\treturn certificates;\n\t\t}\n\t\treturn null;\n\t}", "public CertificateAttributesPolicy getCertificateAttributesPolicy() {\n if (trustedCAs.size() != 0) {\n TrustedCaPolicy tc = (TrustedCaPolicy)trustedCAs.get(0);\n if (tc.getCertificateAttributesPolicy() != null) {\n return tc.getCertificateAttributesPolicy();\n }\n }\n return certificateAttributesPolicy;\n }", "public List<Certificate> getCertificateChain(String signatureAlias) throws CryptoException {\n\t\ttry {\n\t\t\tArrayList<Certificate> list = new ArrayList<Certificate>();\n\t\t\tCertificate[] certificates = keystore.getCertificateChain(signatureAlias);\n\t\t\tfor (int i = 0, length = certificates == null ? 0 : certificates.length; i < length; i++) {\n\t\t\t\tlist.add(certificates[i]);\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch(GeneralSecurityException e) {\n\t\t\tlogger.error(\"error retrieving certificate chain for alias '{}'\", signatureAlias);\n\t\t\tthrow new CryptoException(\"error retrieving certificate chain for alias '\" + signatureAlias + \"'\", e);\n\t\t}\n\t}", "public static HostnameVerifier getTrustingHostnameVerifier() {\n return trustyHostnameVerifier;\n }", "@Test\n\tpublic void testGetCACerts_HTTPandTA() {\n\t\tSystem.out.println(\"Beginning TC2003\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tassertNotNull(ec);\n\n\t\tec.setHTTPCredentials(\"estuser\", \"estpwd\");\n\t\tec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (CertificateException | IOException | CACertsException\n\t\t\t\t| BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertNotNull(newCACerts);\n\t\tif (newCACerts != null) {\n\t\t\tassertFalse(newCACerts.isEmpty());\n\t\t}\n\n\t\tfor (X509Certificate c : newCACerts) {\n\t\t\t// System.out.println(c.toString());\n\t\t\tSystem.out.println(\"Issuer: \" + c.getIssuerDN().getName());\n\t\t\tassertNotNull(c.getIssuerDN().getName());\n\t\t\tassertFalse(c.getIssuerDN().getName().equals(\"\"));\n\t\t}\n\t\tSystem.out.println(\"Ending TC2003\");\n\t}", "protected static String getCertificatePath() {\n return certificatePath;\n }", "public X509Certificate getCertificate()\n {\n return this.cert;\n }", "java.lang.String getAuthority();", "private byte[][] getTrustedCertificates() {\n ArrayList localArrayList = new ArrayList();\n try {\n CertificateFactory localCertificateFactory = CertificateFactory.getInstance(\"X.509\");\n Certificate localCertificate = localCertificateFactory.generateCertificate(new StringBufferInputStream(mCurrentProfile.getCert()));\n localArrayList.add(localCertificate.getEncoded());\n return (byte[][]) localArrayList.toArray(new byte[localArrayList.size()][]);\n } catch (Exception e) {\n LogUtil.e(e);\n return null;\n }\n }", "private static final CertificateValidationContext getCertContextFromPath(String pemFilePath)\n throws IOException {\n return CertificateValidationContext.newBuilder()\n .setTrustedCa(\n DataSource.newBuilder().setFilename(TestUtils.loadCert(pemFilePath).getAbsolutePath()))\n .build();\n }", "@SuppressWarnings(\"unchecked\")\n public PropertyValue<String> getLineTranslateAnchor() {\n return (PropertyValue<String>) new PropertyValue(nativeGetLineTranslateAnchor());\n }", "private static final CertificateValidationContext getCertContextFromPathAsInlineBytes(\n String pemFilePath) throws IOException, CertificateException {\n X509Certificate x509Cert = TestUtils.loadX509Cert(pemFilePath);\n return CertificateValidationContext.newBuilder()\n .setTrustedCa(\n DataSource.newBuilder().setInlineBytes(ByteString.copyFrom(x509Cert.getEncoded())))\n .build();\n }", "public liubaninc.m0.pki.CertificateOuterClass.Certificate getCertificate(int index) {\n return certificate_.get(index);\n }", "com.google.protobuf.ByteString getAuthorityBytes();", "public String certificateUrl() {\n return this.certificateUrl;\n }", "public X509Certificate getBindingKeyCertificate() {\n log.debug(\"target: {}\", getTarget().getUri().toString());\n X509Certificate aik = getTarget()\n .path(\"/binding-key-certificate\")\n .request()\n .accept(CryptoMediaType.APPLICATION_PKIX_CERT)\n .get(X509Certificate.class);\n return aik;\n }", "private SSLSocketFactory newSSLSocketFactory() {\n\n KeyStore trusted;\n\n try {\n trusted = KeyStore.getInstance(\"AndroidCAStore\");\n trusted.load(null, null);\n Enumeration<String> aliases = trusted.aliases();\n\n while (aliases.hasMoreElements()) {\n String alias = aliases.nextElement();\n X509Certificate cert = (X509Certificate) trusted.getCertificate(alias);\n Log.d(\"\", \"Alias=\"+alias);\n Log.d(\"\", \"Subject DN: \" + cert.getSubjectDN().getName());\n Log.d(\"\", \"Issuer DN: \" + cert.getIssuerDN().getName());\n } \n\n SSLSocketFactory sf = new SSLSocketFactory(trusted);\n sf.setHostnameVerifier(SSLSocketFactory.STRICT_HOSTNAME_VERIFIER);\n\n return sf;\n\n } catch (Exception e) {\n // TODO Auto-generated catch block\n throw new AssertionError(e);\n } \n}", "@Test\n\tpublic void testGetCACerts_TAandUntrustedTLS() {\n\t\tSystem.out.println(\"Beginning TC2049\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t// Use an untrusted cert for the client\n\t\tec.setTLSAuthenticationCredentials(mUntrustedCert1, mKey);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Caught Exception as expected: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tassertNotNull(newCACerts);\n\t\tSystem.out.println(\"Ending TC2049\");\n\t}", "public X509Certificate[] getTrustedIssuers();", "public String getCertSn() {\n\t\treturn certSn;\n\t}", "@Override\n @NonNull\n public PersistableBundle toPersistableBundle() {\n final PersistableBundle result = super.toPersistableBundle();\n\n try {\n if (mTrustAnchor != null) {\n result.putPersistableBundle(\n TRUST_CERT_KEY,\n PersistableBundleUtils.fromByteArray(\n mTrustAnchor.getTrustedCert().getEncoded()));\n }\n\n } catch (CertificateEncodingException e) {\n throw new IllegalArgumentException(\"Fail to encode the certificate\");\n }\n\n return result;\n }", "public void checkServerTrusted ( X509Certificate[] chain, String authType ) throws CertificateException { \n //String to hold the issuer of first member in the chain\n String issuer = \"\";\n //String to hold the subject of the first member in the chain\n String subject = \"\";\n //Calendar to get the valid on and expires on date\n Calendar cal=Calendar.getInstance();\n //Date and String to hold the date the certificate was issued on\n Date issuedOn = null;\n String issuedOnString = new String(\"\");\n //Date and String to hold the date the certificate is valid until\n Date expiresOn = null;\n String expiresOnString = new String(\"\");\n //BigInteger to hold the serial number of the certificate\n BigInteger serial = null;\n //the highest certificate in the chain (the root)\n X509Certificate highestCert = null;\n \n try {\n highestCert = chain[0];\n issuer = highestCert.getIssuerX500Principal().toString();\n subject = highestCert.getSubjectX500Principal().toString();\n serial = highestCert.getSerialNumber();\n \n issuedOn = highestCert.getNotBefore();\n cal.setTime(issuedOn);\n issuedOnString = new String((cal.get(Calendar.MONTH)+1) + \"/\"+cal.get(Calendar.DAY_OF_MONTH)+\"/\"+cal.get(Calendar.YEAR));\n expiresOn = highestCert.getNotAfter();\n cal.setTime(expiresOn);\n expiresOnString = new String( (cal.get(Calendar.MONTH)+1) + \"/\"+cal.get(Calendar.DAY_OF_MONTH)+\"/\"+cal.get(Calendar.YEAR));\n \n mTrustManager.checkServerTrusted(chain, authType);\n } catch (CertificateException cx) { \n \t if ( !mAllowUntrusted )\n \t {\n \t\t ERTrustManagerCertificateException erce = new ERTrustManagerCertificateException(\"\\nUntrusted Certificate Found: \"+\n \"\\nIssued by: \"+ issuer + \n \"\\nIssued to: \" + subject + \n \"\\nIssued on: \" + issuedOnString + \n \"\\nExpires on: \" + expiresOnString + \n \"\\nSerial: \" + serial); \n \t\t erce.setCertificate(highestCert);\n \n \t throw erce;\n \t }\n }\n\n }", "public CertificateDescription certificate() {\n return this.certificate;\n }", "public double getAuthority() {\n \treturn this.CTCAuthority;\n }", "@Override\n\tpublic String getAuthority() {\n\t\treturn this.name();\n\t}", "public String getCertLinkId() {\n\t\treturn certLinkId;\n\t}", "public SSLConfig getSSLConfig() {\n return new SSLConfig(configPrefix + SERVER_SSL_CONFIG_PREFIX, configValues);\n }", "public String call_google_certificate() throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException, KeyManagementException {\n CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n // From https://www.washington.edu/itconnect/security/ca/load-der.crt\n InputStream caInput = getResources().openRawResource(R.raw.loadder);\n Certificate ca;\n try {\n ca = cf.generateCertificate(caInput);\n System.out.println(\"ca=\" + ((X509Certificate) ca).getSubjectDN());\n } finally {\n caInput.close();\n }\n // Create a KeyStore containing our trusted CAs\n String keyStoreType = KeyStore.getDefaultType();\n KeyStore keyStore = KeyStore.getInstance(keyStoreType);\n keyStore.load(null, null);\n keyStore.setCertificateEntry(\"ca\", ca);\n // Create a TrustManager that trusts the CAs in our KeyStore\n String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();\n TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);\n tmf.init(keyStore);\n // Create an SSLContext that uses our TrustManager\n SSLContext context = SSLContext.getInstance(\"TLS\");\n context.init(null, tmf.getTrustManagers(), null);\n // Tell the URLConnection to use a SocketFactory from our SSLContext\n URL url = new URL(\"https://certs.cac.washington.edu/CAtest/\");\n HttpsURLConnection urlConnection =\n (HttpsURLConnection) url.openConnection();\n urlConnection.setSSLSocketFactory(context.getSocketFactory());\n InputStream in = urlConnection.getInputStream();\n return getStringFromInputStream(in);\n }", "public Certificate getCertificate(String alias) throws CryptoException {\n\t\ttry {\n\t\t\treturn keystore.getCertificate(alias);\n\t\t} catch (KeyStoreException e) {\n\t\t\tlogger.error(\"error accessing the keystore\", e);\n\t\t\tthrow new CryptoException(\"error accessing the keystore\", e);\t\t\t\n\t\t}\n\t}", "public byte[] certificate() {\n return this.certificate;\n }", "public @Nullable\n Certificate getCertificate() throws GeneralSecurityException, IOException {\n KeyStoreManager keyStoreManager = KeyStoreManager.builder()\n .context(Config.getInstance().getContext()).build();\n return keyStoreManager.getCertificate(keyAlias);\n }", "public X509Certificate mo6705a(X509Certificate x509Certificate) {\n try {\n TrustAnchor trustAnchor = (TrustAnchor) this.f17669b.invoke(this.f17668a, new Object[]{x509Certificate});\n return trustAnchor != null ? trustAnchor.getTrustedCert() : null;\n } catch (IllegalAccessException e) {\n throw new AssertionError();\n } catch (InvocationTargetException e2) {\n return null;\n }\n }", "public final String getCanonicalPath()\n {\n return FileUtilities.getCanonicalPath(getLocalFile());\n }" ]
[ "0.6201812", "0.6141383", "0.58026326", "0.5707902", "0.5665305", "0.5634389", "0.5598016", "0.55881125", "0.5563151", "0.5560496", "0.55183786", "0.54695123", "0.54562616", "0.5391564", "0.5391202", "0.53825396", "0.53710395", "0.53506315", "0.5344608", "0.52491516", "0.524337", "0.51662105", "0.51599807", "0.51588875", "0.5123096", "0.509322", "0.5070636", "0.50627726", "0.5001617", "0.49972704", "0.49801245", "0.4967562", "0.49610487", "0.48900124", "0.4887952", "0.48755473", "0.48645934", "0.48442456", "0.48341838", "0.48247874", "0.48235896", "0.4789032", "0.47727486", "0.47674838", "0.47552508", "0.47521412", "0.47510338", "0.47447905", "0.4740733", "0.47307563", "0.47189024", "0.47119543", "0.47021747", "0.46985954", "0.46924114", "0.468494", "0.46822286", "0.46820688", "0.46754715", "0.4675469", "0.4672365", "0.46580654", "0.46418816", "0.46416694", "0.4631642", "0.4629738", "0.4618667", "0.45779157", "0.45716444", "0.45401323", "0.453975", "0.45082122", "0.45081797", "0.450478", "0.44976795", "0.44970167", "0.4493095", "0.4480879", "0.44804692", "0.44764644", "0.4457463", "0.44459414", "0.44447014", "0.44296727", "0.44247934", "0.4423558", "0.4417359", "0.44154516", "0.4391166", "0.4382144", "0.43799755", "0.43669313", "0.4365568", "0.43584147", "0.43490517", "0.43475407", "0.43469897", "0.43465072", "0.43451253", "0.4337166" ]
0.5463222
12
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.channel_manger_listselector); // 初始化视图 initView(); // 初始化相关工具类 inintClass(); mListView.setPullLoadEnable(true); // 第一次新闻加载的逻辑 if (HttpUtils.isNetworkAvailable(this)) {// 如果有网络 if (THELASTTIME == 0) {// 如果是第一次加载 refreshDataFromHttp();// 从网络端获取新闻内容 } else { refreshDataFromDb(10);// 从数据库获取内容 } } else { refreshDataFromDb(10);// 从数据库获取内容 } // 新闻列表适配器 mAdapter = new NewListAdapter(this, newlist, R.layout.newslist_item, new String[] { "id", "imageUrl", "title", "time", "short_content" }, new int[] { R.id.newslist_item_news_picture, R.id.newslist_item_title, R.id.newslist_item_time, R.id.newslist_item_digest }); mListView.setAdapter(mAdapter); mListView.setNewsListViewListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\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}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "@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 }", "protected void onCreate() {\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n public void onCreate() {\n initData();\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 onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}", "protected void onFirstTimeLaunched() {\n }", "@Override\n public void onActivityCreated(@Nullable Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n initData(savedInstanceState);\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n public void onCreate() {\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}", "@Override\n public void onCreate() {\n\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitViewPager();\r\n\t\t\r\n\t\tinitView();\r\n\r\n\t\tinitCursor();\r\n\t\t\r\n\t\tinithuanxin(savedInstanceState);\r\n\t\r\n \r\n\t}", "public void onCreate() {\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.caifushi_record);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitview();\n\t\tMyApplication.getInstance().addActivity(this);\n\t\t\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_recent_activity);\n\t\tsetTitleFromActivityLabel(R.id.title_text);\n\t\tsetupStartUp();\n\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }", "@Override\n public void onCreate()\n {\n\n\n }", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.act_myinfo);\n\t\tinitView();\n\t\tinitEvents();\n\n\t}", "public void onCreate();", "public void onCreate();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.auth_activity);\n connectVariablesToViews();\n listenToFields();\n WorkSpace.authorizationCompleted = false;\n }", "@Override\n public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tDisplayMetrics dm = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(dm);\n\n\t\tintScreenX = dm.widthPixels;\n\t\tintScreenY = dm.heightPixels;\n\t\tscreenRect = new Rect(0, 0, intScreenX, intScreenY);\n\n\t\thideTheWindowTitle();\n\n\t\tSampleView view = new SampleView(this);\n\t\tsetContentView(view);\n\n\t\tsetupRecord();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo();\n\t\t} else {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo();\n\t\t}\n\t\tBaseApplication.totalList.add(this);\n\t}", "@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\t\n\t\tappManager = AppManager.getAppManager();\n\t\tappManager.addActivity(this);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.listexcursionscreen);\n\n ActionsDelegator.getInstance().synchronizeActionsWithServer(this);\n runId = PropertiesAdapter.getInstance(this).getCurrentRunId();\n\n RunDelegator.getInstance().loadRun(this, runId);\n ResponseDelegator.getInstance().synchronizeResponsesWithServer(this, runId);\n\n }", "@Override\n\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}", "@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAppManager.getInstance().addActivity(this);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n\tpublic void onCreate() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate();\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.add_daily_task);\n init_database();\n init_view();\n init_click();\n init_data();\n init_picker();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t\n\t\tactivity = (MainActivity)getActivity(); \n\t\t\n\t\tactivity.setContListener(this);\n\t\t\n\t\tif(MODE == Const.MODE_DEFAULT){\n\t\t\tinitializeInfoForm();\n\t\t}else{\n\t\t\tinitializeAddEditForm();\t\t\t\n\t\t}\n\t\t\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tinitView();\n\n\t\tinitData();\n\n\t\tinitEvent();\n\n\t\tinitAnimation();\n\n\t\tshowUp();\n\t}", "@Override\n public void onCreate() {\n Thread.setDefaultUncaughtExceptionHandler(new TryMe());\n\n super.onCreate();\n\n // Write the content of the current application\n context = getApplicationContext();\n display = context.getResources().getDisplayMetrics();\n\n\n // Initializing DB\n App.databaseManager.initial(App.context);\n\n // Initialize user secret\n App.accountModule.initial();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }" ]
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879", "0.74805456", "0.7475343", "0.7469598", "0.7469598", "0.7455178", "0.743656", "0.74256307", "0.7422192", "0.73934627", "0.7370002", "0.73569906", "0.73569906", "0.7353011", "0.7347353", "0.7347353", "0.7333878", "0.7311508", "0.72663945", "0.72612154", "0.7252271", "0.72419256", "0.72131634", "0.71865886", "0.718271", "0.71728176", "0.7168954", "0.7166841", "0.71481615", "0.7141478", "0.7132933", "0.71174103", "0.7097966", "0.70979583", "0.7093163", "0.7093163", "0.7085773", "0.7075851", "0.7073558", "0.70698684", "0.7049258", "0.704046", "0.70370424", "0.7013127", "0.7005552", "0.7004414", "0.7004136", "0.69996923", "0.6995201", "0.69904065", "0.6988358", "0.69834954", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69783133", "0.6977392", "0.69668365", "0.69660246", "0.69651115", "0.6962911", "0.696241", "0.6961096", "0.69608897", "0.6947069", "0.6940148", "0.69358927", "0.6933102", "0.6927288", "0.69265485", "0.69247025" ]
0.0
-1
Instantiates a new Interval.
public Interval(Instant begin, Instant end) { this.begin = begin; this.end = end; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Intervals(Interval<T> interval) {\n add(interval);\n }", "public Intervals() {\n }", "private Interval(T start, T end) {\n this.start = start;\n this.end = end;\n }", "public Interval(){\r\n firstExtreme = 0.0d;\r\n secondExtreme = 0.0d;\r\n feIncluded = '(';\r\n seIncluded = ')';\r\n }", "public Interval toInterval() {\r\n return new Interval(getStartMillis(), getEndMillis(), getChronology());\r\n }", "public Interval(long begin, long end) {\n this.setBegin(java.time.Instant.ofEpochMilli(begin));\n this.setEnd(java.time.Instant.ofEpochMilli(end));\n }", "public S interval(String interval) {\n builder.interval(interval);\n return self;\n }", "public IntervalPatternTransformer(int interval)\r\n {\r\n this.interval = interval;\r\n }", "public Intervals(T begin, T end) {\n this(new Interval<T>(begin, end));\n }", "public S interval(Long interval) {\n builder.interval(interval);\n return self;\n }", "public Builder interval(Integer interval) {\n\t\t\tthis.interval = interval;\n\t\t\treturn this;\n\t\t}", "public Interval(Interval in){\r\n firstExtreme = in.getFirstExtreme();\r\n secondExtreme = in.getSecondExtreme();\r\n feIncluded = in.getFEincluded();\r\n seIncluded = in.getSEincluded();\r\n }", "public Interval getInterval() { return interval; }", "public IntervalNode(int low, int high) {\n\tthis(low,high,null);\n }", "public TimeInterval create(TimeInterval ti) {\r\n\t\tDefaultTimeInterval nti = new DefaultTimeInterval();\r\n\t\tfor (int i = 0; i < _numberOfIntervals.length; i++)\r\n\t\t\tnti._numberOfIntervals[i] = this._numberOfIntervals[i];\r\n\t\treturn nti;\r\n\t}", "public Interval(LocalDateTime begin, LocalDateTime end) {\n this.setBegin(begin.atZone(ZoneId.systemDefault()).toInstant());\n this.setEnd(end.atZone(ZoneId.systemDefault()).toInstant());\n }", "public Interval(String low, String high) {\n\t\tthis.low = low;\n\t\tthis.high = high;\n\t}", "public Intervals(Interval<T>... intervals) {\n add(intervals);\n }", "public Interval(final long time) {\n super();\n this.time = time;\n setName(Symbols.INTERVAL_PREFIX + String.valueOf(time)); \n }", "public Node interval()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tLexer.Token lp = lexer.getToken();\r\n\t\tif(lp==Lexer.Token.LEFT_PARENTHESIS\r\n\t\t|| lp==Lexer.Token.LEFT_BRACKETS)\r\n\t\t{\r\n\t\t\tNode exp1 = expression();\r\n\t\t\tif(exp1!=null)\r\n\t\t\t{\r\n\t\t\t\tif(lexer.getToken()==Lexer.Token.COMMA)\r\n\t\t\t\t{\r\n\t\t\t\t\tNode exp2 = expression();\r\n\t\t\t\t\tif(exp2!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tLexer.Token rp = lexer.getToken();\r\n\t\t\t\t\t\tif(rp==Lexer.Token.RIGHT_PARENTHESIS\r\n\t\t\t\t\t\t|| rp==Lexer.Token.RIGHT_BRACKETS)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tInterval iv = new Interval(exp1,exp2);\r\n\t\t\t\t\t\t\tif(lp==Lexer.Token.LEFT_PARENTHESIS) iv.lhsClosed(false);\r\n\t\t\t\t\t\t\telse iv.lhsClosed(true);\r\n\t\t\t\t\t\t\tif(rp==Lexer.Token.RIGHT_PARENTHESIS) iv.rhsClosed(false);\r\n\t\t\t\t\t\t\telse iv.rhsClosed(true);\r\n\t\t\t\t\t\t\treturn iv;\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}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn null;\r\n\t}", "protected IntervalNode() {\n\tthis.low = -1;\n\tthis.high = -1;\n\tthis.max = -1;\n\tthis.min = -1;\n\tthis.right = this;\n\tthis.left = this;\n\tthis.p = this;\n }", "public int getInterval() { return _interval; }", "public Interval(long start, long length, long max) {\n super();\n if (0 >= max) throw new IllegalArgumentException();\n if (0 > start || max <= start) throw new IllegalArgumentException();\n if (0 >= length) throw new IllegalArgumentException();\n if (max < start + length) throw new IllegalArgumentException();\n this.start = start;\n this.max = max;\n this.length = length;\n }", "public IntervalExpressionNode(IntervalNodeEvaluator evaluator) {\n\t\tthis(evaluator, null, IntervalOperation.NO_OPERATION, null);\n\t}", "Intervalle(double bas, double haut){\n this.inf = bas;\n this.sup = haut;\n }", "public ColorClass (int ide, Interval interval) {\n this(ide , interval , false);\n }", "public RealInterval() {\n\t\tlo = java.lang.Double.NEGATIVE_INFINITY;\n\t\thi = java.lang.Double.POSITIVE_INFINITY;\n\t}", "public IntervalSampler(double freq) {\n this(freq, Integer.MAX_VALUE);\n }", "public int getInterval() {\r\n return interval;\r\n }", "public TimeInterval create(int numberOfIntervals, int intervalType) {\r\n\t\tDefaultTimeInterval ti = new DefaultTimeInterval();\r\n\t\tti._numberOfIntervals[intervalType] = numberOfIntervals;\r\n\t\treturn ti;\r\n\t}", "public MutableInterval toMutableInterval() {\r\n return new MutableInterval(getStartMillis(), getEndMillis(), getChronology());\r\n }", "public Interval(@NotNull String str, @NotNull String str2, @NotNull String str3) {\n super(str3, null);\n a.Z0(str, \"from\", str2, \"to\", str3, \"title\");\n this.b = str;\n this.c = str2;\n }", "public UnitObject(TimeInterval _interval, T _value) {\r\n this.interval = _interval;\r\n // this.value = _value;\r\n fun = new ConstantFunction<T>(_value);\r\n }", "public Integer getInterval() {\n\t\treturn interval;\n\t}", "public NSDateIntervalFormatter() {}", "private Range() {}", "public static IntervalSet of(int a) {\n\t\tIntervalSet s = new IntervalSet();\n\t\ts.add(a);\n\t\treturn s;\n\t}", "public Builder withInterval(final Long interval) {\n this.interval = interval;\n return this;\n }", "public static void intervalRange() {\n Observable.intervalRange(0L, 10L, 0L, 10L, TimeUnit.MILLISECONDS).\n subscribe(new MyObserver<>());\n }", "public EmployeeInterval(Interval interval, int employeeIndex, int intervalIndex) {\n this.interval = interval;\n this.employeeIndex = employeeIndex;\n this.intervalIndex = intervalIndex;\n }", "public double interval() {\n return interval;\n }", "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 }", "@Override\n public Interval clone() {\n return this;\n }", "public static IntervalSet of(int a, int b) {\n\t\tIntervalSet s = new IntervalSet();\n\t\ts.add(a, b);\n\t\treturn s;\n\t}", "Range() {}", "public TimeInterval createByAdding(TimeInterval ti) {\r\n\t\tDefaultTimeInterval nti = new DefaultTimeInterval();\r\n\t\tfor (int i = 1; i < _numberOfIntervals.length; i++) {\r\n\t\t\tnti._numberOfIntervals[i] = this._numberOfIntervals[i]\r\n\t\t\t\t\t+ ti.getNumberOfIntervals(i);\r\n\t\t}\r\n\t\treturn nti;\r\n\t}", "public ColorClass (String name, Interval interval) {\n this(name, interval, false);\n }", "public ColorClass(int ide, Interval[] intervals ) {\n this (ide, intervals, false );\n }", "private static void createObservableUsingInterval() {\n LOG.info(LINE);\n var observable = Observable.interval(1, TimeUnit.SECONDS);\n\n observable.subscribe(item -> LOG.info(\"Observer 1: {}\", item));\n sleep(2000);\n\n observable.subscribe(item -> LOG.info(\"Observer 2: {}\", item));\n sleep(3000);\n\n // this is a cold obervable as interval creates new instance for each observer\n }", "public void setInterdigitInterval(int interval);", "public interface ReadableInterval\n{\n\n public abstract boolean contains(ReadableInstant readableinstant);\n\n public abstract boolean contains(ReadableInterval readableinterval);\n\n public abstract boolean equals(Object obj);\n\n public abstract Chronology getChronology();\n\n public abstract DateTime getEnd();\n\n public abstract long getEndMillis();\n\n public abstract DateTime getStart();\n\n public abstract long getStartMillis();\n\n public abstract int hashCode();\n\n public abstract boolean isAfter(ReadableInstant readableinstant);\n\n public abstract boolean isAfter(ReadableInterval readableinterval);\n\n public abstract boolean isBefore(ReadableInstant readableinstant);\n\n public abstract boolean isBefore(ReadableInterval readableinterval);\n\n public abstract boolean overlaps(ReadableInterval readableinterval);\n\n public abstract Duration toDuration();\n\n public abstract long toDurationMillis();\n\n public abstract Interval toInterval();\n\n public abstract MutableInterval toMutableInterval();\n\n public abstract Period toPeriod();\n\n public abstract Period toPeriod(PeriodType periodtype);\n\n public abstract String toString();\n}", "public static R1Interval fromPoint(double p) {\n return new R1Interval(p, p);\n }", "public void setInterval(int interval) {\r\n this.interval = interval;\r\n }", "public static void setInterval(int intervalVal) {\n\n interval = intervalVal;\n }", "Duration(Integer duration){\n\t\t_minimum = duration;\n\t\t_maximum = duration;\n\t\t_range = new Range(_minimum, _maximum);\n\t}", "boolean isNewInterval();", "public Interval(double fe, double se, char fei, char sei){\r\n firstExtreme = fe;\r\n secondExtreme = se;\r\n feIncluded = fei;\r\n seIncluded = sei;\r\n }", "public TimeInterval createByMultiplying(int factor) {\r\n\t\tDefaultTimeInterval nti = new DefaultTimeInterval();\r\n\t\tfor (int i = 1; i < _numberOfIntervals.length; i++) {\r\n\t\t\tnti._numberOfIntervals[i] = factor * this._numberOfIntervals[i];\r\n\t\t}\r\n\t\treturn nti;\r\n\t}", "public IntervalBasedHierarchy addInterval(T lBound, T hBound, String name) {\n IntervalNode node = new IntervalNode();\n node.lBound = lBound;\n node.hBound = hBound;\n node.text = name;\n intervals.add(node);\n return this;\n }", "public Interval(char fei, double fe, double se, char sei){\r\n firstExtreme = fe;\r\n secondExtreme = se;\r\n feIncluded = fei;\r\n seIncluded = sei;\r\n }", "public TimeIntervalFormatter(final Context context, final TimeUnit unit, final int[][] intervals) {\n super(context);\n this.unit = unit;\n intervalList = new ArrayList<>(intervals.length);\n for(int[] interval : intervals)\n if (interval.length > 1) intervalList.add(interval);\n }", "public Timer() {}", "net.opengis.gml.x32.TimeIntervalLengthType addNewTimeInterval();", "public Sliding()\n {\n }", "public Timer() {\n\t\tthis.start = 0L;\n\t\tthis.end = 0L;\n\t}", "public PeriodFactoryImpl() {\n\t\tsuper();\n\t}", "@Override\n\tpublic RecurrenceRule newRecurrence(String frequency, int interval) {\n\t\treturn null;\n\t}", "public void setInterval(int interval)\n\t{\n\t\tthis.interval = (long) interval;\n\t}", "public SequenceRegion interval(Sequence start, Sequence stop) {\n\t/* Ravi thingToDo. */\n\t/* use a single constructor */\n\t/* Performance */\n\treturn (SequenceRegion) ((above(start, true)).intersect((below(stop, false))));\n/*\nudanax-top.st:15693:SequenceSpace methodsFor: 'making'!\n{SequenceRegion CLIENT} interval: start {Sequence} with: stop {Sequence}\n\t\"Return a region of all sequence >= lower and < upper.\"\n\t\n\t\"Ravi thingToDo.\" \"use a single constructor\" \"Performance\"\n\t^((self above: start with: true)\n\t\tintersect: (self below: stop with: false)) cast: SequenceRegion!\n*/\n}", "public void setInterval(int x){\n interval = x;\n }", "public AutoRotateDrawable(Drawable drawable, int interval) {\n this(drawable, interval, true);\n }", "abstract public Range createRange();", "public IntervalExpressionNode(IntervalNodeEvaluator evaluator, IntervalFunctionValue value) {\n\t\tthis(evaluator, value, IntervalOperation.NO_OPERATION);\n\t}", "public RealIntervalBroadcaster(double min, double max) {\n super(min, max);\n }", "public void testConstructor1() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n }", "public static R1Interval fromPointPair(double p1, double p2) {\n R1Interval result = new R1Interval();\n result.initFromPointPair(p1, p2);\n return result;\n }", "public int interval() {\n return 30;\n }", "public Interval getIntType() { return this.interval; }", "public void setInterval( String interval )\n\t{\n\t\tthis.interval = interval;\n\t}", "public void interval() {\n APIlib.getInstance().addJSLine(jsBase + \".interval();\");\n }", "public IntervalExpressionNode(IntervalNodeEvaluator evaluator, IntervalNode left,\n\t\t\tIntervalOperation operation) {\n\t\tthis(evaluator, left, operation, null);\n\t}", "private void createIntervalLabel(GridBagConstraints gridBagConstraint) {\r\n intervalLabel = new JLabel(INTERVAL_LABEL_NAME);\r\n intervalLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n intervalLabel.setBackground(Color.decode(\"#747b83\"));\r\n gridBagConstraint.fill = GridBagConstraints.HORIZONTAL;\r\n gridBagConstraint.gridx = 0;\r\n gridBagConstraint.gridy = 0;\r\n gridBagConstraint.ipady = 40;\r\n gridBagConstraint.insets = new Insets(0, 20, 0, 0);\r\n add(intervalLabel, gridBagConstraint);\r\n }", "public Range(int minIn, int maxIn) {\n min = minIn;\n max = maxIn;\n }", "@Override\n\tpublic int withIntervalInSeconds() {\n\t\treturn 10;\n\t}", "public FrameAnimator(String location, int interval)\n\t{\n\t\tthis(location, \"basic\", interval);\n\t}", "public IndexIntervalCallNoParser() {\n super(LocatingStrategy.INDEX_INTERVAL);\n }", "long getIntervalInSeconds();", "public Note noteAt(int interval) {\n\t\tint newMidiNote = getMidiNumber() + interval;\n\t\t\n\t\treturn new Note(newMidiNote);\n\t}", "public ColorClass(String name, Interval[] intervals) {\n this(name, intervals, false);\n }", "@Override\n\tpublic void visit(IntervalExpression arg0) {\n\t\t\n\t}", "Range createRange();", "@Override\n public IRateLimiter<TKey> build() {\n Preconditions.checkArgument(this.rateLimit > 0, \"rateLimit must be positive\");\n Preconditions.checkArgument(this.intervalTime > 0, \"intervalTime must be positive\");\n Preconditions.checkArgument(this.calendarTimeUnitCode > 0, \"TimeUnit is not valid\");\n\n return new InMemoryRateLimiter<>(this);\n }", "@Override\n protected Interval adjustInterval(Interval i) {\n RangeDivision iInfo = RangeDivision.getRangeDivision(i, TimeLineController.getJodaTimeZone());\n final long lowerBound = iInfo.getLowerBound();\n final long upperBound = iInfo.getUpperBound();\n final DateTime lowerDate = new DateTime(lowerBound, TimeLineController.getJodaTimeZone());\n final DateTime upperDate = new DateTime(upperBound, TimeLineController.getJodaTimeZone());\n //add extra block to end that gets cut of by conversion from string/category.\n return new Interval(lowerDate, upperDate.plus(countsChart.rangeInfo.getPeriodSize().toUnitPeriod()));\n }", "public TimedActorController(Actor owner, int interval)\r\n\t{\r\n\t\tthis(owner, interval, 0);\r\n\t}", "public DayPeriod() {\n\t}", "public Timer(TimeSpan tickperiod)\r\n\t{\r\n\t\tcurrentstate = TIMER_STOP;\r\n\t\ttickPeriod = tickperiod.Ticks();\r\n\t}", "public long getIntervals(){\n return this.interval;\n }", "public HistogramValuesSourceBuilder interval(double interval) {\n if (interval <= 0) {\n throw new IllegalArgumentException(\"[interval] must be greater than 0 for [histogram] source\");\n }\n this.interval = interval;\n return this;\n }", "public void add(Interval<T> interval) {\n ArrayList<Interval<T>> that = new ArrayList<Interval<T>>();\n that.add(interval);\n\n /*\n * The following algorithm works with any size ArrayList<Interval<T>>.\n * We do only one interval at a time to do an insertion sort like adding of intervals, so that they don't need to be sorted.\n */\n int pos1 = 0, pos2 = 0;\n Interval<T> i1, i2, i1_2;\n\n for (; pos1 < this.size() && pos2 < that.size(); ++pos2) {\n i1 = this.intervals.get(pos1);\n i2 = that.get(pos2);\n\n if (i1.is(IntervalRelation.DURING_INVERSE, i2) || i1.is(IntervalRelation.START_INVERSE, i2) || i1.is(IntervalRelation.FINISH_INVERSE, i2) || i1.is(IntervalRelation.EQUAL, i2)) {//i1 includes i2\n //ignore i2; do nothing\n } else if (i1.is(IntervalRelation.DURING, i2) || i1.is(IntervalRelation.START, i2) || i1.is(IntervalRelation.FINISH, i2)) {//i2 includes i1\n this.intervals.remove(pos1);//replace i1 with i2\n --pos2;\n } else if (i1.is(IntervalRelation.OVERLAP, i2) || i1.is(IntervalRelation.MEET, i2)) {//i1 begin < i2 begin < i1 end < i2 end; i1 end = i2 begin\n i1_2 = new Interval<T>(i1.begin(), i2.end());//merge i1 and i2\n this.intervals.remove(pos1);\n that.add(pos2 + 1, i1_2);\n } else if (i1.is(IntervalRelation.OVERLAP_INVERSE, i2) || i1.is(IntervalRelation.MEET_INVERSE, i2)) {//i2 begin < i1 begin < i2 end < i1 end; i2 end = i1 begin\n i1_2 = new Interval<T>(i2.begin(), i1.end());//merge i2 and i1\n this.intervals.remove(pos1);\n this.intervals.add(pos1, i1_2);\n } else if (i1.is(IntervalRelation.BEFORE, i2)) {//i1 < i2 < (next i1 or next i2)\n ++pos1;\n --pos2;\n } else if (i1.is(IntervalRelation.AFTER, i2)) {//i2 < i1 < (i1 or next i2)\n this.intervals.add(pos1, i2);\n ++pos1;\n }\n }\n\n //this finishes; just append the rest of that\n if (pos2 < that.size()) {\n for (int i = pos2; i < that.size(); ++i) {\n this.intervals.add(that.get(i));\n }\n }\n }", "public PeriodicityBean() {\n\t\twhen = from = to = null;\n\t\tperiodicity = \"\";\n\t}" ]
[ "0.7233373", "0.7099751", "0.69102955", "0.6902052", "0.67458254", "0.6709635", "0.66582257", "0.6610467", "0.65904355", "0.6567725", "0.6517263", "0.6516214", "0.6489772", "0.64664525", "0.64642686", "0.6450973", "0.64185333", "0.63862425", "0.63135976", "0.6294674", "0.62110376", "0.6164187", "0.6155773", "0.613979", "0.6042737", "0.6025814", "0.6019345", "0.5995136", "0.597714", "0.5956035", "0.59030557", "0.58979714", "0.5860417", "0.58168304", "0.5798486", "0.5782748", "0.5744117", "0.5743595", "0.571323", "0.5692407", "0.564915", "0.56399965", "0.5632821", "0.55951655", "0.5545786", "0.5539283", "0.5537536", "0.5521637", "0.5515932", "0.5510303", "0.5502286", "0.54986846", "0.54951304", "0.5476864", "0.546974", "0.5464577", "0.54346925", "0.541457", "0.54120165", "0.5401017", "0.5397229", "0.53934467", "0.5392003", "0.5352931", "0.53526163", "0.52984387", "0.52921337", "0.52874905", "0.526972", "0.52475524", "0.52325714", "0.5232363", "0.5218333", "0.51998794", "0.5185657", "0.5177748", "0.516001", "0.51346856", "0.51325583", "0.5127363", "0.5124987", "0.51141816", "0.51085645", "0.5104598", "0.51041996", "0.5086427", "0.50852096", "0.50798154", "0.5075277", "0.50723517", "0.50651276", "0.5045939", "0.5037474", "0.50340277", "0.5014111", "0.5012292", "0.5011847", "0.49970242", "0.49555647", "0.49374253" ]
0.70501924
2
Instantiates a new Interval.
public Interval(LocalDateTime begin, LocalDateTime end) { this.setBegin(begin.atZone(ZoneId.systemDefault()).toInstant()); this.setEnd(end.atZone(ZoneId.systemDefault()).toInstant()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Intervals(Interval<T> interval) {\n add(interval);\n }", "public Intervals() {\n }", "public Interval(Instant begin, Instant end) {\n this.begin = begin;\n this.end = end;\n }", "private Interval(T start, T end) {\n this.start = start;\n this.end = end;\n }", "public Interval(){\r\n firstExtreme = 0.0d;\r\n secondExtreme = 0.0d;\r\n feIncluded = '(';\r\n seIncluded = ')';\r\n }", "public Interval toInterval() {\r\n return new Interval(getStartMillis(), getEndMillis(), getChronology());\r\n }", "public Interval(long begin, long end) {\n this.setBegin(java.time.Instant.ofEpochMilli(begin));\n this.setEnd(java.time.Instant.ofEpochMilli(end));\n }", "public S interval(String interval) {\n builder.interval(interval);\n return self;\n }", "public IntervalPatternTransformer(int interval)\r\n {\r\n this.interval = interval;\r\n }", "public Intervals(T begin, T end) {\n this(new Interval<T>(begin, end));\n }", "public S interval(Long interval) {\n builder.interval(interval);\n return self;\n }", "public Builder interval(Integer interval) {\n\t\t\tthis.interval = interval;\n\t\t\treturn this;\n\t\t}", "public Interval(Interval in){\r\n firstExtreme = in.getFirstExtreme();\r\n secondExtreme = in.getSecondExtreme();\r\n feIncluded = in.getFEincluded();\r\n seIncluded = in.getSEincluded();\r\n }", "public Interval getInterval() { return interval; }", "public IntervalNode(int low, int high) {\n\tthis(low,high,null);\n }", "public TimeInterval create(TimeInterval ti) {\r\n\t\tDefaultTimeInterval nti = new DefaultTimeInterval();\r\n\t\tfor (int i = 0; i < _numberOfIntervals.length; i++)\r\n\t\t\tnti._numberOfIntervals[i] = this._numberOfIntervals[i];\r\n\t\treturn nti;\r\n\t}", "public Interval(String low, String high) {\n\t\tthis.low = low;\n\t\tthis.high = high;\n\t}", "public Intervals(Interval<T>... intervals) {\n add(intervals);\n }", "public Interval(final long time) {\n super();\n this.time = time;\n setName(Symbols.INTERVAL_PREFIX + String.valueOf(time)); \n }", "public Node interval()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tLexer.Token lp = lexer.getToken();\r\n\t\tif(lp==Lexer.Token.LEFT_PARENTHESIS\r\n\t\t|| lp==Lexer.Token.LEFT_BRACKETS)\r\n\t\t{\r\n\t\t\tNode exp1 = expression();\r\n\t\t\tif(exp1!=null)\r\n\t\t\t{\r\n\t\t\t\tif(lexer.getToken()==Lexer.Token.COMMA)\r\n\t\t\t\t{\r\n\t\t\t\t\tNode exp2 = expression();\r\n\t\t\t\t\tif(exp2!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tLexer.Token rp = lexer.getToken();\r\n\t\t\t\t\t\tif(rp==Lexer.Token.RIGHT_PARENTHESIS\r\n\t\t\t\t\t\t|| rp==Lexer.Token.RIGHT_BRACKETS)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tInterval iv = new Interval(exp1,exp2);\r\n\t\t\t\t\t\t\tif(lp==Lexer.Token.LEFT_PARENTHESIS) iv.lhsClosed(false);\r\n\t\t\t\t\t\t\telse iv.lhsClosed(true);\r\n\t\t\t\t\t\t\tif(rp==Lexer.Token.RIGHT_PARENTHESIS) iv.rhsClosed(false);\r\n\t\t\t\t\t\t\telse iv.rhsClosed(true);\r\n\t\t\t\t\t\t\treturn iv;\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}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn null;\r\n\t}", "protected IntervalNode() {\n\tthis.low = -1;\n\tthis.high = -1;\n\tthis.max = -1;\n\tthis.min = -1;\n\tthis.right = this;\n\tthis.left = this;\n\tthis.p = this;\n }", "public int getInterval() { return _interval; }", "public Interval(long start, long length, long max) {\n super();\n if (0 >= max) throw new IllegalArgumentException();\n if (0 > start || max <= start) throw new IllegalArgumentException();\n if (0 >= length) throw new IllegalArgumentException();\n if (max < start + length) throw new IllegalArgumentException();\n this.start = start;\n this.max = max;\n this.length = length;\n }", "public IntervalExpressionNode(IntervalNodeEvaluator evaluator) {\n\t\tthis(evaluator, null, IntervalOperation.NO_OPERATION, null);\n\t}", "Intervalle(double bas, double haut){\n this.inf = bas;\n this.sup = haut;\n }", "public ColorClass (int ide, Interval interval) {\n this(ide , interval , false);\n }", "public RealInterval() {\n\t\tlo = java.lang.Double.NEGATIVE_INFINITY;\n\t\thi = java.lang.Double.POSITIVE_INFINITY;\n\t}", "public IntervalSampler(double freq) {\n this(freq, Integer.MAX_VALUE);\n }", "public int getInterval() {\r\n return interval;\r\n }", "public TimeInterval create(int numberOfIntervals, int intervalType) {\r\n\t\tDefaultTimeInterval ti = new DefaultTimeInterval();\r\n\t\tti._numberOfIntervals[intervalType] = numberOfIntervals;\r\n\t\treturn ti;\r\n\t}", "public MutableInterval toMutableInterval() {\r\n return new MutableInterval(getStartMillis(), getEndMillis(), getChronology());\r\n }", "public Interval(@NotNull String str, @NotNull String str2, @NotNull String str3) {\n super(str3, null);\n a.Z0(str, \"from\", str2, \"to\", str3, \"title\");\n this.b = str;\n this.c = str2;\n }", "public UnitObject(TimeInterval _interval, T _value) {\r\n this.interval = _interval;\r\n // this.value = _value;\r\n fun = new ConstantFunction<T>(_value);\r\n }", "public Integer getInterval() {\n\t\treturn interval;\n\t}", "public NSDateIntervalFormatter() {}", "private Range() {}", "public static IntervalSet of(int a) {\n\t\tIntervalSet s = new IntervalSet();\n\t\ts.add(a);\n\t\treturn s;\n\t}", "public Builder withInterval(final Long interval) {\n this.interval = interval;\n return this;\n }", "public static void intervalRange() {\n Observable.intervalRange(0L, 10L, 0L, 10L, TimeUnit.MILLISECONDS).\n subscribe(new MyObserver<>());\n }", "public EmployeeInterval(Interval interval, int employeeIndex, int intervalIndex) {\n this.interval = interval;\n this.employeeIndex = employeeIndex;\n this.intervalIndex = intervalIndex;\n }", "public double interval() {\n return interval;\n }", "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 }", "@Override\n public Interval clone() {\n return this;\n }", "public static IntervalSet of(int a, int b) {\n\t\tIntervalSet s = new IntervalSet();\n\t\ts.add(a, b);\n\t\treturn s;\n\t}", "Range() {}", "public TimeInterval createByAdding(TimeInterval ti) {\r\n\t\tDefaultTimeInterval nti = new DefaultTimeInterval();\r\n\t\tfor (int i = 1; i < _numberOfIntervals.length; i++) {\r\n\t\t\tnti._numberOfIntervals[i] = this._numberOfIntervals[i]\r\n\t\t\t\t\t+ ti.getNumberOfIntervals(i);\r\n\t\t}\r\n\t\treturn nti;\r\n\t}", "public ColorClass (String name, Interval interval) {\n this(name, interval, false);\n }", "public ColorClass(int ide, Interval[] intervals ) {\n this (ide, intervals, false );\n }", "private static void createObservableUsingInterval() {\n LOG.info(LINE);\n var observable = Observable.interval(1, TimeUnit.SECONDS);\n\n observable.subscribe(item -> LOG.info(\"Observer 1: {}\", item));\n sleep(2000);\n\n observable.subscribe(item -> LOG.info(\"Observer 2: {}\", item));\n sleep(3000);\n\n // this is a cold obervable as interval creates new instance for each observer\n }", "public void setInterdigitInterval(int interval);", "public interface ReadableInterval\n{\n\n public abstract boolean contains(ReadableInstant readableinstant);\n\n public abstract boolean contains(ReadableInterval readableinterval);\n\n public abstract boolean equals(Object obj);\n\n public abstract Chronology getChronology();\n\n public abstract DateTime getEnd();\n\n public abstract long getEndMillis();\n\n public abstract DateTime getStart();\n\n public abstract long getStartMillis();\n\n public abstract int hashCode();\n\n public abstract boolean isAfter(ReadableInstant readableinstant);\n\n public abstract boolean isAfter(ReadableInterval readableinterval);\n\n public abstract boolean isBefore(ReadableInstant readableinstant);\n\n public abstract boolean isBefore(ReadableInterval readableinterval);\n\n public abstract boolean overlaps(ReadableInterval readableinterval);\n\n public abstract Duration toDuration();\n\n public abstract long toDurationMillis();\n\n public abstract Interval toInterval();\n\n public abstract MutableInterval toMutableInterval();\n\n public abstract Period toPeriod();\n\n public abstract Period toPeriod(PeriodType periodtype);\n\n public abstract String toString();\n}", "public static R1Interval fromPoint(double p) {\n return new R1Interval(p, p);\n }", "public void setInterval(int interval) {\r\n this.interval = interval;\r\n }", "public static void setInterval(int intervalVal) {\n\n interval = intervalVal;\n }", "Duration(Integer duration){\n\t\t_minimum = duration;\n\t\t_maximum = duration;\n\t\t_range = new Range(_minimum, _maximum);\n\t}", "boolean isNewInterval();", "public Interval(double fe, double se, char fei, char sei){\r\n firstExtreme = fe;\r\n secondExtreme = se;\r\n feIncluded = fei;\r\n seIncluded = sei;\r\n }", "public TimeInterval createByMultiplying(int factor) {\r\n\t\tDefaultTimeInterval nti = new DefaultTimeInterval();\r\n\t\tfor (int i = 1; i < _numberOfIntervals.length; i++) {\r\n\t\t\tnti._numberOfIntervals[i] = factor * this._numberOfIntervals[i];\r\n\t\t}\r\n\t\treturn nti;\r\n\t}", "public IntervalBasedHierarchy addInterval(T lBound, T hBound, String name) {\n IntervalNode node = new IntervalNode();\n node.lBound = lBound;\n node.hBound = hBound;\n node.text = name;\n intervals.add(node);\n return this;\n }", "public Interval(char fei, double fe, double se, char sei){\r\n firstExtreme = fe;\r\n secondExtreme = se;\r\n feIncluded = fei;\r\n seIncluded = sei;\r\n }", "public TimeIntervalFormatter(final Context context, final TimeUnit unit, final int[][] intervals) {\n super(context);\n this.unit = unit;\n intervalList = new ArrayList<>(intervals.length);\n for(int[] interval : intervals)\n if (interval.length > 1) intervalList.add(interval);\n }", "public Timer() {}", "net.opengis.gml.x32.TimeIntervalLengthType addNewTimeInterval();", "public Sliding()\n {\n }", "public Timer() {\n\t\tthis.start = 0L;\n\t\tthis.end = 0L;\n\t}", "public PeriodFactoryImpl() {\n\t\tsuper();\n\t}", "@Override\n\tpublic RecurrenceRule newRecurrence(String frequency, int interval) {\n\t\treturn null;\n\t}", "public void setInterval(int interval)\n\t{\n\t\tthis.interval = (long) interval;\n\t}", "public SequenceRegion interval(Sequence start, Sequence stop) {\n\t/* Ravi thingToDo. */\n\t/* use a single constructor */\n\t/* Performance */\n\treturn (SequenceRegion) ((above(start, true)).intersect((below(stop, false))));\n/*\nudanax-top.st:15693:SequenceSpace methodsFor: 'making'!\n{SequenceRegion CLIENT} interval: start {Sequence} with: stop {Sequence}\n\t\"Return a region of all sequence >= lower and < upper.\"\n\t\n\t\"Ravi thingToDo.\" \"use a single constructor\" \"Performance\"\n\t^((self above: start with: true)\n\t\tintersect: (self below: stop with: false)) cast: SequenceRegion!\n*/\n}", "public void setInterval(int x){\n interval = x;\n }", "public AutoRotateDrawable(Drawable drawable, int interval) {\n this(drawable, interval, true);\n }", "abstract public Range createRange();", "public IntervalExpressionNode(IntervalNodeEvaluator evaluator, IntervalFunctionValue value) {\n\t\tthis(evaluator, value, IntervalOperation.NO_OPERATION);\n\t}", "public RealIntervalBroadcaster(double min, double max) {\n super(min, max);\n }", "public void testConstructor1() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n }", "public static R1Interval fromPointPair(double p1, double p2) {\n R1Interval result = new R1Interval();\n result.initFromPointPair(p1, p2);\n return result;\n }", "public int interval() {\n return 30;\n }", "public Interval getIntType() { return this.interval; }", "public void setInterval( String interval )\n\t{\n\t\tthis.interval = interval;\n\t}", "public void interval() {\n APIlib.getInstance().addJSLine(jsBase + \".interval();\");\n }", "public IntervalExpressionNode(IntervalNodeEvaluator evaluator, IntervalNode left,\n\t\t\tIntervalOperation operation) {\n\t\tthis(evaluator, left, operation, null);\n\t}", "private void createIntervalLabel(GridBagConstraints gridBagConstraint) {\r\n intervalLabel = new JLabel(INTERVAL_LABEL_NAME);\r\n intervalLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n intervalLabel.setBackground(Color.decode(\"#747b83\"));\r\n gridBagConstraint.fill = GridBagConstraints.HORIZONTAL;\r\n gridBagConstraint.gridx = 0;\r\n gridBagConstraint.gridy = 0;\r\n gridBagConstraint.ipady = 40;\r\n gridBagConstraint.insets = new Insets(0, 20, 0, 0);\r\n add(intervalLabel, gridBagConstraint);\r\n }", "public Range(int minIn, int maxIn) {\n min = minIn;\n max = maxIn;\n }", "@Override\n\tpublic int withIntervalInSeconds() {\n\t\treturn 10;\n\t}", "public FrameAnimator(String location, int interval)\n\t{\n\t\tthis(location, \"basic\", interval);\n\t}", "public IndexIntervalCallNoParser() {\n super(LocatingStrategy.INDEX_INTERVAL);\n }", "long getIntervalInSeconds();", "public Note noteAt(int interval) {\n\t\tint newMidiNote = getMidiNumber() + interval;\n\t\t\n\t\treturn new Note(newMidiNote);\n\t}", "public ColorClass(String name, Interval[] intervals) {\n this(name, intervals, false);\n }", "@Override\n\tpublic void visit(IntervalExpression arg0) {\n\t\t\n\t}", "Range createRange();", "@Override\n public IRateLimiter<TKey> build() {\n Preconditions.checkArgument(this.rateLimit > 0, \"rateLimit must be positive\");\n Preconditions.checkArgument(this.intervalTime > 0, \"intervalTime must be positive\");\n Preconditions.checkArgument(this.calendarTimeUnitCode > 0, \"TimeUnit is not valid\");\n\n return new InMemoryRateLimiter<>(this);\n }", "@Override\n protected Interval adjustInterval(Interval i) {\n RangeDivision iInfo = RangeDivision.getRangeDivision(i, TimeLineController.getJodaTimeZone());\n final long lowerBound = iInfo.getLowerBound();\n final long upperBound = iInfo.getUpperBound();\n final DateTime lowerDate = new DateTime(lowerBound, TimeLineController.getJodaTimeZone());\n final DateTime upperDate = new DateTime(upperBound, TimeLineController.getJodaTimeZone());\n //add extra block to end that gets cut of by conversion from string/category.\n return new Interval(lowerDate, upperDate.plus(countsChart.rangeInfo.getPeriodSize().toUnitPeriod()));\n }", "public TimedActorController(Actor owner, int interval)\r\n\t{\r\n\t\tthis(owner, interval, 0);\r\n\t}", "public DayPeriod() {\n\t}", "public Timer(TimeSpan tickperiod)\r\n\t{\r\n\t\tcurrentstate = TIMER_STOP;\r\n\t\ttickPeriod = tickperiod.Ticks();\r\n\t}", "public long getIntervals(){\n return this.interval;\n }", "public HistogramValuesSourceBuilder interval(double interval) {\n if (interval <= 0) {\n throw new IllegalArgumentException(\"[interval] must be greater than 0 for [histogram] source\");\n }\n this.interval = interval;\n return this;\n }", "public void add(Interval<T> interval) {\n ArrayList<Interval<T>> that = new ArrayList<Interval<T>>();\n that.add(interval);\n\n /*\n * The following algorithm works with any size ArrayList<Interval<T>>.\n * We do only one interval at a time to do an insertion sort like adding of intervals, so that they don't need to be sorted.\n */\n int pos1 = 0, pos2 = 0;\n Interval<T> i1, i2, i1_2;\n\n for (; pos1 < this.size() && pos2 < that.size(); ++pos2) {\n i1 = this.intervals.get(pos1);\n i2 = that.get(pos2);\n\n if (i1.is(IntervalRelation.DURING_INVERSE, i2) || i1.is(IntervalRelation.START_INVERSE, i2) || i1.is(IntervalRelation.FINISH_INVERSE, i2) || i1.is(IntervalRelation.EQUAL, i2)) {//i1 includes i2\n //ignore i2; do nothing\n } else if (i1.is(IntervalRelation.DURING, i2) || i1.is(IntervalRelation.START, i2) || i1.is(IntervalRelation.FINISH, i2)) {//i2 includes i1\n this.intervals.remove(pos1);//replace i1 with i2\n --pos2;\n } else if (i1.is(IntervalRelation.OVERLAP, i2) || i1.is(IntervalRelation.MEET, i2)) {//i1 begin < i2 begin < i1 end < i2 end; i1 end = i2 begin\n i1_2 = new Interval<T>(i1.begin(), i2.end());//merge i1 and i2\n this.intervals.remove(pos1);\n that.add(pos2 + 1, i1_2);\n } else if (i1.is(IntervalRelation.OVERLAP_INVERSE, i2) || i1.is(IntervalRelation.MEET_INVERSE, i2)) {//i2 begin < i1 begin < i2 end < i1 end; i2 end = i1 begin\n i1_2 = new Interval<T>(i2.begin(), i1.end());//merge i2 and i1\n this.intervals.remove(pos1);\n this.intervals.add(pos1, i1_2);\n } else if (i1.is(IntervalRelation.BEFORE, i2)) {//i1 < i2 < (next i1 or next i2)\n ++pos1;\n --pos2;\n } else if (i1.is(IntervalRelation.AFTER, i2)) {//i2 < i1 < (i1 or next i2)\n this.intervals.add(pos1, i2);\n ++pos1;\n }\n }\n\n //this finishes; just append the rest of that\n if (pos2 < that.size()) {\n for (int i = pos2; i < that.size(); ++i) {\n this.intervals.add(that.get(i));\n }\n }\n }", "public PeriodicityBean() {\n\t\twhen = from = to = null;\n\t\tperiodicity = \"\";\n\t}" ]
[ "0.7233373", "0.7099751", "0.70501924", "0.69102955", "0.6902052", "0.67458254", "0.6709635", "0.66582257", "0.6610467", "0.65904355", "0.6567725", "0.6517263", "0.6516214", "0.6489772", "0.64664525", "0.64642686", "0.64185333", "0.63862425", "0.63135976", "0.6294674", "0.62110376", "0.6164187", "0.6155773", "0.613979", "0.6042737", "0.6025814", "0.6019345", "0.5995136", "0.597714", "0.5956035", "0.59030557", "0.58979714", "0.5860417", "0.58168304", "0.5798486", "0.5782748", "0.5744117", "0.5743595", "0.571323", "0.5692407", "0.564915", "0.56399965", "0.5632821", "0.55951655", "0.5545786", "0.5539283", "0.5537536", "0.5521637", "0.5515932", "0.5510303", "0.5502286", "0.54986846", "0.54951304", "0.5476864", "0.546974", "0.5464577", "0.54346925", "0.541457", "0.54120165", "0.5401017", "0.5397229", "0.53934467", "0.5392003", "0.5352931", "0.53526163", "0.52984387", "0.52921337", "0.52874905", "0.526972", "0.52475524", "0.52325714", "0.5232363", "0.5218333", "0.51998794", "0.5185657", "0.5177748", "0.516001", "0.51346856", "0.51325583", "0.5127363", "0.5124987", "0.51141816", "0.51085645", "0.5104598", "0.51041996", "0.5086427", "0.50852096", "0.50798154", "0.5075277", "0.50723517", "0.50651276", "0.5045939", "0.5037474", "0.50340277", "0.5014111", "0.5012292", "0.5011847", "0.49970242", "0.49555647", "0.49374253" ]
0.6450973
16
Instantiates a new Interval.
public Interval(long begin, long end) { this.setBegin(java.time.Instant.ofEpochMilli(begin)); this.setEnd(java.time.Instant.ofEpochMilli(end)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Intervals(Interval<T> interval) {\n add(interval);\n }", "public Intervals() {\n }", "public Interval(Instant begin, Instant end) {\n this.begin = begin;\n this.end = end;\n }", "private Interval(T start, T end) {\n this.start = start;\n this.end = end;\n }", "public Interval(){\r\n firstExtreme = 0.0d;\r\n secondExtreme = 0.0d;\r\n feIncluded = '(';\r\n seIncluded = ')';\r\n }", "public Interval toInterval() {\r\n return new Interval(getStartMillis(), getEndMillis(), getChronology());\r\n }", "public S interval(String interval) {\n builder.interval(interval);\n return self;\n }", "public IntervalPatternTransformer(int interval)\r\n {\r\n this.interval = interval;\r\n }", "public Intervals(T begin, T end) {\n this(new Interval<T>(begin, end));\n }", "public S interval(Long interval) {\n builder.interval(interval);\n return self;\n }", "public Builder interval(Integer interval) {\n\t\t\tthis.interval = interval;\n\t\t\treturn this;\n\t\t}", "public Interval(Interval in){\r\n firstExtreme = in.getFirstExtreme();\r\n secondExtreme = in.getSecondExtreme();\r\n feIncluded = in.getFEincluded();\r\n seIncluded = in.getSEincluded();\r\n }", "public Interval getInterval() { return interval; }", "public IntervalNode(int low, int high) {\n\tthis(low,high,null);\n }", "public TimeInterval create(TimeInterval ti) {\r\n\t\tDefaultTimeInterval nti = new DefaultTimeInterval();\r\n\t\tfor (int i = 0; i < _numberOfIntervals.length; i++)\r\n\t\t\tnti._numberOfIntervals[i] = this._numberOfIntervals[i];\r\n\t\treturn nti;\r\n\t}", "public Interval(LocalDateTime begin, LocalDateTime end) {\n this.setBegin(begin.atZone(ZoneId.systemDefault()).toInstant());\n this.setEnd(end.atZone(ZoneId.systemDefault()).toInstant());\n }", "public Interval(String low, String high) {\n\t\tthis.low = low;\n\t\tthis.high = high;\n\t}", "public Intervals(Interval<T>... intervals) {\n add(intervals);\n }", "public Interval(final long time) {\n super();\n this.time = time;\n setName(Symbols.INTERVAL_PREFIX + String.valueOf(time)); \n }", "public Node interval()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tLexer.Token lp = lexer.getToken();\r\n\t\tif(lp==Lexer.Token.LEFT_PARENTHESIS\r\n\t\t|| lp==Lexer.Token.LEFT_BRACKETS)\r\n\t\t{\r\n\t\t\tNode exp1 = expression();\r\n\t\t\tif(exp1!=null)\r\n\t\t\t{\r\n\t\t\t\tif(lexer.getToken()==Lexer.Token.COMMA)\r\n\t\t\t\t{\r\n\t\t\t\t\tNode exp2 = expression();\r\n\t\t\t\t\tif(exp2!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tLexer.Token rp = lexer.getToken();\r\n\t\t\t\t\t\tif(rp==Lexer.Token.RIGHT_PARENTHESIS\r\n\t\t\t\t\t\t|| rp==Lexer.Token.RIGHT_BRACKETS)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tInterval iv = new Interval(exp1,exp2);\r\n\t\t\t\t\t\t\tif(lp==Lexer.Token.LEFT_PARENTHESIS) iv.lhsClosed(false);\r\n\t\t\t\t\t\t\telse iv.lhsClosed(true);\r\n\t\t\t\t\t\t\tif(rp==Lexer.Token.RIGHT_PARENTHESIS) iv.rhsClosed(false);\r\n\t\t\t\t\t\t\telse iv.rhsClosed(true);\r\n\t\t\t\t\t\t\treturn iv;\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}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn null;\r\n\t}", "protected IntervalNode() {\n\tthis.low = -1;\n\tthis.high = -1;\n\tthis.max = -1;\n\tthis.min = -1;\n\tthis.right = this;\n\tthis.left = this;\n\tthis.p = this;\n }", "public int getInterval() { return _interval; }", "public Interval(long start, long length, long max) {\n super();\n if (0 >= max) throw new IllegalArgumentException();\n if (0 > start || max <= start) throw new IllegalArgumentException();\n if (0 >= length) throw new IllegalArgumentException();\n if (max < start + length) throw new IllegalArgumentException();\n this.start = start;\n this.max = max;\n this.length = length;\n }", "public IntervalExpressionNode(IntervalNodeEvaluator evaluator) {\n\t\tthis(evaluator, null, IntervalOperation.NO_OPERATION, null);\n\t}", "Intervalle(double bas, double haut){\n this.inf = bas;\n this.sup = haut;\n }", "public ColorClass (int ide, Interval interval) {\n this(ide , interval , false);\n }", "public RealInterval() {\n\t\tlo = java.lang.Double.NEGATIVE_INFINITY;\n\t\thi = java.lang.Double.POSITIVE_INFINITY;\n\t}", "public IntervalSampler(double freq) {\n this(freq, Integer.MAX_VALUE);\n }", "public int getInterval() {\r\n return interval;\r\n }", "public TimeInterval create(int numberOfIntervals, int intervalType) {\r\n\t\tDefaultTimeInterval ti = new DefaultTimeInterval();\r\n\t\tti._numberOfIntervals[intervalType] = numberOfIntervals;\r\n\t\treturn ti;\r\n\t}", "public MutableInterval toMutableInterval() {\r\n return new MutableInterval(getStartMillis(), getEndMillis(), getChronology());\r\n }", "public Interval(@NotNull String str, @NotNull String str2, @NotNull String str3) {\n super(str3, null);\n a.Z0(str, \"from\", str2, \"to\", str3, \"title\");\n this.b = str;\n this.c = str2;\n }", "public UnitObject(TimeInterval _interval, T _value) {\r\n this.interval = _interval;\r\n // this.value = _value;\r\n fun = new ConstantFunction<T>(_value);\r\n }", "public Integer getInterval() {\n\t\treturn interval;\n\t}", "public NSDateIntervalFormatter() {}", "private Range() {}", "public static IntervalSet of(int a) {\n\t\tIntervalSet s = new IntervalSet();\n\t\ts.add(a);\n\t\treturn s;\n\t}", "public Builder withInterval(final Long interval) {\n this.interval = interval;\n return this;\n }", "public static void intervalRange() {\n Observable.intervalRange(0L, 10L, 0L, 10L, TimeUnit.MILLISECONDS).\n subscribe(new MyObserver<>());\n }", "public EmployeeInterval(Interval interval, int employeeIndex, int intervalIndex) {\n this.interval = interval;\n this.employeeIndex = employeeIndex;\n this.intervalIndex = intervalIndex;\n }", "public double interval() {\n return interval;\n }", "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 }", "@Override\n public Interval clone() {\n return this;\n }", "public static IntervalSet of(int a, int b) {\n\t\tIntervalSet s = new IntervalSet();\n\t\ts.add(a, b);\n\t\treturn s;\n\t}", "Range() {}", "public TimeInterval createByAdding(TimeInterval ti) {\r\n\t\tDefaultTimeInterval nti = new DefaultTimeInterval();\r\n\t\tfor (int i = 1; i < _numberOfIntervals.length; i++) {\r\n\t\t\tnti._numberOfIntervals[i] = this._numberOfIntervals[i]\r\n\t\t\t\t\t+ ti.getNumberOfIntervals(i);\r\n\t\t}\r\n\t\treturn nti;\r\n\t}", "public ColorClass (String name, Interval interval) {\n this(name, interval, false);\n }", "public ColorClass(int ide, Interval[] intervals ) {\n this (ide, intervals, false );\n }", "private static void createObservableUsingInterval() {\n LOG.info(LINE);\n var observable = Observable.interval(1, TimeUnit.SECONDS);\n\n observable.subscribe(item -> LOG.info(\"Observer 1: {}\", item));\n sleep(2000);\n\n observable.subscribe(item -> LOG.info(\"Observer 2: {}\", item));\n sleep(3000);\n\n // this is a cold obervable as interval creates new instance for each observer\n }", "public void setInterdigitInterval(int interval);", "public interface ReadableInterval\n{\n\n public abstract boolean contains(ReadableInstant readableinstant);\n\n public abstract boolean contains(ReadableInterval readableinterval);\n\n public abstract boolean equals(Object obj);\n\n public abstract Chronology getChronology();\n\n public abstract DateTime getEnd();\n\n public abstract long getEndMillis();\n\n public abstract DateTime getStart();\n\n public abstract long getStartMillis();\n\n public abstract int hashCode();\n\n public abstract boolean isAfter(ReadableInstant readableinstant);\n\n public abstract boolean isAfter(ReadableInterval readableinterval);\n\n public abstract boolean isBefore(ReadableInstant readableinstant);\n\n public abstract boolean isBefore(ReadableInterval readableinterval);\n\n public abstract boolean overlaps(ReadableInterval readableinterval);\n\n public abstract Duration toDuration();\n\n public abstract long toDurationMillis();\n\n public abstract Interval toInterval();\n\n public abstract MutableInterval toMutableInterval();\n\n public abstract Period toPeriod();\n\n public abstract Period toPeriod(PeriodType periodtype);\n\n public abstract String toString();\n}", "public static R1Interval fromPoint(double p) {\n return new R1Interval(p, p);\n }", "public void setInterval(int interval) {\r\n this.interval = interval;\r\n }", "public static void setInterval(int intervalVal) {\n\n interval = intervalVal;\n }", "Duration(Integer duration){\n\t\t_minimum = duration;\n\t\t_maximum = duration;\n\t\t_range = new Range(_minimum, _maximum);\n\t}", "boolean isNewInterval();", "public Interval(double fe, double se, char fei, char sei){\r\n firstExtreme = fe;\r\n secondExtreme = se;\r\n feIncluded = fei;\r\n seIncluded = sei;\r\n }", "public TimeInterval createByMultiplying(int factor) {\r\n\t\tDefaultTimeInterval nti = new DefaultTimeInterval();\r\n\t\tfor (int i = 1; i < _numberOfIntervals.length; i++) {\r\n\t\t\tnti._numberOfIntervals[i] = factor * this._numberOfIntervals[i];\r\n\t\t}\r\n\t\treturn nti;\r\n\t}", "public IntervalBasedHierarchy addInterval(T lBound, T hBound, String name) {\n IntervalNode node = new IntervalNode();\n node.lBound = lBound;\n node.hBound = hBound;\n node.text = name;\n intervals.add(node);\n return this;\n }", "public Interval(char fei, double fe, double se, char sei){\r\n firstExtreme = fe;\r\n secondExtreme = se;\r\n feIncluded = fei;\r\n seIncluded = sei;\r\n }", "public TimeIntervalFormatter(final Context context, final TimeUnit unit, final int[][] intervals) {\n super(context);\n this.unit = unit;\n intervalList = new ArrayList<>(intervals.length);\n for(int[] interval : intervals)\n if (interval.length > 1) intervalList.add(interval);\n }", "public Timer() {}", "net.opengis.gml.x32.TimeIntervalLengthType addNewTimeInterval();", "public Timer() {\n\t\tthis.start = 0L;\n\t\tthis.end = 0L;\n\t}", "public Sliding()\n {\n }", "public PeriodFactoryImpl() {\n\t\tsuper();\n\t}", "@Override\n\tpublic RecurrenceRule newRecurrence(String frequency, int interval) {\n\t\treturn null;\n\t}", "public void setInterval(int interval)\n\t{\n\t\tthis.interval = (long) interval;\n\t}", "public SequenceRegion interval(Sequence start, Sequence stop) {\n\t/* Ravi thingToDo. */\n\t/* use a single constructor */\n\t/* Performance */\n\treturn (SequenceRegion) ((above(start, true)).intersect((below(stop, false))));\n/*\nudanax-top.st:15693:SequenceSpace methodsFor: 'making'!\n{SequenceRegion CLIENT} interval: start {Sequence} with: stop {Sequence}\n\t\"Return a region of all sequence >= lower and < upper.\"\n\t\n\t\"Ravi thingToDo.\" \"use a single constructor\" \"Performance\"\n\t^((self above: start with: true)\n\t\tintersect: (self below: stop with: false)) cast: SequenceRegion!\n*/\n}", "public void setInterval(int x){\n interval = x;\n }", "public AutoRotateDrawable(Drawable drawable, int interval) {\n this(drawable, interval, true);\n }", "abstract public Range createRange();", "public IntervalExpressionNode(IntervalNodeEvaluator evaluator, IntervalFunctionValue value) {\n\t\tthis(evaluator, value, IntervalOperation.NO_OPERATION);\n\t}", "public RealIntervalBroadcaster(double min, double max) {\n super(min, max);\n }", "public void testConstructor1() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n }", "public static R1Interval fromPointPair(double p1, double p2) {\n R1Interval result = new R1Interval();\n result.initFromPointPair(p1, p2);\n return result;\n }", "public int interval() {\n return 30;\n }", "public Interval getIntType() { return this.interval; }", "public void setInterval( String interval )\n\t{\n\t\tthis.interval = interval;\n\t}", "public void interval() {\n APIlib.getInstance().addJSLine(jsBase + \".interval();\");\n }", "public IntervalExpressionNode(IntervalNodeEvaluator evaluator, IntervalNode left,\n\t\t\tIntervalOperation operation) {\n\t\tthis(evaluator, left, operation, null);\n\t}", "private void createIntervalLabel(GridBagConstraints gridBagConstraint) {\r\n intervalLabel = new JLabel(INTERVAL_LABEL_NAME);\r\n intervalLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n intervalLabel.setBackground(Color.decode(\"#747b83\"));\r\n gridBagConstraint.fill = GridBagConstraints.HORIZONTAL;\r\n gridBagConstraint.gridx = 0;\r\n gridBagConstraint.gridy = 0;\r\n gridBagConstraint.ipady = 40;\r\n gridBagConstraint.insets = new Insets(0, 20, 0, 0);\r\n add(intervalLabel, gridBagConstraint);\r\n }", "public Range(int minIn, int maxIn) {\n min = minIn;\n max = maxIn;\n }", "@Override\n\tpublic int withIntervalInSeconds() {\n\t\treturn 10;\n\t}", "public FrameAnimator(String location, int interval)\n\t{\n\t\tthis(location, \"basic\", interval);\n\t}", "public IndexIntervalCallNoParser() {\n super(LocatingStrategy.INDEX_INTERVAL);\n }", "long getIntervalInSeconds();", "public Note noteAt(int interval) {\n\t\tint newMidiNote = getMidiNumber() + interval;\n\t\t\n\t\treturn new Note(newMidiNote);\n\t}", "public ColorClass(String name, Interval[] intervals) {\n this(name, intervals, false);\n }", "@Override\n\tpublic void visit(IntervalExpression arg0) {\n\t\t\n\t}", "Range createRange();", "@Override\n public IRateLimiter<TKey> build() {\n Preconditions.checkArgument(this.rateLimit > 0, \"rateLimit must be positive\");\n Preconditions.checkArgument(this.intervalTime > 0, \"intervalTime must be positive\");\n Preconditions.checkArgument(this.calendarTimeUnitCode > 0, \"TimeUnit is not valid\");\n\n return new InMemoryRateLimiter<>(this);\n }", "@Override\n protected Interval adjustInterval(Interval i) {\n RangeDivision iInfo = RangeDivision.getRangeDivision(i, TimeLineController.getJodaTimeZone());\n final long lowerBound = iInfo.getLowerBound();\n final long upperBound = iInfo.getUpperBound();\n final DateTime lowerDate = new DateTime(lowerBound, TimeLineController.getJodaTimeZone());\n final DateTime upperDate = new DateTime(upperBound, TimeLineController.getJodaTimeZone());\n //add extra block to end that gets cut of by conversion from string/category.\n return new Interval(lowerDate, upperDate.plus(countsChart.rangeInfo.getPeriodSize().toUnitPeriod()));\n }", "public TimedActorController(Actor owner, int interval)\r\n\t{\r\n\t\tthis(owner, interval, 0);\r\n\t}", "public DayPeriod() {\n\t}", "public Timer(TimeSpan tickperiod)\r\n\t{\r\n\t\tcurrentstate = TIMER_STOP;\r\n\t\ttickPeriod = tickperiod.Ticks();\r\n\t}", "public long getIntervals(){\n return this.interval;\n }", "public HistogramValuesSourceBuilder interval(double interval) {\n if (interval <= 0) {\n throw new IllegalArgumentException(\"[interval] must be greater than 0 for [histogram] source\");\n }\n this.interval = interval;\n return this;\n }", "public void add(Interval<T> interval) {\n ArrayList<Interval<T>> that = new ArrayList<Interval<T>>();\n that.add(interval);\n\n /*\n * The following algorithm works with any size ArrayList<Interval<T>>.\n * We do only one interval at a time to do an insertion sort like adding of intervals, so that they don't need to be sorted.\n */\n int pos1 = 0, pos2 = 0;\n Interval<T> i1, i2, i1_2;\n\n for (; pos1 < this.size() && pos2 < that.size(); ++pos2) {\n i1 = this.intervals.get(pos1);\n i2 = that.get(pos2);\n\n if (i1.is(IntervalRelation.DURING_INVERSE, i2) || i1.is(IntervalRelation.START_INVERSE, i2) || i1.is(IntervalRelation.FINISH_INVERSE, i2) || i1.is(IntervalRelation.EQUAL, i2)) {//i1 includes i2\n //ignore i2; do nothing\n } else if (i1.is(IntervalRelation.DURING, i2) || i1.is(IntervalRelation.START, i2) || i1.is(IntervalRelation.FINISH, i2)) {//i2 includes i1\n this.intervals.remove(pos1);//replace i1 with i2\n --pos2;\n } else if (i1.is(IntervalRelation.OVERLAP, i2) || i1.is(IntervalRelation.MEET, i2)) {//i1 begin < i2 begin < i1 end < i2 end; i1 end = i2 begin\n i1_2 = new Interval<T>(i1.begin(), i2.end());//merge i1 and i2\n this.intervals.remove(pos1);\n that.add(pos2 + 1, i1_2);\n } else if (i1.is(IntervalRelation.OVERLAP_INVERSE, i2) || i1.is(IntervalRelation.MEET_INVERSE, i2)) {//i2 begin < i1 begin < i2 end < i1 end; i2 end = i1 begin\n i1_2 = new Interval<T>(i2.begin(), i1.end());//merge i2 and i1\n this.intervals.remove(pos1);\n this.intervals.add(pos1, i1_2);\n } else if (i1.is(IntervalRelation.BEFORE, i2)) {//i1 < i2 < (next i1 or next i2)\n ++pos1;\n --pos2;\n } else if (i1.is(IntervalRelation.AFTER, i2)) {//i2 < i1 < (i1 or next i2)\n this.intervals.add(pos1, i2);\n ++pos1;\n }\n }\n\n //this finishes; just append the rest of that\n if (pos2 < that.size()) {\n for (int i = pos2; i < that.size(); ++i) {\n this.intervals.add(that.get(i));\n }\n }\n }", "public PeriodicityBean() {\n\t\twhen = from = to = null;\n\t\tperiodicity = \"\";\n\t}" ]
[ "0.7232685", "0.70989597", "0.70499367", "0.6909236", "0.6901691", "0.6744769", "0.66577893", "0.6608921", "0.6589845", "0.656716", "0.65165174", "0.6515168", "0.6487938", "0.6465551", "0.6464248", "0.64507127", "0.64178634", "0.6385556", "0.63131684", "0.62939984", "0.6209328", "0.616247", "0.61548877", "0.6139959", "0.604235", "0.60254484", "0.6018132", "0.599454", "0.59754694", "0.5955684", "0.5901981", "0.5897106", "0.58593667", "0.58151734", "0.5798703", "0.57815623", "0.5743208", "0.5743105", "0.57117534", "0.56915754", "0.56478566", "0.5638547", "0.56307626", "0.55942523", "0.5544994", "0.5539494", "0.553652", "0.552132", "0.55149806", "0.5509015", "0.5500533", "0.5497268", "0.54944205", "0.5476545", "0.5468719", "0.546322", "0.5434835", "0.54152185", "0.5411122", "0.5401118", "0.5396434", "0.539355", "0.5391205", "0.53527975", "0.535244", "0.5297966", "0.529106", "0.5286818", "0.5268472", "0.5247126", "0.5232274", "0.5230863", "0.5218389", "0.5198884", "0.5184522", "0.5175953", "0.5159025", "0.51330733", "0.51320064", "0.5126775", "0.5124716", "0.5113849", "0.5107525", "0.5103585", "0.51035386", "0.5086149", "0.50845635", "0.50795895", "0.50743586", "0.5070782", "0.5064079", "0.50452745", "0.5036197", "0.50335574", "0.50134224", "0.5011819", "0.5010668", "0.49960262", "0.49545872", "0.49370828" ]
0.6709609
6
/ 2. There are "n" ticket windows in the railway station. ith window has ai tickets available. Price of a ticket is equal to the number of tickets remaining in that window at that time. When "m" tickets have been sold, what's the maximum amount of money the railway station can earn? exa. n=2, m=4 in 2 window available tickets are : 2 , 5 2nd window sold 4 tickets so 5+4+3+2=14.
public static int maxSale(int[] arr, int m) { Queue<Integer> queue = new PriorityQueue<Integer>(new Comparator<Integer>(){ @Override public int compare(Integer a, Integer b) { return b - a; } }); // (a,b) -> (b,a)); for(int ticket : arr) { queue.offer(ticket); } int sum = 0; while (m > 0) { if (queue.isEmpty()) { break; } int max = queue.poll(); int top = (queue.isEmpty() ? 0 : queue.peek()); for(; m > 0 && max >= top; m--, max--) { sum += max; } if (max > 0) { queue.offer(max); } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String [] args) {\n int[] ticket = fillTicket(TICKET_SIZE, MIN, MAX);\n Arrays.sort(ticket);\n int[] lotto = new int [TICKET_SIZE];\n int best = 0;\n long weeks = 0;\n boolean win = false;\n boolean showAllInput = Console.twoOptions(\"Yes\", \"No\", \"Do you want to see your ticket next to the winning numbers\\nevery time you get a bigger win than before?\", ERROR_MESSAGE_NOT_AN_OPTION);\n while(!win) {\n lotto = calculateLotto(TICKET_SIZE, MIN, MAX);\n weeks++;\n if(Arrays.containsSameValues(ticket, lotto) > best) {\n if(showAllInput) {\n System.out.print(\"\\nYour numbers: \");\n Arrays.printFilled(ticket, 2, '0');\n Arrays.sort(lotto);\n System.out.print(\"The winning numbers: \");\n Arrays.printFilled(lotto, 2, '0');\n System.out.println(); \n }\n best = Arrays.containsSameValues(ticket, lotto);\n int years = (int)(weeks / 52);\n String yearString = Integers.formatIntToString(years, 3);\n System.out.println(\"You got \" + best + \" right! It only took \" + yearString + \" years!\");\n if(Arrays.containsSameValues(ticket, lotto) == TICKET_SIZE && years <= 120) {\n win = true;\n } else if(Arrays.containsSameValues(ticket, lotto) == TICKET_SIZE) {\n System.out.println(\"\\nYou won!\\nIt's still more than a lifetime though, so let's try again!\\n\");\n best = 0;\n weeks = 0;\n }\n }\n }\n }", "private static int iteration(int considerWinning) {\r\n boolean won = false;\r\n int weeks = 0;\r\n while(won == false) {\r\n int winning[] = calculateLotto();\r\n int collision = Arrays.containsSameValues(USER_LOTTERY, winning);\r\n weeks++;\r\n if(collision == considerWinning) {\r\n\r\n if(weeks < 52) {\r\n System.out.println(\"Got \"+ collision+\" right. Took \"+ weeks + \" weeks.\");\r\n } else {\r\n System.out.println(\"Got \"+ collision+\" right. Took \"+ weeks/52 + \" years.\");\r\n }\r\n\r\n won = true;\r\n }\r\n }\r\n\r\n return (int) weeks / 52;\r\n\r\n }", "public int buyTickets(UUID uuid, int number) {\r\n\t\tPennyGame plugin = PennyGame.getPlugin(PennyGame.class);\r\n\t\tint previousTicketCount = getTicketCount(uuid);\r\n\t\t//number = Math.min(number, this.maxTicketCount - previousTicketCount);\r\n\t\tRegisteredServiceProvider<Economy> rsp = plugin.getServer().getServicesManager().getRegistration(Economy.class);\r\n\t\tEconomy econ = rsp.getProvider();\r\n\t\tOfflinePlayer player = Bukkit.getOfflinePlayer(uuid);\r\n\t\t//double balance = econ.getBalance(player);\r\n\t\t//number = (int)Math.min(number - (number - (balance / this.ticketPrice)), number);*/\r\n\t\t\r\n\t\tnumber = this.hasBalance(uuid, number);\r\n\t\t\r\n\t\tint buyCount = Math.min(number + previousTicketCount, this.maxTicketCount) - previousTicketCount;\r\n\t\tint totalCount = Math.min(number + previousTicketCount, this.maxTicketCount);\r\n\t\t\r\n\t\tif(buyCount <= 0) { // not enough balance to buy OR max count reached\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\tif(econ.withdrawPlayer(player, buyCount * this.ticketPrice).transactionSuccess()) {\t\t\t\r\n\t\t\tplugin.getSettings().set(\"participants.\" + uuid.toString(), totalCount);\r\n\t\t\tthis.tickets.put(uuid, totalCount);\r\n\t\t\t\r\n\t\t\tthis.jackpot += buyCount * ticketPrice - buyCount * tax;\r\n\t\t\tplugin.getSettings().set(\"jackpot\", this.jackpot);\r\n\t\t\tplugin.saveSettings();\r\n\t\t\treturn totalCount;\r\n\t\t} else {\r\n\t\t\treturn previousTicketCount;\r\n\t\t}\r\n\t}", "public static void knapsackDynamicProgramming(objects[] items, int capacity, int n) \r\n { \r\n\t\t//use bubble sort to sort item by their weight\t\t\t\t\r\n\t\tfor (int i = 0; i < n-1; i++) \t\t\t\t\r\n\t\t{ \t\t \r\n\t\t\tfor (int j = 0; j < (n-i-1); j++) \t\t \r\n\t\t\t{\t\t \r\n\t\t\t\tif (items[j].weight < items[j+1].weight) \t\t \r\n\t\t\t\t{ \t\t \t\r\n\t\t\t\t\tobjects temp = items[j]; \t\t \r\n\t\t\t\t\titems[j] = items[j+1]; \t\t \r\n\t\t\t\t\titems[j+1] = temp; \t\t \t\t\t\t\t\r\n\t\t\t\t}\t\t \r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\t\r\n \tif(n <= 0 || capacity <= 0)\r\n \t{\r\n \t\tSystem.out.print(\"Error capacity and object numbers can't be 0\");\r\n \t}\r\n \r\n \tint matrixTable[][] = new int[n+1][capacity+1]; \r\n \r\n \tfor (int i = 0; i <= n; i++) \r\n \t{ \r\n \t\tfor (int j = 0; j <= capacity; j++) \r\n \t\t{ \r\n \t\t\t//Preset row 0 value and column value to 0\r\n \t\t\tif (i==0 || j==0) \r\n \t {\r\n \t\t\t\tmatrixTable[i][j] = 0; \r\n \t }\r\n \r\n \t\t\t//If current row number is greater than current weight number\r\n \t\t\telse if (items[i-1].weight <= j) \r\n \t\t\t{\r\n \t\t\t\t//Compare the top value with top value plus value(use weight as the value to go left)result\r\n \t\t\t\t//and use the greatest value for the current one.\r\n \t\t\t\tmatrixTable[i][j] = Math.max(items[i-1].profit + matrixTable[i-1][j-items[i-1].weight], matrixTable[i-1][j]); \r\n \t\t\t}\r\n \t\t\t//If row number is less than current weight number just use the top value\r\n \t\t\telse \r\n \t\t\t{ \t \r\n \t\t\t\tmatrixTable[i][j] = matrixTable[i-1][j];\r\n \t\t\t}\r\n \t\t} \t\r\n \t} \r\n \t\r\n\t\tint totalProfit = matrixTable[n][capacity]; \t\t\r\n\t\tint temp = matrixTable[n][capacity];\r\n\t\tint [] itemInKnapsack = new int [n];\r\n\t\t\r\n\t\t//solving which item is in the knapsack\r\n for (int i = n; i > 0 && temp > 0; i--) { \r\n \r\n \r\n \tif (temp == matrixTable[i - 1][capacity]) \r\n \t{\r\n continue;\r\n \t}\r\n \t//if the top value is different than it is include in the knapsack\r\n else \r\n { \r\n itemInKnapsack[i-1] = items[i-1].index; //Save item number\r\n temp = temp - items[i - 1].profit; \r\n capacity = capacity - items[i - 1].weight; \r\n } \r\n } \r\n \r\n printResult(itemInKnapsack, totalProfit, 2); //Call print result\r\n }", "public int getShipPartsNeededCount() {\n return (maxDays * 2) / 3;\n }", "static int getMaxCoinValGeeks(int arr[], int n)\n {\n // Create a table to store solutions of subproblems\n int table[][] = new int[n][n];\n int gap, gapStartIndx, gapEndIndx, x, y, z;\n\n // Fill table using above recursive formula.\n // Note that the tableis filled in diagonal\n // fashion (similar to http://goo.gl/PQqoS),\n // from diagonal elements to table[0][n-1]\n // which is the result.\n for (gap = 0; gap < n; ++gap)\n {\n // both gapStartIndx and gapEndIndx are incremented in each loop iteration\n // for each gap, gapStartIndx keeps moving\n // gapEndIndx is always gap more than the gapStartIndx\n // when gap == 0, gapStartIndx = gapEndIndx\n // table[i,j] identifies the max value obtained by the player who picks first\n // first player = i to get val[i] , range of coins left = i+1, j\n // second player max value = table[i+1,j], range of coins left = i+2, j\n // first player max value = table[i+2,j]. So total value for player 1 is\n // val[i] + table[i+2, j]\n // first player picks j to get val[j], range of coins left i, j-1.\n // second player max = table[i, j-1] range of coins left i, j-2\n // first player max = table[i,j-2]\n // so for finding max value for a p\n for (gapStartIndx = 0, gapEndIndx = gap; gapEndIndx < n; ++gapStartIndx, ++gapEndIndx)\n {\n // Here x is value of F(i+2, j),\n // y is F(i+1, j-1) and z is\n // F(i, j-2) in above recursive formula\n // if gapStartIndx and gapEndIndx are two or more apart\n x = ((gapStartIndx + 2) <= gapEndIndx) ? table[gapStartIndx + 2][gapEndIndx] : 0;\n y = ((gapStartIndx + 1) <= (gapEndIndx - 1)) ? table[gapStartIndx +1 ][gapEndIndx - 1] : 0;\n z = (gapStartIndx <= (gapEndIndx - 2)) ? table[gapStartIndx][gapEndIndx - 2]: 0;\n\n table[gapStartIndx][gapEndIndx] = Math.max(arr[gapStartIndx] +\n Math.min(x, y), arr[gapEndIndx] +\n Math.min(y, z));\n }\n }\n\n return table[0][n - 1];\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int q = sc.nextInt();\n\n for(int k = 0; k < q; k++) {\n int m = sc.nextInt();\n int n = sc.nextInt();\n\n // indicate number of pieces\n long x = 1;\n long y = 1;\n \n ArrayList<Long> c_y = new ArrayList<Long>();\n for(int i = 0; i < m - 1; i++) {\n c_y.add(sc.nextLong());\n }\n \n ArrayList<Long> c_x = new ArrayList<Long>();\n for(int i = 0; i < n - 1; i++) {\n c_x.add(sc.nextLong());\n }\n\n Collections.sort(c_y, Collections.reverseOrder());\n Collections.sort(c_x, Collections.reverseOrder());\n\n // cut: most expensive = cut first\n int index_X = 0;\n int index_Y = 0;\n long totalCost = 0;\n\n while(!(x == n && y == m)) {\n if(x < n && y < m) {\n // compare cost to decide whether cut horizontally or vertically\n if(c_y.get(index_Y) >= c_x.get(index_X)) {\n totalCost += c_y.get(index_Y) * x;\n y++;\n index_Y++;\n } else if(c_y.get(index_Y) < c_x.get(index_X)) {\n totalCost += c_x.get(index_X) * y;\n x++;\n index_X++; \n }\n } else if(x == n && y < m) {\n totalCost += c_y.get(index_Y) * x;\n index_Y++;\n y++;\n } else if(x < n && y == m) {\n totalCost += c_x.get(index_X) * y;\n index_X++;\n x++;\n }\n }\n\n totalCost = totalCost % (long)(Math.pow(10, 9) + 7);\n System.out.println(totalCost );\n }\n }", "long getMaxItemFindings();", "int getNumOfSellOrders();", "protected int numberRemainingTickets()\n\t{\n\t\treturn tickets.size();\n\t}", "public static void main(String[] args){ w = the total weight\n\t\t// i = item i\n\t\t// m[i, w] = maximum value attained with weight <= w using items up to i\n\t\t//\n\t\t// recurrence relation:\n\t\t// m[0, w] = 0, if there's zero items, the sum is zero\n\t\t// m[i, w] = m[i-1, w], if w(i) > w, the new item's weight > current weight limit\n\t\t// m[i, w] = max(m[i-1, w],\n\t\t// \t\t\t\t m[i-1, w-w(i)] + v(i), if w(i) <= w\n\t\t//\n\t\t//\n\t\tArrayList<Item> items = new ArrayList<Item>();\n\n\t\titems.add(new Item(10, 60));\n\t\titems.add(new Item(20, 100));\n\t\titems.add(new Item(30, 120));\n\n\t\tSystem.out.println(knapsack(items.size()-1, 50, items));\n\t}", "@Test\n\tpublic void when_provided_maximum_size_list_with_all_elements_that_can_be_added_then_return_sum_in_allowable_amount_of_time() {\n\t\tfinal int[] elements = Fixture.initializeRandomList(MAX_NUM_ELEMENTS, MIN_ELEMENT_SIZE, 5);\n\t\tfinal int elementSum = IntStream.of(elements).sum();\n\t\tfinal long startTime = System.currentTimeMillis();\n\n\t\tfinal int result = Knapsack.getOptimalWeight(elementSum, elements);\n\n\t\tassertThat(result, is(elementSum));\n\t\tassertThat(System.currentTimeMillis() - startTime < Fixture.MAX_ALLOWABLE_CALCULATION_TIME, is(true));\n\t}", "public double buyTickets(int knr, int aid, int anzTickets) throws Exception {\r\n \t// TODO Write your code here\r\n\r\n // 1. check if there are enough tickets available\r\n Statement checkAvailabilityStmt = connection.createStatement();\r\n ResultSet availabilityResult = checkAvailabilityStmt.executeQuery(\"SELECT COUNT(*) AS availableTickets FROM ticket WHERE kunde IS NULL and auffuehrung = \" + aid);\r\n\r\n int availableTickets;\r\n if (availabilityResult.next()) {\r\n availableTickets = availabilityResult.getInt(\"availableTickets\");\r\n } else {\r\n throw new SQLDataException(\"Could not estimate available ticket count from tickets table\");\r\n }\r\n\r\n availabilityResult.close();\r\n checkAvailabilityStmt.close();\r\n\r\n if (availableTickets >= anzTickets) {\r\n pstmt_updateTicket.setInt(1, knr);\r\n pstmt_updateTicket.setInt(2, aid);\r\n pstmt_updateTicket.setInt(3, anzTickets);\r\n\r\n pstmt_updateTicket.execute();\r\n\r\n ResultSet affectedRows = pstmt_updateTicket.getResultSet();\r\n\r\n double summe = 0;\r\n int numTicketsSold = 0;\r\n\r\n while (affectedRows.next()) {\r\n numTicketsSold++;\r\n summe += affectedRows.getDouble(\"preis\");\r\n }\r\n\r\n if (numTicketsSold != anzTickets) {\r\n connection.rollback();\r\n\r\n throw new SQLDataException(\"Update failed, only \" + numTicketsSold + \" tickets would've been changed, rolling back..\");\r\n }\r\n\r\n pstmt_updateTicket.close();\r\n affectedRows.close();\r\n connection.commit();\r\n\r\n return summe;\r\n } else {\r\n throw new SQLDataException(\"Not enough tickets are currently available\");\r\n }\r\n }", "public static int minimumNumberOfBlackWallsInStock()\n {\n return 0;\n }", "public static Object[] ticket_combo(int l, Set<Set<Object>> ticket_indices_powerset, Object[] all_number_subset_array, Object[] winning_number_subset_array) {\n \n Set<Object> curr_t = new HashSet<Object>(); //carries one ticket\n Set<Object> set_to_buy = new HashSet<Object>(); //carries one winning combo\n Set<Object> curr_win_combo = new HashSet<Object>(); //carries one ticket combo\n \n boolean has_winning = false;\n int match_count = 0;\n int ticket_amount_count = all_number_subset_array.length; //smallest amount of tickets needed so far\n \n // a combo to possibly buy\n for(Set<Object> curr_indices_subset : ticket_indices_powerset) {\n int curr_num_tickets_to_buy = curr_indices_subset.toArray().length;\n if(ticket_amount_count <= curr_num_tickets_to_buy && has_winning)\n {\n continue;\n }\n //copy a winning array\n Object[] winning_number_subset_array_copy = Arrays.copyOf(winning_number_subset_array, winning_number_subset_array.length);\n //setup a counter of uncovered winning combos\n int uncovered_winning_possibilities = winning_number_subset_array_copy.length;\n Object[] curr_indices_subset_array = curr_indices_subset.toArray();\n \n //take each ticket in a combo\n for(Object curr_index : curr_indices_subset_array) {\n int curr_index_int = ((Integer) curr_index).intValue() - 1;\n curr_t = (java.util.HashSet<java.lang.Object>) all_number_subset_array[curr_index_int];\n \n //see which winning combos you can cross out\n for(int i = 0; i < winning_number_subset_array_copy.length; i++) {\n match_count = 0;\n curr_win_combo = (java.util.HashSet<java.lang.Object>) winning_number_subset_array[i];\n if (winning_number_subset_array_copy[i] instanceof Integer)\n {\n continue;\n }\n \n for(Object combo_num : curr_win_combo) {\n for(Object ticket_num : curr_t) {\n if(((Integer)combo_num).intValue() == ((Integer)ticket_num).intValue())\n {\n match_count++;\n }\n }\n }\n if(match_count >= l)\n {\n uncovered_winning_possibilities--;\n winning_number_subset_array_copy[i] = 0;\n }\n }\n }\n //after ticket combo loop\n if((uncovered_winning_possibilities == 0) && (!has_winning || (curr_num_tickets_to_buy < ticket_amount_count)))\n {\n has_winning = true;\n ticket_amount_count = curr_num_tickets_to_buy;\n set_to_buy = curr_indices_subset;\n \n }\n }\n Object[] final_ticket_indeces = set_to_buy.toArray();\n return final_ticket_indeces;\n }", "static int maxLoot(int hval[], int n)\n {\n if (n == 0) return 0;\n if (n == 1) return hval[0];\n if (n == 2) return Math.max(hval[0], hval[1]);\n // dp[i] represent the maximum value stolen so far after reaching house i.\n int[] dp = new int[n];\n // Initialize the dp[0] and dp[1]\n dp[0] = hval[0];\n dp[1] = Math.max(hval[0], hval[1]);\n // Fill remaining positions\n for (int i = 2; i<n; i++)\n dp[i] = Math.max(hval[i]+dp[i-2], dp[i-1]);\n return dp[n-1];\n }", "public static long stockmax(List<Integer> prices) {\n\t\t// Write your code here\n\t\tlong profit=0L;\n\t\tlong maxSoFar=0L;\n\t\t for (int i = prices.size() - 1; i > -1 ; i--) {\n\t if (prices.get(i) >= maxSoFar) {\n\t maxSoFar = prices.get(i);\n\t }\n\t profit += maxSoFar - prices.get(i);\n\t }\n\t return profit;\n\t}", "static int knapsack(int W, int wt[], int val[], int n)\n\t{\n\t\t// base case\n\t\tif (n==0 || W==0)\n\t\t\treturn 0;\n\t\t\n\t\t// If weight of nth item is more than knapsack capacity W, then\n\t\t// this item cannot be included in optimal solution\n\t\tif (wt[n-1] > W)\n\t\t\treturn knapsack(W, wt, val, n-1);\n\t\t\n\t\t// return maximum of two cases\n\t\t// nth item included\n\t\t// not included\n\t\telse return max(val[n-1] + knapsack(W-wt[n-1],wt,val,n-1),\n\t\t\t\tknapsack(W,wt,val,n-1)\n\t\t\t\t);\n\t}", "private int tournament()\r\n {\r\n\tint out = spinTheWheel();\r\n\tdouble max = ff.evaluate(chromos.get(out),generation());\r\n\tdouble temp_fitness = 0;\r\n\tint temp_index = 0;\r\n\r\n\tfor(int i = 0; i < selPara - 1 + tourStep*generation(); i++)\r\n\t {\r\n\t\ttemp_index = spinTheWheel();\r\n\t\ttemp_fitness = ff.evaluate(chromos.get(temp_index),generation());\r\n\t\tif(temp_fitness > max)\r\n\t\t {\r\n\t\t\tmax = temp_fitness;\r\n\t\t\tout = temp_index;\r\n\t\t }\r\n\t }\r\n\treturn out;\r\n }", "public int maximumRobots(int[] chargeTimes, int[] runningCosts, long budget) {\n int n = chargeTimes.length;\n // [front, end).\n int[] deque = new int[n];\n int front = 0;\n int end = 0;\n long sum = 0;\n int left = 0;\n int right = 0;\n for (; right < n; ++right) {\n // add right into the sliding window, so the window becomes [left, right].\n // update sliding window max and window sum.\n while (end - front > 0 && chargeTimes[deque[end - 1]] <= chargeTimes[right]) {\n --end;\n }\n deque[end++] = right;\n sum += runningCosts[right];\n // if the condition is met in the window, do nothing,\n // so the next window size will become one larger.\n // if the condition is not met in the window, shrink one from the front,\n // so the next window size will stay the same.\n if (chargeTimes[deque[front]] + (right - left + 1) * sum > budget) {\n while (end - front > 0 && deque[front] <= left) {\n ++front;\n }\n sum -= runningCosts[left];\n ++left;\n }\n }\n return right - left;\n }", "public static void main(String[] args) {\n\t\t\n\t\tint max_size,n; \n \n ArrayList<item> items=new ArrayList();\n\t\t// item 1, value 6, size 1\n items.add(new item(1, 6, 1));\n\t\t// item 2, value 10, size 2\n\t\titems.add(new item(2, 10, 2));\n\t\t// item 3, value 12, size 3\n\t\titems.add(new item(3, 12, 3));\n\t\t// the size of your knapsack\n max_size=5; \n\t\t// sort items by density\n\t\tsortitems(items);\n \n System.out.println(\"The maximum value we can place into the knapsack is \"+ greedyfractionalknapsack(items, max_size));\n\n\n\n}", "static int getMaxCoinValMine(int vals[], int n) {\n int[][] maxVals = new int[n][n];\n for(int wind = 0; wind < n; wind++) {\n // start is always less than or equal to end\n for(int start=0, end = start+wind; end<n; start++,end++ ) {\n // no elements element\n if(wind==0) {\n maxVals[start][end] = 0;\n }\n else if(start == end) {\n // only single element\n maxVals[start][end] = vals[start];\n }\n else {\n // start >=0\n // calculate wind[start][end]\n // chose end, then value is val[end] for P1, val[start][end-1] for P2 and val[start][end-2] for P1\n int valEnd = vals[end] + (( start < end-2)? maxVals[start][end-2]:0);\n // chose start, then value is val[start] for P1, val[start+1][end] for P2 and val[start+2][end] for P1\n int valStart = vals[start] + ((start+2 < end)? maxVals[start+2][end]:0);\n maxVals[start][end] = max(valEnd, valStart);\n }\n }\n }\n return maxVals[0][n-1];\n\n }", "static int howManyGames(int p, int d, int m, int s) {\n // Return the number of games you can buy\n int res = 0;\n int cost = p;\n if(p > s){\n return 0;\n }\n if(p == s){\n return 1;\n }\n while(cost>=m && s>0 && !(s<m) && s>=cost){\n if(s>=m){\n s = s-cost;\n res++;\n\n if(cost == m)\n cost = cost-m;\n else\n cost = cost-d;\n }\n if(cost <=m){\n cost = m;\n }\n }\n return res;\n }", "int getSellQuantity();", "@Override\n\tpublic int getBuyQty(Stock2 s, ICashAccount ac) {\n double useableMny = 0;\n int buyMnt = 0;\n int maxMnt = 0;\n \n Map<String, StockBuySellEntry> lstTrades = TradeStrategyImp.getLstTradeForStocks();\n StockBuySellEntry sbs = lstTrades.get(s.getID());\n\t if (sbs != null && !sbs.is_buy_point)\n\t {\n\t \tbuyMnt = sbs.quantity;\n\t \tlog.info(\"stock:\" + s.getID() + \" with qty:\" + sbs.quantity + \" already, buy same back\");\n\t }\n\t else if (ac != null) {\n useableMny = ac.getMaxMnyForTrade();\n maxMnt = (int)(useableMny/s.getCur_pri()) / 100 * 100;\n \n \tbuyMnt = maxMnt;\n log.info(\"getBuyQty, useableMny:\" + useableMny + \" buyMnt:\" + buyMnt + \" maxMnt:\" + maxMnt);\n }\n\t\treturn buyMnt;\n\t}", "private void setWinningTuples() {\n\t\tWINS = new ArrayList<Set<CMNMove>>();\n\t\tSet<CMNMove> winSet = new TreeSet<CMNMove>();\n\t\tfor (int i = MM; i > 0; i--) {\n\t\t\tknapsack(winSet, CC, i, NN);\n\t\t}// end for\n\n\t}", "public List<Interval> findMaximumProfit(int[] prices){\n\n if(prices == null || prices.length ==0){\n return Collections.EMPTY_LIST;\n }\n int i=0;\n int n = prices.length;\n ArrayList<Interval> solutions = new ArrayList<>();\n while(i<n-1){\n while(i<n-1 && prices[i]>=prices[i+1]){\n i++;\n }\n if(i== n-1){\n return Collections.EMPTY_LIST;\n }\n Interval interval = new Interval();\n interval.buy = i;\n i++;\n while(i<=n-1 && prices[i]>=prices[i-1]){\n i++;\n }\n interval.sell = i-1;\n solutions.add(interval);\n }\n return solutions;\n }", "public static void main(String[] args){\r\n\r\n Scanner sc = new Scanner(System.in);\r\n while(sc.hasNextLong()) {\r\n int n = sc.nextInt();\r\n int p = sc.nextInt();\r\n \r\n ArrayList<Integer> listeners = new ArrayList<Integer>();\r\n \r\n int maxProfit=0;\r\n \r\n for(int i=0; i<n; i++){\r\n \tlisteners.add(sc.nextInt());\r\n }\r\n \r\n //Strip the ending\r\n while(listeners.get(0)-p <=0){\r\n \tlisteners.remove(0);\r\n }\r\n while(listeners.get(listeners.size()-1)-p<=0){\r\n \tlisteners.remove(listeners.size()-1);\r\n }\r\n \r\n for(int i=0; i<listeners.size(); i++){\r\n \tif(listeners.get(i)<=p){\r\n \t\tcontinue;\r\n \t}\r\n \tfor(int j=i; j<listeners.size(); j++){\r\n \t\tint profit=0;\r\n \t\tif(i==j){\r\n \t\t\tprofit = listeners.get(i)-p;\r\n \t\t}else{\r\n \t\t\tfor(int k=i; k<=j; k++){\r\n \t\t\t\tprofit+=listeners.get(k)-p;\r\n \t\t\t}\r\n \t\t}\r\n \t\tif(profit > maxProfit){\r\n \t\t\tmaxProfit = profit;\r\n \t\t}\r\n \t}\r\n }\r\n\r\n\r\n System.out.println(maxProfit);\r\n }\r\n sc.close();\r\n }", "public HashMap<String, ArrayList[]> determineSale() {\n HashMap<String, ArrayList[]> ordersMap = new HashMap<>();\n ordersMap.put(\"ms\", new ArrayList<Integer>[2]);\n ordersMap.put(\"gs\", new ArrayList<Integer>[2]);\n ordersMap.put(\"xlf\", new ArrayList<Integer>[2]);\n ordersMap.put(\"wfc\", new ArrayList<Integer>[2]);\n ordersMap.put(\"bond\", new ArrayList<Integer>[2]);\n\n Integer temp;\n int ind = 0;\n ArrayList<Integer> prices = ordersMap.get(\"bond\")[0];\n ArrayList<Integer> quantities = ordersMap.get(\"bond\")[1];\n for (int i = 0; i < 3; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n }\n ind = 0;\n prices = ordersMap.get(\"gs\")[0];\n quantities = ordersMap.get(\"gs\")[1];\n for (int i = 0; i < 2; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n } \n ind = 0;\n prices = ordersMap.get(\"ms\")[0];\n quantities = ordersMap.get(\"ms\")[1]; \n for (int i = 0; i < 3; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n }\n ind = 0;\n prices = ordersMap.get(\"wfc\")[0];\n quantities = ordersMap.get(\"wfc\")[1]; \n for (int i = 0; i < 2; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);;\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n }\n ind = 0;\n prices = ordersMap.get(\"xlf\")[0];\n quantities = ordersMap.get(\"xlf\")[1]; \n for (int i = 0; i < 10; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n }\n return ordersMap;\n }", "public static int minimumNumberOfWhiteWallsInStock()\n {\n return 0;\n }", "public int solve(String infile) {\r\n\r\n\t\ttry {\r\n\t\t\treadData(infile);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//A temporary object array of bids\r\n\t\tBids[] numBids = populateBids();\r\n\t\t//A temporary integer array to hold the maximum value\r\n\t\tint[] storeMaxRev = new int[numBids.length];\r\n\t\t//A temporary variable for the maximum revenue that will be updated in the main loop.\r\n\t\tint maxRev = 0;\r\n\t\t\r\n\t\t//Invokes the comparator method defined earlier\r\n\t\tLotComparator compareFinishTimes = new LotComparator();\r\n\t\tArrays.sort(numBids,compareFinishTimes);\r\n\t\t\r\n\t\t\r\n\t\t//Edge case check if the number of bids is less than 0\r\n\t\tif(numBids.length <= 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\t//Choose the first bid in the object array.\r\n\t\tstoreMaxRev[0] = numBids[0].priceOfLot;\r\n\t\t\r\n\t\t//From the second element of the object array, iterate through the array and store the price\r\n\t\t//of the element that is larger than the previous element\r\n\t\tfor(int i = 1; i < numBids.length; i++) {\r\n\t\t\tstoreMaxRev[i] = Math.max(numBids[i].priceOfLot, storeMaxRev[i - 1]);\r\n\t\t\t\r\n\t\t\t//Iterating backwards from the second last element relative to i, check if the current element is compatible.\r\n\t\t\t//A compatible bid is when the ending lot number is less than the starting lot number of the next bid.\r\n\t\t\t//If it is an compatible bid, add the price of the current bid to the previous bid and take the maximum price out of the two.\r\n\t\t\tfor(int j = i - 1; j >= 0; j--) {\r\n\t\t\t\tif(numBids[j].endLot < numBids[i].beginningLot) {\r\n\t\t\t\t\tstoreMaxRev[i] = Math.max(storeMaxRev[i], numBids[i].priceOfLot + storeMaxRev[j]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//Once all of the bids in numBid object array is processed, we get an integer array that will contain the maximum revenue.\r\n\t\t//This loop iterates through storeMaxRev and selects the largest integer which is then set to the variable maxRev and returned as the answer\r\n\t\tfor(int priceIdx = 0; priceIdx < storeMaxRev.length; priceIdx++) {\r\n\t\t\tif(maxRev < storeMaxRev[priceIdx]) {\r\n\t\t\t\tmaxRev = storeMaxRev[priceIdx];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn maxRev;\r\n\t}", "static int getMoneySpent(int[] keyboards, int[] drives, int b) {\n int max = 0, sum = 0;\n for (int i = 0; i < keyboards.length; i++) {\n for (int j = 0; j < drives.length; j++) {\n sum = keyboards[i] + drives[j];\n\n if (sum >= max && sum <= b){\n max = sum;\n\n }\n }\n }\n\n if (max == 0) return -1;\n return max;\n\n }", "private static long calc1()\n {\n final int min = 1000;\n final int max = 10000;\n\n // initialize\n List<List<Integer>> m = new ArrayList<>();\n for (int k = 0; k < end; k++) {\n List<Integer> list = new ArrayList<Integer>();\n int n = 1;\n while (k >= start) {\n int p = pkn(k, n);\n if (p >= max) {\n break;\n }\n if (p >= min) {\n list.add(p);\n }\n n++;\n }\n m.add(list);\n }\n\n boolean[] arr = new boolean[end];\n arr[start] = true;\n\n List<Integer> solutions = new ArrayList<>();\n List<Integer> list = m.get(start);\n for (Integer first : list) {\n LinkedList<Integer> values = new LinkedList<>();\n values.add(first);\n f(m, arr, values, 1, solutions);\n // we stop at the first solution found\n if (!solutions.isEmpty()) {\n break;\n }\n }\n\n // solutions.stream().forEach(System.out::println);\n int res = solutions.stream().reduce(0, Integer::sum);\n return res;\n }", "int findMaxProfit(Job arr[], int n)\n {\n // Sort jobs according to finish time\n sort(arr, arr+n, myfunction);\n\n return findMaxProfitRec(arr, n);\n }", "int getLuckyTicket();", "public static Long calculateNumberOfTickets(Long announcementPrice, int ticketValue) {\n return (announcementPrice + ticketValue - 1) / ticketValue;\n }", "private static int dialGreedy(ArrayList<Pair<Pair <Integer, Integer>,Integer>> wts, int money){\n int prevEdgeIndex = -1;\n int noDials = 10;\n int [][] dialArr = new int[money+1][noDials];\n BooleanHolder flip = new BooleanHolder(false);\n return greedyDialMax(wts, money,prevEdgeIndex,dialArr, flip);\n }", "private void knapsack(Set<CMNMove> winSet, int count, int maxnum, int target) {\n\t\tint i;\n\t\ttarget -= maxnum; /* use maxnum in sum */\n\t\tcount--; /* now need one less summand */\n\n\t\tSet<CMNMove> tempSet = new TreeSet<CMNMove>(winSet);\n\t\ttempSet.add(moveList.get(maxnum)); /* adding the winning element */\n\n\t\tif (target == 0 && count == 0) { /* we have a win */\n\t\t\tWINS.add(tempSet);\n\t\t\treturn;\n\t\t}\n\n\t\tif (target < 0 || count == 0) { /* hopeless in either case */\n\t\t\treturn;\n\t\t}\n\n\t\tfor (i = maxnum - 1; i > 0; i--) { /* try to finish recursively */\n\t\t\tknapsack(tempSet, count, i, target);\n\t\t}\n\t\treturn;\n\t}", "public static int dynamicProgramming(int n) {\n for (int i=0; i<=n; i++) {\n table[0][i] = 1;\n }\n\n for (int j=1; j<4; j++) { //this loops the different denominations.\n for (int i=0; i<=n; i++) { //this loops through the amount we have to make change for\n\n //hard to explain, create a table and look at it. For j=1 (nickel), for anything less than\n //5 cents, we just copy the value down from j=0 (penny). The nickel has no effect for anything less than 5 cents.\n if (i < denominations[j]) {\n table[j][i] = table[j-1][i];\n continue;\n }\n\n //For example, j=1 (nickel), i = 11 cents. the number of ways to make 11 cents is equal to\n //the number of ways to make 11 cents without using nickel (table[j-1][i]) plus the number\n //of ways to 6 cents (table[j][i-denomination[j]).\n table[j][i] = table[j-1][i] + table[j][i-denominations[j]];\n }\n }\n return table[3][n];\n }", "int findMaxProfit(Job arr[], int n)\n {\n // Sort jobs according to finish time\n sort(arr, arr+n, myfunction);\n\n // Create an array to store solutions of subproblems. table[i]\n // stores the profit for jobs till arr[i] (including arr[i])\n int *table = new int[n];\n table[0] = arr[0].profit;\n\n // Fill entries in M[] using recursive property\n for (int i=1; i<n; i++)\n {\n // Find profit including the current job\n int inclProf = arr[i].profit;\n int l = latestNonConflict(arr, i);\n if (l != -1)\n inclProf += table[l];\n\n // Store maximum of including and excluding\n table[i] = max(inclProf, table[i-1]);\n }\n\n // Store result and free dynamic memory allocated for table[]\n int result = table[n-1];\n delete[] table;\n\n return result;\n }", "public static int getAvailableSpaces(ParkingLot parkingLot, List<Ticket> ticketList) {\n int ticketCount = 0;\n for (Ticket ticket : ticketList) {\n if (\n ticket.getParkingLotName().equals(parkingLot.getParkingLotName()) &&\n \"\".equals(ticket.getGateExit())\n ) {\n ticketCount++;\n }\n }\n\n return parkingLot.getCapacity() - ticketCount;\n }", "public List<List<Integer>> highestRankedKItems(int[][] grid, int[] pricing, int[] start, int k) {\n\n // BFS - calculate distances\n List<int[]> nodes = bfs(grid, start, pricing);\n\n return nodes.stream()\n .sorted((o1, o2) -> o1[2] == o2[2] ? o1[3] == o2[3] ? o1[0] == o2[0] ? o1[1] - o2[1] : o1[0] - o2[0] : o1[3] - o2[3] : o1[2] - o2[2])\n .map(node -> List.of(node[0], node[1]))\n .limit(k)\n .collect(Collectors.toList());\n }", "public int getNoOfTickets() {\n\t\treturn noOfTickets;\r\n\t}", "private int calculateInputStock_Items() {\n\t\tint total = 0;\n\t\tArrayList<Integer> stock = getAllStockValues();\n\t\tif (!stock.isEmpty()) {\n\t\t\t// get for all K\n\t\t\ttotal += (stock.get(0) * getSetUpMachine().getVending_item().get(\"K\"));\n\t\t\t// get for all S\n\t\t\ttotal += (stock.get(1) * getSetUpMachine().getVending_item().get(\"S\"));\n\t\t\t// get for all F\n\t\t\ttotal += (stock.get(2) * getSetUpMachine().getVending_item().get(\"F\"));\n\t\t\t// get for all N\n\t\t\ttotal += (stock.get(3) * getSetUpMachine().getVending_item().get(\"N\"));\n\t\t}\n\t\treturn total;\n\t}", "int getChestsAmount();", "public static void main(String[] args) {\n\t\t\n\t\tScanner scanner = new Scanner(System.in);\n\t\tHashMap<Integer, Integer> TFSARoom = new HashMap<Integer, Integer>();\n\t\tTFSARoom.put(2009, 5000);\n\t\tTFSARoom.put(2010, 5000);\n\t\tTFSARoom.put(2011, 5000);\n\t\tTFSARoom.put(2012, 5000);\n\t\tTFSARoom.put(2013, 5500);\n\t\tTFSARoom.put(2014, 5500);\n\t\tTFSARoom.put(2015, 10000);\n\t\tTFSARoom.put(2016, 5500);\n\t\tTFSARoom.put(2017, 5500);\n\t\tTFSARoom.put(2018, 5500);\n\t\tTFSARoom.put(2019, 6000);\n\t\tTFSARoom.put(2020, 6000);\n\t\tTFSARoom.put(2021, 6000);\n\t\t\n\t\tSystem.out.println(\"Welcome to Max TFSA Contribution Room Calculator!\");\n\t\tSystem.out.println(\"In what year did you turn 18?\");\n\t\tint year_input = Integer.valueOf(scanner.nextLine());\n\t\tint cont_room = 0;\n\t\t\n\t\ttry {\n\t\t\tif (year_input >= 1921 && year_input < 2009) {\n\t\t\t\tfor (int i = 2009; i <= 2021; i++) {\n\t\t\t\t\tcont_room += TFSARoom.get(i);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Your maximum contribution room is \" + cont_room + \" \"\n\t\t\t\t\t\t+ \"as of 2021.\");\n\t\t\t}\n\t\t\telse if (2009 <= year_input && year_input <= 2021) {\n\t\t\t\tfor (int i = year_input; i <= 2021; i++) {\n\t\t\t\t\tcont_room += TFSARoom.get(i);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Your maximum contribution room is \" + cont_room + \" \"\n\t\t\t\t\t\t+ \"as of 2021.\");\n\t\t\t}\n\t\t\telse if (year_input < 1921 || year_input > 2021) {\n\t\t\t\tSystem.out.println(\"Sorry, but this calculator is accurate as of 2021. \"\n\t\t\t\t\t\t+ \"Please try again with an input that is a year between 1921 \"\n\t\t\t\t\t\t+ \"and 2021 (inclusively) in YYYY format.\");\n\t\t\t}\n\t\t\tscanner.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Sorry, but this input is not a year. Please try again with an \"\n\t\t\t\t\t+ \"input that is a year between 1921 and 2021 (inclusively) in YYYY format.\");\n\t\t}\n\t\tscanner.close();\n\t}", "public int maxProfit(int k, int[] prices) {\n if(prices.length==0) return 0;\n if(k>(prices.length>>>1)){\n int T0=0;\n int T1=-(int)1e8;\n for(int val:prices){\n T0=Math.max(T0,T1 + val);\n T1=Math.max(T1,T0 - val);\n }\n return T0;\n }\n int Ti0[]=new int[k+1];\n int Ti1[]=new int[k+1];\n Arrays.fill(Ti1,(int)-1e8);\n for(int val:prices){\n for(int K=k;K>0;K--){\n Ti0[K]=Math.max(Ti0[K],Ti1[K]+val);\n Ti1[K]=Math.max(Ti1[K],Ti0[K-1] - val);\n }\n }\n return Ti0[k];\n }", "public void makeRounds() {\n for (int i = 0; i < nrofturns; i++) {\n int check = 0;\n // If all distributors are bankrupt we intrrerupt the simulation\n for (Distributor d : listOfDistributors.getList()) {\n if (d.isBankrupt()) {\n continue;\n }\n check = 1;\n break;\n }\n if (check == 0) {\n break;\n }\n // Auxiliary variable that will point to the best deal for the consumers\n Distributor bestDist;\n // Making the updates at the start of each month\n if (listOfUpdates.getList().get(i).getNewConsumers().size() != 0) {\n for (Consumer x : listOfUpdates.getList().get(i).getNewConsumers()) {\n listOfConsumers.getList().add(x);\n }\n }\n if (listOfUpdates.getList().get(i).getDistributorChanges().size() != 0) {\n for (DistributorChanges x : listOfUpdates.getList().get(\n i).getDistributorChanges()) {\n listOfDistributors.grabDistributorbyID(\n x.getId()).setInitialInfrastructureCost(x.getInfrastructureCost());\n }\n }\n\n // Checking if the producers have changed their costs asta ar trb sa fie update\n\n // Making the variable point to the best deal in the current round\n // while also calculating the contract price for each distributor\n bestDist = listOfDistributors.getBestDistinRound();\n // Removing the link between consumers and distributors when the contract has ended\n for (Distributor d : listOfDistributors.getList()) {\n if (d.isBankrupt()) {\n // Case in which we delete the due payment of the consumer if\n // its current distributor goes bankrupt\n for (Consumer cons : listOfConsumers.getList()) {\n if (cons.getIdofDist() == d.getId()) {\n cons.setDuepayment(0);\n cons.setMonthstoPay(0);\n cons.setIdofDist(-1);\n }\n }\n continue;\n }\n d.getSubscribedconsumers().removeIf(\n c -> c.isBankrupt() || c.getMonthstoPay() <= 0);\n }\n // Giving the non-bankrupt consumers their monthly income and getting the ones\n // without a contract a deal (the best one)\n for (Consumer c : listOfConsumers.getList()) {\n if (c.isBankrupt()) {\n continue;\n }\n c.addtoBudget(c.getMonthlyIncome());\n if (c.getMonthstoPay() <= 0 || c.getIdofDist() == -1) {\n c.setIdofDist(bestDist.getId());\n c.setMonthstoPay(bestDist.getContractLength());\n c.setToPay(bestDist.getContractPrice());\n bestDist.addSubscribedconsumer(c);\n }\n }\n // Making the monthly payments for the non-bankrupt consumers\n for (Consumer entity : listOfConsumers.getList()) {\n if (entity.isBankrupt()) {\n continue;\n }\n // If the consumer has no due payment we check if he can pay the current rate\n if (entity.getDuepayment() == 0) {\n // If he can, do just that\n if (entity.getBudget() >= entity.getToPay()) {\n entity.addtoBudget(-entity.getToPay());\n listOfDistributors.grabDistributorbyID(entity.getIdofDist()).addBudget(\n entity.getToPay());\n entity.reduceMonths();\n // Contract has ended\n if (entity.getMonthstoPay() <= 0) {\n entity.setIdofDist(-1);\n }\n } else {\n // He cannot pay so he gets a due payment\n entity.setDuepayment(entity.getToPay());\n entity.reduceMonths();\n }\n } else {\n // The consumer has a due payment\n if (entity.getMonthstoPay() == 0) {\n // He has one to a distributor with whom he has ended the contract so\n // he must make the due payment and the one to the new distributor\n int aux = (int) Math.round(Math.floor(DUECOEFF * entity.getDuepayment()));\n int idAux = entity.getIdofDist();\n entity.setIdofDist(bestDist.getId());\n entity.setToPay(bestDist.getContractPrice());\n entity.setMonthstoPay(bestDist.getContractLength());\n bestDist.addSubscribedconsumer(entity);\n // He is able to\n if (entity.getBudget() >= (aux + entity.getToPay())) {\n entity.addtoBudget(-(aux + entity.getToPay()));\n listOfDistributors.grabDistributorbyID(idAux).addBudget(\n aux);\n listOfDistributors.grabDistributorbyID(entity.getIdofDist()).addBudget(\n entity.getToPay());\n entity.reduceMonths();\n } else {\n // He has insufficient funds\n entity.setBankrupt(true);\n }\n } else {\n // His due payment is at the same distributor he has to make the monthly\n // payments\n // He can do the payments\n if (entity.getBudget()\n >= (int) Math.round(Math.floor(DUECOEFF * entity.getDuepayment())\n + entity.getToPay())) {\n entity.addtoBudget(-(int) Math.round(Math.floor(DUECOEFF\n * entity.getDuepayment()) + entity.getToPay()));\n listOfDistributors.grabDistributorbyID(entity.getIdofDist()).addBudget(\n (int) Math.round(Math.floor(DUECOEFF * entity.getDuepayment())\n + entity.getToPay()));\n entity.reduceMonths();\n } else {\n // He cannot do the payments\n entity.setBankrupt(true);\n }\n }\n }\n }\n // The non-bankrupt distributors pay their monthly rates\n for (Distributor d : listOfDistributors.getList()) {\n if (d.isBankrupt()) {\n continue;\n }\n d.reduceBudget();\n // Those who cannot, go bankrupt\n if (d.getBudget() < 0) {\n d.setBankrupt(true);\n }\n }\n\n this.roundsAdjustments(i);\n }\n }", "public BigDecimal getPriceLimitEntered();", "public Money findMaxPrice(long n) {\n\t\tif (!hashMap.containsKey(n)) {\n\t\t\treturn new Money();\n\t\t}\n\t\tTreeSet<Long> idSet = hashMap.get(n);\n\t\tMoney max = new Money();\n\t\tboolean flag = false;\n\t\tfor (Long id : idSet) {\n\t\t if(treeMap.containsKey(id)){\n\t\t\tMoney current = treeMap.get(id).price;\n\t\t\tif (max.compareTo(current) == -1 || !flag) {\n\t\t\t\tmax = current;\n\t\t\t\tflag = true;\n\t\t\t}\n\t\t}\n\t\t}\n\t\treturn max;\n\t}", "private void Knapsack(int[] vol, int[] ben, int n, int V, int[][] M)\r\n {\r\n int i,j;\r\n \r\n for (i=1; i<n; i++) {\r\n M[i][0] = 0;\r\n }\r\n \r\n for (j=1; j<V; j++) {\r\n M[0][j] = 0;\r\n }\r\n\r\n for (i=1; i<=n; i++) {\r\n for (j=1; j<=V; j++) {\r\n if(vol[i] > j) {\r\n M[i][j] = M[i-1][j];\r\n } else {\r\n M[i][j] = max(M[i-1][j], M[i-1][j-vol[i]] + ben[i]);\r\n }\r\n }\r\n }\r\n }", "private int calculatePrice() {\n int price = numberOfCoffees * 5;\n\n return price;\n\n\n }", "public int getMaxOldProductPriceForUpdateInOurs() {\n return 24;\n }", "static RodCuttingRevenue findCuttingWaysToGetMaximumRevenue(int[] prices, int priceToCut) {\n int len = prices.length;\n int[] optimalCuts = new int[len+1];\n int[] revenue = new int[len+1];\n for(int i=1; i<=len; i++) {\n int max = prices[i-1];\n optimalCuts[i] = i;\n for(int j=0;j<i; j++) {\n int price = prices[j] + revenue[i-j-1] - priceToCut;\n if(max<price) {\n max = price;\n optimalCuts[i] = j+1;\n }\n }\n revenue[i] = max;\n }\n return new RodCuttingRevenue(revenue[len], optimalCuts);\n }", "public int maxProfit(int k, int[] prices) {\n int n = prices.length;\n // validate input 1\n if (k <= 0 || n == 0) return 0;\n\n // validate input 2 : if k is large enough, the question will be the same as question II.\n if (k >= n / 2) {\n int result = 0;\n for (int i = 1; i < n; ++i) {\n if (prices[i] - prices[i - 1] > 0) {\n result += prices[i] - prices[i - 1];\n }\n }\n return result;\n }\n int[][][] dp = new int[prices.length + 1][k + 1][2];\n for (int i = 0; i < dp.length; i++) {\n dp[i][0][1] = Integer.MIN_VALUE;\n }\n for (int i = 0; i < dp[0].length; i++) {\n dp[0][i][1] = Integer.MIN_VALUE;\n }\n for (int i = 1; i < dp.length; i++) {\n for (int j = 1; j < dp[0].length; j++) {\n dp[i][j][0] = Math.max(dp[i - 1][j][1] + prices[i - 1], dp[i - 1][j][0]);\n dp[i][j][1] = Math.max(dp[i - 1][j - 1][0] - prices[i - 1], dp[i - 1][j][1]);\n }\n }\n return dp[dp.length - 1][k][0];\n }", "public int getNumberAvailableSeats(){\n int out = Integer.MAX_VALUE;\n for(int i=0; i<flights.size();i++){\n for(int j=0; j<availabilities.size(); j++) {\n if (flights.get(i).getFlightNumber().equals(availabilities.get(j).getFlightNumber())) {\n if (availabilities.get(i).getNumberAvailableSeatsLeg1() < out) {\n out = availabilities.get(i).getNumberAvailableSeatsLeg1();\n }\n if (availabilities.get(i).getNumberAvailableSeatsLeg2() != null) {\n if (availabilities.get(i).getNumberAvailableSeatsLeg2() < out) {\n out = availabilities.get(i).getNumberAvailableSeatsLeg2();\n }\n }\n break;\n }\n }\n }\n return out;\n }", "public void findHighestPowerUnitAnySize() {\r\n\t\ttimer.startAlgorithm(\"ChronalCharger.findHighestPowerUnitAnySize()\");\r\n\t\tfor (int i=1; i<=300; i++) {\r\n//\t\t\tcurrentGrid = new ShrinkingPowerGrid(i, 300);\r\n\t\t\tfindHighestPowerUnit(i);\r\n//\t\t\tpreviousGrids.add(currentGrid);\r\n\t\t}\r\n\t\ttimer.stopAlgorithm();\r\n\t}", "public boolean setBestAvailable(int tickets) {\r\n\t\tTheaterSeat previous = null;\r\n\t\tdouble closeness = 9999;\r\n\t\tdouble tempCloseness = 9999;\r\n\t\tint middle = tickets / 2;\r\n\t\tint toRight;\r\n\t\tif (middle % 2 == 0) {\r\n\t\t\ttoRight = middle - 1;\r\n\t\t} else {\r\n\t\t\ttoRight = middle;\r\n\t\t}\r\n\t\t\r\n\t\tTheaterSeat current = getFirst();\r\n\t\t\r\n\t\tfor (int i=0; i<numRows; i++) {\r\n\t\t\tfor (int j=0; j< numCols - tickets; j++) {\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\tif (checkAvailability(i, (char)(j + 65), tickets)) {\r\n\t\t\t\t\tfor (int i1 = 0; i1<middle; i1++) {\r\n\t\t\t\t\t\tcurrent = current.getRight();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//distance formula w/o square root to find relative distance from center\r\n\t\t\t\t\tdouble xSquared = Math.pow(numCols/2.0 - .5 -(int)(current.getSeat() - 65), 2);\r\n\t\t\t\t\tdouble ySquared = Math.pow(numRows/2.0 - .5 - (int)(current.getRow()), 2);\r\n\t\t\t\t\ttempCloseness = xSquared + ySquared;\r\n\t\t\t\t\tSystem.out.println(current.getRow());\r\n\t\t\t\t\tfor (int i1 = 0; i1<middle; i1++) {\r\n\t\t\t\t\t\tcurrent = current.getLeft();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(tempCloseness);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (tempCloseness < closeness) {\r\n\t\t\t\t\t\tcloseness = tempCloseness;\r\n\t\t\t\t\t\tcurrent.bestAvailable = true;\r\n\t\t\t\t\t\tif (previous != null)\r\n\t\t\t\t\t\t\tprevious.bestAvailable = false;\r\n\t\t\t\t\t\tprevious = current;\r\n\t\t\t\t\t} else if (tempCloseness == closeness) {\r\n\t\t\t\t\t\t//find closest row to center\r\n\t\t\t\t\t\tdouble newYDistanceSquare = Math.pow(current.getRow() - numRows/2.0 + .5, 2);\r\n\t\t\t\t\t\tdouble oldYDistanceSquare = Math.pow(previous.getRow() - numRows/2.0 + .5, 2);\r\n\t\t\t\t\t\tSystem.out.println(\"here\");\r\n\t\t\t\t\t\tSystem.out.println(newYDistanceSquare);\r\n\t\t\t\t\t\tSystem.out.println(oldYDistanceSquare);\r\n\t\t\t\t\t\t//favors lower row in case of tie (must be less than oldYDistanceSqaure)\r\n\t\t\t\t\t\tif (newYDistanceSquare < oldYDistanceSquare) {\r\n\t\t\t\t\t\t\tcloseness = tempCloseness;\r\n\t\t\t\t\t\t\tcurrent.bestAvailable = true;\r\n\t\t\t\t\t\t\tif (previous != null)\r\n\t\t\t\t\t\t\t\tprevious.bestAvailable = false;\r\n\t\t\t\t\t\t\tprevious = current;\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\t\r\n\t\t\t\t}\r\n\t\t\t\tcurrent = current.getRight();\r\n\t\t\t}\r\n\t\t\t//go back to the left and down a row\r\n\t\t\tfor (int i2 = 0; i2 < numCols - tickets; i2++) {\r\n\t\t\t\tcurrent = current.getLeft();\r\n\t\t\t}\r\n\t\t\tcurrent = current.getDown();\r\n\t\t}\r\n\t\tif (closeness == 9999) {\r\n\t\t\treturn false; //shows no seats passed the availability test (very high #)\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private int getNumberOfBoxesOfAllShips() {\r\n int count = 30;\r\n return count;\r\n }", "public void setNoOfTicket(String noOfTickets) {\n \r\n }", "@Override\n public int howManyCoins() {\n return 7;\n }", "protected static int creatingMaxWQSelect(int train, Passenger[][] waitingRoom) {\n // Declaring the number for selecting.\n int maxQueueSelect;\n\n // When the waiting room is higher than 5.\n if (waitingRoomSize(train, waitingRoom) > 5) {\n maxQueueSelect = new Random().nextInt(6) + 1;\n }\n // When the waiting room is empty\n else if (waitingRoomSize(train, waitingRoom) == 0){\n maxQueueSelect = 0;\n }\n // When the waaiting room is not empty and less than or equal to 5.\n else {\n maxQueueSelect = new Random().nextInt(waitingRoomSize(train, waitingRoom)) + 1;\n }\n\n // Returning the generated random number.\n return maxQueueSelect;\n }", "private int getBouquetCount(int[] bloomDay, int k, int waitingDays) {\n int bouquetCount = 0;\n int requiredFlowers = k;\n for (final int day : bloomDay)\n if (day > waitingDays) {\n // Reset `requiredFlowers` since there was not enough adjacent flowers.\n requiredFlowers = k;\n } else if (--requiredFlowers == 0) {\n // Use k adjacent flowers to make a bouquet.\n ++bouquetCount;\n requiredFlowers = k;\n }\n return bouquetCount;\n }", "public MovieRentingSystem(int n, int[][] entries) {\r\n cheapestUnrentedShops = new HashMap();\r\n cheapestRentedMovies = new TreeSet<int []>((a,b) -> a[2] == b[2] ? (a[0] == b[0] ? a[1] - b[1] : a[0] - b[0]) : a[2] - b[2]);\r\n movieToShopToEntry = new HashMap();\r\n \r\n for(int []entry: entries){\r\n int shop = entry[0];\r\n int movie = entry[1];\r\n \r\n Map<Integer, int []> hm = movieToShopToEntry.getOrDefault(movie, new HashMap());\r\n hm.put(shop, entry);\r\n movieToShopToEntry.put(movie, hm);\r\n \r\n TreeSet<int []> ts = cheapestUnrentedShops.getOrDefault(movie, new TreeSet<int []>((a,b) -> a[2] == b[2] ? a[0] - b[0] : a[2] - b[2]));\r\n ts.add(entry);\r\n cheapestUnrentedShops.put(movie, ts);\r\n }\r\n }", "@Override\n public void run() {\n while (true) {\n synchronized (Window.class) { //此时的this就是唯一的Window1对象\n if (ticket > 0) {\n //还有余票\n System.out.println(getName() + \":卖票,票号为\" + ticket);\n ticket--;\n } else {\n break;\n }\n }\n }\n }", "int getNewlyAvailableQuestsCount();", "public List<List<Integer>> getCandidateA(int nStartVal, int k, int n) {\n \tint nMin; \r\n \tint nMax; \r\n \tint i;\r\n \tList<List<Integer>> lstlstCombSum = new ArrayList<List<Integer>>();\r\n List<Integer> lstResult = new ArrayList<Integer>();\r\n \t\r\n \tif (nStartVal > n || k == 0) return lstlstCombSum;\r\n \t\r\n \tif (k == 1) {\r\n \t\tif (n > 9) return lstlstCombSum;\r\n \t\tlstResult.add(n);\r\n \t\tlstlstCombSum.add(lstResult);\r\n \t\treturn lstlstCombSum;\r\n \t}\r\n \t\r\n \tnMin = nStartVal;\r\n \tnMax = (int) (n - (k-1)*k/2)/k; //Max value occurs when the remaining numbers are: x (the maxvalue), x+1, x+2 ... x+k-1 (the sum should be n)\r\n \t\r\n \tfor (i = nMin; i <= nMax; i++) { //Possible value of the first\r\n \t\tList<List<Integer>> lstlstCombSumTmp = new ArrayList<List<Integer>>();\r\n \t\tlstlstCombSumTmp = getCandidateA(i+1, k-1, n-i);\r\n \t\t\r\n \t\tif (lstlstCombSumTmp.isEmpty()) continue;\r\n \t\t\r\n \t\tfor (List<Integer> lstOneCombSum:lstlstCombSumTmp) {\r\n \t\t\tlstOneCombSum.add(0, i);\r\n \t\t\tlstlstCombSum.add(lstOneCombSum);\r\n \t\t}\r\n \t\t\r\n \t}\r\n \t\r\n \treturn lstlstCombSum;\r\n }", "default int getMaximumCount(int slot) {\n\t\treturn 64;\n\t}", "public int totalNQueens(int n) {\n return backtrack(0, new int[n]);\n }", "int askForTempMax();", "public int howMany(int temp) {\n // initial quantity is 0\n int totalQuantity = 0;\n // for each item\n for (int i = 0; i < this._noOfItems; i++) {\n FoodItem currentItem = this._stock[i];\n // if refridgerator temperature is in the item's valid temperature range\n if (temp >= currentItem.getMinTemperature() &&\n temp <= currentItem.getMaxTemperature()) {\n // sum the quantity of the item with previous quantitys sum\n totalQuantity += currentItem.getQuantity();\n }\n }\n // and return the total quantity\n return totalQuantity;\n }", "@Override\r\n\tpublic Ticket buyTicket(String passenger, int route, int departure, int arrival) {\n\t\tint k = route;\r\n\t // Add sentinels to start and end\r\n\t\tMyLinkedList list = new MyLinkedList();\r\n\t\tNode head = list.init();\r\n\t\t//list.add(k);\r\n\t\tlist.print(head);\r\n\t\tSystem.out.println(\"链表长度为: \"+ list.get_length(head));\r\n\t\t//创建前驱结点(起点)和当前节点和目标节点(终点)\r\n\t Node predpred = new Node(departure-1);\r\n\t\tNode pred = new Node(departure);\r\n\t\tNode curr = pred.next;\r\n\t\tNode succ = new Node(arrival);\r\n\t\t//predpred.key = departure -1;\r\n\t\t//pred.key = departure;\r\n\t\t//succ.key = arrival;\r\n\r\n\t\t\r\n\t\tfor (int i = 1; i <= 8*100; i++){\r\n\t\t\thead.lock();\r\n\t\t try {\r\n\t\t pred = head;\r\n\t\t curr = pred.next;\r\n\t\t curr.lock();\r\n\t\t try {\r\n\t\t while (curr.key < succ.key) {\r\n\t\t \t //System.out.println(predpred.key);\r\n\t\t //System.out.println(curr.key + \" \" + succ.key);\r\n\t\t pred.unlock();\r\n\t\t pred = curr;\r\n\t\t curr = curr.next;\r\n\t\t curr.lock();\r\n\t\t }\r\n\t\t if (curr.key == succ.key) {\r\n\t\t \tpredpred.next = curr.next;\r\n\t\t\t\t\tticket.tid = k*1000 + i/100+100 + i%100;\r\n\t\t\t\t\tticket.passenger = passenger;\r\n\t\t\t\t\tticket.route = route;\r\n\t\t\t\t\tticket.coach = i/100+1;\r\n\t\t\t\t\tticket.seat = i%100;\r\n\t\t\t\t\tticket.departure = departure;\r\n\t\t\t\t\tticket.arrival = arrival;\r\n\t\t\t\t\t//System.out.println(\"lock\"+ ticket);\r\n\t\t\t\t\treturn ticket;\r\n\t\t }\r\n\t\t } finally {curr.unlock();}\r\n\t\t } finally {pred.unlock();}\r\n\t\t i++;\r\n\t\t\tlist.print(head);\r\n\t\t\tSystem.out.println(\"新链表长度为: \"+ list.get_length(head));\r\n\t\t}\r\n\r\n\t\t\r\n\t\t//检索每一张座位的区间。看看我的座位的区间在不在别人的区间内。\r\n\t\treturn null;\r\n\t}", "public static void main(String args[]) throws Exception\t{\n Scanner sc = new Scanner(new FileInputStream(\"disposal_sample.txt\"));\n\n int T = sc.nextInt();\n for(int test_case = 0; test_case < T; test_case++) {\n\n int N = sc.nextInt();\n int M = sc.nextInt();\n\n\n int[] d = new int[N];\n Queue<Integer> Q = new LinkedList<>();\n int sum = 0;\n int len = 10000;\n\n\n for(int i=0;i<N;i++){\n int input = sc.nextInt();\n Q.add(input);\n sum += input;\n while(sum >= M){\n int size = Q.size();\n\n if(len > size)\n len = size;\n sum -= Q.remove();\n }\n }\n if(len == 10000)\n len = 0;\n\n\n /*\n for(int i=0;i<N;i++) {\n d[i] = sc.nextInt();\n }\n int front = 0;\n int back = 0;\n int sum = d[back];\n int len = Integer.MAX_VALUE;\n\n while(true) {\n\n if(sum < M){\n if(back == N-1)\n break;\n back++;\n sum += d[back];\n\n }\n else{\n if(front == back){\n len = 1;\n break;\n }\n\n int tempLen = (back - front)+1;\n if(len > tempLen) {\n len = tempLen;\n }\n sum -= d[front];\n front++;\n }\n\n }*/\n Answer = len;\n System.out.println(\"Case #\"+(test_case+1));\n System.out.println(Answer);\n }\n }", "public float calculate(Ticket t) {\n\t}", "public Ticket(){\n price = ((double)(Math.random() * (MAX + 1 - MIN))) + MIN;\n }", "public static void cutRod() {\n\t\tint[] price = {1,5,8,9,13};\n\t\tint N = price.length;\n\t\tint[] val = new int[N+1];\n\t\tval[0] = 0;\n\t\tfor(int i=1; i<=N; i++) {\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tfor(int j=0; j<i; j++) {\n\t\t\t\tmax = Math.max(max, price[j]+val[i-j-1]);\n\t\t\t}\n\t\t\tval[i] = max;\n\t\t}\n\t\tSystem.out.println(\"max val \"+val[N]);\n\t}", "public static int maxMoneyLooted(int[] houses) {\n int n = houses.length;\n int dp[] = new int[n];\n if(n==0)\n return 0;\n dp[0] = houses[0];\n dp[1]= Math.max(houses[0], houses[1]);\n for(int i =2; i<n ; i++)\n {\n dp[i] = Math.max(houses[i] + dp[i-2], dp[i-1] );\n }\n \n return dp[n-1];\n\t}", "String getMaximumRedeliveries();", "private void ObjectsKnapsack(int[] vol, int[][] M, int n, int V, int[] objects)\r\n {\r\n int i,W;\r\n W = V;\r\n \r\n for(i=n; i>=1; i--) {\r\n if(M[i][W] == M[i-1][W]) {\r\n objects[i] = 0;\r\n } else {\r\n \tobjects[i] = 1;\r\n W = W - vol[i];\r\n }\r\n }\r\n }", "int getNumOfBuyOrders();", "public Knapsack bruteForceCalc (ArrayList <Item> items,int capacity, int num_items) {\n\t\tif (num_items <= 0) {\n\t\t\tKnapsack knapsack = new Knapsack(0);\n\t\t\treturn knapsack;\n\t\t} \n\t\telse if (items.get(num_items -1).getWeight() > capacity) {\n\t\t\treturn bruteForceCalc(items, capacity, num_items - 1);\n\t\t} else {\n\n\t\t\tKnapsack ignore = bruteForceCalc(items,capacity, num_items - 1);\n\t\t\tKnapsack take = bruteForceCalc(items,capacity - items.get(num_items -1).getWeight(), num_items - 1);\n\t\t\t\n\t\t\tint ignoreVal = ignore.getValue();\n\t\t\tint takeVal = items.get(num_items - 1).getValue() + take.getValue();\n\t\t\t \n\t\t\tif( Math.max(ignoreVal, takeVal) == ignoreVal ) \n\t\t\t\treturn ignore;\n\t\t\telse {\n\t\t\t\ttake.addItem(items.get(num_items - 1));\n\t\t\t\treturn take;\n\t\t\t}\n\t\t}\n\t}", "int countSusbset(int n, int w){\n //i.e target sum achieved\n if(w == 0){\n return 1;\n }\n \n //if sum not achieved and no items left\n if(n == 0){\n return 0;\n }\n \n //if item is gretart than target weight, we have to exclude it\n if(arr[n-1] > w){\n return countSusbset(n-1, w)\n }else{ \n return countSusbset(n-1, w) + countSusbset(n-1, w - arr[n-1]);\n }\n}", "public static void main (String [] args) throws IOException {\n BufferedReader f = new BufferedReader(new FileReader(\"buylow.in\"));\n // input file name goes above\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"buylow.out\")));\n // Use StringTokenizer vs. readLine/split -- lots faster\n StringTokenizer st = new StringTokenizer(f.readLine());\n // Get line, break into tokens\n int n = Integer.parseInt(st.nextToken());\n int[] price = new int[n];\n int[] dp = new int[n];\n BigInteger[] times = new BigInteger[n];\n for(int i = 0; i < n; i++){\n times[i] = BigInteger.ZERO;\n }\n st = new StringTokenizer(f.readLine());\n for(int i = 0; i < n; i++){\n if(!st.hasMoreTokens())\n st = new StringTokenizer(f.readLine());\n int current = Integer.parseInt(st.nextToken());\n price[i] = current;\n int max = 1;\n for(int j = i - 1; j >= 0; j--){\n if(price[j] > current){\n if(dp[j] + 1 > max){\n max = dp[j] + 1;\n }\n }\n }\n dp[i] = max;\n if(max == 1){\n times[i] = BigInteger.ONE;\n }\n else {\n HashSet<Integer> got = new HashSet<>();\n for(int j = i - 1; j >= 0; j--){\n if(price[j] > current)\n if(dp[j] + 1 == max){\n if(!got.contains(price[j])){\n got.add(price[j]);\n times[i] = times[i].add(times[j]);\n }\n }\n }\n }\n }\n int max = 0;\n for(int i = 0; i < n; i++){\n if(dp[i] > max)\n max = dp[i];\n }\n BigInteger result = BigInteger.ZERO;\n HashSet<Integer> got = new HashSet<>();\n for(int i = n - 1; i >= 0; i--){\n if(dp[i] == max)\n if(!got.contains(price[i])){\n got.add(price[i]);\n result = result.add(times[i]);\n }\n }\n out.println(max + \" \" + result.toString()); // output result\n out.close(); // close the output file\n }", "private Ticket givenTicketInOrderedBilled() {\n CreateTicketVO createTicketVO = CreateTicketVO.newBuilder()\n .ticketIssuingType(TicketIssuingType.ONE_TICKET_FOR_ALL_PRODUCTS)\n .products(this.products)\n .paymentType(PaymentType.NO_PAYMENT)\n .account(this.account).build();\n TicketOrder ticketOrder = this.ticketFactory.createTickets(createTicketVO);\n Ticket ticket = ticketOrder.getBillingTicket();\n // [1,0] -> [8,0]\n ticket.nextStateOk();\n // [8,0] -> [8,1]\n ticket.nextStateOk();\n // [8,1] -> [8,4]\n ticket.nextStateOk();\n // [8,4] -> [8,2]\n ticket.nextStateOk();\n return ticket;\n }", "public int minOperationsMaxProfit(int[] customers, int boardingCost, int runningCost) {\n int max = 0, current = 0;\n int count = 0;\n int ans = 0, currentRound = 0;\n \n for (int i : customers) {\n count += i;\n if (count >= 4) {\n current = current + boardingCost * 4 - runningCost;\n count -= 4;\n } else {\n current = current + boardingCost * count - runningCost;\n count = 0;\n }\n currentRound++;\n if (max < current) {\n max = current;\n ans = currentRound;\n }\n }\n \n while (count > 0) {\n if (count >= 4) {\n current = current + boardingCost * 4 - runningCost;\n count -= 4;\n } else {\n current = current + boardingCost * count - runningCost;\n count = 0;\n }\n currentRound++;\n if (max < current) {\n max = current;\n ans = currentRound;\n }\n }\n \n if (max <= 0) return -1;\n return ans;\n }", "public int runTrialsBottomUp(int possibleSpeeds, int weeks) {\n int minTests = 0;\n // Your code here\n for(int i = 0; i < possibleSpeeds; i++){\n for(int j = 0; j < weeks; j++){\n runTrialsBottomUp[i,j]= max(runTrialsBottomUp(i-1, j) + runTrialsBottomUp(i, j+1));\n minTests[i,j] = runTrialBottomUp [i,j];\n }\n }\n return minTests;\n }", "boolean isWinningCombination(Ticket ticket);", "static int knapsack(int[] weight, int[] value, int n, int maxWeight) {\n int[][] dp = new int[n+1][maxWeight+1];\n for (int i=0;i<=n;i++) {\n for (int j =0;j<=maxWeight;j++) {\n dp[i][j] = -1;\n }\n }\n int ans= knapsack(weight,value,n,maxWeight,dp);\n return ans;\n\n }", "static long countTriplets(List<Long> arr, long r) {\n Map<Long, Integer> map=new HashMap<Long, Integer>();\n int l = arr.size();\n long triplets = 0;\n //Create a map with unique numbers in arr as key and its frequency as value\n for(int i = 0; i < l; i++) {\n if (map.containsKey(arr.get(i))) {\n map.put(arr.get(i), map.get(arr.get(i)) + 1);\n } else {\n map.put(arr.get(i), 1);\n }\n }\n \n /*\n If ratio is 1, arr is {2,2,2,2,2,2,2,2,2,2}.. 2 is 10 times than map will be \n {(2, 10)}, where 2 is key and 10 is value than answer will be Nc3 (10c3), using permutations and combinations.. select '2' three times from 10 items which can be done in 10c3 ways\n */\n if (r == 1) {\n for (Map.Entry<Long, Integer> entry : map.entrySet()) {\n long key = entry.getKey();\n long val = entry.getValue();\n System.out.println(\"Key is: \" + key);\n System.out.println(\"Value is: \" + val);\n if (val > 2) {\n //here applying formula for Nc3\n triplets = triplets + (val * (val - 1) * (val - 2))/6;\n }\n } \n } else {\n /*\n eg. 2,4,4,8,8,16,24,24,24 and r is 2\n map will be {(2,1), (4,2), (8,2), (16,1), (24,3)}\n iterate for every key,value pair in the map\n first time (2,1), key is 2.. now check for 2*r(4) and 2*r*r(8) in map\n if present means triplet found.. now we need to calculate how many triplets can be formed with these 3 values.. that will be multiplication of values of these 3 keys in map... 2 is 1 time, 4 is 2 times, 8 is 2 times... no. of triplets = 1*2*2=4\n */\n for (Map.Entry<Long, Integer> entry : map.entrySet()) {\n long key1 = entry.getKey();\n long val = entry.getValue();\n long key2 = key1 * r;\n long key3 = key2 * r;\n\n if(map.containsKey(key2) && map.containsKey(key3)) {\n triplets = triplets + (val * map.get(key2) * map.get(key3));\n }\n } \n }\n return triplets;\n }", "@Test\n public void returnMaxNumberOfBetsCanMade(){\n assertEquals(maxNumberOfBets,gameRule.getMaxBetsPerRound());\n }", "static int unboundedKnapsack(int [] val,int[] wt, int W){\n int n = val.length;\n int[][] dp = new int[n+1][W+1];\n for (int i =0;i<=n;i++){\n dp[i][0] = 0;\n }\n for (int j = 0;j<=W;j++){\n dp[0][j] = 0;\n }\n\n for (int i=1;i<=n;i++){\n for (int j = 1;j<=W;j++){\n if (wt[i-1] <= j){\n dp[i][j] = Math.max(dp[i-1][j], val[i-1] + dp[i][j - wt[i-1]]);\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][W];\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int k = scan.nextInt();\n int[] freeway = new int[n];\n\n for (int l = 0; l < freeway.length; ++l) {\n freeway[l] = scan.nextInt();\n }\n while (k > 0) {\n\n int i = scan.nextInt();\n int j = scan.nextInt();\n \n int largest = 3;\n for (int f = i; f<=j; ++f){\n if (freeway[f]< largest){\n largest = freeway[f];\n }\n }\n System.out.println(largest);\n k--;\n }\n }", "private int evaluate(boolean maximizing) {\n int selfEval = getCountOfStonesFor(this);\n selfEval += countOfMills(this) * 5;\n selfEval += countOfPossibleMills(this) * 15;\n\n int opponentEval = getCountOfStonesFor(opponent);\n opponentEval += countOfMills(opponent) * 5;\n opponentEval += countOfPossibleMills(opponent) * 15;\n\n return (selfEval - opponentEval) * (maximizing ? 1 : -1);\n }", "public int howManyPieces() {\n int totalPieces = 0;\n // for each item in stock\n for (int i = 0; i < this._noOfItems; i++) {\n // add the quantity of the item to the sum\n totalPieces += this._stock[i].getQuantity();\n }\n // and return the total of quantities\n return totalPieces;\n }", "private static int calculate(int limit) {\n\t\tPrimeGenerator primeGenerator = new PrimeGenerator((int) Math.floor(Math.sqrt(limit)) + 10);\n\n\t\t// BitSet is used to set a given number/index if it can be produced as p1^2 + p2^3 + p4^4\n\t\t// because there are numbers that can be produced more than once\n\t\tBitSet numbers = new BitSet(limit);\n\t\tnumbers.set(0, limit, false);\n\n\t\tList<Integer> list = primeGenerator.getPrimeList();\n\n\t\tfor (int a : list) {\n\t\t\tint powera = a * a;\n\t\t\tsearchB: for (int b : list) {\n\t\t\t\tint powerb = b * b * b;\n\t\t\t\tif (powera + powerb > limit) {\n\t\t\t\t\tbreak searchB;\n\t\t\t\t}\n\n\t\t\t\tsearchC: for (int c : list) {\n\t\t\t\t\tint powerc = c * c * c * c;\n\t\t\t\t\tint sum = powera + powerb + powerc;\n\t\t\t\t\tif (sum > limit) {\n\t\t\t\t\t\tbreak searchC;\n\t\t\t\t\t}\n\t\t\t\t\t// Set the index - the number is passed\n\t\t\t\t\tnumbers.set(sum);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Set the number of set bit - the solution\n\t\treturn numbers.cardinality();\n\t}", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int k = in.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int arr_i=0; arr_i < n; arr_i++){\n int integer = in.nextInt();\n list.add(new Integer(integer));\n }\n in.close();\n\n\n\n if(k == 1){\n System.out.println(k);\n return;\n }\n\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i) % k;\n list.set(i, x);\n }\n\n int[] kx = new int[k];\n for(int i = 0;i < k;i ++){\n kx[i] = 0;\n }\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i);\n kx[x] ++;\n }\n\n\n int num = 0;\n int A = 0;\n if(k % 2 == 0){\n A = k / 2 - 1;\n }else{\n A = k / 2;\n }\n if(kx[0] != 0){\n num += 2;\n }\n for(int i = 1; i <= A;i ++){\n if(kx[i] >= kx[k - i]){\n num += kx[i];\n }else {\n\n num += kx[k - i];\n }\n\n }\n System.out.println(num);\n }", "public static void main(String[] args) {\n\r\n int cent = 200;\r\n\r\n // you have purchase candle for 74 cent, what would be your remainder\r\n\r\n cent -= 74 ; // 126 cent\r\n\r\n int quarter = cent / 25 ; // 126/25---->\r\n int penny = cent % 25; //126%25 ---> 1 is remaining\r\n\r\n System.out.println(quarter);\r\n System.out.println(penny);\r\n\r\n int dime= cent / 10 ; // 126 / 10 --->12\r\n // how much penny I have after getting dime 126 %10---->6\r\n int penny2 = cent % 10 ; //---->6\r\n System.out.println(dime);\r\n System.out.println(penny2);\r\n\r\n\r\n\r\n }", "public static int viralAdvertising(int n) {\n int day = 0;\n int shared = 5;\n \n int cumml = 0;\n int xx = 0;\n int liked = 2;\n \n while ( day != n) {\n if(day == 0){\n shared = 5;\n liked = shared / 2;\n cumml = cumml + liked;\n }else{\n xx = (int) Math.floor(shared/2) * 3 ;\n shared = (int) xx;\n liked = xx /2;\n cumml = cumml + liked;\n }\n day++;\n }\n return cumml;\n }", "private int getNextResNum() {\r\n // Loop through every object in the \"stockList\" object array list.\r\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the \"reservationNumber\" of the beanBag in the \"stockList\"\r\n // is greater than the \"nextReservationNum\" global integer.\r\n if (((BeanBag) stockList.get(i)).getReservationNumber() > nextReservationNum) {\r\n // Set the global integer \"nextReservationNum\" to the value of the current\r\n // Reservation number of the beanBag in the \"stockList\".\r\n nextReservationNum = ((BeanBag) stockList.get(i)).getReservationNumber();\r\n }\r\n }\r\n // Increment the \"nextReservationNum\" integer by 1.\r\n nextReservationNum = nextReservationNum + 1;\r\n // Return the value of the \"nextReservationNum\" integer variable.\r\n return nextReservationNum;\r\n }", "static int webknapSackRecur(int W, int wt[], int val[], int n) {\n // Base Case\n if (n == 0 || W == 0)\n return 0;\n\n // wt[i] represents the weight of the ith item\n // If weight of the nth item is more than Knapsack capacity W, then\n // this item cannot be included in the optimal solution\n if (wt[n - 1] > W)\n return webknapSackRecur(W, wt, val, n - 1);\n\n // Return the maximum of two cases:\n // (1) nth item included\n // (2) not included\n else return max(val[n - 1] + webknapSackRecur(W - wt[n - 1], wt, val, n - 1),\n webknapSackRecur(W, wt, val, n - 1)\n );\n }" ]
[ "0.6100998", "0.60869074", "0.6078894", "0.5782128", "0.5764997", "0.5730101", "0.56641024", "0.5641106", "0.55710703", "0.55642426", "0.55050415", "0.5485859", "0.54750097", "0.5462371", "0.5456809", "0.5442923", "0.5432789", "0.5423725", "0.5419835", "0.54194516", "0.54165304", "0.54088056", "0.53853106", "0.53814536", "0.53659487", "0.53655666", "0.5364139", "0.5363801", "0.5362014", "0.53565276", "0.5349327", "0.534715", "0.5334472", "0.53272533", "0.5322138", "0.5316232", "0.529604", "0.5287907", "0.5285159", "0.52694255", "0.5268296", "0.52661055", "0.526562", "0.52603865", "0.52592653", "0.52446955", "0.52423567", "0.52375114", "0.5220924", "0.5212936", "0.5197383", "0.51921827", "0.5189485", "0.51884043", "0.5175284", "0.51728255", "0.517282", "0.51704735", "0.51686287", "0.51676345", "0.51654583", "0.5163128", "0.5155975", "0.51549715", "0.5154226", "0.5152815", "0.51480556", "0.514309", "0.51402724", "0.5130478", "0.5127772", "0.5126541", "0.5123951", "0.51238066", "0.5122203", "0.51183003", "0.51168835", "0.5115255", "0.5111577", "0.51103735", "0.5105809", "0.50976753", "0.5092705", "0.5091236", "0.50911367", "0.5084744", "0.5076332", "0.50741845", "0.5069466", "0.506375", "0.5059499", "0.5059438", "0.5058403", "0.50554323", "0.5054967", "0.50547004", "0.5054405", "0.50527155", "0.50498664", "0.50477946" ]
0.5621556
8
Toast.makeText(getApplicationContext(),"id = " + editId.getText().toString() + " age = " + ageIndex + " weight = " + weightIndex + " sex = " + sex + " image = " + encodedImage ,Toast.LENGTH_LONG).show();
protected void onPostExecute(JSONObject result) { if (result == null) { Toast.makeText(getApplicationContext(), "정보를 받는 도중 에러가 났습니다. 다시 한번 확인해주세요.", Toast.LENGTH_LONG).show(); } else { try { if (result.getString("code").compareTo("0") == 0) { Toast.makeText(SignUpActivity.this, "사용할 수 있는 아이디입니다", Toast.LENGTH_SHORT).show(); lastId = editId.getText().toString(); idChecked = true; InputMethodManager imm= (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(editId.getWindowToken(), 0); } else if (result.getString("code").compareTo("1") == 0) { if (result.getString("error").compareTo("0") == 0) { Toast.makeText(SignUpActivity.this, "아이디를 입력해주세요", Toast.LENGTH_SHORT).show(); idChecked = false; } else if (result.getString("error").compareTo("1") == 0) { Toast.makeText(SignUpActivity.this, "이미 존재하는 아이디입니다", Toast.LENGTH_SHORT).show(); idChecked = false; } else if (result.getString("error").compareTo("2") == 0) { Toast.makeText(SignUpActivity.this, "사용할 수 없는 문자가 있습니다", Toast.LENGTH_SHORT).show(); idChecked = false; } else if (result.getString("error").compareTo("3") == 0) { Toast.makeText(SignUpActivity.this, "아이디는 16자를 넘을수 없습니다.", Toast.LENGTH_SHORT).show(); idChecked = false; } else if (result.getString("error").compareTo("4") == 0) { Toast.makeText(SignUpActivity.this, "아이디는 영문자를 1개 이상 포함해야 합니다", Toast.LENGTH_SHORT).show(); idChecked = false; } else { Toast.makeText(SignUpActivity.this, "Server Error", Toast.LENGTH_SHORT).show(); } } } catch (JSONException e) { e.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n BitmapDrawable bitmapDrawable = (BitmapDrawable) imgHinh.getDrawable();\n Bitmap bitmap = bitmapDrawable.getBitmap();\n ByteArrayOutputStream byteArray = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArray);\n byte[] hinhAnh = byteArray.toByteArray();\n AnhcuatoiActivity.database.INSERT_AnhCuaToi(\n edtTen.getText().toString().trim(),\n edtMoTa.getText().toString().trim(),\n hinhAnh\n );\n Toast.makeText(AnhcuatoiActivity.this, \"Đã Thêm\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n String newName = etname.getText().toString();\n String newAge = etage.getText().toString();\n String newPicture = etpicture.getText().toString();\n\n // put the strings into a message for MainActivity\n\n //start MainActivity again\n\n\n Intent i = new Intent(v.getContext(), MainActivity.class);\n\n i.putExtra(\"modifier\", positionToEdit);\n i.putExtra(\"nom\", newName);\n i.putExtra(\"age\", newAge);\n i.putExtra(\"photo\", newPicture);\n startActivity(i);\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent i = new Intent(mThisAct, SkewBarCodeActivity.class);\n\t\t\t\t\t\tString input= mEdit.getText().toString();\n\t\t\t\t\t\tint id=Integer.parseInt(input);\n\t\t\t\t\t\t// 3. Put key-value pair into the intent.\n\t\t\t\t\t\ti.putExtra(mRes.getString(R.string.img_id_key), id );\n\t\t\t\t\t\t// 4. Toast which image is requested.\n\t\t\t\t\t\t// 5. Request Android to run it.\n\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t}", "public void setImage(){\n\n Bundle extras = getIntent().getExtras();\n String image = extras.getString(\"pic\");\n String imageFlower = extras.getString(\"picflower\");\n\n\n\n if(image != null) {\n int pic = getResources().getIdentifier(image + \".png\",\"drawable\",getPackageName());\n\n achvImage.setImageResource(pic);\n achvImage.setVisibility(View.VISIBLE);\n\n }else {\n int flowerPic = getResources().getIdentifier(imageFlower + \".jpg\", \"drawable\", getPackageName());\n achvImage.setImageResource(flowerPic);\n achvImage.setVisibility(View.VISIBLE);\n }\n\n achvImage.setImageResource(R.drawable.medaldetails);\n\n\n String text = extras.getString(\"text\");\n achvDetails.setText(text);\n\n String title = extras.getString(\"title\");\n achvTitle.setText(title);\n\n int points1 = extras.getInt(\"points\");\n points.setText(\"Points: \" + points1);\n\n\n String desText1 = extras.getString(\"achDesA\");\n des1.setText(desText1);\n\n\n\n\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n\r\n ImageView image = (ImageView) findViewById(R.id.editprofile_image);\r\n try {\r\n if (requestCode == requestCode && resultCode == RESULT_OK && null != data) {\r\n Uri selectedImage = data.getData();\r\n Log.d(\"d\", \"Image URI: \" + selectedImage);\r\n\r\n Bitmap bm = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImage);\r\n image.setImageBitmap(bm);\r\n\r\n //Encoding image to base64\r\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\r\n bm.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);\r\n byte[] byteArray = byteArrayOutputStream .toByteArray();\r\n to64 = Base64.encodeToString(byteArray, Base64.DEFAULT);\r\n Log.d(\"d\", \"Encoded String: \" + to64);\r\n\r\n }\r\n }catch (IOException e){\r\n Toast.makeText(this, \"An error occurred.\", Toast.LENGTH_LONG).show();\r\n }\r\n\r\n }", "public void onClick(View vw) {\n try {\n Bitmap bitmap = QRCodeHelper.encodeAsBitmap(mETWaybillId.getText().toString(), BarcodeFormat.QR_CODE, 300, 300);\n if (bitmap != null) {\n mIVQRCode.setImageBitmap(bitmap);\n } else {\n mTVDescription.setText(\"Bitmap null\");\n }\n } catch (Exception e) {\n Log.e(\"MainActivity\", \"Exe \", e);\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_new_exercise, container, false);\n\n //XML Declarations\n //(insert image view declaration here)\n final EditText exerciseName = (EditText) view.findViewById(R.id.etExerciseName);\n final Spinner exerciseType = (Spinner) view.findViewById(R.id.sExerciseType);\n final EditText exerciseTime = (EditText) view.findViewById(R.id.etExerciseTime);\n final EditText exerciseDistance = (EditText) view.findViewById(R.id.etExerciseDistance);\n final Spinner exerciseMuscleGroup = (Spinner) view.findViewById(R.id.sExerciseMuscleGroup);\n final EditText exerciseWeight = (EditText) view.findViewById(R.id.etExerciseWeight);\n\n Button bSaveExercise = (Button) view.findViewById(R.id.bSaveNewExercise);\n bSaveExercise.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n //test to make sure fields are not null\n if (isEmpty(exerciseName)){\n //display error message\n Toast.makeText(getActivity(), \"You did not enter a name\", Toast.LENGTH_SHORT).show();\n }\n else if (isEmpty(exerciseTime)){\n //display error message\n Toast.makeText(getActivity(), \"You did not enter a time\", Toast.LENGTH_SHORT).show();\n }\n else if (isEmpty(exerciseDistance)){\n //display error message\n Toast.makeText(getActivity(), \"You did not enter a distance\", Toast.LENGTH_SHORT).show();\n }\n else if(isEmpty(exerciseWeight)){\n //display error message\n Toast.makeText(getActivity(), \"You did not enter a weight\", Toast.LENGTH_SHORT).show();\n }\n else{\n //Store values from fields entered by user\n //(insert image view value here)\n String name = (String) exerciseName.getText().toString();\n String type = (String) exerciseType.getSelectedItem().toString();\n int time = Integer.parseInt(exerciseTime.getText().toString());\n int distance = Integer.parseInt(exerciseDistance.getText().toString());\n String muscleGroup = (String) exerciseMuscleGroup.getSelectedItem().toString();\n int weight = Integer.parseInt(exerciseWeight.getText().toString());\n\n //send data to database\n\n //go back to Activities Screen\n Fragment vActivityScreen = new ActivitiesFragment();\n FragmentManager fragmentManager = getActivity().getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.content_user_area, vActivityScreen);\n fragmentTransaction.commit();\n }\n\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_weight_entry, container, false);\n myDb = new DatabaseHelper(getActivity());\n edate = (EditText)view.findViewById(R.id.edate);\n eweight = (EditText)view.findViewById(R.id.eweight);\n img = (ImageView)view.findViewById(R.id.eimage);\n submit=view.findViewById(R.id.submit);\n submit.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Boolean valid;\n/* if(pic) {\n Toast.makeText(getActivity(), \"Picture is mandatory \", Toast.LENGTH_LONG).show();\n }\n else*/\n if (edate.getText().toString()!=null )\n { SimpleDateFormat f=new SimpleDateFormat(\"MM/dd/yyyy\");\n f.setLenient(false);\n try\n {\n f.parse(edate.getText().toString());\n valid = true;\n } catch (ParseException e) {\n valid = false;\n Toast.makeText(getActivity(),\"Date is not in valid format mm/DD/yyyy\", Toast.LENGTH_LONG).show();\n }\n if (valid == true)\n {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n b.compress(Bitmap.CompressFormat.PNG, 100, stream);\n byte[] byteArray = stream.toByteArray();\n boolean isInserted = myDb.insertweight(edate.getText().toString(),\n eweight.getText().toString(), byteArray\n\n\n );\n if (isInserted == true) {\n Intent intent1 = new Intent(getActivity(), Home.class);\n startActivity(intent1);\n Toast.makeText(getActivity(), \"Data Inserted\", Toast.LENGTH_LONG).show();\n } else\n Toast.makeText(getActivity(), \"Data not Inserted !!! Please try again\", Toast.LENGTH_LONG).show();\n }\n\n }\n\n\n /* else {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n b.compress(Bitmap.CompressFormat.PNG, 100, stream);\n byte[] byteArray = stream.toByteArray();\n boolean isInserted = myDb.insertweight(edate.getText().toString(),\n eweight.getText().toString(), byteArray\n\n\n );\n if (isInserted == true) {\n Intent intent1 = new Intent(getActivity(), Home.class);\n startActivity(intent1);\n Toast.makeText(getActivity(), \"Data Inserted\", Toast.LENGTH_LONG).show();\n } else\n Toast.makeText(getActivity(), \"Data not Inserted !!! Please try again\", Toast.LENGTH_LONG).show();\n }*/\n }\n });\n\n img.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent cameraintent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(cameraintent,10);\n pic=false;\n }\n });\n return view;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n // TODO Auto-generated method stub\n if ((requestCode == request_code) && (resultCode == RESULT_OK)) {\n\n // Toast.makeText(this, intent.getStringExtra(\"resultado\"), Toast.LENGTH_LONG).show();\n inEquipo.setText(intent.getStringExtra(\"resultado\"));\n }\n }", "public void insertimg()\n {\n String name= countryname.getText().toString();\n DB = new DbContext(this);\n imageView.setDrawingCacheEnabled(true);\n\n //Bitmap bitmap = ((BitmapDrawable)imageView.getDrawable()).getBitmap();\n Bitmap bitmap = imageView.getDrawingCache();\n\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);\n byte[] byteArray = stream.toByteArray();\n\n boolean isInserted = DB.insertCountry(name,byteArray);\n\n if (isInserted == true) {\n Toast.makeText(getApplicationContext(),\"Image Successfully Added\",Toast.LENGTH_LONG).show();\n }\n else\n {\n Toast.makeText(getApplicationContext(),\"Image Insert Unsuccessful\",Toast.LENGTH_LONG).show();\n }\n Intent intent = new Intent(getBaseContext(),AdminMenu.class);\n startActivity(intent);\n }", "public void imageClicked(int imageView){\n //get text from all buttons\n String name=etName.getText().toString().trim();\n String phoneNum=etPhoneNumber.getText().toString().trim();\n String website=etWebsite.getText().toString().trim();\n String address=etLocation.getText().toString().trim();\n\n //check if strings are empty, otherwise close this activity and send intent\n if(name.isEmpty()||phoneNum.isEmpty()||website.isEmpty()||address.isEmpty()){\n Toast.makeText(this, \"Enter all fields\", Toast.LENGTH_SHORT).show();\n }else{\n Intent intent= new Intent();\n intent.putExtra(\"name\", name);\n intent.putExtra(\"phone number\",phoneNum);\n intent.putExtra(\"website\",website);\n intent.putExtra(\"address\", address);\n intent.putExtra(\"image\",imageView);\n setResult(RESULT_OK,intent);\n Activity2.this.finish();\n }\n\n }", "@Override\n public void onClick(View view) {\n if (isEmpty(exerciseName)){\n //display error message\n Toast.makeText(getActivity(), \"You did not enter a name\", Toast.LENGTH_SHORT).show();\n }\n else if (isEmpty(exerciseTime)){\n //display error message\n Toast.makeText(getActivity(), \"You did not enter a time\", Toast.LENGTH_SHORT).show();\n }\n else if (isEmpty(exerciseDistance)){\n //display error message\n Toast.makeText(getActivity(), \"You did not enter a distance\", Toast.LENGTH_SHORT).show();\n }\n else if(isEmpty(exerciseWeight)){\n //display error message\n Toast.makeText(getActivity(), \"You did not enter a weight\", Toast.LENGTH_SHORT).show();\n }\n else{\n //Store values from fields entered by user\n //(insert image view value here)\n String name = (String) exerciseName.getText().toString();\n String type = (String) exerciseType.getSelectedItem().toString();\n int time = Integer.parseInt(exerciseTime.getText().toString());\n int distance = Integer.parseInt(exerciseDistance.getText().toString());\n String muscleGroup = (String) exerciseMuscleGroup.getSelectedItem().toString();\n int weight = Integer.parseInt(exerciseWeight.getText().toString());\n\n //send data to database\n\n //go back to Activities Screen\n Fragment vActivityScreen = new ActivitiesFragment();\n FragmentManager fragmentManager = getActivity().getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.content_user_area, vActivityScreen);\n fragmentTransaction.commit();\n }\n\n }", "@Override\n public void onClick(View v) {\n String textContent = \"您好啊\";\n if (TextUtils.isEmpty(textContent)) {\n// Toast.makeText(ThreeActivity.this, \"您的输入为空!\", Toast.LENGTH_SHORT).show();\n return;\n }\n Bitmap image = CodeUtils.createImage(textContent, 400, 400, BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher_round));\n imageView.setImageBitmap(image);\n }", "public void insert(View v) {\n\n\t\t\n\t\tBitmap bmap = BitmapFactory.decodeResource(getResources(), R.id.imageView_image);\n String encodedImageData =getEncoded64ImageStringFromBitmap(bmap);\n\t\tContentValues cv = new ContentValues();\n\t\tcv.put(\"imagetext\", encodedImageData);\n\t\tcv.put(\"otpvalue\", \"123456\");\n\t\tdb.insert(\"encrypted\", null, cv);\n\t\tToast.makeText(this, \"inserted successfully\", Toast.LENGTH_SHORT)\n\t\t\t\t.show();\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_erweima);\n\t\terweimaPic=(ImageView) findViewById(R.id.erweima);\n\t\tIntent intent5=getIntent();\n\t\tString wxId=intent5.getStringExtra(\"wiId\");\n\t\tif(wxId==null){\n\t\t\tToast.makeText(MyApplication.getContext(), \"ÇëÉèÖÃÄãµÄ΢ÇòÕ˺Å\", Toast.LENGTH_SHORT).show();\n\t\t}\n\t\telse{\n\t\t\ttry {\n\t\t\t\tBitmap erweimaPicture=EncodingHandler.createQRCode(wxId, 500);\n\t\t\t\terweimaPic.setImageBitmap(erweimaPicture);\n\t\t\t} catch (WriterException 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 protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.home8_day3_secondview);\n Log.i(TAG, \"onCreate: \");\n textView = findViewById(R.id.textview);\n imageView = findViewById(R.id.image);\n\n Intent intent = getIntent();\n if (intent != null){\n String root = intent.getStringExtra(\"root\");\n if (root.equals(\"button1\")){\n String name = intent.getStringExtra(\"name\");\n int age = intent.getIntExtra(\"age\",0);\n textView.setText(\"name=\"+name+\" age=\"+age);\n } else if (root.equals(\"button2\")){\n String name = intent.getStringExtra(\"name\");\n int age = intent.getIntExtra(\"age\",0);\n textView.setText(\"name=\"+name+\" age=\"+age);\n }else if (root.equals(\"button3\")){\n Person person = (Person) intent.getSerializableExtra(\"person\");\n textView.setText(person.toString());\n }else if (root.equals(\"button4\")){\n Bitmap bitmap = (Bitmap) intent.getParcelableExtra(\"bitmap\");\n imageView.setImageBitmap(bitmap);\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n try {\n\n if (requestCode == IMG_RESULT && resultCode == RESULT_OK\n && null != data) {\n\n\n imageeUri = data.getData();\n\n mInsertImage.setImageURI(imageeUri);\n }\n }\n catch (Exception e) {\n Toast.makeText(this, \"Please try again\", Toast.LENGTH_LONG)\n .show();\n }\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\r\n Bitmap b=(Bitmap)data.getExtras().get(\"data\");\r\n i1.setImageBitmap(b);\r\n\r\n }", "@Override\n public void onClick(View v) {\n\n if(radio.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"성별을 선택해 주세요\", Toast.LENGTH_SHORT).show();\n } else if(edit2.getText().toString().length() == 0) {\n Toast.makeText(getApplicationContext(), \"키를 입력해주세요\", Toast.LENGTH_SHORT).show();\n } else if(Integer.parseInt(edit2.getText().toString()) > 400) {\n Toast.makeText(getApplicationContext(), \"키를 올바르게 입력해 주세요\", Toast.LENGTH_SHORT).show();\n } else if(edit3.getText().toString().length() == 0) {\n Toast.makeText(getApplicationContext(), \"나이를 입력해주세요\", Toast.LENGTH_SHORT).show();\n } else if(Integer.parseInt(edit3.getText().toString()) > 150) {\n Toast.makeText(getApplicationContext(), \"나이를 올바르게 입력해 주세요\", Toast.LENGTH_SHORT).show();\n } else {\n height = edit2.getText().toString();\n age = edit3.getText().toString();\n\n //다음 액티비티로 넘어가는 장면\n Intent i = new Intent(getApplicationContext(), DeviceScanActivity.class);\n startActivity(i); //리턴값이 필요없음\n finish();\n }\n\n }", "@Override\n public void onClick(View v) {\n int id= Integer.parseInt(Global.getId());\n mydb.update_user(1,id);\n mydb.insertImage(num,id);\n mydb.close();\n Global.setImage(num);\n startActivity(new Intent(CharSetUp.this,Buttons.class)); // metabainei sthn Buttons\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_screen6);\n\n // Connecting the xml screen 6's imageView elements with code\n ImageView image = (ImageView) findViewById(R.id.scr6_imageView);\n String value = \"GJ\";\n\n // extracting the extras from the bundle\n Bundle extras = getIntent().getExtras();\n\n if(extras != null){\n // extracting the string from the extras\n value = extras.getString(\"image\");\n }\n\n // setting up the image according to the string extracted from the bundle\n image.setImageResource(getResources().\n getIdentifier(value, \"drawable\", \"edu.wcu.cs.catamountcharacters\"));\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(resultCode == RESULT_OK){\n if(requestCode == REQUEST_CODE && data.getExtras().get(\"data\")!=null){\n Bitmap bp = (Bitmap) data.getExtras().get(\"data\");\n prescription.setVisibility(View.VISIBLE);\n userNameQO.setVisibility(View.GONE);\n phoneNo.setVisibility(View.GONE);\n captureButton.setText(getResources().getString(R.string.send_prescription));\n prescription.setImageBitmap(bp);\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 0 && resultCode == RESULT_OK ) {\n\n Uri imageUri=data.getData();\n\n\n try {\n Bitmap bm = null;\n ContentResolver resolver = getContentResolver();\n //获得图片的uri\n originalUri = data.getData();\n bitmapUri = originalUri;\n System.out.println(\"URi:\"+ originalUri);\n System.out.println(\"URi:\"+ originalUri.getClass());\n // isSelectPic = true;\n bm = MediaStore.Images.Media.getBitmap(resolver, originalUri);\n //显得到bitmap图片\n iv.setImageBitmap(bm);\n\n } catch (Exception e) {\n Log.e(\"TAG-->Error\", e.toString());\n }\n\n //放到imageview中\n\n\n }\n\n\n if (requestCode == 1 && resultCode == 2) {//当请求码是1&&返回码是2进行下面操作\n System.out.println(\"OK\");\n uid = data.getStringExtra(\"uid\");\n city = data.getStringExtra(\"city\");\n name = data.getStringExtra(\"name\");\n address = data.getStringExtra(\"address\");\n latitude = data.getDoubleExtra(\"latitude\", 0);\n longitude = data.getDoubleExtra(\"longitude\", 0);\n search_name.setText(name);\n // System.out.println(uid+\"\\n\"+city+\"\\n\"+name+\"\\n\"+address+\"\\n\"+latitude+\"\\n\"+longitude+\"\\n\");\n\n }\n\n }", "public void addToDatabaseButtonClicked(View v) {\n byte[] holderString = DBBitmapUtility.getBytes(MainActivityGCV.bitmap);\n databaseHandler.addWordInfo(MainActivityGCV.imageArray.get(0), meaning.getText().toString(), sentence.getText().toString(), holderString);\n Toast.makeText(getApplicationContext(), \"Add to database Successful\", Toast.LENGTH_SHORT).show();\n Intent i = new Intent(this, WordsDatabase.class);\n startActivity(i);\n\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent returnedIntent) {\r\n super.onActivityResult(requestCode, resultCode, returnedIntent);\r\n try {\r\n // When an Image is picked\r\n if (resultCode == RESULT_OK && null != returnedIntent) {\r\n // Get the Image from data\r\n Uri imageLocation = returnedIntent.getData();\r\n InputStream imageStream = getContentResolver().openInputStream(imageLocation);\r\n Bitmap selectedImage = BitmapFactory.decodeStream(imageStream);\r\n selectedImage = getResizedBitmap(selectedImage,1080/4,1920/4);\r\n currentUserEdit.setImageBitmap(selectedImage);\r\n currentSaveCharacter.setImage(selectedImage);\r\n saveCharacters(context);\r\n }\r\n } catch (Exception e) {\r\n Toast.makeText(this, \"ImageGet ERROR\", Toast.LENGTH_LONG)\r\n .show();\r\n Log.d(\"ImageGet ERROR\", e.toString());\r\n }\r\n\r\n }", "public void clickFunction(View view){\n Toast.makeText(MainActivity.this, \"Hi there!\", Toast.LENGTH_LONG).show();\n\n // here we've created a variable \"myTextField\" of type \"EditText\" which collect the data from the ID i.e \"myTextField\" and convert the view ID into EditText type and stores into the variable.\n EditText myTextField = (EditText) findViewById(R.id.myTextField);\n\n // here the Log.i function is used to show the info to the logcat terminal which required two fields i.e Tag & the data to show (here the data is taken from the myTextField variable created above.\n Log.i(\"Info\",myTextField.getText().toString());\n }", "private void insertEmployeeRecord(){\n\n Drawable dbDrawable = getResources().getDrawable(R.drawable.empphoto);\n Bitmap bitmap = ((BitmapDrawable)dbDrawable).getBitmap();\n\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);\n //Inserting values to Employee table.\n ContentValues vals = new ContentValues();\n vals.put(Constants.EMP_ID, \"1\");\n vals.put(Constants.EMP_NAME, \"Jaldip Gadhiya\");\n vals.put(Constants.EMP_AGE, \"30\");\n vals.put(Constants.EMP_PHOTO_IMAGE, stream.toByteArray());\n dbHelper.insertContentVals(Constants.EMPLOYEE_RECORD, vals);\n\n\n }", "protected void onCreate(Bundle savedInstanceState) {\n\tsuper.onCreate(savedInstanceState);\r\n\tsetContentView(R.layout.input_med);\r\n\tButton submit=(Button)findViewById(R.id.button1);\r\n\t\r\n\t//Toast.makeText(getApplicationContext(), \r\n // a, Toast.LENGTH_LONG).show();\r\n\tsubmit.setOnClickListener(new View.OnClickListener() {\r\n\t\t\r\n\t\t@Override\r\n\t\tpublic void onClick(View v) {\r\n\t\t\t// TODO Auto-generated method stub\r\n\t\t\tdrug=(EditText)findViewById(R.id.editText1);\r\n\t\t\tabc=drug.getText().toString();\r\n\t\t\tToast.makeText(getApplicationContext(), \r\n\t\t abc, Toast.LENGTH_LONG).show();\r\n\t\t\tIntent intent3=new Intent(Input_Med.this,Med_Info.class);\r\n\t\t\tintent3.putExtra(\"drug\", abc);\r\n\t\t\tstartActivity(intent3);\r\n\t\t\t\r\n\t\t}\r\n\t});\r\n}", "private void obtener(){\n Bundle bundle = getIntent().getExtras();\n id = bundle.getString(\"id\");\n nombre = bundle.getString(\"nombre\");\n apellido = bundle.getString(\"apellido\");\n telefono = bundle.getInt(\"telefono\");\n //seteo de datos\n editTextN.setText(nombre);\n editTextA.setText(apellido);\n editTextT.setText(String.valueOf(telefono));\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(context, Detail.class);\n i.putExtra(\"id\", id);\n i.putExtra(\"firstname\", firstname);\n i.putExtra(\"lastname\", lastname);\n i.putExtra(\"email\", email);\n i.putExtra(\"image\", image);\n context.startActivity(i);\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_welcome);\r\n\t\tStrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()\r\n\t\t\t\t.permitAll().build();\r\n\t\tStrictMode.setThreadPolicy(policy);\r\n\t\t\r\n\t\t// 937348332\t\t\r\n\t\tb = getIntent().getExtras();\r\n\t\ttvWelcome = (TextView) findViewById(R.id.welcomemessage);\r\n\t\tphoto = (ImageView) findViewById(R.id.profileImage);\r\n\t\teditProfile = (Button) findViewById(R.id.btnEDIT);\r\n\t\teditProfile.setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent i = new Intent(WelcomeActivity.this, EditActivity.class);\r\n\t\t\t\ti.putExtra(\"mode\", 1);\r\n\t\t\t\ti.putExtra(\"TID\", gID);\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n//\t\tif (b != null) {\r\n//\t\t\tgID = b.getString(\"TID\");\r\n//\t\t\tgUSER = b.getString(\"name\");\r\n//\t\t\tmode = b.getString(\"mode\");\r\n//\r\n//\t\t\tif (mode.equalsIgnoreCase(\"Twitter\")) {\r\n//\t\t\t\ttvWelcome.append(mode + \"\\n\" + gID + \"\\n\" + gUSER);\r\n//\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\ttwitterImage = TwitterApp.user.getBiggerProfileImageURL();\r\n//\t\t\t\t\timageURL = new URL(twitterImage);\r\n//\t\t\t\t} catch (MalformedURLException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t}\r\n//\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\tbitmap = BitmapFactory.decodeStream(imageURL\r\n//\t\t\t\t\t\t\t.openConnection().getInputStream());\r\n//\t\t\t\t\tphoto.setImageBitmap(bitmap);\r\n//\t\t\t\t} catch (IOException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t}\r\n//\r\n//\t\t\t} else {\r\n//\t\t\t\ttvWelcome.append(gID + \"\\n\" + gUSER);\r\n//\t\t\t}\r\n//\t\t}\r\n\t}", "public boolean saveImage() {\n try {\n //Save the modified image\n iEXIF.setAttribute(ExifInterface.TAG_DATETIME, ((TextView) findViewById(R.id.image_date_taken)).getText().toString());\n iEXIF.setAttribute(ExifInterface.TAG_MAKE, ((TextView) findViewById(R.id.image_camera)).getText().toString());\n iEXIF.setAttribute(ExifInterface.TAG_APERTURE, ((TextView) findViewById(R.id.image_lens)).getText().toString());\n iEXIF.setAttribute(ExifInterface.TAG_EXPOSURE_TIME, ((TextView) findViewById(R.id.image_exposure)).getText().toString());\n iEXIF.setAttribute(ExifInterface.TAG_FLASH, ((TextView) findViewById(R.id.image_flash)).getText().toString());\n iEXIF.setAttribute(ExifInterface.TAG_FOCAL_LENGTH, ((TextView) findViewById(R.id.image_focal_length)).getText().toString());\n\n if (posMarker != null) {\n\n TextView latitude = (TextView) findViewById(R.id.image_latitude);\n TextView longitude = (TextView) findViewById(R.id.image_longitude);\n\n //Use text view values instead of posMarker values\n String lat = toDMS(posMarker.getPosition().latitude);\n String lon = toDMS(posMarker.getPosition().longitude);\n\n iEXIF.setAttribute(ExifInterface.TAG_GPS_LATITUDE, lat);\n iEXIF.setAttribute(ExifInterface.TAG_GPS_LONGITUDE, lon);\n\n if (posMarker.getPosition().latitude > 0) {\n iEXIF.setAttribute(ExifInterface.TAG_GPS_LATITUDE_REF, \"N\");\n } else {\n iEXIF.setAttribute(ExifInterface.TAG_GPS_LATITUDE_REF, \"S\");\n }\n\n if (posMarker.getPosition().longitude > 0) {\n iEXIF.setAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF, \"E\");\n } else {\n iEXIF.setAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF, \"W\");\n }\n }\n iEXIF.saveAttributes();\n View coordLayout = findViewById(R.id.main_content);\n Snackbar successSnackbar = Snackbar.make(coordLayout, R.string.photo_save_success_text, Snackbar.LENGTH_SHORT);\n successSnackbar.show();\n\n ViewGroup mapGroup = (ViewGroup) findViewById(R.id.map);\n int count = mapGroup.getChildCount();\n\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\r\n if (resultCode == Activity.RESULT_OK)\r\n switch (requestCode) {\r\n case 0:\r\n //data.getData return the content URI for the selected Image\r\n Uri selectedImage = data.getData();\r\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\r\n // Get the cursor\r\n Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null);\r\n // Move to first row\r\n cursor.moveToFirst();\r\n //Get the column index of MediaStore.Images.Media.DATA\r\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\r\n\r\n //Gets the String value in the column\r\n image = cursor.getString(columnIndex);\r\n cursor.close();\r\n // Set the Image in ImageView after decoding the String\r\n // imageView.setImageBitmap(BitmapFactory.decodeFile(imgDecodableString));\r\n\r\n textView.setText(image);\r\n\r\n break;\r\n\r\n }\r\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n Toast.makeText(StudententryActivity.this, \"Image Not Set. Please Try Again....\", Toast.LENGTH_SHORT).show();\n\n }", "public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_OPEN_DOCUMENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE);\n\n\n\n\n /*String stringFilePath = Environment.getExternalStorageDirectory().getPath()+\"/Download/\"+editText.getText().toString()+\".jpeg\";\n Bitmap bitmap = BitmapFactory.decodeFile(stringFilePath);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 0, byteArrayOutputStream);\n byte[] bytesImage = byteArrayOutputStream.toByteArray();\n db.addTicket(stringFilePath, bytesImage);*/\n\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.addtolist);\n\t\tnameET = (EditText) findViewById(R.id.nameET);\n\t\tplaceET = (EditText) findViewById(R.id.placeET);\n\t\tenterButton = (Button) findViewById(R.id.enterButton);\n\t\timgView = (ImageView) findViewById(R.id.imageView);\n\t\tcaptureButton = (Button) findViewById(R.id.captureButton);\n\t\tcaptureButton.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tString name = nameET.getText().toString() + placeET.getText().toString();\n\t\t\t\tif(!name.equals(\"\")){\n\t\t\t\t\tIntent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n\t\t\t\t\tstartActivityForResult(i, IMAGE_REQUEST_CODE);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Please enter name and place\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tenterButton.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tString name = nameET.getText().toString();\n\t\t\t\tString place = placeET.getText().toString();\n\t\t\t\tif(!name.equals(\"\") && !place.equals(\"\")){\n\t\t\t\t\tIntent i = new Intent();\n\t\t\t\t\tBundle bundle= new Bundle();\n\t\t\t\t\tbundle.putString(\"name\", name);\n\t\t\t\t\tbundle.putString(\"place\", place);\n\t\t\t\t\ti.putExtras(bundle);\n\t\t\t\t\tsetResult(RESULT_OK, i);\n\t\t\t\t\tif(bitmap!=null){\n\t\t\t\t\t\tsaveBitmap(bitmap);\n\t\t\t\t\t}\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Please enter name and place\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}", "@Override\r\n public void onClick(View arg0) {\n ImageSaveAsyncTask imgSaveTask = new ImageSaveAsyncTask();\r\n imgSaveTask.execute();\r\n String txt = \"save to XIUIMAGE!\";\r\n Toast.makeText(BeautyfaceActivity.this, txt, Toast.LENGTH_SHORT).show();\r\n finish();\r\n IntentToStartView();\r\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) {\n Bundle extras = data.getExtras();\n Bitmap imageBitmap = (Bitmap) extras.get(\"data\");\n\n detextTextFromImage(imageBitmap);\n\n }\n }", "@Override\n //nhan ket qua man hinh khac tra ve Main\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if (requestCode == REQUEST_CODE_EDIT && resultCode == RESULT_OK && data != null){\n String name = data.getStringExtra(\"New\");\n txtName.setText(name);\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if(resultCode == RESULT_OK) {\n imgView.setImageURI(image_uri);\n// image_uri = data.getData();\n// try {\n// InputStream inputStream = getContentResolver().openInputStream(image_uri);\n// bitmap = BitmapFactory.decodeStream(inputStream);\n// imgView.setImageBitmap(bitmap);\n//// imgView.setVisibility(View.VISIBLE);\n//// btnUpload.setVisibility(View.VISIBLE);\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// Toast.makeText(GambarActivity.this, \"o\", Toast.LENGTH_SHORT).show();\n }\n// super.onActivityResult(requestCode, resultCode, data);\n }", "@Override\n public void onClick(View v) {\n TextView nameView = (TextView) addPerson.findViewById(R.id.add_person_name);\n CircleImageView personImageView = (CircleImageView) addPerson.findViewById(R.id.friend_image);\n pDbHelper.createPerson(\n pDbHelper.getWritableDatabase(),\n nameView.getText().toString(),\n ((BitmapDrawable) personImageView.getDrawable()).getBitmap()\n );\n onBackPressed();\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.choose_image:\n openGallery();\n break;\n case R.id.update_ok_id:\n\n try{\n DBConnection dbConnection=new DBConnection(updateView.getContext());\n // byte[] image\n newImage=getImageByteArray(DecodeImage_stream);\n dbConnection.updatePhoto(id,type,newImage);\n updateFragment(CAT_ID);\n Toast.makeText(getActivity(),type+\" photo has been updated successfully\",Toast.LENGTH_LONG).show();\n dismiss();\n }catch (NullPointerException n){\n Toast.makeText(getActivity(),\"you haven't chose any photo :)\",Toast.LENGTH_LONG).show();\n dismiss();\n }\n break;\n case R.id.update_cancel_id:\n dismiss();\n break;\n }\n }", "@Override\n\t\t public void onClick(View v) {\n\t\t\t String n = holder.c_name.getText().toString();\n\t\t\t String d = holder.publicAd_discription.getText().toString();\n\t\t\t String p = holder.publicAd_phone.getText().toString();\n\t\t\t String pl = holder.publicAd_Places.getText().toString();\n\n\n\t\t\t //_______GET ID OF THE ADVERTISEMENT_________\n\t\t\t DocumentSnapshot snapshot = getSnapshots()\n\t\t\t .getSnapshot(holder.getAdapterPosition());\n\t\t\t String ss = snapshot.getId();\n\t\t\t Intent i = new Intent(AdsOfFollowingActivity.this,ShowAdFromProfileActivity.class);\n\t\t\t i.putExtra(\"documentId\", ss);\n\t\t\t i.putExtra(\"n\", n);\n\t\t\t i.putExtra(\"d\", d);\n\t\t\t i.putExtra(\"p\", p);\n\t\t\t i.putExtra(\"pl\", pl);\n\t\t\t i.putExtra(\"Publisher\",PositionC);\n\n\t\t\t Upload upload = new Upload();\n\t\t\t i.putExtra(\"imageUrl\", upload.getImageUrl());\n\t\t\t startActivity(i);\n\t\t }", "public void Click_me(View view) {\n weight = wt.getText().toString();\n height = ht.getText().toString();\n\n //function to handle null entries in edit text\n if (TextUtils.isEmpty(weight)) {\n\n /* to handle null entry in edit text\n Toast.makeText(this, \"Please enter valid weight\", Toast.LENGTH_SHORT).show();\n return; */\n\n //another way to handle null entry in edit text\n wt.setError(\"Please enter valid weight\");\n return;\n }\n\n if (TextUtils.isEmpty(height)) {\n\n /* to handle null entry in edit text\n Toast.makeText(this, \"Please enter valid height\", Toast.LENGTH_SHORT).show();\n return; */\n\n //another way to handle null entry in edit text\n ht.setError(\"Please enter valid height\");\n return;\n }\n\n //converting the inputted string into double type\n weight_1 = Double.parseDouble(weight) * factor;\n height_1 = (Double.parseDouble(height) / 100) * factor_1;\n height_2 = Double.parseDouble(height) * factor_1;\n\n //another way to convert string type value into float type\n //weight_1=Float.valueOf(weight);\n\n\n Intent intent = new Intent(MainActivity.this, Second_Activity.class);\n Bundle bundle = new Bundle();\n\n bundle.putInt(\"WC\", wc);\n bundle.putInt(\"HC\", hc);\n bundle.putString(\"Weight\",weight);\n bundle.putString(\"Height\",height);\n bundle.putDouble(\"Weight_1\", weight_1);\n bundle.putDouble(\"Height_1\", height_1);\n bundle.putDouble(\"Height_2\", height_2);\n\n //to align the text in center in java file\n // tv4.setGravity(Gravity.CENTER);\n intent.putExtras(bundle);\n startActivity(intent);\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (resultCode == RESULT_OK) {\n\n // compare the resultCode with the\n // SELECT_PICTURE constant\n if (requestCode == SELECT_PICTURE) {\n Uri selectedImageURI = data.getData();\n// File imageFile = new File(getRealPathFromURI(selectedImageURI));\n Uri selectedImageUri = data.getData( );\n String picturePath = getPath( getApplicationContext( ), selectedImageUri );\n Log.d(\"Picture Path\", picturePath);\n\n // Get the url of the image from data\n selectedImageUri = data.getData();\n if (null != selectedImageUri) {\n bitmap = null;\n // update the preview image in the layout\n try {\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImageUri);\n } catch (IOException e) {\n e.printStackTrace();\n }\n// IVPreviewImage.setImageURI(selectedImageUri);\n// runTextRecognition(bitmap);\n IVPreviewImage.setImageBitmap(bitmap);\n\n }\n }\n\n if (requestCode == 123) {\n\n\n Bitmap photo = (Bitmap) data.getExtras()\n .get(\"data\");\n\n // Set the image in imageview for display\n IVPreviewImage.setImageBitmap(photo);\n runTextRecognition(photo);\n\n }\n\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_breeds_info);\n //init the views\n dogImg=(ImageView) findViewById(R.id.dogImg);\n name=(TextView) findViewById(R.id.name);\n breedHeight=(TextView) findViewById(R.id.breedheight);\n breedWeight=(TextView) findViewById(R.id.breedweight);\n lifeSpan=(TextView) findViewById(R.id.lifeSpan);\n personality=(TextView) findViewById(R.id.personality);\n health=(TextView) findViewById(R.id.health);\n feeding=(TextView) findViewById(R.id.feeding);\n childrenAndPets=(TextView) findViewById(R.id.childrenAndPets);\n care=(TextView) findViewById(R.id.care);\n\n\n Intent intent=getIntent();\n int id = intent.getIntExtra(\"id\", 0);//the position\n //Toast.makeText(this,id+\"\",Toast.LENGTH_SHORT).show();\n\n myBreedsList= (ArrayList<Dog>) intent.getSerializableExtra(\"myBreedsList\");\n\n //here im setting texts into the views\n name.setText(myBreedsList.get(id-1).getBreedname());//id-1 cuz my id(thats in the database) starts from 1\n breedHeight.setText(myBreedsList.get(id-1).getHeight());\n breedWeight.setText(myBreedsList.get(id-1).getWeight());\n lifeSpan.setText(myBreedsList.get(id-1).getLifeSpan());\n personality.setText(myBreedsList.get(id-1).getPersonality());\n health.setText(myBreedsList.get(id-1).getHealth());\n feeding.setText(myBreedsList.get(id-1).getFeeding());\n childrenAndPets.setText(myBreedsList.get(id-1).getChildrenAndPets());\n care.setText(myBreedsList.get(id-1).getCare());\n // Toast.makeText(this,myBreedsList.get(id-1).getPersonality()+\"\",Toast.LENGTH_SHORT).show();\n\n\n //in the database the pictures are saved as\"dog0\",\"dog11\" and etc... this method makes the\n // pictures appear by their names\n int drawableId=0;//init drawableId\n try {\n Class res = R.drawable.class;\n Field field = res.getField(myBreedsList.get(id -1).getImage().toString());\n drawableId = field.getInt(null);\n }\n catch (Exception e) {\n Log.e(\"MyTag\", \"Failure to get drawable id.\", e);\n }\n Glide.with(this).load(drawableId).into(dogImg);\n\n\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case 3: {\n if (resultCode == Activity.RESULT_OK && data != null) {\n Uri image = data.getData();\n try {\n Bitmap temp = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), image);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n temp.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);\n byte[] byteArray = byteArrayOutputStream.toByteArray();\n int num = 50;\n while (byteArray.length > 10000 && num > 0) { // compress image to not more than 10 kb\n byteArrayOutputStream.flush();\n byteArrayOutputStream.reset();\n\n temp.compress(Bitmap.CompressFormat.JPEG, num, byteArrayOutputStream);\n num = num / 2;\n byteArray = byteArrayOutputStream.toByteArray();\n }\n this.profilePic = Base64.encodeToString(byteArrayOutputStream.toByteArray(), Base64.DEFAULT);\n profilePicChanged = true;\n Toast.makeText(dialog.getContext(), \"Image Uploaded\", Toast.LENGTH_SHORT).show();\n decodeImage(profilePic, editImage);\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n }", "@Override\r\n public void onClick(View v) {\n showDialog(AVATAR_DIALOG_ID);\r\n\r\n\r\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n //jika image picker membawa sebuah data berupa foto maka\r\n if (ImagePicker.shouldHandle(requestCode, resultCode, data)) {\r\n //ambil data foto yang dipilih\r\n Image image = ImagePicker.getFirstImageOrNull(data);\r\n //ambil path/lokasi dari foto/gambar yang dipilih\r\n File imgFile = new File(image.getPath());\r\n if (imgFile.exists()) {\r\n //convert path ke bitmap dan tampilkan pada imageview\r\n Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());\r\n imgTranscript.setImageBitmap(myBitmap);\r\n\r\n //set variabel change true karena gambar telah diupdate\r\n isPicChange = true;\r\n }\r\n }\r\n\r\n super.onActivityResult(requestCode, resultCode, data);\r\n }", "@Override\n protected void onActivityResult (int requestCode, int resultCode, Intent data)\n {\n\t\tif(requestCode == CAMERA_REQUEST_CODE)\n\t\t{\n\t\t\t// if user keeps the photo\n\t\t\tif(resultCode == RESULT_OK)\n\t\t\t{\n\t\t\t\tif(data!=null){\n\t\t\t\t\t DBAdapter db = new DBAdapter(this); \n\n\t\t\t\t db.open();\n\t\t\t\t ByteArrayOutputStream baos = new ByteArrayOutputStream(); \n\t\t\t\t \n\t\t\t\t\tBitmap bitmap = data.getParcelableExtra(\"data\");\n\n\t\t\t\t\tbitmap.compress(Bitmap.CompressFormat.PNG, 100, baos); \n\t\t\t byte[] photo = baos.toByteArray(); \n\t\t\t Log.d (\"CHECKTHIS\", \"\" +photo.length);\n\t\t\t db.insertUserDetails(\"tuan\",\"one\", \"pass\", photo,\"visibility\");\n\t\t\t\t\timageView.setImageBitmap(bitmap);\n\t\t\t db.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n }", "@Override\n public void onClick(View view) {\n String fullname = fullName.getText().toString();\n String username = userName.getText().toString();\n String userPassword = password.getText().toString();\n\n String email = \"No Email\";\n\n pd.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n pd.setMessage(\"Processing Details ...\");\n pd.setIndeterminate(true);\n pd.setCancelable(true);\n pd.show();\n\n //verify if all details are provided\n if(fullname.isEmpty() || username.isEmpty() || userPassword.isEmpty() || imageSelected.equals(\"No\")){\n //dont save\n pd.hide();\n builder.setMessage(\"Error: Some Field are Empty !\");\n builder.setCancelable(false);\n builder.setNeutralButton(\"Ok\", new DialogInterface.OnClickListener(){\n\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n AlertDialog alert = builder.create();\n alert.getWindow().getAttributes().windowAnimations = R.style.DialogTheme;\n alert.show();\n }else{\n //save\n sqLiteHelper.insertData(\n fullname,email,username,userPassword,imageViewToByte(profilePic)\n );\n Toast.makeText(getApplicationContext(),\"Account Saved Successfully !!\",Toast.LENGTH_LONG).show();\n\n //move to home Screen\n byte [] imagesPics = imageViewToByte(profilePic);\n\n Intent intent = new Intent(getApplicationContext(), AccountHome.class);\n intent.putExtra(\"FULL_NAME\", fullname);\n intent.putExtra(\"USERNAME\", username);\n intent.putExtra(\"PASSWORD\", userPassword);\n intent.putExtra(\"PROF_PICS\", imagesPics);\n startActivity(intent);\n overridePendingTransition(R.anim.right_in, R.anim.left_out);\n finish();\n }\n }", "@Override\n\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\tString retrieveFirstName = firstName.getText().toString();\n\t\t\t\t\tString retrieveLastName = lastName.getText().toString();\n\t\t\t\t\tString retrieveNumber = number.getText().toString();\n\t\t\t\t\tString retrieveEmail = email.getText().toString();\n\t\t\t\t\tString retrieveAddress = address.getText().toString();\n\t\t\t\t\tString retrieveDate = date.getText().toString();\n\t\t\t\t\tString retrieveNumberSpinner = numberSpinner.getSelectedItem().toString();\n\t\t\t\t\tString retrieveEmailSpinner = emailSpinner.getSelectedItem().toString();\n\t\t\t\t\tString retrieveAddressSpinner = addressSpinner.getSelectedItem().toString();\n\t\t\t\t\tString retrieveDateSpinner = dateSpinner.getSelectedItem().toString();\n\n\t\t\t\t\t//convert the image from a bit map to byte array\n\t\t\t\t\tBitmapDrawable bmd = ((BitmapDrawable) editPic.getDrawable());\n\t\t\t\t\tBitmap photo = bmd.getBitmap();\n\t\t\t\t\tByteArrayOutputStream stream = new ByteArrayOutputStream();\n\t\t\t\t\tphoto.compress(Bitmap.CompressFormat.PNG, 90, stream);\n\t\t\t\t\tbyte[] byteArray = stream.toByteArray();\n\n\t\t\t\t\t//if the user does not add a firstname, a error \n\t\t\t\t\t//is thrown and the user must add a first name.\n\t\t\t\t\tif(firstName.getText().toString().length() == 0) {\n\t\t\t\t\t\tfirstName.setError(\"A contact must be provided a first name\");\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tContact replaceContact = new Contact(retrieveFirstName, retrieveLastName, retrieveNumber, retrieveNumberSpinner, retrieveEmail, retrieveEmailSpinner, retrieveDate, retrieveDateSpinner, retrieveAddress, retrieveAddressSpinner,byteArray, currentContact.getFavourite());\n\t\t\t\t\t\t//and update the contact inside the database\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tdatabaseHandler.openDataBase();\n\t\t\t\t\t\t\tdatabaseHandler.updateContact(replaceContact, currentContact.getFirstName(), currentContact.getLastName());\n\t\t\t\t\t\t\tdatabaseHandler.close();\n\t\t\t\t\t\t} catch (SQLException sqle) {\n\t\t\t\t\t\t\tthrow sqle;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//after saving all the information, we go back to the MainActivity\n\n\t\t\t\t\t\tIntent intentSave = new Intent(getApplicationContext(),MainActivity.class);\n\t\t\t\t\t\tintentSave.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\t\t\t\tstartActivity(intentSave);\n\n\t\t\t\t\t}\n\n\t\t\t\t}", "@Override\r\nprotected void onActivityResult(int requestCode, int resultCode, Intent vgt) {\n\t\tsuper.onActivityResult(requestCode, resultCode, vgt);\r\n\t\tBitmap bm=(Bitmap) vgt.getExtras().get(\"data\"); //Use only data\r\n\t\tiv.setImageBitmap(bm); \r\n\t}", "private void populateDetails(int index, int imageView, int name, int age, int friendly,\n int job, int hobby) {\n if (animals.size() > 0) {\n\n ImageView ivw = (ImageView)findViewById(imageView);\n TextView _name = (TextView)findViewById(name);\n TextView _age = (TextView)findViewById(age);\n TextView _friendly = (TextView)findViewById(friendly);\n TextView _job = (TextView)findViewById(job);\n TextView _hobby = (TextView)findViewById(hobby);\n\n ivw.setImageResource(animals.get(index).getImageID());\n _name.setText(animals.get(index).getName());\n String strAge = animals.get(index).getAge() + \" years old\";\n _age.setText(strAge);\n if (animals.get(index).getFriendly()) {\n _friendly.setText(R.string._friendly);\n } else {\n _friendly.setText(R.string._unfriendly);\n }\n\n _job.setText(animals.get(index).getJob());\n _hobby.setText(animals.get(index).getHobby());\n }\n }", "@Override\n protected String doInBackground(Void... params) {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n return \"\";\n }", "@Override\n public void onClick(View view) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(context);\n LayoutInflater layoutInflater = LayoutInflater.from(context);\n View alertDialogView = layoutInflater.inflate(R.layout.alertdialog_photo, null);\n ImageView imageView = alertDialogView.findViewById(R.id.controlImage);\n byte[] decode = Base64.decode(\n arrayList.get(getAdapterPosition()).getUrl(),\n Base64.DEFAULT\n );\n Bitmap bitmap = BitmapFactory.decodeByteArray(decode,0,decode.length);\n imageView.setImageBitmap(bitmap);\n alertDialog.setView(alertDialogView).show();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(UserProfile.this, \"Error updating Image..\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch(v.getId()){\n\t\tcase R.id.iv_profile_pic:\n\t\t\t\n\t\t\tIntent galleryIntent = new Intent(Intent.ACTION_PICK,\n\t\t\t\t\tandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\t\t\tstartActivityForResult(galleryIntent, RESULT_LOAD);\n\t\t\t\n\t\t\tbreak;\n\t\tcase R.id.txt_profile_pic_cam:\n\t\t\t\n\t\t\t Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\t\t\t startActivityForResult(intent, REQUEST_CODE_CLICK_IMAGE);\t\t\t\n\t\t\tbreak;\n\t\tcase R.id.txt_profile_done:\n\n\t\t\tString name=edt_prfl_name.getText().toString();\n\t\t\tString email=edt_prfl_email.getText().toString();\n\t\t\tString phone=edt_prfl_number.getText().toString();\n\t\t\tif(email.length()==0){\n\t\t\t\temail=\"[email protected]\";\n\t\t\t}\n\t\t\t\n\t\t\tif(name.length()!=0){\n\t\t\t\t\n\t\t\t\tencImage=au.encryptedImage(uriSting);\n\t\t\t\t\n\t\t\t\tif(!name.equalsIgnoreCase(null)){\n\t\t\t\t\tif(ci.isConnectingToInternet()){\n\t\t\t\t\t\n\t\t\t\t\tJSONObject hbpf_jobj_parent = new JSONObject();\n\t\t JSONObject hbpf_jobj_child = new JSONObject();\n\t\t\t\t\ttry {\n\t\t\t\t\t\thbpf_jobj_child.put(\"phoneNumber\", phone);\n\t\t\t\t\t\thbpf_jobj_child.put(\"profilePic\", encImage);\n\t\t\t\t\t\t\n\t\t\t\t\t\thbpf_jobj_parent.put(\"phoneNumber\", phone);\n\t\t\t\t\t\thbpf_jobj_parent.put(\"name\", name);\n\t\t\t\t\t\thbpf_jobj_parent.put(\"emailId\", email);\n\t\t\t\t\t\thbpf_jobj_parent.put(\"userProfilePictureBO\", hbpf_jobj_child);\n\t\t\t\t\t\thbpf_str_main_req_params=hbpf_jobj_parent.toString();\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t\t\tnew HBprofileupdate().execute(\"\");\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tToast.makeText(getActivity(), \"Please connect to network\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tToast.makeText(getActivity(), \"Please enter Name\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t}", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n try {\n String parametro = data.getStringExtra(\"parametro\");\n String valor = data.getStringExtra(\"valor\");\n Id = valor;\n String descripcion = data.getStringExtra(\"descripcion\");\n if (requestCode == 1) {\n EditText tecnico = (EditText) findViewById(R.id.tecnico);\n tecnico.setText(descripcion);\n }\n }catch (Exception e){\n e.printStackTrace();\n }\n }", "public void saveDetailsOnClick(View view)\n {\n\n //Create Picture object by passing String params set by user.\n Picture picture = new Picture(locationEditText.getText().toString(),\n pictureNameEditText.getText().toString());\n\n //call pushPicture method using instance of Picture to push picture to Firebase\n picture.pushPicture(picture.getLocation(),picture.getName());\n\n\n //Display Toast to let user know that picture has been saved.\n Toast.makeText(PictureActivity.this, R.string.save_toast,\n Toast.LENGTH_SHORT).show();\n\n }", "private void dispatchTakePictureIntent() {\n switch (REQUEST_TAKE_PHOTO_NUM){\n case REQUEST_TAKE_PHOTO_1:\n Toast toast=Toast.makeText(getApplicationContext(),\"ថតពីមុខ\",Toast.LENGTH_SHORT);\n //toast.setMargin(50,50);\n toast.setGravity(Gravity.TOP, 100,80);\n //toast.show();\n ViewGroup group = (ViewGroup) toast.getView();\n TextView messageTextView = (TextView) group.getChildAt(0);\n messageTextView.setTextSize(25);\n toast.show();\n break;\n case REQUEST_TAKE_PHOTO_2:\n Toast toast1=Toast.makeText(getApplicationContext(),\"ថតផ្នែកខាងស្ដាំ\",Toast.LENGTH_SHORT);\n toast1.setGravity(Gravity.TOP, 100,80);\n //toast.show();\n ViewGroup group1 = (ViewGroup) toast1.getView();\n TextView messageTextView1 = (TextView) group1.getChildAt(0);\n messageTextView1.setTextSize(25);\n toast1.show();\n break;\n case REQUEST_TAKE_PHOTO_3:\n Toast toast2=Toast.makeText(getApplicationContext(),\"ថតផ្នែកខាងឆ្វេង\",Toast.LENGTH_SHORT);\n toast2.setGravity(Gravity.TOP, 100,80);\n //toast.show();\n ViewGroup group2 = (ViewGroup) toast2.getView();\n TextView messageTextView2 = (TextView) group2.getChildAt(0);\n messageTextView2.setTextSize(25);\n toast2.show();\n break;\n case REQUEST_TAKE_PHOTO_4:\n Toast toast3= Toast.makeText(getApplicationContext(),\"ថតពីក្រោយ\",Toast.LENGTH_SHORT);\n toast3.setGravity(Gravity.TOP, 100,80);\n //toast.show();\n ViewGroup group3 = (ViewGroup) toast3.getView();\n TextView messageTextView3 = (TextView) group3.getChildAt(0);\n messageTextView3.setTextSize(25);\n toast3.show();\n break;\n// add 2 image by samang 26/08\n case REQUEST_TAKE_PHOTO_5:\n Toast toast4= Toast.makeText(getApplicationContext(),\"ផ្នែកផ្សេងទៀត\",Toast.LENGTH_SHORT);\n toast4.setGravity(Gravity.TOP, 100,80);\n //toast.show();\n ViewGroup group4 = (ViewGroup) toast4.getView();\n TextView messageTextView4 = (TextView) group4.getChildAt(0);\n messageTextView4.setTextSize(25);\n toast4.show();\n break;\n\n case REQUEST_TAKE_PHOTO_6:\n Toast toast5= Toast.makeText(getApplicationContext(),\"ផ្នែកផ្សេងទៀត\",Toast.LENGTH_SHORT);\n toast5.setGravity(Gravity.TOP, 100,80);\n //toast.show();\n ViewGroup group5 = (ViewGroup) toast5.getView();\n TextView messageTextView5 = (TextView) group5.getChildAt(0);\n messageTextView5.setTextSize(25);\n toast5.show();\n break;\n // end\n }\n\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n // Create the File where the photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n ex.printStackTrace();\n // Error occurred while creating the File\n }\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n this.getPackageName() + \".provider\",\n photoFile);\n //BuildConfig.APPLICATION_ID\n mPhotoFile = photoFile;\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n //startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO_NUM);\n }\n }\n }", "public void uploadImage(View v) {\n // When Image is selected from Gallery\n if (imgPath != null && !imgPath.isEmpty()) {\n prgDialog.setMessage(\"Converting Image to Binary Data\");\n prgDialog.show();\n // Convert image to String using Base64\n encodeImagetoString();\n // When Image is not selected from Gallery\n } else {\n Toast.makeText(\n getApplicationContext(),\n \"You must select image from gallery before you try to upload\",\n Toast.LENGTH_LONG).show();\n }\n }", "public void done(View view){\n RequestQueue req = Volley.newRequestQueue(this);\n String url = imageSrc.getText().toString();\n ImageRequest imageReq = new ImageRequest(url, new Response.Listener<Bitmap>() {\n @Override\n public void onResponse(Bitmap response) {\n imageView.setImageBitmap(response);\n }\n }, 0, 0, null, Bitmap.Config.RGB_565, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(MainActivity2.this, \"Invalid image URL, try another one!\", Toast.LENGTH_LONG).show();\n }\n });\n req.add(imageReq);\n\n //inserting data in our Realtime Database\n reference = FirebaseDatabase.getInstance().getReference(id.getText().toString());\n reference.child(\"imagesrc\").setValue(imageSrc.getText().toString());\n reference.child(\"latitude\").setValue(lat.getText().toString());\n reference.child(\"longitude\").setValue(lon.getText().toString());\n reference.child(\"description\").setValue(description.getText().toString());\n Intent intent = getIntent();\n finish();\n startActivity(intent);\n }", "public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n\n if (requestCode == CAPTURE_IMAGE_REQUEST && resultCode == RESULT_OK) {\n Bitmap myBitmap = BitmapFactory.decodeFile(photoFile.getAbsolutePath());\n imgDisplay.setImageBitmap(myBitmap);\n textPath.setText(photoFile.getName());\n } else {\n displayMessage(getBaseContext(), \"Request cancelled or something went wrong.\");\n }\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if(resultCode == this.RESULT_OK && requestCode == EDITAR_TWEET){\n Tweet tweetEditado = (Tweet) data.getExtras().get(Tweet.TWEET_EDIT);\n\n tweets.set(posicaoTweet, tweetEditado);\n\n tweetsAdapter.notifyDataSetChanged();\n }else if(resultCode == this.RESULT_OK && requestCode == TIRAR_FOTO){\n ImageView foto = findViewById(R.id.fotoPerfil);\n\n foto.setImageBitmap((Bitmap) data.getExtras().get(\"data\"));\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n\n\n\n Intent intent = new Intent(GuessTheImage.this, NamingFingers.class);\n // Bundle bundle = new Bundle();\n// bundle.putInt(\"ImageScore\", score);\n // bundle.putParcelable(\"result\", result);\n // intent.putExtras(bundle);\n if(result != null) {\n result.setNamingScore(score);\n intent.putExtra(\"result\", result);\n }\n startActivity(intent);\n\n //result.setNamingScore(score);\n\n // intent1.putExtra(\"result\",result );\n// Result tempResult = new Result();\n// tempResult.setNamingScore(score);\n//\n\n// result.setCommandsScore(1);\n// result.setComprehensionScore(1);\n// Patient patient = new Patient();\n// result.setPatient(patient);\n// result.getPatient().setFirstName(\"Brian\");\n\n // intent.putExtra(\"result\", result);\n // startActivity(intent);\n\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n Toast.makeText(context, \"Image process failed\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(RegisterActivity.this, items[which],\n Toast.LENGTH_SHORT).show();\n\n Log.e(\"-------------\", \"onClick: \"+new Date() );\n\n\n //拍照\n if (which==0){\n // 激活相机\n Intent intent = new Intent(\"android.media.action.IMAGE_CAPTURE\");\n // 判断存储卡是否可以用,可用进行存储\n if (isSdCardExist()) {\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\", Locale.CHINA);\n //根据当前时间生成图片的名称\n timestamp = formatter.format(new Date())+\".jpeg\";\n tempFile = new File(Environment.getExternalStorageDirectory(),\n timestamp);\n // 从文件中创建uri\n Uri uri = Uri.fromFile(tempFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);\n }\n // 开启一个带有返回值的Activity,请求码为PHOTO_REQUEST_CAREMA\n startActivityForResult(intent, PHOTO_REQUEST_CAREMA);\n\n }\n\n //从相册中选取\n if (which==1){\n // 激活系统图库,选择一张图片\n Intent intent = new Intent(Intent.ACTION_PICK);\n intent.setType(\"image/*\");\n // 开启一个带有返回值的Activity,请求码为PHOTO_REQUEST_GALLERY\n startActivityForResult(intent, PHOTO_REQUEST_GALLERY);\n }\n\n alertDialog.dismiss();\n\n\n }", "@Override\n public void afterTextChanged(Editable s) {\n System.out.println(\"STD \" + ageStd.getText() + \" CAN \" + ageCan.getText());\n if (!TextUtils.isEmpty(ageStd.getText()) && !TextUtils.isEmpty(ageCan.getText())) {\n int aStd = Integer.parseInt(ageStd.getText().toString());\n int aCan = Integer.parseInt(ageCan.getText().toString());\n imgStatus.setImageResource((aStd < aCan ? R.drawable.sad : R.drawable.happy));\n }\n }", "@Override\n public void onPositive(MaterialDialog materialDialog) {\n Intent intent = new Intent(ProductDetailImageActivity.this, CameraActivity.class);\n intent.putExtra(EXTRA_ZUOZHENG_IMAGE, isZuozhengImage);\n intent.putExtra(EXTRA_IMAGE_INDEX, index);\n startActivityForResult(intent, REQUEST_TAKE_PICTURE);\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(resultCode == RESULT_OK && requestCode ==200){\n Uri uri_img=data.getData();\n try{\n assert uri_img != null;\n InputStream input_img = updateView.getContext().getContentResolver().openInputStream(uri_img);\n DecodeImage_stream = BitmapFactory.decodeStream(input_img);\n chooseImage.setImageBitmap(DecodeImage_stream);\n }catch (FileNotFoundException f){\n Log.d(\"add new file not found:\",f.getMessage());\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK) {\n if (requestCode == 1) {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n String txt = getTextFromImage(bitmap);\n searchByPhoto(txt);\n }else if(requestCode == 2){\n Bitmap bm=null;\n if (data != null) {\n try {\n bm = MediaStore.Images.Media.getBitmap(getApplicationContext().getContentResolver(), data.getData());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n String txt = getTextFromImage(bm);\n searchByPhoto(txt);\n }\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString name = nameET.getText().toString();\n\t\t\t\tString place = placeET.getText().toString();\n\t\t\t\tif(!name.equals(\"\") && !place.equals(\"\")){\n\t\t\t\t\tIntent i = new Intent();\n\t\t\t\t\tBundle bundle= new Bundle();\n\t\t\t\t\tbundle.putString(\"name\", name);\n\t\t\t\t\tbundle.putString(\"place\", place);\n\t\t\t\t\ti.putExtras(bundle);\n\t\t\t\t\tsetResult(RESULT_OK, i);\n\t\t\t\t\tif(bitmap!=null){\n\t\t\t\t\t\tsaveBitmap(bitmap);\n\t\t\t\t\t}\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Please enter name and place\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onClick(View v) {\n String name =userNameReg.getText().toString();\n String password=passwordReg.getText().toString();\n\n sharedPreferences=getSharedPreferences(\"myTxt\",0);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putString(\"username\",name);\n editor.putString(\"password\",password);\n editor.commit();\n Toast.makeText(RegisterScreen.this, \"Registered Done.\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(RegisterScreen.this, LoginScreen.class));\n\n// // get And Convert image to Array of Bytes .\n// image.buildDrawingCache();\n// Bitmap bitmap=image.getDrawingCache();\n// ByteArrayOutputStream bos = new ByteArrayOutputStream();\n// bitmap.compress(Bitmap.CompressFormat.PNG, 100, bos);\n// byte[] img = bos.toByteArray();\n//\n// // DBAdapter object And Calling Insert Method .\n// DBAdapter db=new DBAdapter();\n// db.open(RegisterScreen.this);\n// db.insertUserInfo(name, password, img);\n// Toast.makeText(RegisterScreen.this, \"Done Register\", Toast.LENGTH_SHORT).show();\n// startActivity(new Intent(RegisterScreen.this, LoginScreen.class));\n\n }", "@Override\n public void onClick(View v) {\n String check1 = height_et.getText().toString(); // check1 for checking height\n String check2 = weight_et.getText().toString(); // check2 for checking weight\n String check3 = name_et.getText().toString(); // check3 for checking name\n\n if(check1.isEmpty() || check2.isEmpty() || check3.isEmpty()){ // if checks are not valid\n\n Toast toast = Toast.makeText(MainActivity.this, \"Entries are not valid\", Toast.LENGTH_SHORT);\n toast.show();\n }else{ // if checks are valid\n\n float height = Integer.parseInt(height_et.getText().toString());\n float weight = Integer.parseInt(weight_et.getText().toString());\n\n // getting user's first name\n String whole_user_name = name_et.getText().toString();\n String[] temp_name_array = whole_user_name.split(\" \");\n\n height /= 100; // for converting height into meter\n float resultant_bmi = (weight / (height * height));\n\n // for underweight activity\n if(resultant_bmi < 18.5){ // if BMI > 18.5\n\n\n // not working : app crash\n Intent intent = new Intent(MainActivity.this, UnderWeightActivity.class);\n String underweight_user_first_name = temp_name_array[0];\n String underweightuser_bmi = String.valueOf(resultant_bmi);\n\n intent.putExtra(\"underweight_username\", underweight_user_first_name); // for sending user_name to next activity\n intent.putExtra(\"underweight_bmi\", underweightuser_bmi);\n startActivity(intent);\n }\n // for normal activity\n else if(resultant_bmi >= 18.5 && resultant_bmi <= 24.9){ // if BMI >= 18.5 and BMI <= 24.9\n\n\n // This is working fine : showing username\n Intent intent = new Intent(MainActivity.this, NormalActivity.class);\n String normal_user_first_name = temp_name_array[0];\n String normaluser_bmi = String.valueOf(resultant_bmi);\n\n intent.putExtra(\"normal_username\", normal_user_first_name); // for sending user_name to next activity\n intent.putExtra(\"normal_bmi\", normaluser_bmi);\n startActivity(intent);\n }\n // for overweight activity\n else if(resultant_bmi >= 25 && resultant_bmi <= 29.9){ // BMI >= 25 and BMI <= 29.9\n\n // not working : app crash\n Intent intent = new Intent(MainActivity.this, OverWeightActivity.class);\n String overweight_user_first_name = temp_name_array[0];\n String overweigthuser_bmi = String.valueOf(resultant_bmi);\n\n intent.putExtra(\"overweight_username\", overweight_user_first_name); // for sending user_name to next activity\n intent.putExtra(\"overweight_bmi\", overweigthuser_bmi);\n startActivity(intent);\n }\n // for obese activity\n else{ // BMI >= 30\n\n // not working : app crash\n Intent intent = new Intent(MainActivity.this, ObeseActivity.class);\n String obese_user_first_name = temp_name_array[0];\n String obeseuser_bmi = String.valueOf(resultant_bmi);\n\n intent.putExtra(\"obese_username\", obese_user_first_name); // for sending user_name to next activity\n intent.putExtra(\"obese_bmi\", obeseuser_bmi);\n startActivity(intent);\n }\n }\n }", "@Override\n public void onClick(View v) {\n\n userN =firstname.getText().toString();\n userL =lastName.getText().toString();\n gender = spin.getSelectedItem().toString();\n problem = reason.getText().toString();\n\n Intent intentsend = new Intent(getApplication(),profile.class);\n intentsend.putExtra(\"userN\",firstname.getText().toString());\n intentsend.putExtra(\"userL\", lastName.getText().toString());\n intentsend.putExtra(\"gender\",spin.getSelectedItem().toString());\n intentsend.putExtra(\"problem\",reason.getText().toString());\n startActivity(intentsend);\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (resultCode == RESULT_OK) {\n\t\t\tswitch (requestCode) {\n//\t\t\tcase EDIT_FROM_EDITOR:\n//\t\t\t\tbyte[] bb = data.getByteArrayExtra(\"bitmap\");\n//\t\t\t\tBitmap tmp_bitmap = BitmapFactory.decodeByteArray(bb, 0,\n//\t\t\t\t\t\tbb.length);\n//\t\t\t\tcur_bitmap_list.add(tmp_bitmap);\n//\t\t\t\tiv_seller_reply_img.setImageBitmap(cur_bitmap_list.get(0));\n//\t\t\t\tbreak;\n\t\t\tcase PICK_FROM_ALBUM :\n//\t\t\t\tIntent intent = new Intent(Consumer_post.this, ImageEditActivity.class);\n//\t\t\t\tintent.putExtra(\"output\", data.getData());\n//\t\t\t\tintent.putExtra(\"flag\", \"album\");\n//\t\t\t\tstartActivityForResult(intent, EDIT_FROM_EDITOR);\n\t\t\t\tif (!addImage(data)) {\n\t\t\t\t\tToast.makeText(Seller_reply.this, \"사진 첨부 실패\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t\tbreak;\n//\t\t\tcase PICK_FROM_CAMERA:\n//\t\t\t\tIntent intent2 = new Intent(Seller_reply.this,\n//\t\t\t\t\t\tImageEditActivity.class);\n//\t\t\t\tintent2.putExtra(\"output\", path + \"/\" + TEMP_IMAGE);\n//\t\t\t\tintent2.putExtra(\"flag\", \"camera\");\n//\t\t\t\tstartActivityForResult(intent2, EDIT_FROM_EDITOR);\n//\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_add_photo_description);\n\t\tphoto = (PhotoBean) getIntent().getParcelableExtra(\"photo\");\n\t\tif(null == photo) {\n\t\t\tfinish();\n\t\t\treturn;\n\t\t}\n\n\t\tcanelTextView = (TextView) findViewById(R.id.cancel_tv);\n\t\tcanelTextView.setOnClickListener(this);\n\t\tokTextView = (TextView) findViewById(R.id.ok_tv);\n\t\tokTextView.setOnClickListener(this);\n\t\tsetResult(RESULT_CANCELED);\n\t\tphotoDescriptionEditText = (EditText) findViewById(R.id.photo_description_et);\n\t\tphotoDescriptionEditText.setText(photo.description);\n\t\tphotoImageView = (ImageView) findViewById(R.id.photo_iv);\n\t\tcom.nostra13.universalimageloader.core.ImageLoader.getInstance().displayImage(\"file://\"+photo.path,photoImageView, ImageLoaderOptionsSetting.getConstantImageLoaderDefaultOptions());\n\t}", "@Override\n public void onClick(View view) {\n Intent gallery_intent=new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(gallery_intent,RESULT_LOAD_IMAGE);//Paasing intentobject and an integer value\n\n }", "public void camara(){\n Intent fotoPick = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n String fecha = new SimpleDateFormat(\"yyyy_MM_dd_HH_mm_ss\").format(new Date());\n Uri uriSavedImage=Uri.fromFile(new File(getExternalFilesDir(Environment.DIRECTORY_DCIM),\"inmueble_\"+id+\"_\"+fecha+\".jpg\"));\n fotoPick.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);\n startActivityForResult(fotoPick,TAKE_PICTURE);\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CAMERA_CAPTURE_IMAGE_REQUEST_CODE) {\n if (resultCode == RESULT_OK) {\n // successfully captured the image\n // display it in image view\n Utils.previewCapturedImage(this, realm, Integer.valueOf(station.getId()));\n //Toast.makeText(getApplicationContext(),intent.getStringExtra(\"id_station\"), Toast.LENGTH_SHORT).show();\n } else if (resultCode == RESULT_CANCELED) {\n // user cancelled Image capture\n Toast.makeText(getApplicationContext(),\n \"User cancelled image capture\", Toast.LENGTH_SHORT)\n .show();\n } else {\n // failed to capture image\n Toast.makeText(getApplicationContext(),\n \"Sorry! Failed to capture image\", Toast.LENGTH_SHORT)\n .show();\n }\n }\n }", "private void analyzeImage() { // replace check picture with try catch for robustness\n try {//if user did select a picture\n bitmapForAnalysis = Bitmap.createScaledBitmap(bitmapForAnalysis, INPUT_SIZE, INPUT_SIZE, false);\n\n final List<Classifier.Recognition> results = classifier.recognizeImage(bitmapForAnalysis);\n\n int size = bitmapForAnalysis.getRowBytes() * bitmapForAnalysis.getHeight();\n ByteBuffer byteBuffer = ByteBuffer.allocate(size);\n bitmapForAnalysis.copyPixelsToBuffer(byteBuffer);\n\n // These need to be saved to private member variables in order\n // to prevent successively piping too much info down multiple methods\n\n byteArrayToSave = byteBuffer.array();\n resultStringToSave = results.toString();\n\n\n //This code has been moved to the onSaveClick Interface method\n /*\n Prediction p = new Prediction(0, results.toString(), byteArray);\n Log.d(\"database\", \"Prediction before adding to db... id: ? prediction string: \" + results.toString() + \" bytearr: \" + byteArray);\n PredictionDatabase.insert(p);\n //PredictionDatabase.insert(new Prediction(1, \"please\", new byte[1]));\n */\n\n //This toast has been made shorter.\n Toast.makeText(this, \"Picture has been successfully analyzed\", Toast.LENGTH_SHORT).show();\n displayPredictionResult(results.toString());\n } catch (NullPointerException e) {//if user didn't select a picture, will just simply display a toast message\n Toast.makeText(this, \"No image has been selected\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_picture);\n\n locationEditText = (EditText) findViewById(R.id.locationEditText);\n pictureNameEditText = (EditText)findViewById(R.id.pictureNameET);\n }", "@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\tdrug=(EditText)findViewById(R.id.editText1);\r\n\t\t\tabc=drug.getText().toString();\r\n\t\t\tToast.makeText(getApplicationContext(), \r\n\t\t abc, Toast.LENGTH_LONG).show();\r\n\t\t\tIntent intent3=new Intent(Input_Med.this,Med_Info.class);\r\n\t\t\tintent3.putExtra(\"drug\", abc);\r\n\t\t\tstartActivity(intent3);\r\n\t\t\t\r\n\t\t}", "public void encodeImagetoString() {\n new AsyncTask<Void, Void, String>() {\n\n protected void onPreExecute() {\n\n }\n\n ;\n\n @Override\n protected String doInBackground(Void... params) {\n\n //bitmap = Bitmap.createScaledBitmap(bitmap, original_width, original_height, true);\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n return \"\";\n }\n\n @Override\n protected void onPostExecute(String msg) {\n\n // Put converted Image string into Async Http Post param\n params.add(new BasicNameValuePair(\"image\", encodedString));\n // Trigger Image upload\n new upload_image().execute();\n }\n }.execute(null, null, null);\n }", "public void encodeImagetoString() {\n new AsyncTask<Void, Void, String>() {\n\n protected void onPreExecute() {\n\n };\n\n @Override\n protected String doInBackground(Void... params) {\n BitmapFactory.Options options = null;\n options = new BitmapFactory.Options();\n options.inSampleSize = 3;\n bitmap = BitmapFactory.decodeFile(imgPath,\n options);\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n return \"\";\n }\n\n @Override\n protected void onPostExecute(String msg) {\n prgDialog.setMessage(\"Calling Upload\");\n // Put converted Image string into Async Http Post param\n params.put(\"image\", encodedString);\n params.put(\"groupid\",gr_id[spinner.getSelectedItemPosition()]);\n params.put(\"userid\", 1);//userid will be the user who has logged in from the application\n // Trigger Image upload\n triggerImageUpload();\n }\n }.execute(null, null, null);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n //everything processed successfully\n if (requestCode == Image_Gallery_Request) {\n //image gallery correctly responds\n Uri imageUri = data.getData(); //address of image on SD Card\n InputStream inputStream; //declaring stream to read data from SD card\n try {\n inputStream = getContentResolver().openInputStream(imageUri);\n Bitmap imagebtmp = BitmapFactory.decodeStream(inputStream); //Puts stream data into bitmap format\n Profile_Picture.setImageBitmap(imagebtmp); //Loads Image to ImageView\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n //error message if image is unavailable\n Toast.makeText(this, \"Unable to open image\", Toast.LENGTH_LONG).show();\n }\n }\n }\n }", "@Override\n public void onClick(View v)\n {\n StringBuilder sb = new StringBuilder();\n\n // BEGIN QUERY\n Cursor resultSet = db.select(searchEditText.getText().toString());\n\n\n int maxSize = resultSet.getCount();\n Log.e(\"MAX-SIZE\", String.valueOf(maxSize));\n\n int counter = 0; // NEW\n // used for the images displayed in the ResultSetActivity\n String[] imageNames = new String[maxSize]; // NEW\n\n // if user enters nothing return and display a toast about entering something\n // (Note: added .trim() to treat multiple spaces as an empty string as well)\n if (searchEditText.getText().toString().trim().equals(\"\"))\n {\n Toast.makeText(getApplicationContext(), \"Please search for a specific item\", Toast.LENGTH_SHORT).show();\n return;\n }\n // if query returns 0 results\n if (maxSize == 0)\n {\n // if max size is 0 and you try to store an element program crashes so make max size 1\n imageNames = new String[1]; // TEMPORARY UNTIL BETTER LOGIC OCCURS\n imageNames[counter] = \"x\";\n // PERHAPS use a reference to the productImageView from the products.xml in order to\n // make the size of the x image smaller because it looks too big\n sb.append(\"Query Returned 0 results\");\n }\n else\n {\n while (resultSet.moveToNext())\n {\n\n // the last %n gives it a bit of extra space in the bottom of each item\n sb.append(String.format(\"%s%n%s%n%s%n\",\n resultSet.getString(0), resultSet.getString(1), resultSet.getString(2)));\n\n // Assign the current imageNames element the value of the product number\n imageNames[counter] = resultSet.getString(0).toLowerCase(); // NEW\n\n if (resultSet.getCount() != counter)\n sb.append(\"!\");\n\n counter++;\n\n }\n }\n\n // END QUERY\n\n // split into an array based on commas\n String[] results = sb.toString().split(\"!\");\n\n\n // create intent to switch activities\n Intent intent = new Intent(getApplicationContext(), ResultSetActivity.class);\n // send the result object to the ResultSetActivity\n intent.putExtra(\"Query\", results);\n\n // PUT THE imageNames array as an extra to send to next activity // NEW\n intent.putExtra(\"Images\", imageNames);\n\n // go to the ResultSetActivity\n startActivity(intent);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) { /// automatski se zove kada krene startActivityResult\n //super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK){\n // get the photo\n Bundle extras = data.getExtras();\n Bitmap photo = (Bitmap)extras.get(\"data\"); // spremanje u bitmap\n mojImageView.setImageBitmap(photo); // stavljanje na zaslon\n\n }\n }", "public void onClick(View view){\n Intent toDetailActivity = new Intent (view.getContext(), Detail.class);\n toDetailActivity.putExtra(\"nama\", nama.getText().toString());\n toDetailActivity.putExtra(\"gender\",avatarCode);\n toDetailActivity.putExtra(\"pekerjaan\", job.getText().toString());\n view.getContext().startActivity(toDetailActivity);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n Bundle extras = data.getExtras();\n Bitmap bmp = (Bitmap) extras.get(\"data\");\n iv.setImageBitmap(bmp);\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "public void onClick(View view){\n\n String name = mNameField.getText().toString();\n Toast.makeText(this,\"Hello There\"+name, Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_PICK);\n intent.setType(\"image/*\");\n // the one is the number attached to the intent\n //it capture the number and goes with the result\n startActivityForResult(intent,1);\n }", "public void saveDetails()\n {\n String name = mEtName.getText().toString();\n String number = mEtPhoneNumber.getText().toString();\n String email = mEtEmail.getText().toString();\n String address= mEtAddress.getText().toString();\n String nickName=mEtNickName.getText().toString();\n\n // Toast.makeText(RM_AddContact_Activity.this, selectedImagePath+\"jjdjkahjk\", Toast.LENGTH_SHORT).show();\n\n if(name.equalsIgnoreCase(\"\")) {\n mEtName.setError(\"Name can not be null\");\n flag_for_error = 1;\n }else if(number.equalsIgnoreCase(\"\")){\n mEtPhoneNumber.setError(\"Number can not be null\");\n flag_for_error=1;\n }\n\n //\n\n// flag to check if any wrong input\n if (flag_for_error==0)\n {\n if(rm_friendBean != null) {\n rm_friendBean.setName(name);\n rm_friendBean.setPhoneNumber(number);\n rm_friendBean.setEmail(email);\n rm_friendBean.setFriend_image(selectedImagePath);\n rm_friendBean.setNickname(nickName);\n rm_friendBean.setAddress(address);\n }\n else\n {\n rm_friendBean = new RM_FriendBean(address, nickName,name,selectedImagePath, email,number,RM_Login_Activity.user_id);\n\n }\n if(flag_for_edit==0) {\n RM_DbHelper.getInstance(this).addFriends(rm_friendBean);\n setResult(501);\n finish();\n\n }\n else if(flag_for_edit==1)\n {\n RM_DbHelper.getInstance(this).updateFriend(rm_friendBean);\n Intent intent = new Intent(this,RM_ContactList_Activity.class);\n startActivity(intent);\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_CANCELED)\n return;\n\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case SELECT_LOCATION_REQUEST:\n String coordResult = (String) data.getExtras().get(\"selectedCoord\");\n geo_key.setText(coordResult);\n break;\n case PICK_IMAGE_REQUEST:\n Uri uri = data.getData();\n try {\n Bitmap imageBitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri);\n Log.v(\"StegoCrypto-Image\", String.valueOf(imageBitmap));\n\n selectedImageIV.setImageBitmap(ImageUtility.getResizedBitmap(imageBitmap, ImageUtility.MAX_IMAGE_SIZE));\n } catch (IOException e) {e.printStackTrace();}\n break;\n case CAMERA_REQUEST:\n if (cameraFileUri != null) {\n try {\n Bitmap cameraBitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), cameraFileUri);\n selectedImageIV.setImageBitmap(ImageUtility.getResizedBitmap(cameraBitmap, ImageUtility.MAX_IMAGE_SIZE));\n } catch (IOException e) {e.printStackTrace();}\n }\n break;\n case DRAW_REQUEST:\n Bitmap drawBitmap = data.getParcelableExtra(\"drawingBitmap\");\n selectedImageIV.setImageBitmap(ImageUtility.getResizedBitmap(drawBitmap, ImageUtility.MAX_IMAGE_SIZE));\n break;\n }\n }", "@Override\n protected void onResume() {\n Intent intent = getIntent();\n Integer angleCaptured = intent.getIntExtra(AngleCaptureActivity.EXTRA_THETA, 0);\n EditText angleText = (EditText) findViewById(R.id.angle_recommendClub_editText);\n angleText.setText(angleCaptured.toString());\n\n setBackgroundImage();\n super.onResume();\n }", "public void onClick(View v) {\n String Fname= fname.getText().toString();\n String Mname= mname.getText().toString();\n String Lname= lname.getText().toString();\n String Village= village.getText().toString();\n String Mobile= mobile.getText().toString();\n\n\n //code to insert Patient in database\n if(filemanagerstring==null || Fname.equals(\"\") || Mname.equals(\"\") || Lname.equals(\"\") || Village.equals(\"\") || Mobile.equals(\"\"))\n {\n if(filemanagerstring==null){\n\n Toast.makeText(getApplicationContext(),\"Please Insert The Image\",Toast.LENGTH_LONG).show();\n\n }\n if(Fname.equals(\"\")){\n // Toast.makeText(getApplicationContext(),\"Please Insert the value of Fname\",Toast.LENGTH_SHORT).show();\n fname.setError(\"Enter First Name\");\n\n\n }\n if (Mname.equals(\"\")) {\n\n // Toast.makeText(getApplicationContext(),\"Please Insert the value of Mname\",Toast.LENGTH_SHORT).show();\n mname.setError(\"Enter Middel Name\");\n\n }\n if (Lname.equals(\"\")) {\n\n //Toast.makeText(getApplicationContext(),\"Please Insert the value of Lname\",Toast.LENGTH_SHORT).show();\n lname.setError(\"Enter Last Name\");\n\n }\n if (Village.equals(\"\")) {\n\n //Toast.makeText(getApplicationContext(),\"Please Insert The vavue of Villag\",Toast.LENGTH_SHORT).show();\n village.setError(\"Enter Village\");\n\n }\n if (Mobile.equals(\"\")) {\n\n //Toast.makeText(getApplicationContext(),\"Please Insert The Mobile Number\",Toast.LENGTH_SHORT).show();\n mobile.setError(\"Enter Mobile Number\");\n\n }\n }else {\n loginDataBaseAdapter.addPatient(Fname, Mname, Lname, Village, Mobile, filemanagerstring);\n dialog.dismiss();\n\n Intent intentSignUP = new Intent(getApplicationContext(), PatientList.class);\n startActivity(intentSignUP);\n }\n }", "private void updateUserInterface(){\n\n if (user.gender){\n\n genderImg.setImageDrawable(getDrawable(R.drawable.ic_boy));\n }else{\n genderImg.setImageDrawable(getDrawable(R.mipmap.ic_launcher_foreground));\n }\n\n skillPoint.setText(String.valueOf(user.skillPoints));\n\n name.setText(user.name);\n Toast.makeText(this,\"User: \"+String.valueOf(user.name)+\" Created\",Toast.LENGTH_LONG).show();\n\n\n\n }", "@Override\n public void onClick(View arg0) {\n if (questionEditText.getText().toString().trim().length() != 0 && answerEditText.getText().toString().trim().length() != 0\n && imageView.getVisibility() == View.VISIBLE){\n ContentValues cardValues = new ContentValues();\n cardValues.put(FlashProvider.CARDS_COLUMN_ROWID, rowID);\n cardValues.put(FlashProvider.CARDS_COLUMN_QUESTION, questionEditText.getText().toString());\n cardValues.put(FlashProvider.CARDS_COLUMN_ANSWER, answerEditText.getText().toString());\n cardValues.put(FlashProvider.CARDS_CLASSES_COLUMN, class_rowID);\n\n cROW_ID = class_rowID;\n\n Uri uri = getActivity().getContentResolver().insert(FlashProvider.CARDS_CONTENT_URI, cardValues);\n rowID = ContentUris.parseId(uri);\n\n ContentValues withImage;\n withImage = addImage(rowID, bitmap);\n\n getActivity().getContentResolver().update(\n ContentUris.withAppendedId(FlashProvider.CARDS_IMAGE_CONTENT_URI, rowID), withImage, null, null);\n\n listener.onAddEditCardSuccess(rowID);\n }\n\n else {\n\n if (questionEditText.getText().toString().trim().length() < 7){\n questionEditText.setError(\"Question is too short\");\n }\n\n else if (answerEditText.getText().toString().trim().length() == 0) {\n answerEditText.setError(\"Answer cannot be Empty\");\n }\n\n else if (imageView.getVisibility() != View.VISIBLE) {\n DialogFragment errorSavingCard = new DialogFragment() {\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n //declare the AlertDialog\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.error_message_image);\n builder.setPositiveButton(R.string.ok, null);\n return builder.create();\n }\n };\n errorSavingCard.show(getFragmentManager(), \"Error saving Card\");\n }\n\n }\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if(requestCode == gallaryPick && resultCode == RESULT_OK && data != null){\n imageUri = data.getData();\n try{\n saveTransactionPictureToFirebaseStorage();\n } catch (Exception ex){\n Toast.makeText(this, \"Error occurred, please try again...\", Toast.LENGTH_SHORT).show();\n }\n }\n }" ]
[ "0.6301529", "0.62820065", "0.6222154", "0.6220535", "0.61953473", "0.61453694", "0.61443317", "0.6074451", "0.6064549", "0.6057812", "0.60568017", "0.60499734", "0.6035285", "0.59813523", "0.59519124", "0.5936743", "0.59071773", "0.58920294", "0.58894044", "0.5885727", "0.5881235", "0.5868235", "0.5866864", "0.5849822", "0.5838768", "0.58105385", "0.579599", "0.579314", "0.57482857", "0.57459307", "0.57240456", "0.5717979", "0.57119703", "0.5707314", "0.5688492", "0.56881106", "0.56828386", "0.5676896", "0.56719315", "0.5668066", "0.5665252", "0.56587523", "0.56554776", "0.5651572", "0.5630304", "0.5625546", "0.5624416", "0.5621718", "0.561716", "0.561082", "0.5608666", "0.5608558", "0.5607564", "0.5600945", "0.5586811", "0.5582897", "0.5582506", "0.55823594", "0.5578981", "0.5574857", "0.5572233", "0.556866", "0.5568513", "0.5556276", "0.5552954", "0.55472827", "0.5544471", "0.5536951", "0.5534415", "0.5530531", "0.55274767", "0.55090165", "0.5503169", "0.5499715", "0.54992825", "0.5498056", "0.5495761", "0.5485301", "0.5484429", "0.5482217", "0.5472297", "0.54574883", "0.54562324", "0.5452412", "0.5452349", "0.5450619", "0.54450417", "0.54381645", "0.54352915", "0.54320943", "0.54300326", "0.5428908", "0.5428211", "0.5427818", "0.5425919", "0.54222685", "0.5421764", "0.5421074", "0.5420149", "0.5414674", "0.5403502" ]
0.0
-1
Creates new form Template_350
public SA_Main(String userName, String password, String IP, int Port, Socket cSocket) { //Set Variables that need to be used in other methods this.userName = userName; this.password = password; this.clientSocket = cSocket; this.IP = IP; this.Port = Port; //Set titles, screen location, and information labels initComponents(); this.setTitle("Attendance Tracker"); this.setLocation(500,300); user_Label.setText("<html><b>Username: </b>" + userName); IP_Label.setText("<html><b>IP Address: </b>" + IP); Port_Label.setText("<html><b>Port: </b>" + Port); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.walgreens.rxit.ch.cda.II addNewTemplateId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.II target = null;\n target = (com.walgreens.rxit.ch.cda.II)get_store().add_element_user(TEMPLATEID$4);\n return target;\n }\n }", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "public com.walgreens.rxit.ch.cda.II insertNewTemplateId(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.II target = null;\n target = (com.walgreens.rxit.ch.cda.II)get_store().insert_element_user(TEMPLATEID$4, i);\n return target;\n }\n }", "@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 }", "FORM createFORM();", "@Test\n public void createTemplateTest() throws IdfyException, Exception {\n CreatePdfTemplate model = new CreatePdfTemplate.Builder().build();\n PdfTemplate response = api.createTemplate(model);\n assertNotNull(response);\n }", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "private Template makeTemplate() {\n return new Template(\"spamHardGenerated\", \"SPAM HARD\\n$$template_EOO\\n\" + sendedWorld.getText() + \"\\n$$template_EOF\\n$$var_name osef\\n$$var_surname osef\");\n }", "public FieldsTemplateLibrary templateFieldLibraryInsert(FieldsTemplateLibrary entity) {\n\t\tFieldsTemplateLibraryDAO dao = new FieldsTemplateLibraryDAO();\n\t\tentity = dao.saveNew(entity);\n\t\treturn entity;\n\t}", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "@RequestMapping(method = RequestMethod.POST)\n public ResponseEntity<ActionTemplate> createActionTemplate(\n @RequestBody @Valid final ActionTemplate requestActionTemplate) {\n log.with(\"Template Name\", requestActionTemplate.getType())\n .with(\"Description\", requestActionTemplate.getDescription())\n .debug(\"Recording a new action template\");\n ActionTemplate createdTemplate = actionTemplateRepo.save(requestActionTemplate);\n return ResponseEntity.created(\n URI.create(String.format(\"/template/%s\", createdTemplate.getType())))\n .body(createdTemplate);\n }", "public createNew(){\n\t\tsuper(\"Create\"); // title for the frame\n\t\t//layout as null\n\t\tgetContentPane().setLayout(null);\n\t\t//get the background image\n\t\ttry {\n\t\t\tbackground =\n\t\t\t\t\tnew ImageIcon (ImageIO.read(getClass().getResource(\"Wallpaper.jpg\")));\n\t\t}//Catch for file error\n\t\tcatch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"ERROR: File(s) Not Found\\n Please Check Your File Format\\n\"\n\t\t\t\t\t\t\t+ \"and The File Name!\");\n\t\t}\n\t\t//Initialize all of the compenents \n\t\tlblBackground = new JLabel (background);\n\t\tlblTitle = new JLabel (\"Create Menu\");\n\t\tlblTitle.setFont(new Font(\"ARIAL\",Font.ITALIC, 30));\n\t\tlblName = new JLabel(\"Please Enter Your First Name.\");\n\t\tlblLastName= new JLabel (\"Please Enter Your Last Name.\");\n\t\tlblPhoneNumber = new JLabel (\"Please Enter Your Phone Number.\");\n\t\tlblAddress = new JLabel (\"Please Enter Your Address.\");\n\t\tlblMiddle = new JLabel (\"Please Enter Your Middle Name (Optional).\");\n\t\tbtnCreate = new JButton (\"Create\");\n\t\tbtnBack = new JButton (\"Back\");\n\t\t//set the font\n\t\tlblName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblLastName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblPhoneNumber.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblAddress.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblMiddle.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\n\t\t//add action listener\n\t\tbtnCreate.addActionListener(this);\n\t\tbtnBack.addActionListener(this);\n\t\t//set bounds for all the components\n\t\tbtnCreate.setBounds(393, 594, 220, 36);\n\t\ttxtMiddle.setBounds(333, 249, 342, 36);\n\t\ttxtName.setBounds(333, 158, 342, 36);\n\t\ttxtLastName.setBounds(333, 339, 342, 36);\n\t\ttxtPhoneNumber.setBounds(333, 429, 342, 36);\n\t\ttxtAddress.setBounds(333, 511, 342, 36);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblMiddle.setBounds(333, 201, 342, 36);\n\t\tlblName.setBounds(387, 110, 239, 36);\n\t\tlblLastName.setBounds(387, 297, 239, 36);\n\t\tlblPhoneNumber.setBounds(369, 387, 269, 36);\n\t\tlblAddress.setBounds(393, 477, 215, 30);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblBackground.setBounds(0, 0, 1000, 1000);\n\t\t//add components to frame\n\t\tgetContentPane().add(btnCreate);\n\t\tgetContentPane().add(txtMiddle);\n\t\tgetContentPane().add(txtLastName);\n\t\tgetContentPane().add(txtAddress);\n\t\tgetContentPane().add(txtPhoneNumber);\n\t\tgetContentPane().add(txtName);\n\t\tgetContentPane().add(lblMiddle);\n\t\tgetContentPane().add(lblLastName);\n\t\tgetContentPane().add(lblAddress);\n\t\tgetContentPane().add(lblPhoneNumber);\n\t\tgetContentPane().add(lblName);\n\t\tgetContentPane().add(btnBack);\n\t\tgetContentPane().add(lblTitle);\n\t\tgetContentPane().add(lblBackground);\n\t\t//set size, visible and action for close\n\t\tsetSize(1000,1000);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\n\t}", "protected void openNewResourceTemplateDialog() {\n hide();\n try {\n NewResourceTemplateDialog newResourceTemplateDialog =\n new NewResourceTemplateDialog(getParentShell(),\n null);\n newResourceTemplateDialog.create();\n newResourceTemplateDialog.getShell().setText(NEW_RESOURCE);\n newResourceTemplateDialog.open();\n if (newResourceTemplateDialog.getReturnCode() == Window.OK) {\n setSelectedPath(newResourceTemplateDialog.getSelectedPath());\n }\n } finally {\n show();\n }\n }", "private void insertTemplateFieldRows(Connection con,\n IdentifiedRecordTemplate template) throws SQLException, FormException {\n PreparedStatement insert = null;\n \n try {\n insert = con.prepareStatement(INSERT_TEMPLATE_FIELD);\n \n int internalId = template.getInternalId();\n FieldTemplate[] fields = template.getFieldTemplates();\n for (int i = 0; i < fields.length; i++) {\n insert.setInt(1, internalId);\n insert.setString(2, fields[i].getFieldName());\n insert.setInt(3, i);\n insert.setString(4, fields[i].getTypeName());\n if (fields[i].isMandatory()) {\n insert.setInt(5, 1);\n } else {\n insert.setInt(5, 0);\n }\n if (fields[i].isReadOnly()) {\n insert.setInt(6, 1);\n } else {\n insert.setInt(6, 0);\n }\n insert.setInt(7, 1);\n insert.execute();\n }\n } finally {\n DBUtil.close(insert);\n }\n }", "public void createTemp(String TemplateType){\r\n ts.create(TemplateType);\r\n }", "private void saveTemplate()\r\n {\r\n\t String template = keyField.getText();\r\n\r\n\t int lenI = values.length, lenJ, lenK;\r\n\t String[][][] newValues = new String[lenI][][];\r\n\t for (int i=0; i<lenI; i++)\r\n\t {\r\n\t\t lenJ = values[i].length;\r\n\t\t newValues[i] = new String[lenJ][];\r\n\t\t for (int j=0; j<lenJ; j++)\r\n\t\t {\r\n\t\t\t lenK = values[i][j].length;\r\n\t\t\t newValues[i][j] = new String[lenK];\r\n\t\t\t for (int k=0; k<lenK; k++)\r\n\t\t\t\t values[i][j][k] = values[i][j][k];\r\n\t\t }\r\n\t }\r\n\t \r\n\t if (template.length()==0)\r\n\t {\r\n\t\t label.setText(\"Please enter a valid template name\");\r\n\t\t return;\r\n\t }\r\n\t \r\n\t // Update or store to the list of templates.\r\n for (int i=0; i<newValues.length; i++)\r\n \t for (int j=0; j<newValues[i].length; j++)\r\n\t\t\t newValues[i][j] = getComponentArray(components[i][j]);\r\n \r\n \t if (!definitionBox.isSelected())\r\n \t {\r\n \t\t newValues[FormatData.t.D_HDR.ordinal()] \r\n \t\t\t\t = newValues[FormatData.t.D_FLD.ordinal()] \r\n \t\t\t\t\t\t = new String[0][0];\r\n \t }\r\n \t if (!categoryBox.isSelected())\r\n \t {\r\n \t\t newValues[FormatData.t.C_HDR.ordinal()] \r\n \t\t\t\t = newValues[FormatData.t.C_FLD.ordinal()] \r\n \t\t\t\t\t\t = new String[0][0];\r\n \t }\r\n \t if (!exampleBox.isSelected())\r\n \t {\r\n \t\t newValues[FormatData.t.E_HDR.ordinal()] \r\n \t\t\t\t = newValues[FormatData.t.E_FLD.ordinal()] \r\n \t\t\t\t\t\t = new String[0][0];\r\n \t }\r\n\r\n templates.setTemplate(template, newValues);\r\n\r\n if (!model.contains(template))\r\n\t {\r\n\t int size = templateKeys.length;\r\n\t String[] newTemplates = new String[templateKeys.length + 1];\r\n\t if (templateKeys.length != 0)\r\n\t \t System.arraycopy(templateKeys, 0, newTemplates, 0, size);\r\n\t \r\n\t newTemplates[size] = template;\r\n\t templateKeys = newTemplates;\r\n\t model.add(size, templateKeys[size]);\r\n\t list.setSelectedIndex(size);\r\n\t }\r\n label.setText(\"Display format \" + template + \" saved\");\r\n }", "private Template() {\r\n\r\n }", "public void addToTemplates() {\n mTemplateId = mPreferenceManager.getTemplateId();\n if (isConverted) {\n if (mPreferenceManager.getTemplateId().equals(ConstantsManager.CONVERTER_TEMPLATE_ID_DEFAULT)) {\n mTemplateId = mDatabaseManager.getTemplateNewId();\n mPreferenceManager.setTemplateId(mTemplateId);\n saveTemplate(mToastCreated);\n } else {\n showDialog();\n }\n } else {\n mBaseActivity.showToast(mToastFailure);\n }\n }", "@RequestMapping(\"/new\")\n\tpublic String displayProjectForm(Model model) {\n\t\tProject aproject = new Project();\n\t//Iterable<Employee> employees = \tpro.getall();\n\t\n\t\tmodel.addAttribute(\"project\", aproject);\n\n\t\t//model.addAttribute(\"allEmployees\", employees);\n\t\t\n\t\t\n\t\treturn \"newproject\";\n\t\t\n\t}", "@RequestMapping(value = { \"/new\"}, method = RequestMethod.GET)\n\tpublic String newEntity(ModelMap model) {\n\t\tENTITY entity = createEntity();\n\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}", "@Test\n\tpublic void test04_CreateNewPageUsingExistingTemplate() {\n\t\tinfo(\"Test 4: Create new page using existing template\");\n\t\tString template1 = wTempData.getWikiTemplate(0);\n\t\tString title1 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template1);\n\t\tString template2 = wTempData.getWikiTemplate(1);\n\t\tString title2 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template2);\n\t\tString template3 = wTempData.getWikiTemplate(2);\n\t\tString title3 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template3);\n\t\tString template4 = wTempData.getWikiTemplate(3);\n\t\tString title4 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template4);\n\t\tString template5 = wTempData.getWikiTemplate(4);\n\t\tString title5 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template5);\n\t\t\n\t\t/*Step Number: 1\n\t\t*Step Name: Step 1: Open form to create new page\n\t\t*Step Description: \n\t\t\t- Choose path to add new page\n\t\t\t- Click [Add Page] --> [From Template...]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\t- By default, the [Create Wiki page] is displayed in the [Rich Text] mode */\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t \n\t /*Step Number: 2\n\t\t*Step Name: Step 2: Create new page with Two Column layout\n\t\t*Step Description: \n\t\t\t- Choose template [Two Column layout] in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with two column layout*/\n\t\twikiMg.addSimpleWikiPageByTemplate(template1,title1);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title1);\n\t\tarrayPage.add(title1);\n\t \n\t\t /*Step Number: 3\n\t\t*Step Name: Step 3: Create new page with Three Column layout\n\t\t*Step Description: \n\t\t\t- Choose template [Three Column layout] in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like.\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with three column layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template2,title2);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title2);\n\t\tarrayPage.add(title2);\n\t\t\n\t\t /*Step Number: 4\n\t\t*Step Name: Step 4: Create new page with Status Meeting layout\n\t\t*Step Description: \n\t\t\t- Choose template \"Status Meeting\" in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like.\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with Status Meeting layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template3,title3);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title3);\n\t\tarrayPage.add(title3);\n\t\t\n\t\t /*Step Number: 5\n\t\t*Step Name: Step 5: Create new page with HOW-TO Guide layout\n\t\t*Step Description: \n\t\t\t- Choose template [HOW-TO Guide] layout in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with HOW-TO Guide layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template4,title4);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title4);\n\t\tarrayPage.add(title4);\n\t\t\n\t\t/*Step Number: 6\n\t\t*Step Name: Step 6: Create new page with Leave Planning layout\n\t\t*Step Description: \n\t\t\t- Choose template [Leave Planning] layout in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with Leave Planning layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template5,title5);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title5);\n\t\tarrayPage.add(title5);\n \t}", "@RequestMapping(\"/recipe/new\")\n public String newRecipe(Model model){\n model.addAttribute(\"recipe\", new RecipeCommand());\n \n return \"recipe/recipeForm\";\n }", "PSTemplateSummary createTemplate(String name, String srcId, String siteId) throws PSDataServiceException;", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "public boolean insertFieldsTemplate(Template template, ArrayList<FieldsTemplate> fields)\n\t{\n\t\tFieldsTemplateDAO daoTemplate = new FieldsTemplateDAO();\n\t\t\n\t\tfor (FieldsTemplate field:fields)\n\t\t{\n\t\t\tfield.setTemplateId(template);\n\t\t\tdaoTemplate.saveNew(field);\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public WellFormTemplate(){\n \tpatternIndex = 0;\n }", "public Template getTemplate() {\n \t\t\treturn fNewTemplate;\n \t\t}", "public void setTemplate(Template template)\n/* */ {\n/* 62 */ this.template = template;\n/* */ }", "public void clickCreateNewPostBtn() {\n createPostBtn.get(0).click();\n }", "public void clickCreateButton() {\n this.action.click(this.createButton);\n }", "public Project_Create() {\n initComponents();\n }", "@RequestMapping(value={\"/projects/add\"}, method= RequestMethod.GET)\r\n\tpublic String createProjectForm(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectForm\", new Project());\r\n\t\treturn \"addProject\";\r\n\t}", "PSTemplateSummary createTemplate(String name, String srcId, String siteId, PSTemplateTypeEnum type) throws PSDataServiceException;", "@RequestMapping(\"/save\")\n\tpublic String createProjectForm(Project project, Model model) {\n\t\t\n\tproRep.save(project);\n\tList<Project> getall = (List<Project>) proRep.getAll();\n\tmodel.addAttribute(\"projects\", getall);\n\t\n\treturn \"listproject\";\n\t\t\n\t}", "public void saveTemplate(String filename){\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"savingTemplate\");\n blueprint = currentTemplate.createBlueprint();\n //make sure we have correct extension\n filename = FileManager.removeExtension(filename);\n if (isInspecting){\n filename = filename + \".in\";\n } else {\n filename = filename + \".bp\";\n }\n boolean hasSaved = FileManager.createTemplate(filename, blueprint);\n if (hasSaved){\n Toast.makeText(this, \"Saved\", Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(this, \"Did not save\", Toast.LENGTH_LONG).show();\n }\n }", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "@Override\n public void Create() {\n\n initView();\n }", "private String renderCreatePage(Model model) {\n\t\tmodel.addAttribute(\"availableProviders\", providerService.getAllProviders());\n\t\treturn \"vm/create\";\n\t}", "public String formCreated()\r\n {\r\n return formError(\"201 Created\",\"Object was created\");\r\n }", "@RequestMapping(\"/book/new\")\n public String newBook(Model model){\n model.addAttribute(\"book\", new Book ());\n return \"bookform\";\n }", "@Override\n\t\tpublic TemplateType addTemplate() {\n\t\t\treturn this;\n\t\t}", "TemplatePreview generateTemplatePreview(String templateId, Map<String, String> personalisation) throws NotificationClientException;", "@Test\n @Transactional\n public void createTemplate() throws Exception {\n assertThat(templateRepository.findAll()).hasSize(0);\n\n // Create the Template\n restTemplateMockMvc.perform(post(\"/api/templates\")\n .contentType(TestUtil.APPLICATION_JSON_UTF8)\n .content(TestUtil.convertObjectToJsonBytes(template)))\n .andExpect(status().isCreated());\n\n // Validate the Template in the database\n List<Template> templates = templateRepository.findAll();\n assertThat(templates).hasSize(1);\n Template testTemplate = templates.iterator().next();\n assertThat(testTemplate.getXML()).isEqualTo(DEFAULT_XML);\n assertThat(testTemplate.getVersion()).isEqualTo(DEFAULT_VERSION);\n assertThat(testTemplate.getMaster()).isEqualTo(DEFAULT_MASTER);\n assertThat(testTemplate.getXmlId()).isEqualTo(DEFAULT_XML_ID);\n }", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "@Test\n public void fieldTemplate() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // We can set a template name using by the fields. This property is used when the \"doc.AttachedTemplate\" is empty.\n // If this property is empty the default template file name \"Normal.dotm\" is used.\n doc.getFieldOptions().setTemplateName(\"\");\n\n FieldTemplate field = (FieldTemplate) builder.insertField(FieldType.FIELD_TEMPLATE, false);\n Assert.assertEquals(field.getFieldCode(), \" TEMPLATE \");\n\n builder.writeln();\n field = (FieldTemplate) builder.insertField(FieldType.FIELD_TEMPLATE, false);\n field.setIncludeFullPath(true);\n\n Assert.assertEquals(field.getFieldCode(), \" TEMPLATE \\\\p\");\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.TEMPLATE.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.TEMPLATE.docx\");\n\n field = (FieldTemplate) doc.getRange().getFields().get(0);\n Assert.assertEquals(\" TEMPLATE \", field.getFieldCode());\n Assert.assertEquals(\"Normal.dotm\", field.getResult());\n\n field = (FieldTemplate) doc.getRange().getFields().get(1);\n Assert.assertEquals(\" TEMPLATE \\\\p\", field.getFieldCode());\n Assert.assertEquals(\"Normal.dotm\", field.getResult());\n }", "private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "@GetMapping(\"/students/new\")\r\n\tpublic String createStudentForm(Model model) {\n\t\tStudent student =new Student();\r\n\t\tmodel.addAttribute(\"student\",student);\r\n\t\treturn \"create_student\";\r\n\t}", "public void createItem(View view) {\n \t\n String[] temp = getCurrentItemTypes();\n \n Intent intent = new Intent(this, CreateItem.class);\n intent.putExtra(EDIT, \"no\");\n intent.putExtra(TYPES, temp);\n startActivityForResult(intent, 1);\n }", "public void makeNew() {\n\t\towner.switchMode(WindowMode.ITEMCREATE);\n\t}", "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}", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "public static void createButtonSelection(ActionContext actionContext){\n Thing store = actionContext.getObject(\"store\");\n store.doAction(\"openCreateForm\", actionContext);\n }", "public TemplateView() {\n\t\ttry {\n\t\t\tloader = new FXMLLoader(this.getClass().getResource(\"Template.fxml\"), Messages.getBundle());\n\t\t\tParent root = loader.load();\n\t \tsetScene(new Scene(root));\n\t\t} catch (IOException e) {\n\t\t\tlogger.log(Level.WARNING, \"Failed to load view\", e);\n\t\t}\n\t\tsetTitle(Messages.TITLE_TEMPLATES_DIALOG.localize());\n\t}", "public ClientEditPage createNewClient() throws Exception {\n if (isNotAt()) {\n goTo();\n }\n newClientButton.click();\n Thread.sleep(Browser.getDelayAfterNewItemClick());\n return Pages.getClientEditPage();\n }", "@RequestMapping(\"/newRecipe\")\r\n\tpublic ModelAndView newRecipe() {\r\n\t\tModelAndView mav = new ModelAndView();\r\n\r\n\t\tmav.addObject(\"recipe\", new Recipe());\r\n\t\tmav.addObject(\"newFlag\", true);\r\n\t\tmav.setViewName(\"recipe/editRecipe.jsp\");\r\n\r\n\t\treturn mav;\r\n\t}", "private void templateDocActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_templateDocActionPerformed\n // Autogenerated code, no need to do anything here\n }", "@RequestMapping(value = \"/newrecipe\", method = RequestMethod.GET)\n\tpublic String newRecipeForm(Model model) {\n\t\tmodel.addAttribute(\"recipe\", new Recipe()); //empty recipe object\n\t\tmodel.addAttribute(\"categories\", CatRepo.findAll());\n\t\treturn \"newrecipe\";\n\t}", "public Reqif10ModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {\r\n \t\t\tsuper(pageId, selection);\r\n \t\t}", "@RequestMapping(value = { \"/newModule\" }, method = RequestMethod.GET)\n\t\tpublic String newModule(ModelMap model) {\n\t\t\tModule module = new Module();\n\t\t\tmodel.addAttribute(\"module\", module);\n\t\t\tmodel.addAttribute(\"edit\", false);\n\t\t\t\n\t\t\treturn \"addNewModule\";\n\t\t}", "public void clickOnCreateButton() {\n\t\twaitForElement(createButton);\n\t\tclickOn(createButton);\n\t}", "public String newBoleta() {\n\t\tresetForm();\n\t\treturn \"/boleta/insert.xhtml\";\n\t}", "public void createActionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\n\t}", "public void createButtonClicked() {\n clearInputFieldStyle();\n setAllFieldsAndSliderDisabled(false);\n setButtonsDisabled(false, true, true);\n setDefaultValues();\n Storage.setSelectedRaceCar(null);\n }", "private void insertTemplateRow(Connection con,\n IdentifiedRecordTemplate template) throws SQLException {\n PreparedStatement insert = null;\n \n try {\n int internalId = getNextId(TEMPLATE_TABLE, \"templateId\");\n template.setInternalId(internalId);\n String externalId = template.getExternalId();\n String templateName = template.getTemplateName();\n \n insert = con.prepareStatement(INSERT_TEMPLATE);\n insert.setInt(1, internalId);\n insert.setString(2, externalId);\n insert.setString(3, templateName);\n insert.execute();\n } finally {\n DBUtil.close(insert);\n }\n }", "public void setTemplateId(int tmp) {\n this.templateId = tmp;\n }", "public Form getCreationForm() throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n return processModel.getPublicationForm(creation.getName(), currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_NO_CREATION_FORM\", e);\r\n }\r\n }", "public String addTemplate(Template template) {\r\n // Gets the events collection and the event as a document\r\n MongoCollection templates = mongoDB.getCollection(\"Templates\");\r\n Document obj = template.getTemplateAsDocument();\r\n\r\n // Inserts the event and sets the id of the event to the one given\r\n templates.insertOne(obj);\r\n template.setID(obj.getObjectId(\"_id\").toHexString());\r\n\r\n // Returns the id of the event\r\n return template.getID();\r\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 initContactCreation() {\n click(By.linkText(\"add new\"));\n //wd.findElement(By.linkText(\"add new\")).click();\n }", "@GetMapping(\"/service_requests/new\")\n public String newServiceRequest(Model model){\n String role = userService.getRole(userService.getCurrentUserName());\n model.addAttribute(\"role\", role);\n\n model.addAttribute(\"serviceRequest\", new ServiceRequest());\n\n return \"/forms/new_servicerequest.html\";\n }", "@GetMapping(\"/students/new\")\n\tpublic String createStudentForm(Model model) throws ParseException\n\t{\n\t\t\n\t\tStudent student=new Student(); //To hold form Data.\n\t\t\n\t\tmodel.addAttribute(\"student\",student);\n\t\t\n\t\t// go to create_student.html page\n\t\treturn \"create_student\";\n\t}", "public void createNewTeam(ActionEvent actionEvent) throws IOException {\n createTeamPane.setDisable(false);\n createTeamPane.setVisible(true);\n darkPane.setDisable(false);\n darkPane.setVisible(true);\n\n teamNameCreateField.setText(\"\");\n abbrevationCreateField.setText(\"\");\n chooseCityBoxCreate.getSelectionModel().clearSelection();\n chooseLeagueBoxCreate.getSelectionModel().clearSelection();\n chooseAgeGroupCreate.getSelectionModel().clearSelection();\n chooseLeagueTeamBoxCreate.getSelectionModel().clearSelection();\n\n chooseLeagueBoxCreate.setDisable(true);\n chooseLeagueTeamBoxCreate.setDisable(true);\n }", "java.lang.String getTemplateId();", "@RequestMapping(params = \"new\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String createProductForm(Model model) { \t\n \t\n\t\t//Security information\n\t\tmodel.addAttribute(\"admin\",security.isAdmin()); \n\t\tmodel.addAttribute(\"loggedUser\", security.getLoggedInUser());\n\t\t\n\t model.addAttribute(\"product\", new Product());\n\t return \"products/newProduct\";\n\t}", "private void creatingElements() {\n\t\ttf1 = new JTextField(20);\n\t\ttf2 = new JTextField(20);\n\t\ttf3 = new JTextField(20);\n\t\tJButton btn = new JButton(\"Add\");\n\t\tbtn.addActionListener(control);\n\t\tbtn.setActionCommand(\"add\");\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.add(tf1);\n\t\tpanel.add(tf2);\n\t\tpanel.add(btn);\n\t\tpanel.add(tf3);\n\t\t\n\t\tthis.add(panel);\n\t\t\n\t\tthis.validate();\n\t\tthis.repaint();\t\t\n\t\t\n\t}", "@GetMapping(\"/showFormForAdd\")\n\tpublic String showFormForAdd(Model theModel) {\n\t\tSkill theSkill = new Skill();\n\t\t\n\t\ttheModel.addAttribute(\"skill\", theSkill);\n\t\t\n\t\treturn \"skill-form\";\n\t}", "public void testBlogEntryTemplateAccessible() throws Exception {\n assertEquals(0, rootBlog.getBlogEntryTemplates().size());\n BlogEntry draft = rootBlog.getBlogForToday().createBlogEntry();\n draft.setType(BlogEntry.TEMPLATE);\n draft.store();\n assertEquals(1, rootBlog.getBlogEntryTemplates().size());\n assertEquals(draft, rootBlog.getBlogEntryTemplate(draft.getId()));\n }", "@Token(save = true, validate = false)\n @Execute\n public HtmlResponse createpage(final SuggestBadWordEditForm form) {\n form.initialize();\n form.crudMode = CrudMode.CREATE;\n return asHtml(path_AdminSuggestbadword_EditJsp);\n }", "public void setTemplateId(Long templateId) {\r\n this.templateId = templateId;\r\n }", "public void templateMetadataInsert(Long idTemplate,Long idFieldLib)\n\t{\t\n\t\tFieldsTemplateLibrary lib = new FieldsTemplateLibrary();\n\t\tlib.setId(idFieldLib);\n\t\t\t\t\n\t\tFieldsMappingMeta metadata = new FieldsMappingMeta();\n\t\tmetadata.setTemplateId(idTemplate);\n\t\tmetadata.setFieldsTemplateLibrary(lib);\n\t\t\n\t\tFieldsMappingMetaDAO metaDao = new FieldsMappingMetaDAO();\n\t\tmetaDao.saveNew(metadata);\n\t}", "public void transformTemplate(Template t)\n\t{\n\t\tList<String> mandatory_subjects = getMandatorySubjects();\n\t\t\n\t\t// display the constrained properties in the correct order\n\t\tfor (ConstrainedProperty property : getPositionedProperties())\n\t\t{\n\t\t\t// only show the CMF admin properties that can be edited\n\t\t\tif (!property.isEditable())\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tt.setValue(\"property\", property.getPropertyName());\n\n\t\t\tboolean\t\thandled = false;\n\t\t\tMimeType\tmimetype = property.getMimeType();\n\t\t\tif (mimetype != null)\n\t\t\t{\n\t\t\t\tif (!property.isAutoRetrieved())\n\t\t\t\t{\n\t\t\t\t\tif (0 == mimetype.toString().indexOf(\"image/\"))\n\t\t\t\t\t{\n\t\t\t\t\t\thandled = true;\n\t\t\t\t\t\tif (t.hasBlock(\"existing_field-legend\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tt.setBlock(\"existing_field-legend\", \"existing_field-legend\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tt.setBlock(\"existing_field\", \"existing_field-image\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (MimeType.RAW == mimetype)\n\t\t\t\t\t{\n\t\t\t\t\t\thandled = true;\n\t\t\t\t\t\tif (t.hasBlock(\"existing_field-legend\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tt.setBlock(\"existing_field-legend\", \"existing_field-legend\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tt.setBlock(\"existing_field\", \"existing_field-raw\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (mimetype == MimeType.APPLICATION_XHTML)\n\t\t\t\t\t{\n\t\t\t\t\t\thandled = true;\n\t\t\t\t\t\tt.setBlock(\"existing_field\", \"existing_field-xhtml\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (mimetype == MimeType.TEXT_PLAIN)\n\t\t\t\t\t{\n\t\t\t\t\t\thandled = true;\n\t\t\t\t\t\tt.setBlock(\"existing_field\", \"existing_field-text\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (!handled)\n\t\t\t{\n\t\t\t\tif (property.isUrl())\n\t\t\t\t{\n\t\t\t\t\tt.setBlock(\"existing_field\", \"existing_field-url\");\n\t\t\t\t}\n\t\t\t\telse if (property.isEmail())\n\t\t\t\t{\n\t\t\t\t\tt.setBlock(\"existing_field\", \"existing_field-email\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tt.setBlock(\"existing_field\", \"existing_field-generic\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tappendFormField(t, property, null, mandatory_subjects);\n\n\t\t\tif (t.hasBlock(\"existing_field-legend\"))\n\t\t\t{\n\t\t\t\tt.removeValue(\"existing_field-legend\");\n\t\t\t}\n\t\t}\n\n\t\t// handle the regular properties\n\t\tfor (String property_name : getRegularProperties())\n\t\t{\n\t\t\tappendFormField(t, null, property_name, mandatory_subjects);\n\t\t}\n\t}", "private void selectTemplatePanel(NewWorldTemplatePanel selectedTemplatePanel) {\n\t\temptyPanel.setSelected(false);\n\t\tbasicPanel.setSelected(false);\n\t\tislandPanel.setSelected(false);\n\t\tcompleteDemoPanel.setSelected(false);\n\t\tloadElementsPanel.setSelected(false);\n\t\tloadElementsTerrainPanel.setSelected(false);\n\t\tloadElementsAllNodesPanel.setSelected(false);\n\t\tloadFullSavePanel.setSelected(false);\n\t\t\n\t\tselectedTemplatePanel.setSelected(true);\n\t\ttemplate = selectedTemplatePanel.getTemplate();\n\t\twidthInputField.setEnable(template.getAskDimension());\n\t\theightInputField.setEnable(template.getAskDimension());\n\t}", "@GetMapping(\"/create\")\n public ModelAndView create(@ModelAttribute(\"form\") final CardCreateForm form) {\n return getCreateForm(form);\n }", "@Override\n\tpublic boolean create(NPC_tmpl obj) {\n\t\treturn false;\n\t}", "public PostPO clickOnNewPost() {\n\t\tnewPost.click();\n\t\treturn new PostPO();\n\t}", "public void createNewTask(View view) {\n try{\n newTaskLayout.checkTaskLayoutIsValid();\n ImageView taskImage = (ImageView) findViewById(R.id.imageViewBoard);\n String layoutImagePath = takeScreenshot(taskImage);\n newTaskLayout.setImagePath(layoutImagePath);\n\n // save new task\n HashMap<String, Integer> instructions = convertSpinnersToHashMap();\n Task newTask = new Task(newTaskLayout, instructions);\n Task.saveTask(getApplicationContext(), newTask);\n\n // alert user task created and return to task menu.\n Toast.makeText(this, \"new task created\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(getApplicationContext(), TaskOptionsActivity.class));\n } catch (TaskLayoutException | InstructionsRequiredException e) {\n // layout was not valid on insufficient instructions set.\n makeMessageDialogue(e.getMessage());\n }\n }", "public T prepareCreate(ActionEvent event) {\n T newItem;\n try {\n newItem = itemClass.newInstance();\n this.selected = newItem;\n initializeEmbeddableKey();\n return newItem;\n } catch (InstantiationException ex) {\n Logger.getLogger(AbstractController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n Logger.getLogger(AbstractController.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "protected void doNew() {\n\t\tgetRegisterView().clearTableSelection();\n\t\tclear();\n\t\tenableForm(true);\n\t\tgetForm().getButton(EDIT).setEnabled(false);\n\t\tgetForm().getField(CHECK_NUMBER).requestFocus();\n\t}", "public ProductCreate() {\n initComponents();\n }", "private void loadTemplate()\r\n {\r\n String key = list.getSelectedValue();\r\n if (key==null) return;\r\n \r\n String[][][] template = templates.getTemplate(key);\r\n clearComponents();\r\n \r\n \t definitionBox.setSelected(template[FormatData.t.D_HDR.ordinal()].length != 0);\r\n \t categoryBox.setSelected(template[FormatData.t.C_HDR.ordinal()].length != 0);\r\n \t exampleBox.setSelected(template[FormatData.t.E_HDR.ordinal()].length != 0);\r\n \r\n keyField.setText(key);\r\n int len; \r\n for (int i=0; i<template.length; i++)\r\n { \r\n \t len = (template[i].length < components[i].length) ? template[i].length : components[i].length;\r\n \t for (int j=0; j<len; j++)\r\n\t\t\t setComponentArray(components[i][j], template[i][j]);\r\n }\r\n }", "public void onSave(View view){\n saveTemplate(filename);\n Toast.makeText(this, \"Saved\", Toast.LENGTH_LONG).show();\n }", "public Long saveTemplate(Template template)\n\t{\n\t\tTemplateDAO dao = new TemplateDAO();\n\t\tdao.saveNew(template);\t\t\n\t\treturn template.getId();\n\t}", "private void sendCreateTemplateRequest(String templateName, List<Product> checkedProducts)\n {\n int loggedUserGroupID = GlobalValuesManager.getInstance(getContext()).getLoggedUserGroup().getID();\n\n // Create JSON POST request\n JSONObject params = new JSONObject();\n try {\n params.put(\"templateName\", templateName);\n params.put(\"groupID\", ((Integer) loggedUserGroupID).toString());\n JSONArray products = new JSONArray();\n\n for(int i = 0; i < checkedProducts.size(); i++)\n {\n products.put(i, checkedProducts.get(i).toJSON());\n }\n params.put(\"products\", products);\n\n // Create a template object for later\n createdTemplate = new Template(templateName, loggedUserGroupID, products);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n // Debug\n Log.d(\"TEMPLATE_CREATE\", params.toString());\n\n // Define what to do on server response\n setupCreateTemplateResponseHandler();\n\n // Send request\n TemplatesDatabaseHelper.sendCreateTemplateRequest(params, getContext(), createTemplateResponseHandler);\n\n }", "Page createPage();", "private void createNewListSection() {\n\t\tImageIcon image10 = new ImageIcon(sURLFCL1);\n\t\tImageIcon image11 = new ImageIcon(sURLFCL2);\n\t\tImageIcon image12 = new ImageIcon(sURLFCL3);\n\t\tjbCreateLists = new JButton(\"New PlayList\");\n\t\tjbCreateLists.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbCreateLists.setForeground(new Color(150,100,100));\n\t\tjbCreateLists.setIcon(image10);\n\t\tjbCreateLists.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbCreateLists.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbCreateLists.setRolloverIcon(image11);\n\t\tjbCreateLists.setRolloverSelectedIcon(image12);\t\n\t\tjbCreateLists.setContentAreaFilled(false);\n\t\tjbCreateLists.setFocusable(false);\n\t\tjbCreateLists.setBorderPainted(false);\n\t}", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "public void createNewSoundBoard() {\n\n dialogCreateSoundBoard = new Dialog(this);\n dialogCreateSoundBoard.setContentView(R.layout.soundboard_create);\n dialogCreateSoundBoard.setTitle(\"Create board\");\n dialogCreateSoundBoard.setCancelable(true);\n\n\n sbName = (EditText) dialogCreateSoundBoard.findViewById(R.id.textfieldcreatesoundboardname);\n sbName.setHint(\"Name\");\n Button createOkButton = (Button) dialogCreateSoundBoard.findViewById(R.id.createSoundBoardButton);\n createOkButton.setOnClickListener(createSoundBoardListener);\n\n Button createCancelButton = (Button) dialogCreateSoundBoard.findViewById(R.id.cancelSoundBoardButton);\n createCancelButton.setOnClickListener(cancelButtonCreateSoundBoardListener);\n\n dialogCreateSoundBoard.show();\n }", "private void createRowForNewStyleButton(Composite section)\n {\n buttonNewStyle = toolkit.createButton(section, \"New Style...\", SWT.PUSH); //$NON-NLS-1$\n buttonGridData(buttonNewStyle, SWT.TOP);\n buttonNewStyle.addSelectionListener(new SelectionListener()\n {\n public void widgetDefaultSelected(SelectionEvent e)\n {\n }\n\n public void widgetSelected(SelectionEvent e)\n {\n NewStylePopup dialog = new NewStylePopup(getShell(), documentFile, browser);\n if (dialog.open() == Dialog.OK)\n {\n if (dialog.getStyleInput() != null && dialog.getStyleInput().length() > 0)\n {\n // if the first field is not set\n if (valueToRecognizeReq == null)\n {\n valueToRecognizeReq = new Style(dialog.getStyleInput(), dialog.getRegexInput());\n reqIdComponent.setValueText(valueToRecognizeReq.getText());\n }\n else\n {\n tree.add(new Style(dialog.getStyleInput(), dialog.getRegexInput()));\n listFormat.refresh();\n }\n controller.removeDocumentType();\n updateWizard();\n }\n }\n }\n });\n }", "@Override\n public void createNewAccount(String accountType) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.create_container, new CreateAccount().newInstance(accountType)).commit();\n }" ]
[ "0.62653315", "0.61040473", "0.6032051", "0.60192853", "0.6018525", "0.5902557", "0.57984376", "0.57852805", "0.57460696", "0.5724709", "0.5719312", "0.570786", "0.567229", "0.56711423", "0.5666912", "0.56573266", "0.5627685", "0.5616768", "0.55521023", "0.5543524", "0.552618", "0.54814255", "0.54339755", "0.5424963", "0.5413735", "0.5412552", "0.5409688", "0.53921646", "0.53807306", "0.53764373", "0.5376107", "0.53387356", "0.53327465", "0.5319872", "0.5307024", "0.5305751", "0.52975035", "0.5292488", "0.5284571", "0.5253375", "0.5249809", "0.5245957", "0.52413154", "0.52410084", "0.5236941", "0.52256876", "0.52247334", "0.5218753", "0.5209771", "0.52061725", "0.5200891", "0.5188934", "0.51712865", "0.51677036", "0.5167198", "0.5164333", "0.5163348", "0.514365", "0.51390517", "0.51320595", "0.5125072", "0.5120841", "0.5117166", "0.51148087", "0.50980717", "0.5097454", "0.50953704", "0.5082505", "0.50736237", "0.5071389", "0.50696236", "0.5060033", "0.5052197", "0.50486875", "0.50442237", "0.50381994", "0.5037705", "0.5036705", "0.50309825", "0.50303817", "0.5030082", "0.50289875", "0.5028002", "0.5015552", "0.50121415", "0.50020164", "0.49971226", "0.49942067", "0.4989683", "0.49835572", "0.49832782", "0.49798885", "0.4976064", "0.49758184", "0.49696168", "0.49683738", "0.4963126", "0.4958751", "0.49567074", "0.49549818", "0.4954086" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") public Socket getSocket(){ return this.clientSocket; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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 .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public vpemesanan1() {\n initComponents();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\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.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\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.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\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\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\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.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\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\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\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.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\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.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\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.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\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.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\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\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\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\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\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\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\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.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\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.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\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.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\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(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\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.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\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(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\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(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\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.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\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(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\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.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.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(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.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(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.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(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.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(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.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.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\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\tGroupLayout.DEFAULT_SIZE,\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\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\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\tGroupLayout.PREFERRED_SIZE))\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\ttextField2, GroupLayout.PREFERRED_SIZE,\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\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\tGroupLayout.DEFAULT_SIZE,\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.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\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\tGroupLayout.DEFAULT_SIZE,\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.addComponent(label14,\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\tGroupLayout.DEFAULT_SIZE,\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.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\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\tGroupLayout.DEFAULT_SIZE,\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\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\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\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\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\tGroupLayout.DEFAULT_SIZE,\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.addComponent(textField10,\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\tGroupLayout.DEFAULT_SIZE,\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.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\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\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\t\t.addComponent(label22,\n\t\t\t\t\t\t\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\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\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\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\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\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\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\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\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\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\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\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\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\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.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\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.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.7319573", "0.72908455", "0.72908455", "0.72908455", "0.7286827", "0.7248724", "0.7213511", "0.7208325", "0.7195998", "0.7190202", "0.7184771", "0.7158966", "0.7147921", "0.7093225", "0.7080275", "0.7057302", "0.69875276", "0.6977057", "0.6955658", "0.6953942", "0.69454855", "0.6942884", "0.6935925", "0.69316167", "0.692865", "0.6925198", "0.69251573", "0.69119257", "0.6911172", "0.68930143", "0.68928415", "0.6890789", "0.6890435", "0.68890977", "0.68831456", "0.6881887", "0.68808997", "0.6878897", "0.6876147", "0.68747145", "0.6872147", "0.6859808", "0.6856282", "0.6855344", "0.68553185", "0.685469", "0.6853377", "0.68523794", "0.68523794", "0.68436074", "0.68373406", "0.6837167", "0.68286663", "0.68283236", "0.6826517", "0.682448", "0.6823606", "0.68170947", "0.6817084", "0.681006", "0.6809135", "0.68087894", "0.68084186", "0.68076634", "0.6802823", "0.6795054", "0.67939687", "0.67926705", "0.6791137", "0.6789317", "0.6788968", "0.6788417", "0.6782546", "0.67662394", "0.67658025", "0.6765246", "0.6756509", "0.67557156", "0.6752202", "0.6750687", "0.6742804", "0.6739344", "0.6736661", "0.67360824", "0.67333126", "0.6727312", "0.67265683", "0.6720307", "0.67165637", "0.67146873", "0.6714614", "0.67091054", "0.67075574", "0.6704629", "0.6700793", "0.6700504", "0.6699442", "0.6697844", "0.66946405", "0.66912174", "0.6690615" ]
0.0
-1
//GENEND:initComponents Method to request to view class information Method is called from within the Class search method
private void class_view(String classID) { try{ //send request to server given the class ID DataOutputStream outToServer = new DataOutputStream( clientSocket.getOutputStream()); outToServer.writeBytes("CINF " +classID+ '\n'); //print out the request System.out.println("CINF " +classID+ '\n'); //receive server response BufferedReader inFromServer = new BufferedReader( new InputStreamReader(clientSocket.getInputStream())); String response = inFromServer.readLine(); //parse the server response by spaces into an array String splitResponse [] = response.split(" "); //create a string made out of the first two array items to determine theresponse code String response_code = splitResponse[0]+" "+splitResponse[1]; //System.out.println(response); //enter a switch statement to determine how to respond switch(response_code){ case "CINR 0": //for every quotation set a marker, take the substrings within the markers and place them into responseVector //-2 is our null int left = -2; int right = -2; Vector<String> responseVector = new Vector<String>(); for(int i=0;i<response.length(); i++){ char c = response.charAt(i); if (c == '\"'){ if (left == -2){ left = i+1; } else{ right = i; responseVector.add(response.substring(left, right)); left = -2; right = -2; } } } //take the vector that was created and transfer the data into a new vector (redundant) that will be used to fill the table //the vector will be placed into a model that will then be placed into the DefaultTableModel defaultModel = (DefaultTableModel) class_viewTable.getModel(); Vector newRow = new Vector(); //Class ID newRow.add(responseVector.elementAt(0)); //Class Name newRow.add(responseVector.elementAt(1)); //Institution Name newRow.add(responseVector.elementAt(2)); //Professor newRow.add(responseVector.elementAt(3)); //Date and Time Row //add html tags for UI formatting String classTime = "<html>"; classTime = classTime+responseVector.elementAt(4); classTime = classTime + "</html>"; //~~~~Needed for Correct formating~~~~ classTime = classTime.replaceAll(",", "<br>"); classTime = classTime.replaceAll(" ", ""); newRow.add(classTime); //Add the rows to the model and place the model into the table defaultModel.addRow(newRow); class_viewTable.setModel(defaultModel); break; case "CINR 10": JOptionPane.showMessageDialog(null, "Error: Could not search classes :("); break; case "CINR 20": JOptionPane.showMessageDialog(null, "Error: User is not logged in :("); break; case "CINR 80": JOptionPane.showMessageDialog(null, "Error: Syntax error :("); break; default: JOptionPane.showMessageDialog(null, "Error: Syntax error :("); } } catch(Exception e){ JOptionPane.showMessageDialog(null, "Can't search"); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public search_package() {\n initComponents();\n }", "public void showClassPanel() {\r\n \t\tdialogFactory.getDialog(new jmodelClassesPanel(model, model), \"Manage User Classes\");\r\n \t}", "public insearch() {\n initComponents();\n }", "protected void showClass()\n {\n inspectorManager.getClassInspectorInstance(obj.getClassRef(), pkg, this);\n }", "public GUISearch() {\n initComponents();\n }", "public clientesagregarclass() {\n initComponents();\n }", "public SearchByName() {\n initComponents();\n }", "private void initComponent() {\n\t\tmlistview=(ClickLoadListview) findViewById(R.id.ListView_hidden_check);\n\t\tChemicals_directory_search=(CustomFAB) findViewById(R.id.company_hidden_search);\n\t\tChemicals_directory_search.setVisibility(View.GONE);\n\t\ttopbar_com_name=(TopBarView) findViewById(R.id.topbar_com_name);\n\t\tsearch_chemical_name=(SearchInfoView) findViewById(R.id.search_chemical_name);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n labelAppClasses = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n listAppClasses = new javax.swing.JList();\n labelScanning = new javax.swing.JLabel();\n\n setPreferredSize(new java.awt.Dimension(380, 300));\n setLayout(new java.awt.GridBagLayout());\n\n labelAppClasses.setLabelFor(listAppClasses);\n org.openide.awt.Mnemonics.setLocalizedText(labelAppClasses, org.openide.util.NbBundle.getMessage(JFXApplicationClassChooser.class, \"LBL_JFXApplicationClassChooser.labelAppClasses.text\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(10, 10, 2, 10);\n add(labelAppClasses, gridBagConstraints);\n labelAppClasses.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(JFXApplicationClassChooser.class, \"AN_JFXApplicationClassChooser.labelAppClasses.text\")); // NOI18N\n labelAppClasses.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JFXApplicationClassChooser.class, \"AD_JFXApplicationClassChooser.labelAppClasses.text\")); // NOI18N\n\n jScrollPane1.setViewportView(listAppClasses);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);\n add(jScrollPane1, gridBagConstraints);\n\n labelScanning.setFont(labelScanning.getFont().deriveFont((labelScanning.getFont().getStyle() | java.awt.Font.ITALIC), labelScanning.getFont().getSize()+1));\n labelScanning.setText(org.openide.util.NbBundle.getMessage(JFXApplicationClassChooser.class, \"LBL_ChooseMainClass_SCANNING_MESSAGE\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(3, 10, 0, 0);\n add(labelScanning, gridBagConstraints);\n labelScanning.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(JFXApplicationClassChooser.class, \"LBL_ChooseMainClass_SCANNING_MESSAGE\")); // NOI18N\n }", "public ViewClass() {\n\t\tcreateGUI();\n\t\taddComponentsToFrame();\n\t\taddActionListeners();\n\t}", "private SearchUI()\n\t{\n\t}", "public JPClassManager() {\n initComponents();\n\n setVisible(false);\n setBounds(0, 0, MainFrame.jPanelContent.getSize().width + 105, MainFrame.jPanelContent.getSize().height);\n\n jTableClass.setRowHeight(30);\n jTableClass.setShowGrid(true);\n jTableClass.setGridColor(new Color(102, 102, 102));\n\n fillData();\n }", "private void initComponents() {\r\n\r\n\t\tjLabel1 = new javax.swing.JLabel();\r\n\t\tjTextField1 = new javax.swing.JTextField();\r\n\t\tjScrollPane1 = new javax.swing.JScrollPane();\r\n\t\tjList1 = new javax.swing.JList();\r\n\t\tjScrollPane2 = new javax.swing.JScrollPane();\r\n\t\tjList2 = new javax.swing.JList();\r\n\t\tjLabel2 = new javax.swing.JLabel();\r\n\t\tjTextField2 = new javax.swing.JTextField();\r\n\t\tjLabel3 = new javax.swing.JLabel();\r\n\t\tjTextField3 = new javax.swing.JTextField();\r\n\t\tjButton1 = new javax.swing.JButton();\r\n\t\tjButton2 = new javax.swing.JButton();\r\n\t\tjButton3 = new javax.swing.JButton();\r\n\t\tjButton4 = new javax.swing.JButton();\r\n\t\tjButton5 = new javax.swing.JButton();\r\n\t\tjLabel4 = new javax.swing.JLabel();\r\n\t\tjLabel5 = new javax.swing.JLabel();\r\n\r\n\t\tsetDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r\n\r\n\t\tjLabel1.setText(\"输入类名进行检索,可使用通配符?和* \");\r\n\r\n\t\tjTextField1.setBackground(new java.awt.Color(255, 255, 255));\r\n\r\n\t\tjTextField1.getDocument().addDocumentListener(new DocumentListener() {\r\n\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\r\n\t\t\t\tjTextField1TextChanged(e);\r\n\t\t\t}\r\n\r\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\r\n\t\t\t\tjTextField1TextChanged(e);\r\n\t\t\t}\r\n\r\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\r\n\t\t\t\tjTextField1TextChanged(e);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\t// jScrollPane1.setBorder(null);\r\n\r\n\t\tjScrollPane1.setBorder(javax.swing.BorderFactory\r\n\t\t\t\t.createTitledBorder(\"类全名\"));\r\n\r\n\t\tjList1\r\n\t\t\t\t.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\r\n\t\t\t\t\tpublic void valueChanged(\r\n\t\t\t\t\t\t\tjavax.swing.event.ListSelectionEvent evt) {\r\n\t\t\t\t\t\tjList1ValueChanged(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tjList1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n\t\tjList1.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\r\n\t\tjScrollPane1.setViewportView(jList1);\r\n\r\n\t\t// jScrollPane2.setBorder(null);\r\n\r\n\t\tjScrollPane2.setBorder(javax.swing.BorderFactory\r\n\t\t\t\t.createTitledBorder(\"方法名\"));\r\n\r\n\t\tjList2\r\n\t\t\t\t.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\r\n\t\t\t\t\tpublic void valueChanged(\r\n\t\t\t\t\t\t\tjavax.swing.event.ListSelectionEvent evt) {\r\n\t\t\t\t\t\tjList2ValueChanged(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\tjList2.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\r\n\r\n\t\tjList2.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n\t\tjScrollPane2.setViewportView(jList2);\r\n\r\n\t\tjLabel2.setText(\"类名\");\r\n\r\n\t\tjLabel3.setText(\"方法名\");\r\n\r\n\t\tjButton1.setIcon(new javax.swing.ImageIcon(this.getClass().getResource(\r\n\t\t\t\t\"/it/businesslogic/ireport/plugin/newserverfile/docs.gif\"))); // NOI18N\r\n\t\tjButton1.addMouseListener(new java.awt.event.MouseAdapter() {\r\n\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent evt) {\r\n\t\t\t\tjButton1MouseClicked(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tjButton2.setText(\"关闭\");\r\n\t\tjButton2.addMouseListener(new java.awt.event.MouseAdapter() {\r\n\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent evt) {\r\n\t\t\t\tjButton2MouseClicked(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tjButton3.setText(\"确定\");\r\n\t\tjButton3.addMouseListener(new java.awt.event.MouseAdapter() {\r\n\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent evt) {\r\n\t\t\t\tjButton3MouseClicked(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tjButton4.setText(\"测试\");\r\n\t\tjButton4.addMouseListener(new java.awt.event.MouseAdapter() {\r\n\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent evt) {\r\n\t\t\t\tjButton4MouseClicked(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tjButton5.setText(\"重新建立索引\");\r\n\t\tjButton5.addMouseListener(new java.awt.event.MouseAdapter() {\r\n\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent evt) {\r\n\t\t\t\tjButton5MouseClicked(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tjLabel4.setText(\"\");\r\n\r\n\t\tjLabel5.setText(\"\");\r\n\r\n\t\torg.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(\r\n\t\t\t\tgetContentPane());\r\n\t\tgetContentPane().setLayout(layout);\r\n\t\tlayout\r\n\t\t\t\t.setHorizontalGroup(layout\r\n\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.LEADING)\r\n\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.LEADING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.TRAILING,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjScrollPane1,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t455,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.LayoutStyle.RELATED,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjScrollPane2,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t158,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjTextField1,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t619,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.LEADING,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfalse)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel3,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\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)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel2,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t48,\r\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))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.LayoutStyle.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.TRAILING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjTextField3,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t567,\r\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)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.LEADING,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjTextField2,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t567,\r\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)))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjButton1,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t24,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t88,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t88,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t88)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel5,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t263,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.LayoutStyle.UNRELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjButton4)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t57,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t57,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t57)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjButton3)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.LayoutStyle.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjButton2))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel1,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t116,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t195,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t195,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t195)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel4,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t178,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjButton5,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t112,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)))\r\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\r\n\t\tlayout\r\n\t\t\t\t.setVerticalGroup(layout\r\n\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.LEADING)\r\n\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.BASELINE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(jButton5)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(jLabel1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel4,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t19,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.LayoutStyle.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\tjTextField1,\r\n\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.LayoutStyle.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.LEADING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjScrollPane1,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t311,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjScrollPane2,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t311,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\r\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.LayoutStyle.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.BASELINE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel2,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjTextField2,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.LayoutStyle.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.BASELINE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel3,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjTextField3,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.LayoutStyle.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.TRAILING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(jButton1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torg.jdesktop.layout.GroupLayout.BASELINE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjButton2)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjButton3)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjButton4)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel5)))\r\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\r\n\r\n\t\tit.businesslogic.ireport.util.Misc.centerFrame(this);\r\n\t\tpack();\r\n\t}", "public SearchEntry() {\n initComponents();\n }", "public search_user() {\n initComponents();\n }", "public ViewInit() {\n initComponents();\n }", "Object getClass_();", "Object getClass_();", "public ClassesWindow(String cName) {\n \n initComponents();\n method();\n className.setText(cName);\n }", "private void initializeClasses() {\n navigator.addView(JournalView.NAME, JournalView.class);\n navigator.addView(MedicationView.NAME, MedicationView.class);\n\n }", "public LookUpPanel() {\n initComponents(); \n }", "public ViewProductInfo() {\n initComponents();\n }", "void updateClassComboBox()\n {\n target_dir = classCB.getSelectedItem().toString();\n \n if (target_dir == null) return;\n \n if (isProperClass(target_dir)) \n {\n clearSourceContents();\n MutationSystem.setJMutationPaths(target_dir);\n updateContents();\n } \n else\n {\n clearSourceContents();\n mList.setListData(new Vector());\n mList.repaint();\n showGeneratedMutantsNum(null);\n }\n this.repaint();\n }", "public ClassesInfoFragment() {\r\n }", "private void initializeComponents() {\n\t\tplantDAO = new PlantDAOStub();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tList<String> plantNames = plantDAO.getPlantNames();\r\n\t\t\tArrayAdapter<String> plantNamesAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_expandable_list_item_1, plantNames);\r\n\t\t\t\r\n\t\t\tactPlantName = (AutoCompleteTextView) findViewById(R.id.actPlantName);\r\n\t\t\t\r\n\t\t\tactPlantName.setAdapter(plantNamesAdapter);\r\n\t\t\t\r\n\t\t\tbtnPlantSearch = (Button) findViewById(R.id.btnSearchPlants);\r\n\t\t\t\r\n\t\t\tbtnPlantSearch.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\t\r\n\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\tinvokeResults();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\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\t\r\n\t\t\r\n\t}", "public ScrapeInfo() {\n initComponents();\n }", "public createclass() {\n initComponents();\n this.setLocationRelativeTo(null);\n getdata();\n }", "public void run() {\n\t\t\t\tshowMessage(\"Notes for 'Class Components Tree' view\", \n\t\t\t\t\t\t\"This view shows the components tree of the class that is selected in Model Explorer.\");\n//\t\t\t\t\t\t\t\"\\n\\nNote that arrays are not expanded.\");\n\t\t\t}", "public void setSearchClass(String searchClass) {\r\n this.searchClass = searchClass;\r\n }", "public SearchFrame(){//The main search frame which calls other methods\n\t\t/*Calling the methods intitialiseGUI and buildGUI*/\n\t\tintitialiseGUI();\n\t\tbuildGUI();\n\t}", "private void visitToSearch() {\n if (search_Attendance==null) {\n search_Attendance=new Search_Attendance();\n search_Attendance.setVisible(true);\n } else {\n search_Attendance.setVisible(true);\n }\n }", "private void initComponents() {\n\t\t\n\t}", "private void initComponents() {\n\t\t\n\t}", "public SearchDataView() {\n initComponents();\n }", "public DisputeSearchPanel() {\n initComponents();\n }", "private void cmdInfoClass(String classname) throws NoSystemException {\n MSystem system = system();\n MClass cls = system.model().getClass(classname);\n if (cls == null)\n Log.error(\"Class `\" + classname + \"' not found.\");\n else {\n MMVisitor v = new MMPrintVisitor(new PrintWriter(System.out, true));\n cls.processWithVisitor(v);\n int numObjects = system.state().objectsOfClass(cls).size();\n System.out.println(numObjects + \" object\"\n + ((numObjects == 1) ? \"\" : \"s\")\n + \" of this class in current state.\");\n }\n }", "private SearchBar() {\n controller = FilterController.getInstance();\n initComponents();\n createNewQueryPanel();\n }", "public ViewDataIn() {\n initComponents();\n }", "public PropertyClassificationPage() {\n initComponents();\n }", "public JTypeView() { }", "public SearchResultPanel()\n\t{\n\t\tcreateComponents();\n\t\tdesignComponents();\n\t\taddComponents();\n\t}", "void displayInnnerClass() {\r\n\t\tNestedClass nestedClassObj = new NestedClass();\r\n\t\tnestedClassObj.displayPrint();\r\n\t}", "public viewOpe() {\n initComponents();\n }", "void init() {\n txtClassname.getDocument().removeDocumentListener(syncTableDocL);\n txtTablename.getDocument().removeDocumentListener(syncClassDocL);\n txtDescription.getDocument().removeDocumentListener(syncClassDocL);\n txtPrimaryKeyfield.getDocument().removeDocumentListener(syncClassDocL);\n cidsClass = model.getCidsClass();\n initCboAttrPolicy();\n final DomainserverProject project = model.getProject();\n classTableModel = new ClassTableModel(project, cidsClass);\n tblAttr.setModel(classTableModel);\n final JXTable attrTable = (JXTable)tblAttr;\n attrTable.setSortOrder(0, SortOrder.ASCENDING);\n attrTable.setSortable(true);\n for (int i = 1; i < attrTable.getColumnCount(); ++i) {\n attrTable.getColumnExt(i).setSortable(false);\n }\n attrTable.getColumnExt(0).setVisible(false);\n retrieveAndSortTypes();\n final List<Icon> allIcons = new ArrayList<Icon>(project.getCidsDataObjectBackend().getAllEntities(Icon.class));\n Collections.sort(allIcons, new Comparators.Icons());\n cboClassIcons.setModel(new DefaultComboBoxModel(allIcons.toArray()));\n cboObjectIcons.setModel(new DefaultComboBoxModel(allIcons.toArray()));\n cboClassIcons.setRenderer(new Renderers.IconCellRenderer(project));\n cboObjectIcons.setRenderer(new Renderers.IconCellRenderer(project));\n if (cidsClass == null) {\n txtClassname.setText(\"\"); // NOI18N\n txtTablename.setText(\"\"); // NOI18N\n chkSync.setSelected(true);\n cboClassIcons.setSelectedIndex(0);\n cboObjectIcons.setSelectedIndex(0);\n txtPrimaryKeyfield.setText(\"ID\"); // NOI18N\n chkType.setEnabled(false);\n chkType.setSelected(true);\n chkIndexed.setSelected(false);\n txtDescription.setText(\"\"); // NOI18N\n } else {\n cboClassIcons.setSelectedItem(cidsClass.getClassIcon());\n cboObjectIcons.setSelectedItem(cidsClass.getObjectIcon());\n txtClassname.setText(cidsClass.getName());\n txtTablename.setText(cidsClass.getTableName());\n chkSync.setSelected(cidsClass.getName().equalsIgnoreCase(cidsClass.getTableName()));\n txtPrimaryKeyfield.setText(cidsClass.getPrimaryKeyField());\n cboObjectIcons.getSelectedItem();\n cboObjectIcons.getModel();\n chkType.setEnabled(false);\n chkType.setSelected(true);\n chkIndexed.setSelected((cidsClass.isIndexed() != null) && cidsClass.isIndexed());\n final String desc = cidsClass.getDescription();\n txtDescription.setText((desc == null) ? \"\" : desc); // NOI18N\n }\n this.cidsClass = classTableModel.getCidsClass();\n txtClassname.getDocument().addDocumentListener(syncTableDocL);\n txtTablename.getDocument().addDocumentListener(syncClassDocL);\n txtDescription.getDocument().addDocumentListener(syncClassDocL);\n txtPrimaryKeyfield.getDocument().addDocumentListener(syncClassDocL);\n syncTablename();\n classTableModel.setAttrSync(jtbAttrSync.isSelected());\n model.fireChangeEvent();\n tblAttr.getSelectionModel().clearSelection();\n }", "public SearchCard() {\n initComponents();\n }", "public ClassParametersPanel(Annotated propertiesClass) {\n initComponents();\n this.propertiesClass = propertiesClass;\n loadTableProperties(this.propertiesClass);\n\n }", "public BusinessClass() {\n initComponents();\n }", "public Newpat() {\n initComponents();\n }", "public String getSearchClass() {\r\n return searchClass;\r\n }", "String getViewClass();", "public update_and_search_vendor() {\n initComponents();\n }", "public resultview() {\n initComponents();\n }", "public FrmMainVIEW() {\n initComponents();\n }", "public SearchPage() {\n\t\tPageFactory.initElements(driver, this);\n\t\t\n\t}", "private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n beanTreeView1 = new org.openide.explorer.view.BeanTreeView();\n\n setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));\n\n beanTreeView1.setViewportBorder(javax.swing.BorderFactory.createEtchedBorder());\n beanTreeView1.setRootVisible(false);\n beanTreeView1.setUseSubstringInQuickSearch(false);\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(beanTreeView1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(beanTreeView1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 448, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n }", "public RechercheChefParClient() {\n initComponents();\n }", "public List<Models.Class> showClasses() {\n // Get from all levels\n List<Models.Class> results = em.createNativeQuery(\"select c.* from class c, classparticipant cpa, participant p where c.classid = cpa.classid and cpa.participantid = p.participantid and p.userid = ?\", Models.Class.class).setParameter(1, user.getUserid()).getResultList();\n\n // Display the output\n String output = \"\";\n\n output = addChat(results.size() + \" classes were found.\");\n\n for (Models.Class classroom : results) {\n output += \"<div class='result display' onclick=\\\"window.location.href='Class?id=\" + classroom.getClassid() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>CLASS</a>\\n\"\n + \" <a class='name'>\" + classroom.getClasstitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + classroom.getClassid() + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n return results;\n }", "public WAREHOUSE_DISPATCH_UI0002_DISPATCH_SCAN() {\n initComponents();\n }", "@Override\n\tpublic void InitView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "public SearchUI() {\n initComponents();\n initComponents2();\n }", "public SearchPage() {\n\t\tdoRender();\n\t}", "public void consulterClassement() {\n\t\t\n\t}", "public void editUserClasses() {\r\n \t\tdialogFactory.getDialog(new jmodelClassesPanel(model, model), \"Define customer classes\");\r\n \t}", "public AccountListView() {\r\n initComponents();\r\n \r\n }", "public FullDetails() {\n initComponents();\n }", "public void initializeClass();", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "public MendInformation() {\r\n \tinitComponents();\r\n }", "public companyview() {\n initComponents();\n }", "private void __setClassDescription() {\n\t\tEOClassDescription cd = EOClassDescription.classDescriptionForClass(getClass());\n\t\tif (cd == null) {\n\t\t\tthrow new IllegalStateException(\"Unabled to find an EOClassDescription for objects of \" + getClass());\n\t\t}\n\t\t__setClassDescription(cd);\n\t}", "public WAREHOUSE_DISPATCH_UI0002_DISPATCH_SCAN_JPANEL() {\n initComponents();\n }", "@Override\n\tpublic void findView() {\n\t\tinitUI();\n\t}", "public DirectSearchPanel(OntologyClass myOntologyClass) {\n this.myOntologyClass = myOntologyClass;\n initComponents();\n\n buildList();\n\n //Add key listener to the textfield\n searchField.addKeyListener(new KeyAdapter() {\n public void keyReleased(KeyEvent e) {\n //If the user delete by pressing backspace\n if (searchFieldLength > searchField.getText().length()) {\n componentsList.setModel(ingredientsListModel);\n filterList();\n } else {\n filterList();\n }\n }\n\n public void keyPressed(KeyEvent e) {\n searchFieldLength = searchField.getText().length();\n }\n });\n }", "@Override\n\tprotected void initView()\n\t{\n\n\t}", "public GUI_StudentInfo() {\n initComponents();\n }", "public SearchBook() {\n initComponents();\n SetIcon();\n }", "public TCDetailsView2() {\n initComponents();\n }", "public JoinClass() {\n initComponents();\n }", "public KIDSIndividualProblemsJPanel(final IRI ourClass){\n\t\t\tthis.ourClass = ourClass;\n\t\t\tthis.setLayout(new FlowLayout());\n\t\t\t//JSplitPane KIDSSplitPane = new JSplitPane();\n\t\t\t//this.add(KIDSSplitPane);\n\t\t\n\t\t\tJScrollPane IndividualScrollPane = new JScrollPane();\n\t\t\tIndividualScrollPane.setPreferredSize(new Dimension(300,300));\n\t\t\tIndividualScrollPane.setMinimumSize(new Dimension(300,300));\n\t\t\tthis.add(IndividualScrollPane);\n\t\t\t//KIDSSplitPane.setLeftComponent(IndividualScrollPane);\n\t\t\n\t\t\tfinal DefaultListModel<KIDSUIComponent> individualJListModel = new DefaultListModel<KIDSUIComponent>();\n\t\t\tfinal JList<KIDSUIComponent> IndividualJList = new JList<KIDSUIComponent>(individualJListModel);\n\t\t\tIndividualJList.addMouseListener(new MouseAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mousePressed(MouseEvent e) {\n\n\t\t\t\t\tlogme.debug(String.format(\"Mouse button %d clicked in IndividualJList.\", e.getButton()));\n\n\t\t\t\t\t// Only respond to right-clicks\n\t\t\t\t\tif (e.getButton() == MouseEvent.BUTTON3){\n\t\t\t\t\t\n\t\t\t\t\t\t// First, get the JList item that was clicked, if any:\n\t\t\t\t\t\tint index = IndividualJList.locationToIndex(e.getPoint());\n\t\t\t\t\t\tlogme.debug(String.format(\"Mouse clicked on menu item index %d.\", index));\n\t\t\t\t\t\tif (index > -1 && IndividualJList.getCellBounds(index, index).contains(e.getPoint())){\n\t\t\t\t\t\t\tfinal KIDSUIComponent ourComponent = individualJListModel.getElementAt(index);\n\t\t\t\t\t\t\tlogme.debug(String.format(\"Loading menu for individual %s\", ourComponent));\n\t\t\t\t\t\t\tJPopupMenu getIndividualInfoPopupMenu = new JPopupMenu();\n\t\t\t\t\t\t\tJMenuItem getInfo = new JMenuItem(\"Get details...\");\n\t\t\t\t\t\t\tgetIndividualInfoPopupMenu.add(getInfo);\n\n\t\t\t\t\t\t\tgetInfo.addActionListener(new ActionListener(){\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t\t\t// Popup a dialog displaying the details of the individual\n\t\t\t\t\t\t\t\t\tlogme.debug(String.format(\"Generating details for component %s\", ourComponent));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Get class membership\n\n\t\t\t\t\t\t\t\t\t// Get object properties\n\n\t\t\t\t\t\t\t\t\t// Get data properties\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Get problems\n\n\t\t\t\t\t\t\t\t\tprocessMessageQueue();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tJMenu addRelation = new JMenu(\"Add relation ...\");\n\t\t\t\t\t\t\tgetIndividualInfoPopupMenu.add(addRelation);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tList <KIDSUIRelation> itemRelations = ourComponent.getRelations();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (final KIDSUIRelation kur : itemRelations){\n\t\t\t\t\t\t\t\tJMenu ouritem = new JMenu(String.format(\"Add %s ...\", kur.getRelationIRI().getShortForm()));\n\t\t\t\t\t\t\t\tif (kur.getType() == RelationType.Data){\n\t\t\t\t\t\t\t\t\tfinal KIDSUIDataRelationComponent kdr = (KIDSUIDataRelationComponent)kur;\n\t\t\t\t\t\t\t\t\tJMenuItem dataitem = new JMenuItem(String.format(\n\t\t\t\t\t\t\t\t\t\t\t\"New %s data\", kdr.getDatatypeClass()));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t dataitem.addActionListener(new ActionListener(){\n\t\t\t\t\t\t\t\t \t@Override\n\t\t\t\t\t\t\t\t\t \tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\t\t\t\t \t// Load the component:\n\t\t\t\t\t\t\t\t\t\t \ttry {\n\t\t\t\t\t\t\t\t\t\t \t KIDSAddDataJDialog ourDialog = \n\t\t\t\t\t\t\t\t\t\t\t\tcontroller.getAddDataValueDialogForClass(\n\t\t\t\t\t\t\t\t\t\t\t\t kdr.getDatatypeClass(), frame, \n\t\t\t\t\t\t\t\t\t\t\t\t\tkdr.getSubjectIRI(), kdr.getRelationIRI());\n\t\t\t\t\t\t\t\t\t\t\t\tif (ourDialog == null){\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontroller.logappendError(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString.format(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Could not load dialog to add individual of class %s.\",ourClass));\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t \t \t// Open a JDialog which prompts for TBOX location, IRI, and desired ABOX IRI; initiate a new ABOX\n\t\t\t\t\t\t\t\t\t\t \t \tourDialog.setModal(true);\n\t\t\t\t\t\t\t\t\t\t \t \tourDialog.setVisible(true);\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t \t \t// We need the IRI back from the dialog:\n\t\t\t\t\t\t\t\t\t\t \t \tString data = ourDialog.getAddedData();\n\t\t\t\t\t\t\t\t\t\t \t controller.addDataValueForIndividual(kdr.getRelationIRI(), \n\t\t\t\t\t\t\t\t\t\t \t \t\tkdr.getSubjectIRI(), data);\n\t\t\t\t\t\t\t\t\t\t \t controller.logappendInfo(String.format(\n\t\t\t\t\t\t\t\t\t\t \t \t\t \"Added relation (%s, %s, %s)\", \n\t\t\t\t\t\t\t\t\t\t \t \t\t kdr.getSubjectIRI(),\n\t\t\t\t\t\t\t\t\t\t \t \t\t kdr.getRelationIRI(),\n\t\t\t\t\t\t\t\t\t\t \t \t\t data));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t \t} catch (InstantiationException | IllegalAccessException e1) {\n\t\t\t\t\t\t\t\t\t\t\t \tcontroller.logappend(new KIDSGUIAlertError(\n\t\t\t\t\t\t\t\t\t\t\t\t \tString.format(\"Could not load dialog for %s\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkur.getRelationIRI())));\n\t\t\t\t\t\t\t\t\t\t\t \tlogme.error(e1.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t \te1.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t \t} finally {\n\t\t\t\t\t\t\t\t\t\t\t \tprocessMessageQueue();\n\t\t\t\t\t\t\t\t\t\t \t}\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\t} else if (kur.getType() == RelationType.Object){\n\t\t\t\t\t\t\t\t\tfinal KIDSUIObjectRelationComponent kdr = (KIDSUIObjectRelationComponent) kur;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tSet<KIDSUIComponent> candidates = controller.getKnownIndividuals(kdr.getObjectClass());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor (final KIDSUIComponent c : candidates){\n\t\t\t\t\t\t\t\t\t\tJMenuItem dataitem = new JMenuItem(String.format(\n\t\t\t\t\t\t\t\t\t\t\t\"%s\", c.getIRI()));\n\t\t\t\t\t\t\t\t\t\tdataitem.addActionListener(new ActionListener(){\n\t\t\t\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\t\t\t\t\t\tcontroller.addRelation(kdr.getSubjectIRI(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkdr.getRelationIRI(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.getIRI());\n\t\t\t\t\t\t\t\t\t\t\t\tcontroller.logappendInfo(String.format(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Added relation (%s, %s, %s)\", \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkdr.getSubjectIRI(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkdr.getRelationIRI(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.getIRI()));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\touritem.add(dataitem);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tJMenuItem dataitem = new JMenuItem(String.format(\n\t\t\t\t\t\t\t\t\t\t\t\"New %s instance...\", kdr.getObjectClass().getShortForm()));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t dataitem.addActionListener(new ActionListener(){\n\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t \tpublic void actionPerformed(ActionEvent e){\n\n\t\t\t\t\t\t\t\t \t\ttry {\n\t\t\t\t\t\t\t\t\t\t \t\tKIDSAddIndividualJDialog ourDialog = \n\t\t\t\t\t\t\t\t\t\t\t \t\tcontroller.getAddInstanceDialogForClass(\n\t\t\t\t\t\t\t\t\t\t\t\t \t\tkdr.getObjectClass(),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\tframe);\n\t\t\t\t\t\t\t\t\t\t \t\tif (ourDialog == null){\n\t\t\t\t\t\t\t\t\t\t\t \t\tcontroller.logappendError(\n\t\t\t\t\t\t\t\t\t\t\t\t \t\tString.format(\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\"Could not load dialog to add individual of class %s.\",ourClass));\n\t\t\t\t\t\t\t\t\t\t \t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t \t\t// Open a JDialog which prompts for TBOX location, IRI, and desired ABOX IRI; initiate a new ABOX\n\t\t\t\t\t\t\t\t\t\t\t \t\tourDialog.setModal(true);\n\t\t\t\t\t\t\t\t\t\t\t \t\tourDialog.setVisible(true);\n\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t\t\t\t\t \t\t// We need the IRI back from the dialog:\n\t\t\t\t\t\t\t\t\t\t\t \t\tIRI object = ourDialog.getAddedElementIRI();\n\t\t\t\t\t\t\t\t\t\t\t \t\tcontroller.addRelation(kdr.getSubjectIRI(), \n\t\t\t\t\t\t\t\t\t\t \t \t\tkdr.getRelationIRI(), object);\n\t\t\t\t\t\t\t\t\t\t\t \t\tcontroller.logappendInfo(String.format(\n\t\t\t\t\t\t\t\t\t\t \t\t \t\t\"Added relation (%s, %s, %s)\", \n\t\t\t\t\t\t\t\t\t\t \t\t \t\tkdr.getSubjectIRI(),\n\t\t\t\t\t\t\t\t\t\t \t\t \t\tkdr.getRelationIRI(),\n\t\t\t\t\t\t\t\t\t\t \t\t \t\tobject));\n\t\t\t\t\t\t\t\t\t\t \t\t}\n\t\t\t\t\t\t\t\t\t \t\t} catch (InstantiationException | IllegalAccessException e1) {\n\t\t\t\t\t\t\t\t\t\t \t\tcontroller.logappend(new KIDSGUIAlertError(\n\t\t\t\t\t\t\t\t\t\t\t\t \t\tString.format(\"Could not load dialog for %s\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\tkur.getRelationIRI())));\n\t\t\t\t\t\t\t\t\t\t \t\tlogme.error(e1.getMessage());\n\t\t\t\t\t\t\t\t\t\t \t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t\t \t\t} finally {\n\t\t\t\t\t\t\t\t\t\t \t\tprocessMessageQueue();\n\t\t\t\t\t\t\t\t\t \t\t}\n\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t \t});\n\t\t\t\t\t\t\t\taddRelation.add(ouritem);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgetIndividualInfoPopupMenu.show(e.getComponent(), e.getX(), e.getY());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Clicked on an empty area; build a popup menu to add a new Individual:\n\t\t\t\t\t\t\tJPopupMenu newIndividualPopupMenu = new JPopupMenu();\n\t\t\t\t\t\t\tJMenuItem newIndividual = new JMenuItem(\"Add new...\");\n\t\t\t\t\t\t\tnewIndividualPopupMenu.add(newIndividual);\n\t\t\t\t\t\t\tlogme.debug(String.format(\"Loading menu to add a new %s\",ourClass));\n\t\t\t\t\t\t\tnewIndividual.addActionListener(new ActionListener(){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\t\t\t// Trigger the appropriate new Individual dialog:\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tKIDSAddIndividualJDialog addOne = controller.getAddInstanceDialogForClass(ourClass, frame);\n\n\t\t\t\t\t\t\t\t\t\tif (addOne == null){\n\t\t\t\t\t\t\t\t\t\t\tcontroller.logappendError(\n\t\t\t\t\t\t\t\t\t\t\t\tString.format(\n\t\t\t\t\t\t\t\t\t\t\t\t\"Could not load dialog to add individual of class %s.\",ourClass));\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t \t// Open a JDialog which prompts for TBOX location, IRI, and desired ABOX IRI; initiate a new ABOX\n\t\t\t\t\t\t\t\t\t \taddOne.setModal(true);\n\t\t\t\t\t\t\t\t\t \taddOne.setVisible(true);\n\t\t\t\n\t\t\t\t\t\t\t\t\t \t// We need the data back from the dialog:\n\t\t\t\t\t\t\t\t\t \tIRI newIndividual = addOne.getAddedElementIRI();\n\n\t\t\t\t\t\t\t\t\t \t// Add via the controller:\n\t\t\t\t\t\t\t\t\t \tcontroller.addIndividual(newIndividual, ourClass);\n\t\t\t\t\t\t\t\t\t \tcontroller.logappendInfo(String.format(\"Added individual %s to class %s\", \n\t\t\t\t\t\t\t\t\t \t\t\tnewIndividual,\n\t\t\t\t\t\t\t\t\t \t\t\tourClass));\n\t\t\t\t\t\t\t\t\t} catch (InstantiationException e1) {\n\t\t\t\t\t\t\t\t\t\tcontroller.logappend(new KIDSGUIAlertError(\n\t\t\t\t\t\t\t\t\t\t\tString.format(\"Could not load dialog listed for %s\",ourClass)\n\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\tlogme.error(e1.getMessage());\n\t\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t} catch (IllegalAccessException e1) {\n\t\t\t\t\t\t\t\t\t\tcontroller.logappend(new KIDSGUIAlertError(\n\t\t\t\t\t\t\t\t\t\t\tString.format(\"Could not access dialog class for %s\",ourClass)\n\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\tlogme.error(e1.getMessage());\n\t\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\t\tprocessMessageQueue();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tnewIndividualPopupMenu.show(e.getComponent(), e.getX(), e.getY());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tcontroller.addIndividualAddedListener(new AddEventListener(){\n\t\t\t\t@Override\n\t\t\t\tpublic void newEventReceived(IRI ind) {\n\t\t\t\t\tlogme.debug(String.format(\"Received individual added event; repopulating list for class %s\", ourClass));\n\t\t\t\t\trepopulateList(individualJListModel);\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontroller.addOntologyModifiedListener(new OntologyModifiedListener(){\n\t\t\t\t@Override\n\t\t\t\tpublic void ontologyModified(KIDSGUIOracle o){\n\t\t\t\t\t// Get list of known events from ontology and populate our model:\n\t\t\t\t\tlogme.debug(String.format(\"Received ontology modified event; repopulating list for class %s\", ourClass));\n\t\t\t\t\trepopulateList(individualJListModel);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tIndividualScrollPane.setViewportView(IndividualJList);\n\t\t\n\t\t\tKIDSProblemsJScrollPane ProblemScrollPane = \n\t\t\t\tnew KIDSProblemsJScrollPane(IndividualJList);\n\t\t\tProblemScrollPane.setPreferredSize(new Dimension(300,300));\n\t\t\tProblemScrollPane.setMinimumSize(new Dimension(300,300));\n\t\t\tthis.add(ProblemScrollPane);\n\t\t\t//KIDSSplitPane.setRightComponent(ProblemScrollPane);\n\t\t\t\n\t\t\tKIDSComponentDetailsJScrollPane DetailsScrollPane = \n\t\t\t\t\tnew KIDSComponentDetailsJScrollPane(IndividualJList);\n\t\t\tDetailsScrollPane.setPreferredSize(new Dimension(300,300));\n\t\t\tDetailsScrollPane.setMinimumSize(new Dimension(300,300));\n\t\t\tthis.add(DetailsScrollPane);\n\t\t\t//KIDSSplitPane.add(DetailsScrollPane);\n\t\t\n\t\t\t/**\n\t\t\t// Someday we may want to put this back\n\t\t\tJTree EventModelTree = new JTree();\n\t\t\tEventModelTree.setModel(new DefaultTreeModel(\n\t\t\t\tnew DefaultMutableTreeNode(\"Event\") {\n\t\t\t\t\t{\n\t\t\t\t\tDefaultMutableTreeNode node_1;\n\t\t\t\t\tnode_1 = new DefaultMutableTreeNode(\"Required Components\");\n\t\t\t\t\t\tnode_1.add(new DefaultMutableTreeNode(\"Signals\"));\n\t\t\t\t\tadd(node_1);\n\t\t\t\t\tnode_1 = new DefaultMutableTreeNode(\"Inferred Relations\");\n\t\t\t\t\t\tnode_1.add(new DefaultMutableTreeNode(\"Evaluated In Dataset\"));\n\t\t\t\t\t\tnode_1.add(new DefaultMutableTreeNode(\"Represented In Dataset\"));\n\t\t\t\t\t\tnode_1.add(new DefaultMutableTreeNode(\"Affected By Response\"));\n\t\t\t\t\t\tnode_1.add(new DefaultMutableTreeNode(\"Included In Dataset Label\"));\n\t\t\t\t\tadd(node_1);\n\t\t\t\t\tadd(new DefaultMutableTreeNode(\"Class Membership\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t));\n\t\t\tEventModelScrollPane.setViewportView(EventModelTree);\n\t\t\t*/\n\t\t\t\n\t\t}", "public GetAdminClassServlet() {\n\t\tsuper();\n\t}", "public void setClassName(String className) { this.className=className; }", "public pnl_DocGia() {\n initComponents();\n }", "public CSearchUserPanel() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle resourceBundle) {\n String class_id = \"c123\";\n Class s_class = new Class(class_id);\n String[] courses = s_class.getClasses();\n for(int i=0; i<courses.length;i++) {\n list_id.getItems().add(courses[i]);\n }\n list_id.setPrefHeight(courses.length*41);\n }", "public Display() {\n initComponents();\n }", "public String getClassName () { return _className; }", "private void flds_classnameKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_flds_classnameKeyReleased\r\n // only update if class is changed..\r\n if (!AddSubApp.getClassName().equals(this.flds_classname.getText()) ){\r\n AddSubApp.setClassName(this.flds_classname.getText());\r\n /* updatint textbox for info display*/\r\n if (this.btn_constructor.isSelected()){\r\n this.flds_tb.setText(AddSubApp.getConstructorsText());\r\n }\r\n else if (this.btn_fields.isSelected()){\r\n this.flds_tb.setText(AddSubApp.getFieldsText());\r\n }\r\n else if (this.btn_methods.isSelected()){\r\n this.flds_tb.setText(AddSubApp.getMethodsText());\r\n }\r\n }\r\n }", "public RegisterDisplay() {\n initComponents();\n }", "public indexing() {\n initComponents();\n }", "public SeeAnAccount() {\n initComponents();\n }", "public pnlHome() {\n initComponents();\n }", "@Override\n protected void initView() {\n }", "@Override\n protected void initView() {\n }", "public Content_p7() {\n initComponents();\n }", "public View() {\n initComponents();\n }", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "public void initComponents();", "public static void displayClassInfo(Class clazz, StringBuffer results)\n {\n // Print out some codebase info for the ProbeHome\n ClassLoader cl = clazz.getClassLoader();\n results.append(\"\\n\"+clazz.getName()+\".ClassLoader=\"+cl);\n ClassLoader parent = cl;\n while( parent != null )\n {\n results.append(\"\\n..\"+parent);\n URL[] urls = getClassLoaderURLs(parent);\n int length = urls != null ? urls.length : 0;\n for(int u = 0; u < length; u ++)\n {\n results.append(\"\\n....\"+urls[u]);\n }\n if( parent != null )\n parent = parent.getParent();\n }\n CodeSource clazzCS = clazz.getProtectionDomain().getCodeSource();\n if( clazzCS != null )\n results.append(\"\\n++++CodeSource: \"+clazzCS);\n else\n results.append(\"\\n++++Null CodeSource\");\n\n results.append(\"\\nImplemented Interfaces:\");\n Class[] ifaces = clazz.getInterfaces();\n for(int i = 0; i < ifaces.length; i ++)\n {\n results.append(\"\\n++\"+ifaces[i]);\n ClassLoader loader = ifaces[i].getClassLoader();\n results.append(\"\\n++++ClassLoader: \"+loader);\n ProtectionDomain pd = ifaces[i].getProtectionDomain();\n CodeSource cs = pd.getCodeSource();\n if( cs != null )\n results.append(\"\\n++++CodeSource: \"+cs);\n else\n results.append(\"\\n++++Null CodeSource\");\n }\n }" ]
[ "0.67069936", "0.6661765", "0.62983876", "0.62405217", "0.62095237", "0.61047435", "0.61004865", "0.606125", "0.6056293", "0.60317874", "0.59780663", "0.5947569", "0.5947547", "0.5927118", "0.5925775", "0.5893845", "0.5889247", "0.5889247", "0.5880747", "0.5865224", "0.58564407", "0.5854148", "0.5842467", "0.58328587", "0.58145714", "0.58113927", "0.5803095", "0.5802654", "0.5767707", "0.5758444", "0.5742591", "0.5697247", "0.5697247", "0.56967413", "0.5695546", "0.569083", "0.56669974", "0.5647583", "0.56449604", "0.56351715", "0.5632874", "0.56191075", "0.5613588", "0.55955166", "0.55845815", "0.5581774", "0.5563253", "0.5561769", "0.55549353", "0.55543554", "0.55525076", "0.5550146", "0.55363804", "0.55150384", "0.54913807", "0.5491129", "0.5490556", "0.54819494", "0.54743725", "0.54714584", "0.54714584", "0.54694647", "0.54655993", "0.54644036", "0.5463778", "0.54609334", "0.54591227", "0.5454802", "0.54545134", "0.54545134", "0.54542094", "0.5451663", "0.5451148", "0.54424816", "0.5435967", "0.5425505", "0.542237", "0.5420356", "0.5408088", "0.5400883", "0.5387754", "0.53862906", "0.538033", "0.5375729", "0.5373729", "0.5369418", "0.5367649", "0.5354615", "0.5353282", "0.5348435", "0.53465366", "0.53453493", "0.5341311", "0.53395927", "0.5339243", "0.5339243", "0.5337359", "0.53361213", "0.5321965", "0.53219175", "0.53210986" ]
0.0
-1
new SA_Main().setVisible(false); new SA_Launcher().setVisible(true);
public void run() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void show() {\n mainFrame.setVisible(true);\r\n\t}", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n new MainMenu().setVisible(true);\n dispose();\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tnew mainclass().setVisible(true);\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\r\n\t \t\t obj.setVisible(false);\r\n\t setMain();\r\n\t \t }", "public void showMainMenu() {\r\n\t\tmenu.setThreadSuspended(false);\r\n\t\tmenu.setVisible(true);\r\n\t\tsetVisible(false);\r\n\t\tsetVisible(true);\r\n\t}", "public void setVisible(){\n frame.setVisible(true);\n }", "public void launch(boolean showHide){\n\t\tvisibility = showHide;\t\n\t\tSetupWindow(visibility);\n\t\n\t}", "public void start() {\n\t\t setVisible(true);\n\t}", "public void launchMainScreen() {\n\t\tmainWindow = new MainGameScreen(this);\n\t}", "public void ver() {\n\t\tthis.setVisible(true);\n\t}", "private void BacktoMainActionPerformed(java.awt.event.ActionEvent evt) {\n new Machines().setVisible(true);\n }", "public void makeVisible()\n {\n wall.makeVisible();\n roof.makeVisible();\n window.makeVisible();\n }", "public void showIt(){\n this.setVisible(true);\n }", "@Override\r\n public void onGameStart(){\r\n this.setVisible(false);\r\n }", "public void setVisible()\n\t{\n\t\tMainController.getInstance().setVisible(name, true);\n\t}", "public void showWindows() {\n\t\t pack();\n\t setResizable(false);\n\t setLocationRelativeTo(null);\n\t setVisible(true);\n\t\t\n\t}", "public void show(){\n frame.setVisible(true);\n }", "public static void hideSplashScreen() {//todo: is this useful ?????.....\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n if (splashScreen != null) {\n splashScreen.setVisible(false);\n splashScreen.dispose();\n }\n }\n });\n }", "public void display() {\r\n\t\tsetVisible(true);\r\n\t}", "public void ifWin() {\n WinMenu.setVisible(true);\n }", "void init() {\n setVisible(true);\n\n }", "public void routetopage() {\n this.setVisible(true);\n }", "public void windowBecameFront() \n {\n return; \n }", "@Override\n public void run() {\n \n Admision main = new Admision();\n main.setExtendedState(MAXIMIZED_BOTH);\n main.setVisible(true);\n\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t jw.setVisible(false);\n\t\t\t\t\t\t frame.setVisible(true);\n\t\t\t\t\t}", "public void launch() {\n m_frame.pack();\n m_frame.setVisible(true);\n }", "public NewJFrame() {\n initComponents();\n // HidenLable.setVisible(false);\n }", "public void factoryMainScreen()\n\t{\n\t\t\n\t}", "public void go() {\n\t\tjfad.setVisible(true);\n\t}", "public static void main(String[] args) {\n Calc bt = new Calc();\r\n bt.setVisible(true); \r\n}", "public void prepareGame2() {\r\n\t\tJFrame obj = new JFrame(\"World 2\");\r\n JButton b3 = new JButton(\"Main Menu\");\r\n JLabel image = new JLabel(new ImageIcon(\"C:\\\\Users\\\\eldaly\\\\Downloads\\\\xqc.jpg\"));\r\n image.setBounds(0,0, 1600, 1400);\r\n obj.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n obj.add(image);\r\n b3.setBounds(0,0, 100, 40);\r\n image.add(b3);\r\n add(new Board());\r\n obj.setVisible(true);\r\n b3.addActionListener(new ActionListener() {\r\n\t //When button is pressed close main window and create a game window\r\n\t \t public void actionPerformed(ActionEvent e) {\r\n\t \t\t obj.setVisible(false);\r\n\t setMain();\r\n\t \t }\r\n\t });\r\n \r\n\t }", "public Home() {\n initComponents();\n ShowLauncher();\n }", "public void display() {\n\t\tthis.setVisible(true);\n\t}", "public void setWindowVisible()\n {\n lobbyWindowFrame.setVisible(true);\n }", "public void turnOn(){\r\n\t\r\n\tframe.setVisible(true);\r\n\tframe.setResizable(false);\r\n }", "void run() {\n pack();\n setVisible(true);\n }", "public void actionPerformed(ActionEvent e) \n {\n resultFrame.setVisible(false);\n starterFrame.setVisible(true);\n }", "public main() {\n initComponents();\n\n Timer();\n\n this.addKeyListener(this);\n this.setExtendedState(MAXIMIZED_BOTH);\n\n loader();\n this.jDialog11.setLocationRelativeTo(this.jDesktopPane);\n this.jDialog11.setVisible(true);\n//pantallaResolucion();\n\n }", "public void actionPerformed(ActionEvent arg0) \n\t\t\t{\n\t\t\t\tMainMenu main = new MainMenu();\n\t\t\t\tmain.frame.setVisible(true);\n\t\t\t\tsetVisible(false); \n\t\t\t\tdispose(); \n\t\t\t}", "private void backActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backActionPerformed\n this.setVisible(false);\n MainMenu.adminMainMenu.setVisible(true);\n}", "public void show(){\n frame.setContentPane(mainPanel); //puts all our buttons and other objects on the window\n frame.setSize(700, 500);\n frame.setLocationRelativeTo(null); //opens our window in the center of the screen\n frame.setResizable(false);\n frame.setVisible(true); //displays the window\n }", "public void show() {\n frame.setVisible(true);\n }", "private void Exit() {\r\n this.dispose();\r\n app.setVisible(true);\r\n }", "public JFramePrincipal() {\n initComponents();\n jButtonCerrarSesion.setVisible(false);\n \n \n \n }", "public void setVisible()\r\n\t{\r\n\t\tthis.setVisible(true);\r\n\t}", "public static void Start(){\r\n\t\t// gets rid of JPanel flickering on some computers (like my windows XP)\r\n\t\tSystem.setProperty(\"sun.awt.noerasebackground\", \"true\");\r\n\t\t\r\n\t\t// TODO: add window's icon\r\n\t\tframe = new JFrame(\"Helix\");\r\n\t\t//JFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Choose lookAndFeel that is closest to the OS you are using.\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t\t//UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.motif.MotifLookAndFeel\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t// Create the main menu bar\r\n\t\tsetMenu(getDefaultMenu());\r\n\t\t//frame.setVisible(true);\r\n\t\t\r\n\t\tframe.setMinimumSize(new Dimension(400, 300));\r\n\t\t\r\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\t\r\n\t\tDimension setDimension = new Dimension(400, 300);\r\n\t\twhile(screenSize.width > setDimension.width && screenSize.height > setDimension.height + 400){\r\n\t\t\tsetDimension.width += 400;\r\n\t\t\tsetDimension.height += 300;\r\n\t\t}\r\n\t\tframe.setSize(setDimension);\r\n\t\tframe.setPreferredSize(setDimension);\r\n\t\t\r\n\t\t// TODO: add X buttons to the tabs.\r\n\t\tmainTabbedPane = new JTabbedPane();\r\n\t\t\r\n\t\tframe.add(mainTabbedPane);\r\n\t\t\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\t\r\n\t\tframe.addWindowListener(new WindowListener(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowActivated(WindowEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\r\n\t\t\t\tSystem.out.println(\"Window closed\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\r\n\t\t\t\tSystem.out.println(\"Window closing\");\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowDeactivated(WindowEvent arg0) {\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 windowDeiconified(WindowEvent arg0) {\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 windowIconified(WindowEvent arg0) {\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 windowOpened(WindowEvent arg0) {\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/*\r\n\t\ttry {\r\n\t\t\t// Choose lookAndFeel that is closest to the OS you are using.\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (InstantiationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IllegalAccessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (UnsupportedLookAndFeelException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t}", "public LoginFrame() {\n initComponents();\n this.setLocationRelativeTo(null);\n LoginPanel.setVisible(true);\n SSNPanel.setVisible(false);\n\n }", "public void showMainFrame(boolean show) {\r\n\t\tmainFrame.setVisible(show);\r\n\t}", "public FRMain() {\n initComponents(); //basically starts the program and creates all GUI panels\n \n \n menuScreen.setVisible(false);\n quizTagsSelectScreen.setVisible(false);\n quizScreen.setVisible(false);\n editScreen.setVisible(false);\n statsScreen.setVisible(false);\n loadFileChooser.setVisible(false);\n saveFileChooser.setVisible(false);\n deleteScreen.setVisible(false);\n saveFileChooser.setFileSelectionMode(javax.swing.JFileChooser.FILES_AND_DIRECTORIES); //can pick a directory to save in and then create file\n loadFileChooser.setFileSelectionMode(javax.swing.JFileChooser.FILES_ONLY); //can load from file only\n \n }", "public static void main(String[] args) {\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n new LaunchGame().setVisible(true);\n } catch (IOException ex) {\n Logger.getLogger(LaunchGame.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n });\n }", "public Main(){\n \tsetSize(new Dimension(1024, 768));\n \t\n \t//setUndecorated(true); // borderless (fullscreen) window\n \tsetExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH); // maximize window\n \t\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setTitle(\"Game\");\n setLocationRelativeTo(null); // center on screen\n\n \tContentLoader.LoadContent();\n init();\n start();\n }", "public void createAndShowGUI(){\r\n\t\t//You want the jframe to close everything when it is closed\r\n\t\tjframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\tif(maximized){\r\n\t\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\t\tsWidth = (int)screenSize.getWidth();\r\n\t\t\tsHeight = (int)screenSize.getHeight();\r\n\t\t\tjframe.setSize(sWidth, sHeight);\r\n\t\t\tjframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\t\tjframe.setUndecorated(true);\r\n\t\t\tjframe.setResizable(true);\r\n\t\t\tjframe.setVisible(true);\r\n\t\t\tcWidth = sWidth;\r\n\t\t\tcHeight = sHeight;\r\n\t\t}else{\r\n\t\t\tjframe.setResizable(false);\r\n\t\t\t//Makes the jframe visible\r\n\t\t\tjframe.setVisible(true);\r\n\t\t\t//Sets the size of the jframe\r\n\t\t\tjframe.setSize(sWidth, sHeight);\r\n\t\t\t\r\n\t\t\t//I have no fucking idea why it needs this but it does\r\n\t\t\ttry{\r\n\t\t\t\tThread.sleep(100);\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Set the content width\r\n\t\t\tcWidth = jframe.getContentPane().getWidth();\r\n\t\t\t//Set the content height\r\n\t\t\tcHeight = jframe.getContentPane().getHeight();\r\n\t\t}\r\n\r\n\t\t//Set up the game menu\r\n\t\tGameMenu gmenu = new GameMenu((Graphics2D)(jframe.getContentPane().getGraphics()),cWidth,cHeight, new Input(jframe));\r\n\t\t//Draw the main menu\r\n\t\tgmenu.drawMainMenu();\r\n\t}", "@Override\n public void run() {\n getInstance().setVisible(true);\n }", "@Override\n public void showSplash() {\n }", "public static void main(String[] args) {\n \n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n \npublic void run() {\n \n createAndShowGUI(); \n \n}\n \n });\n }", "public static void main(String[] args){\n\t\t\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tGameLauncher gameLauncher = new GameLauncher();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t}", "void zeigeFenster() {\r\n\t\t_panel.setVisible(true);\r\n\t}", "public void run() {\n\t\tthis.setVisible(true);\n\t}", "public void run() {\n\t\tthis.setVisible(true);\n\t}", "public void setWindowNotVisible()\n {\n lobbyWindowFrame.setVisible(false);\n }", "public void showTitleScreen() {\n frame.showMenu();\n }", "public void display() {\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new ProviderMenu().setVisible(true);\n\n }\n });\n }", "public void showGui()\n {\n // TODO\n }", "public static void main(String[] args) {\n\r\n EventQueue.invokeLater(new Runnable() { //Invokes as runnable that queues the events\r\n\r\n @Override\r\n public void run() {\r\n Example ex = new Example();//Creates a new object of this example type\r\n ex.setVisible(true);//Sets the visibility of the created ex object to true\r\n }\r\n });\r\n }", "public void onStart() {\r\n\t\tthis.setVisible(true);\r\n\t}", "public void show() {\n\t\tif (ENABLED) {\n\t\t\tframe.setVisible(true);\n\t\t}\n\t}", "public void open() {\r\n\t\tthis.setVisible(true);\r\n\t}", "public Mainwindow(){\n \n try \n {\n //LookAndFeel asd = new SyntheticaAluOxideLookAndFeel();\n //UIManager.setLookAndFeel(asd);\n } \n catch (Exception e) \n {\n e.printStackTrace();\n }\n initComponents();\n \n \n userinitComponents();\n \n \n }", "public main() {\n initComponents();\n btnSalvar3.setVisible(false);\n lerConfig();\n }", "public void closeWindows() {\n\n waitingForPlayers.setVisible(false);\n bonusTilePane.setVisible(false);\n chooseCostPane.setVisible(false);\n payToObtainPane.setVisible(false);\n chooseEffectPane.setVisible(false);\n choosePrivilegePane.setVisible(false);\n chooseWorkersPane.setVisible(false);\n prayPane.setVisible(false);\n yourTurnPane.setVisible(false);\n suspendedPane.setVisible(false);\n yourTurnPane.setVisible(false);\n throwDicesPane.setVisible(false);\n bonusActionPane.setVisible(false);\n\n }", "public void run()\r\n\t{\r\n\t\tthis.mainFrame.setVisible(true);\r\n\t}", "public ShowMain() {\n initComponents();\n this.tishi.setOpaque(false);\n this.tishi.setEditable(false);\n }", "public void viewFrame(boolean b){\n\t\tmenuFrame.setVisible(b);\n\t}", "private void showSplashScreen() {\n splashDialog = new SplashScreenDialog(this);\n splashDialog.show();\n }", "private void ini_TabMainView()\r\n\t{\r\n\r\n\t\tif (splashEndTime > System.currentTimeMillis()) return;\r\n\r\n\t\tLogger.DEBUG(\"ini_TabMainView\");\r\n\t\tGL.that.removeRenderView(this);\r\n\t\t((GdxGame) GL.that).switchToMainView();\r\n\r\n\t\tGL.setIsInitial();\r\n\t}", "public void hideFrame() {\r\n this.setVisible(false);\r\n this.dispose();\r\n }", "public void setHide()\n\t{\n\t\tMainController.getInstance().setVisible(name, false);\n\t}", "public StageScreen() {\n initComponents();\n hp_1.setValue(0);\n hp_2.setValue(0);\n \n // new animationAndRepainting().setVisible(true);\n }", "public void mainMenu() {\n Game.stage.setScene(mainMenuScene);\n Game.stage.show();\n }", "void gui(){\n _hasGUI = true;\n }", "public SWarden() {\n initComponents();\n panel1.setVisible(true);\n panel2.setVisible(false);\n panel3.setVisible(false);\n panel4.setVisible(false);\n panel5.setVisible(false);\n panel6.setVisible(false);\n lbl2.setVisible(false); \n \n }", "public void display() {\r\n subAwardDlgWindow.setVisible(true);\r\n }", "public void launchStartupScreen() {\n\t\tnew StartUpScreen(this);\n\t}", "public static void main(String[] args) {\r\n // TODO code application logic here\r\n ObjectFactory.getUIinstance().getHomeInstance().setVisible(true);\r\n }", "private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {\n this.setVisible(false);\n }", "public SnakeUI() {\r\n setFrame(); \r\n setKeyListener();\r\n setTimer();\r\n startGame();\r\n this.setVisible(true);\r\n }", "public void start() {\n\t\tSystem.out.println(\"Starting new application\");\n\t\texec.init(this);\n\t\tthread = new Thread(this);\n\t\trunning = true;\n\t\tgd.setFullScreenWindow(screen.getFrame());\n\t\tscreen.getFrame().setVisible(true);\n\t\tthread.start();\n\t}", "public Login() \n {\n super();\n create();\n this.setVisible(true);\n initComponents();\n }", "public frmMain() {\n initComponents();\n setExtendedState(MAXIMIZED_BOTH);\n }", "public void hideScreen() {\n\t}", "private void settings() {\n\t\tthis.setVisible(true);\n\t\tthis.setSize(800,200);\n\t}", "public void showMainPage() {\r\n\t\tmainFrame.showPage(mainPage.getClass().getCanonicalName());\r\n\t}", "public void begin() {\n\t\tview.setVisible(true);\n\t}", "public void inicio(){\r\n Ventana v = new Ventana();\r\n v.setVisible(true); //se hace visible la ventana\r\n }", "public static void main( String args[] )\n\t{\n\t\tmainFrame = getInstance();\n\t\tmainFrame.setVisible( true );\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t SwingUtilities.invokeLater(new Runnable() {\r\n\r\n\t public void run() {\r\n\r\n\t \tCharacterBuilderInterface ex = new CharacterBuilderInterface();\r\n\t ex.setVisible(true);\r\n\t }\r\n\t });\r\n\t}", "public void runDisplay()\n\t{\n\t\tscFrame = new SpellCheckFrame();\n\t\tscFrame.setVisible(true);\n\t}", "public void show(){\n developmentGroup.setVisible(true);\n }", "public void startSplashGameOver(){\r\n\t\t\r\n\t\tpanel[CurrentPanel].stop();\r\n\t\t\r\n\t\tDriver.panel[CurrentPanel].setVisible(false);\r\n\t\tgame.remove(panel[CurrentPanel] );\r\n\t\t\r\n\t\tCurrentPanel = 0;\r\n\t\t\r\n\t\t\r\n\t\tpanel[CurrentPanel] = new Splash(this);\r\n\t\t\r\n\t\tadd( panel[CurrentPanel] );\r\n\t\tpanel[CurrentPanel].setVisible(true);\r\n\t\tgame.setVisible(true);\r\n\t\t\r\n\t\tpanel[CurrentPanel].start();\r\n\t\t\r\n\t}", "private static void hideSplashScreen() {\n if (splash != null) {\n splash.dispose();\n splash = null;\n }\n }", "public static void main(String[] args) {\r\n UserInterface ui;\r\n try {\r\n ui = new UserInterface();\r\n \r\n ui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n ui.pack(); \r\n ui.setVisible(true); \r\n } catch(InterruptedException ex) {\r\n \r\n }\r\n\r\n }" ]
[ "0.7507081", "0.71510905", "0.71272886", "0.7089224", "0.7026948", "0.70263755", "0.69390804", "0.68967456", "0.6853989", "0.6830071", "0.6813457", "0.68058664", "0.6804216", "0.6779771", "0.67708004", "0.676406", "0.67463547", "0.6745532", "0.6742699", "0.6730644", "0.6717383", "0.66657996", "0.6638621", "0.6635315", "0.6567132", "0.65537786", "0.65334785", "0.651876", "0.6509078", "0.65057415", "0.64991516", "0.64975166", "0.6491382", "0.6479828", "0.6479433", "0.6476247", "0.6472129", "0.6447539", "0.6426391", "0.64254034", "0.6414539", "0.64060867", "0.64048505", "0.6400593", "0.63759047", "0.63653105", "0.6358284", "0.6355282", "0.6352754", "0.6349204", "0.6347595", "0.634439", "0.63422114", "0.6340303", "0.6334509", "0.6327954", "0.63255507", "0.6314972", "0.6314972", "0.6310382", "0.63048744", "0.6303434", "0.63030463", "0.6300021", "0.6295031", "0.62949914", "0.6285608", "0.6283912", "0.62765354", "0.6275618", "0.6274057", "0.6267423", "0.62617767", "0.62564266", "0.62417567", "0.62295765", "0.62214404", "0.6214097", "0.61990154", "0.61985624", "0.6191671", "0.6187429", "0.6185721", "0.6184402", "0.6176913", "0.617457", "0.6166489", "0.61582446", "0.6149599", "0.61421686", "0.614215", "0.6132508", "0.6131167", "0.6127615", "0.6125093", "0.61244315", "0.6123171", "0.61215633", "0.6121209", "0.6120379", "0.61162764" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table dish
int countByExample(DishExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Dish selectByPrimaryKey(String id);", "@Override\n public List<SideDishEntity> findAll() {\n return null;\n }", "List<TblMotherSon> selectByExample(TblMotherSonExample example);", "@Override\r\n\tpublic int create(Dish dish) {\r\n\t\t\r\n//\t\thashMap.put(dish.getId(), dish);\r\n\t\tSystem.out.println(\" Creating Dish\");\r\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(dish);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n//\t\tSystem.out.println(\"Dish create successfully\" +dish.toString());\r\n\t\treturn dish.getId();\r\n\t\t\r\n\t}", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface PreparedDishHistoryDAO {\n int addPreparedDish(PreparedDish dish);\n List<PreparedDish> getAll();\n}", "public static ArrayList<Dish> getDishesByMenuId(String mid) throws SQLException {\r\n\t\tArrayList<Dish> result = new ArrayList<Dish>();\r\n\t\tString sql = \"SELECT dish_id, name, price, picture, description FROM dish\" + \" WHERE menu_id = ?\";\r\n\t\tResultSet rs;\r\n\t\tint dishId = -1;\r\n\t\tString name = \"\";\r\n\t\tfloat price = 0f;\r\n\t\tString filePath = \"\";\r\n\t\tString description = \"\";\r\n\r\n\t\tPreparedStatement sqlPrepared = DBConnection.prepare(sql);\r\n\t\tsqlPrepared.setString(1, mid);\r\n\t\trs = sqlPrepared.executeQuery();\r\n\t\twhile (rs.next()) {\r\n\t\t\tdishId = rs.getInt(1);\r\n\t\t\tname = rs.getString(2);\r\n\t\t\tprice = rs.getFloat(3);\r\n\t\t\tfilePath = rs.getString(4);\r\n\t\t\tdescription = rs.getString(5);\r\n\t\t\tDish dish = new Dish(String.valueOf(dishId), price, name, description,filePath);\r\n\t\t\t//put dish into identity map\r\n\t\t\tIdentityMap<Dish> map = IdentityMap.getInstance(dish);\r\n\t\t\tmap.put(dishId,dish);\r\n\t\t\t\r\n\t\t\tresult.add(dish);\r\n\t\t}\r\n\t\tsqlPrepared.close();\r\n\t\tDBConnection.dbConnection.close();\r\n\t\treturn result;\r\n\t}", "HrMscChaAssig selectByPrimaryKey(Date day, Integer hour, String mscid);", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();", "void fetchHolidayRentalHousesData();", "@Override\r\n public String storyID() {\r\n return \"HD\";\r\n }", "public ForeignInfo foreignStShohinKonyu() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnStShohinKonyuId(), StShohinKonyuDbm.getInstance().columnStShohinKonyuId());\n return cfi(\"FK_ST_SHHN_KNY_MS_ST_SHOHIN_KONYU\", \"stShohinKonyu\", this, StShohinKonyuDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "public ForeignInfo foreignSmShohin() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnSmShohinId(), SmShohinDbm.getInstance().columnSmShohinId());\n return cfi(\"FK_ST_SHHN_KNY_MS_SM_SHOHIN\", \"smShohin\", this, SmShohinDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "@Select({\n \"select\",\n \"`cate_id`, `cate_name`\",\n \"from `category`\",\n \"where `cate_id` = #{cateId,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n Category selectByPrimaryKey(Integer cateId);", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public interface DishDao {\n\n void save(Dish dish);\n List<Dish> findAll();\n Dish findByName(String name);\n\n void removeAll();\n}", "List<Dish> selectByExample(DishExample example);", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}", "@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }", "HelpInfo selectByPrimaryKey(Integer hId);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n News selectByPrimaryKey(Integer newsId);", "public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "public List<DishItem> getDish(){\n \tList<DishItem> dish = new ArrayList<DishItem>();\n\t\t\n\t\t//User user = userDao.find();\n\t\t//String tokenString = user.getToken();\n\t\t\n\t\tString dishResult;\t\t\n\t\tString urlString=\"/service/dish/getalldishs\";\n\t\ttry {\n\t\t\tdishResult = connect.testURLConn1(urlString);\n\t\t\tJSONObject jsonObject = new JSONObject(dishResult);System.out.println(\"jsonObject==\"+jsonObject);\n\t\t\tJSONArray jsonArray = jsonObject.getJSONArray(\"date\");System.out.println(\"jsonArray==\"+jsonArray);\n\t\t\t//userJSON = jsonObject.getJSONObject(\"user\");\n\t\t\t\n\t\t\tfor(int i=0;i<jsonArray.length();i++){ \n\t\t\t\t JSONObject jo = (JSONObject)jsonArray.opt(i);\n\t\t String id = jo.getString(\"_id\");\n\t\t String dishName = jo.getString(\"dishName\");\n\t\t String desc = jo.getString(\"desc\");\n\t\t int pic=jo.getInt(\"pic\");\n\t\t int col=jo.getInt(\"col\");\n\t\t DishItem dishitem = new DishItem(id, dishName, desc,pic,col);\n\t dish.add(dishitem);\n\t }\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\treturn dish;\n\t\t\n\t}", "@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}", "List<SellMedia> selectSellMediaByExample(SellMediaExample example) throws SQLException;", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@Override\n public List<SideDishEntity> findAll(Iterable<Long> ids) {\n return null;\n }", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "@Override\n public void showDiaryFromDB() {\n diaryPresenter.showDiaryFromDB();\n }", "Disproduct selectByPrimaryKey(String samId);", "@Dao\npublic interface ScenicPicDao {\n @Insert\n void insertScenicPic(ScenicPic scenicPic);\n\n @Query(\"DELETE from ScenicPic where scenic_id=:scenicId\")\n void deleteAllScenicPic(int scenicId);\n\n //return live data when data be changed, list update automatically\n @Query(\"select * from ScenicPic where scenic_id=:scenicId\")\n List<ScenicPic> getScenicPicById(int scenicId);\n}", "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }", "Nutrition selectByPrimaryKey(Integer nutritionid);", "public interface DishDao {\n Dish findOne(long id);\n List<Dish> findAll();\n void create(Dish entity);\n Dish update(Dish entity);\n void delete(Dish entity);\n void deleteById(long entityId);\n}", "private Shelf fillShelf(ResultSet rs) throws SQLException{\n Shelf shelf = new Shelf();\n shelf.setId(rs.getInt(\"id\"));\n shelf.setColumn(rs.getInt(\"col\"));\n shelf.setRow(rs.getInt(\"row\"));\n shelf.setMaxWeight(rs.getDouble(\"maxWeight\"));\n shelf.setCapacity(rs.getInt(\"capacity\"));\n shelf.setSecure(rs.getBoolean(\"secure\"));\n return shelf;\n }", "public interface SideEntityDao extends CrudRepository<SideEntity, Long> {\n\n\tSet<SideEntity> findAll();\n\n}", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "@SqlQuery(\"select * from PLAYERSTATS order by KILLS DESC FETCH FIRST 10 ROWS ONLY\")\n List<PlayerStats> findKillsHighScores();", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public String getName() {\n return dishName;\n }", "public java.sql.ResultSet DatosdelaCita(String CodHorMed){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n \tSystem.out.println(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>DatosdelaCita \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "UvStatDay selectByPrimaryKey(Long id);", "public String getDishOfTheDay(){\n return dishOfTheDay;\n }", "public List<DiseasePojo> diseaseAll() \n\t{\n\n\t\tString sql = \"SELECT * FROM diseasemaster\";\n\t\treturn jdbcTemplate.query(sql, new ResultSetExtractor<List<DiseasePojo>>()\n\t\t{\n\t public List<DiseasePojo> extractData(ResultSet rs) throws SQLException,\n\t DataAccessException {\n\t \tList<DiseasePojo> list = new ArrayList<DiseasePojo>();\n\t while(rs.next()) {\n\t \tDiseasePojo dt = new DiseasePojo();\n\t \n\t dt.setDiseaseId(rs.getInt(\"DISEASEID\"));\n\t dt.setDiseaseCode(rs.getString(\"DISEASECODE\"));\n\t dt.setDiseaseName(rs.getString(\"DISEASENAME\"));\n\t list.add(dt);\n\t }\n\t return list;\n\t \n\t }\n\t });\n\t\n\t}", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }", "public interface IExampleWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void example(org.linlinjava.litemall.db.domain.example.SaleClassifyGoodExample example);\n }", "public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public Medium[] getDiscs() {\n Session session = getSessionFactory().openSession();\n session.beginTransaction();\n List<Disc> discList = session.createQuery(\"from Disc\", Disc.class).list();\n session.getTransaction().commit();\n session.close();\n return discList.toArray(new Medium[discList.size()]);\n }", "Kaiwa selectByPrimaryKey(String maht);", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "PathologyInfo selectByPrimaryKey(Integer id);", "HospitalType selectByPrimaryKey(String id);", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n KDUserMedal selectByPrimaryKey(Long id);", "public void setName(String dishName) {\n this.dishName = dishName;\n }", "public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface ProfitprofitActionRuleDao extends EntityMybatisDao<ProfitprofitActionRule> {\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate);\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate},cal_type=#{calType} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionIdUpdateAalRateAndCalType(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate, @Param(\"calType\") String calType);\n \n @Select(\"select * from profit_action_rule where section_id=#{sectionId}\")\n ProfitprofitActionRule selectProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String\n sectionId);\n\n @Delete(\"delete from profit_action_rule where id =#{id}\")\n void deleteProfitActionRuleById(@Param(\"id\")Long id);\n\n @Delete(\"delete from profit_action_rule \")\n void deleteProfitActionRuleByAll();\n \n}", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "BpmInstanciaHistorica selectByPrimaryKey(Long idreg);", "MenuInfo selectByPrimaryKey(Integer menuid);", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "List selectByExample(BnesBrowsingHisExample example) throws SQLException;", "public IMDBBaseEntity entityPerResultSet(ResultSet rs) throws SQLException {\n return null;\n }", "public interface ArchetypeLevelsSchema {\n\tString TABLE_NAME = \"creature_archetype_levels\";\n\n\tString COLUMN_ARCHETYPE_ID = \"archetypeId\";\n\tString COLUMN_LEVEL = \"level\";\n\tString COLUMN_ATTACK = \"attack\";\n\tString COLUMN_ATTACK2 = \"attack2\";\n\tString COLUMN_DEF_BONUS = \"defensiveBonus\";\n\tString COLUMN_BODY_DEV = \"bodyDevelopment\";\n\tString COLUMN_PRIME_SKILL = \"primeSkill\";\n\tString COLUMN_SECONDARY_SKILL = \"secondarySkill\";\n\tString COLUMN_POWER_DEV = \"powerDevelopment\";\n\tString COLUMN_SPELLS = \"spells\";\n\tString COLUMN_TALENT_DP = \"talentDP\";\n\tString COLUMN_AGILITY = \"agility\";\n\tString COLUMN_CONS_STAT = \"constitutionStat\";\n\tString COLUMN_CONSTITUTION = \"constitution\";\n\tString COLUMN_EMPATHY = \"empathy\";\n\tString COLUMN_INTUITION = \"intuition\";\n\tString COLUMN_MEMORY = \"memory\";\n\tString COLUMN_PRESENCE = \"presence\";\n\tString COLUMN_QUICKNESS = \"quickness\";\n\tString COLUMN_REASONING = \"reasoning\";\n\tString COLUMN_SELF_DISC = \"selfDiscipline\";\n\tString COLUMN_STRENGTH = \"strength\";\n\n\tString TABLE_CREATE = \"CREATE TABLE IF NOT EXISTS \"\n\t\t\t+ TABLE_NAME\n\t\t\t+ \" (\"\n\t\t\t+ COLUMN_ARCHETYPE_ID + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_LEVEL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK2 + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_DEF_BONUS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_BODY_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRIME_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SECONDARY_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_POWER_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SPELLS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_TALENT_DP + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_AGILITY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONS_STAT + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONSTITUTION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_EMPATHY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_INTUITION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_MEMORY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRESENCE + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_QUICKNESS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_REASONING + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SELF_DISC + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_STRENGTH + \" INTEGER NOT NULL, \"\n\t\t\t+ \"PRIMARY KEY(\" + COLUMN_ARCHETYPE_ID + \",\" + COLUMN_LEVEL + \")\"\n\t\t\t+ \")\";\n\n\tString[] COLUMNS = new String[] { COLUMN_ARCHETYPE_ID, COLUMN_LEVEL, COLUMN_ATTACK, COLUMN_ATTACK2, COLUMN_DEF_BONUS,\n\t\t\tCOLUMN_BODY_DEV, COLUMN_PRIME_SKILL, COLUMN_SECONDARY_SKILL, COLUMN_POWER_DEV, COLUMN_SPELLS, COLUMN_TALENT_DP,\n\t\t\tCOLUMN_AGILITY, COLUMN_CONS_STAT, COLUMN_CONSTITUTION, COLUMN_EMPATHY, COLUMN_INTUITION, COLUMN_MEMORY,\n\t\t\tCOLUMN_PRESENCE, COLUMN_QUICKNESS, COLUMN_REASONING, COLUMN_SELF_DISC, COLUMN_STRENGTH};\n}", "public interface ICriteriaWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void criteria(Criteria criteria);\n }", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "SysPic selectByPrimaryKey(Integer id);", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "@Dao\npublic interface MedicalCategoryDAO {\n\n\n\n @Query(\"SELECT * FROM medicalcategory\")\n List<MedicalCategory> getAll();\n\n @Query(\"SELECT COUNT(*) from medicalcategory\")\n int countcategories();\n\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertAll(MedicalCategory... medicalCategories);\n\n\n @Insert(onConflict = OnConflictStrategy.IGNORE)\n void insertsingle(MedicalCategory medicalCategory);\n\n\n}", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "public void showIngredients() {\n list = dbController.getIngredientsList();\n\n idColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Integer>(\"id\"));\n nameColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, String>(\"name\"));\n caloriesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"calories\"));\n proteinColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"protein\"));\n fatColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"fat\"));\n carbohydratesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"carbohydrates\"));\n selectColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, CheckBox>(\"select\"));\n\n TableView.setItems(list);\n }", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "public interface ClothDao {\n /**\n * 判断衣服Id是否存在\n * @param id\n * @return boolean\n */\n boolean isClothIdExists(int id);\n /**\n * 返回图片\n * @param clothId\n * @return Clothinfostring\n */\n String getClothById(int clothId);\n /**\n * 返回图片\n * @param none\n * @return Cloth Ids\n */\n String getAllCloth();\n\n}", "int updateByPrimaryKey(Dish record);", "@SuppressWarnings(\"rawtypes\")\n\t@Override\n\t@Transactional(readOnly=true)\n\tpublic List listMissTheme(MissTheme persistentInstance)\n\t\t\tthrows DataAccessException {\n\t\tSession session = sessionAnnotationFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"select missTheme from MissTheme missTheme order by missTheme.mtId asc \");\n\t\treturn query.list();\n\t}", "GirlInfo selectByPrimaryKey(Integer id);", "public List<MediumBean> populatemediam(String sql ){\n\t\t\t\tList<MediumBean> retlist = jdbcTemplate.query(sql,ParameterizedBeanPropertyRowMapper.newInstance(MediumBean.class));\n\t\t\t\t\treturn retlist;\n\t\t }", "public void formDatabaseTable() {\n }", "int updateByPrimaryKeySelective(Dish record);", "List<Horse> getAllHorses();", "Drug_OutWarehouse selectByPrimaryKey(Long id);", "@AfterQuery\n\t\tpublic void spriden_AfterQuery(RowAdapterEvent args)\n\t\t{\n\t\t\t\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)args.getRow();\n\n\n\t\t\t\tint rowCount = 0;\n\t\t\t\t{\n\t\t\t\t\tString sqlptiCursor = \"SELECT SPBPERS_BIRTH_DATE, SPBPERS_SEX \" +\n\t\" FROM SPBPERS \" +\n\t\" WHERE SPBPERS_PIDM = :SPRIDEN_PIDM \";\n\t\t\t\t\tDataCursor ptiCursor = new DataCursor(sqlptiCursor);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//Setting query parameters\n\t\t\t\t\t\tptiCursor.addParameter(\"SPRIDEN_PIDM\", spridenElement.getSpridenPidm());\n\t\t\t\t\t\tptiCursor.open();\n\t\t\t\t\t\tResultSet ptiCursorResults = ptiCursor.fetchInto();\n\t\t\t\t\t\tif ( ptiCursorResults != null ) {\n\t\t\t\t\t\t\tspridenElement.setBirthdate(ptiCursorResults.getDate(0));\n\t\t\t\t\t\t\tspridenElement.setSex(ptiCursorResults.getStr(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally{\n\t\t\t\t\t\tptiCursor.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@SqlQuery(\"select * from PLAYERSTATS where SCOREID = :id\")\n PlayerStats findByScoreId(@Bind(\"id\") String id);", "@Override\n\tpublic List<Chitietdonhang> tinhDoanhThuTheoNam(Integer nam) {\n\t\treturn chiTietDonHangRepository.tinhDoanhThuTheoNam(nam);\n\t}", "List<Horario_Disponible> findAll();", "public interface BattleDao {\n\n @Select(\"SELECT * FROM battle WHERE chapter_id = #{chapterId} order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattleByChapterId(String chapterId);\n\n @Select(\"SELECT * FROM battle order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattle();\n\n @Select(\"SELECT * FROM battle WHERE battle_id = #{battleId}\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public Battle getBattleById(String battleId);\n}", "public ArrayList<Desserts> getAllDesserts() { \r\n\t ArrayList<Desserts> AllDesserts = new ArrayList<Desserts>();\r\n\t try {\r\n\t Class.forName(\"com.mysql.jdbc.Driver\");\r\n\t Connection conn = DriverManager.getConnection(url+dbName,userName,password);\r\n\t statement=conn.createStatement();\r\n\t resultSet=statement.executeQuery(\"select * from g13restaurant.Desserts\");\r\n\t \r\n\t while ( resultSet.next() ) {\r\n\t \t Desserts nextDesserts = new Desserts(\r\n\t \t\t\t resultSet.getInt(\"dessert_ID\"), \r\n\t \t\t\t resultSet.getString(\"dessert_Name\"),\r\n\t resultSet.getString(\"dessert_Description\"), \r\n\t resultSet.getFloat(\"dessert_Cost\"),\r\n\t resultSet.getString(\"dessert_Type\").toString() ); \r\n\t AllDesserts.add(nextDesserts);\r\n\t }\r\n\t conn.close();\r\n\t } \r\n\t catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t return AllDesserts; \r\n\t }" ]
[ "0.5601651", "0.53839487", "0.53021646", "0.52873755", "0.520671", "0.5199008", "0.51244825", "0.51128334", "0.51112014", "0.5086853", "0.50846237", "0.50530577", "0.50382876", "0.5010417", "0.5000066", "0.49977776", "0.49874738", "0.4977294", "0.4961594", "0.4952532", "0.494201", "0.49400103", "0.4935266", "0.49334523", "0.4913651", "0.48966566", "0.48760986", "0.4873431", "0.48674852", "0.48482263", "0.48369205", "0.4828204", "0.4820147", "0.4819659", "0.48163944", "0.48132688", "0.48045355", "0.48015493", "0.4790453", "0.47686547", "0.47637588", "0.47512266", "0.4745165", "0.4741528", "0.4724258", "0.4722147", "0.4715255", "0.47143948", "0.4712681", "0.47064984", "0.4705355", "0.4702779", "0.46978354", "0.46959195", "0.46941528", "0.46938932", "0.46937716", "0.46931654", "0.46861097", "0.4682892", "0.4682116", "0.46809503", "0.46807703", "0.4674833", "0.46745697", "0.4672617", "0.4669176", "0.46653524", "0.46621925", "0.46556634", "0.46513012", "0.46466786", "0.4640407", "0.4639889", "0.46388292", "0.46379563", "0.4634017", "0.46337754", "0.46334422", "0.4628962", "0.4628682", "0.46264276", "0.46256983", "0.4622565", "0.46188143", "0.46176806", "0.4617436", "0.46174166", "0.46172732", "0.46169975", "0.46084943", "0.4606415", "0.460357", "0.46032286", "0.45968014", "0.4593058", "0.45916504", "0.4587022", "0.45857728", "0.4580759", "0.457777" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table dish
int deleteByExample(DishExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Dish selectByPrimaryKey(String id);", "@Override\n public List<SideDishEntity> findAll() {\n return null;\n }", "List<TblMotherSon> selectByExample(TblMotherSonExample example);", "@Override\r\n\tpublic int create(Dish dish) {\r\n\t\t\r\n//\t\thashMap.put(dish.getId(), dish);\r\n\t\tSystem.out.println(\" Creating Dish\");\r\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(dish);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n//\t\tSystem.out.println(\"Dish create successfully\" +dish.toString());\r\n\t\treturn dish.getId();\r\n\t\t\r\n\t}", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface PreparedDishHistoryDAO {\n int addPreparedDish(PreparedDish dish);\n List<PreparedDish> getAll();\n}", "public static ArrayList<Dish> getDishesByMenuId(String mid) throws SQLException {\r\n\t\tArrayList<Dish> result = new ArrayList<Dish>();\r\n\t\tString sql = \"SELECT dish_id, name, price, picture, description FROM dish\" + \" WHERE menu_id = ?\";\r\n\t\tResultSet rs;\r\n\t\tint dishId = -1;\r\n\t\tString name = \"\";\r\n\t\tfloat price = 0f;\r\n\t\tString filePath = \"\";\r\n\t\tString description = \"\";\r\n\r\n\t\tPreparedStatement sqlPrepared = DBConnection.prepare(sql);\r\n\t\tsqlPrepared.setString(1, mid);\r\n\t\trs = sqlPrepared.executeQuery();\r\n\t\twhile (rs.next()) {\r\n\t\t\tdishId = rs.getInt(1);\r\n\t\t\tname = rs.getString(2);\r\n\t\t\tprice = rs.getFloat(3);\r\n\t\t\tfilePath = rs.getString(4);\r\n\t\t\tdescription = rs.getString(5);\r\n\t\t\tDish dish = new Dish(String.valueOf(dishId), price, name, description,filePath);\r\n\t\t\t//put dish into identity map\r\n\t\t\tIdentityMap<Dish> map = IdentityMap.getInstance(dish);\r\n\t\t\tmap.put(dishId,dish);\r\n\t\t\t\r\n\t\t\tresult.add(dish);\r\n\t\t}\r\n\t\tsqlPrepared.close();\r\n\t\tDBConnection.dbConnection.close();\r\n\t\treturn result;\r\n\t}", "HrMscChaAssig selectByPrimaryKey(Date day, Integer hour, String mscid);", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();", "void fetchHolidayRentalHousesData();", "@Override\r\n public String storyID() {\r\n return \"HD\";\r\n }", "public ForeignInfo foreignStShohinKonyu() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnStShohinKonyuId(), StShohinKonyuDbm.getInstance().columnStShohinKonyuId());\n return cfi(\"FK_ST_SHHN_KNY_MS_ST_SHOHIN_KONYU\", \"stShohinKonyu\", this, StShohinKonyuDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "public ForeignInfo foreignSmShohin() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnSmShohinId(), SmShohinDbm.getInstance().columnSmShohinId());\n return cfi(\"FK_ST_SHHN_KNY_MS_SM_SHOHIN\", \"smShohin\", this, SmShohinDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "@Select({\n \"select\",\n \"`cate_id`, `cate_name`\",\n \"from `category`\",\n \"where `cate_id` = #{cateId,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n Category selectByPrimaryKey(Integer cateId);", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public interface DishDao {\n\n void save(Dish dish);\n List<Dish> findAll();\n Dish findByName(String name);\n\n void removeAll();\n}", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Dish> selectByExample(DishExample example);", "public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}", "@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }", "HelpInfo selectByPrimaryKey(Integer hId);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n News selectByPrimaryKey(Integer newsId);", "public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "public List<DishItem> getDish(){\n \tList<DishItem> dish = new ArrayList<DishItem>();\n\t\t\n\t\t//User user = userDao.find();\n\t\t//String tokenString = user.getToken();\n\t\t\n\t\tString dishResult;\t\t\n\t\tString urlString=\"/service/dish/getalldishs\";\n\t\ttry {\n\t\t\tdishResult = connect.testURLConn1(urlString);\n\t\t\tJSONObject jsonObject = new JSONObject(dishResult);System.out.println(\"jsonObject==\"+jsonObject);\n\t\t\tJSONArray jsonArray = jsonObject.getJSONArray(\"date\");System.out.println(\"jsonArray==\"+jsonArray);\n\t\t\t//userJSON = jsonObject.getJSONObject(\"user\");\n\t\t\t\n\t\t\tfor(int i=0;i<jsonArray.length();i++){ \n\t\t\t\t JSONObject jo = (JSONObject)jsonArray.opt(i);\n\t\t String id = jo.getString(\"_id\");\n\t\t String dishName = jo.getString(\"dishName\");\n\t\t String desc = jo.getString(\"desc\");\n\t\t int pic=jo.getInt(\"pic\");\n\t\t int col=jo.getInt(\"col\");\n\t\t DishItem dishitem = new DishItem(id, dishName, desc,pic,col);\n\t dish.add(dishitem);\n\t }\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\treturn dish;\n\t\t\n\t}", "@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}", "List<SellMedia> selectSellMediaByExample(SellMediaExample example) throws SQLException;", "@Override\n public List<SideDishEntity> findAll(Iterable<Long> ids) {\n return null;\n }", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "@Override\n public void showDiaryFromDB() {\n diaryPresenter.showDiaryFromDB();\n }", "Disproduct selectByPrimaryKey(String samId);", "@Dao\npublic interface ScenicPicDao {\n @Insert\n void insertScenicPic(ScenicPic scenicPic);\n\n @Query(\"DELETE from ScenicPic where scenic_id=:scenicId\")\n void deleteAllScenicPic(int scenicId);\n\n //return live data when data be changed, list update automatically\n @Query(\"select * from ScenicPic where scenic_id=:scenicId\")\n List<ScenicPic> getScenicPicById(int scenicId);\n}", "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }", "Nutrition selectByPrimaryKey(Integer nutritionid);", "public interface DishDao {\n Dish findOne(long id);\n List<Dish> findAll();\n void create(Dish entity);\n Dish update(Dish entity);\n void delete(Dish entity);\n void deleteById(long entityId);\n}", "private Shelf fillShelf(ResultSet rs) throws SQLException{\n Shelf shelf = new Shelf();\n shelf.setId(rs.getInt(\"id\"));\n shelf.setColumn(rs.getInt(\"col\"));\n shelf.setRow(rs.getInt(\"row\"));\n shelf.setMaxWeight(rs.getDouble(\"maxWeight\"));\n shelf.setCapacity(rs.getInt(\"capacity\"));\n shelf.setSecure(rs.getBoolean(\"secure\"));\n return shelf;\n }", "public interface SideEntityDao extends CrudRepository<SideEntity, Long> {\n\n\tSet<SideEntity> findAll();\n\n}", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "@SqlQuery(\"select * from PLAYERSTATS order by KILLS DESC FETCH FIRST 10 ROWS ONLY\")\n List<PlayerStats> findKillsHighScores();", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public String getName() {\n return dishName;\n }", "public java.sql.ResultSet DatosdelaCita(String CodHorMed){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n \tSystem.out.println(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>DatosdelaCita \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "UvStatDay selectByPrimaryKey(Long id);", "public String getDishOfTheDay(){\n return dishOfTheDay;\n }", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "public List<DiseasePojo> diseaseAll() \n\t{\n\n\t\tString sql = \"SELECT * FROM diseasemaster\";\n\t\treturn jdbcTemplate.query(sql, new ResultSetExtractor<List<DiseasePojo>>()\n\t\t{\n\t public List<DiseasePojo> extractData(ResultSet rs) throws SQLException,\n\t DataAccessException {\n\t \tList<DiseasePojo> list = new ArrayList<DiseasePojo>();\n\t while(rs.next()) {\n\t \tDiseasePojo dt = new DiseasePojo();\n\t \n\t dt.setDiseaseId(rs.getInt(\"DISEASEID\"));\n\t dt.setDiseaseCode(rs.getString(\"DISEASECODE\"));\n\t dt.setDiseaseName(rs.getString(\"DISEASENAME\"));\n\t list.add(dt);\n\t }\n\t return list;\n\t \n\t }\n\t });\n\t\n\t}", "public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }", "public interface IExampleWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void example(org.linlinjava.litemall.db.domain.example.SaleClassifyGoodExample example);\n }", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public Medium[] getDiscs() {\n Session session = getSessionFactory().openSession();\n session.beginTransaction();\n List<Disc> discList = session.createQuery(\"from Disc\", Disc.class).list();\n session.getTransaction().commit();\n session.close();\n return discList.toArray(new Medium[discList.size()]);\n }", "Kaiwa selectByPrimaryKey(String maht);", "PathologyInfo selectByPrimaryKey(Integer id);", "HospitalType selectByPrimaryKey(String id);", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n KDUserMedal selectByPrimaryKey(Long id);", "public void setName(String dishName) {\n this.dishName = dishName;\n }", "public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface ProfitprofitActionRuleDao extends EntityMybatisDao<ProfitprofitActionRule> {\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate);\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate},cal_type=#{calType} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionIdUpdateAalRateAndCalType(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate, @Param(\"calType\") String calType);\n \n @Select(\"select * from profit_action_rule where section_id=#{sectionId}\")\n ProfitprofitActionRule selectProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String\n sectionId);\n\n @Delete(\"delete from profit_action_rule where id =#{id}\")\n void deleteProfitActionRuleById(@Param(\"id\")Long id);\n\n @Delete(\"delete from profit_action_rule \")\n void deleteProfitActionRuleByAll();\n \n}", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "BpmInstanciaHistorica selectByPrimaryKey(Long idreg);", "MenuInfo selectByPrimaryKey(Integer menuid);", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "public IMDBBaseEntity entityPerResultSet(ResultSet rs) throws SQLException {\n return null;\n }", "List selectByExample(BnesBrowsingHisExample example) throws SQLException;", "public interface ArchetypeLevelsSchema {\n\tString TABLE_NAME = \"creature_archetype_levels\";\n\n\tString COLUMN_ARCHETYPE_ID = \"archetypeId\";\n\tString COLUMN_LEVEL = \"level\";\n\tString COLUMN_ATTACK = \"attack\";\n\tString COLUMN_ATTACK2 = \"attack2\";\n\tString COLUMN_DEF_BONUS = \"defensiveBonus\";\n\tString COLUMN_BODY_DEV = \"bodyDevelopment\";\n\tString COLUMN_PRIME_SKILL = \"primeSkill\";\n\tString COLUMN_SECONDARY_SKILL = \"secondarySkill\";\n\tString COLUMN_POWER_DEV = \"powerDevelopment\";\n\tString COLUMN_SPELLS = \"spells\";\n\tString COLUMN_TALENT_DP = \"talentDP\";\n\tString COLUMN_AGILITY = \"agility\";\n\tString COLUMN_CONS_STAT = \"constitutionStat\";\n\tString COLUMN_CONSTITUTION = \"constitution\";\n\tString COLUMN_EMPATHY = \"empathy\";\n\tString COLUMN_INTUITION = \"intuition\";\n\tString COLUMN_MEMORY = \"memory\";\n\tString COLUMN_PRESENCE = \"presence\";\n\tString COLUMN_QUICKNESS = \"quickness\";\n\tString COLUMN_REASONING = \"reasoning\";\n\tString COLUMN_SELF_DISC = \"selfDiscipline\";\n\tString COLUMN_STRENGTH = \"strength\";\n\n\tString TABLE_CREATE = \"CREATE TABLE IF NOT EXISTS \"\n\t\t\t+ TABLE_NAME\n\t\t\t+ \" (\"\n\t\t\t+ COLUMN_ARCHETYPE_ID + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_LEVEL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK2 + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_DEF_BONUS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_BODY_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRIME_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SECONDARY_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_POWER_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SPELLS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_TALENT_DP + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_AGILITY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONS_STAT + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONSTITUTION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_EMPATHY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_INTUITION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_MEMORY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRESENCE + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_QUICKNESS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_REASONING + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SELF_DISC + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_STRENGTH + \" INTEGER NOT NULL, \"\n\t\t\t+ \"PRIMARY KEY(\" + COLUMN_ARCHETYPE_ID + \",\" + COLUMN_LEVEL + \")\"\n\t\t\t+ \")\";\n\n\tString[] COLUMNS = new String[] { COLUMN_ARCHETYPE_ID, COLUMN_LEVEL, COLUMN_ATTACK, COLUMN_ATTACK2, COLUMN_DEF_BONUS,\n\t\t\tCOLUMN_BODY_DEV, COLUMN_PRIME_SKILL, COLUMN_SECONDARY_SKILL, COLUMN_POWER_DEV, COLUMN_SPELLS, COLUMN_TALENT_DP,\n\t\t\tCOLUMN_AGILITY, COLUMN_CONS_STAT, COLUMN_CONSTITUTION, COLUMN_EMPATHY, COLUMN_INTUITION, COLUMN_MEMORY,\n\t\t\tCOLUMN_PRESENCE, COLUMN_QUICKNESS, COLUMN_REASONING, COLUMN_SELF_DISC, COLUMN_STRENGTH};\n}", "SysPic selectByPrimaryKey(Integer id);", "public interface ICriteriaWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void criteria(Criteria criteria);\n }", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "@Dao\npublic interface MedicalCategoryDAO {\n\n\n\n @Query(\"SELECT * FROM medicalcategory\")\n List<MedicalCategory> getAll();\n\n @Query(\"SELECT COUNT(*) from medicalcategory\")\n int countcategories();\n\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertAll(MedicalCategory... medicalCategories);\n\n\n @Insert(onConflict = OnConflictStrategy.IGNORE)\n void insertsingle(MedicalCategory medicalCategory);\n\n\n}", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings(\"rawtypes\")\n\t@Override\n\t@Transactional(readOnly=true)\n\tpublic List listMissTheme(MissTheme persistentInstance)\n\t\t\tthrows DataAccessException {\n\t\tSession session = sessionAnnotationFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"select missTheme from MissTheme missTheme order by missTheme.mtId asc \");\n\t\treturn query.list();\n\t}", "public void showIngredients() {\n list = dbController.getIngredientsList();\n\n idColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Integer>(\"id\"));\n nameColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, String>(\"name\"));\n caloriesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"calories\"));\n proteinColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"protein\"));\n fatColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"fat\"));\n carbohydratesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"carbohydrates\"));\n selectColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, CheckBox>(\"select\"));\n\n TableView.setItems(list);\n }", "public interface ClothDao {\n /**\n * 判断衣服Id是否存在\n * @param id\n * @return boolean\n */\n boolean isClothIdExists(int id);\n /**\n * 返回图片\n * @param clothId\n * @return Clothinfostring\n */\n String getClothById(int clothId);\n /**\n * 返回图片\n * @param none\n * @return Cloth Ids\n */\n String getAllCloth();\n\n}", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "GirlInfo selectByPrimaryKey(Integer id);", "int updateByPrimaryKey(Dish record);", "public List<MediumBean> populatemediam(String sql ){\n\t\t\t\tList<MediumBean> retlist = jdbcTemplate.query(sql,ParameterizedBeanPropertyRowMapper.newInstance(MediumBean.class));\n\t\t\t\t\treturn retlist;\n\t\t }", "public void formDatabaseTable() {\n }", "List<Horse> getAllHorses();", "int updateByPrimaryKeySelective(Dish record);", "Drug_OutWarehouse selectByPrimaryKey(Long id);", "@AfterQuery\n\t\tpublic void spriden_AfterQuery(RowAdapterEvent args)\n\t\t{\n\t\t\t\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)args.getRow();\n\n\n\t\t\t\tint rowCount = 0;\n\t\t\t\t{\n\t\t\t\t\tString sqlptiCursor = \"SELECT SPBPERS_BIRTH_DATE, SPBPERS_SEX \" +\n\t\" FROM SPBPERS \" +\n\t\" WHERE SPBPERS_PIDM = :SPRIDEN_PIDM \";\n\t\t\t\t\tDataCursor ptiCursor = new DataCursor(sqlptiCursor);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//Setting query parameters\n\t\t\t\t\t\tptiCursor.addParameter(\"SPRIDEN_PIDM\", spridenElement.getSpridenPidm());\n\t\t\t\t\t\tptiCursor.open();\n\t\t\t\t\t\tResultSet ptiCursorResults = ptiCursor.fetchInto();\n\t\t\t\t\t\tif ( ptiCursorResults != null ) {\n\t\t\t\t\t\t\tspridenElement.setBirthdate(ptiCursorResults.getDate(0));\n\t\t\t\t\t\t\tspridenElement.setSex(ptiCursorResults.getStr(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally{\n\t\t\t\t\t\tptiCursor.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@SqlQuery(\"select * from PLAYERSTATS where SCOREID = :id\")\n PlayerStats findByScoreId(@Bind(\"id\") String id);", "@Override\n\tpublic List<Chitietdonhang> tinhDoanhThuTheoNam(Integer nam) {\n\t\treturn chiTietDonHangRepository.tinhDoanhThuTheoNam(nam);\n\t}", "List<Horario_Disponible> findAll();", "public interface BattleDao {\n\n @Select(\"SELECT * FROM battle WHERE chapter_id = #{chapterId} order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattleByChapterId(String chapterId);\n\n @Select(\"SELECT * FROM battle order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattle();\n\n @Select(\"SELECT * FROM battle WHERE battle_id = #{battleId}\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public Battle getBattleById(String battleId);\n}", "@Override\r\n\tpublic List<Item> getAllHomework() {\n\t\t\r\n\t\treturn itemdao.find(\"from Item\");\r\n\t}" ]
[ "0.5600174", "0.53841454", "0.5299719", "0.52865005", "0.5207043", "0.5197336", "0.5125447", "0.51118666", "0.5108231", "0.5086626", "0.5085082", "0.5053489", "0.50375754", "0.5013254", "0.5000734", "0.49990135", "0.49871296", "0.4977456", "0.49595127", "0.49507773", "0.49396035", "0.49392706", "0.49344653", "0.4932681", "0.4915911", "0.48960426", "0.4875751", "0.48731044", "0.48664743", "0.48471266", "0.4835617", "0.48283944", "0.48198786", "0.48192134", "0.48152295", "0.4812581", "0.4803711", "0.4801145", "0.47892702", "0.47673383", "0.47636536", "0.47504556", "0.4743838", "0.47406274", "0.47240347", "0.47233954", "0.47144976", "0.4714", "0.47135416", "0.47080025", "0.4705173", "0.47029212", "0.4695972", "0.46953914", "0.46952063", "0.46932906", "0.46932775", "0.46916923", "0.4686451", "0.4682866", "0.46822768", "0.46820173", "0.4680626", "0.46737972", "0.46732292", "0.46728477", "0.46705216", "0.46645594", "0.46607283", "0.46574742", "0.46513757", "0.4647215", "0.46400225", "0.46397337", "0.46392712", "0.46389863", "0.46342283", "0.46336046", "0.46322948", "0.46288052", "0.46275714", "0.46274203", "0.46247324", "0.46213222", "0.46198127", "0.46186653", "0.46175528", "0.46165773", "0.4616378", "0.4615364", "0.46077508", "0.46064365", "0.46041626", "0.4600525", "0.4594813", "0.45915726", "0.4591479", "0.45874423", "0.45869604", "0.45789942", "0.45764908" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table dish
int deleteByPrimaryKey(String id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Dish selectByPrimaryKey(String id);", "@Override\n public List<SideDishEntity> findAll() {\n return null;\n }", "List<TblMotherSon> selectByExample(TblMotherSonExample example);", "@Override\r\n\tpublic int create(Dish dish) {\r\n\t\t\r\n//\t\thashMap.put(dish.getId(), dish);\r\n\t\tSystem.out.println(\" Creating Dish\");\r\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(dish);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n//\t\tSystem.out.println(\"Dish create successfully\" +dish.toString());\r\n\t\treturn dish.getId();\r\n\t\t\r\n\t}", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface PreparedDishHistoryDAO {\n int addPreparedDish(PreparedDish dish);\n List<PreparedDish> getAll();\n}", "public static ArrayList<Dish> getDishesByMenuId(String mid) throws SQLException {\r\n\t\tArrayList<Dish> result = new ArrayList<Dish>();\r\n\t\tString sql = \"SELECT dish_id, name, price, picture, description FROM dish\" + \" WHERE menu_id = ?\";\r\n\t\tResultSet rs;\r\n\t\tint dishId = -1;\r\n\t\tString name = \"\";\r\n\t\tfloat price = 0f;\r\n\t\tString filePath = \"\";\r\n\t\tString description = \"\";\r\n\r\n\t\tPreparedStatement sqlPrepared = DBConnection.prepare(sql);\r\n\t\tsqlPrepared.setString(1, mid);\r\n\t\trs = sqlPrepared.executeQuery();\r\n\t\twhile (rs.next()) {\r\n\t\t\tdishId = rs.getInt(1);\r\n\t\t\tname = rs.getString(2);\r\n\t\t\tprice = rs.getFloat(3);\r\n\t\t\tfilePath = rs.getString(4);\r\n\t\t\tdescription = rs.getString(5);\r\n\t\t\tDish dish = new Dish(String.valueOf(dishId), price, name, description,filePath);\r\n\t\t\t//put dish into identity map\r\n\t\t\tIdentityMap<Dish> map = IdentityMap.getInstance(dish);\r\n\t\t\tmap.put(dishId,dish);\r\n\t\t\t\r\n\t\t\tresult.add(dish);\r\n\t\t}\r\n\t\tsqlPrepared.close();\r\n\t\tDBConnection.dbConnection.close();\r\n\t\treturn result;\r\n\t}", "HrMscChaAssig selectByPrimaryKey(Date day, Integer hour, String mscid);", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();", "void fetchHolidayRentalHousesData();", "@Override\r\n public String storyID() {\r\n return \"HD\";\r\n }", "public ForeignInfo foreignStShohinKonyu() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnStShohinKonyuId(), StShohinKonyuDbm.getInstance().columnStShohinKonyuId());\n return cfi(\"FK_ST_SHHN_KNY_MS_ST_SHOHIN_KONYU\", \"stShohinKonyu\", this, StShohinKonyuDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "public ForeignInfo foreignSmShohin() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnSmShohinId(), SmShohinDbm.getInstance().columnSmShohinId());\n return cfi(\"FK_ST_SHHN_KNY_MS_SM_SHOHIN\", \"smShohin\", this, SmShohinDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "@Select({\n \"select\",\n \"`cate_id`, `cate_name`\",\n \"from `category`\",\n \"where `cate_id` = #{cateId,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n Category selectByPrimaryKey(Integer cateId);", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public interface DishDao {\n\n void save(Dish dish);\n List<Dish> findAll();\n Dish findByName(String name);\n\n void removeAll();\n}", "List<Dish> selectByExample(DishExample example);", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}", "@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }", "HelpInfo selectByPrimaryKey(Integer hId);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n News selectByPrimaryKey(Integer newsId);", "public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "public List<DishItem> getDish(){\n \tList<DishItem> dish = new ArrayList<DishItem>();\n\t\t\n\t\t//User user = userDao.find();\n\t\t//String tokenString = user.getToken();\n\t\t\n\t\tString dishResult;\t\t\n\t\tString urlString=\"/service/dish/getalldishs\";\n\t\ttry {\n\t\t\tdishResult = connect.testURLConn1(urlString);\n\t\t\tJSONObject jsonObject = new JSONObject(dishResult);System.out.println(\"jsonObject==\"+jsonObject);\n\t\t\tJSONArray jsonArray = jsonObject.getJSONArray(\"date\");System.out.println(\"jsonArray==\"+jsonArray);\n\t\t\t//userJSON = jsonObject.getJSONObject(\"user\");\n\t\t\t\n\t\t\tfor(int i=0;i<jsonArray.length();i++){ \n\t\t\t\t JSONObject jo = (JSONObject)jsonArray.opt(i);\n\t\t String id = jo.getString(\"_id\");\n\t\t String dishName = jo.getString(\"dishName\");\n\t\t String desc = jo.getString(\"desc\");\n\t\t int pic=jo.getInt(\"pic\");\n\t\t int col=jo.getInt(\"col\");\n\t\t DishItem dishitem = new DishItem(id, dishName, desc,pic,col);\n\t dish.add(dishitem);\n\t }\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\treturn dish;\n\t\t\n\t}", "@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}", "List<SellMedia> selectSellMediaByExample(SellMediaExample example) throws SQLException;", "@Override\n public List<SideDishEntity> findAll(Iterable<Long> ids) {\n return null;\n }", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "@Override\n public void showDiaryFromDB() {\n diaryPresenter.showDiaryFromDB();\n }", "Disproduct selectByPrimaryKey(String samId);", "@Dao\npublic interface ScenicPicDao {\n @Insert\n void insertScenicPic(ScenicPic scenicPic);\n\n @Query(\"DELETE from ScenicPic where scenic_id=:scenicId\")\n void deleteAllScenicPic(int scenicId);\n\n //return live data when data be changed, list update automatically\n @Query(\"select * from ScenicPic where scenic_id=:scenicId\")\n List<ScenicPic> getScenicPicById(int scenicId);\n}", "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }", "Nutrition selectByPrimaryKey(Integer nutritionid);", "public interface DishDao {\n Dish findOne(long id);\n List<Dish> findAll();\n void create(Dish entity);\n Dish update(Dish entity);\n void delete(Dish entity);\n void deleteById(long entityId);\n}", "private Shelf fillShelf(ResultSet rs) throws SQLException{\n Shelf shelf = new Shelf();\n shelf.setId(rs.getInt(\"id\"));\n shelf.setColumn(rs.getInt(\"col\"));\n shelf.setRow(rs.getInt(\"row\"));\n shelf.setMaxWeight(rs.getDouble(\"maxWeight\"));\n shelf.setCapacity(rs.getInt(\"capacity\"));\n shelf.setSecure(rs.getBoolean(\"secure\"));\n return shelf;\n }", "public interface SideEntityDao extends CrudRepository<SideEntity, Long> {\n\n\tSet<SideEntity> findAll();\n\n}", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "@SqlQuery(\"select * from PLAYERSTATS order by KILLS DESC FETCH FIRST 10 ROWS ONLY\")\n List<PlayerStats> findKillsHighScores();", "public String getName() {\n return dishName;\n }", "public java.sql.ResultSet DatosdelaCita(String CodHorMed){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n \tSystem.out.println(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>DatosdelaCita \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "UvStatDay selectByPrimaryKey(Long id);", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "public String getDishOfTheDay(){\n return dishOfTheDay;\n }", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "public List<DiseasePojo> diseaseAll() \n\t{\n\n\t\tString sql = \"SELECT * FROM diseasemaster\";\n\t\treturn jdbcTemplate.query(sql, new ResultSetExtractor<List<DiseasePojo>>()\n\t\t{\n\t public List<DiseasePojo> extractData(ResultSet rs) throws SQLException,\n\t DataAccessException {\n\t \tList<DiseasePojo> list = new ArrayList<DiseasePojo>();\n\t while(rs.next()) {\n\t \tDiseasePojo dt = new DiseasePojo();\n\t \n\t dt.setDiseaseId(rs.getInt(\"DISEASEID\"));\n\t dt.setDiseaseCode(rs.getString(\"DISEASECODE\"));\n\t dt.setDiseaseName(rs.getString(\"DISEASENAME\"));\n\t list.add(dt);\n\t }\n\t return list;\n\t \n\t }\n\t });\n\t\n\t}", "public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }", "public interface IExampleWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void example(org.linlinjava.litemall.db.domain.example.SaleClassifyGoodExample example);\n }", "public Medium[] getDiscs() {\n Session session = getSessionFactory().openSession();\n session.beginTransaction();\n List<Disc> discList = session.createQuery(\"from Disc\", Disc.class).list();\n session.getTransaction().commit();\n session.close();\n return discList.toArray(new Medium[discList.size()]);\n }", "Kaiwa selectByPrimaryKey(String maht);", "public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "HospitalType selectByPrimaryKey(String id);", "PathologyInfo selectByPrimaryKey(Integer id);", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n KDUserMedal selectByPrimaryKey(Long id);", "public void setName(String dishName) {\n this.dishName = dishName;\n }", "public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface ProfitprofitActionRuleDao extends EntityMybatisDao<ProfitprofitActionRule> {\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate);\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate},cal_type=#{calType} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionIdUpdateAalRateAndCalType(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate, @Param(\"calType\") String calType);\n \n @Select(\"select * from profit_action_rule where section_id=#{sectionId}\")\n ProfitprofitActionRule selectProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String\n sectionId);\n\n @Delete(\"delete from profit_action_rule where id =#{id}\")\n void deleteProfitActionRuleById(@Param(\"id\")Long id);\n\n @Delete(\"delete from profit_action_rule \")\n void deleteProfitActionRuleByAll();\n \n}", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "BpmInstanciaHistorica selectByPrimaryKey(Long idreg);", "MenuInfo selectByPrimaryKey(Integer menuid);", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "public IMDBBaseEntity entityPerResultSet(ResultSet rs) throws SQLException {\n return null;\n }", "List selectByExample(BnesBrowsingHisExample example) throws SQLException;", "public interface ArchetypeLevelsSchema {\n\tString TABLE_NAME = \"creature_archetype_levels\";\n\n\tString COLUMN_ARCHETYPE_ID = \"archetypeId\";\n\tString COLUMN_LEVEL = \"level\";\n\tString COLUMN_ATTACK = \"attack\";\n\tString COLUMN_ATTACK2 = \"attack2\";\n\tString COLUMN_DEF_BONUS = \"defensiveBonus\";\n\tString COLUMN_BODY_DEV = \"bodyDevelopment\";\n\tString COLUMN_PRIME_SKILL = \"primeSkill\";\n\tString COLUMN_SECONDARY_SKILL = \"secondarySkill\";\n\tString COLUMN_POWER_DEV = \"powerDevelopment\";\n\tString COLUMN_SPELLS = \"spells\";\n\tString COLUMN_TALENT_DP = \"talentDP\";\n\tString COLUMN_AGILITY = \"agility\";\n\tString COLUMN_CONS_STAT = \"constitutionStat\";\n\tString COLUMN_CONSTITUTION = \"constitution\";\n\tString COLUMN_EMPATHY = \"empathy\";\n\tString COLUMN_INTUITION = \"intuition\";\n\tString COLUMN_MEMORY = \"memory\";\n\tString COLUMN_PRESENCE = \"presence\";\n\tString COLUMN_QUICKNESS = \"quickness\";\n\tString COLUMN_REASONING = \"reasoning\";\n\tString COLUMN_SELF_DISC = \"selfDiscipline\";\n\tString COLUMN_STRENGTH = \"strength\";\n\n\tString TABLE_CREATE = \"CREATE TABLE IF NOT EXISTS \"\n\t\t\t+ TABLE_NAME\n\t\t\t+ \" (\"\n\t\t\t+ COLUMN_ARCHETYPE_ID + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_LEVEL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK2 + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_DEF_BONUS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_BODY_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRIME_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SECONDARY_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_POWER_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SPELLS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_TALENT_DP + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_AGILITY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONS_STAT + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONSTITUTION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_EMPATHY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_INTUITION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_MEMORY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRESENCE + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_QUICKNESS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_REASONING + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SELF_DISC + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_STRENGTH + \" INTEGER NOT NULL, \"\n\t\t\t+ \"PRIMARY KEY(\" + COLUMN_ARCHETYPE_ID + \",\" + COLUMN_LEVEL + \")\"\n\t\t\t+ \")\";\n\n\tString[] COLUMNS = new String[] { COLUMN_ARCHETYPE_ID, COLUMN_LEVEL, COLUMN_ATTACK, COLUMN_ATTACK2, COLUMN_DEF_BONUS,\n\t\t\tCOLUMN_BODY_DEV, COLUMN_PRIME_SKILL, COLUMN_SECONDARY_SKILL, COLUMN_POWER_DEV, COLUMN_SPELLS, COLUMN_TALENT_DP,\n\t\t\tCOLUMN_AGILITY, COLUMN_CONS_STAT, COLUMN_CONSTITUTION, COLUMN_EMPATHY, COLUMN_INTUITION, COLUMN_MEMORY,\n\t\t\tCOLUMN_PRESENCE, COLUMN_QUICKNESS, COLUMN_REASONING, COLUMN_SELF_DISC, COLUMN_STRENGTH};\n}", "public interface ICriteriaWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void criteria(Criteria criteria);\n }", "SysPic selectByPrimaryKey(Integer id);", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "@Dao\npublic interface MedicalCategoryDAO {\n\n\n\n @Query(\"SELECT * FROM medicalcategory\")\n List<MedicalCategory> getAll();\n\n @Query(\"SELECT COUNT(*) from medicalcategory\")\n int countcategories();\n\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertAll(MedicalCategory... medicalCategories);\n\n\n @Insert(onConflict = OnConflictStrategy.IGNORE)\n void insertsingle(MedicalCategory medicalCategory);\n\n\n}", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings(\"rawtypes\")\n\t@Override\n\t@Transactional(readOnly=true)\n\tpublic List listMissTheme(MissTheme persistentInstance)\n\t\t\tthrows DataAccessException {\n\t\tSession session = sessionAnnotationFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"select missTheme from MissTheme missTheme order by missTheme.mtId asc \");\n\t\treturn query.list();\n\t}", "public void showIngredients() {\n list = dbController.getIngredientsList();\n\n idColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Integer>(\"id\"));\n nameColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, String>(\"name\"));\n caloriesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"calories\"));\n proteinColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"protein\"));\n fatColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"fat\"));\n carbohydratesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"carbohydrates\"));\n selectColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, CheckBox>(\"select\"));\n\n TableView.setItems(list);\n }", "public interface ClothDao {\n /**\n * 判断衣服Id是否存在\n * @param id\n * @return boolean\n */\n boolean isClothIdExists(int id);\n /**\n * 返回图片\n * @param clothId\n * @return Clothinfostring\n */\n String getClothById(int clothId);\n /**\n * 返回图片\n * @param none\n * @return Cloth Ids\n */\n String getAllCloth();\n\n}", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "GirlInfo selectByPrimaryKey(Integer id);", "int updateByPrimaryKey(Dish record);", "public List<MediumBean> populatemediam(String sql ){\n\t\t\t\tList<MediumBean> retlist = jdbcTemplate.query(sql,ParameterizedBeanPropertyRowMapper.newInstance(MediumBean.class));\n\t\t\t\t\treturn retlist;\n\t\t }", "public void formDatabaseTable() {\n }", "List<Horse> getAllHorses();", "int updateByPrimaryKeySelective(Dish record);", "Drug_OutWarehouse selectByPrimaryKey(Long id);", "@AfterQuery\n\t\tpublic void spriden_AfterQuery(RowAdapterEvent args)\n\t\t{\n\t\t\t\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)args.getRow();\n\n\n\t\t\t\tint rowCount = 0;\n\t\t\t\t{\n\t\t\t\t\tString sqlptiCursor = \"SELECT SPBPERS_BIRTH_DATE, SPBPERS_SEX \" +\n\t\" FROM SPBPERS \" +\n\t\" WHERE SPBPERS_PIDM = :SPRIDEN_PIDM \";\n\t\t\t\t\tDataCursor ptiCursor = new DataCursor(sqlptiCursor);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//Setting query parameters\n\t\t\t\t\t\tptiCursor.addParameter(\"SPRIDEN_PIDM\", spridenElement.getSpridenPidm());\n\t\t\t\t\t\tptiCursor.open();\n\t\t\t\t\t\tResultSet ptiCursorResults = ptiCursor.fetchInto();\n\t\t\t\t\t\tif ( ptiCursorResults != null ) {\n\t\t\t\t\t\t\tspridenElement.setBirthdate(ptiCursorResults.getDate(0));\n\t\t\t\t\t\t\tspridenElement.setSex(ptiCursorResults.getStr(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally{\n\t\t\t\t\t\tptiCursor.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@SqlQuery(\"select * from PLAYERSTATS where SCOREID = :id\")\n PlayerStats findByScoreId(@Bind(\"id\") String id);", "List<Horario_Disponible> findAll();", "@Override\n\tpublic List<Chitietdonhang> tinhDoanhThuTheoNam(Integer nam) {\n\t\treturn chiTietDonHangRepository.tinhDoanhThuTheoNam(nam);\n\t}", "public interface BattleDao {\n\n @Select(\"SELECT * FROM battle WHERE chapter_id = #{chapterId} order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattleByChapterId(String chapterId);\n\n @Select(\"SELECT * FROM battle order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattle();\n\n @Select(\"SELECT * FROM battle WHERE battle_id = #{battleId}\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public Battle getBattleById(String battleId);\n}", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n List<KDUserMedal> selectAll();" ]
[ "0.560114", "0.538416", "0.53013885", "0.52881795", "0.5206365", "0.5200112", "0.5123933", "0.5113557", "0.5111038", "0.5087587", "0.5087201", "0.5055471", "0.5037925", "0.50137585", "0.5001423", "0.499934", "0.49889484", "0.4978261", "0.4961641", "0.49530965", "0.4940532", "0.49399298", "0.4935291", "0.49325922", "0.49165592", "0.48989907", "0.4877665", "0.48728466", "0.48678777", "0.48480317", "0.48376018", "0.48303312", "0.48197308", "0.48195714", "0.48178104", "0.4812278", "0.48071072", "0.48033354", "0.4790985", "0.4769452", "0.47646776", "0.47512186", "0.4746261", "0.47407556", "0.47259918", "0.47228697", "0.47161078", "0.47157538", "0.47155493", "0.4707758", "0.4706416", "0.47048804", "0.4699233", "0.46963036", "0.46962333", "0.46948344", "0.46941608", "0.4691967", "0.4687983", "0.46828815", "0.4682078", "0.468191", "0.46812382", "0.46754143", "0.46752995", "0.4675083", "0.46696302", "0.46645203", "0.46633705", "0.46582875", "0.4653521", "0.46471906", "0.4642964", "0.46404076", "0.46403554", "0.4639644", "0.46360135", "0.46352234", "0.46345302", "0.4630339", "0.46294755", "0.46284315", "0.46273106", "0.46230718", "0.4620601", "0.4619866", "0.4619363", "0.46174726", "0.4617433", "0.46169445", "0.46093524", "0.46090022", "0.46029115", "0.46018702", "0.45972648", "0.4592926", "0.45927244", "0.45882338", "0.45881224", "0.45808488", "0.457806" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table dish
int insert(Dish record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Dish selectByPrimaryKey(String id);", "@Override\n public List<SideDishEntity> findAll() {\n return null;\n }", "List<TblMotherSon> selectByExample(TblMotherSonExample example);", "@Override\r\n\tpublic int create(Dish dish) {\r\n\t\t\r\n//\t\thashMap.put(dish.getId(), dish);\r\n\t\tSystem.out.println(\" Creating Dish\");\r\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(dish);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n//\t\tSystem.out.println(\"Dish create successfully\" +dish.toString());\r\n\t\treturn dish.getId();\r\n\t\t\r\n\t}", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface PreparedDishHistoryDAO {\n int addPreparedDish(PreparedDish dish);\n List<PreparedDish> getAll();\n}", "public static ArrayList<Dish> getDishesByMenuId(String mid) throws SQLException {\r\n\t\tArrayList<Dish> result = new ArrayList<Dish>();\r\n\t\tString sql = \"SELECT dish_id, name, price, picture, description FROM dish\" + \" WHERE menu_id = ?\";\r\n\t\tResultSet rs;\r\n\t\tint dishId = -1;\r\n\t\tString name = \"\";\r\n\t\tfloat price = 0f;\r\n\t\tString filePath = \"\";\r\n\t\tString description = \"\";\r\n\r\n\t\tPreparedStatement sqlPrepared = DBConnection.prepare(sql);\r\n\t\tsqlPrepared.setString(1, mid);\r\n\t\trs = sqlPrepared.executeQuery();\r\n\t\twhile (rs.next()) {\r\n\t\t\tdishId = rs.getInt(1);\r\n\t\t\tname = rs.getString(2);\r\n\t\t\tprice = rs.getFloat(3);\r\n\t\t\tfilePath = rs.getString(4);\r\n\t\t\tdescription = rs.getString(5);\r\n\t\t\tDish dish = new Dish(String.valueOf(dishId), price, name, description,filePath);\r\n\t\t\t//put dish into identity map\r\n\t\t\tIdentityMap<Dish> map = IdentityMap.getInstance(dish);\r\n\t\t\tmap.put(dishId,dish);\r\n\t\t\t\r\n\t\t\tresult.add(dish);\r\n\t\t}\r\n\t\tsqlPrepared.close();\r\n\t\tDBConnection.dbConnection.close();\r\n\t\treturn result;\r\n\t}", "HrMscChaAssig selectByPrimaryKey(Date day, Integer hour, String mscid);", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();", "void fetchHolidayRentalHousesData();", "@Override\r\n public String storyID() {\r\n return \"HD\";\r\n }", "public ForeignInfo foreignStShohinKonyu() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnStShohinKonyuId(), StShohinKonyuDbm.getInstance().columnStShohinKonyuId());\n return cfi(\"FK_ST_SHHN_KNY_MS_ST_SHOHIN_KONYU\", \"stShohinKonyu\", this, StShohinKonyuDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "public ForeignInfo foreignSmShohin() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnSmShohinId(), SmShohinDbm.getInstance().columnSmShohinId());\n return cfi(\"FK_ST_SHHN_KNY_MS_SM_SHOHIN\", \"smShohin\", this, SmShohinDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "@Select({\n \"select\",\n \"`cate_id`, `cate_name`\",\n \"from `category`\",\n \"where `cate_id` = #{cateId,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n Category selectByPrimaryKey(Integer cateId);", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public interface DishDao {\n\n void save(Dish dish);\n List<Dish> findAll();\n Dish findByName(String name);\n\n void removeAll();\n}", "List<Dish> selectByExample(DishExample example);", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}", "@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }", "HelpInfo selectByPrimaryKey(Integer hId);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n News selectByPrimaryKey(Integer newsId);", "public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "public List<DishItem> getDish(){\n \tList<DishItem> dish = new ArrayList<DishItem>();\n\t\t\n\t\t//User user = userDao.find();\n\t\t//String tokenString = user.getToken();\n\t\t\n\t\tString dishResult;\t\t\n\t\tString urlString=\"/service/dish/getalldishs\";\n\t\ttry {\n\t\t\tdishResult = connect.testURLConn1(urlString);\n\t\t\tJSONObject jsonObject = new JSONObject(dishResult);System.out.println(\"jsonObject==\"+jsonObject);\n\t\t\tJSONArray jsonArray = jsonObject.getJSONArray(\"date\");System.out.println(\"jsonArray==\"+jsonArray);\n\t\t\t//userJSON = jsonObject.getJSONObject(\"user\");\n\t\t\t\n\t\t\tfor(int i=0;i<jsonArray.length();i++){ \n\t\t\t\t JSONObject jo = (JSONObject)jsonArray.opt(i);\n\t\t String id = jo.getString(\"_id\");\n\t\t String dishName = jo.getString(\"dishName\");\n\t\t String desc = jo.getString(\"desc\");\n\t\t int pic=jo.getInt(\"pic\");\n\t\t int col=jo.getInt(\"col\");\n\t\t DishItem dishitem = new DishItem(id, dishName, desc,pic,col);\n\t dish.add(dishitem);\n\t }\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\treturn dish;\n\t\t\n\t}", "@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}", "List<SellMedia> selectSellMediaByExample(SellMediaExample example) throws SQLException;", "@Override\n public List<SideDishEntity> findAll(Iterable<Long> ids) {\n return null;\n }", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "@Override\n public void showDiaryFromDB() {\n diaryPresenter.showDiaryFromDB();\n }", "Disproduct selectByPrimaryKey(String samId);", "@Dao\npublic interface ScenicPicDao {\n @Insert\n void insertScenicPic(ScenicPic scenicPic);\n\n @Query(\"DELETE from ScenicPic where scenic_id=:scenicId\")\n void deleteAllScenicPic(int scenicId);\n\n //return live data when data be changed, list update automatically\n @Query(\"select * from ScenicPic where scenic_id=:scenicId\")\n List<ScenicPic> getScenicPicById(int scenicId);\n}", "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }", "Nutrition selectByPrimaryKey(Integer nutritionid);", "public interface DishDao {\n Dish findOne(long id);\n List<Dish> findAll();\n void create(Dish entity);\n Dish update(Dish entity);\n void delete(Dish entity);\n void deleteById(long entityId);\n}", "private Shelf fillShelf(ResultSet rs) throws SQLException{\n Shelf shelf = new Shelf();\n shelf.setId(rs.getInt(\"id\"));\n shelf.setColumn(rs.getInt(\"col\"));\n shelf.setRow(rs.getInt(\"row\"));\n shelf.setMaxWeight(rs.getDouble(\"maxWeight\"));\n shelf.setCapacity(rs.getInt(\"capacity\"));\n shelf.setSecure(rs.getBoolean(\"secure\"));\n return shelf;\n }", "public interface SideEntityDao extends CrudRepository<SideEntity, Long> {\n\n\tSet<SideEntity> findAll();\n\n}", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "@SqlQuery(\"select * from PLAYERSTATS order by KILLS DESC FETCH FIRST 10 ROWS ONLY\")\n List<PlayerStats> findKillsHighScores();", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public String getName() {\n return dishName;\n }", "public java.sql.ResultSet DatosdelaCita(String CodHorMed){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n \tSystem.out.println(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>DatosdelaCita \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "UvStatDay selectByPrimaryKey(Long id);", "public String getDishOfTheDay(){\n return dishOfTheDay;\n }", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "public List<DiseasePojo> diseaseAll() \n\t{\n\n\t\tString sql = \"SELECT * FROM diseasemaster\";\n\t\treturn jdbcTemplate.query(sql, new ResultSetExtractor<List<DiseasePojo>>()\n\t\t{\n\t public List<DiseasePojo> extractData(ResultSet rs) throws SQLException,\n\t DataAccessException {\n\t \tList<DiseasePojo> list = new ArrayList<DiseasePojo>();\n\t while(rs.next()) {\n\t \tDiseasePojo dt = new DiseasePojo();\n\t \n\t dt.setDiseaseId(rs.getInt(\"DISEASEID\"));\n\t dt.setDiseaseCode(rs.getString(\"DISEASECODE\"));\n\t dt.setDiseaseName(rs.getString(\"DISEASENAME\"));\n\t list.add(dt);\n\t }\n\t return list;\n\t \n\t }\n\t });\n\t\n\t}", "public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }", "public interface IExampleWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void example(org.linlinjava.litemall.db.domain.example.SaleClassifyGoodExample example);\n }", "public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public Medium[] getDiscs() {\n Session session = getSessionFactory().openSession();\n session.beginTransaction();\n List<Disc> discList = session.createQuery(\"from Disc\", Disc.class).list();\n session.getTransaction().commit();\n session.close();\n return discList.toArray(new Medium[discList.size()]);\n }", "Kaiwa selectByPrimaryKey(String maht);", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "HospitalType selectByPrimaryKey(String id);", "PathologyInfo selectByPrimaryKey(Integer id);", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n KDUserMedal selectByPrimaryKey(Long id);", "public void setName(String dishName) {\n this.dishName = dishName;\n }", "public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface ProfitprofitActionRuleDao extends EntityMybatisDao<ProfitprofitActionRule> {\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate);\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate},cal_type=#{calType} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionIdUpdateAalRateAndCalType(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate, @Param(\"calType\") String calType);\n \n @Select(\"select * from profit_action_rule where section_id=#{sectionId}\")\n ProfitprofitActionRule selectProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String\n sectionId);\n\n @Delete(\"delete from profit_action_rule where id =#{id}\")\n void deleteProfitActionRuleById(@Param(\"id\")Long id);\n\n @Delete(\"delete from profit_action_rule \")\n void deleteProfitActionRuleByAll();\n \n}", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "BpmInstanciaHistorica selectByPrimaryKey(Long idreg);", "MenuInfo selectByPrimaryKey(Integer menuid);", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "List selectByExample(BnesBrowsingHisExample example) throws SQLException;", "public interface ArchetypeLevelsSchema {\n\tString TABLE_NAME = \"creature_archetype_levels\";\n\n\tString COLUMN_ARCHETYPE_ID = \"archetypeId\";\n\tString COLUMN_LEVEL = \"level\";\n\tString COLUMN_ATTACK = \"attack\";\n\tString COLUMN_ATTACK2 = \"attack2\";\n\tString COLUMN_DEF_BONUS = \"defensiveBonus\";\n\tString COLUMN_BODY_DEV = \"bodyDevelopment\";\n\tString COLUMN_PRIME_SKILL = \"primeSkill\";\n\tString COLUMN_SECONDARY_SKILL = \"secondarySkill\";\n\tString COLUMN_POWER_DEV = \"powerDevelopment\";\n\tString COLUMN_SPELLS = \"spells\";\n\tString COLUMN_TALENT_DP = \"talentDP\";\n\tString COLUMN_AGILITY = \"agility\";\n\tString COLUMN_CONS_STAT = \"constitutionStat\";\n\tString COLUMN_CONSTITUTION = \"constitution\";\n\tString COLUMN_EMPATHY = \"empathy\";\n\tString COLUMN_INTUITION = \"intuition\";\n\tString COLUMN_MEMORY = \"memory\";\n\tString COLUMN_PRESENCE = \"presence\";\n\tString COLUMN_QUICKNESS = \"quickness\";\n\tString COLUMN_REASONING = \"reasoning\";\n\tString COLUMN_SELF_DISC = \"selfDiscipline\";\n\tString COLUMN_STRENGTH = \"strength\";\n\n\tString TABLE_CREATE = \"CREATE TABLE IF NOT EXISTS \"\n\t\t\t+ TABLE_NAME\n\t\t\t+ \" (\"\n\t\t\t+ COLUMN_ARCHETYPE_ID + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_LEVEL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK2 + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_DEF_BONUS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_BODY_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRIME_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SECONDARY_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_POWER_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SPELLS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_TALENT_DP + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_AGILITY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONS_STAT + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONSTITUTION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_EMPATHY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_INTUITION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_MEMORY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRESENCE + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_QUICKNESS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_REASONING + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SELF_DISC + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_STRENGTH + \" INTEGER NOT NULL, \"\n\t\t\t+ \"PRIMARY KEY(\" + COLUMN_ARCHETYPE_ID + \",\" + COLUMN_LEVEL + \")\"\n\t\t\t+ \")\";\n\n\tString[] COLUMNS = new String[] { COLUMN_ARCHETYPE_ID, COLUMN_LEVEL, COLUMN_ATTACK, COLUMN_ATTACK2, COLUMN_DEF_BONUS,\n\t\t\tCOLUMN_BODY_DEV, COLUMN_PRIME_SKILL, COLUMN_SECONDARY_SKILL, COLUMN_POWER_DEV, COLUMN_SPELLS, COLUMN_TALENT_DP,\n\t\t\tCOLUMN_AGILITY, COLUMN_CONS_STAT, COLUMN_CONSTITUTION, COLUMN_EMPATHY, COLUMN_INTUITION, COLUMN_MEMORY,\n\t\t\tCOLUMN_PRESENCE, COLUMN_QUICKNESS, COLUMN_REASONING, COLUMN_SELF_DISC, COLUMN_STRENGTH};\n}", "public IMDBBaseEntity entityPerResultSet(ResultSet rs) throws SQLException {\n return null;\n }", "public interface ICriteriaWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void criteria(Criteria criteria);\n }", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "SysPic selectByPrimaryKey(Integer id);", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "@Dao\npublic interface MedicalCategoryDAO {\n\n\n\n @Query(\"SELECT * FROM medicalcategory\")\n List<MedicalCategory> getAll();\n\n @Query(\"SELECT COUNT(*) from medicalcategory\")\n int countcategories();\n\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertAll(MedicalCategory... medicalCategories);\n\n\n @Insert(onConflict = OnConflictStrategy.IGNORE)\n void insertsingle(MedicalCategory medicalCategory);\n\n\n}", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings(\"rawtypes\")\n\t@Override\n\t@Transactional(readOnly=true)\n\tpublic List listMissTheme(MissTheme persistentInstance)\n\t\t\tthrows DataAccessException {\n\t\tSession session = sessionAnnotationFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"select missTheme from MissTheme missTheme order by missTheme.mtId asc \");\n\t\treturn query.list();\n\t}", "public void showIngredients() {\n list = dbController.getIngredientsList();\n\n idColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Integer>(\"id\"));\n nameColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, String>(\"name\"));\n caloriesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"calories\"));\n proteinColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"protein\"));\n fatColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"fat\"));\n carbohydratesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"carbohydrates\"));\n selectColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, CheckBox>(\"select\"));\n\n TableView.setItems(list);\n }", "public interface ClothDao {\n /**\n * 判断衣服Id是否存在\n * @param id\n * @return boolean\n */\n boolean isClothIdExists(int id);\n /**\n * 返回图片\n * @param clothId\n * @return Clothinfostring\n */\n String getClothById(int clothId);\n /**\n * 返回图片\n * @param none\n * @return Cloth Ids\n */\n String getAllCloth();\n\n}", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "GirlInfo selectByPrimaryKey(Integer id);", "int updateByPrimaryKey(Dish record);", "public List<MediumBean> populatemediam(String sql ){\n\t\t\t\tList<MediumBean> retlist = jdbcTemplate.query(sql,ParameterizedBeanPropertyRowMapper.newInstance(MediumBean.class));\n\t\t\t\t\treturn retlist;\n\t\t }", "List<Horse> getAllHorses();", "public void formDatabaseTable() {\n }", "int updateByPrimaryKeySelective(Dish record);", "Drug_OutWarehouse selectByPrimaryKey(Long id);", "@SqlQuery(\"select * from PLAYERSTATS where SCOREID = :id\")\n PlayerStats findByScoreId(@Bind(\"id\") String id);", "@AfterQuery\n\t\tpublic void spriden_AfterQuery(RowAdapterEvent args)\n\t\t{\n\t\t\t\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)args.getRow();\n\n\n\t\t\t\tint rowCount = 0;\n\t\t\t\t{\n\t\t\t\t\tString sqlptiCursor = \"SELECT SPBPERS_BIRTH_DATE, SPBPERS_SEX \" +\n\t\" FROM SPBPERS \" +\n\t\" WHERE SPBPERS_PIDM = :SPRIDEN_PIDM \";\n\t\t\t\t\tDataCursor ptiCursor = new DataCursor(sqlptiCursor);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//Setting query parameters\n\t\t\t\t\t\tptiCursor.addParameter(\"SPRIDEN_PIDM\", spridenElement.getSpridenPidm());\n\t\t\t\t\t\tptiCursor.open();\n\t\t\t\t\t\tResultSet ptiCursorResults = ptiCursor.fetchInto();\n\t\t\t\t\t\tif ( ptiCursorResults != null ) {\n\t\t\t\t\t\t\tspridenElement.setBirthdate(ptiCursorResults.getDate(0));\n\t\t\t\t\t\t\tspridenElement.setSex(ptiCursorResults.getStr(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally{\n\t\t\t\t\t\tptiCursor.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "List<Horario_Disponible> findAll();", "@Override\n\tpublic List<Chitietdonhang> tinhDoanhThuTheoNam(Integer nam) {\n\t\treturn chiTietDonHangRepository.tinhDoanhThuTheoNam(nam);\n\t}", "@Override\r\n\tpublic List<Item> getAllHomework() {\n\t\t\r\n\t\treturn itemdao.find(\"from Item\");\r\n\t}", "public interface BattleDao {\n\n @Select(\"SELECT * FROM battle WHERE chapter_id = #{chapterId} order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattleByChapterId(String chapterId);\n\n @Select(\"SELECT * FROM battle order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattle();\n\n @Select(\"SELECT * FROM battle WHERE battle_id = #{battleId}\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public Battle getBattleById(String battleId);\n}" ]
[ "0.5601384", "0.53847265", "0.53002006", "0.52877796", "0.5206473", "0.51989734", "0.512477", "0.51117724", "0.5110217", "0.50892353", "0.5086627", "0.50535595", "0.50392836", "0.5013054", "0.5000241", "0.49984863", "0.49878994", "0.4977363", "0.49618345", "0.49523816", "0.49413592", "0.49389786", "0.4936248", "0.49332213", "0.49159628", "0.48967457", "0.48747426", "0.48719296", "0.4866831", "0.4848449", "0.483695", "0.48282132", "0.48195234", "0.4819503", "0.48168626", "0.48117268", "0.48043272", "0.4802299", "0.47883394", "0.47670814", "0.47636375", "0.47515178", "0.47449932", "0.47405112", "0.472486", "0.4720551", "0.4715175", "0.47136694", "0.4713145", "0.4707876", "0.47049212", "0.47037968", "0.46969354", "0.46960127", "0.46940917", "0.46940675", "0.46927306", "0.46913096", "0.46863195", "0.46815738", "0.46813998", "0.46806088", "0.46799222", "0.4675046", "0.4674654", "0.46715364", "0.46694893", "0.46642768", "0.46617723", "0.46563613", "0.465108", "0.46477005", "0.46408916", "0.46398345", "0.46397385", "0.4639085", "0.46344775", "0.46343386", "0.46340328", "0.46293363", "0.4629191", "0.46266726", "0.46262392", "0.46213406", "0.4619893", "0.46197516", "0.4618171", "0.46172377", "0.46171603", "0.46165928", "0.46078062", "0.46062034", "0.46053603", "0.46021193", "0.45952573", "0.4591363", "0.45908362", "0.45885736", "0.45880747", "0.45796278", "0.45795974" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table dish
int insertSelective(Dish record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Dish selectByPrimaryKey(String id);", "@Override\n public List<SideDishEntity> findAll() {\n return null;\n }", "List<TblMotherSon> selectByExample(TblMotherSonExample example);", "@Override\r\n\tpublic int create(Dish dish) {\r\n\t\t\r\n//\t\thashMap.put(dish.getId(), dish);\r\n\t\tSystem.out.println(\" Creating Dish\");\r\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(dish);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n//\t\tSystem.out.println(\"Dish create successfully\" +dish.toString());\r\n\t\treturn dish.getId();\r\n\t\t\r\n\t}", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface PreparedDishHistoryDAO {\n int addPreparedDish(PreparedDish dish);\n List<PreparedDish> getAll();\n}", "public static ArrayList<Dish> getDishesByMenuId(String mid) throws SQLException {\r\n\t\tArrayList<Dish> result = new ArrayList<Dish>();\r\n\t\tString sql = \"SELECT dish_id, name, price, picture, description FROM dish\" + \" WHERE menu_id = ?\";\r\n\t\tResultSet rs;\r\n\t\tint dishId = -1;\r\n\t\tString name = \"\";\r\n\t\tfloat price = 0f;\r\n\t\tString filePath = \"\";\r\n\t\tString description = \"\";\r\n\r\n\t\tPreparedStatement sqlPrepared = DBConnection.prepare(sql);\r\n\t\tsqlPrepared.setString(1, mid);\r\n\t\trs = sqlPrepared.executeQuery();\r\n\t\twhile (rs.next()) {\r\n\t\t\tdishId = rs.getInt(1);\r\n\t\t\tname = rs.getString(2);\r\n\t\t\tprice = rs.getFloat(3);\r\n\t\t\tfilePath = rs.getString(4);\r\n\t\t\tdescription = rs.getString(5);\r\n\t\t\tDish dish = new Dish(String.valueOf(dishId), price, name, description,filePath);\r\n\t\t\t//put dish into identity map\r\n\t\t\tIdentityMap<Dish> map = IdentityMap.getInstance(dish);\r\n\t\t\tmap.put(dishId,dish);\r\n\t\t\t\r\n\t\t\tresult.add(dish);\r\n\t\t}\r\n\t\tsqlPrepared.close();\r\n\t\tDBConnection.dbConnection.close();\r\n\t\treturn result;\r\n\t}", "HrMscChaAssig selectByPrimaryKey(Date day, Integer hour, String mscid);", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();", "void fetchHolidayRentalHousesData();", "@Override\r\n public String storyID() {\r\n return \"HD\";\r\n }", "public ForeignInfo foreignStShohinKonyu() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnStShohinKonyuId(), StShohinKonyuDbm.getInstance().columnStShohinKonyuId());\n return cfi(\"FK_ST_SHHN_KNY_MS_ST_SHOHIN_KONYU\", \"stShohinKonyu\", this, StShohinKonyuDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "public ForeignInfo foreignSmShohin() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnSmShohinId(), SmShohinDbm.getInstance().columnSmShohinId());\n return cfi(\"FK_ST_SHHN_KNY_MS_SM_SHOHIN\", \"smShohin\", this, SmShohinDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "@Select({\n \"select\",\n \"`cate_id`, `cate_name`\",\n \"from `category`\",\n \"where `cate_id` = #{cateId,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n Category selectByPrimaryKey(Integer cateId);", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public interface DishDao {\n\n void save(Dish dish);\n List<Dish> findAll();\n Dish findByName(String name);\n\n void removeAll();\n}", "List<Dish> selectByExample(DishExample example);", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}", "@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }", "HelpInfo selectByPrimaryKey(Integer hId);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n News selectByPrimaryKey(Integer newsId);", "public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "public List<DishItem> getDish(){\n \tList<DishItem> dish = new ArrayList<DishItem>();\n\t\t\n\t\t//User user = userDao.find();\n\t\t//String tokenString = user.getToken();\n\t\t\n\t\tString dishResult;\t\t\n\t\tString urlString=\"/service/dish/getalldishs\";\n\t\ttry {\n\t\t\tdishResult = connect.testURLConn1(urlString);\n\t\t\tJSONObject jsonObject = new JSONObject(dishResult);System.out.println(\"jsonObject==\"+jsonObject);\n\t\t\tJSONArray jsonArray = jsonObject.getJSONArray(\"date\");System.out.println(\"jsonArray==\"+jsonArray);\n\t\t\t//userJSON = jsonObject.getJSONObject(\"user\");\n\t\t\t\n\t\t\tfor(int i=0;i<jsonArray.length();i++){ \n\t\t\t\t JSONObject jo = (JSONObject)jsonArray.opt(i);\n\t\t String id = jo.getString(\"_id\");\n\t\t String dishName = jo.getString(\"dishName\");\n\t\t String desc = jo.getString(\"desc\");\n\t\t int pic=jo.getInt(\"pic\");\n\t\t int col=jo.getInt(\"col\");\n\t\t DishItem dishitem = new DishItem(id, dishName, desc,pic,col);\n\t dish.add(dishitem);\n\t }\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\treturn dish;\n\t\t\n\t}", "@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}", "List<SellMedia> selectSellMediaByExample(SellMediaExample example) throws SQLException;", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@Override\n public List<SideDishEntity> findAll(Iterable<Long> ids) {\n return null;\n }", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "@Override\n public void showDiaryFromDB() {\n diaryPresenter.showDiaryFromDB();\n }", "Disproduct selectByPrimaryKey(String samId);", "@Dao\npublic interface ScenicPicDao {\n @Insert\n void insertScenicPic(ScenicPic scenicPic);\n\n @Query(\"DELETE from ScenicPic where scenic_id=:scenicId\")\n void deleteAllScenicPic(int scenicId);\n\n //return live data when data be changed, list update automatically\n @Query(\"select * from ScenicPic where scenic_id=:scenicId\")\n List<ScenicPic> getScenicPicById(int scenicId);\n}", "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }", "Nutrition selectByPrimaryKey(Integer nutritionid);", "public interface DishDao {\n Dish findOne(long id);\n List<Dish> findAll();\n void create(Dish entity);\n Dish update(Dish entity);\n void delete(Dish entity);\n void deleteById(long entityId);\n}", "private Shelf fillShelf(ResultSet rs) throws SQLException{\n Shelf shelf = new Shelf();\n shelf.setId(rs.getInt(\"id\"));\n shelf.setColumn(rs.getInt(\"col\"));\n shelf.setRow(rs.getInt(\"row\"));\n shelf.setMaxWeight(rs.getDouble(\"maxWeight\"));\n shelf.setCapacity(rs.getInt(\"capacity\"));\n shelf.setSecure(rs.getBoolean(\"secure\"));\n return shelf;\n }", "public interface SideEntityDao extends CrudRepository<SideEntity, Long> {\n\n\tSet<SideEntity> findAll();\n\n}", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "@SqlQuery(\"select * from PLAYERSTATS order by KILLS DESC FETCH FIRST 10 ROWS ONLY\")\n List<PlayerStats> findKillsHighScores();", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public String getName() {\n return dishName;\n }", "public java.sql.ResultSet DatosdelaCita(String CodHorMed){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n \tSystem.out.println(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>DatosdelaCita \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "UvStatDay selectByPrimaryKey(Long id);", "public String getDishOfTheDay(){\n return dishOfTheDay;\n }", "public List<DiseasePojo> diseaseAll() \n\t{\n\n\t\tString sql = \"SELECT * FROM diseasemaster\";\n\t\treturn jdbcTemplate.query(sql, new ResultSetExtractor<List<DiseasePojo>>()\n\t\t{\n\t public List<DiseasePojo> extractData(ResultSet rs) throws SQLException,\n\t DataAccessException {\n\t \tList<DiseasePojo> list = new ArrayList<DiseasePojo>();\n\t while(rs.next()) {\n\t \tDiseasePojo dt = new DiseasePojo();\n\t \n\t dt.setDiseaseId(rs.getInt(\"DISEASEID\"));\n\t dt.setDiseaseCode(rs.getString(\"DISEASECODE\"));\n\t dt.setDiseaseName(rs.getString(\"DISEASENAME\"));\n\t list.add(dt);\n\t }\n\t return list;\n\t \n\t }\n\t });\n\t\n\t}", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }", "public interface IExampleWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void example(org.linlinjava.litemall.db.domain.example.SaleClassifyGoodExample example);\n }", "public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public Medium[] getDiscs() {\n Session session = getSessionFactory().openSession();\n session.beginTransaction();\n List<Disc> discList = session.createQuery(\"from Disc\", Disc.class).list();\n session.getTransaction().commit();\n session.close();\n return discList.toArray(new Medium[discList.size()]);\n }", "Kaiwa selectByPrimaryKey(String maht);", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "PathologyInfo selectByPrimaryKey(Integer id);", "HospitalType selectByPrimaryKey(String id);", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n KDUserMedal selectByPrimaryKey(Long id);", "public void setName(String dishName) {\n this.dishName = dishName;\n }", "public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface ProfitprofitActionRuleDao extends EntityMybatisDao<ProfitprofitActionRule> {\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate);\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate},cal_type=#{calType} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionIdUpdateAalRateAndCalType(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate, @Param(\"calType\") String calType);\n \n @Select(\"select * from profit_action_rule where section_id=#{sectionId}\")\n ProfitprofitActionRule selectProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String\n sectionId);\n\n @Delete(\"delete from profit_action_rule where id =#{id}\")\n void deleteProfitActionRuleById(@Param(\"id\")Long id);\n\n @Delete(\"delete from profit_action_rule \")\n void deleteProfitActionRuleByAll();\n \n}", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "BpmInstanciaHistorica selectByPrimaryKey(Long idreg);", "MenuInfo selectByPrimaryKey(Integer menuid);", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "List selectByExample(BnesBrowsingHisExample example) throws SQLException;", "public IMDBBaseEntity entityPerResultSet(ResultSet rs) throws SQLException {\n return null;\n }", "public interface ArchetypeLevelsSchema {\n\tString TABLE_NAME = \"creature_archetype_levels\";\n\n\tString COLUMN_ARCHETYPE_ID = \"archetypeId\";\n\tString COLUMN_LEVEL = \"level\";\n\tString COLUMN_ATTACK = \"attack\";\n\tString COLUMN_ATTACK2 = \"attack2\";\n\tString COLUMN_DEF_BONUS = \"defensiveBonus\";\n\tString COLUMN_BODY_DEV = \"bodyDevelopment\";\n\tString COLUMN_PRIME_SKILL = \"primeSkill\";\n\tString COLUMN_SECONDARY_SKILL = \"secondarySkill\";\n\tString COLUMN_POWER_DEV = \"powerDevelopment\";\n\tString COLUMN_SPELLS = \"spells\";\n\tString COLUMN_TALENT_DP = \"talentDP\";\n\tString COLUMN_AGILITY = \"agility\";\n\tString COLUMN_CONS_STAT = \"constitutionStat\";\n\tString COLUMN_CONSTITUTION = \"constitution\";\n\tString COLUMN_EMPATHY = \"empathy\";\n\tString COLUMN_INTUITION = \"intuition\";\n\tString COLUMN_MEMORY = \"memory\";\n\tString COLUMN_PRESENCE = \"presence\";\n\tString COLUMN_QUICKNESS = \"quickness\";\n\tString COLUMN_REASONING = \"reasoning\";\n\tString COLUMN_SELF_DISC = \"selfDiscipline\";\n\tString COLUMN_STRENGTH = \"strength\";\n\n\tString TABLE_CREATE = \"CREATE TABLE IF NOT EXISTS \"\n\t\t\t+ TABLE_NAME\n\t\t\t+ \" (\"\n\t\t\t+ COLUMN_ARCHETYPE_ID + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_LEVEL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK2 + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_DEF_BONUS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_BODY_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRIME_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SECONDARY_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_POWER_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SPELLS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_TALENT_DP + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_AGILITY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONS_STAT + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONSTITUTION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_EMPATHY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_INTUITION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_MEMORY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRESENCE + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_QUICKNESS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_REASONING + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SELF_DISC + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_STRENGTH + \" INTEGER NOT NULL, \"\n\t\t\t+ \"PRIMARY KEY(\" + COLUMN_ARCHETYPE_ID + \",\" + COLUMN_LEVEL + \")\"\n\t\t\t+ \")\";\n\n\tString[] COLUMNS = new String[] { COLUMN_ARCHETYPE_ID, COLUMN_LEVEL, COLUMN_ATTACK, COLUMN_ATTACK2, COLUMN_DEF_BONUS,\n\t\t\tCOLUMN_BODY_DEV, COLUMN_PRIME_SKILL, COLUMN_SECONDARY_SKILL, COLUMN_POWER_DEV, COLUMN_SPELLS, COLUMN_TALENT_DP,\n\t\t\tCOLUMN_AGILITY, COLUMN_CONS_STAT, COLUMN_CONSTITUTION, COLUMN_EMPATHY, COLUMN_INTUITION, COLUMN_MEMORY,\n\t\t\tCOLUMN_PRESENCE, COLUMN_QUICKNESS, COLUMN_REASONING, COLUMN_SELF_DISC, COLUMN_STRENGTH};\n}", "public interface ICriteriaWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void criteria(Criteria criteria);\n }", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "SysPic selectByPrimaryKey(Integer id);", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "@Dao\npublic interface MedicalCategoryDAO {\n\n\n\n @Query(\"SELECT * FROM medicalcategory\")\n List<MedicalCategory> getAll();\n\n @Query(\"SELECT COUNT(*) from medicalcategory\")\n int countcategories();\n\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertAll(MedicalCategory... medicalCategories);\n\n\n @Insert(onConflict = OnConflictStrategy.IGNORE)\n void insertsingle(MedicalCategory medicalCategory);\n\n\n}", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "public void showIngredients() {\n list = dbController.getIngredientsList();\n\n idColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Integer>(\"id\"));\n nameColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, String>(\"name\"));\n caloriesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"calories\"));\n proteinColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"protein\"));\n fatColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"fat\"));\n carbohydratesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"carbohydrates\"));\n selectColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, CheckBox>(\"select\"));\n\n TableView.setItems(list);\n }", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "public interface ClothDao {\n /**\n * 判断衣服Id是否存在\n * @param id\n * @return boolean\n */\n boolean isClothIdExists(int id);\n /**\n * 返回图片\n * @param clothId\n * @return Clothinfostring\n */\n String getClothById(int clothId);\n /**\n * 返回图片\n * @param none\n * @return Cloth Ids\n */\n String getAllCloth();\n\n}", "int updateByPrimaryKey(Dish record);", "@SuppressWarnings(\"rawtypes\")\n\t@Override\n\t@Transactional(readOnly=true)\n\tpublic List listMissTheme(MissTheme persistentInstance)\n\t\t\tthrows DataAccessException {\n\t\tSession session = sessionAnnotationFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"select missTheme from MissTheme missTheme order by missTheme.mtId asc \");\n\t\treturn query.list();\n\t}", "GirlInfo selectByPrimaryKey(Integer id);", "public List<MediumBean> populatemediam(String sql ){\n\t\t\t\tList<MediumBean> retlist = jdbcTemplate.query(sql,ParameterizedBeanPropertyRowMapper.newInstance(MediumBean.class));\n\t\t\t\t\treturn retlist;\n\t\t }", "public void formDatabaseTable() {\n }", "int updateByPrimaryKeySelective(Dish record);", "List<Horse> getAllHorses();", "Drug_OutWarehouse selectByPrimaryKey(Long id);", "@AfterQuery\n\t\tpublic void spriden_AfterQuery(RowAdapterEvent args)\n\t\t{\n\t\t\t\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)args.getRow();\n\n\n\t\t\t\tint rowCount = 0;\n\t\t\t\t{\n\t\t\t\t\tString sqlptiCursor = \"SELECT SPBPERS_BIRTH_DATE, SPBPERS_SEX \" +\n\t\" FROM SPBPERS \" +\n\t\" WHERE SPBPERS_PIDM = :SPRIDEN_PIDM \";\n\t\t\t\t\tDataCursor ptiCursor = new DataCursor(sqlptiCursor);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//Setting query parameters\n\t\t\t\t\t\tptiCursor.addParameter(\"SPRIDEN_PIDM\", spridenElement.getSpridenPidm());\n\t\t\t\t\t\tptiCursor.open();\n\t\t\t\t\t\tResultSet ptiCursorResults = ptiCursor.fetchInto();\n\t\t\t\t\t\tif ( ptiCursorResults != null ) {\n\t\t\t\t\t\t\tspridenElement.setBirthdate(ptiCursorResults.getDate(0));\n\t\t\t\t\t\t\tspridenElement.setSex(ptiCursorResults.getStr(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally{\n\t\t\t\t\t\tptiCursor.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@SqlQuery(\"select * from PLAYERSTATS where SCOREID = :id\")\n PlayerStats findByScoreId(@Bind(\"id\") String id);", "@Override\n\tpublic List<Chitietdonhang> tinhDoanhThuTheoNam(Integer nam) {\n\t\treturn chiTietDonHangRepository.tinhDoanhThuTheoNam(nam);\n\t}", "List<Horario_Disponible> findAll();", "public interface BattleDao {\n\n @Select(\"SELECT * FROM battle WHERE chapter_id = #{chapterId} order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattleByChapterId(String chapterId);\n\n @Select(\"SELECT * FROM battle order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattle();\n\n @Select(\"SELECT * FROM battle WHERE battle_id = #{battleId}\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public Battle getBattleById(String battleId);\n}", "public ArrayList<Desserts> getAllDesserts() { \r\n\t ArrayList<Desserts> AllDesserts = new ArrayList<Desserts>();\r\n\t try {\r\n\t Class.forName(\"com.mysql.jdbc.Driver\");\r\n\t Connection conn = DriverManager.getConnection(url+dbName,userName,password);\r\n\t statement=conn.createStatement();\r\n\t resultSet=statement.executeQuery(\"select * from g13restaurant.Desserts\");\r\n\t \r\n\t while ( resultSet.next() ) {\r\n\t \t Desserts nextDesserts = new Desserts(\r\n\t \t\t\t resultSet.getInt(\"dessert_ID\"), \r\n\t \t\t\t resultSet.getString(\"dessert_Name\"),\r\n\t resultSet.getString(\"dessert_Description\"), \r\n\t resultSet.getFloat(\"dessert_Cost\"),\r\n\t resultSet.getString(\"dessert_Type\").toString() ); \r\n\t AllDesserts.add(nextDesserts);\r\n\t }\r\n\t conn.close();\r\n\t } \r\n\t catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t return AllDesserts; \r\n\t }" ]
[ "0.5601651", "0.53839487", "0.53021646", "0.52873755", "0.520671", "0.5199008", "0.51244825", "0.51128334", "0.51112014", "0.5086853", "0.50846237", "0.50530577", "0.50382876", "0.5010417", "0.5000066", "0.49977776", "0.49874738", "0.4977294", "0.4961594", "0.4952532", "0.494201", "0.49400103", "0.4935266", "0.49334523", "0.4913651", "0.48966566", "0.48760986", "0.4873431", "0.48674852", "0.48482263", "0.48369205", "0.4828204", "0.4820147", "0.4819659", "0.48163944", "0.48132688", "0.48045355", "0.48015493", "0.4790453", "0.47686547", "0.47637588", "0.47512266", "0.4745165", "0.4741528", "0.4724258", "0.4722147", "0.4715255", "0.47143948", "0.4712681", "0.47064984", "0.4705355", "0.4702779", "0.46978354", "0.46959195", "0.46941528", "0.46938932", "0.46937716", "0.46931654", "0.46861097", "0.4682892", "0.4682116", "0.46809503", "0.46807703", "0.4674833", "0.46745697", "0.4672617", "0.4669176", "0.46653524", "0.46621925", "0.46556634", "0.46513012", "0.46466786", "0.4640407", "0.4639889", "0.46388292", "0.46379563", "0.4634017", "0.46337754", "0.46334422", "0.4628962", "0.4628682", "0.46264276", "0.46256983", "0.4622565", "0.46188143", "0.46176806", "0.4617436", "0.46174166", "0.46172732", "0.46169975", "0.46084943", "0.4606415", "0.460357", "0.46032286", "0.45968014", "0.4593058", "0.45916504", "0.4587022", "0.45857728", "0.4580759", "0.457777" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table dish
List<Dish> selectByExample(DishExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Dish selectByPrimaryKey(String id);", "@Override\n public List<SideDishEntity> findAll() {\n return null;\n }", "List<TblMotherSon> selectByExample(TblMotherSonExample example);", "@Override\r\n\tpublic int create(Dish dish) {\r\n\t\t\r\n//\t\thashMap.put(dish.getId(), dish);\r\n\t\tSystem.out.println(\" Creating Dish\");\r\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(dish);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n//\t\tSystem.out.println(\"Dish create successfully\" +dish.toString());\r\n\t\treturn dish.getId();\r\n\t\t\r\n\t}", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface PreparedDishHistoryDAO {\n int addPreparedDish(PreparedDish dish);\n List<PreparedDish> getAll();\n}", "public static ArrayList<Dish> getDishesByMenuId(String mid) throws SQLException {\r\n\t\tArrayList<Dish> result = new ArrayList<Dish>();\r\n\t\tString sql = \"SELECT dish_id, name, price, picture, description FROM dish\" + \" WHERE menu_id = ?\";\r\n\t\tResultSet rs;\r\n\t\tint dishId = -1;\r\n\t\tString name = \"\";\r\n\t\tfloat price = 0f;\r\n\t\tString filePath = \"\";\r\n\t\tString description = \"\";\r\n\r\n\t\tPreparedStatement sqlPrepared = DBConnection.prepare(sql);\r\n\t\tsqlPrepared.setString(1, mid);\r\n\t\trs = sqlPrepared.executeQuery();\r\n\t\twhile (rs.next()) {\r\n\t\t\tdishId = rs.getInt(1);\r\n\t\t\tname = rs.getString(2);\r\n\t\t\tprice = rs.getFloat(3);\r\n\t\t\tfilePath = rs.getString(4);\r\n\t\t\tdescription = rs.getString(5);\r\n\t\t\tDish dish = new Dish(String.valueOf(dishId), price, name, description,filePath);\r\n\t\t\t//put dish into identity map\r\n\t\t\tIdentityMap<Dish> map = IdentityMap.getInstance(dish);\r\n\t\t\tmap.put(dishId,dish);\r\n\t\t\t\r\n\t\t\tresult.add(dish);\r\n\t\t}\r\n\t\tsqlPrepared.close();\r\n\t\tDBConnection.dbConnection.close();\r\n\t\treturn result;\r\n\t}", "HrMscChaAssig selectByPrimaryKey(Date day, Integer hour, String mscid);", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();", "void fetchHolidayRentalHousesData();", "@Override\r\n public String storyID() {\r\n return \"HD\";\r\n }", "public ForeignInfo foreignStShohinKonyu() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnStShohinKonyuId(), StShohinKonyuDbm.getInstance().columnStShohinKonyuId());\n return cfi(\"FK_ST_SHHN_KNY_MS_ST_SHOHIN_KONYU\", \"stShohinKonyu\", this, StShohinKonyuDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "public ForeignInfo foreignSmShohin() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnSmShohinId(), SmShohinDbm.getInstance().columnSmShohinId());\n return cfi(\"FK_ST_SHHN_KNY_MS_SM_SHOHIN\", \"smShohin\", this, SmShohinDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "@Select({\n \"select\",\n \"`cate_id`, `cate_name`\",\n \"from `category`\",\n \"where `cate_id` = #{cateId,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n Category selectByPrimaryKey(Integer cateId);", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public interface DishDao {\n\n void save(Dish dish);\n List<Dish> findAll();\n Dish findByName(String name);\n\n void removeAll();\n}", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}", "@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }", "HelpInfo selectByPrimaryKey(Integer hId);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n News selectByPrimaryKey(Integer newsId);", "public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "public List<DishItem> getDish(){\n \tList<DishItem> dish = new ArrayList<DishItem>();\n\t\t\n\t\t//User user = userDao.find();\n\t\t//String tokenString = user.getToken();\n\t\t\n\t\tString dishResult;\t\t\n\t\tString urlString=\"/service/dish/getalldishs\";\n\t\ttry {\n\t\t\tdishResult = connect.testURLConn1(urlString);\n\t\t\tJSONObject jsonObject = new JSONObject(dishResult);System.out.println(\"jsonObject==\"+jsonObject);\n\t\t\tJSONArray jsonArray = jsonObject.getJSONArray(\"date\");System.out.println(\"jsonArray==\"+jsonArray);\n\t\t\t//userJSON = jsonObject.getJSONObject(\"user\");\n\t\t\t\n\t\t\tfor(int i=0;i<jsonArray.length();i++){ \n\t\t\t\t JSONObject jo = (JSONObject)jsonArray.opt(i);\n\t\t String id = jo.getString(\"_id\");\n\t\t String dishName = jo.getString(\"dishName\");\n\t\t String desc = jo.getString(\"desc\");\n\t\t int pic=jo.getInt(\"pic\");\n\t\t int col=jo.getInt(\"col\");\n\t\t DishItem dishitem = new DishItem(id, dishName, desc,pic,col);\n\t dish.add(dishitem);\n\t }\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\treturn dish;\n\t\t\n\t}", "@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}", "List<SellMedia> selectSellMediaByExample(SellMediaExample example) throws SQLException;", "@Override\n public List<SideDishEntity> findAll(Iterable<Long> ids) {\n return null;\n }", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "@Override\n public void showDiaryFromDB() {\n diaryPresenter.showDiaryFromDB();\n }", "Disproduct selectByPrimaryKey(String samId);", "@Dao\npublic interface ScenicPicDao {\n @Insert\n void insertScenicPic(ScenicPic scenicPic);\n\n @Query(\"DELETE from ScenicPic where scenic_id=:scenicId\")\n void deleteAllScenicPic(int scenicId);\n\n //return live data when data be changed, list update automatically\n @Query(\"select * from ScenicPic where scenic_id=:scenicId\")\n List<ScenicPic> getScenicPicById(int scenicId);\n}", "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }", "Nutrition selectByPrimaryKey(Integer nutritionid);", "public interface DishDao {\n Dish findOne(long id);\n List<Dish> findAll();\n void create(Dish entity);\n Dish update(Dish entity);\n void delete(Dish entity);\n void deleteById(long entityId);\n}", "private Shelf fillShelf(ResultSet rs) throws SQLException{\n Shelf shelf = new Shelf();\n shelf.setId(rs.getInt(\"id\"));\n shelf.setColumn(rs.getInt(\"col\"));\n shelf.setRow(rs.getInt(\"row\"));\n shelf.setMaxWeight(rs.getDouble(\"maxWeight\"));\n shelf.setCapacity(rs.getInt(\"capacity\"));\n shelf.setSecure(rs.getBoolean(\"secure\"));\n return shelf;\n }", "public interface SideEntityDao extends CrudRepository<SideEntity, Long> {\n\n\tSet<SideEntity> findAll();\n\n}", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "@SqlQuery(\"select * from PLAYERSTATS order by KILLS DESC FETCH FIRST 10 ROWS ONLY\")\n List<PlayerStats> findKillsHighScores();", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public String getName() {\n return dishName;\n }", "public java.sql.ResultSet DatosdelaCita(String CodHorMed){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n \tSystem.out.println(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>DatosdelaCita \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "UvStatDay selectByPrimaryKey(Long id);", "public String getDishOfTheDay(){\n return dishOfTheDay;\n }", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "public List<DiseasePojo> diseaseAll() \n\t{\n\n\t\tString sql = \"SELECT * FROM diseasemaster\";\n\t\treturn jdbcTemplate.query(sql, new ResultSetExtractor<List<DiseasePojo>>()\n\t\t{\n\t public List<DiseasePojo> extractData(ResultSet rs) throws SQLException,\n\t DataAccessException {\n\t \tList<DiseasePojo> list = new ArrayList<DiseasePojo>();\n\t while(rs.next()) {\n\t \tDiseasePojo dt = new DiseasePojo();\n\t \n\t dt.setDiseaseId(rs.getInt(\"DISEASEID\"));\n\t dt.setDiseaseCode(rs.getString(\"DISEASECODE\"));\n\t dt.setDiseaseName(rs.getString(\"DISEASENAME\"));\n\t list.add(dt);\n\t }\n\t return list;\n\t \n\t }\n\t });\n\t\n\t}", "public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }", "public interface IExampleWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void example(org.linlinjava.litemall.db.domain.example.SaleClassifyGoodExample example);\n }", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public Medium[] getDiscs() {\n Session session = getSessionFactory().openSession();\n session.beginTransaction();\n List<Disc> discList = session.createQuery(\"from Disc\", Disc.class).list();\n session.getTransaction().commit();\n session.close();\n return discList.toArray(new Medium[discList.size()]);\n }", "Kaiwa selectByPrimaryKey(String maht);", "PathologyInfo selectByPrimaryKey(Integer id);", "HospitalType selectByPrimaryKey(String id);", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n KDUserMedal selectByPrimaryKey(Long id);", "public void setName(String dishName) {\n this.dishName = dishName;\n }", "public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface ProfitprofitActionRuleDao extends EntityMybatisDao<ProfitprofitActionRule> {\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate);\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate},cal_type=#{calType} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionIdUpdateAalRateAndCalType(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate, @Param(\"calType\") String calType);\n \n @Select(\"select * from profit_action_rule where section_id=#{sectionId}\")\n ProfitprofitActionRule selectProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String\n sectionId);\n\n @Delete(\"delete from profit_action_rule where id =#{id}\")\n void deleteProfitActionRuleById(@Param(\"id\")Long id);\n\n @Delete(\"delete from profit_action_rule \")\n void deleteProfitActionRuleByAll();\n \n}", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "BpmInstanciaHistorica selectByPrimaryKey(Long idreg);", "MenuInfo selectByPrimaryKey(Integer menuid);", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "public IMDBBaseEntity entityPerResultSet(ResultSet rs) throws SQLException {\n return null;\n }", "List selectByExample(BnesBrowsingHisExample example) throws SQLException;", "public interface ArchetypeLevelsSchema {\n\tString TABLE_NAME = \"creature_archetype_levels\";\n\n\tString COLUMN_ARCHETYPE_ID = \"archetypeId\";\n\tString COLUMN_LEVEL = \"level\";\n\tString COLUMN_ATTACK = \"attack\";\n\tString COLUMN_ATTACK2 = \"attack2\";\n\tString COLUMN_DEF_BONUS = \"defensiveBonus\";\n\tString COLUMN_BODY_DEV = \"bodyDevelopment\";\n\tString COLUMN_PRIME_SKILL = \"primeSkill\";\n\tString COLUMN_SECONDARY_SKILL = \"secondarySkill\";\n\tString COLUMN_POWER_DEV = \"powerDevelopment\";\n\tString COLUMN_SPELLS = \"spells\";\n\tString COLUMN_TALENT_DP = \"talentDP\";\n\tString COLUMN_AGILITY = \"agility\";\n\tString COLUMN_CONS_STAT = \"constitutionStat\";\n\tString COLUMN_CONSTITUTION = \"constitution\";\n\tString COLUMN_EMPATHY = \"empathy\";\n\tString COLUMN_INTUITION = \"intuition\";\n\tString COLUMN_MEMORY = \"memory\";\n\tString COLUMN_PRESENCE = \"presence\";\n\tString COLUMN_QUICKNESS = \"quickness\";\n\tString COLUMN_REASONING = \"reasoning\";\n\tString COLUMN_SELF_DISC = \"selfDiscipline\";\n\tString COLUMN_STRENGTH = \"strength\";\n\n\tString TABLE_CREATE = \"CREATE TABLE IF NOT EXISTS \"\n\t\t\t+ TABLE_NAME\n\t\t\t+ \" (\"\n\t\t\t+ COLUMN_ARCHETYPE_ID + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_LEVEL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK2 + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_DEF_BONUS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_BODY_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRIME_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SECONDARY_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_POWER_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SPELLS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_TALENT_DP + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_AGILITY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONS_STAT + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONSTITUTION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_EMPATHY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_INTUITION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_MEMORY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRESENCE + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_QUICKNESS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_REASONING + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SELF_DISC + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_STRENGTH + \" INTEGER NOT NULL, \"\n\t\t\t+ \"PRIMARY KEY(\" + COLUMN_ARCHETYPE_ID + \",\" + COLUMN_LEVEL + \")\"\n\t\t\t+ \")\";\n\n\tString[] COLUMNS = new String[] { COLUMN_ARCHETYPE_ID, COLUMN_LEVEL, COLUMN_ATTACK, COLUMN_ATTACK2, COLUMN_DEF_BONUS,\n\t\t\tCOLUMN_BODY_DEV, COLUMN_PRIME_SKILL, COLUMN_SECONDARY_SKILL, COLUMN_POWER_DEV, COLUMN_SPELLS, COLUMN_TALENT_DP,\n\t\t\tCOLUMN_AGILITY, COLUMN_CONS_STAT, COLUMN_CONSTITUTION, COLUMN_EMPATHY, COLUMN_INTUITION, COLUMN_MEMORY,\n\t\t\tCOLUMN_PRESENCE, COLUMN_QUICKNESS, COLUMN_REASONING, COLUMN_SELF_DISC, COLUMN_STRENGTH};\n}", "SysPic selectByPrimaryKey(Integer id);", "public interface ICriteriaWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void criteria(Criteria criteria);\n }", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "@Dao\npublic interface MedicalCategoryDAO {\n\n\n\n @Query(\"SELECT * FROM medicalcategory\")\n List<MedicalCategory> getAll();\n\n @Query(\"SELECT COUNT(*) from medicalcategory\")\n int countcategories();\n\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertAll(MedicalCategory... medicalCategories);\n\n\n @Insert(onConflict = OnConflictStrategy.IGNORE)\n void insertsingle(MedicalCategory medicalCategory);\n\n\n}", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings(\"rawtypes\")\n\t@Override\n\t@Transactional(readOnly=true)\n\tpublic List listMissTheme(MissTheme persistentInstance)\n\t\t\tthrows DataAccessException {\n\t\tSession session = sessionAnnotationFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"select missTheme from MissTheme missTheme order by missTheme.mtId asc \");\n\t\treturn query.list();\n\t}", "public void showIngredients() {\n list = dbController.getIngredientsList();\n\n idColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Integer>(\"id\"));\n nameColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, String>(\"name\"));\n caloriesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"calories\"));\n proteinColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"protein\"));\n fatColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"fat\"));\n carbohydratesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"carbohydrates\"));\n selectColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, CheckBox>(\"select\"));\n\n TableView.setItems(list);\n }", "public interface ClothDao {\n /**\n * 判断衣服Id是否存在\n * @param id\n * @return boolean\n */\n boolean isClothIdExists(int id);\n /**\n * 返回图片\n * @param clothId\n * @return Clothinfostring\n */\n String getClothById(int clothId);\n /**\n * 返回图片\n * @param none\n * @return Cloth Ids\n */\n String getAllCloth();\n\n}", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "GirlInfo selectByPrimaryKey(Integer id);", "int updateByPrimaryKey(Dish record);", "public List<MediumBean> populatemediam(String sql ){\n\t\t\t\tList<MediumBean> retlist = jdbcTemplate.query(sql,ParameterizedBeanPropertyRowMapper.newInstance(MediumBean.class));\n\t\t\t\t\treturn retlist;\n\t\t }", "public void formDatabaseTable() {\n }", "List<Horse> getAllHorses();", "int updateByPrimaryKeySelective(Dish record);", "Drug_OutWarehouse selectByPrimaryKey(Long id);", "@AfterQuery\n\t\tpublic void spriden_AfterQuery(RowAdapterEvent args)\n\t\t{\n\t\t\t\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)args.getRow();\n\n\n\t\t\t\tint rowCount = 0;\n\t\t\t\t{\n\t\t\t\t\tString sqlptiCursor = \"SELECT SPBPERS_BIRTH_DATE, SPBPERS_SEX \" +\n\t\" FROM SPBPERS \" +\n\t\" WHERE SPBPERS_PIDM = :SPRIDEN_PIDM \";\n\t\t\t\t\tDataCursor ptiCursor = new DataCursor(sqlptiCursor);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//Setting query parameters\n\t\t\t\t\t\tptiCursor.addParameter(\"SPRIDEN_PIDM\", spridenElement.getSpridenPidm());\n\t\t\t\t\t\tptiCursor.open();\n\t\t\t\t\t\tResultSet ptiCursorResults = ptiCursor.fetchInto();\n\t\t\t\t\t\tif ( ptiCursorResults != null ) {\n\t\t\t\t\t\t\tspridenElement.setBirthdate(ptiCursorResults.getDate(0));\n\t\t\t\t\t\t\tspridenElement.setSex(ptiCursorResults.getStr(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally{\n\t\t\t\t\t\tptiCursor.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@SqlQuery(\"select * from PLAYERSTATS where SCOREID = :id\")\n PlayerStats findByScoreId(@Bind(\"id\") String id);", "@Override\n\tpublic List<Chitietdonhang> tinhDoanhThuTheoNam(Integer nam) {\n\t\treturn chiTietDonHangRepository.tinhDoanhThuTheoNam(nam);\n\t}", "List<Horario_Disponible> findAll();", "public interface BattleDao {\n\n @Select(\"SELECT * FROM battle WHERE chapter_id = #{chapterId} order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattleByChapterId(String chapterId);\n\n @Select(\"SELECT * FROM battle order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattle();\n\n @Select(\"SELECT * FROM battle WHERE battle_id = #{battleId}\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public Battle getBattleById(String battleId);\n}", "@Override\r\n\tpublic List<Item> getAllHomework() {\n\t\t\r\n\t\treturn itemdao.find(\"from Item\");\r\n\t}" ]
[ "0.5600174", "0.53841454", "0.5299719", "0.52865005", "0.5207043", "0.5197336", "0.5125447", "0.51118666", "0.5108231", "0.5086626", "0.5085082", "0.5053489", "0.50375754", "0.5013254", "0.5000734", "0.49990135", "0.49871296", "0.4977456", "0.49595127", "0.49507773", "0.49396035", "0.49344653", "0.4932681", "0.4915911", "0.48960426", "0.4875751", "0.48731044", "0.48664743", "0.48471266", "0.4835617", "0.48283944", "0.48198786", "0.48192134", "0.48152295", "0.4812581", "0.4803711", "0.4801145", "0.47892702", "0.47673383", "0.47636536", "0.47504556", "0.4743838", "0.47406274", "0.47240347", "0.47233954", "0.47144976", "0.4714", "0.47135416", "0.47080025", "0.4705173", "0.47029212", "0.4695972", "0.46953914", "0.46952063", "0.46932906", "0.46932775", "0.46916923", "0.4686451", "0.4682866", "0.46822768", "0.46820173", "0.4680626", "0.46737972", "0.46732292", "0.46728477", "0.46705216", "0.46645594", "0.46607283", "0.46574742", "0.46513757", "0.4647215", "0.46400225", "0.46397337", "0.46392712", "0.46389863", "0.46342283", "0.46336046", "0.46322948", "0.46288052", "0.46275714", "0.46274203", "0.46247324", "0.46213222", "0.46198127", "0.46186653", "0.46175528", "0.46165773", "0.4616378", "0.4615364", "0.46077508", "0.46064365", "0.46041626", "0.4600525", "0.4594813", "0.45915726", "0.4591479", "0.45874423", "0.45869604", "0.45789942", "0.45764908" ]
0.49392706
21
This method was generated by MyBatis Generator. This method corresponds to the database table dish
Dish selectByPrimaryKey(String id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<SideDishEntity> findAll() {\n return null;\n }", "List<TblMotherSon> selectByExample(TblMotherSonExample example);", "@Override\r\n\tpublic int create(Dish dish) {\r\n\t\t\r\n//\t\thashMap.put(dish.getId(), dish);\r\n\t\tSystem.out.println(\" Creating Dish\");\r\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(dish);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n//\t\tSystem.out.println(\"Dish create successfully\" +dish.toString());\r\n\t\treturn dish.getId();\r\n\t\t\r\n\t}", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface PreparedDishHistoryDAO {\n int addPreparedDish(PreparedDish dish);\n List<PreparedDish> getAll();\n}", "public static ArrayList<Dish> getDishesByMenuId(String mid) throws SQLException {\r\n\t\tArrayList<Dish> result = new ArrayList<Dish>();\r\n\t\tString sql = \"SELECT dish_id, name, price, picture, description FROM dish\" + \" WHERE menu_id = ?\";\r\n\t\tResultSet rs;\r\n\t\tint dishId = -1;\r\n\t\tString name = \"\";\r\n\t\tfloat price = 0f;\r\n\t\tString filePath = \"\";\r\n\t\tString description = \"\";\r\n\r\n\t\tPreparedStatement sqlPrepared = DBConnection.prepare(sql);\r\n\t\tsqlPrepared.setString(1, mid);\r\n\t\trs = sqlPrepared.executeQuery();\r\n\t\twhile (rs.next()) {\r\n\t\t\tdishId = rs.getInt(1);\r\n\t\t\tname = rs.getString(2);\r\n\t\t\tprice = rs.getFloat(3);\r\n\t\t\tfilePath = rs.getString(4);\r\n\t\t\tdescription = rs.getString(5);\r\n\t\t\tDish dish = new Dish(String.valueOf(dishId), price, name, description,filePath);\r\n\t\t\t//put dish into identity map\r\n\t\t\tIdentityMap<Dish> map = IdentityMap.getInstance(dish);\r\n\t\t\tmap.put(dishId,dish);\r\n\t\t\t\r\n\t\t\tresult.add(dish);\r\n\t\t}\r\n\t\tsqlPrepared.close();\r\n\t\tDBConnection.dbConnection.close();\r\n\t\treturn result;\r\n\t}", "HrMscChaAssig selectByPrimaryKey(Date day, Integer hour, String mscid);", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();", "void fetchHolidayRentalHousesData();", "@Override\r\n public String storyID() {\r\n return \"HD\";\r\n }", "public ForeignInfo foreignStShohinKonyu() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnStShohinKonyuId(), StShohinKonyuDbm.getInstance().columnStShohinKonyuId());\n return cfi(\"FK_ST_SHHN_KNY_MS_ST_SHOHIN_KONYU\", \"stShohinKonyu\", this, StShohinKonyuDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "public ForeignInfo foreignSmShohin() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnSmShohinId(), SmShohinDbm.getInstance().columnSmShohinId());\n return cfi(\"FK_ST_SHHN_KNY_MS_SM_SHOHIN\", \"smShohin\", this, SmShohinDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "@Select({\n \"select\",\n \"`cate_id`, `cate_name`\",\n \"from `category`\",\n \"where `cate_id` = #{cateId,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n Category selectByPrimaryKey(Integer cateId);", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public interface DishDao {\n\n void save(Dish dish);\n List<Dish> findAll();\n Dish findByName(String name);\n\n void removeAll();\n}", "List<Dish> selectByExample(DishExample example);", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}", "@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }", "HelpInfo selectByPrimaryKey(Integer hId);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n News selectByPrimaryKey(Integer newsId);", "public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "public List<DishItem> getDish(){\n \tList<DishItem> dish = new ArrayList<DishItem>();\n\t\t\n\t\t//User user = userDao.find();\n\t\t//String tokenString = user.getToken();\n\t\t\n\t\tString dishResult;\t\t\n\t\tString urlString=\"/service/dish/getalldishs\";\n\t\ttry {\n\t\t\tdishResult = connect.testURLConn1(urlString);\n\t\t\tJSONObject jsonObject = new JSONObject(dishResult);System.out.println(\"jsonObject==\"+jsonObject);\n\t\t\tJSONArray jsonArray = jsonObject.getJSONArray(\"date\");System.out.println(\"jsonArray==\"+jsonArray);\n\t\t\t//userJSON = jsonObject.getJSONObject(\"user\");\n\t\t\t\n\t\t\tfor(int i=0;i<jsonArray.length();i++){ \n\t\t\t\t JSONObject jo = (JSONObject)jsonArray.opt(i);\n\t\t String id = jo.getString(\"_id\");\n\t\t String dishName = jo.getString(\"dishName\");\n\t\t String desc = jo.getString(\"desc\");\n\t\t int pic=jo.getInt(\"pic\");\n\t\t int col=jo.getInt(\"col\");\n\t\t DishItem dishitem = new DishItem(id, dishName, desc,pic,col);\n\t dish.add(dishitem);\n\t }\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\treturn dish;\n\t\t\n\t}", "@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}", "List<SellMedia> selectSellMediaByExample(SellMediaExample example) throws SQLException;", "@Override\n public List<SideDishEntity> findAll(Iterable<Long> ids) {\n return null;\n }", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "@Override\n public void showDiaryFromDB() {\n diaryPresenter.showDiaryFromDB();\n }", "Disproduct selectByPrimaryKey(String samId);", "@Dao\npublic interface ScenicPicDao {\n @Insert\n void insertScenicPic(ScenicPic scenicPic);\n\n @Query(\"DELETE from ScenicPic where scenic_id=:scenicId\")\n void deleteAllScenicPic(int scenicId);\n\n //return live data when data be changed, list update automatically\n @Query(\"select * from ScenicPic where scenic_id=:scenicId\")\n List<ScenicPic> getScenicPicById(int scenicId);\n}", "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }", "Nutrition selectByPrimaryKey(Integer nutritionid);", "public interface DishDao {\n Dish findOne(long id);\n List<Dish> findAll();\n void create(Dish entity);\n Dish update(Dish entity);\n void delete(Dish entity);\n void deleteById(long entityId);\n}", "private Shelf fillShelf(ResultSet rs) throws SQLException{\n Shelf shelf = new Shelf();\n shelf.setId(rs.getInt(\"id\"));\n shelf.setColumn(rs.getInt(\"col\"));\n shelf.setRow(rs.getInt(\"row\"));\n shelf.setMaxWeight(rs.getDouble(\"maxWeight\"));\n shelf.setCapacity(rs.getInt(\"capacity\"));\n shelf.setSecure(rs.getBoolean(\"secure\"));\n return shelf;\n }", "public interface SideEntityDao extends CrudRepository<SideEntity, Long> {\n\n\tSet<SideEntity> findAll();\n\n}", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "@SqlQuery(\"select * from PLAYERSTATS order by KILLS DESC FETCH FIRST 10 ROWS ONLY\")\n List<PlayerStats> findKillsHighScores();", "public String getName() {\n return dishName;\n }", "public java.sql.ResultSet DatosdelaCita(String CodHorMed){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n \tSystem.out.println(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>DatosdelaCita \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "UvStatDay selectByPrimaryKey(Long id);", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "public String getDishOfTheDay(){\n return dishOfTheDay;\n }", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "public List<DiseasePojo> diseaseAll() \n\t{\n\n\t\tString sql = \"SELECT * FROM diseasemaster\";\n\t\treturn jdbcTemplate.query(sql, new ResultSetExtractor<List<DiseasePojo>>()\n\t\t{\n\t public List<DiseasePojo> extractData(ResultSet rs) throws SQLException,\n\t DataAccessException {\n\t \tList<DiseasePojo> list = new ArrayList<DiseasePojo>();\n\t while(rs.next()) {\n\t \tDiseasePojo dt = new DiseasePojo();\n\t \n\t dt.setDiseaseId(rs.getInt(\"DISEASEID\"));\n\t dt.setDiseaseCode(rs.getString(\"DISEASECODE\"));\n\t dt.setDiseaseName(rs.getString(\"DISEASENAME\"));\n\t list.add(dt);\n\t }\n\t return list;\n\t \n\t }\n\t });\n\t\n\t}", "public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }", "public interface IExampleWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void example(org.linlinjava.litemall.db.domain.example.SaleClassifyGoodExample example);\n }", "public Medium[] getDiscs() {\n Session session = getSessionFactory().openSession();\n session.beginTransaction();\n List<Disc> discList = session.createQuery(\"from Disc\", Disc.class).list();\n session.getTransaction().commit();\n session.close();\n return discList.toArray(new Medium[discList.size()]);\n }", "Kaiwa selectByPrimaryKey(String maht);", "public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "HospitalType selectByPrimaryKey(String id);", "PathologyInfo selectByPrimaryKey(Integer id);", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n KDUserMedal selectByPrimaryKey(Long id);", "public void setName(String dishName) {\n this.dishName = dishName;\n }", "public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface ProfitprofitActionRuleDao extends EntityMybatisDao<ProfitprofitActionRule> {\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate);\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate},cal_type=#{calType} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionIdUpdateAalRateAndCalType(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate, @Param(\"calType\") String calType);\n \n @Select(\"select * from profit_action_rule where section_id=#{sectionId}\")\n ProfitprofitActionRule selectProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String\n sectionId);\n\n @Delete(\"delete from profit_action_rule where id =#{id}\")\n void deleteProfitActionRuleById(@Param(\"id\")Long id);\n\n @Delete(\"delete from profit_action_rule \")\n void deleteProfitActionRuleByAll();\n \n}", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "BpmInstanciaHistorica selectByPrimaryKey(Long idreg);", "MenuInfo selectByPrimaryKey(Integer menuid);", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "public IMDBBaseEntity entityPerResultSet(ResultSet rs) throws SQLException {\n return null;\n }", "List selectByExample(BnesBrowsingHisExample example) throws SQLException;", "public interface ArchetypeLevelsSchema {\n\tString TABLE_NAME = \"creature_archetype_levels\";\n\n\tString COLUMN_ARCHETYPE_ID = \"archetypeId\";\n\tString COLUMN_LEVEL = \"level\";\n\tString COLUMN_ATTACK = \"attack\";\n\tString COLUMN_ATTACK2 = \"attack2\";\n\tString COLUMN_DEF_BONUS = \"defensiveBonus\";\n\tString COLUMN_BODY_DEV = \"bodyDevelopment\";\n\tString COLUMN_PRIME_SKILL = \"primeSkill\";\n\tString COLUMN_SECONDARY_SKILL = \"secondarySkill\";\n\tString COLUMN_POWER_DEV = \"powerDevelopment\";\n\tString COLUMN_SPELLS = \"spells\";\n\tString COLUMN_TALENT_DP = \"talentDP\";\n\tString COLUMN_AGILITY = \"agility\";\n\tString COLUMN_CONS_STAT = \"constitutionStat\";\n\tString COLUMN_CONSTITUTION = \"constitution\";\n\tString COLUMN_EMPATHY = \"empathy\";\n\tString COLUMN_INTUITION = \"intuition\";\n\tString COLUMN_MEMORY = \"memory\";\n\tString COLUMN_PRESENCE = \"presence\";\n\tString COLUMN_QUICKNESS = \"quickness\";\n\tString COLUMN_REASONING = \"reasoning\";\n\tString COLUMN_SELF_DISC = \"selfDiscipline\";\n\tString COLUMN_STRENGTH = \"strength\";\n\n\tString TABLE_CREATE = \"CREATE TABLE IF NOT EXISTS \"\n\t\t\t+ TABLE_NAME\n\t\t\t+ \" (\"\n\t\t\t+ COLUMN_ARCHETYPE_ID + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_LEVEL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK2 + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_DEF_BONUS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_BODY_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRIME_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SECONDARY_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_POWER_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SPELLS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_TALENT_DP + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_AGILITY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONS_STAT + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONSTITUTION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_EMPATHY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_INTUITION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_MEMORY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRESENCE + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_QUICKNESS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_REASONING + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SELF_DISC + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_STRENGTH + \" INTEGER NOT NULL, \"\n\t\t\t+ \"PRIMARY KEY(\" + COLUMN_ARCHETYPE_ID + \",\" + COLUMN_LEVEL + \")\"\n\t\t\t+ \")\";\n\n\tString[] COLUMNS = new String[] { COLUMN_ARCHETYPE_ID, COLUMN_LEVEL, COLUMN_ATTACK, COLUMN_ATTACK2, COLUMN_DEF_BONUS,\n\t\t\tCOLUMN_BODY_DEV, COLUMN_PRIME_SKILL, COLUMN_SECONDARY_SKILL, COLUMN_POWER_DEV, COLUMN_SPELLS, COLUMN_TALENT_DP,\n\t\t\tCOLUMN_AGILITY, COLUMN_CONS_STAT, COLUMN_CONSTITUTION, COLUMN_EMPATHY, COLUMN_INTUITION, COLUMN_MEMORY,\n\t\t\tCOLUMN_PRESENCE, COLUMN_QUICKNESS, COLUMN_REASONING, COLUMN_SELF_DISC, COLUMN_STRENGTH};\n}", "public interface ICriteriaWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void criteria(Criteria criteria);\n }", "SysPic selectByPrimaryKey(Integer id);", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "@Dao\npublic interface MedicalCategoryDAO {\n\n\n\n @Query(\"SELECT * FROM medicalcategory\")\n List<MedicalCategory> getAll();\n\n @Query(\"SELECT COUNT(*) from medicalcategory\")\n int countcategories();\n\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertAll(MedicalCategory... medicalCategories);\n\n\n @Insert(onConflict = OnConflictStrategy.IGNORE)\n void insertsingle(MedicalCategory medicalCategory);\n\n\n}", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings(\"rawtypes\")\n\t@Override\n\t@Transactional(readOnly=true)\n\tpublic List listMissTheme(MissTheme persistentInstance)\n\t\t\tthrows DataAccessException {\n\t\tSession session = sessionAnnotationFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"select missTheme from MissTheme missTheme order by missTheme.mtId asc \");\n\t\treturn query.list();\n\t}", "public void showIngredients() {\n list = dbController.getIngredientsList();\n\n idColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Integer>(\"id\"));\n nameColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, String>(\"name\"));\n caloriesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"calories\"));\n proteinColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"protein\"));\n fatColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"fat\"));\n carbohydratesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"carbohydrates\"));\n selectColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, CheckBox>(\"select\"));\n\n TableView.setItems(list);\n }", "public interface ClothDao {\n /**\n * 判断衣服Id是否存在\n * @param id\n * @return boolean\n */\n boolean isClothIdExists(int id);\n /**\n * 返回图片\n * @param clothId\n * @return Clothinfostring\n */\n String getClothById(int clothId);\n /**\n * 返回图片\n * @param none\n * @return Cloth Ids\n */\n String getAllCloth();\n\n}", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "GirlInfo selectByPrimaryKey(Integer id);", "int updateByPrimaryKey(Dish record);", "public List<MediumBean> populatemediam(String sql ){\n\t\t\t\tList<MediumBean> retlist = jdbcTemplate.query(sql,ParameterizedBeanPropertyRowMapper.newInstance(MediumBean.class));\n\t\t\t\t\treturn retlist;\n\t\t }", "public void formDatabaseTable() {\n }", "List<Horse> getAllHorses();", "int updateByPrimaryKeySelective(Dish record);", "Drug_OutWarehouse selectByPrimaryKey(Long id);", "@AfterQuery\n\t\tpublic void spriden_AfterQuery(RowAdapterEvent args)\n\t\t{\n\t\t\t\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)args.getRow();\n\n\n\t\t\t\tint rowCount = 0;\n\t\t\t\t{\n\t\t\t\t\tString sqlptiCursor = \"SELECT SPBPERS_BIRTH_DATE, SPBPERS_SEX \" +\n\t\" FROM SPBPERS \" +\n\t\" WHERE SPBPERS_PIDM = :SPRIDEN_PIDM \";\n\t\t\t\t\tDataCursor ptiCursor = new DataCursor(sqlptiCursor);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//Setting query parameters\n\t\t\t\t\t\tptiCursor.addParameter(\"SPRIDEN_PIDM\", spridenElement.getSpridenPidm());\n\t\t\t\t\t\tptiCursor.open();\n\t\t\t\t\t\tResultSet ptiCursorResults = ptiCursor.fetchInto();\n\t\t\t\t\t\tif ( ptiCursorResults != null ) {\n\t\t\t\t\t\t\tspridenElement.setBirthdate(ptiCursorResults.getDate(0));\n\t\t\t\t\t\t\tspridenElement.setSex(ptiCursorResults.getStr(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally{\n\t\t\t\t\t\tptiCursor.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@SqlQuery(\"select * from PLAYERSTATS where SCOREID = :id\")\n PlayerStats findByScoreId(@Bind(\"id\") String id);", "List<Horario_Disponible> findAll();", "@Override\n\tpublic List<Chitietdonhang> tinhDoanhThuTheoNam(Integer nam) {\n\t\treturn chiTietDonHangRepository.tinhDoanhThuTheoNam(nam);\n\t}", "public interface BattleDao {\n\n @Select(\"SELECT * FROM battle WHERE chapter_id = #{chapterId} order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattleByChapterId(String chapterId);\n\n @Select(\"SELECT * FROM battle order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattle();\n\n @Select(\"SELECT * FROM battle WHERE battle_id = #{battleId}\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public Battle getBattleById(String battleId);\n}", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n List<KDUserMedal> selectAll();" ]
[ "0.538416", "0.53013885", "0.52881795", "0.5206365", "0.5200112", "0.5123933", "0.5113557", "0.5111038", "0.5087587", "0.5087201", "0.5055471", "0.5037925", "0.50137585", "0.5001423", "0.499934", "0.49889484", "0.4978261", "0.4961641", "0.49530965", "0.4940532", "0.49399298", "0.4935291", "0.49325922", "0.49165592", "0.48989907", "0.4877665", "0.48728466", "0.48678777", "0.48480317", "0.48376018", "0.48303312", "0.48197308", "0.48195714", "0.48178104", "0.4812278", "0.48071072", "0.48033354", "0.4790985", "0.4769452", "0.47646776", "0.47512186", "0.4746261", "0.47407556", "0.47259918", "0.47228697", "0.47161078", "0.47157538", "0.47155493", "0.4707758", "0.4706416", "0.47048804", "0.4699233", "0.46963036", "0.46962333", "0.46948344", "0.46941608", "0.4691967", "0.4687983", "0.46828815", "0.4682078", "0.468191", "0.46812382", "0.46754143", "0.46752995", "0.4675083", "0.46696302", "0.46645203", "0.46633705", "0.46582875", "0.4653521", "0.46471906", "0.4642964", "0.46404076", "0.46403554", "0.4639644", "0.46360135", "0.46352234", "0.46345302", "0.4630339", "0.46294755", "0.46284315", "0.46273106", "0.46230718", "0.4620601", "0.4619866", "0.4619363", "0.46174726", "0.4617433", "0.46169445", "0.46093524", "0.46090022", "0.46029115", "0.46018702", "0.45972648", "0.4592926", "0.45927244", "0.45882338", "0.45881224", "0.45808488", "0.457806" ]
0.560114
0
This method was generated by MyBatis Generator. This method corresponds to the database table dish
int updateByExampleSelective(@Param("record") Dish record, @Param("example") DishExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Dish selectByPrimaryKey(String id);", "@Override\n public List<SideDishEntity> findAll() {\n return null;\n }", "List<TblMotherSon> selectByExample(TblMotherSonExample example);", "@Override\r\n\tpublic int create(Dish dish) {\r\n\t\t\r\n//\t\thashMap.put(dish.getId(), dish);\r\n\t\tSystem.out.println(\" Creating Dish\");\r\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(dish);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n//\t\tSystem.out.println(\"Dish create successfully\" +dish.toString());\r\n\t\treturn dish.getId();\r\n\t\t\r\n\t}", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface PreparedDishHistoryDAO {\n int addPreparedDish(PreparedDish dish);\n List<PreparedDish> getAll();\n}", "public static ArrayList<Dish> getDishesByMenuId(String mid) throws SQLException {\r\n\t\tArrayList<Dish> result = new ArrayList<Dish>();\r\n\t\tString sql = \"SELECT dish_id, name, price, picture, description FROM dish\" + \" WHERE menu_id = ?\";\r\n\t\tResultSet rs;\r\n\t\tint dishId = -1;\r\n\t\tString name = \"\";\r\n\t\tfloat price = 0f;\r\n\t\tString filePath = \"\";\r\n\t\tString description = \"\";\r\n\r\n\t\tPreparedStatement sqlPrepared = DBConnection.prepare(sql);\r\n\t\tsqlPrepared.setString(1, mid);\r\n\t\trs = sqlPrepared.executeQuery();\r\n\t\twhile (rs.next()) {\r\n\t\t\tdishId = rs.getInt(1);\r\n\t\t\tname = rs.getString(2);\r\n\t\t\tprice = rs.getFloat(3);\r\n\t\t\tfilePath = rs.getString(4);\r\n\t\t\tdescription = rs.getString(5);\r\n\t\t\tDish dish = new Dish(String.valueOf(dishId), price, name, description,filePath);\r\n\t\t\t//put dish into identity map\r\n\t\t\tIdentityMap<Dish> map = IdentityMap.getInstance(dish);\r\n\t\t\tmap.put(dishId,dish);\r\n\t\t\t\r\n\t\t\tresult.add(dish);\r\n\t\t}\r\n\t\tsqlPrepared.close();\r\n\t\tDBConnection.dbConnection.close();\r\n\t\treturn result;\r\n\t}", "HrMscChaAssig selectByPrimaryKey(Date day, Integer hour, String mscid);", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();", "void fetchHolidayRentalHousesData();", "@Override\r\n public String storyID() {\r\n return \"HD\";\r\n }", "public ForeignInfo foreignStShohinKonyu() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnStShohinKonyuId(), StShohinKonyuDbm.getInstance().columnStShohinKonyuId());\n return cfi(\"FK_ST_SHHN_KNY_MS_ST_SHOHIN_KONYU\", \"stShohinKonyu\", this, StShohinKonyuDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "public ForeignInfo foreignSmShohin() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnSmShohinId(), SmShohinDbm.getInstance().columnSmShohinId());\n return cfi(\"FK_ST_SHHN_KNY_MS_SM_SHOHIN\", \"smShohin\", this, SmShohinDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "@Select({\n \"select\",\n \"`cate_id`, `cate_name`\",\n \"from `category`\",\n \"where `cate_id` = #{cateId,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n Category selectByPrimaryKey(Integer cateId);", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public interface DishDao {\n\n void save(Dish dish);\n List<Dish> findAll();\n Dish findByName(String name);\n\n void removeAll();\n}", "List<Dish> selectByExample(DishExample example);", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}", "@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }", "HelpInfo selectByPrimaryKey(Integer hId);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n News selectByPrimaryKey(Integer newsId);", "public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "public List<DishItem> getDish(){\n \tList<DishItem> dish = new ArrayList<DishItem>();\n\t\t\n\t\t//User user = userDao.find();\n\t\t//String tokenString = user.getToken();\n\t\t\n\t\tString dishResult;\t\t\n\t\tString urlString=\"/service/dish/getalldishs\";\n\t\ttry {\n\t\t\tdishResult = connect.testURLConn1(urlString);\n\t\t\tJSONObject jsonObject = new JSONObject(dishResult);System.out.println(\"jsonObject==\"+jsonObject);\n\t\t\tJSONArray jsonArray = jsonObject.getJSONArray(\"date\");System.out.println(\"jsonArray==\"+jsonArray);\n\t\t\t//userJSON = jsonObject.getJSONObject(\"user\");\n\t\t\t\n\t\t\tfor(int i=0;i<jsonArray.length();i++){ \n\t\t\t\t JSONObject jo = (JSONObject)jsonArray.opt(i);\n\t\t String id = jo.getString(\"_id\");\n\t\t String dishName = jo.getString(\"dishName\");\n\t\t String desc = jo.getString(\"desc\");\n\t\t int pic=jo.getInt(\"pic\");\n\t\t int col=jo.getInt(\"col\");\n\t\t DishItem dishitem = new DishItem(id, dishName, desc,pic,col);\n\t dish.add(dishitem);\n\t }\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\treturn dish;\n\t\t\n\t}", "@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}", "List<SellMedia> selectSellMediaByExample(SellMediaExample example) throws SQLException;", "@Override\n public List<SideDishEntity> findAll(Iterable<Long> ids) {\n return null;\n }", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "@Override\n public void showDiaryFromDB() {\n diaryPresenter.showDiaryFromDB();\n }", "Disproduct selectByPrimaryKey(String samId);", "@Dao\npublic interface ScenicPicDao {\n @Insert\n void insertScenicPic(ScenicPic scenicPic);\n\n @Query(\"DELETE from ScenicPic where scenic_id=:scenicId\")\n void deleteAllScenicPic(int scenicId);\n\n //return live data when data be changed, list update automatically\n @Query(\"select * from ScenicPic where scenic_id=:scenicId\")\n List<ScenicPic> getScenicPicById(int scenicId);\n}", "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }", "Nutrition selectByPrimaryKey(Integer nutritionid);", "public interface DishDao {\n Dish findOne(long id);\n List<Dish> findAll();\n void create(Dish entity);\n Dish update(Dish entity);\n void delete(Dish entity);\n void deleteById(long entityId);\n}", "private Shelf fillShelf(ResultSet rs) throws SQLException{\n Shelf shelf = new Shelf();\n shelf.setId(rs.getInt(\"id\"));\n shelf.setColumn(rs.getInt(\"col\"));\n shelf.setRow(rs.getInt(\"row\"));\n shelf.setMaxWeight(rs.getDouble(\"maxWeight\"));\n shelf.setCapacity(rs.getInt(\"capacity\"));\n shelf.setSecure(rs.getBoolean(\"secure\"));\n return shelf;\n }", "public interface SideEntityDao extends CrudRepository<SideEntity, Long> {\n\n\tSet<SideEntity> findAll();\n\n}", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "@SqlQuery(\"select * from PLAYERSTATS order by KILLS DESC FETCH FIRST 10 ROWS ONLY\")\n List<PlayerStats> findKillsHighScores();", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public String getName() {\n return dishName;\n }", "public java.sql.ResultSet DatosdelaCita(String CodHorMed){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n \tSystem.out.println(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>DatosdelaCita \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "UvStatDay selectByPrimaryKey(Long id);", "public String getDishOfTheDay(){\n return dishOfTheDay;\n }", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "public List<DiseasePojo> diseaseAll() \n\t{\n\n\t\tString sql = \"SELECT * FROM diseasemaster\";\n\t\treturn jdbcTemplate.query(sql, new ResultSetExtractor<List<DiseasePojo>>()\n\t\t{\n\t public List<DiseasePojo> extractData(ResultSet rs) throws SQLException,\n\t DataAccessException {\n\t \tList<DiseasePojo> list = new ArrayList<DiseasePojo>();\n\t while(rs.next()) {\n\t \tDiseasePojo dt = new DiseasePojo();\n\t \n\t dt.setDiseaseId(rs.getInt(\"DISEASEID\"));\n\t dt.setDiseaseCode(rs.getString(\"DISEASECODE\"));\n\t dt.setDiseaseName(rs.getString(\"DISEASENAME\"));\n\t list.add(dt);\n\t }\n\t return list;\n\t \n\t }\n\t });\n\t\n\t}", "public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }", "public interface IExampleWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void example(org.linlinjava.litemall.db.domain.example.SaleClassifyGoodExample example);\n }", "public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public Medium[] getDiscs() {\n Session session = getSessionFactory().openSession();\n session.beginTransaction();\n List<Disc> discList = session.createQuery(\"from Disc\", Disc.class).list();\n session.getTransaction().commit();\n session.close();\n return discList.toArray(new Medium[discList.size()]);\n }", "Kaiwa selectByPrimaryKey(String maht);", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "HospitalType selectByPrimaryKey(String id);", "PathologyInfo selectByPrimaryKey(Integer id);", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n KDUserMedal selectByPrimaryKey(Long id);", "public void setName(String dishName) {\n this.dishName = dishName;\n }", "public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface ProfitprofitActionRuleDao extends EntityMybatisDao<ProfitprofitActionRule> {\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate);\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate},cal_type=#{calType} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionIdUpdateAalRateAndCalType(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate, @Param(\"calType\") String calType);\n \n @Select(\"select * from profit_action_rule where section_id=#{sectionId}\")\n ProfitprofitActionRule selectProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String\n sectionId);\n\n @Delete(\"delete from profit_action_rule where id =#{id}\")\n void deleteProfitActionRuleById(@Param(\"id\")Long id);\n\n @Delete(\"delete from profit_action_rule \")\n void deleteProfitActionRuleByAll();\n \n}", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "BpmInstanciaHistorica selectByPrimaryKey(Long idreg);", "MenuInfo selectByPrimaryKey(Integer menuid);", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "List selectByExample(BnesBrowsingHisExample example) throws SQLException;", "public interface ArchetypeLevelsSchema {\n\tString TABLE_NAME = \"creature_archetype_levels\";\n\n\tString COLUMN_ARCHETYPE_ID = \"archetypeId\";\n\tString COLUMN_LEVEL = \"level\";\n\tString COLUMN_ATTACK = \"attack\";\n\tString COLUMN_ATTACK2 = \"attack2\";\n\tString COLUMN_DEF_BONUS = \"defensiveBonus\";\n\tString COLUMN_BODY_DEV = \"bodyDevelopment\";\n\tString COLUMN_PRIME_SKILL = \"primeSkill\";\n\tString COLUMN_SECONDARY_SKILL = \"secondarySkill\";\n\tString COLUMN_POWER_DEV = \"powerDevelopment\";\n\tString COLUMN_SPELLS = \"spells\";\n\tString COLUMN_TALENT_DP = \"talentDP\";\n\tString COLUMN_AGILITY = \"agility\";\n\tString COLUMN_CONS_STAT = \"constitutionStat\";\n\tString COLUMN_CONSTITUTION = \"constitution\";\n\tString COLUMN_EMPATHY = \"empathy\";\n\tString COLUMN_INTUITION = \"intuition\";\n\tString COLUMN_MEMORY = \"memory\";\n\tString COLUMN_PRESENCE = \"presence\";\n\tString COLUMN_QUICKNESS = \"quickness\";\n\tString COLUMN_REASONING = \"reasoning\";\n\tString COLUMN_SELF_DISC = \"selfDiscipline\";\n\tString COLUMN_STRENGTH = \"strength\";\n\n\tString TABLE_CREATE = \"CREATE TABLE IF NOT EXISTS \"\n\t\t\t+ TABLE_NAME\n\t\t\t+ \" (\"\n\t\t\t+ COLUMN_ARCHETYPE_ID + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_LEVEL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK2 + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_DEF_BONUS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_BODY_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRIME_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SECONDARY_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_POWER_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SPELLS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_TALENT_DP + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_AGILITY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONS_STAT + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONSTITUTION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_EMPATHY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_INTUITION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_MEMORY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRESENCE + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_QUICKNESS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_REASONING + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SELF_DISC + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_STRENGTH + \" INTEGER NOT NULL, \"\n\t\t\t+ \"PRIMARY KEY(\" + COLUMN_ARCHETYPE_ID + \",\" + COLUMN_LEVEL + \")\"\n\t\t\t+ \")\";\n\n\tString[] COLUMNS = new String[] { COLUMN_ARCHETYPE_ID, COLUMN_LEVEL, COLUMN_ATTACK, COLUMN_ATTACK2, COLUMN_DEF_BONUS,\n\t\t\tCOLUMN_BODY_DEV, COLUMN_PRIME_SKILL, COLUMN_SECONDARY_SKILL, COLUMN_POWER_DEV, COLUMN_SPELLS, COLUMN_TALENT_DP,\n\t\t\tCOLUMN_AGILITY, COLUMN_CONS_STAT, COLUMN_CONSTITUTION, COLUMN_EMPATHY, COLUMN_INTUITION, COLUMN_MEMORY,\n\t\t\tCOLUMN_PRESENCE, COLUMN_QUICKNESS, COLUMN_REASONING, COLUMN_SELF_DISC, COLUMN_STRENGTH};\n}", "public IMDBBaseEntity entityPerResultSet(ResultSet rs) throws SQLException {\n return null;\n }", "public interface ICriteriaWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void criteria(Criteria criteria);\n }", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "SysPic selectByPrimaryKey(Integer id);", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "@Dao\npublic interface MedicalCategoryDAO {\n\n\n\n @Query(\"SELECT * FROM medicalcategory\")\n List<MedicalCategory> getAll();\n\n @Query(\"SELECT COUNT(*) from medicalcategory\")\n int countcategories();\n\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertAll(MedicalCategory... medicalCategories);\n\n\n @Insert(onConflict = OnConflictStrategy.IGNORE)\n void insertsingle(MedicalCategory medicalCategory);\n\n\n}", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings(\"rawtypes\")\n\t@Override\n\t@Transactional(readOnly=true)\n\tpublic List listMissTheme(MissTheme persistentInstance)\n\t\t\tthrows DataAccessException {\n\t\tSession session = sessionAnnotationFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"select missTheme from MissTheme missTheme order by missTheme.mtId asc \");\n\t\treturn query.list();\n\t}", "public void showIngredients() {\n list = dbController.getIngredientsList();\n\n idColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Integer>(\"id\"));\n nameColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, String>(\"name\"));\n caloriesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"calories\"));\n proteinColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"protein\"));\n fatColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"fat\"));\n carbohydratesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"carbohydrates\"));\n selectColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, CheckBox>(\"select\"));\n\n TableView.setItems(list);\n }", "public interface ClothDao {\n /**\n * 判断衣服Id是否存在\n * @param id\n * @return boolean\n */\n boolean isClothIdExists(int id);\n /**\n * 返回图片\n * @param clothId\n * @return Clothinfostring\n */\n String getClothById(int clothId);\n /**\n * 返回图片\n * @param none\n * @return Cloth Ids\n */\n String getAllCloth();\n\n}", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "GirlInfo selectByPrimaryKey(Integer id);", "int updateByPrimaryKey(Dish record);", "public List<MediumBean> populatemediam(String sql ){\n\t\t\t\tList<MediumBean> retlist = jdbcTemplate.query(sql,ParameterizedBeanPropertyRowMapper.newInstance(MediumBean.class));\n\t\t\t\t\treturn retlist;\n\t\t }", "List<Horse> getAllHorses();", "public void formDatabaseTable() {\n }", "int updateByPrimaryKeySelective(Dish record);", "Drug_OutWarehouse selectByPrimaryKey(Long id);", "@SqlQuery(\"select * from PLAYERSTATS where SCOREID = :id\")\n PlayerStats findByScoreId(@Bind(\"id\") String id);", "@AfterQuery\n\t\tpublic void spriden_AfterQuery(RowAdapterEvent args)\n\t\t{\n\t\t\t\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)args.getRow();\n\n\n\t\t\t\tint rowCount = 0;\n\t\t\t\t{\n\t\t\t\t\tString sqlptiCursor = \"SELECT SPBPERS_BIRTH_DATE, SPBPERS_SEX \" +\n\t\" FROM SPBPERS \" +\n\t\" WHERE SPBPERS_PIDM = :SPRIDEN_PIDM \";\n\t\t\t\t\tDataCursor ptiCursor = new DataCursor(sqlptiCursor);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//Setting query parameters\n\t\t\t\t\t\tptiCursor.addParameter(\"SPRIDEN_PIDM\", spridenElement.getSpridenPidm());\n\t\t\t\t\t\tptiCursor.open();\n\t\t\t\t\t\tResultSet ptiCursorResults = ptiCursor.fetchInto();\n\t\t\t\t\t\tif ( ptiCursorResults != null ) {\n\t\t\t\t\t\t\tspridenElement.setBirthdate(ptiCursorResults.getDate(0));\n\t\t\t\t\t\t\tspridenElement.setSex(ptiCursorResults.getStr(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally{\n\t\t\t\t\t\tptiCursor.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "List<Horario_Disponible> findAll();", "@Override\n\tpublic List<Chitietdonhang> tinhDoanhThuTheoNam(Integer nam) {\n\t\treturn chiTietDonHangRepository.tinhDoanhThuTheoNam(nam);\n\t}", "@Override\r\n\tpublic List<Item> getAllHomework() {\n\t\t\r\n\t\treturn itemdao.find(\"from Item\");\r\n\t}", "public interface BattleDao {\n\n @Select(\"SELECT * FROM battle WHERE chapter_id = #{chapterId} order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattleByChapterId(String chapterId);\n\n @Select(\"SELECT * FROM battle order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattle();\n\n @Select(\"SELECT * FROM battle WHERE battle_id = #{battleId}\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public Battle getBattleById(String battleId);\n}" ]
[ "0.5601384", "0.53847265", "0.53002006", "0.52877796", "0.5206473", "0.51989734", "0.512477", "0.51117724", "0.5110217", "0.50892353", "0.5086627", "0.50535595", "0.50392836", "0.5013054", "0.5000241", "0.49984863", "0.49878994", "0.4977363", "0.49618345", "0.49523816", "0.49413592", "0.49389786", "0.4936248", "0.49332213", "0.49159628", "0.48967457", "0.48747426", "0.48719296", "0.4866831", "0.4848449", "0.483695", "0.48282132", "0.48195234", "0.4819503", "0.48168626", "0.48117268", "0.48043272", "0.4802299", "0.47883394", "0.47670814", "0.47636375", "0.47515178", "0.47449932", "0.47405112", "0.472486", "0.4720551", "0.4715175", "0.47136694", "0.4713145", "0.4707876", "0.47049212", "0.47037968", "0.46969354", "0.46960127", "0.46940917", "0.46940675", "0.46927306", "0.46913096", "0.46863195", "0.46815738", "0.46813998", "0.46806088", "0.46799222", "0.4675046", "0.4674654", "0.46715364", "0.46694893", "0.46642768", "0.46617723", "0.46563613", "0.465108", "0.46477005", "0.46408916", "0.46398345", "0.46397385", "0.4639085", "0.46344775", "0.46343386", "0.46340328", "0.46293363", "0.4629191", "0.46266726", "0.46262392", "0.46213406", "0.4619893", "0.46197516", "0.4618171", "0.46172377", "0.46171603", "0.46165928", "0.46078062", "0.46062034", "0.46053603", "0.46021193", "0.45952573", "0.4591363", "0.45908362", "0.45885736", "0.45880747", "0.45796278", "0.45795974" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table dish
int updateByExample(@Param("record") Dish record, @Param("example") DishExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Dish selectByPrimaryKey(String id);", "@Override\n public List<SideDishEntity> findAll() {\n return null;\n }", "List<TblMotherSon> selectByExample(TblMotherSonExample example);", "@Override\r\n\tpublic int create(Dish dish) {\r\n\t\t\r\n//\t\thashMap.put(dish.getId(), dish);\r\n\t\tSystem.out.println(\" Creating Dish\");\r\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(dish);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n//\t\tSystem.out.println(\"Dish create successfully\" +dish.toString());\r\n\t\treturn dish.getId();\r\n\t\t\r\n\t}", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface PreparedDishHistoryDAO {\n int addPreparedDish(PreparedDish dish);\n List<PreparedDish> getAll();\n}", "public static ArrayList<Dish> getDishesByMenuId(String mid) throws SQLException {\r\n\t\tArrayList<Dish> result = new ArrayList<Dish>();\r\n\t\tString sql = \"SELECT dish_id, name, price, picture, description FROM dish\" + \" WHERE menu_id = ?\";\r\n\t\tResultSet rs;\r\n\t\tint dishId = -1;\r\n\t\tString name = \"\";\r\n\t\tfloat price = 0f;\r\n\t\tString filePath = \"\";\r\n\t\tString description = \"\";\r\n\r\n\t\tPreparedStatement sqlPrepared = DBConnection.prepare(sql);\r\n\t\tsqlPrepared.setString(1, mid);\r\n\t\trs = sqlPrepared.executeQuery();\r\n\t\twhile (rs.next()) {\r\n\t\t\tdishId = rs.getInt(1);\r\n\t\t\tname = rs.getString(2);\r\n\t\t\tprice = rs.getFloat(3);\r\n\t\t\tfilePath = rs.getString(4);\r\n\t\t\tdescription = rs.getString(5);\r\n\t\t\tDish dish = new Dish(String.valueOf(dishId), price, name, description,filePath);\r\n\t\t\t//put dish into identity map\r\n\t\t\tIdentityMap<Dish> map = IdentityMap.getInstance(dish);\r\n\t\t\tmap.put(dishId,dish);\r\n\t\t\t\r\n\t\t\tresult.add(dish);\r\n\t\t}\r\n\t\tsqlPrepared.close();\r\n\t\tDBConnection.dbConnection.close();\r\n\t\treturn result;\r\n\t}", "HrMscChaAssig selectByPrimaryKey(Date day, Integer hour, String mscid);", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();", "void fetchHolidayRentalHousesData();", "@Override\r\n public String storyID() {\r\n return \"HD\";\r\n }", "public ForeignInfo foreignStShohinKonyu() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnStShohinKonyuId(), StShohinKonyuDbm.getInstance().columnStShohinKonyuId());\n return cfi(\"FK_ST_SHHN_KNY_MS_ST_SHOHIN_KONYU\", \"stShohinKonyu\", this, StShohinKonyuDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "public ForeignInfo foreignSmShohin() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnSmShohinId(), SmShohinDbm.getInstance().columnSmShohinId());\n return cfi(\"FK_ST_SHHN_KNY_MS_SM_SHOHIN\", \"smShohin\", this, SmShohinDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "@Select({\n \"select\",\n \"`cate_id`, `cate_name`\",\n \"from `category`\",\n \"where `cate_id` = #{cateId,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n Category selectByPrimaryKey(Integer cateId);", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public interface DishDao {\n\n void save(Dish dish);\n List<Dish> findAll();\n Dish findByName(String name);\n\n void removeAll();\n}", "List<Dish> selectByExample(DishExample example);", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}", "@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }", "HelpInfo selectByPrimaryKey(Integer hId);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n News selectByPrimaryKey(Integer newsId);", "public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "public List<DishItem> getDish(){\n \tList<DishItem> dish = new ArrayList<DishItem>();\n\t\t\n\t\t//User user = userDao.find();\n\t\t//String tokenString = user.getToken();\n\t\t\n\t\tString dishResult;\t\t\n\t\tString urlString=\"/service/dish/getalldishs\";\n\t\ttry {\n\t\t\tdishResult = connect.testURLConn1(urlString);\n\t\t\tJSONObject jsonObject = new JSONObject(dishResult);System.out.println(\"jsonObject==\"+jsonObject);\n\t\t\tJSONArray jsonArray = jsonObject.getJSONArray(\"date\");System.out.println(\"jsonArray==\"+jsonArray);\n\t\t\t//userJSON = jsonObject.getJSONObject(\"user\");\n\t\t\t\n\t\t\tfor(int i=0;i<jsonArray.length();i++){ \n\t\t\t\t JSONObject jo = (JSONObject)jsonArray.opt(i);\n\t\t String id = jo.getString(\"_id\");\n\t\t String dishName = jo.getString(\"dishName\");\n\t\t String desc = jo.getString(\"desc\");\n\t\t int pic=jo.getInt(\"pic\");\n\t\t int col=jo.getInt(\"col\");\n\t\t DishItem dishitem = new DishItem(id, dishName, desc,pic,col);\n\t dish.add(dishitem);\n\t }\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\treturn dish;\n\t\t\n\t}", "@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}", "List<SellMedia> selectSellMediaByExample(SellMediaExample example) throws SQLException;", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@Override\n public List<SideDishEntity> findAll(Iterable<Long> ids) {\n return null;\n }", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "@Override\n public void showDiaryFromDB() {\n diaryPresenter.showDiaryFromDB();\n }", "Disproduct selectByPrimaryKey(String samId);", "@Dao\npublic interface ScenicPicDao {\n @Insert\n void insertScenicPic(ScenicPic scenicPic);\n\n @Query(\"DELETE from ScenicPic where scenic_id=:scenicId\")\n void deleteAllScenicPic(int scenicId);\n\n //return live data when data be changed, list update automatically\n @Query(\"select * from ScenicPic where scenic_id=:scenicId\")\n List<ScenicPic> getScenicPicById(int scenicId);\n}", "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }", "Nutrition selectByPrimaryKey(Integer nutritionid);", "public interface DishDao {\n Dish findOne(long id);\n List<Dish> findAll();\n void create(Dish entity);\n Dish update(Dish entity);\n void delete(Dish entity);\n void deleteById(long entityId);\n}", "private Shelf fillShelf(ResultSet rs) throws SQLException{\n Shelf shelf = new Shelf();\n shelf.setId(rs.getInt(\"id\"));\n shelf.setColumn(rs.getInt(\"col\"));\n shelf.setRow(rs.getInt(\"row\"));\n shelf.setMaxWeight(rs.getDouble(\"maxWeight\"));\n shelf.setCapacity(rs.getInt(\"capacity\"));\n shelf.setSecure(rs.getBoolean(\"secure\"));\n return shelf;\n }", "public interface SideEntityDao extends CrudRepository<SideEntity, Long> {\n\n\tSet<SideEntity> findAll();\n\n}", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "@SqlQuery(\"select * from PLAYERSTATS order by KILLS DESC FETCH FIRST 10 ROWS ONLY\")\n List<PlayerStats> findKillsHighScores();", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public String getName() {\n return dishName;\n }", "public java.sql.ResultSet DatosdelaCita(String CodHorMed){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n \tSystem.out.println(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>DatosdelaCita \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "UvStatDay selectByPrimaryKey(Long id);", "public String getDishOfTheDay(){\n return dishOfTheDay;\n }", "public List<DiseasePojo> diseaseAll() \n\t{\n\n\t\tString sql = \"SELECT * FROM diseasemaster\";\n\t\treturn jdbcTemplate.query(sql, new ResultSetExtractor<List<DiseasePojo>>()\n\t\t{\n\t public List<DiseasePojo> extractData(ResultSet rs) throws SQLException,\n\t DataAccessException {\n\t \tList<DiseasePojo> list = new ArrayList<DiseasePojo>();\n\t while(rs.next()) {\n\t \tDiseasePojo dt = new DiseasePojo();\n\t \n\t dt.setDiseaseId(rs.getInt(\"DISEASEID\"));\n\t dt.setDiseaseCode(rs.getString(\"DISEASECODE\"));\n\t dt.setDiseaseName(rs.getString(\"DISEASENAME\"));\n\t list.add(dt);\n\t }\n\t return list;\n\t \n\t }\n\t });\n\t\n\t}", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }", "public interface IExampleWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void example(org.linlinjava.litemall.db.domain.example.SaleClassifyGoodExample example);\n }", "public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public Medium[] getDiscs() {\n Session session = getSessionFactory().openSession();\n session.beginTransaction();\n List<Disc> discList = session.createQuery(\"from Disc\", Disc.class).list();\n session.getTransaction().commit();\n session.close();\n return discList.toArray(new Medium[discList.size()]);\n }", "Kaiwa selectByPrimaryKey(String maht);", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "PathologyInfo selectByPrimaryKey(Integer id);", "HospitalType selectByPrimaryKey(String id);", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n KDUserMedal selectByPrimaryKey(Long id);", "public void setName(String dishName) {\n this.dishName = dishName;\n }", "public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface ProfitprofitActionRuleDao extends EntityMybatisDao<ProfitprofitActionRule> {\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate);\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate},cal_type=#{calType} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionIdUpdateAalRateAndCalType(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate, @Param(\"calType\") String calType);\n \n @Select(\"select * from profit_action_rule where section_id=#{sectionId}\")\n ProfitprofitActionRule selectProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String\n sectionId);\n\n @Delete(\"delete from profit_action_rule where id =#{id}\")\n void deleteProfitActionRuleById(@Param(\"id\")Long id);\n\n @Delete(\"delete from profit_action_rule \")\n void deleteProfitActionRuleByAll();\n \n}", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "BpmInstanciaHistorica selectByPrimaryKey(Long idreg);", "MenuInfo selectByPrimaryKey(Integer menuid);", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "List selectByExample(BnesBrowsingHisExample example) throws SQLException;", "public IMDBBaseEntity entityPerResultSet(ResultSet rs) throws SQLException {\n return null;\n }", "public interface ArchetypeLevelsSchema {\n\tString TABLE_NAME = \"creature_archetype_levels\";\n\n\tString COLUMN_ARCHETYPE_ID = \"archetypeId\";\n\tString COLUMN_LEVEL = \"level\";\n\tString COLUMN_ATTACK = \"attack\";\n\tString COLUMN_ATTACK2 = \"attack2\";\n\tString COLUMN_DEF_BONUS = \"defensiveBonus\";\n\tString COLUMN_BODY_DEV = \"bodyDevelopment\";\n\tString COLUMN_PRIME_SKILL = \"primeSkill\";\n\tString COLUMN_SECONDARY_SKILL = \"secondarySkill\";\n\tString COLUMN_POWER_DEV = \"powerDevelopment\";\n\tString COLUMN_SPELLS = \"spells\";\n\tString COLUMN_TALENT_DP = \"talentDP\";\n\tString COLUMN_AGILITY = \"agility\";\n\tString COLUMN_CONS_STAT = \"constitutionStat\";\n\tString COLUMN_CONSTITUTION = \"constitution\";\n\tString COLUMN_EMPATHY = \"empathy\";\n\tString COLUMN_INTUITION = \"intuition\";\n\tString COLUMN_MEMORY = \"memory\";\n\tString COLUMN_PRESENCE = \"presence\";\n\tString COLUMN_QUICKNESS = \"quickness\";\n\tString COLUMN_REASONING = \"reasoning\";\n\tString COLUMN_SELF_DISC = \"selfDiscipline\";\n\tString COLUMN_STRENGTH = \"strength\";\n\n\tString TABLE_CREATE = \"CREATE TABLE IF NOT EXISTS \"\n\t\t\t+ TABLE_NAME\n\t\t\t+ \" (\"\n\t\t\t+ COLUMN_ARCHETYPE_ID + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_LEVEL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK2 + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_DEF_BONUS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_BODY_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRIME_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SECONDARY_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_POWER_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SPELLS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_TALENT_DP + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_AGILITY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONS_STAT + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONSTITUTION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_EMPATHY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_INTUITION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_MEMORY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRESENCE + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_QUICKNESS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_REASONING + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SELF_DISC + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_STRENGTH + \" INTEGER NOT NULL, \"\n\t\t\t+ \"PRIMARY KEY(\" + COLUMN_ARCHETYPE_ID + \",\" + COLUMN_LEVEL + \")\"\n\t\t\t+ \")\";\n\n\tString[] COLUMNS = new String[] { COLUMN_ARCHETYPE_ID, COLUMN_LEVEL, COLUMN_ATTACK, COLUMN_ATTACK2, COLUMN_DEF_BONUS,\n\t\t\tCOLUMN_BODY_DEV, COLUMN_PRIME_SKILL, COLUMN_SECONDARY_SKILL, COLUMN_POWER_DEV, COLUMN_SPELLS, COLUMN_TALENT_DP,\n\t\t\tCOLUMN_AGILITY, COLUMN_CONS_STAT, COLUMN_CONSTITUTION, COLUMN_EMPATHY, COLUMN_INTUITION, COLUMN_MEMORY,\n\t\t\tCOLUMN_PRESENCE, COLUMN_QUICKNESS, COLUMN_REASONING, COLUMN_SELF_DISC, COLUMN_STRENGTH};\n}", "public interface ICriteriaWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void criteria(Criteria criteria);\n }", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "SysPic selectByPrimaryKey(Integer id);", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "@Dao\npublic interface MedicalCategoryDAO {\n\n\n\n @Query(\"SELECT * FROM medicalcategory\")\n List<MedicalCategory> getAll();\n\n @Query(\"SELECT COUNT(*) from medicalcategory\")\n int countcategories();\n\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertAll(MedicalCategory... medicalCategories);\n\n\n @Insert(onConflict = OnConflictStrategy.IGNORE)\n void insertsingle(MedicalCategory medicalCategory);\n\n\n}", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "public void showIngredients() {\n list = dbController.getIngredientsList();\n\n idColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Integer>(\"id\"));\n nameColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, String>(\"name\"));\n caloriesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"calories\"));\n proteinColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"protein\"));\n fatColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"fat\"));\n carbohydratesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"carbohydrates\"));\n selectColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, CheckBox>(\"select\"));\n\n TableView.setItems(list);\n }", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "public interface ClothDao {\n /**\n * 判断衣服Id是否存在\n * @param id\n * @return boolean\n */\n boolean isClothIdExists(int id);\n /**\n * 返回图片\n * @param clothId\n * @return Clothinfostring\n */\n String getClothById(int clothId);\n /**\n * 返回图片\n * @param none\n * @return Cloth Ids\n */\n String getAllCloth();\n\n}", "int updateByPrimaryKey(Dish record);", "@SuppressWarnings(\"rawtypes\")\n\t@Override\n\t@Transactional(readOnly=true)\n\tpublic List listMissTheme(MissTheme persistentInstance)\n\t\t\tthrows DataAccessException {\n\t\tSession session = sessionAnnotationFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"select missTheme from MissTheme missTheme order by missTheme.mtId asc \");\n\t\treturn query.list();\n\t}", "GirlInfo selectByPrimaryKey(Integer id);", "public List<MediumBean> populatemediam(String sql ){\n\t\t\t\tList<MediumBean> retlist = jdbcTemplate.query(sql,ParameterizedBeanPropertyRowMapper.newInstance(MediumBean.class));\n\t\t\t\t\treturn retlist;\n\t\t }", "public void formDatabaseTable() {\n }", "int updateByPrimaryKeySelective(Dish record);", "List<Horse> getAllHorses();", "Drug_OutWarehouse selectByPrimaryKey(Long id);", "@AfterQuery\n\t\tpublic void spriden_AfterQuery(RowAdapterEvent args)\n\t\t{\n\t\t\t\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)args.getRow();\n\n\n\t\t\t\tint rowCount = 0;\n\t\t\t\t{\n\t\t\t\t\tString sqlptiCursor = \"SELECT SPBPERS_BIRTH_DATE, SPBPERS_SEX \" +\n\t\" FROM SPBPERS \" +\n\t\" WHERE SPBPERS_PIDM = :SPRIDEN_PIDM \";\n\t\t\t\t\tDataCursor ptiCursor = new DataCursor(sqlptiCursor);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//Setting query parameters\n\t\t\t\t\t\tptiCursor.addParameter(\"SPRIDEN_PIDM\", spridenElement.getSpridenPidm());\n\t\t\t\t\t\tptiCursor.open();\n\t\t\t\t\t\tResultSet ptiCursorResults = ptiCursor.fetchInto();\n\t\t\t\t\t\tif ( ptiCursorResults != null ) {\n\t\t\t\t\t\t\tspridenElement.setBirthdate(ptiCursorResults.getDate(0));\n\t\t\t\t\t\t\tspridenElement.setSex(ptiCursorResults.getStr(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally{\n\t\t\t\t\t\tptiCursor.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@SqlQuery(\"select * from PLAYERSTATS where SCOREID = :id\")\n PlayerStats findByScoreId(@Bind(\"id\") String id);", "@Override\n\tpublic List<Chitietdonhang> tinhDoanhThuTheoNam(Integer nam) {\n\t\treturn chiTietDonHangRepository.tinhDoanhThuTheoNam(nam);\n\t}", "List<Horario_Disponible> findAll();", "public interface BattleDao {\n\n @Select(\"SELECT * FROM battle WHERE chapter_id = #{chapterId} order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattleByChapterId(String chapterId);\n\n @Select(\"SELECT * FROM battle order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattle();\n\n @Select(\"SELECT * FROM battle WHERE battle_id = #{battleId}\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public Battle getBattleById(String battleId);\n}", "public ArrayList<Desserts> getAllDesserts() { \r\n\t ArrayList<Desserts> AllDesserts = new ArrayList<Desserts>();\r\n\t try {\r\n\t Class.forName(\"com.mysql.jdbc.Driver\");\r\n\t Connection conn = DriverManager.getConnection(url+dbName,userName,password);\r\n\t statement=conn.createStatement();\r\n\t resultSet=statement.executeQuery(\"select * from g13restaurant.Desserts\");\r\n\t \r\n\t while ( resultSet.next() ) {\r\n\t \t Desserts nextDesserts = new Desserts(\r\n\t \t\t\t resultSet.getInt(\"dessert_ID\"), \r\n\t \t\t\t resultSet.getString(\"dessert_Name\"),\r\n\t resultSet.getString(\"dessert_Description\"), \r\n\t resultSet.getFloat(\"dessert_Cost\"),\r\n\t resultSet.getString(\"dessert_Type\").toString() ); \r\n\t AllDesserts.add(nextDesserts);\r\n\t }\r\n\t conn.close();\r\n\t } \r\n\t catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t return AllDesserts; \r\n\t }" ]
[ "0.5601651", "0.53839487", "0.53021646", "0.52873755", "0.520671", "0.5199008", "0.51244825", "0.51128334", "0.51112014", "0.5086853", "0.50846237", "0.50530577", "0.50382876", "0.5010417", "0.5000066", "0.49977776", "0.49874738", "0.4977294", "0.4961594", "0.4952532", "0.494201", "0.49400103", "0.4935266", "0.49334523", "0.4913651", "0.48966566", "0.48760986", "0.4873431", "0.48674852", "0.48482263", "0.48369205", "0.4828204", "0.4820147", "0.4819659", "0.48163944", "0.48132688", "0.48045355", "0.48015493", "0.4790453", "0.47686547", "0.47637588", "0.47512266", "0.4745165", "0.4741528", "0.4724258", "0.4722147", "0.4715255", "0.47143948", "0.4712681", "0.47064984", "0.4705355", "0.4702779", "0.46978354", "0.46959195", "0.46941528", "0.46938932", "0.46937716", "0.46931654", "0.46861097", "0.4682892", "0.4682116", "0.46809503", "0.46807703", "0.4674833", "0.46745697", "0.4672617", "0.4669176", "0.46653524", "0.46621925", "0.46556634", "0.46513012", "0.46466786", "0.4640407", "0.4639889", "0.46388292", "0.46379563", "0.4634017", "0.46337754", "0.46334422", "0.4628962", "0.4628682", "0.46264276", "0.46256983", "0.4622565", "0.46188143", "0.46176806", "0.4617436", "0.46174166", "0.46172732", "0.46169975", "0.46084943", "0.4606415", "0.460357", "0.46032286", "0.45968014", "0.4593058", "0.45916504", "0.4587022", "0.45857728", "0.4580759", "0.457777" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table dish
int updateByPrimaryKeySelective(Dish record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Dish selectByPrimaryKey(String id);", "@Override\n public List<SideDishEntity> findAll() {\n return null;\n }", "List<TblMotherSon> selectByExample(TblMotherSonExample example);", "@Override\r\n\tpublic int create(Dish dish) {\r\n\t\t\r\n//\t\thashMap.put(dish.getId(), dish);\r\n\t\tSystem.out.println(\" Creating Dish\");\r\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(dish);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n//\t\tSystem.out.println(\"Dish create successfully\" +dish.toString());\r\n\t\treturn dish.getId();\r\n\t\t\r\n\t}", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface PreparedDishHistoryDAO {\n int addPreparedDish(PreparedDish dish);\n List<PreparedDish> getAll();\n}", "public static ArrayList<Dish> getDishesByMenuId(String mid) throws SQLException {\r\n\t\tArrayList<Dish> result = new ArrayList<Dish>();\r\n\t\tString sql = \"SELECT dish_id, name, price, picture, description FROM dish\" + \" WHERE menu_id = ?\";\r\n\t\tResultSet rs;\r\n\t\tint dishId = -1;\r\n\t\tString name = \"\";\r\n\t\tfloat price = 0f;\r\n\t\tString filePath = \"\";\r\n\t\tString description = \"\";\r\n\r\n\t\tPreparedStatement sqlPrepared = DBConnection.prepare(sql);\r\n\t\tsqlPrepared.setString(1, mid);\r\n\t\trs = sqlPrepared.executeQuery();\r\n\t\twhile (rs.next()) {\r\n\t\t\tdishId = rs.getInt(1);\r\n\t\t\tname = rs.getString(2);\r\n\t\t\tprice = rs.getFloat(3);\r\n\t\t\tfilePath = rs.getString(4);\r\n\t\t\tdescription = rs.getString(5);\r\n\t\t\tDish dish = new Dish(String.valueOf(dishId), price, name, description,filePath);\r\n\t\t\t//put dish into identity map\r\n\t\t\tIdentityMap<Dish> map = IdentityMap.getInstance(dish);\r\n\t\t\tmap.put(dishId,dish);\r\n\t\t\t\r\n\t\t\tresult.add(dish);\r\n\t\t}\r\n\t\tsqlPrepared.close();\r\n\t\tDBConnection.dbConnection.close();\r\n\t\treturn result;\r\n\t}", "HrMscChaAssig selectByPrimaryKey(Date day, Integer hour, String mscid);", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();", "void fetchHolidayRentalHousesData();", "@Override\r\n public String storyID() {\r\n return \"HD\";\r\n }", "public ForeignInfo foreignStShohinKonyu() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnStShohinKonyuId(), StShohinKonyuDbm.getInstance().columnStShohinKonyuId());\n return cfi(\"FK_ST_SHHN_KNY_MS_ST_SHOHIN_KONYU\", \"stShohinKonyu\", this, StShohinKonyuDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "public ForeignInfo foreignSmShohin() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnSmShohinId(), SmShohinDbm.getInstance().columnSmShohinId());\n return cfi(\"FK_ST_SHHN_KNY_MS_SM_SHOHIN\", \"smShohin\", this, SmShohinDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "@Select({\n \"select\",\n \"`cate_id`, `cate_name`\",\n \"from `category`\",\n \"where `cate_id` = #{cateId,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n Category selectByPrimaryKey(Integer cateId);", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public interface DishDao {\n\n void save(Dish dish);\n List<Dish> findAll();\n Dish findByName(String name);\n\n void removeAll();\n}", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Dish> selectByExample(DishExample example);", "public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}", "@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }", "HelpInfo selectByPrimaryKey(Integer hId);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n News selectByPrimaryKey(Integer newsId);", "public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "public List<DishItem> getDish(){\n \tList<DishItem> dish = new ArrayList<DishItem>();\n\t\t\n\t\t//User user = userDao.find();\n\t\t//String tokenString = user.getToken();\n\t\t\n\t\tString dishResult;\t\t\n\t\tString urlString=\"/service/dish/getalldishs\";\n\t\ttry {\n\t\t\tdishResult = connect.testURLConn1(urlString);\n\t\t\tJSONObject jsonObject = new JSONObject(dishResult);System.out.println(\"jsonObject==\"+jsonObject);\n\t\t\tJSONArray jsonArray = jsonObject.getJSONArray(\"date\");System.out.println(\"jsonArray==\"+jsonArray);\n\t\t\t//userJSON = jsonObject.getJSONObject(\"user\");\n\t\t\t\n\t\t\tfor(int i=0;i<jsonArray.length();i++){ \n\t\t\t\t JSONObject jo = (JSONObject)jsonArray.opt(i);\n\t\t String id = jo.getString(\"_id\");\n\t\t String dishName = jo.getString(\"dishName\");\n\t\t String desc = jo.getString(\"desc\");\n\t\t int pic=jo.getInt(\"pic\");\n\t\t int col=jo.getInt(\"col\");\n\t\t DishItem dishitem = new DishItem(id, dishName, desc,pic,col);\n\t dish.add(dishitem);\n\t }\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\treturn dish;\n\t\t\n\t}", "@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}", "List<SellMedia> selectSellMediaByExample(SellMediaExample example) throws SQLException;", "@Override\n public List<SideDishEntity> findAll(Iterable<Long> ids) {\n return null;\n }", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "@Override\n public void showDiaryFromDB() {\n diaryPresenter.showDiaryFromDB();\n }", "Disproduct selectByPrimaryKey(String samId);", "@Dao\npublic interface ScenicPicDao {\n @Insert\n void insertScenicPic(ScenicPic scenicPic);\n\n @Query(\"DELETE from ScenicPic where scenic_id=:scenicId\")\n void deleteAllScenicPic(int scenicId);\n\n //return live data when data be changed, list update automatically\n @Query(\"select * from ScenicPic where scenic_id=:scenicId\")\n List<ScenicPic> getScenicPicById(int scenicId);\n}", "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }", "Nutrition selectByPrimaryKey(Integer nutritionid);", "public interface DishDao {\n Dish findOne(long id);\n List<Dish> findAll();\n void create(Dish entity);\n Dish update(Dish entity);\n void delete(Dish entity);\n void deleteById(long entityId);\n}", "private Shelf fillShelf(ResultSet rs) throws SQLException{\n Shelf shelf = new Shelf();\n shelf.setId(rs.getInt(\"id\"));\n shelf.setColumn(rs.getInt(\"col\"));\n shelf.setRow(rs.getInt(\"row\"));\n shelf.setMaxWeight(rs.getDouble(\"maxWeight\"));\n shelf.setCapacity(rs.getInt(\"capacity\"));\n shelf.setSecure(rs.getBoolean(\"secure\"));\n return shelf;\n }", "public interface SideEntityDao extends CrudRepository<SideEntity, Long> {\n\n\tSet<SideEntity> findAll();\n\n}", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "@SqlQuery(\"select * from PLAYERSTATS order by KILLS DESC FETCH FIRST 10 ROWS ONLY\")\n List<PlayerStats> findKillsHighScores();", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public String getName() {\n return dishName;\n }", "public java.sql.ResultSet DatosdelaCita(String CodHorMed){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n \tSystem.out.println(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>DatosdelaCita \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "UvStatDay selectByPrimaryKey(Long id);", "public String getDishOfTheDay(){\n return dishOfTheDay;\n }", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "public List<DiseasePojo> diseaseAll() \n\t{\n\n\t\tString sql = \"SELECT * FROM diseasemaster\";\n\t\treturn jdbcTemplate.query(sql, new ResultSetExtractor<List<DiseasePojo>>()\n\t\t{\n\t public List<DiseasePojo> extractData(ResultSet rs) throws SQLException,\n\t DataAccessException {\n\t \tList<DiseasePojo> list = new ArrayList<DiseasePojo>();\n\t while(rs.next()) {\n\t \tDiseasePojo dt = new DiseasePojo();\n\t \n\t dt.setDiseaseId(rs.getInt(\"DISEASEID\"));\n\t dt.setDiseaseCode(rs.getString(\"DISEASECODE\"));\n\t dt.setDiseaseName(rs.getString(\"DISEASENAME\"));\n\t list.add(dt);\n\t }\n\t return list;\n\t \n\t }\n\t });\n\t\n\t}", "public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }", "public interface IExampleWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void example(org.linlinjava.litemall.db.domain.example.SaleClassifyGoodExample example);\n }", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public Medium[] getDiscs() {\n Session session = getSessionFactory().openSession();\n session.beginTransaction();\n List<Disc> discList = session.createQuery(\"from Disc\", Disc.class).list();\n session.getTransaction().commit();\n session.close();\n return discList.toArray(new Medium[discList.size()]);\n }", "Kaiwa selectByPrimaryKey(String maht);", "PathologyInfo selectByPrimaryKey(Integer id);", "HospitalType selectByPrimaryKey(String id);", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n KDUserMedal selectByPrimaryKey(Long id);", "public void setName(String dishName) {\n this.dishName = dishName;\n }", "public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface ProfitprofitActionRuleDao extends EntityMybatisDao<ProfitprofitActionRule> {\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate);\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate},cal_type=#{calType} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionIdUpdateAalRateAndCalType(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate, @Param(\"calType\") String calType);\n \n @Select(\"select * from profit_action_rule where section_id=#{sectionId}\")\n ProfitprofitActionRule selectProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String\n sectionId);\n\n @Delete(\"delete from profit_action_rule where id =#{id}\")\n void deleteProfitActionRuleById(@Param(\"id\")Long id);\n\n @Delete(\"delete from profit_action_rule \")\n void deleteProfitActionRuleByAll();\n \n}", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "BpmInstanciaHistorica selectByPrimaryKey(Long idreg);", "MenuInfo selectByPrimaryKey(Integer menuid);", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "public IMDBBaseEntity entityPerResultSet(ResultSet rs) throws SQLException {\n return null;\n }", "List selectByExample(BnesBrowsingHisExample example) throws SQLException;", "public interface ArchetypeLevelsSchema {\n\tString TABLE_NAME = \"creature_archetype_levels\";\n\n\tString COLUMN_ARCHETYPE_ID = \"archetypeId\";\n\tString COLUMN_LEVEL = \"level\";\n\tString COLUMN_ATTACK = \"attack\";\n\tString COLUMN_ATTACK2 = \"attack2\";\n\tString COLUMN_DEF_BONUS = \"defensiveBonus\";\n\tString COLUMN_BODY_DEV = \"bodyDevelopment\";\n\tString COLUMN_PRIME_SKILL = \"primeSkill\";\n\tString COLUMN_SECONDARY_SKILL = \"secondarySkill\";\n\tString COLUMN_POWER_DEV = \"powerDevelopment\";\n\tString COLUMN_SPELLS = \"spells\";\n\tString COLUMN_TALENT_DP = \"talentDP\";\n\tString COLUMN_AGILITY = \"agility\";\n\tString COLUMN_CONS_STAT = \"constitutionStat\";\n\tString COLUMN_CONSTITUTION = \"constitution\";\n\tString COLUMN_EMPATHY = \"empathy\";\n\tString COLUMN_INTUITION = \"intuition\";\n\tString COLUMN_MEMORY = \"memory\";\n\tString COLUMN_PRESENCE = \"presence\";\n\tString COLUMN_QUICKNESS = \"quickness\";\n\tString COLUMN_REASONING = \"reasoning\";\n\tString COLUMN_SELF_DISC = \"selfDiscipline\";\n\tString COLUMN_STRENGTH = \"strength\";\n\n\tString TABLE_CREATE = \"CREATE TABLE IF NOT EXISTS \"\n\t\t\t+ TABLE_NAME\n\t\t\t+ \" (\"\n\t\t\t+ COLUMN_ARCHETYPE_ID + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_LEVEL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK2 + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_DEF_BONUS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_BODY_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRIME_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SECONDARY_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_POWER_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SPELLS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_TALENT_DP + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_AGILITY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONS_STAT + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONSTITUTION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_EMPATHY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_INTUITION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_MEMORY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRESENCE + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_QUICKNESS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_REASONING + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SELF_DISC + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_STRENGTH + \" INTEGER NOT NULL, \"\n\t\t\t+ \"PRIMARY KEY(\" + COLUMN_ARCHETYPE_ID + \",\" + COLUMN_LEVEL + \")\"\n\t\t\t+ \")\";\n\n\tString[] COLUMNS = new String[] { COLUMN_ARCHETYPE_ID, COLUMN_LEVEL, COLUMN_ATTACK, COLUMN_ATTACK2, COLUMN_DEF_BONUS,\n\t\t\tCOLUMN_BODY_DEV, COLUMN_PRIME_SKILL, COLUMN_SECONDARY_SKILL, COLUMN_POWER_DEV, COLUMN_SPELLS, COLUMN_TALENT_DP,\n\t\t\tCOLUMN_AGILITY, COLUMN_CONS_STAT, COLUMN_CONSTITUTION, COLUMN_EMPATHY, COLUMN_INTUITION, COLUMN_MEMORY,\n\t\t\tCOLUMN_PRESENCE, COLUMN_QUICKNESS, COLUMN_REASONING, COLUMN_SELF_DISC, COLUMN_STRENGTH};\n}", "SysPic selectByPrimaryKey(Integer id);", "public interface ICriteriaWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void criteria(Criteria criteria);\n }", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "@Dao\npublic interface MedicalCategoryDAO {\n\n\n\n @Query(\"SELECT * FROM medicalcategory\")\n List<MedicalCategory> getAll();\n\n @Query(\"SELECT COUNT(*) from medicalcategory\")\n int countcategories();\n\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertAll(MedicalCategory... medicalCategories);\n\n\n @Insert(onConflict = OnConflictStrategy.IGNORE)\n void insertsingle(MedicalCategory medicalCategory);\n\n\n}", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings(\"rawtypes\")\n\t@Override\n\t@Transactional(readOnly=true)\n\tpublic List listMissTheme(MissTheme persistentInstance)\n\t\t\tthrows DataAccessException {\n\t\tSession session = sessionAnnotationFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"select missTheme from MissTheme missTheme order by missTheme.mtId asc \");\n\t\treturn query.list();\n\t}", "public void showIngredients() {\n list = dbController.getIngredientsList();\n\n idColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Integer>(\"id\"));\n nameColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, String>(\"name\"));\n caloriesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"calories\"));\n proteinColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"protein\"));\n fatColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"fat\"));\n carbohydratesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"carbohydrates\"));\n selectColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, CheckBox>(\"select\"));\n\n TableView.setItems(list);\n }", "public interface ClothDao {\n /**\n * 判断衣服Id是否存在\n * @param id\n * @return boolean\n */\n boolean isClothIdExists(int id);\n /**\n * 返回图片\n * @param clothId\n * @return Clothinfostring\n */\n String getClothById(int clothId);\n /**\n * 返回图片\n * @param none\n * @return Cloth Ids\n */\n String getAllCloth();\n\n}", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "GirlInfo selectByPrimaryKey(Integer id);", "int updateByPrimaryKey(Dish record);", "public List<MediumBean> populatemediam(String sql ){\n\t\t\t\tList<MediumBean> retlist = jdbcTemplate.query(sql,ParameterizedBeanPropertyRowMapper.newInstance(MediumBean.class));\n\t\t\t\t\treturn retlist;\n\t\t }", "public void formDatabaseTable() {\n }", "List<Horse> getAllHorses();", "Drug_OutWarehouse selectByPrimaryKey(Long id);", "@AfterQuery\n\t\tpublic void spriden_AfterQuery(RowAdapterEvent args)\n\t\t{\n\t\t\t\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)args.getRow();\n\n\n\t\t\t\tint rowCount = 0;\n\t\t\t\t{\n\t\t\t\t\tString sqlptiCursor = \"SELECT SPBPERS_BIRTH_DATE, SPBPERS_SEX \" +\n\t\" FROM SPBPERS \" +\n\t\" WHERE SPBPERS_PIDM = :SPRIDEN_PIDM \";\n\t\t\t\t\tDataCursor ptiCursor = new DataCursor(sqlptiCursor);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//Setting query parameters\n\t\t\t\t\t\tptiCursor.addParameter(\"SPRIDEN_PIDM\", spridenElement.getSpridenPidm());\n\t\t\t\t\t\tptiCursor.open();\n\t\t\t\t\t\tResultSet ptiCursorResults = ptiCursor.fetchInto();\n\t\t\t\t\t\tif ( ptiCursorResults != null ) {\n\t\t\t\t\t\t\tspridenElement.setBirthdate(ptiCursorResults.getDate(0));\n\t\t\t\t\t\t\tspridenElement.setSex(ptiCursorResults.getStr(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally{\n\t\t\t\t\t\tptiCursor.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@SqlQuery(\"select * from PLAYERSTATS where SCOREID = :id\")\n PlayerStats findByScoreId(@Bind(\"id\") String id);", "@Override\n\tpublic List<Chitietdonhang> tinhDoanhThuTheoNam(Integer nam) {\n\t\treturn chiTietDonHangRepository.tinhDoanhThuTheoNam(nam);\n\t}", "List<Horario_Disponible> findAll();", "public interface BattleDao {\n\n @Select(\"SELECT * FROM battle WHERE chapter_id = #{chapterId} order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattleByChapterId(String chapterId);\n\n @Select(\"SELECT * FROM battle order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattle();\n\n @Select(\"SELECT * FROM battle WHERE battle_id = #{battleId}\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public Battle getBattleById(String battleId);\n}", "@Override\r\n\tpublic List<Item> getAllHomework() {\n\t\t\r\n\t\treturn itemdao.find(\"from Item\");\r\n\t}" ]
[ "0.5600174", "0.53841454", "0.5299719", "0.52865005", "0.5207043", "0.5197336", "0.5125447", "0.51118666", "0.5108231", "0.5086626", "0.5085082", "0.5053489", "0.50375754", "0.5013254", "0.5000734", "0.49990135", "0.49871296", "0.4977456", "0.49595127", "0.49507773", "0.49396035", "0.49392706", "0.49344653", "0.4932681", "0.4915911", "0.48960426", "0.4875751", "0.48731044", "0.48664743", "0.48471266", "0.4835617", "0.48283944", "0.48198786", "0.48192134", "0.48152295", "0.4812581", "0.4803711", "0.4801145", "0.47892702", "0.47673383", "0.47636536", "0.47504556", "0.4743838", "0.47406274", "0.47240347", "0.47233954", "0.47144976", "0.4714", "0.47135416", "0.47080025", "0.4705173", "0.47029212", "0.4695972", "0.46953914", "0.46952063", "0.46932906", "0.46932775", "0.46916923", "0.4686451", "0.4682866", "0.46822768", "0.46820173", "0.4680626", "0.46737972", "0.46732292", "0.46728477", "0.46705216", "0.46645594", "0.46607283", "0.46574742", "0.46513757", "0.4647215", "0.46400225", "0.46397337", "0.46392712", "0.46389863", "0.46342283", "0.46336046", "0.46322948", "0.46288052", "0.46275714", "0.46274203", "0.46247324", "0.46213222", "0.46198127", "0.46186653", "0.46175528", "0.46165773", "0.4616378", "0.4615364", "0.46077508", "0.46064365", "0.46041626", "0.4594813", "0.45915726", "0.4591479", "0.45874423", "0.45869604", "0.45789942", "0.45764908" ]
0.4600525
93
This method was generated by MyBatis Generator. This method corresponds to the database table dish
int updateByPrimaryKey(Dish record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Dish selectByPrimaryKey(String id);", "@Override\n public List<SideDishEntity> findAll() {\n return null;\n }", "List<TblMotherSon> selectByExample(TblMotherSonExample example);", "@Override\r\n\tpublic int create(Dish dish) {\r\n\t\t\r\n//\t\thashMap.put(dish.getId(), dish);\r\n\t\tSystem.out.println(\" Creating Dish\");\r\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(dish);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n//\t\tSystem.out.println(\"Dish create successfully\" +dish.toString());\r\n\t\treturn dish.getId();\r\n\t\t\r\n\t}", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface PreparedDishHistoryDAO {\n int addPreparedDish(PreparedDish dish);\n List<PreparedDish> getAll();\n}", "public static ArrayList<Dish> getDishesByMenuId(String mid) throws SQLException {\r\n\t\tArrayList<Dish> result = new ArrayList<Dish>();\r\n\t\tString sql = \"SELECT dish_id, name, price, picture, description FROM dish\" + \" WHERE menu_id = ?\";\r\n\t\tResultSet rs;\r\n\t\tint dishId = -1;\r\n\t\tString name = \"\";\r\n\t\tfloat price = 0f;\r\n\t\tString filePath = \"\";\r\n\t\tString description = \"\";\r\n\r\n\t\tPreparedStatement sqlPrepared = DBConnection.prepare(sql);\r\n\t\tsqlPrepared.setString(1, mid);\r\n\t\trs = sqlPrepared.executeQuery();\r\n\t\twhile (rs.next()) {\r\n\t\t\tdishId = rs.getInt(1);\r\n\t\t\tname = rs.getString(2);\r\n\t\t\tprice = rs.getFloat(3);\r\n\t\t\tfilePath = rs.getString(4);\r\n\t\t\tdescription = rs.getString(5);\r\n\t\t\tDish dish = new Dish(String.valueOf(dishId), price, name, description,filePath);\r\n\t\t\t//put dish into identity map\r\n\t\t\tIdentityMap<Dish> map = IdentityMap.getInstance(dish);\r\n\t\t\tmap.put(dishId,dish);\r\n\t\t\t\r\n\t\t\tresult.add(dish);\r\n\t\t}\r\n\t\tsqlPrepared.close();\r\n\t\tDBConnection.dbConnection.close();\r\n\t\treturn result;\r\n\t}", "HrMscChaAssig selectByPrimaryKey(Date day, Integer hour, String mscid);", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();", "void fetchHolidayRentalHousesData();", "@Override\r\n public String storyID() {\r\n return \"HD\";\r\n }", "public ForeignInfo foreignStShohinKonyu() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnStShohinKonyuId(), StShohinKonyuDbm.getInstance().columnStShohinKonyuId());\n return cfi(\"FK_ST_SHHN_KNY_MS_ST_SHOHIN_KONYU\", \"stShohinKonyu\", this, StShohinKonyuDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "public ForeignInfo foreignSmShohin() {\n Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnSmShohinId(), SmShohinDbm.getInstance().columnSmShohinId());\n return cfi(\"FK_ST_SHHN_KNY_MS_SM_SHOHIN\", \"smShohin\", this, SmShohinDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, true, null, null, false, \"stShhnKnyMsList\", false);\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "@Select({\n \"select\",\n \"`cate_id`, `cate_name`\",\n \"from `category`\",\n \"where `cate_id` = #{cateId,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n Category selectByPrimaryKey(Integer cateId);", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "public interface DishDao {\n\n void save(Dish dish);\n List<Dish> findAll();\n Dish findByName(String name);\n\n void removeAll();\n}", "List<Dish> selectByExample(DishExample example);", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}", "@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }", "HelpInfo selectByPrimaryKey(Integer hId);", "@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();", "@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n News selectByPrimaryKey(Integer newsId);", "public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "public List<DishItem> getDish(){\n \tList<DishItem> dish = new ArrayList<DishItem>();\n\t\t\n\t\t//User user = userDao.find();\n\t\t//String tokenString = user.getToken();\n\t\t\n\t\tString dishResult;\t\t\n\t\tString urlString=\"/service/dish/getalldishs\";\n\t\ttry {\n\t\t\tdishResult = connect.testURLConn1(urlString);\n\t\t\tJSONObject jsonObject = new JSONObject(dishResult);System.out.println(\"jsonObject==\"+jsonObject);\n\t\t\tJSONArray jsonArray = jsonObject.getJSONArray(\"date\");System.out.println(\"jsonArray==\"+jsonArray);\n\t\t\t//userJSON = jsonObject.getJSONObject(\"user\");\n\t\t\t\n\t\t\tfor(int i=0;i<jsonArray.length();i++){ \n\t\t\t\t JSONObject jo = (JSONObject)jsonArray.opt(i);\n\t\t String id = jo.getString(\"_id\");\n\t\t String dishName = jo.getString(\"dishName\");\n\t\t String desc = jo.getString(\"desc\");\n\t\t int pic=jo.getInt(\"pic\");\n\t\t int col=jo.getInt(\"col\");\n\t\t DishItem dishitem = new DishItem(id, dishName, desc,pic,col);\n\t dish.add(dishitem);\n\t }\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\treturn dish;\n\t\t\n\t}", "@Override\r\npublic List<Possalesdetail> selectByExample(PossalesdetailExample example) {\n\treturn possalesdetail.selectByExample(example);\r\n}", "List<SellMedia> selectSellMediaByExample(SellMediaExample example) throws SQLException;", "@Override\n public List<SideDishEntity> findAll(Iterable<Long> ids) {\n return null;\n }", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@DB(table = \"share_list\")\npublic interface ShareDao {\n\n @SQL(\"insert into #table(code,name,industry,area,pe,outstanding,totals,totalAssets,liquidAssets,fixedAssets,esp,bvps,pb,timeToMarket,undp,holders) \" +\n \"values(:1.code,:1.name,:1.industry,:1.area,:1.pe,:1.outstanding,:1.totals,:1.totalAssets,:1.liquidAssets,:1.fixedAssets,:1.esp,:1.bvps,:1.pb,:1.timeToMarket,:1.undp,:1.holders)\")\n int insert(List<Share> shares);\n\n @SQL(\"select code,name,timeToMarket from #table\")\n List<Share> findAll();\n\n @SQL(\"select * from #table where code=:1\")\n Share find(String code);\n \n}", "public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "@Override\n public void showDiaryFromDB() {\n diaryPresenter.showDiaryFromDB();\n }", "Disproduct selectByPrimaryKey(String samId);", "@Dao\npublic interface ScenicPicDao {\n @Insert\n void insertScenicPic(ScenicPic scenicPic);\n\n @Query(\"DELETE from ScenicPic where scenic_id=:scenicId\")\n void deleteAllScenicPic(int scenicId);\n\n //return live data when data be changed, list update automatically\n @Query(\"select * from ScenicPic where scenic_id=:scenicId\")\n List<ScenicPic> getScenicPicById(int scenicId);\n}", "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }", "Nutrition selectByPrimaryKey(Integer nutritionid);", "public interface DishDao {\n Dish findOne(long id);\n List<Dish> findAll();\n void create(Dish entity);\n Dish update(Dish entity);\n void delete(Dish entity);\n void deleteById(long entityId);\n}", "private Shelf fillShelf(ResultSet rs) throws SQLException{\n Shelf shelf = new Shelf();\n shelf.setId(rs.getInt(\"id\"));\n shelf.setColumn(rs.getInt(\"col\"));\n shelf.setRow(rs.getInt(\"row\"));\n shelf.setMaxWeight(rs.getDouble(\"maxWeight\"));\n shelf.setCapacity(rs.getInt(\"capacity\"));\n shelf.setSecure(rs.getBoolean(\"secure\"));\n return shelf;\n }", "public interface SideEntityDao extends CrudRepository<SideEntity, Long> {\n\n\tSet<SideEntity> findAll();\n\n}", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "@SqlQuery(\"select * from PLAYERSTATS order by KILLS DESC FETCH FIRST 10 ROWS ONLY\")\n List<PlayerStats> findKillsHighScores();", "public String getName() {\n return dishName;\n }", "public java.sql.ResultSet DatosdelaCita(String CodHorMed){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n \tSystem.out.println(\"SELECT * FROM pyp_citaspacientes WHERE CodHorMedico_fk=\"+CodHorMed+\"\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>DatosdelaCita \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "UvStatDay selectByPrimaryKey(Long id);", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "public String getDishOfTheDay(){\n return dishOfTheDay;\n }", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "public List<DiseasePojo> diseaseAll() \n\t{\n\n\t\tString sql = \"SELECT * FROM diseasemaster\";\n\t\treturn jdbcTemplate.query(sql, new ResultSetExtractor<List<DiseasePojo>>()\n\t\t{\n\t public List<DiseasePojo> extractData(ResultSet rs) throws SQLException,\n\t DataAccessException {\n\t \tList<DiseasePojo> list = new ArrayList<DiseasePojo>();\n\t while(rs.next()) {\n\t \tDiseasePojo dt = new DiseasePojo();\n\t \n\t dt.setDiseaseId(rs.getInt(\"DISEASEID\"));\n\t dt.setDiseaseCode(rs.getString(\"DISEASECODE\"));\n\t dt.setDiseaseName(rs.getString(\"DISEASENAME\"));\n\t list.add(dt);\n\t }\n\t return list;\n\t \n\t }\n\t });\n\t\n\t}", "public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }", "public interface IExampleWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void example(org.linlinjava.litemall.db.domain.example.SaleClassifyGoodExample example);\n }", "public Medium[] getDiscs() {\n Session session = getSessionFactory().openSession();\n session.beginTransaction();\n List<Disc> discList = session.createQuery(\"from Disc\", Disc.class).list();\n session.getTransaction().commit();\n session.close();\n return discList.toArray(new Medium[discList.size()]);\n }", "Kaiwa selectByPrimaryKey(String maht);", "public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "HospitalType selectByPrimaryKey(String id);", "PathologyInfo selectByPrimaryKey(Integer id);", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n KDUserMedal selectByPrimaryKey(Long id);", "public void setName(String dishName) {\n this.dishName = dishName;\n }", "public List<Dishes> selectWest(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Î÷²Í' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public interface ProfitprofitActionRuleDao extends EntityMybatisDao<ProfitprofitActionRule> {\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate);\n\n @Update(\"UPDATE profit_action_rule SET cal_rate=#{calRate},cal_type=#{calType} where section_id=#{sectionId}\")\n void updateProfitprofitActionRuleBySectionIdUpdateAalRateAndCalType(@Param(\"sectionId\") String sectionId,\n @Param(\"calRate\") String calRate, @Param(\"calType\") String calType);\n \n @Select(\"select * from profit_action_rule where section_id=#{sectionId}\")\n ProfitprofitActionRule selectProfitprofitActionRuleBySectionId(@Param(\"sectionId\") String\n sectionId);\n\n @Delete(\"delete from profit_action_rule where id =#{id}\")\n void deleteProfitActionRuleById(@Param(\"id\")Long id);\n\n @Delete(\"delete from profit_action_rule \")\n void deleteProfitActionRuleByAll();\n \n}", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "BpmInstanciaHistorica selectByPrimaryKey(Long idreg);", "MenuInfo selectByPrimaryKey(Integer menuid);", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "public IMDBBaseEntity entityPerResultSet(ResultSet rs) throws SQLException {\n return null;\n }", "List selectByExample(BnesBrowsingHisExample example) throws SQLException;", "public interface ArchetypeLevelsSchema {\n\tString TABLE_NAME = \"creature_archetype_levels\";\n\n\tString COLUMN_ARCHETYPE_ID = \"archetypeId\";\n\tString COLUMN_LEVEL = \"level\";\n\tString COLUMN_ATTACK = \"attack\";\n\tString COLUMN_ATTACK2 = \"attack2\";\n\tString COLUMN_DEF_BONUS = \"defensiveBonus\";\n\tString COLUMN_BODY_DEV = \"bodyDevelopment\";\n\tString COLUMN_PRIME_SKILL = \"primeSkill\";\n\tString COLUMN_SECONDARY_SKILL = \"secondarySkill\";\n\tString COLUMN_POWER_DEV = \"powerDevelopment\";\n\tString COLUMN_SPELLS = \"spells\";\n\tString COLUMN_TALENT_DP = \"talentDP\";\n\tString COLUMN_AGILITY = \"agility\";\n\tString COLUMN_CONS_STAT = \"constitutionStat\";\n\tString COLUMN_CONSTITUTION = \"constitution\";\n\tString COLUMN_EMPATHY = \"empathy\";\n\tString COLUMN_INTUITION = \"intuition\";\n\tString COLUMN_MEMORY = \"memory\";\n\tString COLUMN_PRESENCE = \"presence\";\n\tString COLUMN_QUICKNESS = \"quickness\";\n\tString COLUMN_REASONING = \"reasoning\";\n\tString COLUMN_SELF_DISC = \"selfDiscipline\";\n\tString COLUMN_STRENGTH = \"strength\";\n\n\tString TABLE_CREATE = \"CREATE TABLE IF NOT EXISTS \"\n\t\t\t+ TABLE_NAME\n\t\t\t+ \" (\"\n\t\t\t+ COLUMN_ARCHETYPE_ID + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_LEVEL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK2 + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_DEF_BONUS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_BODY_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRIME_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SECONDARY_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_POWER_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SPELLS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_TALENT_DP + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_AGILITY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONS_STAT + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONSTITUTION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_EMPATHY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_INTUITION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_MEMORY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRESENCE + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_QUICKNESS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_REASONING + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SELF_DISC + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_STRENGTH + \" INTEGER NOT NULL, \"\n\t\t\t+ \"PRIMARY KEY(\" + COLUMN_ARCHETYPE_ID + \",\" + COLUMN_LEVEL + \")\"\n\t\t\t+ \")\";\n\n\tString[] COLUMNS = new String[] { COLUMN_ARCHETYPE_ID, COLUMN_LEVEL, COLUMN_ATTACK, COLUMN_ATTACK2, COLUMN_DEF_BONUS,\n\t\t\tCOLUMN_BODY_DEV, COLUMN_PRIME_SKILL, COLUMN_SECONDARY_SKILL, COLUMN_POWER_DEV, COLUMN_SPELLS, COLUMN_TALENT_DP,\n\t\t\tCOLUMN_AGILITY, COLUMN_CONS_STAT, COLUMN_CONSTITUTION, COLUMN_EMPATHY, COLUMN_INTUITION, COLUMN_MEMORY,\n\t\t\tCOLUMN_PRESENCE, COLUMN_QUICKNESS, COLUMN_REASONING, COLUMN_SELF_DISC, COLUMN_STRENGTH};\n}", "public interface ICriteriaWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n void criteria(Criteria criteria);\n }", "SysPic selectByPrimaryKey(Integer id);", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "@Dao\npublic interface MedicalCategoryDAO {\n\n\n\n @Query(\"SELECT * FROM medicalcategory\")\n List<MedicalCategory> getAll();\n\n @Query(\"SELECT COUNT(*) from medicalcategory\")\n int countcategories();\n\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertAll(MedicalCategory... medicalCategories);\n\n\n @Insert(onConflict = OnConflictStrategy.IGNORE)\n void insertsingle(MedicalCategory medicalCategory);\n\n\n}", "@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}", "@SuppressWarnings(\"rawtypes\")\n\t@Override\n\t@Transactional(readOnly=true)\n\tpublic List listMissTheme(MissTheme persistentInstance)\n\t\t\tthrows DataAccessException {\n\t\tSession session = sessionAnnotationFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"select missTheme from MissTheme missTheme order by missTheme.mtId asc \");\n\t\treturn query.list();\n\t}", "public void showIngredients() {\n list = dbController.getIngredientsList();\n\n idColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Integer>(\"id\"));\n nameColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, String>(\"name\"));\n caloriesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"calories\"));\n proteinColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"protein\"));\n fatColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"fat\"));\n carbohydratesColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, Double>(\"carbohydrates\"));\n selectColumn.setCellValueFactory(new PropertyValueFactory<Ingredient, CheckBox>(\"select\"));\n\n TableView.setItems(list);\n }", "public interface ClothDao {\n /**\n * 判断衣服Id是否存在\n * @param id\n * @return boolean\n */\n boolean isClothIdExists(int id);\n /**\n * 返回图片\n * @param clothId\n * @return Clothinfostring\n */\n String getClothById(int clothId);\n /**\n * 返回图片\n * @param none\n * @return Cloth Ids\n */\n String getAllCloth();\n\n}", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "GirlInfo selectByPrimaryKey(Integer id);", "public List<MediumBean> populatemediam(String sql ){\n\t\t\t\tList<MediumBean> retlist = jdbcTemplate.query(sql,ParameterizedBeanPropertyRowMapper.newInstance(MediumBean.class));\n\t\t\t\t\treturn retlist;\n\t\t }", "public void formDatabaseTable() {\n }", "List<Horse> getAllHorses();", "int updateByPrimaryKeySelective(Dish record);", "Drug_OutWarehouse selectByPrimaryKey(Long id);", "@AfterQuery\n\t\tpublic void spriden_AfterQuery(RowAdapterEvent args)\n\t\t{\n\t\t\t\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)args.getRow();\n\n\n\t\t\t\tint rowCount = 0;\n\t\t\t\t{\n\t\t\t\t\tString sqlptiCursor = \"SELECT SPBPERS_BIRTH_DATE, SPBPERS_SEX \" +\n\t\" FROM SPBPERS \" +\n\t\" WHERE SPBPERS_PIDM = :SPRIDEN_PIDM \";\n\t\t\t\t\tDataCursor ptiCursor = new DataCursor(sqlptiCursor);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//Setting query parameters\n\t\t\t\t\t\tptiCursor.addParameter(\"SPRIDEN_PIDM\", spridenElement.getSpridenPidm());\n\t\t\t\t\t\tptiCursor.open();\n\t\t\t\t\t\tResultSet ptiCursorResults = ptiCursor.fetchInto();\n\t\t\t\t\t\tif ( ptiCursorResults != null ) {\n\t\t\t\t\t\t\tspridenElement.setBirthdate(ptiCursorResults.getDate(0));\n\t\t\t\t\t\t\tspridenElement.setSex(ptiCursorResults.getStr(1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinally{\n\t\t\t\t\t\tptiCursor.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@SqlQuery(\"select * from PLAYERSTATS where SCOREID = :id\")\n PlayerStats findByScoreId(@Bind(\"id\") String id);", "List<Horario_Disponible> findAll();", "@Override\n\tpublic List<Chitietdonhang> tinhDoanhThuTheoNam(Integer nam) {\n\t\treturn chiTietDonHangRepository.tinhDoanhThuTheoNam(nam);\n\t}", "public interface BattleDao {\n\n @Select(\"SELECT * FROM battle WHERE chapter_id = #{chapterId} order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattleByChapterId(String chapterId);\n\n @Select(\"SELECT * FROM battle order by id\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public ArrayList<Battle> getAllBattle();\n\n @Select(\"SELECT * FROM battle WHERE battle_id = #{battleId}\")\n @Results({\n @Result(property = \"battleId\", column = \"battle_id\"),\n @Result(property = \"chapterId\", column = \"chapter_id\"),\n @Result(property = \"battleTitle\", column = \"battle_title\"),\n @Result(property = \"battleDesc\", column = \"battle_desc\"),\n })\n public Battle getBattleById(String battleId);\n}", "@Select({\n \"select\",\n \"id, userid, medalId, bindUserid, remark, createTime\",\n \"from kd_user_medal\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"userid\", property=\"userid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"medalId\", property=\"medalid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"bindUserid\", property=\"binduserid\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"remark\", property=\"remark\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"createTime\", property=\"createtime\", jdbcType=JdbcType.TIMESTAMP)\n })\n List<KDUserMedal> selectAll();" ]
[ "0.560114", "0.538416", "0.53013885", "0.52881795", "0.5206365", "0.5200112", "0.5123933", "0.5113557", "0.5111038", "0.5087587", "0.5087201", "0.5055471", "0.5037925", "0.50137585", "0.5001423", "0.499934", "0.49889484", "0.4978261", "0.4961641", "0.49530965", "0.4940532", "0.49399298", "0.4935291", "0.49325922", "0.49165592", "0.48989907", "0.4877665", "0.48728466", "0.48678777", "0.48480317", "0.48376018", "0.48303312", "0.48197308", "0.48195714", "0.48178104", "0.4812278", "0.48071072", "0.48033354", "0.4790985", "0.4769452", "0.47646776", "0.47512186", "0.4746261", "0.47407556", "0.47259918", "0.47228697", "0.47161078", "0.47157538", "0.47155493", "0.4707758", "0.4706416", "0.47048804", "0.4699233", "0.46963036", "0.46962333", "0.46948344", "0.46941608", "0.4691967", "0.4687983", "0.46828815", "0.4682078", "0.468191", "0.46812382", "0.46754143", "0.46752995", "0.4675083", "0.46696302", "0.46645203", "0.46633705", "0.46582875", "0.4653521", "0.46471906", "0.4642964", "0.46404076", "0.46403554", "0.4639644", "0.46360135", "0.46352234", "0.46345302", "0.4630339", "0.46294755", "0.46284315", "0.46273106", "0.46230718", "0.4620601", "0.4619866", "0.4619363", "0.46174726", "0.4617433", "0.46093524", "0.46090022", "0.46029115", "0.46018702", "0.45972648", "0.4592926", "0.45927244", "0.45882338", "0.45881224", "0.45808488", "0.457806" ]
0.46169445
89
Creates a menu item for URLSpan. Note: This method will not create menu item for relative URLs.
private static @Nullable ContextMenuItem createMenuItemForUrlSpan( Context context, int itemId, Spannable spannable, URLSpan span, TalkBackAnalytics analytics) { final String url = span.getURL(); final int start = spannable.getSpanStart(span); final int end = spannable.getSpanEnd(span); if (start < 0 || end < 0) { return null; } final CharSequence label = spannable.subSequence(start, end); if (TextUtils.isEmpty(url) || TextUtils.isEmpty(label)) { return null; } final Uri uri = Uri.parse(url); if (uri.isRelative()) { // Generally, only absolute URIs are resolvable to an activity return null; } // Strip out ClickableSpans/UrlSpans from the label text. // A11y framework has changed how it handles double-tap from O. It's possible that double-tap // on the menu item will invoke ClickableSpans in the label text instead of calling // MenuItemClickListener. Thus we should remove ClickableSpans from label text. // Also apply this rule to pre-O in order to have consistent text appearance. SpannableUtils.stripTargetSpanFromText(label, TARGET_SPAN_CLASS); final ContextMenuItem item = ContextMenu.createMenuItem(context, R.id.group_links, itemId, Menu.NONE, label); item.setOnMenuItemClickListener(new UrlSpanMenuItemClickListener(context, uri, analytics)); return item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static @Nullable ContextMenuItem createMenuItemForClickableSpan(\n Context context,\n int itemId,\n Spannable spannable,\n ClickableSpan clickableSpan,\n TalkBackAnalytics analytics) {\n final int start = spannable.getSpanStart(clickableSpan);\n final int end = spannable.getSpanEnd(clickableSpan);\n if (start < 0 || end < 0) {\n return null;\n }\n final CharSequence label = spannable.subSequence(start, end);\n if (TextUtils.isEmpty(label)) {\n return null;\n }\n\n SpannableUtils.stripTargetSpanFromText(label, TARGET_SPAN_CLASS);\n final ContextMenuItem item =\n ContextMenu.createMenuItem(context, R.id.group_links, itemId, Menu.NONE, label);\n item.setOnMenuItemClickListener(\n new ClickableSpanMenuItemClickListener(clickableSpan, analytics));\n return item;\n }", "private MenuBar.MenuItem createMenuItem(View vista, String menuAddress, Resource menuIcon) {\n MenuBar.MenuItem menuItem;\n MenuCommand cmd = new MenuCommand(menuBar, vista);\n menuItem = menuBar.addItem(menuAddress, menuIcon, cmd);\n menuItem.setStyleName(AMenuBar.MENU_DISABILITATO);\n\n return menuItem;\n }", "@objid (\"491beea2-12dd-11e2-8549-001ec947c8cc\")\n private static MHandledMenuItem createItem(String label, String tooltip, String iconURI) {\n MHandledMenuItem item = MMenuFactory.INSTANCE.createHandledMenuItem();\n // item.setElementId(module.getName() + commandId);\n item.setLabel(label);\n item.setTooltip(tooltip);\n item.setIconURI(iconURI);\n item.setEnabled(true);\n item.setToBeRendered(true);\n item.setVisible(true);\n return item;\n }", "private JMenuItem createMenuItem(JMenu parent, String text, int mnemonic, String keyStrokeText, String tooltip) {\n\t\tJMenuItem item = new JMenuItem();\n\t\t\n\t\titem.setText(text);\n\t\tif (mnemonic != -1) {\n\t\t\titem.setMnemonic(mnemonic);\n\t\t}\n\t\tif (keyStrokeText != null) {\n\t\t\tKeyStroke accelerator = KeyStroke.getKeyStroke(keyStrokeText);\n\t\t\titem.setAccelerator(accelerator);\n\t\t}\n\t\tif (tooltip != null) {\n\t\t\titem.setToolTipText(tooltip);\n\t\t}\n\t\t\n\t\tparent.add(item);\n\t\treturn item;\n\t}", "public MenuItem add(int titleRes);", "public MenuItem add(CharSequence title);", "LI createLI();", "public Menu createViewMenu();", "private JMenu createLanguageMenu() {\n\t\tAction nestoAction = new AbstractAction() {\n\n\t\t\t/** The generated serial user ID */\n\t\t\tprivate static final long serialVersionUID = -4439263551767223123L;\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJMenuItem src = (JMenuItem) e.getSource();\n\t\t\t\tString arg = src.getText();\n\t\t\t\tLocalizationProvider.getInstance().setLanguage(arg);\n\t\t\t\tLocalizationProvider.getInstance().fire();\n\t\t\t}\n\t\t};\n\n\t\titemHR = new JMenuItem(nestoAction);\n\t\titemHR.setText(\"hr\");\n\t\titemEN = new JMenuItem(nestoAction);\n\t\titemEN.setText(\"en\");\n\t\titemDE = new JMenuItem(nestoAction);\n\t\titemDE.setText(\"de\");\n\n\t\tlangMenu = new JMenu(flp.getString(\"lang\"));\n\n\t\tlangMenu.add(itemHR);\n\t\tlangMenu.add(itemEN);\n\t\tlangMenu.add(itemDE);\n\n\t\treturn langMenu;\n\t}", "@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}", "private MenuBar.MenuItem createMenuItem(Class<? extends View> viewClass, String label, boolean cached, Resource icon) {\n MenuBar.MenuItem menuItem;\n MenuCommand cmd = new MenuCommand(menuBar, viewClass, cached);\n menuItem = menuBar.addItem(label, icon, cmd);\n menuItem.setStyleName(AMenuBar.MENU_DISABILITATO);\n return menuItem;\n }", "public JMenuItem createMenuItem(Action a) {\n JMenuItem item = new JMenuItem(a);\n decorateMenuComponent(item);\n return item;\n }", "public native void addSubItem(MenuItem item);", "MenuItem addItem(String title, Command callback);", "public Menu createToolsMenu();", "public JMenu addMenuItem (String texte, JMenu menu,String toolTipText) {\n JMenuItem item = new JMenuItem(texte);\n item.addActionListener(this);\n menu.add(item);\n menu.addSeparator();\n item.setToolTipText(toolTipText);\n return menu;\n }", "private Listitem constructListItem(final String name,String label, String imageSrc, final String locationUri) {\n\t\tListitem tb = new Listitem();\n\t\t\n\t\ttb.setImage(imageSrc);\n\t\ttb.setLabel(label);\n\t\ttb.setStyle(\"padding: 2px; border-spacing: 0\");\n\n\t\t\n\t\t//new and register listener for events\n\t\tEventListener<Event> onActionListener = new SerializableEventListener<Event>(){\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\t//redirect current url to new location\n\t\t\t\tif(locationUri.startsWith(\"http\")){\n\t\t\t\t\t//open a new browser tab\n\t\t\t\t\tExecutions.getCurrent().sendRedirect(locationUri);\n\t\t\t\t}else{\n\t\t\t\t\t//use iterable to find the first include only\n\t\t\t\t\tInclude include = (Include)Selectors.iterable(eastSideBarTabbox.getPage(), \"#mainInclude\").iterator().next();\n\t\t\t\t\tinclude.setSrc(locationUri);\n\t\t\t\t\tSessions.getCurrent().setAttribute(\"CURRENT_PAGE\", name);\n\t\t\t\t\t\n\t\t\t\t\t//advance bookmark control, \n\t\t\t\t\t//bookmark with a prefix\n\t\t\t\t\tif(name!=null){\n\n\t\t\t\t\t\tgetPage().getDesktop().setBookmark(Context.BOOKMARK_SEPARATOR + name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\t\t\n\t\ttb.addEventListener(Events.ON_CLICK, onActionListener);\n\n\t\treturn tb;\n\t}", "public static JXHyperlink createHyperLink(int level, String text, ActionListener listener) {\n JXHyperlink ret = new JXHyperlink();\n ret.setText(text);\n if (level == LEVEL_1) {\n ret.setForeground(Constants.LINK_COLOR_BOLD);\n ret.setClickedColor(Color.blue);//Constants.LINK_COLOR_BOLD);\n }\n else {\n ret.setFont(new Font(\"Verdana\", Font.PLAIN, 10));//FrameworkConstants.SMALL_FONT);\n ret.setForeground(Color.blue);//Constants.LINK_COLOR_BOLD);\n ret.setClickedColor(Color.blue);//Constants.LINK_COLOR_BOLD);\n }\n ret.addActionListener(listener);\n ret.setFocusable(false);\n return ret;\n }", "public native static MenuItemToggle create(MenuItem item);", "private MenuItem makeMenuItem (String label, String command) {\n MenuItem mi = new MenuItem (label);\n mi.setActionCommand (command);\n mi.addActionListener (commandHandler);\n return mi;\n }", "private ListItem buildListItem(int menuItemId) {\n return new ListItem(ListItemType.MENU_ITEM,\n new PropertyModel.Builder(TabSelectionEditorActionProperties.MENU_ITEM_KEYS)\n .with(TabSelectionEditorActionProperties.MENU_ITEM_ID, menuItemId)\n .build());\n }", "private JMenuItem makeMenuItem(String name) {\n JMenuItem m = new JMenuItem(name);\n m.addActionListener(this);\n return m;\n }", "public interface Menu {\n\n /**\n * Add an item to the menu.\n *\n * @param title Title of the item (which will be interpreted as plain text and\n * HTML-escaped if necessary)\n * @param callback Code to execute when the item is selected\n * @return A MenuItem representing the added item\n */\n MenuItem addItem(String title, Command callback);\n\n /**\n * Add an item to the menu.\n *\n * @param title Title of the item, as a {@link SafeHtml}\n * @param callback Code to execute when the item is selected\n * @return A MenuItem representing the added item\n */\n MenuItem addItem(SafeHtml title, Command callback);\n}", "public Hyperlink(){\n this.href = \"\";\n this.text = new TextSpan(\"\");\n }", "private void addshowLink(JMenu linkMenu, String label, String descr,\n String dbname, final GroupUrlLink urlgenerator,\n final Object[] urlstub)\n {\n Component[] jmi = linkMenu.getMenuComponents();\n for (int i = 0; i < jmi.length; i++)\n {\n if (jmi[i] instanceof JMenuItem\n && ((JMenuItem) jmi[i]).getText().equalsIgnoreCase(label))\n {\n // don't add this - its a repeat of an existing URL.\n return;\n }\n }\n try\n {\n descr = HtmlEncoder.encode(descr);\n } catch (Exception e)\n {\n }\n ;\n\n boolean seqsorids = (urlgenerator.getGroupURLType() & urlgenerator.SEQUENCEIDS) == 0;\n int i = urlgenerator.getNumberInvolved(urlstub);\n JMenuItem item = new JMenuItem(label);\n //\n if (dbname == null || dbname.trim().length() == 0)\n {\n dbname = \"\";\n }\n item.setToolTipText(\"<html>\"\n + JvSwingUtils.wrapTooltip(\"Submit \" + i + \" \" + dbname + \" \"\n + (seqsorids ? \"sequence\" : \"sequence id\")\n + (i > 1 ? \"s\" : \"\")\n\n + \" to<br/>\" + descr) + \"</html>\");\n item.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n new Thread(new Runnable()\n {\n\n public void run()\n {\n try\n {\n showLink(urlgenerator.constructFrom(urlstub));\n } catch (UrlStringTooLongException ex)\n {\n Cache.log.warn(\"Not showing link: URL is too long!\", ex);\n }\n }\n\n }).start();\n }\n });\n\n linkMenu.add(item);\n }", "private Hyperlink makeHyperlink(){\n\t\tHyperlink ret = new Hyperlink();\n\t\tret.setId(\"variable\");\n\t\tret.setOnMouseClicked(e -> clickedVariable(ret));\n\t\tvBox.getChildren().add(ret);\n\t\treturn ret;\n\t}", "public native static MenuItemToggle create();", "public Menu createFileMenu();", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_open_new:\n String url = \"\";\n try{\n url = json.getString(\"url\");\n }\n catch (JSONException e){\n e.printStackTrace();\n }\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n startActivity(browserIntent);\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "private JMenuItem constructExampleMenuItem(String menuText,\r\n\t\t\tString functionString, char mnemonicChar) {\r\n\t\tJMenuItem menuItem = new JMenuItem(menuText);\r\n\t\t// store the function in the action command for use later\r\n\t\tmenuItem.setActionCommand(functionString);\r\n\t\tmenuItem.addActionListener(this);\r\n\t\tmenuItem.setVisible(true);\r\n\t\tmenuItem.setMnemonic(mnemonicChar);\r\n\t\treturn menuItem;\r\n\t}", "public void createContextMenu(ContextMenu menu,View v,ContextMenuInfo menuInfo){\n \t\tAdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;\n \t\tAdapterItemRef ref = (AdapterItemRef)info.targetView.getTag();\n \t\t\t\t\n \t\tmenu.setHeaderTitle(ref.lblTitle.getText().toString());\t\t\t\t\n \t\tmenu.add(0,2,0,\"Delete\");\n \t\tmenu.add(0,1,1,\"Reset Progress\");\n \t\tmenu.add(0,3,2,\"Mark as Read\");\n \t\tmenu.add(0,4,3,\"Edit Series Name\");\n \t}", "protected MenuBarView createMenuBuilder(Main mainFrameUtil) {\r\n return new MenuBarView(mainFrameUtil);\r\n }", "@Override\n protected void populateItem(final ListItem<String> item) {\n AjaxFallbackLink link = new AjaxFallbackLink(\"link\") {\n\n @Override\n public void onClick(AjaxRequestTarget target) {\n onSlidebarClick(target, item.getModelObject());\n }\n\n };\n Section section = sectionManager.getSection(item.getModelObject());\n link.add(new TransparentWebMarkupContainer(\"icon\").add(AttributeModifier.append(\"class\", \"fa-\" + section.getIcon())));\n\n String key = \"Section.\" + section.getTitle() + \".name\";\n String title = new StringResourceModel(key, null).getString();\n// link.add(new Label(\"label\", title).setRenderBodyOnly(true));\n link.add(new Label(\"label\", title));\n\n item.setOutputMarkupId(true);\n item.add(link);\n\n item.add(new AttributeAppender(\"class\", \"active\") {\n\n @Override\n public boolean isEnabled(Component component) {\n return sectionManager.getSelectedSectionId().equals(item.getModelObject());\n }\n\n }.setSeparator(\" \"));\n }", "private static JMenuBar createMenu() {\r\n JMenuBar mb = new JMenuBar();\r\n JMenu menu = new JMenu(\"File\");\r\n JMenuItem item = new JMenuItem(\"Save\");\r\n item.addActionListener((ActionEvent evt) -> {\r\n saveActionPerformed();\r\n });\r\n menu.add(item);\r\n mb.add(menu);\r\n\r\n menu = new JMenu(\"Help\");\r\n item = new JMenuItem(\"Show how-to\");\r\n item.addActionListener((ActionEvent evt) -> {\r\n showHelp();\r\n });\r\n menu.add(item);\r\n\r\n mb.add(menu);\r\n\r\n return mb;\r\n }", "ListItem createListItem();", "public static JMenuItem makeMenuItem(Object item, Object target) {\n JMenuItem r = null;\n\n if (item instanceof String) {\n r = new JMenuItem((String) item);\n } else if (item instanceof JMenuItem) {\n r = (JMenuItem) item;\n } else {\n return null;\n }\n\n if (target instanceof ActionListener) {\n r.addActionListener((ActionListener) target);\n }\n\n return r;\n }", "private JMenu createFileMenu()\r\n {\r\n JMenu fileMenu = new JMenu(\"File\");\r\n fileMenu.add(new JMenuItem(openFileAction));\r\n fileMenu.add(new JMenuItem(openUriAction));\r\n fileMenu.add(new JSeparator());\r\n\r\n fileMenu.add(recentUrisMenu.getMenu());\r\n fileMenu.add(new JSeparator());\r\n\r\n fileMenu.add(new JMenuItem(importObjFileAction));\r\n fileMenu.add(new JSeparator());\r\n \r\n fileMenu.add(new JMenuItem(saveAsAction));\r\n fileMenu.add(new JMenuItem(saveAsBinaryAction));\r\n fileMenu.add(new JMenuItem(saveAsEmbeddedAction));\r\n fileMenu.add(new JSeparator());\r\n fileMenu.add(new JMenuItem(exitAction));\r\n return fileMenu;\r\n }", "public MyMenu() {\n this(DSL.name(\"MY_MENU\"), null);\n }", "void setParent(IMenu menuItem);", "private JMenuItem getMniAddBookmark() {\r\n\t\tif (mniAddBookmark == null) {\r\n\t\t\tmniAddBookmark = new JMenuItem();\r\n\t\t\tmniAddBookmark.setText(\"Add bookmark...\");\r\n\t\t}\r\n\t\treturn mniAddBookmark;\r\n\t}", "@Override\n\t\t\tpublic void create(SwipeMenu menu) {\n\t\t\t\tSwipeMenuItem openItem = new SwipeMenuItem(getActivity()\n\t\t\t\t\t\t.getApplicationContext());\n\t\t\t\topenItem.setWidth(dp2px(60));\n\t\t\t\topenItem.setIcon(R.drawable.list_delete);\n\t\t\t\topenItem.setBackground(R.color.deep_pink);\n\t\t\t\tmenu.addMenuItem(openItem);\n\n\t\t\t\t// Edit Item\n\t\t\t\tSwipeMenuItem editItem = new SwipeMenuItem(getActivity()\n\t\t\t\t\t\t.getApplicationContext());\n\t\t\t\teditItem.setBackground(R.color.deep_yellow);\n\t\t\t\teditItem.setWidth(dp2px(60));\n\t\t\t\teditItem.setIcon(R.drawable.total_swipeedit);\n\t\t\t\tmenu.addMenuItem(editItem);\n\n\t\t\t}", "public TextController createMenu(ControllerCore genCode) {\n\t\tmenuTXT = new TextController(\"menu\", getParentController(controlItemSCSCLC), genCode) {\n\t\t\t@Override\n\t\t\tpublic void initialize() {\n\t\t\t\tsetLinkedController(menu$1LBL);\n\t\t\t\tsetProperty(\"menu\");\n\t\t\t\tsuper.initialize();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tif (null != fieldBindManager)\n\t\t\t\t\t\tfieldBindManager = new XjcFieldBindingManager(this);\n\t\t\t\t\tgetControl().addFocusListener(new XjcFocusListener(this));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn menuTXT;\n\t}", "void setMenuItem(MenuItem menuItem);", "Builder addUrl(String value);", "public JMenu addMenuItem (String texte, JMenu menu) {\n return addMenuItem (texte,menu,\"\");\n }", "private MenuManager createEditMenu() {\n\t\tMenuManager menu = new MenuManager(\"&Edition\", Messages.getString(\"IU.Strings.40\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tmenu.add(new GroupMarker(Messages.getString(\"IU.Strings.41\"))); //$NON-NLS-1$\n\n\t\tmenu.add(getAction(ActionFactory.UNDO.getId()));\n\t\tmenu.add(getAction(ActionFactory.REDO.getId()));;\n\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.CUT.getId()));\n\t\tmenu.add(getAction(ActionFactory.COPY.getId()));\n\t\tmenu.add(getAction(ActionFactory.PASTE.getId()));\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.DELETE.getId()));\n\t\tmenu.add(getAction(ActionFactory.SELECT_ALL.getId()));\n\t\tmenu.add(getAction(ActionFactory.FIND.getId()));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.PREFERENCES.getId()));\n\t\treturn menu;\n\t}", "public ItemMenu() {\n super(null, null);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_list_urls, menu);\n return true;\n }", "LINK createLINK();", "public JMenuItem getMenuItem()\n\t\t\t\t{\n\t\t\t\tEvSwingUtil.tearDownMenu(miBookmark);\n\t\t\t\tmiBookmark.add(miAddBookmark);\n\t\t\t\tmiAddBookmark.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tEvContainer container=w.getSelectedData();\n\t\t\t\t\t\tString name=Bookmark.addBookmarkDialog(w, container);\n\t\t\t\t\t\tif(name!=null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tBookmark b=new Bookmark();\n\t\t\t\t\t\t\tb.frame=w.getFrame();\n\t\t\t\t\t\t\tb.z=w.getZ();\n\t\t\t\t\t\t\tnew UndoOpPutObject(\"Add bookmark \"+name, b, container, name);\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\tmiBookmark.addSeparator();\n\t\t\t\t\n\t\t\t\tfor(EvData data:EvDataGUI.openedData)\n\t\t\t\t\t{\n\t\t\t\t\tJMenu miData=new JMenu(data.getMetadataName());\n\t\t\t\t\tfor(Map.Entry<EvPath, Bookmark> e:data.getIdObjectsRecursive(Bookmark.class).entrySet())\n\t\t\t\t\t\t{\n\t\t\t\t\t\tJMenuItem miGoto=new JMenuItem(\"=> \"+e.getKey());\n\t\t\t\t\t\tmiData.add(miGoto);\n\t\t\t\t\t\tfinal Bookmark m=e.getValue();\n\t\t\t\t\t\t\n\t\t\t\t\t\tmiGoto.addActionListener(new ActionListener()\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//if(w.frameControl!=null)\n\t\t\t\t\t\t\t\t\t//{\n\t\t\t\t\t\t\t\tw.setFrame(m.frame);\n\t\t\t\t\t\t\t\tif(m.z!=null)\n\t\t\t\t\t\t\t\t\tw.setZ(m.z);\n\t\t\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t\tw.repaint();\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\tif(miData.getItemCount()>0)\n\t\t\t\t\t\tmiBookmark.add(miData);\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\treturn miBookmark;\n\t\t\t\t}", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n super.onCreateContextMenu(menu, v, menuInfo);\n menu.add(0, v.getId(), 0, \"Edit\");\n menu.add(0, v.getId(), 0, \"Delete\");\n menu.add(0, v.getId(), 0, \"Share via\");\n menu.add(0, v.getId(), 0, \"Share via Facebook\");\n menu.add(0, v.getId(), 0, \"Cancel\");\n }", "public void add(String nameItem)\n\t{\n\t\tmenu.add(nameItem);\n\t}", "Link createLink();", "private void addMenuElement(float posx, float posy, int height) {\r\n\t\tlayout.addComponent(menu);\r\n\t\tresetMenuPosition(posx, posy, height);\r\n\t}", "public JMTMenuBar createMenu() {\r\n \t\tJMTMenuBar menu = new JMTMenuBar(JMTImageLoader.getImageLoader());\r\n \t\t// File menu\r\n \t\tMenuAction action = new MenuAction(\"File\", new AbstractJmodelAction[] { newModel, openModel, saveModel, saveModelAs, closeModel, null, exit });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Edit menu\r\n \t\taction = new MenuAction(\"Edit\", new AbstractJmodelAction[] {\r\n \t\t// editUndo, editRedo, null\r\n \t\t\t\tactionCut, actionCopy, actionPaste, actionDelete, null, takeScreenShot });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Define menu\r\n \t\taction = new MenuAction(\"Define\",\r\n \t\t\t\tnew AbstractJmodelAction[] { editUserClasses, editMeasures, editSimParams, editPAParams, null, editDefaults });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Solve menu\r\n \t\taction = new MenuAction(\"Solve\", new AbstractJmodelAction[] { simulate, pauseSimulation, stopSimulation, null, switchToExactSolver, null,\r\n \t\t\t\tshowResults });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Help menu\r\n \t\taction = new MenuAction(\"Help\", new AbstractJmodelAction[] { openHelp, null, about });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\treturn menu;\r\n \t}", "public static MenuDrawerItem create(TestingOption testingOption, String label, int itemType) {\n MenuDrawerItem menuDrawerItem = new MenuDrawerItem(testingOption);\n menuDrawerItem.setLabel(label);\n menuDrawerItem.setItemType(itemType);\n return menuDrawerItem;\n\n }", "Span createSpan();", "public MyMenu(Name alias) {\n this(alias, MY_MENU);\n }", "@Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(mContext, holder.tv_option_menu);\n //inflating menu from xml resource\n popup.inflate(R.menu.menu_options);\n //adding click listener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu1:\n shareStories(headlinesList.get(position).getUrl());\n return true;\n case R.id.menu2:\n //handle menu2 click\n db.insertNote(headlinesList.get(position));\n return true;\n default:\n return false;\n }\n }\n });\n //displaying the popup\n popup.show();\n\n }", "MenuEntry.Factory getMenuEntryFactory();", "@Override\r\n\tpublic void onCreateContextMenu(ContextMenu menu, View v,\r\n\t\t\tContextMenuInfo menuInfo) {\n\t\tsuper.onCreateContextMenu(menu, v, menuInfo);\r\n\t\tmenu.setHeaderIcon(getResources().getDrawable(R.drawable.ic_launcher));\r\n\t\tmenu.setHeaderTitle(\"test\");\r\n\t\tmenu.add(0, Menu.FIRST, 0, \"aaaa\");\r\n\t\tmenu.add(0, Menu.FIRST + 1, 0, \"bbbb\");\r\n\t\tmenu.add(0, Menu.FIRST + 2, 0, \"cccc\");\r\n\t}", "private void createMenu()\n\t{\n\t\tfileMenu = new JMenu(\"File\");\n\t\thelpMenu = new JMenu(\"Help\");\n\t\ttoolsMenu = new JMenu(\"Tools\");\n\t\t\n\t\tmenuBar = new JMenuBar();\n\t\t\n\t\texit = new JMenuItem(\"Exit\");\t\t\n\t\treadme = new JMenuItem(\"Readme\");\n\t\tabout = new JMenuItem(\"About\");\n\t\tsettings = new JMenuItem(\"Settings\");\n\t\t\t\t\n\t\tfileMenu.add (exit);\n\t\t\n\t\thelpMenu.add (readme);\n\t\thelpMenu.add (about);\t\n\t\t\n\t\ttoolsMenu.add (settings);\n\t\t\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(helpMenu);\t\t\n\t\t\t\t\n\t\tdefaultMenuBackground = menuBar.getBackground();\n\t\tdefaultMenuForeground = fileMenu.getForeground();\n\t\t\n\t}", "interface UrlModifier {\n\n String createUrl(String url);\n\n }", "private MenuItem getMenuItem(String text, EventHandler<ActionEvent> handler) {\n MenuItem mi = new MenuItem(text);\n mi.setOnAction(handler);\n\n return mi;\n }", "private void createMenu() {\n\t\tJMenuBar mb = new JMenuBar();\n\t\tsetJMenuBar(mb);\n\t\tmb.setVisible(true);\n\t\t\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmb.add(menu);\n\t\t//mb.getComponent();\n\t\tmenu.add(new JMenuItem(\"Exit\"));\n\t\t\n\t\t\n\t}", "public static JMenu makeMenu(Object parent, Object[] items, Object target) {\n JMenu m = null;\n\n if (parent instanceof JMenu) {\n m = (JMenu) parent;\n } else if (parent instanceof String) {\n m = new JMenu((String) parent);\n } else {\n return null;\n }\n\n for (int i = 0; i < items.length; i++) {\n if (items[i] == null) {\n m.addSeparator();\n } else {\n m.add(makeMenuItem(items[i], target));\n }\n }\n\n return m;\n }", "Builder addUrl(URL value);", "@Override\n public void create(SwipeMenu menu) {\n SwipeMenuItem item1 = new SwipeMenuItem(\n getApplicationContext());\n item1.setBackground(new ColorDrawable(Color.DKGRAY));\n // set width of an option (px)\n item1.setWidth(200);\n item1.setTitle(\"Action 1\");\n item1.setTitleSize(18);\n item1.setTitleColor(Color.WHITE);\n menu.addMenuItem(item1);\n\n SwipeMenuItem item2 = new SwipeMenuItem(\n getApplicationContext());\n // set item background\n item2.setBackground(new ColorDrawable(Color.RED));\n item2.setWidth(200);\n item2.setTitle(\"Action 2\");\n item2.setTitleSize(18);\n item2.setTitleColor(Color.WHITE);\n menu.addMenuItem(item2);\n }", "public void createItemListPopupMenu() {\n\n\t\tremoveAll();\n\t\tadd(addMenuItem);\n\t\tadd(editMenuItem);\n\t\tadd(deleteMenuItem);\n\t\tadd(moveUpMenuItem);\n\t\tadd(moveDownMenuItem);\n\t\taddSeparator();\n\t\tadd(midiLearnMenuItem);\n\t\tadd(midiUnlearnMenuItem);\n\t\taddSeparator();\n\t\tadd(sendMidiMenuItem);\n\t}", "private void makeMenu() {\r\n int i = 0;\r\n int j = 0;\r\n final JMenuBar bar = new JMenuBar();\r\n final Action[] menuActions = {new NewItemAction(MENU_ITEM_STRINGS[i++]),\r\n new ExitAction(MENU_ITEM_STRINGS[i++], myFrame),\r\n new AboutAction(MENU_ITEM_STRINGS[i++], myFrame)};\r\n i = 0;\r\n\r\n final JMenu fileMenu = new JMenu(MENU_STRINGS[j++]);\r\n fileMenu.setMnemonic(KeyEvent.VK_F);\r\n fileMenu.add(menuActions[i++]);\r\n fileMenu.addSeparator();\r\n fileMenu.add(menuActions[i++]);\r\n\r\n final JMenu optionsMenu = new JMenu(MENU_STRINGS[j++]);\r\n optionsMenu.setMnemonic(KeyEvent.VK_O);\r\n\r\n final JMenu helpMenu = new JMenu(MENU_STRINGS[j++]);\r\n helpMenu.setMnemonic(KeyEvent.VK_H);\r\n helpMenu.add(menuActions[i++]);\r\n\r\n bar.add(fileMenu);\r\n bar.add(optionsMenu);\r\n bar.add(helpMenu);\r\n\r\n myFrame.setJMenuBar(bar);\r\n }", "@objid (\"fff3543b-6152-4665-9552-d57a3790f997\")\n public static MMenuElement createMenu(final IModule module, MPart view) {\n MMenu moduleMenu = MMenuFactory.INSTANCE.createMenu();\n moduleMenu.setEnabled(true);\n moduleMenu.setToBeRendered(true);\n moduleMenu.setVisible(true);\n moduleMenu.setLabel(module.getLabel());\n moduleMenu.setIconURI(getModuleIconeURI(module));\n moduleMenu.getTags().add(DYNAMIC_MODULE_MENU_TAG);\n moduleMenu.getTags().add(module.getName());\n // Create command, handler and corresponding menu entry for each\n // IModuleAction provided by the module with\n // location == ActionLocation.contextualpopup\n createMenuEntriesForAction(module, moduleMenu, view);\n // If at least one command added, add the module to the main popup.\n if (!moduleMenu.getChildren().isEmpty()) {\n return moduleMenu;\n }\n return null;\n }", "private void createMenu(){\n \n menuBar = new JMenuBar();\n \n game = new JMenu(\"Rummy\");\n game.setMnemonic('R');\n \n newGame = new JMenuItem(\"New Game\");\n newGame.setMnemonic('N');\n newGame.addActionListener(menuListener);\n \n \n \n exit = new JMenuItem(\"Exit\");\n exit.setMnemonic('E');\n exit.addActionListener(menuListener); \n \n \n \n }", "private static JMenuItem getDirInEditor(){\n return new JMenuItem(NcStrGUILabel.DIR_IN_INDEX.getStr());\n }", "protected ViewerPopupMenu createPopupMenu()\n {\n ViewerPopupMenu menu = super.createPopupMenu();\n\n viewAction = new ViewerAction(this, \"View\", \"view\",\n \"View Dofs\",\n \"View the dofs of an Actor in table form.\",\n null, null, \"Ctrl-V\", null, \"false\");\n\n menu.addSeparator();\n menu.add(viewAction);\n\n return menu;\n }", "private void buildViewMenu(){\n //Create a Run Payroll menu item\n viewItem = new JMenuItem(\"View CS History\");\n viewItem.setMnemonic(KeyEvent.VK_H);\n viewItem.addActionListener(new ViewListener());\n \n //Create a JMenu object for the run menu\n viewMenu = new JMenu(\"View\");\n viewMenu.setMnemonic(KeyEvent.VK_V);\n \n //Add the item to the menu\n viewMenu.add(viewItem);\n }", "@Override\r\n\tprotected MenuManager createMenuManager() {\r\n\t\tMenuManager menuManager = new MenuManager(\"menu\");\r\n\t\treturn menuManager;\r\n\t}", "public AbstractMenu(MenuLoader menuLoader) \r\n\t{}", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "protected abstract void addMenuOptions();", "protected String createUrlEntry(SitemapEntry sitemapEntry)\r\n {\r\n StringBuilder urlEntry = new StringBuilder();\r\n urlEntry.append(\"<url>\");\r\n urlEntry.append(\"<loc>\");\r\n urlEntry.append(sitemapEntry.getUrlString());\r\n urlEntry.append(\"</loc>\");\r\n if (sitemapEntry.getLastModified() != null)\r\n {\r\n urlEntry.append(\"<lastmod>\");\r\n urlEntry.append(sitemapEntry.getLastModified().getISO8601DateTime());\r\n urlEntry.append(\"</lastmod>\");\r\n }\r\n if (sitemapEntry.getChangeFreq() != null)\r\n {\r\n urlEntry.append(\"<changefreq>\");\r\n urlEntry.append(sitemapEntry.getChangeFreq().getText());\r\n urlEntry.append(\"</changefreq>\");\r\n }\r\n if (sitemapEntry.getPriority() != null)\r\n {\r\n urlEntry.append(\"<priority>\");\r\n urlEntry.append(sitemapEntry.getPriority());\r\n urlEntry.append(\"</priority>\");\r\n }\r\n urlEntry.append(\"</url>\");\r\n\r\n return urlEntry.toString();\r\n }", "private void openAddRoutePopupMenu() {\r\n PopupMenu menu = new PopupMenu(this, findViewById(R.id.route_list));\r\n for (Sight s : this.manager.getAllSights()){\r\n menu.getMenu().add(Menu.NONE, s.getId(), Menu.NONE, s.toString());\r\n }\r\n menu.getMenu().add(Menu.NONE, R.id.configure_sight_list_cancel_context_menu, Menu.NONE, getApplicationContext().getString(R.string.cancel));\r\n menu.setOnMenuItemClickListener(this);\r\n menu.show();\r\n }", "public Menu addMenu(String displayname) {\r\n\r\n\t\t\tMenuItem menubaritem = new MenuItem(menubar, SWT.CASCADE);\r\n\t\t\tmenubaritem.setText(displayname);\r\n\r\n\t\t\tMenu menu = new Menu(shell, SWT.DROP_DOWN);\r\n\t\t\tmenubaritem.setMenu(menu);\r\n\r\n\t\t\tString name = displayname.replace(\"&\", \"\").toLowerCase();\r\n\t\t\tmenus.put(name, menu);\r\n\r\n\t\t\treturn menu;\r\n\t\t}", "protected abstract PopupMenuHelper createActionMenuHelper();", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n menu.removeItem(R.id.action_search);\n MenuItem item = menu.add(\"Add New Address\");\n item.setIcon(R.drawable.add_plus_button);\n MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);\n\n }", "ReturnCode createMenus(MmtConfig cfg, String menuJson);", "IMenuView getMenuView();", "private static MenuItem createCenterPanelPasteMenuItem(SongManager model) {\n MenuItem paste = new MenuItem(PASTE);\n\n paste.setOnAction((event) -> {\n File dest = model.getM_selectedCenterFolder();\n if (!dest.isDirectory()) {\n PromptUI.customPromptError(\"Not a directory!\", null, \"Please select a directory as the paste target.\");\n return;\n }\n try {\n model.copyToDestination(dest);\n } catch (IOException ex) {\n PromptUI.customPromptError(\"Error\", null, \"IOException: \" + ex.getMessage());\n } catch (Exception ex) {\n PromptUI.customPromptError(\"Error\", null, \"Exception: \" + ex.getMessage());\n }\n });\n\n return paste;\n }", "public Menu createMenu(String name) {\r\n\t\treturn new Menu(name,this);\r\n\t}", "public ActionMenuItem() {\n this(\"\");\n }", "MenuItem getMenuItemAbout();", "private MenuManager createHelpMenu(IWorkbenchWindow window) {\n\t\tMenuManager menu = new MenuManager(Messages.getString(\"IU.Strings.42\")); //$NON-NLS-1$\n\t\t\n\t\t\n\t\tmenu.add(getAction(ActionFactory.HELP_CONTENTS.getId()));\t\n\t\tmenu.add(new Separator());\n\t\tIWorkbenchAction about = ActionFactory.ABOUT.create(window);\n\t\tabout.setText(Messages.getString(\"IU.Strings.43\")); //$NON-NLS-1$\n\t\tmenu.add(about);\n\t\t\n\t\treturn menu;\t\n\t}", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "public MyMenu(String alias) {\n this(DSL.name(alias), MY_MENU);\n }", "@Override\r\n\t\tpublic void render(com.google.gwt.cell.client.Cell.Context context,\r\n\t\t\t\tMainMenuItem value, SafeHtmlBuilder sb) {\n\t\t\tif(value == null){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tsb.appendEscaped(value.getName());\r\n\t\t}", "public ChessMenuBar() {\n String[] menuCategories = {\"File\", \"Options\", \"Help\"};\n String[] menuItemLists =\n {\"New game/restart,Exit\", \"Toggle graveyard,Toggle game log\",\n \"About\"};\n for (int i = 0; i < menuCategories.length; i++) {\n JMenu currMenu = new JMenu(menuCategories[i]);\n String[] currMenuItemList = menuItemLists[i].split(\",\");\n for (int j = 0; j < currMenuItemList.length; j++) {\n JMenuItem currItem = new JMenuItem(currMenuItemList[j]);\n currItem.addActionListener(new MenuListener());\n currMenu.add(currItem);\n }\n this.add(currMenu);\n }\n }", "public ToolItem (ToolBar parent, int style, int index) {\r\n\tsuper (parent, checkStyle (style));\r\n\tthis.parent = parent;\r\n\tparent.createItem (this, index);\r\n}", "IMenuFactory getMenuFactory();", "public MenuItem(){\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_child_web_alert_detail, menu);\n MenuItem menuItem = menu.findItem(R.id.url_action_share);\n ShareActionProvider mshareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(menuItem);\n if(mshareActionProvider!=null){\n mshareActionProvider.setShareIntent(createUrlAlertIntent());\n\n }\n return true;\n }", "public ActionMenuItem(String text) {\n this.text = text;\n }" ]
[ "0.64351994", "0.61885667", "0.59281933", "0.58763564", "0.5780669", "0.56603324", "0.56532604", "0.56437135", "0.5443538", "0.5443111", "0.5417126", "0.54129285", "0.53932565", "0.5388698", "0.537475", "0.53696036", "0.53261054", "0.5318652", "0.528155", "0.5254281", "0.5219049", "0.51667327", "0.5147084", "0.5115618", "0.51103026", "0.5072448", "0.5022888", "0.50142884", "0.50050163", "0.5002309", "0.49985167", "0.4997982", "0.49949914", "0.49895263", "0.49791893", "0.497752", "0.4973449", "0.4968549", "0.49654853", "0.495513", "0.4941789", "0.49316815", "0.4923869", "0.4908338", "0.4882328", "0.4869251", "0.4855656", "0.48458987", "0.48399374", "0.48340783", "0.48278603", "0.48199448", "0.4815435", "0.48006827", "0.47960454", "0.47932976", "0.47888944", "0.47874695", "0.4785567", "0.4784748", "0.47834548", "0.47763953", "0.47744432", "0.47741014", "0.47721434", "0.47710174", "0.4764065", "0.4761288", "0.47601795", "0.47559744", "0.475201", "0.4746994", "0.4744087", "0.47435537", "0.47422472", "0.4741063", "0.47369617", "0.47339833", "0.47309166", "0.47297078", "0.4725425", "0.47223637", "0.4721619", "0.47174034", "0.47141162", "0.47056746", "0.47000095", "0.46993655", "0.46925762", "0.46806148", "0.46769893", "0.4671109", "0.46659443", "0.46647972", "0.46616983", "0.4660638", "0.46577343", "0.46573013", "0.46561468", "0.46561116" ]
0.7410019
0
Creates a menu item for ClickableSpan.
private static @Nullable ContextMenuItem createMenuItemForClickableSpan( Context context, int itemId, Spannable spannable, ClickableSpan clickableSpan, TalkBackAnalytics analytics) { final int start = spannable.getSpanStart(clickableSpan); final int end = spannable.getSpanEnd(clickableSpan); if (start < 0 || end < 0) { return null; } final CharSequence label = spannable.subSequence(start, end); if (TextUtils.isEmpty(label)) { return null; } SpannableUtils.stripTargetSpanFromText(label, TARGET_SPAN_CLASS); final ContextMenuItem item = ContextMenu.createMenuItem(context, R.id.group_links, itemId, Menu.NONE, label); item.setOnMenuItemClickListener( new ClickableSpanMenuItemClickListener(clickableSpan, analytics)); return item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static @Nullable ContextMenuItem createMenuItemForUrlSpan(\n Context context, int itemId, Spannable spannable, URLSpan span, TalkBackAnalytics analytics) {\n final String url = span.getURL();\n final int start = spannable.getSpanStart(span);\n final int end = spannable.getSpanEnd(span);\n if (start < 0 || end < 0) {\n return null;\n }\n final CharSequence label = spannable.subSequence(start, end);\n if (TextUtils.isEmpty(url) || TextUtils.isEmpty(label)) {\n return null;\n }\n\n final Uri uri = Uri.parse(url);\n if (uri.isRelative()) {\n // Generally, only absolute URIs are resolvable to an activity\n return null;\n }\n\n // Strip out ClickableSpans/UrlSpans from the label text.\n // A11y framework has changed how it handles double-tap from O. It's possible that double-tap\n // on the menu item will invoke ClickableSpans in the label text instead of calling\n // MenuItemClickListener. Thus we should remove ClickableSpans from label text.\n // Also apply this rule to pre-O in order to have consistent text appearance.\n SpannableUtils.stripTargetSpanFromText(label, TARGET_SPAN_CLASS);\n final ContextMenuItem item =\n ContextMenu.createMenuItem(context, R.id.group_links, itemId, Menu.NONE, label);\n item.setOnMenuItemClickListener(new UrlSpanMenuItemClickListener(context, uri, analytics));\n return item;\n }", "private MenuBar.MenuItem createMenuItem(View vista, String menuAddress, Resource menuIcon) {\n MenuBar.MenuItem menuItem;\n MenuCommand cmd = new MenuCommand(menuBar, vista);\n menuItem = menuBar.addItem(menuAddress, menuIcon, cmd);\n menuItem.setStyleName(AMenuBar.MENU_DISABILITATO);\n\n return menuItem;\n }", "private JMenuItem createMenuItem(JMenu parent, String text, int mnemonic, String keyStrokeText, String tooltip) {\n\t\tJMenuItem item = new JMenuItem();\n\t\t\n\t\titem.setText(text);\n\t\tif (mnemonic != -1) {\n\t\t\titem.setMnemonic(mnemonic);\n\t\t}\n\t\tif (keyStrokeText != null) {\n\t\t\tKeyStroke accelerator = KeyStroke.getKeyStroke(keyStrokeText);\n\t\t\titem.setAccelerator(accelerator);\n\t\t}\n\t\tif (tooltip != null) {\n\t\t\titem.setToolTipText(tooltip);\n\t\t}\n\t\t\n\t\tparent.add(item);\n\t\treturn item;\n\t}", "public Menu createViewMenu();", "public native static MenuItemToggle create(MenuItem item);", "public native static MenuItemToggle create();", "public Menu createToolsMenu();", "public MenuItem add(int titleRes);", "Span createSpan();", "@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}", "public MenuItem add(CharSequence title);", "private MenuBar.MenuItem createMenuItem(Class<? extends View> viewClass, String label, boolean cached, Resource icon) {\n MenuBar.MenuItem menuItem;\n MenuCommand cmd = new MenuCommand(menuBar, viewClass, cached);\n menuItem = menuBar.addItem(label, icon, cmd);\n menuItem.setStyleName(AMenuBar.MENU_DISABILITATO);\n return menuItem;\n }", "public void createContextMenu(ContextMenu menu,View v,ContextMenuInfo menuInfo){\n \t\tAdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;\n \t\tAdapterItemRef ref = (AdapterItemRef)info.targetView.getTag();\n \t\t\t\t\n \t\tmenu.setHeaderTitle(ref.lblTitle.getText().toString());\t\t\t\t\n \t\tmenu.add(0,2,0,\"Delete\");\n \t\tmenu.add(0,1,1,\"Reset Progress\");\n \t\tmenu.add(0,3,2,\"Mark as Read\");\n \t\tmenu.add(0,4,3,\"Edit Series Name\");\n \t}", "public JMenuItem createMenuItem(Action a) {\n JMenuItem item = new JMenuItem(a);\n decorateMenuComponent(item);\n return item;\n }", "public interface OnMenuClickListener {\n /**\n * When an item is clicked, informs with the id of the item, which is given while adding the\n * items.\n *\n * @param id The id of the item.\n */\n void onClick(int id);\n }", "@objid (\"491beea2-12dd-11e2-8549-001ec947c8cc\")\n private static MHandledMenuItem createItem(String label, String tooltip, String iconURI) {\n MHandledMenuItem item = MMenuFactory.INSTANCE.createHandledMenuItem();\n // item.setElementId(module.getName() + commandId);\n item.setLabel(label);\n item.setTooltip(tooltip);\n item.setIconURI(iconURI);\n item.setEnabled(true);\n item.setToBeRendered(true);\n item.setVisible(true);\n return item;\n }", "@Override\r\n\tpublic void onCreateContextMenu(ContextMenu menu, View v,\r\n\t\t\tContextMenuInfo menuInfo) {\n\t\tsuper.onCreateContextMenu(menu, v, menuInfo);\r\n\t\tmenu.setHeaderIcon(getResources().getDrawable(R.drawable.ic_launcher));\r\n\t\tmenu.setHeaderTitle(\"test\");\r\n\t\tmenu.add(0, Menu.FIRST, 0, \"aaaa\");\r\n\t\tmenu.add(0, Menu.FIRST + 1, 0, \"bbbb\");\r\n\t\tmenu.add(0, Menu.FIRST + 2, 0, \"cccc\");\r\n\t}", "public void menuClicked(MenuItem menuItemSelected);", "void onMenuItemClicked();", "private ClickableSpan makeClickableSpan(final String type, final String filter) {\n return new ClickableSpan() {\n @Override\n public void onClick(View view) {\n new InfoHelper().getInfo(GlobalFunctions.this, type, filter);\n }\n };\n }", "public native void addSubItem(MenuItem item);", "MenuItem addItem(String title, Command callback);", "public void menuItemClicked( Menu2DEvent e );", "private MenuItem makeMenuItem (String label, String command) {\n MenuItem mi = new MenuItem (label);\n mi.setActionCommand (command);\n mi.addActionListener (commandHandler);\n return mi;\n }", "public JMenu addMenuItem (String texte, JMenu menu,String toolTipText) {\n JMenuItem item = new JMenuItem(texte);\n item.addActionListener(this);\n menu.add(item);\n menu.addSeparator();\n item.setToolTipText(toolTipText);\n return menu;\n }", "@Override\n public void itemClick(int pos) {\n }", "public interface IMenu {\r\n public class MenuItem {\r\n \r\n public static final MenuItem SEPARATOR = new MenuItem(\"SEPARATOR\", \"Separator\");\r\n \r\n private String menuId;\r\n private String menuText;\r\n private boolean checked;\r\n \r\n public MenuItem(String menuId, String menuText) {\r\n this.menuId = menuId;\r\n this.menuText = menuText;\r\n }\r\n\r\n public MenuItem(String menuText, boolean checked) {\r\n this.menuText = menuText; \r\n this.checked = checked;\r\n }\r\n\r\n public String getMenuId() {\r\n return menuId;\r\n }\r\n\r\n public void setMenuId(String menuId) {\r\n this.menuId = menuId;\r\n }\r\n\r\n public String getMenuText() {\r\n return menuText;\r\n }\r\n\r\n public void setMenuText(String menuText) {\r\n this.menuText = menuText;\r\n }\r\n\r\n public boolean isChecked() {\r\n return checked;\r\n }\r\n\r\n public void setChecked(boolean checked) {\r\n this.checked = checked;\r\n }\r\n }\r\n \r\n /**\r\n * Callback function for Caller when the MenuItem is clicked\r\n * \r\n * @param menuItemSelected The selected MenuItem\r\n */\r\n public void menuClicked(MenuItem menuItemSelected);\r\n}", "@Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(mContext, holder.tv_option_menu);\n //inflating menu from xml resource\n popup.inflate(R.menu.menu_options);\n //adding click listener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu1:\n shareStories(headlinesList.get(position).getUrl());\n return true;\n case R.id.menu2:\n //handle menu2 click\n db.insertNote(headlinesList.get(position));\n return true;\n default:\n return false;\n }\n }\n });\n //displaying the popup\n popup.show();\n\n }", "public interface Menu {\n\n /**\n * Add an item to the menu.\n *\n * @param title Title of the item (which will be interpreted as plain text and\n * HTML-escaped if necessary)\n * @param callback Code to execute when the item is selected\n * @return A MenuItem representing the added item\n */\n MenuItem addItem(String title, Command callback);\n\n /**\n * Add an item to the menu.\n *\n * @param title Title of the item, as a {@link SafeHtml}\n * @param callback Code to execute when the item is selected\n * @return A MenuItem representing the added item\n */\n MenuItem addItem(SafeHtml title, Command callback);\n}", "void clickAmFromMenu();", "private JMenuItem makeMenuItem(String name) {\n JMenuItem m = new JMenuItem(name);\n m.addActionListener(this);\n return m;\n }", "IMenuView getMenuView();", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmenu.add(0,context_class_test_menu1, 0, \"newmenu\"+Math.random());\r\n\t\t\t\tLog.e(\"test\", \"完成添加\");\r\n\r\n\t\t\t}", "SPAN createSPAN();", "@Override\n\t\t\tpublic void create(SwipeMenu menu) {\n\t\t\t\tSwipeMenuItem openItem = new SwipeMenuItem(getActivity()\n\t\t\t\t\t\t.getApplicationContext());\n\t\t\t\topenItem.setWidth(dp2px(60));\n\t\t\t\topenItem.setIcon(R.drawable.list_delete);\n\t\t\t\topenItem.setBackground(R.color.deep_pink);\n\t\t\t\tmenu.addMenuItem(openItem);\n\n\t\t\t\t// Edit Item\n\t\t\t\tSwipeMenuItem editItem = new SwipeMenuItem(getActivity()\n\t\t\t\t\t\t.getApplicationContext());\n\t\t\t\teditItem.setBackground(R.color.deep_yellow);\n\t\t\t\teditItem.setWidth(dp2px(60));\n\t\t\t\teditItem.setIcon(R.drawable.total_swipeedit);\n\t\t\t\tmenu.addMenuItem(editItem);\n\n\t\t\t}", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n super.onCreateContextMenu(menu, v, menuInfo);\n menu.add(0, v.getId(), 0, \"Edit\");\n menu.add(0, v.getId(), 0, \"Delete\");\n menu.add(0, v.getId(), 0, \"Share via\");\n menu.add(0, v.getId(), 0, \"Share via Facebook\");\n menu.add(0, v.getId(), 0, \"Cancel\");\n }", "@Override\n public void onClick(View view, int pos) {\n String tag = (String) view.getTag();\n Toast.makeText(XCArcMenuViewDemo.this, tag, Toast.LENGTH_SHORT).show();\n }", "void onCreateContextMenuForChild(int childPosition, ContextMenu menu,\n Activity activity) {\n }", "public TextController createMenu(ControllerCore genCode) {\n\t\tmenuTXT = new TextController(\"menu\", getParentController(controlItemSCSCLC), genCode) {\n\t\t\t@Override\n\t\t\tpublic void initialize() {\n\t\t\t\tsetLinkedController(menu$1LBL);\n\t\t\t\tsetProperty(\"menu\");\n\t\t\t\tsuper.initialize();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tif (null != fieldBindManager)\n\t\t\t\t\t\tfieldBindManager = new XjcFieldBindingManager(this);\n\t\t\t\t\tgetControl().addFocusListener(new XjcFocusListener(this));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn menuTXT;\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_sub_sel_activity2, menu);\r\n tvMenu = new TextView(this);\r\n // tv.setText(getString(R.string.matchmacking)+\" \");\r\n // tvMenu.setTextColor(getResources().getColor(Color.WHITE));\r\n // tv.setOnClickListener(this);\r\n tvMenu.setTextColor((Color.parseColor(\"#ffffff\")));\r\n tvMenu.setPadding(5, 0, 5, 0);\r\n tvMenu.setTypeface(null, Typeface.BOLD);\r\n tvMenu.setTextSize(15);\r\n menu.add(0, 1, 1, \"selected\").setActionView(tvMenu).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);\r\n\r\n tvMenu.setText(\"Selected\" + \"\\n \" + String.valueOf(count));\r\n return true;\r\n }", "void drawMenu(IMenu menuToBeRendered);", "private JMenu createLanguageMenu() {\n\t\tAction nestoAction = new AbstractAction() {\n\n\t\t\t/** The generated serial user ID */\n\t\t\tprivate static final long serialVersionUID = -4439263551767223123L;\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJMenuItem src = (JMenuItem) e.getSource();\n\t\t\t\tString arg = src.getText();\n\t\t\t\tLocalizationProvider.getInstance().setLanguage(arg);\n\t\t\t\tLocalizationProvider.getInstance().fire();\n\t\t\t}\n\t\t};\n\n\t\titemHR = new JMenuItem(nestoAction);\n\t\titemHR.setText(\"hr\");\n\t\titemEN = new JMenuItem(nestoAction);\n\t\titemEN.setText(\"en\");\n\t\titemDE = new JMenuItem(nestoAction);\n\t\titemDE.setText(\"de\");\n\n\t\tlangMenu = new JMenu(flp.getString(\"lang\"));\n\n\t\tlangMenu.add(itemHR);\n\t\tlangMenu.add(itemEN);\n\t\tlangMenu.add(itemDE);\n\n\t\treturn langMenu;\n\t}", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n menu.add(0, getAdapterPosition(),0,\"DELETE\");\n // Log.d(TAG, \"onCreateContextMenu: \" + );\n }", "public MenuButtons(String nameOfButton) {\n Text text = new Text(nameOfButton);\n text.setFont(Font.font(null, FontWeight.BOLD, 18));\n text.setFill(Color.WHITESMOKE);\n\n //A rectangle that will be a part of the button\n Rectangle rectangle = new Rectangle(250,30);\n rectangle.setOpacity(0.3);\n rectangle.setFill(Color.BLUE);\n\n setAlignment(Pos.CENTER_LEFT);\n getChildren().addAll(rectangle, text);\n\n setOnMouseEntered(e -> {\n rectangle.setTranslateX(5);\n text.setTranslateX(5);\n rectangle.setFill(Color.DARKBLUE);\n });\n\n setOnMouseExited(e -> {\n rectangle.setTranslateX(0);\n text.setTranslateX(0);\n rectangle.setFill(Color.BLUE);\n });\n\n DropShadow shadowEffect = new DropShadow();\n shadowEffect.setInput(new Glow());\n\n setOnMousePressed(e -> setEffect(shadowEffect));\n setOnMouseReleased(e -> setEffect(null));\n }", "@Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(mCtx, holder.buttonViewOption);\n //inflating menu from xml resource\n popup.inflate(R.menu.option_menu_for_blood_post_notification);\n //adding click listener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu1:\n //handle menu1 click\n break;\n case R.id.menu2:\n //handle menu2 click\n break;\n }\n return false;\n }\n });\n //displaying the popup\n popup.show();\n\n }", "@Override\n public void create(SwipeMenu menu) {\n SwipeMenuItem item1 = new SwipeMenuItem(\n getApplicationContext());\n item1.setBackground(new ColorDrawable(Color.DKGRAY));\n // set width of an option (px)\n item1.setWidth(200);\n item1.setTitle(\"Action 1\");\n item1.setTitleSize(18);\n item1.setTitleColor(Color.WHITE);\n menu.addMenuItem(item1);\n\n SwipeMenuItem item2 = new SwipeMenuItem(\n getApplicationContext());\n // set item background\n item2.setBackground(new ColorDrawable(Color.RED));\n item2.setWidth(200);\n item2.setTitle(\"Action 2\");\n item2.setTitleSize(18);\n item2.setTitleColor(Color.WHITE);\n menu.addMenuItem(item2);\n }", "@Override\r\n\t\tpublic void render(com.google.gwt.cell.client.Cell.Context context,\r\n\t\t\t\tMainMenuItem value, SafeHtmlBuilder sb) {\n\t\t\tif(value == null){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tsb.appendEscaped(value.getName());\r\n\t\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tmenu.add(1,1,1,\"\").setTitle(R.string.creategroup);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "protected abstract PopupMenuHelper createActionMenuHelper();", "protected ViewerPopupMenu createPopupMenu()\n {\n ViewerPopupMenu menu = super.createPopupMenu();\n\n viewAction = new ViewerAction(this, \"View\", \"view\",\n \"View Dofs\",\n \"View the dofs of an Actor in table form.\",\n null, null, \"Ctrl-V\", null, \"false\");\n\n menu.addSeparator();\n menu.add(viewAction);\n\n return menu;\n }", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n //menu.setHeaderTitle(\"Select The Action\");\n menu.add(0, v.getId(), 0, \"Edit word\");\n menu.add(1, v.getId(), 0, \"Delete word\");\n\n super.onCreateContextMenu(menu, v, menuInfo);\n }", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "void addMenu(V object);", "IMenuFactory getMenuFactory();", "private void createMenu(){\n \n menuBar = new JMenuBar();\n \n game = new JMenu(\"Rummy\");\n game.setMnemonic('R');\n \n newGame = new JMenuItem(\"New Game\");\n newGame.setMnemonic('N');\n newGame.addActionListener(menuListener);\n \n \n \n exit = new JMenuItem(\"Exit\");\n exit.setMnemonic('E');\n exit.addActionListener(menuListener); \n \n \n \n }", "LI createLI();", "private void createMenuForGCodeModifier(IMenuManager contextMenu, IModifier<?> modifier) {\r\n\t\tcontextMenu.add(new EnableDisableAction(rs274Service, modifier.getId()));\r\n\t\tcontextMenu.add(new ModifierMoveUpAction(rs274Service, modifier.getId()));\r\n\t\tcontextMenu.add(new ModifierMoveDownAction(rs274Service, modifier.getId()));\r\n\t\tcontextMenu.add(new Separator());\r\n\t\tcontextMenu.add(new DeleteModifierAction(rs274Service, modifier.getId()));\r\n\t}", "@SuppressLint(\"NonConstantResourceId\")\n private void menuButtonCLicked(ImageView btnMenu, String classCode, String joinCode, String subjectName, RelativeLayout classroomParent) {\n btnMenu.setOnClickListener(v -> {\n PopupMenu popupMenu = new PopupMenu(context, btnMenu);\n popupMenu.getMenuInflater()\n .inflate(R.menu.drop_down_menu, popupMenu.getMenu());\n\n popupMenu.setOnMenuItemClickListener(item -> {\n switch (item.getItemId()) {\n case R.id.inviteUser:\n openInviteActivity(classCode, joinCode, subjectName);\n break;\n case R.id.delete:\n deleteClass(classCode, btnMenu, classroomParent);\n break;\n }\n return true;\n });\n popupMenu.show();\n });\n }", "MenuEntry.Factory getMenuEntryFactory();", "@Override\n\tpublic void onCreateContextMenu(ContextMenu menu, View v,\n\t\t\tContextMenuInfo menuInfo) {\n\t\tsuper.onCreateContextMenu(menu, v, menuInfo);\n\t\tmenu.add(0, MENU_DELETE, 0, R.string.delete);\n\t\tmenu.add(0,MENU_MOVE,1,getResources().getString(R.string.transmit_m));\n\t}", "void setParent(IMenu menuItem);", "private JMenuItem constructExampleMenuItem(String menuText,\r\n\t\t\tString functionString, char mnemonicChar) {\r\n\t\tJMenuItem menuItem = new JMenuItem(menuText);\r\n\t\t// store the function in the action command for use later\r\n\t\tmenuItem.setActionCommand(functionString);\r\n\t\tmenuItem.addActionListener(this);\r\n\t\tmenuItem.setVisible(true);\r\n\t\tmenuItem.setMnemonic(mnemonicChar);\r\n\t\treturn menuItem;\r\n\t}", "public void addMenu(ToolbarSubMenuMenu menu, int hotkey, String identifier, String iconName) {\n Actor thisMenu = this;\n createButton(identifier, iconName, hotkey, new ChangeListener() {\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n GameMvc.instance().getView().mainUiStage.toolbar.hideSubMenus(thisMenu);\n menu.show();\n }\n }, true);\n menus.put(identifier, menu);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonSlideMenuFragmentEventListener.onSlideMenuFragmentEvent(MENU_TOOLS);\n\t\t\t}", "static void createContextMenu(View view, ContextMenu menu, ContextMenu.ContextMenuInfo menuInfo) {\n ((MenuBuilder) menu).setCurrentMenuInfo(menuInfo);\n\n XpContextMenuViewCompat.onCreateContextMenu(view, menu);\n// ListenerInfo li = mListenerInfo;\n// if (li != null && li.mOnCreateContextMenuListener != null) {\n// li.mOnCreateContextMenuListener.onCreateContextMenu(menu, view, menuInfo);\n// }\n View.OnCreateContextMenuListener li = XpContextMenuViewCompat.getOnCreateContextMenuListener(view);\n if (li != null) {\n li.onCreateContextMenu(menu, view, menuInfo);\n }\n\n // Clear the extra information so subsequent items that aren't mine don't\n // have my extra info.\n ((MenuBuilder) menu).setCurrentMenuInfo(null);\n\n if (view.getParent() != null) {\n try {\n createContextMenu((View) view.getParent(), menu);\n } catch (ClassCastException ex) {\n //\n }\n }\n }", "@Override\n\tpublic void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo)\n\t{\n\t\tsuper.onCreateContextMenu(menu, v, menuInfo);\n\n\t\tif (v.getId() == R.id.expandableListMyGroupDeadlinesList)\n\t\t{\n\t\t\tExpandableListView.ExpandableListContextMenuInfo acmi = (ExpandableListView.ExpandableListContextMenuInfo) menuInfo;\n\t\t\tint idx = ExpandableListView.getPackedPositionGroup(acmi.packedPosition);\n\t\t\tmenu.setHeaderTitle(deadlines.get(\n\t\t\t\t\tExpandableListView.getPackedPositionGroup(acmi.packedPosition)).getTitle());\n\t\t\tif (deadlines.get(idx).getInMyDeadlines() == 0)\n\t\t\t\tmenu.add(0, v.getId(), 0, \"Add to my deadlines\");\n\t\t\tmenu.add(0, v.getId(), 0, \"Add to Calendar\");\n\t\t\tmenu.add(0, v.getId(), 0, \"Share Image of Deadline\");\n\n\t\t\tmenu.add(0, v.getId(), 0, \"Delete\");\n\n\t\t}\n\t}", "public void clickMenuButton(){\n waitForClickable(menuHeaderIcon);\n driver.findElement(menuHeaderIcon).click();\n }", "@Override\n\tpublic void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {\n\t\tgetActivity().getMenuInflater().inflate(R.menu.exercise_list_item_context, menu);\n\t}", "public ToolItem (ToolBar parent, int style, int index) {\r\n\tsuper (parent, checkStyle (style));\r\n\tthis.parent = parent;\r\n\tparent.createItem (this, index);\r\n}", "private void buildViewMenu(){\n //Create a Run Payroll menu item\n viewItem = new JMenuItem(\"View CS History\");\n viewItem.setMnemonic(KeyEvent.VK_H);\n viewItem.addActionListener(new ViewListener());\n \n //Create a JMenu object for the run menu\n viewMenu = new JMenu(\"View\");\n viewMenu.setMnemonic(KeyEvent.VK_V);\n \n //Add the item to the menu\n viewMenu.add(viewItem);\n }", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { // Add Items to menu\n if (v.getId() == R.id.listView) {\n String[] menuItems = getResources().getStringArray(R.array.menu);\n for (int i = 0; i < menuItems.length; i++) {\n menu.add(Menu.NONE, i, i, menuItems[i]);\n }\n }\n }", "private MenuItem getMenuItem(String text, EventHandler<ActionEvent> handler) {\n MenuItem mi = new MenuItem(text);\n mi.setOnAction(handler);\n\n return mi;\n }", "public ActionMenuItem(String text) {\n this.text = text;\n }", "@Override\n public void OnItemClick(int position) {\n }", "public MenuItemView(float x, float y, float width, float height,\n\t\t\tApplication app, MenuItem menuItem, int indexInArray) {\n\t\tsuper(app);\n\t\t\n\t\tthis.translate(new Vector3D(x,y));\n\t\tmenuItemView = new MTRectangle(width, height, app);\n\t\tbgImage = app.loadImage(menuItem.getImgPath());\n\t\tmenuItemView.setTexture(bgImage);\n\t\tmenuItemView.setNoStroke(true);\n\t\tthis.addChild(menuItemView);\n\t\t\n\t\tmenuItemViewColored = new MTRectangle(width, height, app);\n\t\tbgImageColor = app.loadImage(menuItem.getMenuImgPathColor());\n\t\tmenuItemViewColored.setTexture(bgImageColor);\n\t\tmenuItemViewColored.setFillColor(new MTColor(255, 255, 255, 0));\n\t\tmenuItemViewColored.setNoStroke(true);\n\t\tthis.addChild(menuItemViewColored);\n\t\tcolored = false;\n\t\t\n\t\tMTRectangle transBox = new MTRectangle(0, height / 15 * 11, width,\n\t\t\t\theight / 15 * 4, app);\n\t\ttransBox.setFillColor(app.getTransparantBlack());\n\t\ttransBox.setNoStroke(true);\n\t\tthis.addChild(transBox);\n\t\t\n\t\tMTTextArea textBox = new MTTextArea(app, app.getFontTitle());\n\t\tthis.addChild(textBox);\n\n\t\ttextBox.setNoFill(true);\n\t\ttextBox.setNoStroke(true);\n\t\ttextBox.setText(menuItem.getName());\n\t\ttextBox.setPositionRelativeToParent(new Vector3D(width / 2,\n\t\t\t\theight/10 * 8.5f));\n\t\t\n\t\tfinal MTComponent component = this;\n\t\tfor (MTComponent comp : this.getChildren()) {\n\t\t\tcomp.removeAllGestureEventListeners();\n\t\t\tcomp.addGestureListener(DragProcessor.class,\n\t\t\t\t\tnew IGestureEventListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic boolean processGestureEvent(MTGestureEvent ge) {\n\t\t\t\t\tge.setTargetComponent(component);\n\t\t\t\t\tcomponent.processGestureEvent(ge);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tcomp.registerInputProcessor(new TapProcessor(app));\n\t\t\tcomp.addGestureListener(TapProcessor.class, \n\t\t\t\t\tnew IGestureEventListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic boolean processGestureEvent(MTGestureEvent ge) {\n\t\t\t\t\tcomponent.processGestureEvent(ge);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\tarrow = new ArrowUp(app);\n\t\tthis.addChild(arrow);\n\t\tarrow.setPositionRelativeToParent(new Vector3D(width / 2,\n\t\t\t\tapp.height / 20 * 19));\n\t\t\n\t}", "private void addMenuElement(float posx, float posy, int height) {\r\n\t\tlayout.addComponent(menu);\r\n\t\tresetMenuPosition(posx, posy, height);\r\n\t}", "@Override\n public void onItemClick(int pos) {\n }", "public ContextMenu createContextMenu() {\n\t\tContextMenu ctm = new ContextMenu();\n\n\t\tMenuItem rename = new MenuItem(\"Rename\");\n\t\tMenuItem remove = new MenuItem(\"Remove\");\n\n\t\trename.setOnAction((ActionEvent) -> {\n\t\t\tthis.fireEvent(new VertexEvent(VertexEvent.RENAME, this));\n\t\t});\n\t\tremove.setOnAction((ActionEvent) -> {\n\t\t\tthis.fireEvent(new VertexEvent(VertexEvent.REMOVE, this));\n\n\t\t});\n\t\t// Add MenuItem to ContextMenu\n\t\tctm.getItems().addAll(rename, remove);\n\t\treturn ctm;\n\t}", "@Override\n public boolean onMenuItemClick(MenuItem item) {\n return true;\n }", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v,\n ContextMenu.ContextMenuInfo menuInfo) {\n menu.add(0, MENU_COLOR_RED, 0, \"Red\");\n menu.add(0, MENU_COLOR_BLUE, 0, \"Blue\");\n menu.add(0, MENU_COLOR_GREEN, 0, \"Green\");\n menu.add(0, MENU_COLOR_GRAY, 0, \"Gray (default)\");\n super.onCreateContextMenu(menu, v, menuInfo);\n }", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n super.onCreateContextMenu(menu, v, menuInfo);\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.contextmenu, menu);\n }", "public JMenu addMenuItem (String texte, JMenu menu) {\n return addMenuItem (texte,menu,\"\");\n }", "boolean onExtendMenuItemClick(int itemId, View view);", "void setMenuItem(MenuItem menuItem);", "@Override\r\n\tpublic void clicked(ItemMenuIcon icon, Player p) {\n\t\t\r\n\t}", "public interface OnCrosheMenuClick {\n void onClick(CrosheMenuItem item, View view);\n}", "@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }", "public static MenuDrawerItem create(TestingOption testingOption, String label, int itemType) {\n MenuDrawerItem menuDrawerItem = new MenuDrawerItem(testingOption);\n menuDrawerItem.setLabel(label);\n menuDrawerItem.setItemType(itemType);\n return menuDrawerItem;\n\n }", "protected MenuBarView createMenuBuilder(Main mainFrameUtil) {\r\n return new MenuBarView(mainFrameUtil);\r\n }", "protected void createContextMenuFor(StructuredViewer viewer) {\r\n\t\tMenuManager contextMenu = new MenuManager(\"#PopUp\");\r\n\t\tcontextMenu.add(new Separator(\"additions\"));\r\n\t\tcontextMenu.setRemoveAllWhenShown(true);\r\n\t\tcontextMenu.addMenuListener(this);\r\n\t\tMenu menu = contextMenu.createContextMenu(viewer.getControl());\r\n\t\tviewer.getControl().setMenu(menu);\r\n\t\tgetSite().registerContextMenu(contextMenu,\r\n\t\t\t\tnew UnwrappingSelectionProvider(viewer));\r\n\r\n\t\tint dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;\r\n\t\tTransfer[] transfers = new Transfer[] { LocalTransfer.getInstance() };\r\n\t\tviewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(\r\n\t\t\t\tviewer));\r\n\t\tviewer.addDropSupport(dndOperations, transfers,\r\n\t\t\t\tnew EditingDomainViewerDropAdapter(editingDomain, viewer));\r\n\t}", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n super.onCreateContextMenu(menu, v, menuInfo);\n menu.setHeaderTitle(\"Select the Action\");\n getMenuInflater().inflate(R.menu.my_context_menu, menu); // add costume menu\n }", "@Override\n public void create(SwipeMenu menu) {\n SwipeMenuItem goodItem = new SwipeMenuItem(getContext());\n // set item background\n goodItem.setBackground(new ColorDrawable(Color.rgb(0x30, 0xB1, 0xF5)));\n // set item width\n goodItem.setWidth(dp2px(90));\n // set a icon\n goodItem.setIcon(R.mipmap.ic_action_good);\n // add to menu\n menu.addMenuItem(goodItem);\n // create \"delete\" item\n SwipeMenuItem deleteItem = new SwipeMenuItem(getContext());\n // set item background\n deleteItem.setBackground(new ColorDrawable(Color.rgb(0xF9, 0x3F, 0x25)));\n // set item width\n deleteItem.setWidth(dp2px(90));\n // set a icon\n deleteItem.setIcon(R.mipmap.ic_action_discard);\n // add to menu\n menu.addMenuItem(deleteItem);\n }", "void onCreateContextMenuForGroup(ContextMenu menu, Activity activity) {\n }", "public ItemMenu() {\n super(null, null);\n }", "@Override\n public void onItemClick(Nson parent, View view, int position) {\n }", "public MenuBox(MenuItem item , boolean line){\n\n getChildren().addAll(item);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonRgtRgtMenuClick(v);\n\t\t\t}", "@Override\n public void onMenuClick() {\n Toast.makeText(activity.getApplicationContext(), \"Menu click\",\n Toast.LENGTH_LONG).show();\n }", "public MenuButton(Menu menu, String text, String font, double xLoc, double yLoc, double textSize)\r\n\t{\r\n\t\tsuper(menu);\r\n\t\t\r\n\t\tmessage = text;\r\n\t\tfontName = font;\r\n\t\tx = xLoc;\r\n\t\ty = yLoc;\r\n\t\tsize = textSize;\r\n\t\t\r\n\t\tupdateText();\r\n\t}", "@Override\n public void create(SwipeMenu menu) {\n switch (menu.getViewType()) {\n case 0:\n createMenu1(menu);\n break;\n case 1:\n createMenu2(menu);\n break;\n case 2:\n createMenu3(menu);\n break;\n }\n }" ]
[ "0.6607176", "0.6576253", "0.62460625", "0.6123465", "0.6087062", "0.6068711", "0.60251045", "0.59704787", "0.5968738", "0.5932267", "0.5930283", "0.5896161", "0.5864923", "0.5827355", "0.5799203", "0.5765414", "0.57398784", "0.57130015", "0.56729513", "0.5670931", "0.5627896", "0.5615267", "0.5614271", "0.55565286", "0.5554591", "0.55438393", "0.5526494", "0.5524704", "0.5524337", "0.5505671", "0.5474899", "0.54703903", "0.546834", "0.54458064", "0.542965", "0.5412222", "0.5408668", "0.5397456", "0.5396208", "0.5388594", "0.536214", "0.5352318", "0.5352045", "0.5339154", "0.5334905", "0.5334543", "0.5306894", "0.5295493", "0.52889776", "0.5285235", "0.5273863", "0.52589184", "0.52469295", "0.52466714", "0.52456254", "0.52435803", "0.5234806", "0.52334654", "0.5223338", "0.52229637", "0.52202356", "0.52124876", "0.52113867", "0.52113235", "0.5208466", "0.51967484", "0.51959825", "0.5192072", "0.5190122", "0.5189741", "0.5184147", "0.5182731", "0.51802284", "0.5178301", "0.5175516", "0.51729786", "0.516804", "0.5158991", "0.5156967", "0.5146855", "0.51434886", "0.51234144", "0.5121228", "0.51210463", "0.5120747", "0.51181436", "0.5116389", "0.51148665", "0.5114283", "0.51139736", "0.5108653", "0.5103991", "0.51008844", "0.50924426", "0.5086768", "0.5084321", "0.5083501", "0.5078238", "0.5076577", "0.50696695" ]
0.7617532
0
always overrides the current state. will return null if any nonhex values are present. pads lines too small and will read only a max of 32 characters
public void readLine(String line) { if (line.length() < 32) { while (line.length() < 32) { line += "0"; } } int begin = 0; int end = 2; for (int row = 0; row < 4; row++) { for (int col = 0; col < 4; col++) { // int val = 0; String hexVal = line.substring(begin, end); hexVal = "0x" + hexVal; char val; try { val = (char) Integer.decode(hexVal).intValue(); } catch (Exception e) { // System.out.println("Error: Key has non hex characters."); this.state = null; return; } this.state[row][col] = val; begin += 2; end += 2; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void getNonBlank() throws IOException{\n while(curr_char == 32)\n {\n curr_char = pbIn.read();\n }\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.backup(122);\n javaCharStream0.adjustBeginLineColumn(122, 122);\n assertEquals(122, javaCharStream0.getBeginColumn());\n }", "protected int bytesPerLine() {\n return (48);\n }", "protected int bytesPerLine() {\n return (48);\n }", "public String read() {\n\t\tString Line = \"\";\n\t\tInteger[] byteCodes = compressFileReader();\n\t\tif (byteCodes == null)\n\t\t\treturn null;\n\t\tint index = 0;\n\t\tint nextCode = byteCodes[index++];\n\t\tString val = readingMap[nextCode];\n\n\t\twhile (index < byteCodes.length - 1) {\n\t\t\tLine += val;\n\t\t\tnextCode = byteCodes[index++];\n\t\t\tString s = readingMap[nextCode];\n\t\t\tif (s == null) {\n\t\t\t\t@SuppressWarnings(\"unused\")\n\t\t\t\tint i = 0;\n\t\t\t}\n\t\t\tif (readingkeysCount == nextCode)\n\t\t\t\ts = val + val.charAt(0);\n\t\t\tif (readingkeysCount < 256 + keysPossible)\n\t\t\t\treadingMap[readingkeysCount++] = val + s.charAt(0);\n\t\t\tval = s;\n\t\t}\n\t\tLine += val;\n\t\treturn Line + '\\n';\n\t}", "int getAutoSkipPadding();", "private String altitudeConversion() {\n int reading = ((record[9] & 255) << 8) + (record[8] & 255);\n if (reading == 60000) {\n return \" \";\n } else {\n return reading + \"\";\n }\n }", "private static int readEscapedHexString(java.lang.String r6, int r7, int r8, java.lang.StringBuilder r9) {\n /*\n int r0 = r8 - r7\n java.nio.ByteBuffer r0 = java.nio.ByteBuffer.allocate(r0)\n L_0x0006:\n if (r7 > r8) goto L_0x00f6\n int r1 = r7 + 1\n char r7 = r6.charAt(r7)\n r2 = 2\n r3 = 0\n r4 = 1\n switch(r7) {\n case 48: goto L_0x0068;\n case 49: goto L_0x0065;\n case 50: goto L_0x0062;\n case 51: goto L_0x005f;\n case 52: goto L_0x005c;\n case 53: goto L_0x0059;\n case 54: goto L_0x0056;\n case 55: goto L_0x0053;\n case 56: goto L_0x0050;\n case 57: goto L_0x004d;\n default: goto L_0x0014;\n }\n L_0x0014:\n switch(r7) {\n case 65: goto L_0x004a;\n case 66: goto L_0x0047;\n case 67: goto L_0x0044;\n case 68: goto L_0x0041;\n case 69: goto L_0x003e;\n case 70: goto L_0x003b;\n default: goto L_0x0017;\n }\n L_0x0017:\n switch(r7) {\n case 97: goto L_0x004a;\n case 98: goto L_0x0047;\n case 99: goto L_0x0044;\n case 100: goto L_0x0041;\n case 101: goto L_0x003e;\n case 102: goto L_0x003b;\n default: goto L_0x001a;\n }\n L_0x001a:\n com.unboundid.ldap.sdk.LDAPException r7 = new com.unboundid.ldap.sdk.LDAPException\n com.unboundid.ldap.sdk.ResultCode r8 = com.unboundid.ldap.sdk.ResultCode.FILTER_ERROR\n com.unboundid.ldap.sdk.LDAPMessages r9 = com.unboundid.ldap.sdk.LDAPMessages.ERR_FILTER_INVALID_HEX_CHAR\n java.lang.Object[] r0 = new java.lang.Object[r2]\n int r1 = r1 - r4\n char r6 = r6.charAt(r1)\n java.lang.Character r6 = java.lang.Character.valueOf(r6)\n r0[r3] = r6\n java.lang.Integer r6 = java.lang.Integer.valueOf(r1)\n r0[r4] = r6\n java.lang.String r6 = r9.get(r0)\n r7.<init>((com.unboundid.ldap.sdk.ResultCode) r8, (java.lang.String) r6)\n throw r7\n L_0x003b:\n r7 = -16\n goto L_0x0069\n L_0x003e:\n r7 = -32\n goto L_0x0069\n L_0x0041:\n r7 = -48\n goto L_0x0069\n L_0x0044:\n r7 = -64\n goto L_0x0069\n L_0x0047:\n r7 = -80\n goto L_0x0069\n L_0x004a:\n r7 = -96\n goto L_0x0069\n L_0x004d:\n r7 = -112(0xffffffffffffff90, float:NaN)\n goto L_0x0069\n L_0x0050:\n r7 = -128(0xffffffffffffff80, float:NaN)\n goto L_0x0069\n L_0x0053:\n r7 = 112(0x70, float:1.57E-43)\n goto L_0x0069\n L_0x0056:\n r7 = 96\n goto L_0x0069\n L_0x0059:\n r7 = 80\n goto L_0x0069\n L_0x005c:\n r7 = 64\n goto L_0x0069\n L_0x005f:\n r7 = 48\n goto L_0x0069\n L_0x0062:\n r7 = 32\n goto L_0x0069\n L_0x0065:\n r7 = 16\n goto L_0x0069\n L_0x0068:\n r7 = 0\n L_0x0069:\n if (r1 > r8) goto L_0x00db\n int r5 = r1 + 1\n char r1 = r6.charAt(r1)\n switch(r1) {\n case 48: goto L_0x00c8;\n case 49: goto L_0x00c5;\n case 50: goto L_0x00c2;\n case 51: goto L_0x00bf;\n case 52: goto L_0x00bc;\n case 53: goto L_0x00b9;\n case 54: goto L_0x00b6;\n case 55: goto L_0x00b3;\n case 56: goto L_0x00b0;\n case 57: goto L_0x00ad;\n default: goto L_0x0074;\n }\n L_0x0074:\n switch(r1) {\n case 65: goto L_0x00aa;\n case 66: goto L_0x00a7;\n case 67: goto L_0x00a4;\n case 68: goto L_0x00a1;\n case 69: goto L_0x009e;\n case 70: goto L_0x009b;\n default: goto L_0x0077;\n }\n L_0x0077:\n switch(r1) {\n case 97: goto L_0x00aa;\n case 98: goto L_0x00a7;\n case 99: goto L_0x00a4;\n case 100: goto L_0x00a1;\n case 101: goto L_0x009e;\n case 102: goto L_0x009b;\n default: goto L_0x007a;\n }\n L_0x007a:\n com.unboundid.ldap.sdk.LDAPException r7 = new com.unboundid.ldap.sdk.LDAPException\n com.unboundid.ldap.sdk.ResultCode r8 = com.unboundid.ldap.sdk.ResultCode.FILTER_ERROR\n com.unboundid.ldap.sdk.LDAPMessages r9 = com.unboundid.ldap.sdk.LDAPMessages.ERR_FILTER_INVALID_HEX_CHAR\n java.lang.Object[] r0 = new java.lang.Object[r2]\n int r5 = r5 - r4\n char r6 = r6.charAt(r5)\n java.lang.Character r6 = java.lang.Character.valueOf(r6)\n r0[r3] = r6\n java.lang.Integer r6 = java.lang.Integer.valueOf(r5)\n r0[r4] = r6\n java.lang.String r6 = r9.get(r0)\n r7.<init>((com.unboundid.ldap.sdk.ResultCode) r8, (java.lang.String) r6)\n throw r7\n L_0x009b:\n r7 = r7 | 15\n goto L_0x00c7\n L_0x009e:\n r7 = r7 | 14\n goto L_0x00c7\n L_0x00a1:\n r7 = r7 | 13\n goto L_0x00c7\n L_0x00a4:\n r7 = r7 | 12\n goto L_0x00c7\n L_0x00a7:\n r7 = r7 | 11\n goto L_0x00c7\n L_0x00aa:\n r7 = r7 | 10\n goto L_0x00c7\n L_0x00ad:\n r7 = r7 | 9\n goto L_0x00c7\n L_0x00b0:\n r7 = r7 | 8\n goto L_0x00c7\n L_0x00b3:\n r7 = r7 | 7\n goto L_0x00c7\n L_0x00b6:\n r7 = r7 | 6\n goto L_0x00c7\n L_0x00b9:\n r7 = r7 | 5\n goto L_0x00c7\n L_0x00bc:\n r7 = r7 | 4\n goto L_0x00c7\n L_0x00bf:\n r7 = r7 | 3\n goto L_0x00c7\n L_0x00c2:\n r7 = r7 | 2\n goto L_0x00c7\n L_0x00c5:\n r7 = r7 | 1\n L_0x00c7:\n byte r7 = (byte) r7\n L_0x00c8:\n r0.put(r7)\n if (r5 > r8) goto L_0x00d9\n char r7 = r6.charAt(r5)\n r1 = 92\n if (r7 != r1) goto L_0x00d9\n int r7 = r5 + 1\n goto L_0x0006\n L_0x00d9:\n r7 = r5\n goto L_0x00f6\n L_0x00db:\n com.unboundid.ldap.sdk.LDAPException r7 = new com.unboundid.ldap.sdk.LDAPException\n com.unboundid.ldap.sdk.ResultCode r8 = com.unboundid.ldap.sdk.ResultCode.FILTER_ERROR\n com.unboundid.ldap.sdk.LDAPMessages r9 = com.unboundid.ldap.sdk.LDAPMessages.ERR_FILTER_INVALID_ESCAPED_END_CHAR\n java.lang.Object[] r0 = new java.lang.Object[r4]\n int r1 = r1 - r4\n char r6 = r6.charAt(r1)\n java.lang.Character r6 = java.lang.Character.valueOf(r6)\n r0[r3] = r6\n java.lang.String r6 = r9.get(r0)\n r7.<init>((com.unboundid.ldap.sdk.ResultCode) r8, (java.lang.String) r6)\n throw r7\n L_0x00f6:\n r0.flip()\n int r6 = r0.limit()\n byte[] r6 = new byte[r6]\n r0.get(r6)\n java.lang.String r6 = com.unboundid.util.StaticUtils.toUTF8String(r6)\n r9.append(r6)\n return r7\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.unboundid.ldap.sdk.Filter.readEscapedHexString(java.lang.String, int, int, java.lang.StringBuilder):int\");\n }", "private static Text createOffset(int line) {\n String offset = Integer.toHexString(line * 16);\n StringBuilder stringBuilder = new StringBuilder();\n for (int j = 0; j < (8 - offset.length()); j++) {\n stringBuilder.append(0);\n }\n stringBuilder.append(offset).append(' ');\n Text result = new Text(stringBuilder.toString());\n //noinspection HardCodedStringLiteral\n result.getStyleClass().add(\"normal\");\n return result;\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.adjustBeginLineColumn(122, 122);\n int int0 = javaCharStream0.getBeginColumn();\n assertEquals(122, int0);\n }", "private String readStringUntil0x() throws IOException {\n String thisLine = \"\";\n int ch;\n while ((ch = ins.read()) != -1) {\n if (ch != 0x0) {\n thisLine = thisLine + String.valueOf((char) ch);\n } else {\n break;\n }\n }\n return thisLine;\n }", "@Override\n public String convertedText() {\n\n if (mHexInputEditText.length() != 0) {\n String hexCode = mHexInputEditText.getText().toString();\n StringBuilder hexCodeBuilder = new StringBuilder(\n mCheckBox.isChecked() ? hexCode.replaceAll(\" \", \"\") : hexCode);\n\n if (hexCodeBuilder.length() % 2 == 1) {\n hexCodeBuilder.append('0');\n }\n\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i < hexCodeBuilder.length(); i += 2) {\n try {\n stringBuilder.append((char) Integer.parseInt(\n hexCodeBuilder.substring(i, i + 2), 16));\n } catch (NumberFormatException e) {\n e.printStackTrace();\n stringBuilder.append(\"¿\");\n }\n }\n stringBuilder.trimToSize();\n return stringBuilder.toString();\n } else {\n return \"\";\n }\n }", "private static String padString(String source) {\r\n\r\n String paddedString = source;\r\n char paddingChar = ' ';\r\n int size = 16;\r\n int x = paddedString.length() % size;\r\n int padLength = size - x;\r\n for (int i = 0; i < padLength; i++) {\r\n paddedString += paddingChar;\r\n }\r\n\r\n return paddedString;\r\n }", "public int getHexWidth() {\n return this.hexWidth;\n }", "private boolean saveAttributePaddingByteValue(ModelTextField tField){\n\t\ttry{\n\t\t\tif(tField.getText().length()>0&&tField.getText().length()<=2){\n\t\t\t\tDataStore.getInstance().setPaddingByteValue(Integer.toHexString(Integer.parseInt(tField.getText(),16)));\n\t\t\t\ttField.setColor(ColorStore.getInstance().getColorInputBackground(), ColorStore.getInstance().getColorInputBackgroundGradient());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}catch(Exception e){}\n\t\ttField.setColor(ColorStore.getInstance().getColorError(), ColorStore.getInstance().getColorError());\n\t\ttField.repaint();\n\t\treturn true;\n\t}", "private void createLeftOver() {\n/* 332 */ int lineLengthBytes = this.currentLastBytePos + 1;\n/* 333 */ if (lineLengthBytes > 0) {\n/* */ \n/* 335 */ this.leftOver = new byte[lineLengthBytes];\n/* 336 */ System.arraycopy(this.data, 0, this.leftOver, 0, lineLengthBytes);\n/* */ } else {\n/* 338 */ this.leftOver = null;\n/* */ } \n/* 340 */ this.currentLastBytePos = -1;\n/* */ }", "private static String readNullPaddedString(ByteBuffer data, int length) {\n byte[] bytes = new byte[length];\n data.get(bytes);\n int stringLength = bytes.length - 1;\n while (stringLength > 0 && bytes[stringLength] == 0) {\n stringLength--;\n }\n return new String(bytes, 0, stringLength+1, Charset.forName(\"utf-8\"));\n }", "public APSixNumberPwdInputBox(android.content.Context r4, android.util.AttributeSet r5) {\n /*\n r3 = this;\n r3.<init>(r4, r5)\n java.util.HashMap r0 = new java.util.HashMap\n r0.<init>()\n r3.d = r0\n r0 = 0\n r3.e = r0\n r0 = 16\n r3.h = r0\n java.lang.String r1 = \"\"\n r3.j = r1\n java.lang.String r1 = \"\"\n r3.k = r1\n r3.a(r4)\n r1 = 0\n int[] r2 = com.ali.user.mobile.security.ui.R.styleable.R // Catch:{ Exception -> 0x003b, all -> 0x0033 }\n android.content.res.TypedArray r4 = r4.obtainStyledAttributes(r5, r2) // Catch:{ Exception -> 0x003b, all -> 0x0033 }\n int r5 = com.ali.user.mobile.security.ui.R.styleable.S // Catch:{ Exception -> 0x003c, all -> 0x0031 }\n int r5 = r4.getInt(r5, r0) // Catch:{ Exception -> 0x003c, all -> 0x0031 }\n r3.h = r5 // Catch:{ Exception -> 0x003c, all -> 0x0031 }\n if (r4 == 0) goto L_0x0042\n r4.recycle()\n return\n L_0x0031:\n r5 = move-exception\n goto L_0x0035\n L_0x0033:\n r5 = move-exception\n r4 = r1\n L_0x0035:\n if (r4 == 0) goto L_0x003a\n r4.recycle()\n L_0x003a:\n throw r5\n L_0x003b:\n r4 = r1\n L_0x003c:\n if (r4 == 0) goto L_0x0042\n r4.recycle()\n return\n L_0x0042:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ali.user.mobile.ui.widget.APSixNumberPwdInputBox.<init>(android.content.Context, android.util.AttributeSet):void\");\n }", "private static String\n parseHexPair(ParseState state, boolean allowEmpty)\n throws ParseException\n {\n String result = \"\";\n if(state.pos < state.data.length() && hexvalid.indexOf(state.data.charAt(state.pos)) != -1)\n {\n result += state.data.charAt(state.pos);\n ++state.pos;\n }\n if(state.pos < state.data.length() && hexvalid.indexOf(state.data.charAt(state.pos)) != -1)\n {\n result += state.data.charAt(state.pos);\n ++state.pos;\n }\n if(result.length() != 2)\n {\n if(allowEmpty && result.length() == 0)\n {\n return result;\n }\n throw new ParseException(\"invalid hex format\");\n }\n return result;\n }", "public AES (String currentLine) \n\t{\n\t\tint cursor = currentLine.length();\n\t\tint[][] currentState = new int[4][4];\n\t\tfor(int row = 0; row < currentState.length; row++)\n\t\t{\n\t\t\tfor(int col = 0; col < currentState[row].length; col++)\n\t\t\t{\n\t\t\t\tString pair = currentLine.substring(cursor-2, cursor);\n\t\t\t\tint pairHex = Integer.valueOf(pair, 16);\n\t\t\t\tcurrentState[row][col] = pairHex;\n\t\t\t\tcursor = cursor-2;\n\t\t\t}\n\t\t}\n\t\tprintTranspose(currentState, true, true);\n\t}", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(416);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn(416, 416);\n assertEquals(3680, javaCharStream0.bufpos);\n }", "public org.apache.xmlbeans.XmlString xgetCellpadding()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(CELLPADDING$30);\n return target;\n }\n }", "private boolean hex() {\r\n return ALT(GO() && decimal() || OK() && SET(\"ABCDEFabcdef\"));\r\n }", "java.lang.String getField1305();", "public FixedDataEditorPanel( int hexLength )\n {\n super( \"Device Parameters\", \"Fixed data\", \"Enter the default fixed data for this protocol, in hex.\",\n \"Enter the default fixed data below.\", hexLength );\n }", "private String pad(String s, int l){ String p=\"\"; for(int i=0; i<l-s.length();i++)p+=\" \"; return \" \"+p+s; }", "private void _setUnshifted ()\r\n {\r\n m_bBase64mode = false;\r\n m_nBitsRead = 0;\r\n m_nTempChar = 0;\r\n }", "public FormatInteger blankFill(){\n fillCharacter = BLANK_CHAR;\n return this;\n }", "@Override\n public String convertedText() {\n\n String input = mStringInputEditText.getText().toString();\n if (input.length() != 0) {\n String hexCode = String.format(\"%x\", new BigInteger(1, input.getBytes()));\n return mCheckBox.isChecked() ? hexCode.replaceAll(\"..(?!$)\", \"$0 \") : hexCode;\n } else {\n return \"\";\n }\n }", "private byte[] getPadded(byte[] bytes) {\n\t\tbyte[] padded = new byte[20];\n\t\tpadded[16] = 0; // right pad\n\t\tpadded[17] = 0; // right pad\n\t\tpadded[18] = 0; // right pad\n\t\tpadded[19] = 0; // right pad\n\t\tSystem.arraycopy(bytes, 0, padded, 0, 16);\n\t\treturn padded;\n\t}", "public java.lang.String getCellpadding()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CELLPADDING$30);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "private CharSequence getNewTextByConfig(){\n if(TextUtils.isEmpty(mOrigText)){\n return mOrigText;\n }\n\n mLayout = getLayout();\n if(mLayout != null){\n mLayoutWidth = mLayout.getWidth();\n }\n\n if(mLayoutWidth <= 0){\n if(getWidth() == 0) {\n if (mFutureTextViewWidth == 0) {\n return mOrigText;\n } else {\n mLayoutWidth = mFutureTextViewWidth - getPaddingLeft() - getPaddingRight();\n }\n }else{\n mLayoutWidth = getWidth() - getPaddingLeft() - getPaddingRight();\n }\n }\n\n mTextPaint = getPaint();\n\n mTextLineCount = -1;\n switch (mCurrState){\n case STATE_SHRINK: {\n mLayout = new DynamicLayout(mOrigText, mTextPaint, mLayoutWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);\n mTextLineCount = mLayout.getLineCount();\n\n if (mTextLineCount <= mMaxLinesOnShrink) {\n return mOrigText;\n }\n int indexEnd = getValidLayout().getLineEnd(mMaxLinesOnShrink - 1);\n int indexStart = getValidLayout().getLineStart(mMaxLinesOnShrink - 1);\n int indexEndTrimmed = indexEnd\n - getLengthOfString(mEllipsisHint)\n - (mShowToExpandHint ? getLengthOfString(mToExpandHint) + getLengthOfString(mGapToExpandHint) : 0);\n\n if (indexEndTrimmed <= indexStart) {\n indexEndTrimmed = indexEnd;\n }\n\n int remainWidth = getValidLayout().getWidth() -\n (int) (mTextPaint.measureText(mOrigText.subSequence(indexStart, indexEndTrimmed).toString()) + 0.5);\n float widthTailReplaced = mTextPaint.measureText(getContentOfString(mEllipsisHint)\n + (mShowToExpandHint ? (getContentOfString(mToExpandHint) + getContentOfString(mGapToExpandHint)) : \"\"));\n\n int indexEndTrimmedRevised = indexEndTrimmed;\n if (remainWidth > widthTailReplaced) {\n int extraOffset = 0;\n int extraWidth = 0;\n while (remainWidth > widthTailReplaced + extraWidth) {\n extraOffset++;\n if (indexEndTrimmed + extraOffset <= mOrigText.length()) {\n extraWidth = (int) (mTextPaint.measureText(\n mOrigText.subSequence(indexEndTrimmed, indexEndTrimmed + extraOffset).toString()) + 0.5);\n } else {\n break;\n }\n }\n indexEndTrimmedRevised += extraOffset - 1;\n } else {\n int extraOffset = 0;\n int extraWidth = 0;\n while (remainWidth + extraWidth < widthTailReplaced) {\n extraOffset--;\n if (indexEndTrimmed + extraOffset > indexStart) {\n extraWidth = (int) (mTextPaint.measureText(mOrigText.subSequence(indexEndTrimmed + extraOffset, indexEndTrimmed).toString()) + 0.5);\n } else {\n break;\n }\n }\n indexEndTrimmedRevised += extraOffset;\n }\n\n String fixText = removeEndLineBreak(mOrigText.subSequence(0, indexEndTrimmedRevised));\n SpannableStringBuilder ssbShrink = new SpannableStringBuilder(fixText)\n .append(mEllipsisHint);\n if (mShowToExpandHint) {\n ssbShrink.append(getContentOfString(mGapToExpandHint) + getContentOfString(mToExpandHint));\n ssbShrink.setSpan(mTouchableSpan, ssbShrink.length() - getLengthOfString(mToExpandHint), ssbShrink.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n }\n return ssbShrink;\n }\n case STATE_EXPAND: {\n if (!mShowToShrinkHint) {\n return mOrigText;\n }\n mLayout = new DynamicLayout(mOrigText, mTextPaint, mLayoutWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);\n mTextLineCount = mLayout.getLineCount();\n\n if (mTextLineCount <= mMaxLinesOnShrink) {\n return mOrigText;\n }\n\n SpannableStringBuilder ssbExpand = new SpannableStringBuilder(mOrigText)\n .append(mGapToShrinkHint).append(mToShrinkHint);\n ssbExpand.setSpan(mTouchableSpan, ssbExpand.length() - getLengthOfString(mToShrinkHint), ssbExpand.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n return ssbExpand;\n }\n }\n return mOrigText;\n }", "private void prepareLine(int line){\n int length = mText.getColumnCount(line);\n if(length >= mChars.length){\n mChars = new char[length + 100];\n }\n for(int i = 0;i < length;i++){\n mChars[i] = mText.charAt(line, i);\n }\n }", "public int getHexHeight() {\n return this.hexHeight;\n }", "void padTrueAndRef() {\n int maxLen = Math.max(trueTo.length(), ref.length());\n trueTo = pad(trueTo, maxLen);\n ref = pad(ref, maxLen);\n }", "private String createDashedLine(){\n return \"- \".repeat(Math.max(0, this.columns));\n }", "public final void mo1308a() {\n int i = this.f2309d;\n int i2 = i != Integer.MIN_VALUE ? i + this.f2308c : this.f2307b;\n this.f2309d = i2;\n String str = this.f2306a;\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 11);\n sb.append(str);\n sb.append(i2);\n this.f2310e = sb.toString();\n }", "private String readLine() throws IOException {\n/* 276 */ String line = null;\n/* */ \n/* */ \n/* 279 */ boolean isLastFilePart = (this.no == 1L);\n/* */ \n/* 281 */ int i = this.currentLastBytePos;\n/* 282 */ while (i > -1) {\n/* */ \n/* 284 */ if (!isLastFilePart && i < ReversedLinesFileReader.this.avoidNewlineSplitBufferSize) {\n/* */ \n/* */ \n/* 287 */ createLeftOver();\n/* */ \n/* */ break;\n/* */ } \n/* */ int newLineMatchByteCount;\n/* 292 */ if ((newLineMatchByteCount = getNewLineMatchByteCount(this.data, i)) > 0) {\n/* 293 */ int lineStart = i + 1;\n/* 294 */ int lineLengthBytes = this.currentLastBytePos - lineStart + 1;\n/* */ \n/* 296 */ if (lineLengthBytes < 0) {\n/* 297 */ throw new IllegalStateException(\"Unexpected negative line length=\" + lineLengthBytes);\n/* */ }\n/* 299 */ byte[] lineData = new byte[lineLengthBytes];\n/* 300 */ System.arraycopy(this.data, lineStart, lineData, 0, lineLengthBytes);\n/* */ \n/* 302 */ line = new String(lineData, ReversedLinesFileReader.this.encoding);\n/* */ \n/* 304 */ this.currentLastBytePos = i - newLineMatchByteCount;\n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* 309 */ i -= ReversedLinesFileReader.this.byteDecrement;\n/* */ \n/* */ \n/* 312 */ if (i < 0) {\n/* 313 */ createLeftOver();\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* */ \n/* 319 */ if (isLastFilePart && this.leftOver != null) {\n/* */ \n/* 321 */ line = new String(this.leftOver, ReversedLinesFileReader.this.encoding);\n/* 322 */ this.leftOver = null;\n/* */ } \n/* */ \n/* 325 */ return line;\n/* */ }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals((-2818), int0);\n }", "private static char[] m3268z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 18);\n }\n return toCharArray;\n }", "public ColumnOutput setPad() throws IOException {\r\n\t\t\r\n\t\tStringBuilder p = new StringBuilder((getWidth() == UnlimitedWidth)?b.length():getWidth());\r\n\t\tsendToOutput(p);\r\n\t\tpad = p.toString().subSequence(0, p.length());\r\n\t\t\r\n\t\treturn this;\r\n\t}", "private void readHex(PeekReader reader, StringBuilder sb) {\n int x = 0;\n for (; ; ) {\n int ch = reader.peekChar();\n\n if (!range(ch, '0', '9') && !range(ch, 'a', 'f') && !range(ch, 'A', 'F')) break;\n reader.readChar();\n sb.append((char) ch);\n x++;\n }\n if (x == 0) exception(\"No hex characters after \" + sb.toString());\n }", "java.lang.String getField1072();", "private void updateInternalState()\n {\n m_isCodePointHiragana_ = false;\n m_buffer_.setLength(0);\n m_bufferOffset_ = -1;\n m_CEBufferOffset_ = 0;\n m_CEBufferSize_ = 0;\n m_FCDLimit_ = -1;\n m_FCDStart_ = m_source_.getLength();\n //m_isHiragana4_ = m_collator_.m_isHiragana4_;\n m_isForwards_ = true;\n }", "private static int[] internal16Readin(String name) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(FileUtils.getResourceInputStream(\"/luts/\" + name)));\n String strLine;\n\n int[] intArray = new int[65536];\n int counter = 0;\n while ((strLine = br.readLine()) != null) {\n\n String[] array = strLine.split(\" \");\n\n for (int i = 0; i < array.length; i++) {\n if (array[i].equals(\" \") || array[i].equals(\"\")) {\n\n } else {\n intArray[counter] = Integer.parseInt(array[i]);\n counter++;\n }\n }\n }\n br.close();\n return intArray;\n } catch (Exception e) {// Catch exception if any\n System.err.println(\"Error open internal color table \" + name);\n e.printStackTrace();\n return null;\n }\n }", "int getPadding();", "private String LeftPad(String str, int length)\n {\n //pad and return String\n return String.format(\"%1$\" + length + \"s\", str);\n }", "@Override\r\n public void afterTextChanged(Editable s) {\n int astart = value4.getSelectionStart();\r\n int aend = value4.getSelectionEnd();\r\n\r\n String FieldValue = s.toString().toUpperCase();\r\n\r\n if (Helper.checkDataHexa(FieldValue) == false) {\r\n value4.setTextKeepState(Helper.checkAndChangeDataHexa(FieldValue));\r\n value4.setSelection(astart - 1, aend - 1);\r\n } else\r\n value4.setSelection(astart, aend);\r\n\r\n if (value4.getText().length() > 0 && value4.getText().length() < 2) {\r\n value4.setTextColor(0xffff0000); //RED color\r\n buttonPresentPassword.setClickable(false);\r\n buttonWritePassword.setClickable(false);\r\n Value4Enable = false;\r\n } else {\r\n value4.setTextColor(0xff000000); //BLACK color\r\n Value4Enable = true;\r\n if (Value1Enable == true &&\r\n Value2Enable == true &&\r\n Value3Enable == true &&\r\n Value4Enable == true) {\r\n buttonPresentPassword.setClickable(true);\r\n buttonWritePassword.setClickable(true);\r\n }\r\n }\r\n\r\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1225, 754, 1225);\n javaCharStream0.backup(1);\n javaCharStream0.adjustBeginLineColumn(1, (-1));\n int int0 = javaCharStream0.getColumn();\n assertEquals(1223, javaCharStream0.bufpos);\n assertEquals((-1), int0);\n }", "private char[] readPassword(InputStream in) throws IOException {\n char[] lineBuffer;\n char[] buf;\n int i;\n\n buf = lineBuffer = new char[128];\n\n int room = buf.length;\n int offset = 0;\n int c;\n\n loop:\n while (true) {\n switch (c = in.read()) {\n case -1:\n case '\\n':\n break loop;\n\n case '\\r':\n int c2 = in.read();\n if ((c2 != '\\n') && (c2 != -1)) {\n if (!(in instanceof PushbackInputStream)) {\n in = new PushbackInputStream(in);\n }\n ((PushbackInputStream)in).unread(c2);\n } else\n break loop;\n\n default:\n if (--room < 0) {\n buf = new char[offset + 128];\n room = buf.length - offset - 1;\n System.arraycopy(lineBuffer, 0, buf, 0, offset);\n Arrays.fill(lineBuffer, ' ');\n lineBuffer = buf;\n }\n buf[offset++] = (char) c;\n break;\n }\n }\n\n if (offset == 0) {\n return null;\n }\n\n password = new char[offset];\n System.arraycopy(buf, 0, password, 0, offset);\n Arrays.fill(buf, ' ');\n cleared = false;\n \n return password;\n }", "private String buildLine(int i){\n String line;\n int j;\n line = new String();\n\n for (j = i; j < i + 8; j++){\n line = line + Tools.pad(Integer.toHexString(memory[j]), 8, \n \"0\", Direction.RIGHT) + \" \";\n }\n return line;\n }", "private static String pad(String src, char fill, int length, boolean isPadRight) {\n\t\tif (src == null) src = \"\"; \n\t\tStringBuilder sb = new StringBuilder();\n\t\tint startLoc = length - src.length();\n\n\t\tint stringLen = src.length();\n\t\tif (stringLen > length) stringLen = length;\n\t\tif (isPadRight) sb.append(src.substring(0, stringLen));\n\t\tfor (int i = 0; i < startLoc; i++) {\n\t\t\tsb.append(fill);\n\t\t}\n\t\t\n\t\tif (! isPadRight)sb.append(src.substring(0, stringLen));\n\n\t\treturn sb.toString();\n\t}", "public java.lang.String readLine() {\n /*\n r7 = this;\n r0 = r7.in;\n monitor-enter(r0);\n r1 = r7.buf;\t Catch:{ all -> 0x0097 }\n if (r1 != 0) goto L_0x000f;\n L_0x0007:\n r1 = new java.io.IOException;\t Catch:{ all -> 0x0097 }\n r2 = \"LineReader is closed\";\n r1.<init>(r2);\t Catch:{ all -> 0x0097 }\n throw r1;\t Catch:{ all -> 0x0097 }\n L_0x000f:\n r1 = r7.pos;\t Catch:{ all -> 0x0097 }\n r2 = r7.end;\t Catch:{ all -> 0x0097 }\n if (r1 < r2) goto L_0x0018;\n L_0x0015:\n r7.aOB();\t Catch:{ all -> 0x0097 }\n L_0x0018:\n r1 = r7.pos;\t Catch:{ all -> 0x0097 }\n L_0x001a:\n r2 = r7.end;\t Catch:{ all -> 0x0097 }\n r3 = 10;\n if (r1 == r2) goto L_0x0051;\n L_0x0020:\n r2 = r7.buf;\t Catch:{ all -> 0x0097 }\n r2 = r2[r1];\t Catch:{ all -> 0x0097 }\n if (r2 != r3) goto L_0x004e;\n L_0x0026:\n r2 = r7.pos;\t Catch:{ all -> 0x0097 }\n if (r1 == r2) goto L_0x0035;\n L_0x002a:\n r2 = r7.buf;\t Catch:{ all -> 0x0097 }\n r3 = r1 + -1;\n r2 = r2[r3];\t Catch:{ all -> 0x0097 }\n r4 = 13;\n if (r2 != r4) goto L_0x0035;\n L_0x0034:\n goto L_0x0036;\n L_0x0035:\n r3 = r1;\n L_0x0036:\n r2 = new java.lang.String;\t Catch:{ all -> 0x0097 }\n r4 = r7.buf;\t Catch:{ all -> 0x0097 }\n r5 = r7.pos;\t Catch:{ all -> 0x0097 }\n r6 = r7.pos;\t Catch:{ all -> 0x0097 }\n r3 = r3 - r6;\n r6 = r7.charset;\t Catch:{ all -> 0x0097 }\n r6 = r6.name();\t Catch:{ all -> 0x0097 }\n r2.<init>(r4, r5, r3, r6);\t Catch:{ all -> 0x0097 }\n r1 = r1 + 1;\n r7.pos = r1;\t Catch:{ all -> 0x0097 }\n monitor-exit(r0);\t Catch:{ all -> 0x0097 }\n return r2;\n L_0x004e:\n r1 = r1 + 1;\n goto L_0x001a;\n L_0x0051:\n r1 = new com.a.a.b$1;\t Catch:{ all -> 0x0097 }\n r2 = r7.end;\t Catch:{ all -> 0x0097 }\n r4 = r7.pos;\t Catch:{ all -> 0x0097 }\n r2 = r2 - r4;\n r2 = r2 + 80;\n r1.<init>(r2);\t Catch:{ all -> 0x0097 }\n L_0x005d:\n r2 = r7.buf;\t Catch:{ all -> 0x0097 }\n r4 = r7.pos;\t Catch:{ all -> 0x0097 }\n r5 = r7.end;\t Catch:{ all -> 0x0097 }\n r6 = r7.pos;\t Catch:{ all -> 0x0097 }\n r5 = r5 - r6;\n r1.write(r2, r4, r5);\t Catch:{ all -> 0x0097 }\n r2 = -1;\n r7.end = r2;\t Catch:{ all -> 0x0097 }\n r7.aOB();\t Catch:{ all -> 0x0097 }\n r2 = r7.pos;\t Catch:{ all -> 0x0097 }\n L_0x0071:\n r4 = r7.end;\t Catch:{ all -> 0x0097 }\n if (r2 == r4) goto L_0x005d;\n L_0x0075:\n r4 = r7.buf;\t Catch:{ all -> 0x0097 }\n r4 = r4[r2];\t Catch:{ all -> 0x0097 }\n if (r4 != r3) goto L_0x0094;\n L_0x007b:\n r3 = r7.pos;\t Catch:{ all -> 0x0097 }\n if (r2 == r3) goto L_0x008a;\n L_0x007f:\n r3 = r7.buf;\t Catch:{ all -> 0x0097 }\n r4 = r7.pos;\t Catch:{ all -> 0x0097 }\n r5 = r7.pos;\t Catch:{ all -> 0x0097 }\n r5 = r2 - r5;\n r1.write(r3, r4, r5);\t Catch:{ all -> 0x0097 }\n L_0x008a:\n r2 = r2 + 1;\n r7.pos = r2;\t Catch:{ all -> 0x0097 }\n r1 = r1.toString();\t Catch:{ all -> 0x0097 }\n monitor-exit(r0);\t Catch:{ all -> 0x0097 }\n return r1;\n L_0x0094:\n r2 = r2 + 1;\n goto L_0x0071;\n L_0x0097:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x0097 }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.a.a.b.readLine():java.lang.String\");\n }", "public int getScanlineLength();", "public static String getCorrectHexValue(int inp) {\n String hx = Integer.toHexString((char)inp);\n\n if (hx.length() == 0)\n return \"00\";\n else if (hx.length() == 1)\n return \"0\" + hx;\n else if (hx.length() == 2)\n return hx;\n else if (hx.length() == 4)\n return hx.substring(2);\n else {\n System.out.println(\"Hex Error: \" + inp);\n }\n\n return null;\n }", "String validateAlignment() {\n\t\treturn null;\n\t}", "private RowKeyFormat2 badHashSizeRowKeyFormat() {\n // components of the row key\n ArrayList<RowKeyComponent> components = new ArrayList<RowKeyComponent>();\n components.add(RowKeyComponent.newBuilder()\n .setName(\"NAME\").setType(ComponentType.STRING).build());\n\n HashSpec hs = HashSpec.newBuilder()\n .setHashSize(20).build();\n\n // build the row key format\n RowKeyFormat2 format = RowKeyFormat2.newBuilder().setEncoding(RowKeyEncoding.FORMATTED)\n .setSalt(hs)\n .setRangeScanStartIndex(1)\n .setComponents(components)\n .build();\n\n return format;\n }", "@Test(timeout = 4000)\n public void test000() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.adjustBeginLineColumn((-1), 4093);\n assertEquals(4093, javaCharStream0.getBeginColumn());\n }", "@Override\r\n public void afterTextChanged(Editable s) {\n int astart = value1.getSelectionStart();\r\n int aend = value1.getSelectionEnd();\r\n\r\n String FieldValue = s.toString().toUpperCase();\r\n\r\n if (Helper.checkDataHexa(FieldValue) == false) {\r\n value1.setTextKeepState(Helper.checkAndChangeDataHexa(FieldValue));\r\n value1.setSelection(astart - 1, aend - 1);\r\n } else\r\n value1.setSelection(astart, aend);\r\n\r\n if (value1.getText().length() > 0 && value1.getText().length() < 2) {\r\n value1.setTextColor(0xffff0000); //RED color\r\n buttonPresentPassword.setClickable(false);\r\n buttonWritePassword.setClickable(false);\r\n Value1Enable = false;\r\n } else {\r\n value1.setTextColor(0xff000000); //BLACK color\r\n Value1Enable = true;\r\n if (Value1Enable == true &&\r\n Value2Enable == true &&\r\n Value3Enable == true &&\r\n Value4Enable == true) {\r\n buttonPresentPassword.setClickable(true);\r\n buttonWritePassword.setClickable(true);\r\n }\r\n\r\n }\r\n\r\n }", "private String mask(int length) {\n StringBuilder sb = new StringBuilder(length);\n for (int i = 0; i < length; i++) {\n sb.append('\\u25CF');\n }\n return new String(sb);\n }", "public static String fill3(String valueStr) {\n\t\t\r\n\t\tif (valueStr.length()==1) return valueStr+\"00\";\r\n\t\tif (valueStr.length()==2) return valueStr+\"0\";\r\n\t\t//if (valueStr.length()==6) return valueStr+\"00000\";\r\n\t\t\r\n\t\treturn valueStr;\r\n\t}", "@Override\n\t\tpublic char[] getPrintChars() {\n\t\t\tif(this.color == RedBlackTree.BLACK){\n\t\t\t\tString intString = data.toString()+\"(B)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tString intString = data.toString()+\"(R)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t}\n\t\t\t\n\t\t}", "java.lang.String getField1672();", "private static final String padding(String body, int lengthLimit) {\n\t\tint length = body.length();\n\t\tfinal int length2pad = lengthLimit - length - LAST_TWO_BITS_INDICATOR;\n\n\t\tif(length2pad <= 0){\n\t\t\treturn body;\n\t\t}\n\t\t\n\t\tint rest2pad = length2pad;\n\n\t\tString padHead = \"\";\n\t\tif (length2pad > length) {\n\t\t\tint gap = length2pad - length;\n\n\t\t\twhile (gap > 0) {\n\t\t\t\tpadHead += '8';\n\t\t\t\t--gap;\n\t\t\t}\n\t\t\trest2pad = length;\n\t\t}\n\t\tfor (int i = 0; i < rest2pad; i++) {\n\t\t\tpadHead += body.charAt(length - i - 1);\n\t\t}\n\n\t\tString newPadHead = '8' + padHead.substring(1);\n\t\tString twoBitsIndicator = \"\";\n\t\tif (length2pad <= 9) {\n\t\t\ttwoBitsIndicator = '0' + String.valueOf(length2pad);\n\t\t} else {\n\t\t\ttwoBitsIndicator = String.valueOf(length2pad);\n\t\t}\n\n\t\tString last = newPadHead + body + twoBitsIndicator;\n\t\treturn last;\n\t}", "protected Convention.Key getBlankLinesAfterKey()\n {\n return ConventionKeys.BLANK_LINES_AFTER_HEADER;\n }", "private static char[] m619z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 20);\n }\n return toCharArray;\n }", "private int getShulkerBoxExcess(String line) {\n line = line.replaceAll(\"[^0-9]\",\"\");\n if (line.isEmpty()) {\n line = \"0\";\n }\n return Integer.valueOf(line);\n }", "@Override\n public String toString() {\n String result = \"\";\n\n for (int position = 0; position < 64; position++) {\n if (position > 0) {\n if (position % 16 == 0) { // New level\n result += '|';\n } else if (position % 4 == 0) {\n result += ' '; // New row\n }\n }\n result += get(position);\n }\n return result;\n }", "protected AccountingLineTableCell createPaddingCell() {\n AccountingLineTableCell cell = new AccountingLineTableCell();\n cell.setColSpan(2);\n cell.setNeverEmpty(true);\n return cell;\n }", "public static int offset_reading() {\n return (32 / 8);\n }", "public String memoryDisplayHex()\n {\n int pos = startingPos;\n String ret = \"\";\n while(pos <= endingPos)\n {\n String instruction = mem.getFourBytes(pos);\n ret += \"0x\"+Integer.toHexString(pos) + \": \" + instruction.substring(0,4) + \" \" + instruction.substring(4,8)+\"\\n\";\n pos += 4;\n }\n return ret;\n }", "protected ReaderContext<FSDataInputStream> createFixedWidthReaderContext()\n {\n ReaderContext.FixedBytesReaderContext<FSDataInputStream> fixedBytesReaderContext = new ReaderContext.FixedBytesReaderContext<FSDataInputStream>();\n fixedBytesReaderContext.setLength(recordLength);\n return fixedBytesReaderContext;\n\n }", "@Override\n public Character next() {\n int charValue;\n if (linePos >= LINE_LEN) {\n charValue = CARRIAGE_RETURN;\n asciiBase = 0;\n linePos = -2;\n lines++;\n // Skips lines starting with alphanumeric characters to preserve formatting\n while (Character.isLetterOrDigit((char)(lines % ASCII_RANGE) + ASCII_START)) {\n lines++;\n }\n }\n else if (linePos < 0) {\n charValue = LINE_FEED;\n }\n else {\n charValue = ((asciiBase + linePos + lines) % ASCII_RANGE) + ASCII_START;\n while (Character.isLetterOrDigit((char)charValue)) {\n asciiBase++;\n charValue = ((asciiBase + linePos + lines) % ASCII_RANGE) + ASCII_START;\n }\n itemsToSend--;\n }\n linePos++;\n return new Character((char) charValue);\n }", "@Override\r\n public void afterTextChanged(Editable s) {\n int astart = value2.getSelectionStart();\r\n int aend = value2.getSelectionEnd();\r\n\r\n String FieldValue = s.toString().toUpperCase();\r\n\r\n if (Helper.checkDataHexa(FieldValue) == false) {\r\n value2.setTextKeepState(Helper.checkAndChangeDataHexa(FieldValue));\r\n value2.setSelection(astart - 1, aend - 1);\r\n } else\r\n value2.setSelection(astart, aend);\r\n\r\n if (value2.getText().length() > 0 && value2.getText().length() < 2) {\r\n value2.setTextColor(0xffff0000); //RED color\r\n buttonPresentPassword.setClickable(false);\r\n buttonWritePassword.setClickable(false);\r\n Value2Enable = false;\r\n } else {\r\n value2.setTextColor(0xff000000); //BLACK color\r\n Value2Enable = true;\r\n if (Value1Enable == true &&\r\n Value2Enable == true &&\r\n Value3Enable == true &&\r\n Value4Enable == true) {\r\n buttonPresentPassword.setClickable(true);\r\n buttonWritePassword.setClickable(true);\r\n }\r\n }\r\n\r\n }", "public static boolean initLine(String content) {\r\n\t\tString format = \"00000000000000\";\r\n\t\t\r\n\t\tint address = Integer.valueOf(memAddr.substring(0, memAddr.length() - 2), 2);\r\n\t\tgetBank(memAddr)[address] = content;\r\n\t\tmemAddr = Integer.toBinaryString(Integer.valueOf(memAddr, 2) + 1);\r\n\t\tmemAddr = format.substring(0, format.length() - memAddr.length()) + memAddr;\r\n\t\treturn true;\r\n\t}", "@Override\r\n public void afterTextChanged(Editable s) {\n int astart = value3.getSelectionStart();\r\n int aend = value3.getSelectionEnd();\r\n\r\n String FieldValue = s.toString().toUpperCase();\r\n\r\n if (Helper.checkDataHexa(FieldValue) == false) {\r\n value3.setTextKeepState(Helper.checkAndChangeDataHexa(FieldValue));\r\n value3.setSelection(astart - 1, aend - 1);\r\n } else\r\n value3.setSelection(astart, aend);\r\n\r\n if (value3.getText().length() > 0 && value3.getText().length() < 2) {\r\n value3.setTextColor(0xffff0000); //RED color\r\n buttonPresentPassword.setClickable(false);\r\n buttonWritePassword.setClickable(false);\r\n Value3Enable = false;\r\n } else {\r\n value3.setTextColor(0xff000000); //BLACK color\r\n Value3Enable = true;\r\n if (Value1Enable == true &&\r\n Value2Enable == true &&\r\n Value3Enable == true &&\r\n Value4Enable == true) {\r\n buttonPresentPassword.setClickable(true);\r\n buttonWritePassword.setClickable(true);\r\n }\r\n }\r\n\r\n }", "private final void m118784a(Context context) {\n setKeyListener(DigitsKeyListener.getInstance(\"1234567890 \"));\n setSingleLine();\n m118789x();\n int i = Build.VERSION.SDK_INT;\n setTextDirection(3);\n mo71915a(this.f152275t);\n mo71925b(new bkhk(this));\n String string = context.getString(C0126R.string.wallet_uic_error_card_number_invalid);\n mo71925b(new bkhl(this, string));\n mo65972a((bkgj) new bkhm(this, string));\n int[] iArr = {C0126R.attr.uicInvalidCardNumberShakeAnimationEnabled, C0126R.attr.uicShowCardDropDownAfterDelay};\n Arrays.sort(iArr);\n TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(iArr);\n this.f152261f = obtainStyledAttributes.getBoolean(Arrays.binarySearch(iArr, (int) C0126R.attr.uicInvalidCardNumberShakeAnimationEnabled), false);\n this.f152262g = obtainStyledAttributes.getBoolean(Arrays.binarySearch(iArr, (int) C0126R.attr.uicShowCardDropDownAfterDelay), false);\n obtainStyledAttributes.recycle();\n }", "private String digestGameBoard() {\n StringBuilder config = new StringBuilder();\n for(char[] gameBoardRow : gameBoard) {\n for(char slot : gameBoardRow) {\n config.append(slot);\n }\n }\n return config.toString();\n }", "private String readFixedString(int size, DataInput in) throws IOException\n { \n var b = new StringBuilder(size);\n int i = 0;\n var done = false;\n while (!done && i < size)\n { \n char ch = in.readChar();\n i++;\n if (ch == 0) {\n done = true;\n }\n else {\n b.append(ch);\n }\n }\n \n in.skipBytes(2 * (size - i));\n return b.toString();\n }", "private String trim(StringBuilder formattedString) {\n int maxWidth;\n int cols = consoleMetaData.getCols();\n if (cols > 0) {\n maxWidth = cols - 1;\n } else {\n // Assume 80 wide. This is to minimize wrapping on console where we don't know the width (eg mintty)\n // It's not intended to be a correct solution, simply a work around\n maxWidth = 79;\n }\n if (maxWidth < formattedString.length()) {\n return formattedString.substring(0, maxWidth);\n }\n return formattedString.toString();\n }", "public int getPadding() {\n\n int len = getTrueSize() % 2880;\n\n if (len == 0) {\n return 0;\n }\n\n return 2880 - len;\n }", "public void ignorableWhitespace(byte[] data, int start, int length) {\n crc.update(data, start, length);\n }", "public static int offsetBits_reading() {\n return 32;\n }", "private byte m1655h() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 <= 0) {\n break;\n }\n CharSequence charSequence = this.f2516a;\n int i3 = i2 - 1;\n this.f2519d = i3;\n char charAt2 = charSequence.charAt(i3);\n this.f2520e = charAt2;\n if (charAt2 == '<') {\n return 12;\n }\n if (charAt2 == '>') {\n break;\n } else if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i4 = this.f2519d;\n if (i4 <= 0) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n int i5 = i4 - 1;\n this.f2519d = i5;\n charAt = charSequence2.charAt(i5);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n }\n this.f2519d = i;\n this.f2520e = '>';\n return 13;\n }", "public java.lang.String getZLF() {\r\n return localZLF;\r\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q|ni.,qQXS\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 10, 754);\n javaCharStream0.adjustBeginLineColumn(754, 59);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals(59, javaCharStream0.getBeginColumn());\n assertEquals(755, int0);\n }", "private static String fillStr(String str, int len) throws IllegalArgumentException\n {\n // String buffer containing the leading zeros.\n StringBuffer leaders;\n\n // The requested length must be greater or equal to the\n // string length.\n if (len <= str.length()) {\n throw new IllegalArgumentException(\"len less than length of string\");\n }\n\n // Make the string buffer with leading zeros and fill it.\n leaders = new StringBuffer(len - str.length());\n for (int iChar = 0; iChar < (len - str.length()); iChar++) {\n leaders.append('0');\n }\n\n // Construct and return the resulting string.\n return (leaders.toString() + str);\n }", "static void take_memory_values() throws IOException{\n\t\tSystem.out.print(\"ENTER THE ADDRESS : \");\n\t\tString input = scan.readLine();\n\t\tif(input.equals(\"N\"))\n\t\t\treturn;\n\t\taddress = hexa_to_deci(input);\n\t\tprint_the_address(address);\n\t\tinput = scan.readLine();\n\t\tif(input.length()==2)\n\t\t\tmemory.put(address,input);\n\t\telse{\n\t\t\tmemory.put(address,input.substring(2));\n\t\t\tmemory.put(address+1,input.substring(0,2));\n\t\t}\n\t\t//System.out.println(address+\" \"+memory.get(address));\n\t\ttake_memory_values();\n\t}", "private boolean isLineInformationRepairNeeded(String text) {\n\t\t\tif (text == null)\n\t\t\t\treturn false;\n\n\t\t\tint length= text.length();\n\t\t\tif (length == 0)\n\t\t\t\treturn false;\n\n\t\t\tint rIndex= text.indexOf('\\r');\n\t\t\tint nIndex= text.indexOf('\\n');\n\t\t\tif (rIndex == -1 && nIndex == -1)\n\t\t\t\treturn false;\n\n\t\t\tif (rIndex > 0 && rIndex < length-1 && nIndex > 1 && rIndex < length-2)\n\t\t\t\treturn false;\n\n\t\t\tString defaultLD= null;\n\t\t\ttry {\n\t\t\t\tdefaultLD= getLineDelimiter(0);\n\t\t\t} catch (BadLocationException x) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (defaultLD == null)\n\t\t\t\treturn false;\n\n\t\t\tdefaultLD= getDefaultLineDelimiter();\n\n\t\t\tif (defaultLD.length() == 1) {\n\t\t\t\tif (rIndex != -1 && !\"\\r\".equals(defaultLD)) //$NON-NLS-1$\n\t\t\t\t\treturn true;\n\t\t\t\tif (nIndex != -1 && !\"\\n\".equals(defaultLD)) //$NON-NLS-1$\n\t\t\t\t\treturn true;\n\t\t\t} else if (defaultLD.length() == 2)\n\t\t\t\treturn rIndex == -1 || nIndex - rIndex != 1;\n\n\t\t\treturn false;\n\t\t}", "public static String readKeyBoard() {\n String line = \"\";\n for(;;){\n line = scanner.nextLine();\n if (line.length() < 1) {\n System.out.print(\"Nothing input,please input again:\\n\");\n continue;\n }\n break;\n }\n return line;\n }", "public StrTab(byte[] data, int length) {\n final int cnt = length;\n int addr = 0;\n while (addr < cnt) {\n int size = 0;\n while ((addr + size < cnt) && (data[addr + size] != 0)) {\n size++;\n }\n final String s = new String(data, addr, size);\n final Integer index = addr;\n str2addr.put(s, index);\n addr2str.put(index, s);\n addr += (size + 1);\n }\n maxIndex = cnt;\n }", "public Base32(int i, byte[] bArr, boolean z, byte b) {\n super(5, 8, i, bArr == null ? 0 : bArr.length, b);\n if (z) {\n this.encodeTable = HEX_ENCODE_TABLE;\n this.decodeTable = HEX_DECODE_TABLE;\n } else {\n this.encodeTable = ENCODE_TABLE;\n this.decodeTable = DECODE_TABLE;\n }\n if (i <= 0) {\n this.encodeSize = 8;\n this.lineSeparator = null;\n } else if (bArr == null) {\n throw new IllegalArgumentException(\"lineLength \" + i + \" > 0, but lineSeparator is null\");\n } else if (!containsAlphabetOrPad(bArr)) {\n this.encodeSize = bArr.length + 8;\n byte[] bArr2 = new byte[bArr.length];\n this.lineSeparator = bArr2;\n System.arraycopy(bArr, 0, bArr2, 0, bArr.length);\n } else {\n String newStringUtf8 = StringUtils.newStringUtf8(bArr);\n throw new IllegalArgumentException(\"lineSeparator must not contain Base32 characters: [\" + newStringUtf8 + \"]\");\n }\n this.decodeSize = this.encodeSize - 1;\n if (isInAlphabet(b) || isWhiteSpace(b)) {\n throw new IllegalArgumentException(\"pad must not be in alphabet or whitespace\");\n }\n }", "private void calculateCharSize() {\n int charMaxAscent;\n int charLeading;\n FontMetrics fm = getFontMetrics(getFont());\n charWidth = -1; // !!! Does not seem to work: fm.getMaxAdvance();\n charHeight = fm.getHeight() + lineSpaceDelta;\n charMaxAscent = fm.getMaxAscent();\n fm.getMaxDescent();\n charLeading = fm.getLeading();\n baselineIndex = charMaxAscent + charLeading - 1;\n\n if (charWidth == -1) {\n int widths[] = fm.getWidths();\n for (int i=32; i<127; i++) {\n if (widths[i] > charWidth) {\n charWidth = widths[i];\n }\n }\n }\n }", "public static String padLeft(String src, char fill, int length) {\n\t\treturn pad(src, fill, length, false);\n\t}", "public boolean hasPadding() {\n return (buffer.get(0) & 0x20) == 0x020;\n }", "private int deshapeNormalize(char[] dest, int start, int length) {\n int lacount = 0;\n int yehHamzaComposeEnabled = 0;\n int seenComposeEnabled = 0;\n\n yehHamzaComposeEnabled = ((options&YEHHAMZA_MASK) == YEHHAMZA_TWOCELL_NEAR) ? 1 : 0;\n seenComposeEnabled = ((options&SEEN_MASK) == SEEN_TWOCELL_NEAR)? 1 : 0;\n\n for (int i = start, e = i + length; i < e; ++i) {\n char ch = dest[i];\n\n if( (yehHamzaComposeEnabled == 1) && ((ch == HAMZA06_CHAR) || (ch == HAMZAFE_CHAR))\n && (i < (length - 1)) && isAlefMaksouraChar(dest[i+1] )) {\n dest[i] = SPACE_CHAR;\n dest[i+1] = YEH_HAMZA_CHAR;\n } else if ( (seenComposeEnabled == 1) && (isTailChar(ch)) && (i< (length - 1))\n && (isSeenTailFamilyChar(dest[i+1])==1) ) {\n dest[i] = SPACE_CHAR;\n }\n else if (ch >= '\\uFE70' && ch <= '\\uFEFC') {\n if (isLamAlefChar(ch)) {\n ++lacount;\n }\n dest[i] = (char)convertFEto06[ch - '\\uFE70'];\n }\n }\n return lacount;\n }", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~\\\"Py BTn?,~tnf\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 15, 15);\n javaCharStream0.bufpos = (-1396);\n javaCharStream0.backup((-1396));\n javaCharStream0.adjustBeginLineColumn((-1396), 76);\n assertEquals(0, javaCharStream0.bufpos);\n }", "public String getLineEndingStyle() {\n/* 412 */ return getCOSObject().getNameAsString(COSName.LE, \"None\");\n/* */ }", "private void syncColourCodeInputBorders()\n {\n String newStyle = \"-fx-border-style: hidden hidden solid hidden; -fx-border-width: 3; -fx-border-color: \" + colourToRgb(toolColour) + \";-fx-border-radius:4px;\";\n rgbInput.setStyle(newStyle);\n hexInput.setStyle(newStyle);\n }", "private String makeHex(byte[] buffer) {\n byte current;\n int length = buffer.length;\n String blank = \"\"; // it's easier to change\n StringBuffer ret = new StringBuffer(2*length);\n\n // do for each half byte\n for(int i=0;i<(2*length);i++)\n {\n\t// mask half byte and move it to the right\n\tcurrent = i%2==1 ? (byte) (buffer[(i/2)] & 0x0F)\n\t : (byte) ((buffer[(i/2)] >> 4) & 0x0F);\n\t\n\t// convert half byte to ASCII char\t\t \n\tret.append((char) (current < 0x0A ? current+0x30 : current+0x37) + (i%2==1 ? blank : \"\"));\n }\n return ret.toString();\n }" ]
[ "0.5373574", "0.5337422", "0.5307955", "0.5307955", "0.5295699", "0.5295496", "0.52120286", "0.5184645", "0.5124239", "0.5061413", "0.5061349", "0.5028267", "0.49917513", "0.4955594", "0.49428633", "0.49323457", "0.48848274", "0.48803532", "0.48767015", "0.48739952", "0.48694876", "0.48692197", "0.48648563", "0.48465583", "0.48210135", "0.48125398", "0.4798738", "0.4787464", "0.47816688", "0.47795606", "0.4766237", "0.4760166", "0.47596866", "0.47550252", "0.47545937", "0.47500056", "0.4747644", "0.47378018", "0.47349572", "0.47327617", "0.47254726", "0.4714503", "0.4705208", "0.47047508", "0.47043625", "0.4691387", "0.4688829", "0.46684396", "0.46641195", "0.4646179", "0.463421", "0.4631509", "0.46311244", "0.4627461", "0.46206182", "0.46184945", "0.46078348", "0.46068293", "0.46011996", "0.4599984", "0.45951146", "0.45900306", "0.45747888", "0.4572168", "0.4567795", "0.45675188", "0.45641208", "0.45604634", "0.4558854", "0.4558412", "0.45564252", "0.4550446", "0.45501816", "0.45483923", "0.4545474", "0.45392153", "0.45334795", "0.4528816", "0.45279783", "0.45259416", "0.451773", "0.4513686", "0.45092344", "0.45076358", "0.45055783", "0.4503782", "0.45037788", "0.45005375", "0.4500043", "0.4496533", "0.44764805", "0.4473313", "0.44729492", "0.44684583", "0.44654652", "0.44607577", "0.4454978", "0.445374", "0.44491038", "0.44451207" ]
0.50175893
12
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_two, container, false); TabLayout tl = v.findViewById(R.id.viewpagertab); viewPager = v.findViewById(R.id.viewpager); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity()); linearLayoutManager.setOrientation(RecyclerView.VERTICAL); viewPager.setAdapter(new viewpageradapter(getFragmentManager(), tl.getTabCount())); viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tl)); tl.setTabMode(TabLayout.MODE_FIXED); tl.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener(){ @Override public void onTabSelected(TabLayout.Tab tab) { viewPager.setCurrentItem(tab.getPosition()); } @Override public void onTabUnselected(TabLayout.Tab tab) { } @Override public void onTabReselected(TabLayout.Tab tab) { } }); return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\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_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\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 }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
TODO to be implemented
@Override public void update(News item) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\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 anular() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "private void poetries() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void init() {\n }", "public void gored() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "@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\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "public void identify() {\n\n\t}", "public void method_4270() {}", "@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\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void init() {}", "@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 parseResult() {\n\t\t\n\t}", "private static void iterator() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\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}", "public abstract void mo70713b();", "@Override\n\tprotected void logic() {\n\n\t}", "protected abstract Set method_1559();", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tprotected void getData() {\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 update() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\n void init() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "private void init() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}" ]
[ "0.59761655", "0.5968062", "0.59193194", "0.5874404", "0.58493966", "0.57490444", "0.5664812", "0.56591034", "0.56256324", "0.56256324", "0.5610172", "0.5589765", "0.5579562", "0.5574415", "0.556244", "0.5536535", "0.55302966", "0.55221987", "0.55190253", "0.5509272", "0.55014414", "0.5480429", "0.54739386", "0.54739386", "0.5467488", "0.5446393", "0.54303664", "0.54239804", "0.54166895", "0.54089016", "0.53785247", "0.53726816", "0.536261", "0.5358617", "0.5349355", "0.5349355", "0.5335511", "0.53308", "0.53271675", "0.5314084", "0.5314034", "0.5314034", "0.5314034", "0.5314034", "0.5314034", "0.5314034", "0.53124285", "0.53124285", "0.52995455", "0.5292755", "0.5292369", "0.5291177", "0.5289074", "0.52839506", "0.5283075", "0.5283075", "0.5283075", "0.5283075", "0.5283075", "0.5281378", "0.52775264", "0.52738965", "0.5271708", "0.5271708", "0.5271708", "0.5270668", "0.52673906", "0.52626055", "0.5262226", "0.52602416", "0.52575547", "0.5256749", "0.5251847", "0.52513796", "0.52445304", "0.52418214", "0.524041", "0.52396256", "0.5238988", "0.5238988", "0.52360284", "0.52352035", "0.52285177", "0.5222689", "0.5222643", "0.5220609", "0.5216408", "0.52130306", "0.52109194", "0.52104497", "0.52101666", "0.52037555", "0.52036417", "0.5202682", "0.52025133", "0.519204", "0.51902026", "0.51870733", "0.51791906", "0.51780695", "0.51780695" ]
0.0
-1
TODO to be implemented
@Override public void remove(News item) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\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 anular() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "private void poetries() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void init() {\n }", "public void gored() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "@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\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "public void identify() {\n\n\t}", "public void method_4270() {}", "@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\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void init() {}", "@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 parseResult() {\n\t\t\n\t}", "private static void iterator() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\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}", "public abstract void mo70713b();", "@Override\n\tprotected void logic() {\n\n\t}", "protected abstract Set method_1559();", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tprotected void getData() {\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 update() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\n void init() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "private void init() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}" ]
[ "0.59761655", "0.5968062", "0.59193194", "0.5874404", "0.58493966", "0.57490444", "0.5664812", "0.56591034", "0.56256324", "0.56256324", "0.5610172", "0.5589765", "0.5579562", "0.5574415", "0.556244", "0.5536535", "0.55302966", "0.55221987", "0.55190253", "0.5509272", "0.55014414", "0.5480429", "0.54739386", "0.54739386", "0.5467488", "0.5446393", "0.54303664", "0.54239804", "0.54166895", "0.54089016", "0.53785247", "0.53726816", "0.536261", "0.5358617", "0.5349355", "0.5349355", "0.5335511", "0.53308", "0.53271675", "0.5314084", "0.5314034", "0.5314034", "0.5314034", "0.5314034", "0.5314034", "0.5314034", "0.53124285", "0.53124285", "0.52995455", "0.5292755", "0.5292369", "0.5291177", "0.5289074", "0.52839506", "0.5283075", "0.5283075", "0.5283075", "0.5283075", "0.5283075", "0.5281378", "0.52775264", "0.52738965", "0.5271708", "0.5271708", "0.5271708", "0.5270668", "0.52673906", "0.52626055", "0.5262226", "0.52602416", "0.52575547", "0.5256749", "0.5251847", "0.52513796", "0.52445304", "0.52418214", "0.524041", "0.52396256", "0.5238988", "0.5238988", "0.52360284", "0.52352035", "0.52285177", "0.5222689", "0.5222643", "0.5220609", "0.5216408", "0.52130306", "0.52109194", "0.52104497", "0.52101666", "0.52037555", "0.52036417", "0.5202682", "0.52025133", "0.519204", "0.51902026", "0.51870733", "0.51791906", "0.51780695", "0.51780695" ]
0.0
-1
TODO to be implemented
@Override public void remove(Specification specification) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\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 anular() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "private void poetries() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void init() {\n }", "public void gored() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "@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\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "public void identify() {\n\n\t}", "public void method_4270() {}", "@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\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void init() {}", "@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 parseResult() {\n\t\t\n\t}", "private static void iterator() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\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}", "public abstract void mo70713b();", "@Override\n\tprotected void logic() {\n\n\t}", "protected abstract Set method_1559();", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tprotected void getData() {\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 update() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\n void init() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "private void init() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}" ]
[ "0.5975839", "0.59677374", "0.5919047", "0.58743304", "0.58489776", "0.5748961", "0.56650007", "0.56592876", "0.56255245", "0.56255245", "0.5610062", "0.55898273", "0.5579331", "0.55744815", "0.5562347", "0.5536767", "0.55304945", "0.5521841", "0.5519059", "0.5509232", "0.550124", "0.5480248", "0.5473705", "0.5473705", "0.54674107", "0.5446179", "0.5430158", "0.5423755", "0.54166436", "0.5409082", "0.53782994", "0.53724235", "0.53627354", "0.5358574", "0.5349273", "0.5349273", "0.53354543", "0.5330811", "0.5327258", "0.5314134", "0.5313713", "0.5313713", "0.5313713", "0.5313713", "0.5313713", "0.5313713", "0.53121847", "0.53121847", "0.52995634", "0.52924865", "0.5292007", "0.5291194", "0.5288741", "0.5283745", "0.52828896", "0.52828896", "0.52828896", "0.52828896", "0.52828896", "0.52811277", "0.5277559", "0.5273575", "0.5271503", "0.5271503", "0.5271503", "0.5270929", "0.52671325", "0.52628917", "0.5261836", "0.5260174", "0.5257345", "0.52566284", "0.52517056", "0.5251443", "0.524454", "0.5241674", "0.52402586", "0.523932", "0.5238743", "0.5238743", "0.52357584", "0.5235114", "0.52281064", "0.52226675", "0.52225876", "0.5220299", "0.5216129", "0.5212846", "0.52106595", "0.52102613", "0.52100396", "0.52039623", "0.5203649", "0.5202471", "0.5202413", "0.51921594", "0.51900154", "0.5187012", "0.5178906", "0.51778316", "0.51778316" ]
0.0
-1
Creates new form frmTimeTableList
public frmTimeTableList() { initComponents(); modelTimeTable=(DefaultTableModel)jTableTimeTable.getModel(); clFunction.changeLookTable(jTableTimeTable); btnSearchActionPerformed(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Time_table() {\n initComponents();\n }", "@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 tblTimeSlots = new javax.swing.JTable();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setAlwaysOnTop(true);\n setModal(true);\n setName(\"Form\"); // NOI18N\n jScrollPane1.setName(\"jScrollPane1\"); // NOI18N\n tblTimeSlots.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][]\n {\n\n },\n new String []\n {\n \"ID\", \"Code\", \"Day\", \"Start\", \"End\", \"Status\"\n }\n ));\n tblTimeSlots.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\n tblTimeSlots.setName(\"tblTimeSlots\"); // NOI18N\n tblTimeSlots.addMouseListener(new java.awt.event.MouseAdapter()\n {\n public void mouseClicked(java.awt.event.MouseEvent evt)\n {\n tblTimeSlotsMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tblTimeSlots);\n javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(ilearn.ILearnApp.class).getContext().getActionMap(AddHour.class, this);\n jButton1.setAction(actionMap.get(\"cancel\")); // NOI18N\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(ilearn.ILearnApp.class).getContext().getResourceMap(AddHour.class);\n jButton1.setText(resourceMap.getString(\"jButton1.text\")); // NOI18N\n jButton1.setName(\"jButton1\"); // NOI18N\n jButton2.setAction(actionMap.get(\"add\")); // NOI18N\n jButton2.setText(resourceMap.getString(\"jButton2.text\")); // NOI18N\n jButton2.setName(\"jButton2\"); // NOI18N\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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 242, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap())\n );\n pack();\n }", "public AddHour(java.awt.Frame parent, boolean modal)\n {\n super(parent, modal);\n initComponents();\n tblTimeSlots.setModel(TimeSlots.getActiveTimeSlotTableModelList());\n }", "private synchronized void addNewWatchList()\r\n {\r\n\r\n // Create a NEW header Vector\r\n Vector headers = new Vector();\r\n headers.removeAllElements();\r\n for (int i = 0; i < StockData.columns.length; i++)\r\n {\r\n headers.addElement(StockData.columns[i]);\r\n }\r\n\r\n // Now get the Count of the Lists already available\r\n int watchListCount = tabPane.getTabCount();\r\n // Create a new DATA Vector and add at least one item to it\r\n Vector data = new Vector();\r\n data.removeAllElements();\r\n\r\n data.addElement(new StockData());\r\n\r\n // Create our table Model with the headers and data\r\n StockDataTableModel tableModel = new StockDataTableModel(headers, data);\r\n\r\n // Create a new Table with the tablemodel\r\n JTable table = new HGTable(tableModel);\r\n\r\n // This method will add a timer ( via the index ) the table and tableModel\r\n // the appropriate vector containers.\r\n addDataToVectorContainers(table, tableModel, watchListCount);\r\n // This Method will add the Popup menu to the this table\r\n addPopupMenuToTable(table);\r\n // Create a new JSCrollPane with the the Table\r\n JScrollPane scrollPane = new JScrollPane();\r\n scrollPane.getViewport().add(table);\r\n JPanel panel = new JPanel(new BorderLayout());\r\n\r\n // Create a new Vertical Panel to place our menu and JScrollPane Table\r\n JPanel lblPanel = createVerticalPanel(true);\r\n\r\n lblPanel.add(createDropDownMenu());\r\n panel.add(lblPanel, BorderLayout.NORTH);\r\n panel.add(scrollPane, BorderLayout.CENTER);\r\n\r\n // Build a defailt label for the TabPane\r\n String watchListName = getString(\"WatchListTableModule.edit.watch_list_basic_name\") + watchListCount;\r\n\r\n tabPane.addTab(watchListName, null, panel, new String(\"Click here to view \" + watchListName));\r\n\r\n watchListCount = tabPane.getTabCount();\r\n // Set the WatchList title via Properties\r\n // Set the WatchList count Property\r\n appProps.setProperty(watchListName, watchListName);\r\n appProps.setProperty(getString(\"WatchListTableModule.application_watchlist_count_key_title\"), \"\" + watchListCount);\r\n\r\n //// Request Focus on our tab pane\r\n //tabPane.requestFocus();\r\n // Set our selected index to the new Tab\r\n int index = tabPane.getTabCount() - 1;\r\n setNewTitle(index);\r\n\r\n tabPane.setSelectedIndex(0);\r\n tabPane.repaint();\r\n\r\n }", "public TableForm() {\n initComponents();\n \n setMyTable();\n }", "public void addTimeTable(TimeTable timetable) {\n\t\t\n\t}", "public void addData() {\n if (daySchedule == null) {\n return;\n }\n int numTimes = daySchedule.size();\n TableLayout tl = findViewById(R.id.table);\n int chosenTime = MainActivity.hour * 60 + MainActivity.minute;\n if(chosenTime == 0)\n {\n Calendar now = Calendar.getInstance();\n chosenTime = now.get(Calendar.HOUR_OF_DAY) * 60 + now.get(Calendar.MINUTE);;\n }\n for (int i = 0; i < numTimes; i++) {\n TableRow tr = new TableRow(this);\n tr.setLayoutParams(getLayoutParams());\n Time t = daySchedule.get(i);\n if (!haverford) {\n if (Time.toMinutes(t.leaveBrynMawr()) > chosenTime) {\n Log.d(\"brynmawrtime\", String.valueOf(Time.toMinutes(t.leaveBrynMawr())));\n tr.addView(getTextView(i + 1, t.leaveBrynMawr(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent)));\n tr.addView(getTextView(i + numTimes, t.arriveHaverford(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent)));\n }\n } else {\n if (Time.toMinutes(t.leaveHaverford()) > chosenTime) {\n tr.addView(getTextView(i + 1, t.leaveHaverford(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent)));\n tr.addView(getTextView(i + numTimes, t.arriveBrynMawr(), Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(this, R.color.colorAccent)));\n }\n }\n tl.addView(tr, getTblLayoutParams());\n }\n }", "public static TimeTableFragment newInstance() {\n TimeTableFragment fragment = new TimeTableFragment();\n\n return fragment;\n }", "private TimeTable createTimeTableStary(){\n\n final String dateString = \"03.07.2017\";\n SimpleDateFormat formater = new SimpleDateFormat(\"dd.MM.yyyy\");\n\n Date timetableDate = null;\n try {\n timetableDate = formater.parse(dateString);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n ArrayList<Subject> testSubs = new ArrayList<>();\n testSubs.add(new Subject(\"Př\",\"Teoretická informatika\",732,\"UAI\",\"08:00\",\"09:30\", Calendar.MONDAY, \"BB\", \"1\",\"3.10.2016\",\"2.1.2017\",true));\n testSubs.add(new Subject(\"Př\",\"Bakalářská angličtina NS 3\",230,\"OJZ\",\"10:00\",\"11:30\", Calendar.TUESDAY, \"BB\", \"4\",\"3.10.2016\",\"2.1.2017\",true));\n testSubs.add(new Subject(\"Cv\",\"Teoretická informatika\",732,\"UAI\",\"14:30\",\"16:00\", Calendar.TUESDAY, \"AV\", \"Pč4\",\"3.10.2016\",\"2.1.2017\",true));\n\n\n return new TimeTable (timetableDate, testSubs);\n\n }", "public static CustomisableListSelectionDialog\n createTimeListSelectionDialog(Shell parent, String[] preSelected) {\n return new CustomisableListSelectionDialog(\n parent,\n TIME_RESOURCE_PREFIX,\n new TimeProviderFactory(),\n createTimeListValidator(),\n true, // duplicate time values are allowed.\n preSelected);\n\n }", "public AttendanceForm() {\n super();\n initComponents();\n attendanceTableModel = new AttendanceTableModel();\n attendanceTable.setModel(attendanceTableModel);\n }", "public FormBukuTamu() {\n initComponents();\n this.controllers= new ControllersOfBukuTamu();\n this.controllers.inijectTable((DefaultTableModel)tabelBukuTamu.getModel());\n refreshTable();\n setTableRowSorter(tabelBukuTamu, txtDate);\n }", "public void addTimetable(String date, String slot, String room, String teacher, String classes) throws Exception;", "private void createNewListTextField() {\n\t\tjpIntroduceNameList = new JPanel();\n\t\tjpIntroduceNameList.setOpaque(false);\n\t\tjertfTextList = new JERoundTextField(15,15,200);\n\t\tjertfTextList.setVisible(true);\n\t\tjpIntroduceNameList.setVisible(false);\n\t\tjpIntroduceNameList.add(jertfTextList);\n\t}", "private intFrmArticulos() {\r\n initComponents();\r\n lista2 = p.listarArticulos2();\r\n artList.addAll(lista2);\r\n ArticulosTableFormat tblArt = new ArticulosTableFormat();\r\n EventTableModel<Articulos> artTableModel = new EventTableModel(artList, tblArt);\r\n jTable1.setModel(artTableModel);\r\n \r\n\r\n }", "public TablesForm() {\n initComponents();\n this.getContentPane().setBackground(new Color(255, 217, 151));\n setBorder(BorderFactory.createLineBorder(new Color(235, 163, 91)));\n javax.swing.plaf.InternalFrameUI ifu = this.getUI();\n ((javax.swing.plaf.basic.BasicInternalFrameUI) ifu).setNorthPane(null);\n \n tableService = new TableService();\n commonService = new CommonService();\n\n Vector<Tables> vectorTables = commonService.getVectorTables();\n\n TablesTableModel tablesTableModel = new TablesTableModel(vectorTables);\n tblTablesNumber.setModel(tablesTableModel);\n }", "public DayWiseClassTimeTable() {\n initComponents();\n jXTable1.setHorizontalScrollEnabled(true);\n jXTable1.setHighlighters(HighlighterFactory.createAlternateStriping());\n model = new TimeTableModel(3).createDefaultModel();\n jXTable1.setModel(model);\n \n loadClassAndSection();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTableTodayTasks = new javax.swing.JTable();\n jLabel6 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jTableTimesLast7Days = new javax.swing.JTable();\n jPanel1 = new javax.swing.JPanel();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n\n jLabel1.setText(\"Date:\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel2.setText(\"jLabel2\");\n\n jLabel3.setText(\"Total time today:\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(0, 153, 102));\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel4.setText(\"jLabel4\");\n jLabel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(51, 204, 0)));\n\n jLabel5.setText(\"Tasks today:\");\n\n jTableTodayTasks.setModel(fillTodayTasks());\n jScrollPane1.setViewportView(jTableTodayTasks);\n\n jLabel6.setText(\"hours\");\n\n jButton1.setText(\"Edit selected task\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Times last 7 days\");\n\n jTableTimesLast7Days.setModel(fillLast7Days());\n jScrollPane2.setViewportView(jTableTimesLast7Days);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/timemanagementapp/gui/images/icons8-add-new-50.png\"))); // NOI18N\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.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/timemanagementapp/gui/images/icons8-report-card-64.png\"))); // NOI18N\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/timemanagementapp/gui/images/icons8-settings-50.png\"))); // NOI18N\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton4)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.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(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel1)\n .addComponent(jLabel5)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 821, Short.MAX_VALUE)\n .addComponent(jScrollPane2)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6))\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(167, 246, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n checkInPane = new javax.swing.JScrollPane();\n checkInTimeList = new HostCheckInList( this );\n schedulePanel = new javax.swing.JPanel();\n permTimePanel = new javax.swing.JPanel();\n hourLabel = new javax.swing.JLabel();\n minuteLabel = new javax.swing.JLabel();\n startLabel = new javax.swing.JLabel();\n endLabel = new javax.swing.JLabel();\n startHourSpinner = new javax.swing.JSpinner();\n endHourSpinner = new javax.swing.JSpinner();\n startMinSpinner = new javax.swing.JSpinner();\n endMinSpinner = new javax.swing.JSpinner();\n genButton = new javax.swing.JButton();\n freqLabel = new javax.swing.JLabel();\n occurLabel = new javax.swing.JLabel();\n freqCombo = new javax.swing.JComboBox();\n occurSpinner = new javax.swing.JSpinner();\n\n checkInPane.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Check-In Times\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 11))); // NOI18N\n checkInPane.setViewportView(checkInTimeList);\n\n schedulePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Schedule Assistant\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 11))); // NOI18N\n\n permTimePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Permitted Time Range\"));\n\n hourLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n hourLabel.setText(\"Hour\");\n\n minuteLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n minuteLabel.setText(\"Minute\");\n\n startLabel.setText(\"Start Time:\");\n\n endLabel.setText(\"End Time:\");\n\n startHourSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 23, 1));\n startHourSpinner.setMinimumSize(new java.awt.Dimension(40, 20));\n startHourSpinner.setPreferredSize(new java.awt.Dimension(40, 20));\n\n endHourSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 23, 1));\n endHourSpinner.setMinimumSize(new java.awt.Dimension(40, 20));\n endHourSpinner.setPreferredSize(new java.awt.Dimension(40, 20));\n\n startMinSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 59, 1));\n startMinSpinner.setMinimumSize(new java.awt.Dimension(40, 20));\n startMinSpinner.setPreferredSize(new java.awt.Dimension(40, 20));\n\n endMinSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 59, 1));\n endMinSpinner.setMinimumSize(new java.awt.Dimension(40, 20));\n endMinSpinner.setPreferredSize(new java.awt.Dimension(40, 20));\n\n javax.swing.GroupLayout permTimePanelLayout = new javax.swing.GroupLayout(permTimePanel);\n permTimePanel.setLayout(permTimePanelLayout);\n permTimePanelLayout.setHorizontalGroup(\n permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(permTimePanelLayout.createSequentialGroup()\n .addContainerGap(28, Short.MAX_VALUE)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(startLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 65, Short.MAX_VALUE)\n .addComponent(endLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(startHourSpinner, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(hourLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(endHourSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(startMinSpinner, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(endMinSpinner, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(minuteLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(32, Short.MAX_VALUE))\n );\n permTimePanelLayout.setVerticalGroup(\n permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(permTimePanelLayout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(hourLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(minuteLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(permTimePanelLayout.createSequentialGroup()\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(startHourSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(startMinSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(endHourSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(endMinSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(permTimePanelLayout.createSequentialGroup()\n .addComponent(startLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(endLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(20, Short.MAX_VALUE))\n );\n\n genButton.setText(\"Generate\");\n genButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n genButtonActionPerformed(evt);\n }\n });\n\n freqLabel.setText(\"Frequency:\");\n\n occurLabel.setText(\"Occurences:\");\n\n freqCombo.setBorder(javax.swing.BorderFactory.createCompoundBorder());\n freqCombo.setRenderer( new pwnbrew.generic.gui.DefaultCellBorderRenderer(BorderFactory.createEmptyBorder(0, 4, 0, 0)));\n\n occurSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 1000, 1));\n occurSpinner.setMinimumSize(new java.awt.Dimension(40, 20));\n occurSpinner.setPreferredSize(new java.awt.Dimension(40, 20));\n\n javax.swing.GroupLayout schedulePanelLayout = new javax.swing.GroupLayout(schedulePanel);\n schedulePanel.setLayout(schedulePanelLayout);\n schedulePanelLayout.setHorizontalGroup(\n schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(genButton)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(freqLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(occurLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(freqCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(occurSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(permTimePanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n schedulePanelLayout.setVerticalGroup(\n schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(permTimePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(occurSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(occurLabel)))\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(freqLabel)\n .addComponent(freqCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(genButton)\n .addGap(35, 35, 35))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(checkInPane, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(schedulePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(27, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(schedulePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(checkInPane, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(39, Short.MAX_VALUE))\n );\n }", "public void setTimerListData() {\n for (int i = 0; i < 10; i++) {\n TimerDisplay timer = new TimerDisplay();\n timer.setCurrentDate(\"Jan 0\" + i + \" 2017 00:00\");\n timer.setEndDate(\"Jan 0\" + (i+1) + \" 2017 00:00\");\n timer.setPercentage();\n\n listTimers.add(timer);\n }\n }", "public ListaMedicosJFrame() {\n initComponents();\n preencheTabela();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jSeparator2 = new javax.swing.JSeparator();\n txtName = new javax.swing.JTextField();\n jPanel3 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n jSeparator3 = new javax.swing.JSeparator();\n txtCapacity = new javax.swing.JTextField();\n jPanel4 = new javax.swing.JPanel();\n jLabel5 = new javax.swing.JLabel();\n jSeparator4 = new javax.swing.JSeparator();\n txtTime = new javax.swing.JTextField();\n jPanel6 = new javax.swing.JPanel();\n jLabel7 = new javax.swing.JLabel();\n jSeparator6 = new javax.swing.JSeparator();\n txtRoom = new javax.swing.JTextField();\n jPanel9 = new javax.swing.JPanel();\n jLabel10 = new javax.swing.JLabel();\n cbCourse = new javax.swing.JComboBox<>();\n bntCreate = new javax.swing.JButton();\n jPanel8 = new javax.swing.JPanel();\n jLabel9 = new javax.swing.JLabel();\n jSeparator8 = new javax.swing.JSeparator();\n pkEndedDate = new com.toedter.calendar.JDateChooser();\n jPanel10 = new javax.swing.JPanel();\n jLabel11 = new javax.swing.JLabel();\n jSeparator9 = new javax.swing.JSeparator();\n pkStartedDate = new com.toedter.calendar.JDateChooser();\n jPanel11 = new javax.swing.JPanel();\n jLabel12 = new javax.swing.JLabel();\n cbStaff = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Tạo lớp học mới\");\n setResizable(false);\n\n jLabel2.setForeground(new java.awt.Color(57, 113, 77));\n jLabel2.setText(\"Tên lớp\");\n\n txtName.setBackground(new java.awt.Color(204, 204, 204));\n txtName.setFont(new java.awt.Font(\"Times New Roman\", 2, 14)); // NOI18N\n txtName.setForeground(new java.awt.Color(51, 51, 51));\n txtName.setBorder(null);\n txtName.setCaretColor(new java.awt.Color(102, 102, 102));\n txtName.setDisabledTextColor(new java.awt.Color(0, 0, 0));\n txtName.setOpaque(false);\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(0, 313, Short.MAX_VALUE))\n .addComponent(txtName)\n .addComponent(jSeparator2)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jLabel3.setForeground(new java.awt.Color(57, 113, 77));\n jLabel3.setText(\"Sỉ số tối đa\");\n\n txtCapacity.setBackground(new java.awt.Color(204, 204, 204));\n txtCapacity.setFont(new java.awt.Font(\"Times New Roman\", 2, 14)); // NOI18N\n txtCapacity.setForeground(new java.awt.Color(51, 51, 51));\n txtCapacity.setBorder(null);\n txtCapacity.setCaretColor(new java.awt.Color(102, 102, 102));\n txtCapacity.setDisabledTextColor(new java.awt.Color(0, 0, 0));\n txtCapacity.setOpaque(false);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel3)\n .addComponent(txtCapacity)\n .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtCapacity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jLabel5.setForeground(new java.awt.Color(57, 113, 77));\n jLabel5.setText(\"Thời gian học\");\n\n txtTime.setBackground(new java.awt.Color(204, 204, 204));\n txtTime.setFont(new java.awt.Font(\"Times New Roman\", 2, 14)); // NOI18N\n txtTime.setForeground(new java.awt.Color(51, 51, 51));\n txtTime.setBorder(null);\n txtTime.setCaretColor(new java.awt.Color(102, 102, 102));\n txtTime.setDisabledTextColor(new java.awt.Color(0, 0, 0));\n txtTime.setOpaque(false);\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel5)\n .addComponent(txtTime)\n .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jLabel7.setForeground(new java.awt.Color(57, 113, 77));\n jLabel7.setText(\"Phòng học\");\n\n txtRoom.setBackground(new java.awt.Color(204, 204, 204));\n txtRoom.setFont(new java.awt.Font(\"Times New Roman\", 2, 14)); // NOI18N\n txtRoom.setForeground(new java.awt.Color(51, 51, 51));\n txtRoom.setBorder(null);\n txtRoom.setCaretColor(new java.awt.Color(102, 102, 102));\n txtRoom.setDisabledTextColor(new java.awt.Color(0, 0, 0));\n txtRoom.setOpaque(false);\n\n javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel7)\n .addComponent(txtRoom)\n .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtRoom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jLabel10.setForeground(new java.awt.Color(57, 113, 77));\n jLabel10.setText(\"Khoá học\");\n\n javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);\n jPanel9.setLayout(jPanel9Layout);\n jPanel9Layout.setHorizontalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10)\n .addComponent(cbCourse, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n jPanel9Layout.setVerticalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel9Layout.createSequentialGroup()\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbCourse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n bntCreate.setText(\"Tạo\");\n bntCreate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bntCreateActionPerformed(evt);\n }\n });\n\n jLabel9.setForeground(new java.awt.Color(57, 113, 77));\n jLabel9.setText(\"Ngày kết thúc\");\n\n pkEndedDate.setDateFormatString(\"dd-MM-yyyy\");\n\n javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);\n jPanel8.setLayout(jPanel8Layout);\n jPanel8Layout.setHorizontalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel9)\n .addComponent(jSeparator8, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)\n .addComponent(pkEndedDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n );\n jPanel8Layout.setVerticalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel9)\n .addGap(2, 2, 2)\n .addComponent(pkEndedDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jSeparator8, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jLabel11.setForeground(new java.awt.Color(57, 113, 77));\n jLabel11.setText(\"Ngày bắt đầu\");\n\n pkStartedDate.setDateFormatString(\"dd-MM-yyyy\");\n\n javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);\n jPanel10.setLayout(jPanel10Layout);\n jPanel10Layout.setHorizontalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel11)\n .addComponent(jSeparator9, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)\n .addComponent(pkStartedDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n );\n jPanel10Layout.setVerticalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel10Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel11)\n .addGap(2, 2, 2)\n .addComponent(pkStartedDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jSeparator9, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jLabel12.setForeground(new java.awt.Color(57, 113, 77));\n jLabel12.setText(\"Giảng viên\");\n\n javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);\n jPanel11.setLayout(jPanel11Layout);\n jPanel11Layout.setHorizontalGroup(\n jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel12)\n .addComponent(cbStaff, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n jPanel11Layout.setVerticalGroup(\n jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel11Layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbStaff, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\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 .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(bntCreate)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(43, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(32, 32, 32)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(bntCreate)\n .addContainerGap(29, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "public Table(int lines, int time){\n\t\t//set the fields\n\t\tthis.lines = lines;\n\t\t//this.clockTime = time;\n\t\t//set size\n\t\tthis.setSize(800,450);\n\t\t//set the layout\n\t\t//BorderLayout borders = new BorderLayout();\n\t\tthis.setLayout(new GridLayout());\n\t\t//add the board to the table\n\t\tboard = new Board(this.lines, false);\n\t\tthis.add(board);\n\t\tMat goMat = new Mat(board);\n\t\tthis.add(goMat);\n\t\tthis.setVisible(true);\n\t\tthis.setResizable(false);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "public ttussntpt() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tbCourse = new javax.swing.JTable();\n jLabel2 = new javax.swing.JLabel();\n txtId = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n txtCourseName = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n btnAdd = new javax.swing.JButton();\n btnEdit = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n dcStartTime = new com.toedter.calendar.JDateChooser();\n dcEndTime = new com.toedter.calendar.JDateChooser();\n jLabel5 = new javax.swing.JLabel();\n txtSearch = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"QUẢN LÝ KHÓA HỌC\");\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"Quản lý khóa học\");\n\n tbCourse.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"STT\", \"ID\", \"Tên khóa học\", \"Ngày bắt đầu\", \"Ngày kết thúc\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tbCourse.getTableHeader().setResizingAllowed(false);\n tbCourse.getTableHeader().setReorderingAllowed(false);\n tbCourse.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tbCourseMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tbCourse);\n\n jLabel2.setText(\"ID:\");\n\n txtId.setEditable(false);\n txtId.setEnabled(false);\n\n jLabel3.setText(\"Tên khóa học:\");\n\n jLabel4.setText(\"Ngày bắt đầu:\");\n\n jButton1.setText(\"Đóng\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n btnAdd.setText(\"Thêm mới\");\n btnAdd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddActionPerformed(evt);\n }\n });\n\n btnEdit.setText(\"Sửa\");\n btnEdit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEditActionPerformed(evt);\n }\n });\n\n btnDelete.setText(\"Xóa\");\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n\n jLabel6.setText(\"Ngày kết thúc:\");\n\n dcStartTime.setDateFormatString(\"dd-MM-yyyy\");\n\n dcEndTime.setDateFormatString(\"dd-MM-yyyy\");\n\n jLabel5.setText(\"Tìm kiếm theo tên:\");\n\n txtSearch.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n txtSearchKeyPressed(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 .addGap(425, 425, 425)\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(49, 49, 49)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnAdd)\n .addGap(18, 18, 18)\n .addComponent(btnEdit)\n .addGap(18, 18, 18)\n .addComponent(btnDelete))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel6))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtId, javax.swing.GroupLayout.DEFAULT_SIZE, 172, Short.MAX_VALUE)\n .addComponent(txtCourseName, javax.swing.GroupLayout.DEFAULT_SIZE, 172, Short.MAX_VALUE)\n .addComponent(dcStartTime, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(dcEndTime, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addComponent(jLabel5)\n .addGap(18, 18, 18)\n .addComponent(txtSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(56, 56, 56)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 549, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 46, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLabel1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 394, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41)\n .addComponent(jButton1))\n .addGroup(layout.createSequentialGroup()\n .addGap(113, 113, 113)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtCourseName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(dcStartTime, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(dcEndTime, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(43, 43, 43)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnAdd)\n .addComponent(btnEdit)\n .addComponent(btnDelete))\n .addGap(53, 53, 53)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(26, 68, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "public ScheduleForm() {\n initComponents();\n }", "private void atualizarTabela() {\n if (cbLista.getSelectedIndex() == -1) {\n btnAddTarefa.setEnabled(false);\n btnAlterarTarefa.setEnabled(false);\n btnExcluirTarefa.setEnabled(false);\n } else {\n btnAddTarefa.setEnabled(true);\n btnAlterarTarefa.setEnabled(true);\n btnExcluirTarefa.setEnabled(true);\n }\n\n TarefaDAO tarefaDAO = new TarefaDAO();\n TarefaTableModel ttm = new TarefaTableModel();\n lista = ((Lista) cbLista.getSelectedItem());\n if (lista != null) {\n ttm.setLista(tarefaDAO.getTarefasByLista(lista));\n } else {\n ttm.setLista(new ArrayList<>());\n }\n tbTarefa.setModel(ttm);\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n poptbrecruit = new javax.swing.JPopupMenu();\n RecruitDelete = new javax.swing.JMenuItem();\n poptbrecruitdetails = new javax.swing.JPopupMenu();\n RecruitDetails = new javax.swing.JMenuItem();\n jLabel6 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n txtCdate = new com.toedter.calendar.JDateChooser();\n jLabel2 = new javax.swing.JLabel();\n txtEdate = new com.toedter.calendar.JDateChooser();\n jLabel3 = new javax.swing.JLabel();\n txtNum = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n cbposition = new javaapplication21.AutoComboBox();\n jLabel5 = new javax.swing.JLabel();\n cbTimeshift = new javaapplication21.AutoComboBox();\n jScrollPane1 = new javax.swing.JScrollPane();\n txtdes = new javax.swing.JTextArea();\n jLabel7 = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n tbrecruit = new javax.swing.JTable();\n jScrollPane3 = new javax.swing.JScrollPane();\n txtduties = new javax.swing.JTextArea();\n jLabel10 = new javax.swing.JLabel();\n jScrollPane4 = new javax.swing.JScrollPane();\n txtrequitment = new javax.swing.JTextArea();\n jLabel11 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n btnADD = new javax.swing.JButton();\n btnUPDATE = new javax.swing.JButton();\n btnDELETE = new javax.swing.JButton();\n btnSAVE = new javax.swing.JButton();\n btnCANCEL = new javax.swing.JButton();\n jPanel3 = new javax.swing.JPanel();\n jScrollPane5 = new javax.swing.JScrollPane();\n tbre = new javax.swing.JTable();\n jScrollPane6 = new javax.swing.JScrollPane();\n tbred = new javax.swing.JTable();\n jPanel4 = new javax.swing.JPanel();\n jLabel15 = new javax.swing.JLabel();\n txtCdate1 = new com.toedter.calendar.JDateChooser();\n jLabel16 = new javax.swing.JLabel();\n txtEdate1 = new com.toedter.calendar.JDateChooser();\n jLabel17 = new javax.swing.JLabel();\n txtNum1 = new javax.swing.JTextField();\n jLabel18 = new javax.swing.JLabel();\n cbposition1 = new javaapplication21.AutoComboBox();\n cbTimeshift1 = new javaapplication21.AutoComboBox();\n jLabel19 = new javax.swing.JLabel();\n jScrollPane7 = new javax.swing.JScrollPane();\n txtdes1 = new javax.swing.JTextArea();\n jLabel20 = new javax.swing.JLabel();\n jScrollPane8 = new javax.swing.JScrollPane();\n txtduties1 = new javax.swing.JTextArea();\n jLabel21 = new javax.swing.JLabel();\n jScrollPane9 = new javax.swing.JScrollPane();\n txtrequirement1 = new javax.swing.JTextArea();\n jLabel22 = new javax.swing.JLabel();\n jLabel23 = new javax.swing.JLabel();\n txtDateFrom = new com.toedter.calendar.JDateChooser();\n jLabel24 = new javax.swing.JLabel();\n txtDateTo = new com.toedter.calendar.JDateChooser();\n btnSearch = new javax.swing.JButton();\n btnS = new javax.swing.JButton();\n jLabel13 = new javax.swing.JLabel();\n lbdatetime = new javax.swing.JLabel();\n\n RecruitDelete.setText(\"Delete\");\n RecruitDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n RecruitDeleteActionPerformed(evt);\n }\n });\n poptbrecruit.add(RecruitDelete);\n\n RecruitDetails.setText(\"Delete\");\n RecruitDetails.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n RecruitDetailsActionPerformed(evt);\n }\n });\n poptbrecruitdetails.add(RecruitDetails);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel6.setText(\"Name :\");\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel9.setText(\"RECRUITMENT\");\n\n jLabel12.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel12.setText(\"Date :\");\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setText(\"Date Create :\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setText(\"TimeShift :\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setText(\"NumberNeeded :\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel4.setText(\"Date End :\");\n\n cbposition.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {\n public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {\n }\n public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {\n cbpositionPopupMenuWillBecomeInvisible(evt);\n }\n public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel5.setText(\"Position :\");\n\n cbTimeshift.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {\n public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {\n }\n public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {\n cbTimeshiftPopupMenuWillBecomeInvisible(evt);\n }\n public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {\n }\n });\n\n txtdes.setColumns(20);\n txtdes.setFont(new java.awt.Font(\"Palatino Linotype\", 0, 13)); // NOI18N\n txtdes.setRows(5);\n jScrollPane1.setViewportView(txtdes);\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel7.setText(\"Description :\");\n\n tbrecruit.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"Postion\", \"NumberNeeded\", \"Timeshift\", \"Duties\", \"shiftid\", \"PositionID\", \"Requirement\", \"Create\", \"Title 10\"\n }\n ));\n tbrecruit.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tbrecruitMouseClicked(evt);\n }\n });\n jScrollPane2.setViewportView(tbrecruit);\n\n txtduties.setColumns(20);\n txtduties.setFont(new java.awt.Font(\"Palatino Linotype\", 0, 13)); // NOI18N\n txtduties.setRows(5);\n jScrollPane3.setViewportView(txtduties);\n\n jLabel10.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel10.setText(\"Duties :\");\n\n txtrequitment.setColumns(20);\n txtrequitment.setFont(new java.awt.Font(\"Palatino Linotype\", 0, 13)); // NOI18N\n txtrequitment.setRows(5);\n jScrollPane4.setViewportView(txtrequitment);\n\n jLabel11.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel11.setText(\"Requirements :\");\n\n jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n btnADD.setText(\"ADD\");\n btnADD.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnADDActionPerformed(evt);\n }\n });\n jPanel2.add(btnADD, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, 110, 40));\n\n btnUPDATE.setText(\"UPDATE\");\n btnUPDATE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUPDATEActionPerformed(evt);\n }\n });\n jPanel2.add(btnUPDATE, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 0, 110, 40));\n\n btnDELETE.setText(\"DELETE\");\n btnDELETE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDELETEActionPerformed(evt);\n }\n });\n jPanel2.add(btnDELETE, new org.netbeans.lib.awtextra.AbsoluteConstraints(370, 0, 110, 40));\n\n btnSAVE.setText(\"SAVE\");\n btnSAVE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSAVEActionPerformed(evt);\n }\n });\n jPanel2.add(btnSAVE, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 0, 110, 40));\n\n btnCANCEL.setText(\"CANCEL\");\n jPanel2.add(btnCANCEL, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 0, 110, 40));\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(278, 278, 278)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 764, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtCdate, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtEdate, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtNum, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbposition, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cbTimeshift, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 1409, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(844, 844, 844)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 452, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 478, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 460, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addGap(0, 5, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 68, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtNum, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cbposition, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cbTimeshift, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(txtEdate, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(txtCdate, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(3, 3, 3)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 349, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(53, 53, 53))\n );\n\n jTabbedPane1.addTab(\"Add New Recruitment\", jPanel1);\n\n tbre.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n\n }\n ));\n tbre.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tbreMouseClicked(evt);\n }\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n tbreMouseReleased(evt);\n }\n });\n jScrollPane5.setViewportView(tbre);\n\n tbred.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n\n }\n ));\n tbred.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tbredMouseClicked(evt);\n }\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n tbredMouseReleased(evt);\n }\n });\n jScrollPane6.setViewportView(tbred);\n\n jLabel15.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel15.setText(\"Date Create :\");\n\n jLabel16.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel16.setText(\"Date End :\");\n\n jLabel17.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel17.setText(\"NumberNeeded :\");\n\n jLabel18.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel18.setText(\"Position :\");\n\n cbposition1.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {\n public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {\n }\n public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {\n cbposition1PopupMenuWillBecomeInvisible(evt);\n }\n public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {\n }\n });\n\n cbTimeshift1.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {\n public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {\n }\n public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {\n cbTimeshift1PopupMenuWillBecomeInvisible(evt);\n }\n public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {\n }\n });\n\n jLabel19.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel19.setText(\"TimeShift :\");\n\n txtdes1.setColumns(20);\n txtdes1.setFont(new java.awt.Font(\"Palatino Linotype\", 0, 13)); // NOI18N\n txtdes1.setRows(5);\n jScrollPane7.setViewportView(txtdes1);\n\n jLabel20.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel20.setText(\"Description :\");\n\n txtduties1.setColumns(20);\n txtduties1.setFont(new java.awt.Font(\"Palatino Linotype\", 0, 13)); // NOI18N\n txtduties1.setRows(5);\n jScrollPane8.setViewportView(txtduties1);\n\n jLabel21.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel21.setText(\"Duties :\");\n\n txtrequirement1.setColumns(20);\n txtrequirement1.setFont(new java.awt.Font(\"Palatino Linotype\", 0, 13)); // NOI18N\n txtrequirement1.setRows(5);\n jScrollPane9.setViewportView(txtrequirement1);\n\n jLabel22.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel22.setText(\"Requirements :\");\n\n jLabel23.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel23.setText(\"Date Create :\");\n\n jLabel24.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel24.setText(\"Date End :\");\n\n btnSearch.setText(\"Search\");\n btnSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSearchActionPerformed(evt);\n }\n });\n\n btnS.setText(\"Save\");\n btnS.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtCdate1, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtEdate1, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtNum1, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cbposition1, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 5, Short.MAX_VALUE)\n .addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cbTimeshift1, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel20, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 452, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel21, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 452, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel22, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 452, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtDateFrom, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtDateTo, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(144, 144, 144)\n .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(76, 76, 76)\n .addComponent(btnS, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtNum1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(txtEdate1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtCdate1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbTimeshift1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbposition1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel15, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel16, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtDateFrom, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSearch)\n .addComponent(btnS))\n .addComponent(txtDateTo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel23, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel24, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(18, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 678, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane6)\n .addContainerGap())\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 418, Short.MAX_VALUE)\n .addComponent(jScrollPane6))\n .addContainerGap(57, Short.MAX_VALUE))\n );\n\n jTabbedPane1.addTab(\"Show Recruitment And Edit \", jPanel3);\n\n jLabel13.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel13.setText(\"Date :\");\n\n lbdatetime.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n lbdatetime.setText(\"Date :\");\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTabbedPane1))\n .addGroup(layout.createSequentialGroup()\n .addGap(535, 535, 535)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(lbdatetime, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(2, 2, 2)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lbdatetime, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n setSize(new java.awt.Dimension(1455, 933));\n setLocationRelativeTo(null);\n }", "private void makeListGUI(String list, int index)\n {\n // get a reference to the LayoutInflater service\n LayoutInflater inflater = (LayoutInflater) getSystemService(\n Context.LAYOUT_INFLATER_SERVICE);\n\n // inflate new_list_view.xml to create new list and edit Buttons\n View newListView = inflater.inflate(R.layout.new_list_view, null);\n \n // get newListButton, set its text and register its listener\n Button newListButton = \n (Button) newListView.findViewById(R.id.newListButton);\n newListButton.setText(list); \n newListButton.setOnClickListener(listButtonListener); \n\n // get newEditButton and register its listener\n Button newEditButton = \n (Button) newListView.findViewById(R.id.newEditButton); \n newEditButton.setOnClickListener(editButtonListener);\n\n // add new list and edit buttons to listTableLayout\n listTableLayout.addView(newListView, index);\n }", "public Times() {\r\n initComponents();\r\n \r\n }", "public FormHistoricoLimiteEmUso(List<Parcela> lstParcelas) {\n initComponents();\n setLocationRelativeTo(null);\n setModal(true);\n popularTela(lstParcelas);\n }", "public CreateNewScreening(MainWindow main_window) {\n this.main_window = main_window;\n initComponents();\n \n // Center align the login window\n this.setLocationRelativeTo(null);\n \n for(Film current_film : main_window.core_controller.film_controller.getFilms()){\n this.film_combo.addItem(current_film);\n }\n\n for(Screen current_screen : main_window.core_controller.screen_controller.getScreens()){\n this.screen_combo.addItem(current_screen);\n }\n\n\n GregorianCalendar today_date = new GregorianCalendar();\n\n System.out.println(today_date.get(Calendar.DAY_OF_MONTH));\n\n this.date_day.setSelectedItem(today_date.get(Calendar.DAY_OF_MONTH)+\"\");\n this.date_month.setSelectedItem((today_date.get(Calendar.MONTH)+1)+\"\");\n this.date_year.setSelectedItem(today_date.get(Calendar.YEAR)+\"\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n bgPanel = new javax.swing.JPanel();\n menuPanel = new javax.swing.JPanel();\n welcomeLabel = new javax.swing.JLabel();\n displayName = new javax.swing.JLabel();\n homeBtn = new javax.swing.JPanel();\n homeLabel = new javax.swing.JLabel();\n homeIcon = new javax.swing.JLabel();\n manageBtn = new javax.swing.JPanel();\n manageLabel = new javax.swing.JLabel();\n manageIcon = new javax.swing.JLabel();\n updateBtn = new javax.swing.JPanel();\n updateLabel = new javax.swing.JLabel();\n updateIcon = new javax.swing.JLabel();\n logoutBtn = new javax.swing.JPanel();\n logoutLabel = new javax.swing.JLabel();\n logoutIcon = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n title = new javax.swing.JLabel();\n daeLabel = new javax.swing.JLabel();\n fromLabel = new javax.swing.JLabel();\n toLabel = new javax.swing.JLabel();\n statusLabel = new javax.swing.JLabel();\n venueLabel = new javax.swing.JLabel();\n fromField = new javax.swing.JTextField();\n venueField = new javax.swing.JTextField();\n toField = new javax.swing.JTextField();\n statusBox = new javax.swing.JComboBox<>();\n submitBtn = new javax.swing.JPanel();\n submitLabel = new javax.swing.JLabel();\n jDateChooser1 = new com.toedter.calendar.JDateChooser();\n deleteBtn = new javax.swing.JPanel();\n deleteLabel = new javax.swing.JLabel();\n idDisplay = new javax.swing.JTextField();\n jScrollPane2 = new javax.swing.JScrollPane();\n jScrollPane1 = new javax.swing.JScrollPane();\n scheduleTable = new javax.swing.JTable();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n bgPanel.setBackground(new java.awt.Color(255, 255, 255));\n\n menuPanel.setBackground(new java.awt.Color(41, 41, 48));\n\n welcomeLabel.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 18)); // NOI18N\n welcomeLabel.setForeground(new java.awt.Color(255, 255, 255));\n welcomeLabel.setText(\"Welcome\");\n\n displayName.setFont(new java.awt.Font(\"Comic Sans MS\", 2, 18)); // NOI18N\n displayName.setForeground(new java.awt.Color(255, 255, 255));\n displayName.setText(\"Welcome\");\n\n homeBtn.setBackground(new java.awt.Color(41, 41, 48));\n homeBtn.setForeground(new java.awt.Color(0, 153, 153));\n homeBtn.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n homeBtn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n homeBtnMouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n homeBtnMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n homeBtnMouseExited(evt);\n }\n });\n\n homeLabel.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n homeLabel.setForeground(new java.awt.Color(255, 255, 255));\n homeLabel.setText(\"Home\");\n\n homeIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/fypappointment2/icon/003-home.png\"))); // NOI18N\n\n javax.swing.GroupLayout homeBtnLayout = new javax.swing.GroupLayout(homeBtn);\n homeBtn.setLayout(homeBtnLayout);\n homeBtnLayout.setHorizontalGroup(\n homeBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(homeBtnLayout.createSequentialGroup()\n .addGap(79, 79, 79)\n .addComponent(homeLabel)\n .addGap(18, 18, 18)\n .addComponent(homeIcon)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n homeBtnLayout.setVerticalGroup(\n homeBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(homeBtnLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(homeBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(homeIcon, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(homeLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n manageBtn.setBackground(new java.awt.Color(62, 182, 80));\n manageBtn.setForeground(new java.awt.Color(0, 153, 153));\n manageBtn.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n manageBtn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n manageBtnMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n manageBtnMouseExited(evt);\n }\n });\n\n manageLabel.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n manageLabel.setForeground(new java.awt.Color(255, 255, 255));\n manageLabel.setText(\"Schedule\");\n\n manageIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/fypappointment2/icon/calendar.png\"))); // NOI18N\n\n javax.swing.GroupLayout manageBtnLayout = new javax.swing.GroupLayout(manageBtn);\n manageBtn.setLayout(manageBtnLayout);\n manageBtnLayout.setHorizontalGroup(\n manageBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(manageBtnLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(manageLabel)\n .addGap(18, 18, 18)\n .addComponent(manageIcon)\n .addGap(53, 53, 53))\n );\n manageBtnLayout.setVerticalGroup(\n manageBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(manageBtnLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(manageBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(manageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(manageIcon, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n updateBtn.setBackground(new java.awt.Color(41, 41, 48));\n updateBtn.setForeground(new java.awt.Color(0, 153, 153));\n updateBtn.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n updateBtn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n updateBtnMouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n updateBtnMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n updateBtnMouseExited(evt);\n }\n });\n\n updateLabel.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n updateLabel.setForeground(new java.awt.Color(255, 255, 255));\n updateLabel.setText(\"Update Account\");\n\n updateIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/fypappointment2/icon/002-settings.png\"))); // NOI18N\n\n javax.swing.GroupLayout updateBtnLayout = new javax.swing.GroupLayout(updateBtn);\n updateBtn.setLayout(updateBtnLayout);\n updateBtnLayout.setHorizontalGroup(\n updateBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(updateBtnLayout.createSequentialGroup()\n .addGap(34, 34, 34)\n .addComponent(updateLabel)\n .addGap(18, 18, 18)\n .addComponent(updateIcon)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n updateBtnLayout.setVerticalGroup(\n updateBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(updateBtnLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(updateBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(updateIcon, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(updateLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n logoutBtn.setBackground(new java.awt.Color(41, 41, 48));\n logoutBtn.setForeground(new java.awt.Color(0, 153, 153));\n logoutBtn.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n logoutBtn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n logoutBtnMouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n logoutBtnMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n logoutBtnMouseExited(evt);\n }\n });\n\n logoutLabel.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n logoutLabel.setForeground(new java.awt.Color(255, 255, 255));\n logoutLabel.setText(\"Logout\");\n\n logoutIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/fypappointment2/icon/005-logout.png\"))); // NOI18N\n\n javax.swing.GroupLayout logoutBtnLayout = new javax.swing.GroupLayout(logoutBtn);\n logoutBtn.setLayout(logoutBtnLayout);\n logoutBtnLayout.setHorizontalGroup(\n logoutBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(logoutBtnLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(logoutLabel)\n .addGap(18, 18, 18)\n .addComponent(logoutIcon)\n .addGap(52, 52, 52))\n );\n logoutBtnLayout.setVerticalGroup(\n logoutBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(logoutBtnLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(logoutBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(logoutLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(logoutIcon, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout menuPanelLayout = new javax.swing.GroupLayout(menuPanel);\n menuPanel.setLayout(menuPanelLayout);\n menuPanelLayout.setHorizontalGroup(\n menuPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(menuPanelLayout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addComponent(welcomeLabel)\n .addGap(31, 31, 31)\n .addComponent(displayName)\n .addContainerGap(13, Short.MAX_VALUE))\n .addComponent(homeBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(manageBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(updateBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(logoutBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n menuPanelLayout.setVerticalGroup(\n menuPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(menuPanelLayout.createSequentialGroup()\n .addGap(136, 136, 136)\n .addGroup(menuPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(welcomeLabel)\n .addComponent(displayName))\n .addGap(43, 43, 43)\n .addComponent(homeBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(manageBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(updateBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(logoutBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel1.setBackground(new java.awt.Color(62, 182, 80));\n jPanel1.setForeground(new java.awt.Color(255, 0, 0));\n\n jLabel1.setFont(new java.awt.Font(\"Calibri\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"Lecturer\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(21, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addGap(27, 27, 27))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n title.setFont(new java.awt.Font(\"Calibri\", 0, 36)); // NOI18N\n title.setText(\"Schedule\");\n\n daeLabel.setBackground(new java.awt.Color(255, 255, 255));\n daeLabel.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n daeLabel.setText(\"Date\");\n\n fromLabel.setBackground(new java.awt.Color(255, 255, 255));\n fromLabel.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n fromLabel.setText(\"From\");\n\n toLabel.setBackground(new java.awt.Color(255, 255, 255));\n toLabel.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n toLabel.setText(\"To\");\n\n statusLabel.setBackground(new java.awt.Color(255, 255, 255));\n statusLabel.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n statusLabel.setText(\"Status\");\n\n venueLabel.setBackground(new java.awt.Color(255, 255, 255));\n venueLabel.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n venueLabel.setText(\"Venue\");\n\n statusBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Available\", \"Unavailable\" }));\n\n submitBtn.setBackground(new java.awt.Color(62, 182, 80));\n submitBtn.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n submitBtn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n submitBtnMouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n submitBtnMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n submitBtnMouseExited(evt);\n }\n });\n\n submitLabel.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n submitLabel.setForeground(new java.awt.Color(255, 255, 255));\n submitLabel.setText(\"Submit\");\n\n javax.swing.GroupLayout submitBtnLayout = new javax.swing.GroupLayout(submitBtn);\n submitBtn.setLayout(submitBtnLayout);\n submitBtnLayout.setHorizontalGroup(\n submitBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, submitBtnLayout.createSequentialGroup()\n .addContainerGap(23, Short.MAX_VALUE)\n .addComponent(submitLabel)\n .addGap(23, 23, 23))\n );\n submitBtnLayout.setVerticalGroup(\n submitBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, submitBtnLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(submitLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 19, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n deleteBtn.setBackground(new java.awt.Color(225, 43, 56));\n deleteBtn.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n deleteBtn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n deleteBtnMouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n deleteBtnMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n deleteBtnMouseExited(evt);\n }\n });\n\n deleteLabel.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n deleteLabel.setForeground(new java.awt.Color(255, 255, 255));\n deleteLabel.setText(\"Delete\");\n\n javax.swing.GroupLayout deleteBtnLayout = new javax.swing.GroupLayout(deleteBtn);\n deleteBtn.setLayout(deleteBtnLayout);\n deleteBtnLayout.setHorizontalGroup(\n deleteBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(deleteBtnLayout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(deleteLabel)\n .addContainerGap(34, Short.MAX_VALUE))\n );\n deleteBtnLayout.setVerticalGroup(\n deleteBtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, deleteBtnLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(deleteLabel)\n .addContainerGap())\n );\n\n idDisplay.setEditable(false);\n idDisplay.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n\n scheduleTable.setFont(new java.awt.Font(\"Calibri\", 0, 14)); // NOI18N\n scheduleTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Date\", \"Status\"\n }\n ));\n scheduleTable.setFocusable(false);\n scheduleTable.setIntercellSpacing(new java.awt.Dimension(0, 0));\n scheduleTable.setRowHeight(25);\n scheduleTable.setSelectionBackground(new java.awt.Color(204, 255, 204));\n scheduleTable.setShowVerticalLines(false);\n scheduleTable.getTableHeader().setResizingAllowed(false);\n scheduleTable.getTableHeader().setReorderingAllowed(false);\n scheduleTable.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n scheduleTableMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(scheduleTable);\n\n jScrollPane2.setViewportView(jScrollPane1);\n\n javax.swing.GroupLayout bgPanelLayout = new javax.swing.GroupLayout(bgPanel);\n bgPanel.setLayout(bgPanelLayout);\n bgPanelLayout.setHorizontalGroup(\n bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(bgPanelLayout.createSequentialGroup()\n .addComponent(menuPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(bgPanelLayout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(bgPanelLayout.createSequentialGroup()\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(fromLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(daeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(statusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(bgPanelLayout.createSequentialGroup()\n .addGap(11, 11, 11)\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(title)\n .addGroup(bgPanelLayout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(fromField, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, bgPanelLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(bgPanelLayout.createSequentialGroup()\n .addGap(218, 218, 218)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, bgPanelLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(venueLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(toLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(toField, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(venueField, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(61, 61, 61))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, bgPanelLayout.createSequentialGroup()\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(bgPanelLayout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(bgPanelLayout.createSequentialGroup()\n .addComponent(statusBox, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(submitBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(101, 101, 101))))\n .addGroup(bgPanelLayout.createSequentialGroup()\n .addGap(166, 166, 166)\n .addComponent(idDisplay, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(deleteBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))))\n );\n bgPanelLayout.setVerticalGroup(\n bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(menuPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(bgPanelLayout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(bgPanelLayout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(7, 7, 7)\n .addComponent(title)\n .addGap(36, 36, 36)\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(daeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(venueField, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(venueLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fromLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(fromField, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(toField, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(toLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(statusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(submitBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(statusBox))\n .addGap(34, 34, 34)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(bgPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(idDisplay, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(deleteBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(59, Short.MAX_VALUE))\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 .addComponent(bgPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(bgPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private void createListFields(SGTable table) {\n\t\t\t\n\t\t ListGridField LIST_COLUMN_FIELD = new ListGridField(\"FIELD_ID\", Util.TI18N.LIST_COLUMN_FIELD(), 145); \n\t\t LIST_COLUMN_FIELD.setCanEdit(false);\n\t\t ListGridField LIST_COLUMN_CNAME = new ListGridField(\"FIELD_CNAME\", Util.TI18N.LIST_COLUMN_CNAME(), 105); \n\t\t LIST_COLUMN_CNAME.setCanEdit(false);\n\t\t ListGridField LIST_COLUMN_WIDTH = new ListGridField(\"FIELD_WIDTH\",Util.TI18N.LIST_COLUMN_WIDTH(),40); \n\t\t ListGridField LIST_SHOW_FLAG = new ListGridField(\"SHOW_FLAG\",Util.TI18N.LIST_SHOW_FLAG(),50);\n\t\t LIST_SHOW_FLAG.setType(ListGridFieldType.BOOLEAN);\n\t\t ListGridField MODIFY_FLAG=new ListGridField(\"MODIFY_FLAG\",\"\",50);\n\t\t MODIFY_FLAG.setType(ListGridFieldType.BOOLEAN);\n\t\t MODIFY_FLAG.setHidden(true);\n\t\t table.setFields(LIST_COLUMN_FIELD, LIST_COLUMN_CNAME, LIST_COLUMN_WIDTH, LIST_SHOW_FLAG,MODIFY_FLAG);\n\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 table_admininfo = new javax.swing.JTable();\n Button_back = new javax.swing.JButton();\n txt_time = new javax.swing.JTextField();\n date_txt = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n table_admininfo.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null},\n {null, null},\n {null, null},\n {null, null}\n },\n new String [] {\n \"Name\", \"Password\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class\n };\n boolean[] canEdit = new boolean [] {\n true, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(table_admininfo);\n\n Button_back.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n Button_back.setForeground(new java.awt.Color(0, 51, 255));\n Button_back.setText(\"Back\");\n Button_back.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Button_backActionPerformed(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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(428, 448, Short.MAX_VALUE)\n .addComponent(date_txt, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txt_time, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addComponent(Button_back))\n .addGroup(layout.createSequentialGroup()\n .addGap(79, 79, 79)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txt_time, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(date_txt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)\n .addComponent(Button_back)\n .addGap(26, 26, 26))\n );\n\n pack();\n }", "public TImerPanel ()\r\n\t{\r\n\t\t\r\n\t\tsetFont(new Font(\"Verdana\", Font.BOLD, 22));\r\n\t\tadd(setTime);\r\n\t\tsetT.start();\r\n\t\tsetVisible(true);\r\n\t}", "private void initTableView() {\n try {\n NonEditableDefaultTableModel dtm = new NonEditableDefaultTableModel();\n dtm.setColumnIdentifiers(new String[]{\"Id\", \"Code\", \"From\", \"To\", \"Prepared\", \"Status\"});\n\n for (PayrollPeriod p : ppDao.getPayrollPeriods()) {\n\n try {\n Object[] o = new Object[]{p.getId(), p,\n sdf.format(p.getDateFrom()), sdf.format(p.getDateTo()),\n sdf.format(p.getDatePrepared()), p.getStatus()};\n dtm.addRow(o);\n } catch (Exception ex) {\n }\n\n }\n tablePayrollPeriod.setModel(dtm);\n } catch (Exception ex) {\n Logger.getLogger(PayrollPeriodInformation.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "public FrmCrearEmpleado() {\n initComponents();\n tFecha.setDate(new Date());\n }", "public DisplayTable() {\n initComponents();\n }", "public void addListDataToDB() {\n\n for (int i = 1; i < 10; i++) {\n TimerDisplay timer = new TimerDisplay();\n timer.setCurrentDate(\"Jan 0\" + i + \" 2017 00:00\");\n timer.setEndDate(\"Jan 0\" + (i + 2) + \" 2017 00:00\");\n timer.setPercentage();\n\n databaseHelper.addDate(timer);\n //listTimers.add(timer);\n }\n }", "public TimetablePanel(MainWindow mainWindow, EventController eventController) {\n super();\n \n this.mainWindow = mainWindow;\n this.eventController = eventController;\n this.user = mainWindow.getUser();\n \n initComponents();\n initMyComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jPanel7 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n txtIdJadwal = new javax.swing.JTextField();\n jSeparator2 = new javax.swing.JSeparator();\n jLabel4 = new javax.swing.JLabel();\n jSeparator4 = new javax.swing.JSeparator();\n jLabel5 = new javax.swing.JLabel();\n jSeparator3 = new javax.swing.JSeparator();\n jLabel7 = new javax.swing.JLabel();\n jSeparator5 = new javax.swing.JSeparator();\n txtTanggal = new com.toedter.calendar.JDateChooser();\n txtJam = new lu.tudor.santec.jtimechooser.JTimeChooser();\n cmbTujuan = new javax.swing.JComboBox<>();\n btnTambah = new javax.swing.JPanel();\n lblTambah = new javax.swing.JLabel();\n btnSimpan = new javax.swing.JPanel();\n lblSimpan = new javax.swing.JLabel();\n jPanel8 = new javax.swing.JPanel();\n jScrollPane2 = new javax.swing.JScrollPane();\n tbDataJadwal = new javax.swing.JTable();\n btnHapus = new javax.swing.JPanel();\n lblHapus = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n lblRecord = new javax.swing.JLabel();\n\n setClosable(true);\n setTitle(\"Form Jadwal\");\n setFont(new java.awt.Font(\"Ubuntu\", 0, 12)); // NOI18N\n setFrameIcon(new javax.swing.ImageIcon(getClass().getResource(\"/source/Calendar_18px_1.png\"))); // NOI18N\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameClosed(evt);\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n jPanel2.setBackground(new java.awt.Color(106, 27, 154));\n\n jPanel7.setBackground(new java.awt.Color(156, 42, 225));\n jPanel7.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(156, 42, 225), 1, true));\n\n jLabel3.setFont(new java.awt.Font(\"Ubuntu\", 1, 12)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"ID Jadwal\");\n\n txtIdJadwal.setBackground(new java.awt.Color(156, 42, 225));\n txtIdJadwal.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n txtIdJadwal.setForeground(new java.awt.Color(255, 255, 255));\n txtIdJadwal.setBorder(null);\n txtIdJadwal.setCaretColor(new java.awt.Color(255, 255, 255));\n txtIdJadwal.setDisabledTextColor(new java.awt.Color(204, 204, 204));\n txtIdJadwal.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtIdJadwalKeyTyped(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Ubuntu\", 1, 12)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Tanggal\");\n\n jLabel5.setFont(new java.awt.Font(\"Ubuntu\", 1, 12)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"Jam\");\n\n jLabel7.setFont(new java.awt.Font(\"Ubuntu\", 1, 12)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 255));\n jLabel7.setText(\"Tujuan\");\n\n txtTanggal.setBackground(new java.awt.Color(156, 42, 225));\n txtTanggal.setDateFormatString(\"yyyy-M-d\");\n txtTanggal.setFont(new java.awt.Font(\"Ubuntu\", 0, 12)); // NOI18N\n\n txtJam.setForeground(new java.awt.Color(255, 255, 255));\n txtJam.setFont(new java.awt.Font(\"Ubuntu\", 0, 12)); // NOI18N\n\n cmbTujuan.setBackground(new java.awt.Color(156, 42, 225));\n cmbTujuan.setFont(new java.awt.Font(\"Ubuntu\", 0, 12)); // NOI18N\n cmbTujuan.setForeground(new java.awt.Color(255, 255, 255));\n cmbTujuan.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"-- Pilih --\", \"Cikarang - Jakarta\", \"Jakarta - Bandung\" }));\n\n btnTambah.setBackground(new java.awt.Color(21, 184, 90));\n btnTambah.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnTambahMouseClicked(evt);\n }\n });\n\n lblTambah.setBackground(new java.awt.Color(21, 184, 90));\n lblTambah.setFont(new java.awt.Font(\"Ubuntu\", 1, 14)); // NOI18N\n lblTambah.setForeground(new java.awt.Color(255, 255, 255));\n lblTambah.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/source/ic_add_white_18dp.png\"))); // NOI18N\n lblTambah.setText(\"Tambah\");\n\n javax.swing.GroupLayout btnTambahLayout = new javax.swing.GroupLayout(btnTambah);\n btnTambah.setLayout(btnTambahLayout);\n btnTambahLayout.setHorizontalGroup(\n btnTambahLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(btnTambahLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblTambah)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n btnTambahLayout.setVerticalGroup(\n btnTambahLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(btnTambahLayout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(lblTambah)\n .addGap(5, 5, 5))\n );\n\n btnSimpan.setBackground(new java.awt.Color(0, 113, 255));\n btnSimpan.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnSimpanMouseClicked(evt);\n }\n });\n\n lblSimpan.setFont(new java.awt.Font(\"Ubuntu\", 1, 14)); // NOI18N\n lblSimpan.setForeground(new java.awt.Color(255, 255, 255));\n lblSimpan.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/source/ic_save_white_18dp.png\"))); // NOI18N\n lblSimpan.setText(\"Simpan\");\n\n javax.swing.GroupLayout btnSimpanLayout = new javax.swing.GroupLayout(btnSimpan);\n btnSimpan.setLayout(btnSimpanLayout);\n btnSimpanLayout.setHorizontalGroup(\n btnSimpanLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(btnSimpanLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblSimpan)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n btnSimpanLayout.setVerticalGroup(\n btnSimpanLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(btnSimpanLayout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(lblSimpan)\n .addGap(5, 5, 5))\n );\n\n javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);\n jPanel7.setLayout(jPanel7Layout);\n jPanel7Layout.setHorizontalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addComponent(btnTambah, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSimpan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator5)\n .addComponent(cmbTujuan, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jSeparator3)\n .addComponent(txtIdJadwal)\n .addComponent(jSeparator2)\n .addComponent(txtTanggal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jSeparator4)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel5)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addGap(4, 4, 4)\n .addComponent(jLabel4))\n .addComponent(jLabel7)\n .addComponent(txtJam, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addGap(23, 23, 23))))\n );\n jPanel7Layout.setVerticalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel3)\n .addGap(0, 0, 0)\n .addComponent(txtIdJadwal, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jLabel4)\n .addGap(0, 0, 0)\n .addComponent(txtTanggal, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtJam, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addGap(0, 0, 0)\n .addComponent(cmbTujuan, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10))\n .addComponent(jSeparator5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnTambah, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnSimpan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(13, Short.MAX_VALUE))\n );\n\n jPanel8.setBackground(new java.awt.Color(156, 42, 225));\n\n jScrollPane2.setBackground(new java.awt.Color(51, 51, 51));\n jScrollPane2.setForeground(new java.awt.Color(255, 255, 255));\n\n tbDataJadwal.setForeground(new java.awt.Color(51, 51, 51));\n tbDataJadwal.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null}\n },\n new String [] {\n \"ID Jadwal\", \"Tanggal\", \"Jam\", \"Tujuan\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tbDataJadwal.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tbDataJadwalMouseClicked(evt);\n }\n });\n jScrollPane2.setViewportView(tbDataJadwal);\n\n btnHapus.setBackground(new java.awt.Color(240, 50, 95));\n btnHapus.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnHapusMouseClicked(evt);\n }\n });\n\n lblHapus.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n lblHapus.setForeground(new java.awt.Color(255, 255, 255));\n lblHapus.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/source/ic_delete_white_18dp.png\"))); // NOI18N\n\n javax.swing.GroupLayout btnHapusLayout = new javax.swing.GroupLayout(btnHapus);\n btnHapus.setLayout(btnHapusLayout);\n btnHapusLayout.setHorizontalGroup(\n btnHapusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, btnHapusLayout.createSequentialGroup()\n .addGap(3, 3, 3)\n .addComponent(lblHapus)\n .addGap(3, 3, 3))\n );\n btnHapusLayout.setVerticalGroup(\n btnHapusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(btnHapusLayout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(lblHapus)\n .addGap(5, 5, 5))\n );\n\n jLabel8.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n jLabel8.setForeground(new java.awt.Color(255, 255, 255));\n jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel8.setText(\"Tabel Data Jadwal : klik 2x untuk ubah/hapus\");\n\n lblRecord.setFont(new java.awt.Font(\"Ubuntu\", 1, 12)); // NOI18N\n lblRecord.setForeground(new java.awt.Color(255, 255, 255));\n lblRecord.setText(\"Record : \");\n\n javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);\n jPanel8.setLayout(jPanel8Layout);\n jPanel8Layout.setHorizontalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblRecord)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()\n .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane2))\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addGap(96, 96, 96)\n .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, 383, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnHapus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n jPanel8Layout.setVerticalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnHapus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addGap(0, 0, 0)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addGap(7, 7, 7)\n .addComponent(lblRecord)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(10, 10, 10))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(11, 11, 11))\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(0, 0, 0))\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 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void enlazarListadoTabla() {\n tblCursos.setItems(listaCursos);\n\n //Enlazar columnas con atributos\n clmNombre.setCellValueFactory(new PropertyValueFactory<Curso, String>(\"nombre\"));\n clmAmbito.setCellValueFactory(new PropertyValueFactory<Curso, String>(\"familiaProfesional\"));\n clmDuracion.setCellValueFactory(new PropertyValueFactory<Curso, Integer>(\"duracion\"));\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel9 = new javax.swing.JLabel();\n panel2 = new java.awt.Panel();\n jLabel1 = new javax.swing.JLabel();\n jPanel6 = new javax.swing.JPanel();\n panel3 = new java.awt.Panel();\n button2 = new java.awt.Button();\n jButton4 = new javax.swing.JButton();\n jButton8 = new javax.swing.JButton();\n jButton9 = new javax.swing.JButton();\n jButton10 = new javax.swing.JButton();\n jButton11 = new javax.swing.JButton();\n jButton12 = new javax.swing.JButton();\n jPanel3 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n\n jLabel9.setText(\"Latest Lecturer:\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n panel2.setBackground(new java.awt.Color(95, 158, 160));\n panel2.setPreferredSize(new java.awt.Dimension(1000, 100));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"Time Table Generator\");\n\n javax.swing.GroupLayout panel2Layout = new javax.swing.GroupLayout(panel2);\n panel2.setLayout(panel2Layout);\n panel2Layout.setHorizontalGroup(\n panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel2Layout.createSequentialGroup()\n .addContainerGap(421, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(373, 373, 373))\n );\n panel2Layout.setVerticalGroup(\n panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panel2Layout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(37, Short.MAX_VALUE))\n );\n\n jPanel6.setBackground(new java.awt.Color(176, 224, 230));\n jPanel6.setPreferredSize(new java.awt.Dimension(1000, 525));\n jPanel6.setRequestFocusEnabled(false);\n\n panel3.setBackground(new java.awt.Color(64, 224, 208));\n panel3.setPreferredSize(new java.awt.Dimension(200, 525));\n\n button2.setLabel(\"button1\");\n\n jButton4.setBackground(new java.awt.Color(46, 139, 87));\n jButton4.setText(\"Session Management\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jButton8.setBackground(new java.awt.Color(46, 139, 87));\n jButton8.setText(\"Generate Table\");\n jButton8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton8ActionPerformed(evt);\n }\n });\n\n jButton9.setBackground(new java.awt.Color(46, 139, 87));\n jButton9.setText(\"Data Management\");\n jButton9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton9ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout panel3Layout = new javax.swing.GroupLayout(panel3);\n panel3.setLayout(panel3Layout);\n panel3Layout.setHorizontalGroup(\n panel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel3Layout.createSequentialGroup()\n .addContainerGap(30, Short.MAX_VALUE)\n .addGroup(panel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23))\n );\n panel3Layout.setVerticalGroup(\n panel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panel3Layout.createSequentialGroup()\n .addGap(117, 117, 117)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(222, Short.MAX_VALUE))\n );\n\n jButton10.setBackground(new java.awt.Color(105, 105, 105));\n jButton10.setText(\"Students\");\n jButton10.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton10ActionPerformed(evt);\n }\n });\n\n jButton11.setBackground(new java.awt.Color(105, 105, 105));\n jButton11.setText(\"Lecturers\");\n jButton11.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton11ActionPerformed(evt);\n }\n });\n\n jButton12.setBackground(new java.awt.Color(105, 105, 105));\n jButton12.setText(\"Locations\");\n jButton12.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton12ActionPerformed(evt);\n }\n });\n\n jPanel3.setBackground(new java.awt.Color(169, 169, 169));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setText(\"What's new\");\n\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jLabel4.setText(\"Latest Group:\");\n\n jLabel5.setText(\"Latest Subject:\");\n\n jLabel6.setText(\"Latest Lecturer:\");\n\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jTextField3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel3)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addGap(338, 338, 338))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(49, 49, 49)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(68, 68, 68)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(43, Short.MAX_VALUE))))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jLabel6)\n .addComponent(jLabel4)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 353, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 278, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 278, Short.MAX_VALUE)\n );\n\n jLabel7.setText(\"Registered Lecturers=\");\n\n jLabel8.setText(\"Registered Students=\");\n\n jLabel10.setText(\"Registerd subjects=\");\n\n jLabel11.setText(\"Registerd Locations=\");\n\n jLabel12.setText(\"jLabel12\");\n\n jLabel13.setText(\"jLabel13\");\n\n jLabel14.setText(\"jLabel14\");\n\n jLabel15.setText(\"jLabel15\");\n\n javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addComponent(panel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(97, 97, 97)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(94, 94, 94)\n .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel6Layout.createSequentialGroup()\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel12)\n .addGap(38, 38, 38)\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel13))\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel6Layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel14)\n .addGap(27, 27, 27)\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel15)))))))\n .addGap(0, 49, Short.MAX_VALUE))\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addGap(41, 41, 41)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(23, 23, 23)\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jLabel12)\n .addComponent(jLabel8)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10)\n .addComponent(jLabel14)\n .addComponent(jLabel11)\n .addComponent(jLabel15))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(19, 19, 19))\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addComponent(panel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\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 .addComponent(panel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(panel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0))\n );\n\n pack();\n }", "public void addTableGui() {\n\t\tDefaultTableModel mTableModel = new DefaultTableModel();\r\n\t\tmTable = new JTable(mTableModel);\r\n\r\n\t\tmTableModel.addColumn(\"MSSV\");\r\n\t\tmTableModel.addColumn(\"HoTen\");\r\n\t\tmTableModel.addColumn(\"GioiTinh\");\r\n\t\tmTableModel.addColumn(\"NTNS\");\r\n\t\tJScrollPane mJScrollPane = new JScrollPane(mTable);\r\n\t\tmJScrollPane.setPreferredSize(new Dimension(760, 310));\r\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tc.ipady = 40; //make this component tall\r\n\t\tc.weightx = 0.0;\r\n\t\tc.gridwidth = 3;\r\n\t\tc.gridx = 0;\r\n\t\tc.gridy = 1;\r\n\t\tpanel.add(mJScrollPane,c);\r\n\t}", "public lectManage() {\n initComponents();\n tableComponents();\n viewSchedule();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton2 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel30 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n t2 = new javax.swing.JTextField();\n jButton5 = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n l2 = new javax.swing.JList();\n jLabel24 = new javax.swing.JLabel();\n jLabel39 = new javax.swing.JLabel();\n mob = new javax.swing.JTextField();\n july = new javax.swing.JTextField();\n jLabel21 = new javax.swing.JLabel();\n jLabel36 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel22 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel23 = new javax.swing.JLabel();\n jLabel26 = new javax.swing.JLabel();\n jLabel27 = new javax.swing.JLabel();\n jLabel28 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel29 = new javax.swing.JLabel();\n nov = new javax.swing.JTextField();\n adno = new javax.swing.JTextField();\n jan = new javax.swing.JTextField();\n jLabel25 = new javax.swing.JLabel();\n jLabel40 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n fname = new javax.swing.JTextField();\n jLabel42 = new javax.swing.JLabel();\n dob = new javax.swing.JTextField();\n jLabel43 = new javax.swing.JLabel();\n sec = new javax.swing.JTextField();\n jLabel44 = new javax.swing.JLabel();\n add = new javax.swing.JTextField();\n feb = new javax.swing.JTextField();\n jLabel32 = new javax.swing.JLabel();\n jLabel31 = new javax.swing.JLabel();\n april = new javax.swing.JTextField();\n jLabel33 = new javax.swing.JLabel();\n name = new javax.swing.JTextField();\n may = new javax.swing.JTextField();\n jLabel45 = new javax.swing.JLabel();\n march = new javax.swing.JTextField();\n clas = new javax.swing.JTextField();\n jLabel34 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n dec = new javax.swing.JTextField();\n june = new javax.swing.JTextField();\n jLabel15 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel41 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n jLabel35 = new javax.swing.JLabel();\n jLabel18 = new javax.swing.JLabel();\n jLabel19 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n aug = new javax.swing.JTextField();\n jLabel37 = new javax.swing.JLabel();\n sept = new javax.swing.JTextField();\n jLabel38 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n oct = new javax.swing.JTextField();\n jButton4 = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n jLabel48 = new javax.swing.JLabel();\n co2 = new javax.swing.JComboBox<>();\n jButton3 = new javax.swing.JButton();\n jLabel46 = new javax.swing.JLabel();\n tot = new javax.swing.JTextField();\n cb1 = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jLabel47 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setPreferredSize(new java.awt.Dimension(1320, 720));\n setResizable(false);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButton2.setForeground(new java.awt.Color(255, 135, 15));\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Home.jpg\"))); // NOI18N\n jButton2.setText(\" Return to HOME\");\n jButton2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 640, -1, 48));\n\n jLabel5.setFont(new java.awt.Font(\"Microsoft JhengHei\", 2, 14)); // NOI18N\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel5.setText(\"**Designed By, Saurav Kumar\");\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(1100, 660, 216, -1));\n\n jLabel1.setFont(new java.awt.Font(\"Microsoft JhengHei UI Light\", 0, 30)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"FEEs Submission Arena\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 30, 797, 50));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel4.setText(\"SESSION: 2016-2017\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 80, -1, -1));\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 0, 0));\n jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel6.setText(\"#Click on Admission No. to View Details.\");\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 250, -1, -1));\n\n jLabel30.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 15)); // NOI18N\n jLabel30.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel30.setText(\"DataBase : STUDENT\");\n getContentPane().add(jLabel30, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 220, 241, -1));\n\n jLabel8.setBackground(new java.awt.Color(204, 255, 204));\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel8.setText(\"# Enter Admission No. :\");\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 100, -1, -1));\n\n t2.setBackground(new java.awt.Color(204, 255, 204));\n t2.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n getContentPane().add(t2, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 130, 341, -1));\n\n jButton5.setBackground(new java.awt.Color(0, 0, 255));\n jButton5.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jButton5.setForeground(new java.awt.Color(255, 255, 255));\n jButton5.setText(\"SEARCH DataBase\");\n jButton5.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton5, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 170, 339, 36));\n\n l2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Admission No.\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Microsoft JhengHei\", 0, 14))); // NOI18N\n l2.setToolTipText(\"\");\n l2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n l2.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n l2ValueChanged(evt);\n }\n });\n jScrollPane2.setViewportView(l2);\n\n getContentPane().add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 270, 241, 280));\n\n jLabel24.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel24.setText(\"(8-digits)\");\n getContentPane().add(jLabel24, new org.netbeans.lib.awtextra.AbsoluteConstraints(1160, 140, 115, -1));\n\n jLabel39.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel39.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel39.setText(\"November :\");\n getContentPane().add(jLabel39, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 480, -1, -1));\n\n mob.setEditable(false);\n mob.setBackground(new java.awt.Color(255, 255, 204));\n mob.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n getContentPane().add(mob, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 350, 507, -1));\n\n july.setEditable(false);\n july.setBackground(new java.awt.Color(255, 255, 204));\n july.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n getContentPane().add(july, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 480, 50, -1));\n\n jLabel21.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel21.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel21.setText(\"(50-characters)\");\n getContentPane().add(jLabel21, new org.netbeans.lib.awtextra.AbsoluteConstraints(1160, 170, 115, -1));\n\n jLabel36.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel36.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel36.setText(\"August :\");\n getContentPane().add(jLabel36, new org.netbeans.lib.awtextra.AbsoluteConstraints(700, 450, -1, -1));\n\n jLabel10.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel10.setText(\"Father's Name\");\n getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 200, 131, -1));\n\n jLabel22.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel22.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel22.setText(\"(50-characters)\");\n getContentPane().add(jLabel22, new org.netbeans.lib.awtextra.AbsoluteConstraints(1160, 200, 115, -1));\n\n jLabel11.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel11.setText(\"Date Of Birth (DOB)\");\n getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 230, -1, -1));\n\n jLabel23.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel23.setText(\"YYYY-MM-DD\");\n getContentPane().add(jLabel23, new org.netbeans.lib.awtextra.AbsoluteConstraints(1160, 230, 115, -1));\n\n jLabel26.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel26.setText(\"+91\");\n getContentPane().add(jLabel26, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 350, -1, -1));\n\n jLabel27.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel27.setText(\" : \");\n getContentPane().add(jLabel27, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 140, -1, -1));\n\n jLabel28.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel28.setText(\" : \");\n getContentPane().add(jLabel28, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 170, -1, -1));\n\n jLabel13.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel13.setText(\"Section\");\n getContentPane().add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 290, 138, -1));\n\n jLabel29.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel29.setText(\" : \");\n getContentPane().add(jLabel29, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 200, -1, -1));\n\n nov.setEditable(false);\n nov.setBackground(new java.awt.Color(255, 255, 204));\n nov.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n getContentPane().add(nov, new org.netbeans.lib.awtextra.AbsoluteConstraints(910, 480, 50, -1));\n\n adno.setEditable(false);\n adno.setBackground(new java.awt.Color(255, 255, 204));\n adno.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n getContentPane().add(adno, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 140, 537, -1));\n\n jan.setEditable(false);\n jan.setBackground(new java.awt.Color(255, 255, 204));\n jan.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n getContentPane().add(jan, new org.netbeans.lib.awtextra.AbsoluteConstraints(1060, 480, 50, -1));\n\n jLabel25.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel25.setText(\"(100-characters)\");\n getContentPane().add(jLabel25, new org.netbeans.lib.awtextra.AbsoluteConstraints(1160, 320, 115, -1));\n\n jLabel40.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel40.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel40.setText(\"December :\");\n getContentPane().add(jLabel40, new org.netbeans.lib.awtextra.AbsoluteConstraints(980, 450, -1, -1));\n\n jLabel14.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel14.setText(\"Address\");\n getContentPane().add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 320, 138, -1));\n\n fname.setEditable(false);\n fname.setBackground(new java.awt.Color(255, 255, 204));\n fname.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n getContentPane().add(fname, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 200, 537, -1));\n\n jLabel42.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel42.setForeground(new java.awt.Color(0, 102, 102));\n jLabel42.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel42.setText(\"Fees Not Paid=\\\"NO\\\"\");\n getContentPane().add(jLabel42, new org.netbeans.lib.awtextra.AbsoluteConstraints(860, 510, 137, 37));\n\n dob.setEditable(false);\n dob.setBackground(new java.awt.Color(255, 255, 204));\n dob.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n getContentPane().add(dob, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 230, 537, -1));\n\n jLabel43.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel43.setForeground(new java.awt.Color(0, 102, 102));\n jLabel43.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel43.setText(\"Fees Paid=\\\"YES\\\"\");\n getContentPane().add(jLabel43, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 510, 126, 37));\n\n sec.setEditable(false);\n sec.setBackground(new java.awt.Color(255, 255, 204));\n sec.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n getContentPane().add(sec, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 290, 537, -1));\n\n jLabel44.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel44.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel44.setText(\"February :\");\n getContentPane().add(jLabel44, new org.netbeans.lib.awtextra.AbsoluteConstraints(1140, 450, -1, -1));\n\n add.setEditable(false);\n add.setBackground(new java.awt.Color(255, 255, 204));\n add.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n getContentPane().add(add, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 320, 537, -1));\n\n feb.setEditable(false);\n feb.setBackground(new java.awt.Color(255, 255, 204));\n feb.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n getContentPane().add(feb, new org.netbeans.lib.awtextra.AbsoluteConstraints(1210, 450, 50, -1));\n\n jLabel32.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel32.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel32.setText(\"April :\");\n getContentPane().add(jLabel32, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 450, -1, -1));\n\n jLabel31.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n jLabel31.setForeground(new java.awt.Color(51, 0, 204));\n jLabel31.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel31.setText(\"# Fee Status #\");\n getContentPane().add(jLabel31, new org.netbeans.lib.awtextra.AbsoluteConstraints(780, 420, -1, -1));\n\n april.setEditable(false);\n april.setBackground(new java.awt.Color(255, 255, 204));\n april.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n getContentPane().add(april, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 450, 50, -1));\n\n jLabel33.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel33.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel33.setText(\"May :\");\n getContentPane().add(jLabel33, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 480, -1, -1));\n\n name.setEditable(false);\n name.setBackground(new java.awt.Color(255, 255, 204));\n name.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n getContentPane().add(name, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 170, 537, -1));\n\n may.setEditable(false);\n may.setBackground(new java.awt.Color(255, 255, 204));\n may.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n may.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mayActionPerformed(evt);\n }\n });\n getContentPane().add(may, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 480, 50, -1));\n\n jLabel45.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel45.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel45.setText(\"March :\");\n getContentPane().add(jLabel45, new org.netbeans.lib.awtextra.AbsoluteConstraints(1150, 480, -1, -1));\n\n march.setEditable(false);\n march.setBackground(new java.awt.Color(255, 255, 204));\n march.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n getContentPane().add(march, new org.netbeans.lib.awtextra.AbsoluteConstraints(1210, 480, 50, -1));\n\n clas.setEditable(false);\n clas.setBackground(new java.awt.Color(255, 255, 204));\n clas.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n clas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n clasActionPerformed(evt);\n }\n });\n getContentPane().add(clas, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 260, 538, -1));\n\n jLabel34.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel34.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel34.setText(\"June :\");\n getContentPane().add(jLabel34, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 450, -1, -1));\n\n jLabel3.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel3.setText(\"Admission No.*\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 140, 131, -1));\n\n dec.setEditable(false);\n dec.setBackground(new java.awt.Color(255, 255, 204));\n dec.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n getContentPane().add(dec, new org.netbeans.lib.awtextra.AbsoluteConstraints(1060, 450, 50, -1));\n\n june.setEditable(false);\n june.setBackground(new java.awt.Color(255, 255, 204));\n june.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n getContentPane().add(june, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 450, 50, -1));\n\n jLabel15.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel15.setText(\"Mobile No. \");\n getContentPane().add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 350, 138, -1));\n\n jLabel16.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel16.setText(\" : \");\n getContentPane().add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 230, -1, -1));\n\n jLabel9.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel9.setText(\"Name\");\n getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 170, 131, -1));\n\n jLabel41.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel41.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel41.setText(\"January :\");\n getContentPane().add(jLabel41, new org.netbeans.lib.awtextra.AbsoluteConstraints(1000, 480, -1, -1));\n\n jLabel17.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel17.setText(\" : \");\n getContentPane().add(jLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 260, -1, -1));\n\n jLabel35.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel35.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel35.setText(\"July :\");\n getContentPane().add(jLabel35, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 480, -1, -1));\n\n jLabel18.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel18.setText(\" : \");\n getContentPane().add(jLabel18, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 290, -1, -1));\n\n jLabel19.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel19.setText(\" : \");\n getContentPane().add(jLabel19, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 350, -1, -1));\n\n jLabel20.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel20.setText(\" : \");\n getContentPane().add(jLabel20, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 320, -1, -1));\n\n aug.setEditable(false);\n aug.setBackground(new java.awt.Color(255, 255, 204));\n aug.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n getContentPane().add(aug, new org.netbeans.lib.awtextra.AbsoluteConstraints(760, 450, 50, -1));\n\n jLabel37.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel37.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel37.setText(\"September :\");\n getContentPane().add(jLabel37, new org.netbeans.lib.awtextra.AbsoluteConstraints(680, 480, -1, -1));\n\n sept.setEditable(false);\n sept.setBackground(new java.awt.Color(255, 255, 204));\n sept.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n getContentPane().add(sept, new org.netbeans.lib.awtextra.AbsoluteConstraints(760, 480, 50, -1));\n\n jLabel38.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel38.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel38.setText(\"October :\");\n getContentPane().add(jLabel38, new org.netbeans.lib.awtextra.AbsoluteConstraints(840, 450, -1, -1));\n\n jLabel12.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel12.setText(\"Class\");\n getContentPane().add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 260, 138, -1));\n\n oct.setEditable(false);\n oct.setBackground(new java.awt.Color(255, 255, 204));\n oct.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n getContentPane().add(oct, new org.netbeans.lib.awtextra.AbsoluteConstraints(910, 450, 50, -1));\n\n jButton4.setBackground(new java.awt.Color(255, 0, 51));\n jButton4.setFont(new java.awt.Font(\"Tahoma\", 1, 15)); // NOI18N\n jButton4.setForeground(new java.awt.Color(255, 255, 255));\n jButton4.setText(\"*Pay FEEs Now !\");\n jButton4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(1080, 550, 198, 46));\n\n jLabel7.setFont(new java.awt.Font(\"Microsoft JhengHei Light\", 0, 18)); // NOI18N\n jLabel7.setText(\"*Total Fee :\");\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 560, -1, -1));\n\n jLabel48.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n jLabel48.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel48.setText(\"*Select MONTH :\");\n getContentPane().add(jLabel48, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 540, -1, -1));\n\n co2.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n co2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Select\", \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"November\", \"December\" }));\n getContentPane().add(co2, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 540, 150, -1));\n\n jButton3.setBackground(new java.awt.Color(204, 255, 204));\n jButton3.setFont(new java.awt.Font(\"Tahoma\", 1, 15)); // NOI18N\n jButton3.setForeground(new java.awt.Color(255, 0, 153));\n jButton3.setText(\"Reset Fields\");\n jButton3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(950, 550, -1, 46));\n\n jLabel46.setFont(new java.awt.Font(\"Tahoma\", 0, 26)); // NOI18N\n jLabel46.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel46.setText(\"₹\");\n getContentPane().add(jLabel46, new org.netbeans.lib.awtextra.AbsoluteConstraints(760, 560, -1, 26));\n\n tot.setEditable(false);\n tot.setBackground(new java.awt.Color(204, 255, 204));\n tot.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n tot.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n getContentPane().add(tot, new org.netbeans.lib.awtextra.AbsoluteConstraints(780, 560, 161, -1));\n\n cb1.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n cb1.setText(\"Include Bus Service.\");\n getContentPane().add(cb1, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 580, -1, -1));\n\n jButton1.setBackground(new java.awt.Color(102, 255, 204));\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jButton1.setText(\"Show Total FEEs\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 610, 150, -1));\n\n jLabel47.setFont(new java.awt.Font(\"Tahoma\", 2, 12)); // NOI18N\n jLabel47.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel47.setText(\"(*April Fees includes Annual Fees also.)\");\n getContentPane().add(jLabel47, new org.netbeans.lib.awtextra.AbsoluteConstraints(720, 600, 217, -1));\n\n pack();\n }", "private void buildTable() {\n\t\tObservableList<Record> data;\r\n\t\tdata = FXCollections.observableArrayList();\r\n\r\n\t\t// get records from the database\r\n\t\tArrayList<Record> list = new ArrayList<Record>();\r\n\t\tlist = getItemsToAdd();\r\n\r\n\t\t// add records to the table\r\n\t\tfor (Record i : list) {\r\n\t\t\tSystem.out.println(\"Add row: \" + i);\r\n\t\t\tdata.add(i);\r\n\t\t}\r\n\t\ttableView.setItems(data);\r\n\t}", "public static Table getcurrentTable(List<Currency> currencies, List<Time>times){\n\n\n Time currentTime = times.get(times.size()-1);\n Time yesterdayTime = times.get(times.size()-2);\n\n\n Table currentTable = new Table(currentTime.getDate(),currencies,currentTime);\n currentTable.setYesterdayTime(yesterdayTime);\n currentTable.setTodayTime(currentTime);\n return currentTable;\n }", "@Override\n public void displayListTraineeInClass(ArrayList<TraineeDto> list) {\n DefaultTableModel _dm = (DefaultTableModel) tbTrainee.getModel();\n\n if (_dm.getRowCount() != 0) {\n _dm.getDataVector().removeAllElements();\n _dm.fireTableDataChanged();\n }\n Object rowData[] = new Object[4];\n for (int i = 0; i < list.size(); i++) {\n rowData[0] = list.get(i).getId();\n rowData[1] = list.get(i).getName();\n rowData[2] = list.get(i).getStartedDate();\n rowData[3] = list.get(i).getCourseMark();\n\n _dm.addRow(rowData);\n\n }\n }", "public AddNewJobPanel() {\n initComponents();\n\n DateTime now = new DateTime();\n initializeComboBoxes();\n }", "private void initComponents()//GEN-BEGIN:initComponents\n {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n scheduleTable = new javax.swing.JTable();\n selectDepartmentLabel = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n viewScheduleButton = new javax.swing.JButton();\n DepartComboBox = new javax.swing.JComboBox<>();\n stageComboBox = new javax.swing.JComboBox<>();\n\n setBackground(new java.awt.Color(245, 245, 245));\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n scheduleTable.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 18)); // NOI18N\n scheduleTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][]\n {\n {null, null, null, null, null, null, null, null, null},\n {null, null, null, null, null, null, null, null, null},\n {null, null, null, null, null, null, null, null, null},\n {null, null, null, null, null, null, null, null, null},\n {null, null, null, null, null, null, null, null, null}\n },\n new String []\n {\n \"Time Slot\", \"First\", \"\", \"Second\", \"\", \"Third\", \"\", \"Fourth\", \"\"\n }\n )\n {\n Class[] types = new Class []\n {\n java.lang.String.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class\n };\n boolean[] canEdit = new boolean []\n {\n false, false, false, false, false, false, true, true, true\n };\n\n public Class getColumnClass(int columnIndex)\n {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex)\n {\n return canEdit [columnIndex];\n }\n });\n scheduleTable.setCellSelectionEnabled(true);\n scheduleTable.setFillsViewportHeight(true);\n scheduleTable.setGridColor(new java.awt.Color(102, 102, 102));\n scheduleTable.setIntercellSpacing(new java.awt.Dimension(2, 0));\n scheduleTable.setRowHeight(24);\n scheduleTable.setSelectionBackground(new java.awt.Color(0, 153, 204));\n scheduleTable.setShowHorizontalLines(false);\n scheduleTable.setShowVerticalLines(false);\n jScrollPane1.setViewportView(scheduleTable);\n if (scheduleTable.getColumnModel().getColumnCount() > 0)\n {\n scheduleTable.getColumnModel().getColumn(0).setHeaderValue(\"Time Slot\");\n scheduleTable.getColumnModel().getColumn(1).setHeaderValue(\"First\");\n scheduleTable.getColumnModel().getColumn(2).setHeaderValue(\"\");\n scheduleTable.getColumnModel().getColumn(3).setHeaderValue(\"Second\");\n scheduleTable.getColumnModel().getColumn(4).setHeaderValue(\"\");\n scheduleTable.getColumnModel().getColumn(5).setHeaderValue(\"Third\");\n scheduleTable.getColumnModel().getColumn(6).setHeaderValue(\"\");\n scheduleTable.getColumnModel().getColumn(7).setHeaderValue(\"Fourth\");\n scheduleTable.getColumnModel().getColumn(8).setHeaderValue(\"\");\n }\n\n add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 160, 1112, 492));\n\n selectDepartmentLabel.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 14)); // NOI18N\n selectDepartmentLabel.setText(\"Select Department:\");\n add(selectDepartmentLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 40, 135, 36));\n\n jLabel1.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 14)); // NOI18N\n jLabel1.setText(\"Select Stage:\");\n add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 40, 137, 37));\n\n viewScheduleButton.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 14)); // NOI18N\n viewScheduleButton.setText(\"View Schedule\");\n viewScheduleButton.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n viewScheduleButtonActionPerformed(evt);\n }\n });\n add(viewScheduleButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 60, 185, 37));\n\n DepartComboBox.setBackground(new java.awt.Color(255, 255, 255));\n DepartComboBox.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 18)); // NOI18N\n DepartComboBox.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n DepartComboBoxActionPerformed(evt);\n }\n });\n add(DepartComboBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 70, 290, 50));\n\n stageComboBox.setBackground(new java.awt.Color(255, 255, 255));\n stageComboBox.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 18)); // NOI18N\n stageComboBox.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n stageComboBoxActionPerformed(evt);\n }\n });\n add(stageComboBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 70, 310, 50));\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jPanel4 = new javax.swing.JPanel();\n show = new javax.swing.JButton();\n jLabel39 = new javax.swing.JLabel();\n date = new com.toedter.calendar.JDateChooser();\n jLabel35 = new javax.swing.JLabel();\n time = new javax.swing.JComboBox<>();\n jLabel31 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox<>();\n jLabel40 = new javax.swing.JLabel();\n jComboBox3 = new javax.swing.JComboBox<>();\n sitClass = new javax.swing.JComboBox<>();\n jLabel36 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n table = new javax.swing.JTable();\n jPanel5 = new javax.swing.JPanel();\n jLabel6 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel3.setBackground(new java.awt.Color(51, 153, 255));\n\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/bangladeshrailway/train.png\"))); // NOI18N\n\n jLabel2.setBackground(new java.awt.Color(51, 153, 255));\n jLabel2.setFont(new java.awt.Font(\"Consolas\", 0, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"Bangladesh Railway\");\n\n jLabel4.setBackground(new java.awt.Color(51, 153, 255));\n jLabel4.setFont(new java.awt.Font(\"Consolas\", 0, 36)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel4.setText(\"Welcome\");\n\n jLabel5.setFont(new java.awt.Font(\"Consolas\", 0, 24)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"to\");\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addGap(105, 105, 105)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(95, 95, 95))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(61, 61, 61)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel5)\n .addGap(149, 149, 149))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel5)\n .addGap(18, 18, 18)\n .addComponent(jLabel2)\n .addContainerGap(101, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 328, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel4.setBackground(new java.awt.Color(255, 255, 255));\n\n show.setBackground(new java.awt.Color(51, 153, 255));\n show.setFont(new java.awt.Font(\"Consolas\", 0, 18)); // NOI18N\n show.setForeground(new java.awt.Color(255, 255, 255));\n show.setText(\"Show Details\");\n show.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n showActionPerformed(evt);\n }\n });\n show.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n showKeyPressed(evt);\n }\n });\n\n jLabel39.setFont(new java.awt.Font(\"Consolas\", 0, 18)); // NOI18N\n jLabel39.setText(\"Date\");\n\n jLabel35.setFont(new java.awt.Font(\"Consolas\", 0, 18)); // NOI18N\n jLabel35.setText(\"Time\");\n\n time.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"07:00\", \"07:45\", \"08:30\", \"15:00\", \"22:30\", \"23:30\" }));\n\n jLabel31.setFont(new java.awt.Font(\"Consolas\", 0, 18)); // NOI18N\n jLabel31.setText(\"From\");\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Dhaka\", \"Chittagong\", \"Rajshahi\", \"Khulna\", \"Sylhet\", \"Noakhali\", \"Jamalpur\", \"Rangpur\", \"Comilla\", \"Mymensingh\" }));\n\n jLabel40.setFont(new java.awt.Font(\"Consolas\", 0, 18)); // NOI18N\n jLabel40.setText(\"To\");\n\n jComboBox3.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Sylhet\", \"Dhaka\", \"Chittagong\", \"Rajshahi\", \"Khulna\", \"Noakhali\", \"Jamalpur\", \"Rangpur\", \"Comilla\", \"Mymensingh\" }));\n\n sitClass.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"A/C\", \"First Class\", \"Second Class\" }));\n sitClass.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sitClassActionPerformed(evt);\n }\n });\n\n jLabel36.setFont(new java.awt.Font(\"Consolas\", 0, 18)); // NOI18N\n jLabel36.setText(\"Class\");\n\n table.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Name\", \"Ticket 1\", \"Ticket 2\", \"Ticket 3\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n });\n jScrollPane1.setViewportView(table);\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(sitClass, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(show))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel39, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(date, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(time, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel31, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox3, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGap(26, 26, 26))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addContainerGap(21, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel39, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(date, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(time, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel31, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(34, 34, 34)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(sitClass, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(show, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(67, 67, 67)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(36, Short.MAX_VALUE))\n );\n\n jPanel5.setBackground(new java.awt.Color(51, 153, 255));\n\n jLabel6.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel6.setText(\"X\");\n jLabel6.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n jLabel6.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel6MouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel6))\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 16, Short.MAX_VALUE))))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\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 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 16, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private TimeTable createTimeTableNovy(){\n\n final String dateString = \"4.7.2017\";\n SimpleDateFormat formater = new SimpleDateFormat(\"dd.MM.yyyy\");\n\n Date timetableDate = null;\n try {\n timetableDate = formater.parse(dateString);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n ArrayList<Subject> testSubs = new ArrayList<Subject>();\n testSubs.add(new Subject(\"Př\",\"Teoretická informatika\",732,\"UAI\",\"08:00\",\"09:30\", Calendar.MONDAY, \"BB\", \"1\",\"3.10.2016\",\"2.1.2017\",true));\n testSubs.add(new Subject(\"Př\",\"Bakalářská angličtina NS 3\",230,\"OJZ\",\"12:00\",\"13:30\", Calendar.TUESDAY, \"BB\", \"4\",\"3.10.2016\",\"2.1.2017\",true));\n testSubs.add(new Subject(\"Cv\",\"Teoretická informatika\",732,\"UAI\",\"14:30\",\"16:00\", Calendar.TUESDAY, \"AV\", \"Pč4\",\"3.10.2016\",\"2.1.2017\",true));\n testSubs.add(new Subject(\"Cv\",\"Teoretická informatika\",733,\"UAI\",\"14:30\",\"16:00\", Calendar.TUESDAY, \"AV\", \"Pč4\",\"3.10.2016\",\"2.1.2017\",true));\n\n\n return new TimeTable(timetableDate, testSubs);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jSeparator1 = new javax.swing.JSeparator();\n jLabel1 = new javax.swing.JLabel();\n logOutBtn = new javax.swing.JButton();\n createBtn = new javax.swing.JButton();\n compareBtn = new javax.swing.JButton();\n deleteBtn = new javax.swing.JButton();\n retrieveBtn = new javax.swing.JButton();\n updateBtn = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n workoutTbl = new javax.swing.JTable();\n jLabel2 = new javax.swing.JLabel();\n nameFld = new javax.swing.JTextField();\n dateFld = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n welcomUserFld = new javax.swing.JLabel();\n loggedInUserFld = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"MAIN MENU\");\n\n logOutBtn.setText(\"Log Out\");\n logOutBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n logOutBtnActionPerformed(evt);\n }\n });\n\n createBtn.setText(\"Create Workout\");\n createBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n createBtnActionPerformed(evt);\n }\n });\n\n compareBtn.setText(\"Compare Workouts\");\n\n deleteBtn.setText(\"Delete Workouts\");\n\n retrieveBtn.setText(\"Retrieve Workout\");\n\n updateBtn.setText(\"Update Workout\");\n\n workoutTbl.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null},\n {null, null},\n {null, null},\n {null, null}\n },\n new String [] {\n \"Name\", \"Date\"\n }\n ));\n jScrollPane1.setViewportView(workoutTbl);\n\n jLabel2.setText(\"Once your workout has been created, use the \\\"Update Workout\\\" option to add exercises.\");\n\n nameFld.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nameFldActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Name\");\n\n jLabel4.setText(\"Date\");\n\n loggedInUserFld.setText(\"Welcome.\");\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(439, 439, 439)\n .addComponent(jSeparator1))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(updateBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(createBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(retrieveBtn)\n .addGap(18, 18, 18)\n .addComponent(deleteBtn)\n .addGap(18, 18, 18)\n .addComponent(compareBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(logOutBtn)\n .addGap(0, 0, Short.MAX_VALUE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(142, 142, 142)\n .addComponent(welcomUserFld)\n .addGap(113, 113, 113))\n .addGroup(layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(loggedInUserFld)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel4))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(dateFld, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE)\n .addComponent(nameFld)))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 634, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(0, 24, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(welcomUserFld)\n .addComponent(loggedInUserFld))\n .addGap(24, 24, 24)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(nameFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(dateFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(createBtn))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(logOutBtn)\n .addComponent(updateBtn)\n .addComponent(retrieveBtn)\n .addComponent(deleteBtn)\n .addComponent(compareBtn))\n .addGap(19, 19, 19))\n );\n\n pack();\n }", "public TabelaDoces() {\n initComponents();\n }", "private void createTable() {\n table = new Table();\n table.bottom();\n table.setFillParent(true);\n }", "public NewJFrame() {\n initComponents();\n IniciarTabla();\n \n \n // ingreso al githup \n \n }", "public table() {\n initComponents();\n }", "FORM createFORM();", "public TimeView() {\r\n label = new JLabel(\" \");\r\n kAvondLabel = new JLabel(\" - Koopavond\");\r\n weekendLabel = new JLabel(\" - Weekend\");\r\n eventLabel = new JLabel(\"Evenement: Theater\");\r\n time = time.getInstance();\r\n setPreferredSize(new Dimension(200,50));\r\n add(label);\r\n }", "public static void buildTable() {\r\n\t\t//This method keeps the user from editing the table\r\n\t\ttableModel = new DefaultTableModel() {\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\t\t\t@Override\r\n\t\t\tpublic boolean isCellEditable(int row, int column) {\r\n\t\t\t\t//All cells false\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttableModel.setNumRows(dblogic.getSize());\r\n\t\ttableModel.setColumnCount(COL_COUNT);\r\n\t\ttableModel.setColumnIdentifiers(columnNames);\r\n\t\ttable.setRowSelectionAllowed(true);\r\n\t\ttable.setColumnSelectionAllowed(false);\r\n\t\ttable.setDragEnabled(false);\r\n\t\ttable.getTableHeader().setReorderingAllowed(false);\r\n\t\ttable.setModel(tableModel);\r\n\r\n\t\t//Build rows\r\n\t\tfor (int i = 0; i < dblogic.getSize(); i++) {\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getLastName(), i, COL_LAST);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getFirstName(), i, COL_FIRST);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getPatronEmail(), i, COL_EMAIL);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getDOB(), i, COL_BIRTH);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getPatronSinceString(), i, COL_ADDED);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getAnniv().toString(), i, COL_ANNIV);\r\n\t\t}\r\n\t}", "private TimePicker createTimePicker() {\r\n\r\n TimePickerSettings timeSettings = new TimePickerSettings();\r\n timeSettings.initialTime = LocalTime.of(9, 0);\r\n timeSettings.setAllowKeyboardEditing(false);\r\n timeSettings.generatePotentialMenuTimes\r\n (TimePickerSettings.TimeIncrement.OneHour,\r\n null, null);\r\n\r\n TimePicker timePicker = new TimePicker(timeSettings);\r\n timeSettings.setVetoPolicy(new VetoTimes());\r\n\r\n return timePicker;\r\n\r\n }", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "public New_appointment() {\n initComponents();\n }", "private void setTable(Preset currentPreset) {\n\t\tif(columnNames.length != data.getGroupList().size() + 1){\n\t\t\tcolumnNames = new Object[data.getGroupList().size() + 1];\n\t\t\tcolumnNames[0] = \"Time\";\n\t\t}\n\t\t\n\t\t// Make sure the slot numbers havent changed\n\t\tif(rowData.length != currentPreset.getSlotNumber() || rowData[0].length != columnNames.length){\n\t\t\trowData = new Object[currentPreset.getSlotNumber()][columnNames.length];\n\t\t}\n\n\t\t// Initialize the columns\n\t\tListIterator<Group> groups = data.getGroupList().listIterator();\n\t\tfor(int i = 1; i < columnNames.length; i++){\n\t\t\tcolumnNames[i] = groups.next();\n\t\t}\n\t\t\n\t\t// Create an array for the activities\n\t\tString[] activityNameArray = new String[data.getPlannedActivityList().size() + 1];\n\t\tactivityNameArray[0] = \"Random\";\n\t\tfor(int count = 0; count < data.getPlannedActivityList().size(); count++ ){\n\t\t\tactivityNameArray[count + 1] = data.getPlannedActivityList().get(count).getName();\t\t\t\n\t\t}\n\t\t\n\t\t// Initialize the table.\n\t\tfor(int rowIndex = 0; rowIndex < rowData.length; rowIndex++){\n\t\t\trowData[rowIndex][0] = getTime(currentPreset, rowIndex);\n\t\t\tfor(int colIndex = 1; colIndex < rowData[rowIndex].length; colIndex++){\n\t\t\t\trowData[rowIndex][colIndex] = new JComboBox<String>(activityNameArray);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public pfcGuiLlistaPacients() { \n \n this.llistaPacientsModel = new javax.swing.DefaultListModel();\n initComponents(); \n centraFormulari(); \n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n cbBaseDeDatos = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblTablas = new javax.swing.JTable();\n chHorizontal = new javax.swing.JCheckBox();\n chVertical = new javax.swing.JCheckBox();\n jLabel3 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jlColumnas = new javax.swing.JList();\n btnPasarNomCol = new javax.swing.JButton();\n btnAgregar = new javax.swing.JButton();\n jScrollPane5 = new javax.swing.JScrollPane();\n txtColumnas = new javax.swing.JList();\n jScrollPane6 = new javax.swing.JScrollPane();\n jlAtributos = new javax.swing.JList();\n cbSigno = new javax.swing.JComboBox();\n jScrollPane7 = new javax.swing.JScrollPane();\n jlCondicion = new javax.swing.JList();\n btnAgregarFiltro = new javax.swing.JButton();\n txtCondicion = new javax.swing.JTextField();\n jScrollPane3 = new javax.swing.JScrollPane();\n jlSigno = new javax.swing.JList();\n cbOPeradorLogico = new javax.swing.JComboBox();\n jScrollPane8 = new javax.swing.JScrollPane();\n jlOperadorLogico = new javax.swing.JList();\n btnCrear = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n txtNombrePubli = new javax.swing.JTextField();\n btnCancelar = new javax.swing.JButton();\n chSinFiltro = new javax.swing.JCheckBox();\n jLabel5 = new javax.swing.JLabel();\n chInmediatamente = new javax.swing.JCheckBox();\n chShedule = new javax.swing.JCheckBox();\n txtTiempo1 = new javax.swing.JTextField();\n cbFrequencia = new javax.swing.JComboBox();\n txtTiempo = new javax.swing.JTextField();\n cbFrequenciaP = new javax.swing.JComboBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setText(\"Tablas\");\n\n jLabel2.setText(\"Base de Datos\");\n\n jButton1.setText(\"jButton1\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n tblTablas.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null},\n {null},\n {null},\n {null}\n },\n new String [] {\n \"Tablas\"\n }\n ));\n jScrollPane1.setViewportView(tblTablas);\n\n chHorizontal.setText(\"Horizontal\");\n chHorizontal.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n chHorizontalItemStateChanged(evt);\n }\n });\n chHorizontal.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n chHorizontalActionPerformed(evt);\n }\n });\n\n chVertical.setText(\"Vertical\");\n chVertical.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n chVerticalItemStateChanged(evt);\n }\n });\n chVertical.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n chVerticalActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Filtro\");\n\n jlColumnas.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n jScrollPane2.setViewportView(jlColumnas);\n\n btnPasarNomCol.setText(\">\");\n btnPasarNomCol.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnPasarNomColActionPerformed(evt);\n }\n });\n\n btnAgregar.setText(\"Agregar Columna\");\n btnAgregar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAgregarActionPerformed(evt);\n }\n });\n\n jScrollPane5.setViewportView(txtColumnas);\n\n jScrollPane6.setViewportView(jlAtributos);\n\n cbSigno.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"=\", \"<\", \">\", \">=\", \"<=\", \"<>\" }));\n\n jScrollPane7.setViewportView(jlCondicion);\n\n btnAgregarFiltro.setText(\"Agregar Filtro\");\n btnAgregarFiltro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAgregarFiltroActionPerformed(evt);\n }\n });\n\n jScrollPane3.setViewportView(jlSigno);\n\n cbOPeradorLogico.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"AND\", \"OR\" }));\n\n jScrollPane8.setViewportView(jlOperadorLogico);\n\n btnCrear.setText(\"Crear\");\n btnCrear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCrearActionPerformed(evt);\n }\n });\n\n jLabel4.setText(\"Nombre Publicacion:\");\n\n btnCancelar.setText(\"Cancelar\");\n btnCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(btnAgregar)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnPasarNomCol, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4)\n .addGap(18, 18, 18)\n .addComponent(txtNombrePubli, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(39, 39, 39))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(27, 27, 27)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(cbSigno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(txtCondicion, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(cbOPeradorLogico, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addComponent(btnCrear, javax.swing.GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnCancelar))))\n .addComponent(btnAgregarFiltro, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbSigno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtCondicion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cbOPeradorLogico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnPasarNomCol))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jScrollPane7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnAgregarFiltro)\n .addComponent(btnAgregar))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(17, 17, 17))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(btnCancelar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtNombrePubli, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnCrear))\n .addGap(27, 27, 27))))\n );\n\n chSinFiltro.setText(\"Sin Filtro\");\n chSinFiltro.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n chSinFiltroItemStateChanged(evt);\n }\n });\n chSinFiltro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n chSinFiltroActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"SnapshotAgent\");\n\n chInmediatamente.setText(\"Crear inmediatamente un Snapshot\");\n\n chShedule.setText(\"Horario de ejcucion del Agente Snapshot\");\n\n cbFrequencia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Diariamente\" }));\n\n cbFrequenciaP.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Horas\", \"Minutos\", \"Segundos\" }));\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 .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(chShedule)\n .addComponent(chInmediatamente))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtTiempo1)\n .addComponent(cbFrequenciaP, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtTiempo)\n .addComponent(cbFrequencia, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(32, 32, 32))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addComponent(cbBaseDeDatos, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(chHorizontal)\n .addComponent(chVertical)\n .addComponent(jLabel3)\n .addComponent(chSinFiltro))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, 10, Short.MAX_VALUE)))\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(cbBaseDeDatos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(chHorizontal)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(chVertical)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(chSinFiltro)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(44, 44, 44)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(18, 18, 18)\n .addComponent(chInmediatamente)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(chShedule)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGap(31, 31, 31))\n .addGap(53, 53, 53))\n .addGroup(layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(cbFrequencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(txtTiempo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cbFrequenciaP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtTiempo1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())))\n );\n\n pack();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n tableModel.addRow(new Object[] { idf.getText(), lnamef.getText(), fnamef.getText(), vtypef.getText(),\n vdatef.getText(), vlocationf.getText() });\n idf.setText(\"\");\n lnamef.setText(\"\");\n fnamef.setText(\"\");\n vtypef.setText(\"\");\n vdatef.setText(\"\");\n vlocationf.setText(\"\");\n\n p.remove(layout.getLayoutComponent(BorderLayout.CENTER));\n p.add(sp, BorderLayout.CENTER);\n p.repaint();\n p.revalidate();\n }", "public void createNewList(ActionEvent actionEvent) {\n // ideally again, this would have its own window\n // give it a title, and optionally populate it with some items\n }", "private void createNewListSection() {\n\t\tImageIcon image10 = new ImageIcon(sURLFCL1);\n\t\tImageIcon image11 = new ImageIcon(sURLFCL2);\n\t\tImageIcon image12 = new ImageIcon(sURLFCL3);\n\t\tjbCreateLists = new JButton(\"New PlayList\");\n\t\tjbCreateLists.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbCreateLists.setForeground(new Color(150,100,100));\n\t\tjbCreateLists.setIcon(image10);\n\t\tjbCreateLists.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbCreateLists.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbCreateLists.setRolloverIcon(image11);\n\t\tjbCreateLists.setRolloverSelectedIcon(image12);\t\n\t\tjbCreateLists.setContentAreaFilled(false);\n\t\tjbCreateLists.setFocusable(false);\n\t\tjbCreateLists.setBorderPainted(false);\n\t}", "public FormInfoAdministration(Calendar newTTL) {\n if (newTTL.after(Calendar.getInstance())) {\n this.TTL = newTTL;\n } else {\n throw new IllegalArgumentException(\"Given date is not later than the current time!\");\n }\n \n this.forms = new ArrayList<>();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tbTarefa = new javax.swing.JTable();\n btnAddTarefa = new javax.swing.JButton();\n btnAlterarTarefa = new javax.swing.JButton();\n btnExcluirTarefa = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n cbLista = new javax.swing.JComboBox();\n btnAddLista = new javax.swing.JButton();\n btnAlterarLista = new javax.swing.JButton();\n btnExcluirLista = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Lista de Tarefas\");\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Tarefa\"));\n\n tbTarefa.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null},\n {null, null, null},\n {null, null, null},\n {null, null, null}\n },\n new String [] {\n \"Descrição\", \"Prazo\", \"Feito\"\n }\n ));\n jScrollPane1.setViewportView(tbTarefa);\n\n btnAddTarefa.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Create.png\"))); // NOI18N\n btnAddTarefa.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddTarefaActionPerformed(evt);\n }\n });\n\n btnAlterarTarefa.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Modify.png\"))); // NOI18N\n btnAlterarTarefa.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAlterarTarefaActionPerformed(evt);\n }\n });\n\n btnExcluirTarefa.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Trash.png\"))); // NOI18N\n btnExcluirTarefa.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnExcluirTarefaActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnAddTarefa, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnAlterarTarefa, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnExcluirTarefa, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnAlterarTarefa)\n .addComponent(btnExcluirTarefa)\n .addComponent(btnAddTarefa))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Lista\"));\n\n cbLista.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cbListaActionPerformed(evt);\n }\n });\n\n btnAddLista.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Create.png\"))); // NOI18N\n btnAddLista.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddListaActionPerformed(evt);\n }\n });\n\n btnAlterarLista.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Modify.png\"))); // NOI18N\n btnAlterarLista.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAlterarListaActionPerformed(evt);\n }\n });\n\n btnExcluirLista.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Trash.png\"))); // NOI18N\n btnExcluirLista.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnExcluirListaActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(cbLista, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnAddLista, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnAlterarLista, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnExcluirLista, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnExcluirLista)\n .addComponent(btnAddLista)\n .addComponent(cbLista, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnAlterarLista))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\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, false)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "public ScheduleTableModel(List<?> radioObjects){\n this.radioObjects = radioObjects;\n columns = new String[]{\n \"Title\",\n \"Start/endtime\",\n \"Episode\",\n \"Sändningsstatus\"\n };\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n timebar = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n date = new javax.swing.JLabel();\n Showtime = new javax.swing.JLabel();\n jLabel19 = new javax.swing.JLabel();\n time1 = new javax.swing.JLabel();\n time2 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n jLabel24 = new javax.swing.JLabel();\n home = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n pp = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n pp00 = new javax.swing.JLabel();\n jPanel4 = new javax.swing.JPanel();\n Sell00 = new javax.swing.JLabel();\n jPanel6 = new javax.swing.JPanel();\n em00 = new javax.swing.JLabel();\n jPanel7 = new javax.swing.JPanel();\n rp00 = new javax.swing.JLabel();\n jPanel8 = new javax.swing.JPanel();\n co00 = new javax.swing.JLabel();\n jPanel12 = new javax.swing.JPanel();\n pr00 = new javax.swing.JLabel();\n jPanel14 = new javax.swing.JPanel();\n ls00 = new javax.swing.JLabel();\n jPanel15 = new javax.swing.JPanel();\n lp00 = new javax.swing.JLabel();\n stock = new javax.swing.JPanel();\n jPanel62 = new javax.swing.JPanel();\n jLabel104 = new javax.swing.JLabel();\n jLabel42 = new javax.swing.JLabel();\n jPanel63 = new javax.swing.JPanel();\n jLabel106 = new javax.swing.JLabel();\n jLabel48 = new javax.swing.JLabel();\n jPanel72 = new javax.swing.JPanel();\n jLabel116 = new javax.swing.JLabel();\n jLabel49 = new javax.swing.JLabel();\n jPanel74 = new javax.swing.JPanel();\n jLabel118 = new javax.swing.JLabel();\n jLabel52 = new javax.swing.JLabel();\n jPanel67 = new javax.swing.JPanel();\n jLabel111 = new javax.swing.JLabel();\n jLabel30 = new javax.swing.JLabel();\n mng_emp = new javax.swing.JPanel();\n add_emp = new javax.swing.JPanel();\n jLabel97 = new javax.swing.JLabel();\n jLabel34 = new javax.swing.JLabel();\n jPanel57 = new javax.swing.JPanel();\n jLabel98 = new javax.swing.JLabel();\n jLabel35 = new javax.swing.JLabel();\n jPanel58 = new javax.swing.JPanel();\n jLabel99 = new javax.swing.JLabel();\n jLabel36 = new javax.swing.JLabel();\n jPanel59 = new javax.swing.JPanel();\n jLabel100 = new javax.swing.JLabel();\n jLabel38 = new javax.swing.JLabel();\n jPanel61 = new javax.swing.JPanel();\n jLabel102 = new javax.swing.JLabel();\n jLabel40 = new javax.swing.JLabel();\n add_emp3 = new javax.swing.JPanel();\n jLabel83 = new javax.swing.JLabel();\n jLabel122 = new javax.swing.JLabel();\n jLabel128 = new javax.swing.JLabel();\n navbar = new javax.swing.JPanel();\n mng_name = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n homen = new javax.swing.JPanel();\n jLabel5 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n prdtn = new javax.swing.JPanel();\n jLabel6 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n stckn = new javax.swing.JPanel();\n jLabel7 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n rprt = new javax.swing.JPanel();\n jLabel8 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n slsn = new javax.swing.JPanel();\n jLabel9 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n cusln = new javax.swing.JPanel();\n jLabel10 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n LOGOUTaa = new javax.swing.JPanel();\n jLabel22 = new javax.swing.JLabel();\n jLabel23 = new javax.swing.JLabel();\n mng_id = new javax.swing.JLabel();\n jLabel77 = new javax.swing.JLabel();\n jLabel79 = new javax.swing.JLabel();\n UPD_PRO = new javax.swing.JPanel();\n jLabel11 = new javax.swing.JLabel();\n jLabel18 = new javax.swing.JLabel();\n mngen = new javax.swing.JPanel();\n jLabel80 = new javax.swing.JLabel();\n jLabel81 = new javax.swing.JLabel();\n product = new javax.swing.JPanel();\n jPanel26 = new javax.swing.JPanel();\n jLabel107 = new javax.swing.JLabel();\n jLabel25 = new javax.swing.JLabel();\n jPanel30 = new javax.swing.JPanel();\n jLabel109 = new javax.swing.JLabel();\n jLabel27 = new javax.swing.JLabel();\n jPanel66 = new javax.swing.JPanel();\n jLabel110 = new javax.swing.JLabel();\n jLabel29 = new javax.swing.JLabel();\n jPanel68 = new javax.swing.JPanel();\n jLabel112 = new javax.swing.JLabel();\n jLabel31 = new javax.swing.JLabel();\n jPanel69 = new javax.swing.JPanel();\n jLabel113 = new javax.swing.JLabel();\n jLabel32 = new javax.swing.JLabel();\n jPanel70 = new javax.swing.JPanel();\n jLabel114 = new javax.swing.JLabel();\n jLabel33 = new javax.swing.JLabel();\n jPanel71 = new javax.swing.JPanel();\n jLabel115 = new javax.swing.JLabel();\n jLabel28 = new javax.swing.JLabel();\n report = new javax.swing.JPanel();\n jPanel17 = new javax.swing.JPanel();\n jLabel70 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jPanel19 = new javax.swing.JPanel();\n jLabel72 = new javax.swing.JLabel();\n jLabel54 = new javax.swing.JLabel();\n jPanel40 = new javax.swing.JPanel();\n jLabel74 = new javax.swing.JLabel();\n jLabel57 = new javax.swing.JLabel();\n jPanel44 = new javax.swing.JPanel();\n jLabel78 = new javax.swing.JLabel();\n jLabel55 = new javax.swing.JLabel();\n sales = new javax.swing.JPanel();\n jPanel13 = new javax.swing.JPanel();\n jLabel37 = new javax.swing.JLabel();\n jLabel130 = new javax.swing.JLabel();\n jPanel27 = new javax.swing.JPanel();\n jLabel61 = new javax.swing.JLabel();\n jLabel132 = new javax.swing.JLabel();\n jPanel5 = new javax.swing.JPanel();\n jLabel66 = new javax.swing.JLabel();\n jLabel126 = new javax.swing.JLabel();\n jPanel28 = new javax.swing.JPanel();\n jLabel68 = new javax.swing.JLabel();\n jLabel129 = new javax.swing.JLabel();\n jPanel9 = new javax.swing.JPanel();\n jLabel75 = new javax.swing.JLabel();\n jLabel127 = new javax.swing.JLabel();\n bill = new javax.swing.JPanel();\n jPanel64 = new javax.swing.JPanel();\n jLabel135 = new javax.swing.JLabel();\n jLabel123 = new javax.swing.JLabel();\n jPanel76 = new javax.swing.JPanel();\n jLabel136 = new javax.swing.JLabel();\n jLabel124 = new javax.swing.JLabel();\n jPanel54 = new javax.swing.JPanel();\n jLabel131 = new javax.swing.JLabel();\n jLabel119 = new javax.swing.JLabel();\n jPanel77 = new javax.swing.JPanel();\n jLabel139 = new javax.swing.JLabel();\n jLabel125 = new javax.swing.JLabel();\n Update = new javax.swing.JPanel();\n salf_update = new javax.swing.JPanel();\n jLabel105 = new javax.swing.JLabel();\n jLabel82 = new javax.swing.JLabel();\n jLabel108 = new javax.swing.JLabel();\n change_pass = new javax.swing.JPanel();\n jLabel121 = new javax.swing.JLabel();\n jLabel84 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n timebar.setBackground(new java.awt.Color(0, 204, 102));\n timebar.setForeground(new java.awt.Color(0, 255, 51));\n timebar.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(252, 228, 0));\n jLabel1.setText(\"DATE :\");\n timebar.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(600, 20, -1, 20));\n\n jLabel2.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(252, 228, 0));\n jLabel2.setText(\"TIME :\");\n timebar.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 20, -1, 20));\n\n date.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n date.setForeground(new java.awt.Color(255, 255, 255));\n date.setText(\"04-02-2021\");\n timebar.add(date, new org.netbeans.lib.awtextra.AbsoluteConstraints(660, 20, 130, 20));\n\n Showtime.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n Showtime.setForeground(new java.awt.Color(255, 255, 255));\n Showtime.setText(\"08:20 PM\");\n timebar.add(Showtime, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 20, 106, 20));\n\n jLabel19.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel19.setForeground(new java.awt.Color(42, 42, 255));\n jLabel19.setText(\"LOGIN TIME :\");\n timebar.add(jLabel19, new org.netbeans.lib.awtextra.AbsoluteConstraints(13, 20, 110, -1));\n\n time1.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n time1.setForeground(new java.awt.Color(255, 255, 255));\n time1.setText(\"08:20 PM\");\n timebar.add(time1, new org.netbeans.lib.awtextra.AbsoluteConstraints(122, 20, 100, 20));\n\n time2.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n time2.setForeground(new java.awt.Color(255, 255, 255));\n time2.setText(\"04-02-2021\");\n timebar.add(time2, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 20, 86, 20));\n\n jLabel20.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel20.setForeground(new java.awt.Color(42, 42, 255));\n jLabel20.setText(\"LOGIN DATE :\");\n timebar.add(jLabel20, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 20, -1, 20));\n\n jLabel24.setFont(new java.awt.Font(\"Dialog\", 0, 48)); // NOI18N\n jLabel24.setForeground(new java.awt.Color(255, 255, 255));\n jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel24.setText(\"-\");\n jLabel24.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel24MouseClicked(evt);\n }\n });\n timebar.add(jLabel24, new org.netbeans.lib.awtextra.AbsoluteConstraints(793, 0, -1, 21));\n\n jPanel1.add(timebar, new org.netbeans.lib.awtextra.AbsoluteConstraints(301, 0, 820, 60));\n\n home.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel2.setBackground(new java.awt.Color(204, 255, 204));\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 51, 153), 2), \"Products\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 16), new java.awt.Color(0, 51, 153))); // NOI18N\n jPanel2.setToolTipText(\"\");\n jPanel2.setPreferredSize(new java.awt.Dimension(170, 137));\n\n pp.setFont(new java.awt.Font(\"Dialog\", 1, 36)); // NOI18N\n pp.setForeground(new java.awt.Color(0, 204, 102));\n pp.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n pp.setText(\"10,500\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pp, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(pp, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(42, Short.MAX_VALUE))\n );\n\n jPanel3.setBackground(new java.awt.Color(204, 255, 204));\n jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 51, 153), 2), \"Purches\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 16), new java.awt.Color(0, 51, 153))); // NOI18N\n jPanel3.setPreferredSize(new java.awt.Dimension(170, 137));\n\n pp00.setFont(new java.awt.Font(\"Dialog\", 1, 36)); // NOI18N\n pp00.setForeground(new java.awt.Color(0, 204, 102));\n pp00.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n pp00.setText(\"10,000\");\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pp00, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(pp00, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel4.setBackground(new java.awt.Color(204, 255, 204));\n jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 51, 153), 2), \"Total sale\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 16), new java.awt.Color(0, 51, 153))); // NOI18N\n\n Sell00.setFont(new java.awt.Font(\"Dialog\", 1, 36)); // NOI18N\n Sell00.setForeground(new java.awt.Color(0, 204, 102));\n Sell00.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n Sell00.setText(\"5,00000\");\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Sell00, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(Sell00, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel6.setBackground(new java.awt.Color(204, 255, 204));\n jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 51, 153), 2), \"Total Employee\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 16), new java.awt.Color(0, 51, 153))); // NOI18N\n jPanel6.setPreferredSize(new java.awt.Dimension(170, 137));\n\n em00.setFont(new java.awt.Font(\"Dialog\", 1, 36)); // NOI18N\n em00.setForeground(new java.awt.Color(0, 204, 102));\n em00.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n em00.setText(\"35\");\n\n javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(em00, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addComponent(em00, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(38, Short.MAX_VALUE))\n );\n\n jPanel7.setBackground(new java.awt.Color(204, 255, 204));\n jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 51, 153), 2), \"Return Product\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 16), new java.awt.Color(0, 51, 153))); // NOI18N\n\n rp00.setFont(new java.awt.Font(\"Dialog\", 1, 36)); // NOI18N\n rp00.setForeground(new java.awt.Color(0, 204, 102));\n rp00.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n rp00.setText(\"35,000\");\n\n javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);\n jPanel7.setLayout(jPanel7Layout);\n jPanel7Layout.setHorizontalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rp00, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel7Layout.setVerticalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(rp00, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel8.setBackground(new java.awt.Color(204, 255, 204));\n jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 51, 153), 2), \"Complain\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 16), new java.awt.Color(0, 51, 153))); // NOI18N\n\n co00.setFont(new java.awt.Font(\"Dialog\", 1, 36)); // NOI18N\n co00.setForeground(new java.awt.Color(0, 204, 102));\n co00.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n co00.setText(\"10\");\n\n javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);\n jPanel8.setLayout(jPanel8Layout);\n jPanel8Layout.setHorizontalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(co00, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel8Layout.setVerticalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addComponent(co00, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel12.setBackground(new java.awt.Color(204, 255, 204));\n jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 51, 153), 2), \"Net Profit\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 16), new java.awt.Color(0, 51, 153))); // NOI18N\n\n pr00.setFont(new java.awt.Font(\"Dialog\", 1, 36)); // NOI18N\n pr00.setForeground(new java.awt.Color(0, 204, 102));\n pr00.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n pr00.setText(\"₹ 40,000\");\n\n javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);\n jPanel12.setLayout(jPanel12Layout);\n jPanel12Layout.setHorizontalGroup(\n jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pr00, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)\n );\n jPanel12Layout.setVerticalGroup(\n jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel12Layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addComponent(pr00, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel14.setBackground(new java.awt.Color(204, 255, 204));\n jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 51, 153), 2), \"Last 30 Days Sale\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 16), new java.awt.Color(0, 51, 153))); // NOI18N\n\n ls00.setFont(new java.awt.Font(\"Dialog\", 1, 36)); // NOI18N\n ls00.setForeground(new java.awt.Color(0, 204, 102));\n ls00.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n ls00.setText(\"35,000\");\n\n javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);\n jPanel14.setLayout(jPanel14Layout);\n jPanel14Layout.setHorizontalGroup(\n jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ls00, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)\n );\n jPanel14Layout.setVerticalGroup(\n jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(ls00, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel15.setBackground(new java.awt.Color(204, 255, 204));\n jPanel15.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 51, 153), 2), \"Lost Product\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 16), new java.awt.Color(0, 51, 153))); // NOI18N\n\n lp00.setFont(new java.awt.Font(\"Dialog\", 1, 36)); // NOI18N\n lp00.setForeground(new java.awt.Color(0, 204, 102));\n lp00.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lp00.setText(\"350\");\n\n javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);\n jPanel15.setLayout(jPanel15Layout);\n jPanel15Layout.setHorizontalGroup(\n jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lp00, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel15Layout.setVerticalGroup(\n jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel15Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(lp00, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(44, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout homeLayout = new javax.swing.GroupLayout(home);\n home.setLayout(homeLayout);\n homeLayout.setHorizontalGroup(\n homeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, homeLayout.createSequentialGroup()\n .addContainerGap(82, Short.MAX_VALUE)\n .addGroup(homeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(72, 72, 72)\n .addGroup(homeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(71, 71, 71)\n .addGroup(homeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(75, 75, 75))\n );\n homeLayout.setVerticalGroup(\n homeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, homeLayout.createSequentialGroup()\n .addContainerGap(68, Short.MAX_VALUE)\n .addGroup(homeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE)\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(44, 44, 44)\n .addGroup(homeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(45, 45, 45)\n .addGroup(homeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(41, 41, 41))\n );\n\n jPanel1.add(home, new org.netbeans.lib.awtextra.AbsoluteConstraints(311, 53, 810, 640));\n\n stock.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel62.setBackground(new java.awt.Color(204, 255, 204));\n jPanel62.setPreferredSize(new java.awt.Dimension(170, 137));\n jPanel62.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel62MouseClicked(evt);\n }\n });\n\n jLabel104.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel104.setForeground(new java.awt.Color(0, 204, 102));\n jLabel104.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel104.setText(\"DAILY REPORT\");\n\n jLabel42.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Daily_report.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel62Layout = new javax.swing.GroupLayout(jPanel62);\n jPanel62.setLayout(jPanel62Layout);\n jPanel62Layout.setHorizontalGroup(\n jPanel62Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel104, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel62Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel42)\n .addGap(49, 49, 49))\n );\n jPanel62Layout.setVerticalGroup(\n jPanel62Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel62Layout.createSequentialGroup()\n .addContainerGap(22, Short.MAX_VALUE)\n .addComponent(jLabel42)\n .addGap(18, 18, 18)\n .addComponent(jLabel104)\n .addContainerGap())\n );\n\n jPanel63.setBackground(new java.awt.Color(204, 255, 204));\n jPanel63.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel63MouseClicked(evt);\n }\n });\n\n jLabel106.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel106.setForeground(new java.awt.Color(0, 204, 102));\n jLabel106.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel106.setText(\"OUT OF STOCK\");\n\n jLabel48.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/out-of-stock.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel63Layout = new javax.swing.GroupLayout(jPanel63);\n jPanel63.setLayout(jPanel63Layout);\n jPanel63Layout.setHorizontalGroup(\n jPanel63Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel106, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel63Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel48, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(49, 49, 49))\n );\n jPanel63Layout.setVerticalGroup(\n jPanel63Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel63Layout.createSequentialGroup()\n .addContainerGap(34, Short.MAX_VALUE)\n .addComponent(jLabel48)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel106)\n .addContainerGap())\n );\n\n jPanel72.setBackground(new java.awt.Color(204, 255, 204));\n jPanel72.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel72MouseClicked(evt);\n }\n });\n\n jLabel116.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel116.setForeground(new java.awt.Color(0, 204, 102));\n jLabel116.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel116.setText(\"AVAILABLE\");\n\n jLabel49.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Available.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel72Layout = new javax.swing.GroupLayout(jPanel72);\n jPanel72.setLayout(jPanel72Layout);\n jPanel72Layout.setHorizontalGroup(\n jPanel72Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel116, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addGroup(jPanel72Layout.createSequentialGroup()\n .addGap(56, 56, 56)\n .addComponent(jLabel49)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel72Layout.setVerticalGroup(\n jPanel72Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel72Layout.createSequentialGroup()\n .addContainerGap(24, Short.MAX_VALUE)\n .addComponent(jLabel49, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel116)\n .addContainerGap())\n );\n\n jPanel74.setBackground(new java.awt.Color(204, 255, 204));\n jPanel74.setPreferredSize(new java.awt.Dimension(170, 50));\n jPanel74.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel74MouseClicked(evt);\n }\n });\n\n jLabel118.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel118.setForeground(new java.awt.Color(0, 204, 102));\n jLabel118.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel118.setText(\"PERCHASR REPORT\");\n\n jLabel52.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Purchase.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel74Layout = new javax.swing.GroupLayout(jPanel74);\n jPanel74.setLayout(jPanel74Layout);\n jPanel74Layout.setHorizontalGroup(\n jPanel74Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel118, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addGroup(jPanel74Layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addComponent(jLabel52)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel74Layout.setVerticalGroup(\n jPanel74Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel74Layout.createSequentialGroup()\n .addContainerGap(28, Short.MAX_VALUE)\n .addComponent(jLabel52)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel118)\n .addContainerGap())\n );\n\n jPanel67.setBackground(new java.awt.Color(204, 255, 204));\n jPanel67.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel67MouseClicked(evt);\n }\n });\n\n jLabel111.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel111.setForeground(new java.awt.Color(0, 204, 102));\n jLabel111.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel111.setText(\"STOCK CHECK\");\n\n jLabel30.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel30.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/product stock.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel67Layout = new javax.swing.GroupLayout(jPanel67);\n jPanel67.setLayout(jPanel67Layout);\n jPanel67Layout.setHorizontalGroup(\n jPanel67Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel111, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addComponent(jLabel30, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel67Layout.setVerticalGroup(\n jPanel67Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel67Layout.createSequentialGroup()\n .addComponent(jLabel30, javax.swing.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel111)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout stockLayout = new javax.swing.GroupLayout(stock);\n stock.setLayout(stockLayout);\n stockLayout.setHorizontalGroup(\n stockLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(stockLayout.createSequentialGroup()\n .addGap(81, 81, 81)\n .addGroup(stockLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel74, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel67, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 75, Short.MAX_VALUE)\n .addGroup(stockLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(stockLayout.createSequentialGroup()\n .addComponent(jPanel72, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(74, 74, 74)\n .addComponent(jPanel63, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jPanel62, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(70, 70, 70))\n );\n stockLayout.setVerticalGroup(\n stockLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, stockLayout.createSequentialGroup()\n .addContainerGap(76, Short.MAX_VALUE)\n .addGroup(stockLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel72, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel63, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel67, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(59, 59, 59)\n .addGroup(stockLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel74, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel62, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(241, 241, 241))\n );\n\n jPanel1.add(stock, new org.netbeans.lib.awtextra.AbsoluteConstraints(311, 53, 810, 650));\n\n mng_emp.setBackground(new java.awt.Color(255, 255, 255));\n\n add_emp.setBackground(new java.awt.Color(204, 255, 204));\n add_emp.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n add_empMouseClicked(evt);\n }\n });\n\n jLabel97.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel97.setForeground(new java.awt.Color(0, 204, 102));\n jLabel97.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel97.setText(\"ADD EMPLOYEE\");\n jLabel97.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel97MouseClicked(evt);\n }\n });\n\n jLabel34.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/add-emp.png\"))); // NOI18N\n\n javax.swing.GroupLayout add_empLayout = new javax.swing.GroupLayout(add_emp);\n add_emp.setLayout(add_empLayout);\n add_empLayout.setHorizontalGroup(\n add_empLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel97, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addGroup(add_empLayout.createSequentialGroup()\n .addGap(52, 52, 52)\n .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n add_empLayout.setVerticalGroup(\n add_empLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, add_empLayout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jLabel34, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel97)\n .addContainerGap())\n );\n\n jPanel57.setBackground(new java.awt.Color(204, 255, 204));\n jPanel57.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel57MouseClicked(evt);\n }\n });\n\n jLabel98.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel98.setForeground(new java.awt.Color(0, 204, 102));\n jLabel98.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel98.setText(\"REMOVE EMPLOYEE\");\n\n jLabel35.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/fired.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel57Layout = new javax.swing.GroupLayout(jPanel57);\n jPanel57.setLayout(jPanel57Layout);\n jPanel57Layout.setHorizontalGroup(\n jPanel57Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel98, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel57Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel35)\n .addGap(52, 52, 52))\n );\n jPanel57Layout.setVerticalGroup(\n jPanel57Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel57Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel35)\n .addGap(18, 18, 18)\n .addComponent(jLabel98)\n .addContainerGap())\n );\n\n jPanel58.setBackground(new java.awt.Color(204, 255, 204));\n jPanel58.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel58MouseClicked(evt);\n }\n });\n\n jLabel99.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel99.setForeground(new java.awt.Color(0, 204, 102));\n jLabel99.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel99.setText(\"EMPLOYEE LIST\");\n\n jLabel36.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/resume.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel58Layout = new javax.swing.GroupLayout(jPanel58);\n jPanel58.setLayout(jPanel58Layout);\n jPanel58Layout.setHorizontalGroup(\n jPanel58Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel99, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel58Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(45, 45, 45))\n );\n jPanel58Layout.setVerticalGroup(\n jPanel58Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel58Layout.createSequentialGroup()\n .addContainerGap(32, Short.MAX_VALUE)\n .addComponent(jLabel36)\n .addGap(18, 18, 18)\n .addComponent(jLabel99)\n .addContainerGap())\n );\n\n jPanel59.setBackground(new java.awt.Color(204, 255, 204));\n jPanel59.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel59MouseClicked(evt);\n }\n });\n\n jLabel100.setFont(new java.awt.Font(\"Dialog\", 1, 15)); // NOI18N\n jLabel100.setForeground(new java.awt.Color(0, 204, 102));\n jLabel100.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel100.setText(\"ATTENDENCE CHECK\");\n\n jLabel38.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel38.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/attendant-list.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel59Layout = new javax.swing.GroupLayout(jPanel59);\n jPanel59.setLayout(jPanel59Layout);\n jPanel59Layout.setHorizontalGroup(\n jPanel59Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel100, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel38, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel59Layout.setVerticalGroup(\n jPanel59Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel59Layout.createSequentialGroup()\n .addComponent(jLabel38, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel100)\n .addContainerGap())\n );\n\n jPanel61.setBackground(new java.awt.Color(204, 255, 204));\n jPanel61.setPreferredSize(new java.awt.Dimension(170, 50));\n jPanel61.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel61MouseClicked(evt);\n }\n });\n\n jLabel102.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel102.setForeground(new java.awt.Color(0, 204, 102));\n jLabel102.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel102.setText(\"CHECK PROFILE\");\n\n jLabel40.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/information-desk.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel61Layout = new javax.swing.GroupLayout(jPanel61);\n jPanel61.setLayout(jPanel61Layout);\n jPanel61Layout.setHorizontalGroup(\n jPanel61Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel102, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addGroup(jPanel61Layout.createSequentialGroup()\n .addGap(52, 52, 52)\n .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel61Layout.setVerticalGroup(\n jPanel61Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel61Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel40)\n .addGap(18, 18, 18)\n .addComponent(jLabel102)\n .addContainerGap())\n );\n\n add_emp3.setBackground(new java.awt.Color(204, 255, 204));\n add_emp3.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n add_emp3MouseClicked(evt);\n }\n });\n\n jLabel83.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel83.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/student-profile.png\"))); // NOI18N\n\n jLabel122.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel122.setForeground(new java.awt.Color(0, 204, 102));\n jLabel122.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel122.setText(\" EMPLOYEE UPDATE\");\n\n jLabel128.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel128.setForeground(new java.awt.Color(0, 204, 102));\n jLabel128.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel128.setText(\" PROFILE\");\n\n javax.swing.GroupLayout add_emp3Layout = new javax.swing.GroupLayout(add_emp3);\n add_emp3.setLayout(add_emp3Layout);\n add_emp3Layout.setHorizontalGroup(\n add_emp3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, add_emp3Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel122, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(add_emp3Layout.createSequentialGroup()\n .addGroup(add_emp3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(add_emp3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel128, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(add_emp3Layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addComponent(jLabel83, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n add_emp3Layout.setVerticalGroup(\n add_emp3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, add_emp3Layout.createSequentialGroup()\n .addContainerGap(28, Short.MAX_VALUE)\n .addComponent(jLabel83, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel122, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel128, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(6, 6, 6))\n );\n\n javax.swing.GroupLayout mng_empLayout = new javax.swing.GroupLayout(mng_emp);\n mng_emp.setLayout(mng_empLayout);\n mng_empLayout.setHorizontalGroup(\n mng_empLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(mng_empLayout.createSequentialGroup()\n .addGap(77, 77, 77)\n .addGroup(mng_empLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(mng_empLayout.createSequentialGroup()\n .addComponent(add_emp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(70, 70, 70)\n .addComponent(jPanel57, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(mng_empLayout.createSequentialGroup()\n .addComponent(jPanel61, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(70, 70, 70)\n .addComponent(jPanel59, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGap(74, 74, 74)\n .addGroup(mng_empLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel58, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(add_emp3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(26, Short.MAX_VALUE))\n );\n mng_empLayout.setVerticalGroup(\n mng_empLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(mng_empLayout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addGroup(mng_empLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(add_emp, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel57, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel58, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(55, 55, 55)\n .addGroup(mng_empLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel59, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel61, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)\n .addComponent(add_emp3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(224, Short.MAX_VALUE))\n );\n\n jPanel1.add(mng_emp, new org.netbeans.lib.awtextra.AbsoluteConstraints(311, 53, 810, 650));\n\n navbar.setBackground(new java.awt.Color(0, 204, 102));\n navbar.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 204, 102)));\n navbar.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n mng_name.setFont(new java.awt.Font(\"Dialog\", 1, 15)); // NOI18N\n mng_name.setForeground(new java.awt.Color(255, 255, 255));\n mng_name.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n navbar.add(mng_name, new org.netbeans.lib.awtextra.AbsoluteConstraints(73, 59, 200, 20));\n\n jLabel4.setFont(new java.awt.Font(\"Dialog\", 1, 20)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 0));\n jLabel4.setText(\"Welcome \");\n navbar.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 12, 280, 41));\n\n homen.setBackground(new java.awt.Color(255, 204, 0));\n homen.setForeground(new java.awt.Color(255, 255, 255));\n homen.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n homenMouseClicked(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel5.setText(\"HOME\");\n\n jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel12.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/home-page (1).png\"))); // NOI18N\n\n javax.swing.GroupLayout homenLayout = new javax.swing.GroupLayout(homen);\n homen.setLayout(homenLayout);\n homenLayout.setHorizontalGroup(\n homenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, homenLayout.createSequentialGroup()\n .addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 209, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n homenLayout.setVerticalGroup(\n homenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(homenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n navbar.add(homen, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 147, 310, -1));\n\n prdtn.setBackground(new java.awt.Color(0, 204, 102));\n prdtn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n prdtnMouseClicked(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel6.setText(\"PRODUCTS\");\n\n jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel13.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/box_1.png\"))); // NOI18N\n\n javax.swing.GroupLayout prdtnLayout = new javax.swing.GroupLayout(prdtn);\n prdtn.setLayout(prdtnLayout);\n prdtnLayout.setHorizontalGroup(\n prdtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, prdtnLayout.createSequentialGroup()\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n prdtnLayout.setVerticalGroup(\n prdtnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE)\n );\n\n navbar.add(prdtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 202, 310, -1));\n\n stckn.setBackground(new java.awt.Color(0, 204, 102));\n stckn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n stcknMouseClicked(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 255));\n jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel7.setText(\"STOCK CHECK\");\n\n jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/stack.png\"))); // NOI18N\n\n javax.swing.GroupLayout stcknLayout = new javax.swing.GroupLayout(stckn);\n stckn.setLayout(stcknLayout);\n stcknLayout.setHorizontalGroup(\n stcknLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, stcknLayout.createSequentialGroup()\n .addGap(0, 90, Short.MAX_VALUE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(stcknLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(stcknLayout.createSequentialGroup()\n .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 232, Short.MAX_VALUE)))\n );\n stcknLayout.setVerticalGroup(\n stcknLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE)\n .addGroup(stcknLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE))\n );\n\n navbar.add(stckn, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 258, 310, -1));\n\n rprt.setBackground(new java.awt.Color(0, 204, 102));\n rprt.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n rprtMouseClicked(evt);\n }\n });\n\n jLabel8.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jLabel8.setForeground(new java.awt.Color(255, 255, 255));\n jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel8.setText(\"REPORT\");\n\n jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel15.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/pie-chart.png\"))); // NOI18N\n\n javax.swing.GroupLayout rprtLayout = new javax.swing.GroupLayout(rprt);\n rprt.setLayout(rprtLayout);\n rprtLayout.setHorizontalGroup(\n rprtLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, rprtLayout.createSequentialGroup()\n .addGap(0, 92, Short.MAX_VALUE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(rprtLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(rprtLayout.createSequentialGroup()\n .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 232, Short.MAX_VALUE)))\n );\n rprtLayout.setVerticalGroup(\n rprtLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE)\n .addGroup(rprtLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE))\n );\n\n navbar.add(rprt, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 314, 310, -1));\n\n slsn.setBackground(new java.awt.Color(0, 204, 102));\n slsn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n slsnMouseClicked(evt);\n }\n });\n\n jLabel9.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(255, 255, 255));\n jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel9.setText(\"SALES\");\n\n jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/finance (1).png\"))); // NOI18N\n\n javax.swing.GroupLayout slsnLayout = new javax.swing.GroupLayout(slsn);\n slsn.setLayout(slsnLayout);\n slsnLayout.setHorizontalGroup(\n slsnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, slsnLayout.createSequentialGroup()\n .addGap(0, 92, Short.MAX_VALUE)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(slsnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(slsnLayout.createSequentialGroup()\n .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 232, Short.MAX_VALUE)))\n );\n slsnLayout.setVerticalGroup(\n slsnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE)\n .addGroup(slsnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE))\n );\n\n navbar.add(slsn, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 370, 310, -1));\n\n cusln.setBackground(new java.awt.Color(0, 204, 102));\n cusln.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n cuslnMouseClicked(evt);\n }\n });\n\n jLabel10.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(255, 255, 255));\n jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel10.setText(\"BILL\");\n\n jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel17.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/invoice.png\"))); // NOI18N\n\n javax.swing.GroupLayout cuslnLayout = new javax.swing.GroupLayout(cusln);\n cusln.setLayout(cuslnLayout);\n cuslnLayout.setHorizontalGroup(\n cuslnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, cuslnLayout.createSequentialGroup()\n .addGap(0, 90, Short.MAX_VALUE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(cuslnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(cuslnLayout.createSequentialGroup()\n .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 233, Short.MAX_VALUE)))\n );\n cuslnLayout.setVerticalGroup(\n cuslnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE)\n .addGroup(cuslnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE))\n );\n\n navbar.add(cusln, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 426, 310, -1));\n\n LOGOUTaa.setBackground(new java.awt.Color(255, 51, 51));\n LOGOUTaa.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n LOGOUTaaMouseClicked(evt);\n }\n });\n\n jLabel22.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel22.setForeground(new java.awt.Color(255, 255, 255));\n jLabel22.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel22.setText(\"LOGOUT\");\n\n javax.swing.GroupLayout LOGOUTaaLayout = new javax.swing.GroupLayout(LOGOUTaa);\n LOGOUTaa.setLayout(LOGOUTaaLayout);\n LOGOUTaaLayout.setHorizontalGroup(\n LOGOUTaaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel22, javax.swing.GroupLayout.DEFAULT_SIZE, 263, Short.MAX_VALUE)\n );\n LOGOUTaaLayout.setVerticalGroup(\n LOGOUTaaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, LOGOUTaaLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel22)\n .addContainerGap())\n );\n\n navbar.add(LOGOUTaa, new org.netbeans.lib.awtextra.AbsoluteConstraints(24, 592, -1, -1));\n\n jLabel23.setFont(new java.awt.Font(\"Dialog\", 1, 10)); // NOI18N\n jLabel23.setForeground(new java.awt.Color(255, 255, 255));\n jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel23.setText(\"VERSION 1.0.1\");\n navbar.add(jLabel23, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 649, 199, 39));\n\n mng_id.setFont(new java.awt.Font(\"Dialog\", 1, 15)); // NOI18N\n mng_id.setForeground(new java.awt.Color(255, 255, 255));\n mng_id.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n navbar.add(mng_id, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 100, 220, 20));\n\n jLabel77.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel77.setForeground(new java.awt.Color(255, 255, 255));\n jLabel77.setText(\"Name:-\");\n navbar.add(jLabel77, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 59, -1, -1));\n\n jLabel79.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel79.setForeground(new java.awt.Color(255, 255, 255));\n jLabel79.setText(\"ID:-\");\n navbar.add(jLabel79, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 100, -1, -1));\n\n UPD_PRO.setBackground(new java.awt.Color(0, 204, 102));\n UPD_PRO.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n UPD_PROMouseClicked(evt);\n }\n });\n\n jLabel11.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jLabel11.setForeground(new java.awt.Color(255, 255, 255));\n jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel11.setText(\"UPDATE PROFILE\");\n\n jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/user.png\"))); // NOI18N\n jLabel18.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jLabel18.setIconTextGap(0);\n jLabel18.setMaximumSize(new java.awt.Dimension(30, 30));\n jLabel18.setMinimumSize(new java.awt.Dimension(30, 24));\n jLabel18.setPreferredSize(new java.awt.Dimension(30, 30));\n\n javax.swing.GroupLayout UPD_PROLayout = new javax.swing.GroupLayout(UPD_PRO);\n UPD_PRO.setLayout(UPD_PROLayout);\n UPD_PROLayout.setHorizontalGroup(\n UPD_PROLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 315, Short.MAX_VALUE)\n .addGroup(UPD_PROLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(UPD_PROLayout.createSequentialGroup()\n .addGap(0, 12, Short.MAX_VALUE)\n .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n UPD_PROLayout.setVerticalGroup(\n UPD_PROLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 50, Short.MAX_VALUE)\n .addGroup(UPD_PROLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(UPD_PROLayout.createSequentialGroup()\n .addGap(0, 2, Short.MAX_VALUE)\n .addGroup(UPD_PROLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE))\n .addGap(0, 3, Short.MAX_VALUE)))\n );\n\n navbar.add(UPD_PRO, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 530, 310, 50));\n\n mngen.setBackground(new java.awt.Color(0, 204, 102));\n mngen.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n mngenMouseClicked(evt);\n }\n });\n\n jLabel80.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jLabel80.setForeground(new java.awt.Color(255, 255, 255));\n jLabel80.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel80.setText(\"MANAGE EMPLOYEE\");\n\n jLabel81.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel81.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Manage_propng.png\"))); // NOI18N\n jLabel81.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jLabel81.setIconTextGap(0);\n jLabel81.setMaximumSize(new java.awt.Dimension(30, 30));\n jLabel81.setMinimumSize(new java.awt.Dimension(30, 24));\n jLabel81.setPreferredSize(new java.awt.Dimension(30, 30));\n\n javax.swing.GroupLayout mngenLayout = new javax.swing.GroupLayout(mngen);\n mngen.setLayout(mngenLayout);\n mngenLayout.setHorizontalGroup(\n mngenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mngenLayout.createSequentialGroup()\n .addGap(0, 24, Short.MAX_VALUE)\n .addComponent(jLabel81, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel80, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n mngenLayout.setVerticalGroup(\n mngenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(mngenLayout.createSequentialGroup()\n .addGroup(mngenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel80, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel81, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n navbar.add(mngen, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 480, 310, 50));\n\n jPanel1.add(navbar, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 310, 700));\n\n product.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel26.setBackground(new java.awt.Color(204, 255, 204));\n jPanel26.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel26MouseClicked(evt);\n }\n });\n\n jLabel107.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel107.setForeground(new java.awt.Color(0, 204, 102));\n jLabel107.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel107.setText(\"ADD PRODUCT\");\n\n jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel25.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/ADD PRODUCT 3.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);\n jPanel26.setLayout(jPanel26Layout);\n jPanel26Layout.setHorizontalGroup(\n jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel107, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addComponent(jLabel25, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel26Layout.setVerticalGroup(\n jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel26Layout.createSequentialGroup()\n .addComponent(jLabel25, javax.swing.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel107)\n .addContainerGap())\n );\n\n jPanel30.setBackground(new java.awt.Color(204, 255, 204));\n jPanel30.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel30MouseClicked(evt);\n }\n });\n\n jLabel109.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel109.setForeground(new java.awt.Color(0, 204, 102));\n jLabel109.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel109.setText(\"SEARCH PRODUCT\");\n\n jLabel27.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel27.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/search product.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel30Layout = new javax.swing.GroupLayout(jPanel30);\n jPanel30.setLayout(jPanel30Layout);\n jPanel30Layout.setHorizontalGroup(\n jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel109, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel27, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE))\n );\n jPanel30Layout.setVerticalGroup(\n jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel30Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel109)\n .addContainerGap())\n .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel30Layout.createSequentialGroup()\n .addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 31, Short.MAX_VALUE)))\n );\n\n jPanel66.setBackground(new java.awt.Color(204, 255, 204));\n jPanel66.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel66MouseClicked(evt);\n }\n });\n\n jLabel110.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel110.setForeground(new java.awt.Color(0, 204, 102));\n jLabel110.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel110.setText(\"DELETE PRODUCT\");\n\n jLabel29.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel29.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/delete.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel66Layout = new javax.swing.GroupLayout(jPanel66);\n jPanel66.setLayout(jPanel66Layout);\n jPanel66Layout.setHorizontalGroup(\n jPanel66Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel110, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addComponent(jLabel29, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel66Layout.setVerticalGroup(\n jPanel66Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel66Layout.createSequentialGroup()\n .addComponent(jLabel29, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel110)\n .addContainerGap())\n );\n\n jPanel68.setBackground(new java.awt.Color(204, 255, 204));\n jPanel68.setPreferredSize(new java.awt.Dimension(170, 50));\n jPanel68.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel68MouseClicked(evt);\n }\n });\n\n jLabel112.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel112.setForeground(new java.awt.Color(0, 204, 102));\n jLabel112.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel112.setText(\"UPDATE PRODUCT \");\n\n jLabel31.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel31.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/product-life (1).png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel68Layout = new javax.swing.GroupLayout(jPanel68);\n jPanel68.setLayout(jPanel68Layout);\n jPanel68Layout.setHorizontalGroup(\n jPanel68Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel112, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addComponent(jLabel31, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel68Layout.setVerticalGroup(\n jPanel68Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel68Layout.createSequentialGroup()\n .addComponent(jLabel31, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel112)\n .addContainerGap())\n );\n\n jPanel69.setBackground(new java.awt.Color(204, 255, 204));\n jPanel69.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel69MouseClicked(evt);\n }\n });\n\n jLabel113.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel113.setForeground(new java.awt.Color(0, 204, 102));\n jLabel113.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel113.setText(\"PRODUCT RETUN\");\n\n jLabel32.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel32.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/product-return.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel69Layout = new javax.swing.GroupLayout(jPanel69);\n jPanel69.setLayout(jPanel69Layout);\n jPanel69Layout.setHorizontalGroup(\n jPanel69Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel113, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addComponent(jLabel32, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel69Layout.setVerticalGroup(\n jPanel69Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel69Layout.createSequentialGroup()\n .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel113)\n .addContainerGap())\n );\n\n jPanel70.setBackground(new java.awt.Color(204, 255, 204));\n jPanel70.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel70MouseClicked(evt);\n }\n });\n\n jLabel114.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel114.setForeground(new java.awt.Color(0, 204, 102));\n jLabel114.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel114.setText(\"PRODUCT LOST\");\n\n jLabel33.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel33.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/broken-package.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel70Layout = new javax.swing.GroupLayout(jPanel70);\n jPanel70.setLayout(jPanel70Layout);\n jPanel70Layout.setHorizontalGroup(\n jPanel70Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel114, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addComponent(jLabel33, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel70Layout.setVerticalGroup(\n jPanel70Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel70Layout.createSequentialGroup()\n .addComponent(jLabel33, javax.swing.GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel114)\n .addContainerGap())\n );\n\n jPanel71.setBackground(new java.awt.Color(204, 255, 204));\n jPanel71.setPreferredSize(new java.awt.Dimension(170, 50));\n jPanel71.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel71MouseClicked(evt);\n }\n });\n\n jLabel115.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel115.setForeground(new java.awt.Color(0, 204, 102));\n jLabel115.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel115.setText(\"PRODUCT ID \");\n\n jLabel28.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel28.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/product id.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel71Layout = new javax.swing.GroupLayout(jPanel71);\n jPanel71.setLayout(jPanel71Layout);\n jPanel71Layout.setHorizontalGroup(\n jPanel71Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel115, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addComponent(jLabel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel71Layout.setVerticalGroup(\n jPanel71Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel71Layout.createSequentialGroup()\n .addComponent(jLabel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel115)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout productLayout = new javax.swing.GroupLayout(product);\n product.setLayout(productLayout);\n productLayout.setHorizontalGroup(\n productLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, productLayout.createSequentialGroup()\n .addGap(78, 78, 78)\n .addGroup(productLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel71, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel70, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 80, Short.MAX_VALUE)\n .addGroup(productLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, productLayout.createSequentialGroup()\n .addComponent(jPanel68, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, productLayout.createSequentialGroup()\n .addComponent(jPanel66, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(75, 75, 75)\n .addComponent(jPanel69, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(67, 67, 67))\n );\n productLayout.setVerticalGroup(\n productLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(productLayout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addGroup(productLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel30, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel68, javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE))\n .addGap(41, 41, 41)\n .addGroup(productLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel69, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel66, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel71, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE))\n .addGap(49, 49, 49)\n .addComponent(jPanel70, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(63, Short.MAX_VALUE))\n );\n\n jPanel1.add(product, new org.netbeans.lib.awtextra.AbsoluteConstraints(311, 53, 810, 640));\n\n report.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel17.setBackground(new java.awt.Color(204, 255, 204));\n jPanel17.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel17MouseClicked(evt);\n }\n });\n\n jLabel70.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel70.setForeground(new java.awt.Color(0, 204, 102));\n jLabel70.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel70.setText(\"PRODUCT REPORT\");\n\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/clipboard.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);\n jPanel17.setLayout(jPanel17Layout);\n jPanel17Layout.setHorizontalGroup(\n jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel70, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel17Layout.setVerticalGroup(\n jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel17Layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel70)\n .addContainerGap())\n );\n\n jPanel19.setBackground(new java.awt.Color(204, 255, 204));\n jPanel19.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel19MouseClicked(evt);\n }\n });\n\n jLabel72.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel72.setForeground(new java.awt.Color(0, 204, 102));\n jLabel72.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel72.setText(\"EMPLOYEE REPORT\");\n\n jLabel54.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel54.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/employee report.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);\n jPanel19.setLayout(jPanel19Layout);\n jPanel19Layout.setHorizontalGroup(\n jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel72, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addComponent(jLabel54, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel19Layout.setVerticalGroup(\n jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel19Layout.createSequentialGroup()\n .addComponent(jLabel54, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel72)\n .addContainerGap())\n );\n\n jPanel40.setBackground(new java.awt.Color(204, 255, 204));\n jPanel40.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel40MouseClicked(evt);\n }\n });\n\n jLabel74.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel74.setForeground(new java.awt.Color(0, 204, 102));\n jLabel74.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel74.setText(\"COMPLAIN\");\n\n jLabel57.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel57.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/complain.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel40Layout = new javax.swing.GroupLayout(jPanel40);\n jPanel40.setLayout(jPanel40Layout);\n jPanel40Layout.setHorizontalGroup(\n jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel74, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addComponent(jLabel57, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel40Layout.setVerticalGroup(\n jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel40Layout.createSequentialGroup()\n .addComponent(jLabel57, javax.swing.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel74)\n .addContainerGap())\n );\n\n jPanel44.setBackground(new java.awt.Color(204, 255, 204));\n jPanel44.setPreferredSize(new java.awt.Dimension(170, 137));\n jPanel44.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel44MouseClicked(evt);\n }\n });\n\n jLabel78.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel78.setForeground(new java.awt.Color(0, 204, 102));\n jLabel78.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel78.setText(\"WORKING REPORT\");\n\n jLabel55.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel55.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/working report.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel44Layout = new javax.swing.GroupLayout(jPanel44);\n jPanel44.setLayout(jPanel44Layout);\n jPanel44Layout.setHorizontalGroup(\n jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel78, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addComponent(jLabel55, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel44Layout.setVerticalGroup(\n jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel44Layout.createSequentialGroup()\n .addComponent(jLabel55, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel78)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout reportLayout = new javax.swing.GroupLayout(report);\n report.setLayout(reportLayout);\n reportLayout.setHorizontalGroup(\n reportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(reportLayout.createSequentialGroup()\n .addGap(76, 76, 76)\n .addGroup(reportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(reportLayout.createSequentialGroup()\n .addComponent(jPanel40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(reportLayout.createSequentialGroup()\n .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 70, Short.MAX_VALUE)\n .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(73, 73, 73)\n .addComponent(jPanel44, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(81, 81, 81))))\n );\n reportLayout.setVerticalGroup(\n reportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(reportLayout.createSequentialGroup()\n .addGap(69, 69, 69)\n .addGroup(reportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel19, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel44, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(38, 38, 38)\n .addComponent(jPanel40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(259, Short.MAX_VALUE))\n );\n\n jPanel1.add(report, new org.netbeans.lib.awtextra.AbsoluteConstraints(311, 53, 810, 640));\n\n sales.setBackground(new java.awt.Color(255, 255, 255));\n sales.setPreferredSize(new java.awt.Dimension(810, 630));\n\n jPanel13.setBackground(new java.awt.Color(204, 255, 204));\n jPanel13.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel13MouseClicked(evt);\n }\n });\n jPanel13.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel37.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n jLabel37.setForeground(new java.awt.Color(32, 64, 81));\n jLabel37.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Sales_report.png\"))); // NOI18N\n jPanel13.add(jLabel37, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 30, 70, 60));\n\n jLabel130.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel130.setForeground(new java.awt.Color(0, 204, 102));\n jLabel130.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel130.setText(\"SELL REPORT\");\n jLabel130.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel130MouseClicked(evt);\n }\n });\n jPanel13.add(jLabel130, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 110, 160, -1));\n\n jPanel27.setBackground(new java.awt.Color(204, 255, 204));\n jPanel27.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel27MouseClicked(evt);\n }\n });\n jPanel27.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel61.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n jLabel61.setForeground(new java.awt.Color(32, 64, 81));\n jLabel61.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/average_sale.png\"))); // NOI18N\n jPanel27.add(jLabel61, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 20, 80, 80));\n\n jLabel132.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel132.setForeground(new java.awt.Color(0, 204, 102));\n jLabel132.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel132.setText(\"AVRAGE SELL\");\n jLabel132.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel132MouseClicked(evt);\n }\n });\n jPanel27.add(jLabel132, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 110, 150, -1));\n\n jPanel5.setBackground(new java.awt.Color(204, 255, 204));\n jPanel5.setPreferredSize(new java.awt.Dimension(170, 137));\n jPanel5.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel5MouseClicked(evt);\n }\n });\n jPanel5.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel66.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n jLabel66.setForeground(new java.awt.Color(32, 64, 81));\n jLabel66.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/today_ssale.png\"))); // NOI18N\n jPanel5.add(jLabel66, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 20, 80, 70));\n\n jLabel126.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel126.setForeground(new java.awt.Color(0, 204, 102));\n jLabel126.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel126.setText(\"TODAY'S SELL\");\n jLabel126.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel126MouseClicked(evt);\n }\n });\n jPanel5.add(jLabel126, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 110, 150, -1));\n\n jPanel28.setBackground(new java.awt.Color(204, 255, 204));\n jPanel28.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel28MouseClicked(evt);\n }\n });\n jPanel28.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel68.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n jLabel68.setForeground(new java.awt.Color(32, 64, 81));\n jLabel68.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Monthly_sale(2).png\"))); // NOI18N\n jPanel28.add(jLabel68, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 20, 70, 80));\n\n jLabel129.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel129.setForeground(new java.awt.Color(0, 204, 102));\n jLabel129.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel129.setText(\"THIS MONTH SELL\");\n jLabel129.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel129MouseClicked(evt);\n }\n });\n jPanel28.add(jLabel129, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 110, 150, -1));\n\n jPanel9.setBackground(new java.awt.Color(204, 255, 204));\n jPanel9.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel9MouseClicked(evt);\n }\n });\n jPanel9.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel75.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n jLabel75.setForeground(new java.awt.Color(32, 64, 81));\n jLabel75.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Sale_target.png\"))); // NOI18N\n jPanel9.add(jLabel75, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 30, 70, 70));\n\n jLabel127.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel127.setForeground(new java.awt.Color(0, 204, 102));\n jLabel127.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel127.setText(\"SELL TARGET\");\n jLabel127.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel127MouseClicked(evt);\n }\n });\n jPanel9.add(jLabel127, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 110, 150, -1));\n\n javax.swing.GroupLayout salesLayout = new javax.swing.GroupLayout(sales);\n sales.setLayout(salesLayout);\n salesLayout.setHorizontalGroup(\n salesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, salesLayout.createSequentialGroup()\n .addContainerGap(77, Short.MAX_VALUE)\n .addGroup(salesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(71, 71, 71)\n .addGroup(salesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel27, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(salesLayout.createSequentialGroup()\n .addComponent(jPanel28, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(70, 70, 70)\n .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(80, 80, 80))\n );\n salesLayout.setVerticalGroup(\n salesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(salesLayout.createSequentialGroup()\n .addGap(63, 63, 63)\n .addGroup(salesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel28, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(salesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(salesLayout.createSequentialGroup()\n .addGap(55, 55, 55)\n .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, salesLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel27, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(238, Short.MAX_VALUE))\n );\n\n jPanel1.add(sales, new org.netbeans.lib.awtextra.AbsoluteConstraints(311, 53, 810, 640));\n\n bill.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel64.setBackground(new java.awt.Color(204, 255, 204));\n jPanel64.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel64MouseClicked(evt);\n }\n });\n jPanel64.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel135.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n jLabel135.setForeground(new java.awt.Color(32, 64, 81));\n jLabel135.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Cancel_bill.png\"))); // NOI18N\n jPanel64.add(jLabel135, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 30, 70, 70));\n\n jLabel123.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel123.setForeground(new java.awt.Color(0, 204, 102));\n jLabel123.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel123.setText(\"REJECT BILL\");\n jLabel123.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel123MouseClicked(evt);\n }\n });\n jPanel64.add(jLabel123, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 110, 170, -1));\n\n jPanel76.setBackground(new java.awt.Color(204, 255, 204));\n jPanel76.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel76MouseClicked(evt);\n }\n });\n jPanel76.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel136.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n jLabel136.setForeground(new java.awt.Color(32, 64, 81));\n jLabel136.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Today_bill.png\"))); // NOI18N\n jPanel76.add(jLabel136, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 30, 80, 70));\n\n jLabel124.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel124.setForeground(new java.awt.Color(0, 204, 102));\n jLabel124.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel124.setText(\"TODAY BILL\");\n jLabel124.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel124MouseClicked(evt);\n }\n });\n jPanel76.add(jLabel124, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 110, 170, -1));\n\n jPanel54.setBackground(new java.awt.Color(204, 255, 204));\n jPanel54.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel54MouseClicked(evt);\n }\n });\n jPanel54.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel131.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n jLabel131.setForeground(new java.awt.Color(32, 64, 81));\n jLabel131.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel131.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/Creat_bill.png\"))); // NOI18N\n jPanel54.add(jLabel131, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, 150, 80));\n\n jLabel119.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel119.setForeground(new java.awt.Color(0, 204, 102));\n jLabel119.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel119.setText(\"CREATE BILL\");\n jPanel54.add(jLabel119, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 110, 150, -1));\n\n jPanel77.setBackground(new java.awt.Color(204, 255, 204));\n jPanel77.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jPanel77MouseClicked(evt);\n }\n });\n jPanel77.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel139.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n jLabel139.setForeground(new java.awt.Color(32, 64, 81));\n jLabel139.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/All_bill.png\"))); // NOI18N\n jPanel77.add(jLabel139, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 30, 70, 70));\n\n jLabel125.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel125.setForeground(new java.awt.Color(0, 204, 102));\n jLabel125.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel125.setText(\"ALL BILL\");\n jLabel125.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel125MouseClicked(evt);\n }\n });\n jPanel77.add(jLabel125, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 110, 170, -1));\n\n javax.swing.GroupLayout billLayout = new javax.swing.GroupLayout(bill);\n bill.setLayout(billLayout);\n billLayout.setHorizontalGroup(\n billLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(billLayout.createSequentialGroup()\n .addGap(73, 73, 73)\n .addGroup(billLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel54, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel64, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(72, 72, 72)\n .addComponent(jPanel76, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(75, 75, 75)\n .addComponent(jPanel77, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(80, Short.MAX_VALUE))\n );\n billLayout.setVerticalGroup(\n billLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(billLayout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addGroup(billLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel77, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel54, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel76, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(58, 58, 58)\n .addComponent(jPanel64, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(248, Short.MAX_VALUE))\n );\n\n jPanel1.add(bill, new org.netbeans.lib.awtextra.AbsoluteConstraints(311, 53, 810, 640));\n\n Update.setBackground(new java.awt.Color(255, 255, 255));\n Update.setPreferredSize(new java.awt.Dimension(810, 6));\n\n salf_update.setBackground(new java.awt.Color(204, 255, 204));\n salf_update.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n salf_updateMouseClicked(evt);\n }\n });\n\n jLabel105.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel105.setForeground(new java.awt.Color(0, 204, 102));\n jLabel105.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel105.setText(\"SELF PROFILE\");\n jLabel105.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel105MouseClicked(evt);\n }\n });\n\n jLabel82.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/edit_pro.png\"))); // NOI18N\n\n jLabel108.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel108.setForeground(new java.awt.Color(0, 204, 102));\n jLabel108.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel108.setText(\"UPDATE\");\n jLabel108.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel108MouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout salf_updateLayout = new javax.swing.GroupLayout(salf_update);\n salf_update.setLayout(salf_updateLayout);\n salf_updateLayout.setHorizontalGroup(\n salf_updateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(salf_updateLayout.createSequentialGroup()\n .addGap(53, 53, 53)\n .addComponent(jLabel82)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, salf_updateLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel105, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(salf_updateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(salf_updateLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel108, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE)\n .addContainerGap()))\n );\n salf_updateLayout.setVerticalGroup(\n salf_updateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, salf_updateLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel82)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel105)\n .addContainerGap(28, Short.MAX_VALUE))\n .addGroup(salf_updateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, salf_updateLayout.createSequentialGroup()\n .addContainerGap(108, Short.MAX_VALUE)\n .addComponent(jLabel108)\n .addGap(8, 8, 8)))\n );\n\n change_pass.setBackground(new java.awt.Color(204, 255, 204));\n change_pass.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n change_passMouseClicked(evt);\n }\n });\n\n jLabel121.setFont(new java.awt.Font(\"Dialog\", 1, 16)); // NOI18N\n jLabel121.setForeground(new java.awt.Color(0, 204, 102));\n jLabel121.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel121.setText(\"CHANGE PASSWORD\");\n jLabel121.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel121MouseClicked(evt);\n }\n });\n\n jLabel84.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel84.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/padlock.png\"))); // NOI18N\n\n javax.swing.GroupLayout change_passLayout = new javax.swing.GroupLayout(change_pass);\n change_pass.setLayout(change_passLayout);\n change_passLayout.setHorizontalGroup(\n change_passLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel121, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\n .addComponent(jLabel84, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n change_passLayout.setVerticalGroup(\n change_passLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, change_passLayout.createSequentialGroup()\n .addComponent(jLabel84, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel121)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout UpdateLayout = new javax.swing.GroupLayout(Update);\n Update.setLayout(UpdateLayout);\n UpdateLayout.setHorizontalGroup(\n UpdateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(UpdateLayout.createSequentialGroup()\n .addGap(95, 95, 95)\n .addComponent(salf_update, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(73, 73, 73)\n .addComponent(change_pass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(302, Short.MAX_VALUE))\n );\n UpdateLayout.setVerticalGroup(\n UpdateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(UpdateLayout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addGroup(UpdateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(change_pass, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(salf_update, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel1.add(Update, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 60, 810, 630));\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 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n setSize(new java.awt.Dimension(1118, 690));\n setLocationRelativeTo(null);\n }", "public void createRoomListViewBySite(JFrame jFrame, ControllerAdmin controllerAdmin, String siteChoice) throws SQLException, ClassNotFoundException {\n ArrayList<ArrayList<String>> rooms = controllerAdmin.getAllRooms(siteChoice);\n String[] tableTitle = {\"ID\", \"Nom\", \"Capacite\"};\n String[][] mt = new String[rooms.size()][tableTitle.length];\n for(int i = 0 ; i < rooms.size(); i++){\n for (int j = 0; j < tableTitle.length; j++) {\n mt[i][j] = rooms.get(i).get(j);\n }\n }\n jFrame.setLayout(null);\n JTable jTableRoomList = new JTable(mt, tableTitle);\n JScrollPane jScrollPane = new JScrollPane();\n JPanel jPanelRoomList = new JPanel();\n jScrollPane.getViewport().add(jTableRoomList);\n jPanelRoomList.setBounds(0, 80, 500, 200);\n jPanelRoomList.add(jScrollPane);\n jFrame.add(jPanelRoomList);\n jFrame.setVisible(true);\n }", "public tabla2() {\n initComponents();\n this.setLocationRelativeTo(this);\n }", "private void initComponents() {\n\t\tlblFechaInicio = new JLabel();\r\n\t\tlblFechaFin = new JLabel();\r\n\t\tcmbFechaFin = new DateComboBox();\r\n\t\tcmbFechaInicio = new DateComboBox();\r\n\t\tlblCuentaBancaria = new JLabel();\r\n\t\tcmbCuentaBancaria = new JComboBox();\r\n\t\ttxtBanco = new JTextField();\r\n\t\tlblEstado = new JLabel();\r\n\t\tcmbEstado = new JComboBox();\r\n\t\tbtnSeleccionarTodos = new JButton();\r\n\t\tbtnConsultar = new JButton();\r\n\t\tlblFechaCobro = new JLabel();\r\n\t\tcmbFechaCobro = new DateComboBox();\r\n\t\tbtnFechaCobro = new JButton();\r\n\t\tspTblChequesEmitidos = new JScrollPane();\r\n\t\ttblChequesEmitidos = new JTable();\r\n\t\tCellConstraints cc = new CellConstraints();\r\n\r\n\t\t//======== this ========\r\n\t\tsetName(\"Cheques Emitidos\");\r\n\t\tsetLayout(new FormLayout(\r\n\t\t\tnew ColumnSpec[] {\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(10)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(95)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(12)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(95)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(50)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(12)),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),\r\n\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\tnew ColumnSpec(Sizes.dluX(10))\r\n\t\t\t},\r\n\t\t\tnew RowSpec[] {\r\n\t\t\t\tnew RowSpec(Sizes.dluY(10)),\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tnew RowSpec(RowSpec.TOP, Sizes.DLUY8, FormSpec.NO_GROW),\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tnew RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),\r\n\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\tnew RowSpec(Sizes.dluY(10))\r\n\t\t\t}));\r\n\r\n\t\t//---- lblFechaInicio ----\r\n\t\tlblFechaInicio.setText(\"Fecha Inicio:\");\r\n\t\tadd(lblFechaInicio, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL));\r\n\r\n\t\t//---- lblFechaFin ----\r\n\t\tlblFechaFin.setText(\"Fecha Fin:\");\r\n\t\tadd(lblFechaFin, cc.xywh(9, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL));\r\n\t\tadd(cmbFechaFin, cc.xywh(11, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL));\r\n\t\tadd(cmbFechaInicio, cc.xywh(5, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));\r\n\r\n\t\t//---- lblCuentaBancaria ----\r\n\t\tlblCuentaBancaria.setText(\"Cuenta Bancaria:\");\r\n\t\tadd(lblCuentaBancaria, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\t\tadd(cmbCuentaBancaria, cc.xywh(5, 5, 5, 1));\r\n\t\tadd(txtBanco, cc.xy(11, 5));\r\n\r\n\t\t//---- lblEstado ----\r\n\t\tlblEstado.setText(\"Estado:\");\r\n\t\tadd(lblEstado, cc.xy(15, 5));\r\n\r\n\t\t//---- cmbEstado ----\r\n\t\tcmbEstado.setModel(new DefaultComboBoxModel(new String[] {\r\n\t\t\t\"TODOS\",\r\n\t\t\t\"EMITIDO\",\r\n\t\t\t\"COBRADO\",\r\n\t\t\t\"ANULADO\"\r\n\t\t}));\r\n\t\tadd(cmbEstado, cc.xy(17, 5));\r\n\r\n\t\t//---- btnSeleccionarTodos ----\r\n\t\tbtnSeleccionarTodos.setText(\"Seleccionar Todos\");\r\n\t\tadd(btnSeleccionarTodos, cc.xywh(3, 7, 3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));\r\n\r\n\t\t//---- btnConsultar ----\r\n\t\tbtnConsultar.setText(\"Consultar\");\r\n\t\tadd(btnConsultar, cc.xy(21, 5));\r\n\r\n\t\t//---- lblFechaCobro ----\r\n\t\tlblFechaCobro.setText(\"Fecha Cobro:\");\r\n\t\tadd(lblFechaCobro, cc.xywh(9, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\t\tadd(cmbFechaCobro, cc.xy(11, 7));\r\n\t\tadd(btnFechaCobro, cc.xywh(13, 7, 1, 1, CellConstraints.FILL, CellConstraints.FILL));\r\n\r\n\t\t//======== spTblChequesEmitidos ========\r\n\t\t{\r\n\t\t\t\r\n\t\t\t//---- tblChequesEmitidos ----\r\n\t\t\ttblChequesEmitidos.setModel(new DefaultTableModel(\r\n\t\t\t\tnew Object[][] {\r\n\t\t\t\t\t{null, null, null, null, null, null, null, null, null, null, Boolean.FALSE},\r\n\t\t\t\t},\r\n\t\t\t\tnew String[] {\r\n\t\t\t\t\t\"Cobrado\", \"Fecha Emisi\\u00f3n\", \"Cuenta Bancaria\", \"N\\u00famero\", \"Valor\", \"Estado\", \"Fecha Cobro\", \"Beneficiario\", \"Detalle\", \"Origen\", \"Emitido\"\r\n\t\t\t\t}\r\n\t\t\t) {\r\n\t\t\t\tClass[] columnTypes = new Class[] {\r\n\t\t\t\t\tBoolean.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Object.class, Boolean.class\r\n\t\t\t\t};\r\n\t\t\t\tboolean[] columnEditable = new boolean[] {\r\n\t\t\t\t\ttrue, false, false, false, false, false, false, false, false, false, true\r\n\t\t\t\t};\r\n\t\t\t\tpublic Class getColumnClass(int columnIndex) {\r\n\t\t\t\t\treturn columnTypes[columnIndex];\r\n\t\t\t\t}\r\n\t\t\t\tpublic boolean isCellEditable(int rowIndex, int columnIndex) {\r\n\t\t\t\t\treturn columnEditable[columnIndex];\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tspTblChequesEmitidos.setViewportView(tblChequesEmitidos);\r\n\t\t}\r\n\t\tadd(spTblChequesEmitidos, cc.xywh(3, 9, 21, 3));\r\n\t\t// JFormDesigner - End of component initialization //GEN-END:initComponents\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n JTmens = new javax.swing.JTable();\n jPanel2 = new javax.swing.JPanel();\n JCBpagas = new javax.swing.JCheckBox();\n jDateIni = new com.toedter.calendar.JDateChooser(\"dd/MM/yyyy\",\"##/##/####\",'_');\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jDateFim = new com.toedter.calendar.JDateChooser(\"dd/MM/yyyy\",\"##/##/####\",'_');\n jButton1 = new javax.swing.JButton();\n jSeparator1 = new javax.swing.JSeparator();\n JCservico = new javax.swing.JComboBox<>();\n jButton4 = new javax.swing.JButton();\n jPanel3 = new javax.swing.JPanel();\n jLabel12 = new javax.swing.JLabel();\n jPanel4 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n JBpagar = new javax.swing.JButton();\n JBpagar1 = new javax.swing.JButton();\n jSeparator2 = new javax.swing.JSeparator();\n jPanel5 = new javax.swing.JPanel();\n jPanel6 = new javax.swing.JPanel();\n JCpag = new javax.swing.JComboBox<>();\n JBreg = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n Lvalor = new javax.swing.JLabel();\n Ltipo = new javax.swing.JLabel();\n JSperiodo = new javax.swing.JSpinner();\n jLabel8 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setResizable(false);\n\n JTmens.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Data Vencimento\", \"ID\", \"Servico\", \"Valor\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n JTmens.setEnabled(false);\n JTmens.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n JTmens.getTableHeader().setReorderingAllowed(false);\n jScrollPane1.setViewportView(JTmens);\n if (JTmens.getColumnModel().getColumnCount() > 0) {\n JTmens.getColumnModel().getColumn(1).setMinWidth(50);\n JTmens.getColumnModel().getColumn(1).setMaxWidth(50);\n }\n\n jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n JCBpagas.setText(\"Exibir Mens. Pagas\");\n JCBpagas.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n JCBpagasStateChanged(evt);\n }\n });\n JCBpagas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCBpagasActionPerformed(evt);\n }\n });\n\n jDateIni.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jDateIni.setMaxSelectableDate(new java.util.Date(253370779260000L));\n jDateIni.setMinSelectableDate(new java.util.Date(-62135755095000L));\n\n jLabel2.setText(\"Vecimento Entre:\");\n\n jLabel3.setText(\"e\");\n\n jDateFim.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jDateFim.setMaxSelectableDate(new java.util.Date(253370779260000L));\n\n jButton1.setText(\"Pesquisar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);\n\n JCservico.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"<Todos os Servicos>\" }));\n JCservico.setToolTipText(\"\");\n JCservico.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCservicoActionPerformed(evt);\n }\n });\n\n jButton4.setText(\"Limpar Filtros\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jDateIni, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jDateFim, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(JCservico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(6, 6, 6)\n .addComponent(JCBpagas)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton4)\n .addGap(6, 6, 6))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(2, 2, 2)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jDateFim, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jDateIni, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(JCservico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(JCBpagas, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton4)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n jLabel12.setFont(new java.awt.Font(\"Tahoma\", 0, 36)); // NOI18N\n jLabel12.setText(\"Mensalidades\");\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel12)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addGap(0, 5, Short.MAX_VALUE)\n .addComponent(jLabel12))\n );\n\n jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel1.setText(\"No periodo de:\");\n\n jLabel4.setText(\"Mês(es) (inclui vencidas)\");\n\n jLabel5.setText(\"Apenas Mensalidades Vencidas\");\n\n JBpagar.setText(\"Gerar\");\n JBpagar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JBpagarActionPerformed(evt);\n }\n });\n\n JBpagar1.setText(\"Gerar\");\n JBpagar1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JBpagar1ActionPerformed(evt);\n }\n });\n\n jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);\n\n jPanel6.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n JCpag.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"<Forma de Pagamento>\", \"A vista\", \"Cartao\", \"Outro\" }));\n JCpag.setToolTipText(\"\");\n JCpag.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCpagActionPerformed(evt);\n }\n });\n\n JBreg.setText(\"Registrar Pagamentos\");\n JBreg.setEnabled(false);\n JBreg.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JBregActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(JCpag, 0, 183, Short.MAX_VALUE)\n .addComponent(JBreg, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(7, 7, 7))\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel6Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(JCpag, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\n .addComponent(JBreg)\n .addContainerGap())\n );\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel6.setText(\"Valor Total\");\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel7.setText(\"R$\");\n\n Lvalor.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n Lvalor.setText(\"0.0\");\n\n Ltipo.setText(\"Tipo:\");\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(Ltipo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(Lvalor))\n .addComponent(jLabel6))\n .addGap(81, 81, 81)))\n .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(Lvalor))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(Ltipo))\n .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n JSperiodo.setModel(new javax.swing.SpinnerNumberModel(1, 1, null, 1));\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel8.setText(\"Gerar Pagamento\");\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(JBpagar1))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(JSperiodo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(8, 8, 8)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(JBpagar))))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(75, 75, 75)\n .addComponent(jLabel8)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 11, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jSeparator2)\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(JBpagar1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(JSperiodo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(JBpagar, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(21, 21, 21))\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 .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "public WCreateExam() {\n initComponents();\n setLocationRelativeTo(null);\n this.setExamID();\n this.updateTable();\n }", "private void CreateList (MouseEvent evt)\n {\n if(currentPlayers < nPlayers)\n {\n label2.setText(\"List not full\");\n }\n else\n {\n new TEST(Names);\n label2.setText(\"List created\");\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n labelTitulo = new javax.swing.JLabel();\n txtCedula = new javax.swing.JTextField();\n txtNombre = new javax.swing.JTextField();\n labelCedula = new javax.swing.JLabel();\n txtApellido = new javax.swing.JTextField();\n txtCorreo = new javax.swing.JTextField();\n labelNombre = new javax.swing.JLabel();\n labelApellido = new javax.swing.JLabel();\n labelCorreo = new javax.swing.JLabel();\n botonBuscar = new javax.swing.JButton();\n botonCancelar = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n tablaTelefonos = new javax.swing.JTable();\n jButtonListarTodos = new javax.swing.JButton();\n\n setClosable(true);\n setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameActivated(evt);\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n jPanel1.setBackground(new java.awt.Color(97, 105, 119));\n jPanel1.setPreferredSize(new java.awt.Dimension(305, 360));\n\n labelTitulo.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n labelTitulo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n labelTitulo.setText(\"Usuario\");\n\n txtCedula.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n txtCedula.setToolTipText(\"Ingrese la cedula\");\n txtCedula.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtCedulaActionPerformed(evt);\n }\n });\n\n txtNombre.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n txtNombre.setEnabled(false);\n txtNombre.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNombreActionPerformed(evt);\n }\n });\n\n labelCedula.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n labelCedula.setText(\"Cedula:\");\n\n txtApellido.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n txtApellido.setEnabled(false);\n txtApellido.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtApellidoActionPerformed(evt);\n }\n });\n\n txtCorreo.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n txtCorreo.setEnabled(false);\n\n labelNombre.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n labelNombre.setText(\"Nombre:\");\n\n labelApellido.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n labelApellido.setText(\"Apellido:\");\n\n labelCorreo.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n labelCorreo.setText(\"Correo Electronico:\");\n\n botonBuscar.setText(\"Buscar\");\n botonBuscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonBuscarActionPerformed(evt);\n }\n });\n\n botonCancelar.setText(\"Cancelar\");\n botonCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonCancelarActionPerformed(evt);\n }\n });\n\n tablaTelefonos.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null}\n },\n new String [] {\n \"Codigo\", \"Tipo\", \"Numero\", \"Operadora\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tablaTelefonos.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tablaTelefonosMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tablaTelefonos);\n\n jButtonListarTodos.setText(\"Listar todos\");\n jButtonListarTodos.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonListarTodosActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(57, 57, 57)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(labelNombre)\n .addComponent(labelApellido)\n .addComponent(labelCedula))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtCedula, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtApellido, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtCorreo, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(79, 79, 79))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(74, 74, 74)\n .addComponent(labelTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 277, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(53, 53, 53)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(labelCorreo)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(botonBuscar)\n .addGap(39, 39, 39)\n .addComponent(botonCancelar)\n .addGap(46, 46, 46)\n .addComponent(jButtonListarTodos)))))\n .addGap(0, 59, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(labelTitulo)\n .addGap(15, 15, 15)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCedula, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(labelCedula))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(labelNombre))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtApellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(labelApellido))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCorreo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(labelCorreo))\n .addGap(15, 15, 15)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(botonBuscar)\n .addComponent(botonCancelar)\n .addComponent(jButtonListarTodos))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(15, Short.MAX_VALUE))\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 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 462, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 401, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane2 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList<>();\n jPanel2 = new javax.swing.JPanel();\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jTextField1 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n Titutlo = new javax.swing.JLabel();\n PainelAbas = new javax.swing.JTabbedPane();\n ConsultarCompromissos1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n painelConsulta = new javax.swing.JTabbedPane();\n Janeiro = new javax.swing.JScrollPane();\n tabelaJaneiro = new javax.swing.JTable();\n Fevereiro = new javax.swing.JScrollPane();\n tabelaFevereiro = new javax.swing.JTable();\n Março = new javax.swing.JScrollPane();\n tabelaMarço = new javax.swing.JTable();\n Abril = new javax.swing.JScrollPane();\n tabelaAbril = new javax.swing.JTable();\n Maio = new javax.swing.JScrollPane();\n tabelaMaio = new javax.swing.JTable();\n Junho = new javax.swing.JScrollPane();\n tabelaJunho = new javax.swing.JTable();\n Julho = new javax.swing.JScrollPane();\n tabelaJulho = new javax.swing.JTable();\n Agosto = new javax.swing.JScrollPane();\n tabelaAgosto = new javax.swing.JTable();\n Setembro = new javax.swing.JScrollPane();\n tabelaSetembro = new javax.swing.JTable();\n Outubro = new javax.swing.JScrollPane();\n tabelaOutubro = new javax.swing.JTable();\n Novembro = new javax.swing.JScrollPane();\n tabelaNovembro = new javax.swing.JTable();\n Dezembro = new javax.swing.JScrollPane();\n tabelaDezembro = new javax.swing.JTable();\n listaDeAnos = new javax.swing.JComboBox<>();\n jScrollPane1 = new javax.swing.JScrollPane();\n Compromisso = new javax.swing.JLabel();\n CadastrarCompromissos = new javax.swing.JPanel();\n ConsultarCompromissos2 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n painelConsulta1 = new javax.swing.JTabbedPane();\n Janeiro1 = new javax.swing.JScrollPane();\n tabelaJaneiro1 = new javax.swing.JTable();\n Fevereiro1 = new javax.swing.JScrollPane();\n tabelaFevereiro1 = new javax.swing.JTable();\n Março1 = new javax.swing.JScrollPane();\n tabelaMarço1 = new javax.swing.JTable();\n Abril1 = new javax.swing.JScrollPane();\n tabelaAbril1 = new javax.swing.JTable();\n Maio1 = new javax.swing.JScrollPane();\n tabelaMaio1 = new javax.swing.JTable();\n Junho1 = new javax.swing.JScrollPane();\n tabelaJunho1 = new javax.swing.JTable();\n Julho1 = new javax.swing.JScrollPane();\n tabelaJulho1 = new javax.swing.JTable();\n Agosto1 = new javax.swing.JScrollPane();\n tabelaAgosto1 = new javax.swing.JTable();\n Setembro1 = new javax.swing.JScrollPane();\n tabelaSetembro1 = new javax.swing.JTable();\n Outubro1 = new javax.swing.JScrollPane();\n tabelaOutubro1 = new javax.swing.JTable();\n Novembro1 = new javax.swing.JScrollPane();\n tabelaNovembro1 = new javax.swing.JTable();\n Dezembro1 = new javax.swing.JScrollPane();\n tabelaDezembro1 = new javax.swing.JTable();\n listaDeAnos1 = new javax.swing.JComboBox<>();\n selecioneAhora1 = new javax.swing.JLabel();\n listaDeHoras1 = new javax.swing.JComboBox<>();\n jScrollPane3 = new javax.swing.JScrollPane();\n digitarCompromisso = new javax.swing.JTextArea();\n salvarCompromisso = new javax.swing.JButton();\n adicionarNovoAno = new javax.swing.JButton();\n\n jList1.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\", \"Item 5\" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jScrollPane2.setViewportView(jList1);\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 100, Short.MAX_VALUE)\n );\n\n jTextField1.setText(\"jTextField1\");\n\n jLabel2.setText(\"jLabel2\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n Titutlo.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n Titutlo.setForeground(new java.awt.Color(0, 0, 204));\n Titutlo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n Titutlo.setText(\"Agenda de Compromissos\");\n\n PainelAbas.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n PainelAbasMouseClicked(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setText(\"Selecione o Ano:\");\n\n tabelaJaneiro.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaJaneiro.setRowSelectionAllowed(false);\n tabelaJaneiro.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n tabelaJaneiro.getTableHeader().setReorderingAllowed(false);\n tabelaJaneiro.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaJaneiroMouseClicked(evt);\n }\n });\n Janeiro.setViewportView(tabelaJaneiro);\n tabelaJaneiro.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaJaneiro.getColumnModel().getColumnCount() > 0) {\n tabelaJaneiro.getColumnModel().getColumn(0).setResizable(false);\n tabelaJaneiro.getColumnModel().getColumn(1).setResizable(false);\n tabelaJaneiro.getColumnModel().getColumn(2).setResizable(false);\n tabelaJaneiro.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta.addTab(\"Janeiro\", Janeiro);\n\n tabelaFevereiro.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaFevereiro.setRowSelectionAllowed(false);\n tabelaFevereiro.getTableHeader().setReorderingAllowed(false);\n tabelaFevereiro.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaFevereiroMouseClicked(evt);\n }\n });\n Fevereiro.setViewportView(tabelaFevereiro);\n tabelaFevereiro.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaFevereiro.getColumnModel().getColumnCount() > 0) {\n tabelaFevereiro.getColumnModel().getColumn(0).setResizable(false);\n tabelaFevereiro.getColumnModel().getColumn(1).setResizable(false);\n tabelaFevereiro.getColumnModel().getColumn(2).setResizable(false);\n tabelaFevereiro.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta.addTab(\"Fevereiro\", Fevereiro);\n\n tabelaMarço.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaMarço.setRowSelectionAllowed(false);\n tabelaMarço.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaMarçoMouseClicked(evt);\n }\n });\n Março.setViewportView(tabelaMarço);\n tabelaMarço.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaMarço.getColumnModel().getColumnCount() > 0) {\n tabelaMarço.getColumnModel().getColumn(0).setResizable(false);\n tabelaMarço.getColumnModel().getColumn(1).setResizable(false);\n tabelaMarço.getColumnModel().getColumn(2).setResizable(false);\n tabelaMarço.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta.addTab(\"Março\", Março);\n\n tabelaAbril.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaAbril.setRowSelectionAllowed(false);\n tabelaAbril.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaAbrilMouseClicked(evt);\n }\n });\n Abril.setViewportView(tabelaAbril);\n tabelaAbril.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaAbril.getColumnModel().getColumnCount() > 0) {\n tabelaAbril.getColumnModel().getColumn(0).setResizable(false);\n tabelaAbril.getColumnModel().getColumn(1).setResizable(false);\n tabelaAbril.getColumnModel().getColumn(2).setResizable(false);\n tabelaAbril.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta.addTab(\"Abril\", Abril);\n\n tabelaMaio.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaMaio.setRowSelectionAllowed(false);\n tabelaMaio.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaMaioMouseClicked(evt);\n }\n });\n Maio.setViewportView(tabelaMaio);\n tabelaMaio.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaMaio.getColumnModel().getColumnCount() > 0) {\n tabelaMaio.getColumnModel().getColumn(0).setResizable(false);\n tabelaMaio.getColumnModel().getColumn(1).setResizable(false);\n tabelaMaio.getColumnModel().getColumn(2).setResizable(false);\n tabelaMaio.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta.addTab(\"Maio\", Maio);\n\n tabelaJunho.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaJunho.setRowSelectionAllowed(false);\n tabelaJunho.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaJunhoMouseClicked(evt);\n }\n });\n Junho.setViewportView(tabelaJunho);\n tabelaJunho.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaJunho.getColumnModel().getColumnCount() > 0) {\n tabelaJunho.getColumnModel().getColumn(0).setResizable(false);\n tabelaJunho.getColumnModel().getColumn(1).setResizable(false);\n tabelaJunho.getColumnModel().getColumn(2).setResizable(false);\n tabelaJunho.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta.addTab(\"Junho\", Junho);\n\n tabelaJulho.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaJulho.setRowSelectionAllowed(false);\n tabelaJulho.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaJulhoMouseClicked(evt);\n }\n });\n Julho.setViewportView(tabelaJulho);\n tabelaJulho.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaJulho.getColumnModel().getColumnCount() > 0) {\n tabelaJulho.getColumnModel().getColumn(0).setResizable(false);\n tabelaJulho.getColumnModel().getColumn(1).setResizable(false);\n tabelaJulho.getColumnModel().getColumn(2).setResizable(false);\n tabelaJulho.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta.addTab(\"Julho\", Julho);\n\n tabelaAgosto.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaAgosto.setRowSelectionAllowed(false);\n tabelaAgosto.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaAgostoMouseClicked(evt);\n }\n });\n Agosto.setViewportView(tabelaAgosto);\n tabelaAgosto.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaAgosto.getColumnModel().getColumnCount() > 0) {\n tabelaAgosto.getColumnModel().getColumn(0).setResizable(false);\n tabelaAgosto.getColumnModel().getColumn(1).setResizable(false);\n tabelaAgosto.getColumnModel().getColumn(2).setResizable(false);\n tabelaAgosto.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta.addTab(\"Agosto\", Agosto);\n\n tabelaSetembro.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaSetembro.setRowSelectionAllowed(false);\n tabelaSetembro.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaSetembroMouseClicked(evt);\n }\n });\n Setembro.setViewportView(tabelaSetembro);\n tabelaSetembro.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaSetembro.getColumnModel().getColumnCount() > 0) {\n tabelaSetembro.getColumnModel().getColumn(0).setResizable(false);\n tabelaSetembro.getColumnModel().getColumn(1).setResizable(false);\n tabelaSetembro.getColumnModel().getColumn(2).setResizable(false);\n tabelaSetembro.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta.addTab(\"Setembro\", Setembro);\n\n tabelaOutubro.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaOutubro.setRowSelectionAllowed(false);\n tabelaOutubro.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaOutubroMouseClicked(evt);\n }\n });\n Outubro.setViewportView(tabelaOutubro);\n tabelaOutubro.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaOutubro.getColumnModel().getColumnCount() > 0) {\n tabelaOutubro.getColumnModel().getColumn(0).setResizable(false);\n tabelaOutubro.getColumnModel().getColumn(1).setResizable(false);\n tabelaOutubro.getColumnModel().getColumn(2).setResizable(false);\n tabelaOutubro.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta.addTab(\"Outubro\", Outubro);\n\n tabelaNovembro.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaNovembro.setRowSelectionAllowed(false);\n tabelaNovembro.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaNovembroMouseClicked(evt);\n }\n });\n Novembro.setViewportView(tabelaNovembro);\n tabelaNovembro.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaNovembro.getColumnModel().getColumnCount() > 0) {\n tabelaNovembro.getColumnModel().getColumn(0).setResizable(false);\n tabelaNovembro.getColumnModel().getColumn(1).setResizable(false);\n tabelaNovembro.getColumnModel().getColumn(2).setResizable(false);\n tabelaNovembro.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta.addTab(\"Novembro\", Novembro);\n\n tabelaDezembro.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaDezembro.setRowSelectionAllowed(false);\n tabelaDezembro.getTableHeader().setReorderingAllowed(false);\n tabelaDezembro.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaDezembroMouseClicked(evt);\n }\n });\n Dezembro.setViewportView(tabelaDezembro);\n tabelaDezembro.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaDezembro.getColumnModel().getColumnCount() > 0) {\n tabelaDezembro.getColumnModel().getColumn(0).setResizable(false);\n tabelaDezembro.getColumnModel().getColumn(1).setResizable(false);\n tabelaDezembro.getColumnModel().getColumn(2).setResizable(false);\n tabelaDezembro.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta.addTab(\"Dezembro\", Dezembro);\n\n listaDeAnos.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n listaDeAnosMouseMoved(evt);\n }\n });\n listaDeAnos.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n listaDeAnosMouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n listaDeAnosMouseEntered(evt);\n }\n });\n listaDeAnos.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n listaDeAnosActionPerformed(evt);\n }\n });\n\n Compromisso.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n Compromisso.setForeground(new java.awt.Color(0, 0, 204));\n jScrollPane1.setViewportView(Compromisso);\n\n javax.swing.GroupLayout ConsultarCompromissos1Layout = new javax.swing.GroupLayout(ConsultarCompromissos1);\n ConsultarCompromissos1.setLayout(ConsultarCompromissos1Layout);\n ConsultarCompromissos1Layout.setHorizontalGroup(\n ConsultarCompromissos1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(ConsultarCompromissos1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(ConsultarCompromissos1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(painelConsulta, javax.swing.GroupLayout.DEFAULT_SIZE, 489, Short.MAX_VALUE)\n .addGroup(ConsultarCompromissos1Layout.createSequentialGroup()\n .addGroup(ConsultarCompromissos1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1)\n .addGroup(ConsultarCompromissos1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(listaDeAnos, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())))\n );\n ConsultarCompromissos1Layout.setVerticalGroup(\n ConsultarCompromissos1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(ConsultarCompromissos1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(ConsultarCompromissos1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(listaDeAnos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(painelConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n PainelAbas.addTab(\"Consultar\", ConsultarCompromissos1);\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setText(\"Selecione o Ano:\");\n\n tabelaJaneiro1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaJaneiro1.setRowSelectionAllowed(false);\n tabelaJaneiro1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n tabelaJaneiro1.getTableHeader().setReorderingAllowed(false);\n tabelaJaneiro1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaJaneiro1MouseClicked(evt);\n }\n });\n Janeiro1.setViewportView(tabelaJaneiro1);\n if (tabelaJaneiro1.getColumnModel().getColumnCount() > 0) {\n tabelaJaneiro1.getColumnModel().getColumn(0).setResizable(false);\n tabelaJaneiro1.getColumnModel().getColumn(1).setResizable(false);\n tabelaJaneiro1.getColumnModel().getColumn(2).setResizable(false);\n tabelaJaneiro1.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta1.addTab(\"Janeiro\", Janeiro1);\n\n tabelaFevereiro1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaFevereiro1.setRowSelectionAllowed(false);\n tabelaFevereiro1.getTableHeader().setReorderingAllowed(false);\n tabelaFevereiro1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaFevereiro1MouseClicked(evt);\n }\n });\n Fevereiro1.setViewportView(tabelaFevereiro1);\n tabelaFevereiro1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaFevereiro1.getColumnModel().getColumnCount() > 0) {\n tabelaFevereiro1.getColumnModel().getColumn(0).setResizable(false);\n tabelaFevereiro1.getColumnModel().getColumn(1).setResizable(false);\n tabelaFevereiro1.getColumnModel().getColumn(2).setResizable(false);\n tabelaFevereiro1.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta1.addTab(\"Fevereiro\", Fevereiro1);\n\n tabelaMarço1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaMarço1.setRowSelectionAllowed(false);\n tabelaMarço1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaMarço1MouseClicked(evt);\n }\n });\n Março1.setViewportView(tabelaMarço1);\n tabelaMarço1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaMarço1.getColumnModel().getColumnCount() > 0) {\n tabelaMarço1.getColumnModel().getColumn(0).setResizable(false);\n tabelaMarço1.getColumnModel().getColumn(1).setResizable(false);\n tabelaMarço1.getColumnModel().getColumn(2).setResizable(false);\n tabelaMarço1.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta1.addTab(\"Março\", Março1);\n\n tabelaAbril1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaAbril1.setRowSelectionAllowed(false);\n tabelaAbril1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaAbril1MouseClicked(evt);\n }\n });\n Abril1.setViewportView(tabelaAbril1);\n tabelaAbril1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaAbril1.getColumnModel().getColumnCount() > 0) {\n tabelaAbril1.getColumnModel().getColumn(0).setResizable(false);\n tabelaAbril1.getColumnModel().getColumn(1).setResizable(false);\n tabelaAbril1.getColumnModel().getColumn(2).setResizable(false);\n tabelaAbril1.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta1.addTab(\"Abril\", Abril1);\n\n tabelaMaio1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaMaio1.setRowSelectionAllowed(false);\n tabelaMaio1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaMaio1MouseClicked(evt);\n }\n });\n Maio1.setViewportView(tabelaMaio1);\n tabelaMaio1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaMaio1.getColumnModel().getColumnCount() > 0) {\n tabelaMaio1.getColumnModel().getColumn(0).setResizable(false);\n tabelaMaio1.getColumnModel().getColumn(1).setResizable(false);\n tabelaMaio1.getColumnModel().getColumn(2).setResizable(false);\n tabelaMaio1.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta1.addTab(\"Maio\", Maio1);\n\n tabelaJunho1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaJunho1.setRowSelectionAllowed(false);\n tabelaJunho1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaJunho1MouseClicked(evt);\n }\n });\n Junho1.setViewportView(tabelaJunho1);\n tabelaJunho1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaJunho1.getColumnModel().getColumnCount() > 0) {\n tabelaJunho1.getColumnModel().getColumn(0).setResizable(false);\n tabelaJunho1.getColumnModel().getColumn(1).setResizable(false);\n tabelaJunho1.getColumnModel().getColumn(2).setResizable(false);\n tabelaJunho1.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta1.addTab(\"Junho\", Junho1);\n\n tabelaJulho1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaJulho1.setRowSelectionAllowed(false);\n tabelaJulho1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaJulho1MouseClicked(evt);\n }\n });\n Julho1.setViewportView(tabelaJulho1);\n tabelaJulho1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaJulho1.getColumnModel().getColumnCount() > 0) {\n tabelaJulho1.getColumnModel().getColumn(0).setResizable(false);\n tabelaJulho1.getColumnModel().getColumn(1).setResizable(false);\n tabelaJulho1.getColumnModel().getColumn(2).setResizable(false);\n tabelaJulho1.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta1.addTab(\"Julho\", Julho1);\n\n tabelaAgosto1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaAgosto1.setRowSelectionAllowed(false);\n tabelaAgosto1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaAgosto1MouseClicked(evt);\n }\n });\n Agosto1.setViewportView(tabelaAgosto1);\n tabelaAgosto1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaAgosto1.getColumnModel().getColumnCount() > 0) {\n tabelaAgosto1.getColumnModel().getColumn(0).setResizable(false);\n tabelaAgosto1.getColumnModel().getColumn(1).setResizable(false);\n tabelaAgosto1.getColumnModel().getColumn(2).setResizable(false);\n tabelaAgosto1.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta1.addTab(\"Agosto\", Agosto1);\n\n tabelaSetembro1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaSetembro1.setRowSelectionAllowed(false);\n tabelaSetembro1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaSetembro1MouseClicked(evt);\n }\n });\n Setembro1.setViewportView(tabelaSetembro1);\n tabelaSetembro1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaSetembro1.getColumnModel().getColumnCount() > 0) {\n tabelaSetembro1.getColumnModel().getColumn(0).setResizable(false);\n tabelaSetembro1.getColumnModel().getColumn(1).setResizable(false);\n tabelaSetembro1.getColumnModel().getColumn(2).setResizable(false);\n tabelaSetembro1.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta1.addTab(\"Setembro\", Setembro1);\n\n tabelaOutubro1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaOutubro1.setRowSelectionAllowed(false);\n tabelaOutubro1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaOutubro1MouseClicked(evt);\n }\n });\n Outubro1.setViewportView(tabelaOutubro1);\n tabelaOutubro1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaOutubro1.getColumnModel().getColumnCount() > 0) {\n tabelaOutubro1.getColumnModel().getColumn(0).setResizable(false);\n tabelaOutubro1.getColumnModel().getColumn(1).setResizable(false);\n tabelaOutubro1.getColumnModel().getColumn(2).setResizable(false);\n tabelaOutubro1.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta1.addTab(\"Outubro\", Outubro1);\n\n tabelaNovembro1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaNovembro1.setRowSelectionAllowed(false);\n tabelaNovembro1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaNovembro1MouseClicked(evt);\n }\n });\n Novembro1.setViewportView(tabelaNovembro1);\n tabelaNovembro1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaNovembro1.getColumnModel().getColumnCount() > 0) {\n tabelaNovembro1.getColumnModel().getColumn(0).setResizable(false);\n tabelaNovembro1.getColumnModel().getColumn(1).setResizable(false);\n tabelaNovembro1.getColumnModel().getColumn(2).setResizable(false);\n tabelaNovembro1.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta1.addTab(\"Novembro\", Novembro1);\n\n tabelaDezembro1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n { new Integer(1), new Integer(2), new Integer(3), new Integer(4)},\n { new Integer(5), new Integer(6), new Integer(7), new Integer(8)},\n { new Integer(9), new Integer(10), new Integer(11), new Integer(12)},\n { new Integer(13), new Integer(14), new Integer(15), new Integer(16)},\n { new Integer(17), new Integer(18), new Integer(19), new Integer(20)},\n { new Integer(21), new Integer(22), new Integer(23), new Integer(24)},\n { new Integer(25), new Integer(26), new Integer(27), new Integer(28)},\n { new Integer(29), new Integer(30), new Integer(31), null}\n },\n new String [] {\n \"Dia\", \"Dia\", \"Dia\", \"Dia\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tabelaDezembro1.setRowSelectionAllowed(false);\n tabelaDezembro1.getTableHeader().setReorderingAllowed(false);\n tabelaDezembro1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabelaDezembro1MouseClicked(evt);\n }\n });\n Dezembro1.setViewportView(tabelaDezembro1);\n tabelaDezembro1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n if (tabelaDezembro1.getColumnModel().getColumnCount() > 0) {\n tabelaDezembro1.getColumnModel().getColumn(0).setResizable(false);\n tabelaDezembro1.getColumnModel().getColumn(1).setResizable(false);\n tabelaDezembro1.getColumnModel().getColumn(2).setResizable(false);\n tabelaDezembro1.getColumnModel().getColumn(3).setResizable(false);\n }\n\n painelConsulta1.addTab(\"Dezembro\", Dezembro1);\n\n listaDeAnos1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n listaDeAnos1MouseMoved(evt);\n }\n });\n listaDeAnos1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n listaDeAnos1MouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n listaDeAnos1MouseEntered(evt);\n }\n });\n listaDeAnos1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n listaDeAnos1ActionPerformed(evt);\n }\n });\n\n selecioneAhora1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n selecioneAhora1.setForeground(new java.awt.Color(0, 0, 204));\n selecioneAhora1.setText(\"Selecione a Hora:\");\n\n listaDeHoras1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"00:00\", \"01:00\", \"02:00\", \"03:00\", \"04:00\", \"05:00\", \"06:00\", \"07:00\", \"08:00\", \"09:00\", \"10:00\", \"11:00\", \"12:00\", \"13:00\", \"14:00\", \"15:00\", \"16:00\", \"17:00\", \"18:00\", \"19:00\", \"20:00\", \"21:00\", \"22:00\", \"23:00\" }));\n listaDeHoras1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n listaDeHoras1MouseMoved(evt);\n }\n });\n listaDeHoras1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n listaDeHoras1MouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n listaDeHoras1MouseEntered(evt);\n }\n });\n listaDeHoras1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n listaDeHoras1ActionPerformed(evt);\n }\n });\n\n digitarCompromisso.setColumns(20);\n digitarCompromisso.setRows(5);\n jScrollPane3.setViewportView(digitarCompromisso);\n\n salvarCompromisso.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n salvarCompromisso.setForeground(new java.awt.Color(0, 0, 204));\n salvarCompromisso.setText(\"Salvar Compromisso\");\n salvarCompromisso.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n salvarCompromissoActionPerformed(evt);\n }\n });\n\n adicionarNovoAno.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n adicionarNovoAno.setForeground(new java.awt.Color(0, 51, 204));\n adicionarNovoAno.setText(\"Novo Ano\");\n adicionarNovoAno.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n adicionarNovoAnoActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout ConsultarCompromissos2Layout = new javax.swing.GroupLayout(ConsultarCompromissos2);\n ConsultarCompromissos2.setLayout(ConsultarCompromissos2Layout);\n ConsultarCompromissos2Layout.setHorizontalGroup(\n ConsultarCompromissos2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(ConsultarCompromissos2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(ConsultarCompromissos2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(painelConsulta1, javax.swing.GroupLayout.DEFAULT_SIZE, 489, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ConsultarCompromissos2Layout.createSequentialGroup()\n .addGroup(ConsultarCompromissos2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(salvarCompromisso, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, ConsultarCompromissos2Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(listaDeAnos1, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(adicionarNovoAno)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(selecioneAhora1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(listaDeHoras1, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())))\n );\n ConsultarCompromissos2Layout.setVerticalGroup(\n ConsultarCompromissos2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(ConsultarCompromissos2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(ConsultarCompromissos2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(ConsultarCompromissos2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(selecioneAhora1)\n .addComponent(listaDeHoras1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(ConsultarCompromissos2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(listaDeAnos1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(adicionarNovoAno)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(painelConsulta1, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)\n .addComponent(salvarCompromisso)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout CadastrarCompromissosLayout = new javax.swing.GroupLayout(CadastrarCompromissos);\n CadastrarCompromissos.setLayout(CadastrarCompromissosLayout);\n CadastrarCompromissosLayout.setHorizontalGroup(\n CadastrarCompromissosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 499, Short.MAX_VALUE)\n .addGroup(CadastrarCompromissosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(CadastrarCompromissosLayout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(ConsultarCompromissos2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n CadastrarCompromissosLayout.setVerticalGroup(\n CadastrarCompromissosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 379, Short.MAX_VALUE)\n .addGroup(CadastrarCompromissosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(CadastrarCompromissosLayout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(ConsultarCompromissos2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n\n PainelAbas.addTab(\"Cadastrar\", CadastrarCompromissos);\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(PainelAbas)\n .addComponent(Titutlo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(Titutlo, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(PainelAbas)\n .addContainerGap())\n );\n\n pack();\n }", "public void create() {\n\n\t\tthis.data = new Object[lb.getBoardLen()+3][3];\n\t\tdata[0][0] = \"RANK\";\n\t\tdata[0][1] = \"PLAYER\";\n\t\tdata[0][2] = \"POINTS\";\n\t\t\n\t\tfor (int i = 1; i <= lb.getBoardLen(); i++) {\n\t\t\tdata[i][0] = \"#\" + Integer.toString(i);\n\t\t\tdata[i][1] = lb.getUserPointsList().get(i-1).username;\n\t\t\tdata[i][2] = Integer.toString(lb.getUserPointsList().get(i-1).points);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif (Sfunctions.sUserPull(user.getUsername(), user.getPassword()).getWeek() == -1) {\n\t\t\tdata[lb.getBoardLen() + 1][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][1] = \"THE SEASON HAS ENDED.\";\n\t\t\tdata[lb.getBoardLen() + 1][2] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][1] = \"THANKS FOR PLAYING!\";\n\t\t\tdata[lb.getBoardLen() + 2][2] = \"\";\n\t\t}\n\t\telse {\n\t\t\tdata[lb.getBoardLen() + 1][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][1] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][2] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][1] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][2] = \"\";\n\t\t}\n\t\n\tJTable table = new JTable(data, headers);\n\ttable.setBackground(new Color(104, 0, 0));\n\ttable.setForeground(Color.WHITE);\n\ttable.setFont(textFont);\n\ttable.setShowGrid(false);\n\ttable.setEnabled(false);\n\n\t//Depending on where the ME is\n\tme_row = getRowByValue(table, user.getUsername());\n\ttable.setRowSelectionInterval(me_row, me_row);\n\t\n\t\n\n\t\n\tTableColumn column = null;\n\tfor (int i = 0; i < 3; i++) {\n\t column = table.getColumnModel().getColumn(i);\n\t if (i == 0) {\n\t \t\tcolumn.setPreferredWidth(60);\n\t }\n\t if (i == 1) {\n\t column.setPreferredWidth(210); //third column is bigger\n\t } else {\n\t \t\tcolumn.setPreferredWidth(80);\n\t }\n\t}\n\n\t\n\tthis.add(table);\n\tthis.setBackground(new Color(104, 0, 0));\n\t}", "tbls createtbls();", "public TablesPanel() {\n\n tableModel = new TablesTableModel(); \n matchesModel = new MatchesTableModel();\n gameChooser = new GameChooser();\n\n initComponents();\n // tableModel.setSession(session);\n\n // formater\n // change default just now from 60 to 30 secs\n // see workaround for 4.0 versions: https://github.com/ocpsoft/prettytime/issues/152\n TimeFormat timeFormat = timeFormater.removeUnit(JustNow.class);\n JustNow newJustNow = new JustNow();\n newJustNow.setMaxQuantity(1000L * 30L); // 30 seconds gap (show \"just now\" from 0 to 30 secs)\n timeFormater.registerUnit(newJustNow, timeFormat);\n\n // 1. TABLE CURRENT\n tableTables.createDefaultColumnsFromModel();\n ((MageTable)tableTables).setTableInfo(tableInfo);\n \n activeTablesSorter = new MageTableRowSorter(tableModel) {\n @Override\n public void toggleSortOrder(int column) {\n // special sort for created and seat column\n if (column == TablesTableModel.COLUMN_CREATED || column == TablesTableModel.COLUMN_SEATS) {\n List<? extends SortKey> sortKeys = getSortKeys();\n if (sortKeys.size() == 2) {\n // clear sort on second click\n setSortKeys(null);\n } else {\n // setup sort on first click\n List<SortKey> list = new ArrayList<>();\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_SEATS, SortOrder.ASCENDING));\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_CREATED, SortOrder.DESCENDING));\n setSortKeys(list);\n }\n } else {\n super.toggleSortOrder(column);\n }\n }\n };\n tableTables.setRowSorter(activeTablesSorter);\n\n // time ago\n tableTables.getColumnModel().getColumn(TablesTableModel.COLUMN_CREATED).setCellRenderer(timeAgoCellRenderer);\n // skill level\n tableTables.getColumnModel().getColumn(TablesTableModel.COLUMN_SKILL).setCellRenderer(skillCellRenderer);\n // seats\n tableTables.getColumnModel().getColumn(TablesTableModel.COLUMN_SEATS).setCellRenderer(seatsCellRenderer);\n\n /* date sorter (not need, default is good - see getColumnClass)\n activeTablesSorter.setComparator(TablesTableModel.COLUMN_CREATED, new Comparator<Date>() {\n @Override\n public int compare(Date v1, Date v2) {\n return v1.compareTo(v2);\n }\n\n });*/\n\n // seats sorter (free tables must be first)\n activeTablesSorter.setComparator(TablesTableModel.COLUMN_SEATS, new Comparator<String>() {\n @Override\n public int compare(String v1, String v2) {\n int[] seats1 = parseSeatsInfo(v1);\n int[] seats2 = parseSeatsInfo(v2);\n boolean free1 = seats1[0] != seats1[1];\n boolean free2 = seats2[0] != seats2[1];\n\n // free seats go first\n if (free1 || free2) {\n return Boolean.compare(free2, free1);\n }\n\n // all other seats go without sorts\n return 0;\n }\n });\n\n // default sort by created date (last games from above)\n ArrayList list = new ArrayList<>();\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_SEATS, SortOrder.ASCENDING));\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_CREATED, SortOrder.DESCENDING));\n activeTablesSorter.setSortKeys(list);\n\n TableUtil.setColumnWidthAndOrder(tableTables, DEFAULT_COLUMNS_WIDTH, KEY_TABLES_COLUMNS_WIDTH, KEY_TABLES_COLUMNS_ORDER);\n\n // 2. TABLE COMPLETED\n completedTablesSorter = new MageTableRowSorter(matchesModel);\n tableCompleted.setRowSorter(completedTablesSorter);\n\n // duration\n tableCompleted.getColumnModel().getColumn(MatchesTableModel.COLUMN_DURATION).setCellRenderer(durationCellRenderer);\n // start-end\n tableCompleted.getColumnModel().getColumn(MatchesTableModel.COLUMN_START).setCellRenderer(datetimeCellRenderer);\n tableCompleted.getColumnModel().getColumn(MatchesTableModel.COLUMN_END).setCellRenderer(datetimeCellRenderer);\n // default sort by ended date (last games from above)\n ArrayList list2 = new ArrayList<>();\n list2.add(new RowSorter.SortKey(MatchesTableModel.COLUMN_END, SortOrder.DESCENDING));\n completedTablesSorter.setSortKeys(list2);\n\n // 3. CHAT\n chatPanelMain.getUserChatPanel().useExtendedView(ChatPanelBasic.VIEW_MODE.NONE);\n chatPanelMain.getUserChatPanel().setBorder(null);\n chatPanelMain.getUserChatPanel().setChatType(ChatPanelBasic.ChatType.TABLES);\n\n // 4. BUTTONS (add new buttons to the end of the list -- if not then users lost their filter settings)\n filterButtons = new JToggleButton[]{btnStateWaiting, btnStateActive, btnStateFinished,\n btnTypeMatch, btnTypeTourneyConstructed, btnTypeTourneyLimited,\n btnFormatBlock, btnFormatStandard, btnFormatModern, btnFormatLegacy, btnFormatVintage, btnFormatPremodern, btnFormatCommander, btnFormatTinyLeader, btnFormatLimited, btnFormatOther,\n btnSkillBeginner, btnSkillCasual, btnSkillSerious, btnRated, btnUnrated, btnOpen, btnPassword, btnFormatOathbreaker, btnFormatPioneer};\n\n JComponent[] components = new JComponent[]{chatPanelMain, jSplitPane1, jScrollPaneTablesActive, jScrollPaneTablesFinished, jPanelTop, jPanelTables};\n for (JComponent component : components) {\n component.setOpaque(false);\n }\n\n jScrollPaneTablesActive.getViewport().setBackground(new Color(255, 255, 255, 50));\n jScrollPaneTablesFinished.getViewport().setBackground(new Color(255, 255, 255, 50));\n\n restoreFilters();\n setGUISize();\n\n Action openTableAction;\n openTableAction = new AbstractAction() {\n @Override\n public void actionPerformed(ActionEvent e) {\n String searchID = e.getActionCommand();\n int modelRow = TablesUtil.findTableRowFromSearchId(tableModel, searchID);\n if (modelRow == -1) {\n return;\n }\n UUID tableId = (UUID) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN + 3);\n UUID gameId = (UUID) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN + 2);\n String action = (String) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN);\n String gameType = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_GAME_TYPE);\n boolean isTournament = (Boolean) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN + 1);\n String owner = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_OWNER);\n String pwdColumn = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_PASSWORD);\n switch (action) {\n case \"Join\":\n if (owner.equals(SessionHandler.getUserName()) || owner.startsWith(SessionHandler.getUserName() + ',')) {\n try {\n JDesktopPane desktopPane = (JDesktopPane) MageFrame.getUI().getComponent(MageComponents.DESKTOP_PANE);\n JInternalFrame[] windows = desktopPane.getAllFramesInLayer(javax.swing.JLayeredPane.DEFAULT_LAYER);\n for (JInternalFrame frame : windows) {\n if (frame.getTitle().equals(\"Waiting for players\")) {\n frame.toFront();\n frame.setVisible(true);\n try {\n frame.setSelected(true);\n } catch (PropertyVetoException ve) {\n LOGGER.error(ve);\n }\n }\n\n }\n } catch (InterruptedException ex) {\n LOGGER.error(ex);\n }\n return;\n }\n if (isTournament) {\n LOGGER.info(\"Joining tournament \" + tableId);\n if (!gameType.startsWith(\"Constructed\")) {\n if (TablesTableModel.PASSWORD_VALUE_YES.equals(pwdColumn)) {\n joinTableDialog.showDialog(roomId, tableId, true, !gameType.startsWith(\"Constructed\"));\n } else {\n SessionHandler.joinTournamentTable(roomId, tableId, SessionHandler.getUserName(), PlayerType.HUMAN, 1, null, \"\");\n }\n } else {\n joinTableDialog.showDialog(roomId, tableId, true, !gameType.startsWith(\"Constructed\"));\n }\n } else {\n LOGGER.info(\"Joining table \" + tableId);\n joinTableDialog.showDialog(roomId, tableId, false, false);\n }\n break;\n case \"Remove\":\n UserRequestMessage message = new UserRequestMessage(\"Removing table\", \"Are you sure you want to remove table?\");\n message.setButton1(\"No\", null);\n message.setButton2(\"Yes\", PlayerAction.CLIENT_REMOVE_TABLE);\n MageFrame.getInstance().showUserRequestDialog(message);\n break;\n case \"Show\":\n if (isTournament) {\n LOGGER.info(\"Showing tournament table \" + tableId);\n SessionHandler.watchTable(roomId, tableId);\n }\n break;\n case \"Watch\":\n if (!isTournament) {\n LOGGER.info(\"Watching table \" + tableId);\n SessionHandler.watchTable(roomId, tableId);\n }\n break;\n case \"Replay\":\n LOGGER.info(\"Replaying game \" + gameId);\n SessionHandler.replayGame(gameId);\n break;\n }\n }\n };\n\n Action closedTableAction;\n closedTableAction = new AbstractAction() {\n @Override\n public void actionPerformed(ActionEvent e) {\n String searchID = e.getActionCommand();\n int modelRow = TablesUtil.findTableRowFromSearchId(matchesModel, searchID);\n if (modelRow == -1) {\n return;\n }\n String action = (String) matchesModel.getValueAt(modelRow, MatchesTableModel.COLUMN_ACTION);\n switch (action) {\n case \"Replay\":\n java.util.List<UUID> gameList = matchesModel.getListofGames(modelRow);\n if (gameList != null && !gameList.isEmpty()) {\n if (gameList.size() == 1) {\n SessionHandler.replayGame(gameList.get(0));\n } else {\n gameChooser.show(gameList, MageFrame.getDesktop().getMousePosition());\n }\n }\n // MageFrame.getDesktop().showTournament(tournamentId);\n break;\n case \"Show\":\n if (matchesModel.isTournament(modelRow)) {\n LOGGER.info(\"Showing tournament table \" + matchesModel.getTableId(modelRow));\n SessionHandler.watchTable(roomId, matchesModel.getTableId(modelRow));\n }\n break;\n }\n }\n };\n\n // !!!! adds action buttons to the table panel (don't delete this)\n actionButton1 = new TablesButtonColumn(tableTables, openTableAction, tableTables.convertColumnIndexToView(TablesTableModel.ACTION_COLUMN));\n actionButton2 = new TablesButtonColumn(tableCompleted, closedTableAction, tableCompleted.convertColumnIndexToView(MatchesTableModel.COLUMN_ACTION));\n // selection\n tablesLastSelection.put(tableTables, \"\");\n tablesLastSelection.put(tableCompleted, \"\");\n addTableSelectListener(tableTables);\n addTableSelectListener(tableCompleted);\n // double click\n addTableDoubleClickListener(tableTables, openTableAction);\n addTableDoubleClickListener(tableCompleted, closedTableAction);\n }", "public TopListTimer() {\r\n\t\tsuper(-1, 1000 * 30);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n txtMaTimKiem = new javax.swing.JTextField();\n btnTimKiem = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n txtMaSv = new javax.swing.JTextField();\n txtTiengAnh = new javax.swing.JTextField();\n txtTinHoc = new javax.swing.JTextField();\n txtGDTC = new javax.swing.JTextField();\n lblName = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n lblTB = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblShow = new javax.swing.JTable();\n jLabel9 = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n btnDelete = new javax.swing.JButton();\n btnUpdate = new javax.swing.JButton();\n btnNew = new javax.swing.JButton();\n btnSave = new javax.swing.JButton();\n jPanel4 = new javax.swing.JPanel();\n btnFirst = new javax.swing.JButton();\n btnPreview = new javax.swing.JButton();\n btnNext = new javax.swing.JButton();\n btnLast = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(51, 51, 255));\n jLabel1.setText(\"QUẢN LÝ ĐIỂM SINH VIÊN\");\n\n jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel3.setText(\"Mã sinh viên:\");\n\n btnTimKiem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/2.icon/icon/Search.png\"))); // NOI18N\n btnTimKiem.setText(\"Tìm kiếm\");\n btnTimKiem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnTimKiemActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel3)\n .addGap(32, 32, 32)\n .addComponent(txtMaTimKiem, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(42, 42, 42)\n .addComponent(btnTimKiem)\n .addContainerGap(30, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtMaTimKiem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnTimKiem))\n .addContainerGap(24, Short.MAX_VALUE))\n );\n\n jLabel2.setText(\"Tìm kiếm\");\n\n jPanel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n jLabel4.setText(\"Họ và tên:\");\n\n jLabel5.setText(\"Mã SV\");\n\n jLabel6.setText(\"TIẾNG ANH\");\n\n jLabel7.setText(\"TIN HỌC\");\n\n jLabel8.setText(\"GIÁO DỤC TC\");\n\n txtGDTC.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtGDTCActionPerformed(evt);\n }\n });\n\n lblName.setText(\".........\");\n\n jLabel10.setText(\"Điểm TB:\");\n\n lblTB.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n lblTB.setForeground(new java.awt.Color(0, 51, 255));\n lblTB.setText(\"0\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jLabel8))\n .addGap(20, 20, 20)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtTinHoc, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtGDTC, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6))\n .addGap(33, 33, 33)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtMaSv)\n .addComponent(txtTiengAnh)\n .addComponent(lblName, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE))\n .addGap(27, 27, 27)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(11, 11, 11)\n .addComponent(lblTB)))))\n .addContainerGap(31, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(lblName))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtMaSv, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(jLabel10)))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblTB)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(txtTiengAnh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(txtTinHoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(txtGDTC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n tblShow.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null, null},\n {null, null, null, null, null, null},\n {null, null, null, null, null, null},\n {null, null, null, null, null, null}\n },\n new String [] {\n \"Mã SV\", \"Họ tên\", \"Tiếng Anh\", \"Tin học\", \"GDTC\", \"Điểm TB\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, true, false, false, true\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tblShow.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tblShowMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tblShow);\n\n jLabel9.setForeground(new java.awt.Color(51, 51, 255));\n jLabel9.setText(\"3 sinh viên có điểm cao nhất\");\n\n jPanel3.setLayout(new java.awt.GridLayout(4, 1, 5, 10));\n\n btnDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/2.icon/icon/Delete.png\"))); // NOI18N\n btnDelete.setText(\"DELETE\");\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n jPanel3.add(btnDelete);\n\n btnUpdate.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/2.icon/icon/Edit.png\"))); // NOI18N\n btnUpdate.setText(\"UPDATE\");\n btnUpdate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUpdateActionPerformed(evt);\n }\n });\n jPanel3.add(btnUpdate);\n\n btnNew.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/2.icon/icon/Add.png\"))); // NOI18N\n btnNew.setText(\"NEW\");\n btnNew.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNewActionPerformed(evt);\n }\n });\n jPanel3.add(btnNew);\n\n btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/2.icon/icon/Save.png\"))); // NOI18N\n btnSave.setText(\"SAVE\");\n btnSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSaveActionPerformed(evt);\n }\n });\n jPanel3.add(btnSave);\n\n btnFirst.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/2.icon/icon/first.png\"))); // NOI18N\n btnFirst.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnFirstActionPerformed(evt);\n }\n });\n jPanel4.add(btnFirst);\n\n btnPreview.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/2.icon/icon/preview.png\"))); // NOI18N\n btnPreview.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnPreviewActionPerformed(evt);\n }\n });\n jPanel4.add(btnPreview);\n\n btnNext.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/2.icon/icon/next.png\"))); // NOI18N\n btnNext.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNextActionPerformed(evt);\n }\n });\n jPanel4.add(btnNext);\n\n btnLast.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/2.icon/icon/last.png\"))); // NOI18N\n btnLast.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLastActionPerformed(evt);\n }\n });\n jPanel4.add(btnLast);\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(142, 142, 142)\n .addComponent(jLabel1))\n .addGroup(layout.createSequentialGroup()\n .addGap(89, 89, 89)\n .addComponent(jLabel2))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 532, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(176, 176, 176)))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(13, 13, 13)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n seletorArquivos = new javax.swing.JFileChooser();\n toolBar = new javax.swing.JToolBar();\n buttonAbrir = new javax.swing.JButton();\n butonSalvar = new javax.swing.JButton();\n jSeparator1 = new javax.swing.JToolBar.Separator();\n buttonAddTime = new javax.swing.JButton();\n buttonAtualizar = new javax.swing.JButton();\n buttonDistancias1 = new javax.swing.JButton();\n jSeparator2 = new javax.swing.JToolBar.Separator();\n buttonDistancias = new javax.swing.JButton();\n buttonTabela = new javax.swing.JButton();\n desktopPane = new javax.swing.JDesktopPane();\n jScrollPane1 = new javax.swing.JScrollPane();\n tableTimes = new javax.swing.JTable();\n jButton1 = new javax.swing.JButton();\n menuBar = new javax.swing.JMenuBar();\n menuArquivo = new javax.swing.JMenu();\n itemAddTime = new javax.swing.JMenuItem();\n itemDistancias = new javax.swing.JMenuItem();\n separatorUm = new javax.swing.JPopupMenu.Separator();\n itemTabela = new javax.swing.JMenuItem();\n separatorDois = new javax.swing.JPopupMenu.Separator();\n itemAbrir = new javax.swing.JMenuItem();\n itemSalvar = new javax.swing.JMenuItem();\n itemSalvarComo = new javax.swing.JMenuItem();\n itemSair = new javax.swing.JMenuItem();\n menuAjuda = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Gerador de Tabelas\");\n setBackground(new java.awt.Color(255, 255, 255));\n\n toolBar.setForeground(new java.awt.Color(255, 255, 255));\n toolBar.setRollover(true);\n toolBar.setToolTipText(\"\");\n\n buttonAbrir.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/poc/view/icons/abrir.png\"))); // NOI18N\n buttonAbrir.setToolTipText(\"Abrir...\\n\");\n buttonAbrir.setFocusable(false);\n buttonAbrir.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n buttonAbrir.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n buttonAbrir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonAbrirActionPerformed(evt);\n }\n });\n toolBar.add(buttonAbrir);\n\n butonSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/poc/view/icons/salvar.png\"))); // NOI18N\n butonSalvar.setToolTipText(\"Salvar\");\n butonSalvar.setFocusable(false);\n butonSalvar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n butonSalvar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n butonSalvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n butonSalvarActionPerformed(evt);\n }\n });\n toolBar.add(butonSalvar);\n toolBar.add(jSeparator1);\n\n buttonAddTime.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/poc/view/icons/addTime.png\"))); // NOI18N\n buttonAddTime.setToolTipText(\"Adicionar Time\");\n buttonAddTime.setFocusable(false);\n buttonAddTime.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n buttonAddTime.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n buttonAddTime.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonAddTimeActionPerformed(evt);\n }\n });\n toolBar.add(buttonAddTime);\n\n buttonAtualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/poc/view/icons/atualizar.png\"))); // NOI18N\n buttonAtualizar.setToolTipText(\"Atualizar\");\n buttonAtualizar.setFocusable(false);\n buttonAtualizar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n buttonAtualizar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n buttonAtualizar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonAtualizarActionPerformed(evt);\n }\n });\n toolBar.add(buttonAtualizar);\n\n buttonDistancias1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/poc/view/icons/excluirTime.png\"))); // NOI18N\n buttonDistancias1.setToolTipText(\"Excluir Times\");\n buttonDistancias1.setFocusable(false);\n buttonDistancias1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n buttonDistancias1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n buttonDistancias1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonDistancias1ActionPerformed(evt);\n }\n });\n toolBar.add(buttonDistancias1);\n toolBar.add(jSeparator2);\n\n buttonDistancias.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/poc/view/icons/distancia.png\"))); // NOI18N\n buttonDistancias.setToolTipText(\"Cadastrar Distâncias\");\n buttonDistancias.setFocusable(false);\n buttonDistancias.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n buttonDistancias.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n buttonDistancias.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonDistanciasActionPerformed(evt);\n }\n });\n toolBar.add(buttonDistancias);\n\n buttonTabela.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/poc/view/icons/gerarTabela.png\"))); // NOI18N\n buttonTabela.setToolTipText(\"Gerar Tabela\");\n buttonTabela.setFocusable(false);\n buttonTabela.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n buttonTabela.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n buttonTabela.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonTabelaActionPerformed(evt);\n }\n });\n toolBar.add(buttonTabela);\n\n desktopPane.addComponentListener(new java.awt.event.ComponentAdapter() {\n public void componentResized(java.awt.event.ComponentEvent evt) {\n desktopPaneComponentResized(evt);\n }\n });\n\n tableTimes.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null},\n {null, null, null},\n {null, null, null},\n {null, null, null}\n },\n new String [] {\n \"Códigos\", \"Times\", \"Prioridade\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.Object.class, java.lang.String.class, java.lang.String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(tableTimes);\n\n desktopPane.setLayer(jScrollPane1, javax.swing.JLayeredPane.DEFAULT_LAYER);\n\n javax.swing.GroupLayout desktopPaneLayout = new javax.swing.GroupLayout(desktopPane);\n desktopPane.setLayout(desktopPaneLayout);\n desktopPaneLayout.setHorizontalGroup(\n desktopPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING)\n );\n desktopPaneLayout.setVerticalGroup(\n desktopPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE)\n );\n\n jButton1.setText(\"Atualizar Tabela\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n menuBar.setBackground(new java.awt.Color(255, 255, 255));\n menuBar.setForeground(new java.awt.Color(255, 255, 255));\n\n menuArquivo.setText(\"Arquivo\");\n\n itemAddTime.setText(\"Adicionar Time\");\n menuArquivo.add(itemAddTime);\n\n itemDistancias.setText(\"Cadastrar Distâncias\");\n menuArquivo.add(itemDistancias);\n menuArquivo.add(separatorUm);\n\n itemTabela.setText(\"Gerar Tabela\");\n menuArquivo.add(itemTabela);\n menuArquivo.add(separatorDois);\n\n itemAbrir.setText(\"Abrir...\");\n itemAbrir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n itemAbrirActionPerformed(evt);\n }\n });\n menuArquivo.add(itemAbrir);\n\n itemSalvar.setText(\"Salvar\");\n menuArquivo.add(itemSalvar);\n\n itemSalvarComo.setText(\"Salvar como...\");\n menuArquivo.add(itemSalvarComo);\n\n itemSair.setText(\"Sair\");\n itemSair.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n itemSairActionPerformed(evt);\n }\n });\n menuArquivo.add(itemSair);\n\n menuBar.add(menuArquivo);\n\n menuAjuda.setText(\"Ajuda\");\n menuBar.add(menuAjuda);\n\n setJMenuBar(menuBar);\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 .addComponent(toolBar, javax.swing.GroupLayout.DEFAULT_SIZE, 778, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(desktopPane, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(toolBar, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(desktopPane)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "@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 jTableTimeTable = new javax.swing.JTable();\n jLabel2 = new javax.swing.JLabel();\n dFrom = new controls.JDateTimePicker();\n jLabel3 = new javax.swing.JLabel();\n dTo = new controls.JDateTimePicker();\n btnSearch = new javax.swing.JButton();\n\n jTableTimeTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"#\", \"Employee\", \"Customer\", \"Date Start\", \"Date End\", \"Location\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.Object.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(jTableTimeTable);\n\n jLabel2.setFont(new java.awt.Font(\"Roboto\", 0, 24)); // NOI18N\n jLabel2.setText(\"From:\");\n\n dFrom.setFormatPattern(\"dd/MM/yyyy\");\n\n jLabel3.setFont(new java.awt.Font(\"Roboto\", 0, 24)); // NOI18N\n jLabel3.setText(\"To:\");\n\n dTo.setFormatPattern(\"dd/MM/yyyy\");\n\n btnSearch.setText(\"Search\");\n btnSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSearchActionPerformed(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 .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(dFrom, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(dTo, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(158, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(dFrom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, 0)\n .addComponent(jLabel2)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(dTo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING))\n .addComponent(btnSearch))\n .addGap(34, 34, 34)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 594, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void initComponents() {\n\n jDetailedPanel = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jItemsTable = new javax.swing.JTable();\n\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n WindowClosingEvent(evt);\n }\n });\n\n jDetailedPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jItemsTable.setBackground(new java.awt.Color(83, 223, 99));\n jItemsTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Order Time\", \"Ordered By\", \"Served Time\", \"Served By\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(jItemsTable);\n jItemsTable.getColumnModel().getColumn(0).setMinWidth(40);\n jItemsTable.getColumnModel().getColumn(0).setPreferredWidth(30);\n jItemsTable.getColumnModel().getColumn(1).setResizable(false);\n jItemsTable.getColumnModel().getColumn(2).setResizable(false);\n jItemsTable.getColumnModel().getColumn(3).setResizable(false);\n\n jDetailedPanel.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 600, 70));\n\n getContentPane().add(jDetailedPanel, java.awt.BorderLayout.CENTER);\n\n pack();\n }", "@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 tablaVentas = new javax.swing.JTable();\n\n setClosable(true);\n setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);\n\n tablaVentas.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jScrollPane1.setViewportView(tablaVentas);\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 .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 378, Short.MAX_VALUE)\n );\n\n pack();\n }", "@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 jTOrdenes = new javax.swing.JTable();\n jPanel1 = new javax.swing.JPanel();\n jLabel5 = new javax.swing.JLabel();\n txtOrden = new javax.swing.JTextField();\n txtPago = new javax.swing.JTextField();\n jXDatePicker1 = new org.jdesktop.swingx.JXDatePicker();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n cbxTienda = new javax.swing.JComboBox();\n lblTienda = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n txtQty = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n cbxLibro = new javax.swing.JComboBox();\n lblTit = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n btnAgregarTitulo = new javax.swing.JButton();\n btnEditarTitulo = new javax.swing.JButton();\n btnEliminar = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n menuNueva = new javax.swing.JMenu();\n miNuevaOrden = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n verOrden = new javax.swing.JMenuItem();\n verOrdenPorTienda = new javax.swing.JMenuItem();\n jMenuItem1 = new javax.swing.JMenuItem();\n jMenu1 = new javax.swing.JMenu();\n menuEditoriales = new javax.swing.JMenuItem();\n menuPuestos = new javax.swing.JMenuItem();\n menuEmpleados = new javax.swing.JMenuItem();\n menuAutores = new javax.swing.JMenuItem();\n menuTitulos = new javax.swing.JMenuItem();\n menuTitsAuts = new javax.swing.JMenuItem();\n menuTiendas = new javax.swing.JMenuItem();\n menuDescuentos = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"( ͡° ͜ʖ ͡°) - Sistema de ventas de libros\");\n setResizable(false);\n\n jTOrdenes.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jTOrdenes.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTOrdenesMouseClicked(evt);\n }\n });\n jTOrdenes.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTOrdenesKeyReleased(evt);\n }\n });\n jScrollPane1.setViewportView(jTOrdenes);\n\n jLabel5.setText(\"Terminos de Pago\");\n\n txtOrden.setMinimumSize(new java.awt.Dimension(6, 23));\n txtOrden.setPreferredSize(new java.awt.Dimension(150, 23));\n\n txtPago.setMinimumSize(new java.awt.Dimension(6, 23));\n txtPago.setPreferredSize(new java.awt.Dimension(150, 23));\n\n jLabel1.setText(\"Id Tienda\");\n\n jLabel2.setText(\"Numero de Orden\");\n\n jLabel3.setText(\"Fecha de Orden\");\n\n cbxTienda.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cbxTiendaActionPerformed(evt);\n }\n });\n\n lblTienda.setText(\" \");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblTienda, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtOrden, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtPago, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jXDatePicker1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbxTienda, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(cbxTienda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblTienda, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtOrden, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jXDatePicker1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtPago, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n String formats = \"yyyy-MM-dd\";\n\n this.jXDatePicker1.setFormats(formats);\n\n jLabel4.setText(\"Cantidad\");\n\n txtQty.setMinimumSize(new java.awt.Dimension(6, 23));\n txtQty.setPreferredSize(new java.awt.Dimension(150, 23));\n\n jLabel6.setText(\"Titulo\");\n\n cbxLibro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cbxLibroActionPerformed(evt);\n }\n });\n\n lblTit.setText(\" \");\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblTit, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtQty, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)\n .addComponent(cbxLibro, 0, 135, Short.MAX_VALUE))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbxLibro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblTit, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtQty, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addContainerGap())\n );\n\n btnAgregarTitulo.setText(\"Agregar\");\n btnAgregarTitulo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAgregarTituloActionPerformed(evt);\n }\n });\n\n btnEditarTitulo.setText(\"Editar\");\n btnEditarTitulo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEditarTituloActionPerformed(evt);\n }\n });\n\n btnEliminar.setText(\"Eliminar\");\n btnEliminar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEliminarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(btnAgregarTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnEditarTitulo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnEliminar, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnAgregarTitulo)\n .addComponent(btnEditarTitulo)\n .addComponent(btnEliminar))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n menuNueva.setText(\"Nueva\");\n\n miNuevaOrden.setText(\"Venta\");\n miNuevaOrden.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n miNuevaOrdenActionPerformed(evt);\n }\n });\n menuNueva.add(miNuevaOrden);\n\n jMenuBar1.add(menuNueva);\n\n jMenu2.setText(\"Ver\");\n\n verOrden.setText(\"Orden...\");\n verOrden.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n verOrdenActionPerformed(evt);\n }\n });\n jMenu2.add(verOrden);\n\n verOrdenPorTienda.setText(\"Ordenes por tienda...\");\n verOrdenPorTienda.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n verOrdenPorTiendaActionPerformed(evt);\n }\n });\n jMenu2.add(verOrdenPorTienda);\n\n jMenuItem1.setText(\"Todas las ordenes\");\n jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem1ActionPerformed(evt);\n }\n });\n jMenu2.add(jMenuItem1);\n\n jMenuBar1.add(jMenu2);\n\n jMenu1.setText(\"Administrar\");\n\n menuEditoriales.setText(\"Editoriales...\");\n menuEditoriales.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n menuEditorialesActionPerformed(evt);\n }\n });\n jMenu1.add(menuEditoriales);\n\n menuPuestos.setText(\"Puestos...\");\n menuPuestos.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n menuPuestosActionPerformed(evt);\n }\n });\n jMenu1.add(menuPuestos);\n\n menuEmpleados.setText(\"Empleados...\");\n menuEmpleados.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n menuEmpleadosActionPerformed(evt);\n }\n });\n jMenu1.add(menuEmpleados);\n\n menuAutores.setText(\"Autores...\");\n menuAutores.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n menuAutoresActionPerformed(evt);\n }\n });\n jMenu1.add(menuAutores);\n\n menuTitulos.setText(\"Titulos...\");\n menuTitulos.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n menuTitulosActionPerformed(evt);\n }\n });\n jMenu1.add(menuTitulos);\n\n menuTitsAuts.setText(\"Titulos-Autores...\");\n menuTitsAuts.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n menuTitsAutsActionPerformed(evt);\n }\n });\n jMenu1.add(menuTitsAuts);\n\n menuTiendas.setText(\"Tiendas...\");\n menuTiendas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n menuTiendasActionPerformed(evt);\n }\n });\n jMenu1.add(menuTiendas);\n\n menuDescuentos.setText(\"Descuentos...\");\n menuDescuentos.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n menuDescuentosActionPerformed(evt);\n }\n });\n jMenu1.add(menuDescuentos);\n\n jMenuBar1.add(jMenu1);\n\n setJMenuBar(jMenuBar1);\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, false)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 646, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "public static AddNewScheduleDialog createInstance(int quantity){\n AddNewScheduleDialog frag = new AddNewScheduleDialog();\n frag.quantity = quantity;\n return frag;\n }", "public frmListarPedido(ArrayList<Pedido> pedd) {\n initComponents();\n listaPedidos = pedd;\n DefaultTableModel modelo = (DefaultTableModel)TablePedidos.getModel();\n for (int i = 0; i < listaPedidos.size(); i++){\n modelo.addRow(new String[] {String.valueOf(listaPedidos.get(i).getNumero()),\n listaPedidos.get(i).getCliente().getNome(),\n String.valueOf(listaPedidos.get(i).getData().getDia())\n +\"/\"+String.valueOf(listaPedidos.get(i).getData().getMes())\n +\"/\"+String.valueOf(listaPedidos.get(i).getData().getAno()),\n String.valueOf(listaPedidos.get(i).getTotalPedido())});\n }\n }", "public EventForm(String type, int eventID, Day day, CalendarForm mainForm) {\n formType = type;\n this.eventID = eventID;\n initialDay = day;\n chosenDay = day;\n this.mainForm = mainForm;\n eventToEdit = day.getEvent(eventID);\n frame = new JFrame();\n lblDay = new JLabel(\"Day:\");\n lblMonth = new JLabel(\"Month:\");\n lblName = new JLabel(\"Event name:\");\n lblTime = new JLabel(\"Start Time:\");\n lblDuration = new JLabel(\"Duration:\");\n cmbDay = new JComboBox();\n cmbMonth = new JComboBox();\n txtName = new JTextField(10);\n radSelectTime = new JRadioButton(\"Choose Time\", true);\n radAutoTime = new JRadioButton(\"Generate Time\", false);\n buttonGroup = new ButtonGroup();\n cmbTime = new JComboBox();\n cmbDuration = new JComboBox();\n btnSubmit = new JButton(type);\n DateFormatSymbols cal = new DateFormatSymbols();\n monthNames = cal.getMonths();\n gbc = new GridBagConstraints();\n freeTimes = new ArrayList();\n usedTimes = new ArrayList();\n txtName.requestFocus();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenu2 = new javax.swing.JMenu();\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jPanel1 = new javax.swing.JPanel();\n btnCreateTablespace = new javax.swing.JButton();\n txttablespace = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n txtdatafile = new javax.swing.JTextField();\n txtsize = new javax.swing.JTextField();\n txtautoextend = new javax.swing.JTextField();\n txtmaxsize = new javax.swing.JTextField();\n btnCreateTemporarytablespace = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n txtdatafilenew = new javax.swing.JTextField();\n txtsizenew = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jListTablespace = new javax.swing.JList<>();\n btnChangeTablespace = new javax.swing.JButton();\n jSeparator1 = new javax.swing.JSeparator();\n txtnewextension = new javax.swing.JTextField();\n jLabel13 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblTablespace = new javax.swing.JTable();\n\n jMenu1.setText(\"File\");\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n jMenuBar1.add(jMenu2);\n\n btnCreateTablespace.setText(\"CREAR TABLESPACE\");\n btnCreateTablespace.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCreateTablespaceActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"Nombre de la tablespace :\");\n\n jLabel3.setText(\"Ruta de archivos de dato :\");\n\n jLabel4.setText(\"Tamaño :\");\n\n jLabel5.setText(\"Autoextender hasta :\");\n\n jLabel6.setText(\"Tamaño máximo :\");\n\n btnCreateTemporarytablespace.setText(\"CREAR TEMPORARY TABLESPACE\");\n btnCreateTemporarytablespace.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCreateTemporarytablespaceActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(88, Short.MAX_VALUE)\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnCreateTablespace)\n .addComponent(jLabel6)\n .addComponent(jLabel5)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel4))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtmaxsize, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtsize, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txttablespace, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtautoextend, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtdatafile, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(112, 112, 112)\n .addComponent(btnCreateTemporarytablespace)))\n .addGap(129, 129, 129))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(232, 232, 232)\n .addComponent(jLabel7))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txttablespace, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtdatafile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtsize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtautoextend, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(txtmaxsize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnCreateTablespace)\n .addComponent(btnCreateTemporarytablespace))))\n .addContainerGap(39, Short.MAX_VALUE))\n );\n\n jTabbedPane1.addTab(\"CREAR\", jPanel1);\n\n jLabel8.setText(\"Nombre de la tablespace :\");\n\n jLabel9.setText(\"Ruta de archivos de datos :\");\n\n jLabel10.setText(\"Tamaño :\");\n\n jListTablespace.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\", \"Item 5\" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jScrollPane2.setViewportView(jListTablespace);\n\n btnChangeTablespace.setText(\"Extender\");\n btnChangeTablespace.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnChangeTablespaceActionPerformed(evt);\n }\n });\n\n jLabel13.setText(\"Nombre de la extensión :\");\n\n jButton1.setText(\"ELIMINAR TABLESPACE\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(0, 4, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnChangeTablespace, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel13)\n .addComponent(jLabel10)\n .addComponent(jLabel9))\n .addGap(36, 36, 36)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtsizenew, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtdatafilenew, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtnewextension, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(43, 43, 43))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(128, 128, 128))))\n .addComponent(jSeparator1)))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel8)\n .addGap(15, 15, 15)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(34, 34, 34)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel13))\n .addComponent(txtnewextension, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(txtdatafilenew, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(13, 13, 13)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(txtsizenew, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(9, 9, 9)\n .addComponent(btnChangeTablespace)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton1)))\n .addContainerGap(23, Short.MAX_VALUE))\n );\n\n jTabbedPane1.addTab(\"MODIFICAR\", jPanel2);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"TABLESPACES\");\n\n tblTablespace.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n tblTablespace.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS);\n jScrollPane1.setViewportView(tblTablespace);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.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 .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jScrollPane1))\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTabbedPane1)\n .addGap(20, 20, 20))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 314, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE)\n .addContainerGap())\n );\n }", "private void criaJTable() {\n tabela = new JTable(modelo);\n modelo.addColumn(\"Codigo:\");\n modelo.addColumn(\"Data inicio:\");\n modelo.addColumn(\"Data Fim:\");\n modelo.addColumn(\"Valor produto:\");\n modelo.addColumn(\"Quantidade:\");\n\n preencherJTable();\n }", "@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 jTable1 = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n txtDlocation = new javax.swing.JTextField();\n txtALocation = new javax.swing.JTextField();\n txtDate = new javax.swing.JTextField();\n jScrollPane2 = new javax.swing.JScrollPane();\n tableFlight = new javax.swing.JTable();\n btnSearch = new javax.swing.JButton();\n btnView = new javax.swing.JButton();\n btnBack = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n comboTime = new javax.swing.JComboBox<>();\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jScrollPane1.setViewportView(jTable1);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 32)); // NOI18N\n jLabel1.setText(\"Search Flights\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 22)); // NOI18N\n jLabel2.setText(\"Depature Location:\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 22)); // NOI18N\n jLabel3.setText(\"Date(DD/MM/YY):\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 22)); // NOI18N\n jLabel4.setText(\"Arrival Location:\");\n\n txtDlocation.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n txtDlocation.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtDlocationActionPerformed(evt);\n }\n });\n\n txtALocation.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n txtALocation.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtALocationActionPerformed(evt);\n }\n });\n\n txtDate.setFont(new java.awt.Font(\"Lucida Grande\", 0, 14)); // NOI18N\n txtDate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtDateActionPerformed(evt);\n }\n });\n\n tableFlight.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Flight Number\", \"Departure Location\", \"Arrical Location\", \"Date\", \"Time\", \"Seating\"\n }\n ));\n jScrollPane2.setViewportView(tableFlight);\n if (tableFlight.getColumnModel().getColumnCount() > 0) {\n tableFlight.getColumnModel().getColumn(0).setPreferredWidth(80);\n tableFlight.getColumnModel().getColumn(1).setPreferredWidth(125);\n tableFlight.getColumnModel().getColumn(2).setPreferredWidth(110);\n }\n\n btnSearch.setFont(new java.awt.Font(\"Tahoma\", 0, 22)); // NOI18N\n btnSearch.setText(\"Search\");\n btnSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSearchActionPerformed(evt);\n }\n });\n\n btnView.setFont(new java.awt.Font(\"Tahoma\", 0, 22)); // NOI18N\n btnView.setText(\"View tickets of this flight >>\");\n btnView.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnViewActionPerformed(evt);\n }\n });\n\n btnBack.setFont(new java.awt.Font(\"Tahoma\", 0, 22)); // NOI18N\n btnBack.setText(\"<< Back\");\n btnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBackActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 22)); // NOI18N\n jLabel5.setText(\"Time:\");\n\n comboTime.setFont(new java.awt.Font(\"Tahoma\", 0, 22)); // NOI18N\n comboTime.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"All\", \"Morning\", \"Noon\", \"Night\" }));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(182, 182, 182)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel5))\n .addGap(61, 61, 61)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(txtDlocation, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE)\n .addComponent(txtALocation, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE)\n .addComponent(txtDate, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(comboTime, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(62, 62, 62)\n .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(127, 127, 127)\n .addComponent(jLabel1))))\n .addGroup(layout.createSequentialGroup()\n .addGap(79, 79, 79)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 759, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(252, 252, 252)\n .addComponent(btnView, javax.swing.GroupLayout.PREFERRED_SIZE, 396, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(btnBack)))\n .addContainerGap(166, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtDlocation, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtALocation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(8, 8, 8)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(comboTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(33, 33, 33)\n .addComponent(btnView)\n .addGap(38, 38, 38)\n .addComponent(btnBack)\n .addGap(116, 116, 116))\n );\n }", "public TaskDetailUpdateForm() {\n initComponents();\n }" ]
[ "0.6563516", "0.6465384", "0.61301047", "0.6119628", "0.60776013", "0.58224666", "0.578546", "0.57663035", "0.57398957", "0.5694458", "0.5674821", "0.56727946", "0.5667944", "0.5656316", "0.56529105", "0.561224", "0.55918634", "0.55805045", "0.55430025", "0.5540621", "0.5538914", "0.5525533", "0.5499172", "0.5497206", "0.5461977", "0.5457408", "0.5455325", "0.54473644", "0.5446731", "0.5445443", "0.5427976", "0.54237384", "0.5420638", "0.5418923", "0.5412298", "0.5410954", "0.5403048", "0.5398886", "0.5387821", "0.53872186", "0.5378801", "0.53779376", "0.5371174", "0.53507954", "0.53463286", "0.53373003", "0.5335096", "0.5333863", "0.5324105", "0.5322468", "0.53223544", "0.5316248", "0.53161895", "0.53148186", "0.5309537", "0.5306874", "0.5302303", "0.52985305", "0.52857125", "0.528289", "0.5280633", "0.52717716", "0.5263334", "0.52626014", "0.5256496", "0.52531254", "0.52451795", "0.5244552", "0.52432686", "0.5232626", "0.5231584", "0.52277887", "0.52235043", "0.5223442", "0.5221209", "0.5198347", "0.5196354", "0.5195331", "0.51881176", "0.51831967", "0.51794016", "0.51754427", "0.51753664", "0.5175347", "0.51697624", "0.51690155", "0.5166741", "0.51659375", "0.5161898", "0.51597375", "0.51571304", "0.5152652", "0.5151031", "0.51494527", "0.51483136", "0.5142948", "0.5142757", "0.51385874", "0.51383406", "0.51353884" ]
0.7503436
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); jTableTimeTable = new javax.swing.JTable(); jLabel2 = new javax.swing.JLabel(); dFrom = new controls.JDateTimePicker(); jLabel3 = new javax.swing.JLabel(); dTo = new controls.JDateTimePicker(); btnSearch = new javax.swing.JButton(); jTableTimeTable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "#", "Employee", "Customer", "Date Start", "Date End", "Location" } ) { Class[] types = new Class [] { java.lang.String.class, java.lang.Object.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class }; boolean[] canEdit = new boolean [] { false, false, false, false, false, false }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); jScrollPane1.setViewportView(jTableTimeTable); jLabel2.setFont(new java.awt.Font("Roboto", 0, 24)); // NOI18N jLabel2.setText("From:"); dFrom.setFormatPattern("dd/MM/yyyy"); jLabel3.setFont(new java.awt.Font("Roboto", 0, 24)); // NOI18N jLabel3.setText("To:"); dTo.setFormatPattern("dd/MM/yyyy"); btnSearch.setText("Search"); btnSearch.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSearchActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addGap(31, 31, 31) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(dFrom, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(dTo, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(26, 26, 26) .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(158, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(40, 40, 40) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(dFrom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, 0) .addComponent(jLabel2))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(dTo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)) .addComponent(btnSearch)) .addGap(34, 34, 34) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 594, Short.MAX_VALUE)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public MusteriEkle() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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 .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\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.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\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.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\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\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\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.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\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\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\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.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\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.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\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.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\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.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\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\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\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\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\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\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\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.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\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.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\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.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\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(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\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.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\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(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\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(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\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.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\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(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\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.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.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(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.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(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.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(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.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(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.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.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\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\tGroupLayout.DEFAULT_SIZE,\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\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\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\tGroupLayout.PREFERRED_SIZE))\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\ttextField2, GroupLayout.PREFERRED_SIZE,\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\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\tGroupLayout.DEFAULT_SIZE,\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.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\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\tGroupLayout.DEFAULT_SIZE,\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.addComponent(label14,\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\tGroupLayout.DEFAULT_SIZE,\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.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\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\tGroupLayout.DEFAULT_SIZE,\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\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\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\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\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\tGroupLayout.DEFAULT_SIZE,\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.addComponent(textField10,\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\tGroupLayout.DEFAULT_SIZE,\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.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\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.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\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\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\t\t.addComponent(label22,\n\t\t\t\t\t\t\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\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\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\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\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\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\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\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\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\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\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\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\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\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.PREFERRED_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\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\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\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.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\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.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73197734", "0.72914416", "0.72914416", "0.72914416", "0.72862023", "0.72487676", "0.7213741", "0.7207628", "0.7196503", "0.7190263", "0.71850693", "0.71594703", "0.7147939", "0.7093137", "0.70808756", "0.70566356", "0.6987119", "0.69778043", "0.6955563", "0.6953879", "0.6945632", "0.6943359", "0.69363457", "0.6931661", "0.6927987", "0.6925778", "0.6925381", "0.69117576", "0.6911631", "0.68930036", "0.6892348", "0.6890817", "0.68904495", "0.6889411", "0.68838716", "0.6881747", "0.6881229", "0.68778914", "0.6876094", "0.6874808", "0.68713", "0.6859444", "0.6856188", "0.68556464", "0.6855074", "0.68549985", "0.6853093", "0.6853093", "0.68530816", "0.6843091", "0.6837124", "0.6836549", "0.6828579", "0.68282986", "0.68268806", "0.682426", "0.6823653", "0.6817904", "0.68167645", "0.68102163", "0.6808751", "0.680847", "0.68083245", "0.6807882", "0.6802814", "0.6795573", "0.6794048", "0.6792466", "0.67904556", "0.67893785", "0.6789265", "0.6788365", "0.67824304", "0.6766916", "0.6765524", "0.6765339", "0.67571205", "0.6755559", "0.6751974", "0.67510027", "0.67433685", "0.67390305", "0.6737053", "0.673608", "0.6733373", "0.67271507", "0.67262334", "0.67205364", "0.6716807", "0.67148036", "0.6714143", "0.67090863", "0.67077154", "0.67046666", "0.6701339", "0.67006236", "0.6699842", "0.66981244", "0.6694887", "0.6691074", "0.66904294" ]
0.0
-1
add pet to user
public boolean addToUser(PetDTO pet , String username) throws Exception{ boolean check = false; try { conn = MyConnection.getConnection(); String sql = "Insert into tbl_UserPet(Username,PetID) values(?,?)"; preStm = conn.prepareStatement(sql); preStm.setString(1, username); preStm.setString(2, pet.getPetID()); check = preStm.executeUpdate() > 0; } finally { closeConnection(); } return check; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addPets(PetPOJO pet) {\n pets.add(pet);\n }", "public void addPet(VirtualPet pet) {\n\t\tshelterPets.put(pet.name, pet);\n\t}", "void addUser(User user);", "void addUser(User user);", "public void addUser(User user);", "@Transactional\n\tpublic PetDTO createPet(PetDTO petDTO) {\n\t\tUser user = validateParametersAdd(petDTO);\n\t\tPet pet = new Pet();\n\t\tpetSetters(pet, petDTO);\n\t\tif (petDTO.getAdvertisement() != null\n\t\t\t\t&& advertisementRepository.findAdvertisementById(petDTO.getAdvertisement()) != null) {\n\t\t\tpet.setAdvertisement(advertisementRepository.findAdvertisementById(petDTO.getAdvertisement()));\n\t\t}\n\t\tSet<PetDTO> allUserPets = getPetsByUser(petDTO.getUserName());\n\t\tallUserPets.add(petDTO);\n\n\t\tuser.getPets().add(pet);\n\n\t\tpetRepository.save(pet);\n\t\tuserRepository.save(user);\n\t\tpetDTO.setId(pet.getId());\n\n\t\treturn petDTO;\n\t}", "public void createPet(Pets pet) {\n\n try {\n\n Statement statement = conn.createStatement();\n String sqlStatement = \"INSERT INTO pets (\" +\n \"name, animal_type, animal_breed, date_of_birth, gender, weight, owner) \" +\n \"VALUES (\" +\n \"'\" + pet.getName() + \"',\" +\n \"'\" + pet.getAnimalType() + \"',\" +\n \"'\" + pet.getAnimalBreed() + \"',\" +\n \"'\" + pet.getDateOfBirth() + \"',\" +\n \"'\" + pet.getGender() + \"',\" +\n +pet.getWeight() + \",\" +\n \"'\" + pet.getOwner() + \"'\" +\n \")\";\n\n int rowsAffected = statement.executeUpdate(sqlStatement);\n\n if (rowsAffected != 0) {\n System.out.println(\"Pet added successfully!\");\n } else {\n System.out.println(\"Sorry.. Something went wrong! Try again.\");\n }\n\n } catch (SQLException exception) {\n System.out.println(\"Error creating a Pet : \" + exception);\n }\n }", "@Override\n\tpublic void addPerson(User pUser) {\n\t\t\n\t}", "Integer addUser(ServiceUserEntity user);", "@Override\n\tpublic void addItem(User entity) {\n\t\tuserRepository.save(entity);\n\t\t\n\t}", "public void addUser(User user) {\n\t\t\r\n\t}", "public void addUser(UserModel user);", "@Override\r\n\tpublic void add(User user) {\n\r\n\t}", "public void addUser(Person person){\n \t\n \ttry {\n\t\t\tperson.sethPassword(Base64.getEncoder().encodeToString(MessageDigest.getInstance(\"SHA-256\").digest(person.gethPassword().getBytes(StandardCharsets.UTF_8))));\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \t\n \t\n \tSystem.out.println(\"aanmaken van \" + person.getLogin());\n \tem.persist(person);\n \t\n }", "@Override\n\tpublic void registerPet(PetVO vo) {\n\t\t\n\t}", "public boolean isUsersExist(Pet pet);", "public void addUser(Customer user) {}", "ResponseMessage addUser(User user);", "@PostMapping(\"/pets\")\n public ResponseEntity<Pet> createPet(@RequestBody Pet pet) throws URISyntaxException {\n log.debug(\"REST request to save Pet : {}\", pet);\n if (pet.getId() != null) {\n throw new BadRequestAlertException(\"A new pet cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Pet result = petService.save(pet);\n return ResponseEntity.created(new URI(\"/api/pets/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "void add(User user) throws AccessControlException;", "public void AddUserDepot(String id, String label) {\r\n try {\r\n UserManager mydb = new UserManager(activity);\r\n mydb.open();\r\n mydb.AddUserWarehouse(id, label);\r\n mydb.close();\r\n }catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "void addPerson(Player player);", "private void addUser(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureUserIsMutable();\n user_.add(value);\n }", "void addPhoto(User user, Photo photo);", "void addUser(String uid, String firstname, String lastname, String pseudo);", "private void insertPet() {\n\n // Create a ContentValues object where column names are the keys,\n // and Toto's pet attributes are the values.\n ContentValues values = new ContentValues();\n values.put(PetEntry.COLUMN_PET_NAME, \"Toto\");\n values.put(PetEntry.COLUMN_PET_BREED, \"Terrier\");\n values.put(PetEntry.COLUMN_PET_GENDER, PetEntry.GENDER_MALE);\n values.put(PetEntry.COLUMN_PET_WEIGHT, 7);\n\n // Insert a new row for Toto in the database, returning the ID of that new row.\n // The first argument for db.insert() is the pets table name.\n // The second argument provides the name of a column in which the framework\n // can insert NULL in the event that the ContentValues is empty (if\n // this is set to \"null\", then the framework will not insert a row when\n // there are no values).\n // The third argument is the ContentValues object containing the info for Toto.\n Uri newUri=getContentResolver().insert(PetEntry.CONTENT_URI,values);\n if (newUri == null) {\n // If the row ID is -1, then there was an error with insertion.\n Toast.makeText(this, \"Error with saving pet\", Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast with the row ID.\n Toast.makeText(this, \"Pet saved with row id: \" + newUri, Toast.LENGTH_SHORT).show();\n }\n }", "public Long addUser(User transientUser) throws Exception;", "public void insertUser() {}", "@Override\n\tpublic void insert(User entity) {\n\t\tuserlist.put(String.valueOf(entity.getDni()), entity);\n\t}", "boolean addUser(int employeeId, String name, String password, String role);", "public void register() {\n int index = requestFromList(getUserTypes(), true);\n if (index == -1) {\n guestPresenter.returnToMainMenu();\n return;\n }\n UserManager.UserType type;\n if (index == 0) {\n type = UserManager.UserType.ATTENDEE;\n } else if (index == 1) {\n type = UserManager.UserType.ORGANIZER;\n } else {\n type = UserManager.UserType.SPEAKER;\n }\n String name = requestString(\"name\");\n char[] password = requestString(\"password\").toCharArray();\n boolean vip = false;\n if(type == UserManager.UserType.ATTENDEE) {\n vip = requestBoolean(\"vip\");\n }\n List<Object> list = guestManager.register(type, name, password, vip);\n int id = (int)list.get(0);\n updater.addCredentials((byte[])list.get(1), (byte[])list.get(2));\n updater.addUser(id, type, name, vip);\n guestPresenter.printSuccessRegistration(id);\n }", "public void addUser(String u, String p) {\n \t//users.put(\"admin\",\"12345\");\n users.put(u, p);\n }", "void addUserpan(String userid,String username,String userpwd);", "public boolean addUser(UserDTO user);", "void add(User user) throws SQLException;", "public void setpetID(String petID){\n this.petID = petID;\n }", "@Override\r\n\tpublic void insertUser(VIPUser user) {\n\t\ttry{\r\n\t\t\tString sql = \"insert into vipuser(id,name) values (?,?)\";\r\n\t\t\tObject[] args = new Object[]{user.getId(), user.getName()};\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\r\n\t}", "void addUser(Username username) throws UserAlreadyExistsException;", "private void addUser(HttpServletRequest req) throws PolygonException {\n //int id = Integer.parseInt(req.getParameter(\"id\"));\n String username = (String) req.getParameter(\"username\");\n String password = (String) req.getParameter(\"password\");\n String password2 = (String) req.getParameter(\"password2\");\n String email = (String) req.getParameter(\"email\");\n String type = (String) req.getParameter(\"type\");\n if (username.length() > 0 && password.length() > 0 && password.equals(password2) && type.length() > 0) {\n User user = new User(username, password, email, type);\n UsersMapper.insertUser(user);\n } else {\n String msg = \"Udfyld alle krævede felter\";\n throw new PolygonException(msg);\n }\n }", "public String add() {\r\n\t\tuserAdd = new User();\r\n\t\treturn \"add\";\r\n\t}", "public Boolean addUser(User user) throws ApplicationException;", "@PostMapping\n public PetDTO savePet(@RequestBody PetDTO petDTO) {\n Customer customer = null;\n if ((Long) petDTO.getOwnerId() != null) {\n customer = customerService.getCustomerById(petDTO.getOwnerId());\n }\n Pet pet = ConvertService.convertDTOToPetEntity(petDTO);\n pet.setCustomer(customer);\n\n pet = petService.save(pet);\n petDTO.setId(pet.getId());\n\n return petDTO;\n }", "public void createAndAddUser(String fName, String lName){\n ModelPlayer user = new ModelPlayer(fName, lName);\n user.setUserID(this.generateNewId());\n userListCtrl.addUser(user);\n }", "public void addPet() {\n floatingActionButton.hide();\n changeFragment(getFragment(RegisterPetFragment.class));\n toolbar.setTitle(getString(R.string.register_new_pet));\n }", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "void addUser(BlogUser user) throws DAOException;", "@PostMapping(\"/addUser\")\n public User addUser(@RequestBody User user){\n repo.save(user);\n return user;\n }", "@Override\n\tpublic void add() {\n\n\t\tSystem.out.println(\"UserServiceImpl....\");\n\t\tthis.repository.respository();\n\n\t}", "UserDTO addNewData(UserDTO userDTO);", "void registerUser(User newUser);", "public void addAccount(String user, String password);", "static public void editPet() {\n User user = LocalUserManager.getCurrentUser();\n Pet pet = LocalPetManager.findPet(user.getPetId());\n while (true) {\n Presenter.showMenu(new String[]{\"Edit pet name\", \"Set pet public/private\", \"Re-create pet\", \"Back\"},\n \"\\nThis is the pet editor menu, you can:\");\n int userChoice = GameController.getUserNum(4);\n if (userChoice == 1) {\n assert pet != null;\n String newPetName = GameController.getUserString(\"Your previous pet name is \"+\n pet.getPetName()+\". Please enter a new name...\");\n if (newPetName.equals(pet.getPetName())){\n Presenter.showNotice(\"That's the same name from before!\");\n }\n else {\n LocalPetManager.changePetName(user.getPetId(), newPetName);\n Presenter.showNotice(\"You have changed your pet name to \"+pet.getPetName()+\" successfully!\");\n }\n }\n else if (userChoice == 2) {\n boolean petPublic = GameController.getUserYesOrNo(\n \"Your pet is \"+LocalPetManager.checkPublicity(user.getPetId())+\" to others now.\\n\" +\n \"Enter 'y' to make it public or 'n' to make it private\");\n assert pet != null;\n pet.setPublicity(petPublic);\n Presenter.showNotice(\"You have change your pet to \"+\n LocalPetManager.checkPublicity(user.getPetId())+\" successfully!\");\n }\n else if (userChoice == 3){\n boolean reCreatePet = GameController.getUserYesOrNo(\n \"Are you sure you want to create a new pet? You will lose \" + pet.getPetName()+\" in the process.\\n\" +\n \"Enter 'y' to create a new pet or 'n' to go back\"\n );\n if (reCreatePet){\n UserController.createUserPet();\n Presenter.showNotice(\"\\nYou have successfully created a new pet!\\n\");\n }\n return;\n }\n else {\n return;\n }\n }\n }", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "public void addUser(User user){\r\n users.add(user);\r\n }", "public void addUser() {\n\t\tthis.users++;\n\t}", "@Override\n\tpublic User add(String name, String pwd, String phone) {\n\t\tSystem.out.println(\"OracleDao is add\");\n\t\treturn null;\n\t}", "public void addUser(String name)\r\n\t{\r\n\t\tperson= new User(name);\r\n\t\tusers.put(name, person);\r\n\t}", "public void newUser(User user);", "int insert(Pet record);", "public void insert(User user);", "public void addPerson(Person p);", "@Override\n public void addLovePhoto(User user, Image image) {\n user.addLoveImage(image);\n }", "@Override\r\n\tpublic int insert(shopPet t) {\n\t\treturn dao.insert(t);\r\n\t}", "User addUser(IDAOSession session, String fullName, String userName,\n\t\t\tString password);", "@Override\n\tpublic void insert(User objetc) {\n\t\tuserDao.insert(objetc);\n\t\t\n\t}", "public int insertUser(final User user);", "public void createUser(User user);", "public void addUser(String userId) {\n addUser(new IndividualUser(userId));\n }", "@POST(\"/AddUser\")\n\tint addUser(@Body User user);", "private void addNewUser(User user) {\n\t\tSystem.out.println(\"BirdersRepo. Adding new user to DB: \" + user.getUsername());\n\t\tDocument document = Document.parse(gson.toJson(user));\n\t\tcollection.insertOne(document);\n\t}", "public void addUser(User user) {\n\t\tSystem.out.println(\"adding user :\"+user.toString());\n\t\tuserList.add(user);\n\t}", "public void addNewSystemUser()\n {\n\n DietTreatmentSystemUserBO newUser = new DietTreatmentSystemUserBO();\n // default user\n newUser.setSystemUser(SystemUserController.getInstance()\n .getCurrentUser());\n // default function\n newUser.setFunction(SystemUserFunctionBO.TREATING_ASSISTANT);\n\n _dietTreatment.addSystemUsers(newUser);\n }", "public void setPet(Pet pet) {\n this.pet = pet;\n Util.getInstance().loadImage(pet.getId(), avatarImageView, false, new com.squareup.picasso.Callback(){\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n\n }\n });\n\n idEditText.setText(pet.getId());\n nameEditText.setText(pet.getName());\n femaleButton.setChecked(pet.isFemale());\n switch (pet.getSpecies()) {\n case \"Cat\":\n speciesSpinner.setSelection(0);\n break;\n case \"Dog\":\n speciesSpinner.setSelection(1);\n break;\n case \"Bird\":\n speciesSpinner.setSelection(2);\n break;\n case \"Rabbit\":\n speciesSpinner.setSelection(3);\n break;\n case \"Others\":\n speciesSpinner.setSelection(4);\n break;\n default:\n break;\n\n }\n if(pet.getBirthday() == null){\n birthdayEditText.setText(\"\");\n } else{\n birthdayEditText.setText(Util.getInstance().dateFormatter().format(pet.getBirthday()));\n }\n vetPhoneEditText.setText(pet.getVetPhone());\n vetNameEditText.setText(pet.getVetName());\n medicationsEditText.setText(pet.getMedications());\n chipIdEditText.setText(pet.getChipId());\n chipCompanyEditText.setText(pet.getChipCompany());\n }", "@Override\r\n\tpublic String addUser(taskPojo addUser,HttpServletRequest request, HttpServletResponse response) {\n\t\treturn dao.addUser(addUser,request,response);\r\n\t}", "@Override\n\tpublic void insertUser(User user) {\n\t\t\n\t}", "@PostMapping(\"/users/add/{firstName}/{lastName}/{password}\")\n public ResponseEntity<?> addNewUser(@PathVariable(\"firstName\")String firstName,\n @PathVariable(\"lastName\")String lastName,\n @PathVariable(\"password\") String password) {\n userService.saveNewUser(firstName, lastName, password);\n return new ResponseEntity<>(\"new user added\",HttpStatus.OK);\n }", "@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"users/{user_id}/tags\")\n Call<Void> addUserTag(\n @retrofit2.http.Path(\"user_id\") Integer userId, @retrofit2.http.Body StringWrapper tag\n );", "public void addAccount(Account account,Person person);", "public static void addUser(String name)\n {\n userList.add(name);\n }", "public void add(String fullName, String username, String password, String accType, String email, String salary){\n\t\t\n\t\t// Determine position where new User needs to be added\n\t\tUser marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n\t\tmarker = this.getHead();\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n\t\t\n\t\t// Check if the list contains only the head\n\t\tif(marker.getNext()!= null){\n\t\tmarker = marker.getNext();\t\t\t\t\t\t\t\t\t/* ====> If not then skip the head */\n\t\t}\n\t\t\n\t\t\n\t\t/*Iterate through the whole list and compare Strings. Move the marker until it reaches the end or until the input\n\t\t * username is greater than the marker's username . */\n\t\twhile((marker.getNext() != null) && (username.compareTo(marker.getUsername())>0)){\n\t\t\t\t\tmarker = marker.getNext();\n\t\t\t\t}\t\t\n\t\t\n\t\t/* When marker finds a user whose username is greater than the input it moves the marker back a position so that the new\n\t\t * user can be appended to that marker */\n\t\tif(marker.getPrev() != null){\n\t\t\t\tif(username.compareTo(marker.getUsername())<0){\n\t\t\t\t\tmarker = marker.getPrev();\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Create new user with the method's parameters as properties. Append it to the marker\n\t\tUser newUser = new User(marker.getNext(), marker);\n\t\tnewUser.setFullName(fullName);\n\t\tnewUser.setUsername(username);\n\t\tnewUser.setPassword(password);\n\t\tnewUser.setAccType(accType);\n\t\tnewUser.setEmail(email);\n\t\tnewUser.setSalary(salary);\n\t\t\n\t\t// Set connections to the new User\n\t\tnewUser.getPrev().setNext(newUser);\n\t\tif(newUser.getNext() != null){\n\t\tnewUser.getNext().setPrev(newUser);\n\t\t}\n\n\t}", "public void newUser(User user) {\n users.add(user);\n }", "private void addUser(\n int index, People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureUserIsMutable();\n user_.add(index, value);\n }", "@RequestMapping(value = \"/insert\", method = RequestMethod.POST)\n\tpublic int insert(@RequestBody User entity) {\n entity.setSlug(slug.slugify(entity.getFirstName() + \" \" + entity.getLastName()));\n\t\treturn dao.insert(entity);\n\t}", "private void savePet() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String nameString = mNameEditText.getText().toString().trim();\n String breedString = mBreedEditText.getText().toString().trim();\n String weightString = mWeightEditText.getText().toString().trim();\n\n if (mCurrentPetUri == null && TextUtils.isEmpty(nameString) && TextUtils.isEmpty(breedString) &&\n TextUtils.isEmpty(weightString) && mGender == PetContract.PetEntry.GENDER_UNKNOWN) {\n return;\n }\n\n // Create a ContentValues object where column names are the keys,\n // and pet attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(PetContract.PetEntry.COLUMN_PET_NAME, nameString);\n values.put(PetContract.PetEntry.COLUMN_PET_BREED, breedString);\n values.put(PetContract.PetEntry.COLUMN_PET_GENDER, mGender);\n\n int weight = 0;\n if (!TextUtils.isEmpty(weightString)) {\n weight = Integer.parseInt(weightString);\n }\n values.put(PetContract.PetEntry.COLUMN_PET_WEIGHT, weight);\n\n if (mCurrentPetUri == null) {\n\n Uri newUri = getContentResolver().insert(PetContract.PetEntry.CONTENT_URI, values);\n if (newUri == null) {\n Toast.makeText(this, \"Failed to save Pet\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"Save successfully\", Toast.LENGTH_SHORT).show();\n }\n\n } else {\n\n int rowsAffected = getContentResolver().update(mCurrentPetUri, values, null, null);\n if (rowsAffected == 0) {\n Toast.makeText(this, \"Failed to update Pet\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"Update Successfully \", Toast.LENGTH_SHORT).show();\n }\n\n\n Toast.makeText(this, \"Successfully saved pet\", Toast.LENGTH_SHORT).show();\n }\n }", "public void add(User user) {\r\n this.UserList.add(user);\r\n }", "public void addUser(String firstName, String lastName, String username, String password, char type)\r\n\t{\r\n\t\tdb.user_addUser(firstName, lastName, username, password, type);\t\r\n\t}", "public void addUser() {\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tframeManager.addUser(user);\r\n\t\t\tpesquisar();\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "long addOwner(Owner owner);", "@Override\n\tpublic void addUser(User user) {\n mapper.addUser(user);\n\t}", "public Integer addOrUpdate(LoginResponse user);", "public void createVolunteer(String name, String address, String phone) throws Exception {\n\t\tVolunteer volunteer = new Volunteer(name, address, phone, \"Voluntario que no cobra\");\n\t\trepository.addMember(volunteer);\n\t}", "@Override\r\n\tpublic void add(User1 user) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.save(user);\r\n\t}", "public void setUserpetname(String userpetname) {\n this.userpetname = userpetname == null ? null : userpetname.trim();\n }", "public void pet() {\n this.hunger += 1;\n this.mood += 1;\n\n if (!muted) {\n System.out.println(\"pet\\t\\t|\\t*purrr*\");\n }\n }", "@PostMapping(value = \"/saveUser\")\n public ResponseEntity<User> saveUser(@RequestBody User user ) {\n userServiceAnnotationSingleton.addUser(user.getName(),user.getAge());\n return ResponseEntity.ok(user);\n }", "Boolean registerNewUser(User user);", "public void newUserAdded(String userID);", "@PostMapping\n public void insertUser(@RequestBody User user) { userService.insertUser(user);}", "private void savePet() {\n String xtasyidString = xtasyid.getText().toString().trim();\n String nameString = name.getText().toString().trim();\n String emailString = email.getText().toString().trim();\n String collegeString = college.getText().toString().trim();\n String contactString = contact.getText().toString().trim();\n String genderString = gender.getText().toString().trim();\n String extrasString = extras.getText().toString().trim();\n\n // Check if this is supposed to be a new pet\n // and check if all the fields in the editor are blank\n if (mCurrentPetUri == null && TextUtils.isEmpty(nameString) && TextUtils.isEmpty(emailString) ) {\n // Since no fields were modified, we can return early without creating a new pet.\n // No need to create ContentValues and no need to do any ContentProvider operations.\n return;\n }\n\n // Create a ContentValues object where column names are the keys,\n // and pet attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(PetEntry.COLUMN_PET_ID, xtasyidString);\n values.put(PetEntry.COLUMN_PET_NAME, nameString);\n values.put(PetEntry.COLUMN_PET_EMAIL, emailString);\n values.put(PetEntry.COLUMN_PET_COLLEGE, collegeString);\n values.put(PetEntry.COLUMN_PET_CONTACT, contactString);\n values.put(PetEntry.COLUMN_PET_GENDER, genderString);\n values.put(PetEntry.COLUMN_PET_EXTRAS, extrasString);\n\n // Determine if this is a new or existing pet by checking if mCurrentPetUri is null or not\n if (mCurrentPetUri == null) {\n // This is a NEW pet, so insert a new pet into the provider,\n // returning the content URI for the new pet.\n Uri newUri = getContentResolver().insert(PetEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.editor_insert_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_insert_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n } else {\n // Otherwise this is an EXISTING pet, so update the pet with content URI: mCurrentPetUri\n // and pass in the new ContentValues. Pass in null for the selection and selection args\n // because mCurrentPetUri will already identify the correct row in the database that\n // we want to modify.\n int rowsAffected = getContentResolver().update(mCurrentPetUri, values, null, null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsAffected == 0) {\n // If no rows were affected, then there was an error with the update.\n Toast.makeText(this, getString(R.string.editor_update_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_update_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n }" ]
[ "0.6832711", "0.68174505", "0.67418516", "0.67418516", "0.67138994", "0.66631615", "0.6569569", "0.65024555", "0.6489206", "0.6420172", "0.6364742", "0.62178284", "0.62081546", "0.6186362", "0.61696476", "0.6120274", "0.61195785", "0.6085453", "0.6067331", "0.6066212", "0.6021955", "0.6014039", "0.59939414", "0.59871167", "0.5986183", "0.59819204", "0.5968282", "0.5959585", "0.5945545", "0.5917576", "0.5916972", "0.59155977", "0.58758265", "0.586189", "0.585387", "0.58453184", "0.58452713", "0.5843502", "0.5832584", "0.58321136", "0.5815995", "0.58151484", "0.58105385", "0.58099717", "0.57982355", "0.5797816", "0.5794785", "0.5767614", "0.5766792", "0.5766285", "0.5765799", "0.5765741", "0.57414645", "0.5726452", "0.5724213", "0.5721762", "0.57210624", "0.5716775", "0.5710411", "0.5708458", "0.57007414", "0.5695115", "0.5678114", "0.5659332", "0.56557125", "0.5654729", "0.5635199", "0.56350034", "0.56271255", "0.5618461", "0.5616127", "0.5615954", "0.5606496", "0.5601464", "0.5596063", "0.5592565", "0.5586988", "0.55861896", "0.5584973", "0.5580618", "0.5562995", "0.55589104", "0.55456203", "0.5539072", "0.5538604", "0.5537335", "0.55369616", "0.5535049", "0.5533406", "0.5522589", "0.5522265", "0.55209285", "0.5520916", "0.55199724", "0.55153155", "0.5504082", "0.55001175", "0.54994285", "0.54982966", "0.5494479" ]
0.71312606
0
Return extension point unique ids if type extensionPointId
public static List<IExtension> getExtensionsByUniqueId(String extensionPointId, Collection<String> extensionPointUniqueIds) { List<IExtension> extensions = new ArrayList<>(); for (String entensionPointUniqueId : extensionPointUniqueIds) { IExtension extension = Platform.getExtensionRegistry().getExtension(entensionPointUniqueId); if (extension == null) { OseeLog.log(PluginCoreActivator.class, Level.SEVERE, "Unable to locate extension [" + entensionPointUniqueId + "]"); } else { String thisPointId = extension.getExtensionPointUniqueIdentifier(); if (extensionPointId.equals(thisPointId)) { extensions.add(extension); } else { OseeLog.log(PluginCoreActivator.class, Level.SEVERE, "Unknown extension id [" + thisPointId + "] from extension [" + entensionPointUniqueId + "]"); } } } return extensions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getExtensionIds();", "public List<String> getPlotIds() {\n return Identifiable.getIds(getPlotList());\n }", "Set<String> getExpressionDataElementIds(String expression, ParseType parseType);", "public List<String> getPlotDefinitionIds() {\n return Identifiable.getIds(getPlotDefinitionList());\n }", "public String[] getPrimaryInputExtensions();", "public java.util.Set<java.lang.String> getCriticalExtensionOIDs() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getCriticalExtensionOIDs():java.util.Set<java.lang.String>, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getCriticalExtensionOIDs():java.util.Set<java.lang.String>\");\n }", "@ApiModelProperty(required = true,\n value = \"An array of servicePointIds, representing NMIs, that this account is linked to\")\n @NotNull\n public List<String> getServicePointIds() {\n return servicePointIds;\n }", "public java.util.Set<java.lang.String> getCriticalExtensionOIDs() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: sun.security.x509.X509CRLEntryImpl.getCriticalExtensionOIDs():java.util.Set<java.lang.String>, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: sun.security.x509.X509CRLEntryImpl.getCriticalExtensionOIDs():java.util.Set<java.lang.String>\");\n }", "public java.util.Set<java.lang.String> getNonCriticalExtensionOIDs() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getNonCriticalExtensionOIDs():java.util.Set<java.lang.String>, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getNonCriticalExtensionOIDs():java.util.Set<java.lang.String>\");\n }", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result + Arrays.hashCode(point_list);\n\t\treturn result;\n\t}", "Set<II> getIds();", "public java.util.Set<java.lang.String> getNonCriticalExtensionOIDs() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: sun.security.x509.X509CRLEntryImpl.getNonCriticalExtensionOIDs():java.util.Set<java.lang.String>, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: sun.security.x509.X509CRLEntryImpl.getNonCriticalExtensionOIDs():java.util.Set<java.lang.String>\");\n }", "private static int getUniquePotionId()\n\t{\n\t\twhile (nextPotionId < Potion.potionTypes.length && Potion.potionTypes[nextPotionId] != null)\n\t\t\tnextPotionId++;\n\t\t\n\t\treturn nextPotionId;\n\t}", "public void setExtensionID(int id)\n {\n extensionID = id;\n }", "org.apache.xmlbeans.XmlUnsignedInt xgetAlgIdExt();", "@XmlAnyElement ( lax = true )\n @JsonSerialize ( using = AnyElementSerializer.class )\n public List<Object> getExtensionElements() {\n return extensionElements;\n }", "public Collection getPersistedObjectIds() {\n if (_payload != PAYLOAD_OIDS_WITH_ADDS) {\n if (_payload == PAYLOAD_OIDS)\n throw new UserException(s_loc.get(\"no-added-oids\"));\n throw new UserException(s_loc.get(\"extent-only-event\"));\n }\n return (_addIds == null) ? Collections.EMPTY_LIST : _addIds;\n }", "public Integer getPointId() {\n return pointId;\n }", "public static IdentificationExtension[] getIdentificationExtensionsforProject(Connection aConn, long aProjectID, String aWhereAddition) throws SQLException {\n String sql;\n QuantitativeValidationSingelton iQuantitationSingelton = QuantitativeValidationSingelton.getInstance();\n if(iQuantitationSingelton.getMsLimsPre7_2()){\n sql = \"select i.*, s.filename from identification as i, spectrumfile as s where i.l_spectrumfileid = s.spectrumfileid and s.l_projectid=?\";\n } else {\n sql = \"select i.*, s.filename from identification as i, spectrum as s where i.l_spectrumid = s.spectrumid and s.l_projectid=?\";\n }\n \n if (aWhereAddition != null) {\n sql += \" AND \" + aWhereAddition;\n }\n PreparedStatement prep = aConn.prepareStatement(sql);\n prep.setLong(1, aProjectID);\n ResultSet rs = prep.executeQuery();\n Vector v = new Vector();\n while (rs.next()) {\n v.add(new IdentificationExtension(rs));\n }\n rs.close();\n prep.close();\n IdentificationExtension[] lIDs = new IdentificationExtension[v.size()];\n v.toArray(lIDs);\n\n return lIDs;\n }", "private static List<Element> getXMLPoints(Model model) {\n Set<Point> points = new TreeSet<>(Comparators.objectsById());\n points.addAll(model.getPoints(null));\n List<Element> result = new ArrayList<>(points.size());\n for (Point curPoint : points) {\n Element pointElement = new Element(\"point\");\n pointElement.setAttribute(\"id\", String.valueOf(curPoint.getId()));\n pointElement.setAttribute(\"name\", curPoint.getName());\n pointElement.setAttribute(\"xPosition\",\n String.valueOf(curPoint.getPosition().getX()));\n pointElement.setAttribute(\"yPosition\",\n String.valueOf(curPoint.getPosition().getY()));\n pointElement.setAttribute(\"zPosition\",\n String.valueOf(curPoint.getPosition().getZ()));\n pointElement.setAttribute(\"vehicleOrientationAngle\",\n String.valueOf(curPoint.getVehicleOrientationAngle()));\n pointElement.setAttribute(\"type\", curPoint.getType().toString());\n for (TCSObjectReference<Path> curRef : curPoint.getOutgoingPaths()) {\n Element outgoingElement = new Element(\"outgoingPath\");\n outgoingElement.setAttribute(\"name\", curRef.getName());\n pointElement.addContent(outgoingElement);\n }\n for (Map.Entry<String, String> curEntry\n : curPoint.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n pointElement.addContent(propertyElement);\n }\n result.add(pointElement);\n }\n return result;\n }", "public int getExtendedID()\r\n/* 50: */ {\r\n/* 51: 39 */ return 0;\r\n/* 52: */ }", "default Set<VlanId> getTaggedVlanId(ConnectPoint connectPoint) {\n return ImmutableSet.of();\n }", "ExtensionsType getExtensions();", "public List getInterfaceExtensions();", "private void updateExtendedId() {\r\n\t\tif (category != null && source != null && sink != null) {\r\n\t\t\tif (logger.isLoggable(Level.FINEST)) {\r\n\t\t\t\tlogger.log(Level.FINEST, \"ExtendedID updated\", TaskManager\r\n\t\t\t\t\t\t.getCurrentTick());\r\n\t\t\t}\r\n\t\t\textendedId = new ExtendedId(source.getId(), sink.getExtendedId(),\r\n\t\t\t\t\tcategory.getId());\r\n\t\t}\r\n\t}", "int getMapPointID();", "@NoProxy\n @NoDump\n public Set<String> getTimeZoneIds() {\n Set<String> ids = new TreeSet<>();\n\n BwDateTime dt = getDtstart();\n if ((dt != null) && (dt.getTzid() != null)) {\n ids.add(dt.getTzid());\n }\n\n dt = getDtend();\n if ((dt != null) && (dt.getTzid() != null)) {\n ids.add(dt.getTzid());\n }\n\n Set<BwDateTime> dts = getRdates();\n if (dts != null) {\n for (BwDateTime rdt: dts) {\n if (rdt.getTzid() != null) {\n ids.add(rdt.getTzid());\n }\n }\n }\n\n dts = getExdates();\n if (dts != null) {\n for (BwDateTime rdt: dts) {\n if (rdt.getTzid() != null) {\n ids.add(rdt.getTzid());\n }\n }\n }\n\n List<BwFreeBusyComponent> fbcs = getFreeBusyPeriods();\n if (fbcs != null) {\n for (BwFreeBusyComponent fbc: fbcs) {\n for (Period p: fbc.getPeriods()) {\n DateTime fdt = p.getStart();\n if (fdt.getTimeZone() != null) {\n ids.add(fdt.getTimeZone().getID());\n }\n\n fdt = p.getEnd();\n if (fdt.getTimeZone() != null) {\n ids.add(fdt.getTimeZone().getID());\n }\n }\n }\n }\n\n return ids;\n }", "public String[] getIDs() {\n return impl.getIDs();\n }", "Set<String> getExpressionElementAndOptionComboIds(String expression, ParseType parseType);", "public Set<Character> getExtensionKeys() {\n return _extensions.getExtensionKeys();\n }", "public Set<Long> allInfoProductIds() {\n return new HashSet<Long>( );\n }", "String getUniqueId();", "Set<DimensionalItemId> getExpressionDimensionalItemIds(String expression, ParseType parseType);", "int getUnusedExperimentId();", "protected Collection<IRI> getNonCurrentGraphNames() {\n final IRI ext = getExtensionGraphName();\n return extensions.values().stream().map(iri -> iri.equals(ext) ? PreferUserManaged : iri).collect(toSet());\n }", "private TreeSet<Long> getIds(Connection connection) throws Exception {\n\t\tTreeSet<Long> result = new TreeSet<Long>();\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tps = connection\n\t\t\t\t\t.prepareStatement(\"select review_feedback_id from \\\"informix\\\".review_feedback\");\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tresult.add(rs.getLong(1));\n\t\t\t}\n\t\t} finally {\n\t\t\tps.close();\n\t\t}\n\t\treturn result;\n\t}", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getId() == null) ? 0 : getId().hashCode());\n result = prime * result + ((getPointId() == null) ? 0 : getPointId().hashCode());\n result = prime * result + ((getPersonnelType() == null) ? 0 : getPersonnelType().hashCode());\n result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());\n result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());\n return result;\n }", "public static String getPtIdSuffix() {\n\t\tif (xml == null) return null;\n\t\treturn ptIdSuffix;\n\t}", "public Set<Character> getExtensionKeys() {\n/* 1006 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "int getUnusedAlgorithmId();", "public java.lang.String getExtuid() {\n\t\treturn this.extuid;\n\t}", "static <T extends BuildSystemExtensionPoint> ImmutableList<T> getInstances(\n ExtensionPointName<T> extensionPointName, BuildSystemName buildSystemName) {\n return Arrays.stream(extensionPointName.getExtensions())\n .filter(f -> f.getSupportedBuildSystems().contains(buildSystemName))\n .collect(toImmutableList());\n }", "public String getExtID(){\n\t\treturn extID;\n\t}", "ArrayList<String> getAllDatatypeIds();", "public Set<Integer> getAllIdentifier(ObjectDataOptionsEnum... options) throws PersistenceException {\n Set<Integer> allIdentifier = new ConcurrentSkipListSet<>();\n for(int key : super.getAllKeysInMap(options)) {\n allIdentifier.addAll(super.getAllIdentifiersInKey(key, options));\n }\n return (allIdentifier);\n }", "@Override\n\tpublic Object[] getIds() {\n\t\treturn null;\n\t}", "public static HashMap<Integer,PeptideIdentification> getIdentificationExtensions(Connection aConn, String aWhereAddition) throws SQLException {\n\n String sql;\n QuantitativeValidationSingelton iQuantitationSingelton = QuantitativeValidationSingelton.getInstance();\n if(iQuantitationSingelton.getMsLimsPre7_2()){\n sql = \"select i.*, s.filename from identification as i, spectrumfile as s \";\n if (aWhereAddition != null) {\n sql += \" where i.l_spectrumfileid = s.spectrumfileid and \" + aWhereAddition;\n }\n } else {\n sql = \"select i.*, s.filename from identification as i, spectrum as s \";\n if (aWhereAddition != null) {\n sql += \" where i.l_spectrumid = s.spectrumid and \" + aWhereAddition;\n }\n }\n\n PreparedStatement prep = aConn.prepareStatement(sql);\n ResultSet rs = prep.executeQuery();\n HashMap<Integer,PeptideIdentification> v = new HashMap<Integer,PeptideIdentification>();\n while (rs.next()) {\n IdentificationExtension lEx = new IdentificationExtension(rs);\n v.put(Integer.valueOf(String.valueOf(lEx.getDatfile_query())), lEx);\n }\n rs.close();\n prep.close();\n return v;\n }", "private InputStream includeViewIds(UiExtensionService service) {\n StringBuilder sb = new StringBuilder(\"\\n\");\n for (UiExtension extension : service.getExtensions()) {\n for (UiView view : extension.views()) {\n sb.append(\" '\").append(view.id()).append(\"',\");\n }\n }\n return new ByteArrayInputStream(sb.toString().getBytes());\n }", "@Override\n public int hashCode() {\n return _instanceId.hashCode();\n }", "long getAlgIdExt();", "private DataPoint isUnique(ArrayList<DataPoint> points, int x, int y){\n\t\tfor(DataPoint temp:points){\n\t\t\tif(temp.x == x && temp.y == y){\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "Set<String> getExpressionOptionComboIds(String expression, ParseType parseType);", "io.dstore.values.StringValue getPersonCharacteristicIds();", "public Collection getSupportedUIDTypes() {\n return null;\r\n }", "public String[] getAllInputExtensions();", "String[] _truncatable_ids();", "@XmlAnyAttribute\n @JsonSerialize (using = AnyAttributeSerializer.class)\n public Map<QName, String> getExtensionAttributes() {\n return extensionAttributes;\n }", "public int hashCode() {\n/* 781 */ return getUniqueId().hashCode();\n/* */ }", "public static String[] getAvailableIDs();", "public static HashSet<Integer> storeId()\n\t{\n\t\titemCode.add(1);\n\t\titemCode.add(2);\n\t\titemCode.add(3);\n\t\titemCode.add(4);\n\t\titemCode.add(5);\n\t\titemCode.add(6);\n\t\titemCode.add(7);\n\t\titemCode.add(8);\n\t\titemCode.add(9);\n\t\titemCode.add(10);\n\t\titemCode.add(11);\n\t\treturn itemCode;\n\t}", "public List<String> getExtensions() {\n if (this.extensions == null) {\n // alias?\n if (this.aliasOf != null) {\n return this.aliasOf.getExtensions();\n }\n }\n return this.extensions;\n }", "org.apache.xmlbeans.XmlUnsignedInt xgetCryptProviderTypeExt();", "org.apache.xmlbeans.XmlString xgetAlgIdExtSource();", "java.util.List<Integer> getSrcIdList();", "public void removeExtensionPoint(IPlugin extensionPointPlugin) {\n lock.writeLock().lock();\n try {\n for (String id : extensionPointPlugin.getIds()) {\n extensionPointPluginMap.remove(extensionPointPlugin.getName(), id);\n }\n } finally {\n lock.writeLock().unlock();\n }\n }", "public interface IDs {\n\n static final String SERIES_STANDARD_ID = \"c7fb8441-d5db-4113-8af0-e4ba0c3f51fd\";\n static final String EPISODE_STANDARD_ID = \"a99a8588-93df-4811-8403-fe22c70fa00a\";\n static final String FILE_STANDARD_ID = \"c5919cbf-fbf3-4250-96e6-3fefae51ffc5\";\n static final String RECORDING_STANDARD_ID = \"4a40811d-c067-467f-8ff6-89f37eddb933\";\n static final String ZAP2IT_STANDARD_ID = \"545c4b00-5409-4d92-9cda-59a44f0ec7a9\";\n}", "private String getIds(List<UserTO> userList) {\r\n\t\tSet<String> idSet = new HashSet<String>();\r\n\t\tfor (UserTO user : userList) {\r\n\t\t\tidSet.add(user.getOrgNodeId());\r\n\t\t\tif (null != user.getOrgNodeCodePath()) {\r\n\t\t\t\tString[] orgHierarchy = user.getOrgNodeCodePath().split(\"~\");\r\n\t\t\t\tSet<String> orgHierarchySet = new HashSet<String>(Arrays.asList(orgHierarchy));\r\n\t\t\t\tidSet.addAll(orgHierarchySet);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString ids = idSet.toString();\r\n\t\tids = ids.substring(1, ids.length() - 1);\r\n\t\treturn ids;\r\n\t}", "void addId(String root, String extension);", "java.util.List<java.lang.Integer> getReceivingMinorFragmentIdList();", "Set<String> getIdentifiers();", "@Deprecated\n @JsonIgnore\n public Optional<List<Extension>> getExtensions() {\n List<Extension> extensionList = new LinkedList<>();\n this.extensionsMap.forEach((key, value) -> {\n extensionList.add(new UnknownExtension(key, value));\n });\n return Optional.ofNullable(extensionList);\n }", "LinkedHashSet<String> getOrderedBeanIds();", "public List getAllIds();", "public Collection<Collection<T>> getExtensions();", "@Override\n public String[] getExtensions() {\n return EXTENSIONS.clone();\n }", "public Map<Integer, ArrayList<LatLng>> shapeIdList () {\r\n Map<Integer, ArrayList<LatLng>> newList = new HashMap<>();\r\n Cursor getData = getReadableDatabase().rawQuery(\"select shape_id from shapes\", null);\r\n getData.moveToFirst();\r\n while (getData.moveToNext()) {\r\n newList.put(getData.getInt(0), null);\r\n }\r\n return newList;\r\n }", "public String [] _truncatable_ids()\r\n {\r\n return _ids_list;\r\n }", "public List<DataNodeId> getDataNodeIds();", "@Override\r\n\tpublic boolean equals(Object object) {\n\t\tif (!(object instanceof Point)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tPoint other = (Point) object;\r\n\t\tif ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Transient\n @JsonProperty(\"symbols\")\n public List<Long> getSymbolsAsIds() {\n List<Long> ids = new LinkedList<>();\n symbols.stream().map(Symbol::getId).forEach(ids::add);\n return ids;\n }", "private static ArrayList<Integer> getInterestingHalPids() {\r\n try {\r\n IServiceManager serviceManager = IServiceManager.getService();\r\n ArrayList<IServiceManager.InstanceDebugInfo> dump =\r\n serviceManager.debugDump();\r\n HashSet<Integer> pids = new HashSet<>();\r\n for (IServiceManager.InstanceDebugInfo info : dump) {\r\n if (info.pid == IServiceManager.PidConstant.NO_PID) {\r\n continue;\r\n }\r\n\r\n if (Watchdog.HAL_INTERFACES_OF_INTEREST.contains(info.interfaceName) ||\r\n CAR_HAL_INTERFACES_OF_INTEREST.contains(info.interfaceName)) {\r\n pids.add(info.pid);\r\n }\r\n }\r\n\r\n return new ArrayList<Integer>(pids);\r\n } catch (RemoteException e) {\r\n return new ArrayList<Integer>();\r\n }\r\n }", "public List getInputExtensions();", "Map getIDPEXDataMap();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "public List<K> getSavedIds() {\n if (dbObjects.length > 0 && dbObjects[0] instanceof JacksonDBObject) {\n throw new UnsupportedOperationException(\n \"Generated _id retrieval not supported when using stream serialization\");\n }\n\n List<K> ids = new ArrayList<K>();\n for (DBObject dbObject : dbObjects) {\n ids.add(jacksonDBCollection.convertFromDbId(dbObject.get(\"_id\")));\n }\n\n return ids;\n }", "@Override\n\tpublic String[] getIds() {\n\t\treturn null;\n\t}", "public abstract String getIdPrefix();", "@JsonProperty(\"extensions\")\n public Set<ToolComponent> getExtensions() {\n return extensions;\n }" ]
[ "0.67533606", "0.5745311", "0.5536414", "0.53565997", "0.5312162", "0.5288198", "0.5280981", "0.52473575", "0.5223909", "0.5208052", "0.52003413", "0.5195286", "0.5182143", "0.51772374", "0.51405317", "0.50744194", "0.5072798", "0.50542355", "0.5033007", "0.5017402", "0.50143903", "0.50095975", "0.50085586", "0.5008533", "0.4999058", "0.4971264", "0.4955779", "0.49511236", "0.4918406", "0.49112123", "0.4891125", "0.48908472", "0.48740983", "0.487229", "0.4870397", "0.48559627", "0.48499686", "0.48451388", "0.48424873", "0.48400205", "0.48400205", "0.48400205", "0.48400205", "0.48400205", "0.48400205", "0.48400205", "0.48399255", "0.4834671", "0.48302245", "0.4827189", "0.48180243", "0.48153198", "0.48002625", "0.47985613", "0.47959903", "0.47931555", "0.47823435", "0.4770452", "0.47677052", "0.47596192", "0.4759588", "0.47523585", "0.4750755", "0.4750422", "0.4747507", "0.47462976", "0.4744104", "0.47429368", "0.47420654", "0.47378704", "0.47372848", "0.4730985", "0.47266093", "0.47232914", "0.47223547", "0.47114354", "0.47074854", "0.47054273", "0.46913484", "0.46910486", "0.4690571", "0.4686863", "0.4686038", "0.4684175", "0.4681109", "0.46792632", "0.46758863", "0.4670099", "0.46678653", "0.46656767", "0.46586847", "0.46586847", "0.46586847", "0.46586847", "0.46586847", "0.46586847", "0.46510255", "0.46478814", "0.4647287", "0.46454138" ]
0.6635605
1
/Technique du futur xD
public void updateActivite(Activite activite) { activites.removeIf(a -> a.getIdActivity().equals(activite.idActivity)); activites.add(activite); //DEBUG for(Activite a : this.activites){ System.err.println("*+*+* " + a.getIdActivity() + " " + a.getTitre()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "void mo21073d();", "public abstract void mo56925d();", "private void kk12() {\n\n\t}", "void mo57278c();", "@Override\n\tpublic void gravarBd() {\n\t\t\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 }", "public void mo21877s() {\n }", "public void mo21779D() {\n }", "void mo57277b();", "public void skystonePos4() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "double passer();", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "protected void mo6255a() {\n }", "public void mo55254a() {\n }", "public void mo21878t() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo3749d() {\n }", "public void xuat() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public abstract void mo70713b();", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private void m50366E() {\n }", "static void feladat4() {\n\t}", "public void mo9848a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo21794S() {\n }", "public void mo12628c() {\n }", "public void skystonePos6() {\n }", "public void mo21782G() {\n }", "public void mo12930a() {\n }", "public void mo6081a() {\n }", "void mo17013d();", "static void feladat9() {\n\t}", "double defendre();", "void mo27575a();", "public void mo21795T() {\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}", "public abstract void mo27386d();", "public void Tyre() {\n\t\t\r\n\t}", "void mo21076g();", "private void poetries() {\n\n\t}", "public void mo21879u() {\n }", "public abstract void mo27385c();", "public void skystonePos3() {\n }", "public void mo97908d() {\n }", "private stendhal() {\n\t}", "public void mo3376r() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "void mo67924c();", "abstract void mo4366a(int i, zzwt zzwt, cu cuVar);", "protected boolean func_70814_o() { return true; }", "public void mo21793R() {\n }", "public void mo21787L() {\n }", "abstract void mo4372a(zzwt zzwt, cu cuVar);", "@Override\n protected void getExras() {\n }", "public void mo21792Q() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public abstract void mo2624j();", "public void mo21825b() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void tanCongKeXau() {\n\n\t}", "void mo4833b();", "void mo1507n();", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "void kiemTraThangHopLi() {\n }", "public void mo21785J() {\n }", "void mo41083a();", "public void onderbreek(){\n \n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "void mo21072c();", "public abstract long mo9229aD();", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "static void feladat3() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "static void feladat6() {\n\t}", "void mo56163g();", "void mo3194r();", "public void mo21780E() {\n }" ]
[ "0.6073419", "0.5998896", "0.5871124", "0.58213806", "0.58169514", "0.5732098", "0.5730556", "0.56808054", "0.5657111", "0.56285584", "0.56279", "0.56205845", "0.56178546", "0.56178546", "0.56178546", "0.56178546", "0.56178546", "0.56178546", "0.56178546", "0.5614234", "0.5587658", "0.55856204", "0.55822253", "0.5572654", "0.55442125", "0.55346036", "0.55324155", "0.5522971", "0.5522117", "0.55160636", "0.5512759", "0.5498493", "0.5497602", "0.54923177", "0.54818386", "0.5481641", "0.5481564", "0.547769", "0.5469018", "0.5469018", "0.546414", "0.5463263", "0.5462732", "0.5450854", "0.5449033", "0.5446031", "0.54448384", "0.5442673", "0.54395187", "0.5431548", "0.5424086", "0.54225457", "0.54147506", "0.54133356", "0.5411732", "0.54115784", "0.54115784", "0.5402381", "0.53956175", "0.5393335", "0.5389289", "0.538811", "0.53869677", "0.5381782", "0.53796256", "0.53790987", "0.53788704", "0.5374594", "0.5371602", "0.5370297", "0.53686494", "0.536713", "0.5362435", "0.5358747", "0.5356275", "0.5354339", "0.535198", "0.5348398", "0.5346721", "0.5341062", "0.53393614", "0.5333462", "0.53298515", "0.53298074", "0.53282523", "0.5326063", "0.5325817", "0.532436", "0.53241575", "0.5321205", "0.5317478", "0.5314784", "0.53133565", "0.5312836", "0.5311389", "0.53101563", "0.5309508", "0.53091437", "0.5305528", "0.53050953", "0.53049946" ]
0.0
-1
TODO Autogenerated method stub
public Long getIdPerson() { return this.idPerson; }
{ "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
public String getNom() { return this.nom; }
{ "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
public boolean verifyPassword(String password2) { System.out.println(this.password); return this.password.equals(password2); }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
TODO Autogenerated method stub
public String getEmail() { return email; }
{ "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
public static void main(String[] args) { Scanner input = new Scanner(System.in); // prompts users for all info needed System.out.println("Enter your name:"); String name = input.nextLine(); System.out.println(name + ", enter your height in inches:"); double height = input.nextDouble(); double heightCon = height * 0.0254; System.out.println(name + ", enter your weight in pounds:"); double weight = input.nextDouble(); double weightCon = weight * 0.45359237; // checks to see if value is valid, and if so it will continue to compute the BMI value double bmi = 0; if(weight > 0 && height > 0) { bmi = weightCon / (Math.pow(heightCon, 2)); } // compares the BMI result with the standards and determines which weighting class you belong in String bmiResult; if(bmi < 18.5 && bmi > 0) { bmiResult = "Underweight"; } else if(bmi >= 18.5 && bmi < 25.0){ bmiResult = "Normal"; } else if(bmi >= 25.0 && bmi < 30.0) { bmiResult = "Overweight"; } else { bmiResult = "Obese"; } // prints out the final information System.out.println(name + ", your BMI is " + bmi); System.out.println("You are " + bmiResult); input.close(); }
{ "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
System.out.println("bean="+bean); System.out.println("bindingResult="+bindingResult); System.out.println("login="+login); System.out.println("model="+model); System.out.println(memberService.login(bean)); System.out.println("");
@RequestMapping(path = { "/secure/login.controller" }) public String handlerMethod(MemberBean bean, BindingResult bindingResult, String login, Model model, HttpSession session, Locale locale,HttpServletResponse response,HttpServletRequest request) { Map<String, String> errors = new HashMap<String, String>(); model.addAttribute("errors", errors); // 驗證資料 if (login != null && login.equals("登出")) { session.removeAttribute("user"); errors.put("action", "登出成功1"); session.setAttribute("fail", "登出成功"); Cookie[] cookies = request.getCookies(); if (cookies != null) { for (Cookie cookie : cookies) { if (cookie.getName().equals("aaa")) { cookie.setMaxAge(0); cookie.setPath("/"); response.addCookie(cookie); return "redirect:/"; } } } } if (login != null && login.equals("登入")) { MemberBean result = memberService.login(bean); MemberBean result2 = memberService.loginok(bean); // System.out.println(result); if (result == null) { // System.out.println("XX"); // errors.put("action", "登入失敗"); session.setAttribute("fail", "登入失敗"); // session.removeAttribute("user"); } else { // System.out.println("OK"); // errors.put("action", "login OK " + "HI," + memberRepository.findMemberName(bean.getAccount())); model.addAttribute("login", result); session.setAttribute("user", result2); String s=result2.getMemberNo().toString(); Cookie cookie = new Cookie("aaa",s); cookie.setPath("/"); response.addCookie(cookie); return "redirect:/"; } if (bean.getAccount() == null || bean.getAccount().length() == 0) { // session.setAttribute("failaccount", messageSource.getMessage("login.account.required", null, locale)); errors.put("failaccount", messageSource.getMessage("login.account.required", null, locale)); } if (bean.getPassword() == null || bean.getPassword().length() == 0) { // session.setAttribute("failpassword", messageSource.getMessage("login.password.required", null, locale)); errors.put("failpassword", messageSource.getMessage("login.password.required", null, locale)); } // // 呼叫model // MemberBean bean2 = memberService.login(bean); // // 根據model執行結果,導向view // if (bean == null) { // errors.put("password", messageSource.getMessage("login.fail", null, locale)); // return "/secure/login"; // } else { // session.setAttribute("user", bean); // return "redirect:/"; // } } return "redirect:"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testDoLogin() {\n System.out.println(\"doLogin\");\n String username = \"AECobley\";\n String password = \"Cassandraisbae\";\n LoginModel instance = new LoginModel();\n String[] expResult = null;\n String[] result = instance.generalLogin(username, password);\n LoginModel loginModel = new LoginModel();\n \n assertNotNull(\"= Pass\",loginModel.generalLogin(username,password));\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"Login Failed\");\n }", "public MemberVo loginProc(MemberVo membervo) {\n\t\treturn session.selectOne(namespace+\".loginProc\",membervo);\n\t}", "@Test\n public void testLogin() {\n System.out.println(\"doLogin\");\n String username = \"AECobley\";\n String password = \"Cassandra\";\n LoginModel instance = new LoginModel();\n String[] expResult = null;\n String[] result = instance.generalLogin(username, password);\n LoginModel loginModel = new LoginModel();\n assertNull(\"= fail\",loginModel.generalLogin(username,password));\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"Login Succeeded with wrong details\");\n }", "public interface MemberService {\n\n // CRUD 정의\n\n public void join(MemberDTO param); // create\n public int count(); // read (숫자) --> read는 작은 부분에서 큰 부분으로 정의\n public MemberDTO detail(String id); // read (하나), id값 파라미터 필요\n public ArrayList<MemberDTO> list(); // read (여러개)\n public boolean login(MemberDTO param); // read (하나), id, pw 파라미터 필요 -> 암호화를 위해 캡슐에 담아서 전송(인캡슐화)\n //public MemberDTO login(MemberDTO param); // read (하나), id, pw 파라미터 필요 -> 암호화를 위해 캡슐에 담아서 전송(인캡슐화)\n public void update(MemberDTO param); // read\n //public void delete(MemberDTO param); // read\n public void delete(String id); // read\n\n}", "@Override\n\tpublic boolean login(MemberBean param) {\n\t\treturn false;\n\t}", "public interface MemberService {\n //public void detail\n public MemberBean detail(String id);\n public List<MemberBean> find(String keyword);//List는 리턴값이 여러개라도 에러가 나지 않음\n public void join(MemberBean param);\n public List<MemberBean> list();\n public boolean login(MemberBean param);\n public void update(MemberBean param);\n public void delete(String id);\n public int count();\n\n\n\n}", "@Override\r\n\tpublic boolean login(MemberDto mem) {\n\t\treturn login(mem.getEmail(),mem.getPw());\r\n\t}", "public static LoginBean login(LoginBean bean) {\n try {\n \n String usname = bean.getUsername();\n String pword = bean.getPassword();\n System.out.println(usname + \" and \" + pword);\n currentCon = ConnectionManager.getConnection();\n //String searchQuery = \"select * FROM login WHERE username='\" + username + \"' AND password='\" + password + \"'\";\n String searchPre = \"select * FROM login WHERE loginame = ? AND loginpass = ?\";\n PreparedStatement pstmt = currentCon.prepareStatement(searchPre);\n\n \n //connecting to the DB\n pstmt.setString(1, usname);\n pstmt.setString(2, pword);\n \n \n //pstmt = currentCon.prepareStatement(searchPre);\n /*null exception coming from here*/ ResultSet rs = pstmt.executeQuery(searchPre);\n boolean userExists = rs.next();\n if (!userExists) {\n System.out.println(\"Username/Password entered is Incorrect or User does not Exists.\");\n bean.setValid(false);\n } else if (userExists) {\n String userName = rs.getString(usname);\n\n System.out.println(\"Welcome \" + usname);\n bean.setUserName(userName);\n\n bean.setValid(true);\n }\n } catch (SQLException ex) {\n Logger.getLogger(LoginDAO.class.getName()).log(Level.SEVERE, \"Authenthication failed!\", ex);\n }\n return bean;\n }", "@RequestMapping(value = \"/login\", method= RequestMethod.POST)\r\n\tpublic String loginToSite(@ModelAttribute User user, Model model) throws SQLException {\n ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(\"spring.xml\");\r\n \r\n //Get the EmployeeDAO Bean\r\n UserDAO userDao = ctx.getBean(\"userDao\", UserDAO.class); \r\n boolean success = userDao.accountExists(user.getUserID(),user.getPassword());\r\n if(success) {\r\n \tUser loginUser = new User(); \t\r\n \tloginUser = userDao.login(user.getUserID(),user.getPassword());\r\n \t// must set password because encrypted version is returned\r\n \tloginUser.setPassword(user.getPassword());\r\n \tmodel.addAttribute(\"user\", loginUser);\r\n\t\t\tmodel.addAttribute(\"username\", user.getUserID());\r\n\t\t\t// needed to make modelattribute available on welcome page\r\n\t\t\t// unless it's a session attribute, model attributes are only available to the single page\r\n\t\t\tmodel.addAttribute(\"newMsg\", new Message());\r\n\t\t\treturn \"welcome\";\r\n }\r\n else {\r\n \tSystem.out.println(\"Invalid credentials\");\r\n \tmodel.addAttribute(\"message\", \"Error: Invalid Credentials\");\r\n \treturn \"login\";\r\n }\r\n\t}", "private static void loginForAdmin(String username, String password){\n\n ArrayList<Object> loginData = LogInAndLogOutService.login(username, password);\n boolean logged = (boolean) loginData.get(0);\n boolean freezed = (boolean) loginData.get(1);\n Employee employee = (Employee) loginData.get(2);\n\n if (logged){\n\n System.out.println(\"Sie sind richtig als Herr/Frau \"+ employee.getLastname() + \" \"+ employee.getFirstname() +\" eingelogt.\");\n }else {\n if (freezed){\n\n System.out.println(\"Ihr Konto wurde einfriert. Sie können sie sich nicht einloggen. :(\");\n }else {\n\n System.out.println(\"Falscher Benutzername oder Passwort eingegeben. Versuchen Sie erneut.\");\n }\n }\n }", "public UserDTO login(String mail,String password){\r\n try {\r\n PreparedStatement preSta = conn.prepareStatement(sqlLogin);\r\n preSta.setString(1, mail);\r\n preSta.setString(2, password);\r\n ResultSet rs = preSta.executeQuery();\r\n if(rs.next()){\r\n UserDTO user = new UserDTO();\r\n user.setEmail(rs.getString(\"Email\"));\r\n user.setPassword(rs.getString(\"Pass\"));\r\n user.setRole(rs.getInt(\"RoleId\"));\r\n user.setUserId(rs.getInt(\"UserId\"));\r\n return user;\r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n error =\"thong tin dang nhap sai\";\r\n return null;\r\n }", "boolean doLogin(UserDTO loginUser);", "@Override\r\n\tpublic LoginBean verifyUserLogin(String uname, String pass) {\r\n\t\tLoginBean loginBean= new LoginBean();\r\n\t\tString sql = \"select userId,userName,password from Login where userName = ? and password=? \";\r\n\t\t loginBean= template.queryForObject(sql,\r\n\t\t\t\t\tnew Object[] { uname, pass },\r\n\t\t\t\t\tnew BeanPropertyRowMapper<LoginBean>(LoginBean.class));\r\n\t\t return loginBean;\r\n\t\t\r\n\t}", "Login() { \n }", "@PostMapping(\"/login\")\n\t public String login(@RequestParam(\"username\") String username, @RequestParam(\"password\") String password, Model model) {\n\t \t\tSystem.out.println(username +\"Hello \"+ password);\n\t \t\tboolean flag=userService.autoLogin(username, password);\n\t if(flag) {\n\t \tmodel.addAttribute(\"expense\", expenseService.getMonthAndYearAndAmount());\n\t \t model.addAttribute(\"username\",username);\n\t \t localUsername = username;\n\t \t return \"redirect:/dashboard\";\n\t }\n\t model.addAttribute(\"error\",true);\n\t return \"login\";\n\t }", "public final void login() {\n Activity_ExtensionKt.hideSoftKeyboard(this);\n if (hasAllRequiredField()) {\n EditText editText = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etUserName\");\n String obj = editText.getText().toString();\n if (obj != null) {\n this.username = StringsKt.trim((CharSequence) obj).toString();\n EditText editText2 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPassword\");\n String obj2 = editText2.getText().toString();\n if (obj2 != null) {\n this.password = StringsKt.trim((CharSequence) obj2).toString();\n LoginViewModel loginViewModel = this.viewModel;\n if (loginViewModel == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"viewModel\");\n }\n EditText editText3 = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText3, \"etUserName\");\n String obj3 = editText3.getText().toString();\n EditText editText4 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText4, \"etPassword\");\n loginViewModel.login(obj3, editText4.getText().toString());\n return;\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n }", "@Test\r\n\tpublic void login() {\n\t\tUser loginExit = userMapper.login(\"wangxin\", \"123456\");\r\n\t\tif (loginExit == null) {\r\n\t\t\tSystem.out.println(\"用户不存在\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(loginExit);\r\n\t\t\tSystem.out.println(\"登录成功!\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic MemberVO memberLogin(MemberVO member) {\n\t\treturn sqlSession.selectOne(NS+\".memberLogin\", member);\n\t}", "private void login(String username,String password){\n\n }", "@Override\n\tpublic Object service(Object[] objs) throws Exception {\n\t\treturn dao.login((LoginDTO) objs[0]);\n\t}", "@CrossOrigin(origins = AppConstants.CORS)\n\t@RequestMapping(value = {UrlConstants.API_LOGIN_AUTHENTICATE+\"org\"}, method = RequestMethod.POST)\n\tpublic @ResponseBody ResponseDTO authenticate(@RequestBody LoginDTO loginDTO, BindingResult result) {\n\t\tResponseDTO responseDTO = null;\n\t\ttry { \n\t\t\tif(result.hasErrors()){\n\t\t\t\tresponseDTO = new ResponseDTO();\n\t\t\t\tresponseDTO.setErrorCode(300);\n\t\t\t\tresponseDTO = ResponseWriter.writeResponse(responseDTO);\n\t\t\t} else {\n\t\t\t\t//responseDTO = loginService.authenticate(loginDTO);\n\t\t\t\tlogger.info(\"here\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tresponseDTO = ResponseWriter.writeResponse(e.getCause(), e);\n\t\t\tlogger.error(\"error\",e);\n\t\t} \n\t\treturn responseDTO;\n\t}", "public Person login(String username, String password);", "public LoginBean() {\r\n \r\n \r\n }", "public static void main(String[] args) {\n Login l = new Login();\n if(l.checkLogin(\"admin\", \"12345\")){\n List<Login> ll = Login.UserLogin(\"admin\", \"12345\");\n System.out.println(\"เข้าสู่ระบบสำเร็จ\");\n System.out.println(ll);\n }\n else{\n System.out.println(\"พาสเวิร์ดหรือชื่อผู้ใช้ผิด\");\n }\n }", "public AgentDTO login(String login, String senha);", "@Test\n\tpublic void login_customer1() {\n\t\tAssert.assertEquals(1,x.Login(\"abc\",\"123\"));\n\t}", "public interface ILoginModel {\r\n\r\n void setUser(UserBean user);\r\n\r\n UserBean getUser(UserBean user);\r\n}", "UserDisplayDto getUserInfo(String login);", "@RequestMapping(value = \"/showDebtorLedger\", method = RequestMethod.POST)\r\n\tpublic ModelAndView funShowDebtorLedger(@ModelAttribute(\"command\") @Valid clsDebtorLedgerBean objBean ,BindingResult result,HttpServletRequest req){\r\n\t\tif(!result.hasErrors()){\r\n\t\t\tString clientCode=req.getSession().getAttribute(\"clientCode\").toString();\r\n\t\t\tString userCode=req.getSession().getAttribute(\"usercode\").toString();\r\n\t\t\tString propertyCode=req.getSession().getAttribute(\"propertyCode\").toString();\r\n\t\t\treturn new ModelAndView(\"redirect:/frmDebtorLedger.html\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn new ModelAndView(\"frmDebtorLedger\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean loginService(List<Object> paraments) {\n\t\t\n\t\t\n\t\tboolean flag = false;\n\t\t\n\t\tString sql = \"select * from user where user_id=? and password=?\";\n\t\ttry{\n\t\t\t\n\t\t\tmJdbcUtil.getConnetion();\n\t\t\tMap<String,Object> map= mJdbcUtil.findSimpleResult(sql, paraments);\n\t\t\tflag = map.isEmpty()?false:true;\n\t\t\tSystem.out.println(\"-flag-->>\" + flag);\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tmJdbcUtil.releaseConn();\n\t\t}\n\t\t\n\t\t\n\t\treturn flag;\n\t}", "@Override\r\n\tpublic void MemberLogin() {\n\r\n\t}", "public loginBean() {\n }", "@GetMapping(\"/validate\")\n\tpublic String login(@ModelAttribute UserLogin user,Model model )\n\t{\n\t\tString username=user.getUsername();\n\t\tString password=user.getPassword();\n\t\tif(service.verification(username,password))\n\t\t{\n\t\t\treturn \"home\";\n\t\t}\n\t\treturn \"redirect:/\";\n\t}", "boolean userLogin(UserDTO user) throws UserException, Exception;", "public String processLogin(Credential credential) {\n\t\tString result = null;\n \tSystem.out.println(\"input username is:\" + credential.getUname());\n \tSystem.out.println(\"input password is:\" + String.valueOf(credential.getPwd()));\n if (credential.getUname().equalsIgnoreCase(\"josephzelo\")){\n \tSystem.out.println(\"username is correct\");\n \tif(String.valueOf(credential.getPwd()).equalsIgnoreCase(\"asdasd\")){\n \t\tresult = \"customer\";\n \t} else {\n \t\tSystem.out.println(\"password is wrong\");\n \t}\n } else if (credential.getUname().equalsIgnoreCase(\"admin\")) {\n \tSystem.out.println(\"username is correct\");\n \tif(String.valueOf(credential.getPwd()).equalsIgnoreCase(\"admin\")){\n \t\tresult = \"admin\";\n \t} else {\n \t\tSystem.out.println(\"password is wrong\");\n \t}\n } else {\n \tSystem.out.println(\"username is wrong\");\n }\n\t\treturn result;\n\t}", "@Override\n\tpublic int loginMember(MemberDTO memberDTO) throws SQLException {\n\t\t\n\t\tString runP = \"{ call member_login(?, ?, ?) }\";\n\t\t\n\t\ttry (Connection conn = dataSource.getConnection();\n\t\t\t CallableStatement callableStatement = conn.prepareCall(runP.toString())){\n\t\t\t\n\t\t\t\n\t\t\tcallableStatement.setString(1, memberDTO.getUser_id());\n\t\t\tcallableStatement.setString(2, memberDTO.getPassword());\n\t\t\tcallableStatement.registerOutParameter(3, java.sql.Types.INTEGER);\n\t\t\tcallableStatement.executeUpdate();\t\n\t\t\t\n\t\t\tint check = callableStatement.getInt(3);\n\t\t\tif(check == 0) {\n\t\t\t\tSystem.out.println(\"로그인 실패\");\n\t\t\t\treturn 0;\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"로그인 성공\");\n\t\t\t\treturn 1;\n\t\t\t\t\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.format(\"SQL State: %s\\n%s\", e.getSQLState(), e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn -1;\n\n\t\t\n\t\n\t}", "public interface LoginPresenter {\n void LoginService(String phone ,String psw,String url, int requestID, Map<String,String> parmrs);//请求网络,登录\n}", "@Test\r\n public void testLogin1() throws Exception {\r\n String employee_account = \"D00198309\";\r\n String password = \"admin\";\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n Employee result = instance.login(employee_account, password);\r\n assertTrue(result != null);\r\n }", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "@GetMapping(\"login\")\n public String loginForm(Model model){\n model.addAttribute(\"user\", new User());\n return \"login_form\";\n }", "@Override\r\n\tpublic boolean login(String email, String pw) {\n\t\treturn jdbcTemplate.query(\r\n\t\t\"select * from s_member where email=? and pw=?\", extractor,email,pw)!=null;\r\n\t}", "protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\r\n\t\t\r\n\t\tSystem.out.println(\"로그인기능을 수행하겠습니다\");\r\n\r\n\t\trequest.setCharacterEncoding(\"euc-kr\");\r\n\r\n\t\tString id = request.getParameter(\"id\");\r\n\t\tString pw = request.getParameter(\"pw\");\r\n\t\t\r\n\t\tSystem.out.println(id);\r\n\t\tSystem.out.println(pw);\r\n\t\t\r\n\r\n\t\tmemberDAO dao = new memberDAO();\r\n\t\tmemberVO vo = dao.Login(id, pw);\r\n\r\n\t\t\tSystem.out.println(vo);\r\n\r\n\t\t\tHttpSession session = request.getSession();\r\n\r\n\t\t\tsession.setAttribute(\"vo\", vo);\r\n\r\n\t\t\t\r\n\t\t\tresponse.sendRedirect(\"home.jsp\");\r\n\t\t\t\r\n\t\t}", "@Override\n\t@Transactional\n\tpublic List<LoginAndDetails> createMember(LoginAndDetails member) {\n\t\tTransactionStatus status = TransactionAspectSupport.currentTransactionStatus();\n\t\tSystem.out.println(\"status of tran = \" + status);\n\t\tSystem.out.println(\"JM in service createmember username: \" + member.getUserLogin());\n\t\tSystem.out.println(\"JM in service createmember dobday:\"+ member.getMemberDetails().getDobDay());\n\t\tString dob = member.getMemberDetails().getDobDay() + \"/\" + member.getMemberDetails().getDobMonth() + \"/\"\n\t\t\t\t+ member.getMemberDetails().getDobYear();\n\t\tSystem.out.println(\"dob=\" + dob);\n\t\tString formattedDob = dateFormatter.formatDateToDB(dob);\n\t\tSystem.out.println(\"formatted date returned: \" + formattedDob);\n\t\tmember.getMemberDetails().setDob(formattedDob);;\n\t\treturn memberRepository.createMember(member);\n\t}", "public void doLogin() {\n\t\tSystem.out.println(\"loginpage ----dologin\");\n\t\t\n\t}", "public void connectGet() { mModel.connect(mUserModel.getEmail(), mUserModel.getJWT());\n // binding.usernameTextView.setText(args.getContact().getUserName());\n//// binding.firstnameTextView.setText(args.getContact().getFirstName());\n//// binding.lastnameTextView.setText(args.getContact().getLastName());\n//\n }", "public interface ILoginView{\n\n String getUserName();\n String getUserPwd();\n void loginSuccessInfo(UserBean userBean);\n void loginFailInfo();\n}", "public interface ILoginModel {\n //创建一个方法\n public void login(String account, String pwd, OnNetLisenter<LoginBean> netLisenter);\n}", "void loginDetails(LoginSuccess loginSuccess);", "@GetMapping(\"/login\")\n public String showLogin(Model model){\n model.addAttribute(\"user\", new User());\n return \"loginForm\";\n }", "public void login(User user);", "public String onClick() {\n final String login = getModel().getLogin();\n final String password = getModel().getPasssword();\n\n //Call Business\n Exception ex2 = null;\n User s = null;\n try {\n s = service.login(login, password);\n } catch (Exception ex) {\n ex2 = ex;\n }\n\n //Model to View\n if (ex2 == null) {\n getModel().setCurrentUser(s);\n return \"list\";\n } else {\n return null;\n }\n }", "@GetMapping(\"/login\") \n\tpublic String verLogin(Model model) {\n\t\treturn \"login\";\n\t}", "public interface UserBiz {\n public void login(UserBean login);\n}", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) {\n\n\t\tString id = request.getParameter(\"id\");\n\t\tString pw = request.getParameter(\"pw\");\n\n\t\tMemberDao dao = MemberDao.getInstance();\n\t\tint checkNum = dao.login(id, pw);\n\n\t\trequest.setAttribute(\"checkNum\", checkNum);\n\t\trequest.setAttribute(\"id\", id);\n\t\trequest.setAttribute(\"pw\", pw);\n\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n AdminRegister obj = new AdminRegister();\r\n obj.setFirstName(request.getParameter(\"FirstName\"));\r\n obj.setLastName(request.getParameter(\"LastName\"));\r\n obj.setAge(Integer.parseInt(request.getParameter(\"Age\")));\r\n obj.setGender(request.getParameter(\"Gender\"));\r\n obj.setContactNumber(Long.parseLong(request.getParameter(\"Contact\")));\r\n obj.setUserId(request.getParameter(\"UserId\"));\r\n obj.setPassword(request.getParameter(\"Password\"));\r\n AdminLoginBo AdminLoginBoObj=new AdminLoginBo();\r\n AdminRegister c=AdminLoginBoObj.LoginCheck(obj);\r\n // System.out.println(\"hiiii\"+obj.getContactNumber());\r\n if(c.getStatus() == 1)\r\n {\r\n response.sendRedirect(\"AdminLogin.jsp\");\r\n }\r\n else\r\n {\r\n request.setAttribute(\"stat\", \"Please provide correct input...\");\r\n request.getRequestDispatcher(\"AdminRegister.jsp\").forward(request, response);\r\n }\r\n }", "User selectUserByUserNameAndPassword(@Param(\"username\") String username, @Param(\"password\") String password);", "@RequestMapping(value = \"/loginProcess\", method = RequestMethod.POST)\n public ModelAndView loginProcess(@ModelAttribute(\"login\") Login login) {\n ModelAndView mav = null;\n\n User user = userService.validateUser(login);\n\n if (null != user) {\n mav = new ModelAndView(\"welcome\");\n mav.addObject(\"firstname\", user.getFirstname());\n } else {\n mav = new ModelAndView(\"login\");\n mav.addObject(\"message\", \"Username or Password is wrong!!\");\n }\n\n return mav;\n }", "@Test\n\tpublic void login_customer2() {\n\t\tAssert.assertEquals(-1,x.Login(\"abd\",\"123\"));\n\t\tAssert.assertEquals(-1,x.Login(\"abc\",\"1233\"));\n\t}", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n\tpublic String login(Model model) {\n\t\tlogger.debug(\" A user trying to login\");\n\t\treturn \"login\";\n\t}", "@Override\r\n\tpublic MemberDTO login(LoginDTO login) {\n\t\treturn session.selectOne(NAMESPACE+\".login\", login);\r\n\t}", "public interface LoginDao {\n\n int login(LoginBean loginBean);\n}", "public void login( UserLoginBean loginBean ) {\n UserDAO userDao = UserDAO.getInstance();\n UserBean bean = userDao.findByLoginPassword(loginBean.getLogin(), loginBean.getPassword());\n System.out.println(bean);\n if (bean != null) {\n SessionUtil.setUserBean(bean);\n userCounter.addUserConnected();\n ControllerUtils.redirectTo(\"activities\");\n }\n else {\n SessionUtil.clearSession();\n ControllerUtils.addMessage(FacesMessage.SEVERITY_WARN, \"Connexion échouée\");\n }\n }", "@GetMapping(value = { \"/char\" })\n public String showCharInjectionResult(Principal principal, Model model) {\n model.addAttribute(\"employee\", new CustomUserDetails());\n LogUtils.getLogger().info(\"Inside doLogin!\");\n UserDetails loginedUser = (UserDetails) ((Authentication) principal)\n .getPrincipal();\n LogUtils.getLogger().info(loginedUser);\n model.addAttribute(\"userName\", loginedUser.getUsername());\n return \"ChartInjectionResult\";\n }", "@PostMapping(value = \"/login\") \n\t public LoginResponseDto usersLogin(@RequestBody LoginDto loginDto) { \n\t\t LOGGER.info(\"login method\");\n\t\t return userService.usersLogin(loginDto);\n\t }", "public static void main(String[] args) {\n\t\tValidate v=()->System.out.println(\"login valifate\");\n\t\tv.validatelogin();\n\t\t\n\t\t\n\t}", "@Test\r\n public void testCLogin() {\r\n System.out.println(\"login\");\r\n \r\n String userName = \"admin\";\r\n String contraseña = \"admin\";\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n \r\n Usuario result = instance.login(userName, contraseña);\r\n \r\n assertNotNull(result);\r\n }", "public interface LoginService {\n\n /**\n * 登录\n *\n * @param data\n * @param req\n * @return\n */\n @ClearAuth\n @Route( code = RouteCode.Ou.LOGIN )\n MemberDTO login( MemberDTO data, RequestMsg req );\n\n /**\n * 注册\n *\n * @param member\n * @param terminal\n * @return\n */\n @ClearAuth\n @Validator\n @Route( code = RouteCode.Ou.REGISTER )\n MemberDTO register( @Valid( groups = Register.class ) MemberDTO member, RequestMsg req );\n\n /**\n * 免密登录\n * <p> 不验证密码直接登录 <p/>\n *\n * @param memberId\n * @param terminal\n * @param ip\n * @param loginInfo\n * @return\n */\n MemberDTO loginNoPwd( Integer memberId, String terminal, String ip, LoginInfoDTO loginInfo );\n\n /**\n * 注册时发送验证码\n *\n * @param mobile\n */\n @ClearAuth\n @Route( code = RouteCode.Ou.SEND_VCODE_4_REGISTER )\n void sendVcode4Register( String mobile );\n\n /**\n * 完善用户资料\n *\n * @param member\n * @param req\n */\n void accomplishMember( MemberDTO member, RequestMsg req );\n}", "RestaurantDto loginRestaurant(RestaurantDto restaurant);", "public interface UserDao {\n\n User findUserName(@Param(\"userName\") String userName,@Param(\"pwd\")String pwd);\n}", "public String execute(){\n\t\t /*LoginDAO loginDAO=new LoginDAO();\n\t\t LoginDTO loginDTO=loginDAO.getLoginUserInfo(loginUserId, loginPassword);\n\n\t\t\tsession.put(\"admin_flg\", loginDTO.getAdminFlg());*/\n\t\t\treturn SUCCESS;\n\t}", "@RequestMapping(value=\"member_adds\"/*, produces={\"text/html;charset=UTF-8;\",\"application/json;\"}/*, method=RequestMethod.POST*/)\n\n public String member_add(@RequestJsonParam(value=\"model\",required=true) Member_pojo member){\n \t member.setCellphonenumber(123456);\n \t \n \t member.setCompany(\"s\");\n \t member.setGender(\"t\");\n \t member.setCustomername(\"d\");\n \t member.setMailbox(\"s\");\n \t member.setStaff(\"admin\");\n \t member.setSync(\"0\");\n \t member.setId(seq.nextmember_seq());\n \t System.out.println(\"member_add--------------------\"+member.toString()); \n \t \n \t User user = new User();\n \n \t memberservice.select_usersync(member.getStaff());\n \t memberservice.insert_member(member);\n \t \n \t // map.put(\"msg\",null);\n \t \n \t return \"ok\";\n }", "@GetMapping(\"/login\")\n public String getLogin(Model model)\n {\n return \"login\";\n }", "@Test\n public void testPersonReturn(){\n// System.out.println(\"------->\"+ mHbParam.getId());\n }", "@Override\r\n\tpublic void login() {\n\r\n\t}", "public String login()\n\t{\n\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\tUsersBean userBean = new UsersBean();\n\t\ttry {\n//\t\t\tctx = new InitialContext(props);\n\t\t\t\n\t\t\t//userBean = (usersPersistentBean) ctx.lookup(\"usersPersistentBean\");\n\t\t\tUser attempting_user = new User();\n\t\t\tattempting_user.setUsername(getUsername());\n\t\t\tattempting_user.setPassword(getPassword());\n\t\t\tUser resultUser = userBean.getUser(attempting_user);\n\t\t\tif (resultUser.getUsername() != null)\n\t\t\t{\n\t\t\t\tsetIsAdmin(resultUser.isAdmin());\n\t\t\t\tsetUserId(resultUser.getUserId());\n\t\t\t\tsetLoginMessage(\"success\");\n\t\t\t\tcontext.getExternalContext().redirect(\"basicCalculator.xhtml\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsetLoginMessage(\"*Incorrect Username and password\");\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn getLoginMessage();\t\t\n\t}", "@Test\n public void testFindUserByFilter() {\n System.out.println(\"findUserByFilter\");\n String filter = \"adrian\";\n UserServiceImpl instance = new UserServiceImpl(passwordService);\n List<User> result = instance.findUserByFilter(filter);\n assertEquals(1, result.size());\n assertEquals(\"adrian\", result.get(0).getUsername());\n }", "@POST\n\t@Path(\"/LoginService\")\n\tpublic String loginService(@FormParam(\"uname\") String uname,\n\t\t\t@FormParam(\"password\") String pass) \n\t{\n\t\tJSONObject object = new JSONObject();\n\t\tUserEntity user = UserEntity.getUser(uname, pass);\n\t\tif (user == null) {\n\t\t\tobject.put(\"Status\", \"Failed\");\n\t\t} else {\n\t\t\tUserEntity.currentUser = user;\n\t\t\tobject.put(\"Status\", \"OK\");\n\t\t\tobject.put(\"name\", user.getName());\n\t\t\tobject.put(\"email\", user.getEmail());\n\t\t\tobject.put(\"password\", user.getPass());\n\t\t}\n\n\t\treturn object.toString();\n\n\t}", "@Override\r\npublic User_Login getModel() {\n\treturn user_Login;\r\n}", "@FXML\n\tprivate void handleLoginButtonAction() {\n\t\t\n//\t\tString upass = \"123\";\n//\t\tString uname = \"admin\";\n//\t\tString uname = \"sadmin\";\n\t\tString uname = username.getText();\n\t\tString upass = password.getText();\n\n\t\tValidator validator = new Validator(uname, upass);\n\t\tSystem.out.println(validator.getName());\n\n \t\tChainBuilder chain= new ChainBuilder();\n \t\tchain.builChain();\n \t\tchain.getAuthonticator().validateRequest(validator);\n\n\n\t\t// Authenticator htos = new AdminValidator();\n//\t\tMyAuthenticator auth= new AdminValidator();\n//\t\tMyAuthenticator lib = new LibrarianValidator();\n//\t\tMyAuthenticator nullAuth= new NullChecker();\n//\n//\t\tnullAuth.setNextAuthonticator(lib);\n//\t\tlib.setNextAuthonticator(auth);\n\n\n\n//\t\tif (uname.trim().length() == 0 || upass.trim().length() == 0) {\n//\t\t\talertMessage(\"Fill all the required Fields\");\n//\t\t} else {\n//\t\t\tUserObjectInputOutputStream inputOutput = new UserObjectInputOutputStream();\n//\t\t\tUserDetails user = inputOutput.getUsers(uname, upass);\n//\t\t\ttry{\n//\t\t\t\tif (user.getUsername().equals(null)) {\n//\t\t\t\t\talertMessage(\"Invalid Username or Password\");\n//\t\t\t\t} else {\n//\t\t\t\t\tswitch(user.getRole()){\n//\t\t\t\t\t\tcase \"admin\":\n//\n//\t\t\t\t\t\t\tAdminController sac = new AdminController();\n//\t\t\t\t\t\t\tsac.loadAdminWindow();\n//\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\tcase \"librarian\":\n//\t\t\t\t\t\t\tLibrarianController libc = new LibrarianController();\n//\t\t\t\t\t\t\tlibc.loadAdminWindow();\n//\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\tcase \"sadmin\":\n//\t\t\t\t\t\t\tSuperAdminController spac = new SuperAdminController();\n//\t\t\t\t\t\t\tspac.loadSuperAdminWindow();\n//\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\tdefault:\n//\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t}\n//\n//\t\t\t\t}\n//\t\t\t}catch(Exception e){\n//\t\t\t\te.printStackTrace();\n//\t\t\t\talertMessage(\"======Invalid Username or Password\");\n//\t\t\t}\n//\t\t}\n\t}", "public String _login_click() throws Exception{\n_login();\n //BA.debugLineNum = 155;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "Login.Req getLoginReq();", "@Then(\"^the user Login using username and password$\")\r\n\tpublic void the_user_Login_using_username_and_password() throws Throwable {\n\t w.details1();\r\n\t}", "public interface UserSignLoginService {\n\n /**\n * 账户登录处理\n * @param bizParamBean\n * @return\n */\n public ResultBean signLogin(BizParamBean bizParamBean) throws Exception;\n}", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "@RequestMapping(\"/login\")\r\n\tpublic ModelAndView validate(HttpServletRequest request,HttpServletResponse response)\r\n\t{\r\n\t\tApplicationContext context = new AnnotationConfigApplicationContext(ConfigClass.class);\r\n\t //\t Login log=context.getBean(Login.class);\r\n\t \tLoginService lser=context.getBean(LoginService.class);\r\n\t\tLoginService2 v=new LoginService2();\r\n\t\tModelAndView mv= new ModelAndView();\r\n\t\t/*log=lser.retrieveLogin(request.getParameter(\"username\"));\r\n\t\tString name=log.getName();\r\n\t\tString pass=log.getPassword();\r\n\t\t*/\r\n\t\tString name= request.getParameter(\"username\");\r\n\t\tString pass= request.getParameter(\"password\");\r\n\t\tif(v.validateLogin(name, pass))\r\n\t\t\tmv.setViewName(\"success\");\r\n\t\telse\r\n\t\t\tmv.setViewName(\"fail\");\r\n\t\treturn mv;\r\n\t}", "UserLogin recordLogin(UserLogin login);", "@GetMapping(\"/user\")\n public User login(@RequestParam String username, @RequestParam String password) { return userDataTierConnection.login(username,password); }", "public static void main(String[] args) {\n\t\tIUserService userService=new UserServiceImpl();\r\n\t\tuserService.login(\"aesop\", \"123\");\r\n\t\tSystem.out.println(userService.logout());\r\n\t}", "@Override\n public void manejarLogin() {\n loginPresenter.validarLogin(etxtEmail.getText().toString(),etxtPass.getText().toString());\n }", "@Override\n\tpublic void execute(Model model) {\n\t\t\n\t\tMDao dao = sqlSession.getMapper(MDao.class);\n\t\tArrayList<MyMember> dtos = dao.memberList();\n\t\tmodel.addAttribute(\"list\", dtos);\n\t\t\n\t}", "public LoginBean() {\r\n }", "public String getLogin(){\r\n return login;\r\n }", "@org.junit.Test\r\n\tpublic void login() {\n\t\tParameters parameters = new Parameters();\r\n\t\tparameters.setUrl(\"LoginServlet?action=login\");\r\n\t\tparameters.setList(new ArrayList<NameValuePair>());\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"info\", \"jitl\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"info2\", \"admin\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"info3\", \"admin\"));\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tString string = (String) MainUtilityTools.execute(parameters);\r\n\t\tSystem.out.println(string);\r\n\t}", "public static void main(String[] args) {\n LoginService loginService = new LoginService();\n //loginService.register(\"hakunamatata\",\"123456\");\n //loginService.login(\"hakunamatata\",\"123456\");\n\n //new interface for QQ login\n LoginService qqLoginService = new LoginServiceForQQ();\n qqLoginService.login(\"hakunamatata\",\"123456\");\n\n\n //new interface for wechat login\n LoginServiceForWechat loginServiceForWechat = new LoginServiceForWechat();\n loginServiceForWechat.login(\"hakunamatata\",\"123456\");\n\n\n\n\n }", "@Test\n\tpublic void customerLogin()\n\t{\n\t\tCustomerFacade cf = cust.login(\"Customer2\", \"4321\", ClientType.CUSTOMER);\n\t\tAssert.assertNotNull(cf);\n\t}", "@WebService(name = \"WebServiceSoap\", targetNamespace = \"http://tempuri.org/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface WebServiceSoap {\n\n\n /**\n * \n * @param password\n * @param login\n * @return\n * returns java.lang.String\n */\n @WebMethod(operationName = \"Login\", action = \"http://tempuri.org/Login\")\n @WebResult(name = \"LoginResult\", targetNamespace = \"http://tempuri.org/\")\n @RequestWrapper(localName = \"Login\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.Login\")\n @ResponseWrapper(localName = \"LoginResponse\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.LoginResponse\")\n public String login(\n @WebParam(name = \"login\", targetNamespace = \"http://tempuri.org/\")\n String login,\n @WebParam(name = \"password\", targetNamespace = \"http://tempuri.org/\")\n String password);\n\n /**\n * \n * @param password\n * @param login\n * @return\n * returns java.lang.String\n */\n @WebMethod(operationName = \"LoginEx\", action = \"http://tempuri.org/LoginEx\")\n @WebResult(name = \"LoginExResult\", targetNamespace = \"http://tempuri.org/\")\n @RequestWrapper(localName = \"LoginEx\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.LoginEx\")\n @ResponseWrapper(localName = \"LoginExResponse\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.LoginExResponse\")\n public String loginEx(\n @WebParam(name = \"login\", targetNamespace = \"http://tempuri.org/\")\n String login,\n @WebParam(name = \"password\", targetNamespace = \"http://tempuri.org/\")\n String password);\n\n /**\n * \n * @param value\n * @return\n * returns java.lang.String\n */\n @WebMethod(operationName = \"LoginByCookies\", action = \"http://tempuri.org/LoginByCookies\")\n @WebResult(name = \"LoginByCookiesResult\", targetNamespace = \"http://tempuri.org/\")\n @RequestWrapper(localName = \"LoginByCookies\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.LoginByCookies\")\n @ResponseWrapper(localName = \"LoginByCookiesResponse\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.LoginByCookiesResponse\")\n public String loginByCookies(\n @WebParam(name = \"value\", targetNamespace = \"http://tempuri.org/\")\n String value);\n\n /**\n * \n */\n @WebMethod(operationName = \"SignOut\", action = \"http://tempuri.org/SignOut\")\n @RequestWrapper(localName = \"SignOut\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.SignOut\")\n @ResponseWrapper(localName = \"SignOutResponse\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.SignOutResponse\")\n public void signOut();\n\n /**\n * \n * @return\n * returns boolean\n */\n @WebMethod(operationName = \"IsAuthenticated\", action = \"http://tempuri.org/IsAuthenticated\")\n @WebResult(name = \"IsAuthenticatedResult\", targetNamespace = \"http://tempuri.org/\")\n @RequestWrapper(localName = \"IsAuthenticated\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.IsAuthenticated\")\n @ResponseWrapper(localName = \"IsAuthenticatedResponse\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.IsAuthenticatedResponse\")\n public boolean isAuthenticated();\n\n /**\n * \n * @param token\n * @return\n * returns java.lang.String\n */\n @WebMethod(operationName = \"LoginByGoogleId\", action = \"http://tempuri.org/LoginByGoogleId\")\n @WebResult(name = \"LoginByGoogleIdResult\", targetNamespace = \"http://tempuri.org/\")\n @RequestWrapper(localName = \"LoginByGoogleId\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.LoginByGoogleId\")\n @ResponseWrapper(localName = \"LoginByGoogleIdResponse\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.LoginByGoogleIdResponse\")\n public String loginByGoogleId(\n @WebParam(name = \"token\", targetNamespace = \"http://tempuri.org/\")\n String token);\n\n /**\n * \n * @param args\n * @param calcId\n * @return\n * returns java.lang.String\n */\n @WebMethod(operationName = \"Execute\", action = \"http://tempuri.org/Execute\")\n @WebResult(name = \"ExecuteResult\", targetNamespace = \"http://tempuri.org/\")\n @RequestWrapper(localName = \"Execute\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.Execute\")\n @ResponseWrapper(localName = \"ExecuteResponse\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.ExecuteResponse\")\n public String execute(\n @WebParam(name = \"calcId\", targetNamespace = \"http://tempuri.org/\")\n String calcId,\n @WebParam(name = \"args\", targetNamespace = \"http://tempuri.org/\")\n String args);\n\n /**\n * \n * @param args\n * @param ticket\n * @param calcId\n * @return\n * returns java.lang.String\n */\n @WebMethod(operationName = \"ExecuteEx\", action = \"http://tempuri.org/ExecuteEx\")\n @WebResult(name = \"ExecuteExResult\", targetNamespace = \"http://tempuri.org/\")\n @RequestWrapper(localName = \"ExecuteEx\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.ExecuteEx\")\n @ResponseWrapper(localName = \"ExecuteExResponse\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.ExecuteExResponse\")\n public String executeEx(\n @WebParam(name = \"calcId\", targetNamespace = \"http://tempuri.org/\")\n String calcId,\n @WebParam(name = \"args\", targetNamespace = \"http://tempuri.org/\")\n String args,\n @WebParam(name = \"ticket\", targetNamespace = \"http://tempuri.org/\")\n String ticket);\n\n /**\n * \n * @param args\n * @param ticket\n * @param calcId\n * @param timeout\n * @return\n * returns java.lang.String\n */\n @WebMethod(operationName = \"ExecuteWithTimeout\", action = \"http://tempuri.org/ExecuteWithTimeout\")\n @WebResult(name = \"ExecuteWithTimeoutResult\", targetNamespace = \"http://tempuri.org/\")\n @RequestWrapper(localName = \"ExecuteWithTimeout\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.ExecuteWithTimeout\")\n @ResponseWrapper(localName = \"ExecuteWithTimeoutResponse\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.ExecuteWithTimeoutResponse\")\n public String executeWithTimeout(\n @WebParam(name = \"calcId\", targetNamespace = \"http://tempuri.org/\")\n String calcId,\n @WebParam(name = \"args\", targetNamespace = \"http://tempuri.org/\")\n String args,\n @WebParam(name = \"ticket\", targetNamespace = \"http://tempuri.org/\")\n String ticket,\n @WebParam(name = \"timeout\", targetNamespace = \"http://tempuri.org/\")\n int timeout);\n\n /**\n * \n * @param ticket\n * @param sessionId\n */\n @WebMethod(operationName = \"UpdateSession\", action = \"http://tempuri.org/UpdateSession\")\n @RequestWrapper(localName = \"UpdateSession\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.UpdateSession\")\n @ResponseWrapper(localName = \"UpdateSessionResponse\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.UpdateSessionResponse\")\n public void updateSession(\n @WebParam(name = \"ticket\", targetNamespace = \"http://tempuri.org/\")\n String ticket,\n @WebParam(name = \"sessionId\", targetNamespace = \"http://tempuri.org/\")\n String sessionId);\n\n /**\n * \n * @param ticket\n * @param oldPassword\n * @param newPassword\n * @param login\n * @return\n * returns java.lang.String\n */\n @WebMethod(operationName = \"ChangePassword\", action = \"http://tempuri.org/ChangePassword\")\n @WebResult(name = \"ChangePasswordResult\", targetNamespace = \"http://tempuri.org/\")\n @RequestWrapper(localName = \"ChangePassword\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.ChangePassword\")\n @ResponseWrapper(localName = \"ChangePasswordResponse\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.ChangePasswordResponse\")\n public String changePassword(\n @WebParam(name = \"login\", targetNamespace = \"http://tempuri.org/\")\n String login,\n @WebParam(name = \"oldPassword\", targetNamespace = \"http://tempuri.org/\")\n String oldPassword,\n @WebParam(name = \"newPassword\", targetNamespace = \"http://tempuri.org/\")\n String newPassword,\n @WebParam(name = \"ticket\", targetNamespace = \"http://tempuri.org/\")\n String ticket);\n\n /**\n * \n * @return\n * returns java.lang.Object\n */\n @WebMethod(operationName = \"IsEnabled\", action = \"http://tempuri.org/IsEnabled\")\n @WebResult(name = \"IsEnabledResult\", targetNamespace = \"http://tempuri.org/\")\n @RequestWrapper(localName = \"IsEnabled\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.IsEnabled\")\n @ResponseWrapper(localName = \"IsEnabledResponse\", targetNamespace = \"http://tempuri.org/\", className = \"org.tempuri.IsEnabledResponse\")\n public Object isEnabled();\n\n}", "public EmpleadoModel validar(EmpleadoModel bean){\n AccesoDB cn = AccesoDB.saberEstado();\n EmpleadoModel beanEmpleado = null;\n ResultSet rs = null;\n\n PreparedStatement pst;\n \n try{\n pst = cn.getCn().prepareCall(\"{Call verificarInicioEmpleado(?,?)}\");\n pst.setString(1, bean.getEmpleadoEmail());\n pst.setString(2, bean.getEmpleadoContrasena());\n \n rs = pst.executeQuery();\n \n while(rs.next()){\n beanEmpleado = mapRow(rs);\n }\n \n }catch(SQLException ex){\n System.out.println(\"Error en VerificarLoginn Empleado: \" + ex);\n } finally{\n cn.cerrarConexion();\n }\n \n return beanEmpleado;\n }", "public login_1_argument() {\n }", "@RequestMapping(value = \"/login.htm\",method = RequestMethod.POST)\r\n\tpublic String login(User user,BindingResult result,ModelMap map,HttpSession session,HttpServletResponse response) throws IOException {\r\n\t\t\r\n\t\r\n\t\tboolean b = userService.findUser(user);\r\n\t\tif(b) {\r\n\t\t\tsession.setAttribute(\"user\", user);\r\n\t\t\treturn \"redirect: session_form.htm\";\r\n\t\t}else {\r\n\t\t\tString msa = \"Wrong Credential!!!!!\";\r\n\t\t\tmap.put(\"msg\",msa);\r\n\r\n\t\t\treturn \"login_form\";\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tProductsService productsService= new ProductsService();\n\t\t/*\t\tuser.setFirstName(\"Nick\");\n\t\tuser.setLastName(\"Troyan\");\n\t\tuser.setEmail(\"[email protected]\");\n\t\tuser.setPassword(\"12345\");\n\t\tuser.setUserImage(\"D://image.jpeg\");\n\t\tu.insertUser(user);*/\n//System.out.println(u.getAllUsers());\n//System.out.println(u.getUserByEmail(\"[email protected]\"));\n//System.out.println(u.getUserByEmail2());\n//System.out.println(u.getUserlogin());\n//loginServlet loginServlet = new loginServlet();\n//System.out.println(loginServlet);\n//System.out.println(productsService.getAllPeriodicals());\n//System.out.println(productsService.getAllPeriodicalsDeleted());\n//System.out.println(productsService.getAllPeriodicalsWithDeleted());\nSystem.out.println(productsService.getAllPeriodicals());\n\n\t}" ]
[ "0.5981605", "0.5812712", "0.58055896", "0.5798837", "0.57354075", "0.56996906", "0.56907064", "0.5687078", "0.56600124", "0.5616977", "0.5605688", "0.5602374", "0.5602236", "0.55924624", "0.55921173", "0.5590832", "0.5552759", "0.5549854", "0.5543159", "0.55368686", "0.5531481", "0.5516527", "0.55147916", "0.54826796", "0.54826", "0.5482451", "0.5471533", "0.5470244", "0.54673195", "0.54559314", "0.5453692", "0.5449176", "0.54325604", "0.5421715", "0.54157925", "0.5408131", "0.5406306", "0.54035074", "0.5402076", "0.5381773", "0.53788453", "0.5374126", "0.5371156", "0.5370071", "0.5369544", "0.53685963", "0.5366789", "0.5365836", "0.53657246", "0.53601", "0.535395", "0.53490275", "0.5341824", "0.5340528", "0.53370816", "0.5334948", "0.5331837", "0.5326149", "0.53201604", "0.53097147", "0.530784", "0.52971166", "0.529489", "0.5282179", "0.5274501", "0.5270712", "0.5265729", "0.5260969", "0.52559936", "0.52554816", "0.5251765", "0.5251264", "0.52452344", "0.52308905", "0.52285576", "0.5226579", "0.52240855", "0.5221584", "0.5220041", "0.5219518", "0.52179766", "0.52154005", "0.52097046", "0.52081037", "0.5205842", "0.5204501", "0.5203008", "0.5198948", "0.5196808", "0.5194432", "0.51935875", "0.519181", "0.51901096", "0.51875055", "0.5186167", "0.5184498", "0.5180618", "0.51791847", "0.51778835", "0.5169069" ]
0.6301481
0
Constructor to build the connection
public TCPServerEmployee(int NumPort, ControllerC controller) { try { socketserver = new ServerSocket(NumPort); this.controller = controller; } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Connection() {\n\t\t\n\t}", "private Connection () {}", "private Connection() {\n \n }", "Connection createConnection();", "private void createConnection() {\n this.callbacks = getCallbacks();\n\n Properties props = new Properties();\n props.putAll(getTestProps());\n props.putAll(getProps());\n this.connection = Connections.create((ConnectionCallbacks) callbacks, props);\n configureConnection(connection);\n }", "public AbstractConnection() {\n }", "private Connection() {\n\t\tSystem.out.println(\">> Connection Object Constructed at \"+this);\n\t}", "private Connection() {\n\t\tSystem.out.println(\"--Connection Created--\");\n\t}", "private Connection(){\n\n }", "public ServerConnection()\n {\n //Initializing of the variables used in the constructor\n this.hostAddress = \"http://localhost\";\n this.port = 8882;\n }", "public void buildConnection()\n {\n try\n {\n myConn = DriverManager.getConnection(url, user, pw);\n statement = myConn.createStatement();\n }\n catch(CommunicationsException e)\n {\n System.err.println(e);\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Verbindungsfehler\");\n alert.setContentText(\"Verbindung zum SQL Server fehlgeschlagen\");\n alert.showAndWait();\n }\n catch(Exception e)\n {\n System.err.println(e);\n }\n\n }", "public SocketChannelTarantoolConnection() {\n\t\tthis(\"localhost\", 33013);\n\t}", "public ConnectionManager() {\r\n\t\tthis(DEFAULT_PORT, true, true);\r\n\t}", "public void buildConnect() {\n\t\ttry {\n\t\t\tClass.forName(jdbcDriver);\n\t\t\tconnection= DriverManager.getConnection(dbUrl, user, passwd);\n\t\t\tstatement= connection.createStatement();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "void createConnection();", "public DaoConnection() {\n\t\t\n\t}", "public DBConnection()\n {\n\n }", "private DBConnection() \n {\n initConnection();\n }", "public ServerConnecter() {\r\n\r\n\t}", "private void openConnection(){}", "public DBConnection() {\n this(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST, DB_PORT);\n }", "private SequencerConnection() { }", "@Override\n\tpublic void construct() {\n\t\tSystem.out.println(\"Getting a MySQL Database Connection\");\n\n\t}", "public <T> Connection<T> createConnection( ConnectionContext<T> context ) throws ConnectionBuildException;", "public ConnectionManager() {\n }", "private URLConnection urlConnBuilder(URI base, URI resource) throws IOException {\n if (!resource.isAbsolute() && base != null) {\n resource = base.resolve(resource);\n }\n URL specURL = resource.toURL();\n URLConnection connection = specURL.openConnection();\n connection.setRequestProperty(\"Accept\", \"application/json\");\n connection.setRequestProperty(\"user-agent\", \"spymemcached vbucket client\");\n connection.setRequestProperty(\"X-memcachekv-Store-Client-Specification-Version\", CLIENT_SPEC_VER);\n\tif (restUsr != null) {\n\t try {\n\t\tconnection.setRequestProperty(\"Authorization\", buildAuthHeader(restUsr, restPwd));\n\t } catch (UnsupportedEncodingException ex) {\n\t\tthrow new IOException(\"Could not encode specified credentials for HTTP request.\", ex);\n\t }\n\t}\n\n return connection;\n\n }", "private ServerConnectionParser() {\n }", "public static Connection createConnection() {\n\t\treturn new FabricaDeConexoes().getConnection();\n\t}", "protected void connect() {\n\t\treadProperties();\n\t\tif (validateProperties())\n\t\t\tjuraMqttClient = createClient();\n\t}", "public SocketParams() {\n init();\n }", "public DBConn(){\n\t\t//Create a variable for the connection string.\n\t\tthis.connectionUrl = \"jdbc:sqlserver://localhost:1433;\" +\n\t\t \"databaseName=CSE132B; username=sa; password=cse132b\";\t\t//Daniel: integratedSecurity=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Kalvin: username=sa; password=cse132b\n\n\t\t// Declare the JDBC objects.\n\t\tthis.conn = null;\n\t\tthis.stmt = null;\n\t\tthis.rs = null;\n\t}", "public TPS_BasicConnectionClass() {\n this.parameterClass = new TPS_ParameterClass();\n try {\n this.parameterClass.loadRuntimeParameters(TPS_BasicConnectionClass.getRuntimeFile());\n dbCon = new TPS_DB_Connector(this.parameterClass);\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public ConnectionConfig createConnection()\n {\n return _connectionConfig;\n }", "public ConnectDB(){\r\n\r\n\t}", "private DbConnection() {\n }", "ClientConnection connection();", "private DBconnectionUtil()\n\t{\n\t\t\n\t}", "public UPKClient() {\n connectToServer(BASE_URL);\n }", "protected Connection createConnection() {\n Properties connectionProperties = new Properties();\n JdbcPropertyAdapter adapter = getPropertyAdapter(dbType, properties);\n adapter.getExtraProperties(connectionProperties);\n\n String url = translator.getUrl(properties);\n logger.info(\"Opening connection to: \" + url);\n Connection connection;\n try {\n connection = DriverManager.getConnection(url, connectionProperties);\n connection.setAutoCommit(false);\n } catch (SQLException x) {\n throw translator.translate(x);\n }\n return connection;\n }", "protected GaConnector() {\n }", "public ConnexioBD() {\n try {\n Class.forName(driver);\n connection = DriverManager.getConnection(url, user, password);\n\n\n } catch (ClassNotFoundException | SQLException e) {\n System.out.println(\"Error al connectar amb la base de dades:\" + e);\n }\n }", "private HttpURLConnection createConnection() {\n try {\n HttpURLConnection httpURLConnection = this.httpProxyHost != null ? CONNECTION_FACTORY.create(this.url, this.createProxy()) : CONNECTION_FACTORY.create(this.url);\n httpURLConnection.setRequestMethod(this.requestMethod);\n return httpURLConnection;\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }", "private void establishConnection() {\n\n try {\n\n for(Clone clone:this.clones){\n ClearConnection connection = new ClearConnection();\n connection.connect(clone.getIp(), clone.getOffloadingPort(), 5 * 1000);\n this.connections.add(connection);\n }\n\n this.protocol = new ERAMProtocol();\n this.ode = new ERAMode();\n\n } catch (Exception e) {\n Log.e(TAG,\"Connection setup with the Remote Server failed - \" + e);\n }\n }", "public SwimConnectionFactory() {\n\t\tsuper();\n\t}", "public Network () {\n buildNetwork();\n }", "public JsonpConnectionInfo() {\n }", "protected void connectionEstablished() {}", "private DataConnection() {\n \tperformConnection();\n }", "public Connector()\n\t{\n\t\tconn = null;\n\t}", "public void init() {\r\n \tconnection = Connect.initConnexion();\r\n \tSystem.out.println(\"connexion :\"+connection);\r\n }", "@Override\n\tpublic Connection connect(String arg0, Properties arg1) throws SQLException {\n\t\t\n\t\treturn new connection(arg0,arg1);\n\t}", "public DefaultConnectionProvider() {\n loadProperties();\n }", "private void initConnection() throws MalformedURLException, IOException {\n httpConnection = (HttpURLConnection) new URL(initUrlParameter())\n .openConnection();\n httpConnection.setDoOutput(true);\n httpConnection.setDoInput(true);\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.setRequestProperty(\"Content-Type\", \"application/json\");\n httpConnection.setRequestProperty(\"Authorization\",\n authentificator.generateBasicAuthorization());\n\n }", "private Connection getConn(){\n \n return new util.ConnectionPar().getConn();\n }", "public SQLCommunicator() {\n logger.info(\"Inside SQLConstructor\");\n try {\n //Connect to the database\n connectionUrl = \"jdbc:derby://localhost:1527/DribbleDerbyDB\";\n\n con = DriverManager.getConnection(connectionUrl, \"APP\", \"dribble\");\n logger.info(\"Connected to Glassfish database\");\n DatabaseMetaData md = con.getMetaData();\n //Check if the table exists in the database\n ResultSet rs = md.getTables(null, \"APP\", \"%\", null);\n //Add a table if the table does not exist\n if (rs.next() == false) {\n Statement stmt = con.createStatement();\n logger.info(\"No table in database. Creating main table...\");\n stmt.execute(\"CREATE TABLE DRIBBLE_SYSTEM_SUBJECTS\"\n + \"(NAME VARCHAR(20),\"\n + \"ID INTEGER NOT NULL,\"\n + \"LATITUDE BIGINT,\"\n + \"LONGITUDE BIGINT,\"\n + \"VIEWS INTEGER default 0,\"\n + \"POSTS INTEGER default 0,\"\n + \"POPULARITY BIGINT default 0,\"\n + \"CURRENTIME BIGINT\"\n + \")\");\n } else {\n logger.info(\"Table exists in database\");\n }\n\n\n } catch (SQLException e) {\n logger.severe(\"SQLexception: \" + e.toString());\n }\n\n logger.info(\"Constructed SQLCommunicator\");\n\n }", "@Override\n public Connection call() throws Exception {\n return createConnection();\n }", "public HGDClient() {\n \n \t}", "public DataConnection() {\n\t\ttry {\n\t\t\tString dbClass = \"com.mysql.jdbc.Driver\";\n\t\t\tClass.forName(dbClass).newInstance();\n\t\t\tConnection con = DriverManager.getConnection(DIR_DB, USER_DB, PASS_DB);\n\t\t\tstatement = con.createStatement();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initConnection(Socket cli) {\t\n\tConnection conn = new Connection(this, cli);\n conn.setConnlist(connlist);\n\tThread t = new Thread(conn);\n\tt.start();\n\t\n\tconnlist.add(conn);\n\t\t\n\tsetConnectedStatus(true);\n }", "abstract public void openConnection();", "public ModemWorker (IConnection connection) {\n\t\tthis.connection = connection;\n\t}", "public ConnectionMonitorSource() {\n }", "protected ServerConnectionDebugger() {\n\n }", "NodeConnection createNodeConnection();", "public TriasConnection() throws IOException {\n URL url = new URL(urlString);\n URLConnection con = url.openConnection();\n http = (HttpURLConnection) con;\n }", "public void establishConnection() {\n httpNetworkService = new HTTPNetworkService(handler);\n }", "public Client() {\n _host_name = DEFAULT_SERVER;\n _port = PushCacheFilter.DEFAULT_PORT_NUM;\n }", "private DatabaseHandler(){\n createConnection();\n }", "public void setConn(Connection conn) {this.conn = conn;}", "public URIBuilder() {\n super();\n this.port = -1;\n }", "private ConnectionPool() {\n connections = new LinkedBlockingQueue<>(DEFAULT_POOL_SIZE);\n this.init();\n }", "public void init(){\n taskClient.connect(\"127.0.0.1\", 9123);\n }", "public TransportConn(RFTXHost host, int identity) {\n this.host = host;\n this.identity = identity;\n readyToRun=false;\n }", "public DBCreator(DBConnection connection) {\n this.dbConnection = connection;\n }", "public DatabaseConnection(Connection c){\n\t\tconn = c;\n\t}", "public WOHTTPConnection(java.lang.String aHost, int portNumber){\n //TODO codavaj!!\n }", "private CassandraIoSDK(APIConnection apiConnection, String apiUrl){\n\t\tthis.apiConnection = apiConnection;\n\t\tthis.apiUrl = apiUrl;\n\t}", "private Connection createConnection() {\n try {\n return DriverManager.getConnection(\"jdbc:mysql://\" + host + \":\" + port + \"/\" + db, user, password);\n } catch (SQLException e) {\n e.printStackTrace();\n return null;\n }\n }", "public Connections(String info) { \n\t\tnoteForConnection = info;\n\t\tArrayList<Chunk> c = SingletonInterpreter.getInterpreter().getChunks();\n\t\tsetChunks(c);\n\t\tcopyOfChunks = copyChunks(getChunks());\n\t\toldList = copyOfChunks;\n\t}", "public InitialValuesConnectionCenter() \n\t{\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IOException ServerConnectionCenter.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public RepositoryConnection(Connection conn) {\n this.conn = conn;\n }", "public HVConnect () {\n super();\n // TODO Auto-generated constructor stub\n }", "public IPConnection() {\n\t\tbrickd = new BrickDaemon(\"2\", this);\n\t}", "public UConnecte() {\n\t\tsuper();\n\t}", "public DBManager(){\r\n connect(DBConstant.driver,DBConstant.connetionstring);\r\n }", "public ConnectionHandler(int bufferSize) {\r\n\t\ttcp = new TCPConnectionHandler(this, bufferSize);\r\n\t}", "private void init() throws SQLException, MalformedURLException {\n\t\tconnection = connect();\n\t\tstmt = connection.createStatement();\n\t\tstmt.setQueryTimeout(30);\n\t}", "private void CreateConnection()\n throws IOException {\n URL url = new URL(requestURL);\n //creates connection\n httpConn = (HttpURLConnection) url.openConnection();\n //sets headers\n Set<Map.Entry<String, String>> set = headers.entrySet();\n for (Map.Entry<String, String> me : set) {\n httpConn.setRequestProperty(me.getKey(), me.getValue());\n }\n //sets method\n httpConn.setRequestMethod(method);\n httpConn.setUseCaches(false);\n if (method == \"POST\") {\n httpConn.setDoOutput(true);\n httpConn.setDoInput(true);\n }\n\n }", "private ConnectionPool() {\r\n\t\tResourceManagerDB resourceManager = ResourceManagerDB.getInstance();\r\n\t\tthis.driver = resourceManager.getValue(ParameterDB.DRIVER_DB);\r\n\t\tthis.url = resourceManager.getValue(ParameterDB.URL_DB);\r\n\t\tthis.user = resourceManager.getValue(ParameterDB.USER_DB);\r\n\t\tthis.password = resourceManager.getValue(ParameterDB.PASSWORD_DB);\r\n\t\tthis.poolsize = Integer.parseInt(resourceManager.getValue(ParameterDB.POOLSIZE_DB));\r\n\t}", "public HttpConnector(){\n super();\n }", "public BusinessLogic()\n\t{\n\t\tcreateConnection();\n\t}", "public JNDIConnector() {\n super();\n }", "public NoConnectionProvidedException() {\n super();\n }", "public MongoDBConnection(MongoDBConfig config) {\n // TODO setup correct configuration\n super(new HashMap<>());\n }", "public Connect(LibraryConfiguration config, String username, String password) throws Exception {\n\n /* this is the xml and xpath stuff */\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n this.db = dbf.newDocumentBuilder();\n this.xPath = XPathFactory.newInstance().newXPath();\n /* create the target host */\n this.config = config;\n this.client = new HttpClient(username, password, false);\n }", "public SqlConnectionPool build() throws SQLException {\n HikariConfig config = new HikariConfig();\n config.setJdbcUrl(\"jdbc:mysql://\" + HOST + \":\" + PORT + \"/\" + database + \"\");\n config.setUsername(USERNAME);\n config.setPassword(PASSWORD);\n config.setPoolName(poolName);\n return new SqlConnectionPool(new HikariDataSource(config));\n }", "public static Connection connect(){\n\t\ttry {\n\t\t\tadd = Configure.getADDRESS();\n\t\t\tconn = ConnectionFactory.getConnect(add, Configure.port, \"TCP\");\n\t\t} catch (Exception e) {\n\t\t\tConfigure.logger.error(e.getMessage());\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\t//System.exit(0);\n\t\t}\n\t\treturn conn;\n\t}", "public NetworkSource() {\n }", "public TestCaseSocket() {\n\t}", "abstract public boolean createConnection();", "public Database() {\r\n\t\ttry {\t\r\n\t\t\tSystem.out.println(\"Database: Connected\");\r\n\t\t\tconn = DriverManager.getConnection(DB_URL,USER,PASS);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Unable to connect to database\");\r\n\t\t}\r\n\t}" ]
[ "0.75356275", "0.7407774", "0.7309256", "0.71213573", "0.70934665", "0.70874363", "0.7047814", "0.70409167", "0.6995069", "0.6960772", "0.69594705", "0.68325466", "0.68151695", "0.68037635", "0.68010694", "0.6760241", "0.67463845", "0.6743354", "0.6669331", "0.66192895", "0.6615783", "0.6563354", "0.64964324", "0.6470093", "0.64681387", "0.64381295", "0.6429871", "0.64101803", "0.6404606", "0.6386879", "0.6386176", "0.63477606", "0.63268894", "0.6312707", "0.62947243", "0.62681365", "0.6251557", "0.62293553", "0.6229205", "0.62263155", "0.6188446", "0.61594486", "0.6158491", "0.61535823", "0.6138048", "0.61361784", "0.6136156", "0.61331284", "0.6131482", "0.61243033", "0.6114577", "0.6112075", "0.6108295", "0.61010784", "0.61010647", "0.6097894", "0.60763514", "0.60643035", "0.6060893", "0.60539615", "0.6053244", "0.60412", "0.6027972", "0.6026501", "0.6026358", "0.60161865", "0.6013425", "0.6000433", "0.60003555", "0.59908015", "0.59850085", "0.5981718", "0.5981218", "0.5976001", "0.5973335", "0.5973267", "0.59616476", "0.59613377", "0.59598845", "0.5957704", "0.5950569", "0.59487164", "0.5938458", "0.5936692", "0.5930352", "0.59223634", "0.5913867", "0.5912627", "0.5912517", "0.5906458", "0.59019774", "0.58972144", "0.5896811", "0.58884144", "0.58869225", "0.5875613", "0.58706784", "0.58649963", "0.5863689", "0.5859694", "0.58563745" ]
0.0
-1
Launching of a thread to establish the connection
public void run() { try { while(true) { socket = socketserver.accept(); writeListIdEmployee(); socket.close(); } } catch (IOException e) { try { socketserver.close(); } catch (IOException e2) { e2.printStackTrace(); } e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startThread(){\n String message = \"Connecting to RescueNet...Please Wait\";\n showProgressDialog(message);\n connectionThread = new ConnectionThread(mwifiAdmin, handlerMain);\n connectionThread.start();\n }", "private void createAndStartConnectionThread() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n boolean success = webSocketConnection.createAndConnectTCPSocket();\n if (success) {\n webSocketConnection.startConnection();\n }\n } catch (Exception e) {\n synchronized (globalLock) {\n if (isRunning) {\n webSocketConnection.closeInternal();\n\n onException(e);\n\n if (e instanceof IOException && automaticReconnection) {\n createAndStartReconnectionThread();\n }\n }\n }\n }\n }\n }).start();\n }", "public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }", "public void startConnectThread(String ipAddr) {\n \t\tThread thread = new Thread(new Connection(ipAddr));\n \t\tthread.start();\n \t\tthreads.add(thread);\n \t}", "private void makeBackgroundConnection() {\n connectionPending = true;\n try {\n Thread connectThread = new Thread(this);\n connectThread.start();\n } catch (OutOfMemoryError oome) {\n // Give up on new connection\n }\n }", "private void makeBackgroundConnection() {\n connectionPending = true;\n try {\n Thread connectThread = new Thread(this);\n connectThread.start();\n } catch (OutOfMemoryError oome) {\n // Give up on new connection\n }\n }", "public void toThread() {\n\t\t// TODO Auto-generated method stub\n\t\tnew Thread(this).start();\n\t\tclient.start();\n\t}", "public synchronized void startConnection ()\r\n\t{\r\n \t\tsynchronized (this)\r\n \t\t{\r\n \t\t\tif (_roboCOM!=null) return;\r\n\t\t\t\r\n\t\t\tuitoken++;\r\n\t\t\t_roboCOM = new TCPClient (MsgQueue,cm,uitoken);\r\n\r\n\t\t\t// debug parameters\r\n\t\t\t_roboCOM.msgHello=\"Start Connection ACCE\";\r\n\t\t\t\t\t\t\t\r\n\t \t \tnew Thread (_roboCOM).start();\r\n \t\t}\r\n\t}", "public static void connect() {\n \t\tconnPool.start();\n \t}", "@Override\n public void run() {\n new ConnectBT().execute();\n }", "protected void mainTask() {\n\ttry {\n\t socket = serverSocket.accept();\t\n\t spawnConnectionThread(socket);\n\t} catch (IOException e) {\n\t return;\n\t}\n }", "public void run() {\n // Initial connect request comes in\n Request request = getRequest();\n\n if (request == null) {\n closeConnection();\n return;\n }\n\n if (request.getConnectRequest() == null) {\n closeConnection();\n System.err.println(\"Received invalid initial request from Remote Client.\");\n return;\n }\n\n ObjectFactory objectFactory = new ObjectFactory();\n Response responseWrapper = objectFactory.createResponse();\n responseWrapper.setId(request.getId());\n responseWrapper.setSuccess(true);\n responseWrapper.setConnectResponse(objectFactory.createConnectResponse());\n responseWrapper.getConnectResponse().setId(id);\n\n // Return connect response with our (statistically) unique ID.\n if (!sendMessage(responseWrapper)) {\n closeConnection();\n System.err.println(\"Unable to respond to connect Request from remote Client.\");\n return;\n }\n\n // register our thread with the server\n Server.register(id, this);\n\n // have handler manage the protocol until it decides it is done.\n while ((request = getRequest()) != null) {\n\n Response response = handler.process(this, request);\n\n if (response == null) {\n continue;\n }\n\n if (!sendMessage(response)) {\n break;\n }\n }\n\n // client is done so thread can be de-registered\n if (handler instanceof IShutdownHandler) {\n ((IShutdownHandler) handler).logout(Server.getState(id));\n }\n Server.unregister(id);\n\n // close communication to client.\n closeConnection();\n }", "public static void doConnect() {\r\n\t\tlogger.info(\"Connecting to server......\");\r\n\t\tChannelFuture future = null;\r\n\t\ttry {\r\n\t\t\tfuture = bootstrap.connect(new InetSocketAddress(host, port));\r\n\t\t\tfuture.addListener(channelFutureListener);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t// future.addListener(channelFutureListener);\r\n\t\t\tlogger.warn(\"Closed connection.\");\r\n\t\t}\r\n\r\n\t}", "public int launch() {\n for( BluetoothConnectionThread bct: bluetoothConnectionThreads)\n if (!bct.isAlive()) {\n bct.start();\n }\n return Constants.SUCCESS;\n }", "public void makeConnection() {\n\t\ttry {\n\t\t\tif(sock != null) {\n\t\t\t\ttable.printMsg(\"Cannot join a server twice! You've already connected.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsock = new Socket(serverIP, serverPort);\n\t\t\toos = new ObjectOutputStream(sock.getOutputStream());\n\t\t\tois = new ObjectInputStream(sock.getInputStream());\n\t\t\tThread thread = new Thread(new ServerHandler());\n\t\t\tthread.start();\n\t\t} catch(Exception e) {\n\t\t\ttable.printMsg(\"Cannot Join Server.\");\n\t\t\tsock = null;\n\t\t\ttable.repaint();\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tgotoConnectActivity();\n\t\t\t}", "@SuppressWarnings(\"resource\")\r\n public void run() {\r\n try {\r\n ServerSocket server = new ServerSocket(ConfigurationFile.getClientPort()[clientNumber-1]);\r\n while(true) {\r\n Socket socket =server.accept();\r\n Thread thread = new Thread(new Connection(socket,hashtable));\r\n thread.start();\r\n }\r\n }\r\n catch(IOException e) {\r\n System.out.println(\"Server socket could not be created. Check configuration file.\");\r\n }\r\n }", "@Override\r\n\tpublic void run() {\n\t\tthis.setName(\"后台线程\");\r\n\t\tshutdownFlag = false;\r\n\t\tconnection = new Connection(this);\r\n\t\tconnection.connect(ip, port, user, pwd);\r\n\t\twhile (!shutdownFlag) {\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(30000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\tif (connection.getConnState() == Connection.CONNSTATE_NOT_CONNECTED) {\r\n\t\t\t\tconnection.connect(ip, port, user, pwd);\r\n\t\t\t} else if (connection.getConnState() == Connection.CONNSTATE_NOT_LOGIN) {\r\n\t\t\t\tconnection.login(user, pwd);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tconnection.stop();\r\n\t\tshutdownFlag = true;\r\n\r\n\t}", "protected void startConnect() {\n if (tcp) {\n connection = new TCPConnection(this);\n } else {\n connection = new UDPConnection(this, udpSize);\n }\n connection.connect(remoteAddr, localAddr);\n }", "NetThread(){}", "public void start(){\n log.debug(\"Starting Host Router\");\n lobbyThread = pool.submit(new Runnable() {\n public void run() {\n waitForClients();\n }\n });\n }", "@SuppressWarnings(\"static-access\")\r\n\t\t@Override\r\n\t\tpublic void run() {\r\n\t\t\tsetName(C_THREAD);\r\n\t\t\tif(controller == MultiController.TCP) {\r\n\t\t\t\tnetworkHandling = new NetworkHandling(tcpHandler);\r\n\t\t\t\tnetworkHandling.establishConnection();\r\n\t\t\t\t\r\n\t\t\t\ttry { \r\n\t\t\t\t\t//Wait until the lock is released - wait for connection\r\n\t\t\t\t\tnetworkHandling.lock.acquire(); \r\n\t\t\t\t} catch (InterruptedException e) { }\r\n\t\t\r\n\t\t\t\tfinished(networkHandling.isConnected());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(controller == MultiController.BLUETOOTH) {\r\n\t\t\t\tbluetoothHandling = new BluetoothHandling(getApplicationContext(),bluetoothHandler);\r\n\t\t\t\tbluetoothHandling.start();\r\n\t\t\t\t\r\n\t\t\t\tIntent intent = new Intent(getApplicationContext(),DeviceListActivity.class);\r\n\t\t\t\tstartActivityForResult(intent, BluetoothHandler.REQUEST_ADDRESS);\r\n\t\t\t\t\r\n\t\t\t\tfinReq = true;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\t//Wait until the lock is released - wait for connection\r\n\t\t\t\t\tbluetoothHandling.lock.acquire();\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tfinished(bluetoothHandling.getState() == BluetoothHandling.STATE_CONNECTED);\r\n\t\t\t}\r\n\t\t}", "private synchronized void doConnect() {\n try {\n String host = agent.getHost();\n int port = agent.getPort();\n log.fine(\"Connecting to server \" + host + ':' + port);\n socket = new Socket(host, port);\n input = socket.getInputStream();\n output = new OutputStreamWriter(socket.getOutputStream());\n disconnected = false;\n new Thread(this).start();\n\n // Automatically login! -> give an auth to the agent...\n TACMessage msg = new TACMessage(\"auth\");\n msg.setParameter(\"userName\", agent.getUser());\n msg.setParameter(\"userPW\", agent.getPassword());\n msg.setMessageReceiver(agent);\n sendMessage(msg);\n\n } catch (Exception e) {\n disconnected = true;\n log.log(Level.SEVERE, \"connection to server failed:\", e);\n socket = null;\n }\n }", "@Override\n\tpublic void run()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (!establishVpn())\n\t\t\t{\n\t\t\t\taddLog(\"Failed to establish the VPN\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconnectTunnel(getLocalServerAddress(dsp.getString(\"local_port\", \"1080\")), getLocalServerAddress(dsp.getString(\"udp_port\", \"7300\")), true);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\n\t\t}\n\t}", "private RRCPConnectionListener() {\n mainThread = new Thread(this);\n }", "public void run() {\n mBluetooth.cancelDiscovery();\n\n try {\n // Connect the device through the socket. This will block\n // until it succeeds or throws an exception\n mmSocket.connect();\n } catch (IOException connectException) {\n // Unable to connect; close the socket and get out\n try {\n mmSocket.close();\n } catch (IOException closeException) { }\n return;\n }\n\n // Do work to manage the connection (in a separate thread)\n connectedSocket(mmSocket);\n }", "public void startThread() {\n\t\tif (this.serverConnectorUsed <= Byte.MAX_VALUE) {\n\t\t\tthis.serverConnectorUsed++;\n\t\t\tLOG.info(\"Running new thread. Now pool is \"+Integer.toString(MAX_THREADS-this.serverConnectorUsed)+\" / \"+Integer.toString(MAX_THREADS));\n\t\t}\n\t}", "public TicketBoothClient()\n {\n Thread myThread = new Thread(this);\n myThread.start();\n }", "private void initConnection(Socket cli) {\t\n\tConnection conn = new Connection(this, cli);\n conn.setConnlist(connlist);\n\tThread t = new Thread(conn);\n\tt.start();\n\t\n\tconnlist.add(conn);\n\t\t\n\tsetConnectedStatus(true);\n }", "protected void spawnConnectionThread(Socket socket) {\n\ttry {\n\t CAMPServerConnectionThread sct = new CAMPServerConnectionThread(socket);\n\t sct.start();\n\t} catch (IOException iox) {\n\t System.err.println(\"Error creating sct: \"+iox);\n\t}\n }", "public void connect() {\n BotConnector newBot = new BotConnector();\n newBot.setEmail(this.email);\n newBot.setAuthenticationKey(key);\n newBot.setBotName(name);\n newBot.setRoom(room);\n //Start Listener Thread\n this.serverListener = new Thread(newBot, \"serverListener\");\n this.serverListener.start();\n }", "public void initiateConnection() {\n\t\tif (Settings.getRemoteHostname() != null) {\n\t\t\ttry {\n\t\t\t\toutgoingConnection(new Socket(Settings.getRemoteHostname(), Settings.getRemotePort()));\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"failed to make connection to \" + Settings.getRemoteHostname() + \":\"\n\t\t\t\t\t\t+ Settings.getRemotePort() + \" :\" + e);\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t}", "public void run() { wait for the launcher script to talk to us\n //\n try {\n ssocket.setSoTimeout(30 * 1000); // 30 seconds\n socket = ssocket.accept();\n socket.setSoTimeout(3 * 60 * 1000);\n socket.setTcpNoDelay(true);\n } catch (SocketTimeoutException stmo) {\n String msg = \"timeout error on initial connection from \" + execName();\n task.log(msg, Project.MSG_ERR);\n failure = new BuildException(msg);\n } catch (Exception e) {\n String err = \"error establishing communication with \" + execName();\n String msg = e.getMessage();\n if (msg != null) {\n err = err + \": \" + msg;\n } else {\n err = err + \": \" + e;\n }\n task.log(err, Project.MSG_ERR);\n failure = new BuildException(err);\n }\n }", "public void onStart() {\n\t\tnew Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tinitConnection();\n\t\t\t\treceive();\n\t\t\t}\n\t\t}.start();\n\t}", "public void run() {\n\t\t\tbtAdapter.cancelDiscovery();\n\n\t\t\ttry {\n\t\t\t\t// Connect the device through the socket. This will block\n\t\t\t\t// until it succeeds or throws an exception\n\t\t\t\tmmSocket.connect();\n\t\t\t} catch (IOException connectException) {\n\t\t\t\t// Unable to connect; close the socket and get out\n\t\t\t\ttry {\n\t\t\t\t\tmmSocket.close();\n\t\t\t\t} catch (IOException closeException) { }\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Do work to manage the connection (in a separate thread)\n\t\t\tmHandler.obtainMessage(SUCCESS_CONNECT, mmSocket).sendToTarget();\n\t\t\tisConnected = true;\n\t\t\tConnectedThread connectedThread = new ConnectedThread((BluetoothSocket) mmSocket);\n\n\t\t}", "public static void initCommunicationClientThread(){\r\n new CommunicationClientThread();\r\n }", "public void startCheckConnection(OperatorContext context) {\r\n\t\tcheckConnectionThread = context.getThreadFactory().newThread(new Runnable() {\r\n\t\t\t\r\n\t\t@Override\r\n\t\tpublic void run() {\r\n\t\t\tint i = 0;\r\n\t\t\twhile(true)\r\n\t\t\t{\r\n\t\t\t\t// check the JDBC connection every 5 seconds \r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t Thread.sleep(5000);\r\n System.out.println(\"checkConnection \" + i++);\r\n\t\t\t\t} \r\n\t\t\t\tcatch(InterruptedException ex) \r\n\t\t\t\t{\r\n\t\t\t\t Thread.currentThread().interrupt();\r\n\t\t\t\t}\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\tif (!jdbcClientHelper.isValidConnection()) {\t\r\n System.out.println(\"JDBC connection is invalid \");\t\t\t\t\t\r\n\t\t\t\t\ttry \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// f connection files it tries to reset JDBC connection\r\n\t\t\t\t\t\t// it is depending to the reconnection policy parameters\r\n\t\t\t\t\t\tresetJDBCConnection();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e2) {\r\n\t\t\t\t\t\tif (!jdbcClientHelper.isValidConnection() && hasErrorPort){\r\n\t\t try \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// if connection files it sends a sqlcode = -1 to the error output port\r\n\t\t JDBCSqlStatus jSqlStatus = new JDBCSqlStatus();\r\n\t\t jSqlStatus.sqlCode = -1;\r\n\t\t jSqlStatus.sqlMessage = \"Invalid Connection\";\r\n\t\t\t\t\t\t\t\t// submit error message\r\n\t\t\t\t\t\t\t\tsubmitErrorTuple(errorOutputPort, null, jSqlStatus);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcatch (Exception e1) {\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t \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} catch (SQLException e3) {\r\n\t\t\t\t}\t\r\n\t\t\t} // end while\r\n\t\t} // end of run()\r\n\t\t\r\n\t\t}); \r\n\t\t\r\n\t\t// start checkConnectionThread\r\n\t\tcheckConnectionThread.start();\r\n\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif (needAutoConnect(addr)) {\n\t\t\t\t\t\tmBleApi.connect(addr);\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n\tpublic void establishNeighborConn() throws Exception {\n\t\tList <Thread> tList = new ArrayList<Thread>();\n\t\tList<Integer> neighborPids = neighborMap.get(pid);\n\t\tnNeighbors = neighborPids.size();\n\t\tfor (int neighborPid : neighborPids) {\n\t\t\tThread t = new Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString neighborHostname = pidToHostnameMap.get(neighborPid);\n\t\t\t\t\t\tConnection neighborConn = new ServerConnection();\n\t\t\t\t\t\tint port = 10000 + (100*pid) + neighborPid;\n\t\t\t\t\t\tneighborConn.connectRetry(coordinatorHostname, port);\n\t\t\t\t\t\tneighborPidToHostnameMap.put(neighborPid, neighborHostname);\n\t\t\t\t\t\tneighborPidToConnMap.put(neighborPid, neighborConn);\n\t\t\t\t\t\tsendQueues.put(neighborPid, new LinkedList<String>());\n\t\t\t\t\t\tsayHelloToNeighbor(neighborConn);\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});\n\t\t\ttList.add(t);\n\t\t\tt.start();\n\t\t}\n\t\tfor (Thread t : tList) {\n\t\t\tt.join();\n\t\t}\n\t\tSystem.out.println(neighborPidToHostnameMap);\n\t\tSystem.out.println(neighborPidToConnMap);\n\t}", "@Override\n\tpublic void establishCoordinatorConn() throws InterruptedException {\n\t\tList<Thread> tList= new ArrayList<Thread>();\n\t\tfor (int i = 0; i < nProc-1; i++) {\n\t\t\tint clientPid = i + 2;\n\t\t\tThread t = new Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tServerConnection conn = new ServerConnection();\n\t\t\t\t\t\tsynchronized (pidToConnMap) {\n\t\t\t\t\t\t\tpidToConnMap.put(clientPid, conn);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint port = 20000 + (100 * 1) + (clientPid);\n\t\t\t\t\t\tconn.connectRetry(coordinatorHostname, port);\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});\n\t\t\ttList.add(t);\n\t\t\tt.start();\n\t\t}\n\t\tfor (Thread t : tList) {\n\t\t\tt.join();\n\t\t}\n\t\tSystem.out.println(pidToConnMap.toString());\n\t}", "@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)\n public void run() {\n\n mBluetoothAdapter.cancelDiscovery();\n Log.i(\"Client\", \"trying to connect to server\");\n try {\n mSocket.connect();\n Log.i(\"Client\", \"connected\");\n\n isConnected = mSocket.isConnected();\n\n } catch (IOException connectException) {\n Log.i(\"Client\", \"fail io connect\");\n isConnected = false;\n\n try {\n mSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return;\n }\n //manageConnectedSocket(mSocket);\n if (isConnected()) {\n mTransferThread = new TransferThread(mSocket);\n mTransferThread.start();\n }else{\n makeToast(\"Please try connecting again\",Toast.LENGTH_LONG);\n }\n }", "public void doConnect() {\n Debug.logInfo(\"Connecting to \" + client.getServerURI() + \" with device name[\" + client.getClientId() + \"]\", MODULE);\n\n IMqttActionListener conListener = new IMqttActionListener() {\n\n public void onSuccess(IMqttToken asyncActionToken) {\n Debug.logInfo(\"Connected.\", MODULE);\n state = CONNECTED;\n carryOn();\n }\n\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n ex = exception;\n state = ERROR;\n Debug.logError(\"connect failed\" + exception.getMessage(), MODULE);\n carryOn();\n }\n\n public void carryOn() {\n synchronized (caller) {\n donext = true;\n caller.notifyAll();\n }\n }\n };\n\n try {\n // Connect using a non-blocking connect\n client.connect(conOpt, \"Connect sample context\", conListener);\n } catch (MqttException e) {\n // If though it is a non-blocking connect an exception can be\n // thrown if validation of parms fails or other checks such\n // as already connected fail.\n state = ERROR;\n donext = true;\n ex = e;\n }\n }", "public void init(){\n taskClient.connect(\"127.0.0.1\", 9123);\n }", "public void run(){\n\n\t\tServerSocket socketEcoute;\n\t\ttry {\n\t\t\tsocketEcoute = new ServerSocket();\n\t\t\tsocketEcoute.bind(new InetSocketAddress(this.defaultPort));\n\t\t\tSystem.out.println(\"Port manager started on : \"+this.defaultPort);\n\t\t\twhile(true){\n\t\t\t\tSocket socketConnexion = socketEcoute.accept();\n\t\t\t\tSystem.out.println(\"Someone is connected on PortManager\");\n\t\t\t\t\n\t\t\t\tnew PortManagerThread(socketConnexion,this.ctrl).start();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void run()\n {\n if (nsServer == null)\n {\n Log.e((nsServer==null)+\"\");\n connectNS(ip, port);\n }\n else\n {\n Log.e(nsServer.toString());\n connectNS(nsServer.getIp(), nsServer.getPort());\n }\n }", "@Override\n public void run()\n {\n close(false);\n try\n {\n if (!isConnected())\n connectMS(msServer.getIp(), msServer.getPort());\n }\n catch (Exception e)\n {\n Log.e(\"Dudu_SDK\",\n \"getServer ...failed ...user default server... \");\n }\n }", "public void run() {\n\t\t\tbluetooth_adapter.cancelDiscovery();\r\n\t\t\tif(socket == null) return;\r\n\t\t\t\r\n\t\t\t// Connect the device through the socket. This will block\r\n\t\t\t// until it succeeds or throws an exception\r\n\t\t\ttry {\r\n\t\t\t\tsocket.connect();\r\n\t\t\t\tdata_thread = new Data_Thread(socket);\r\n\t\t\t\tdata_thread.start();\r\n\t\t\t\t//System.out.println(\"==============> Bluetooth Connected <===================\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsocket.close();\r\n\t\t\t\t} catch (IOException closeException) {\r\n\t\t\t\t\tcloseException.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString message = \"Error: \" + e;\r\n\t\t\t\tif(device != null) {\r\n\t\t\t\t\tmessage += \" Device: \"+device.getName();\r\n\t\t\t\t}\r\n\t\t\t\tbluetooth_show_message(message);\r\n\t\t\t}\r\n\t\t\r\n\t\t\tclient_connect_thread = null;\r\n\t\t}", "public void run() {\n\t\t\twhile (true) {// 保持连接直到异常发生或套接字返回\n\t\t\t\ttry {\n\t\t\t\t\tif (serverSocket != null) {\n\t\t\t\t\t\tmTempSocket = serverSocket.accept(); // 如果一个连接同意\n\t\t\t\t\t}\n\t\t\t\t\t// If a connection was accepted\n\t\t\t\t\tif (mTempSocket != null) {\n\t\t\t\t\t\t// Do work to manage the connection (in a separate\n\t\t\t\t\t\t// thread)\n\t\t\t\t\t\tmanageConnectedSocket(); // 管理一个已经连接的RFCOMM通道在单独的线程。\n\t\t\t\t\t\tserverSocket.close();\n\t\t\t\t\t}\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 run() {\n startConnectionToMSSQL();\n }", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tLog.v(TAG,\"connect to server...\");\n\t\t\t\tsocket=new Socket(\"140.116.246.200\",4000+id);\n\t\t\t\tout=socket.getOutputStream();\n\t\t\t\tin=socket.getInputStream();\n\t\t\t\tLog.v(TAG,\"connect!!\");\n\t\t\t\n\t\t\t\tsendData(\"ask#\");\n\t\t\t\tUIHr.post(refreshUI); \t\n\t\t\t\tresult=new Integer(readData());\n\t\t\t\tUIHr.post(refreshUI); \t\t\n\t\t\t\tsendData(\"over#\");\n\t\t\t\tsocket.close();\n\t\t\t} catch (UnknownHostException e) {e.printStackTrace();} \n\t\t\tcatch (IOException e) {e.printStackTrace();}\n\t\t}", "public void connect() {}", "@Override\r\n\tpublic void run() {\n\t boolean listen = true;\r\n\t while (listen) {\r\n\t\ttry {\r\n\t\t Socket socket = listeningSocket.accept();\r\n\t\t Thread ConnThread = new Thread (new Connection (socket, pid));\r\n\t\t ConnThread.start();\r\n\t\t connThreads.add(ConnThread);\r\n\t\t \r\n\t\t} catch (SocketException e) {\r\n\t\t // TODO Auto-generated catch block\r\n\t\t listen = false;\r\n\t\t} catch (Exception e) {\r\n\t\t System.err.println(\"Random exception\");\r\n\t\t}\r\n\t }\r\n\t}", "public void start() {\n\n // ask information\n String address = JOptionPane.showInputDialog(null, \"Connect to server:\", \"Input\", JOptionPane.QUESTION_MESSAGE);\n String ac = JOptionPane.showInputDialog(null, \"Username:\", \"Input\", JOptionPane.QUESTION_MESSAGE);\n String pw = JOptionPane.showInputDialog(null, \"Password:\", \"Input\", JOptionPane.QUESTION_MESSAGE);\n\n try {\n\n // connect to server\n Socket s = new Socket(address, 9000);\n\n ObjectOutputStream w = new ObjectOutputStream(s.getOutputStream());\n ObjectInputStream r = new ObjectInputStream(s.getInputStream());\n\n Hash h = new Hash(); // hash password\n w.writeObject(new Message(ac, \"Teacher\", \"LOGIN\", 0, h.getHashCode(pw), null)); // check login status\n w.flush();\n Message m = (Message) r.readObject();\n if (m.command.equals(\"LOGIN_FAILED\")) { // display message and exit if fail\n\n JOptionPane.showMessageDialog(null, \"Login fail\", \"Message\", JOptionPane.INFORMATION_MESSAGE);\n System.exit(1);\n\n }\n\n server = address;\n peerList = (PeerList) m.peerList;\n port = (int) m.data;\n\n new Thread(new GUI()).start();\n while (initialized == false){ // wait until setup all GUI components\n\n Thread.sleep(500);\n\n }\n\n new Thread(new upload()).start();\n new Thread(new updateList()).start();\n new Thread(new download(address, 9001)).start(); // try to connect server by port 9001, 9002, 9003...\n\n } catch (Exception e) {\n\n System.exit(1);\n\n }\n\n }", "public void start() throws NotAvailableConnectionsException{\r\n \r\n ServerSocket server = null; \r\n Socket client = null; \r\n\t\t\r\n //Asks the IDAOFactory for a DAO object\r\n IDAO dao = IDAOFactory.getDAO();\r\n\t\ttry{ \r\n getData();\r\n server = new ServerSocket(port);\r\n //the server keeps waiting for connections \r\n while(true){\r\n \r\n LOGGER.info(\"Awaiting for client connection on port: \" + port);\r\n client = server.accept();\r\n LOGGER.info(\"Client connected to the application.\");\r\n \r\n //when a client connects, a thread is created and it \r\n //takes charge of the execution\r\n if(connections<maxThreads){\r\n Thread thread = new Thread(\r\n new LogicThread(client, (DAO) dao));\r\n threadsnum++;\r\n thread.start();\r\n threadsnum--;\r\n }else\r\n throw new NotAvailableConnectionsException();\r\n }\r\n \r\n \r\n \r\n \r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t} finally{\r\n try{\r\n \r\n if(client!=null){\r\n client.close();\r\n }\r\n if(server!=null){\r\n server.close();\r\n }\r\n } catch(IOException ex){\r\n LOGGER.log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }", "public void establishConnection() {\n httpNetworkService = new HTTPNetworkService(handler);\n }", "public abstract Thread startSession();", "public void run() {\r\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\r\n adapter.cancelDiscovery();\r\n try {\r\n btSocket.connect();\r\n Log.d(\"TAG\", \"Device connected\");\r\n isConnected = true;\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n SharedPreferences.Editor edit = preferences.edit();\r\n edit.putBoolean(\"Connection\", isConnected);\r\n edit.apply();\r\n handler.obtainMessage(CONNECTING_STATUS, 1, -1).sendToTarget();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n try {\r\n isConnected = false;\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n SharedPreferences.Editor edit = preferences.edit();\r\n edit.putBoolean(\"Connection\", isConnected);\r\n edit.apply();\r\n btSocket.close();\r\n handler.obtainMessage(CONNECTING_STATUS, -1,-1).sendToTarget();\r\n } catch (IOException f) {\r\n f.printStackTrace();\r\n }\r\n return;\r\n }\r\n //Perform work from connection in a separate thread\r\n connectedThread = new ConnectedThread(btSocket);\r\n connectedThread.run();\r\n }", "private static void startConnection_RunApplication(int port) {\n ServerSocket s1;\n Socket s2;\n int id = 1;\n ServerApplication s2_thread;\n boolean error = false;\n\n s1 = startServer(port);\n if (s1 != null) {\n // iterate almost infinitely\n while (!error) {\n try {\n // accepts connection and creates client socket\n s2 = s1.accept();\n System.out.println(\"Client [ \" + id + \" ] \" + \"connection established: \" + s2.getInetAddress());\n // starts a new thread with the new client socket\n // this way the main thread here can iterate and wait for new connections\n s2_thread = new ServerApplication(s2, id);\n s2_thread.start();\n id++;\n } catch (IOException ex) {\n System.err.println(\"Closing connection... An error has occurred during execution.\");\n error = true;\n }\n }\n try {\n s1.close();\n } catch (IOException ex) {\n System.err.println(\"Error closing server socket\");\n }\n } else {\n print_help();\n }\n }", "private void launchPongManagerThread() {\n \t\tPongManager pongManager = new PongManager(this, listenAddress);\n \t\tfinal Thread t = this.listenChannel.getThreadFactory().newThread(pongManager);\n \t\tt.setName(\"Pong Server Manager\");\n \t\tt.start();\n \t}", "public void run() {\n sendMessageToClient(\"Connexion au serveur réussie\");\n\n while (isActive) {\n try {\n String input = retrieveCommandFromClient();\n handleCommand(input);\n } catch (ServerException e) {\n System.out.println(e.getMessage());\n sendMessageToClient(e.getMessage());\n } catch (ClientOfflineException e) {\n System.out.println(\"Client # \" + clientId + \" deconnecte de facon innattendue\");\n deactivate();\n }\n }\n\n close();\n }", "@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\tThread thisThread = currentThread();\n\t\t\ttry {\n\t\t\t\tLog.i(\"con\", \"worked3\");\n\t\t\t\tconnectToServer();\n\t\t\t\tif (connected) {\n\t\t\t\t\tsetUpStreams();\n\t\t\t\t\tsendProfile();\n\t\t\t\t\tLog.i(\"con\", \"worked8\");\n\t\t\t\t\twhile (blinker == thisThread) {\n\t\t\t\t\t\tstartListening();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.e(\"cl\", \"Found IO Exception!: \" + e);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.e(\"cl\", \"Found class not found exception!: \" + e);\n\t\t\t}\n\n\t\t}", "void toConnect() throws Exception {\n\t\tnameField.setVisible(false);\n\t\tf.setTitle(nameField.getText());\n\t\tsocketToServer = new Socket(\"127.0.0.1\", 5050);\n\t\tmyOutputStream = new ObjectOutputStream(socketToServer.getOutputStream());\n\t\tmyInputStream = new ObjectInputStream(socketToServer.getInputStream()); \n\t\tconnected();\n\t\tstart();\n\t}", "private void connectToServer(String ip)\n {\n try\n {\n if(!ip.equals(\"\"))\n {\n s = new Socket(ip, 3000);\n }\n\n else\n {\n s = new Socket(\"10.0.0.143\", 3000);\n }\n\n output = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));\n output.write(\"Android Connected\");\n output.flush();\n\n // new CommuTask().execute();\n\n //starting the thread\n communication.start();\n // s.close();\n }\n\n catch(UnknownHostException e)\n {\n e.printStackTrace();\n try {\n s.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n\n catch(IOException e)\n {\n e.printStackTrace();\n try {\n s.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n\n }", "@Override\n public void run() {\n //Create server socket\n try (ServerSocket serverSocket = new ServerSocket(serverPort))\n {\n //In loop to continuously accept connections from client\n //main thread doing this\n while (true)\n {\n System.out.println(\"Waiting for client(s) to connect..\");\n //Socket represents connection to client\n Socket clientSocket = serverSocket.accept();\n System.out.println(\"Accepted connection from \" + clientSocket);\n //Message to write to client when connected via outputstream\n OutputStream outputStream = clientSocket.getOutputStream();\n outputStream.write((\"You have connected. Please write: login <username> to login!\\n\" + \"Write <help> for list of additional commands!\\n\").getBytes());\n //Server worker, handles communication with client socket\n ServerWorker worker = new ServerWorker(this, clientSocket);\n //Adding worker to workerlist\n workerList.add(worker);\n //Starting thread worker\n worker.start();\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void connect(int threadNumber, int handlerID) {\n\t}", "public void run()\n {\n Utilities.debugLine(\"WebServer.run(): Runing Web Server\", DEBUG);\n\n running = true;\n\n ServerSocketConnection ssc;\n try\n {\n ssc = (ServerSocketConnection) Connector.open(\"socket://:\" + PORT);\n\n do\n {\n Utilities.debugLine(\"WebServer.run(): Socket Opened, Waiting for Connection...\", DEBUG);\n SocketConnection sc = null;\n sc = (SocketConnection) ssc.acceptAndOpen();\n Thread t = new Thread(new ConnectionHandler(sc));\n t.setPriority(Thread.MIN_PRIORITY);\n t.start();\n\n//--------------------------------------- DEBUG THREAD NUMBER ---------------------------------\n try\n {\n System.out.println(\"Active Threads: \" + Thread.activeCount());\n }\n catch (Exception e)\n {\n System.out.println(\"There was an eror getting the thread count.\");\n }\n//--------------------------------------- DEBUG THREAD NUMBER ---------------------------------\n\n }\n while (running);\n ssc.close();\n }\n\n catch (Exception e)\n {\n Utilities.debugLine(e.toString() + e.getMessage(), true);\n }\n }", "public void run() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"accepting new connection\");\n\t\t\t\tSocket clientSocket = this.serverSocket.accept();\n\t\t\t\tSystem.out.println(\"this.base: \" + this.base.toString());\n\t\t\t\tConnection connection = new Connection(clientSocket,this.base, new HTTP());\n\t\t\t\tthis.fixedThreadPool.execute(connection);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tthis.serverSocket.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void connect() {\n\n if (reader == null) {\n reader = new ReadFromGo(this);\n readerThread = new Thread(reader);\n readerThread.start();\n } else {\n System.out.println(\"stopGoProcess()\");\n if (readerThread != null) {\n reader.stop();\n readerThread.interrupt();\n reader = new ReadFromGo(this);\n readerThread = new Thread(reader);\n readerThread.start();\n System.out.println(\"Thread interrupted and started\");\n }\n }\n }", "public void run() {\r\n PooledConnection pConn;\r\n do {\r\n while (needAddConnSize.get() > 0) {\r\n needAddConnSize.decrementAndGet();\r\n if (!waitQueue.isEmpty()) {\r\n try {\r\n if ((pConn = createPooledConn(CONNECTION_USING)) != null)\r\n recycle(pConn);\r\n } catch (Throwable e) {\r\n if (e instanceof SQLException) {\r\n transferException((SQLException) e);\r\n } else {\r\n transferException(new SQLException(e));\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (needAddConnSize.get() == 0 && createConnThreadState.compareAndSet(THREAD_WORKING, THREAD_WAITING))\r\n park(this);\r\n if (createConnThreadState.get() == THREAD_DEAD) break;\r\n } while (true);\r\n }", "@Override\n public void run()\n {\n log(\"STARTED\");\n\n try\n {\n FileInputStream keystoreStream = new FileInputStream(keystoreFile);\n KeyStore keyStore = KeyStore.getInstance(\"JKS\");\n keyStore.load(keystoreStream, keystorePassword.toCharArray());\n CloseableUtil.close(keystoreStream);\n\n KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());\n kmf.init(keyStore, keystorePassword.toCharArray());\n\n TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());\n tmf.init(keyStore);\n\n SSLContext sslContext = SSLContext.getInstance(\"TLS\");\n sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), new SecureRandom());\n\n SSLServerSocketFactory ssf = sslContext.getServerSocketFactory();\n sslServer = (SSLServerSocket) ssf.createServerSocket(PORT);\n }\n catch (Exception e)\n {\n log(\"Exception caught. Message: \" + e.getMessage());\n }\n\n // Start a new thread for handling a client that connects\n try\n {\n log(\"Accepting new client connections...\");\n while (!isInterrupted())\n {\n SSLSocket connection = (SSLSocket) sslServer.accept();\n log(\"A new client connected: \" + connection.getInetAddress());\n new CAClientConnection(connection, callback, keystorePassword).start();\n }\n }\n catch (Exception e)\n {\n if (!e.getMessage().equals(\"socket closed\"))\n {\n log(\"Exception caught. Message: \" + e.getMessage());\n e.printStackTrace();\n }\n }\n }", "@Override\n public void run() {\n String id = (identifier != \"\") ? identifier : socket.getInetAddress().toString();\n\n LOGGER.info(\"Got connection from \" + id + \".\");\n peerInput = new PeerInput(socket);\n peerInput.start();\n peerOutput = new PeerOutput(socket);\n initialized = true;\n LOGGER.info(\"Initialized connection \" + id);\n peerOutput.run();\n }", "@Override\n\tpublic void run() {\n\t\tSocket connect_port = null;\n\t\twhile (true) {\t\t\t\n\t\t\ttry {\n\t\t\t\tconnect_port = this.listen_port.accept();\n\t\t\t\tRequest req = new Request(connect_port);\n\t\t\t\tthis.pool.submit(req);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n int server_port = Integer.parseInt(gui.getServerPort_Text().getText());\n gui.getServerPort_Text().setEnabled(false);\n String server_ip = gui.getServerIP_Text().getText();\n gui.getServerIP_Text().setEnabled(false);\n obtainId(server_ip, server_port);\n lbInfo = new ConnectionInfo(lb_ip, lb_port, 3);\n\n if (connection.startServer(server_port)) {\n connectionHandler = new ServerConnections(connection, lbInfo, requestsAnswered, processingRequests, gui.getCompleted_Text(), gui.getProcessing_Text());\n new Thread(connectionHandler).start();\n\n requestServerId();\n scheduler.scheduleAtFixedRate(heartbeat, 10, 10, TimeUnit.SECONDS);\n } else {\n gui.getLBPort_Text().setEnabled(true);\n gui.getLBIP_Text().setEnabled(true);\n gui.getServerPort_Text().setEnabled(true);\n gui.getServerIP_Text().setEnabled(true);\n gui.getButton_Connect().setEnabled(true);\n }\n }", "void tryConnection(String mac)\n {\n if (outstanding_connect != null || open_connection != null) {\n return;\n }\n \n Log.d(Constants.LOG_TAG, \"Attempting to connect to \" + mac);\n \n BluetoothDevice dev = bt_adapter.getRemoteDevice(mac);\n outstanding_connect = new ConnectThread(dev, handler);\n outstanding_connect.start();\n \n }", "public void run() {\n try {\n // accepts the connection request.\n SelectableChannel peerHandle = this._handle.accept();\n if (peerHandle != null) {\n // now, create a service handler object to serve the\n // the client.\n ServiceHandler handler =\n this._factory.createServiceHandler(\n this._reactor,\n peerHandle);\n if (handler != null)\n // give the service handler object a chance to initialize itself.\n handler.open();\n }\n } catch (IOException ex) {\n MDMS.ERROR(ex.getMessage());\n }\n }", "private void runServer() {\n while(true) {\n // This is a blocking call and waits until a new client is connected.\n Socket clientSocket = waitForClientConnection();\n handleClientInNewThread(clientSocket);\n } \n }", "public void run() {\n Log.d(\"bluetooth\", \"entrou na thread bluetoothconnect\");\n while (true) {\n try {if(mmServerSocket != null)\n socket = mmServerSocket.accept();\n\n\n } catch (IOException e) {\n break;\n }\n // If a connection was accepted\n if (socket != null) {\n // Do work to manage the connection (in a separate thread)\n //Server server = new Server(socket);\n Log.d(\"bluetooth\", \"socket não está mais null oba\");\n\n if(socket.isConnected()){\n tts.speak(\"Device connected\");\n\n }\n // Server server = new Server(socket);\n //server.initialize(handler);\n //mmServerSocket.close();\n\n\n break;\n }\n }\n }", "private void createAndStartReconnectionThread() {\n reconnectionThread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.sleep(waitTimeBeforeReconnection);\n\n synchronized (globalLock) {\n if (isRunning) {\n webSocketConnection = new WebSocketConnection();\n createAndStartConnectionThread();\n }\n }\n } catch (InterruptedException e) {\n // Expected behavior when the WebSocket connection is closed\n }\n }\n });\n reconnectionThread.start();\n }", "public void run()\n\t{\n\t\tSystem.out.println(\"Connection established: \" + clientSocket);\n\t\tThread messageThread; // start a new Thread on TCPReceiver to receive messages through clientSocket.\n\t\ttry \n\t\t{\n\t\t\tmessageThread = new Thread(new TCPNodeReceiver(clientSocket, messagingNode), \"tcpReceiverThread\"); // pass a copy of the MessagingNode to TCPNodeReceiver.\n\t\t\tmessageThread.start(); // start receiving messages.\t\t\t\t\t\n\t\t} \n\t\tcatch (IOException e) {\n\t\t\tSystem.err.println(\"messagingNodeThread got error: \" + e.getMessage());\n\t\t} \n\t}", "@Override\n public void run()\n {\n lock = new Lock();\n messenger = new Messenger(notifier);\n clientList = new ClientList(notifier, messenger, connectionLimit);\n publisher = new Publisher(lock, clientList);\n\n try\n {\n notifier.sendToConsole(\"Server Started\");\n LOGGER.info(\"Server Started\");\n\n // Set up networking\n socketFactory = (SSLServerSocketFactory) SSLServerSocketFactory\n .getDefault();\n serverSocket = (SSLServerSocket) socketFactory\n .createServerSocket(port);\n serverSocket.setEnabledCipherSuites(enabledCipherSuites);\n\n int idCounter = 1;\n\n // Now repeatedly listen for connections\n while (true)\n {\n // Blocks whilst waiting for an incoming connection\n socket = (SSLSocket) serverSocket.accept();\n\n conn = new ClientConnection(socket, idCounter, notifier, lock,\n publisher, clientList, password);\n new Thread((Runnable) conn).start();\n\n LOGGER.info(\"Someone connected: \" + idCounter);\n idCounter++;\n }\n\n } catch (final SocketException e)\n {\n LOGGER.severe(\"Socket Exception: Server closed?\");\n notifier.sendToConsole(\"Server Stopped\");\n } catch (final IOException e)\n {\n LOGGER.severe(e.getMessage());\n notifier.sendError(e);\n } finally\n {\n kill();\n }\n }", "public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}", "public void startServer() throws Exception\n {\n\t\t\tString SERVERPORT = \"ServerPort\";\n\t\t\tint serverport = Integer.parseInt(ConfigurationManager.getConfig(SERVERPORT));\n\t\t\t\n \n Srvrsckt=new ServerSocket ( serverport );\n while ( true )\n {\n Sckt =Srvrsckt.accept();\n new Thread ( new ConnectionHandler ( Sckt ) ).start();\n }\n \n \n\n\n }", "private void setUpConnection(final String IP_ADDR, final int portNumber) {\n\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n try {\n\n // Not thread safe (Destroy could be calling close at the same time)\n socket.connect((new InetSocketAddress(\n InetAddress.getByName(IP_ADDR), portNumber)));\n Log.d(TAG, \"Connection Successfull\");\n\n } catch (UnknownHostException e) {\n Log.e(TAG, \"Connection Failed\");\n e.printStackTrace();\n } catch (IOException e) {\n Log.e(TAG, \"Connection Failed\");\n e.printStackTrace();\n }\n }\n };\n\n connectionThread = new Thread(runnable);\n connectionThread.start();\n\t}", "public void run() {\n mBluetoothAdapter.cancelDiscovery();\n boolean success = false;\n try {\n\n // Connect the device through the socket. This will block\n // until it succeeds or throws an exception\n\n if(!mmSocket.isConnected()) {\n mmSocket.connect();\n success = true;\n }\n } catch (IOException e) {\n\n }\n\n if(mmSocket!=null){\n MainActivity.this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n Toast.makeText(MainActivity.this, \"successful\", Toast.LENGTH_SHORT).show();\n\n }\n });\n\n // Do work to manage the connection (in a separate thread)\n manageConnectedSocket(mmSocket);\n }\n }", "private void connect(InProgInfo inProg, int serverSelect) throws InterruptedException\n {\n String hostName = new String(seqMcastInfo.streamingMCastChanServerList().get(serverSelect).data().array());\n String portNumber = seqMcastInfo.streamingMCastChanPortList().get(serverSelect).toString();\n String interfaceName = CommandLine.value(\"rtif\");\n \n System.out.println(\"Starting connection to Real Time Session...\");\n \n channelSessions.add(new EDFChannelSession(this));\n if (channelSessions.get(channelSessions.size() - 1).initTransport(false, error) < CodecReturnCodes.SUCCESS)\n System.exit(error.errorId());\n\n // enable XML tracing\n if (CommandLine.booleanValue(\"x\"))\n {\n channelSessions.get(channelSessions.size() - 1).enableXmlTrace(dictionaryHandler.dictionary());\n }\n\n // get connect options from the channel session\n ConnectOptions copts = channelSessions.get(channelSessions.size() - 1).getConnectOptions();\n\n // set the connection parameters on the connect options\n copts.unifiedNetworkInfo().address(hostName);\n copts.unifiedNetworkInfo().serviceName(portNumber);\n copts.unifiedNetworkInfo().interfaceName(interfaceName);\n copts.blocking(false);\n copts.connectionType(ConnectionTypes.SEQUENCED_MCAST);\n\n channelSessions.get(channelSessions.size() - 1).connect(inProg, error);\n \n channelSessions.get(channelSessions.size() - 1).channelInfo().connectOptions(copts);\n\n serversConnectedTo.add(serverSelect);\n }", "private void setUpServerThread() {\n\t\ttry {\n\t\t\tthis.incomingMsgNodes = new TCPServerThread(0, this);\n\t\t\tThread thread = new Thread(incomingMsgNodes);\n\t\t\tthread.start();\n\t\t\tthis.myServerThreadPortNum = incomingMsgNodes.getPort();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble creating Server Socket\");\n\t\t}\n\t}", "private void start_Connexion()throws UnknownHostException, IOException{\n \tsocket = new Socket(IP,num_Socket);\n \tout = new ObjectOutputStream(socket.getOutputStream());\n \tin = new ObjectInputStream(socket.getInputStream());\n \t\n }", "@Override\n\tpublic void run() {\n\t\tif (FrameworkHandler.DEBUG_MODE){\n\t\t\tString strType = \"\";\n\t\t\tif (type == RULE_CONNECTION) strType = \"New RemoteRule Listener\";\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(strType + \" LISTENING on port: \" + listeningSocket.getLocalPort());\n\t\t}\n\t\ttry {\n\t\t\twhile (running) {\n\t\t\t\tSocket newSocket = listeningSocket.accept();\n\t\t\t\t\n\t\t\t\tif (FrameworkHandler.DEBUG_MODE)\n\t\t\t\t\tSystem.out.println(\"New request obtained on \" + newSocket.getPort() + \"|\" + newSocket.getLocalPort());\n\t\t\t\t\n\t\t\t\tcreateNewConnection(newSocket);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tFrameworkHandler.exceptionLog(FrameworkHandler.LOG_ERROR, this, e);\n\t\t}\n\t}", "final public void openConnection() throws IOException {\n // Do not do anything if the connection is already open\n if (isConnected())\n return;\n\n // Create the sockets and the data streams\n try {\n clientSocket = new Socket(host, port);\n output = new DataOutputStream(clientSocket.getOutputStream());\n // input =\n // new BufferedReader(new InputStreamReader(clientSocket.getInputStream(), \"Big5_HKSCS\"));\n input = new DataInputStream(clientSocket.getInputStream());\n } catch (IOException ex)\n // All three of the above must be closed when there is a failure\n // to create any of them\n {\n try {\n closeAll();\n } catch (Exception exc) {\n }\n\n throw ex; // Rethrow the exception.\n }\n\n clientReader = new Thread(this); // Create the data reader thread\n readyToStop = false;\n clientReader.start(); // Start the thread\n }", "@Override\r\n\tpublic void start() {\n\t\tscavenger.start();\r\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\twhile (!serverSocket.isClosed()) {\r\n\t\t\t\t\tSocket socket = null;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsocket = serverSocket.accept();\r\n\t\t\t\t\t\tscavenger.addSocket(socket);\r\n\t\t\t\t\t\tnew SynchronousSocketThread(socket).start();\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\t}", "private void openConnection () {\n String[] labels = {\"Host :\", \"Port :\"};\n String[] initialValues = {\"localhost\", \"1111\"};\n StandardDialogClient openHandler = new StandardDialogClient () {\n\t@Override\n\tpublic void dialogDismissed (StandardDialog d, int code) {\n\t try {\n\t InputDialog inputD = (InputDialog)d;\n\t if (inputD.wasCancelled ()) return;\n\t String[] results = inputD.getResults ();\n\t String host = results[0];\n\t String port = results[1];\n\t TwGateway connection =\n\t (TwGateway)TwGateway.openConnection (host, port);\n\t // The following call will fail if the G2 is secure.\n\t connection.login();\n\t setConnection (connection);\n\t } catch (Exception e) {\n\t new WarningDialog (null, \"Error During Connect\", true, e.toString (), null).setVisible (true);\n\t }\n\t}\n };\t \n\n new ConnectionInputDialog (getCurrentFrame (), \"Open Connection\",\n\t\t\t\t true, labels, initialValues,\n\t\t\t\t (StandardDialogClient) openHandler).setVisible (true);\n }", "public void startConnection(){\n startBTConnection(mBTDevice,MY_UUID_INSECURE);\n }", "public void initMultiPlayer() {\r\n\t\tnew ConnectThread().start();\r\n\t}", "private void connect(InProgInfo inProg, String address, String port, String interfaceName) throws InterruptedException\n {\n \n System.out.println(\"Starting connection to Real Time Session...\");\n \n channelSessions.add(new EDFChannelSession());\n if (channelSessions.get(channelSessions.size() - 1).initTransport(false, error) < CodecReturnCodes.SUCCESS)\n System.exit(error.errorId());\n\n // enable XML tracing\n if (CommandLine.booleanValue(\"x\"))\n {\n channelSessions.get(channelSessions.size() - 1).enableXmlTrace(dictionaryHandler.dictionary());\n }\n\n // get connect options from the channel session\n ConnectOptions copts = channelSessions.get(channelSessions.size() - 1).getConnectOptions();\n\n // set the connection parameters on the connect options\n copts.unifiedNetworkInfo().address(address);\n copts.unifiedNetworkInfo().serviceName(port);\n copts.unifiedNetworkInfo().interfaceName(interfaceName);\n copts.blocking(false);\n copts.connectionType(ConnectionTypes.SEQUENCED_MCAST);\n\n channelSessions.get(channelSessions.size() - 1).connect(inProg, error);\n }", "public void connect() {\n synchronized (globalLock) {\n if (isRunning) {\n throw new IllegalStateException(\"WebSocketClient is not reusable\");\n }\n\n this.isRunning = true;\n createAndStartConnectionThread();\n }\n }", "public void start() {\n threadPoolExecutor.setCorePoolSize(configurations.threadPoolSize());\n new Thread(this::startServer).start();\n }", "public void run(){\r\n\t\tsynchronized(this){\r\n\t\t\tObjectServer db4oServer = Db4o.openServer(FILE, PORT);\r\n\t\t\tdb4oServer.grantAccess(USER, PASS);\r\n\t\t\t\r\n\t\t\t// Using the messaging functionality to redirect all\r\n\t\t\t// messages to this.processMessage\r\n\t\t\tdb4oServer.ext().configure().clientServer().setMessageRecipient(this);\r\n\t\t\t\r\n\t\t\t// to identify the thread in a debugger\r\n\t\t\tThread.currentThread().setName(this.getClass().getName());\r\n\t\t\t\r\n\t\t\t// We only need low priority since the db4o server has\r\n\t\t\t// it's own thread.\r\n\t\t\tThread.currentThread().setPriority(Thread.MIN_PRIORITY);\r\n\t\t\ttry {\r\n\t\t\t\t\tif(! stop){\r\n\t\t\t\t\t\t// wait forever for notify() from close()\r\n\t\t\t\t\t\tthis.wait(Long.MAX_VALUE); \r\n\t\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tdb4oServer.close();\r\n\t\t}\r\n\t}", "@Override\r\n public Object connect() {\n if(status()){\r\n //creates thread that checks messages in the network\r\n System.out.println(\"notifying network that connection is good\");\r\n notifyObservers(this);\r\n }\r\n return socket;\r\n }", "private synchronized void openConnection() {\n\t\tsendData = new Thread(){\n\t\t\tpublic void run(){\n\t\t\t\tsynchronized(msgs){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmsgs.wait(1000);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(true){\n\t\t\t\t\tsynchronized(msgs){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tif(msgs.size() > 0){\n\t\t\t\t\t\t\t\tout = new PrintWriter(new PrintWriter(s.getOutputStream()));\n\t\t\t\t\t\t\t\tString temp = msgs.get(0);\n\t\t\t\t\t\t\t\tout.println(temp);\n\t\t\t\t\t\t\t\tout.flush();\n\t\t\t\t\t\t\t\tSystem.out.println(temp);\n\t\t\t\t\t\t\t\tmsgs.remove(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}catch(IOException e){\n\t\t\t\t\t\t\te.printStackTrace();\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\treceiveData = new Thread(){\n\t\t\tpublic void run(){\n\t\t\t\tString received;\n\t\t\t\tdo{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tin = new BufferedReader(new InputStreamReader(s.getInputStream()));\n\t\t\t\t\t\treceived = in.readLine();\n\t\t\t\t\t\tparseMessageReceived(received);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}while(true);\n\t\t\t}\n\t\t};\n\t\tsendData.setDaemon(true);\n\t\treceiveData.setDaemon(true);\n\t\tsendData.start();\n\t\treceiveData.start();\n\t\tnew Thread()\n\t\t{\n\t\t\tpublic void run(){\n\t\t\t\twhile(true){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsendData.join();\n\t\t\t\t\t\treceiveData.join();\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\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}\n\t\t\t}\n\t\t}.start();\n\t}", "public void startListeningForConnection() {\n startInsecureListeningThread();\n }", "public void run(){\r\n\t\tsynchronized(this){\r\n\t\t\tObjectServer db4oServer = Db4o.openServer(getDbDirectory() + FILE, PORT);\r\n\t\t\tdb4oServer.grantAccess(USER, PASS);\r\n\r\n\t\t\t// Using the messaging functionality to redirect all\r\n\t\t\t// messages to this.processMessage\r\n\t\t\tdb4oServer.ext().configure().clientServer().setMessageRecipient(this);\r\n\r\n\t\t\t// to identify the thread in a debugger\r\n\t\t\tThread.currentThread().setName(this.getClass().getName());\r\n\r\n\t\t\t// We only need low priority since the db4o server has\r\n\t\t\t// it's own thread.\r\n\t\t\tThread.currentThread().setPriority(Thread.MIN_PRIORITY);\r\n\t\t\ttry {\r\n\t\t\t\t\tif(! stop){\r\n\t\t\t\t\t\t// wait forever for notify() from close()\r\n\t\t\t\t\t\tthis.wait(Long.MAX_VALUE);\r\n\t\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tdb4oServer.close();\r\n\t\t}\r\n\t}" ]
[ "0.79512465", "0.7485519", "0.7470632", "0.7151249", "0.70661795", "0.70661795", "0.6974097", "0.6933514", "0.69333357", "0.68852353", "0.6872176", "0.67596483", "0.6751662", "0.67057276", "0.668747", "0.6656996", "0.6630814", "0.6628593", "0.6626948", "0.6610193", "0.65840155", "0.6573833", "0.65319353", "0.6521194", "0.6504375", "0.6500714", "0.64938194", "0.6491227", "0.64896494", "0.64866364", "0.6483357", "0.6479959", "0.6456137", "0.6444164", "0.64276093", "0.642663", "0.64254034", "0.6424409", "0.6416479", "0.64089257", "0.636112", "0.63455933", "0.63440883", "0.63397044", "0.6330829", "0.6313936", "0.6293833", "0.6289176", "0.6281448", "0.6268548", "0.6268394", "0.62655437", "0.6253163", "0.62492126", "0.62324333", "0.62210095", "0.6216712", "0.6210945", "0.6205178", "0.62029004", "0.6200227", "0.6185791", "0.61790055", "0.6178532", "0.6171506", "0.6165963", "0.6161496", "0.6160817", "0.6154838", "0.6153807", "0.6149617", "0.6148661", "0.61405224", "0.6139699", "0.6136722", "0.6133621", "0.6129674", "0.6123712", "0.6120472", "0.61103386", "0.609742", "0.6093534", "0.60805565", "0.6071034", "0.6069101", "0.6063555", "0.6063272", "0.60630935", "0.60583794", "0.60513574", "0.6051026", "0.60494834", "0.6043983", "0.6040364", "0.60402995", "0.6037493", "0.60365593", "0.60317236", "0.6028862", "0.6020931", "0.60142666" ]
0.0
-1
Sends the employees array to the emulator application
private void writeListIdEmployee() { try { ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream()); out.writeObject(controller.GetListIdEmployee()); out.flush(); out.close(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setEmployees(Employee[] employees) {\n\t\tthis.employees = employees;\n\t}", "private void doViewAllEmployees() {\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"***Hors Management System:: System Administration:: View All Staffs\");\n\n List<Employee> employees = employeeControllerRemote.retrieveAllEmployees();\n\n employees.forEach((employee) -> {\n System.out.println(\"Employee ID: \" + employee.getEmployeeId() + \"First Name: \" + employee.getFirstName() + \"Last Name: \" + employee.getLastName() + \"Job Role: \" + employee.getJobRole().toString() + \"Username: \" + employee.getUserName() + \"Password: \" + employee.getPassword());\n });\n\n System.out.println(\"Press any key to continue...>\");\n sc.nextLine();\n }", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "public static void fillEmployees() {\n\t\tString name1;\n\t\tString name2;\n\t\tString name3;\n\t\tString name4;\n\t\tfor(int i=0;i<auxEmployees.length;i++) { //Va llenando de una en una las filas del array auxiliar de empleados (cada fila es una empresa) con nommbres aleatorios del array employees\n\t\t\tname1=\"\";\n\t\t\tname2=\"\";\n\t\t\tname3=\"\";\n\t\t\tname4=\"\";\n\t\t\twhile (name1.equals(name2) || name1.equals(name3) || name1.equals(name4) || name2.equals(name3) || name2.equals(name4) || name3.equals(name4)) { //Si los nombres son iguales vuelve a asignar nombres\n\t\t\t\tname1=employees[selector.nextInt(employees.length)];\n\t\t\t\tname2=employees[selector.nextInt(employees.length)];\n\t\t\t\tname3=employees[selector.nextInt(employees.length)];\n\t\t\t\tname4=employees[selector.nextInt(employees.length)];\n\t\t\t}\n\t\t\tauxEmployees[i][0]=name1;\n\t\t\tauxEmployees[i][1]=name2;\n\t\t\tauxEmployees[i][2]=name3;\n\t\t\tauxEmployees[i][3]=name4;\n\t\t}\n\t}", "private void writeData(Employee[] employees, DataOutput out) throws IOException {\n // write number of employees\n out.writeInt(employees.length);\n\n for (Employee e : employees) {\n out.writeInt(e.getName().length());\n out.writeChars(e.getName());\n out.writeInt(e.getHireDay().toString().length());\n out.writeChars(e.getHireDay().toString());\n out.writeDouble(e.getSalary());\n }\n }", "public void setEmployees(ArrayList<Employee> employees) { \r\n this.employees = employees;\r\n }", "public Manager(Employee[] employees) {\n\t\tsuper();\n\t\tthis.employees = employees;\n\t}", "public static void showEmployees(RequestHandler handler) {\n\t\tStringBuilder sb;\n\t\tsb = new StringBuilder();\n\t\tsb.append(\"\\nDisplaying all employees:\");\n\t\thandler.sendMessage(sb.toString());\n\t\tfor (Employee e : EmployeeData.getEmployees()) {\n\t\t\tshowEmployee(handler, e);\n\t\t}\n\t\thandler.sendMessage(new StringBuilder(\"Finished Displaying Employees\"));\n\t}", "public static void main(String[] args) {\n System.out.println(\"How many employees would you like to type numbers for?\");\n Scanner emp_id_in = new Scanner(System.in);\n int emp_in = emp_id_in.nextInt();\n Employee EmployeeArr[] = new Employee[emp_in]; // should be size of the scanned input\n for (int i = 0; i < EmployeeArr.length; i++) {\n // Employee number\n System.out.println(\"Please enter the employees ID number(Enter a number from 0 to 999999)\");\n Scanner emp_id_scanner = new Scanner(System.in);\n int emp_id = emp_id_scanner.nextInt();\n // First\n System.out.println(\"Please enter the employees first name:\");\n Scanner first_name_scanner = new Scanner(System.in);\n String first_name = first_name_scanner.nextLine();\n // Last\n System.out.println(\"Please enter the employees last name:\");\n Scanner last_name_scanner = new Scanner(System.in);\n String last_name = last_name_scanner.nextLine();\n // Push entries into Name class\n Name name_obj = new Name();\n name_obj.get_employee_name(emp_id, first_name, last_name);\n //Street\n System.out.println(\"Please enter the employee's street name: \");\n Scanner street_name_scanner = new Scanner(System.in);\n String street_name = street_name_scanner.nextLine();\n // City\n System.out.println(\"Please enter the employee's city: \");\n Scanner city_name_scanner = new Scanner(System.in);\n String city_name = city_name_scanner.nextLine();\n // State\n System.out.println(\"Please enter the employee's state: \");\n Scanner state_name_scanner = new Scanner(System.in);\n String state_name = state_name_scanner.nextLine();\n System.out.println(\">>>>>>>>>>\" + state_name.split(\"\").length);\n // Zip\n System.out.println(\"Please enter the employee's zip code\");\n Scanner zip_code_scanner = new Scanner(System.in);\n int zip_code = zip_code_scanner.nextInt();\n // Push entries into Address class\n Address address_obj = new Address();\n address_obj.get_address_data(street_name, city_name, state_name, zip_code);\n // hire month\n System.out.println(\"Please enter the month the employee was hired(Eg. 1,2,3,... etc): \");\n Scanner month_scanner = new Scanner(System.in);\n int month = month_scanner.nextInt();\n // hire day\n System.out.println(\"Please enter the day the employee was hired(Eg. 1,2,3,... etc): \");\n Scanner day_scanner = new Scanner(System.in);\n int day = day_scanner.nextInt();\n // hire year\n System.out.println(\"Please enter the year the employee was hired: \");\n Scanner year_scanner = new Scanner(System.in);\n int year = year_scanner.nextInt();\n // Push data into Date class\n Date date_obj = new Date();\n date_obj.get_date_data(month, day, year);\n // Push data into employee class\n EmployeeArr[i] = new Employee();\n EmployeeArr[i].get_employee_information(name_obj.employee_number, name_obj.employee_first, name_obj.employee_last, address_obj.street, address_obj.zip_code,\n address_obj.city, address_obj.state, date_obj.hire_month, date_obj.hire_day, date_obj.hire_year);\n\n }\n // Show the data\n for (int j = 0; j < EmployeeArr.length; j++) {\n EmployeeArr[j].show_dat();\n }\n }", "public void setEmployees(int _employees){\n employees = _employees;\n }", "public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public String getEmployees(){\n return employees;\n }", "public Employee[] getEmployeesList() {\n\t\treturn employees;\n\t}", "public static void printEmployeeArray(CreateUser[] arr){\n\n for (int i=0; i < arr.length; i++){\n System.out.println(\"User:\");\n System.out.println(arr[i]); // name\n }\n\n }", "public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"[email protected]\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"[email protected]\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }", "@Test\n\tpublic void testingMultipleEmployees() {\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tthis.sendingKeys();\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\n\t\tdriver.findElement(By.id(\"sn_staff\")).click();\n\t\tdriver.findElement(By.id(\"act_primary\")).click();\n\t\t\n\t\tint beforeAdd = driver.findElements(By.tagName(\"a\")).size();\n\t\t\n\t\tdriver.findElement(By.id(\"_asf1\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl1\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase1\")).sendKeys(\"[email protected]\");\n\t\t\n\t\tdriver.findElement(By.id(\"_asf2\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl2\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase2\")).sendKeys(\"[email protected]\");\n\t\t\n\t\tdriver.findElement(By.id(\"_as_save_multiple\")).click();\n\t\t\n\t\tint afterAdd = driver.findElements(By.tagName(\"a\")).size();\n\t\t\n\t\tint newAdded = beforeAdd - afterAdd;\n\t\t\n\t\tassertEquals(2, newAdded);\n\t\t\n\t}", "public List<Employee> getAllEmployees(){\n\t\tFaker faker = new Faker();\n\t\tList<Employee> employeeList = new ArrayList<Employee>();\n\t\tfor(int i=101; i<=110; i++) {\n\t\t\tEmployee myEmployee = new Employee();\n\t\t\tmyEmployee.setId(i);\n\t\t\tmyEmployee.setName(faker.name().fullName());\n\t\t\tmyEmployee.setMobile(faker.phoneNumber().cellPhone());\n\t\t\tmyEmployee.setAddress(faker.address().streetAddress());\n\t\t\tmyEmployee.setCompanyLogo(faker.company().logo());\n\t\t\temployeeList.add(myEmployee);\n\t\t}\n\t\treturn employeeList;\n\t}", "@Override\n\tpublic void getAllEmployee() {\n\t\t\n\t}", "public void updateEmployees(List<Employe> employees) {\n\t\t\n\t}", "@Override\n public String toString() {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < employees.length; i++) {\n result.append(employees[i] + \"\\n\");\n }\n return result.toString();\n }", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n }", "public static void main (String[] args){\n Empleado[] listaEmpleados = new Empleado[10];\n \n //Asignamos objetos a cada posición\n listaEmpleados[0] = new Empleado(\"Manuel\", \"30965835V\");\n listaEmpleados[1] = new Empleado(\"Miguel\", \"30965835V\");\n listaEmpleados[2] = new Empleado(\"Pedro\", \"30965835V\");\n listaEmpleados[3] = new Empleado(\"Samuel\", \"30965835V\");\n listaEmpleados[4] = new Empleado(\"Vanesa\", \"30965835V\");\n listaEmpleados[5] = new Empleado(\"Alberto\", \"30965835V\");\n listaEmpleados[6] = new Empleado(\"Roberto\", \"30965835V\");\n listaEmpleados[7] = new Empleado(\"Carlos\", \"30965835V\");\n listaEmpleados[8] = new Empleado(\"Ernesto\", \"30965835V\");\n listaEmpleados[9] = new Empleado(\"Javier\", \"30965835V\");\n\n /*Empleado[] empleados = {\n empleado1, empleado2, empleado3, null,null,null, null,\n null,null,null\n }*/\n \n //Imprimimos el array sin ordenar\n imprimeArrayPersona(listaEmpleados);\n \n //Creamos el objeto de la empresa\n Empresa empresa0 = new Empresa(\"Indra\", listaEmpleados);\n \n //Usamos la clase array para ordenar el array de mayor a menos\n Arrays.sort(listaEmpleados);\n\n //Imprimimos de nuevo el array\n imprimeArrayPersona(listaEmpleados);\n \n //Imprimimos la empresa\n System.out.println(empresa0);\n \n //Guardamos en un string la lista de nombres de un objeto empresa\n String listado = Empresa.listaEmpleado(empresa0.empleado).toString();\n \n System.out.println(listado);//Imprimimos el listado como un string\n \n //Imprimimos el array de los nombres de los empleados de la empresa\n System.out.println(Arrays.toString(Empresa.listaEmpleadoArray(listado)));\n \n //Método que imprime los empleados de una empresa separados por comas\n Empresa.listaEmpleado(listado);\n \n /*Empresa[] listaEmpresa = new Empresa[4];\n \n listaEmpresa[0] = new Empresa(\"Intel\", listaEmpleados);\n listaEmpresa[1] = new Empresa(\"AMD\", listaEmpleados);\n listaEmpresa[2] = new Empresa(\"Asus\", listaEmpleados);\n listaEmpresa[3] = new Empresa(\"Shaphire\", listaEmpleados);\n System.out.println(Arrays.toString(listaEmpresa));\n Arrays.sort(listaEmpresa);\n System.out.println(Arrays.toString(listaEmpresa));*/\n \n \n }", "public void listEmployees() {\n\t\tSession session = factory.openSession();\n\t\tTransaction transaction = null;\n\t\ttry {\n\t\t\ttransaction = session.beginTransaction();\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tList employees = session.createQuery(\"FROM Employee\").list();\n\t\t\tfor (@SuppressWarnings(\"rawtypes\")\n\t\t\tIterator iterator = employees.iterator(); iterator.hasNext();) {\n\t\t\t\tEmployee employee = (Employee) iterator.next();\n\t\t\t\tSystem.out.print(\"First Name: \" + employee.getFirstName());\n\t\t\t\tSystem.out.print(\" Last Name: \" + employee.getLastName());\n\t\t\t\tSystem.out.println(\" Salary: \" + employee.getSalary());\n\t\t\t}\n\t\t\ttransaction.commit();\n\t\t} catch (HibernateException e) {\n\t\t\tif (transaction != null)\n\t\t\t\ttransaction.rollback();\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t}", "@GetMapping(value=\"/searchEmpData\")\n\tpublic List<Employee> getAllEmployees()\n\t{\n\t\treturn this.integrationClient.getAllEmployees();\n\t}", "public Manager(Employee[] employees, String name, String jobTitle, int level, String dept) {\n\t\tsuper(name, jobTitle, level, dept);\n\t\tthis.employees = employees;\n\t}", "public static void work(Employee [] employee) {\n\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\tif (employee[i+1].isAdminOrNot()) { //Administrative\n\t\t\t\tObject[] options = {\"Rent a Vehicle\", \"Return a Vehicle\", \"Rental Customer Info.\", \"Sales Info.\"\n\t\t\t\t\t\t, \"Employee Info.\", \"Vehicle Info.\", \"Exit\"};\n\t\t\t\tdo {\n\t\t\t\t\tswitch (JOptionPane.showOptionDialog(null, \"Please select one of the menus\", \n\t\t\t\t\t\t\t\"Administrative user\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, \n\t\t\t\t\t\t\tnull, options, options[0])) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Rent a Vehicle\");\n\t\t\t\t\t\t\t\trentVehicle(employee[i]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Return a Vehicle\");\n\t\t\t\t\t\t\t\treturnVehicle(employee, employee[i]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Customer Information\");\n\t\t\t\t\t\t\t\tprintCustomerInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Sales Information\");\n\t\t\t\t\t\t\t\tgetSalesInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Employee Information\");\n\t\t\t\t\t\t\t\tgetEmployeeInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Vehicle Information\");\n\t\t\t\t\t\t\t\tgetVehicleInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Now you are exiting this program.\");\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\tdefault: JOptionPane.showMessageDialog(null, \"Error\");\n\t\t\t\t\t}\n\t\t\t\t} while(true);\n\t\t\t} else { //Regular\n\t\t\t\tObject[] options = {\"Rent a Vehicle\", \"Return a Vehicle\", \"Enter Customer Information\"};\n\t\t\t\tdo {\n\t\t\t\t\tswitch (JOptionPane.showOptionDialog(null, \"Please select one of the menus\", \n\t\t\t\t\t\t\t\"Regular user\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, \n\t\t\t\t\t\t\tnull, options, options[0])) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Enter Customer Information\");\n\t\t\t\t\t\t\t\tprintCustomerInformation(employee);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Return a Vehicle\");\n\t\t\t\t\t\t\t\treturnVehicle(employee, employee[i]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Rent a Vehicle\");\n\t\t\t\t\t\t\t\trentVehicle(employee[i]);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Now you are exiting this program.\");\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} while(true);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) \n\t{\n\t\tint i = 0;\n\t\tint continuar = 0; \n\t\templeados = new Empleado[20];\n\t\ts = new Scanner(System.in);\n\t\t\n\t\twhile (continuar == 0)\n\t\t{\n\t\t\tString opc = \"\";\n\t\t\tSystem.out.println(\"Ingrese los datos del nuevo empleado: \");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"El empleado es un vendedor o un administrativo ?\");\n\t\t\tSystem.out.println(\"Ingrese una V o una A respectivamente\");\n\t\t\ts.nextLine();\n\t\t\topc = s.nextLine();\n\t\t\tif (opc.equals(\"V\") || opc.equals(\"v\"))\n\t\t\t{\n\t\t\t\tVendedor vend = new Vendedor();\n\t\t\t\tEmpresa.cargaVendedor(vend);\n\t\t\t\templeados[i] = vend;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAdministrativo admin = new Administrativo();\n\t\t\t\tEmpresa.cargaAdministrativo(admin);\n\t\t\t\templeados[i] = admin;\n\t\t\t}\n\t\t\ti++;\n\n\t\t\tdo\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Quiere seguir ingresando personas ?\");\n\t\t\t\tSystem.out.println(\"0-Si \");\n\t\t\t\tSystem.out.println(\"1-No\");\n\t\t\t\tcontinuar = Integer.parseInt(s.nextLine());\n\t\t\t}while (continuar != 0 && continuar != 1);\n\t\t\t\n\t\t\tEmpresa.mostrarDatos(i);\n\t\t}\n\t\t\n\t\t\n\t\ts.close();\n\t}", "public String[][] getVendorEmployeeData() {\r\n\t\tint p = 0;\r\n\t\tString [][] employees = new String[companyDirectory.size()][4];\r\n\t\tfor(int i = 0; i < companyDirectory.size(); i++) {\r\n\t\t\tif(companyDirectory.get(i) instanceof VendorCompany) {\r\n\t\t\t for(int j = 0; j < companyDirectory.get(i).getLocations().size();j++) {\r\n\t\t\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++ ) {\r\n\t\t\t\t\t employees[p][0] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getFirstName();\r\n\t\t\t\t\t employees[p][1] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getLastName();\r\n\t\t\t\t\t employees[p][2] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId();\r\n\t\t\t\t\t employees[p][3] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getEmail();\r\n\t\t\t\t\t p++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn employees;\r\n\t}", "public static void printEmployees() {\n List<Employee> employees = null;\n try {\n employees = employeeRepository.getAll(dataSource);\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n if (employees.isEmpty()) {\n System.out.println(\"\\n\" + resourceBundle.getString(\"empty.list\") + \"\\n\");\n LOGGER.warn(\"The list of employees is empty\");\n return;\n }\n System.out.println();\n employees.forEach(System.out::println);\n }", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n if (employeelistBuilder_ == null) {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n } else {\n return employeelistBuilder_.getMessage();\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tEmployee employees[] = new Employee[4];\n\n\t// Assign objects of Employee to employees declared above\n\t\t\n\t\tSystem.out.println(\"Enter the Date Of Report :\" );\n\t\tString dtReport = Console.readLine();\n\t\t\n\t//\tCreate an object of EmployeeReport\n\n\t// Invoke display() method by passing the employee array\n\t}", "public static List<Employee> getAllEmployees(){\n\t\t// Get the Datastore Service\n\t\tlog.severe(\"datastoremanager-\" + 366);\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tlog.severe(\"datastoremanager-\" + 368);\n\t\tQuery q = buildAQuery(null);\n\t\tlog.severe(\"datastoremanager-\" + 370);\n\t\t// Use PreparedQuery interface to retrieve results\n\t\tPreparedQuery pq = datastore.prepare(q);\n\t\tlog.severe(\"datastoremanager-\" + 373);\n\t\t//List for returning\n\t\tList<Employee> returnedList = new ArrayList<>();\n\t\tlog.severe(\"datastoremanager-\" + 376);\n\t\t//Loops through all results and add them to the returning list \n\t\tfor (Entity result : pq.asIterable()) {\n\t\t\tlog.severe(\"datastoremanager-\" + 379);\n\t\t\t//Vars to use\n\t\t\tString actualFirstName = null;\n\t\t\tString actualLastName = null;\n\t\t\tBoolean attendedHrTraining = null;\n\t\t\tDate hireDate = null;\n\t\t\tBlob blob = null;\n\t\t\tbyte[] photo = null;\n\t\t\t\n\t\t\t//Get results via the properties\n\t\t\ttry {\n\t\t\t\tactualFirstName = (String) result.getProperty(\"firstName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tactualLastName = (String) result.getProperty(\"lastName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tattendedHrTraining = (Boolean) result.getProperty(\"attendedHrTraining\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\thireDate = (Date) result.getProperty(\"hireDate\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tblob = (Blob) result.getProperty(\"picture\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tphoto = blob.getBytes();\n\t\t\t} catch (Exception e){}\n\t\t\tlog.severe(\"datastoremanager-\" + 387);\n\t\t\t\n\t\t\t//Build an employee (If conditionals for nulls)\n\t\t\tEmployee emp = new Employee();\n\t\t \temp.setFirstName((actualFirstName != null) ? actualFirstName : null);\n\t\t \temp.setLastName((actualLastName != null) ? actualLastName : null);\n\t\t \temp.setAttendedHrTraining((attendedHrTraining != null) ? attendedHrTraining : null);\n\t\t \temp.setHireDate((hireDate != null) ? hireDate : null);\n\t\t \temp.setPicture((photo != null) ? photo : null);\n\t\t \tlog.severe(\"datastoremanager-\" + 395);\n\t\t \treturnedList.add(emp);\n\t\t}\n\t\tlog.severe(\"datastoremanager-\" + 398);\n\t\treturn returnedList;\n\t}", "@Override\n public void demonstrate() throws IOException {\n try (var consoleInput = new Scanner(System.in);\n var out = new DataOutputStream(new FileOutputStream(\"employeeBinary.dat\"))) {\n Employee staff[] = readData(consoleInput, PromptUser.Yes);\n writeData(staff, out);\n } \n catch(Exception e) {\n \n }\n \n // retrieve all records into a new array\n try\n {\n Employee[] staff = readEmployees();\n printEmployees(staff);\n }\n catch (Exception e) {\n \n }\n }", "public static void EmployeeTest()\r\n\t{\n\t\t\tScanner getVar = new Scanner(System.in);\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\t\r\n\t\t\t//Arrays to hold final values.\r\n\t\t\tString[] employeeNameArr = new String[100];\r\n\t\t\tdouble[] employeeSalArr = new double[100];\r\n\t\t\t\r\n\t\t\t//Variable for user choice.\r\n\t\t\tint choice;\r\n\t\t\t\r\n\t\t\t//Loop the menu until exit.\r\n\t\t\twhile(true)\r\n\t\t\t{\r\n\t\t\t\t//Creating the menu.\r\n\t\t\t\tSystem.out.println(\"1. Create employee\\n2. Give Employee 10% Raise\\n3. Display Employees\\n4. Exit\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.print(\"Enter a choice: \");\r\n\t\t\t\tchoice = input.nextInt();\r\n\t\t\t\t\r\n\t\t\t\tswitch(choice)\r\n\t\t\t\t{\r\n\t\t\t\t/*CREATE EMPLOYEE: ASKS FOR USERS NAME AND MONTHLY SALARY\r\n\t\t\t\t \t\t\t\tCONVERTS THE MONTHLY SALARY TO YEARLY SALARY\r\n\t\t\t\t \t\t\t\tENSURES THAT THE EMPLOYEE IS PAYED.*/\r\n\t\t\t\tcase 1:\r\n\t\t\t\t{\r\n\t\t\t\t\t//Setting Employee's First Name\r\n\t\t\t\t\tSystem.out.print(\"Enter Employee's First Name: \");\r\n\t\t\t\t\tString fName = getVar.next();\r\n\t\t\t\t\tsetFirstName(fName);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Setting Employee's Last Name\r\n\t\t\t\t\tSystem.out.print(\"Enter Employee's Last Name: \");\r\n\t\t\t\t\tString lName = getVar.next();\r\n\t\t\t\t\tsetLastName(lName);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Setting Employee's Monthly Salary\r\n\t\t\t\t\twhile(true) {\r\n\t\t\t\t\t\tSystem.out.print(\"Enter the Employee's MONTHLY Salary: \");\r\n\t\t\t\t\t\tdouble createSal = getVar.nextDouble()*12;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//Making Sure the Employee is Paid Properly\r\n\t\t\t\t\t\tif(createSal<=0) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Invalid Salary\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tsetMonthlySalary(createSal);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//Pushes the names and values into an array.\r\n\t\t\t\t\t\t\tfor(int i = 0; i <= employeeNameArr.length; i++)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(employeeNameArr[i] == null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\temployeeNameArr[i] = getFirstName() + \" \" + getLastName();\r\n\t\t\t\t\t\t\t\t\temployeeSalArr[i] = getMonthlySalary();\r\n\t\t\t\t\t\t\t\t\tbreak;\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\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t/*GIVE EMPLOYES 10% RAISE: ADDS 10% TO THE MONTHLY SALARY\r\n\t\t\t\t \t\t\t\t\t\tALLOWS USER TO CHOOSE EMPLOYEE FROM LIST\r\n\t\t\t\t \t\t\t\t\t\tMAKES SURE THERE IS AT LEAST ONE EMPLOYEE*/\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Confirming that there is at least one employee\r\n\t\t\t\t\tif(employeeNameArr[0] == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"There are currently no employees.\\n\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Listing each employee and their yearly salary (i+1 to avoid displaying 0)\r\n\t\t\t\t\tfor(int i = 0; employeeNameArr[i] != null; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println((i+1)+\". \"+employeeNameArr[i]);\r\n\t\t\t\t\t\tSystem.out.println(\"$\"+employeeSalArr[i]+\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//User inputs which employee gets the raise.\r\n\t\t\t\t\tSystem.out.print(\"Which employee should receive the raise? : \");\r\n\t\t\t\t\tint salChoice = getVar.nextInt();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Calculating the raise to the monthly salary\r\n\t\t\t\t\temployeeSalArr[salChoice-1] = (employeeSalArr[salChoice-1]/12) * .10 + employeeSalArr[salChoice-1]/12;\r\n\t\t\t\t\t//Converting monthly salary to yearly salary\r\n\t\t\t\t\temployeeSalArr[salChoice-1] = employeeSalArr[salChoice-1]*12;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Outputting new information.\r\n\t\t\t\t\tSystem.out.println(\"New yearly salary for \" + employeeNameArr[salChoice-1] + \": \" + employeeSalArr[salChoice-1] + \"\\n\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t/*DISPLAY EMPLOYEES: MAKES SURE THERE IS AT LEAST ONE EMPLOYEE\r\n\t\t\t\t * \t\t\t\t\tLISTS ALL AVAILABLE EMPLOYEES IN ORDER OF CREATION*/\r\n\t\t\t\tcase 3:\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(employeeNameArr[0] == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"There are currently no employees.\\n\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Displaying the employees \r\n\t\t\t\t\tfor(int i = 0; employeeNameArr[i] != null; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(employeeNameArr[i]);\r\n\t\t\t\t\t\tSystem.out.println(\"$\"+employeeSalArr[i]+\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t/*EXIT: EXITS THE PROGRAM\r\n\t\t\t\t * \t\tFREES THE SCANNERS FROM MEMORY*/\r\n\t\t\t\tcase 4:\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Logging out...\");\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t\tgetVar.close();\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist();", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employees;\r\n\t}", "public List<EmployeeTO> getAllEmployees() {\n\t\t\r\n\t\treturn EmployeeService.getInstance().getAllEmployees();\r\n\t}", "public static void main (String args[] ){\n\t\tScanner scanner = new Scanner( System.in );\r\n\t\tSystem.out.print ( \" 1. Load Employee (From File) \\n 2. Exit Program \\n Enter Your Selection: \" );\r\n\t\tint input = scanner.nextInt();\r\n\t\t\r\n\t\t//if user inputs 1 read the text file and print employees loaded from the file\r\n\t\tif (input == 1 ){\r\n\t\t\tString[] Data;\r\n\t\t\t/**\r\n\t\t\t**create four arrays each of type StaffPharmacist, PharmacyManager, StaffTechnician, Senior technician\r\n\t\t\t**in order to store the employee objects. create arrays of length 1\r\n\t\t\t**/\r\n\t\t\tStaffPharmacist [] Pharmacist = new StaffPharmacist[1];\t\t\r\n\t\t\tPharmacyManager [] Manager = new PharmacyManager[1];\t\t\t\r\n\t\t\tStaffTechnician [] staffTech = new StaffTechnician[1];\t\t\t\r\n\t\t\tSeniorTechnician [] seniorTech = new SeniorTechnician[1];\r\n\t\t\ttry{\r\n\t\t\t\t//read the text file using scanner\r\n\t\t\t\tFile file = new File(\"employees.txt\");\r\n\t\t\t\t\t\t\r\n\t\t\t\tScanner sc = new Scanner(file);\r\n\t\t\t\t\t\r\n\t\t\t\t//while text file has next line split the text to store all elements in to an array\r\n\t\t\t\twhile (sc.hasNextLine()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//read the text file and store it in an array called data. split the text file at , and read until we have next line\r\n\t\t\t\t\tData = sc.nextLine().split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t//create 4 employee objects of each employee type \r\n\t\t\t\t\tPharmacyManager pharmacyManager = new PharmacyManager(Data);\r\n\t\t\t\t\tStaffPharmacist staffPharmacist = new StaffPharmacist(Data);\r\n\t\t\t\t\tStaffTechnician staffTechnician = new StaffTechnician(Data);\r\n\t\t\t\t\tSeniorTechnician seniorTechnician = new SeniorTechnician(Data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tint i;\r\n\t\t\t\t\t/** parse through the text files to check the job id number.\r\n\t\t\t\t\tif the job id is one than the employee is pharmacy manager and there fore store it in an array of type pharmacy manager, else if job id == 2 than it is a staff pharmacist there fore store the staff pharmacist employee in the respective array. else if job id == 3 the employee is a staff technician therefore store the employee object staff technician in array of type staff technician and if the id == 4 than the employee is senior technician so store the employee senior technician in an array of type senior technician\r\n\t\t\t\t\t**/\r\n\t\t\t\t\tfor( i = 0; i < Data.length; i = i + 4){\r\n\t\t\t\t\t\tif( Integer.parseInt(Data[i]) == 1 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tManager[0] = pharmacyManager;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 2 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPharmacist[0] = staffPharmacist;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 3 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tstaffTech[0] = staffTechnician;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 4 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tseniorTech[0] = seniorTechnician;\r\n\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}\r\n\t\t\t\t\t\r\n\t\t\t\t//close the file \r\n\t\t\t\tsc.close();\r\n\t\t\t\t\t\r\n\t\t\t\t//print that the file loaded success fully\r\n\t\t\t\tSystem.out.println ( \" \\n File Successfully Loaded! \" );\r\n\t\t\t\t\t\r\n\t\t\t\t//set a boolean variable named keepgoing equal to true.\r\n\t\t\t\tboolean keepGoing = true;\r\n\t\t\t\t//as long as keep going remains true, do the following steps\r\n\t\t\t\twhile(keepGoing){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ask the user what they would like to do next\r\n\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t\t//if user inputs 3 that is tries to print checks prior to entering hours worked than throw an error\r\n\t\t\t\t\t\tif(input == 3){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tSystem.out.println( \" Please enter the hours worked (Option #2) before trying to calculate the paycheck amounts! \" );\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//again ask the user after throwing the exception about what they would like to do\r\n\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\tinput = scanner.nextInt();\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\r\n\t\t\t\t\t\t//do this steps as long as user inputs 1 or 2\r\n\t\t\t\t\t\tdo{\r\n\t\t\t\t\t\t\t//if the user inputs 1 print the employee information described in respective classes of employees\r\n\t\t\t\t\t\t\tif(input == 1){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tManager[0].printPharmacyManager();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tPharmacist[0].printStaffPharmacist();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tseniorTech[0].printSeniorTechnician();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tstaffTech[0].printStaffTechnician();\r\n\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}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//if the user inputs 2 prompt the user asking the number of hours worked by employees\r\n\t\t\t\t\t\t\telse if(input == 2){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tSystem.out.print( \" \\n Please enter the hours worked: \" );\r\n\t\t\t\t\t\t\t\tint workingHours = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//than again ask user what they would like to do\r\n\t\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t/**if user inputs 3 after they entered number of hours employees worked than calculate the employee pay checks\r\n\t\t\t\t\t\t\t\tusing the calculate pay method defined in employee class\r\n\t\t\t\t\t\t\t\tget the employees pay rate by using getHourlyRate method defined in employee class\r\n\t\t\t\t\t\t\t\t**/\r\n\t\t\t\t\t\t\t\tif(input == 3){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tManager[0].calculatePay(workingHours, Manager[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tPharmacist[0].calculatePay(workingHours, Pharmacist[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tstaffTech[0].calculatePay(workingHours, seniorTech[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tseniorTech[0].calculatePay(workingHours, staffTech[0].getHourlyRate() );\r\n\t\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\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t//again show the menu to the user asking them what they would like to do\r\n\t\t\t\t\t\t\t//if user enters one or two or three repeat the above steps else exit the loop\r\n\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}while(input == 1 || input == 2 );\r\n\t\t\t\t\t}while(input == 3);\r\n\t\t\t\t\t//if user enters 4 set keepGoing = false print good bye and exit the loop.\r\n\t\t\t\t\tif(input == 4){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tkeepGoing = false;\r\n\t\t\t\t\t\tSystem.out.println( \" Goodbye! \" );\r\n\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//if the file is not found in the system throw an IO exception printing file not found\t\t\t\t\t\t\t\r\n\t\t\t}catch(FileNotFoundException fnfe){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t//catch the exception if the file is not found\r\n\t\t\t\tSystem.out.println(\" File Load Failed! \\n java.io.FileNotFoundException: employees.txt ( The system cannot find the file specified) \\n Program Exiting..... \");\r\n\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t//if the user inputs 2 in the main menu bar exit the loop and say goodBye!\r\n\t\tif(input == 2){\r\n\t\t\t\t\r\n\t\t\tSystem.out.println ( \"\\n Good Bye! \\n\" );\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "public Vector<Employees> getEmployees() {\n\t\t\tVector<Employees> v = new Vector<Employees>();\n\t\t\ttry {\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\tResultSet rs = stmt\n\t\t\t\t\t\t.executeQuery(\"select * from employees_details order by employees_pf\");\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tint file_num = rs.getInt(1);\n\t\t\t\t\tString name = rs.getString(2);\n\t\t\t\t\tint drive = rs.getInt(3);\n\t\t\t\t\tEmployees employee = new Employees(file_num, name, drive);\n//\t\t\t\t\tCars cars = new Truck(reg, model, drive);\n\t\t\t\t\tv.add(employee);\n\t\t\t\t}\n\t\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "public Builder setEmployeelist(com.example.nettyserver.protobuf.Employee.EmployeeInfo value) {\n if (employeelistBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employeelist_ = value;\n onChanged();\n } else {\n employeelistBuilder_.setMessage(value);\n }\n\n return this;\n }", "public static void main(String[] args) {\n\r\n\t\tEmployee employees[] = new Employee[4];\r\n\r\n\t\temployees[0] = new HourlyEmployee(1, \"Jim\", \"Halpert\", 52, 25.99);\r\n\t\temployees[1] = new SalariedEmployee(2, \"Pam\", \"Beesly\", 3000);\r\n\t\temployees[2] = new CommissionEmployee(3, \"Michael\", \"Scott\", 0.08, 2000, 85000);\r\n\t\temployees[3] = new CommissionEmployee(4, \"Oscar\", \"Martinez\", 0.02, 1400, 62000);\r\n\r\n\t\t// For loop in array, and toString method, to display employees and salaries\r\n\r\n\t\tfor (int i = 0; i < employees.length; i++) {\r\n\t\t\tSystem.out.println(employees[i]);\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\t\t}\r\n\t}", "public void checkEmployeeEvents(Employee e){\r\n int choice;\r\n for (Event ev: e.eventsArray)\r\n {\r\n System.out.println((e.eventsArray.indexOf(ev)+1)+ \" \" + ev.getEventName());\r\n }\r\n if((e.eventsArray.size()==0))\r\n System.out.println(e.getName() + \" has no events\");\r\n else {\r\n System.out.println(\"Which event do you want to check? Input number!\");\r\n choice = kbd.nextInt();\r\n System.out.println(e.eventsArray.get(choice - 1).toString());\r\n }\r\n }", "public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}", "private static void writeToFileEmployees() throws IOException {\n FileWriter write = new FileWriter(path2, append);\n PrintWriter print_line = new PrintWriter(write);\n for (int i = 0; i < RegisteredEmployees.listOfEmployees.size(); i++) {\n ArrayList<Integer> list = RegisteredEmployees.getEmployeeList();\n Integer ID = list.get(i);\n textLine = String.valueOf(ID);\n print_line.printf(\"%s\" + \"%n\", textLine);\n }\n print_line.close();\n }", "public static void main(String[] args) {\n String inputLine = \"\";\n char action = ' ';\n Employee[] employees = new Employee[] {\n new Employee(\"John\", \"+1-518-383-9901\", 9000),\n new Employee(\"Tom\", \"+1-518-383-6664\", 12000),\n new Employee(\"Diane\", \"+1-518-383-4025\", 5000),\n new Employee(\"Robert\", \"+1-518-383-7971\", 16000),\n new Employee(\"Patrick\", \"+1-518-383-5503\", 7000),\n new Employee(\"David\", \"+1-518-383-9905\", 8000),\n new Employee(\"Kate\", \"+1-518-383-3334\", 2000),\n new Employee(\"Mary\", \"+1-518-383-4545\", 4500),\n new Employee(\"Steven\", \"+1-518-383-7845\", 3500),\n new Employee(\"Bill\", \"+1-518-383-0456\", 7500),\n new Employee(\"Peter\", \"+1-518-383-3578\", 2500),\n new Employee(\"Mike\", \"+1-518-383-3895\", 3500),\n new Employee(\"Amanda\", \"+1-518-383-1001\", 4000)\n } ;\n Company company = new Company(\"1741 Technology Drive, Suite 400, San Jose, California 95110\", \"+1-408-273-8900\", employees);\n\n while (true) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n System.out.println(\"Input 1 to add new employee/ Input 2 to remove employee / Input 3 to get list of company employees\");\n System.out.println(\"Input 3 to print sum of all salaries/ Input 4 to print average salary / Input 5 to print employee name with the highest salary\");\n System.out.println(\"Input 7 to Exit\");\n inputLine = br.readLine();\n action = inputLine.charAt(0);\n\n switch (action) {\n case '1':\n System.out.print(\"Input employee name: \");\n String name = br.readLine();\n System.out.print(\"Input employee phone: \");\n String phone = br.readLine();\n System.out.print(\"Input employee salary: \");\n String salaryStr = br.readLine();\n int salary = Integer.parseInt(salaryStr);\n Employee emp = new Employee(name, phone, salary);\n company.addEmployee(emp);\n break;\n case '2':\n System.out.println(\"Input name of employee to remove\");\n String employeeName = br.readLine();\n company.removeEmployee(employeeName);\n break;\n case '3':\n System.out.println(\"Here is list of all company employees\");\n company.printEmployees();\n break;\n case '4':\n System.out.println(\"Sum of all salaries is \" + company.getSumOfAllSalaries());\n break;\n case '5':\n System.out.println(\"Average company salary is \" + company.getAverageSalary());\n break;\n case '6':\n System.out.println(\"Employee name with the highest salary is \" + company.getEmployeeNameWithMaxSalary());\n break;\n case '7': System.exit(0);\n default:\n System.out.println(\"You have written wrong or not supported action!\");\n break;\n }\n }\n catch (NumberFormatException e) {\n System.out.println(\"You entered non-number salary for employee!\");\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public void displayEmployees(){\n System.out.println(\"NAME --- SALARY --- AGE \");\n for (Employee employee : employees) {\n System.out.println(employee.getName() + \" \" + employee.getSalary() + \" \" + employee.getAge());\n }\n }", "public static void returnVehicle(Employee[] employeeList, Employee employee) {\n\t\t\n\t}", "public static Employee[] getAllEmployeesDetails(Connection conn) {\n\t\tEmployee [] empArray = new Employee[11];\n//\t\tWe are now creating a second option method and showing all the employees details in it\n\t\ttry {\n\t\t\t// Create the SQL query string which uses the \"getEmployeeCount\" stored procedure in the employee \n\t\t\tString sql = \"CALL getAllEmployeesDetails()\";\n\t\t\t// Create a new SQL statement \n\t\t\tStatement st = conn.createStatement();\n\t\t\t// Create a new results set which store the value returned by the when the SQL statement is executed \n\t\t\tResultSet rs = st.executeQuery(sql); \n\t\t\t// While there are still elements in the results set\n\t\t\tint i=0;\n//\t\t\twe are running a while loop and storing all the sql results in the main constructor\n\t\t\twhile (rs.next()) {\n\t\t\t\tempArray[i++] = new Employee(rs.getInt(\"emp_no\"), rs.getDate(\"birth_date\"), rs.getString(\"first_name\"),rs.getString(\"last_name\"), rs.getString(\"gender\"), rs.getDate(\"hire_date\"));\n\t\t\t}\n\t\t\t// close the results set\n\t\t\trs.close(); \n\t\t\t// close the statement\n\t\t\tst.close(); \n\t\t}\n\t\tcatch (SQLException e) {\n\t\t\tSystem.out.println(\"Error in getAllEmployeesDetails\");\n\t\t\te.printStackTrace();\n\t\t}\n//\t\treturn the array\n\t\treturn empArray;\n\t}", "public static void main(String[] args) {\n \n empleado[] misEmpleados=new empleado[3];\n //String miArray[]=new String[3];\n \n misEmpleados[0]=new empleado(\"paco gomez\",123321,1998,12,12);\n misEmpleados[1]=new empleado(\"Johana\",28500,1998,12,17);\n misEmpleados[2]=new empleado(\"sebastian\",98500,1898,12,17);\n \n /*for (int i = 0; i < misEmpleados.length; i++) {\n misEmpleados[i].aumentoSueldo(10);\n \n }\n for (int i = 0; i < misEmpleados.length; i++) {\n System.out.println(\"nombre :\" + misEmpleados[i].dameNombre() + \" sueldo \" + misEmpleados[i].dameSueldo()+ \" fecha de alta \"\n + misEmpleados[i].dameContrato());\n }*/\n \n for (empleado e:misEmpleados) {\n e.aumentoSueldo(10);\n \n }\n for (empleado e:misEmpleados) {\n System.out.println(\"nombre :\" + e.dameNombre() + \" sueldo \" + e.dameSueldo()+ \" fecha de alta \"\n + e.dameContrato());\n \n }\n \n }", "@GetMapping(\"/get_all_employees\")\n public String getAllEmployees(){\n\n Gson gsonBuilder = new GsonBuilder().create();\n List<Employee> initial_employee_list = employeeService.get_all_employees();\n String jsonFromJavaArray = gsonBuilder.toJson(initial_employee_list);\n\n return jsonFromJavaArray;\n }", "@RequestMapping(value = \"/listEmployees\", method = RequestMethod.GET)\r\n\tpublic Employee employees() {\r\n System.out.println(\"---BEGIN\");\r\n List<Employee> allEmployees = employeeData.findAll();\r\n \r\n System.out.println(\"size of emp == \"+allEmployees.size());\r\n System.out.println(\"---END\");\r\n Employee oneEmployee = allEmployees.get(0);\r\n\t\treturn oneEmployee;\r\n }", "private void listEmployees(HttpServletRequest request, HttpServletResponse response) \r\n\t\tthrows Exception {\n\t\tList<Employee> employees = employeeDAO.getEmployees();\r\n\t\t\r\n\t\t// add students to the request\r\n\t\trequest.setAttribute(\"EMPLOYEE_LIST\", employees);\r\n\t\t\t\t\r\n\t\t// send to JSP page (view)\r\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"/list-employees.jsp\");\r\n\t\tdispatcher.forward(request, response);\r\n\t}", "@Override\r\n\tpublic List<Employee> findAllEMployees() {\n\t\tList<Employee> employees = new ArrayList<Employee>();\r\n\t\tString findData = \"select * from employee\";\r\n\r\n\t\ttry {\r\n\t\t\tStatement s = dataSource.getConnection().createStatement();\r\n\r\n\t\t\tResultSet set = s.executeQuery(findData);\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\tEmployee employee = new Employee(id, sal, name, tech);\r\n\t\t\t\temployees.add(employee);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn employees;\r\n\r\n\t}", "public Employee[] getAllEmployees() {\n List<Employee> emps = new ArrayList<>();\n // Iterate through the memory array and find Employee objects\n for (Employee e : employeeArray) {\n if (e != null) {\n emps.add(e);\n }\n }\n return emps.toArray(new Employee[0]);\n }", "public static java.util.List<es.davinciti.liferay.model.SapEmployee> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence().findAll();\n\t}", "public List<Employe> findAllEmployees() {\n\t\treturn null;\n\t}", "public static void main(String[] args) \n {Employee nv1 = new Employee();\n// Employee nv2 = new Employee(2, \"Vo Le Khanh Duy\", 3600, \"[email protected]\", \"0123456789\");\n// \n// System.out.println(\"\\nNhap thong tin nhan vien 1:\");\n// nv1.nhapEmployee();\n// \n// nv1.xuatEmployee(nv1);\n// System.out.println(\" \\\"Tong Luong\\\": \" + nv1.Sum_of_sal(50)); \n// \n// nv1.xuatEmployee(nv2);\n// System.out.println(\" \\\"Tong Luong\\\": \" + nv2.Sum_of_sal(50));\n// \n EmployeeService employ = new EmployeeService();\n employ.nhapMangNhanVien();\n Employee kq = new Employee();\n kq = employ.timKiemNhanVien(employ.getArrEmployee(), 2);\n System.out.println(\"\\nThông tin nhân viên có id = 2\");\n kq.xuatEmployee(kq);\n System.out.println(\"\\nSắp xếp theo id tăng dần\");\n employ.sapXepMang(employ.getArrEmployee());\n employ.xuatMangNhanVien();\n }", "@Override\n\tpublic List<EmployeeBean> getAllEmployees() {\n\t\tLOGGER.info(\"starts getAllEmployees method\");\n\t\tLOGGER.info(\"Ends getAllEmployees method\");\n\t\t\n\t\treturn adminEmployeeDao.getAllEmployees();\n\t}", "public void setEmployeeArray(andrewNamespace.xsdconfig.EmployeeDocument.Employee[] employeeArray)\r\n {\r\n check_orphaned();\r\n arraySetterHelper(employeeArray, EMPLOYEE$0);\r\n }", "public Manager() {\n\t\tsuper();\n\t\temployees = new Employee[10];\n\t}", "public static void main(String[] args) {\n ArrayList saleEmployees = new ArrayList<>();\n saleEmployees.add(\"Irene\");\n saleEmployees.add(\"Mihael\");\n\n // emplyees list for service\n ArrayList purchaseEmployees = new ArrayList<>();\n purchaseEmployees.add(\"Eric\");\n purchaseEmployees.add(\"Irene\");\n\n\n Department direction = new Department(\"Alfred Boss\", \"Vorstand\");\n Department sale = new Department(\"Mustermann Max\", \"Vertrieb\", direction, saleEmployees);\n Department salePrivat = new Department(\"Musterfrau Angela\", \"Vertrieb Privatkunden\", sale);\n Department saleB2B = new Department(\"Muste Alfons\", \"Vertrieb Firmenkunden\", sale);\n Department purchase = new Department(\"Kufmann Alois\", \"Einkauf\", direction);\n Department purchaseMechanic = new Department(\"Gunz Herlinde\", \"Einkauf Mechanik\", purchase, purchaseEmployees);\n Department purchaseMechanicSmall = new Department(\"Friedrich Hermann\", \"Einkauf Kleinteile\", purchaseMechanic);\n Department purchaseMechanicBig = new Department(\"Peter Hannelore\", \"Einkauf Großteile\", purchaseMechanic);\n Department purchaseMechanicBigEU = new Department(\"But Moritz\", \"Einkauf Europa\", purchaseMechanicBig);\n Department service = new Department(\"Gyula H\", \"Service\");\n\n service.switchDepartment(saleB2B);\n service.switchDepartment(purchase);\n\n service.removeDepartment();\n\n sale.switchEmployees(\"Mihael\", purchaseMechanicBigEU);\n\n purchaseMechanicBigEU.switchDepartment(direction);\n direction.printOrganisation(\" \", \"- \", 1);\n\n }", "private void doCreateEmployee() {\n Scanner sc = new Scanner(System.in);\n Employee newEmployee = new Employee();\n int response;\n\n System.out.println(\"*** Hors Management System::System Administration::Create New Employee ***\");\n System.out.print(\"Enter First name>\");\n newEmployee.setFirstName(sc.nextLine().trim());\n System.out.print(\"Enter Last name>\");\n newEmployee.setLastName(sc.nextLine().trim());\n\n while (true) {\n System.out.println(\"Select Job Role:\");\n System.out.println(\"1. System Administrator\");\n System.out.println(\"2. Operation Manager\");\n System.out.println(\"3. Sales Manager\");\n System.out.println(\"4. Guest Officer\\n\");\n\n response = sc.nextInt();\n\n //set job role\n if (response >= 1 && response <= 4) {\n newEmployee.setJobRole(JobRoleEnum.values()[response - 1]);\n break;\n } else {\n System.out.println(\"Invalid option, please try again \\n\");\n }\n }\n sc.nextLine();\n System.out.print(\"Enter Username\");\n newEmployee.setUserName(sc.nextLine().trim());\n System.out.println(\"Enter Password\");\n newEmployee.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Employee>> constraintViolations = validator.validate(newEmployee);\n\n if (constraintViolations.isEmpty()) {\n newEmployee = employeeControllerRemote.createNewEmployee(newEmployee);\n System.out.println(\"New Staff created successfully, employee ID is: \"+newEmployee.getEmployeeId());\n }else{\n showInputDataValidationErrorsForEmployee(constraintViolations);\n }\n\n }", "@DataProvider(name = \"employee\")\n public Object[][] getEmployee() {\n return new Object[][] {{generateEmployee()}};\n }", "public void setEmployee(int index, Person emp) {\n if (index >= 0 && index < employees.length) {\n employees[index] = emp;\n }\n }", "private Employee[] readEmployees() {\n Employee[] employees = null;\n \n try (DataInputStream inputStream = new DataInputStream(new FileInputStream(\"employeeBinary.dat\"))) {\n int numEmployees = inputStream.readInt();\n employees = new Employee[numEmployees];\n \n int length;\n String name;\n String dateString;\n LocalDate date;\n Double salary;\n \n for (int n = 0; n < numEmployees; ++n) {\n length = inputStream.readInt();\n name = readFixedString(length, inputStream);\n length = inputStream.readInt();\n dateString = readFixedString(length, inputStream);\n date = LocalDate.parse(dateString);\n salary = inputStream.readDouble();\n Employee temp = new Employee(name, salary, date);\n employees[n] = temp;\n }\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n return employees;\n }", "public com.example.nettyserver.protobuf.Employee.EmployeeInfoOrBuilder getEmployeelistOrBuilder() {\n return getEmployeelist();\n }", "@Override\n\tpublic void updateEmployee(List<Employee> employees) {\n\t\t\n\t}", "public static void printEmployees(ArrayList<Employee> newEmployee){\n for(int i = 0; i < newEmployee.size(); i++){\n System.out.print(newEmployee.get(i).toString());\n }\n }", "@DataProvider(name=\"empDataProviderExcel\")\n\tString [][]getEmpDataFromExcel() throws IOException{\n\t\tString dataSheetPath = System.getProperty(\"user.dir\")+\"/testDataAndTestCases/API_TestCases.xlsx\";\n\t\tString sheetName = \"EmployeeTestData\";\n\t\t\n\t\tint rowCount = XLUtills.getRowCount(dataSheetPath, sheetName);\n\t\tint colCount = XLUtills.getCellCount(dataSheetPath, sheetName, rowCount);\n\t\t\t\t\n\t\tString [][]empData = new String[rowCount][colCount];\n\t\t\n\t\tfor(int i = 1; i <= rowCount; i++) {\n\t\t\tfor(int j = 0; j < colCount; j++) {\n\t\t\t\tempData[i-1][j] = XLUtills.getCellData(dataSheetPath, sheetName, i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn empData;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"----------------HR representatives Log in----------------\");\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter your USERNAME: \");\n\t\tString username = input.nextLine();\n\t\tSystem.out.println(\"Please enter your PASSWORD: \");\n\t\tString password = input.nextLine();\n\t\tSystem.out.println();\n\t\t\n\t\t//test public static int getEmployeeID (String user, String password) method\n\t\tint empID = DAManager.getEmployeeID(username, password);\n\t\t\n\t\tif (empID == 0) {\n\t\t\tSystem.out.println(\"You are an unauthorized user.\");\n\t\t\tSystem.exit(0);\n\t\t}else {\n\t\t\tSystem.out.println(\"You have passed the credential check.\\n\");\n\t\t\tSystem.out.println(\"Your information is : \");\n\t\t\t//test public static Employee getEmployeeByID(int empid) method \n\t\t\tEmployee HR_emp = DAManager.getEmployeeByID(empID);\n\t\t\tHR_emp.display();\n\t\t\t\n\t\t\t//test public static void addEmployee (Employe emp) method\n\t\t\tSystem.out.println(\"\\nAdd one employee inte EMPLOYEE table\");\n\t\t Employee added_emp = new Employee(207, \"Yuhang\", \"Zhao\", \"[email protected]\", \"111-222-3333\", java.sql.Date.valueOf(\"2020-09-01\"), \"IT_PROG\", 30000, 0.0,102,60);\n\t\t\tDAManager.addEmployee(added_emp);\n\t\t\t\n\t\t\t//test public static ArrayList<Employe> getAllEmployees() method\n\t\t\tSystem.out.println(\"\\nGet an ArrayList including all employee info\");\n\t\t\tArrayList<Employee> empList = DAManager.getAllEmployees();\n\t\t\tSystem.out.println(\"The 1st employee info within this arrayList is:\");\n\t\t\t(empList.get(0)).display();\n\t\t\tSystem.out.println(\"The number of employees in EMPLOYEES table is: \"+ empList.size());\n\t\t\t\n\t\t\t//test public static ArrayList<Employe> getEmployeesByDepartmentID (int depid) method \n\t\t\tSystem.out.println(\"\\nGet an ArrayList including all employee info in the department_ID 60: \");\n\t\t\tArrayList<Employee> empListByDep = DAManager.getEmployeesByDepartmentID(60);\n\t\t\tSystem.out.println(\"The 1st employee info within this arrayList is:\");\n\t\t\t(empListByDep.get(0)).display();\n\t\t\tSystem.out.println(\"The number of employees in deaprtment ID 60 is: \"+empListByDep.size());\n\t\t\t\n\t\t\t//test public static int updateEmployee (Employee emp) method\n\t\t\tSystem.out.println(\"\\nUpdate the employee#99 info\");\n\t\t\tEmployee updated_emp = new Employee(207, \"James\", \"Bob\", \"[email protected]\", \"123-345-1111\", java.sql.Date.valueOf(\"2019-11-01\"), \"FI_ACCOUNT\", 24000, 0.0, 108, 100);\n\t\t\tDAManager.updateEmployee(updated_emp);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//test public static boolean batchUpdate(String[] SQLs) method\n\t\t\tSystem.out.println(\"\\nTest batchUpdate method: \");\n\t\t\tString batchSQL1 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(208, 'Lebron', 'James', '[email protected]', '111-111-2222', TO_DATE('01-Jan-2017', 'DD-MM-YYYY','NLS_DATE_LANGUAGE = American'), 'IT_PROG')\";\n\t\t\tString batchSQL2 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(209, 'Kevin', 'Durant', '[email protected]', '111-222-3333', SYSDATE, 'AD_VP')\";\n\t\t\tString batchSQL3 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(210, 'Kris', 'Smith', '[email protected]', '111-333-4444', SYSDATE, 'ST_MAN')\";\n\t\t\tString[] SQLs = new String[3];\n\t\t\tSQLs[0] = batchSQL1;\n\t\t\tSQLs[1] = batchSQL2;\n\t\t\tSQLs[2] = batchSQL3;\n\t\t\tif(DAManager.batchUpdate(SQLs)) {\n\t\t\t\tSystem.out.println(\"Success. This transaction is successfully executed!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Failed. All SQL statements are rolled back.\");\n\t\t\t};\n\t\t\t\n\t\t\t//test public static int deleteEmployeeByID (int empid) method\n\t\t\tSystem.out.println(\"\\nDelete the employee#210\");\n\t\t\tDAManager.deleteEmployeeByID(210);\n\t\t}\n\n\t}", "public String[][] getResearchEmployeeData() {\r\n\t\tint p = 0;\r\n\t\tString [][] employees = new String[companyDirectory.size()][4];\r\n\t\tfor(int i = 0; i < companyDirectory.size(); i++) {\r\n\t\t\tif(companyDirectory.get(i) instanceof ResearchCompany) {\r\n\t\t\t for(int j = 0; j < companyDirectory.get(i).getLocations().size();j++) {\r\n\t\t\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++ ) {\r\n\t\t\t\t\t employees[p][0] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getFirstName();\r\n\t\t\t\t\t employees[p][1] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getLastName();\r\n\t\t\t\t\t employees[p][2] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId();\r\n\t\t\t\t\t employees[p][3] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getEmail();\r\n\t\t\t\t\t p++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn employees;\r\n\t}", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"[email protected]\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\t\n\t\tlog.debug(\"EmplyeeService.getAllEmployee() return list of employees\");\n\t\treturn repositary.findAll();\n\t}", "public static void main(String[] args) {\n\t\tSupervisor miSupervisor = new Supervisor(\"Raul\");\r\n\t\t\r\n\t\t//Array de Empleados\r\n\t\tEmpleadoStatic[] listaEmpleados = new EmpleadoStatic[7];\r\n\t\tScanner Entrada = new Scanner(System.in);\r\n\t\t\r\n\t\t//Pedido de Empleados\r\n\t\tfor(int i=0;i<5;i++){\t//for(int i=0;i<listaEmpleados.length;i++){\t\r\n\t\t\tSystem.out.print(\"Ingrese nombre: \");\r\n\t\t\tlistaEmpleados[i] = new EmpleadoStatic(Entrada.nextLine());\r\n\t\t}\r\n\t\t\r\n\t\t/*POLIMORFISMO: El programa espera un objeto de la clase padre (Empleado).\r\n\t\t * Pero yo estoy asignando objetos de la clase hija (Supervisor)*/\r\n\t\tlistaEmpleados[5] = miSupervisor;\r\n\t\tlistaEmpleados[6] = new Supervisor(\"Fabio\");\t//última ID\r\n\t\t\t\t\r\n\t\t/*Uso de Arrays.sort() para ordenar los empleados por id, ya que por \r\n\t\t * ejemplo, la primer posición del array tiene al empleado de id 2.\r\n\t\t * Require la interfaz Comparable, agregada en EmpleadoStatic*/\r\n\t\tArrays.sort(listaEmpleados);\r\n\t\t\r\n\t\t/*Recorrida, si en la clase hija se sobreescribe un método, al momento de\r\n\t\t * pasar por ese objeto, se llama al método de la clase hija. Comportamiento \r\n\t\t * según el contexto (Polimorfismo)*/\r\n\t\tfor(EmpleadoStatic e:listaEmpleados)\r\n\t\t\tSystem.out.println(\"id: \" + e.getId() + \"\\t nombre: \" + e.getNombre());\r\n\t\t\r\n\t\tSystem.out.println(\"Proximo ID a asignar: \" + EmpleadoStatic.getIdDisponible());\r\n\t\t\r\n\t\t/*Ejemplo para demostrar el acceso a un método de la interfaz JefesI\r\n\t\t * implementado por la clase Supervisor*/\r\n\t\tSupervisor s = new Supervisor(\"Macri\");\r\n\t\tSystem.out.println(s.tomarDecisiones(\"Un nuevo tarifazo. Vamos juntos!\"));\r\n\t\t\r\n\t\t\tEntrada.close();\r\n\t}", "public List<EmployeeEntity> retrieveAllEmployeeData(StorageContext context) throws PragmaticBookSelfException {\n\t\tList<EmployeeEntity> listOfEmployeeData = null;\n\n\t\tSession hibernateSession = context.getHibernateSession();\n\n\t\tString queryString = \"FROM EmployeeEntity\"; // select * from employee;//\n\t\ttry {\n\t\t\tQuery query = hibernateSession.createQuery(queryString);\n\t\t\tlistOfEmployeeData = query.list();\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\t\treturn listOfEmployeeData;\n\t}", "public EmployeeSet()\n\t{\n\t\tnumOfEmployees = 0;\n\t\temployeeData = new Employee[10];\n\t}", "@RequestMapping(\"/employee\")\n\tpublic List<Employee> getAllEmplyee() {\n\t\treturn service.getAllEmplyee();\n\t}", "public List<Employee> getAllEmployees(){\n\t\tList<Employee> employees = employeeDao.findAll();\n\t\tif(employees != null)\n\t\t\treturn employees;\n\t\treturn null;\n\t}", "public andrewNamespace.xsdconfig.EmployeeDocument.Employee getEmployeeArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().find_element_user(EMPLOYEE$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "public Employee[] getAll() {\n\t\tEmployee[] empArray = new Employee[list.size()];\n\t\tfor (int i = 0; i < list.size(); i++) \n\t\t\tempArray[i] = list.get(i);\n\t\t\t\n\t\treturn empArray;\n\t}", "public static void main(String[] args) {\n Employee[] employees = new Employee[5]; \n\n // initialize array with Employees\n employees[0] = new SalariedEmployee(\n \"John\", \"Smith\", \"111-11-1111\", 800.00);\n employees[1] = new HourlyEmployee(\n \"Karen\", \"Price\", \"222-22-2222\", 16.75, 40);\n employees[2] = new CommissionEmployee(\n \"Sue\", \"Jones\", \"333-33-3333\", 10000, .06); \n employees[3] = new BasePlusCommissionEmployee(\n \"Bob\", \"Lewis\", \"444-44-4444\", 5000, .04, 300);\n employees[4] = new PieceWorker(\n \"Victor\", \"Figueroa\", \"555-555-5555\", 90, 100);\n \n System.out.println(\"Employees processed polymorphically:\\n\");\n \n // generically process each element in array employees\n for (Employee currentEmployee : employees) {\n System.out.println(currentEmployee); // invokes toString\n System.out.printf(\"earned $%,.2f\\n\\n\", currentEmployee.earnings());\n } // end for\n }", "public List<Employee> list() {\n\t\t\treturn employees;\n\t\t}", "public static void showEmployee(RequestHandler handler, Employee e) {\n\t\tStringBuilder sb;\n\t\tsb = new StringBuilder();\n\t\tsb.append(\"\\n*****************************************\");\n\t\tsb.append(\"\\nEmployee ID: \" + e.getId());\n\t\tsb.append(\"\\n Name: \" + e.getName());\n\t\tsb.append(\"\\n Email: \" + e.getEmail());\n\t\tsb.append(\"\\n Department: \" + e.getDepartment());\n\t\tsb.append(\"\\n*****************************************\");\n\t\thandler.sendMessage(sb.toString());\n\t}", "public String getAllEmployees() {\n\t\t\n\t\tString allEmployees = \"\\n\";\n\t\t\n\t\tfor(AbsStaffMember staffMember : repository.getAllMembers())\n\t\t{\n\t\t\tallEmployees += \"\\t- \" + staffMember.getName() + \"\\n\";\n\t\t}\n\t\t\n\t\treturn allEmployees;\n\t}", "public List<Employee> getAll() {\n\t\treturn edao.listEmploye();\n\t}", "public void bulkAdd(){\n employees.add(new Employee(23.0, 15000.0, \"Shayan\"));\n employees.add(new Employee(22.0, 60000.0, \"Rishabh\"));\n employees.add(new Employee(23.0, 45000.0, \"Ammar\"));\n employees.add(new Employee(25.0, 30000.0, \"Fahad\"));\n employees.add(new Employee(21.0, 50000.0, \"Ankur\"));\n }", "public static void main(String[] args){\n ArrayList<Employee> newEmployee = new ArrayList<Employee>();\n \n //Scanner used for user input\n Scanner input = new Scanner(System.in);\n \n welcome();\n menu(input, newEmployee);\n \n }", "@Override\n\tpublic void eventSelectEmployees(Long id) {\n\t\t\n\t}", "public void setEmployeeArray(int i, andrewNamespace.xsdconfig.EmployeeDocument.Employee employee)\r\n {\r\n generatedSetterHelperImpl(employee, EMPLOYEE$0, i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);\r\n }", "@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}", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn null;\n\t}", "@Override\n public void setEmployees() throws EmployeeCreationException {\n\n }", "public static void main(String[] args) {\n Employ obj1 = new Janani(1, \"Janani\", 757438);\n Employ obj2 = new Raghu(2, \"Raghu\", 73647);\n Employ[] arrEmploy = new Employ[]{obj1,obj2};\n for (Employ employ : arrEmploy) {\n System.out.println(employ);\n }\n }", "@GetMapping(\"/my-employee\")\n\t@Secured(Roles.BOSS)\n\tpublic ResponseEntity<EmployeeCollectionDto> getAllMyEmployees() {\n\t\tLogStepIn();\n\n\t\t// Gets the currently logged in user's name\n\t\tString username = SecurityContextHolder.getContext().getAuthentication().getName();\n\t\tLong bossId = userRepository.findByName(username).getEmployee().getId();\n\n\t\t// Adds the employees that directly belongs to this boss\n\t\tEmployeeCollectionDto employeeCollectionDto = new EmployeeCollectionDto();\n\t\tList<Employee> employeeList = employeeRepository.findAll();\n\t\tfor(Employee employee : employeeList) {\n\t\t\tif(employee.getBossId().equals(bossId))\n\t\t\t\temployeeCollectionDto.collection.add(toDto(employee));\n\t\t}\n\n\t\treturn LogStepOut(ResponseEntity.ok(employeeCollectionDto));\n\t}", "public Builder setEmployeelist(\n com.example.nettyserver.protobuf.Employee.EmployeeInfo.Builder builderForValue) {\n if (employeelistBuilder_ == null) {\n employeelist_ = builderForValue.build();\n onChanged();\n } else {\n employeelistBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"\\nEmployees: \" + getEmployees();\n\t}", "public Company(int size) {\n employees = new Person[size];\n }", "public List<Employee> selectAllEmployee() {\n\n\t\t// using try-with-resources to avoid closing resources (boiler plate code)\n\t\tList<Employee> emp = new ArrayList<>();\n\t\t// Step 1: Establishing a Connection\n\t\ttry (Connection connection = dbconnection.getConnection();\n\n\t\t\t\t// Step 2:Create a statement using connection object\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(SELECT_ALL_employe);) {\n\t\t\tSystem.out.println(preparedStatement);\n\t\t\t// Step 3: Execute the query or update query\n\t\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\t\t// Step 4: Process the ResultSet object.\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString employeename = rs.getString(\"employeename\");\n\t\t\t\tString address = rs.getString(\"address\");\n\t\t\t\tint mobile = rs.getInt(\"mobile\");\n\t\t\t\tString position = rs.getString(\"position\");\n\t\t\t\tint Salary = rs.getInt(\"Salary\");\n\t\t\t\tString joineddate = rs.getString(\"joineddate\");\n\t\t\t\tString filename =rs.getString(\"filename\");\n\t\t\t\tString path = rs.getString(\"path\");\n\t\t\t\temp.add(new Employee(id, employeename, address, mobile, position, Salary, joineddate,filename,path));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tdbconnection.printSQLException(e);\n\t\t}\n\t\treturn emp;\n\t}", "public static void main(String[] args)throws java.io.IOException {\n\t\tString idEmpleado, nomEmpleado, apellEmpleado, telefono, email;\r\n\t\t\r\n\t\tout.println(\"Digite el id del empleado\");\r\n\t\tidEmpleado = in.readLine();\r\n\t\tout.println(\"Digite el nombre del empleado\");\r\n\t\tnomEmpleado = in.readLine();\r\n\t\tout.println(\"Digite el apellido del empleado\");\r\n\t\tapellEmpleado = in.readLine();\r\n\t\tout.println(\"Digite el telefono del empleado\");\r\n\t\ttelefono = in.readLine();\r\n\t\tout.println(\"Digite el email del empleado\");\r\n\t\temail = in.readLine();\r\n\t\t\r\n\t\t/*Los datos se deben mandar al gestor*/\r\n\t\t\r\n\t\tSupervisor empleado = new Supervisor(idEmpleado, nomEmpleado, apellEmpleado, telefono, email);\r\n\t\tSoporTecnico contratado = new SoporTecnico(empleado);\r\n\t\t\r\n\t\t//La variable contratado se almacenarķa en un arreglo\r\n\t\t\r\n\t\tout.println(\"Id: \" + contratado.getIdEmpleado() + \"\\n\" +\r\n\t\t\t\t\t\"Nombre: \" + contratado.getNomEmpleado() + \"\\n\" +\r\n\t\t\t\t\t\"Apellido: \" + contratado.getApellEmpleado() + \"\\n\" +\r\n\t\t\t\t\t\"Telefono: \" + contratado.getTelefono() + \"\\n\" +\r\n\t\t\t\t\t\"Email: \" + contratado.getEmail() + \"\\n\" +\r\n\t\t\t\t\t\"Codigo del puesto: \" + contratado.codPuesto() + \"\\n\" +\r\n\t\t\t\t\t\"Nombre del puesto: \" + contratado.nomPuesto() + \"\\n\" +\r\n\t\t\t\t\t\"Nombre del departamento: \" + contratado.departamento());\r\n\t\t\r\n\t\t/*Si se desea cambiar el puesto o el departamento del empleado, se extraen los datos \r\n\t\t * personales del empleado, se elimina el objeto y los datos personales se almacenan\r\n\t\t * en un nuevo objeto del puesto deseado y del departamento deseado*/\r\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\n\t}" ]
[ "0.6868632", "0.65090203", "0.62585706", "0.61836845", "0.6144087", "0.61378914", "0.6069939", "0.60509753", "0.6033147", "0.60183626", "0.5998408", "0.59513074", "0.5935595", "0.5876214", "0.58760726", "0.58753455", "0.57754105", "0.577029", "0.57566124", "0.57539284", "0.57485265", "0.5685108", "0.56526124", "0.56504244", "0.5634027", "0.56274", "0.5608721", "0.5596278", "0.5593522", "0.5583829", "0.5574096", "0.5566848", "0.5566672", "0.5543649", "0.5517754", "0.5515594", "0.5510983", "0.55108017", "0.5506556", "0.55064195", "0.54906636", "0.5464768", "0.5459849", "0.5443904", "0.5434591", "0.54300165", "0.5414415", "0.54060775", "0.53918594", "0.53897303", "0.53883255", "0.53822416", "0.5378451", "0.5364604", "0.5362596", "0.5354561", "0.5351533", "0.5347831", "0.5335345", "0.53350466", "0.5333426", "0.5324614", "0.53237814", "0.53236735", "0.53171676", "0.5308065", "0.5304017", "0.5303957", "0.5287596", "0.5277932", "0.5261954", "0.52584475", "0.52562183", "0.52500445", "0.5241095", "0.52302575", "0.5228119", "0.52230006", "0.5219517", "0.5217905", "0.5215324", "0.5204302", "0.51975167", "0.5194367", "0.5190201", "0.5183954", "0.51814175", "0.51813555", "0.5178019", "0.517595", "0.5173928", "0.5170199", "0.51677376", "0.51614827", "0.51606125", "0.5160479", "0.5154016", "0.51536715", "0.5153052", "0.514681" ]
0.5525948
34
First check to see whether OpenGL 2.0 is supported on the system. If not, then display a dialog saying you cannot configure your avatar.
public void actionPerformed(ActionEvent e) { RenderManager rm = ClientContextJME.getWorldManager().getRenderManager(); if (rm.supportsOpenGL20() == false || rm.getContextCaps().GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB < 1000) { String msg = "Unfortunately your system graphics does not" + " support the shaders which are required to configure" + " the avatar system."; String title = "Advanced Shaders Required"; JFrame frame = JmeClientMain.getFrame().getFrame(); JOptionPane.showMessageDialog(frame, msg, title, JOptionPane.ERROR_MESSAGE); return; } AvatarConfigFrame f = new AvatarConfigFrame(); f.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static boolean checkIsSupportedDeviceOrFinish(final Activity activity) {\n String openGlVersionString =\n ((ActivityManager) activity.getSystemService(Context.ACTIVITY_SERVICE))\n .getDeviceConfigurationInfo()\n .getGlEsVersion();\n if (Double.parseDouble(openGlVersionString) < MIN_OPENGL_VERSION) {\n Log.e(TAG, \"Sceneform requires OpenGL ES 3.0 later\");\n Toast.makeText(activity, \"Sceneform requires OpenGL ES 3.0 or later\", Toast.LENGTH_LONG)\n .show();\n activity.finish();\n return false;\n }\n return true;\n }", "public boolean hasCrappyOpengl();", "private void checkEglError(String msg) {\n int error;\n if ((error = argonEGL.eglGetError()) != EGL10.EGL_SUCCESS) {\n \tXenonGL.checkGlError(msg);\n throw new RuntimeException(msg + \": EGL error: %s\" );\n }\n }", "boolean isDesktopGL();", "private static void checkGLError(String label) {\r\n int error;\r\n while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {\r\n Log.e(OpenGlStuff.TAG, label + \": glError \" + error);\r\n throw new RuntimeException(label + \": glError \" + error);\r\n }\r\n }", "private void initOpenGL()\n\t{\n\t\t// Create an OpenGL ES 2.0 context.\n\t\tsetEGLContextClientVersion(2);\n\n\t\t// Set the drawing quality.\n\t\t// Alpha isn't needed and the color choice is limited anyway, so we can get away with this setting.\n\t\tgetHolder().setFormat(PixelFormat.RGB_565);\n\t\tsetEGLConfigChooser(5, 6, 5, 0, 0, 0);\n\n\t\t// Prepare the renderer.\n\t\trenderer = new GLRenderer();\n\t\tsetRenderer(renderer);\n\n\t\t// Choose to only render the view on demand.\n\t\tsetRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\n\n\t\t// Disable the unneeded depth test and stencil test.\n\t\tGLES20.glDisable(GLES20.GL_DEPTH_TEST);\n\t\tGLES20.glDisable(GLES20.GL_STENCIL_TEST);\n\n\t\t// Render the canvas for the first time.\n\t\trequestRender();\n\t}", "private void checkVersion() {\n try {\n if (!isR2D2()) {\n createDialog(getString(R.string.dialog_update_qpair), getString(R.string.dialog_update_qpair_description), new OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n }, null);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void initOpenGlView() {\n setEGLContextClientVersion(2);\n setPreserveEGLContextOnPause(true);\n System.out.println(\"************************************************************* init OpenGlView ********************\");\n// setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\n// setEGLConfigChooser(8, 8, 8, 8, 0, 0); // added 10.05\n// getHolder().setFormat(PixelFormat.TRANSLUCENT); // // added 10.05\n }", "private void initGL() {\n\t\ttry {\n\t\t\tDisplay.setDisplayMode(new DisplayMode(displayWidth, displayHeight));\n\t\t\tDisplay.setVSyncEnabled(true);\n\t\t\tDisplay.setTitle(\"Shooter\");\n\t\t\tDisplay.create();\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\t// init OpenGL\n\t\tglEnable(GL_TEXTURE_2D);\n\t\t\n\t\tglClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n\t\t\n\t\t// enable alpha blending\n\t\tglEnable(GL_BLEND);\n\t\tglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\t\t\n\t\tglViewport(0, 0, displayWidth, displayHeight);\n\t\t\n\t\tglMatrixMode(GL_PROJECTION);\n\t\tglLoadIdentity();\n\t\tglOrtho(0, displayWidth, displayHeight, 0, 1, -1);\n\t\tglMatrixMode(GL_MODELVIEW);\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:16.348 -0500\", hash_original_method = \"0FE9F08E24E0D2453B9577BF62363101\", hash_generated_method = \"2DF7B7AD6E2DE93937DF846C98B61A13\")\n \n public boolean eglInitialize(EGLDisplay display, int[] major_minor){\n \taddTaint(display.getTaint());\n \taddTaint(major_minor[0]);\n \treturn getTaintBoolean();\n }", "private void initOpenGL(){\n\t\tcaps = GL.createCapabilities();\n\t\tglViewport(0,0,WIDTH,HEIGHT);\n\t\tif(caps.OpenGL44)System.out.println(\"All OK\");\n\t\tglEnable(GL_DEPTH_TEST);\n\t\t//glPolygonMode(GL_BACK, GL_LINE);\n\t\tglClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n\t}", "private boolean useCamera2() {\n return Camera2Enumerator.isSupported(this);\n }", "public void setupOpenGL() {\n try {\n PixelFormat pixelFormat = new PixelFormat();\n ContextAttribs contextAtrributes = new ContextAttribs(3, 2)\n .withForwardCompatible(true)\n .withProfileCore(true);\n\n DisplayMode displayMode = new DisplayMode(WIDTH, HEIGHT);\n Display.setDisplayMode(displayMode);\n Display.setTitle(WINDOW_TITLE);\n Display.create(pixelFormat, contextAtrributes);\n\n GL11.glEnable(GL11.GL_DEPTH_TEST);\n GL11.glDepthFunc(GL11.GL_LEQUAL);\n\n GL11.glViewport(0, 0, WIDTH, HEIGHT);\n } catch (LWJGLException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n\n // Setup an XNA like background color\n GL11.glClearColor(0.4f, 0.6f, 0.9f, 0f);\n\n // Map the internal OpenGL coordinate system to the entire screen\n GL11.glViewport(0, 0, WIDTH, HEIGHT);\n\n this.exitOnGLError(\"Error in setupOpenGL\");\n }", "@Override\r\n\tpublic void init(GL10 gl, EGLConfig config) {\n try {\r\n loadGLTextures(gl);\t\t\t\t\t\t\t\t\t\t// Jump To Texture Loading Routine ( NEW )\r\n } catch (IOException e) {\r\n \tLog.e(\"120\", \"An error occured!\");\r\n e.printStackTrace();\r\n }\r\n\r\n gl.glEnable(GL10.GL_TEXTURE_2D);\t\t\t\t\t\t\t\t\t// Enable Texture Mapping ( NEW )\r\n gl.glShadeModel(GL10.GL_SMOOTH);\t\t\t\t\t\t\t\t\t// Enable Smooth Shading\r\n gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f);\t\t\t\t\t\t// Black Background\r\n gl.glClearDepthf(1.0f);\t\t\t\t\t\t\t\t\t\t\t// Depth Buffer Setup\r\n gl.glEnable(GL10.GL_DEPTH_TEST);\t\t\t\t\t\t\t\t\t// Enables Depth Testing\r\n gl.glDepthFunc(GL10.GL_LEQUAL);\t\t\t\t\t\t\t\t\t\t// The Type Of Depth Testing To Do\r\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);\t\t\t// Really Nice Perspective Calculations\r\n\t}", "public void checkPermissionsCamera() {\n PackageManager packageManager = EditProfile.this.getPackageManager();\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n //Checking the permissions for using the camera.\n if (checkSelfPermission(Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{Manifest.permission.CAMERA},\n MY_PERMISSIONS_REQUEST_CAMERA);\n } else if (packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY) == false) {\n Toast.makeText(EditProfile.this, \"This device does not have a camera.\", Toast.LENGTH_LONG)\n .show();\n return;\n }\n }\n }", "boolean useCamera2();", "private boolean checkCameraHardware(Context context) {\r\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\r\n return true; // Tiene camara\r\n } else {\r\n return false;// No tiene camara\r\n }\r\n }", "public static void checkGLError(String func){\n\t\tint error;\n\t\twhile((error = glGetError()) != GL_NO_ERROR){\n\t\t\tLog.e(TAG, func + \": glError \" + error);\n\t\t\tthrow new RuntimeException(func + \": glError \" + error);\n\t\t}\n\t}", "public boolean needFaceDetection() {\n return true;\n }", "public boolean needFaceDetection() {\n return false;\n }", "public void display(GL2 gl) {}", "private static void initGL() {\n glClearColor(152/255f, 175/255f, 199/255f, 0.0f);\n glMatrixMode(GL_PROJECTION);\n glLoadIdentity();\n GLU.gluPerspective(100.0f, (float)displayMode.getWidth()/(float)\n displayMode.getHeight(), 0.1f, 500);\n glMatrixMode(GL_MODELVIEW);\n glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\n glClearDepth(1.0f);\n glEnable(GL_DEPTH_TEST);\n glEnable(GL_TEXTURE_2D);\n glEnableClientState(GL_VERTEX_ARRAY);\n glEnableClientState(GL_COLOR_ARRAY);\n glEnableClientState(GL_TEXTURE_COORD_ARRAY);\n glEnable(GL_LIGHTING);\n glEnable(GL_LIGHT0);\n glEnable(GL_NORMALIZE);\n\n }", "private static void checkGLError(String func) {\n int error;\n while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {\n Log.e(TAG, func + \": glError \" + error);\n throw new RuntimeException(func + \": glError \" + error);\n }\n }", "private boolean checkCameraHardware(Context context) {\n // this device has a camera\n // no camera on this device\n return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);\n }", "@Override\n\tpublic boolean init(){\n\n\t// check if the device has a flash\n\t//\n\t// if it DOES have a flash\n\t\tif(_checkIfCameraHasFlash()){\n\n\t\t\t// check if the camera\n\t\t\t// is available (not already in use)\n\t\t\t//\n\t\t\t// if the camera is not available\n\t\t\tif (!_getCamera()){\n\n\t\t\t\t// display a toast\n\t\t\t\tToast.makeText(_main, R.string.error_no_camera_toast, Toast.LENGTH_LONG).show();\n\n\t\t\t\t// it has a flash but the camera ISN'T available\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// it has a flash and the camera IS available\n\t\t\treturn true;\n\n\t// if it DOESN'T have a flash\n\t\t}else{\n\n\t\t\t// Show an alertDialog\n\t\t\tfinal AlertDialog alertDialog = new AlertDialog.Builder(_main).create();\n\t\t\talertDialog.setTitle(_main.getString(R.string.error_no_flash_title));\n\t\t\talertDialog.setMessage(_main.getString(R.string.error_no_flash_message));\n\t\t\talertDialog.setButton(DialogInterface.BUTTON_POSITIVE, _main.getString(R.string.error_no_flash_dismiss_button), new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialogInterface, int i) {\n\t\t\t\t\t// close the alert dialog\n\t\t\t\t\talertDialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\talertDialog.show();\n\n\t\t\t// it DOESN'T have a flash\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "public void draw2(GL2 gl)\r\n\t{\r\n\t\tGLUT glut = new GLUT();\r\n\t\t//Color\r\n\t\tgl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, new float[] {0, 0, 0, (float)(.3 * Math.random())}, 0);\r\n\t\tgl.glMaterialfv(GL2.GL_FRONT, GL2.GL_EMISSION, new float[] {0f,1f,0,1}, 0);\r\n\r\n\t\tdouble xDisp = shotX*Math.cos(verticalDir) - shotZ*Math.sin(verticalDir);\r\n\t\tdouble zDisp = shotX*Math.sin(verticalDir) + shotZ*Math.cos(verticalDir);\r\n\t\t\r\n\t\tdouble yDisp = xDisp*Math.sin(horizontalDir) - shotY*Math.cos(horizontalDir);\r\n\t\txDisp = xDisp*Math.cos(horizontalDir) + shotY*Math.sin(horizontalDir);\r\n\t\t\r\n\t\tgl.glPushMatrix();\r\n\t\tgl.glTranslated(x+ xDisp, y + yDisp, z+ zDisp);\r\n\t\tgl.glRotated(horizontalDir*180/Math.PI + 180, 0, 0, 1);\r\n\t\tgl.glRotated(verticalDir*180/Math.PI + 90, 0, 1, 0);\r\n\t\tgl.glTranslated(0, 0, .5);\r\n\t\tglut.glutSolidSphere(.02*Math.min(energy, energyUse)/energyUse, 24, 8);\r\n\t\t\r\n\t\tgl.glPopMatrix();\r\n\t}", "private void initDisplay() throws LWJGLException {\n\n\t\tDisplay.setDisplayMode(Display.getDesktopDisplayMode());\n\t\tDisplay.setFullscreen(true);\n\t\twidth = Display.getDisplayMode().getWidth();\n\t\theight = Display.getDisplayMode().getHeight();\n\t\tDisplay.create();\n\t\tDisplay.setVSyncEnabled(true);\n\t}", "public void initEgl(Surface surface, EGLContext eglContext) {\n mEgl = (EGL10) EGLContext.getEGL();\n\n /*\n * Get to the default display.\n */\n mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);\n\n if (mEglDisplay == EGL10.EGL_NO_DISPLAY) {\n throw new RuntimeException(\"eglGetDisplay failed(egl获取显示设备失败)\");\n }\n\n /*\n * We can now initialize EGL for that display\n * 初始化默认显示设备\n */\n int[] version = new int[2];\n if (!mEgl.eglInitialize(mEglDisplay, version)) {\n throw new RuntimeException(\"eglInitialize failed(初始化默认显示设备失败)\");\n }\n\n /**\n * 设置属性\n */\n\n int[] attribute = new int[]{\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_ALPHA_SIZE, 8,\n EGL10.EGL_DEPTH_SIZE, 8,//深度大小\n EGL10.EGL_STENCIL_SIZE, 8,//模板大小\n EGL10.EGL_RENDERABLE_TYPE, 4,//2.0版本 值为4\n EGL10.EGL_NONE //以此结尾\n };\n //5.\n int[] num_config = new int[1];\n if (!mEgl.eglChooseConfig(mEglDisplay, attribute, null, 1, num_config)) {\n throw new IllegalArgumentException(\"eglChooseConfig failed(从系统中获取对应的属性失败)\");\n }\n\n int numConfigs = num_config[0];\n\n if (numConfigs <= 0) {\n throw new IllegalArgumentException(\n \"No configs match configSpec(没有匹配到相应的属性)\");\n }\n\n EGLConfig[] configs = new EGLConfig[numConfigs];\n if (!mEgl.eglChooseConfig(mEglDisplay, attribute, configs, numConfigs,\n num_config)) {\n throw new IllegalArgumentException(\"eglChooseConfig#2 failed\");\n }\n\n\n //6,\n int[] attrib_list = {EGL14.EGL_CONTEXT_CLIENT_VERSION, 2,\n EGL10.EGL_NONE};\n\n\n if (eglContext != null) {\n //如果不是null,\n mEglContext = mEgl.eglCreateContext(mEglDisplay,\n configs[0], eglContext, attrib_list);\n } else {\n //如果是null,创建一个新的eglContext\n mEglContext = mEgl.eglCreateContext(mEglDisplay,\n configs[0], EGL10.EGL_NO_CONTEXT, attrib_list);\n }\n\n //7.\n mEglSurface = mEgl.eglCreateWindowSurface(mEglDisplay,\n configs[0],\n surface,\n null\n );\n\n if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {\n int error = mEgl.eglGetError();\n if (error == EGL10.EGL_BAD_NATIVE_WINDOW) {\n Log.e(\"EglHelper\", \"createWindowSurface returned EGL_BAD_NATIVE_WINDOW.(创建surface失败)\");\n }\n }\n\n //8\n\n\n if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {\n throw new IllegalArgumentException(\"eglMakeCurrent failed \" + mEgl.eglGetError());\n }\n\n }", "private void dialogNoCamera() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setMessage(\"Your device has no cameras!\")\n\t\t\t\t.setCancelable(false)\n\t\t\t\t.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tAlertDialog alert = builder.create();\n\t\talert.show();\n\t}", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA)) {\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) {\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) {\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private void showRequestPermissionRationale() {\n final AlertDialog dialog = new AlertDialog.Builder(this)\n .setMessage(\"WiFiAugumentedReality requires camera permission\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(WiFiAugmentedRealityActivity.this,\n new String[]{CAMERA_PERMISSION}, CAMERA_PERMISSION_CODE);\n }\n })\n .create();\n dialog.show();\n }", "public void init(GL2 gl) {\n\t}", "public boolean checkCameraHardware(Context context) {\n if(context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) {\n return true;\n }\n else {\n return false;\n }\n }", "public void check() {\n String provider = Settings.Secure.getString(context.getContentResolver(),\n Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\n if (!provider.equals(\"\")) {\n checkConnectivity();\n } else {\n showDialog();\n }\n }", "public void start() {\n try {\n //getting the capabilities object of GL2 profile\n final GLProfile profile = GLProfile.get(GLProfile.GL2);\n GLCapabilities capabilities = new GLCapabilities(profile);\n\n // The canvas\n final GLCanvas glcanvas = new GLCanvas(capabilities);\n Renderer s = new Renderer();\n glcanvas.addGLEventListener(s);\n glcanvas.addMouseListener(s);\n glcanvas.addMouseMotionListener(s);\n glcanvas.addKeyListener(s);\n glcanvas.setSize(1024, 780);\n //creating frame\n final Frame frame = new Frame (\" Budik\");\n final JButton btHelp = new JButton(\"?\");\n final Help help;\n help = new Help();\n JToolBar tlacitka = new JToolBar(\"Help\");\n tlacitka.add(btHelp);\n frame.add(tlacitka, BorderLayout.NORTH);\n btHelp.setMnemonic(KeyEvent.VK_F1);\n btHelp.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n JDialog dialog = new JDialog(frame);\n JTextArea textArea = new JTextArea(help.getText());\n textArea.setBackground(help.getBackround());\n textArea.setEditable(false);\n dialog.add(textArea);\n dialog.setTitle(help.getTitle());\n dialog.setSize(new Dimension(800, 600));\n dialog.setLocationRelativeTo(frame);\n dialog.setModal(true);\n dialog.setVisible(true);\n }\n });\n\n\n\n frame.add(glcanvas);\n frame.setSize( 1024, 780 );\n frame.setVisible(true);\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n super.windowClosing(e);\n System.exit(0);\n }\n });\n\n final FPSAnimator animator = new FPSAnimator(glcanvas,30,true);\n animator.start();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void showChoosePictureDialog() {\n String[] permissions = PermissionConstants.checkIfPermissionsAreGranted(this,\n PermissionConstants.READ_STORAGE, PermissionConstants.WRITE_STORGAE,\n PermissionConstants.CAMERA);\n if(permissions.length > 0) {\n PermissionConstants.askForPermissions(this, PERMISSIONS_REQUEST, permissions);\n } else {\n EasyImage.openChooserWithGallery(this, \"\", 0);\n }\n }", "void onCameraPermissionNotAvailable() {\n super.stopPlayback();\n\n //Stop eye tracking.\n stopEyeTracking();\n\n //start light sensor because eye tracking is not running we don't need light sensor now\n mLightIntensityManager.stopLightMonitoring();\n\n mUserAwarenessListener.onErrorOccurred(Errors.CAMERA_PERMISSION_NOT_AVAILABLE);\n }", "protected void initAvailableExtensions() {\n if (availableExtensionCache.isEmpty()) {\n GL gl = context.getGL();\n if (DEBUG) {\n System.err.println(\"!!! Pre-caching extension availability\");\n }\n String allAvailableExtensions =\n gl.glGetString(GL.GL_EXTENSIONS) + \" \" + context.getPlatformExtensionsString();\n if (DEBUG) {\n System.err.println(\"!!! Available extensions: \" + allAvailableExtensions);\n System.err.println(\"!!! GL vendor: \" + gl.glGetString(GL.GL_VENDOR));\n }\n StringTokenizer tok = new StringTokenizer(allAvailableExtensions);\n while (tok.hasMoreTokens()) {\n String availableExt = tok.nextToken().trim();\n availableExt = availableExt.intern();\n availableExtensionCache.add(availableExt);\n if (DEBUG) {\n System.err.println(\"!!! Available: \" + availableExt);\n }\n }\n \n // Put GL version strings in the table as well\n Version version = new Version(gl.glGetString(GL.GL_VERSION));\n int major = version.getMajor();\n int minor = version.getMinor();\n // FIXME: this needs to be adjusted when the major rev changes\n // beyond the known ones\n while (major > 0) {\n while (minor >= 0) {\n availableExtensionCache.add(\"GL_VERSION_\" + major + \"_\" + minor);\n if (DEBUG) {\n System.err.println(\"!!! Added GL_VERSION_\" + major + \"_\" + minor + \" to known extensions\");\n }\n --minor;\n }\n \n switch (major) {\n case 2:\n // Restart loop at version 1.5\n minor = 5;\n break;\n case 1:\n break;\n }\n \n --major;\n }\n \n // put a dummy var in here so that the cache is no longer empty even if\n // no extensions are in the GL_EXTENSIONS string\n availableExtensionCache.add(\"<INTERNAL_DUMMY_PLACEHOLDER>\");\n }\n }", "public interface IGLWrapper {\n\n /** Indicates that the color buffer should be cleared. */\n int GL_COLOR_BUFFER_BIT = 0x00004000;\n /** Indicates that elements should be drawn as triangles using indices. */\n int GL_TRIANGLES = 0x0004;\n /** Indicates that the texture should be loaded to 2D. */\n int GL_TEXTURE_2D = 0x0DE1;\n /** Indicates that the data type is an unsigned short. */\n int GL_UNSIGNED_SHORT = 0x1403;\n /** Indicates that the data type is a float. */\n int GL_FLOAT = 0x1406;\n /** Indicates that the fragment shader should be loaded. */\n int GL_FRAGMENT_SHADER = 0x8B30;\n /** Indicates that the vertex shader should be loaded. */\n int GL_VERTEX_SHADER = 0x8B31;\n /** Indicates that the nearest neighbor should be used for interpolation. */\n int GL_NEAREST = 0x2600;\n /** Indicates that the texture magnification filter should be modified. */\n int GL_TEXTURE_MAG_FILTER = 0x2800;\n /** Indicates that the texture minification filter should be modified. */\n int GL_TEXTURE_MIN_FILTER = 0x2801;\n /** The 0th texture location. */\n int GL_TEXTURE0 = 0x84C0;\n\n /**\n * Checks whether the application is on desktop or Android.\n * @return True if the application is on desktop, false if on Android.\n */\n boolean isDesktopGL();\n\n /**\n * Sets the active texture index.\n * @param texture The active texture index.\n */\n void glActiveTexture(int texture);\n\n /**\n * Attaches a shader to a shader program.\n * @param program The program to attach the shader to.\n * @param shader The shader to attach to the program.\n */\n void glAttachShader(int program, int shader);\n\n /**\n * Binds a texture to a texture index.\n * @param target The texture index to bind to.\n * @param texture The texture to bind.\n */\n void glBindTexture(int target, int texture);\n\n /**\n * Sets the background color.\n * @param mask A bitmask containing the background color.\n */\n void glClear(int mask);\n\n /**\n * Sets the background color.\n * @param red The red component of the color.\n * @param green The green component of the color.\n * @param blue The blue component of the color.\n * @param alpha The alpha component of the color.\n */\n void glClearColor(float red, float green, float blue, float alpha);\n\n /**\n * Compiles a shader.\n * @param shader The shader to compile.\n */\n void glCompileShader(int shader);\n\n /**\n * Creates a shader program.\n * @return The created shader program.\n */\n int glCreateProgram();\n\n /**\n * Initializes a shader.\n * @param type The type of shader to initialize.\n * @return The initialized shader.\n */\n int glCreateShader(int type);\n\n /**\n * Disables a vertex attribute.\n * @param index The vertex attribute to disable.\n */\n void glDisableVertexAttribArray(int index);\n\n /**\n * Draws vertices on the screen.\n * @param mode The drawing mode to use.\n * @param count The number of vertices to draw.\n * @param type The primitive data type of the vertices.\n * @param indices The vertices to draw.\n * @param bufferIndex The index of the buffer handle to use.\n * @param bufferSize The size of the triangle buffer.\n */\n void glDrawElements(int mode, int count, int type,\n Buffer indices, int bufferIndex, int bufferSize);\n\n /**\n * Enables a vertex attribute.\n * @param index The vertex attribute to enable.\n */\n void glEnableVertexAttribArray(int index);\n\n /**\n * Generates textures in a given array.\n * @param n The number of textures to generate.\n * @param textures The array to generate textures in.\n * @param offset The offset for the starting position in the array to generate textures at.\n */\n void glGenTextures(int n, int[] textures, int offset);\n\n /**\n * Gets a shader attribute.\n * @param program The program to get the shader attribute from.\n * @param name The name of the shader attribute to get.\n * @return The specified shader attribute.\n */\n int glGetAttribLocation(int program, String name);\n\n /**\n * Gets a uniform shader attribute.\n * @param program The program to get the shader attribute from.\n * @param name The name of the uniform shader attribute to get.\n * @return The specified uniform shader attribute.\n */\n int glGetUniformLocation(int program, String name);\n\n /**\n * Links a shader program to OpenGL.\n * @param program The program to link.\n */\n void glLinkProgram(int program);\n\n /**\n * Loads shader code into a shader.\n * @param shader The shader to load code into.\n * @param string The shader code to load.\n */\n void glShaderSource(int shader, String string);\n\n /**\n * Sets the texture paramters for OpenGL.\n * @param target The type of the currently active texture.\n * @param pname The parameter to set.\n * @param param The value to set the parameter to.\n */\n void glTexParameteri(int target, int pname, int param);\n\n /**\n * Sets a uniform shader attribute.\n * @param location The attribute to set.\n * @param x The value to set the attribute to.\n */\n void glUniform1i(int location, int x);\n\n /**\n * Sets a uniform shader attribute.\n * @param location The attribute to set.\n * @param count The number of elements in the new value.\n * @param v The value to set the attribute to.\n * @param offset The offset of the starting index to set.\n */\n void glUniform4fv(int location, int count, float[] v, int offset);\n\n /**\n * Sets a matrix attribute.\n * @param location The matrix attribute to set.\n * @param count The number of elements in the array of matrices.\n * @param transpose Whether to transpose the matrix.\n * @param value The value to set the matrix to.\n * @param offset The offset of the starting index to set in the array of matrices.\n */\n void glUniformMatrix4fv(int location, int count, boolean transpose,\n float[] value, int offset);\n\n /**\n * Sets a shader program to be used by OpenGL.\n * @param program The program to use.\n */\n void glUseProgram(int program);\n\n /**\n * Sets the initial vertices in the vertex shader.\n * @param indx The vertex attribute to use.\n * @param size The number of coordinates per vertex.\n * @param type The type of primitive that the vertices are stored as.\n * @param normalized Whether the vertices are normalized.\n * @param stride The number of bytes per vertex.\n * @param ptr The vertex array.\n * @param bufferIndex The index of the buffer handle to use.\n * @param bufferSize The size of the vertex array in bytes.\n */\n void glVertexAttribPointer(int indx, int size, int type, boolean normalized,\n int stride, Buffer ptr, int bufferIndex, int bufferSize);\n\n /**\n * Sets the viewport of the camera.\n * @param x The x coordinate of the viewport's center.\n * @param y The y coordinate of the viewport's center.\n * @param width The width of the viewport.\n * @param height The height of the viewport.\n */\n void glViewport(int x, int y, int width, int height);\n\n /**\n * Loads a texture into OpenGL.\n * @param target The texture to load the bitmap to.\n * @param level The detail level of the image.\n * @param resourceId The image file to load from\n * @param border 0.\n */\n void texImage2D(int target, int level, int resourceId, int border);\n\n /**\n * Cleans up OpenGL after closing the desktop application.\n */\n void exit(int vertexShader, int fragmentShader);\n}", "@Override\n\tprotected void checkHardware() {\n\t\tsuper.checkHardware();\n\t}", "private void setup2DGraphics() {\n\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\t\tGL11.glOrtho(0, width, 0, height, 1, -1);\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}", "private void openModeOptions2X() {\n if (mDevice.hasObject(By.res(UI_PACKAGE_NAME, \"mode_options_buttons\"))) {\n return;\n }\n // Before openning the mode option, close the menu if the menu is open\n closeMenu();\n waitForVideoShutterEnabled();\n // Open the mode options to check HDR mode\n UiObject2 modeoptions = getModeOptionsMenuButton();\n if (modeoptions != null) {\n modeoptions.click();\n // If succeeded, the hdr toggle button should be visible.\n mDevice.wait(Until.hasObject(By.res(UI_PACKAGE_NAME, \"hdr_plus_toggle_button\")),\n DIALOG_TRANSITION_WAIT);\n } else {\n throw new UnknownUiException(\n \"Fail to find modeoption button when trying to check HDR mode\");\n }\n }", "private boolean checkCameraHardware(Context context) {\n\t if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\n\t // this device has a camera\n\t Log.d(TAG, \"this device has a camera\");\n\t return true;\n\t } else {\n\t // no camera on this device\n\t Log.d(TAG, \"no camera on this device\");\n\t return false;\n\t }\n\t}", "public void initialize()\r\n\t{\r\n\t\tgl.glClearColor(0.0F, 0.0F, 0.0F, 1.0F);\r\n\t\t// initialize blending for transparency\r\n\t\tgl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\r\n\t\tgl.glEnable(GL_DEPTH_TEST);\r\n\t\tgl.glEnable(GL_DITHER);\r\n\t\t//gl.disable(GL_ALPHA_TEST);\r\n\t\t//gl.disable(GL_COLOR_MATERIAL);\r\n\t\tgl.glShadeModel(GL_SMOOTH);\r\n\t\tgl.glDepthFunc( GL_LEQUAL );\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\r\n\t\tgl.glPixelStorei(GL_UNPACK_ALIGNMENT, 1);\r\n\t\tgl.glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);\r\n\t\tgl.glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 1);\r\n\t\tglj.gljCheckGL();\r\n\t}", "private void checkLegal(int glId)\n {\n if (glId == GL2.GL_POLYGON_MODE || glId == GL2.GL_COLOR_MATERIAL_PARAMETER)\n return;\n if (GLState.TEXTURE_GROUP <= glId && glId < GLState.TEXTURE_GROUP + GLState.TEXTURE_GROUP_SIZE)\n return;\n throw new IllegalArgumentException(\"GLStateComponentII: unknown glId: \" + glId);\n }", "@Override\n protected Result check()\n {\n return this.gitLabModeInfos.isEmpty() ? Result.unhealthy(\"No GitLab modes available\") : Result.healthy();\n }", "private void initGL() {\r\n glClearColor(0.0f, 0.0f, 0.0f, 0.0f);\r\n glMatrixMode(GL_PROJECTION);\r\n glLoadIdentity();\r\n\r\n glOrtho(-320, 320, -240, 240, 1, -1);\r\n\r\n glMatrixMode(GL_MODELVIEW);\r\n glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\r\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:16.407 -0500\", hash_original_method = \"CC5C6C40253D90C1249B907D63B6D41E\", hash_generated_method = \"54A78BAD8CCD73ADA3E17904BD5ECFE7\")\n \n public boolean eglWaitGL(){\n \treturn getTaintBoolean();\n }", "private void checkCameraPermission() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.CAMERA)) {\n\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.CAMERA},\n 0);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n cameraView = (JavaCameraView) findViewById(R.id.camera);\n cameraView.setVisibility(SurfaceView.VISIBLE);\n cameraView.setCvCameraViewListener(this);\n\n mLoaderCallback = new BaseLoaderCallback(this) {\n\n @Override\n public void onManagerConnected(int status) {\n switch (status) {\n case LoaderCallbackInterface.SUCCESS: {\n Log.i(\"\", \"Opencv loading success.\");\n cameraView.enableView();\n break;\n }\n default: {\n Log.i(\"OPENCV\", \"Opencv loading failed!\");\n super.onManagerConnected(status);\n }\n break;\n }\n }\n };\n }\n }", "@Override\n\tpublic void onSurfaceCreated(GL10 gl,EGLConfig config){\n\t\t//OpenGL-ES version check\n\t\tString glesVersion = gl.glGetString(GL10.GL_VERSION);\n\t\tSystem.out.println(\"RTR:\" + glesVersion);\n\t\t\n\t\tString glslVersion = gl.glGetString(GLES32.GL_SHADING_LANGUAGE_VERSION);\n\t\tSystem.out.println(\"RTR: Shading lang version:\"+ glslVersion);\n\t\t\n\t\tinitialize(gl);\n\t}", "@Override\n public void postRender(GL2 gl)\n {\n gl.glDisable(GL.GL_TEXTURE_2D);\n }", "public void makeNothingCurrent() {\n if (!argonEGL.eglMakeCurrent(argonGLDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE,\n \t\tEGL10.EGL_NO_CONTEXT)) {\n throw new RuntimeException(\"eglMakeCurrent failed\");\n }\n }", "public void permission_check() {\n //Usage Permission\n if (!isAccessGranted()) {\n new LovelyStandardDialog(MainActivity.this)\n .setTopColorRes(R.color.colorPrimaryDark)\n .setIcon(R.drawable.ic_perm_device_information_white_48dp)\n .setTitle(getString(R.string.permission_check_title))\n .setMessage(getString(R.string.permission_check_message))\n .setPositiveButton(android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(android.provider.Settings.ACTION_USAGE_ACCESS_SETTINGS);\n startActivity(intent);\n }\n })\n .setNegativeButton(android.R.string.no, null)\n .show();\n }\n }", "private void openSelectedProfileError() {\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Error Opening Profile\");\n alert.setHeaderText(null);\n alert.setContentText(\"An error occurred while opening the selected profile.\");\n alert.showAndWait();\n }", "@Override\n public void onConfigureFailed(CameraCaptureSession session) {\n Toast.makeText(mContext, \"onConfigureFailed\", Toast.LENGTH_LONG).show();\n }", "public void start() {\r\n if (MotoConfig.KEY_LOG) {\r\n Log.w(\"EglHelper\", \"start() tid=\" + Thread.currentThread().getId());\r\n }\r\n /*\r\n * Get an EGL instance\r\n */\r\n mEgl = (EGL10) EGLContext.getEGL();\r\n\r\n /*\r\n * Get to the default display.\r\n */\r\n mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);\r\n\r\n if (mEglDisplay == EGL10.EGL_NO_DISPLAY) {\r\n throw new RuntimeException(\"eglGetDisplay failed\");\r\n }\r\n\r\n /*\r\n * We can now initialize EGL for that display\r\n */\r\n int[] version = new int[2];\r\n if(!mEgl.eglInitialize(mEglDisplay, version)) {\r\n throw new RuntimeException(\"eglInitialize failed\");\r\n }\r\n mEglConfig = mEGLConfigChooser.chooseConfig(mEgl, mEglDisplay);\r\n\r\n /*\r\n * Create an EGL context. We want to do this as rarely as we can, because an\r\n * EGL context is a somewhat heavy object.\r\n */\r\n mEglContext = mEGLContextFactory.createContext(mEgl, mEglDisplay, mEglConfig);\r\n if (mEglContext == null || mEglContext == EGL10.EGL_NO_CONTEXT) {\r\n mEglContext = null;\r\n throw new EglCreateContextException(\"createContext\");\r\n }\r\n if (MotoConfig.KEY_LOG) {\r\n Log.d(\"EglHelper\", \"createContext \" + mEglContext \r\n \t\t+ \" tid=\" + Thread.currentThread().getId());\r\n }\r\n\r\n mEglSurface = null;\r\n }", "public void tryLogin() {\n\t\tcontroller.setupClient(txtNickname.getText());\n\t\tString cardDesign = comboBoxCardDesign.getSelectionModel()\n\t\t\t\t.getSelectedItem();\n\t\tConfiguration.chooseCardDesign(cardDesign);\n\t\tConfiguration.chooseMeepleDesign(cardDesign);\n\t}", "@Test\n public void forceUseTextureViewMode_whenNonLegacyDevice_andInRemoteDisplayMode() {\n assumeTrue(Build.VERSION.SDK_INT <= 24);\n final PreviewView previewView = new PreviewView(mContext);\n\n // Provides mock CameraInfo to make the device return non-legacy type.\n final CameraInfo cameraInfo = createCameraInfo(CameraInfo.IMPLEMENTATION_TYPE_CAMERA2);\n\n // Simulates the remote display mode by adding an additional display and returns the\n // second display's id when PreviewView is querying the default display's id.\n int secondDisplayId = addNewDisplay();\n WindowManager windowManager =\n (WindowManager) ApplicationProvider.getApplicationContext().getSystemService(\n Context.WINDOW_SERVICE);\n Shadows.shadowOf(windowManager.getDefaultDisplay()).setDisplayId(secondDisplayId);\n\n previewView.setImplementationMode(PreviewView.ImplementationMode.PERFORMANCE);\n Preview.SurfaceProvider surfaceProvider = previewView.getSurfaceProvider();\n mSurfaceRequest = createSurfaceRequest(cameraInfo);\n surfaceProvider.onSurfaceRequested(mSurfaceRequest);\n assertThat(previewView.mImplementation).isInstanceOf(TextureViewImplementation.class);\n }", "@Override\n\tpublic void initCameraGlSurfaceView() {\n\t\t\n\t}", "int GL_ACTIVE_TEXTURE();", "private void onProviderInstallerNotAvailable() {\n Toast.makeText(this, \"Unable to update your security settings and SSL security may not avialble\", Toast.LENGTH_SHORT).show();\n }", "@Test\n\tpublic void testMismatchingCalibrationsShowsWarningDialog() throws Exception {\n\t\tfinal String unit = \"mm\";\n\t\tfinal DefaultLinearAxis xAxis = new DefaultLinearAxis(Axes.X, unit, 0.5);\n\t\tfinal DefaultLinearAxis yAxis = new DefaultLinearAxis(Axes.Y, unit, 0.6);\n\t\tfinal DefaultLinearAxis zAxis = new DefaultLinearAxis(Axes.Z, unit, 0.6);\n\t\tfinal DefaultLinearAxis tAxis = new DefaultLinearAxis(Axes.TIME);\n\t\tfinal Img<BitType> img = ArrayImgs.bits(1, 1, 1, 1);\n\t\tfinal ImgPlus<BitType> imgPlus = new ImgPlus<>(img, \"Test image\", xAxis,\n\t\t\tyAxis, zAxis, tAxis);\n\n\t\t// Mock UI\n\t\tfinal UserInterface mockUI = mock(UserInterface.class);\n\t\tfinal SwingDialogPrompt mockPrompt = mock(SwingDialogPrompt.class);\n\t\twhen(mockUI.dialogPrompt(eq(IsosurfaceWrapper.BAD_SCALING), anyString(), eq(\n\t\t\tWARNING_MESSAGE), any())).thenReturn(mockPrompt);\n\t\tIMAGE_J.ui().setDefaultUI(mockUI);\n\n\t\t// Run plugin\n\t\tIMAGE_J.command().run(IsosurfaceWrapper.class, true, \"inputImage\", imgPlus,\n\t\t\t\"exportSTL\", false).get();\n\n\t\t// Verify that warning dialog about result scaling got shown once\n\t\tverify(mockUI, after(100).times(1)).dialogPrompt(eq(\n\t\t\tIsosurfaceWrapper.BAD_SCALING), anyString(), eq(WARNING_MESSAGE), any());\n\t}", "@Test\n public void forceUseTextureViewMode_whenLegacyDevice_andInRemoteDisplayMode() {\n assumeTrue(Build.VERSION.SDK_INT <= 24);\n final PreviewView previewView = new PreviewView(mContext);\n\n // Provides mock CameraInfo to make the device return legacy type.\n final CameraInfo cameraInfo = createCameraInfo(\n CameraInfo.IMPLEMENTATION_TYPE_CAMERA2_LEGACY);\n\n // Simulates the remote display mode by adding an additional display and returns the\n // second display's id when PreviewView is querying the default display's id.\n int secondDisplayId = addNewDisplay();\n WindowManager windowManager =\n (WindowManager) ApplicationProvider.getApplicationContext().getSystemService(\n Context.WINDOW_SERVICE);\n Shadows.shadowOf(windowManager.getDefaultDisplay()).setDisplayId(secondDisplayId);\n\n previewView.setImplementationMode(PreviewView.ImplementationMode.PERFORMANCE);\n Preview.SurfaceProvider surfaceProvider = previewView.getSurfaceProvider();\n mSurfaceRequest = createSurfaceRequest(cameraInfo);\n surfaceProvider.onSurfaceRequested(mSurfaceRequest);\n assertThat(previewView.mImplementation).isInstanceOf(TextureViewImplementation.class);\n }", "public interface EglBase {\n // EGL wrapper for an actual EGLContext.\n public interface Context { long getNativeEglContext(); }\n\n // According to the documentation, EGL can be used from multiple threads at the same time if each\n // thread has its own EGLContext, but in practice it deadlocks on some devices when doing this.\n // Therefore, synchronize on this global lock before calling dangerous EGL functions that might\n // deadlock. See https://bugs.chromium.org/p/webrtc/issues/detail?id=5702 for more info.\n public static final Object lock = new Object();\n\n // These constants are taken from EGL14.EGL_OPENGL_ES2_BIT and EGL14.EGL_CONTEXT_CLIENT_VERSION.\n // https://android.googlesource.com/platform/frameworks/base/+/master/opengl/java/android/opengl/EGL14.java\n // This is similar to how GlSurfaceView does:\n // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.1.1_r1/android/opengl/GLSurfaceView.java#760\n public static final int EGL_OPENGL_ES2_BIT = 4;\n // Android-specific extension.\n public static final int EGL_RECORDABLE_ANDROID = 0x3142;\n\n // clang-format off\n public static final int[] CONFIG_PLAIN = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL10.EGL_NONE\n };\n public static final int[] CONFIG_RGBA = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_ALPHA_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL10.EGL_NONE\n };\n public static final int[] CONFIG_PIXEL_BUFFER = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,\n EGL10.EGL_NONE\n };\n public static final int[] CONFIG_PIXEL_RGBA_BUFFER = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_ALPHA_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,\n EGL10.EGL_NONE\n };\n public static final int[] CONFIG_RECORDABLE = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL_RECORDABLE_ANDROID, 1,\n EGL10.EGL_NONE\n };\n // clang-format on\n\n /**\n * Create a new context with the specified config attributes, sharing data with |sharedContext|.\n * If |sharedContext| is null, a root context is created. This function will try to create an EGL\n * 1.4 context if possible, and an EGL 1.0 context otherwise.\n */\n public static EglBase create(@Nullable Context sharedContext, int[] configAttributes) {\n return (EglBase14.isEGL14Supported()\n && (sharedContext == null || sharedContext instanceof EglBase14.Context))\n ? new EglBase14((EglBase14.Context) sharedContext, configAttributes)\n : new EglBase10((EglBase10.Context) sharedContext, configAttributes);\n }\n\n /**\n * Helper function for creating a plain root context. This function will try to create an EGL 1.4\n * context if possible, and an EGL 1.0 context otherwise.\n */\n public static EglBase create() {\n return create(null /* shaderContext */, CONFIG_PLAIN);\n }\n\n /**\n * Helper function for creating a plain context, sharing data with |sharedContext|. This function\n * will try to create an EGL 1.4 context if possible, and an EGL 1.0 context otherwise.\n */\n public static EglBase create(Context sharedContext) {\n return create(sharedContext, CONFIG_PLAIN);\n }\n\n /**\n * Explicitly create a root EGl 1.0 context with the specified config attributes.\n */\n public static EglBase createEgl10(int[] configAttributes) {\n return new EglBase10(null /* shaderContext */, configAttributes);\n }\n\n /**\n * Explicitly create a root EGl 1.0 context with the specified config attributes\n * and shared context.\n */\n public static EglBase createEgl10(\n javax.microedition.khronos.egl.EGLContext sharedContext, int[] configAttributes) {\n return new EglBase10(new EglBase10.Context(sharedContext), configAttributes);\n }\n\n /**\n * Explicitly create a root EGl 1.4 context with the specified config attributes.\n */\n public static EglBase createEgl14(int[] configAttributes) {\n return new EglBase14(null /* shaderContext */, configAttributes);\n }\n\n /**\n * Explicitly create a root EGl 1.4 context with the specified config attributes\n * and shared context.\n */\n public static EglBase createEgl14(\n android.opengl.EGLContext sharedContext, int[] configAttributes) {\n return new EglBase14(new EglBase14.Context(sharedContext), configAttributes);\n }\n\n void createSurface(Surface surface);\n\n // Create EGLSurface from the Android SurfaceTexture.\n void createSurface(SurfaceTexture surfaceTexture);\n\n // Create dummy 1x1 pixel buffer surface so the context can be made current.\n void createDummyPbufferSurface();\n\n void createPbufferSurface(int width, int height);\n\n Context getEglBaseContext();\n\n boolean hasSurface();\n\n int surfaceWidth();\n\n int surfaceHeight();\n\n void releaseSurface();\n\n void release();\n\n void makeCurrent();\n\n // Detach the current EGL context, so that it can be made current on another thread.\n void detachCurrent();\n\n void swapBuffers();\n\n void swapBuffers(long presentationTimeStampNs);\n}", "private void checkBlFunctAdvert() {\n if (blAdapt.isMultipleAdvertisementSupported()) {\n checkPermLocation();\n } else {\n DialogCreator.createDialogAlert(this, R.string.txt_bl_adv_needed, R.string.txt_bl_descr_adv_needed, R.string.txt_ok, null,\n new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialog) {\n finish();\n }\n });\n }\n }", "public void onOppoSystemReady() {\n warn(\"onOppoSystemReady\");\n }", "void showRealSenseCongratulations() {\n\t\tshowInput3DCongratulations(\n\t\t\t\tgetLocalization().getMenu(\"RealSense.DetectedMessage\"),\n\t\t\t\tREALSENSE_TUTORIAL);\n\t}", "@Override\n public void onPermissionsChecked(MultiplePermissionsReport report) {\n if (report.areAllPermissionsGranted()) {\n // Toast.makeText(getApplicationContext(), \"All permissions are granted!\", Toast.LENGTH_SHORT).show();\n camera.selectImage(iv_update_profile_pic, 0);\n }\n\n // check for permanent denial of any permission\n if (!report.areAllPermissionsGranted()) {\n // show alert dialog navigating to Settings\n showSettingsDialog();\n }\n }", "private void unsupportedModule() {\n Log.e(\"Unsupported Module\", \"Selected module is not supported by your board!\");\n }", "public void initGui()\r\n\t{\r\n\t\tthis.viewportTexture = new DynamicTexture(256, 256);\r\n\t\tthis.backgroundTexture = this.mc.getTextureManager().getDynamicTextureLocation(\"background\", this.viewportTexture);\r\n\t\tthis.widthCopyright = this.fontRenderer.getStringWidth(\"Copyright Mojang AB. Do not distribute!\");\r\n\t\tthis.widthCopyrightRest = this.width - this.widthCopyright - 2;\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(new Date());\r\n\r\n\t\tif (calendar.get(2) + 1 == 12 && calendar.get(5) == 24)\r\n\t\t{\r\n\t\t\tthis.splashText = \"Merry X-mas!\";\r\n\t\t}\r\n\t\telse if (calendar.get(2) + 1 == 1 && calendar.get(5) == 1)\r\n\t\t{\r\n\t\t\tthis.splashText = \"Happy new year!\";\r\n\t\t}\r\n\t\telse if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31)\r\n\t\t{\r\n\t\t\tthis.splashText = \"OOoooOOOoooo! Spooky!\";\r\n\t\t}\r\n\r\n\t\tint i = 24;\r\n\t\tint j = this.height / 4 + 48;\r\n\r\n\t\tif (this.mc.isDemo())\r\n\t\t{\r\n\t\t\tthis.addDemoButtons(j, 24);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthis.addSingleplayerMultiplayerButtons(j, 24);\r\n\t\t}\r\n\r\n\t\tthis.buttonList.add(new GuiButton(0, this.width / 2 - 100, j + 72 + 12, 98, 20, I18n.format(\"menu.options\")));\r\n\t\tthis.buttonList.add(new GuiButton(4, this.width / 2 + 2, j + 72 + 12, 98, 20, I18n.format(\"menu.quit\")));\r\n\r\n\t\tsynchronized (this.threadLock)\r\n\t\t{\r\n\t\t\tthis.openGLWarning1Width = this.fontRenderer.getStringWidth(this.openGLWarning1);\r\n\t\t\tthis.openGLWarning2Width = this.fontRenderer.getStringWidth(this.openGLWarning2);\r\n\t\t\tint k = Math.max(this.openGLWarning1Width, this.openGLWarning2Width);\r\n\t\t\tthis.openGLWarningX1 = (this.width - k) / 2;\r\n\t\t\tthis.openGLWarningY1 = (this.buttonList.get(0)).y - 24;\r\n\t\t\tthis.openGLWarningX2 = this.openGLWarningX1 + k;\r\n\t\t\tthis.openGLWarningY2 = this.openGLWarningY1 + 24;\r\n\t\t}\r\n\r\n\t\tthis.mc.setConnectedToRealms(false);\r\n\r\n\t\tif (Minecraft.getMinecraft().gameSettings.getOptionOrdinalValue(GameSettings.Options.REALMS_NOTIFICATIONS) && !this.hasCheckedForRealmsNotification)\r\n\t\t{\r\n\t\t\tRealmsBridge realmsbridge = new RealmsBridge();\r\n\t\t\tthis.realmsNotification = realmsbridge.getNotificationScreen(this);\r\n\t\t\tthis.hasCheckedForRealmsNotification = true;\r\n\t\t}\r\n\r\n\t\tif (this.areRealmsNotificationsEnabled())\r\n\t\t{\r\n\t\t\tthis.realmsNotification.setGuiSize(this.width, this.height);\r\n\t\t\tthis.realmsNotification.initGui();\r\n\t\t}\r\n\t}", "protected boolean checkLicense() {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "public void init(int width, int height) {\n try {\n Display.setDisplayMode(new DisplayMode(width, height));\n Display.create();\n } catch (LWJGLException ex) {\n System.exit(0);\n }\n\n GL11.glEnable(GL11.GL_TEXTURE_2D);\n GL11.glEnable(GL11.GL_BLEND);\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n GL11.glTexEnvf(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, GL11.GL_MODULATE);\n GL11.glMatrixMode(GL11.GL_PROJECTION);\n GL11.glLoadIdentity();\n GL11.glOrtho(0, GameConstants.WINDOW_WIDTH, 0, GameConstants.WINDOW_HEIGHT, 1, -1);\n GL11.glMatrixMode(GL11.GL_MODELVIEW);\n }", "private void init()\n {\n glfwSetErrorCallback(errorCallback = errorCallbackPrint(System.err));\n \n if (glfwInit() != GL11.GL_TRUE)\n {\n throw new IllegalStateException( \"Unable to initialize GLFW\" );\n }\n \n glfwDefaultWindowHints();\n glfwWindowHint( GLFW_CONTEXT_VERSION_MAJOR, 4 );\n glfwWindowHint( GLFW_CONTEXT_VERSION_MINOR, 1 );\n glfwWindowHint( GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE );\n glfwWindowHint( GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE );\n glfwWindowHint( GLFW_VISIBLE, GL_FALSE );\n glfwWindowHint( GLFW_RESIZABLE, GL_FALSE );\n \n window = glfwCreateWindow( width, height, \"Rally\", NULL, NULL );\n \n if (window == NULL)\n {\n throw new RuntimeException(\"Failed to create the GLFW window\");\n }\n \n glfwSetKeyCallback(window, keyCallback = GLFWKeyCallback((win, key, scanCode, action, mods) -> keyAction( key, action )));\n \n glfwSetCursorPosCallback(window, cursorPosCallback = GLFWCursorPosCallback((win, x, y) -> cursorPosChanged( x, y )));\n\n glfwSetMouseButtonCallback(window, mouseButtonCallback = GLFWMouseButtonCallback((win, button, action, mods) -> mouseButtonAction( button, action, mods )));\n\n ByteBuffer vidmode = glfwGetVideoMode( glfwGetPrimaryMonitor() );\n // Center our window\n glfwSetWindowPos(\n window,\n (GLFWvidmode.width( vidmode ) - width) / 2,\n (GLFWvidmode.height( vidmode ) - height) / 2\n );\n \n glfwMakeContextCurrent( window );\n glfwSwapInterval( 1 );\n glfwShowWindow( window );\n }", "public void showMissingPermissionsDialog(){\n android.app.AlertDialog.Builder alertDialog = new android.app.AlertDialog.Builder(this);\n\n // Setting Dialog Title\n alertDialog.setTitle(\"Enable Permissions\");\n\n // Setting Dialog Message\n alertDialog.setMessage(\"Application Needs location permissions\");\n\n // On pressing the Settings button.\n alertDialog.setPositiveButton(\"Settings\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int which) {\n launchAppPermissions();\n }\n });\n\n // On pressing the cancel button\n alertDialog.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n finish();\n }\n });\n\n // Showing Alert Message\n alertDialog.show();\n }", "protected abstract void initUnSupportedFeatures();", "private void checkMode() {\n val mode = config.getString(\"mode\");\n\n if (!EnumUtils.isValidEnum(MovieHandler.Type.class, mode)) {\n throw new IllegalArgumentException(\"mode is not valid!\");\n }\n }", "@Override\n public void onFail(Object arg0) {\n LogUtil.log(\"游戏初始化失败\");\n }", "public void checkHealth() {\n if (health == 0) {\n this.texture = new Texture (\"soggy-\" + tex + \".png\");\n }\n }", "public void showUnknownGameIdMessage() {\n Optional<SelectGameScreen> maybeSelectGameScreen = getSelectGameScreenIfActive();\n if (maybeSelectGameScreen.isPresent()) {\n maybeSelectGameScreen.get().showUnknownGameIdMessage();\n } else {\n showError(\"Unknown game id\");\n }\n }", "public void init()\r\n {\r\n\t\t/* initialize the widget */\r\n\t\tint width = gl.getWidth();\r\n\t\tint height = gl.getHeight();\r\n\r\n\t\t// Initialize the rendering viewport size to OpenGL\r\n\t\tgl.viewport( 0, 0, width, height );\r\n\t\tgl.matrixMode( GL.PROJECTION );\t// Set up the camera mode\r\n\t\tgl.loadIdentity();\t\t\t\t\t// Reset the transformation matrix\r\n\t\tif (width <= height)\r\n\t\t\tgl.ortho (-50.0, 50.0, -50.0*(double)height/(double)width,\r\n\t\t\t\t 50.0*(double)height/(double)width, -1.0, 1.0);\r\n\t\telse\r\n\t\t\tgl.ortho (-50.0*(double)width/(double)height,\r\n\t\t\t 50.0*(double)width/(double)height, -50.0, 50.0, -1.0, 1.0);\r\n\t\tgl.matrixMode( GL.MODELVIEW );\t\t// Reset to model transforms\r\n }", "private void showPermissionsAlert() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Permissions required!\")\n .setMessage(\"Camera needs few permissions to work properly. Grant them in settings.\")\n .setPositiveButton(\"GOTO SETTINGS\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n CameraUtils.openSettings(ReceiveActivity.this);\n }\n })\n .setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n\n }\n }).show();\n }", "public XenonEGL(EGLContext sharedContext, int flags) {\n \tthis.argonEGL=(EGL10) EGLContext.getEGL();\n \t\n if (argonGLDisplay != EGL10.EGL_NO_DISPLAY) {\n throw new RuntimeException(\"EGL already set up\");\n }\n\n if (sharedContext == null) {\n sharedContext = EGL10.EGL_NO_CONTEXT;\n }\n\n argonGLDisplay = argonEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);\n if (argonGLDisplay == EGL10.EGL_NO_DISPLAY) {\n throw new RuntimeException(\"unable to get EGL14 display\");\n }\n int[] version = new int[2];\n if (!argonEGL.eglInitialize(argonGLDisplay, version)) {\n argonGLDisplay = null;\n throw new RuntimeException(\"unable to initialize EGL14\");\n }\n\n // Try to get a GLES3 context, if requested.\n if ((flags & FLAG_TRY_GLES3) != 0) {\n //Log.d(TAG, \"Trying GLES 3\");\n EGLConfig config = getConfig(flags, 3);\n if (config != null) {\n int[] attrib3_list = {\n EGL_CONTEXT_CLIENT_VERSION, 3,\n EGL10.EGL_NONE\n };\n EGLContext context = argonEGL.eglCreateContext(argonGLDisplay, config, sharedContext,\n attrib3_list);\n\n if (argonEGL.eglGetError() == EGL10.EGL_SUCCESS) {\n //Log.d(TAG, \"Got GLES 3 config\");\n mEGLConfig = config;\n argonGLContext = context;\n mGlVersion = 3;\n }\n }\n }\n if (argonGLContext == EGL10.EGL_NO_CONTEXT) { // GLES 2 only, or GLES 3 attempt failed\n //Log.d(TAG, \"Trying GLES 2\");\n EGLConfig config = getConfig(flags, 2);\n if (config == null) {\n throw new RuntimeException(\"Unable to find a suitable EGLConfig\");\n }\n int[] attrib2_list = {\n \t\tEGL_CONTEXT_CLIENT_VERSION, 2,\n \t\tEGL10.EGL_NONE\n };\n EGLContext context = argonEGL.eglCreateContext(argonGLDisplay, config, sharedContext,\n attrib2_list);\n checkEglError(\"eglCreateContext\");\n mEGLConfig = config;\n argonGLContext = context;\n mGlVersion = 2;\n }\n\n // Confirm with query.\n int[] values = new int[1];\n argonEGL.eglQueryContext(argonGLDisplay, argonGLContext, EGL_CONTEXT_CLIENT_VERSION,\n values);\n Logger.info(\"EGLContext created, client version \" + values[0]);\n }", "private void showSystemUi()\n\t{\n\t\tif (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB)\n\t\t\treturn;\n\n\t\tmUnityPlayer.setSystemUiVisibility(mUnityPlayer.getSystemUiVisibility() & ~getLowProfileFlag());\n\t}", "private void checkIfR2D2Found() throws Exception {\n\t\tint tortoiseLocationX = Tortoise.getX();\n\t\tint tortoiseLocationY = Tortoise.getY();\n\n\t\tif (tortoiseLocationX <= 510 && tortoiseLocationX >= 505 && tortoiseLocationY >= 110 && tortoiseLocationY <= 115)\n\t\t\tplayEureka();\n\t}", "private void initialize(int api, int width, int height)\n \tthrows VisADException\n {\n mode = new GraphicsModeControlJ2D(this);\n addControl(mode);\n // a ProjectionControl always exists\n projection = new ProjectionControlJ2D(this);\n addControl(projection);\n \n if (api == JPANEL) {\n Component component = new DisplayPanelJ2D(this);\n setComponent(component);\n apiValue = JPANEL;\n }\n else if (api == OFFSCREEN) {\n Component component = null;\n DisplayRendererJ2D renderer = (DisplayRendererJ2D )getDisplayRenderer();\n VisADCanvasJ2D canvas = new VisADCanvasJ2D(renderer, width, height);\n VisADGroup scene = renderer.createSceneGraph(canvas);\n apiValue = OFFSCREEN;\n }\n else {\n throw new DisplayException(\"DisplayImplJ2D: bad graphics API\");\n }\n \n // a GraphicsModeControl always exists\n mode = new GraphicsModeControlJ2D(this);\n addControl(mode);\n // a ProjectionControl always exists\n projection = new ProjectionControlJ2D(this);\n addControl(projection);\n\n }", "public void onSurfaceChanged(GL10 gl, int width, int height)\n {\n\n nativeInitialize(width, height);\n }", "public void check4update() {\r\n\t\tfinal String[] versionCheck = FileUtils.isUpdateAvailable();\r\n\t\tif (new Boolean(versionCheck[0])) {\r\n\t\t\t//if (true) {\r\n\t\t\tMessageBox messageDialog = new MessageBox(GDE.shell, SWT.YES | SWT.NO | SWT.ICON_QUESTION);\r\n\t\t\tmessageDialog.setText(GDE.NAME_LONG);\r\n\t\t\tmessageDialog.setMessage(Messages.getString(MessageIds.GDE_MSGI0052)\r\n\t\t\t//\t\t\t\t+ Messages.getString(MessageIds.GDE_MSGI0056, this.settings.getLocale().equals(Locale.GERMAN) \r\n\t\t\t//\t\t\t\t? new String[] {\r\n\t\t\t//\t\t\t\t\t\"1) Korrektur der initialen Messwert-Synchronisation\\n\",\r\n\t\t\t//\t\t\t\t\t\"2) Korrektur vom Junsi iCharger 206, 208, 306, 3010 konstanten Zeitschritt auf 2 Sekunden\\n\",\r\n\t\t\t//\t\t\t\t\t\"3) Korrektur des Problems bei mehrfachen kopieren der Grafik in die Zwischenablage\\n\",\r\n\t\t\t//\t\t\t\t\t\"4) Korrektur der JLog2 Kontext sensitiven Hilfeseite Auswahl\\n\",\r\n\t\t\t//\t\t\t\t\t\"5) Korrektur des JLog2 Konfigurationsdialoges - Sicherungsknopf wurde nicht aktiviert\\n\",\r\n\t\t\t//\t\t\t\t\t\"6) Korrektur des Fehlers beim Laden der Farben von der OSD-Datei\\n\",\r\n\t\t\t//\t\t\t\t\t\"7) CSV2SerialAdapter - Fehlender Status wird jetzt als Fehler erkannt\\n\",\r\n\t\t\t//\t\t\t\t\t\"8) HoTTAdapter - Korrektur der Einlesealgorithmus bei ausgewählter Kanalinformation und Empfänger\\n\",\r\n\t\t\t//\t\t\t\t\t\"9) HoTTAdapter* - Anpassung der Käpazitätsfilter an die aktuelle Leistung (ESC, GAM, EAM)\\n\",\r\n\t\t\t//\t\t\t\t\t\"10) HoTTAdapter* - Anpassung des Stromfilters beim ESC\",\r\n\t\t\t//\t\t\t\t\t\"11) HoTTAdapter2* - Korrektur der Skalensynchronisationsreferenz in der Konfiguration Kanäle und MotorControl\\n\",\r\n\t\t\t//\t\t\t\t\t\"12) GPS-Logger* - GPX-Export ermöglicht z.B. Garmin Virb\\n\",\r\n\t\t\t//\t\t\t\t\t\"13) UniLog2 - Korrektur fehlender M-Link Werte aus der Logdatei\\n\",\r\n\t\t\t//\t\t\t\t\t\"14) UniLog2 - Korrektur des Vehaltens bei Veränderung der Symbole und Einheiten bei M-Link Werten\\n\",\r\n\t\t\t//\t\t\t\t\t\"15) Junsi iCharger 4010 Duo Unterstützung hinzugefügt (lesen von der SD-Karte)\\n\",\r\n\t\t\t//\t\t\t\t\t\"16) Linux CDC ACM Geräte als ttyACM* serieller Port hinzugefügt\\n\"\r\n\t\t\t//\t\t\t}\r\n\t\t\t//\t\t\t: new String[] {\r\n\t\t\t//\t\t\t\t\t\"1) fix initial synchronization of measurements\\n\",\r\n\t\t\t//\t\t\t\t\t\"2) fix Junsi iCharger 206, 208, 306, 3010 constant time step to 2 seconds\\n\",\r\n\t\t\t//\t\t\t\t\t\"3) fix problem while copy graphics into clip board several time in sequence\\n\",\r\n\t\t\t//\t\t\t\t\t\"4) fix JLog2 context help page selection\\n\",\r\n\t\t\t//\t\t\t\t\t\"5) fix JLog2 configuration dialog - set drop downs to editable false since this event wasn't handled and does not activate save button\\n\",\r\n\t\t\t//\t\t\t\t\t\"6) fix error not loading color from OSD file some colors (1,1,1)\\n\",\r\n\t\t\t//\t\t\t\t\t\"7) CSV2SerialAdapter - fix error handling of missing status\\n\",\r\n\t\t\t//\t\t\t\t\t\"8) HoTTAdapter - fix receiver only with channels times 10 error\\n\",\r\n\t\t\t//\t\t\t\t\t\"9) HoTTAdapter* - adapt capacity filter according actual power\\n\",\r\n\t\t\t//\t\t\t\t\t\"10) HoTTAdapter* - adapt current filter\\n\",\r\n\t\t\t//\t\t\t\t\t\"11) HoTTAdapter2* - correct scale sync reference in configuration Channels and SpeedControl\\n\",\r\n\t\t\t//\t\t\t\t\t\"12) GPS-Logger* - enable GPX export (Garmin Virb)\\n\",\r\n\t\t\t//\t\t\t\t\t\"13) UniLog2 - fix missing parsing of M-Link data\\n\",\r\n\t\t\t//\t\t\t\t\t\"14) UniLog2 - fix configuration of symbol and unit for M-Link measurements\\n\",\r\n\t\t\t//\t\t\t\t\t\"15) add Junsi iCharger 4010 Duo support (read log from SD storage)\\n\",\r\n\t\t\t//\t\t\t\t\t\"16) add port enumeration ttyACM* Linux CDC ACM devices\\n\" \r\n\t\t\t//\t\t\t})\r\n\t\t\t);\r\n\t\t\tif (SWT.YES == messageDialog.open()) {\r\n\t\t\t\tnew Thread(\"Download\") {\r\n\t\t\t\t\t@Override\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\tString downloadUrl = \"http://download.savannah.gnu.org/releases/dataexplorer/\";\r\n\t\t\t\t\t\t\tString arch = System.getProperty(\"sun.arch.data.model\");\r\n\t\t\t\t\t\t\tString version = versionCheck[1];\r\n\t\t\t\t\t\t\tString filename = GDE.STRING_EMPTY;\r\n\t\t\t\t\t\t\tif (GDE.IS_WINDOWS) //DataExplorer_Setup_3.0.8_win64.exe\r\n\t\t\t\t\t\t\t\tfilename = \"DataExplorer_Setup_\" + version + \"_win\" + arch + GDE.FILE_ENDING_DOT_EXE;\r\n\t\t\t\t\t\t\telse if (GDE.IS_LINUX) //dataexplorer-3.0.8-bin_GNULinux_x86_64.tar.gz\r\n\t\t\t\t\t\t\t\tfilename = \"dataexplorer-\" + version + \"-bin_GNULinux_x86_\" + arch + \".tar.gz\";\r\n\t\t\t\t\t\t\telse if (GDE.IS_MAC) //DataExplorer-3.0.8_Mac_64.dmg\r\n\t\t\t\t\t\t\t\tfilename = \"DataExplorer-\" + version + \"_Mac_\" + arch + \".dmg\";\r\n\r\n\t\t\t\t\t\t\tfinal String targetFilePath = GDE.JAVA_IO_TMPDIR + GDE.FILE_SEPARATOR_UNIX + filename;\r\n\r\n\t\t\t\t\t\t\tif (!new File(targetFilePath).exists()) FileUtils.downloadFile(new URL(downloadUrl + filename), targetFilePath);\r\n\r\n\t\t\t\t\t\t\tGDE.display.syncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tif (GDE.IS_LINUX) {\r\n\t\t\t\t\t\t\t\t\t\tURL url = GDE.class.getProtectionDomain().getCodeSource().getLocation();\r\n\t\t\t\t\t\t\t\t\t\tif (url.getFile().endsWith(GDE.FILE_ENDING_DOT_JAR)) {\r\n\t\t\t\t\t\t\t\t\t\t\tString installpath = url.getFile().substring(0, url.getPath().lastIndexOf(GDE.FILE_SEPARATOR_UNIX));\r\n\t\t\t\t\t\t\t\t\t\t\tinstallpath = installpath.substring(0, installpath.lastIndexOf(GDE.FILE_SEPARATOR_UNIX));\r\n\t\t\t\t\t\t\t\t\t\t\tString command = \"cd \" + installpath + \"; sudo tar -xzf \" + targetFilePath + \"\\\"\";\r\n\t\t\t\t\t\t\t\t\t\t\tlog.log(Level.OFF, \"command = \" + command);\r\n\t\t\t\t\t\t\t\t\t\t\tMessageBox message = new MessageBox(GDE.shell, SWT.ICON_INFORMATION);\r\n\t\t\t\t\t\t\t\t\t\t\tmessage.setText(GDE.NAME_LONG);\r\n\t\t\t\t\t\t\t\t\t\t\tmessage.setMessage(Messages.getString(MessageIds.GDE_MSGI0055, new String[] { command }));\r\n\t\t\t\t\t\t\t\t\t\t\tmessage.open();\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\telse {\r\n\t\t\t\t\t\t\t\t\t\tMessageBox message = new MessageBox(GDE.shell, SWT.YES | SWT.NO | SWT.ICON_INFORMATION);\r\n\t\t\t\t\t\t\t\t\t\tmessage.setText(GDE.NAME_LONG);\r\n\t\t\t\t\t\t\t\t\t\tmessage.setMessage(Messages.getString(MessageIds.GDE_MSGI0053));\r\n\t\t\t\t\t\t\t\t\t\tif (SWT.YES == message.open()) {\r\n\t\t\t\t\t\t\t\t\t\t\tOperatingSystemHelper.launchInstallApplication(targetFilePath);\r\n\t\t\t\t\t\t\t\t\t\t\tGDE.shell.dispose();\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\tcatch (Exception e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}.start();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void displayAboutDialog() {\n final String message = \"AUTHORS\\n\" + \"Kaitlyn Kinerk and Alan Fowler\\n\"\n + \"TCSS 305 - UW Tacoma - 6/8/2016\\n\" + \"\\nIMAGE CREDIT\\n\"\n + \"Background: \"\n + \"http://wallpapercave.com/purple-galaxy-wallpaper\";\n JOptionPane.showMessageDialog(null, message, \"About\", JOptionPane.PLAIN_MESSAGE,\n new ImageIcon(\"icon.gif\"));\n }", "public void loadGLTexture(GL10 gl, Location location)\n\t{\n\t\tgl.glGenTextures(2, textures, 0);\n\n\t\t// loading texture\n\t\tBitmap bitmap;\n\t\tfloat width;\n\t\tfloat height;\n\n\n\t\t// ...and bind it to our array\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);\n\n\t\t// create nearest filtered texture\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);\n\n\t\t// loading texture\n\t\tif (location != null){\n\t\t\tdouble longitude = location.getLongitude();\n\t\t\tif (longitude > 0)\n\t\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LON\" + \" E\" + df.format(Math.abs(longitude)) );\n\t\t\telse if (longitude < 0)\n\t\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LON\" + \" W\" + df.format(Math.abs(longitude)) );\n\t\t\telse\n\t\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LON\" + \" \" + \"000.0000\" );\n\t\t}\n\t\telse\n\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LON\" + \" \" + \"000.0000\");\n\n\t\t// Use Android GLUtils to specify a two-dimensional texture image from our bitmap\n\t\tGLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);\n\n\t\t// calculate the bitmap's size respectively to the size of the screen \n\t\twidth = bitmap.getWidth() / 1000f * FONT_SIZE;\n\t\theight = bitmap.getHeight() / 1000f * FONT_SIZE;\n\n\t\t//Log.v(TAG , \"width : \" + width + \" , height : \" + height );\n\n\t\t// resize the vertices according to the size of the bitmap\n\t\tvertices_long[0] = LONGITUDE_POINT - width; // left\n\t\tvertices_long[3] = LONGITUDE_POINT - width; // left\n\t\tvertices_long[1] = VERTICAL_POINT - height;// bottom\n\t\tvertices_long[7] = VERTICAL_POINT - height;// bottom\n\n\t\t// Clean up\n\t\tbitmap.recycle();\n\n\t\t// ...and bind it to our array\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, textures[1]);\n\n\t\t// create nearest filtered texture\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);\n\n\t\t// loading texture\n\t\tif (location != null){\n\t\t\tdouble latitude = location.getLatitude();\n\t\t\tif (latitude > 0)\n\t\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LAT\" + \" N\" + df.format(Math.abs(latitude)) );\n\t\t\telse if (latitude < 0)\n\t\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LAT\" + \" S\" + df.format(Math.abs(latitude)) );\n\t\t\telse\n\t\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LAT\" + \" \" + \"000.0000\" );\n\t\t}\n\t\telse\n\t\t\tbitmap = GraphicUtil.getLngLatBitmap(\"LAT\" + \" \" + \"000.0000\");\n\n\t\t// Use Android GLUtils to specify a two-dimensional texture image from our bitmap\n\t\tGLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);\n\n\t\t// calculate the bitmap's size respectively to the size of the screen \n\t\twidth = bitmap.getWidth() / 1000f * FONT_SIZE;\n\t\theight = bitmap.getHeight() / 1000f * FONT_SIZE;\n\n\t\t//Log.v(TAG , \"width : \" + width + \" , height : \" + height );\n\n\t\t// resize the vertices according to the size of the bitmap\n\t\tvertices_lat[6] = LATITUDE_POINT + width; // right\n\t\tvertices_lat[9] = LATITUDE_POINT + width; // right\n\t\tvertices_lat[1] = VERTICAL_POINT - height;// bottom\n\t\tvertices_lat[7] = VERTICAL_POINT - height;// bottom\n\n\t\t// Clean up\n\t\tbitmap.recycle(); \n\t}", "public boolean Load( Bitmap bitmap ) //rename this to glLoad and don't have it as an initializer parameter\n\t\t{\n\t\t /*many thanks to sprite method test if this works*/\n\t\t if ( gl == null )\n\t\t {\n\t\t Log.e(TAG, \"Failed to load resource. Context/GL is NULL\");\n\t\t return false;\n\t\t }\n\t\t int error;\n\t\n\t\t int textureName = -1;\n\t\t gl.glGenTextures(1, texture, 0);\n\t\t textureName = texture[0];\n\t\n\t\t gl.glBindTexture(GL10.GL_TEXTURE_2D, textureName);\n\t\t gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);\n\t\t gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);\n\t\t gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE);\n\t\t gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE);\n\t\t gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, GL10.GL_REPLACE);\n\t\n\t\t GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);\n\t\n\t\t mCropWorkspace[0] = 0;\n\t\t mCropWorkspace[1] = bitmap.getHeight();\n\t\t mCropWorkspace[2] = bitmap.getWidth();\n\t\t mCropWorkspace[3] = -bitmap.getHeight();\n\t\n\t\t ((GL11) gl).glTexParameteriv(GL10.GL_TEXTURE_2D, \n\t\t GL11Ext.GL_TEXTURE_CROP_RECT_OES, mCropWorkspace, 0);\n\t\n\t\t error = gl.glGetError();\n\t\t if (error != GL10.GL_NO_ERROR)\n\t\t { \n\t\t Log.e(TAG, \"GL Texture Load Error: \" + error);\n\t\n\t\t }\n\t\t return true;\n\t\t}", "void init(){\n if(DEBUG) Log.d(TAG, \"Creating GlHelper and Surface\");\n mGLHelper = new GLHelper();\n int mDefaultTextureID = 10001;\n SurfaceTexture st = new SurfaceTexture(mDefaultTextureID);\n st.setDefaultBufferSize(mWidth, mHeight);\n mGLHelper.init(st);\n\n textureID = mGLHelper.createOESTexture();\n sTexture = new SurfaceTexture(textureID);\n sTexture.setOnFrameAvailableListener(this);\n surface = new Surface(sTexture);\n }", "public void onSurfaceCreated(GL10 gl, EGLConfig config)\n {\n }", "public void invalidClubs() {\r\n\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\"A club can not play against itself\");\r\n\t}", "@Override\n\t@GLContextRequired\n\tpublic void initGL() {\n\t\tif(Objects.isNull(va)){\n\t\t\tva = new VertexArray(4);\n\t\t\tupdateGL(false);\t\t\n\t\t}\n\t}", "@Override\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tLibNative.init();\n\t}" ]
[ "0.6232311", "0.6163176", "0.57402796", "0.5737742", "0.56206703", "0.55212677", "0.5517904", "0.5427114", "0.5391837", "0.52742684", "0.5247918", "0.52408844", "0.52127403", "0.51941836", "0.5176768", "0.5167874", "0.5157227", "0.5150972", "0.5146916", "0.5134399", "0.5103785", "0.5069775", "0.50661916", "0.50633574", "0.50616956", "0.503061", "0.503061", "0.503061", "0.50176615", "0.50137454", "0.5012364", "0.5010695", "0.50002694", "0.496772", "0.496772", "0.4967005", "0.49598056", "0.49388394", "0.49368694", "0.49313128", "0.49194124", "0.49193636", "0.49093723", "0.48899806", "0.48866534", "0.48693338", "0.48590383", "0.4858444", "0.48484895", "0.48295176", "0.48068506", "0.4788446", "0.4787472", "0.47729456", "0.47356182", "0.471016", "0.47013548", "0.47008", "0.46916008", "0.46906617", "0.4687091", "0.46758065", "0.467099", "0.46581325", "0.46549812", "0.46532857", "0.46482217", "0.46469933", "0.46448192", "0.46224922", "0.4620374", "0.4619638", "0.46183717", "0.4610135", "0.4608556", "0.46068645", "0.46020073", "0.4599895", "0.4593644", "0.45917", "0.45905912", "0.45827898", "0.45794377", "0.45730808", "0.45725033", "0.45712423", "0.4570107", "0.45697948", "0.45695508", "0.4565768", "0.45569772", "0.45491987", "0.45311704", "0.45295033", "0.4522268", "0.45174062", "0.45133367", "0.45093796", "0.4506303", "0.45014396" ]
0.6196923
1
Refreshes the primary view cell with the current avatar in use given the current primary view cell.
public synchronized void refreshAvatarInUse(ViewCell viewCell, boolean isLocal) { // Once the avatar loader is ready and the primary view has been set, // we tell the avatar cell component to set it's avatar in use. AvatarConfigComponent configComponent = viewCell.getComponent(AvatarConfigComponent.class); AvatarRegistry registry = AvatarRegistry.getAvatarRegistry(); AvatarSPI avatar = registry.getAvatarInUse(); if (avatar != null) { ServerSessionManager session = viewCell.getCellCache().getSession().getSessionManager(); AvatarConfigInfo configInfo = avatar.getAvatarConfigInfo(session); configComponent.requestAvatarConfigInfo(configInfo, isLocal); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic void update(ViewerCell cell) {\n\t\t\tUser user=(User) cell.getElement();\r\n\t\t\tif(cell.getColumnIndex()==0){\r\n\t\t\t\tcell.setText(user.getId()+\"\");\r\n\t\t\t}else if(cell.getColumnIndex()==1){\r\n\t\t\t\tcell.setText(user.getName());\r\n\t\t\t}\r\n\t\t\tsuper.update(cell);\r\n\t\t}", "@Override\r\n\tprotected void onResume() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onResume();\r\n\t\t\r\n\t\trefresh();\r\n\t}", "@Override\r\n\t\t\tpublic void update(final ViewerCell cell) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void update(final ViewerCell cell) {\n\t\t\t}", "@Override\n public void onRefresh() {\n synchronizeContent();\n }", "@Override\n public void onRefresh() {\n max_id = 0;\n populateCurrentUser();\n populateTimeline();\n }", "protected void onReloadImage() {\n String url = DataProvider.SCREEN + DataProvider.SCREEN_INDEX + mScreenId + \"&time=\" + System.currentTimeMillis();\n image.setUrl(url); //just to avoid caching\n loadTree();\n }", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\taccount = getCurAccount();\n\t\tif (account != null)\n\t\t\timageLoader.displayImage(account.getAvatar(), avatar);\n\t}", "public abstract void refreshView();", "@Override\n public void onResume() {\n super.onResume();\n refreshContent();\n }", "@Override\n\tpublic void refreshView() {\n\n\t}", "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}", "private void refreshItem() {\n\t\tboundSwagForm.getField(\"isFetchOnly\").setValue(true);\r\n\t\tboundSwagForm.saveData(new DSCallback() {\r\n\t\t\t//reselect selected tile (call to saveData de-selects it)\r\n\t\t\tpublic void execute(DSResponse response,\r\n\t\t\t\t\tObject rawData, DSRequest request) {\r\n\t\t\t\t//get updated record\r\n\t\t\t\tfinal TileRecord rec = new TileRecord(request.getData());\r\n\t\t\t\t//Note: selectRecord seems to only work on the tile index\r\n\t\t\t\titemsTileGrid.selectRecord(itemsTileGrid.getRecordIndex(rec));\r\n\t\t\t\t//saveData adds tileRecord to the end.\r\n\t\t\t\t//make sure sort order is preserved\r\n\t\t\t\tdoSort();\r\n\t\t\t}});\r\n\t}", "@Override\n\tpublic void refresh(String accountUID){\n\t\tmAccountUID = accountUID;\n\t\trefresh();\n\t}", "@Override\n\tprotected void refreshView() {\n\t\t\n\t}", "@Transactional(readOnly = true)\n\tpublic void refresh() {\n\t\tswitch (actualView) {\n\t\tcase LIST:\n\t\t\trefreshList();\n\t\t\tbreak;\n\t\tcase EDIT:\n\t\t\t// refreshForm(); // TODO\n\t\t\tbreak;\n\t\t}\n\t}", "private void updateProfileViews() {\n if(profile.getmImageUrl()!=null && !profile.getmImageUrl().isEmpty()) {\n String temp = profile.getmImageUrl();\n Picasso.get().load(temp).into(profilePicture);\n }\n profileName.setText(profile.getFullName());\n phoneNumber.setText(profile.getPhoneNumber());\n address.setText(profile.getAddress());\n email.setText(profile.geteMail());\n initListToShow();\n }", "@Override\n\t\t\t\t\tpublic void onRefresh() {\n\t\t\t\t\t\tisRefreshing = true;\n\t\t\t\t\t\tsyncArticle();\n\t\t\t\t\t}", "public void refresh() {\n \t\n /* Attach a rotating ImageView to the refresh item as an ActionView */\n LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n ImageView iv = (ImageView) inflater.inflate(R.layout.refresh_action_view, null);\n\n Animation rotation = AnimationUtils.loadAnimation(mContext, R.anim.clockwise_refresh);\n rotation.setRepeatCount(Animation.INFINITE);\n iv.startAnimation(rotation);\n\n mSGV.setVisibility(View.INVISIBLE);\n mProgress.setVisibility(View.VISIBLE);\n \n mRefreshItem.setActionView(iv);\n refreshGoodsItems();\n \n }", "public void refreshView(){\n\t\tView v = getView();\n\t\tif(v != null){\n\t\t\tv.invalidate();\n\t\t}\n\t}", "public void refreshPhotos() {\n\t\tif(AccessibleUsersList.masterUserList.getUsers() != null) {\n\t\t\tforceListRefreshOn(PhotoListDisplay);\n\t\t\tPhotoListDisplay.setItems(listOfPhotos);\n\t\t}\n\t}", "private void refreshView() {\n if (!wasInvalidatedBefore) {\n wasInvalidatedBefore = true;\n invalidate();\n }\n }", "protected void refreshArrow() {\n\t\tif (this.isCorrectlySwiped())\n\t\t\tarrow.setTexture(arrowGreen);\n\t\telse\n\t\t\tarrow.setTexture(arrowGray);\n\t}", "public void updateAvatar(int i) {\n\t\t// Sets the users avatar to one of the 6 avatars available\n\t\tif (i == 1) {\n\t\t\tmainAvatar.setImage(image1);\n\t\t\tavatarIndex = 1;\n\t\t} else if (i == 2) {\n\t\t\tmainAvatar.setImage(image2);\n\t\t\tavatarIndex = 2;\n\t\t} else if (i == 3) {\n\t\t\tmainAvatar.setImage(image3);\n\t\t\tavatarIndex = 3;\n\t\t} else if (i == 4) {\n\t\t\tmainAvatar.setImage(image4);\n\t\t\tavatarIndex = 4;\n\t\t} else if (i == 5) {\n\t\t\tmainAvatar.setImage(image5);\n\t\t\tavatarIndex = 5;\n\t\t} else if (i == 6) {\n\t\t\tmainAvatar.setImage(image6);\n\t\t\tavatarIndex = 6;\n\t\t}\n\n\t}", "public void setMainAvatar(ImageView mainAvatar) {\n\t\tString path = \"tmpImg.png\";\n\n\t\ttry {\n\t\t\tImage img = new Image(new FileInputStream(path));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcustom = true;\n\t\tavatarIndex = 100;\n\t}", "public void imageUpdate() {\n this.notifyDataSetChanged();\n }", "private void onProfileRefresh(Profile profile) {\n if (profile == null)\n throw new IllegalStateException(\"A profile cannot be null on successful profile refresh\");\n\n boolean ownProfile = userId.equals(Login.getUserId());\n\n profile.setUserId(userId);\n if (ownProfile)\n Login.setProfile(profile);\n\n profileImage.setImageBitmap(profile.getProfileImage());\n profile.setProfileImage(null); // save memory\n nameView.setText(profile.getName());\n String address = profile.getCity() + \", \" + profile.getState();\n addressView.setText(address);\n favouriteActivityView.setText(profile.getFavouriteSport());\n\n setupBioTextView(profile);\n\n onFriendsSync(profile);\n }", "@Override\r\n\t\t\tpublic void invoke() {\n\t\t\t\trefresh();\r\n\t\t\t}", "private void updateUI() {\n user = mAuth.getCurrentUser();\n if (user != null) {\n user.reload().addOnCompleteListener(userReloadListener);\n }\n }", "public void refresh()\n {\n refresh( null );\n }", "@Override\r\n public void onRefresh() {\n\r\n refreshContent();\r\n\r\n }", "@Override\n\tprotected void RefreshView() {\n\t\t\n\t}", "public void act() {\n setImage(myGif.getCurrentImage());\n }", "@Override\n public void onResume()\n {\n super.onResume();\n //Refresh your stuff here\n }", "@Override\n public void update(final ViewerCell cell)\n {\n // AlarmTableProvider should always provide \"AlarmTreePV\" elements\n final AlarmTreePV alarm = (AlarmTreePV) cell.getElement();\n\n // Special handling of 'info' entry that has no parent\n switch (column)\n {\n case PV:\n cell.setText(alarm.getName());\n break;\n case DESCRIPTION:\n {\n final String annunciation = AnnunciationFormatter.format(alarm.getDescription(),\n alarm.getSeverity().getDisplayName(), alarm.getValue());\n cell.setText(annunciation);\n }\n break;\n case TIME:\n cell.setText(alarm.getTimestampText());\n break;\n case CURRENT_SEVERITY:\n \tif (alarm.getParent() == null)\n \t\treturn;\n cell.setText(alarm.getCurrentSeverity().getDisplayName());\n cell.setBackground(color_provider.getColor(alarm.getCurrentSeverity()));\n break;\n case CURRENT_STATUS:\n \tif (alarm.getParent() == null)\n \t\treturn;\n cell.setText(alarm.getCurrentMessage());\n break;\n case SEVERITY:\n \tif (alarm.getParent() == null)\n \t\treturn;\n cell.setText(alarm.getSeverity().getDisplayName());\n cell.setBackground(color_provider.getColor(alarm.getSeverity()));\n break;\n case STATUS:\n \tif (alarm.getParent() == null)\n \t\treturn;\n cell.setText(alarm.getMessage());\n break;\n case VALUE:\n \tif (alarm.getParent() == null)\n \t\treturn;\n cell.setText(alarm.getValue());\n break;\n }\n }", "public void refresh() {\n\t\tthis.viewer.refresh();\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\treloadComment();\r\n\t}", "@FXML private void refreshData(){\n\t\tclearFields();\n\t\treadUsers();\n\t\tshowUsers();\n\t\trefreshInformationsFromTableView(null);\n\t}", "@Override\r\n public void onResume() {\r\n super.onResume();\r\n refreshData();\r\n }", "@Override\n public void refresh() {\n refresher.enqueueRefresh();\n }", "public void refresh() {\n }", "public void refresh() {\n\t\tthis.repaint();\n\t}", "public void refresh(){\n\n // Grab all the images under this current user's name in the database,\n // and loop through them and add them each to an array of picObjects.\n\n for(String friend : friendsNames) {\n Query queryAllImages = firebaseRef.child(\"users\").child(friend + \"Images\").orderByKey();\n queryAllImages.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n totalNumOfPics += (int) dataSnapshot.getChildrenCount();\n\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n PicObject picOb = snapshot.getValue(PicObject.class);\n picObList.add(0,picOb);\n }\n picObList.remove(0);\n loadTenPics(picsLoadedSoFar);\n mSwipeRefreshLayout.setRefreshing(false);\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n\n }\n });\n }\n }", "@Override\n\t\t\tpublic void onDataCallBack(int code, Bitmap avatar) {\n\t\t\t\tiamgeView.setImageBitmap(avatar);\n\t\t\t}", "@Override\n public void onResume()\n {\n super.onResume();\n //Refresh your stuff here\n\n }", "@Override\n public void refreshRecipeList() {\n favouritePageRecyclerViewAdapter.notifyDataSetChanged();\n\n }", "@Override public void onRefresh() {\n loadAccount();\n }", "public void refreshView() {\n Comment comment;\n \n /**\n * Displayed data is based on either a new, default comment or one that is \n * selected in the list of comments.\n */\n if (isNewComment) {\n comment = new Comment(0, new Date(), currentUser, \"\");\n view.clearCommentSelection();\n }\n else {\n comment = this.selectedComment;\n }\n \n view.setReportIdLabelText(\"(Report ID: \" + report.getId() + \") \" + report.getTitle());\n view.setCommentIdLabel(\"Comment ID: \" + comment.getId());\n view.setCommentDate(new SimpleDateFormat(\"dd MMM YYYY\").format(comment.getDate()));\n view.setUsername(comment.getUser().getName());\n view.setContent(comment.getContent());\n view.setPanelVisibility(isNewComment || view.getSelectedComment().getId() > 0);\n }", "@Override\n public void onRefresh() {\n refreshData();\n }", "protected void refresh() {\n\t}", "private void refreshHomePanel() {\n // Set Player Name Text\n view.getHomePanel().getNameLabel().setText(model.getPlayer().getFullname().toUpperCase());\n\n // Update Highscore Table\n view.getHomePanel().getTableModel().setRowCount(0);\n updateHighscores(model.getHighscores());\n }", "@FXML\n public void completeCurrentInterview() {\n try {\n Interview selectedInterview = this.listInterview.getSelectionModel().getSelectedItem();\n selectedInterview.setCompleted(true);\n selectedInterview.getApplication().completeInterview();\n this.interviewClicked();\n\n AlertHelper.showInformationAlert(\"This interview has been completed.\");\n\n // Reset view\n this.populateListInterview(interviewer.getPendingInterviews());\n this.populateInterviewInfo(selectedInterview);\n } catch (Exception ex) {\n AlertHelper.showErrorAlert(\"Unable to complete interview: \" + ex.getLocalizedMessage());\n }\n }", "public abstract void refreshItem();", "public abstract void refreshing();", "@Override\n public void refreshFeed(boolean invalidateData) {\n retrySubredditLoad(Constants.TAG_FRAG_SUBREDDIT_VIEWER, invalidateData);\n // Pop the current subreddit paginator since we're about to create a new one by refreshing\n if(!App.getStackRedditPaginator().isEmpty()){\n App.getStackRedditPaginator().pop();\n }\n }", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t\tsetProfileImage();\r\n\t}", "public void refresh() {\n if (currentClient != null) {\n Page page = currentClient.getCurrentPage();\n if (page != null) {\n root.setCenter(page.getRoot());\n } else {\n root.setCenter(null);\n }\n }else{\n if (page != null) {\n root.setCenter(page.getRoot());\n } else {\n root.setCenter(null);\n }\n }\n root.setPrefWidth(1280);\n root.setPrefHeight(720);\n root.setTop(clientBar.getRoot());\n root.setRight(null); // remove any errors\n //this.mainStage.setScene(scene);\n mainStage.show();\n\n }", "public abstract void refresh();", "public abstract void refresh();", "public abstract void refresh();", "void doRefreshContent();", "public void refresh();", "public void refresh();", "public void refresh();", "public void refresh();", "public void refresh();", "public void refresh();", "public void refresh();", "@Override\n\t\tpublic void onRefresh() {\n\t\t\tloadInfo(1, 0);\n\t\t}", "protected void setNewAvatar(Avatar avatar)\r\n\t{\r\n\t\tGame.avatar = new Avatar(avatar);\r\n\t}", "@Override\n public void onRefresh() {\n\n GetFirstData();\n }", "@Override\n public void onRefresh() {\n }", "private void refreshView() {\n this.view.updateRobots();\n }", "public void updateDataCell();", "public void refresh() {\n\t\tgetTableViewer().refresh();\n\t}", "public ImageView getMainAvatar() {\n\t\treturn mainAvatar;\n\t}", "public void refreshRank() {\n rank = getRank();\n lblUserTitle.setText(username + \" - \" + rank);\n }", "public void refresh() {\n // The actual work is in refreshInernal(), but we don't call it directly here, because:\n // 1. refresh() is called very often.\n // 2. to avoid nested fragment transaction.\n // refresh is often called during a fragment transaction, but updateTitle() may call\n // a callback which would initiate another fragment transaction.\n mDelayedOperations.removeCallbacks(mRefreshRunnable);\n mDelayedOperations.post(mRefreshRunnable);\n }", "@FXML\r\n private void onRefresh() {\n HomeLibrary.refreshBooks();\r\n HomeLibrary.refreshAuthors();\r\n HomeLibrary.refreshGenres();\r\n HomeLibrary.refreshPublishingHouses();\r\n HomeLibrary.refreshFriends();\r\n\r\n HomeLibrary.getLibraryOverviewController().refreshOverallInfo();\r\n HomeLibrary.getBookOverviewController().refreshBooks();\r\n HomeLibrary.getGenresOverviewController().refreshGenres();\r\n HomeLibrary.getPubHousesOverviewController().refreshPubHouses();\r\n HomeLibrary.getFriendsOverviewController().refreshFriends();\r\n }", "private void refresh() {\n\t\t\tRunnable run = new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif(table.isDisposed())return;\n\t\t\t\t\tviewer.refresh();\n\t\t\t\t}\t\t\t\n\t\t\t};\n\t\t\tDisplay.getDefault().asyncExec(run);\n\t\t}", "abstract void refresh();", "public void refresh() {\n navTreeWidget.removeItems();\n selectedPath = null;\n loadInitialTree();\n }", "public void refresh() {\r\n\t\tinit();\r\n\t}", "protected void refresh()\n {\n refresh(System.currentTimeMillis());\n }", "public void refreshPlayerPanel() {\n view.clearDice();\n Player curPlayer;\n \n for(int i = 0; i < players.size(); i++){\n curPlayer = players.peek();\n \n view.setDie(curPlayer);\n players.add(players.remove());\n \n }\n board.reloadImgs();\n }", "public void reload () {\n\t\tentity = uuidManager.get(uuid);\n\t\treloadAccessors();\n\t\tcheckAccessors();\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n updateUI();\n }", "public void revealImage(int current){\r\n System.out.println(gameBoard[current].getPicture());\r\n if(clickable){\r\n clickable = false;\r\n /*Getting the image in our ImageArray[current] and setting the image to the new image from our\r\n card Object in our gameBoard, adding the new image to the grid, to display, and using cardIndx\r\n object to store the col Index and Row Index*/\r\n imageArr[current] = new ImageView(new Image(gameBoard[current].getPicture()));\r\n grid.add(imageArr[current], cardIndx[current].getColIndex(), cardIndx[current].getRowIndex());\r\n \r\n if(ctr == 0){\r\n clicked[0] = current;\r\n clickable = true;\r\n ctr++;\r\n }\r\n \r\n else{\r\n imageArr[current] = new ImageView(new Image(gameBoard[current].getPicture()));\r\n grid.add(imageArr[current], cardIndx[current].getColIndex(), cardIndx[current].getRowIndex());\r\n \r\n clicked[1] = current;\r\n ctr = 0; \r\n try {\r\n \r\n Thread.sleep(300);\r\n compare();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n \r\n }\r\n \r\n \r\n \r\n }", "private void refreashTableView() {\n this.scoreboard.refresh();\n sortScoreboard();\n }", "public void performUpdateReset() {\n switchToPage(NavDrawerAdapter.FLUFF_ID);\n\t}", "@Override\n public void onRefresh() {\n reloadList();\n swipeContainer.setRefreshing(true);\n\n }", "public abstract void pullToRefresh();", "protected void refreshUserInfo(UserInfo userInfo) {}", "public void refresh(){\n\n data2.clear();\n data2=getActionsList(\"\");\n //actionsAdapter=new ActionsAdapter(data2,getContext());\n //myList.setAdapter(actionsAdapter);\n //actionsAdapter.notifyDataSetChanged();\n }", "private void refreshImage() {\n Bitmap image = drawableToBitmap(getDrawable());\n int canvasSize = Math.min(canvasWidth, canvasHeight);\n if (canvasSize > 0 && image != null) {\n //Preserve image ratio if it is not square\n BitmapShader shader = new BitmapShader(ThumbnailUtils.extractThumbnail(image, canvasSize, canvasSize),\n Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);\n mPaint.setShader(shader);\n }\n }", "private void refreshContent() {\n\n mSwipeRefreshLayout.setRefreshing(false);\n }", "private void refreshDisplay() {\n \t\tCursor cursor;\n \t\tif (node_id >= 0)\n \t\t\tcursor = appInst.getDB().getNodeChildren(node_id);\n \t\telse\n \t\t\tcursor = appInst.getDB().getFileCursor();\n \n \t\tstartManagingCursor(cursor);\n \t\tthis.outlineAdapter = new OutlineCursorAdapter(this, cursor, appInst.getDB());\n \t\tthis.setListAdapter(outlineAdapter);\n \n \t\tgetListView().setSelection(this.lastSelection);\n \t}", "private void updateBaseIcon() {\n this.squareIcon.setDecoratedIcon( getSelectedBaseIcon() );\n this.radialIcon.setDecoratedIcon( getSelectedBaseIcon() );\n }", "@Override\n public void refreshView(Context context, RecyclerView.ViewHolder holder) {\n ((ViewHolder) holder).id_text_test.setText(test);\n// mHolder.id_image_item_shown.setImageDrawable(\n// context.getResources().getDrawable(R.drawable.item_translation));\n }", "@Override\n public void onRefresh() {\n loadData();\n }" ]
[ "0.5346508", "0.5290137", "0.52713287", "0.52713287", "0.5197168", "0.51647216", "0.51240814", "0.50887036", "0.50806856", "0.50599045", "0.50573254", "0.5036123", "0.5033208", "0.5006885", "0.5002178", "0.4987824", "0.49808037", "0.49647406", "0.49642953", "0.49554506", "0.4919146", "0.49144042", "0.49062783", "0.48967868", "0.48816067", "0.48669964", "0.48648348", "0.4849267", "0.48491576", "0.48461184", "0.48342502", "0.48298287", "0.48150203", "0.48137525", "0.48106426", "0.480389", "0.47773212", "0.47765884", "0.47675264", "0.47672406", "0.47612777", "0.47546414", "0.4751525", "0.47381747", "0.4729781", "0.47253418", "0.4722794", "0.47226575", "0.47225472", "0.47220623", "0.4721527", "0.47189736", "0.47063762", "0.46995193", "0.46992648", "0.46927398", "0.4678969", "0.46745577", "0.46745577", "0.46745577", "0.46716353", "0.46645114", "0.46645114", "0.46645114", "0.46645114", "0.46645114", "0.46645114", "0.46645114", "0.46633205", "0.466146", "0.46598408", "0.4645619", "0.46418715", "0.46378434", "0.4636296", "0.4633232", "0.46328324", "0.46310303", "0.46155843", "0.4612965", "0.46125272", "0.46112415", "0.46080893", "0.46068707", "0.46042565", "0.46021557", "0.4601593", "0.45981944", "0.45960373", "0.45895362", "0.45891425", "0.45796642", "0.45774195", "0.45687884", "0.4568224", "0.4559967", "0.45465937", "0.45450872", "0.45422098", "0.45359603" ]
0.6379307
0
Checks whether the ini file was loaded successfully.
public boolean isAvailable() { return isavailable; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean loadFile() {\n\n\t\tboolean result = false;\n\n\t\tSystem.out.println(\"Checking configuration file: \"+ cnfFile.getAbsolutePath());\n\n\t\tif (!cnfFile.exists()) {\n\t\t\tSystem.out.println(\"ERROR: config file doesn't exist\");\n\t\t} else if (!cnfFile.isFile()) {\n\t\t\tSystem.out.println(\"ERROR: config file is not a file\");\n\t\t} else {\n\t\t\tSystem.out.println(\"SUCCESS: config file exists\");\n\n\t\t\t// Force read from file. Need to clean the currently read in data first\n\t\t\tcnfData = new CnfData();\n\n\t\t\tresult = readFile();\n\t\t}\n\t\treturn result;\n\t}", "public boolean hasLoadedFile() {\n return isSuccessfulFileLoad;\n }", "public boolean isEmpty() {\n return this.ini == null;\n }", "public boolean isSuccessful() {\n //loadSettingsFromFile(filePath);\n Login();\n if (EXPECTED_TITLE.equals(driver.getTitle()))\n return true;\n else\n return false;\n }", "private boolean IsCfgExisted()\n {\n File f = new File(strCfgPath);\n if(f.exists())\n return true;\n return false;\n }", "public boolean isLoaded() {\n return parser != null;\n }", "protected final boolean settingsFileExist() {\n File configFile = new File(this.settingsFileName);\n return configFile.exists() && configFile.canWrite();\n }", "public boolean startupOK()\n {\n if (!checksDone)\n {\n success = true;\n if (clusterNodeProperties.propertyFileExists())\n {\n log.debug(\"Performing Clustering start up checks\");\n success = doStartupChecks();\n checksDone = true;\n }\n }\n return success;\n }", "public boolean load() throws IOException {\n File db = new File(plugin.getDataFolder(), FILENAME);\n mdb = new YamlConfiguration();\n if(db.exists()) {\n try {\n mdb.load(db);\n } catch (Exception e) {\n mdb = null;\n e.printStackTrace();\n throw new IOException(\"Could not read Courier database!\");\n }\n return true;\n }\n return false;\n }", "public boolean loadFile(File f) throws IOException {\n\t\treturn false;\r\n\t}", "public boolean fileIsReady()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(notFound)\n\t\t\t{\n\t\t\t\tisReady = false;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tisReady = reader.ready();\n\t\t\t}\n\t\t\t\n\t\t} catch (IOException ioe)\n\t\t{\n\t\t\t//\n\t\t}\n\n\t\treturn isReady;\n\t}", "public boolean hasLoaded(String filename)\n {\n return this.loadedFiles.containsKey(filename);\n }", "public boolean loadData() throws IOException{\n showFileBrowser();\n m_FileName = PATH+ m_FileName;\n m_File = new Scanner(new FileInputStream(m_FileName));\n if (fileFound()){\n if (m_File.hasNextLine()) {\n if (readGrid()){\n } else {\n return false;\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Empty File\");\n return false;\n }\n } else {\n return false;\n }\n return true;\n }", "public static boolean isLoaded() {\n\t\ttry {\n\t\t\tPlayer.getRSPlayer();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean fileFound(){\n\n try{\n\n m_CSVReader = new CSVReader(new FileReader(m_FileName));\n\n } catch (FileNotFoundException e){\n\n System.out.println(\"Input file not found.\");\n\n return false;\n }\n return true;\n }", "public boolean fExists(){\n \n try(ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file))){\n \n }\n catch (FileNotFoundException e){\n System.out.println(\"File not found\");\n return false;\n }\n catch (IOException e){\n System.out.println(\"Another exception\");\n return false;\n }\n\n return true;\n }", "public void checkFile() {\n\t\tFile file = new File(\"src/Project11Problem1Alternative/names.txt\");\n\t\tSystem.out.println(file.exists() ? \"Exists!\" : \"Doesn't exist!\");\n\t\tSystem.out.println(file.canRead() ? \"Can read!\" : \"Can't read!\");\n\t\tSystem.out.println(file.canWrite() ? \"Can write!\" : \"Can't write!\");\n\t\tSystem.out.println(\"Name: \" + file.getName());\n\t\tSystem.out.println(\"Path: \" + file.getPath());\n\t\tSystem.out.println(\"Size: \" + file.length() + \" bytes\");\n\t}", "boolean hasCompleteFile();", "boolean isLoaded();", "private boolean load(Properties properties) {\n\t\tlog.info(\"Looking for config file api.properties\");\n\n\t try {\n\t // properties.load(new FileReader(cfg));\n\t\t \tInputStream is = getClass().getClassLoader().getResourceAsStream(\"api.properties\");\n\t\t \tif(is != null && is.available() > 0) {\n\t\t properties.load(is);\n\t\t return true;\n\t\t \t}\n\t } catch (IOException e) {\n\t \t\tthrow new IllegalStateException(\"Could not load file \", e);\n\t }\n\n\t\tlog.warn(\"Could not find api.properties\");\n\t\treturn false;\n\t}", "public boolean isLoaded() {\n\t\treturn lib != null;\n\t}", "public boolean isLoaded() \n\t{\n\t return htRecords != null ;\n\t}", "boolean hasFileLoc();", "private boolean isValid() throws BadInputException {\n try {\n if( ! br.ready() ) \t\t\t\t\t\t//Is the reader ready?\n throw new BadInputException();\t\t//Must be a problem with the file, throw exception\n }\n catch(java.io.IOException e) {\n System.out.println(\"Error validating readability of file: \" + e.toString() );\n }\n\n return true;\n }", "public boolean loadData() {\n try {\n SAXReader reader = new SAXReader();\n Document xmlDoc = reader.read(xmlFile);\n\n Element rootNode = xmlDoc.getRootElement();\n\n rootTreeIterate(rootNode);\n\n } catch (DocumentException ex) {\n logger.error(\"Document loading error:\", ex);\n return false;\n }\n\n return true;\n }", "boolean hasReinitializeFile();", "public synchronized boolean isLoaded() {\n\t\treturn _resourceData != null;\n\t}", "public boolean isLoaded() {\n\treturn loaded;\n }", "@Override\n\tpublic boolean isInit() {\n\t\tFile path = new File(initService.defaultAddr);\n\t\tif(!path.exists()) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tFile set = new File(initService.defaultAddr+initFile);\n\t\tif(!set.exists()) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean hasFileInfo();", "boolean hasFileInfo();", "public boolean isLoaded();", "static boolean isConfigValid(Path path) {\n Yaml yaml = new Yaml();\n InputStream inputStream = null;\n try {\n inputStream = Files.newInputStream(path);\n } catch (IOException e) {\n // System.err.println(e);\n return false;\n }\n try {\n yaml.load(inputStream);\n } catch (RuntimeException e) {\n // TODO: Good validation messages are available here. An example:\n /*\n while scanning a simple key\n in 'reader', line 7, column 1:\n xx\n ^\n could not find expected ':'\n in 'reader', line 7, column 3:\n xx\n ^\n */\n // System.err.println(e);\n return false;\n }\n\n return true;\n }", "public boolean hasBeenLoaded () {\n return loaded;\n }", "public boolean isLoaded() {\n\t\treturn started;\n\t}", "@Test\r\n public void testReadFile() {\r\n System.out.println(\"readFile and updateFile\");\r\n InparseManager instance = ((InparseManager) new ParserGenerator().getNewApplicationInparser());\r\n \r\n try {\r\n File file = File.createTempFile(\"TempInpFile\", null);\r\n instance.setlocalPath(file.getAbsolutePath());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ApplicationInparserTest.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n instance.updateFile();\r\n instance.readFile();\r\n instance.parse();\r\n boolean assemblersFound = !((Applications)(((InparseManager)instance).getParseResults())).getAssemblers().isEmpty();\r\n assertEquals(true,assemblersFound);\r\n }", "public boolean open() {\n try {\n fileStream = new FileReader( this.fileName );\n scanner = new Scanner( fileStream );\n this.found = true;\n } catch ( FileNotFoundException error ) {\n this.found = false;\n System.out.println(error.toString());\n }\n\n return this.found;\n }", "public boolean checkSetup(){\n return checkSetup(folderName);\n }", "public static boolean testLoading() {\r\n Data instance = new Data();\r\n Pokemon[] list;\r\n try {\r\n instance.update();\r\n list = instance.getPokemonList();\r\n int cnt = 0;\r\n while (cnt < list.length && list[cnt] != null)\r\n cnt++;\r\n if (cnt != 799) {\r\n System.out.print(\"Pokemon num incorrect: \");\r\n System.out.println(cnt - 1);\r\n return false;\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n System.out.println(\"fall the test in exception\");\r\n return false;\r\n }\r\n\r\n for (int i = 0; i < 6; i++) {\r\n if (!pokemonEq(testList[i], list[indices[i]])) {\r\n System.out.print(\"fail the test in check element \");\r\n System.out.println(i);\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "protected boolean isLoaded()\n {\n return m_fLoaded;\n }", "public abstract boolean isLoadCompleted();", "public boolean isLoaded() {\n return loaded;\n }", "public boolean isUserSettingsOK() {\r\n return (userSettings != null && userSettings.isValid());\r\n }", "private void parseINI() throws IOException{\n // If the labtainersPath not set in the main.ini file, set it to the System environmenta variable LABTAINER_DIR \n labtainerPath = pathProperties.getProperty(\"labtainerPath\");\n if(labtainerPath == null || labtainerPath.isEmpty()){\n System.out.println(\"No labtainer path set yet\");\n labtainerPath = System.getenv(\"LABTAINER_DIR\");\n FileOutputStream out = new FileOutputStream(iniFile);\n writeValueToINI(out, \"labtainerPath\", System.getenv(\"LABTAINER_DIR\"));\n }\n else{\n labtainerPath.trim();\n }\n\n // If textEditorPref is empty, set it to 'vi' and write to the main.ini file\n textEditorPref = pathProperties.getProperty(\"textEditor\");\n if(textEditorPref == null || textEditorPref.isEmpty()){\n textEditorPref = \"vi\";\n FileOutputStream out = new FileOutputStream(iniFile);\n writeValueToINI(out, \"textEditor\", textEditorPref);\n }\n else{\n textEditorPref.trim();\n }\n\n updateLabtainersPath();\n\n // If a lab has been loaded before then load that lab\n String iniPrevLab = pathProperties.getProperty(\"prevLab\");\n if(iniPrevLab != null && !iniPrevLab.isEmpty()){\n File prevLab = new File(iniPrevLab);\n if(prevLab.isDirectory())\n openLab(prevLab);\n }\n }", "private boolean canReadFile(File file) {\n if (!file.exists()) {\n log(log, Level.INFO, \"File \" + file.getAbsolutePath() + \" does not exist\");\n return false;\n }\n\n if (!file.canRead()) {\n log(log, Level.INFO, \"File \" + file.getAbsolutePath() + \" cannot be read\");\n\n return false;\n }\n\n return true;\n }", "public boolean checkUsername(String username){\n\t\tFile userData = new File(\"Settings//\" + username + \".yml\");\n\n\t\t// If the players file exists.\n\t\tif(!userData.exists()){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "@Override\n\tprotected void isLoaded() throws Error {\n\t\t\n\t}", "@Override\n\tprotected void isLoaded() throws Error {\n\t\t\n\t}", "@Override\n\tprotected void isLoaded() throws Error \n\t{\n\t\t\n\t}", "public abstract boolean load() throws InvalidElementException;", "public boolean isValidSong() { \n\t\tString filepath = aFilePath.toString();\n\t\tFile f = new File(filepath);\n\t\treturn f.exists();\n\t}", "private synchronized boolean existeIndice() {\r\n\t\tboolean indiceExiste = new File(pastaDoIndice, \"segments.gen\")\r\n\t\t\t\t.exists();\r\n\r\n\t\treturn indiceExiste;\r\n\t}", "public boolean isConfigInitalized()\n\t{\n\t\treturn this.isInitialized;\n\t}", "public synchronized boolean m58820c() {\n C15665p loadSettingsData;\n loadSettingsData = this.f48447c.loadSettingsData();\n m58817a(loadSettingsData);\n return loadSettingsData != null;\n }", "boolean hasImportConfiguration();", "boolean hasSettings();", "boolean hasSettings();", "private void loadConfig()\n {\n File config = new File(\"config.ini\");\n\n if (config.exists())\n {\n try\n {\n BufferedReader in = new BufferedReader(new FileReader(config));\n\n configLine = Integer.parseInt(in.readLine());\n configString = in.readLine();\n socketSelect = (in.readLine()).split(\",\");\n in.close();\n }\n catch (Exception e)\n {\n System.exit(1);\n }\n }\n else\n {\n System.exit(1);\n }\n }", "private boolean loadLevel(int n) {\n Scanner in = null;\n try {\n in = new Scanner(new FileInputStream(LEVELS_FILE)); // Scanner to read the file\n model = new Loader(in).load(n); // Load level from scanner\n model.setListener( listener ); // Set the listener of modifications\n view = new TilePanel(model.getHeight(),model.getWidth(),CellTile.SIDE);\n win.clear();\n view.center(WIN_HEIGHT,WIN_WIDTH);\n status.setLevel(n);\n status.setMoves(0);\n return true;\n } catch (FileNotFoundException | InputMismatchException e) {\n System.out.println(\"Error loading file \\\"\"+LEVELS_FILE+\"\\\":\\n\"+e.getMessage());\n return false;\n } catch (Loader.LevelFormatException e) {\n System.out.println(e.getMessage()+\" in file \\\"\"+LEVELS_FILE+\"\\\"\");\n System.out.println(\" \"+e.getLineNumber()+\": \"+e.getLine());\n return false;\n } finally {\n if (in!=null) in.close(); // Close the file\n }\n }", "boolean hasFileLocation();", "public boolean isLoaded() {\n return m_module.isLoaded();\n }", "boolean hasStartingInfo();", "public static final boolean libraryLoaded(){\n return PS3_Library.loaded();\n }", "private static boolean loadStudents() throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new FileReader(STUDENTS_FILE));\n\t\tboolean error_loading = false; //stores whether there was an error loading a student\n\t\t\n\t\tString line = reader.readLine(); //read the properties of each student in the students.txt file\n\t\t/*read students.txt file, set the input for each studentDetails object and add each StudentDetails object to ALL_STUDENTS ArrayList*/\n\t\twhile(line != null){\n\t\t\tStudentDetails student = new StudentDetails();\n\t\t\tString[] details = line.split(\"\\t\"); //the properties of each StudentDetails object are separated by tab spaces in the students.txt file\n\t\t\tfor(int i = 0; i < details.length; i ++){\n\t\t\t\tif(!setStudentInput(i, details[i], student)){ //checks if there was an error in setting the StudentDetails object's properties with the values in the students.txt file\n\t\t\t\t\tSystem.out.println(\"ERROR Loading Students\");\n\t\t\t\t\terror_loading = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(error_loading) //if there was an error loading a book then stop the process of loading books\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tALL_STUDENTS.add(student);\n\t\t\t/*Add Students who have been fined (total fine > 0) to the FINED_STUDENTS Hashtable*/\n\t\t\taddFinedStudentsToTable(student);\n\t\t\tline = reader.readLine();\n\t\t}\n\t\treader.close();\n\t\t\n\t\tif(!error_loading){\n\t\t\tSystem.out.println(\"Loading Students - Complete!\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false; //error encountered while loading books\n\t}", "public static boolean isInitialized() {\r\n return (isInitialized);\r\n }", "public boolean exists() {\n return _file.exists();\n }", "boolean hasFilePath();", "public static boolean fileExists()\r\n\t{\r\n\t\tFile saveFile = new File(\"highscores.txt\");\r\n\t\treturn saveFile.exists();\r\n\t}", "public boolean valid()\r\n\t{\r\n\t\treturn valid(getInputStream());\r\n\t}", "boolean hasConfiguration();", "public boolean load(String file);", "@Test\n public void getFileLocation() throws Exception {\n ReadConfig conf = new ReadConfig();\n try {\n conf.getFileLocation();\n } catch (Exception e) {\n assertTrue(e.getMessage().equals(\"Try to access config file before reading it.\") );\n }\n try {\n conf.readFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n assertNotNull(conf.getFileLocation());\n }", "public boolean hasImportConfiguration() {\n return importConfiguration_ != null;\n }", "public boolean isFileExists(String fileName) {\n return profilesMap.containsKey(fileName);\n }", "private boolean validationIsOK()\n {\n if (!enableAutosaveCheckbox.isSelected())\n {\n return true;\n }\n\n String seconds = saveIntervalTextField.getText();\n\n try\n {\n Integer.parseInt(seconds);\n } catch (NumberFormatException e) {\n JOptionPane.showMessageDialog(this, invalidValueText);\n saveIntervalTextField.requestFocus();\n return false;\n }\n\n if (pathAutosaveTextField.getText().trim().isEmpty())\n {\n JOptionPane.showMessageDialog(this, invalidValueText);\n pathAutosaveTextField.requestFocus();\n return false;\n }\n\n File directory = new File(pathAutosaveTextField.getText());\n\n return true;\n }", "public boolean isLoaded() {\n return _id != null;\n }", "public boolean verifyPageLoad() {\n\t\tboolean result = lnkLoginButton.isDisplayed();\n\t\tLog.info(\"Home Page Loaded Successfully\");\n\t\treturn result;\n\t}", "private void checkFile() {\n \ttry {\n \t\tdata = new BufferedReader(\n \t\t\t\t new FileReader(textFile));\n \t\t\n \t}\n \tcatch(FileNotFoundException e)\n \t{\n \t\tSystem.out.println(\"The mentioned File is not found.\");\n System.out.println(\"\");\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"The following error occured while reading the file.\");\n\t\t\tex.printStackTrace();\n\t\t\tSystem.exit(2);\n\t\t}\n }", "public void loadConfig(){\r\n File config = new File(\"config.ini\");\r\n if(config.exists()){\r\n try {\r\n Scanner confRead = new Scanner(config);\r\n \r\n while(confRead.hasNextLine()){\r\n String line = confRead.nextLine();\r\n if(line.indexOf('=')>0){\r\n String setting,value;\r\n setting = line.substring(0,line.indexOf('='));\r\n value = line.substring(line.indexOf('=')+1,line.length());\r\n \r\n //Perform the actual parameter check here\r\n if(setting.equals(\"romfile\")){\r\n boolean result;\r\n result = hc11_Helpers.loadBinary(new File(value.substring(value.indexOf(',')+1,value.length())),board,\r\n Integer.parseInt(value.substring(0,value.indexOf(',')),16));\r\n if(result)\r\n System.out.println(\"Loaded a rom file.\");\r\n else\r\n System.out.println(\"Error loading rom file.\");\r\n }\r\n }\r\n }\r\n confRead.close();\r\n } catch (FileNotFoundException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }", "private boolean checkFileExists(String file) {\n boolean exist = false;\n File tmpFile = new File(\"./levels/\" + file);\n if (tmpFile.exists()) {\n // file exists\n exist = true;\n }\n return exist;\n }", "protected boolean loadSections() {\n\t\tpageTable = new TranslationEntry[numPages];\n\t\t//set all translation entry to invalid\n\t\tfor (int i = 0; i < pageTable.length; i++) {\n\t\t\t//pageTable[i] = new TranslationEntry(i, UserKernel.getNextPage(), false, false, false, false);\n\t\t\tpageTable[i] = new TranslationEntry(i, 0, false, false, false, false);\n\n\t\t}\n\n\t\treturn true;\n\t}", "public static boolean isGenomeLoaded() {\n return genomeController.isGenomeLoaded();\n }", "public boolean loadGame(File file){\n\t\treturn true;\n\t}", "boolean exists(String nickName) {\n // To avoid file scanning\n if (this.isOnline(nickName)) return true;\n try {\n this.loadUserRegistrationInfo(nickName);\n return true;\n } catch (NoSuchElementException e) {\n return false;\n }\n }", "private boolean readSettings() {\n try {\n String encoded = mProject.getPersistentProperty(CONFIG_INCLUDES);\n if (encoded != null) {\n mIncludes = decodeMap(encoded);\n\n // Set up a reverse map, pointing from included files to the files that\n // included them\n mIncludedBy = new HashMap<String, List<String>>(2 * mIncludes.size());\n for (Map.Entry<String, List<String>> entry : mIncludes.entrySet()) {\n // File containing the <include>\n String includer = entry.getKey();\n // Files being <include>'ed by the above file\n List<String> included = entry.getValue();\n setIncludedBy(includer, included);\n }\n\n return true;\n }\n } catch (CoreException e) {\n AdtPlugin.log(e, \"Can't read include settings\");\n }\n\n return false;\n }", "private boolean checkValidity(String path) {\n File checkFile = new File(path);\n return checkFile.exists();\n }", "private void check() {\n Path pathroot = getPath();\n // check the path is file or directory\n checkFileOrDirectory(pathroot);\n }", "private boolean loadPropertiesDefinition()\n\t{\n\t\tString dname = org.apache.commons.io.FilenameUtils.concat(Paths.docDir,\n\t\t\t\torg.apache.commons.io.FilenameUtils.concat(lan.isoName, \"Lexical Analysis\"));\n\t\tString pname = org.apache.commons.io.FilenameUtils.concat(dname, \"_properties.def\");\n\t\tString errmessage = null;\n\t\tRefObject<String> errmessageRef = new RefObject<String>(errmessage);\n\t\tif (!loadCategoryPropertiesFeatures(pname, errmessageRef))\n\t\t{\n\t\t\terrmessage = errmessageRef.argvalue;\n\t\t\tJOptionPane.showMessageDialog(Launcher.getDesktopPane(), \"Warning: \" + errmessage, \"NooJ WARNING\",\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean fileExists(String name){\r\n try{\r\n new BufferedReader(new FileReader(\"../profiles/\" + name + \".profile\"));\r\n return true;\r\n }\r\n catch(FileNotFoundException e){\r\n return false;\r\n }\r\n }", "public synchronized boolean isReadingFromFile(){\n\t\treturn isReadingFromFile;\n\t}", "private boolean loadParameterFile(String[] args) throws Exception{\n try {\n CommandLineParser parser = new DefaultParser();\n CommandLine parametersCLI = parser.parse(cliOptions, args);\n if(parametersCLI.hasOption(\"H\")){\n writeParameterModel();\n return false;\n }\n if(!parametersCLI.hasOption(\"p\"))\n throw new Exception(\"The parameter file was not specified.\");\n String path = parametersCLI.getOptionValue(\"p\");\n fileParameters = loadProperties(path);\n return true;\n } \n catch (MissingOptionException ex){\n throw new Exception(\"Required parameter not found.\");\n }\n catch (ParseException ex) {\n throw new Exception(\"Error while parsing the command line.\");\n }\n }", "public final boolean fileExists() {\n\t if ( m_fileStatus == FileStatus.FileExists || m_fileStatus == FileStatus.DirectoryExists)\n\t return true;\n\t return false;\n\t}", "boolean hasStartingConfig() {\n return startCfg_ != null;\n }", "private boolean loadText()\n\t\t{\n\t\t\t// get ssn from field\n\t\t\ttry\n\t\t\t{\n\t\t\t\tssn = ssn_field.getText();\n\t\t\t} \n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(new JPanel(), \"SSN input could not be read\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\treturn false;\t\n\t\t\t}\n\n\t\t\t// get record type from combo box\n\t\t\ttry\n\t\t\t{\n\t\t\t\tselected_record_type = record_types_combo_box.getSelectedItem().toString();\n\t\t\t} \n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(new JPanel(), \"Selected Record Type could not be read\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\treturn false;\t\n\t\t\t}\n\n\t\t\t// if this point is reached age and ssn were successfully retrieved\n\t\t\treturn true;\n\n\t\t}", "protected boolean loadSections() \n\t{\n\t\tpageTable = new TranslationEntry[numPages];\n\t\tfor(int i=0; i < numPages; ++i)\n\t\t{\n\t\t\tpageTable[i] = new TranslationEntry(i, -1, false, false, false, false);\n\t\t}\n\t\treturn true;\n\t}", "public static boolean loadConfig() throws IOException, ConfigurationNotFoundException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n File file = new File(Objects.requireNonNull(classLoader.getResource(\"application.yaml\")).getFile());\n\n // Instantiating a new ObjectMapper as a YAMLFactory\n ObjectMapper om = new ObjectMapper(new YAMLFactory());\n\n if (file.exists()) {\n AppConfig appConfig = om.readValue(file, AppConfig.class);\n\n if (Objects.nonNull(appConfig)\n && Objects.nonNull(appConfig.getApi())\n && Objects.nonNull(appConfig.getSmtp())) {\n\n AppConfig.apiConfig = appConfig.getApi();\n AppConfig.smtpConfig = appConfig.getSmtp();\n\n return true;\n } else {\n throw new ConfigurationNotFoundException(\"Configuration parameter are incorrect\");\n }\n } else {\n throw new ConfigurationNotFoundException();\n }\n }", "public static boolean readFromFile()\n\t{\n\t\ttry (BufferedReader bufferedReader = new BufferedReader(new FileReader(SAVE_LOCATION)))\n\t\t{\n\t\t\t// Stores the value of the current line in the file\n\t\t\tString currentLine = null;\n\t\t\t\n\t\t\t// Stores the alias and value separated by the \":\"\n\t\t\tString[] lineSplit;\n\t\t\t\n\t\t\t// Stores the alias and value from the line into their own variable\n\t\t\tString alias, value;\n\t\t\t\n\t\t\twhile ((currentLine = bufferedReader.readLine()) != null)\n\t\t\t{\n\t\t\t\t// Ignore the line if it starts with a comment\n\t\t\t\tif (currentLine.startsWith(COMMENT)) continue;\n\t\t\t\t\n\t\t\t\t// Gets the alias and value from either side of the \":\"\n\t\t\t\tlineSplit = currentLine.split(\":\");\n\t\t\t\t\n\t\t\t\t// Ignore if line is incorrectly formatted\n\t\t\t\tif (lineSplit.length == 0) continue;\n\t\t\t\t\n\t\t\t\t// Gets the alias and value of the line to store in the property\n\t\t\t\t// Removes any unnecessary trailing spaces and converts to lower case\n\t\t\t\talias = lineSplit[0].trim().toLowerCase();\n\t\t\t\tvalue = lineSplit[1].trim().toLowerCase();\n\t\t\t\t\n\t\t\t\t// Gets the current property object\n\t\t\t\t// Associated from the alias found on the current line\n\t\t\t\tProperty property = CustomCrosshairMod.INSTANCE.getCrosshair().properties.get(alias);\n\t\t\t\t\n\t\t\t\t// Checks whether there is a property with the current alias\n\t\t\t\tif (property != null)\n\t\t\t\t{\n\t\t\t\t\t// Updates the property value with the new value from the config file\n\t\t\t\t\tCustomCrosshairMod.INSTANCE.getCrosshair().properties.set(alias, property.setValue(value));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private static boolean validateFileExists(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n\n if (prop == null || \"\".equals(prop)) {\n return false;\n }\n\n return Files.exists(new File(prop).toPath());\n }", "public boolean hasImportConfiguration() {\n return importConfigurationBuilder_ != null || importConfiguration_ != null;\n }", "public boolean isFullyLoaded() {\n return fullyLoaded;\n }", "protected final boolean loadMapping() {\r\n if (_loaded) { return false; }\r\n _loaded = true;\r\n return true;\r\n }" ]
[ "0.6595396", "0.6458567", "0.5809925", "0.5797125", "0.57929826", "0.57500935", "0.56858736", "0.56827104", "0.5632608", "0.56202495", "0.5601006", "0.55468833", "0.55460554", "0.5532153", "0.5514511", "0.5487051", "0.5478761", "0.5473109", "0.5463266", "0.54496455", "0.5449006", "0.5446096", "0.54388535", "0.54314023", "0.5416856", "0.54129225", "0.5391113", "0.5377635", "0.5365772", "0.53610885", "0.53610885", "0.5345156", "0.5344165", "0.53415626", "0.53384", "0.5324246", "0.5309287", "0.5296498", "0.52902526", "0.5287492", "0.5284049", "0.52723765", "0.5261262", "0.52588785", "0.52511066", "0.5245202", "0.52162725", "0.52162725", "0.5209104", "0.52051157", "0.52039933", "0.5198244", "0.5197101", "0.5194949", "0.51918656", "0.5185464", "0.5185464", "0.51838756", "0.51742953", "0.5165309", "0.5164734", "0.5156595", "0.51523405", "0.5147575", "0.513599", "0.5131146", "0.5128392", "0.5126886", "0.5100167", "0.50887865", "0.508787", "0.5085426", "0.5071083", "0.50650793", "0.5064484", "0.50629354", "0.50511783", "0.50492847", "0.50480187", "0.50468296", "0.5045001", "0.50442046", "0.50403804", "0.5035548", "0.5033895", "0.5032955", "0.5030725", "0.5028032", "0.50257766", "0.50212806", "0.50209725", "0.5018656", "0.50137955", "0.49948874", "0.4988329", "0.49766523", "0.4969951", "0.49644032", "0.49642017", "0.49635532", "0.49554163" ]
0.0
-1
Returns the name of the file from which this ini file was loaded.
public String getFilename() { return filename; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFileName()\r\n\t{\r\n\t\treturn settings.getFileName();\r\n\t}", "public String getName() {\n return _file.getAbsolutePath();\n }", "public String getName()\n {\n return( file );\n }", "public final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}", "public String getNameFile(){\n\t\t\treturn this.nameFile;\n\t\t}", "public String getFileName(){\r\n\t\treturn linfo != null ? linfo.getFileName() : \"\";\r\n\t}", "public String getFileName() {\n\t\treturn file.getFileName();\n\t}", "@Nullable public String getFileName() {\n return getSourceLocation().getFileName();\n }", "public String getName() { return FilePathUtils.getFileName(getPath()); }", "public String getFileName() {\n\t\treturn file.getName();\n\t}", "public final String getFilename() {\n return properties.get(FILENAME_PROPERTY);\n }", "public String getFileName()\n {\n return getString(\"FileName\");\n }", "public final String getFileName() {\n\n\t\treturn getValue(FILE_NAME);\n\t}", "public String getName() {\r\n return mFile.getName();\r\n }", "public String getFileName() {\n return getCellContent(FILE).split(FILE_LINE_SEPARATOR)[0];\n }", "public String getFile_name() {\n\t\treturn file_name;\n\t}", "public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }", "public String fileName () {\n\t\treturn fileName;\n\t}", "public String getFilename() {\n\treturn file.getFilename();\n }", "public String getName()\n\t{\n\t\treturn _fileName;\n\t}", "public String getSimpleName() { return FilePathUtils.getFileName(_name); }", "public String getFileName() {\r\n \t\tif (isFileOpened()) {\r\n \t\t\treturn curFile.getName();\r\n \t\t} else {\r\n \t\t\treturn \"\";\r\n \t\t}\r\n \t}", "public String getName() {\n\t\treturn filename;\n\t}", "public static String getName() {\n\t\treturn _asmFileStr;\n\t}", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "@Override\n\tpublic String getFilename() {\n\t\treturn this.path.getFileName().toString();\n\t}", "private String nakedFileName() {\n return f.getName().split(\"\\\\.\")[0];\n }", "public String fileName() {\n return this.fileName;\n }", "public String fileName() {\n return this.fileName;\n }", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "public String GetFileName() {\r\n\treturn fileName;\r\n }", "public String getSourceName() {\n\t\treturn fileName;\n\t}", "public final String getFileName() {\n return this.fileName;\n }", "protected String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn mItems.getJustFileName();\n\t}", "public String getFileName() {\n return String.format(\"%s%o\", this.fileNamePrefix, getIndex());\n }", "@Override\n\tpublic String getName()\n\t{\n\t\treturn fileName;\n\t}", "private String getFileName() {\n\t\t// retornamos el nombre del fichero\n\t\treturn this.fileName;\n\t}", "public final String getFileName()\r\n {\r\n return _fileName;\r\n }", "public String getFileRealName() {\n return fileRealName;\n }", "public String getName() {\n return dtedDir + \"/\" + filename;\n }", "public String getLexFileName() {\n return LexFileIdFileNameMap.getMap().get(lexFileNum);\n }", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String filename (){\r\n\t\t\treturn _filename;\r\n\t\t}", "public Object fileName() {\n return this.innerTypeProperties() == null ? null : this.innerTypeProperties().fileName();\n }", "java.lang.String getFilename();", "java.lang.String getFilename();", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFILE_NAME() { return FILE_NAME; }", "protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\n }", "public String getFileName(){\n\t\treturn _fileName;\n\t}", "public String getFileName() {\n return this.fileName;\n }", "public String getFileName() {\n return this.fileName;\n }", "public String fileNameTemplate() {\n return this.fileNameTemplate;\n }", "public String getSourceFileName() {\n\t\tStringIdMsType stringIdType =\n\t\t\tpdb.getTypeRecord(getSourceFileNameStringIdRecordNumber(), StringIdMsType.class);\n\t\tif (stringIdType == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn stringIdType.getString();\n\t}", "public String getFileName(){\n\t\treturn fileName;\n\t}", "public String getFileName()\r\n {\r\n return sFileName;\r\n }", "public String getFileName()\n {\n return getJarfileName();\n }", "public static String getKeyFile() {\n\t\tif (xml == null) return null;\n\t\treturn keyfile;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn new File(relativePath).getName();\n\t}", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getPropertyStartupFilename() {\r\n\t\treturn getProperty(startupFilenamePropertyName);\r\n\t}", "public String getInputFileName() \n\t{\n\t\treturn inputFileName;\n\t}", "public String getFileName()\r\n {\r\n return fileName;\r\n }", "public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "public static String getConfigFileName() {\r\n\t\treturn configFileName;\r\n\t}", "public String file() {\n return this.file;\n }", "public String getNameForFileSystem() {\r\n\t\treturn filename;\r\n\t}", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }" ]
[ "0.7321648", "0.72740227", "0.7106005", "0.7094169", "0.7025113", "0.70172596", "0.69646055", "0.6915568", "0.6886218", "0.6824583", "0.6809577", "0.6793674", "0.6786694", "0.6774731", "0.67323095", "0.67247105", "0.6718761", "0.6696245", "0.6686751", "0.66414875", "0.6634319", "0.661161", "0.6598675", "0.6581567", "0.65796083", "0.6579157", "0.65672153", "0.65340704", "0.65340704", "0.6524364", "0.6524364", "0.6524364", "0.6524364", "0.6524364", "0.6524364", "0.6524364", "0.6524364", "0.6524364", "0.65108967", "0.6497679", "0.6497186", "0.6487197", "0.6478866", "0.6453935", "0.6452008", "0.64395845", "0.64365536", "0.6436055", "0.63954467", "0.63896495", "0.6358765", "0.6358765", "0.6355337", "0.6355337", "0.6355337", "0.63513285", "0.63510406", "0.6347498", "0.6347498", "0.6336954", "0.6336954", "0.6336954", "0.6336954", "0.6336954", "0.631933", "0.63192916", "0.6314831", "0.6301932", "0.6301932", "0.6299894", "0.6285352", "0.62786853", "0.62694156", "0.6263578", "0.625878", "0.62585425", "0.6241142", "0.6241142", "0.6241142", "0.62338775", "0.622343", "0.62229246", "0.62131625", "0.62069184", "0.62069184", "0.62069184", "0.62069184", "0.62069184", "0.62058043", "0.61983454", "0.61981773", "0.6196626", "0.6196626", "0.6196626", "0.6196626", "0.6196626", "0.6196626", "0.6196626", "0.6196626", "0.6196626", "0.6196626" ]
0.0
-1
Creates a list of key value pairs from the specified file name. Use the getString, getInteger and getBoolean methods to retrieve the values.
public IniFile(String name) { this.filename = name; isavailable = parse(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void readFromFile(String key, String value);", "public ArrayList loadItems (String file) {\n ArrayList<Item> itemList = new ArrayList<>();\n\n File itemFile = new File(file);\n\n Scanner scanner = null;\n\n try{\n scanner = new Scanner(itemFile);\n\n } catch (FileNotFoundException e){\n e.printStackTrace();\n }\n\n while(scanner.hasNextLine()){\n String line = scanner.nextLine();\n String [] oneItem = line.split(\"=\");\n itemList.add(new Item(oneItem[0],Integer.parseInt(oneItem[1])));\n }\n\n\n return itemList;\n }", "public ArrayList<Item> loadItems(String filename) {\n ArrayList<Item> itemsList = new ArrayList<>();\n try {\n File file = new File(filename);\n BufferedReader reader= new BufferedReader(new InputStreamReader(new FileInputStream(file), \"UTF-8\"));\n String line= reader.readLine();\n while (line != null){\n String[] splitedLine = line.split(\"=\");\n String name = splitedLine[0];\n int weight = Integer.parseInt(splitedLine[1]) / 1000; // on convertit en tonnes\n itemsList.add(new Item(name,weight));\n line = reader.readLine();\n }\n reader.close(); //pour arreter la memoire tampon\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n return itemsList;\n }", "public static List<String> makeListFromFile(String filename) {\n\t\tList<String> names = new ArrayList<>();\n\t\ttry {\n\t\t\tFile file = new File(\"/Users/adhiman/Downloads/\" + filename);\n\t\t\tScanner input = new Scanner(file);\n\t\t\t\n\t\t\twhile (input.hasNextLine()) {\n\t\t\t\tString line = input.nextLine();\n\t\t\t\tnames.add(line);\n\t\t\t}\n\t\t\tinput.close();\n\t\t\t\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn names;\n\t}", "public List<String> readFileIntoList(String filepath) throws IOException;", "public List<String> loadFromFile(String fileName) {\n String line;\n List<String> listValuesFieldsEmployees = new ArrayList<>();\n\n try (FileReader fileReader = new FileReader(fileName);\n BufferedReader reader = new BufferedReader(fileReader)) {\n while ((line = reader.readLine()) != null) {\n listValuesFieldsEmployees.add(line);\n }\n } catch (IOException exc) {\n exc.printStackTrace();\n }\n return listValuesFieldsEmployees;\n }", "public static List<String> parseValues(String fileName)\n throws CLIException\n {\n BufferedReader in = null;\n List<String> values = new ArrayList<String>();\n \n try {\n in = new BufferedReader(new FileReader(fileName));\n String line = in.readLine();\n while (line != null) {\n line = line.trim();\n if (line.length() > 0) {\n values.add(line);\n }\n line = in.readLine();\n }\n } catch (IOException e) {\n throw new CLIException(e, ExitCodes.IO_EXCEPTION);\n } finally {\n if (in !=null ) {\n try {\n in.close();\n } catch (IOException e) {\n //ignore cannot close input stream\n }\n }\n }\n return values;\n }", "private ArrayList<String> parseFile(String file_name){ // extract each line from file AS string (stopList)\r\n ArrayList<String> list = new ArrayList<>();\r\n Scanner scanner = null;\r\n try{\r\n scanner = new Scanner(new BufferedReader(new FileReader(file_name)));\r\n while (scanner.hasNextLine())\r\n {\r\n list.add(scanner.nextLine());\r\n }\r\n }\r\n catch (Exception e ){ System.out.println(\"Error reading file -> \"+e.getMessage()); }\r\n finally {\r\n if(scanner != null ){scanner.close();} // close the file\r\n }\r\n return list;\r\n }", "public static List<String> loadListFromFile(File file) throws InstantiationException, IllegalAccessException {\n\t\n\tList<String> list = new ArrayList<String>();\n\t\n\tif (file.exists()) {\n\t try {\n\t\tScanner s = new Scanner(file);\n\t\twhile (s.hasNext())\n\t\t list.add(s.next());\n\t } catch (FileNotFoundException ex) {\n\t\t// This should never be thrown because we have an if to check it...\n\t }\n\t \n\t}\n\t\n\treturn list;\n\t\n }", "public static ArrayList<String> loadFileStrings(File f) {\n\t\tArrayList<String> fileStrings = new ArrayList<String>();\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null)\n\t\t\t\tfileStrings.add(line);\n\t\t\tbr.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t\treturn fileStrings;\n\t}", "private ArrayList<String> readEntriesFromFile(String nameOfFile){\n\t\tArrayList<String> foundEntries = new ArrayList<String>();\n\t\t\n\t\ttry{\n\t\t\tFile file = new File(nameOfFile); \n\t\t\tScanner fileIn = new Scanner(file);\n\t\t\twhile (fileIn.hasNext()){\n\t\t\t\tString currentLine = fileIn.nextLine();\n\t\t\t\tfoundEntries.add(currentLine);\n\t\t\t} \n\t\t\tfileIn.close();\n\t\t}catch (IOException e){\n\t\t}\n\t\t\n\t\tif(foundEntries.size()==0){\n\t\t return null;\n\t\t}else{\n\t\t\treturn foundEntries;\n\t\t}\n\t}", "public ArrayList<String> readFromFile(){\n ArrayList<String> results = new ArrayList<>();\n //Wrap code in a try/ catch to help with exception handling.\n try{\n //Create a object of Scanner class\n Scanner s = new Scanner(new FileReader(path));\n //While loop for iterating thru the file.\n // Reads the data and adds it to the ArrayList.\n while(s.hasNext()) {\n String c1 = s.next();\n String c2 = s.next();\n String w = s.next();\n results.add(c1);\n results.add(c2);\n results.add(w);\n }return results;\n\n }//File not found exception block.\n catch(FileNotFoundException e){\n System.out.println(e);\n }\n return results;//default return.\n }", "private void read_manifest(){\n dir = new File(context.getFilesDir(), folderName);\n dir.mkdir();\n manifestFile = new File(dir, \"manifest\");\n BufferedReader manifestIn = null;\n try {\n manifestIn = new BufferedReader(new FileReader(manifestFile));\n String line;\n while ((line = manifestIn.readLine()) != null) {\n String[] keyValuePair = line.split(\",\");\n pictureList.add(new KeyNamePair(keyValuePair[0], keyValuePair[1]));\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (manifestIn != null) {\n try {\n manifestIn.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private static HashMap<String, String> getUsers(String filename) {\n\t\t// Use hashmap to store the user list, the key is user name and the value is UUID\n\t\tHashMap<String, String> mapUsers = new HashMap<String, String>();\n\t\t// This will reference one line at a time\n\t\tString lineUser = null;\n\n\t\ttry {\n\t\t\t// Check file exists\n\t\t\tFile userfile = new File(filename);\n\t\t\tif(!userfile.exists() || userfile.isDirectory()) {\n\t\t\t\treturn mapUsers;\n\t\t\t}\n\t\t\t// Open the user file\n\t\t\tFileReader fileReader = new FileReader(filename);\n\t\t\t// User bufferedReader to go through the file\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\n\t\t\t// Read the file in lines one by one\n\t\t\twhile((lineUser = bufferedReader.readLine()) != null) {\n\t\t\t\tString[] namekey = lineUser.split(\" \"); // Split the name and key\n\t\t\t\tif (namekey.length != 2) { // Validate the data\n\t\t\t\t\tSystem.out.println(\"Invalid line: '\" + lineUser + \"' in '\" + filename + \"'\");\n\t\t\t\t\treturn mapUsers;\n\t\t\t\t}\n\t\t\t\t// Name + Key(UUID)\n\t\t\t\tmapUsers.put(namekey[0], namekey[1]);\n\t\t\t}\n\t\t\t// Always close files.\n\t\t\tbufferedReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException ex) {\n\t\t\tSystem.out.println(\"Unable to open file '\" + filename + \"'\");\n\t\t}\n\t\tcatch(IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\treturn mapUsers;\n\t\t}\n\t}", "private static ArrayList<String> read(String fileName, boolean next) {\n\t\t\n\n\t\tFile input = new File(fileName);\n\t\tArrayList<String> information = new ArrayList<String>();\n\t\t\n\t\t\n\t\t//uses a simple try catch to read the file\n\t\ttry {\n\t\t\t\n\t\t\tScanner fileReader = new Scanner(input);\n\t\t\t\n\t\t\tif(next) //if reading by word, the ArrayList will contain info by word\n\t\t\t\twhile(fileReader.hasNext()) \n\t\t\t\t\tinformation.add(fileReader.next());\n\t\t\t\t\n\t\t\telse //otherwise the ArrayList will contain info by lines\n\t\t\t\twhile(fileReader.hasNextLine())\n\t\t\t\t\tinformation.add(fileReader.nextLine());\n\t\t\t\n\t\t\tfileReader.close();\n\t\t} catch(FileNotFoundException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn information;\n\t}", "public void getFilenames(String filename) {\n\t\ttry {\n\t\t\tBufferedReader myReader = new BufferedReader(new FileReader(filename));\n\t\t\tString readLine;\n\t\t\ttry {\n\t\t\t\twhile ((readLine = myReader.readLine()) != null) {\n\t\t\t\t\tString newName = parseName(readLine);\n\n\t\t\t\t\t// Already contains element so append it to end.\n\t\t\t\t\tif (mapNames.containsKey(newName)) {\n\n\t\t\t\t\t\t// Add new name onto the end of the existing ArrayList.\n\t\t\t\t\t\tmapNames.get(newName).add(readLine);\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Create new arraylist with the unparsed name as the\n\t\t\t\t\t\t// value\n\t\t\t\t\t\tArrayList<String> arrName = new ArrayList<String>();\n\t\t\t\t\t\tarrName.add(readLine);\n\t\t\t\t\t\tmapNames.put(newName, arrName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"There has been an error reading the specified file.\");\n\t\t\t\t// End program if exception thrown.\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"The filename you have given does not exist.\\nPlease re-run the program.\");\n\t\t\t// End program if exception thrown.\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public static void extractValues() throws IOException{\n GenerateFile generateFile = new GenerateFile();\n Stream<String> fileStream1 = createStreamFromPath(\"src\"+File.separator+\"test.properties\");\n logger.info(fileStream1.toString());\n Set<String> extractedKeys = generateFile.extractvalsFromPropertiesFile(fileStream1);\n List<String> newString = new ArrayList<>(extractedKeys);\n System.out.println(extractedKeys);\n generateFile.createFileFromList(newString,\"values.txt\");\n }", "public static ArrayList<String> readToString(String filePath) {\n\t\tFile file = new File(filePath);\n\t\tArrayList<String> res = new ArrayList<String>();\n\t\tif (!file.exists()) {\n\t\t\treturn res;\n\t\t}\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tString str = null;\n\t\t\twhile ((str = br.readLine()) != null) {\n\t\t\t\tres.add(str);\n\t\t\t}\n\t\t\tfr.close();\n\t\t\tbr.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn res;\n\t}", "public HashMap<String, String[]> convertToArray() throws IOException\n\t{\n\t HashMap<String, String[]> map = new HashMap<String, String[]>();\n\t String[] list;\n\t \n\t String line;\n\t BufferedReader reader;\n\t\t\n\t try {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t\t\tString key = line;\n\t\t\t\tString value = \"\";\n\t\t\t\tString tmp;\n\t\t\t\t\n\t\t\t\twhile(!(tmp=reader.readLine()).equals(\"$\"))\n\t\t\t\t{\t\n\t\t\t\t\tvalue = value+tmp; \n\t\t\t\t}\n\t\t\t\tString values = value.replaceAll(\"\\\"\", \"\");\n\t\t\t\t\n\t\t\t\tString[] parts = values.split(\",\");\n\t\t map.put(key, parts);\n\t\t }\n\t\t\t\n\t\t\t/*for (String key : map.keySet())\n\t\t {\n\t\t System.out.println(key);\n\t\t for(int i=0; i < map.get(key).length; i++)\n\t\t {\n\t\t \tSystem.out.println(map.get(key)[i]);\n\t\t }\n\t\t }*/\n\t\t\t\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "List readFile(String pathToFile);", "public static List read(String fileName) throws IOException {\n\tList data = new ArrayList() ;\n Scanner scanner = new Scanner(new FileInputStream(fileName));\n try {\n while (scanner.hasNextLine()){\n data.add(scanner.nextLine());\n }\n }\n finally{\n scanner.close();\n }\n return data;\n }", "public static synchronized List<Pair<String, double[]>> getDataFromFile(String fileName) throws Exception\r\n\t{\t\r\n\t\tValidationHelper.validateIfParameterIsNullOrEmpty(fileName, \"fileName\");\r\n\t\t\r\n\t\tif (_dataCache.containsKey(fileName)) \r\n\t\t\treturn _dataCache.get(fileName);\r\n\t\t\r\n\t\tFile file = new File(fileName);\r\n\t\t\r\n\t\tValidationHelper.validateIfFileParameterExists(file, fileName);\r\n\t\t\r\n\t\tArrayList<Pair<String, double[]>> inputData = new ArrayList<Pair<String, double[]>>();\r\n\t\t\r\n\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\r\n\t\t\r\n\t\tString temp = null;\r\n\t\t\r\n\t\twhile ((temp = reader.readLine()) != null)\r\n\t\t{\r\n\t\t\ttemp = temp.replaceAll(\" \", \"\");\r\n\t\t\t\r\n\t\t\tString[] tokens = temp.split(\",\");\r\n\t\t\t\r\n\t\t\tif (tokens != null && tokens.length > 0)\r\n\t\t\t{\r\n\t\t\t\tdouble[] input = new double[tokens.length - 1];\r\n\t\t\t\tfor (int i = 0; i < tokens.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tString token = tokens[i];\r\n\r\n\t\t\t\t\tif (i == tokens.length-1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tinputData.add(new Pair<String, double[]>(token, input));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (token.matches(\"-{0,1}[0-9]{1,}(.[0-9]{1,}){0,1}\"))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdouble data = Double.parseDouble(token);\r\n\t\t\t\t\t\t\tinput[i] = data;\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}\r\n\t\t}\r\n\t\t\r\n\t\tif (!_dataCache.containsKey(fileName))\r\n\t\t\t_dataCache.put(fileName, inputData);\r\n\t\t\r\n\t\treturn inputData;\r\n\t}", "@Override\n public ArrayList parseFile(String pathToFile) {\n\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(pathToFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<String> data = new ArrayList<>();\n while (scanner.hasNext()) {\n data.add(scanner.next());\n }\n scanner.close();\n\n return data;\n }", "public ArrayList<String> fileRead(String fileName) {\n String line = null;\n ArrayList<String> list = new ArrayList<>();\n try {\n // FileReader reads text files in the default encoding.\n FileReader fileReader = new FileReader(fileName);\n\n // Always wrap FileReader in BufferedReader.\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n list.add(line);\n }\n\n // Always close files.\n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n return list;\n }", "public List<String> readFileContents(String filePath) throws APIException;", "protected List<HashMap<String,String>> fetchTextFileForDatabase(String filePathString) {\n Object[] fileObject = fetchTextFile(filePathString);\n if(!checkFile(fileObject)){\n System.exit(0);\n }\n\n List<HashMap<String, String>> candidateHashMapList = new ArrayList<HashMap<String, String>>();\n\n for(Object candidateObject: fileObject){\n String[] candidateArray = candidateObject.toString().split(\",\");\n HashMap<String, String> candidateHashMap = new HashMap<String, String>();\n candidateHashMap.put(\"first_name\", candidateArray[0]);\n candidateHashMap.put(\"middle_name\", candidateArray[1]);\n candidateHashMap.put(\"last_name\", candidateArray[2]);\n candidateHashMap.put(\"post_nominal\", candidateArray[3]);\n candidateHashMap.put(\"party_id\", candidateArray[4]);\n candidateHashMap.put(\"votes\", candidateArray[5]);\n candidateHashMap.put(\"percentage\", candidateArray[6]);\n candidateHashMap.put(\"district\", candidateArray[7]);\n candidateHashMap.put(\"result\", candidateArray[8]);\n candidateHashMap.put(\"election_cycle_id\", candidateArray[9]);\n candidateHashMap.put(\"state\", candidateArray[10]);\n candidateHashMapList.add(candidateHashMap);\n }\n\n return candidateHashMapList;\n }", "default List<String> getinputfilehdrs(String filename){\n List<String> headerlist = new ArrayList<>();\r\n return headerlist;\r\n }", "@Override\n\tpublic ProductCollection getList(String filename) throws CartServiceDaoException{\n\t\tMap<Product, Integer> list = new LinkedHashMap<>();\n\t\ttry (BufferedReader reader = new BufferedReader(new FileReader(filename))){\n\t\t\tint productNo = 1;\n\t\t\twhile(reader.ready()){\n\t\t\t\tString temp[] = reader.readLine().split(\"\\\\s+\");\n\t\t\t\tProduct newProduct = new Product(temp[0], new BigDecimal(temp[2]), productNo++);\n\t\t\t\tlist.put(newProduct, Integer.parseInt(temp[1]));\n\t\t\t}\n\t\t} catch(IOException e){\n\t\t\tthrow new CartServiceDaoException(\"ERROR: Reading file failed\");\n\t\t}\n\t\treturn new ProductCollection(list);\n\t}", "private static ArrayList<String> loadParameters() throws IOException {\r\n BufferedReader br = new BufferedReader(new FileReader(new File(\"conf.data\")));\r\n\r\n ArrayList<String> params = new ArrayList<>();\r\n\r\n String param;\r\n while ((param = br.readLine()) != null ){\r\n params.add(param);\r\n }\r\n\r\n return params;\r\n }", "public static List read(String file){\n\t\tLinkedList<String> data =\tnew LinkedList<String>();\n\t\tString dataRow;\n\t\t\n\t\ttry {\n\t\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\n\t\twhile((dataRow = br.readLine())!=null);{\t\n\t\t\tString[] dataRecord = dataRow.split(\",\");\n\t\t\tdata.addAll(dataRecord);\n\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not found file\");\n\t\t\te.printStackTrace();\n\t\t}catch (IOException e) {\n\t\tSystem.out.println(\"Could Not read file\");\n\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "private List<String> readFile(String fileName)\n {\n try\n {\n String file = new String(Files.readAllBytes(Paths.get(fileName)), Charset.forName(\"ISO-8859-1\"));\n file = file\n .toLowerCase()\n .replaceAll(\"[^\\\\w]+\", \" \")\n .replaceAll(\"[0-9]\", \"\");\n Tokenizer tokenizer = SimpleTokenizer.INSTANCE;\n String[] tokens = tokenizer.tokenize(file);\n return Arrays.asList(tokens);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }", "public static List<String> readIn(String filename) throws Exception {\r\n Path filePath = new File(filename).toPath();\r\n Charset charset = Charset.defaultCharset(); \r\n List<String> stringList = Files.readAllLines(filePath, charset);\r\n\r\n return stringList;\r\n }", "public static List<List<String>> readFile() {\r\n List<List<String>> out = new ArrayList<>();\r\n File dir = new File(\"./tmp/data\");\r\n dir.mkdirs();\r\n File f = new File(dir, \"storage.txt\");\r\n try {\r\n f.createNewFile();\r\n Scanner s = new Scanner(f);\r\n while (s.hasNext()) {\r\n String[] tokens = s.nextLine().split(\"%%%\");\r\n List<String> tokenss = new ArrayList<>(Arrays.asList(tokens));\r\n out.add(tokenss);\r\n }\r\n return out;\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "public static ArrayList<Student> read(String filename){\n\t\t\n\t\tArrayList<Student> students = new ArrayList<>();\n\n\t\tBufferedReader br;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tif (line.contains(\" \")){\n\t\t\t\t\tstudents.add(new Student(getGpaFromLine(line), getSatFromLine(line)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn students;\n\t}", "public Dictionary(String filename) throws IOException {\r\n\t\tFile dFile = new File(filename);\r\n\t\tFileReader fr = new FileReader(dFile);\r\n\t\tnew BufferedReader(fr).lines().forEach(e -> dict.add(e));\r\n\t\tfr.close();\r\n\t}", "public List<T> extract(String filename)\n {\n if (StringUtils.isBlank(filename))\n {\n throw new IllegalStateException(\"Name of the file must be specified!\");\n }\n else\n {\n data = new ArrayList<T>();\n ClassLoader classLoader = getClass().getClassLoader();\n InputStream inputStream = classLoader.getResourceAsStream(filename);\n\n Scanner scanner = new Scanner(inputStream);\n while (scanner.hasNextLine())\n {\n parse(scanner.nextLine());\n }\n scanner.close();\n\n return data;\n }\n }", "protected void readCSVToMap(String filename) throws Exception{ // IMPORTANT FUNCTION\n db = new HashMap<String, List<String>>();\n keys = new ArrayList<String>();\n InputStream is = getAssets().open(\"ABBREV_2.txt\");\n //File f = new File(path.toURI());\n //File f = new File(path.getFile());\n BufferedReader in = new BufferedReader(new InputStreamReader(is));//new BufferedReader(new FileReader(\"ABBREV_2.txt\"));\n String line = \"\";\n while ((line = in.readLine()) != null) {\n String parts[] = line.split(\"\\t\");\n List<String> nutrition = new ArrayList();\n for (int i = 1; i < parts.length; i++){\n nutrition.add(parts[i]);\n }\n db.put(parts[0], nutrition);\n keys.add(parts[0]);\n }\n in.close();\n\n }", "public static void readFromFile(ArrayList<String> sArrayList, Context context){\n\n int i=0;\n try{\n InputStream inputStream = context.openFileInput(TxtName);\n\n if(inputStream!=null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n String receivedString = \"\";\n\n while((receivedString = bufferedReader.readLine())!=null){\n sArrayList.set(i,receivedString);\n Log.d(\"fileContent\", \"readFromFile: \"+sArrayList.get(i)+\"\\n\");\n i++;\n }\n inputStream.close();\n }\n\n } catch (FileNotFoundException e) {\n Log.e(\"login activity\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"login activity\", \"Can not read file: \" + e.toString());\n }\n\n }", "public static SharedPreferences getPrefsFromFile(String filename) {\n return AndroidUtils.getGlobalContext().getSharedPreferences(filename, Context.MODE_PRIVATE);\n }", "static List<String> fileReader(String fileName){\n \n \n //Read a file and store the content in a string array.\n File f = new File(fileName);\n BufferedReader reader = null;\n String tempString = null;\n List<String> fileContent = new ArrayList<String>();\n //String[] fileContent = null;\n //int i = 0;\n \n try {\n reader = new BufferedReader(new FileReader(f));\n while ((tempString = reader.readLine()) != null){\n //while ((fileContent[i] = reader.readLine()) != null){\n fileContent.add(tempString);\n //i++;\n }\n reader.close();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n finally{\n if (reader != null){\n try{\n reader.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n }\n \n return fileContent;\n \n }", "public ArrayList<KeyVal> readLocalKeyVal(String key){\n\t\tArrayList<KeyVal> keyValList = new ArrayList<KeyVal>();\n\t\tString querySelection = DBHelper.KEY_FIELD+\"=?\";\n\t\tString selection = key;\n\t\tString []querySelectionArgs = new String[]{selection};\n\t\tif(selection.equals(\"@\")){\t// Fetch all the records\n\t\t\tquerySelection = null;\n\t\t\tquerySelectionArgs = null;\n\t\t}\n\t\tCursor cursor = dbHelper.query(null, querySelection, querySelectionArgs, null);\n\t\tif (cursor.moveToFirst()){\n\t\t\tdo{\n\t\t\t\tKeyVal newKeyVal = new KeyVal();\n\t\t\t\tnewKeyVal.setKey(cursor.getString(0));\n\t\t\t\tnewKeyVal.setVal(cursor.getString(1));\n\t\t\t\tnewKeyVal.setVersion(cursor.getString(2));\n\t\t\t\tkeyValList.add(newKeyVal);\n\t\t\t}while(cursor.moveToNext());\n\t\t}\n\t\tcursor.close();\n\t\treturn keyValList;\n\t}", "private List<Row> getConfigEntries() {\n InputStream inputStream = null;\n try {\n inputStream = getAssets().open(\"config.conf\");\n } catch (IOException ex) {\n System.err.println(\"File konnte nicht gelesen werden!\");\n }\n\n // inputStream in String umwandeln\n String configString = \"\";\n try {\n configString = inputStreamToString(inputStream);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // String in Zeilen umwandeln\n String[] keyValuePairs = configString.trim().split(\"\\n\");\n\n // String in Objekt mit key und value umwandeln\n return Arrays.stream(keyValuePairs).map(r -> {\n String[] temp = r.split(\"=\");\n String key = temp[0];\n String values = temp[1];\n return new Row(key, values);\n }).collect(Collectors.toList());\n }", "public static ArrayList<String> readFile(String fileName) {\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\ttry {\n\t\t\tFile myObj = new File(fileName);\n\t\t\tScanner myReader = new Scanner(myObj);\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tal.add(data);\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tif (e.toString().contains(\"No such file or directory\")) {\n\t\t\t\tal.add(\"no file found\");\n\t\t\t\treturn al;\n\t\t\t}\n\t\t}\n\t\treturn al;\n\t}", "private static ArrayList<String> readFile() throws ApplicationException {\r\n\r\n ArrayList<String> bookList = new ArrayList<>();\r\n\r\n File sourceFile = new File(FILE_TO_READ);\r\n try (BufferedReader input = new BufferedReader(new FileReader(sourceFile))) {\r\n\r\n if (sourceFile.exists()) {\r\n LOG.debug(\"Reading book data\");\r\n String oneLine = input.readLine();\r\n\r\n while ((oneLine = input.readLine()) != null) {\r\n\r\n bookList.add(oneLine);\r\n\r\n }\r\n input.close();\r\n } else {\r\n throw new ApplicationException(\"File \" + FILE_TO_READ + \" does not exsit\");\r\n }\r\n } catch (IOException e) {\r\n LOG.error(e.getStackTrace());\r\n }\r\n\r\n return bookList;\r\n\r\n }", "public ArrayList<?> getItems(String filename){\n \n try {\n FileInputStream fis = new FileInputStream(filename);\n ObjectInputStream ois = new ObjectInputStream(fis);\n items = (ArrayList<?>) ois.readObject();\n ois.close();\n \n \n }catch(IOException e){\n System.out.println(e);\n }catch(ClassNotFoundException e){\n System.out.println(e);\n }\n \n return items;\n }", "public static ArrayList<String> readBook(String filename)\n throws FileNotFoundException {\n ArrayList<String> words = new ArrayList<>();\n Scanner in = new Scanner(new File(filename));\n while (in.hasNext()) {\n words.add(in.next());\n }\n return words;\n }", "public void readFile(String fileName)\r\n {\n String key = new String();\r\n String value = new String();\r\n\r\n boolean readInfo = false;\r\n String out =\"\";\r\n String infoTag = \"\";\r\n String infoTagContent = \"\";\r\n\r\n try{\r\n System.out.println(\"Readig file \"+fileName+\" ...\");\r\n BufferedReader filereader = new BufferedReader(new FileReader(fileName));\r\n\r\n String line = new String();\r\n line = filereader.readLine();\r\n\r\n while(line != null){\r\n infoTag = \"\";\r\n infoTagContent = \"\";\r\n\r\n if((line.indexOf(\"=\") != -1) && (line.indexOf(\"#\") == -1))\r\n {\r\n key = line.substring(0, line.indexOf(\"=\"));\r\n value = line.substring(line.indexOf(\"=\")+1);\r\n\r\n key = key.trim();\r\n value = value.trim();\r\n\r\n if(key.equals(\"PREFIX\")){\r\n this.tagPrefix = value;\r\n } else {\r\n value = tagPrefix+\".\"+value;\r\n tagHash.put(key, value);\r\n }\r\n\r\n readInfo = false;\r\n infoHash.put(key, out);\r\n out = \"\";\r\n }\r\n\r\n\r\n if((line.indexOf(\"#\") == 0) && (line.indexOf(\"@\") != -1) && (line.indexOf(\"=\") != -1))\r\n {\r\n readInfo = true;\r\n infoTag = line.substring(line.indexOf(\"@\"), line.indexOf(\"=\"));\r\n infoTag.trim();\r\n infoTagContent = line.substring(line.indexOf(\"=\")+1);\r\n if(infoTagContent.trim().length() > 0) infoTagContent = infoTagContent+NL;\r\n out = out+infoTag+\": \"+NL+infoTagContent;\r\n }else if((line.indexOf(\"#\") == 0) && readInfo){\r\n // alreadey reading a tagInfo, means NL between entries\r\n out = out+line.substring(line.indexOf(\"#\")+1)+NL;\r\n }\r\n\r\n line = filereader.readLine();\r\n }\r\n\r\n filereader.close();\r\n\r\n //System.out.println(tagHash);\r\n\r\n }catch (Exception e){\r\n System.out.println(\"Exception in readFile: \"+e);\r\n }\r\n }", "public List<HashMap<String, String>> retrieveData(String filename, boolean... val) throws Exception {\r\n\t\treturn retrieveData(new XSSFWorkbook(new FileInputStream(filename)), val);\r\n\t}", "private Map<String, ArrayList<Integer>> createModes(String file) throws FileNotFoundException {\n Map<String, ArrayList<Integer>> tempModes = new HashMap<String, ArrayList<Integer>>();\n Scanner modeScan = new Scanner(new File(file));\n while (modeScan.hasNextLine()) {\n Scanner line = new Scanner(modeScan.nextLine());\n String name = line.next();\n ArrayList<Integer> notes = new ArrayList<Integer>();\n while (line.hasNextInt()) {\n notes.add(line.nextInt());\n }\n tempModes.put(name, notes);\n }\n return tempModes;\n }", "public HashMap<String,String> readMapFile(String filename) throws IOException {\n\t\tHashMap<String,String> valueMap = new HashMap<String,String>();\t\t\n List<String> cols = new ArrayList<String>(); \n\t\t\n try{\n \t buf = new BufferedReader(new FileReader(filename)); \n\t String strRead; \n\t while ((strRead=buf.readLine())!=null) {\n\t \tcols = Arrays.asList(strRead.split(\"\\t\")); \t\n\t \tif(cols.size() != 2)\n\t \t\tcontinue; \t\n\t \tvalueMap.put(cols.get(0),cols.get(1)); \t\n\t \t }\n\t } catch(IOException e){\n\t e.printStackTrace();\n\t } finally {\n\t \tbuf.close(); \n\t }\n\t\t\t\n\t\treturn valueMap;\n\t}", "static List<String> fileToList(){\n List<String> contacts = null;\n try {\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n contacts = Files.readAllLines(contactsListPath);\n } catch (IOException ioe){\n ioe.printStackTrace();\n }\n return contacts;\n }", "public ArrayList<String> parseFile(String fileName) throws IOException {\n\t\tthis.parrsedArray = new ArrayList<String>();\n\t\tFileInputStream inFile = null;\n\n\t\tinFile = new FileInputStream(mngr.getPath() + fileName);\n\t\tDataInputStream in = new DataInputStream(inFile);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n\t\tString strLine;\n\n\t\twhile ((strLine = reader.readLine()) != null && strLine.length() > 0) {\n\t\t\t// Print the content on the console\n\t\t\tparrsedArray.add(strLine);\n\t\t}\n\n\t\tinFile.close();\n\n\t\treturn parrsedArray;\n\n\t}", "public List<T> getData(String filePath) {\n\n\t\tif (filePath.isEmpty())\n\t\t\tthrow new IllegalArgumentException(\"No file name specified\");\n\t\tList<T> retVal = new ArrayList<T>();\n\t\tBufferedReader bufferedReader = null;\n\t\tint count = 0;\n\t\ttry {\n\t\t\tbufferedReader = new BufferedReader(new FileReader(filePath));\n\t\t\tString inputLine = \"\";\n\t\t\twhile (true) {\n\t\t\t\tinputLine = bufferedReader.readLine();\n\t\t\t\tif (inputLine == null)\n\t\t\t\t\tbreak;\n\t\t\t\tif (inputLine.isEmpty())\n\t\t\t\t\tcontinue;\n\t\t\t\tinputLine = inputLine.toLowerCase();\n\t\t\t\tinputLine = inputLine.replace(\"\\\\,\", \"\");\n\t\t\t\tT t = (T) parseLine(inputLine);\n\t\t\t\tif (t != null) {\n\t\t\t\t\tretVal.add(t);\n\t\t\t\t}\n\n\t\t\t\tcount++;\n\t\t\t\tif (count > Program.getCount())\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tSystem.err.println(ex.getMessage());\n\t\t} catch (IOException ex) {\n\t\t\tSystem.err.println(\"Unable to read the file : \" + ex.toString());\n\t\t} catch (Exception ex) {\n\n\t\t} finally {\n\t\t\tif (bufferedReader != null) {\n\t\t\t\ttry {\n\t\t\t\t\tbufferedReader.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.err.println(e.getStackTrace().toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn retVal;\n\t}", "public ArrayList<String> readFromFile(String fileName) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t ArrayList<String> retour = new ArrayList<String>();\n\t String line = null;\n\t while((line = reader.readLine()) != null) \n\t \tretour.add(line);\n\t \n\t reader.close();\n\t return retour; \n\t}", "public static ArrayList<String> get_headers(String filename) {\n ArrayList<String> headers = new ArrayList();\n\n try {\n\n FileInputStream fstream = new FileInputStream(filename);\n DataInputStream in = new DataInputStream(fstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String strLine;\n while ((strLine = br.readLine()) != null) {\n String[] str = strLine.split(\"\\t\");\n for (int i = 0; i < str.length; i++) {\n String string = str[i];\n headers.add(string);\n }\n\n break;\n\n }\n //Close the input stream\n in.close();\n } catch (Exception e) {//Catch exception if any\n e.printStackTrace();\n JOptionPane.showMessageDialog(null, \"Error interface reading file\");\n }\n\n\n\n return headers;\n }", "protected void loadKeys() {\n\t\tArrayList<String> lines = ContentLoader.getAllLinesOptList(this.keyfile);\n\t\tfor (String line : lines) {\n\t\t\tString[] parts = line.split(\"=\");\n\t\t\ttry {\n\t\t\t\tint fileID = Integer.parseInt(parts[0].trim());\n\t\t\t\tString restLine = parts[1].trim();\n\t\t\t\tString ccMethodName = restLine;\n\t\t\t\tif (restLine.indexOf('/') > 0) {\n\t\t\t\t\tint leftHashIndex = restLine.indexOf('/');\n\t\t\t\t\tccMethodName = restLine.substring(0, leftHashIndex).trim();\n\t\t\t\t}\n\t\t\t\t// String key = parts[0] + \".java\";\n\t\t\t\tkeyMap.put(fileID, ccMethodName);\n\t\t\t} catch (Exception exc) {\n\t\t\t\tSystem.err.println(line);\n\t\t\t}\n\t\t}\n\t}", "public static void storeFile(String fileName, List<String> arrayList) {\n\n \t// Creates a buffered reader for the file based on file name given.\n \ttry (BufferedReader br = new BufferedReader(new FileReader(fileName))) {\n String line;\n // Reads in the file line by line\n while ((line = br.readLine()) != null) {\n \t// Stores the line based on list to store in.\n arrayList.add(line);\n }\n } catch (IOException e) {\n System.err.println(\"ERROR: Could not read in file.\");\n }\n }", "public String[] getNames(){\n File file = new File(getContext().getFilesDir(),\"currentUsers.txt\");\n List<String> names = null;\n try {\n //read names from file\n names = new ArrayList<>(FileUtils.readLines(file, Charset.defaultCharset()));\n Log.i(TAG,\"names from currentUsers.txt: \" + names.toString());\n usernames = new String[names.size()];\n //populate the array with the data form file\n for(int i = 0; i < usernames.length; i++){\n String user = names.get(i);\n usernames[i] = user;\n Log.i(TAG, \"added \" + usernames[i] + \" to usernames array\");\n }\n } catch (IOException e) {\n Log.i(TAG, \"error: \" + e.getLocalizedMessage());\n }\n return usernames;\n }", "private List<Task> readFromFile() {\n if (file.exists()) {\n try {\n return objectmapper.readValue(file,TaskList.class);\n } catch (IOException e) {\n throw new IllegalStateException(e);\n }\n } else {\n return new ArrayList<>();\n }\n }", "public void readUserFile (){\n try {\n FileReader reader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(reader);\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n Scanner s = new Scanner(line); //use of a scanner to parse the line and assign its tokens to different variables\n//each line corresponds to the values of a User object\n while(s.hasNext()){\n String usrname = s.next();\n String pass = s.next();\n User u = new User(usrname,pass);\n userlist.add(u);//added to the list\n }\n \n }\n reader.close();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "java.util.List<java.lang.String>\n getFileNamesList();", "public ArrayList<String> loadToRead() {\n\n\t\tSAVE_FILE = TO_READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public void restoreFromFile(String fileName) throws KVException {\n this.resetStore();\n \n File f = new File(fileName);\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder;\n\t\ttry {\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t} catch (ParserConfigurationException e1) {\n\t\t\tKVMessage exceptionMessage = new KVMessage(\"resp\", \"Unknown Error: Parser Configuration Exception\");\n\t\t\tKVException exception = new KVException(exceptionMessage);\n\t\t\tthrow exception;\n\t\t}\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = docBuilder.parse(f);\n\t\t} catch (SAXException e1) {\n\t\t\tKVMessage exceptionMessage = new KVMessage(\"resp\", \"Unknown Error: SAX Exception\");\n\t\t\tKVException exception = new KVException(exceptionMessage);\n\t\t\tthrow exception;\n\t\t} catch (IOException e1) {\n\t\t\tKVMessage exceptionMessage = new KVMessage(\"resp\", \"IO Error\");\n\t\t\tKVException exception = new KVException(exceptionMessage);\n\t\t\tthrow exception;\n\t\t}\n\t\tdoc.getDocumentElement().normalize();\n\t\t\n\t\tNodeList nList = doc.getElementsByTagName(\"KVPair\");\n\t\t\n\t\tfor (int i = 0; i < nList.getLength(); i++) {\n\t\t\tNode curNode = nList.item(i);\n\t\t\t\n\t\t\tif (curNode.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tElement e = (Element) curNode;\n\t\t\t\tString key = e.getElementsByTagName(\"Key\").item(0).getTextContent();\n\t\t\t\tString val = e.getElementsByTagName(\"Value\").item(0).getTextContent();\n\t\t\t\tstore.put(key, val);\n\t\t\t}\n\t\t}\n }", "private void load(Path fileName) throws IOException {\n try(BufferedReader reader = Files.newBufferedReader(fileName)) {\n String line = \"\";\n\n // Matches lines with the format:\n // key=value\n // where the key is any sequence of lowercase letters. (a to z)\n // where value may be any letters from a to z (case insensitive) 0 to 9 or the letters '-' and '.'.\n Pattern validLine = Pattern.compile(\"^(?<key>[a-z]+)=(?<value>[a-zA-Z0-9-.]+)$\");\n\n // Read the file line by line\n while((line = reader.readLine()) != null) {\n if(line.startsWith(\";\")) { // Ignore lines that start with ;\n continue;\n }\n\n // Remove any whitespace\n line = line.trim();\n\n // Continue if our line is empty\n if(\"\".equals(line)) {\n continue;\n }\n\n Matcher matcher = validLine.matcher(line);\n\n if(!matcher.matches() || matcher.groupCount() != 2) {\n System.err.println(\"Unable to parse line: \" + line);\n continue;\n }\n\n String key = matcher.group(\"key\");\n String value = matcher.group(\"value\");\n\n map.put(key, value);\n }\n }\n }", "public HashMap<String, Car> createCarsFromFile(String filename) throws FileNotFoundException {\n\t\t\n\n\t\tFile fh = new File(filename);\n\t\tScanner myScanner = new Scanner(fh);\n\t\twhile(myScanner.hasNextLine()){\n\t\t\tString line = myScanner.nextLine();\n\t\t\tString[] lineArr = line.split(\";\");\n\t\t\tString id = IdFactory.getRegNr();\n\t\t\tString make = lineArr[0];\n\t\t\tString[] makeStuff = lineArr[1].split(\" \");\n\t\t\tString model = lineArr[0];\n\t\t\tString type = makeStuff[0];\n\t\t\tint mpg = Integer.parseInt(lineArr[4]);\n\t\t\tint weight = Integer.parseInt(lineArr[6]);\n\t\t\tCar c = new Car(make,model,type,mpg,weight);\n\t\t\tmyCars.put(c.getRegNr(),c);\n\t\t\tSystem.out.println(\"CAR\" + c);\n\t\t}\n\t\treturn myCars;\n\t}", "private void readData() {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(fileName)))) {\n String line;\n while ((line = br.readLine()) != null) {\n String[] parts = line.split(\",\");\n int zip = Integer.parseInt(parts[0]);\n String name = parts[1];\n\n zipMap.put(zip, name);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public ArrayList<String> lookup(String fileName)throws IOException{\n\t\t\n\t\tArrayList<String> peerList = new ArrayList<String>();\n\t\tpeerList = fileMap.get(fileName);\n\t\treturn peerList;\n\t\t\n\t}", "public static List<Map<String, String>> loadData(String filename) throws IOException {\n\t\tList<Map<String, String>> data = new ArrayList<>();\n\t\tPath dataFile = Paths.get(filename);\n\t\t\n\t\t// Files.readAllLines only accepts Path and returns a List\n\t\t// it reads the whole file in one shot\n\t\tList<String> linesList = Files.readAllLines(dataFile);\n\t\t// header row to attributes array\n\t\tString[] attributes = linesList.get(0).split(\",\");\n\t\t\n\t\t// process data rows\n\t\tfor (int i = 1; i < linesList.size(); i++) {\n\t\t\tString[] values = linesList.get(i).split(\",\");\n\t\t\tif (values.length == 0 && values[0].length() == 0) break;\n\t\t\t// create a map for each row\n\t\t\tMap<String, String> row = new HashMap<>();\n\t\t\t//fill the row\n\t\t\tfor (int j = 0; j < attributes.length; j++)\n\t\t\t\trow.put(attributes[j], values[j]);\n\t\t\tdata.add(row);\t\t// add data to row\n\t\t}\t\n\n\t\t// do the same with a Stream, but use the iterator of the stream\n\t\t// instead of dealing with it directly\n\t\tStream<String> linesStream = Files.lines(dataFile);\n\t\tIterator<String> it = linesStream.iterator();\n\t\tattributes = it.next().split(\",\");\n\t\twhile (it.hasNext()) {\n\t\t\tString[] values = it.next().split(\",\");\n\t\t\tif (values.length > 0 && values[0].length() > 0) {\n\t\t\t\tMap<String, String> row = new HashMap<>();\n\t\t\t\tfor (int i = 0; i < attributes.length; i++)\n\t\t\t\t\trow.put(attributes[i], values[i]);\n\t\t\t\t// data.add(row);\n\t\t\t}\n\t\t}\n\t\tlinesStream.close();\n\n\t\treturn data;\n\t}", "private List<String[]> parseFileByName(String name){\n\n List<String[]> content = new ArrayList<>();\n String csvFile = name;\n BufferedReader br = null;\n String line = \"\";\n String cvsSplitBy = \",\";\n\n try {\n\n br = new BufferedReader(new FileReader(csvFile));\n while ((line = br.readLine()) != null) {\n\n // use comma as separator\n String[] data = line.split(cvsSplitBy);\n content.add(data);\n\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n return content;\n }", "public static List<String> readListOfStringsFromFile(String filePath) throws IOException {\n List<String> list = new ArrayList<>();\n Files.lines(Paths.get(filePath), StandardCharsets.UTF_8).forEach(list::add);\n return list;\n }", "public static ArrayList<String> readWords(String fileName){\n\t\treturn read(fileName, true);\n\t}", "protected String[] readInFile(String filename) {\n Vector<String> fileContents = new Vector<String>();\n try {\n InputStream gtestResultStream1 = getClass().getResourceAsStream(File.separator +\n TEST_TYPE_DIR + File.separator + filename);\n BufferedReader reader = new BufferedReader(new InputStreamReader(gtestResultStream1));\n String line = null;\n while ((line = reader.readLine()) != null) {\n fileContents.add(line);\n }\n }\n catch (NullPointerException e) {\n CLog.e(\"Gest output file does not exist: \" + filename);\n }\n catch (IOException e) {\n CLog.e(\"Unable to read contents of gtest output file: \" + filename);\n }\n return fileContents.toArray(new String[fileContents.size()]);\n }", "public static ArrayList load(String filePath) throws IOException\n\t{\n\t\tString line;\n\t\tArrayList gameConfigs = new ArrayList();\n\t\tBufferedReader textReader = new BufferedReader(new FileReader(filePath));\n\t\t\n\t\twhile((line = textReader.readLine()) != null)\n\t\t{\n\t\t\tgameConfigs.add(line);\n\t\t}\n\t\t\n\t\ttextReader.close();\n\t\treturn gameConfigs;\n\t}", "public static ArrayList<String> Readfile(String fileName) {\n\t\t\t\t\t// This will reference one line at a time\n\t\t\t\t\tArrayList<String> doc = new ArrayList<String>();\n\t\t\t\t\tString line = null;\n\t\t\t\t\tString fileNamehere = fileName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// FileReader reads text files in the default encoding.\n\t\t\t\t\t\tFileReader fileReader = new FileReader(fileName);\n\n\t\t\t\t\t\t// Always wrap FileReader in BufferedReader.\n\t\t\t\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\n\t\t\t\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\t\t\tdoc.add(line);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Always close files.\n\t\t\t\t\t\tbufferedReader.close();\n\t\t\t\t\t} catch (FileNotFoundException ex) {\n\t\t\t\t\t\tSystem.out.println(\"file not found '\" + fileName + \"'\");\n\t\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\treturn doc;\n\t}", "private List<KeyFileEntry> convertLinesIntoInMemoryObjectList(List<String> lines) {\n List<KeyFileEntry> retList = new ArrayList<>(1250);\n\n int i = 0;\n\n // Ignore the header lines and information\n for (; i < lines.size(); i++) {\n String lineIgnore = lines.get(i);\n if (lineIgnore.startsWith(\"______\")) {\n break;\n }\n }\n\n // Ignore underscore ___ line\n i++;\n\n // reached entries lines\n KeyFileEntry entry = new KeyFileEntry();\n\n // create in memory list of objects\n while (i < lines.size()) {\n String line = lines.get(i);\n\n // For terminating line no need to complete loop\n if (line.equals(\"//\")) {\n retList.add(entry);\n entry = new KeyFileEntry();\n i++;\n continue;\n }\n\n String[] tokens = line.split(SPLIT_SPACES);\n switch (tokens[0]) {\n case \"ID\":\n entry.id = tokens[1];\n break;\n case \"IC\":\n entry.ic = tokens[1];\n break;\n case \"AC\":\n entry.ac = tokens[1];\n break;\n case \"DE\":\n entry.de.add(tokens[1]);\n break;\n case \"SY\":\n entry.sy.add(tokens[1]);\n break;\n case \"HI\":\n entry.hi.add(tokens[1]);\n break;\n case \"GO\":\n entry.go.add(tokens[1]);\n break;\n case \"CA\":\n entry.ca = tokens[1];\n break;\n case \"WW\":\n entry.ww.add(tokens[1]);\n break;\n default:\n LOG.info(\"Unhandle line found while parsing file: {}\", line);\n\n }\n\n // read and save next line\n i++;\n }\n return retList;\n }", "public BookList(String filename) throws IOException {\r\n bookList = new ArrayList<Book>();\r\n //use Chapter 5 in the book to create a File object and then a Scanner object with the File object.\r\n //Check if the file exists, if not, post a message to the console output.\r\n //Loop through the lines in the file and use a StringTokenizer (chapter 8) to tokenize the string on the comma.\r\n //Create a Book object with the title and price as parameters and add that Book object to the bookList attribute\r\n //in this class\r\n File file = new File(filename);\r\n if (file.exists()){\r\n Scanner fileScan = new Scanner(file);\r\n while(fileScan.hasNext()){\r\n StringTokenizer strTok = new StringTokenizer(fileScan.nextLine(), \",\");\r\n Book book = new Book(strTok.nextToken().trim(), Double.parseDouble(strTok.nextToken().trim()));\r\n bookList.add(book);\r\n }\r\n }else{\r\n System.out.println(\"File not found: \" + filename);\r\n }\r\n\r\n\r\n }", "public static List<User> getUserFromJson(String filename){\n \tString s = readJsonFile(filename);\n \tList<User> users = JSONObject.parseArray(s, User.class);\n \treturn users;\n }", "public ArrayList<String> loadRead() {\n\n\t\tSAVE_FILE = READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public static ArrayList<String> convert2list(String filename) \n\t\t\tthrows FileNotFoundException{\n\t\tInputStream oeuvre = new FileInputStream(filename);\n\t\tScanner scanner = new Scanner(oeuvre).useDelimiter(\"\\n\");\n\t\t\n\t\tArrayList<String> words = new ArrayList<String>();\n\t\twhile(scanner.hasNext()){\n\t\t\twords.add(scanner.next());\n\t\t}\n\t\treturn words;\n\t}", "public List<PGPSecretKeyRing> load(File file)\r\n\t\t\tthrows IOException, PGPException {\r\n\t\tInputStream stream = null;\r\n\t\ttry {\r\n\t\t\tstream = new BufferedInputStream(new FileInputStream(file), 0x1000);\r\n\t\t\treturn load(stream);\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tstream.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static void read()\n\t\t{\n\n\n\t\t\tString content=new String();\n\t\t\ttry {\n\t\t\t\tFile file=new File(\"Dic.txt\");\n\t\t\t\tScanner scan=new Scanner(file);\n\t\t\t\twhile(scan.hasNextLine()) {\n\t\t\t\t\tcontent=scan.nextLine();\n\t\t\t\t//\tSystem.out.println(content);\n\n\t\t\t\t//\tString [] array=content.split(\" \");\n\t\t\t\t\tlist.add(content.trim());\n\n\t\t\t\t}\n\t\t\t\tscan.close(); \n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\n\n\t\t}", "public ArrayList<String> readFile(File file) {\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\ttry {\n\t\t\tif (file.exists()) {\n\t\t\t\tFileReader fr = new FileReader(file);\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\t\tString line;\n\t\t\t\tbr.readLine();\n\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\tal.add(line);\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t\tbr.close();\n\t\t\t}\n\t\t} catch (IOException e) {\t\n\t\t\t}\n\t\treturn al;\n\t\t}", "private void loadFromFile(){\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Countbook>>() {}.getType();\n countbookList = gson.fromJson(in, listType);\n } catch (FileNotFoundException e) {\n countbookList = new ArrayList<Countbook>();\n }\n }", "public HashSet<String> createDictionary() {\r\n HashSet<String> dictionary = new HashSet<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\");\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() >= 3) dictionary.add(line); // take only the 3 letter word\r\n }\r\n } catch (IOException e) {\r\n }\r\n return dictionary;\r\n }", "public static TaskList loadExistingTaskList(String fileName) {\n TaskList taskList = new TaskList();\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(fileName));\n String line;\n while ((line = br.readLine()) != null) {\n try {\n // process the line\n taskList.addItem(TaskItem.getItemFromLine(line, \"\\\\|\"));\n }\n catch(Exception e1) {\n System.out.println(e1.getMessage());\n }\n }\n }\n catch (IOException e) {\n System.out.println(\"File not found\");\n }\n finally {\n if (br != null) {\n try {\n br.close();\n }\n catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }\n }\n return taskList;\n }", "List<WrappedKeyValue<TKey, TValue>> GetElements() throws IOException;", "public static void reading(String fileName)\n {\n\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<Object> pareseFile(String fileName) throws FileNotFoundException, IOException, ParseException {\n\t\tJSONParser parser = new JSONParser();\n\t\tObject object = parser.parse(new FileReader(new File(fileName)));\n\t\tJSONArray array = (JSONArray) object;\n\t\tArrayList<Object> arrayList = new ArrayList<>();\n\t\tfor (int i = 0; i < array.size(); i++) {\n\t\t\tJSONObject obj = (JSONObject) array.get(i);\n\t\t\tarrayList.add(obj);\n\t\t} \n\n\t\treturn arrayList;\n\t}", "@SuppressWarnings(\"resource\")\n\tpublic static ArrayList<ArrayList<String>> FileUtils(String fileName) {\n\n\t\t// String fileDirectory = System.getProperty(\"user.dir\");\n\t\t// StringBuilder stringBuilder = new StringBuilder(fileDirectory);\n\t\t// stringBuilder.append(System.getProperty(\"file.separator\"));\n\t\t// stringBuilder.append(fileName);\n\t\t// String file_Name = stringBuilder.toString();\n\t\tString file_Name = fileName;\n\t\tArrayList<ArrayList<String>> input_data = new ArrayList<ArrayList<String>>();\n\t\tFile file = new File(file_Name);\n\t\tScanner input;\n\t\ttry {\n\t\t\tinput = new Scanner(file);\n\t\t\twhile (input.hasNext()) {\n\t\t\t\tString[] inputForEachRow = input.next().split(\",\");\n\t\t\t\tinput_data.add(new ArrayList<String>(Arrays\n\t\t\t\t\t\t.asList(inputForEachRow)));\n\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Exception: \" + e);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn input_data;\n\n\t}", "private static Properties getProperties(final String filename) throws IOException, FileNotFoundException {\r\n \r\n final Properties result = new Properties();\r\n final InputStream propertiesStream = getInputStream(filename);\r\n result.load(propertiesStream);\r\n return result;\r\n }", "public static Properties loadProperties(String filePath)\n {\n \tProperties listProperties = new Properties();\n\t\t//System.out.println(filePath);\n\n\t\tFileInputStream file = null;\n\t\ttry \n\t\t{\n\t\t\tfile = new FileInputStream(filePath);\n\t\t\t\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry \n\t\t{\n\t\t\t listProperties.load(file);\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listProperties;\n }", "public Varargs loadFile(String filename) {\r\n\t\tFile f = FileManager.get(filename, computer.getID());\r\n\t\tInputStream is = null;\r\n\t\tif ( f == null )\r\n\t\t\treturn LuaValue.varargsOf(LuaValue.NIL, LuaValue.valueOf(\"cannot open \"+filename+\": No such file or directory\"));\r\n\t\ttry {\r\n\t\t\tis = new FileInputStream(f);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\treturn LuaValue.varargsOf(LuaValue.NIL, LuaValue.valueOf(\"cannot open \"+filename+\": No such file or directory\"));\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\treturn loadStream(is, \"@\"+filename);\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tis.close();\r\n\t\t\t} catch ( Exception e ) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static final List<String> readFilelist(final String name) throws IOException {\n LOGGER.info(\"Reading file list from {}\", name);\n List<String> names = new ArrayList<String>();\n BufferedReader lineReader = new BufferedReader(new FileReader(name));\n try {\n String line = lineReader.readLine();\n while (line != null) {\n line = line.trim();\n if (!new File(line).isFile()) {\n throw new FileNotFoundException(line + \" is not a file\");\n }\n names.add(line);\n line = lineReader.readLine();\n }\n Collections.sort(names);\n return names;\n } finally {\n lineReader.close();\n }\n }", "public void setAuthKeysFromTextFile(String textFile) {\n\n\t\ttry (Scanner scan = new Scanner(getClass().getResourceAsStream(textFile))) {\n\n\t\t\tString apikeyLine = scan.nextLine(), secretLine = scan.nextLine();\n\n\t\t\tapikey = apikeyLine.substring(apikeyLine.indexOf(\"\\\"\") + 1, apikeyLine.lastIndexOf(\"\\\"\"));\n\t\t\tsecret = secretLine.substring(secretLine.indexOf(\"\\\"\") + 1, secretLine.lastIndexOf(\"\\\"\"));\n\n\t\t} catch (NullPointerException | IndexOutOfBoundsException e) {\n\n\t\t\tSystem.err.println(\"Text file not found or corrupted - please attach key & secret in the format provided.\");\n\t\t}\n\t}", "public String[] getParameters(File file) throws StorageException,\n\t\t\tFileNotFoundException {\n\t\tString[] retVal = null;\n\n\t\ttry {\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"fileName\", file.getAbsoluteFile());\n\t\t\tObject result = psm.callScript(new ScriptRequest(Thread\n\t\t\t\t\t.currentThread().hashCode(), \"getVars\", args));\n\t\t\tif (result == null) {\n\t\t\t\tretVal = new String[0];\n\t\t\t} else {\n\t\t\t\tretVal = (String[]) result;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new StorageException(\n\t\t\t\t\t\"Failed to retrieve parameters from QC file: \" + file\n\t\t\t\t\t\t\t+ \"\\n\" + e.getMessage(), null, new Exception(e));\n\t\t} catch (JepException e) {\n\t\t\tthrow new StorageException(\n\t\t\t\t\t\"Failed to retrieve parameters from QC file: \" + file\n\t\t\t\t\t\t\t+ \"\\n\" + e.getMessage(), null, new Exception(e));\n\t\t}\n\t\treturn retVal;\n\t}", "private String[] loadFile(String filename) {\n\t\treturn loadFile(filename, new String[0], System.lineSeparator());\n\t}", "public ArrayList<SoundInfo> readFile(String textFilePath) {\n\t\t\n\t\topenNewProject();\n\t\tprojectFileIO = new XMLReaderWriter(textFilePath);\n\t\t\n\t\t// Read the project file and save its contents to memory\n\t\tArrayList<SoundInfo> readSounds = projectFileIO.readFile();\n\t\tArrayList<Integer> removeSounds = new ArrayList<Integer>();\n\t\tfor (int s=0; s < readSounds.size(); s++) {\n\t\t\tSoundInfo currSound = readSounds.get(s);\n\t\t\tint keyCode = currSound.getKeyCode();\n\t\t\t\n\t\t\tif (!soundList.containsKey(keyCode)) {\n\t\t\t\tsoundList.put(keyCode, currSound);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Two sounds with the same key code were found in the file\n\t\t\t\t// Report this as a read error\n\t\t\t\tremoveSounds.add(s);\n\t\t\t\tcurrSound.close();\n\t\t\t\tprojectModified = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Remove sounds with duplicate key codes from the list\n\t\tfor (int i=0; i < removeSounds.size(); i++) {\n\t\t\tint index = removeSounds.get(i);\n\t\t\treadSounds.remove(index);\n\t\t}\n\t\t\n\t\t// The contents of the project file may have been modified in memory to make the values valid\n\t\tif (projectFileIO.getReadError()) {\n\t\t\tprojectModified = true;\n\t\t}\n\t\t\n return readSounds;\n\t}", "private void loadInventory(String fileName){\t\t\r\n\t\tList<String> list = new ArrayList<String>();\r\n\r\n\t\ttry (Stream<String> stream = Files.lines(Paths.get(fileName))) {\r\n\t\t\t//Convert it into a List\r\n\t\t\tlist = stream.collect(Collectors.toList());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tfor(String itemList : list){\r\n\t\t\tString[] elements = itemList.split(\"--\");\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tswitch(elements[0].toUpperCase()){\r\n\t\t\t\t\tcase \"BURGER\":\r\n\t\t\t\t\t\t\tinventory.add(createBurger(elements));;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"SALAD\":\r\n\t\t\t\t\t\t\tinventory.add(createSalad(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"BEVERAGE\":\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tinventory.add(createBeverage(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"SIDE\":\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tinventory.add(createSide(elements));;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"DESSERT\":\r\n\t\t\t\t\t\t\tinventory.add(createDessert(elements));;\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "public ArrayList<String> readItem();", "private static byte[] getKeyData(String filePath) {\n File file = new File(filePath);\n byte[] buffer = new byte[(int) file.length()];\n FileInputStream fis = null;\n try {\n fis = new FileInputStream(file);\n fis.read(buffer);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fis != null)\n try {\n fis.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return buffer;\n }", "java.util.List<java.lang.String>\n getFileNamesList();" ]
[ "0.6270862", "0.60765994", "0.5978085", "0.59254867", "0.589766", "0.5888074", "0.5827956", "0.5800059", "0.57741725", "0.57346106", "0.571727", "0.5712583", "0.56629455", "0.5602694", "0.5590172", "0.5548749", "0.55335176", "0.55240905", "0.55236876", "0.5506778", "0.54943", "0.54818773", "0.5462187", "0.5448473", "0.54478335", "0.5440798", "0.5431562", "0.5428307", "0.5415004", "0.5414706", "0.53924525", "0.53875417", "0.5345515", "0.53397167", "0.5336257", "0.53302956", "0.5315015", "0.5306991", "0.53064054", "0.53051215", "0.530184", "0.52951765", "0.528644", "0.5286397", "0.5278796", "0.5269568", "0.52509093", "0.52421093", "0.5237331", "0.523665", "0.5234812", "0.521538", "0.5198311", "0.5197111", "0.51969355", "0.5190327", "0.51891875", "0.5186571", "0.5186516", "0.5184793", "0.51831937", "0.517792", "0.51773393", "0.51722825", "0.5165996", "0.5156172", "0.51536983", "0.5139961", "0.5135167", "0.5128544", "0.5125236", "0.5122832", "0.5122784", "0.51226085", "0.5121036", "0.5101731", "0.50955224", "0.5094588", "0.5092778", "0.50823474", "0.5082109", "0.5075063", "0.50720644", "0.50705713", "0.50696385", "0.50640273", "0.5052864", "0.5052588", "0.50469583", "0.5046515", "0.50437236", "0.5043266", "0.50428915", "0.504268", "0.5042059", "0.5039922", "0.50390905", "0.5035349", "0.503501", "0.503317", "0.5022505" ]
0.0
-1
Parses the file and creates a keyvaluepair list.
private boolean parse(String name) { BufferedReader in; try { in = new BufferedReader(new InputStreamReader(new FileInputStream(name))); } catch (IOException e) { return false; } try { while (true) { String line = in.readLine(); if (line != null) { // skip the commented lines if (!line.startsWith("//") && !line.startsWith(";") && !line.startsWith("#")) { int i = line.indexOf('='); // we also skip lines without an equal sign if (i != -1) keyvaluepairs.put(line.substring(0, i).trim().toLowerCase(), line.substring(i + 1).trim()); } } else break; } } catch (IOException e) { } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void parseValues(File file){\r\n\t\ttry {\r\n\t\t\tScanner scanner = new Scanner(file);\r\n\t\t\tString line;\r\n\t\t\tif(scanner.hasNext()) \r\n\t\t\t\tline = scanner.nextLine();\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tline = scanner.nextLine();\r\n\t\t\t\taddToSupplyValues(line);\r\n\t\t\t}\r\n\t\t\tscanner.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "Map <String, List <String> > parse (List <String> keys, List <String> lines);", "public ArrayList loadItems (String file) {\n ArrayList<Item> itemList = new ArrayList<>();\n\n File itemFile = new File(file);\n\n Scanner scanner = null;\n\n try{\n scanner = new Scanner(itemFile);\n\n } catch (FileNotFoundException e){\n e.printStackTrace();\n }\n\n while(scanner.hasNextLine()){\n String line = scanner.nextLine();\n String [] oneItem = line.split(\"=\");\n itemList.add(new Item(oneItem[0],Integer.parseInt(oneItem[1])));\n }\n\n\n return itemList;\n }", "public static List<String> parseValues(String fileName)\n throws CLIException\n {\n BufferedReader in = null;\n List<String> values = new ArrayList<String>();\n \n try {\n in = new BufferedReader(new FileReader(fileName));\n String line = in.readLine();\n while (line != null) {\n line = line.trim();\n if (line.length() > 0) {\n values.add(line);\n }\n line = in.readLine();\n }\n } catch (IOException e) {\n throw new CLIException(e, ExitCodes.IO_EXCEPTION);\n } finally {\n if (in !=null ) {\n try {\n in.close();\n } catch (IOException e) {\n //ignore cannot close input stream\n }\n }\n }\n return values;\n }", "public void restoreFromFile(String fileName) throws KVException {\n this.resetStore();\n \n File f = new File(fileName);\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder;\n\t\ttry {\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t} catch (ParserConfigurationException e1) {\n\t\t\tKVMessage exceptionMessage = new KVMessage(\"resp\", \"Unknown Error: Parser Configuration Exception\");\n\t\t\tKVException exception = new KVException(exceptionMessage);\n\t\t\tthrow exception;\n\t\t}\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = docBuilder.parse(f);\n\t\t} catch (SAXException e1) {\n\t\t\tKVMessage exceptionMessage = new KVMessage(\"resp\", \"Unknown Error: SAX Exception\");\n\t\t\tKVException exception = new KVException(exceptionMessage);\n\t\t\tthrow exception;\n\t\t} catch (IOException e1) {\n\t\t\tKVMessage exceptionMessage = new KVMessage(\"resp\", \"IO Error\");\n\t\t\tKVException exception = new KVException(exceptionMessage);\n\t\t\tthrow exception;\n\t\t}\n\t\tdoc.getDocumentElement().normalize();\n\t\t\n\t\tNodeList nList = doc.getElementsByTagName(\"KVPair\");\n\t\t\n\t\tfor (int i = 0; i < nList.getLength(); i++) {\n\t\t\tNode curNode = nList.item(i);\n\t\t\t\n\t\t\tif (curNode.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tElement e = (Element) curNode;\n\t\t\t\tString key = e.getElementsByTagName(\"Key\").item(0).getTextContent();\n\t\t\t\tString val = e.getElementsByTagName(\"Value\").item(0).getTextContent();\n\t\t\t\tstore.put(key, val);\n\t\t\t}\n\t\t}\n }", "private static HashMap<String, ArrayList<String>> parseKeyValueList(String keySpliter,String valueSpliter,String listSeperator, String strToParse) {\r\n\t\tHashMap<String, ArrayList<String>> key_ValuesList_Map = new HashMap<String, ArrayList<String>>();\r\n\t\tif (listSeperator== null)\r\n\t\t\tlistSeperator=\"\\n\"; // new line\r\n\t\t\t\r\n\t\tif (!strToParse.equals(\"\")) {\r\n\t\t\tString[] strs = strToParse.split(listSeperator);//default listSeperator=\"\\n\" is new line\r\n\r\n\t\t\tArrayList<String> local_values = null;\r\n\t\t\tString criteria = \"\";\r\n\t\t\tfor (String str_tmp : strs) { // str_tmp = enrollment:\r\n\t\t\t\t\t\t\t\t\t\t\t// uma_rob;uma_qa1;\r\n\t\t\t\tString[] strs_tmp = str_tmp.split(keySpliter);//keySpliter=\":\"\r\n\t\t\t\tcriteria = strs_tmp[0].trim();// enrollment or non-enrollment\r\n\t\t\t\tstrs_tmp[1]=strs_tmp[1].trim();\r\n\t\t\t\tif (key_ValuesList_Map.containsKey(criteria)) {\r\n\t\t\t\t\tlocal_values = key_ValuesList_Map.get(criteria);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlocal_values = new ArrayList<String>();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (Validate.isBlank(valueSpliter)){ // can also be blank, then pass null or \"\"\r\n\t\t\t\t\tlocal_values.add(strs_tmp[1]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tString[] values_tmp = strs_tmp[1].split(valueSpliter);//valueSpliter=\";\"\r\n\t\t\t\t\tfor (String value : values_tmp) {\r\n\t\t\t\t\t\tlocal_values.add(value.trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tkey_ValuesList_Map.put(criteria, local_values);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn key_ValuesList_Map;\r\n\t}", "public HashMap<String, String[]> convertToArray() throws IOException\n\t{\n\t HashMap<String, String[]> map = new HashMap<String, String[]>();\n\t String[] list;\n\t \n\t String line;\n\t BufferedReader reader;\n\t\t\n\t try {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t\t\tString key = line;\n\t\t\t\tString value = \"\";\n\t\t\t\tString tmp;\n\t\t\t\t\n\t\t\t\twhile(!(tmp=reader.readLine()).equals(\"$\"))\n\t\t\t\t{\t\n\t\t\t\t\tvalue = value+tmp; \n\t\t\t\t}\n\t\t\t\tString values = value.replaceAll(\"\\\"\", \"\");\n\t\t\t\t\n\t\t\t\tString[] parts = values.split(\",\");\n\t\t map.put(key, parts);\n\t\t }\n\t\t\t\n\t\t\t/*for (String key : map.keySet())\n\t\t {\n\t\t System.out.println(key);\n\t\t for(int i=0; i < map.get(key).length; i++)\n\t\t {\n\t\t \tSystem.out.println(map.get(key)[i]);\n\t\t }\n\t\t }*/\n\t\t\t\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "@Override\n public ArrayList parseFile(String pathToFile) {\n\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(pathToFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<String> data = new ArrayList<>();\n while (scanner.hasNext()) {\n data.add(scanner.next());\n }\n scanner.close();\n\n return data;\n }", "private void readFiles(File fileDir) {\n \t\n\t\tif(!fileDir.exists() || !fileDir.isDirectory()) {\n\t\t\treturn;\n\t\t}\n\t\tBufferedReader reader = null;\n\t\tString command = \"cat \";\n\t\tFile[] files = fileDir.listFiles();\n\t\tfor(File file : files) {\n\t\t\tcommand += file.getAbsolutePath();\n\t\t\tcommand += \" \";\n\t\t}\n\t\tcommand += \" | sort\";\n\t\tString[] cmd = {\n\t\t\t\t\"sh\",\n\t\t\t\t\"-c\",\n\t\t\t\tcommand\n\t\t\t\t};\n\t\tProcess p;\n\t\ttry {\n\t\t\tp = Runtime.getRuntime().exec(cmd);\n\t\t\treader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\t\t\tString line = null;\n\t\t\tString lastKey = null;\n\t\t\tList<String> values = new ArrayList<String>();\n\t\t\twhile((line = reader.readLine()) != null) {\n\t\t\t\tString[] parts = line.split(\"\\\\t\");\n\t\t\t\tif (parts.length < 2) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tString thisKey = parts[0].trim();\n\t\t\t\tString value = parts[1].trim();\n\t\t\t\thandler.onKVPairRead();\n\t\t\t\tif (lastKey != null && !thisKey.equals(lastKey)) {\n\t\t\t\t\tlines.add(new KVPair(lastKey, new ArrayList<String>(values)));\n\t\t\t\t\tvalues.clear();\n\t\t\t\t}\n\t\t\t\tlastKey = thisKey;\n\t\t\t\tvalues.add(value);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treduceComplete = true;\n }", "public static Map<String, String> parse(File file) throws IOException {\n List<String> configs = Files.readAllLines(file.toPath());\n return configs.stream()\n .map(it -> it.split(\"\\t\"))\n .collect(toMap(splitted -> splitted[0], splitted -> splitted[1]));\n }", "private void loadAndProcessInput(){\n transactions_set = new ArrayList<>();\n strItemToInt = new HashMap<>();\n intToStrItem = new HashMap<>();\n \n try{\n BufferedReader br = new BufferedReader(\n new InputStreamReader(\n new FileInputStream(this.inputFilePath)\n ));\n \n String line;\n while((line = br.readLine()) != null){\n String[] tokens = line.split(\" \");\n ArrayList<Integer> itemsId = new ArrayList();\n \n for(String item : tokens){\n if( ! strItemToInt.containsKey(item)){\n strItemToInt.put(item, strItemToInt.size()+1);\n intToStrItem.put(strItemToInt.size(), item);\n }\n itemsId.add(strItemToInt.get(item));\n }\n transactions_set.add(itemsId);\n }\n }\n catch(IOException fnfEx){\n System.err.println(\"Input Error\");\n fnfEx.printStackTrace();\n }\n \n }", "public static HashMap<String, ArrayList<String>> parseKeyValueList(String keySpliter,String valueSpliter, String strToParse) {\r\n\t\treturn parseKeyValueList (keySpliter, valueSpliter, \"\\n\", strToParse);\r\n\t}", "public static UserData parse(String file) {\n UserData data = new UserData();\n data.filename = file.toLowerCase();\n String line;\n // 0 = init values\n // 1 = scores\n // 2 = preferences\n int state = 0;\n KeyValuePair pair = null;\n\n try (BufferedReader br = new BufferedReader(new FileReader(data.filename))) {\n // for each line in the file\n while ((line = br.readLine()) != null) {\n pair = KeyValuePair.splitLine(line, false);\n int newState = state;\n if (line.equals(\"\")) {\n continue;\n }\n\n switch (state) {\n case 0:\n if (line.equals(\"scores\")) {\n newState = 1;\n break;\n }\n\n if (pair.key.equals(\"name\")) {\n data.name = pair.value;\n }\n\n break;\n case 1:\n if (line.equals(\"preferences\")) {\n newState = 2;\n break;\n }\n\n if (pair == null) {\n break;\n }\n\n UserDateScore newScore = new UserDateScore();\n newScore.date = pair.key;\n newScore.score = pair.valueAsInt();\n newScore.user = data;\n data.scores.add(newScore);\n break;\n case 2:\n if (pair == null) {\n break;\n }\n\n UserPreferenceValue pref = new UserPreferenceValue();\n pref.value = pair.value;\n data.preferences.put(pair.key, pref);\n break;\n }\n\n state = newState;\n }\n\n br.close();\n } catch (IOException e) {\n System.out.println(\"File does not yet exist\");\n// return null;\n }\n\n return data;\n }", "public abstract void readFromFile(String key, String value);", "public static HashMap<String, ArrayList<String>> parseKeyValueList(String keySpliter, String strToParse) {\r\n\t\treturn parseKeyValueList (keySpliter, null, \"\\n\", strToParse);\r\n\t}", "private ArrayList<String> parseFile(String file_name){ // extract each line from file AS string (stopList)\r\n ArrayList<String> list = new ArrayList<>();\r\n Scanner scanner = null;\r\n try{\r\n scanner = new Scanner(new BufferedReader(new FileReader(file_name)));\r\n while (scanner.hasNextLine())\r\n {\r\n list.add(scanner.nextLine());\r\n }\r\n }\r\n catch (Exception e ){ System.out.println(\"Error reading file -> \"+e.getMessage()); }\r\n finally {\r\n if(scanner != null ){scanner.close();} // close the file\r\n }\r\n return list;\r\n }", "public static Map<String, Set<String>> parse(\n CommandManager mgr,\n String fileName,\n List<String> listAttributeValues\n ) throws CLIException {\n Map<String, Set<String>> results = null;\n if (fileName != null) {\n results = parse(mgr, fileName);\n }\n \n if ((listAttributeValues != null) && !listAttributeValues.isEmpty()) {\n if (results != null) {\n results.putAll(parse(mgr, listAttributeValues));\n } else {\n results = parse(mgr, listAttributeValues);\n }\n }\n \n return (results == null) ? new HashMap<String, Set<String>>() : results;\n }", "private List<KeyFileEntry> convertLinesIntoInMemoryObjectList(List<String> lines) {\n List<KeyFileEntry> retList = new ArrayList<>(1250);\n\n int i = 0;\n\n // Ignore the header lines and information\n for (; i < lines.size(); i++) {\n String lineIgnore = lines.get(i);\n if (lineIgnore.startsWith(\"______\")) {\n break;\n }\n }\n\n // Ignore underscore ___ line\n i++;\n\n // reached entries lines\n KeyFileEntry entry = new KeyFileEntry();\n\n // create in memory list of objects\n while (i < lines.size()) {\n String line = lines.get(i);\n\n // For terminating line no need to complete loop\n if (line.equals(\"//\")) {\n retList.add(entry);\n entry = new KeyFileEntry();\n i++;\n continue;\n }\n\n String[] tokens = line.split(SPLIT_SPACES);\n switch (tokens[0]) {\n case \"ID\":\n entry.id = tokens[1];\n break;\n case \"IC\":\n entry.ic = tokens[1];\n break;\n case \"AC\":\n entry.ac = tokens[1];\n break;\n case \"DE\":\n entry.de.add(tokens[1]);\n break;\n case \"SY\":\n entry.sy.add(tokens[1]);\n break;\n case \"HI\":\n entry.hi.add(tokens[1]);\n break;\n case \"GO\":\n entry.go.add(tokens[1]);\n break;\n case \"CA\":\n entry.ca = tokens[1];\n break;\n case \"WW\":\n entry.ww.add(tokens[1]);\n break;\n default:\n LOG.info(\"Unhandle line found while parsing file: {}\", line);\n\n }\n\n // read and save next line\n i++;\n }\n return retList;\n }", "public void parse(){\n\t\tFile file = new File(fileLocation);\n\n\t\tlong seed = ConfigurationData.DEFAULT_SEED;\n\t\tString outputDest = ConfigurationData.DEFAULT_OUTPUT_DESTINATION;\n\t\tLong tickLength = ConfigurationData.DEFAULT_TICK_LENGTH;\n\t\tint port = ConfigurationData.DEFAULT_PORT;\n\n\t\ttry {\n\n\t\t\tScanner sc = new Scanner(file);\n\n\t\t\twhile(sc.hasNext()){\n\t\t\t\tString[] tok = sc.next().split(\"=\");\n\t\t\t\tswitch(tok[0]){\n\t\t\t\tcase \"seed\":\n\t\t\t\t\tseed = Long.parseLong(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"outputDestination\":\n\t\t\t\t\toutputDest = tok[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"tickLength\":\n\t\t\t\t\ttickLength = Long.parseLong(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"port\":\n\t\t\t\t\tport = Integer.parseInt(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsc.close();\n\n\t\t\tconfigurationData = new ConfigurationData(seed, outputDest, tickLength, port);\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\tPrintWriter writer;\n\t\t\ttry {\n\t\t\t\twriter = new PrintWriter(fileLocation, \"UTF-8\");\n\t\t\t\twriter.println(\"seed=\"+seed);\n\t\t\t\twriter.println(\"outputDestination=\"+outputDest);\n\t\t\t\twriter.println(\"tickLength=\"+tickLength);\n\t\t\t\twriter.println(\"port=\"+port);\n\t\t\t\twriter.close();\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tconfigurationData = ConfigurationData.makeDefault();\n\t\t\tSystem.out.println(\"Default file created\");\n\t\t}\n\t}", "public void readUserFile (){\n try {\n FileReader reader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(reader);\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n Scanner s = new Scanner(line); //use of a scanner to parse the line and assign its tokens to different variables\n//each line corresponds to the values of a User object\n while(s.hasNext()){\n String usrname = s.next();\n String pass = s.next();\n User u = new User(usrname,pass);\n userlist.add(u);//added to the list\n }\n \n }\n reader.close();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic Multimap<String, List<String>> fileRecordsIntoMap(List<String> list) {\n\t\tMultimap<String, List<String>> multimap = ArrayListMultimap.create();\n\t\tCollections.sort(list);\n\t\tfor(String key :list)\n\t\t{\n\t\t\tkey=key.trim().toLowerCase();\n\t\t\tif(!key.isEmpty())\n\t\t\t{\n\t\t\t\tspaceRemover(key);\n\t\t\t\tString withoutSort=key;\n\t\t\t\tkey=sortString(key);\n\t\t\t\tmultimap = putIntoMAP(key , withoutSort, multimap);\n\t\t\t}\n\t\t}\n\t\treturn multimap;\n\t}", "public void readFile(String fileName)\r\n {\n String key = new String();\r\n String value = new String();\r\n\r\n boolean readInfo = false;\r\n String out =\"\";\r\n String infoTag = \"\";\r\n String infoTagContent = \"\";\r\n\r\n try{\r\n System.out.println(\"Readig file \"+fileName+\" ...\");\r\n BufferedReader filereader = new BufferedReader(new FileReader(fileName));\r\n\r\n String line = new String();\r\n line = filereader.readLine();\r\n\r\n while(line != null){\r\n infoTag = \"\";\r\n infoTagContent = \"\";\r\n\r\n if((line.indexOf(\"=\") != -1) && (line.indexOf(\"#\") == -1))\r\n {\r\n key = line.substring(0, line.indexOf(\"=\"));\r\n value = line.substring(line.indexOf(\"=\")+1);\r\n\r\n key = key.trim();\r\n value = value.trim();\r\n\r\n if(key.equals(\"PREFIX\")){\r\n this.tagPrefix = value;\r\n } else {\r\n value = tagPrefix+\".\"+value;\r\n tagHash.put(key, value);\r\n }\r\n\r\n readInfo = false;\r\n infoHash.put(key, out);\r\n out = \"\";\r\n }\r\n\r\n\r\n if((line.indexOf(\"#\") == 0) && (line.indexOf(\"@\") != -1) && (line.indexOf(\"=\") != -1))\r\n {\r\n readInfo = true;\r\n infoTag = line.substring(line.indexOf(\"@\"), line.indexOf(\"=\"));\r\n infoTag.trim();\r\n infoTagContent = line.substring(line.indexOf(\"=\")+1);\r\n if(infoTagContent.trim().length() > 0) infoTagContent = infoTagContent+NL;\r\n out = out+infoTag+\": \"+NL+infoTagContent;\r\n }else if((line.indexOf(\"#\") == 0) && readInfo){\r\n // alreadey reading a tagInfo, means NL between entries\r\n out = out+line.substring(line.indexOf(\"#\")+1)+NL;\r\n }\r\n\r\n line = filereader.readLine();\r\n }\r\n\r\n filereader.close();\r\n\r\n //System.out.println(tagHash);\r\n\r\n }catch (Exception e){\r\n System.out.println(\"Exception in readFile: \"+e);\r\n }\r\n }", "public static Map createStockList(){\n\t\t\n\t\t\n\t\t\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(file))){\n\t\t\t\n\t\t\tString currentLine;\n\t\t\t\n\t\t\tif ((currentLine=br.readLine())!= null){\n\t\t\t\tString str[] =currentLine.split(\",\");\n\t\t\t\t\n\t\t\t\tfor(int i=0; i< str.length;i++){\n\t\t\t\t\tif(str[i].equals(\"Symbol\"))\n\t\t\t\t\tsymbolIndex=i;\n\t\t\t\t\telse if(str[i].equals(\"Security Name\"))\n\t\t\t\t\tnameIndex=i;\n\t\t\t\t\telse if(str[i].equals(\"Price\"))\n\t\t\t\t\tpriceIndex=i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\tif(symbolIndex==-1||nameIndex==-1||priceIndex==-1)\n\t\t\tSystem.out.println(\"CSV file is not in correct format\");\n\t\t\t\n\t\t\twhile ((currentLine=br.readLine())!=null){\t// read every line in csv file\n\t\t\t\t\n\t\t\t\tString str[] =currentLine.split(\",\");\n if(str.length==7) { \n\t\t\t\tif(str[priceIndex].equals(\"N\"))\n\t\t\t\t\tstr[priceIndex]=\"0\";\n\t\t\t\t\n\t\t\t\tstockList.put(str[symbolIndex],new Stock(str[symbolIndex],str[nameIndex],Double.parseDouble(str[priceIndex]))); // add stock to list\n }\n else {\n if(str[priceIndex].equals(\"N\"))\n\t\t\t\t\tstr[priceIndex]=\"0\";\n\t\t\t\t\n\t\t\t\tstockList.put(str[symbolIndex],new Stock(str[symbolIndex],str[nameIndex]+\"\"+str[nameIndex+str.length-7],Double.parseDouble(str[priceIndex+str.length-7])));\n }\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\tcatch (IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn stockList;\n\t\t}", "private void setUp(String file) {\n unorderedList = new LinkedList<>();\n orderedList = new SortedLinkedList<>();\n\n try {\n input = new Scanner(new BufferedReader(new FileReader(file)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "private void parseFile(String fileName) {\n Set<String> inputs = new HashSet<String>();\n Set<String> outputs = new HashSet<String>();\n double[] qos = new double[4];\n\n Properties p = new Properties(inputs, outputs, qos);\n\n try {\n Scanner scan = new Scanner(new File(fileName));\n while(scan.hasNext()) {\n\t\t\t\tString name = scan.next();\n\t\t\t\tString inputBlock = scan.next();\n\t\t\t\tString outputBlock = scan.next();\n\n\t\t\t\tqos[TIME] = scan.nextDouble();\n\t\t\t\tqos[COST] = scan.nextDouble();\n\t\t\t\tqos[AVAILABILITY] = scan.nextDouble()/100;\n\t\t\t\tqos[RELIABILITY] = scan.nextDouble()/100;\n\t\t\t\t// Throw the other two away;\n\t\t\t\tscan.nextDouble();\n\t\t\t\tscan.nextDouble();\n\n\t\t\t\tfor (String s :inputBlock.split(\",\"))\n\t\t\t\t\tinputs.add(s);\n\t\t\t\tfor (String s :outputBlock.split(\",\"))\n\t\t\t\toutputs.add(s);\n\n p = new Properties(inputs, outputs, qos);\n\n ServiceNode ws = new ServiceNode(name, p);\n serviceMap.put(name, ws);\n inputs = new HashSet<String>();\n outputs = new HashSet<String>();\n qos = new double[4];\n }\n scan.close();\n }\n catch(IOException ioe) {\n System.out.println(\"File parsing failed...\");\n }\n\t\tnumServices = serviceMap.size();\n }", "public static void extractValues() throws IOException{\n GenerateFile generateFile = new GenerateFile();\n Stream<String> fileStream1 = createStreamFromPath(\"src\"+File.separator+\"test.properties\");\n logger.info(fileStream1.toString());\n Set<String> extractedKeys = generateFile.extractvalsFromPropertiesFile(fileStream1);\n List<String> newString = new ArrayList<>(extractedKeys);\n System.out.println(extractedKeys);\n generateFile.createFileFromList(newString,\"values.txt\");\n }", "public void readKey(File file) throws FileNotFoundException {\n key = new double[CHAR_SET_SIZE][CHAR_SET_SIZE];\n Scanner in = new Scanner(file);\n int i = 0;\n while (in.hasNextLine()) {\n String line = in.nextLine();\n String [] vals = line.split(\" \");\n for (int j = 0; j < vals.length; j++) {\n key[i][j] = Double.parseDouble(vals[j]);\n }\n i++;\n }\n }", "public void parseFile(){\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"ElevatorConfig.txt\"));\n \n String fileRead;\n \n totalSimulatedTime = 1000;\n Integer.parseInt(br.readLine());\n simulatedSecondRate = 30;\n Integer.parseInt(br.readLine());\n \n for (int onFloor = 0; onFloor< 5; onFloor++){\n \n fileRead = br.readLine(); \n String[] tokenize = fileRead.split(\";\");\n for (int i = 0; i < tokenize.length; i++){\n String[] floorArrayContent = tokenize[i].split(\" \");\n \n int destinationFloor = Integer.parseInt(floorArrayContent[1]);\n int numPassengers = Integer.parseInt(floorArrayContent[0]);\n int timePeriod = Integer.parseInt(floorArrayContent[2]);\n passengerArrivals.get(onFloor).add(new PassengerArrival(numPassengers, destinationFloor, timePeriod));\n }\n }\n \n br.close();\n \n } catch(FileNotFoundException e){ \n System.out.println(e);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n\n }", "public static Map readingFilesMap(String file) {\n\n Stream<String> lines = null;\n try {\n lines = Files.lines(Paths.get(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /* lines = lines.filter(line -> line.trim().length() > 0)\n .map(line -> line.substring(line.lastIndexOf(\" \")));\n*/\n Map map = lines.collect(Collectors.toMap(\n line -> line.substring(line.lastIndexOf(\" \")),\n line -> line.substring(0, line.lastIndexOf(\" \"))\n ));//.forEach(System.out::print);\n //lines.forEach(Collections.list());\n\n map.forEach((k, v) -> {\n System.out.println(\"key:\"+k+ \" Value=\"+v);\n } );\n return map;\n\n //set.forEach(System.out::print);\n\n\n }", "public EnigmaPairings readPairings(String pathToFile) throws InvalidFileException, IOException {\r\n BufferedReader br = new BufferedReader(new FileReader(pathToFile));\r\n EnigmaPairings ep = new EnigmaPairings();\r\n String line = br.readLine();\r\n \r\n while (line != null) {\r\n String[] array = line.split(\" \");\r\n if (array.length > 2) {\r\n throw new InvalidFileException();\r\n } else {\r\n ep.addPair(array[0], array[1]);\r\n }\r\n line = br.readLine();\r\n }\r\n \r\n return ep;\r\n }", "private void load(Path fileName) throws IOException {\n try(BufferedReader reader = Files.newBufferedReader(fileName)) {\n String line = \"\";\n\n // Matches lines with the format:\n // key=value\n // where the key is any sequence of lowercase letters. (a to z)\n // where value may be any letters from a to z (case insensitive) 0 to 9 or the letters '-' and '.'.\n Pattern validLine = Pattern.compile(\"^(?<key>[a-z]+)=(?<value>[a-zA-Z0-9-.]+)$\");\n\n // Read the file line by line\n while((line = reader.readLine()) != null) {\n if(line.startsWith(\";\")) { // Ignore lines that start with ;\n continue;\n }\n\n // Remove any whitespace\n line = line.trim();\n\n // Continue if our line is empty\n if(\"\".equals(line)) {\n continue;\n }\n\n Matcher matcher = validLine.matcher(line);\n\n if(!matcher.matches() || matcher.groupCount() != 2) {\n System.err.println(\"Unable to parse line: \" + line);\n continue;\n }\n\n String key = matcher.group(\"key\");\n String value = matcher.group(\"value\");\n\n map.put(key, value);\n }\n }\n }", "private void populateDictionary() {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new FileInputStream(filePath));\n while(scanner.hasNextLine()) {\n String word = scanner.nextLine();\n rwDictionary.put(reducedWord(word), word);\n lcDictionary.put(word.toLowerCase(), word);\n }\n } catch(IOException e) {\n System.err.println(e.toString());\n e.printStackTrace();\n } finally {\n if(scanner != null) {\n scanner.close();\n }\n }\n }", "private HashMap<Object, Object> HashMapTransform(List<String> lines) {\n\n HashMap<Object, Object> keypair = new HashMap<>();\n\n for (String line : lines) {\n if (line.contains(pairDelimiter)) {\n String[] intermediate = line.split(pairDelimiter, maxSplitSize);\n keypair.put(intermediate[0], intermediate[1]);\n }\n }\n return keypair;\n }", "private void createDicts(String inputFile){\n\t\tproductIds = new TreeMap<>();\n\t\ttokenDict = new TreeMap<>();\n\t\treviewIds = new TreeMap<>();\n\n\t\tDataParser dataParser = null;\n\t\ttry {\n\t\t\tdataParser = new DataParser(inputFile);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error occurred while reading the reviews input file.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tfor (int i = 0; i < dataParser.allReviews.size(); i++) {\n\t\t\taddProductId(dataParser.allReviews.get(i).get(\"productId\"), i + 1);\n\t\t\tint length = addReviewText(dataParser.allReviews.get(i).get(\"text\"), i + 1);\n\t\t\taddReviewId(dataParser.allReviews.get(i), i, length);\n\t\t}\n\t}", "private HashMap<String, ArrayList<int[]>> loadColorsFile() {\n\t\ttry {\n\t\t\t/* Open the file for reading. */\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(COLORS_FILE));\n\t\t\t\n\t\t\t/* Construct the HashMap that we will provide back as a result. */\n\t\t\tHashMap<String, ArrayList<int[]>> result = new HashMap<String, ArrayList<int[]>>();\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\t/* Read the next entry:\n\t\t\t\t * 1. The name of the color.\n\t\t\t\t * 2. Its red component.\n\t\t\t\t * 3. Its green component.\n\t\t\t\t * 4. Its blue component.\n\t\t\t\t */\n\t\t\t\tString colorName = br.readLine();\n\t\t\t\tString r = br.readLine();\n\t\t\t\tString g = br.readLine();\n\t\t\t\tString b = br.readLine();\n\t\t\t\t\n\t\t\t\t/* If we ran out of data, we're done. */\n\t\t\t\tif (b == null) break;\n\t\t\t\t\n\t\t\t\t/* Construct an array of the colors. */\n\t\t\t\tint[] color = new int[3];\n\t\t\t\tcolor[0] = Integer.parseInt(r);\n\t\t\t\tcolor[1] = Integer.parseInt(g);\n\t\t\t\tcolor[2] = Integer.parseInt(b);\n\t\t\t\t\n\t\t\t\t/* Ensure that there's an ArrayList waiting for us. */\n\t\t\t\tif (!result.containsKey(colorName)) {\n\t\t\t\t\tresult.put(colorName, new ArrayList<int[]>());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* Add this color data to the color list. */\n\t\t\t\tresult.get(colorName).add(color);\n\t\t\t}\n\t\t\t\n\t\t\tbr.close();\n\t\t\treturn result;\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tthrow new ErrorException(e);\n\t\t}\n\t}", "public void populateDictionary() throws IOException {\n\t\tScanner scan = new Scanner(new File(\"dictionary.txt\"));\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString curr = scan.nextLine().toLowerCase();\n\t\t\tthis.dictionary.add(curr);\n\t\t}\n\t}", "public void initialilzeMapEntry(String file){\n\t\tmap.put(file, new LinkedList<HashMap<Integer, Integer>>());\n\t}", "public List<String> readFileIntoList(String filepath) throws IOException;", "private void parseInputFile(String inputFile) throws IOException {\n List<String> lines = Files.readAllLines(FileSystems.getDefault().getPath(inputFile), Charset.defaultCharset());\n for (int i = 1; i < lines.size(); ++i) {\n ParsedRecord record = new ParsedRecord(lines.get(i));\n if (!this.parsedRecords.containsKey(record.docName)) {\n this.parsedRecords.put(record.docName, new ArrayList<ParsedRecord>());\n }\n this.parsedRecords.get(record.docName).add(record);\n\n if (!this.docToMaxPosition.containsKey(record.docName) ||\n this.docToMaxPosition.containsKey(record.docName) && this.docToMaxPosition.get(record.docName) < record.position) {\n this.docToMaxPosition.put(record.docName, record.position);\n }\n }\n }", "private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}", "public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }", "List<Park> parse() {\n\t\tList<Park> parks = new ArrayList<Park>();\n\t\ttry {\n\t\t\tFile fXmlFile = new File(filename);\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory\n\t\t\t\t\t.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\n\n\t\t\tdoc.getDocumentElement().normalize();\n\n\t\t\tNodeList nList = doc.getElementsByTagName(\"node\");\n\n\t\t\tfor (int temp = 0; temp < nList.getLength(); temp++) {\n\n\t\t\t\tNode nNode = nList.item(temp);\n\n\t\t\t\tif (nNode.getNodeType() == Node.ELEMENT_NODE) {\n\n\t\t\t\t\tElement eElement = (Element) nNode;\n\n\t\t\t\t\tPark Park = new Park();\n\n\t\t\t\t\tPark.setLatitude(Double.parseDouble(eElement\n\t\t\t\t\t\t\t.getAttribute(\"lat\")));\n\t\t\t\t\tPark.setLongitude(Double.parseDouble(eElement\n\t\t\t\t\t\t\t.getAttribute(\"lon\")));\n\n\t\t\t\t\tparks.add(Park);\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\treturn parks;\n\t}", "private List<User> readFromFile() {\n\n List<String> lines = new ArrayList<>();\n List<User> contactList = new ArrayList<>();\n Map<String, PhoneNumber> phoneNumbersNewUser = new HashMap<>();\n\n try (BufferedReader in = new BufferedReader(new FileReader(contactsFile))) {\n String line;\n while ((line = in.readLine()) != null) {\n lines.add(line);\n }\n\n } catch (IOException ex) {\n System.out.println(\"File not found \\n\" + ex);\n ;\n }\n\n for (String line : lines) {\n String[] userProperties = line.split(\"\\\\|\");\n\n int id = Integer.parseInt(userProperties[0]);\n String fName = userProperties[1];\n String lName = userProperties[2];\n String email = userProperties[3];\n int age = Integer.parseInt(userProperties[4]);\n String[] phones = userProperties[5].split(\"\\\\,\");\n String[] homePhone = phones[0].split(\"\\\\_\");\n String[] mobilePhone = phones[1].split(\"\\\\_\");\n String[] workPhone = phones[2].split(\"\\\\_\");\n phoneNumbersNewUser.put(homePhone[0], new PhoneNumber(homePhone[1], homePhone[2]));\n phoneNumbersNewUser.put(mobilePhone[0], new PhoneNumber(mobilePhone[1], mobilePhone[2]));\n phoneNumbersNewUser.put(workPhone[0], new PhoneNumber(workPhone[1], workPhone[2]));\n String[] homeAdress = userProperties[6].split(\"\\\\,\");\n Address homeAdressNewUser = new Address(homeAdress[0], Integer.parseInt(homeAdress[1]), Integer.parseInt(homeAdress[2]),\n homeAdress[3], homeAdress[4], homeAdress[5], homeAdress[6]);\n String title = userProperties[7];\n String[] companyProperties = userProperties[8].split(\"\\\\_\");\n String[] companyAddress = companyProperties[1].split(\"\\\\,\");\n Address companyAddressNewUser = new Address(companyAddress[0], Integer.parseInt(companyAddress[1]),\n Integer.parseInt(companyAddress[2]), companyAddress[3], companyAddress[4], companyAddress[5],\n companyAddress[6]);\n String companyName = companyProperties[0];\n Company companyNewUser = new Company(companyName, companyAddressNewUser);\n boolean isFav = Boolean.parseBoolean(userProperties[9]);\n User user = new User(id, fName, lName, email, age, phoneNumbersNewUser, homeAdressNewUser, title, companyNewUser, isFav);\n contactList.add(user);\n }\n\n\n return contactList;\n }", "public static Map<String, Set<String>> parse(\n CommandManager mgr, \n String fileName\n ) throws CLIException\n {\n BufferedReader in = null;\n Map<String, Set<String>> attrValues = \n new HashMap<String, Set<String>>();\n \n try {\n in = new BufferedReader(new FileReader(fileName));\n String line = in.readLine();\n while (line != null) {\n line = line.trim();\n if (line.length() > 0) {\n int idx = line.indexOf('=');\n if ((idx == -1) || (idx == 0) || (idx == (line.length() -1))\n ) {\n throw createIncorrectFormatException(mgr, line);\n }\n \n String key = line.substring(0, idx).trim();\n String value = line.substring(idx+1).trim();\n Set<String> values = attrValues.get(key);\n if (values == null) {\n values = new HashSet<String>();\n attrValues.put(key, values);\n }\n values.add(value);\n }\n line = in.readLine();\n }\n } catch (IOException e) {\n throw new CLIException(e, ExitCodes.IO_EXCEPTION);\n } finally {\n if (in !=null ) {\n try {\n in.close();\n } catch (IOException e) {\n //ignore cannot close input stream\n }\n }\n }\n return attrValues;\n }", "@Override\n public void parse() {\n if (file == null)\n throw new IllegalStateException(\n \"File cannot be null. Call setFile() before calling parse()\");\n\n if (parseComplete)\n throw new IllegalStateException(\"File has alredy been parsed.\");\n\n FSDataInputStream fis = null;\n BufferedReader br = null;\n\n try {\n fis = fs.open(file);\n br = new BufferedReader(new InputStreamReader(fis));\n\n // Go to our offset. DFS should take care of opening a block local file\n fis.seek(readOffset);\n records = new LinkedList<T>();\n\n LineReader ln = new LineReader(fis);\n Text line = new Text();\n long read = readOffset;\n\n if (readOffset != 0)\n read += ln.readLine(line);\n\n while (read < readLength) {\n int r = ln.readLine(line);\n if (r == 0)\n break;\n\n try {\n T record = clazz.newInstance();\n record.fromString(line.toString());\n records.add(record);\n } catch (Exception ex) {\n LOG.warn(\"Unable to instantiate the updateable record type\", ex);\n }\n read += r;\n }\n\n } catch (IOException ex) {\n LOG.error(\"Encountered an error while reading from file \" + file, ex);\n } finally {\n try {\n if (br != null)\n br.close();\n\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n LOG.error(\"Can't close file\", ex);\n }\n }\n\n LOG.debug(\"Read \" + records.size() + \" records\");\n }", "public static List read(String file){\n\t\tLinkedList<String> data =\tnew LinkedList<String>();\n\t\tString dataRow;\n\t\t\n\t\ttry {\n\t\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\n\t\twhile((dataRow = br.readLine())!=null);{\t\n\t\t\tString[] dataRecord = dataRow.split(\",\");\n\t\t\tdata.addAll(dataRecord);\n\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not found file\");\n\t\t\te.printStackTrace();\n\t\t}catch (IOException e) {\n\t\tSystem.out.println(\"Could Not read file\");\n\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "protected void readCSVToMap(String filename) throws Exception{ // IMPORTANT FUNCTION\n db = new HashMap<String, List<String>>();\n keys = new ArrayList<String>();\n InputStream is = getAssets().open(\"ABBREV_2.txt\");\n //File f = new File(path.toURI());\n //File f = new File(path.getFile());\n BufferedReader in = new BufferedReader(new InputStreamReader(is));//new BufferedReader(new FileReader(\"ABBREV_2.txt\"));\n String line = \"\";\n while ((line = in.readLine()) != null) {\n String parts[] = line.split(\"\\t\");\n List<String> nutrition = new ArrayList();\n for (int i = 1; i < parts.length; i++){\n nutrition.add(parts[i]);\n }\n db.put(parts[0], nutrition);\n keys.add(parts[0]);\n }\n in.close();\n\n }", "private void read_manifest(){\n dir = new File(context.getFilesDir(), folderName);\n dir.mkdir();\n manifestFile = new File(dir, \"manifest\");\n BufferedReader manifestIn = null;\n try {\n manifestIn = new BufferedReader(new FileReader(manifestFile));\n String line;\n while ((line = manifestIn.readLine()) != null) {\n String[] keyValuePair = line.split(\",\");\n pictureList.add(new KeyNamePair(keyValuePair[0], keyValuePair[1]));\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (manifestIn != null) {\n try {\n manifestIn.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public void data() {\n\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(\"/Users/macbook_user/Desktop/OOP Project/List.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n return;\n }\n\n String[] columnName\n = {\"Id\", \"Name\", \"Amount\", \"Shelf#\", \"Position\"};\n int i, index;\n String line;\n try {\n br.readLine();\n while ((line = br.readLine()) != null) {\n index = 0;\n String[] se = line.split(\" \");\n Map<String, Object> item = new HashMap<>();\n for (i = 0; i < se.length; i++) {\n if (\"\".equals(se[i])) {\n continue;\n }\n if (index >= columnName.length) {\n continue;\n }\n item.put(columnName[index], se[i]);\n index++;\n }\n\n //get the amount of the item from the list\n int amount = Integer.parseInt((String) item\n .get(columnName[2]));\n\n // if amount greater than 0, Existence is Y, else N\n if (amount > 0) {\n item.put(\"Existence\", \"Y\");\n } else {\n item.put(\"Existence\", \"N\");\n }\n\n inventory.add(item);// add item to ArrayList\n }\n br.close();\n\n outPutFile();\n } catch (IOException e) {\n }\n\n }", "public static HashMap<String,String> topics(){\n HashMap<String,String> temp = new HashMap<String,String>();\n Scanner topicer;\n try {\n topicer = new Scanner(new File(\"Topics.txt\"));\n topicer.useDelimiter(\",~ *\\n*\");\n while (topicer.hasNext()){\n String key = \" \"+topicer.next()+\" \";\n String value = \"\";\n if(topicer.hasNext())\n value = topicer.next();\n temp.put(key, value);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return temp;\n }", "private Map<String, ArrayList<Integer>> createModes(String file) throws FileNotFoundException {\n Map<String, ArrayList<Integer>> tempModes = new HashMap<String, ArrayList<Integer>>();\n Scanner modeScan = new Scanner(new File(file));\n while (modeScan.hasNextLine()) {\n Scanner line = new Scanner(modeScan.nextLine());\n String name = line.next();\n ArrayList<Integer> notes = new ArrayList<Integer>();\n while (line.hasNextInt()) {\n notes.add(line.nextInt());\n }\n tempModes.put(name, notes);\n }\n return tempModes;\n }", "public static ArrayList readBiblioscapeTagFile(String filename) {\n ArrayList bibitems = new ArrayList();\n File f = new File(filename);\n if (!f.exists() || !f.canRead() || !f.isFile()) {\n System.err.println(\"Error: \" + filename + \" is not a valid file and|or is not readable.\");\n return null;\n }\n \n try {\n BufferedReader in = new BufferedReader(new FileReader(filename));\n String line;\n HashMap hm = new HashMap();\n HashMap lines = new HashMap();\n StringBuffer previousLine = null;\n while ((line = in.readLine()) != null) {\n // entry delimiter -> item complete\n if (line.equals(\"------\")) {\n String[] type = new String[2];\n String[] pages = new String[2];\n String country = null;\n String address = null;\n Vector comments = new Vector();\n // add item\n Object[] l = lines.entrySet().toArray();\n for (int i = 0; i < l.length; ++i) {\n Map.Entry entry = (Map.Entry)l[i];\n if (entry.getKey().equals(\"AU\")) hm.put(\"author\",entry.getValue().toString());\n else if (entry.getKey().equals(\"TI\")) hm.put(\"title\",entry.getValue().toString());\n else if (entry.getKey().equals(\"ST\")) hm.put(\"booktitle\",entry.getValue().toString());\n else if (entry.getKey().equals(\"YP\")) hm.put(\"year\",entry.getValue().toString());\n else if (entry.getKey().equals(\"VL\")) hm.put(\"volume\",entry.getValue().toString());\n else if (entry.getKey().equals(\"NB\")) hm.put(\"number\",entry.getValue().toString());\n else if (entry.getKey().equals(\"PS\")) pages[0] = entry.getValue().toString();\n else if (entry.getKey().equals(\"PE\")) pages[1] = entry.getValue().toString();\n else if (entry.getKey().equals(\"KW\")) hm.put(\"keywords\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"RM\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"RU\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"RT\")) type[0] = entry.getValue().toString();\n else if (entry.getKey().equals(\"SB\")) comments.add(\"Subject: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"SA\")) comments.add(\"Secondary Authors: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"NT\")) hm.put(\"note\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"PP\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"PB\")) hm.put(\"publisher\",entry.getValue().toString());\n else if (entry.getKey().equals(\"TA\")) comments.add(\"Tertiary Authors: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"TT\")) comments.add(\"Tertiary Title: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"ED\")) hm.put(\"edition\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"DP\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"TW\")) type[1] = entry.getValue().toString();\n else if (entry.getKey().equals(\"QA\")) comments.add(\"Quaternary Authors: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"QT\")) comments.add(\"Quaternary Title: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"IS\")) hm.put(\"isbn\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"LA\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"AB\")) hm.put(\"abstract\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"DI\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"DM\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"AV\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"PR\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"LO\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"AD\")) address = entry.getValue().toString();\n else if (entry.getKey().equals(\"LG\")) hm.put(\"language\",entry.getValue().toString());\n else if (entry.getKey().equals(\"CO\")) country = entry.getValue().toString();\n else if (entry.getKey().equals(\"UR\") || entry.getKey().equals(\"AT\")) {\n String s = entry.getValue().toString().trim();\n hm.put(s.startsWith(\"http://\") || s.startsWith(\"ftp://\") ? \"url\" : \"pdf\",\n entry.getValue().toString());\n }\n else if (entry.getKey().equals(\"C1\")) comments.add(\"Custom1: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"C2\")) comments.add(\"Custom2: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"C3\")) comments.add(\"Custom3: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"C4\")) comments.add(\"Custom4: \" + entry.getValue().toString());\n //else if (entry.getKey().equals(\"RD\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"MB\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"C5\")) comments.add(\"Custom5: \" + entry.getValue().toString());\n else if (entry.getKey().equals(\"C6\")) comments.add(\"Custom6: \" + entry.getValue().toString());\n //else if (entry.getKey().equals(\"FA\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"CN\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"DE\")) hm.put(\"annote\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"RP\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"DF\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"RS\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"CA\")) comments.add(\"Categories: \" + entry.getValue().toString());\n //else if (entry.getKey().equals(\"WP\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"TH\")) comments.add(\"Short Title: \" + entry.getValue().toString());\n //else if (entry.getKey().equals(\"WR\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"EW\")) hm.put(\"\",entry.getValue().toString());\n else if (entry.getKey().equals(\"SE\")) hm.put(\"chapter\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"AC\")) hm.put(\"\",entry.getValue().toString());\n //else if (entry.getKey().equals(\"LP\")) hm.put(\"\",entry.getValue().toString());\n }\n \n String bibtexType = \"misc\";\n if (type[1] != null) { // first check TW\n type[1] = type[1].toLowerCase();\n if (type[1].indexOf(\"article\") >= 0) bibtexType = \"article\";\n else if (type[1].indexOf(\"book\") >= 0) bibtexType = \"book\";\n else if (type[1].indexOf(\"conference\") >= 0) bibtexType = \"inproceedings\";\n else if (type[1].indexOf(\"proceedings\") >= 0) bibtexType = \"inproceedings\";\n else if (type[1].indexOf(\"report\") >= 0) bibtexType = \"techreport\";\n else if (type[1].indexOf(\"thesis\") >= 0\n && type[1].indexOf(\"master\") >= 0) bibtexType = \"mastersthesis\";\n else if (type[1].indexOf(\"thesis\") >= 0) bibtexType = \"phdthesis\";\n } else if (type[0] != null) { // check RT\n type[0] = type[0].toLowerCase();\n if (type[0].indexOf(\"article\") >= 0) bibtexType = \"article\";\n else if (type[0].indexOf(\"book\") >= 0) bibtexType = \"book\";\n else if (type[0].indexOf(\"conference\") >= 0) bibtexType = \"inproceedings\";\n else if (type[0].indexOf(\"proceedings\") >= 0) bibtexType = \"inproceedings\";\n else if (type[0].indexOf(\"report\") >= 0) bibtexType = \"techreport\";\n else if (type[0].indexOf(\"thesis\") >= 0\n && type[0].indexOf(\"master\") >= 0) bibtexType = \"mastersthesis\";\n else if (type[0].indexOf(\"thesis\") >= 0) bibtexType = \"phdthesis\";\n }\n \n // concatenate pages\n if (pages[0] != null || pages[1] != null)\n hm.put(\"pages\",(pages[0] != null ? pages[0] : \"\")\n + (pages[1] != null ? \"--\" + pages[1] : \"\"));\n \n // concatenate address and country\n if (address != null)\n hm.put(\"address\",address + (country != null ? \", \" + country : \"\"));\n \n if (comments.size() > 0) { // set comment if present\n StringBuffer s = new StringBuffer();\n for (int i = 0; i < comments.size(); ++i)\n s.append((i > 0 ? \"; \" : \"\")+ comments.elementAt(i).toString());\n hm.put(\"comment\",s.toString());\n }\n BibtexEntry b = new BibtexEntry(\n Globals.DEFAULT_BIBTEXENTRY_ID,\n Globals.getEntryType(bibtexType));\n b.setField(hm);\n bibitems.add(b);\n \n hm.clear();\n lines.clear();\n previousLine = null;\n \n continue;\n }\n // new key\n if (line.startsWith(\"--\") && line.length() >= 7 && line.substring(4,7).equals(\"-- \")) {\n lines.put(line.substring(2,4),previousLine = new StringBuffer(line.substring(7)));\n continue;\n }\n // continuation (folding) of previous line\n if (previousLine == null) // sanity check; should never happen\n return null;\n previousLine.append(line.trim());\n }\n } catch (IOException e) {\n return null;\n }\n \n return bibitems;\n }", "public List<PGPSecretKeyRing> load(File file)\r\n\t\t\tthrows IOException, PGPException {\r\n\t\tInputStream stream = null;\r\n\t\ttry {\r\n\t\t\tstream = new BufferedInputStream(new FileInputStream(file), 0x1000);\r\n\t\t\treturn load(stream);\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tstream.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static ArrayList<String> topiclist(){\n ArrayList<String> temp = new ArrayList<String>();\n Scanner topicer;\n try {\n topicer = new Scanner(new File(\"Topics.txt\"));\n topicer.useDelimiter(\",~ *\\n*\");\n while (topicer.hasNext()){\n String[] key = topicer.next().split(\",\");\n //String value = \"\";\n if(topicer.hasNext())\n topicer.next();\n for (int i = 0; i < key.length; i++)\n \ttemp.add(key[i]);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return temp;\n }", "public List<String> loadFromFile(String fileName) {\n String line;\n List<String> listValuesFieldsEmployees = new ArrayList<>();\n\n try (FileReader fileReader = new FileReader(fileName);\n BufferedReader reader = new BufferedReader(fileReader)) {\n while ((line = reader.readLine()) != null) {\n listValuesFieldsEmployees.add(line);\n }\n } catch (IOException exc) {\n exc.printStackTrace();\n }\n return listValuesFieldsEmployees;\n }", "public static List<List<String>> readFile() {\r\n List<List<String>> out = new ArrayList<>();\r\n File dir = new File(\"./tmp/data\");\r\n dir.mkdirs();\r\n File f = new File(dir, \"storage.txt\");\r\n try {\r\n f.createNewFile();\r\n Scanner s = new Scanner(f);\r\n while (s.hasNext()) {\r\n String[] tokens = s.nextLine().split(\"%%%\");\r\n List<String> tokenss = new ArrayList<>(Arrays.asList(tokens));\r\n out.add(tokenss);\r\n }\r\n return out;\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "public static List<Map<String, String>> loadData(String filename) throws IOException {\n\t\tList<Map<String, String>> data = new ArrayList<>();\n\t\tPath dataFile = Paths.get(filename);\n\t\t\n\t\t// Files.readAllLines only accepts Path and returns a List\n\t\t// it reads the whole file in one shot\n\t\tList<String> linesList = Files.readAllLines(dataFile);\n\t\t// header row to attributes array\n\t\tString[] attributes = linesList.get(0).split(\",\");\n\t\t\n\t\t// process data rows\n\t\tfor (int i = 1; i < linesList.size(); i++) {\n\t\t\tString[] values = linesList.get(i).split(\",\");\n\t\t\tif (values.length == 0 && values[0].length() == 0) break;\n\t\t\t// create a map for each row\n\t\t\tMap<String, String> row = new HashMap<>();\n\t\t\t//fill the row\n\t\t\tfor (int j = 0; j < attributes.length; j++)\n\t\t\t\trow.put(attributes[j], values[j]);\n\t\t\tdata.add(row);\t\t// add data to row\n\t\t}\t\n\n\t\t// do the same with a Stream, but use the iterator of the stream\n\t\t// instead of dealing with it directly\n\t\tStream<String> linesStream = Files.lines(dataFile);\n\t\tIterator<String> it = linesStream.iterator();\n\t\tattributes = it.next().split(\",\");\n\t\twhile (it.hasNext()) {\n\t\t\tString[] values = it.next().split(\",\");\n\t\t\tif (values.length > 0 && values[0].length() > 0) {\n\t\t\t\tMap<String, String> row = new HashMap<>();\n\t\t\t\tfor (int i = 0; i < attributes.length; i++)\n\t\t\t\t\trow.put(attributes[i], values[i]);\n\t\t\t\t// data.add(row);\n\t\t\t}\n\t\t}\n\t\tlinesStream.close();\n\n\t\treturn data;\n\t}", "public static FileMappedTupleList openExisting(final File file) throws IOException {\n return new FileMappedTupleList(file);\n }", "public static void addtoHashMap (File filename){\n\t\tFileInputStream fin;\n\t\ttry{\n\t\t\tfin = new FileInputStream(filename);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\tString n;\n\t\t\ttry{\n\t\t\t\twhile ((n = br.readLine()) != null){\n\t\t\t\t\tif(h.containsKey(n)){\n\t\t\t\t\t\tint i = (Integer) h.get(n);\n\t\t\t\t\t\th.put(n, (i+1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\th.put(n, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}catch(FileNotFoundException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void readFile(File fp)throws IOException{\n Scanner in=new Scanner(fp);\n String line,s[];\n while(in.hasNext()){\n line=in.nextLine();\n s=line.split(\"[ ]+\");\n if(s.length<3){\n payroll.addLast(new ObjectListNode(new Employee(s[1],s[0])));\n }\n else{\n payroll.addLast(new ObjectListNode(new Employee(s[1],s[0],s[2].charAt(0),s[4].charAt(0),\n Integer.parseInt(s[3]),Double.parseDouble(s[5]))));\n }\n }\n }", "public ArrayList<Item> loadItems(String filename) {\n ArrayList<Item> itemsList = new ArrayList<>();\n try {\n File file = new File(filename);\n BufferedReader reader= new BufferedReader(new InputStreamReader(new FileInputStream(file), \"UTF-8\"));\n String line= reader.readLine();\n while (line != null){\n String[] splitedLine = line.split(\"=\");\n String name = splitedLine[0];\n int weight = Integer.parseInt(splitedLine[1]) / 1000; // on convertit en tonnes\n itemsList.add(new Item(name,weight));\n line = reader.readLine();\n }\n reader.close(); //pour arreter la memoire tampon\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n return itemsList;\n }", "void fillPlaylists(String file, SongEntry[] songs) {\r\n HashMap<String, SongEntry> map = new HashMap<>();\r\n for (SongEntry song : songs) {\r\n map.put(song.getTitle(), song);\r\n }\r\n try {\r\n Scanner scanner = new Scanner(new File(file));\r\n while (scanner.hasNextLine()) {\r\n String[] line = scanner.nextLine().split(\",\");\r\n if (!map.containsKey(line[1])) {\r\n System.out.println(\"Unable to find song \\\"\" + line[1] + \"\\\". Please make sure you have the correct song title\");\r\n continue;\r\n }\r\n switch (line[0]) {\r\n case \"favorites\":\r\n favoritePL.enqueue(map.get(line[1]));\r\n break;\r\n case \"road trip\":\r\n roadTripPL.enqueue(map.get(line[1]));\r\n break;\r\n case \"lounge\":\r\n loungePL.enqueue(map.get(line[1]));\r\n break;\r\n default:\r\n System.out.println(\"Invalid playlist name \\\"\" + line[0] + \"\\\". Please check your playlist names.\");\r\n }\r\n }\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"File \" + file + \" not found. Please make sure you have the correct path.\");\r\n System.exit(0);\r\n }\r\n }", "private Map<String, ArrayList<String>> createChordChanges(String file) throws FileNotFoundException {\n Map<String, ArrayList<String>> tempChords = new HashMap<String, ArrayList<String>>();\n Scanner modeScan = new Scanner(new File(file));\n while (modeScan.hasNextLine()) {\n Scanner line = new Scanner(modeScan.nextLine());\n String name = line.next();\n ArrayList<String> changes = new ArrayList<String>();\n while (line.hasNext()) {\n changes.add(line.next());\n }\n tempChords.put(name, changes);\n }\n return tempChords;\n }", "public static final List<SignalEntry> read(File file) {\r\n List<SignalEntry> result = new ArrayList<SignalEntry>();\r\n LineNumberReader reader = null;\r\n try {\r\n reader = new LineNumberReader(new FileReader(file));\r\n String line;\r\n do {\r\n line = reader.readLine();\r\n if (\"Entry:\".equals(line)) {\r\n String algorithm = unquote(reader.readLine());\r\n String parameterName = unquote(reader.readLine());\r\n String parameterValue = unquote(reader.readLine());\r\n result.add(new SignalEntry(algorithm, parameterName, parameterValue));\r\n }\r\n } while (null != line);\r\n reader.close();\r\n } catch (IOException e) {\r\n if (null != reader) {\r\n try {\r\n reader.close();\r\n } catch (IOException e1) {\r\n }\r\n }\r\n }\r\n return result;\r\n }", "public void importFile() {\n \ttry {\n\t File account_file = new File(\"accounts/CarerAccounts.txt\");\n\n\t FileReader file_reader = new FileReader(account_file);\n\t BufferedReader buff_reader = new BufferedReader(file_reader);\n\n\t String row;\n\t while ((row = buff_reader.readLine()) != null) {\n\t String[] account = row.split(\",\"); //implementing comma seperated value (CSV)\n\t String[] users = account[6].split(\"-\");\n\t int[] usersNew = new int[users.length];\n\t for (int i = 0; i < users.length; i++) {\n\t \tusersNew[i] = Integer.parseInt(users[i].trim());\n\t }\n\t this.add(Integer.parseInt(account[0]), account[1], account[2], account[3], account[4], account[5], usersNew);\n\t }\n\t buff_reader.close();\n } catch (IOException e) {\n System.out.println(\"Unable to read text file this time.\");\n \t}\n\t}", "public HashMap<String, String> convertToString() throws IOException\n\t{\n\t HashMap<String, String> map = new HashMap<String, String>();\n\n\t String line;\n\t BufferedReader reader;\n\t String multiple_line=null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t String[] parts = (line.replaceAll(\"\\\"\", \"\").split(\"=\", 2)); //tolto replaceAll\n\t\t if (parts.length >= 2)\n\t\t {\n\t\t String key = parts[0];\n\t\t multiple_line=key;\n\t\t String value = parts[1];\n\t\t map.put(key, value);\n\t\t } else {\n\t\t \n\t\t String line2=map.get(multiple_line);\n\t\t map.put(multiple_line, line2+\"\\n\"+line);\n\t\t }\n\t\t }\n\t\t\t\n\t\t\t//for (String key : map.keySet())\n\t\t //{\n\t\t // System.out.println(key + \":\" + map.get(key));\n\t\t // }\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "private static ArrayList<ArrayList<Integer>> populateListOfInputs() {\n\t\t\n\t\tArrayList<ArrayList<Integer>> listOflist = new ArrayList<ArrayList<Integer>>();\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(filePath);\n\t\t\tBufferedReader br = new BufferedReader(fr);\t\t\n\t\t\t\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t// Remove all spaces, '[' and ']'\n\t\t\t\tString numbers = line.replace(\" \", \"\");\n\t\t\t\tnumbers = numbers.replace(\"[\", \"\");\n\t\t\t\tnumbers = numbers.replace(\"]\", \"\");\n\t\t\t\t\n\t\t\t\tif(line.equals(\"\")) {\n\t\t\t\t\t//if empty line leave it and continue the loop\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\t\t\n\t\t\t\tString[] individualnums = numbers.split(\",\");\n\t\t\t\tfor (int i = 0; i < individualnums.length; i++) {\t\t\t\t\t\n\t\t\t\t\tlist.add(Integer.parseInt(individualnums[i]));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tlistOflist.add(list);\t\t\t\t\n\t\t\t}\t\t\n\t\t\t\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listOflist;\n\t}", "private Map<String, Integer> createRootNotes(String file) throws FileNotFoundException {\n Map<String, Integer> tempNotes = new HashMap<String, Integer>();\n Scanner noteScan = new Scanner(new File(file));\n while (noteScan.hasNextLine()) {\n Scanner line = new Scanner(noteScan.nextLine());\n String note = line.next();\n int value = line.nextInt();\n tempNotes.put(note, value);\n }\n return tempNotes;\n }", "public void parse() throws XMLStreamException {\n\t\tInputStream dictStream = ClassLoader.getSystemResourceAsStream(fixFileName);\n\t\tXMLStreamReader reader = factory.createXMLStreamReader(dictStream);\n\t\tString curFieldName = \"\";\n\t\twhile (reader.hasNext()) {\n\t\t\tint event = reader.next();\n\t\t\tswitch (event) {\n\t\t\tcase XMLStreamConstants.START_ELEMENT:\n\t\t\t\tString elementName = reader.getLocalName();\n\t\t\t\telementNames.add(elementName);\n\t\t\t\tif (\"fields\".equals(elementName)) {\n\t\t\t\t\tisFieldsElement = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (\"field\".equals(elementName) && isFieldsElement) {\n\t\t\t\t\tString num = reader.getAttributeValue(null, \"number\");\n\t\t\t\t\tcurFieldName = reader.getAttributeValue(null, \"name\");\n\t\t\t\t\tFieldParser.logger.info(num + \", \" + curFieldName);\n\t\t\t\t\t// Integer tagNumber = Integer.parseInt(num);\n\t\t\t\t\ttagNameToNumber.put(curFieldName, num);\n\t\t\t\t\ttagNumberToName.put(num, curFieldName);\n\t\t\t\t\tMap<String, String> tagValueToTagValueDesc = tagNameToTagValueDesc.get(curFieldName);\n\t\t\t\t\tif (tagValueToTagValueDesc == null) {\n\t\t\t\t\t\ttagValueToTagValueDesc = new ConcurrentHashMap<>();\n\t\t\t\t\t\ttagNameToTagValueDesc.put(curFieldName, tagValueToTagValueDesc);\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (\"value\".equals(elementName) && !\"\".equals(curFieldName)) {\n\t\t\t\t\tMap<String, String> tagValueToTagValueDesc = tagNameToTagValueDesc.get(curFieldName);\n\t\t\t\t\tString enumNum = reader.getAttributeValue(null, \"enum\");\n\t\t\t\t\tString enumDesc = reader.getAttributeValue(null, \"description\");\n\t\t\t\t\ttagValueToTagValueDesc.put(enumNum, enumDesc);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase XMLStreamConstants.END_ELEMENT:\n\t\t\t\telementName = reader.getLocalName();\n\t\t\t\tif (\"fields\".equals(elementName)) {\n\t\t\t\t\tisFieldsElement = false;\n\t\t\t\t\tcurFieldName = \"\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t}\n\t\t}\n\t\treader.close();\n\t}", "public ArrayList<ArrayList<Double>> parseVertices() {\n\t\tArrayList<ArrayList<Double>> ret = new ArrayList<ArrayList<Double>>();\n\t\tString file = getFilepath();\n\t\ttry {\n\t\t\tFile myObj = new File(file);\n\t\t\tScanner myReader = new Scanner(myObj);\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tif (data.length() > 2 && data.substring(0,2).equals(\"v \")) {\n\t\t\t\t\tString[] s = data.split(\" \");\n\t\t\t\t\tArrayList<Double> v = new ArrayList<Double>();\n\t\t\t\t\tv.add(Double.parseDouble(s[1]));\n\t\t\t\t\tv.add(Double.parseDouble(s[2]));\n\t\t\t\t\tv.add(Double.parseDouble(s[3]));\n\t\t\t\t\tret.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"An error occurred.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn ret;\n\n\t}", "public void readPairs(String fileName) {\n BufferedReader r = null;\n try {\n r = new BufferedReader(new InputStreamReader(new FileInputStream(fileName)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while (true) {\n String line = null;\n try {\n line = r.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (line == null) {\n break;\n }\n assert line.length() == 11; // indatakoll, om man kör med assertions på\n String start = line.substring(0, 5);\n String goal = line.substring(6, 11);\n\n int s = words.indexOf(start);\n int v = words.indexOf(goal);\n\n shortestPathPairs(s, v);\n }\n\n }", "public void restoreInfoFromFile(File file) {\n Scanner scanner = null;\n try {\n scanner = new Scanner(file);\n }catch(IOException e){\n e.getStackTrace();\n }\n HashMap<String, ArrayList<Passenger>> pasGroupList = new HashMap<>();\n ArrayList<Passenger> individualList = new ArrayList<Passenger>();\n Passenger pas;\n boolean isGrouped;\n boolean isEconomy;\n String seatPref;\n String name;\n String groupName;\n int seatCol;\n int seatRow;\n\n while (scanner.hasNextLine()) {\n String line = scanner.nextLine();\n String[] info = line.split(\",\");\n name = info[0];\n isEconomy = Boolean.valueOf(info[1]);\n seatRow = Integer.valueOf(info[2]);\n seatCol = Integer.valueOf(info[3]);\n isGrouped = Boolean.valueOf(info[4]);\n if (isGrouped) {\n groupName = info[5];\n pas = new Passenger(name, isEconomy, isGrouped, groupName);\n if (!pasGroupList.containsKey(groupName)) {\n pasGroupList.put(groupName, new ArrayList<Passenger>());\n }\n pasGroupList.get(groupName).add(pas);\n } else {\n seatPref = info[5];\n pas = new Passenger(name, isEconomy, seatPref);\n individualList.add(pas);\n }\n addPasDirectlyToSeat(pas, seatRow, seatCol);\n }\n updateTrackingList(pasGroupList, individualList);\n\n scanner.close();\n }", "public static void main(String[] args) {\n try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n BufferedReader fileReader = new BufferedReader(new FileReader(reader.readLine()))) {\n\n //add all strings from file to List\n ArrayList<String> strings = new ArrayList<>();\n while (fileReader.ready()) {\n String line = fileReader.readLine();\n for (String string : line.split(\" +\")) {\n strings.add(string);\n }\n }\n\n //check list for Pairs\n int length = strings.size();\n String firstString;\n String secondString;\n String reverseString;\n\n for (int i = 0; i < length - 1; i++) {\n firstString = strings.get(i);\n for (int y = i + 1; y < length; y++) {\n secondString = strings.get(y);\n reverseString = new StringBuilder(secondString).reverse().toString();\n if (firstString.equals(reverseString)) {\n Pair pair = new Pair();\n pair.first = firstString;\n pair.second = secondString;\n if (!result.contains(pair)) {\n result.add(pair);\n }\n }\n }\n }\n\n\n\n\n// for (Pair pair : result) {\n// System.out.println(pair);\n// }\n\n } catch (IOException e) {\n\n }\n\n }", "public static LinkedList<Patient> importSepValuesFilePatient(File f, String delimiter) {\n\t\tLinkedList<Patient> output = new LinkedList<Patient>();\n\t\tScanner fileReader;\n\t\ttry {\n\t\t\tfileReader = new Scanner(f);\n\t\t} catch (FileNotFoundException e1) { // If the file doesn't exist, abort\n\t\t\tSystem.out.println(\"File not Found\");\n\t\t\tMainApp.printError(e1);\n\t\t\treturn null;\n\t\t}\n\n\t\twhile (fileReader.hasNextLine()) // Parses the file line by line\n\t\t\toutput.add(makePatient(splitSepValuesLine(fileReader.nextLine(), delimiter)));\n\t\tfileReader.close();\n\t\treturn output;\n\t}", "private HashMap<String, ArrayList<Color>> loadXKCDColors() {\n\t\ttry {\n\t\t\t/* Open the file for reading. */\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(COLORS_FILE));\n\t\t\t\n\t\t\t/* Construct the HashMap that we will provide back as a result. */\n\t\t\tHashMap<String, ArrayList<Color>> result = new HashMap<String, ArrayList<Color>>();\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\t/* Read the next entry:\n\t\t\t\t * 1. The name of the color.\n\t\t\t\t * 2. Its red component.\n\t\t\t\t * 3. Its green component.\n\t\t\t\t * 4. Its blue component.\n\t\t\t\t */\n\t\t\t\tString colorName = br.readLine();\n\t\t\t\tString r = br.readLine();\n\t\t\t\tString g = br.readLine();\n\t\t\t\tString b = br.readLine();\n\t\t\t\t\n\t\t\t\t/* If we ran out of data, we're done. */\n\t\t\t\tif (b == null) break;\n\t\t\t\t\n\t\t\t\t/* Construct a Color object from this data. */\n\t\t\t\tColor color = new Color(Integer.parseInt(r),\n\t\t\t\t Integer.parseInt(g),\n\t\t\t\t Integer.parseInt(b));\n\t\t\t\t\n\t\t\t\t/* Ensure that there's an ArrayList waiting for us. */\n\t\t\t\tif (!result.containsKey(colorName)) {\n\t\t\t\t\tresult.put(colorName, new ArrayList<Color>());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* Add this color data to the color list. */\n\t\t\t\tresult.get(colorName).add(color);\n\t\t\t}\n\t\t\t\n\t\t\tbr.close();\n\t\t\treturn result;\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tthrow new ErrorException(e);\n\t\t}\n\t}", "public UPOSMapper(String mappingFile){\n map = new ConcurrentHashMap<>();\n try {\n for(String line: Files.readAllLines(Paths.get(mappingFile))){\n line = line.trim();\n if(line.isEmpty()) continue;\n String[] tags = line.split(\"\\t\");\n map.put(tags[0], tags[1]);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "static void parseData(String filename) {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\t\t \n\t\t\tString line;\n\t\t String[] tokens;\n\t\t ArrayList<Double> temp;\n\t\t \n\t\t while ((line = br.readLine()) != null) {\n\t\t \ttemp = new ArrayList<Double>();\n\t\t \ttokens = line.split(\",\");\n\t\t \tfor(String s : tokens) {\n\t\t \t\ttemp.add(Double.parseDouble(s));\n\t\t \t}\n\t\t \tData.add(new Vector(temp));\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static Map<String, Set<String>> parse(\n CommandManager mgr, \n List<String> listAttributeValues\n ) throws CLIException {\n Map<String, Set<String>> attrValues = \n new HashMap<String, Set<String>>();\n \n if ((listAttributeValues != null) && !listAttributeValues.isEmpty()) {\n for (String s: listAttributeValues) {\n int idx = s.indexOf('=');\n if (idx == -1) {\n throw createIncorrectFormatException(mgr, s);\n }\n }\n \n String attrName = s.substring(0, idx);\n String attrValue = s.substring(idx+1);\n \n Set<String> set = attrValues.get(attrName);\n if (set == null) {\n set = new HashSet<String>();\n attrValues.put(attrName, set);\n }\n set.add(attrValue);\n }\n return attrValues;\n }", "@Override\n protected void loadConfig(String fileName){\n fileName = PSO_PATH + fileName;\n File file = new File(fileName);\n try {\n Scanner sc = new Scanner(file); \n String line = sc.nextLine();\n List<List<String>> list = Arrays.asList(line.split(\",\"))\n .stream()\n .map(s -> Arrays.asList(s.split(\":\"))\n .stream()\n .map(n -> n.replaceAll(\"[^a-zA-Z0-9_.]\", \"\"))\n .collect(Collectors.toList())\n )\n .collect(Collectors.toList());\n\n this.initialTemperature = Double.parseDouble(list.get(0).get(1));\n this.coolingRate = Double.parseDouble(list.get(2).get(1));\n sc.close();\n } \n catch(IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n }", "private static HashMap<String, String> getUsers(String filename) {\n\t\t// Use hashmap to store the user list, the key is user name and the value is UUID\n\t\tHashMap<String, String> mapUsers = new HashMap<String, String>();\n\t\t// This will reference one line at a time\n\t\tString lineUser = null;\n\n\t\ttry {\n\t\t\t// Check file exists\n\t\t\tFile userfile = new File(filename);\n\t\t\tif(!userfile.exists() || userfile.isDirectory()) {\n\t\t\t\treturn mapUsers;\n\t\t\t}\n\t\t\t// Open the user file\n\t\t\tFileReader fileReader = new FileReader(filename);\n\t\t\t// User bufferedReader to go through the file\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\n\t\t\t// Read the file in lines one by one\n\t\t\twhile((lineUser = bufferedReader.readLine()) != null) {\n\t\t\t\tString[] namekey = lineUser.split(\" \"); // Split the name and key\n\t\t\t\tif (namekey.length != 2) { // Validate the data\n\t\t\t\t\tSystem.out.println(\"Invalid line: '\" + lineUser + \"' in '\" + filename + \"'\");\n\t\t\t\t\treturn mapUsers;\n\t\t\t\t}\n\t\t\t\t// Name + Key(UUID)\n\t\t\t\tmapUsers.put(namekey[0], namekey[1]);\n\t\t\t}\n\t\t\t// Always close files.\n\t\t\tbufferedReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException ex) {\n\t\t\tSystem.out.println(\"Unable to open file '\" + filename + \"'\");\n\t\t}\n\t\tcatch(IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\treturn mapUsers;\n\t\t}\n\t}", "public LinkedList<Sequence> parseFile() \n\t{\n\t\tString currstr = null;\n\t\t\n\t\t//moves onto first line of file\n\t\ttry {\n\t\t\tcurrstr = input.readLine();\n\t\t}\n\t\tcatch(IOException ioe) {\n\t\t\tSystem.err.println(\"ERROR encountered reading in line, exiting\");\n\t\t\tioe.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\t//Main read-in loop\n\t\tString tempstr = new String();\n\t\tboolean finished = false;\n\t\tString descrip = currstr.substring(1);\n\t\twhile(!finished) {\n\t\t\t//moves onto next line of input file\n\t\t\ttry {\n\t\t\t\tcurrstr = input.readLine();\n\t\t\t}\n\t\t\tcatch(IOException ioe) {\n\t\t\t\tSystem.err.println(\"ERROR encountered reading in line, exiting\");\n\t\t\t\tioe.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\n\t\t\t//checks to see if string is empty, if so, end of file, add tempstr to sequences, break\n\t\t\tif(currstr == null) {\n\t\t\t\tSequence seq = new Sequence(tempstr,descrip);\n\t\t\t\tsequences.addLast(seq);\n\t\t\t\tfinished = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//if first character is '>', add tempstr to sequences list, wipe tempstr, then break loop\n\t\t\tif(currstr.charAt(0) == '>') {\n\t\t\t\tSequence seq = new Sequence(tempstr,descrip);\n\t\t\t\tsequences.addLast(seq);\n\t\t\t\tdescrip = currstr.substring(1);\n\t\t\t\ttempstr = new String();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//attach currstr input string to end of tempstr\n\t\t\ttempstr += removeSpace(currstr.toUpperCase()); //FA convention\n\t\t}\n\t\treturn sequences;\n\t}", "private void loadFromFile(){\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Countbook>>() {}.getType();\n countbookList = gson.fromJson(in, listType);\n } catch (FileNotFoundException e) {\n countbookList = new ArrayList<Countbook>();\n }\n }", "public ArrayList<String> readFromFile(){\n ArrayList<String> results = new ArrayList<>();\n //Wrap code in a try/ catch to help with exception handling.\n try{\n //Create a object of Scanner class\n Scanner s = new Scanner(new FileReader(path));\n //While loop for iterating thru the file.\n // Reads the data and adds it to the ArrayList.\n while(s.hasNext()) {\n String c1 = s.next();\n String c2 = s.next();\n String w = s.next();\n results.add(c1);\n results.add(c2);\n results.add(w);\n }return results;\n\n }//File not found exception block.\n catch(FileNotFoundException e){\n System.out.println(e);\n }\n return results;//default return.\n }", "private static List<AttributesRule> parseRules(@Nullable File file) {\n if (file != null && file.exists() && file.isFile()) {\n try (InputStream stream = new FileInputStream(file)) {\n AttributesNode parsed = new AttributesNode();\n parsed.parse(stream);\n return parsed.getRules();\n } catch (IOException e) {\n // no need to crash the whole plugin\n System.err.println(\"Problem parsing \" + file.getAbsolutePath());\n e.printStackTrace();\n }\n }\n return Collections.emptyList();\n }", "void readFromFile(String file)\n {\n try\n {\n employees.clear();\n FileReader inputFile = new FileReader(fileName);\n BufferedReader input = new BufferedReader(inputFile);\n String line = input.readLine();\n \n while(line != null)\n {\n Employee worker = new Employee();\n StringTokenizer stringParser = new StringTokenizer(line, \",\");\n while(stringParser.hasMoreElements())\n {\n worker.setName(stringParser.nextElement().toString());\n worker.setHours(Integer.parseInt(stringParser.nextElement().toString()));\n worker.setRate(Float.parseFloat(stringParser.nextElement().toString()));\n }\n employees.add(worker);\n line = input.readLine();\n }\n inputFile.close();\n }\n catch(FileNotFoundException e)\n {\n e.getStackTrace();\n }\n catch(IOException e)\n {\n e.getStackTrace();\n }\n }", "List<WrappedKeyValue<TKey, TValue>> GetElements() throws IOException;", "public ArrayList<KeyVal> readLocalKeyVal(String key){\n\t\tArrayList<KeyVal> keyValList = new ArrayList<KeyVal>();\n\t\tString querySelection = DBHelper.KEY_FIELD+\"=?\";\n\t\tString selection = key;\n\t\tString []querySelectionArgs = new String[]{selection};\n\t\tif(selection.equals(\"@\")){\t// Fetch all the records\n\t\t\tquerySelection = null;\n\t\t\tquerySelectionArgs = null;\n\t\t}\n\t\tCursor cursor = dbHelper.query(null, querySelection, querySelectionArgs, null);\n\t\tif (cursor.moveToFirst()){\n\t\t\tdo{\n\t\t\t\tKeyVal newKeyVal = new KeyVal();\n\t\t\t\tnewKeyVal.setKey(cursor.getString(0));\n\t\t\t\tnewKeyVal.setVal(cursor.getString(1));\n\t\t\t\tnewKeyVal.setVersion(cursor.getString(2));\n\t\t\t\tkeyValList.add(newKeyVal);\n\t\t\t}while(cursor.moveToNext());\n\t\t}\n\t\tcursor.close();\n\t\treturn keyValList;\n\t}", "public ArrayList<Task> load() throws DukeException {\n ArrayList<Task> tasks = new ArrayList<>();\n try {\n File f = new File(filePath);\n if (f.exists()) {\n Scanner sc = new Scanner(f);\n while (sc.hasNext()) {\n String next = sc.nextLine();\n Task t = parseLine(next);\n tasks.add(t);\n }\n sc.close();\n } else {\n if (!f.getParentFile().exists()) {\n f.getParentFile().mkdir();\n }\n }\n f.createNewFile();\n } catch (IOException e) {\n throw new DukeException(\"Error retrieving/reading from data file, creating new file instead.\");\n }\n return tasks;\n }", "public static Map<String, String> stringToHashtable(String file) {\r\n if (file == null) {\r\n return null;\r\n }\r\n\r\n String sansComments = eraseComments(file);\r\n int pos = 0, count = sansComments.length();\r\n Map<String, String> retval = new HashMap<String, String>();\r\n\r\n // Split the file, line by line, into key/value pairs\r\n while (pos < count) {\r\n int eol = offsetToEOL(sansComments, pos);\r\n int next = offsetToNextLine(sansComments, pos);\r\n if (eol > 0) {\r\n String line = sansComments.substring(pos, pos + eol);\r\n StringTokenizer st = new StringTokenizer(line, \"=\");\r\n String key = st.nextToken();\r\n String value = \"\";\r\n if (st.hasMoreTokens()) {\r\n value = st.nextToken();\r\n }\r\n\r\n // Place scalar values in the hashtable directly\r\n // otherwise break comma separated ones into Vectors.\r\n // If they can be, items are inserted as Doubles, failing\r\n // that, as Strings.\r\n // int comma = value.indexOf(\",\");\r\n // if (comma == -1) {\r\n // try {\r\n // retval.put(key, new Double(value));\r\n // } catch (NumberFormatException nfe) {\r\n retval.put(key, value);\r\n // } // endtry\r\n // } else {\r\n // Vector<Comparable> v = new Vector<Comparable>();\r\n // StringTokenizer values = new StringTokenizer(value, \",\");\r\n // while (values.hasMoreTokens()) {\r\n // String s = values.nextToken();\r\n // try {\r\n // v.addElement(new Double(s));\r\n // } catch (NumberFormatException nfe) {\r\n // v.addElement(s.trim());\r\n // } // endtry\r\n // } // endwhile\r\n // retval.put(key, v);\r\n // } // endif\r\n } // endif\r\n pos += next;\r\n } // endwhile\r\n\r\n return retval;\r\n }", "public ValueMap(final String keyValuePairs, final String delimiter)\n\t{\n\t\tsuper();\n\n\t\tint start = 0;\n\t\tint equalsIndex = keyValuePairs.indexOf('=');\n\t\tint delimiterIndex = keyValuePairs.indexOf(delimiter, equalsIndex);\n\t\tif (delimiterIndex == -1)\n\t\t{\n\t\t\tdelimiterIndex = keyValuePairs.length();\n\t\t}\n\t\twhile (equalsIndex != -1)\n\t\t{\n\t\t\tif (delimiterIndex < keyValuePairs.length())\n\t\t\t{\n\t\t\t\tint equalsIndex2 = keyValuePairs.indexOf('=', delimiterIndex + 1);\n\t\t\t\tif (equalsIndex2 != -1)\n\t\t\t\t{\n\t\t\t\t\tdelimiterIndex = keyValuePairs.lastIndexOf(delimiter, equalsIndex2);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdelimiterIndex = keyValuePairs.length();\n\t\t\t\t}\n\t\t\t}\n\t\t\tString key = keyValuePairs.substring(start, equalsIndex);\n\t\t\tString value = keyValuePairs.substring(equalsIndex + 1, delimiterIndex);\n\t\t\tadd(key, value);\n\t\t\tif (delimiterIndex < keyValuePairs.length())\n\t\t\t{\n\t\t\t\tstart = delimiterIndex + 1;\n\t\t\t\tequalsIndex = keyValuePairs.indexOf('=', start);\n\t\t\t\tif (equalsIndex != -1)\n\t\t\t\t{\n\t\t\t\t\tdelimiterIndex = keyValuePairs.indexOf(delimiter, equalsIndex);\n\t\t\t\t\tif (delimiterIndex == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelimiterIndex = keyValuePairs.length();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tequalsIndex = -1;\n\t\t\t}\n\t\t}\n\t}", "public SymbolTable(File symbolDataFile) throws FileNotFoundException\n {\n symbolPairs = new ArrayIndexList<SymbolPair>();\n Scanner fileScan = new Scanner(symbolDataFile);\n String[] splitLine;\n while (fileScan.hasNextLine())\n {\n /* http://stackoverflow.com/questions/5067942/what-is-the-best-way-to-extract-the-first-word-from-a-string-in-java\n First word = ticker symbol, rest of line = company name\n */\n splitLine = fileScan.nextLine().split(\" \", 2);\n symbolPairs.add(symbolPairs.size(), (new SymbolPair(splitLine[0], splitLine[1].trim())));\n }\n }", "public void populateList(){\n\t\tfor (int i = 0; i < 10; i++){\n\t\t\tscoreList.add(-1);\t\t\t\n\t\t\tnameList.add(\"\");\n\t\t}\n\t\tint i=0; \n\t\ttry {\n\t\t\tScanner results = new Scanner(new File(\"results.txt\"));\n\t\t\twhile (results.hasNext()){\n\t\t\t\tnameList.set(i, results.next());\n\t\t\t\tscoreList.set(i, results.nextInt());\n\t\t\t\ti++;\n\t\t\t}\n\t\t} catch (FileNotFoundException e1){\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static void readUserFile() {\n\t\ttry {\n\t\t\tObjectInputStream readFile = new ObjectInputStream(new FileInputStream(userFile));\n\t\t\tVerify.userList = (ArrayList<User>) readFile.readObject();\n\t\t\treadFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//add contents of file to separate lists\n\t\tfor (int i=0; i<Verify.userList.size(); i++) {\n\t\t\tVerify.userIds.add(Verify.userList.get(i).getUserId());\n\t\t\tVerify.usernames.add(Verify.userList.get(i).getUsername());\n\t\t\tif (Verify.userList.get(i).getAccounts() != null) {\n\t\t\t\tVerify.accountList.addAll(Verify.userList.get(i).getAccounts());\n\t\t\t}\n\t\t\tif (Verify.userList.get(i).getRequests() != null) {\n\t\t\t\tVerify.requestList.addAll(Verify.userList.get(i).getRequests());\t\n\t\t\t}\n\t\t}\n\t\tfor (Account account: Verify.accountList) {\n\t\t\tVerify.accountIds.add(account.getAccountId());\n\t\t}\n\t}", "private List<Row> getConfigEntries() {\n InputStream inputStream = null;\n try {\n inputStream = getAssets().open(\"config.conf\");\n } catch (IOException ex) {\n System.err.println(\"File konnte nicht gelesen werden!\");\n }\n\n // inputStream in String umwandeln\n String configString = \"\";\n try {\n configString = inputStreamToString(inputStream);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // String in Zeilen umwandeln\n String[] keyValuePairs = configString.trim().split(\"\\n\");\n\n // String in Objekt mit key und value umwandeln\n return Arrays.stream(keyValuePairs).map(r -> {\n String[] temp = r.split(\"=\");\n String key = temp[0];\n String values = temp[1];\n return new Row(key, values);\n }).collect(Collectors.toList());\n }", "public List<Event> fillArrayList()\r\n {\r\n List<Event> list1=new ArrayList<>();\r\n FileReader fr=null;\r\n \r\n try{\r\n \r\n fr=new FileReader(\"./event.txt\");\r\n BufferedReader bf=new BufferedReader(fr);\r\n String s;\r\n \r\n while((s=bf.readLine())!=null)\r\n {\r\n Event event=new Event();\r\n String s1[]=new String[7];\r\n for(int i=0;i<s1.length;i++)\r\n {\r\n s1=s.split(\",\");\r\n \r\n event.setId(Integer.parseInt(s1[0]));\r\n \r\n event.setName(s1[1]);\r\n \r\n event.setOrganizer(s1[2]);\r\n \r\n Date date=Date.valueOf(s1[3]);\r\n \r\n event.setDate(date);\r\n \r\n event.setFees(Double.parseDouble(s1[4]));\r\n \r\n } \r\n list1.add(event);\r\n }\r\n \r\n bf.close();\r\n \r\n }catch(Exception e){e.printStackTrace();}\r\n return list1;\r\n\r\n }", "public TreeDictionary(String filename) {\n\t\tString entry;\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(filename));\n\t\t\twhile((entry=in.readLine())!=null){\n\t\t\t\tif(MapDictionary.isValidWord(entry)){\n\t\t\t\t\tString signature = wordToSignature(entry.toLowerCase());\n\t\t\t\t\tinsert(entry, signature);\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\tin.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"File not found\");\n\t\t}\n\t}", "@NonNull\n static ChangeRecords load(File file) throws IOException {\n ChangeRecords changeRecords = new ChangeRecords();\n List<String> rawRecords = Files.readLines(file, Charsets.UTF_8);\n for (String rawRecord : rawRecords) {\n StringTokenizer st = new StringTokenizer(rawRecord, \",\");\n if (st.countTokens() != 2) {\n throw new IOException(\"Invalid incremental change record : \" + rawRecord);\n }\n changeRecords.add(Status.valueOf(st.nextToken()), st.nextToken());\n }\n return changeRecords;\n }", "public static List<String> loadListFromFile(File file) throws InstantiationException, IllegalAccessException {\n\t\n\tList<String> list = new ArrayList<String>();\n\t\n\tif (file.exists()) {\n\t try {\n\t\tScanner s = new Scanner(file);\n\t\twhile (s.hasNext())\n\t\t list.add(s.next());\n\t } catch (FileNotFoundException ex) {\n\t\t// This should never be thrown because we have an if to check it...\n\t }\n\t \n\t}\n\t\n\treturn list;\n\t\n }", "private void readPreviousPairs() {\n\t\ttry {\n\t\t\treadPreviousPairsFromText();\n\t\t} catch (RuntimeException e) {\n\t\t\tthrow new TextParseFailException(labels.get(Labels.PROP_INFO_PAIRS_PARSE_EXCEPTION), e);\n\t\t}\n\t}", "public HashMap<String, ArrayList<Trajectory>> readTrajectories(String trajFileName) {\n Scanner csv = null;\n HashMap<String, ArrayList<Trajectory>> trajectories = new HashMap<String, ArrayList<Trajectory>>();\n try {\n csv = new Scanner(new File(trajFileName));\n ArrayList<Trajectory> tj = new ArrayList<Trajectory>();\n String currentId = \"\";\n while (csv.hasNextLine()) {\n String[] line = csv.nextLine().split(\",\");\n line[0] = line[0].substring(6, line[0].length() - 1);\n String[] locs = line[0].split(\" \");\n\n if (currentId.equals(\"\")) // first device\n {\n currentId = line[1];\n } else if (!currentId.equals(line[1])) // we are looking at a new device, add arrayList to the map, reset arrayList\n {\n trajectories.put(currentId, tj);\n tj = new ArrayList<Trajectory>();\n currentId = line[1];\n }\n tj.add(new Trajectory(Double.parseDouble(locs[0]), Double.parseDouble(locs[1]), line[1], Double.parseDouble(line[2])));\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return trajectories;\n }" ]
[ "0.6041725", "0.5914962", "0.56729233", "0.5461331", "0.54586786", "0.5443404", "0.5424", "0.5373104", "0.5361386", "0.5337009", "0.5315945", "0.5313205", "0.53054523", "0.5277578", "0.52560186", "0.524388", "0.5207699", "0.51953256", "0.5194631", "0.5192693", "0.5169183", "0.51671433", "0.51502556", "0.5122741", "0.5082849", "0.50591475", "0.5050955", "0.5039194", "0.5032519", "0.5031669", "0.4996614", "0.49708953", "0.49701473", "0.49645975", "0.49639985", "0.49573687", "0.49474782", "0.49234262", "0.49229002", "0.49142045", "0.49133375", "0.49088717", "0.49069703", "0.49069163", "0.49067968", "0.49057674", "0.48990825", "0.48960766", "0.4883243", "0.4864275", "0.4861545", "0.48589966", "0.4857223", "0.48420417", "0.48407596", "0.48301724", "0.4815902", "0.4815145", "0.4814887", "0.48109087", "0.4807618", "0.48028028", "0.48008853", "0.47966674", "0.47961357", "0.47954804", "0.47814322", "0.47802827", "0.4775989", "0.47740388", "0.47667357", "0.47665036", "0.4762913", "0.47586548", "0.47585604", "0.4757726", "0.47477096", "0.47474495", "0.47464097", "0.4745502", "0.4736902", "0.4735793", "0.47331685", "0.47322613", "0.4732198", "0.4731923", "0.47315764", "0.4728997", "0.4723775", "0.47219393", "0.4715479", "0.47129342", "0.47113255", "0.47052118", "0.4703703", "0.47001606", "0.46956587", "0.46821776", "0.4677283", "0.46772084" ]
0.50526476
26
Retrieves the value of a key value pair based on the key name.
public String getString(String key) { String value = (String) keyvaluepairs.get(key.toLowerCase()); return value == null ? "" : value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object get(String key);", "Object get(String key);", "public Value get(Key key);", "public Object get(String key);", "public String getValue(String keyName)\n {\n if (keyName == null || keyName.trim().length() == 0)\n throw new IllegalArgumentException(\"keyName may not be null or empty\");\n\n String keyValue = null;\n\n for (int i=0; i < m_keyNames.size(); i++)\n {\n if (((String)m_keyNames.get(i)).equals(keyName))\n {\n keyValue = (String)m_keyValues.get(i);\n break;\n }\n }\n\n return keyValue;\n }", "public V get(String key);", "Object get(Object key);", "public V getValue(K key);", "public V getValue(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "public Value get(Key key) ;", "public V get(K key);", "public <K> Object getSpecific(K key, String valueKey);", "V get(Object key);", "String getValue(String type, String key);", "V get(final K key);", "public V get(Object k) {\n\t\treturn values[findKeyIndex(k)];\n\t}", "public V getValue(K key)\n {\n V result = null;\n int keyIndex = locateIndex(key);\n if ((keyIndex < numberOfEntries) && \n key.equals(dictionary[keyIndex].getKey()))\n result = dictionary[keyIndex].getValue();\n return result;\n }", "public Object getKeyValue(String apiName)\n\t{\n\t\tif((( this.keyValues.containsKey(apiName))))\n\t\t{\n\t\t\treturn this.keyValues.get(apiName);\n\n\t\t}\n\t\treturn null;\n\n\t}", "String get(Integer key);", "public V get(K key) {\n if (null == key) {\n throw new IllegalStateException(\"Null value for key is \" +\n \"unsupported!\");\n }\n\n V result = null;\n\n Node<Pair<K, V>> node = findItem(key);\n\n if (node != null) {\n result = node.getData().value;\n }\n\n return result;\n\n }", "public Object get(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null)\n\t\t\treturn null;\n\t\treturn value.value;\n\t}", "public <K, V> V getSpecific(K key, MappingValueKey<V> valueKey);", "public native V get(K key);", "public String get(String key) {\n return this.map.get(key);\n }", "public Object get(String key) {\n \t\treturn this.get(null, key);\n \t}", "public V get(K key) throws InvalidKeyException;", "T get(String key);", "public T get(K key);", "T get(@NonNull String key);", "public V lookup(K key);", "public String get(String key) {\n return getData().get(key);\n }", "public String get(String key) {\n return mMap.get(key);\n }", "public String getKV(String key) throws Exception;", "public V get(Object key) { return _map.get(key); }", "public V get(K key)\r\n\t{\r\n\t\tEntry retrieve = data.get(new Entry(key, null));\r\n\t\t\r\n\t\tif(retrieve != null)\r\n\t\t{\r\n\t\t\treturn retrieve.value;\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Optional<Value> get(Key k) {\n\t\treturn bst.find(k);\n\t}", "private DataValue getValueForKey(String key) {\n DataValue value = valueMap.get(key);\n if (value == null) {\n return DataValue.NO_VALUE;\n } else {\n return value;\n }\n }", "public V getValue(K key) {\n int i = findPosition(key);\n if (i==DsConst.NOT_FOUND) {\n return null;\n }\n DictionaryPair p = list.get(i);\n return p.getValue();\n }", "public Object get(String key){ \r\n\t\treturn this.context.getValue(key);\r\n\t}", "public final synchronized V get(final K key) {\n\t\treturn map.get(key);\n\t}", "public abstract V get(K key);", "public String getValue(String key) {\n\t\tfinal Iterator<Map.Entry<String, String>> iter = entries.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tfinal Map.Entry<String, String> entry = iter.next();\n\t\t\tif (entry.getKey().equals(key)) {\n\t\t\t\treturn entry.getValue();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public String get(String key) {\n Node pos = find(key);\n if (pos == null) {\n return null;\n } else {\n return pos.pairStringString.getValue();\n }\n }", "public V get(K key) {\r\n\t\tint place = hash(key.hashCode());\r\n\t\tif (hashMapArray[place] != null) {\r\n\t\t\tLinkedList<KVPair> temp = hashMapArray[place];\r\n\t\t\tfor (KVPair i : temp) {\r\n\t\t\t\tif (i.getKey().equals(key)) {\r\n\t\t\t\t\treturn i.getValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public <T> T get(TypedKey<T> key)\n\t{\n\t\tObject value = map.get(Objects.requireNonNull(key));\n\t\treturn (value == null) ? key.getDefaultValue() : key.cast(value);\n\t}", "public Object get(String key) {\n return objectMap.get(key);\n }", "@Override\n\tpublic V get(Object key) {\n\t\treturn map.get(key);\n\t}", "V getEntry(K key);", "public V getValue(K key)\r\n\t{\r\n\t\tint slot = findSlot(key, false);\r\n\t\t\r\n\t\tif (slot < 0) \r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tMapEntry<K, V> e = table[slot];\r\n\t\treturn e.getValue();\r\n\t}", "protected abstract V get(K key);", "public V get(K key) {\n if (key == null) {\n MyEntry<K, V> entry = null;\n try {\n entry = bucket[0];\n if (entry != null) {\n return entry.getValue();\n }\n } catch (NullPointerException e) {\n }\n } else {\n // other keys\n MyEntry<K, V> entry = null;\n int location = hashFunction(key.hashCode());\n entry = bucket[location];\n if (entry != null && entry.getKey() == key) {\n return entry.getValue();\n }\n }\n return null;\n }", "public Object getObject(String key);", "public Value get(Value key) {\n\t\treturn storage.get(key);\n\t}", "public V get(K key) {\n int index = findIndex(key);\n if (keys[index] == null)\n return null;\n else\n return values[index];\n }", "public static String getValue(String key) {\r\n\t\tload();\r\n\t\treturn properties.getProperty(key);\r\n\t}", "public Object get(String key) {\r\n\t\treturn objectMap.get(key);\r\n\t}", "public V get(K key) {\r\n\t\t\tif (key == null) {\r\n\t\t\t\tthrow new NullPointerException();\r\n\t\t\t} else if (find(key) == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\t\t\t\treturn find(key).value;\r\n\t\t\t}\r\n\t\t}", "@Override\n public V get( final K name )\n {\n final ICacheElement<K, V> element = this.getCacheControl().get( name );\n\n return ( element != null ) ? element.getVal() : null;\n }", "public String get(int key) {\n String sql = \"SELECT data_val FROM data_map WHERE data_key = ?\";\n\n String value = null;\n try (Connection con = this.connect();\n PreparedStatement pstmt = con.prepareStatement(sql)) {\n pstmt.setInt(1, key);\n ResultSet rs = pstmt.executeQuery();\n\n if (!rs.isClosed()) {\n value = rs.getString(\"data_val\");\n rs.close();\n }\n }\n catch (SQLException e) {\n value = null;\n }\n\n return value;\n }", "public DataValue lookup(String key) {\n if (validateKey(key)) {\n return getValueForKey(key);\n } else {\n return DataValue.NO_VALUE;\n }\n }", "<T> T getValue(DataKey<T> key);", "public String get(String key) {\n return this._map.get(key);\n }", "public V get(String key) {\n int index = hashOf(key);\n if (index >= capacity) return null;\n return (V) values[index];\n }", "public V get(final K key)\n {\n final StackElement element = this.hashMap.get(key);\n\n if (element != null)\n {\n return element.value;\n }\n\n return null;\n }", "public V searchValue (K key) {\n\t\tfor (Map.Entry<K, V> entry : this.entrySet()) {\n\t\t\tif (entry.getKey() == key) {\n\t\t\t\treturn entry.getValue();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public String get(int key){\n\t\treturn(hashMap[key]);\t\t\n\t}", "public abstract T get(String key);", "String getValue(Key key) {\n return this.parameters.get(key);\n }", "public CompoundValue getValue(Object key);", "public int get(int key) {\n return store[key]; // get the value for the key\n }", "public Value get(Key key) {\r\n\t\t\tValue ret = null;\r\n\t\t\t\r\n\t\t\tdata.reset();\r\n\t\t\tfor (int i = 0; i < data.size(); i++) {\r\n\t\t\t\tif (data.get().getKey().compareTo(key) == 0) {\r\n\t\t\t\t\tret = data.get().getValue();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tdata.next();\r\n\t\t\t}\r\n\t\t\tdata.reset();\r\n\t\t\t\r\n\t\t\treturn ret;\r\n\t\t}", "public V get(K key) {\n V value = null;\n\n if (key != null) {\n int index = indexFor(key);\n if (container[index] != null) {\n value = (V) container[index].value;\n }\n }\n return value;\n }", "@Override\n public Object get(Comparable k) {\n\n // Check if null\n if (k == null) {\n throw new IllegalArgumentException(\"null key\");\n }\n\n else {\n\n // Loop to find key\n for (int i = 0; i < this.size; i++) {\n if (ls[i].key.equals(k)) {\n return ls[i].value; // Return key value if found\n }\n }\n return null; // Null if not found\n }\n }", "protected abstract Object _get(String key);", "public String getValue(String name){\n if(!kchain.containsKey(name))return akargs.get(name);\n else return kchain.get(name).toString();\n }", "public Value lookup (String name){\n Closure exist = find_var(name);\n return exist.getValues().get(name);\n }", "T get(String key) throws IOException;", "StoragePrimitive get(String key);", "public String getValue(String key) {\r\n\t\t\treturn prop.getProperty(key);\r\n\t\t}", "public V value(K key) {\n for(MapEntry<K, V> t : this) {\n if (t == null) continue;\n if (t.key().equals(key)) return t.value();\n }\n\n return null;\n }", "private int getValue(final String name, final String key) {\n\t\treturn Integer.parseInt(bundleConstants.getString(name + SEPERATOR + key));\n\t}", "private V get(K key) {\n\t\t\tif (keySet.contains(key)) {\n\t\t\t\treturn valueSet.get(keySet.indexOf(key));\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public Object getValue(final String name) {\r\n return this.params.get(name);\r\n }", "public Value get(String key)\r\n {\r\n if (key.equals(\"\")) return null_str_val;\r\n Node<Value> x = get(root, key, 0);\r\n return x == null ? null : x.val;\r\n }", "public String get(String key) {\n\t\t//get this file's text\n\t\tString text = FileIO.read(this.getPath());\n\t\tString value = null;\n\t\ttry {\n\t\t\t//try matching the pattern: key : value\\n \n\t\t\tPattern pattern = Pattern.compile(key+\" : (.*?)\\n\");\n\t\t\t\n\t\t\tMatcher matcher = pattern.matcher(text);\n\t\t\tmatcher.find();\n\t\t\t\n\t\t\t//get the value\n\t\t\tvalue = matcher.group(1);\n\t\t\t\n\t\t}catch(Exception e) {/*do nothing*/}\n\t\t\n\t\treturn value;\n\t}", "public String getValue(final String key) {\n\n\t\treturn config.getString(StringUtils.lowerCase(key));\n\t\t\t}", "String getParameter(String key);", "public Object get(Object key) {\n\t\tint index = key.hashCode() % SLOTS;\n\t\t// check if key is already present in that slot/bucket.\n\t\tfor(Pair p:table[index]) {\n\t\t\tif(key.equals(p.key))\n\t\t\t\treturn p.value;\n\t\t}\n\t\t// if not found, return null\n\t\treturn null;\n\t}", "public String getValue(final String key)\r\n {\r\n m_keys.addElement(key);\r\n return m_value;\r\n }", "public V getValue(Object key) {\n\t\treturn super.get(key);\n\t}", "public Object get(Object key) {\n byte[] byteKey = keySerde.toBytes(key);\n byte[] result = null;\n try {\n result = db.get(byteKey);\n } catch (RocksDBException e) {\n log.error(\"can not get the value for key: \" + key);\n }\n\n if (result == null) {\n log.info(key + \" does not exist in the rocksDb\");\n return null;\n } else {\n return valueSerde.fromBytes(result);\n }\n }", "public Object getValue(String key)\n {\n if (otherDetails == null)\n {\n return null;\n }\n else\n {\n return otherDetails.get(key);\n }\n }", "String getKey(String keyName)\n throws P4JavaException;", "public V get(K key)\n\t{\n\t\tcheckForNulls(key);\n\t\tint n = Math.abs(key.hashCode() % entries.length);\n\t\t\n\t\tif (entries[n] == null)\n\t\t\treturn null;\n\t\t\n\t\tfor (Entry e : entries[n])\n\t\t{\n\t\t\tif (key.equals(e.key) == true)\n\t\t\t\treturn e.value;\n\t\t}\n\t\t\n\t\treturn null;\n\t}" ]
[ "0.7231108", "0.7231108", "0.7211464", "0.7152624", "0.7132463", "0.694525", "0.6943997", "0.69311935", "0.69311935", "0.69227564", "0.69227564", "0.69227564", "0.69227564", "0.69227564", "0.69227564", "0.69227564", "0.6903572", "0.6889072", "0.68411094", "0.68248725", "0.6789291", "0.6756918", "0.67329025", "0.6701899", "0.66626674", "0.6628279", "0.66179013", "0.6586122", "0.65713435", "0.65702784", "0.6557001", "0.65423864", "0.65367603", "0.6531383", "0.6493876", "0.64561486", "0.6448172", "0.63992405", "0.63974386", "0.6397291", "0.639067", "0.6389595", "0.638332", "0.6379916", "0.63550264", "0.63157916", "0.63032025", "0.6285897", "0.6283599", "0.6279774", "0.62784153", "0.62729985", "0.626303", "0.6258009", "0.6248253", "0.62372637", "0.62302804", "0.62206185", "0.6212297", "0.62096286", "0.6206267", "0.6182797", "0.61823845", "0.61666423", "0.61655474", "0.6151347", "0.61474884", "0.61370087", "0.6117252", "0.61167246", "0.6098628", "0.6093319", "0.60774106", "0.60721993", "0.6067191", "0.6060633", "0.6057716", "0.6057363", "0.6052145", "0.6044994", "0.6040447", "0.603162", "0.60289955", "0.60233545", "0.6016809", "0.60096145", "0.6009179", "0.6006116", "0.59998786", "0.5990036", "0.5972119", "0.59701455", "0.5966038", "0.5959568", "0.5948307", "0.59469557", "0.5938585", "0.5937068", "0.59308326", "0.59106195", "0.5901323" ]
0.0
-1