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 |
|---|---|---|---|---|---|---|
Generate the SVG Library. | public void generate(boolean leaning, String bkColor, String bColor, String sColor, String string)
throws IOException, ParserConfigurationException {
int dimCanvasX = (int) ((int) library.getFrameSizeW() - 0.055 * library.getFrameSizeW());
int dimCanvasY = 1500;
int thiknessEdges = 20;
graphics.setSVGCanvasSize(new Dimension(dimCanvasX, dimCanvasY));
int nbShelves = library.getShelves().size();
int spaceBetweenShelves = 0;
if (nbShelves > 0) {
spaceBetweenShelves = (dimCanvasY - thiknessEdges * (2 + nbShelves - 1)) / nbShelves;
}
// define the back and the outlines of the library
drawBackOutlines(dimCanvasX, dimCanvasY, thiknessEdges, bkColor, sColor);
// define the shelves of the library
List<Shape> shelves = drawShelves(nbShelves, thiknessEdges, spaceBetweenShelves, dimCanvasX, sColor);
// get the width of a shelf
int shelfWidth = dimCanvasX - 2 * thiknessEdges;
// get books
drawBooksAndTitles(spaceBetweenShelves, dimCanvasX, thiknessEdges, shelfWidth, leaning, shelves, bColor);
// Finally, stream out SVG using UTF-8 encoding.
boolean useCSS = true; // we want to use CSS style attributes
try (Writer out = new OutputStreamWriter(new FileOutputStream("library.svg"), "UTF-8")) {
graphics.stream(out, useCSS);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toSVG() {\n\n StringBuilder toReturn = new StringBuilder();\n toReturn.append(\"<svg width=\" + \"\\\"\" + Integer.toString(this.width)\n + \"\\\"\" + \" height=\" + \"\\\"\" + Integer.toString(this.height)\n + \"\\\"\" + \" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"); // add website\n String tag;\n for (String s : model.getIDSet()) {\n\n IShape sh = model.currentShape(0, s);\n if (sh.isRectangle()) {\n toReturn.append(\"<rect id=\" + \"\\\"\" + s + \"\\\"\" + \" \");\n tag = \"</rect>\";\n toReturn.append(\"x=\\\"\" + sh.getLocation().getX() + \"\\\" y=\\\"\"\n + sh.getLocation().getY() + \"\\\" width=\\\"\" + sh.getWidth() + \"\\\" height=\\\"\"\n + sh.getHeight() + \"\\\" fill=\\\"rgb(\" + sh.getColor().getRedInt() + \",\" +\n sh.getColor().getGreenInt() + \",\"\n + sh.getColor().getBlueInt() + \")\\\" visibility=\\\"visible\\\" >\\n\");\n } else {\n toReturn.append(\"<ellipse id=\" + \"\\\"\" + s + \"\\\"\" + \" \");\n toReturn.append(\"cx=\\\"\" + sh.getLocation().getX() + \"\\\" cy=\\\"\" + sh.getLocation().getY()\n + \"\\\" rx=\\\"\" + sh.getWidth() + \"\\\" ry=\\\"\" + sh.getHeight() + \"\\\" fill=\\\"rgb(\"\n + sh.getColor().getRedInt() + \",\" + sh.getColor().getGreenInt() + \",\"\n + sh.getColor().getBlueInt() + \")\\\" visibility=\\\"visible\\\" >\\n\");\n tag = \"</ellipse>\";\n }\n\n toReturn.append(svgColors(s));\n\n toReturn.append(svgSizes(s));\n\n toReturn.append(svgMoves(s));\n\n toReturn.append(tag + \"\\n\");\n\n }\n toReturn.append(\"</svg>\");\n return toReturn.toString();\n }",
"private SVGGraphics2D getGenerator() throws Exception {\n\t\tDOMImplementation dom = GenericDOMImplementation.getDOMImplementation();\n\t\tDocument doc = dom.createDocument(null, \"svg\", null);\n\t\tSVGGraphics2D generator = new SVGGraphics2D(doc);\n\t\treturn generator;\n\t}",
"private void initScene() {\n myStringBuilder.append(\"<svg width=\\\"\" + width + \"\\\" height=\\\"\" + height +\n \"\\\" version=\\\"1.1\\\"\\n\" + \" xmlns=\\\"http://www.w3.org/2000/svg\\\">\");\n }",
"public void outputSvg(String fileName){\n\t\ttry {\n\t\t\tFileWriter fw = new FileWriter(new File(fileName));\n\t\t\tfw.write(output);\n\t\t\tfw.flush();\n\t\t\tfw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t}",
"public void endSvgFile(){\n\t\toutput += \"</g>\\n\" + \n\t\t\t\t\t\"</g>\\n\" +\n\t\t\t\t\t\"</svg>\\n\";\n\t}",
"public void convert() throws Exception {\r\n\t\tString svg_URI_input = Paths.get(\"library.svg\").toUri().toURL().toString();\r\n\t\tTranscoderInput input_svg_image = new TranscoderInput(svg_URI_input);\r\n\t\tthis.setNewImage(generate(20));// Define the name of the file\r\n\t\ttry (OutputStream png_ostream = new FileOutputStream(newImage)) {\r\n\t\t\tTranscoderOutput output_png_image = new TranscoderOutput(png_ostream);\r\n\r\n\t\t\tPNGTranscoder my_converter = new PNGTranscoder();\r\n\t\t\tmy_converter.transcode(input_svg_image, output_png_image);\r\n\r\n\t\t\tpng_ostream.flush();\r\n\t\t\tpng_ostream.close();\r\n\t\t}\r\n\r\n\t}",
"public SVGModel() {\n \t\telementToModel = new HashMap<SVGElement, SVGElementModel>();\n \t\ttagNameToTagCount = new HashMap<String, Integer>();\n \t\tgrid = new Grid();\n \t}",
"public AnimationSVGView() {\n this.model = new BasicAnimationModel();\n this.out = new StringBuilder();\n this.speed = 1;\n }",
"public static void main(String[] args) throws Exception {\n\t\tString fileBase = \"GasWaterElectricity3\";\r\n\t\t//String fileBase = \"000cwHDLdata\";\r\n\t\tBufferedReader b = new BufferedReader(\r\n\t\t\t\tnew FileReader(fileBase+\".txt\"));\r\n\t\tPrintStream fo = new PrintStream(fileBase+\".svg\");\r\n\t\tStringBuffer chips = new StringBuffer();\r\n\t\tStringBuffer joins = new StringBuffer();\r\n\t\tint joinCount = 1;\r\n\t\tStringBuffer paths = new StringBuffer();\r\n\t\tString ln ;\r\n\t\twhile ((ln = b.readLine()) != null){\r\n\t\t\tString [] wrds = ln.split(\"\\\\s+\");\r\n\t\t\tif (wrds.length==0) continue; // A blank line\r\n\t\t\tint x0,y0,x1,y1;\r\n\t\t\tdouble t = 0.1;\r\n\t\t\tswitch (wrds[0])\r\n\t\t\t{\r\n\t\t\tcase \"D\":\r\n\t\t\t\tgridW = Integer.parseInt(wrds[1]);\r\n\t\t\t\tgridH = Integer.parseInt(wrds[2]);\r\n\t\t\t\tbreak;\t\t\t\t\r\n\t\t\tcase \"C\":\r\n\t\t\t\tx0 = Integer.parseInt(wrds[1]);\r\n\t\t\t\ty0 = Integer.parseInt(wrds[2]);\r\n\t\t\t\tx1 = Integer.parseInt(wrds[3]);\r\n\t\t\t\ty1 = Integer.parseInt(wrds[4]);\r\n\t\t\t\tchips.append(String.format(\"<rect x='%f' y='%f' width='%f' height='%f' rx='.2' ry='.2' fill='pink' stroke='black' stroke-width='.2'/>\\n\",\r\n\t\t\t\t\t\tx0+t,y0+t,x1+1-x0-2*t,y1+1-y0-2*t));\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"J\":\r\n\t\t\t\tx0 = Integer.parseInt(wrds[1]);\r\n\t\t\t\ty0 = Integer.parseInt(wrds[2]);\r\n\t\t\t\tx1 = Integer.parseInt(wrds[3]);\r\n\t\t\t\ty1 = Integer.parseInt(wrds[4]);\r\n\t\t\t\tdouble f = 0.04;\r\n\t\t\t\tjoins.append(String.format(\"<circle cx='%f' cy='%f' r='.4' fill='white' stroke='blue' stroke-width='.1'/>\\n\",\r\n\t\t\t\t\t\tx0+.5,y0+.5));\r\n\t\t\t\tjoins.append(String.format(\"<circle cx='%f' cy='%f' r='.4' fill='white' stroke='blue' stroke-width='.1'/>\\n\",\r\n\t\t\t\t\t\tx1+.5,y1+.5));\r\n\t\t\t\tjoins.append(String.format(\"<g transform='translate(%f,%f) scale(%f,%f)'><text text-anchor='middle'>%d</text></g>\\n\",\r\n\t\t\t\t\t\tx0+.5,y0+0.7f,f,f,joinCount));\r\n\t\t\t\tjoins.append(String.format(\"<g transform='translate(%f,%f) scale(%f,%f)'><text text-anchor='middle'>%d</text></g>\\n\",\r\n\t\t\t\t\t\tx1+.5,y1+0.7f,f,f,joinCount++));\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"#\"://A comment, ignore\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"T\":\r\n\t\t\t\tx0 = Integer.parseInt(wrds[1]);\r\n\t\t\t\ty0 = Integer.parseInt(wrds[2]);\r\n\t\t\t\tStringBuffer p = new StringBuffer();\r\n\t\t\t\tp.append(\"M\"+(x0+.5)+\" \"+(y0+.5)+\" l\");\r\n\t\t\t\tfor(int i=3;i<wrds.length;i++)\r\n\t\t\t\t\tfor(int j=0;j<wrds[i].length();j++){\r\n\t\t\t\t\t\tswitch (wrds[i].charAt(j))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tcase 'N':\r\n\t\t\t\t\t\t\tp.append(\" 0 -1\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'E':\r\n\t\t\t\t\t\t\tp.append(\" l 1 0\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'S':\r\n\t\t\t\t\t\t\tp.append(\" 0 1\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'W':\r\n\t\t\t\t\t\t\tp.append(\" -1 0\");\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\tpaths.append(String.format(\"<path stroke='gray' stroke-width='.2' fill='none' d='%s'/>\\n\",p));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tb.close();\r\n\t\tfo.printf(\"<svg width='10cm' height='10cm' viewBox='0 0 %d %d' xmlns='http://www.w3.org/2000/svg' version='1.1'>\\n\",\r\n\t\t\t\tgridW,gridH);\r\n\t\tString s=\"\";\r\n\t\tfor(int i=0;i<gridW;i++)\r\n\t\t\ts += String.format(\"M %d 0 l 0 %d \",i,gridH);\r\n\t\tfo.printf(\"<path stroke='blue' stroke-width='.02' fill='none' d='%s'/>\", s);\r\n\t\ts=\"\";\r\n\t\tfor(int i=0;i<gridH;i++)\r\n\t\t\ts += String.format(\"M 0 %d l %d 0 \",i,gridW);\r\n\t\tfo.printf(\"<path stroke='blue' stroke-width='.02' fill='none' d='%s'/>\", s);\r\n\t\tfo.print(chips);\r\n\t\tfo.print(paths);\r\n\t\tfo.print(joins);\r\n\t\tfo.print(\"</svg>\");\r\n\t\tfo.close();\r\n\t}",
"public interface XmlProjectTags {\r\n\r\n\tpublic static String SVG = \"svg\";\r\n\tpublic static final String GROUP = \"g\";\r\n\tpublic static final String RECT = \"rect\";\r\n\tpublic static final String PATH = \"path\";\r\n\tpublic static final String ELLIPSE = \"ellipse\";\r\n\tpublic static final String LINE = \"line\";\r\n\tpublic static final String IMAGE = \"image\";\r\n\tpublic static final String METADATA = \"metadata\";\r\n\r\n\tpublic static final String TITULO = \"id\";\r\n\tpublic static final String VIEWBOX = \"viewBox\";\r\n\tpublic static final String XMLNS = \"xmlns\";\r\n\tpublic static final String XMLNS_XLINK = \"xmlns:xlink\";\r\n\tpublic static final String ID = \"id\";\r\n\tpublic static final String FILL = \"fill\";\r\n\tpublic static final String FILL_OPACITY = \"fill-opacity\";\r\n\tpublic static final String POINTER_EVENTS = \"pointer-events\";\r\n\tpublic static final String STROKE = \"stroke\";\r\n\tpublic static final String STROKE_DASHARRAY = \"stroke-dasharray\";\r\n\tpublic static final String STROKE_OPACITY = \"stroke-opacity\";\r\n\tpublic static final String STROKE_WIDTH = \"stroke-width\";\r\n\tpublic static final String D = \"d\";\r\n\tpublic static final String OPACITY = \"opacity\";\r\n\tpublic static final String X = \"x\";\r\n\tpublic static final String Y = \"y\";\r\n\tpublic static final String WIDTH = \"width\";\r\n\tpublic static final String HEIGHT = \"height\";\r\n\tpublic static final String CX = \"cx\";\r\n\tpublic static final String CY = \"cy\";\r\n\tpublic static final String RX = \"rx\";\r\n\tpublic static final String RY = \"ry\";\r\n\tpublic static final String X1 = \"x1\";\r\n\tpublic static final String X2 = \"x2\";\r\n\tpublic static final String Y1 = \"y1\";\r\n\tpublic static final String Y2 = \"y2\";\r\n\tpublic static final String POINTS = \"points\";\r\n\tpublic static final String POLYLINE = \"polyline\";\r\n\tpublic static final String POLYGON = \"polygon\";\r\n\tpublic static final String STR = \"str\";\r\n\tpublic static final String TEXT = \"text\";\r\n\tpublic static final String FONTFAMILY = \"font-family\";\r\n\tpublic static final String FONTSIZE = \"font-size\";\r\n\tpublic static final String XLINKHREF = \"xlink:href\";\r\n\r\n}",
"public SvgGraphics(int numOfVertices, int scale){\n\t\t//Set the scale\n\t\tthis.scale = scale;\n\t\t\n\t\t//Get the size of the graph (from the paper 2*n-4 x n-2)\n\t\tint xSize = (2*numOfVertices - 4);\n\t\tint ySize = (numOfVertices - 2);\n\t\t\n\t\t//Set the starting x and y coordinates (in pixels).\n\t\t//The r just moves the graph up and over so that the bottom nodes\n\t\t//are fully displayed.\n\t\tint startx = r;\n\t\tint starty = (scale*ySize) + r;\n\t\t\n\t\t//Set the initial xml format for SVG\n\t\t//Also rotate the picture and move to a place that can be viewed\n\t\toutput = \"<?xml version=\\\"1.0\\\" standalone=\\\"no\\\"?>\\n\" +\n\t\t\t\t\"<!DOCTYPE svg PUBLIC \\\"-//W3C//DTD SVG 1.1//EN\\\" \" +\n\t\t\t\t\"\\\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\\\">\\n\\n\" +\n\t\t\t\t\"<svg width=\\\"100%\\\" height=\\\"100%\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\\n\" +\n\t\t\t\t\"<g transform=\\\"matrix(1, 0, 0, -1, \" + startx + \", \" + starty +\")\\\">\\n\" +\n\t\t\t\t\"<g font-family=\\\"Verdana\\\" font-size=\\\"8\\\" >\\n\\n\";\n\t}",
"public SvgStyle() {\n\n\t\t\tfillPaint = new Paint();\n\t\t\tstrokePaint = new Paint();\n\t\t\tfillPaint.setStyle(Paint.Style.FILL);\n\t\t\tstrokePaint.setStyle(Paint.Style.STROKE);\n\t\t\tfillPaint.setColor(0xff000000);\n\t\t\tstrokePaint.setColor(0xff000000);\n\t\t\tmasterOpacity = 1;\n\t\t\tfillOpacity = 1;\n\t\t\tstrokeOpacity = 1;\n\t\t\tfillPaint.setAntiAlias(true);\n\t\t\tstrokePaint.setAntiAlias(true);\n\t\t\tfillPaint.setStrokeWidth(1f);\n\t\t\tstrokePaint.setStrokeWidth(1f);\n\t\t\tfillPaint.setTextAlign(Paint.Align.LEFT);\n\t\t\tstrokePaint.setTextAlign(Paint.Align.LEFT);\n\t\t\tfillPaint.setTextSize(0.02f);\n\t\t\tstrokePaint.setTextSize(0.02f);\n\t\t\tfillPaint.setTextScaleX(1f);\n\t\t\tstrokePaint.setTextScaleX(1f);\n\t\t\tfillPaint.setTypeface(Typeface.DEFAULT);\n\t\t\tstrokePaint.setTypeface(Typeface.DEFAULT);\n\t\t\thasFill = true;\n\t\t\thasStroke = false;\n\t\t}",
"public ImageWriterSVG(String format)\n\t{\n\t\tif (!(\"svg\".equals(format) || \"svgz\".equals(format)))\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"format \" + format + \" is not accepted by this ImageWriter\");\n\t\t}\n\t\t\n\t\tacceptedFormat = format;\n\t}",
"public void setSvgElement(OMSVGSVGElement svg, String title, String idPrefix) {\n \t\tthis.svg = svg;\n \t\tthis.idPrefix = idPrefix;\n \t\twindowRect = svg.createSVGRect();\n \n \t\t// Force the svg to have its size managed by CSS\n \t\t// (no width and height attributes). This size will\n \t\t// be the min (window size, bbox of the svg in\n \t\t// screen coordinates taking into account the\n \t\t// viewing transform).\n \t\tsvg.removeAttribute(SVGConstants.SVG_WIDTH_ATTRIBUTE);\n \t\tsvg.removeAttribute(SVGConstants.SVG_HEIGHT_ATTRIBUTE);\n \t\t\n \t // Add event handlers. These event handlers will re-route\n \t // events to the highlighter or the manipulators\n \t svg.addMouseMoveHandler(this);\n \t svg.addMouseDownHandler(this);\n \t svg.addMouseUpHandler(this);\n \n \t\telementToModel.clear();\n \t\ttagNameToTagCount.clear();\n \n \t\t// Normalize ids to support multi-docs\n \t SVGProcessor.normalizeIds(svg, idPrefix);\n \t \n \t // Create the transform group\n \t xformGroup = new OMSVGGElement();\n \t xformGroup.getTransform().getBaseVal().appendItem(svg.createSVGTransform());\n \n \t // Build the geometry group (used to control the viewing\n \t // transform)\n \t OMSVGGElement elementGroup = new OMSVGGElement();\n \t\tSVGNamedElementModel.createTitleDesc(elementGroup.getElement().<SVGElement>cast(), title);\n \t SVGProcessor.reparent(svg, elementGroup);\n \t \n \t // Create the selection group to handle highlighting\n \t // of the selection and hovered elements.\n \t OMSVGGElement twinGroup = (OMSVGGElement) elementGroup.cloneNode(true);\n \t twinGroup.getTransform().getBaseVal().appendItem(svg.createSVGTransform());\n \t SVGProcessor.normalizeIds(twinGroup, SVGProcessor.newPrefixExtension(idPrefix, EXT_TWIN));\n \t twinGroup.getStyle().setSVGProperty(SVGConstants.CSS_VISIBILITY_PROPERTY, SVGConstants.CSS_HIDDEN_VALUE);\n \t \n \t modelGroup = create(elementGroup.getElement().<SVGElement>cast(), twinGroup.getElement().<SVGElement>cast());\n \t xformGroup.appendChild(elementGroup);\n \t svg.appendChild(xformGroup);\n \t svg.appendChild(twinGroup);\n \t setScale(1f);\n \t \n \t // Build the SVG tree store\n \t store = new TreeStore<SVGElementModel>();\n \t store.add(modelGroup, true);\n \t \n \t // From now on, listen to changes to the model, to translate\n \t // them into commands\n \t store.addStoreListener(new StoreListener<SVGElementModel>() {\n \t\t\t@Override\n \t\t\tpublic void storeUpdate(StoreEvent<SVGElementModel> se) {\n \t\t\t\tSVGModel.this.storeUpdate(se);\n \t\t\t}\n \t\t});\n \n \t\t// Keep the viewBox if available for later computation of the viewBox model\n \t\t// on svg attach. The actual SVG viewBox is removed.\n \t\tOMSVGRect viewBoxRect = svg.getViewBox().getBaseVal();\n \t\tif (viewBoxRect.getWidth() != 0f && viewBoxRect.getHeight() != 0f) {\n \t\t\tcreateViewBox(viewBoxRect);\n \t\t}\n \t\tsvg.removeAttribute(SVGConstants.SVG_VIEW_BOX_ATTRIBUTE);\n \n \t // Build the command store\n \t commandStore = new CommandStore();\n \n \t // Build the selection model\n \t selectionModel = new SVGSelectionModel();\n \t \n \t}",
"public SVG build() throws SVGParseException {\n if (data == null) {\n throw new IllegalStateException(\"SVG input not specified. Call one of the readFrom...() methods first.\");\n }\n SVGParser parser = new SVGParser();\n SVG svg = parser.parse(data);\n svg.setFillColorFilter(fillColorFilter);\n svg.setStrokeColorFilter(strokeColorFilter);\n return svg;\n }",
"public interface Paths {\n String svg_path=\"M 1024.00,0.00\\n\"+\n \"C 1024.00,0.00 1024.00,1024.00 1024.00,1024.00\\n\"+\n \"1024.00,1024.00 0.00,1024.00 0.00,1024.00\\n\"+\n \"0.00,1024.00 0.00,0.00 0.00,0.00\\n\"+\n \"0.00,0.00 1024.00,0.00 1024.00,0.00 Z\\n\"+\n \"M 471.00,82.00\\n\"+\n \"C 471.00,82.00 436.00,86.46 436.00,86.46\\n\"+\n \"402.29,92.53 363.11,105.02 332.00,119.31\\n\"+\n \"212.66,174.10 124.94,279.73 93.13,407.00\\n\"+\n \"93.13,407.00 84.32,449.00 84.32,449.00\\n\"+\n \"84.32,449.00 83.71,459.00 83.71,459.00\\n\"+\n \"83.71,459.00 82.04,468.00 82.04,468.00\\n\"+\n \"82.04,468.00 82.04,477.00 82.04,477.00\\n\"+\n \"81.41,483.79 80.02,482.44 80.00,493.00\\n\"+\n \"80.00,493.00 80.00,531.00 80.00,531.00\\n\"+\n \"80.02,541.55 81.41,540.19 81.91,547.00\\n\"+\n \"83.59,569.87 87.15,592.72 92.74,615.00\\n\"+\n \"100.84,647.21 115.95,687.81 132.22,716.80\\n\"+\n \"132.22,716.80 151.28,747.23 151.28,747.23\\n\"+\n \"151.28,747.23 165.74,768.69 165.74,768.69\\n\"+\n \"165.74,768.69 170.22,773.74 170.22,773.74\\n\"+\n \"170.22,773.74 180.37,787.49 180.37,787.49\\n\"+\n \"180.37,787.49 189.63,797.04 189.63,797.04\\n\"+\n \"189.63,797.04 195.01,804.24 195.01,804.24\\n\"+\n \"195.01,804.24 221.76,830.99 221.76,830.99\\n\"+\n \"221.76,830.99 228.24,835.74 228.24,835.74\\n\"+\n \"228.24,835.74 235.76,842.99 235.76,842.99\\n\"+\n \"235.76,842.99 249.49,853.14 249.49,853.14\\n\"+\n \"249.49,853.14 255.31,858.26 255.31,858.26\\n\"+\n \"255.31,858.26 271.58,869.13 271.58,869.13\\n\"+\n \"291.22,882.33 311.33,894.77 333.00,904.45\\n\"+\n \"333.00,904.45 341.00,907.55 341.00,907.55\\n\"+\n \"367.84,919.54 388.74,925.41 417.00,932.47\\n\"+\n \"417.00,932.47 449.00,938.71 449.00,938.71\\n\"+\n \"449.00,938.71 457.00,939.29 457.00,939.29\\n\"+\n \"462.41,939.99 463.86,940.92 470.00,941.08\\n\"+\n \"470.00,941.08 480.00,941.08 480.00,941.08\\n\"+\n \"487.10,941.88 487.04,942.99 496.00,943.00\\n\"+\n \"496.00,943.00 532.00,943.00 532.00,943.00\\n\"+\n \"540.96,942.99 540.90,941.88 548.00,941.00\\n\"+\n \"548.00,941.00 558.00,941.00 558.00,941.00\\n\"+\n \"558.00,941.00 567.00,939.29 567.00,939.29\\n\"+\n \"567.00,939.29 575.00,938.71 575.00,938.71\\n\"+\n \"600.22,935.42 641.23,924.46 665.00,915.29\\n\"+\n \"704.92,899.89 742.59,878.10 776.69,852.26\\n\"+\n \"776.69,852.26 793.76,837.74 793.76,837.74\\n\"+\n \"793.76,837.74 800.24,832.99 800.24,832.99\\n\"+\n \"800.24,832.99 815.67,817.67 815.67,817.67\\n\"+\n \"815.67,817.67 830.99,802.24 830.99,802.24\\n\"+\n \"830.99,802.24 836.37,795.04 836.37,795.04\\n\"+\n \"836.37,795.04 843.63,787.49 843.63,787.49\\n\"+\n \"843.63,787.49 853.78,773.74 853.78,773.74\\n\"+\n \"853.78,773.74 858.80,768.26 858.80,768.26\\n\"+\n \"858.80,768.26 865.22,758.47 865.22,758.47\\n\"+\n \"865.22,758.47 883.32,731.61 883.32,731.61\\n\"+\n \"912.11,682.93 931.69,628.01 939.70,572.00\\n\"+\n \"939.70,572.00 940.29,564.00 940.29,564.00\\n\"+\n \"940.29,564.00 941.83,554.00 941.83,554.00\\n\"+\n \"941.83,554.00 943.09,532.00 943.09,532.00\\n\"+\n \"943.09,532.00 944.00,520.00 944.00,520.00\\n\"+\n \"944.09,461.78 934.76,408.42 913.76,354.00\\n\"+\n \"913.76,354.00 903.46,328.00 903.46,328.00\\n\"+\n \"903.46,328.00 888.10,299.00 888.10,299.00\\n\"+\n \"848.42,227.81 787.58,169.24 716.00,130.54\\n\"+\n \"697.75,120.67 678.43,112.81 659.00,105.63\\n\"+\n \"633.52,96.22 601.90,88.14 575.00,84.30\\n\"+\n \"575.00,84.30 567.00,83.71 567.00,83.71\\n\"+\n \"557.81,82.51 560.60,82.12 550.00,82.00\\n\"+\n \"550.00,82.00 530.00,80.14 530.00,80.14\\n\"+\n \"530.00,80.14 487.00,80.14 487.00,80.14\\n\"+\n \"478.45,81.70 480.15,81.95 471.00,82.00 Z\\n\"+\n \"M 621.75,530.91\\n\"+\n \"C 622.02,527.46 613.08,514.77 610.99,510.91\\n\"+\n \"610.99,510.91 582.50,458.00 582.50,458.00\\n\"+\n \"582.50,458.00 574.45,440.00 574.45,440.00\\n\"+\n \"574.45,440.00 562.02,415.00 562.02,415.00\\n\"+\n \"562.02,415.00 558.45,406.00 558.45,406.00\\n\"+\n \"558.45,406.00 547.55,384.00 547.55,384.00\\n\"+\n \"547.55,384.00 544.45,376.00 544.45,376.00\\n\"+\n \"544.45,376.00 537.55,362.00 537.55,362.00\\n\"+\n \"537.55,362.00 534.45,354.00 534.45,354.00\\n\"+\n \"534.45,354.00 519.54,322.00 519.54,322.00\\n\"+\n \"519.54,322.00 513.96,306.00 513.96,306.00\\n\"+\n \"513.96,306.00 490.85,254.00 490.85,254.00\\n\"+\n \"487.38,245.70 482.11,237.17 482.00,228.00\\n\"+\n \"482.00,228.00 482.00,224.00 482.00,224.00\\n\"+\n \"482.15,213.62 490.05,209.14 496.26,213.13\\n\"+\n \"504.24,218.27 512.34,230.36 517.45,238.42\\n\"+\n \"517.45,238.42 565.14,314.91 565.14,314.91\\n\"+\n \"565.14,314.91 597.99,367.28 597.99,367.28\\n\"+\n \"597.99,367.28 627.99,417.28 627.99,417.28\\n\"+\n \"627.99,417.28 633.72,427.83 633.72,427.83\\n\"+\n \"633.72,427.83 642.04,442.99 642.04,442.99\\n\"+\n \"642.04,442.99 647.01,451.09 647.01,451.09\\n\"+\n \"647.01,451.09 662.50,482.00 662.50,482.00\\n\"+\n \"665.34,487.69 671.71,498.69 670.27,504.91\\n\"+\n \"668.95,510.57 661.64,511.99 657.23,514.72\\n\"+\n \"657.23,514.72 636.00,526.23 636.00,526.23\\n\"+\n \"636.00,526.23 629.08,529.26 629.08,529.26\\n\"+\n \"624.38,531.87 623.04,535.59 618.00,538.00\\n\"+\n \"619.10,535.68 621.58,532.97 621.75,530.91 Z\\n\"+\n \"M 436.60,334.30\\n\"+\n \"C 436.60,334.30 449.66,322.96 449.66,322.96\\n\"+\n \"449.66,322.96 454.84,315.00 454.84,315.00\\n\"+\n \"458.55,309.64 464.74,303.48 471.00,301.36\\n\"+\n \"483.14,297.26 496.23,303.73 504.96,312.09\\n\"+\n \"507.66,314.67 511.26,318.44 512.30,322.09\\n\"+\n \"513.68,326.94 513.16,338.17 511.62,343.00\\n\"+\n \"511.62,343.00 508.00,352.00 508.00,352.00\\n\"+\n \"497.67,351.97 498.41,349.50 489.97,344.58\\n\"+\n \"489.97,344.58 465.96,330.58 465.96,330.58\\n\"+\n \"463.47,329.14 453.27,323.10 450.91,325.36\\n\"+\n \"449.58,326.64 451.17,328.37 452.10,329.27\\n\"+\n \"454.46,331.55 459.05,334.01 462.00,335.50\\n\"+\n \"462.00,335.50 492.91,352.99 492.91,352.99\\n\"+\n \"496.07,354.74 503.04,358.49 503.71,362.18\\n\"+\n \"504.12,364.49 503.07,371.74 501.40,373.40\\n\"+\n \"500.07,374.73 498.69,374.72 497.00,375.00\\n\"+\n \"497.00,375.00 498.00,384.00 498.00,384.00\\n\"+\n \"489.25,387.43 489.12,391.54 488.00,400.00\\n\"+\n \"488.00,400.00 484.56,402.29 484.56,402.29\\n\"+\n \"484.56,402.29 476.00,415.76 476.00,415.76\\n\"+\n \"474.01,415.99 471.15,416.11 469.28,415.76\\n\"+\n \"469.28,415.76 450.91,405.14 450.91,405.14\\n\"+\n \"450.91,405.14 431.28,393.99 431.28,393.99\\n\"+\n \"428.52,392.33 417.78,384.60 414.91,387.36\\n\"+\n \"413.58,388.64 415.17,390.37 416.10,391.27\\n\"+\n \"418.75,393.84 423.68,396.31 426.99,398.00\\n\"+\n \"426.99,398.00 436.04,403.42 436.04,403.42\\n\"+\n \"436.04,403.42 459.09,416.86 459.09,416.86\\n\"+\n \"464.58,420.20 469.84,421.09 466.87,429.00\\n\"+\n \"464.69,434.81 460.98,439.65 458.04,445.01\\n\"+\n \"458.04,445.01 434.58,486.04 434.58,486.04\\n\"+\n \"434.58,486.04 412.58,524.04 412.58,524.04\\n\"+\n \"412.58,524.04 406.75,535.74 406.75,535.74\\n\"+\n \"406.75,535.74 403.11,540.22 403.11,540.22\\n\"+\n \"403.11,540.22 399.78,546.77 399.78,546.77\\n\"+\n \"399.78,546.77 390.27,562.01 390.27,562.01\\n\"+\n \"390.27,562.01 377.78,584.77 377.78,584.77\\n\"+\n \"377.78,584.77 355.78,622.77 355.78,622.77\\n\"+\n \"352.15,628.93 347.72,634.90 346.00,642.00\\n\"+\n \"346.00,642.00 342.00,642.00 342.00,642.00\\n\"+\n \"327.89,641.76 309.68,627.91 297.00,621.34\\n\"+\n \"292.74,619.14 282.33,612.37 282.23,607.00\\n\"+\n \"282.16,602.98 286.67,598.03 288.56,594.40\\n\"+\n \"288.56,594.40 293.73,585.99 293.73,585.99\\n\"+\n \"293.73,585.99 309.28,558.77 309.28,558.77\\n\"+\n \"309.28,558.77 322.22,535.23 322.22,535.23\\n\"+\n \"322.22,535.23 331.85,522.00 331.85,522.00\\n\"+\n \"331.85,522.00 360.15,472.00 360.15,472.00\\n\"+\n \"360.15,472.00 378.42,441.00 378.42,441.00\\n\"+\n \"378.42,441.00 399.85,404.00 399.85,404.00\\n\"+\n \"399.85,404.00 404.19,396.00 404.19,396.00\\n\"+\n \"404.19,396.00 412.07,386.00 412.07,386.00\\n\"+\n \"417.87,375.86 412.46,368.80 422.00,368.00\\n\"+\n \"419.91,356.08 424.78,360.59 428.99,351.99\\n\"+\n \"432.09,345.64 427.65,342.70 436.00,342.00\\n\"+\n \"436.00,340.05 435.83,335.96 436.60,334.30 Z\\n\"+\n \"M 497.00,467.00\\n\"+\n \"C 497.00,467.00 566.00,467.00 566.00,467.00\\n\"+\n \"566.00,467.00 577.46,468.74 577.46,468.74\\n\"+\n \"577.46,468.74 589.72,489.83 589.72,489.83\\n\"+\n \"589.72,489.83 600.58,509.96 600.58,509.96\\n\"+\n \"600.58,509.96 609.14,524.91 609.14,524.91\\n\"+\n \"609.14,524.91 615.84,535.28 615.84,535.28\\n\"+\n \"615.84,535.28 618.75,542.68 618.75,542.68\\n\"+\n \"618.75,542.68 633.00,569.00 633.00,569.00\\n\"+\n \"627.03,570.70 618.38,570.00 612.00,570.00\\n\"+\n \"612.00,570.00 575.00,570.00 575.00,570.00\\n\"+\n \"575.00,570.00 454.00,570.00 454.00,570.00\\n\"+\n \"454.00,570.00 413.00,570.00 413.00,570.00\\n\"+\n \"407.25,570.00 401.16,571.61 398.00,566.00\\n\"+\n \"398.00,566.00 408.22,549.23 408.22,549.23\\n\"+\n \"408.22,549.23 411.73,543.99 411.73,543.99\\n\"+\n \"411.73,543.99 415.53,536.16 415.53,536.16\\n\"+\n \"415.53,536.16 423.49,522.17 423.49,522.17\\n\"+\n \"423.49,522.17 445.49,484.17 445.49,484.17\\n\"+\n \"445.49,484.17 454.00,468.00 454.00,468.00\\n\"+\n \"454.00,468.00 497.00,467.00 497.00,467.00 Z\\n\"+\n \"M 702.17,542.80\\n\"+\n \"C 702.17,542.80 690.97,518.40 690.97,518.40\\n\"+\n \"690.97,518.40 685.92,508.73 685.92,508.73\\n\"+\n \"685.92,508.73 681.54,501.83 681.54,501.83\\n\"+\n \"681.54,501.83 678.58,494.04 678.58,494.04\\n\"+\n \"678.58,494.04 669.98,476.71 669.98,476.71\\n\"+\n \"668.90,474.57 667.26,470.96 669.00,468.74\\n\"+\n \"670.65,466.63 675.55,467.00 678.00,467.00\\n\"+\n \"678.00,467.00 771.00,467.00 771.00,467.00\\n\"+\n \"781.99,467.02 780.02,468.61 780.00,479.00\\n\"+\n \"780.00,479.00 780.00,540.00 780.00,540.00\\n\"+\n \"780.00,547.62 780.84,564.52 779.00,571.00\\n\"+\n \"779.00,571.00 755.00,570.00 755.00,570.00\\n\"+\n \"755.00,570.00 714.00,570.00 714.00,570.00\\n\"+\n \"712.50,563.82 705.24,548.95 702.17,542.80 Z\\n\"+\n \"M 244.00,544.00\\n\"+\n \"C 244.00,544.00 244.00,491.00 244.00,491.00\\n\"+\n \"244.00,491.00 244.00,475.00 244.00,475.00\\n\"+\n \"244.00,475.00 245.60,469.02 245.60,469.02\\n\"+\n \"245.60,469.02 253.00,468.00 253.00,468.00\\n\"+\n \"253.00,468.00 316.00,468.00 316.00,468.00\\n\"+\n \"316.00,468.00 348.00,469.00 348.00,469.00\\n\"+\n \"348.00,469.00 332.15,498.00 332.15,498.00\\n\"+\n \"332.15,498.00 320.46,519.00 320.46,519.00\\n\"+\n \"320.46,519.00 313.40,533.58 313.40,533.58\\n\"+\n \"313.40,533.58 305.83,546.80 305.83,546.80\\n\"+\n \"305.83,546.80 295.75,563.57 295.75,563.57\\n\"+\n \"295.75,563.57 291.45,569.18 291.45,569.18\\n\"+\n \"291.45,569.18 284.00,570.00 284.00,570.00\\n\"+\n \"284.00,570.00 245.00,571.00 245.00,571.00\\n\"+\n \"245.00,571.00 244.00,544.00 244.00,544.00 Z\\n\"+\n \"M 661.20,520.16\\n\"+\n \"C 665.01,518.10 669.48,513.82 674.00,513.69\\n\"+\n \"681.26,513.49 682.77,525.02 684.72,529.96\\n\"+\n \"685.98,533.16 687.84,534.10 689.23,536.51\\n\"+\n \"689.23,536.51 696.79,554.00 696.79,554.00\\n\"+\n \"702.32,565.71 706.00,565.74 706.00,580.00\\n\"+\n \"702.00,581.07 691.45,588.05 687.27,590.48\\n\"+\n \"677.93,595.93 672.90,598.00 662.00,598.00\\n\"+\n \"660.73,593.28 659.36,593.20 657.39,589.19\\n\"+\n \"657.39,589.19 654.74,583.08 654.74,583.08\\n\"+\n \"654.74,583.08 650.68,577.53 650.68,577.53\\n\"+\n \"650.68,577.53 640.75,561.49 640.75,561.49\\n\"+\n \"638.20,556.85 631.85,545.01 628.00,542.00\\n\"+\n \"628.00,542.00 628.00,536.00 628.00,536.00\\n\"+\n \"638.41,533.51 651.47,525.40 661.20,520.16 Z\\n\"+\n \"M 692.01,597.78\\n\"+\n \"C 692.01,597.78 700.77,593.28 700.77,593.28\\n\"+\n \"702.28,592.35 703.63,591.04 705.32,590.24\\n\"+\n \"707.11,589.89 710.07,590.01 712.00,590.24\\n\"+\n \"713.02,593.79 722.45,606.09 725.33,610.47\\n\"+\n \"725.33,610.47 749.32,646.47 749.32,646.47\\n\"+\n \"749.32,646.47 752.72,652.77 752.72,652.77\\n\"+\n \"752.72,652.77 761.84,667.20 761.84,667.20\\n\"+\n \"767.44,677.57 774.05,684.01 772.83,697.00\\n\"+\n \"772.00,705.79 771.20,707.97 765.00,714.14\\n\"+\n \"757.05,722.05 757.74,721.35 747.00,722.09\\n\"+\n \"743.86,722.30 742.31,722.92 739.00,722.68\\n\"+\n \"736.09,722.46 727.83,722.05 725.76,720.75\\n\"+\n \"718.69,716.32 714.23,704.93 710.57,697.60\\n\"+\n \"710.57,697.60 683.66,634.91 683.66,634.91\\n\"+\n \"680.50,626.27 674.27,614.84 674.00,606.00\\n\"+\n \"682.86,604.87 685.11,601.59 692.01,597.78 Z\\n\"+\n \"M 256.13,712.00\\n\"+\n \"C 256.13,712.00 264.84,685.00 264.84,685.00\\n\"+\n \"264.84,685.00 273.95,642.00 273.95,642.00\\n\"+\n \"273.95,642.00 277.26,627.00 277.26,627.00\\n\"+\n \"277.26,627.00 278.99,620.65 278.99,620.65\\n\"+\n \"278.99,620.65 284.00,618.00 284.00,618.00\\n\"+\n \"291.29,628.23 310.06,636.13 321.09,642.80\\n\"+\n \"327.01,646.39 330.75,645.36 334.00,652.00\\n\"+\n \"334.00,652.00 320.96,664.24 320.96,664.24\\n\"+\n \"320.96,664.24 315.04,668.38 315.04,668.38\\n\"+\n \"315.04,668.38 281.67,701.67 281.67,701.67\\n\"+\n \"281.67,701.67 263.48,719.19 263.48,719.19\\n\"+\n \"263.48,719.19 256.13,720.00 256.13,720.00\\n\"+\n \"256.13,720.00 256.13,712.00 256.13,712.00 Z\";\n}",
"public OMSVGSVGElement getDocumentRoot() {\n \t\treturn svg;\n \t}",
"public void write(String path) throws Exception {\n\t\tint canvasSize = size + 10; // size + 5 px stroke x2\n\t\t\n\t\tSVGGraphics2D generator = getGenerator();\n\t\tDimension svgCanvasSize = new Dimension(canvasSize, canvasSize);\n\t\tgenerator.setSVGCanvasSize(svgCanvasSize);\n\t\t\n\t\tdrawChromosome(generator);\n\t\tdrawArcs(generator);\n\t\tdrawCenter(generator);\n\t\t\n\t\twriteToFile(generator, path);\n\t\t\n\t\tlink = File.separator + \"prism\" + File.separator + path.split(\"prism\" + File.separator)[1]; \n\t}",
"@Override\n public void writeSVG(Appendable ap, int tps, boolean looping,\n LinkedHashMap<String, IVisitableActor> actorMap) {\n IView svg;\n if (looping) {\n svg = new LoopingSvgView(ap, tps);\n }\n else {\n svg = new SvgView(ap, tps);\n }\n svg.setActors(actorMap);\n try {\n svg.outputActors();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"protected abstract void generate();",
"protected abstract GraphicsWriter newGraphicsWriter();",
"public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n stylesheetEClass = createEClass(STYLESHEET);\n createEAttribute(stylesheetEClass, STYLESHEET__CHAR_SET);\n createEReference(stylesheetEClass, STYLESHEET__IMPORTS);\n createEReference(stylesheetEClass, STYLESHEET__STATEMENTS);\n\n cssTopLevelStatementEClass = createEClass(CSS_TOP_LEVEL_STATEMENT);\n\n cssOtherTopLevelDeclarationEClass = createEClass(CSS_OTHER_TOP_LEVEL_DECLARATION);\n\n importDeclarationEClass = createEClass(IMPORT_DECLARATION);\n createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__IMPORT_URI);\n createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__URL);\n createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__MEDIA);\n\n mediaDeclarationEClass = createEClass(MEDIA_DECLARATION);\n createEReference(mediaDeclarationEClass, MEDIA_DECLARATION__MEDIA_QUERIES);\n createEReference(mediaDeclarationEClass, MEDIA_DECLARATION__MEDIA);\n createEReference(mediaDeclarationEClass, MEDIA_DECLARATION__MEMBERS);\n\n mediaDeclarationMembersEClass = createEClass(MEDIA_DECLARATION_MEMBERS);\n\n mediaQueryEClass = createEClass(MEDIA_QUERY);\n createEAttribute(mediaQueryEClass, MEDIA_QUERY__ONLY);\n createEAttribute(mediaQueryEClass, MEDIA_QUERY__NOT);\n createEAttribute(mediaQueryEClass, MEDIA_QUERY__MEDIA_TYPE);\n createEReference(mediaQueryEClass, MEDIA_QUERY__EXPRESSIONS);\n\n mediaQueryExpressionEClass = createEClass(MEDIA_QUERY_EXPRESSION);\n createEAttribute(mediaQueryExpressionEClass, MEDIA_QUERY_EXPRESSION__FEATURE);\n createEReference(mediaQueryExpressionEClass, MEDIA_QUERY_EXPRESSION__EXPRESSION);\n\n pageDeclarationEClass = createEClass(PAGE_DECLARATION);\n createEAttribute(pageDeclarationEClass, PAGE_DECLARATION__PSEUDO_PAGE);\n createEReference(pageDeclarationEClass, PAGE_DECLARATION__BODY);\n\n namespaceDeclarationEClass = createEClass(NAMESPACE_DECLARATION);\n createEAttribute(namespaceDeclarationEClass, NAMESPACE_DECLARATION__NAME);\n createEAttribute(namespaceDeclarationEClass, NAMESPACE_DECLARATION__URL);\n\n fontFaceDeclarationEClass = createEClass(FONT_FACE_DECLARATION);\n createEReference(fontFaceDeclarationEClass, FONT_FACE_DECLARATION__BODY);\n\n ruleSetEClass = createEClass(RULE_SET);\n createEReference(ruleSetEClass, RULE_SET__SELECTORS);\n createEReference(ruleSetEClass, RULE_SET__BODY);\n\n ruleSetBodyEClass = createEClass(RULE_SET_BODY);\n createEReference(ruleSetBodyEClass, RULE_SET_BODY__DECLARATIONS);\n\n propertyDeclarationEClass = createEClass(PROPERTY_DECLARATION);\n createEReference(propertyDeclarationEClass, PROPERTY_DECLARATION__VALUES_LISTS);\n\n knownPropertyDeclarationEClass = createEClass(KNOWN_PROPERTY_DECLARATION);\n createEAttribute(knownPropertyDeclarationEClass, KNOWN_PROPERTY_DECLARATION__NAME);\n\n unrecognizedPropertyDeclarationEClass = createEClass(UNRECOGNIZED_PROPERTY_DECLARATION);\n createEAttribute(unrecognizedPropertyDeclarationEClass, UNRECOGNIZED_PROPERTY_DECLARATION__NAME);\n\n propertyValuesListsEClass = createEClass(PROPERTY_VALUES_LISTS);\n createEReference(propertyValuesListsEClass, PROPERTY_VALUES_LISTS__LISTS);\n\n propertyValuesListEClass = createEClass(PROPERTY_VALUES_LIST);\n createEReference(propertyValuesListEClass, PROPERTY_VALUES_LIST__VALUES);\n\n propertyValueEClass = createEClass(PROPERTY_VALUE);\n createEReference(propertyValueEClass, PROPERTY_VALUE__VALUE);\n createEAttribute(propertyValueEClass, PROPERTY_VALUE__IMPORTANT);\n\n selectorEClass = createEClass(SELECTOR);\n\n simpleSelectorEClass = createEClass(SIMPLE_SELECTOR);\n\n typeSelectorEClass = createEClass(TYPE_SELECTOR);\n createEReference(typeSelectorEClass, TYPE_SELECTOR__NAMESPACE_PREFIX);\n createEAttribute(typeSelectorEClass, TYPE_SELECTOR__TYPE);\n\n namespacePrefixEClass = createEClass(NAMESPACE_PREFIX);\n createEReference(namespacePrefixEClass, NAMESPACE_PREFIX__NAMESPACE);\n\n universalSelectorEClass = createEClass(UNIVERSAL_SELECTOR);\n createEReference(universalSelectorEClass, UNIVERSAL_SELECTOR__NAMESPACE_PREFIX);\n\n attributeSelectorEClass = createEClass(ATTRIBUTE_SELECTOR);\n createEReference(attributeSelectorEClass, ATTRIBUTE_SELECTOR__ATTRIBUTE);\n createEAttribute(attributeSelectorEClass, ATTRIBUTE_SELECTOR__MATCHER);\n createEReference(attributeSelectorEClass, ATTRIBUTE_SELECTOR__VALUE);\n\n attributeEClass = createEClass(ATTRIBUTE);\n createEReference(attributeEClass, ATTRIBUTE__NAMESPACE_PREFIX);\n createEAttribute(attributeEClass, ATTRIBUTE__NAME);\n\n attributeValueLiteralEClass = createEClass(ATTRIBUTE_VALUE_LITERAL);\n\n idSelectorEClass = createEClass(ID_SELECTOR);\n createEAttribute(idSelectorEClass, ID_SELECTOR__NAME);\n\n classSelectorEClass = createEClass(CLASS_SELECTOR);\n createEAttribute(classSelectorEClass, CLASS_SELECTOR__NAME);\n\n pseudoSelectorEClass = createEClass(PSEUDO_SELECTOR);\n\n noArgsPseudoClassSelectorEClass = createEClass(NO_ARGS_PSEUDO_CLASS_SELECTOR);\n createEAttribute(noArgsPseudoClassSelectorEClass, NO_ARGS_PSEUDO_CLASS_SELECTOR__PSEUDO);\n\n pseudoElementSelectorEClass = createEClass(PSEUDO_ELEMENT_SELECTOR);\n createEAttribute(pseudoElementSelectorEClass, PSEUDO_ELEMENT_SELECTOR__DOUBLE_SEMI_COLON);\n createEAttribute(pseudoElementSelectorEClass, PSEUDO_ELEMENT_SELECTOR__PSEUDO);\n\n languagePseudoClassSelectorEClass = createEClass(LANGUAGE_PSEUDO_CLASS_SELECTOR);\n createEAttribute(languagePseudoClassSelectorEClass, LANGUAGE_PSEUDO_CLASS_SELECTOR__LANGUGAGE_ID);\n\n functionalPseudoClassSelectorEClass = createEClass(FUNCTIONAL_PSEUDO_CLASS_SELECTOR);\n createEAttribute(functionalPseudoClassSelectorEClass, FUNCTIONAL_PSEUDO_CLASS_SELECTOR__PSEUDO);\n createEReference(functionalPseudoClassSelectorEClass, FUNCTIONAL_PSEUDO_CLASS_SELECTOR__ARGUMENT);\n\n typeArgumentEClass = createEClass(TYPE_ARGUMENT);\n\n linearArgumentEClass = createEClass(LINEAR_ARGUMENT);\n createEReference(linearArgumentEClass, LINEAR_ARGUMENT__COEFFICIENT);\n createEAttribute(linearArgumentEClass, LINEAR_ARGUMENT__CONSTANT_SIGN);\n createEAttribute(linearArgumentEClass, LINEAR_ARGUMENT__CONSTANT);\n\n coefficientEClass = createEClass(COEFFICIENT);\n createEAttribute(coefficientEClass, COEFFICIENT__IDENT);\n createEAttribute(coefficientEClass, COEFFICIENT__INT);\n\n constantArgumentEClass = createEClass(CONSTANT_ARGUMENT);\n createEAttribute(constantArgumentEClass, CONSTANT_ARGUMENT__SIGN);\n createEAttribute(constantArgumentEClass, CONSTANT_ARGUMENT__INT);\n\n parityArgumentEClass = createEClass(PARITY_ARGUMENT);\n createEAttribute(parityArgumentEClass, PARITY_ARGUMENT__PARITY);\n\n negationSelectorEClass = createEClass(NEGATION_SELECTOR);\n createEReference(negationSelectorEClass, NEGATION_SELECTOR__SIMPLE_SELECTOR);\n\n valueLiteralEClass = createEClass(VALUE_LITERAL);\n\n numberLiteralEClass = createEClass(NUMBER_LITERAL);\n\n sizeLiteralEClass = createEClass(SIZE_LITERAL);\n\n stringLiteralEClass = createEClass(STRING_LITERAL);\n createEAttribute(stringLiteralEClass, STRING_LITERAL__VALUE);\n\n colorLiteralEClass = createEClass(COLOR_LITERAL);\n\n componentColorLiteralEClass = createEClass(COMPONENT_COLOR_LITERAL);\n\n colorComponentLiteralEClass = createEClass(COLOR_COMPONENT_LITERAL);\n createEReference(colorComponentLiteralEClass, COLOR_COMPONENT_LITERAL__NUMBER);\n createEAttribute(colorComponentLiteralEClass, COLOR_COMPONENT_LITERAL__PERCENTAGE);\n\n urlLiteralEClass = createEClass(URL_LITERAL);\n createEAttribute(urlLiteralEClass, URL_LITERAL__VALUE);\n\n bareWordLiteralEClass = createEClass(BARE_WORD_LITERAL);\n createEAttribute(bareWordLiteralEClass, BARE_WORD_LITERAL__BARE_WORD);\n\n functionCallLiteralEClass = createEClass(FUNCTION_CALL_LITERAL);\n createEAttribute(functionCallLiteralEClass, FUNCTION_CALL_LITERAL__FUNCTION);\n createEReference(functionCallLiteralEClass, FUNCTION_CALL_LITERAL__ARGUMENTS);\n\n descendantCombinatorEClass = createEClass(DESCENDANT_COMBINATOR);\n createEReference(descendantCombinatorEClass, DESCENDANT_COMBINATOR__LEFT);\n createEAttribute(descendantCombinatorEClass, DESCENDANT_COMBINATOR__WS_I);\n createEReference(descendantCombinatorEClass, DESCENDANT_COMBINATOR__RIGHT);\n\n childCombinatorEClass = createEClass(CHILD_COMBINATOR);\n createEReference(childCombinatorEClass, CHILD_COMBINATOR__LEFT);\n createEAttribute(childCombinatorEClass, CHILD_COMBINATOR__WS_L);\n createEAttribute(childCombinatorEClass, CHILD_COMBINATOR__WS_R);\n createEReference(childCombinatorEClass, CHILD_COMBINATOR__RIGHT);\n\n adjacentSiblingCombinatorEClass = createEClass(ADJACENT_SIBLING_COMBINATOR);\n createEReference(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__LEFT);\n createEAttribute(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__WS_L);\n createEAttribute(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__WS_R);\n createEReference(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__RIGHT);\n\n generalSiblingCombinatorEClass = createEClass(GENERAL_SIBLING_COMBINATOR);\n createEReference(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__LEFT);\n createEAttribute(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__WS_L);\n createEAttribute(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__WS_R);\n createEReference(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__RIGHT);\n\n simpleSelectorSequenceEClass = createEClass(SIMPLE_SELECTOR_SEQUENCE);\n createEReference(simpleSelectorSequenceEClass, SIMPLE_SELECTOR_SEQUENCE__HEAD);\n createEReference(simpleSelectorSequenceEClass, SIMPLE_SELECTOR_SEQUENCE__SIMPLE_SELECTORS);\n\n universalNamespacePrefixEClass = createEClass(UNIVERSAL_NAMESPACE_PREFIX);\n\n withoutNamespacePrefixEClass = createEClass(WITHOUT_NAMESPACE_PREFIX);\n\n stringAttributeValueLiteralEClass = createEClass(STRING_ATTRIBUTE_VALUE_LITERAL);\n createEAttribute(stringAttributeValueLiteralEClass, STRING_ATTRIBUTE_VALUE_LITERAL__VALUE);\n\n integerAttributeValueLiteralEClass = createEClass(INTEGER_ATTRIBUTE_VALUE_LITERAL);\n createEAttribute(integerAttributeValueLiteralEClass, INTEGER_ATTRIBUTE_VALUE_LITERAL__VALUE);\n\n decimalAttributeValueLiteralEClass = createEClass(DECIMAL_ATTRIBUTE_VALUE_LITERAL);\n createEAttribute(decimalAttributeValueLiteralEClass, DECIMAL_ATTRIBUTE_VALUE_LITERAL__VALUE);\n\n integerLiteralEClass = createEClass(INTEGER_LITERAL);\n createEAttribute(integerLiteralEClass, INTEGER_LITERAL__INT);\n\n decimalLiteralEClass = createEClass(DECIMAL_LITERAL);\n createEAttribute(decimalLiteralEClass, DECIMAL_LITERAL__DECIMAL);\n\n quantifiedSizeLiteralEClass = createEClass(QUANTIFIED_SIZE_LITERAL);\n createEReference(quantifiedSizeLiteralEClass, QUANTIFIED_SIZE_LITERAL__NUMBER);\n createEAttribute(quantifiedSizeLiteralEClass, QUANTIFIED_SIZE_LITERAL__DIMENSION);\n\n qualifiedSizeLiteralEClass = createEClass(QUALIFIED_SIZE_LITERAL);\n createEAttribute(qualifiedSizeLiteralEClass, QUALIFIED_SIZE_LITERAL__BAREWORD);\n\n fontHeightLiteralEClass = createEClass(FONT_HEIGHT_LITERAL);\n createEReference(fontHeightLiteralEClass, FONT_HEIGHT_LITERAL__FONT_HEIGHT);\n createEReference(fontHeightLiteralEClass, FONT_HEIGHT_LITERAL__LINE_HEIGHT);\n createEAttribute(fontHeightLiteralEClass, FONT_HEIGHT_LITERAL__LINE_HEIGHT_DIMENSION);\n\n rgbColorEClass = createEClass(RGB_COLOR);\n createEAttribute(rgbColorEClass, RGB_COLOR__RGB);\n\n namedColorEClass = createEClass(NAMED_COLOR);\n createEAttribute(namedColorEClass, NAMED_COLOR__COLOR);\n\n componentRGBColorEClass = createEClass(COMPONENT_RGB_COLOR);\n createEReference(componentRGBColorEClass, COMPONENT_RGB_COLOR__RED);\n createEReference(componentRGBColorEClass, COMPONENT_RGB_COLOR__GREEN);\n createEReference(componentRGBColorEClass, COMPONENT_RGB_COLOR__BLUE);\n\n componentRGBAlphaColorEClass = createEClass(COMPONENT_RGB_ALPHA_COLOR);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__RED);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__GREEN);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__BLUE);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__OPACITY);\n\n componentHSLColorEClass = createEClass(COMPONENT_HSL_COLOR);\n createEReference(componentHSLColorEClass, COMPONENT_HSL_COLOR__HUE);\n createEReference(componentHSLColorEClass, COMPONENT_HSL_COLOR__SATURATION);\n createEReference(componentHSLColorEClass, COMPONENT_HSL_COLOR__LIGHTNESS);\n\n componentHSLAlphaColorEClass = createEClass(COMPONENT_HSL_ALPHA_COLOR);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__HUE);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__SATURATION);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__LIGHTNESS);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__OPACITY);\n\n alphaLiteralEClass = createEClass(ALPHA_LITERAL);\n createEReference(alphaLiteralEClass, ALPHA_LITERAL__OPACITY);\n\n // Create enums\n knownPropertiesEEnum = createEEnum(KNOWN_PROPERTIES);\n attributeSelectorMatchersEEnum = createEEnum(ATTRIBUTE_SELECTOR_MATCHERS);\n noArgsPseudosEEnum = createEEnum(NO_ARGS_PSEUDOS);\n pseudoElementsEEnum = createEEnum(PSEUDO_ELEMENTS);\n functionalPseudoClassesEEnum = createEEnum(FUNCTIONAL_PSEUDO_CLASSES);\n paritiesEEnum = createEEnum(PARITIES);\n dimensionsEEnum = createEEnum(DIMENSIONS);\n colorNamesEEnum = createEEnum(COLOR_NAMES);\n }",
"public void setSVG(SVG mysvg)\r\n {\r\n if (mysvg == null)\r\n throw new IllegalArgumentException(\"Null value passed to setSVG()\");\r\n\r\n setSoftwareLayerType();\r\n setImageDrawable(new PictureDrawable(mysvg.renderToPicture()));\r\n mSvg = mysvg;\r\n mRenderer = getNewRenderer(mSvg);\r\n }",
"protected Bitmap getSVGImageForName(String name) throws IOException {\n String path = SVG_BASE_PATH + name + \".svg\";\n\n // create a shape document (load the SVG)\n PXShapeDocument document = PXSVGLoader.loadFromStream(getContext().getAssets().open(path));\n\n // grab root shape\n PXShapeGroup root = (PXShapeGroup) document.getShape();\n RectF bounds = root.getViewport();\n\n if (bounds == null || bounds.isEmpty()) {\n // use 100x100 if we didn't find a view port in the SVG file\n bounds = new RectF(0, 0, 100, 100);\n }\n\n // set size\n document.setBounds(bounds);\n // render to UIImage\n Drawable drawable = root.renderToImage(bounds, false);\n return ((BitmapDrawable) drawable).getBitmap();\n }",
"public void generate() {\n\t}",
"private void createD3Example() {\n\n\t\tSystem.out.println(\"createD3Example\");\n\n\t\tboolean showPoints = true;\n\n\t\tint widthSVG = 1200;\n\t\tint heightSVG = 800;\n\n\t\td3 = browser.getD3();\n//\t\tSystem.out.println(\"D3 version \" + d3.version());\n\t\twebEngine = d3.getWebEngine();\n\n\t\t// apply CSS\n\t\tloadCssForThisClass();\n\n\t\tsvg = d3.select(\"svg\")\n\t\t\t\t.attr(\"width\", widthSVG)\n\t\t\t\t.attr(\"height\", heightSVG);\n\n\t\ttry {\n\n\t\t\tinjectStyleInSVG();\n\n\t\t} catch (TransformerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\n\t\t// create initial d3 content\n\n\t\t// data that you want to plot, I\"ve used separate arrays for x and y values\n\t\tdouble[] xData = {5, 10, 25, 32, 40, 40, 15, 7};\n\t\tdouble[] yData = {3, 17, 4, 10, 6, -20, -20.0, 0};\n\n\t\t// size and margins for the chart\n\n\t\tdouble totalWidth = 550;\n\t\tdouble totalHeight = 550;\n\n\t\tdouble marginLeft = 60;\n\t\tdouble marginRight = 15;\n\n\t\tdouble marginTop = 20;\n\t\tdouble marginBottom = 60;\n\n\t\tdouble width = totalWidth - marginLeft - marginRight;\n\t\tdouble height = totalHeight - marginTop - marginBottom;\n\n\t\t// x and y scales, I've used linear here but there are other options\n\t\t// the scales translate data values to pixel values for you\n\t\tdouble xMin = 0;\n\t\tdouble xMax = 50;\n\t\tLinearScale x = d3.scale().linear() //\n\t\t .domain(new double[]{xMin, xMax}) // the range of the values to plot\n\t\t .range(new double[]{0, width}); // the pixel range of the x-axis\n\n\t\tdouble yMin = -25;\n\t\tdouble yMax = 25;\n\t\tLinearScale y = d3.scale().linear() //\n\t\t .domain(new double[]{yMin, yMax}) //\n\t\t .range(new double[]{height, 0});\n\n\t\t// the chart object, includes all margins\n\t\tSelection chart = d3.select(\"svg\") //\n\t\t\t.attr(\"width\", width + marginRight + marginLeft) //\n\t\t\t.attr(\"height\", height + marginTop + marginBottom) //\n\t\t\t.attr(\"class\", \"chart\");\n\n\t\t// the main object where the chart and axis will be drawn\n\t\tSelection main = chart.append(\"g\") //\n\t\t\t.attr(\"transform\", \"translate(\" + marginLeft + \",\" + marginTop + \")\") //\n\t\t\t.attr(\"width\", width) //\n\t\t\t.attr(\"height\", height) //\n\t\t\t.attr(\"class\", \"main\");\n\n\t\t// draw the x axis\n\t\tAxis xAxis = d3.svg().axis().scale(x).orient(Orientation.BOTTOM);\n\n\t\t//xAxis.innerTickSize(10);\n\n\n\t\tmain.append(\"g\") //\n\t\t\t.attr(\"transform\", \"translate(0,\" + height + \")\") //\n\t\t\t.attr(\"class\", \"main axis date\").call(xAxis);\n\n\t\t// draw the y axis\n\t\tAxis yAxis = d3.svg().axis() //\n\t\t\t.scale(y) //\n\t\t\t.orient(Orientation.LEFT);\n\t\t\n\t\tmain.append(\"g\") //\n\t\t\t.attr(\"transform\", \"translate(0,0)\") //\n\t\t\t.attr(\"class\", \"main axis date\") //\n\t\t\t.call(yAxis);\n\n\t\t// draw the graph object\n\t\tSelection g = main.append(\"svg:g\");\n\n\t\tg.selectAll(\"scatter-dots\")\n\t\t .data(yData) // using the values in the ydata array\n\t\t .enter().append(\"svg:circle\") // create a new circle for each value\n\t\t .attr(\"cy\", new YAxisDatumFunction(webEngine, y, yData) ) // translate y value to a pixel\n\t\t .attr(\"cx\", new XAxisDatumFunction(webEngine, x, xData)) // translate x value\n\t\t .attr(\"r\", 5) // radius of circle\n\t\t .style(\"opacity\", 1.0); // opacity of circle\n\n\n\t\t// Line, the path generator\n\t\tLine line;\n\n\t\tInterpolationMode mode = InterpolationMode.LINEAR;\n\n\t\tline = d3.svg().line()\n\t\t\t\t.x(new XAxisDatumFunction(webEngine, x, xData))\n\t\t\t\t.y(new YAxisDatumFunction(webEngine, y, yData));\n\n\t\tSelection g2 = g.append(\"svg:g\")\n\t\t\t\t.classed(\"Pippo-line-group\", true);\n\n\t\tString cssClassName = \"Agodemar-Test-Line\";\n\t\tSelection pathLine = g2.append(\"path\").classed(cssClassName, true);\n\t\tpathLine\n\t\t\t.attr(\"fill\",\"none\")\n\t\t\t.attr(\"stroke\",\"red\")\n\t\t\t.attr(\"stroke-width\",\"5\")\n\t\t\t.attr(\"stroke-linecap\",\"square\") // \"butt\", \"round\", \"square\"\n\t\t\t.attr(\"stroke-dasharray\",\"15,10\");\n\n\t\tfinal Stack<Coords> points = new Stack<>();\n\n//\t\tdouble [] x = {50.0, 120.0, 400.0, 700};\n//\t\tdouble [] y = {100.0, 30.0, 20.0, 200};\n\n\t\tIntStream.range(0, xData.length)\n\t\t\t.forEach(i ->\n\t\t\t\t\tpoints.push(new Coords(webEngine, xData[i], yData[i]))\n\t\t\t\t\t);\n\n//\t\tSystem.out.println(\"points:\");\n//\t\tpoints.stream()\n//\t\t\t.forEach(p -> System.out.println(p.x()+\", \"+p.y()));\n\n\t\tmode = InterpolationMode.MONOTONE;\n\t\tline = line.interpolate(mode);\n\t\tSystem.out.println(\"Interpolation mode: \" + line.interpolate());\n\n\t\tdouble tension = 0.1;\n\t\tline = line.tension(tension);\n//\t\tSystem.out.println(\"tension: \" + line.tension());\n\n\t\tList<Coords> coordsList = new ArrayList<>(points);\n\n//\t\tSystem.out.println(\"coordsList:\");\n//\t\tcoordsList.stream()\n//\t\t\t.forEach(c -> System.out.println(c.x()+\", \"+c.y()));\n\n\t\tString coordinates = line.generate(coordsList);\n\n//\t\tSystem.out.println(\"coordinates: \" + coordinates);\n\n\t\tpathLine.attr(\"d\", coordinates);\n\n\t\tLabelFactory labelFactory = new LabelFactory();\n\t\t\n//\t\tSelection myText = labelFactory.createInParentSelection(svg);\n//\t\tmyText.text(\"Agodemar!!!\");\n\t\t\n\t\tSelection text = svg.append(\"text\") //\n\t\t\t\t.attr(\"x\", 20) // String.format(\"%d\", widthSVG/2))\n\t\t\t\t.attr(\"y\", 100) // String.format(\"%d\", heightSVG/2))\n\t\t\t\t.text(\"Hello World\");\t\t\n\t\t\n\t\tsvg.append(\"g\")\n\t\t\t.attr(\"class\", \"main\")\n\t\t\t.append(\"text\")\n\t\t\t.attr(\"x\", 20).attr(\"dx\", \"12em\")\n\t\t\t.attr(\"y\", 56).attr(\"dy\", \"2em\")\n\t\t\t.attr(\"font\",\"20px sans-serif\")\n\t\t\t.text(\"Agodemar!!!\");\n\n//\t\tsvg.append(\"g\")\n//\t\t\t.attr(\"class\", \"y\" + \" \" + \"axis\")\n//\t\t\t.call(yAxis).append(\"text\")\n//\t\t\t.attr(\"transform\", \"rotate(-90)\")\n//\t\t\t.attr(\"y\", 6).attr(\"dy\", \".71em\")\n//\t\t\t.style(\"text-anchor\", \"end\")\n//\t\t\t.text(\"Frequency\");\n\t\t\n\t\t\n//\t\t// make a paragraph <p> in the html\n//\t\td3.select(\"body\").append(\"p\").text(\"Agodemar :: Hi there!\");\n\n\t}",
"public void generate() {\n\t\tthis.initializePathBindingClass();\n\t\t// managed at abstract level ; name provided at binding generation time\n\t\t// this.addGetName();\n\t\t// this.addGetType();\n\n\t\t// add all properties methods\n\t\tthis.addProperties();\n\t\t// add getter that provides property list\n\t\tthis.addGetChildBindings();\n\n\t\t// initialize class declaration (*Binding)\n\t\tthis.initializeRootBindingClass();\n\t\t// add constructors\n\t\tthis.addConstructors();\n\t\t// add getWithRoot method\n\t\tthis.addGetWithRoot();\n\t\t// add getSafelyWithRoot method\n\t\tthis.addGetSafelyWithRoot();\n\n\t\tthis.addGeneratedTimestamp();\n\t\tthis.addSerialVersionUID();\n\t\tthis.saveCode(this.pathBindingClass);\n\t\tthis.saveCode(this.rootBindingClass);\n\t}",
"public void create()\n/* 342: */ {\n/* 343:422 */ setupPlainVariables_xjal();\n/* 344: */ \n/* 345:424 */ this.presentation = new ShapeTopLevelPresentationGroup(this, true, 0.0D, 0.0D, 0.0D, 0.0D, new Object[0]);\n/* 346:425 */ this.icon = new ShapeGroup(this, true, 0.0D, 0.0D, 0.0D, new Object[0]);\n/* 347: */ \n/* 348: */ \n/* 349:428 */ assignInitialConditions_xjal();\n/* 350:429 */ onCreate();\n/* 351: */ }",
"public void constructDrawing(){\r\n\r\n resetToEmpty(); // should be empty anyway\r\n\r\n// universe=TFormula.atomicTermsInListOfFormulas(fInterpretation);\r\n \r\n Set <String> universeStrSet=TFormula.atomicTermsInListOfFormulas(fInterpretation);\r\n \r\n universe=\"\";\r\n \r\n for (Iterator i=universeStrSet.iterator();i.hasNext();)\r\n \tuniverse+=i.next();\r\n \r\n\r\n findPropertyExtensions();\r\n\r\n findRelationsExtensions();\r\n\r\n determineLines();\r\n\r\n createProperties();\r\n\r\n createIndividuals();\r\n\r\n createRelations();\r\n\r\n deselect(); //all shapes are created selected\r\n\r\n\r\n fPalette.check(); // some of the names may need updating\r\n\r\n repaint();\r\n\r\n}",
"public abstract void generate();",
"public GraphicsFactory() {\n\t\tsuper();\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n cbYear = new javax.swing.JComboBox<>();\n jSVGCanvas1 = new org.apache.batik.swing.JSVGCanvas();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n addWindowListener(new java.awt.event.WindowAdapter()\n {\n public void windowOpened(java.awt.event.WindowEvent evt)\n {\n formWindowOpened(evt);\n }\n });\n\n jLabel1.setText(\"Year:\");\n\n cbYear.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"2014\", \"2015\", \"2016\", \"2017\", \"2018\", \"2019\", \"2022\", \"2023\" }));\n cbYear.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n cbYearActionPerformed(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(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cbYear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(631, 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(jLabel1)\n .addComponent(cbYear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(7, Short.MAX_VALUE))\n );\n\n jSVGCanvas1.addHierarchyBoundsListener(new java.awt.event.HierarchyBoundsListener()\n {\n public void ancestorMoved(java.awt.event.HierarchyEvent evt)\n {\n }\n public void ancestorResized(java.awt.event.HierarchyEvent evt)\n {\n jSVGCanvas1AncestorResized(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(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jSVGCanvas1, javax.swing.GroupLayout.DEFAULT_SIZE, 741, Short.MAX_VALUE)\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 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSVGCanvas1, javax.swing.GroupLayout.DEFAULT_SIZE, 529, Short.MAX_VALUE))\n );\n\n pack();\n }",
"String getSVGDescription(double speed);",
"private void createGraphics() {\n\n Graphic graphic;\n // create spatial reference for the points\n SpatialReference spatialReference = SpatialReference.create(4326);\n\n // create points to place markers\n List<Point> points = new ArrayList<>();\n points.add(new Point(-2.641, 56.077, spatialReference));\n points.add(new Point(-2.669, 56.058, spatialReference));\n points.add(new Point(-2.718, 56.060, spatialReference));\n points.add(new Point(-2.720, 56.073, spatialReference));\n\n // create simple marker symbols for the points\n markers = new ArrayList<>();\n markers.add(new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.CIRCLE, RED, 10));\n markers.add(new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.TRIANGLE, PURPLE, 10));\n markers.add(new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.CROSS, GREEN, 10));\n markers.add(new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.DIAMOND, BLUE, 10));\n\n // create a list of names for graphics\n List<String> names = new ArrayList<>();\n names.add(\"LAMB\");\n names.add(\"CANTY BAY\");\n names.add(\"NORTH BERWICK\");\n names.add(\"FIDRA\");\n\n // create a list of descriptions for graphics\n List<String> descriptions = new ArrayList<>();\n descriptions.add(\"Just opposite of Bass Rock.\");\n descriptions.add(\"100m long and 50m wide.\");\n descriptions.add(\"Lighthouse in northern section.\");\n descriptions.add(\"Also known as Barley Farmstead.\");\n\n // create four graphics with attributes and add to graphics overlay\n for (int i = 0; i < 4; i++) {\n graphic = new Graphic(points.get(i), markers.get(i));\n graphic.getAttributes().put(\"NAME\", names.get(i));\n graphic.getAttributes().put(\"DESCRIPTION\", descriptions.get(i));\n graphicsOverlay.getGraphics().add(graphic);\n }\n }",
"PiviDiagram createPiviDiagram();",
"@Override\n\tpublic void BuildShape(Graphics g) {\n\t\t\n\t}",
"public void generete() {\n int minQuantFig = 1,\r\n maxQuantFig = 10,\r\n minNum = 1,\r\n maxNum = 100,\r\n minColor = 0,\r\n maxColor = (int)colors.length - 1,\r\n\r\n // Initialize figures property for random calculations\r\n randomColor = 0,\r\n randomFigure = 0,\r\n\r\n // Squere property\r\n randomSideLength = 0,\r\n\r\n // Circle property\r\n randomRadius = 0,\r\n \r\n // IsoscelesRightTriangle property \r\n randomHypotenus = 0,\r\n \r\n // Trapizoid properties\r\n randomBaseA = 0,\r\n randomBaseB = 0,\r\n randomAltitude = 0;\r\n\r\n // Generate random number to set figueres's quantaty\r\n setFigureQuantaty( generateWholoeNumInRange(minQuantFig, maxQuantFig) );\r\n\r\n for( int i = 0; i < getFigureQuantaty(); i++ ) {\r\n\r\n // Convert double random value to int and close it in range from 1 to number of elements in array\r\n randomFigure = (int)( Math.random() * figures.length );\r\n \r\n randomColor = generateWholoeNumInRange( minColor, maxColor ); // Get random color's index from colors array\r\n\r\n // Create new figure depending on randomFigure \r\n switch (figures[randomFigure]) {\r\n\r\n case \"Circle\":\r\n\r\n randomRadius = generateWholoeNumInRange( minNum, maxNum ); // Get random value of circle's radius;\r\n\r\n Circle newCircle = new Circle( colors[randomColor], randomRadius ); // Initialize Circle with random parameters\r\n\r\n newCircle.drawFigure();\r\n \r\n break;\r\n\r\n case \"Squere\":\r\n\r\n randomSideLength = generateWholoeNumInRange( minNum, maxNum ); // Get random value of side length;\r\n\r\n Squere newSquere = new Squere( colors[randomColor], randomSideLength ); // Initialize Circle with random parameters\r\n\r\n newSquere.drawFigure();\r\n\r\n break;\r\n\r\n case \"Triangle\":\r\n\r\n randomSideLength = generateWholoeNumInRange( minNum, maxNum ); // Get random value of side length;\r\n\r\n randomHypotenus = generateWholoeNumInRange( minNum, maxNum ); // Get random value of hypotenus;\r\n\r\n IsoscelesRightTriangle newTriangle = new IsoscelesRightTriangle( colors[randomColor], randomSideLength, randomHypotenus ); // Initialize Circle with random parameters\r\n\r\n newTriangle.drawFigure();\r\n\r\n break;\r\n\r\n case \"Trapezoid\":\r\n\r\n randomBaseA = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's side A;\r\n\r\n randomBaseB = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's side B;\r\n\r\n randomAltitude = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's altitude;\r\n\r\n Trapezoid newTrapezoid = new Trapezoid( colors[randomColor], randomBaseA, randomBaseB, randomAltitude ); // Create new Trapezoid with random parameters\r\n\r\n newTrapezoid.drawFigure();\r\n\r\n break;\r\n\r\n };\r\n };\r\n }",
"@Override\n\tpublic void startElement(final String uri, final String localName, final String qName,\n\t\t\tfinal Attributes attributes) throws SAXException {\n\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\n\t\tmatrixExistsAtDepth[tagDepth] = false;\n\t\tmCurrentElement = localName;\n\t\tmProperties.svgStyle = new SvgStyle(mStyleParseStack.peek());\n\n\t\tif (mPrivateDataNamespace != null && qName.startsWith(mPrivateDataNamespace)) {\n\t\t\tmPrivateDataCurrentKey = localName;\n\t\t}\n\t\telse {\n\t\t\tmPrivateDataCurrentKey = null;\n\t\t}\n\n\t\tif (localName.equalsIgnoreCase(STARTTAG_SVG)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tsvg();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_G)) {\n\t\t\tparseAttributes(attributes);\n\t\t\taddBeginGroup(mProperties.id);\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_PATH)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tpath();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_RECT)) {\n\t\t\tparseAttributes(attributes);\n\t\t\trect();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_LINE)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tline();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_POLYGON)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tpolygon();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_CIRCLE)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tcircle();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_TEXT)) {\n\t\t\tparseAttributes(attributes);\n\t\t\ttext_element();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_TSPAN)) {\n\t\t\tparseAttributes(attributes);\n\t\t\ttspan_element();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_LINEARGRADIENT)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tlinearGradient();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_RADIALGRADIENT)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tradialGradient();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_STOP)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tgradientStop();\n\t\t}\n\n\t\tmStyleParseStack.add(mProperties.svgStyle);\n\t\ttagDepth++;\n\t}",
"private void writeToFile(SVGGraphics2D generator, String path) throws IOException {\n\t\tFile file = new File(path);\n\t\tif (!file.exists())\n\t\t\tfile.createNewFile();\n\t\tFileWriter fw = new FileWriter(file);\n\t\tPrintWriter writer = new PrintWriter(fw);\n\t\tgenerator.stream(writer);\n\t\twriter.close();\n\t}",
"private String textualize() {\n StringBuilder text = new StringBuilder();\n\n text.append(\n \"<svg width=\\\"\" + (model.getRightMostX() + 200) + \"\\\" height=\\\"\" + (model.getDownMostY()\n + 200)\n + \"\\\" version=\\\"1.1\\\"\\n\"\n + \" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\\n\");\n\n ArrayList<IMotion> modelMotions = model.getMotionList();\n\n ArrayList<String> shapeNames = new ArrayList<String>();\n\n for (IMotion motion : modelMotions) {\n String currInitShapeName = motion.getStartingShapeName();\n\n if (!(shapeNames.contains(currInitShapeName))) {\n shapeNames.add(currInitShapeName);\n }\n }\n\n ArrayList<IShape> initShapes = new ArrayList<IShape>();\n for (String shapeName : shapeNames) {\n IShape shape = model.getInitShape(shapeName);\n if (!(initShapes.contains(shape))) {\n initShapes.add(shape);\n }\n }\n\n int counter = 0;\n\n for (IShape shape : initShapes) {\n text.append(shape.getShapeSVGText() + \"\\n\");\n\n for (IMotion motion : modelMotions) {\n if (motion.containsShape(shape)) {\n if (motion.hasSVGMotion(motion.getStartShape(), motion.getEndShape())) {\n if (counter == 0) {\n text.append(motion.makeMotionHidden(this.ticksPerSec));\n text.append(motion.getMotionSVGText(this.ticksPerSec) + \"\\n\");\n counter++;\n } else {\n text.append(motion.getMotionSVGText(this.ticksPerSec) + \"\\n\");\n }\n } else {\n if (counter == 0) {\n text.append(motion.makeMotionHiddenNoSVG(this.ticksPerSec));\n text.append(motion.getMotionSVGText(this.ticksPerSec) + \"\\n\");\n counter++;\n }\n }\n }\n }\n\n text.append(shape.getShapeClosingSVG() + \"\\n\\n\");\n counter = 0;\n }\n\n text.append(\"</svg>\");\n\n return text.toString();\n }",
"private GraphicsUtils() {\n }",
"public AbstractCMElement createSummaryElement() throws IOException {\n\t\tgetOrCreateDocumentCacheList();\n\t\tconvertedSVGElement = new SVGG();\n\t\tconvertedSVGElement.setFontSize(10.);\n\t\tdouble x = 10.0;\n\t\tdouble y = 20.0;\n\t\tdouble deltaY = 10.;\n\t\tint count = 0;\n\t\tcProject.getOrCreateCTreeList();\n\t\tLOG.debug(cTreeList.size()+\"; \"+cTreeList);\n\t\tfor (DocumentCache documentCache : documentCacheList) {\n\t\t\tHtmlElement htmlDiv = documentCache.getHtmlDiv();\n\t\t\tCTree cTree = documentCache.getCTree();\n\t\t\tFile file = cTree.createFile(\"html/html.html\");\n\t\t\tLOG.debug(\"WROTE: \"+file);\n\t\t\tHtmlHtml.wrapAndWriteAsHtml(htmlDiv, file);\n\t\t\tconvertedSVGElement.appendChild(new SVGText(new Real2(x, y),cTree.getName()));\n\t\t\ty += deltaY;\n\t\t}\n\t\treturn convertedSVGElement;\n\t}",
"public void generate() {\n\t\t// Print generation stamp\n\t\tcontext.getNaming().putStamp(elementInterface, out);\n\t\t// Print the code\n\t\t// Print header\n\t\tout.println(\"package \"+modelPackage+\";\");\n\t\tout.println();\n\t\tout.println(\"public interface \"+elementInterface);\n\t\tif (context.isGenerateVisitor()) {\n\t\t\tout.println(indent+\"extends \"+context.getNaming().getVisitableInterface(modelName));\n\t\t}\n\t\tout.println(\"{\");\n\t\tif (context.isGenerateID()) {\n\t\t\tout.println(indent+\"/** Get the id */\");\n\t\t\tout.println(indent+\"public String getId();\");\n\t\t\tout.println(indent+\"/** Set the id */\");\n\t\t\tout.println(indent+\"public void setId(String id);\");\n\t\t\tout.println();\n\t\t}\n\t\tif (context.isGenerateBidirectional()) {\n\t\t\tout.println(indent+\"/** Delete */\");\n\t\t\tout.println(indent+\"public void delete();\");\n\t\t}\n\t\tout.println(indent+\"/** Override toString */\");\n\t\tout.println(indent+\"public String toString();\");\n//\t\tif (context.isGenerateInvariant()) {\n//\t\t\tout.println();\n//\t\t\tout.println(indent+\"/** Parse all invariants */\");\n//\t\t\tout.println(indent+\"public Boolean parseInvariants(ILog log);\");\n//\t\t\tout.println(indent+\"/** Evaluate all invariants */\");\n//\t\t\tout.println(indent+\"public Boolean evaluateInvariants(ILog log);\");\n//\t\t}\n\t\tout.println(\"}\");\n\t}",
"private void createLegend()\n\t{\n\t\txml = new XMLOut(rfoDir + legendName, \"reprap-fab-at-home-build version=\\\"0.1\\\"\");\n\t\tfor(int i = 0; i < astl.size(); i++)\n\t\t{\n\t\t\txml.push(\"object name=\\\"object-\" + i + \"\\\"\");\n\t\t\t xml.push(\"files\");\n\t\t\t STLObject stlo = astl.get(i);\n\t\t\t for(int subObj = 0; subObj < stlo.size(); subObj++)\n\t\t\t {\n\t\t\t\t xml.push(\"file location=\\\"\" + stlName(stlo.getUnique(subObj)) + \"\\\" filetype=\\\"application/sla\\\" material=\\\"\" + \n\t\t\t\t\t\t stlo.attributes(subObj).getMaterial() + \"\\\"\");\n\t\t\t\t xml.pop();\n\t\t\t }\n\t\t\t xml.pop();\n\t\t\t writeTransform(stlo.trans());\n\t\t\txml.pop();\n\t\t}\n\t\txml.close();\n\t}",
"public static void main(String[] args) {\n MyImageVector.Double img = new MyImageVector.Double(new Loader().loadSVGDocument(\"D:\\\\sample_images_PA\\\\trash_test_mem\\\\images_de_test_pr_figure_assistant\\\\test_scaling_SVG.svg\"));\n //MyImage2D img = new MyImage2D.Double(0, 0, \"D:\\\\sample_images_PA\\\\trash_test_mem\\\\mini\\\\focused_Series010.png\");\n img.addAssociatedObject(new MyRectangle2D.Double(10, 10, 128, 256));\n img.addAssociatedObject(new MyRectangle2D.Double(200, 20, 256, 256));\n img.addAssociatedObject(new MyRectangle2D.Double(100, 10, 256, 128));\n MyPoint2D.Double text = new MyPoint2D.Double(220, 220);\n text.setText(new ColoredTextPaneSerializable(new StyledDoc2Html().reparse(\"<i>test<i>\"), \"\"));\n img.addAssociatedObject(text);\n CheckLineArts iopane = new CheckLineArts(img, 1.5f, true);\n if (!iopane.noError) {\n int result = JOptionPane.showOptionDialog(null, new Object[]{iopane}, \"Check stroke width of line arts\", JOptionPane.CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, new String[]{\"Accept automated solution\", \"Ignore\"}, null);\n if (result == JOptionPane.OK_OPTION) {\n //--> replace objects with copy\n Object strokeData = iopane.getModifiedStrokeData();\n if (strokeData instanceof ArrayList) {\n img.setAssociatedObjects(((ArrayList<Object>) strokeData));\n// for (Object string : img.getAssociatedObjects()) {\n// if (string instanceof PARoi) {\n// System.out.println(((PARoi) string).getStrokeSize());\n// }\n// }\n } else if (strokeData instanceof String) {\n ((MyImageVector) img).setSvg_content_serializable((String) strokeData);\n ((MyImageVector) img).reloadDocFromString();\n }\n }\n }\n System.exit(0);\n }",
"public abstract Image gen();",
"@Override\n\tpublic void petrinet2SVG(PetrinetNode startNode) {\n\t\tthis.BFSTOSVG(startNode);\n\t}",
"public SVGView(String fileName) {\n super(fileName);\n this.textDescription = this.textualize();\n }",
"private StreamResource getSVGStreamResource(String name, JFreeChart chart, int width, int height) {\n String randomName = UUID.randomUUID().toString() + \".svg\";\n return new StreamResource((name == null ? randomName : name + \".svg\"), (StreamResourceWriter) (stream, session) -> {\n session.lock();\n try (Writer writer = new OutputStreamWriter(stream)) {\n DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder;\n try {\n docBuilder = docBuilderFactory.newDocumentBuilder();\n } catch (ParserConfigurationException e1) {\n throw new RuntimeException(e1);\n }\n Document document = docBuilder.newDocument();\n Element svgelem = document.createElement(\"svg\");\n document.appendChild(svgelem);\n // Create an instance of the SVG Generator\n SVGGraphics2D svgGenerator = new SVGGraphics2D(document);\n\n // draw the chart in the SVG generator\n chart.draw(svgGenerator, new Rectangle(width, height));\n Element el = svgGenerator.getRoot();\n el.setAttributeNS(null, \"viewBox\", \"0 0 \" + width + \" \" + height + \"\");\n el.setAttributeNS(null, \"style\", \"width:100%;height:100%;\");\n el.setAttributeNS(null, \"preserveAspectRatio\", SVG_ASPECT_RATIO);\n svgGenerator.stream(el, writer, true, false);\n } finally {\n session.unlock();\n }\n });\n }",
"void writeGraphics() throws Exception;",
"public static SVGPath GetSVGPath(String uri){\n SVGPath ico = new SVGPath();\n String path = \"\";\n String fill;\n\n Path filePath = Paths.get(uri);\n InputStream is = SVGExtractor.class.getResourceAsStream(uri);\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n\n String line;\n\n boolean started = false;\n\n try{\n while ((line = reader.readLine()) != null){\n if (started){\n path += line;\n if (line.contains(\"/>\")){\n started = false;\n }\n } else{\n if (line.contains(\"<path\")){\n started = true;\n path += line;\n }\n }\n }\n fill = path.substring(path.indexOf(\"fill=\\\"\") + 6, path.indexOf(\"\\\" d=\\\"\"));\n path = path.substring(path.indexOf(\" d=\\\"\") + 4, path.indexOf(\"\\\"/>\"));\n path = path.replaceAll(\"\\t\", \"\");\n ico.setContent(path);\n ico.setFill(Paint.valueOf(fill));\n } catch (IOException e){\n e.printStackTrace();\n NotificationManager.pop(\"Fichier Manquant\", \"Le fichier \" + filePath + \" est introuvable.\", \"error\");\n System.out.println(\"Erreur IO\");\n }\n return ico;\n }",
"@Test(expected = UnsupportedOperationException.class)\n public void SVGViewTest3() {\n IView a = new SVGView(new AnimatorModelImpl(0, 0, 100, 100), \"toh-3.txt\", 10);\n a.makeVisible();\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}",
"public static SVGModel newInstance(OMSVGSVGElement svg, String title, String idPrefix) {\n \t\tSVGModel model = GWT.create(SVGModel.class);\n \t\tmodel.setSvgElement(svg, title, idPrefix);\n \t\treturn model;\n \t}",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\telementEClass = createEClass(ELEMENT);\n\t\tcreateEOperation(elementEClass, ELEMENT___GET_ONTOLOGY);\n\t\tcreateEOperation(elementEClass, ELEMENT___EXTRA_VALIDATE__DIAGNOSTICCHAIN_MAP);\n\n\t\tannotationEClass = createEClass(ANNOTATION);\n\t\tcreateEReference(annotationEClass, ANNOTATION__PROPERTY);\n\t\tcreateEReference(annotationEClass, ANNOTATION__LITERAL_VALUE);\n\t\tcreateEReference(annotationEClass, ANNOTATION__REFERENCE_VALUE);\n\t\tcreateEReference(annotationEClass, ANNOTATION__OWNING_ELEMENT);\n\t\tcreateEOperation(annotationEClass, ANNOTATION___GET_VALUE);\n\t\tcreateEOperation(annotationEClass, ANNOTATION___GET_ANNOTATED_ELEMENT);\n\n\t\tidentifiedElementEClass = createEClass(IDENTIFIED_ELEMENT);\n\t\tcreateEReference(identifiedElementEClass, IDENTIFIED_ELEMENT__OWNED_ANNOTATIONS);\n\t\tcreateEOperation(identifiedElementEClass, IDENTIFIED_ELEMENT___GET_IRI);\n\n\t\timportEClass = createEClass(IMPORT);\n\t\tcreateEAttribute(importEClass, IMPORT__KIND);\n\t\tcreateEAttribute(importEClass, IMPORT__NAMESPACE);\n\t\tcreateEAttribute(importEClass, IMPORT__PREFIX);\n\t\tcreateEReference(importEClass, IMPORT__OWNING_ONTOLOGY);\n\t\tcreateEOperation(importEClass, IMPORT___GET_IRI);\n\t\tcreateEOperation(importEClass, IMPORT___GET_SEPARATOR);\n\n\t\tinstanceEClass = createEClass(INSTANCE);\n\t\tcreateEReference(instanceEClass, INSTANCE__OWNED_PROPERTY_VALUES);\n\n\t\taxiomEClass = createEClass(AXIOM);\n\t\tcreateEOperation(axiomEClass, AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tassertionEClass = createEClass(ASSERTION);\n\t\tcreateEOperation(assertionEClass, ASSERTION___GET_SUBJECT);\n\t\tcreateEOperation(assertionEClass, ASSERTION___GET_OBJECT);\n\n\t\tpredicateEClass = createEClass(PREDICATE);\n\t\tcreateEReference(predicateEClass, PREDICATE__ANTECEDENT_RULE);\n\t\tcreateEReference(predicateEClass, PREDICATE__CONSEQUENT_RULE);\n\n\t\targumentEClass = createEClass(ARGUMENT);\n\t\tcreateEAttribute(argumentEClass, ARGUMENT__VARIABLE);\n\t\tcreateEReference(argumentEClass, ARGUMENT__LITERAL);\n\t\tcreateEReference(argumentEClass, ARGUMENT__INSTANCE);\n\n\t\tliteralEClass = createEClass(LITERAL);\n\t\tcreateEOperation(literalEClass, LITERAL___GET_VALUE);\n\t\tcreateEOperation(literalEClass, LITERAL___GET_STRING_VALUE);\n\t\tcreateEOperation(literalEClass, LITERAL___GET_LEXICAL_VALUE);\n\t\tcreateEOperation(literalEClass, LITERAL___GET_TYPE_IRI);\n\n\t\tontologyEClass = createEClass(ONTOLOGY);\n\t\tcreateEAttribute(ontologyEClass, ONTOLOGY__NAMESPACE);\n\t\tcreateEAttribute(ontologyEClass, ONTOLOGY__PREFIX);\n\t\tcreateEReference(ontologyEClass, ONTOLOGY__OWNED_IMPORTS);\n\t\tcreateEOperation(ontologyEClass, ONTOLOGY___GET_IRI);\n\t\tcreateEOperation(ontologyEClass, ONTOLOGY___GET_SEPARATOR);\n\n\t\tmemberEClass = createEClass(MEMBER);\n\t\tcreateEAttribute(memberEClass, MEMBER__NAME);\n\t\tcreateEOperation(memberEClass, MEMBER___GET_REF);\n\t\tcreateEOperation(memberEClass, MEMBER___IS_REF);\n\t\tcreateEOperation(memberEClass, MEMBER___RESOLVE);\n\t\tcreateEOperation(memberEClass, MEMBER___GET_IRI);\n\t\tcreateEOperation(memberEClass, MEMBER___GET_ABBREVIATED_IRI);\n\n\t\tvocabularyBoxEClass = createEClass(VOCABULARY_BOX);\n\n\t\tdescriptionBoxEClass = createEClass(DESCRIPTION_BOX);\n\n\t\tvocabularyEClass = createEClass(VOCABULARY);\n\t\tcreateEReference(vocabularyEClass, VOCABULARY__OWNED_STATEMENTS);\n\n\t\tvocabularyBundleEClass = createEClass(VOCABULARY_BUNDLE);\n\n\t\tdescriptionEClass = createEClass(DESCRIPTION);\n\t\tcreateEReference(descriptionEClass, DESCRIPTION__OWNED_STATEMENTS);\n\n\t\tdescriptionBundleEClass = createEClass(DESCRIPTION_BUNDLE);\n\n\t\tstatementEClass = createEClass(STATEMENT);\n\n\t\tvocabularyMemberEClass = createEClass(VOCABULARY_MEMBER);\n\n\t\tdescriptionMemberEClass = createEClass(DESCRIPTION_MEMBER);\n\n\t\tvocabularyStatementEClass = createEClass(VOCABULARY_STATEMENT);\n\t\tcreateEReference(vocabularyStatementEClass, VOCABULARY_STATEMENT__OWNING_VOCABULARY);\n\n\t\tdescriptionStatementEClass = createEClass(DESCRIPTION_STATEMENT);\n\t\tcreateEReference(descriptionStatementEClass, DESCRIPTION_STATEMENT__OWNING_DESCRIPTION);\n\n\t\ttermEClass = createEClass(TERM);\n\n\t\truleEClass = createEClass(RULE);\n\t\tcreateEReference(ruleEClass, RULE__REF);\n\t\tcreateEReference(ruleEClass, RULE__ANTECEDENT);\n\t\tcreateEReference(ruleEClass, RULE__CONSEQUENT);\n\n\t\tbuiltInEClass = createEClass(BUILT_IN);\n\t\tcreateEReference(builtInEClass, BUILT_IN__REF);\n\n\t\tspecializableTermEClass = createEClass(SPECIALIZABLE_TERM);\n\t\tcreateEReference(specializableTermEClass, SPECIALIZABLE_TERM__OWNED_SPECIALIZATIONS);\n\n\t\tpropertyEClass = createEClass(PROPERTY);\n\n\t\ttypeEClass = createEClass(TYPE);\n\n\t\trelationBaseEClass = createEClass(RELATION_BASE);\n\t\tcreateEReference(relationBaseEClass, RELATION_BASE__SOURCES);\n\t\tcreateEReference(relationBaseEClass, RELATION_BASE__TARGETS);\n\t\tcreateEReference(relationBaseEClass, RELATION_BASE__REVERSE_RELATION);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__FUNCTIONAL);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__INVERSE_FUNCTIONAL);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__SYMMETRIC);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__ASYMMETRIC);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__REFLEXIVE);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__IRREFLEXIVE);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__TRANSITIVE);\n\n\t\tspecializablePropertyEClass = createEClass(SPECIALIZABLE_PROPERTY);\n\t\tcreateEReference(specializablePropertyEClass, SPECIALIZABLE_PROPERTY__OWNED_EQUIVALENCES);\n\n\t\tclassifierEClass = createEClass(CLASSIFIER);\n\t\tcreateEReference(classifierEClass, CLASSIFIER__OWNED_EQUIVALENCES);\n\t\tcreateEReference(classifierEClass, CLASSIFIER__OWNED_PROPERTY_RESTRICTIONS);\n\n\t\tscalarEClass = createEClass(SCALAR);\n\t\tcreateEReference(scalarEClass, SCALAR__REF);\n\t\tcreateEReference(scalarEClass, SCALAR__OWNED_ENUMERATION);\n\t\tcreateEReference(scalarEClass, SCALAR__OWNED_EQUIVALENCES);\n\n\t\tentityEClass = createEClass(ENTITY);\n\t\tcreateEReference(entityEClass, ENTITY__OWNED_KEYS);\n\n\t\tstructureEClass = createEClass(STRUCTURE);\n\t\tcreateEReference(structureEClass, STRUCTURE__REF);\n\n\t\taspectEClass = createEClass(ASPECT);\n\t\tcreateEReference(aspectEClass, ASPECT__REF);\n\n\t\tconceptEClass = createEClass(CONCEPT);\n\t\tcreateEReference(conceptEClass, CONCEPT__REF);\n\t\tcreateEReference(conceptEClass, CONCEPT__OWNED_ENUMERATION);\n\n\t\trelationEntityEClass = createEClass(RELATION_ENTITY);\n\t\tcreateEReference(relationEntityEClass, RELATION_ENTITY__REF);\n\t\tcreateEReference(relationEntityEClass, RELATION_ENTITY__FORWARD_RELATION);\n\n\t\tannotationPropertyEClass = createEClass(ANNOTATION_PROPERTY);\n\t\tcreateEReference(annotationPropertyEClass, ANNOTATION_PROPERTY__REF);\n\n\t\tsemanticPropertyEClass = createEClass(SEMANTIC_PROPERTY);\n\t\tcreateEOperation(semanticPropertyEClass, SEMANTIC_PROPERTY___IS_FUNCTIONAL);\n\t\tcreateEOperation(semanticPropertyEClass, SEMANTIC_PROPERTY___GET_DOMAIN_LIST);\n\t\tcreateEOperation(semanticPropertyEClass, SEMANTIC_PROPERTY___GET_RANGE_LIST);\n\n\t\tscalarPropertyEClass = createEClass(SCALAR_PROPERTY);\n\t\tcreateEReference(scalarPropertyEClass, SCALAR_PROPERTY__REF);\n\t\tcreateEAttribute(scalarPropertyEClass, SCALAR_PROPERTY__FUNCTIONAL);\n\t\tcreateEReference(scalarPropertyEClass, SCALAR_PROPERTY__DOMAINS);\n\t\tcreateEReference(scalarPropertyEClass, SCALAR_PROPERTY__RANGES);\n\t\tcreateEOperation(scalarPropertyEClass, SCALAR_PROPERTY___GET_DOMAIN_LIST);\n\t\tcreateEOperation(scalarPropertyEClass, SCALAR_PROPERTY___GET_RANGE_LIST);\n\n\t\tstructuredPropertyEClass = createEClass(STRUCTURED_PROPERTY);\n\t\tcreateEReference(structuredPropertyEClass, STRUCTURED_PROPERTY__REF);\n\t\tcreateEAttribute(structuredPropertyEClass, STRUCTURED_PROPERTY__FUNCTIONAL);\n\t\tcreateEReference(structuredPropertyEClass, STRUCTURED_PROPERTY__DOMAINS);\n\t\tcreateEReference(structuredPropertyEClass, STRUCTURED_PROPERTY__RANGES);\n\t\tcreateEOperation(structuredPropertyEClass, STRUCTURED_PROPERTY___GET_DOMAIN_LIST);\n\t\tcreateEOperation(structuredPropertyEClass, STRUCTURED_PROPERTY___GET_RANGE_LIST);\n\n\t\trelationEClass = createEClass(RELATION);\n\t\tcreateEOperation(relationEClass, RELATION___IS_INVERSE_FUNCTIONAL);\n\t\tcreateEOperation(relationEClass, RELATION___IS_SYMMETRIC);\n\t\tcreateEOperation(relationEClass, RELATION___IS_ASYMMETRIC);\n\t\tcreateEOperation(relationEClass, RELATION___IS_REFLEXIVE);\n\t\tcreateEOperation(relationEClass, RELATION___IS_IRREFLEXIVE);\n\t\tcreateEOperation(relationEClass, RELATION___IS_TRANSITIVE);\n\t\tcreateEOperation(relationEClass, RELATION___GET_DOMAINS);\n\t\tcreateEOperation(relationEClass, RELATION___GET_RANGES);\n\t\tcreateEOperation(relationEClass, RELATION___GET_INVERSE);\n\t\tcreateEOperation(relationEClass, RELATION___GET_DOMAIN_LIST);\n\t\tcreateEOperation(relationEClass, RELATION___GET_RANGE_LIST);\n\n\t\tforwardRelationEClass = createEClass(FORWARD_RELATION);\n\t\tcreateEReference(forwardRelationEClass, FORWARD_RELATION__RELATION_ENTITY);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___GET_REF);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_FUNCTIONAL);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_INVERSE_FUNCTIONAL);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_SYMMETRIC);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_ASYMMETRIC);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_REFLEXIVE);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_IRREFLEXIVE);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_TRANSITIVE);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___GET_DOMAINS);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___GET_RANGES);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___GET_INVERSE);\n\n\t\treverseRelationEClass = createEClass(REVERSE_RELATION);\n\t\tcreateEReference(reverseRelationEClass, REVERSE_RELATION__RELATION_BASE);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___GET_REF);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_FUNCTIONAL);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_INVERSE_FUNCTIONAL);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_SYMMETRIC);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_ASYMMETRIC);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_REFLEXIVE);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_IRREFLEXIVE);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_TRANSITIVE);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___GET_DOMAINS);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___GET_RANGES);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___GET_INVERSE);\n\n\t\tunreifiedRelationEClass = createEClass(UNREIFIED_RELATION);\n\t\tcreateEReference(unreifiedRelationEClass, UNREIFIED_RELATION__REF);\n\t\tcreateEOperation(unreifiedRelationEClass, UNREIFIED_RELATION___GET_DOMAINS);\n\t\tcreateEOperation(unreifiedRelationEClass, UNREIFIED_RELATION___GET_RANGES);\n\t\tcreateEOperation(unreifiedRelationEClass, UNREIFIED_RELATION___GET_INVERSE);\n\n\t\tnamedInstanceEClass = createEClass(NAMED_INSTANCE);\n\t\tcreateEReference(namedInstanceEClass, NAMED_INSTANCE__OWNED_TYPES);\n\n\t\tconceptInstanceEClass = createEClass(CONCEPT_INSTANCE);\n\t\tcreateEReference(conceptInstanceEClass, CONCEPT_INSTANCE__REF);\n\n\t\trelationInstanceEClass = createEClass(RELATION_INSTANCE);\n\t\tcreateEReference(relationInstanceEClass, RELATION_INSTANCE__REF);\n\t\tcreateEReference(relationInstanceEClass, RELATION_INSTANCE__SOURCES);\n\t\tcreateEReference(relationInstanceEClass, RELATION_INSTANCE__TARGETS);\n\n\t\tstructureInstanceEClass = createEClass(STRUCTURE_INSTANCE);\n\t\tcreateEReference(structureInstanceEClass, STRUCTURE_INSTANCE__TYPE);\n\t\tcreateEReference(structureInstanceEClass, STRUCTURE_INSTANCE__OWNING_AXIOM);\n\t\tcreateEReference(structureInstanceEClass, STRUCTURE_INSTANCE__OWNING_ASSERTION);\n\n\t\tkeyAxiomEClass = createEClass(KEY_AXIOM);\n\t\tcreateEReference(keyAxiomEClass, KEY_AXIOM__PROPERTIES);\n\t\tcreateEReference(keyAxiomEClass, KEY_AXIOM__OWNING_ENTITY);\n\t\tcreateEOperation(keyAxiomEClass, KEY_AXIOM___GET_KEYED_ENTITY);\n\t\tcreateEOperation(keyAxiomEClass, KEY_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tspecializationAxiomEClass = createEClass(SPECIALIZATION_AXIOM);\n\t\tcreateEReference(specializationAxiomEClass, SPECIALIZATION_AXIOM__SUPER_TERM);\n\t\tcreateEReference(specializationAxiomEClass, SPECIALIZATION_AXIOM__OWNING_TERM);\n\t\tcreateEOperation(specializationAxiomEClass, SPECIALIZATION_AXIOM___GET_SUB_TERM);\n\t\tcreateEOperation(specializationAxiomEClass, SPECIALIZATION_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tinstanceEnumerationAxiomEClass = createEClass(INSTANCE_ENUMERATION_AXIOM);\n\t\tcreateEReference(instanceEnumerationAxiomEClass, INSTANCE_ENUMERATION_AXIOM__INSTANCES);\n\t\tcreateEReference(instanceEnumerationAxiomEClass, INSTANCE_ENUMERATION_AXIOM__OWNING_CONCEPT);\n\t\tcreateEOperation(instanceEnumerationAxiomEClass, INSTANCE_ENUMERATION_AXIOM___GET_ENUMERATED_CONCEPT);\n\t\tcreateEOperation(instanceEnumerationAxiomEClass, INSTANCE_ENUMERATION_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tpropertyRestrictionAxiomEClass = createEClass(PROPERTY_RESTRICTION_AXIOM);\n\t\tcreateEReference(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM__PROPERTY);\n\t\tcreateEReference(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM__OWNING_CLASSIFIER);\n\t\tcreateEReference(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM__OWNING_AXIOM);\n\t\tcreateEOperation(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM___GET_RESTRICTING_DOMAIN);\n\t\tcreateEOperation(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tliteralEnumerationAxiomEClass = createEClass(LITERAL_ENUMERATION_AXIOM);\n\t\tcreateEReference(literalEnumerationAxiomEClass, LITERAL_ENUMERATION_AXIOM__LITERALS);\n\t\tcreateEReference(literalEnumerationAxiomEClass, LITERAL_ENUMERATION_AXIOM__OWNING_SCALAR);\n\t\tcreateEOperation(literalEnumerationAxiomEClass, LITERAL_ENUMERATION_AXIOM___GET_ENUMERATED_SCALAR);\n\t\tcreateEOperation(literalEnumerationAxiomEClass, LITERAL_ENUMERATION_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tclassifierEquivalenceAxiomEClass = createEClass(CLASSIFIER_EQUIVALENCE_AXIOM);\n\t\tcreateEReference(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM__SUPER_CLASSIFIERS);\n\t\tcreateEReference(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM__OWNED_PROPERTY_RESTRICTIONS);\n\t\tcreateEReference(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM__OWNING_CLASSIFIER);\n\t\tcreateEOperation(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM___GET_SUB_CLASSIFIER);\n\t\tcreateEOperation(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tscalarEquivalenceAxiomEClass = createEClass(SCALAR_EQUIVALENCE_AXIOM);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__SUPER_SCALAR);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__OWNING_SCALAR);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__LENGTH);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MIN_LENGTH);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MAX_LENGTH);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__PATTERN);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__LANGUAGE);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MIN_INCLUSIVE);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MIN_EXCLUSIVE);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MAX_INCLUSIVE);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MAX_EXCLUSIVE);\n\t\tcreateEOperation(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM___GET_SUB_SCALAR);\n\t\tcreateEOperation(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tpropertyEquivalenceAxiomEClass = createEClass(PROPERTY_EQUIVALENCE_AXIOM);\n\t\tcreateEReference(propertyEquivalenceAxiomEClass, PROPERTY_EQUIVALENCE_AXIOM__SUPER_PROPERTY);\n\t\tcreateEReference(propertyEquivalenceAxiomEClass, PROPERTY_EQUIVALENCE_AXIOM__OWNING_PROPERTY);\n\t\tcreateEOperation(propertyEquivalenceAxiomEClass, PROPERTY_EQUIVALENCE_AXIOM___GET_SUB_PROPERTY);\n\t\tcreateEOperation(propertyEquivalenceAxiomEClass, PROPERTY_EQUIVALENCE_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tpropertyRangeRestrictionAxiomEClass = createEClass(PROPERTY_RANGE_RESTRICTION_AXIOM);\n\t\tcreateEAttribute(propertyRangeRestrictionAxiomEClass, PROPERTY_RANGE_RESTRICTION_AXIOM__KIND);\n\t\tcreateEReference(propertyRangeRestrictionAxiomEClass, PROPERTY_RANGE_RESTRICTION_AXIOM__RANGE);\n\n\t\tpropertyCardinalityRestrictionAxiomEClass = createEClass(PROPERTY_CARDINALITY_RESTRICTION_AXIOM);\n\t\tcreateEAttribute(propertyCardinalityRestrictionAxiomEClass, PROPERTY_CARDINALITY_RESTRICTION_AXIOM__KIND);\n\t\tcreateEAttribute(propertyCardinalityRestrictionAxiomEClass, PROPERTY_CARDINALITY_RESTRICTION_AXIOM__CARDINALITY);\n\t\tcreateEReference(propertyCardinalityRestrictionAxiomEClass, PROPERTY_CARDINALITY_RESTRICTION_AXIOM__RANGE);\n\n\t\tpropertyValueRestrictionAxiomEClass = createEClass(PROPERTY_VALUE_RESTRICTION_AXIOM);\n\t\tcreateEReference(propertyValueRestrictionAxiomEClass, PROPERTY_VALUE_RESTRICTION_AXIOM__LITERAL_VALUE);\n\t\tcreateEReference(propertyValueRestrictionAxiomEClass, PROPERTY_VALUE_RESTRICTION_AXIOM__STRUCTURE_INSTANCE_VALUE);\n\t\tcreateEReference(propertyValueRestrictionAxiomEClass, PROPERTY_VALUE_RESTRICTION_AXIOM__NAMED_INSTANCE_VALUE);\n\t\tcreateEOperation(propertyValueRestrictionAxiomEClass, PROPERTY_VALUE_RESTRICTION_AXIOM___GET_VALUE);\n\n\t\tpropertySelfRestrictionAxiomEClass = createEClass(PROPERTY_SELF_RESTRICTION_AXIOM);\n\n\t\ttypeAssertionEClass = createEClass(TYPE_ASSERTION);\n\t\tcreateEReference(typeAssertionEClass, TYPE_ASSERTION__TYPE);\n\t\tcreateEReference(typeAssertionEClass, TYPE_ASSERTION__OWNING_INSTANCE);\n\t\tcreateEOperation(typeAssertionEClass, TYPE_ASSERTION___GET_SUBJECT);\n\t\tcreateEOperation(typeAssertionEClass, TYPE_ASSERTION___GET_OBJECT);\n\n\t\tpropertyValueAssertionEClass = createEClass(PROPERTY_VALUE_ASSERTION);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__PROPERTY);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__LITERAL_VALUE);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__STRUCTURE_INSTANCE_VALUE);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__NAMED_INSTANCE_VALUE);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__OWNING_INSTANCE);\n\t\tcreateEOperation(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION___GET_VALUE);\n\t\tcreateEOperation(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION___GET_SUBJECT);\n\t\tcreateEOperation(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION___GET_OBJECT);\n\n\t\tunaryPredicateEClass = createEClass(UNARY_PREDICATE);\n\t\tcreateEReference(unaryPredicateEClass, UNARY_PREDICATE__ARGUMENT);\n\n\t\tbinaryPredicateEClass = createEClass(BINARY_PREDICATE);\n\t\tcreateEReference(binaryPredicateEClass, BINARY_PREDICATE__ARGUMENT1);\n\t\tcreateEReference(binaryPredicateEClass, BINARY_PREDICATE__ARGUMENT2);\n\n\t\tbuiltInPredicateEClass = createEClass(BUILT_IN_PREDICATE);\n\t\tcreateEReference(builtInPredicateEClass, BUILT_IN_PREDICATE__BUILT_IN);\n\t\tcreateEReference(builtInPredicateEClass, BUILT_IN_PREDICATE__ARGUMENTS);\n\n\t\ttypePredicateEClass = createEClass(TYPE_PREDICATE);\n\t\tcreateEReference(typePredicateEClass, TYPE_PREDICATE__TYPE);\n\n\t\trelationEntityPredicateEClass = createEClass(RELATION_ENTITY_PREDICATE);\n\t\tcreateEReference(relationEntityPredicateEClass, RELATION_ENTITY_PREDICATE__TYPE);\n\n\t\tpropertyPredicateEClass = createEClass(PROPERTY_PREDICATE);\n\t\tcreateEReference(propertyPredicateEClass, PROPERTY_PREDICATE__PROPERTY);\n\n\t\tsameAsPredicateEClass = createEClass(SAME_AS_PREDICATE);\n\n\t\tdifferentFromPredicateEClass = createEClass(DIFFERENT_FROM_PREDICATE);\n\n\t\tquotedLiteralEClass = createEClass(QUOTED_LITERAL);\n\t\tcreateEAttribute(quotedLiteralEClass, QUOTED_LITERAL__VALUE);\n\t\tcreateEAttribute(quotedLiteralEClass, QUOTED_LITERAL__LANG_TAG);\n\t\tcreateEReference(quotedLiteralEClass, QUOTED_LITERAL__TYPE);\n\t\tcreateEOperation(quotedLiteralEClass, QUOTED_LITERAL___GET_LEXICAL_VALUE);\n\t\tcreateEOperation(quotedLiteralEClass, QUOTED_LITERAL___GET_TYPE_IRI);\n\n\t\tintegerLiteralEClass = createEClass(INTEGER_LITERAL);\n\t\tcreateEAttribute(integerLiteralEClass, INTEGER_LITERAL__VALUE);\n\t\tcreateEOperation(integerLiteralEClass, INTEGER_LITERAL___GET_TYPE_IRI);\n\n\t\tdecimalLiteralEClass = createEClass(DECIMAL_LITERAL);\n\t\tcreateEAttribute(decimalLiteralEClass, DECIMAL_LITERAL__VALUE);\n\t\tcreateEOperation(decimalLiteralEClass, DECIMAL_LITERAL___GET_TYPE_IRI);\n\n\t\tdoubleLiteralEClass = createEClass(DOUBLE_LITERAL);\n\t\tcreateEAttribute(doubleLiteralEClass, DOUBLE_LITERAL__VALUE);\n\t\tcreateEOperation(doubleLiteralEClass, DOUBLE_LITERAL___GET_TYPE_IRI);\n\n\t\tbooleanLiteralEClass = createEClass(BOOLEAN_LITERAL);\n\t\tcreateEAttribute(booleanLiteralEClass, BOOLEAN_LITERAL__VALUE);\n\t\tcreateEOperation(booleanLiteralEClass, BOOLEAN_LITERAL___IS_VALUE);\n\t\tcreateEOperation(booleanLiteralEClass, BOOLEAN_LITERAL___GET_TYPE_IRI);\n\n\t\t// Create enums\n\t\tseparatorKindEEnum = createEEnum(SEPARATOR_KIND);\n\t\trangeRestrictionKindEEnum = createEEnum(RANGE_RESTRICTION_KIND);\n\t\tcardinalityRestrictionKindEEnum = createEEnum(CARDINALITY_RESTRICTION_KIND);\n\t\timportKindEEnum = createEEnum(IMPORT_KIND);\n\n\t\t// Create data types\n\t\tunsignedIntEDataType = createEDataType(UNSIGNED_INT);\n\t\tunsignedIntegerEDataType = createEDataType(UNSIGNED_INTEGER);\n\t\tdecimalEDataType = createEDataType(DECIMAL);\n\t\tidEDataType = createEDataType(ID);\n\t\tnamespaceEDataType = createEDataType(NAMESPACE);\n\t}",
"public void imprime() {\n mapa =\"<svg width='\" + x + \"' height='\" + y + \"'><g>\";\n }",
"public void createPackageContents() {\r\n if (isCreated) return;\r\n isCreated = true;\r\n\r\n // Create classes and their features\r\n kShapeLayoutEClass = createEClass(KSHAPE_LAYOUT);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__XPOS);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__YPOS);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__WIDTH);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__HEIGHT);\r\n createEReference(kShapeLayoutEClass, KSHAPE_LAYOUT__INSETS);\r\n\r\n kEdgeLayoutEClass = createEClass(KEDGE_LAYOUT);\r\n createEReference(kEdgeLayoutEClass, KEDGE_LAYOUT__BEND_POINTS);\r\n createEReference(kEdgeLayoutEClass, KEDGE_LAYOUT__SOURCE_POINT);\r\n createEReference(kEdgeLayoutEClass, KEDGE_LAYOUT__TARGET_POINT);\r\n\r\n kLayoutDataEClass = createEClass(KLAYOUT_DATA);\r\n\r\n kPointEClass = createEClass(KPOINT);\r\n createEAttribute(kPointEClass, KPOINT__X);\r\n createEAttribute(kPointEClass, KPOINT__Y);\r\n\r\n kInsetsEClass = createEClass(KINSETS);\r\n createEAttribute(kInsetsEClass, KINSETS__TOP);\r\n createEAttribute(kInsetsEClass, KINSETS__BOTTOM);\r\n createEAttribute(kInsetsEClass, KINSETS__LEFT);\r\n createEAttribute(kInsetsEClass, KINSETS__RIGHT);\r\n\r\n kIdentifierEClass = createEClass(KIDENTIFIER);\r\n createEAttribute(kIdentifierEClass, KIDENTIFIER__ID);\r\n\r\n kVectorEClass = createEClass(KVECTOR);\r\n createEAttribute(kVectorEClass, KVECTOR__X);\r\n createEAttribute(kVectorEClass, KVECTOR__Y);\r\n\r\n kVectorChainEClass = createEClass(KVECTOR_CHAIN);\r\n }",
"int wkhtmltoimage_init(int use_graphics);",
"public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n mathExpEClass = createEClass(MATH_EXP);\n createEReference(mathExpEClass, MATH_EXP__DECLARATIONS);\n\n declarationEClass = createEClass(DECLARATION);\n\n externalDefEClass = createEClass(EXTERNAL_DEF);\n createEAttribute(externalDefEClass, EXTERNAL_DEF__NAME);\n createEReference(externalDefEClass, EXTERNAL_DEF__PARAMETERS);\n\n parameterEClass = createEClass(PARAMETER);\n createEReference(parameterEClass, PARAMETER__TYPE);\n createEAttribute(parameterEClass, PARAMETER__PARAMETER_NAME);\n\n typeEClass = createEClass(TYPE);\n createEAttribute(typeEClass, TYPE__NAME);\n\n resultStatementEClass = createEClass(RESULT_STATEMENT);\n createEAttribute(resultStatementEClass, RESULT_STATEMENT__LABEL);\n createEReference(resultStatementEClass, RESULT_STATEMENT__EXP);\n\n expressionEClass = createEClass(EXPRESSION);\n\n plusEClass = createEClass(PLUS);\n createEReference(plusEClass, PLUS__LEFT);\n createEReference(plusEClass, PLUS__RIGHT);\n\n minusEClass = createEClass(MINUS);\n createEReference(minusEClass, MINUS__LEFT);\n createEReference(minusEClass, MINUS__RIGHT);\n\n multEClass = createEClass(MULT);\n createEReference(multEClass, MULT__LEFT);\n createEReference(multEClass, MULT__RIGHT);\n\n divEClass = createEClass(DIV);\n createEReference(divEClass, DIV__LEFT);\n createEReference(divEClass, DIV__RIGHT);\n\n varEClass = createEClass(VAR);\n createEAttribute(varEClass, VAR__ID);\n\n letEClass = createEClass(LET);\n createEAttribute(letEClass, LET__ID);\n createEReference(letEClass, LET__BINDING);\n createEReference(letEClass, LET__BODY);\n\n externalUseEClass = createEClass(EXTERNAL_USE);\n createEReference(externalUseEClass, EXTERNAL_USE__EXTERNAL);\n createEReference(externalUseEClass, EXTERNAL_USE__ARGUMENTS);\n\n numEClass = createEClass(NUM);\n createEAttribute(numEClass, NUM__VALUE);\n }",
"public VectorGraphics2D createGraphics() {\n\t\treturn new VectorGraphics2D(new Graphics2DContext(), operations);\n\t}",
"public static void main(String[] args) throws IOException {\n\t\t// create a dataset...\n\t\tDefaultPieDataset data = new DefaultPieDataset();\n\t\tdata.setValue(\"Category 1\", new Double(43.2));\n\t\tdata.setValue(\"Category 2\", new Double(27.9));\n\t\tdata.setValue(\"Category 3\", new Double(79.5));\n\t\t// create a chart\n\t\tJFreeChart chart = ChartFactory.createPieChart(\"Sample Pie Chart\",\n\t\t\t\tdata, true, false, false);\n\t\t// THE FOLLOWING CODE BASED ON THE EXAMPLE IN THE BATIK DOCUMENTATION...\n\t\t// Get a DOMImplementation\n\t\tDOMImplementation domImpl = GenericDOMImplementation\n\t\t\t\t.getDOMImplementation();\n\t\t// Create an instance of org.w3c.dom.Document\n\t\tDocument document = domImpl.createDocument(null, \"svg\", null);\n\t\t// Create an instance of the SVG Generator\n\t\tSVGGraphics2D svgGenerator = new SVGGraphics2D(document);\n\t\t// set the precision to avoid a null pointer exception in Batik 1.5\n\t\tsvgGenerator.getGeneratorContext().setPrecision(6);\n\t\t// Ask the chart to render into the SVG Graphics2D implementation\n\t\tchart.draw(svgGenerator, new Rectangle2D.Double(0, 0, 400, 300), null);\n\t\t// Finally, stream out SVG to a file using UTF-8 character to\n\t\t// byte encoding\n\t\tboolean useCSS = true;\n\t\tWriter out = new OutputStreamWriter(new FileOutputStream(new File(\n\t\t\t\t\"test.svg\")), \"UTF-8\");\n\t\tsvgGenerator.stream(out, useCSS);\n\t}",
"public void createOAGDot(){\r\n\t\ttry {\r\n\t\t\tFileWriter writer = new FileWriter(new File(\"OAGGraph.dot\"));\r\n\t\t\twriter.write(\"digraph G{\\n\");\r\n\t\t\tint subCounter = 0;\r\n\t\t\t// Add all vertices\r\n\t\t\t\r\n\t\t\tfor (IFace iface : interfaces){\r\n\t\t\t\taddOAGDotIFace(iface, writer, subCounter);\r\n\t\t\t\tsubCounter++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (Class cls : classes){\r\n\t\t\t\taddOAGDotCls(cls, writer, subCounter);\r\n\t\t\t\tsubCounter++;\r\n\t\t\t}\r\n\r\n\t\t\t// Add edges\r\n\t\t\tfor (Vertex source : graphEdges.keySet()){\r\n\t\t\t\tString sourceName = source.getParent().getName() + \"_\" + source.getExtVar();\r\n\t\t\t\tHashMap<Vertex, EdgeType> dests = graphEdges.get(source);\r\n\t\t\t\tif (dests != null){\r\n\t\t\t\t\tfor (Vertex dest : dests.keySet()){\r\n\t\t\t\t\t\tString destName = dest.getParent().getName() + \"_\" + dest.getExtVar();\r\n\t\t\t\t\t\tString edgeStr = \"\\t\" + sourceName + \" -> \" + destName;\r\n\t\t\t\t\t\tif (dests.get(dest) == EdgeType.INDIRECT)\r\n\t\t\t\t\t\t\tedgeStr += \"[style=dotted]\";\r\n\t\t\t\t\t\twriter.write(edgeStr + \";\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twriter.write(\"}\");\r\n\t\t\twriter.close();\r\n\t\t}\r\n\t\tcatch (IOException e){\r\n\t\t\tSystem.err.println(\"Error: IOException detected\");\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}",
"public SVGView(String fileName, FileWriter newFile) {\n super(fileName, newFile);\n this.textDescription = this.textualize();\n }",
"public Graphics2D createGraphics() {\n\treturn recorder.createGraphics();\n }",
"private void createGUI() {\r\n\r\n cgRect modelSpace = new cgRect(0, 0, 11, 11);\r\n cgRect deviceSpace = new cgRect(0, 0, 600, 600);\r\n\r\n cgTransformation tr = new cgTransformation(modelSpace, deviceSpace, false, false);\r\n\r\n /**\r\n *\r\n */\r\n // The formatter of axis' labels will use default locale and pattern\r\n NumberFormat nf = NumberFormat.getInstance();\r\n\r\n // We will use \"fixed size\" axis renderer for all axes\r\n \r\n // 参数一:标签刻度长度大小 参数二:标签数字长度大小 参数三:数字和刻度之间的距离大小,长度为像素\r\n cgAxisRenderer ar = new cgFixedSizeAxisRenderer(5, 15, 50, nf);\r\n\r\n // ----------------------------------------------------\r\n // First axis - values match the model coordinates,\r\n // model origin is at 0.0\r\n // ----------------------------------------------------\r\n \r\n // 第三个参数为显示的数字数\r\n cgRect bbox1 = new cgRect(0, 0, 11, 1);\r\n TickGenerator tg1 = new NumericTickGenerator(1.0);\r\n cgAxisShape axis1 = new cgAxisShape(cgAxisShape.NORTH, bbox1, tg1, ar);\r\n\r\n cgShapeListLayer layer = new cgShapeListLayer();\r\n\r\n layer.addShape(axis1);\r\n\r\n /**\r\n *\r\n */\r\n // ----------------------------------------------------\r\n // Create grid using regular grid renderer\r\n // ----------------------------------------------------\r\n cgRect bbox = new cgRect(0, 0, 10, 10);\r\n TickGenerator htg = new NumericTickGenerator(1.0);\r\n TickGenerator vtg = new NumericTickGenerator(1.0);\r\n cgGridRenderer gr = new cgRegularGridRenderer();\r\n cgGridShape grid = new cgGridShape(bbox, htg, vtg, gr);\r\n\r\n // ----------------------------------------------------\r\n // Create view\r\n // ----------------------------------------------------\r\n// cgShapeListLayer layer = new cgShapeListLayer();\r\n// layer.addShape( grid );\r\n cgContainerModel model = new cgContainerModel();\r\n model.setBoundingBox(modelSpace);\r\n model.addLayer(layer);\r\n\r\n cgPlotView view = new cgPlotView(model, tr);\r\n\r\n // ----------------------------------------------------\r\n // Create plot\r\n // ----------------------------------------------------\r\n cgPlot plot = new cgPlot(view);\r\n\r\n plot.addScrollbar(cgGenericPlotLayout.SOUTH);\r\n plot.addScrollbar(cgGenericPlotLayout.EAST);\r\n\r\n getContentPane().add(plot);\r\n\r\n // ----------------------------------------------------\r\n // Set up listeners\r\n // ----------------------------------------------------\r\n // Set window listener\r\n addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent e) {\r\n System.exit(0);\r\n }\r\n });\r\n }",
"public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n modelEClass = createEClass(MODEL);\n createEReference(modelEClass, MODEL__STMTS);\n\n simpleStatementEClass = createEClass(SIMPLE_STATEMENT);\n\n assignmentEClass = createEClass(ASSIGNMENT);\n createEReference(assignmentEClass, ASSIGNMENT__LEFT_HAND_SIDE);\n createEReference(assignmentEClass, ASSIGNMENT__RIGHT_HAND_SIDE);\n\n expressionEClass = createEClass(EXPRESSION);\n\n unaryMinusExpressionEClass = createEClass(UNARY_MINUS_EXPRESSION);\n createEReference(unaryMinusExpressionEClass, UNARY_MINUS_EXPRESSION__SUB);\n\n unaryPlusExpressionEClass = createEClass(UNARY_PLUS_EXPRESSION);\n createEReference(unaryPlusExpressionEClass, UNARY_PLUS_EXPRESSION__SUB);\n\n logicalNegationExpressionEClass = createEClass(LOGICAL_NEGATION_EXPRESSION);\n createEReference(logicalNegationExpressionEClass, LOGICAL_NEGATION_EXPRESSION__SUB);\n\n bracketExpressionEClass = createEClass(BRACKET_EXPRESSION);\n createEReference(bracketExpressionEClass, BRACKET_EXPRESSION__SUB);\n\n pointerCallEClass = createEClass(POINTER_CALL);\n\n variableCallEClass = createEClass(VARIABLE_CALL);\n createEAttribute(variableCallEClass, VARIABLE_CALL__NAME);\n\n arraySpecifierEClass = createEClass(ARRAY_SPECIFIER);\n\n unarySpecifierEClass = createEClass(UNARY_SPECIFIER);\n createEAttribute(unarySpecifierEClass, UNARY_SPECIFIER__INDEX);\n\n rangeSpecifierEClass = createEClass(RANGE_SPECIFIER);\n createEAttribute(rangeSpecifierEClass, RANGE_SPECIFIER__FROM);\n createEAttribute(rangeSpecifierEClass, RANGE_SPECIFIER__TO);\n\n ioFunctionsEClass = createEClass(IO_FUNCTIONS);\n createEAttribute(ioFunctionsEClass, IO_FUNCTIONS__FILE_NAME);\n\n infoFunctionsEClass = createEClass(INFO_FUNCTIONS);\n\n manipFunctionsEClass = createEClass(MANIP_FUNCTIONS);\n\n arithFunctionsEClass = createEClass(ARITH_FUNCTIONS);\n createEReference(arithFunctionsEClass, ARITH_FUNCTIONS__EXPRESSION);\n createEReference(arithFunctionsEClass, ARITH_FUNCTIONS__FIELD);\n createEReference(arithFunctionsEClass, ARITH_FUNCTIONS__WHERE_EXPRESSION);\n\n loadEClass = createEClass(LOAD);\n\n storeEClass = createEClass(STORE);\n createEReference(storeEClass, STORE__EXPRESSION);\n\n exportEClass = createEClass(EXPORT);\n createEReference(exportEClass, EXPORT__EXPRESSION);\n\n printEClass = createEClass(PRINT);\n createEReference(printEClass, PRINT__EXPRESSION);\n\n depthEClass = createEClass(DEPTH);\n createEReference(depthEClass, DEPTH__EXPRESSION);\n\n fieldInfoEClass = createEClass(FIELD_INFO);\n createEReference(fieldInfoEClass, FIELD_INFO__EXPRESSION);\n\n containsEClass = createEClass(CONTAINS);\n createEReference(containsEClass, CONTAINS__KEYS);\n createEReference(containsEClass, CONTAINS__RIGHT);\n\n selectEClass = createEClass(SELECT);\n createEReference(selectEClass, SELECT__FIELDS);\n createEReference(selectEClass, SELECT__FROM_EXPRESSION);\n createEReference(selectEClass, SELECT__WHERE_EXPRESSION);\n\n lengthEClass = createEClass(LENGTH);\n createEReference(lengthEClass, LENGTH__EXPRESSION);\n\n sumEClass = createEClass(SUM);\n\n productEClass = createEClass(PRODUCT);\n\n constantEClass = createEClass(CONSTANT);\n\n primitiveEClass = createEClass(PRIMITIVE);\n createEAttribute(primitiveEClass, PRIMITIVE__STR);\n createEAttribute(primitiveEClass, PRIMITIVE__INT_NUM);\n createEAttribute(primitiveEClass, PRIMITIVE__FLOAT_NUM);\n createEAttribute(primitiveEClass, PRIMITIVE__BOOL);\n createEAttribute(primitiveEClass, PRIMITIVE__NIL);\n\n arrayEClass = createEClass(ARRAY);\n createEReference(arrayEClass, ARRAY__VALUES);\n\n jSonObjectEClass = createEClass(JSON_OBJECT);\n createEReference(jSonObjectEClass, JSON_OBJECT__FIELDS);\n\n fieldEClass = createEClass(FIELD);\n createEReference(fieldEClass, FIELD__KEY);\n createEReference(fieldEClass, FIELD__VALUE);\n\n disjunctionExpressionEClass = createEClass(DISJUNCTION_EXPRESSION);\n createEReference(disjunctionExpressionEClass, DISJUNCTION_EXPRESSION__LEFT);\n createEReference(disjunctionExpressionEClass, DISJUNCTION_EXPRESSION__RIGHT);\n\n conjunctionExpressionEClass = createEClass(CONJUNCTION_EXPRESSION);\n createEReference(conjunctionExpressionEClass, CONJUNCTION_EXPRESSION__LEFT);\n createEReference(conjunctionExpressionEClass, CONJUNCTION_EXPRESSION__RIGHT);\n\n equalityExpressionEClass = createEClass(EQUALITY_EXPRESSION);\n createEReference(equalityExpressionEClass, EQUALITY_EXPRESSION__LEFT);\n createEReference(equalityExpressionEClass, EQUALITY_EXPRESSION__RIGHT);\n\n inequalityExpressionEClass = createEClass(INEQUALITY_EXPRESSION);\n createEReference(inequalityExpressionEClass, INEQUALITY_EXPRESSION__LEFT);\n createEReference(inequalityExpressionEClass, INEQUALITY_EXPRESSION__RIGHT);\n\n superiorExpressionEClass = createEClass(SUPERIOR_EXPRESSION);\n createEReference(superiorExpressionEClass, SUPERIOR_EXPRESSION__LEFT);\n createEReference(superiorExpressionEClass, SUPERIOR_EXPRESSION__RIGHT);\n\n superiorOrEqualExpressionEClass = createEClass(SUPERIOR_OR_EQUAL_EXPRESSION);\n createEReference(superiorOrEqualExpressionEClass, SUPERIOR_OR_EQUAL_EXPRESSION__LEFT);\n createEReference(superiorOrEqualExpressionEClass, SUPERIOR_OR_EQUAL_EXPRESSION__RIGHT);\n\n inferiorExpressionEClass = createEClass(INFERIOR_EXPRESSION);\n createEReference(inferiorExpressionEClass, INFERIOR_EXPRESSION__LEFT);\n createEReference(inferiorExpressionEClass, INFERIOR_EXPRESSION__RIGHT);\n\n inferiorOrEqualExpressionEClass = createEClass(INFERIOR_OR_EQUAL_EXPRESSION);\n createEReference(inferiorOrEqualExpressionEClass, INFERIOR_OR_EQUAL_EXPRESSION__LEFT);\n createEReference(inferiorOrEqualExpressionEClass, INFERIOR_OR_EQUAL_EXPRESSION__RIGHT);\n\n additionExpressionEClass = createEClass(ADDITION_EXPRESSION);\n createEReference(additionExpressionEClass, ADDITION_EXPRESSION__LEFT);\n createEReference(additionExpressionEClass, ADDITION_EXPRESSION__RIGHT);\n\n substractionExpressionEClass = createEClass(SUBSTRACTION_EXPRESSION);\n createEReference(substractionExpressionEClass, SUBSTRACTION_EXPRESSION__LEFT);\n createEReference(substractionExpressionEClass, SUBSTRACTION_EXPRESSION__RIGHT);\n\n multiplicationExpressionEClass = createEClass(MULTIPLICATION_EXPRESSION);\n createEReference(multiplicationExpressionEClass, MULTIPLICATION_EXPRESSION__LEFT);\n createEReference(multiplicationExpressionEClass, MULTIPLICATION_EXPRESSION__RIGHT);\n\n divisionExpressionEClass = createEClass(DIVISION_EXPRESSION);\n createEReference(divisionExpressionEClass, DIVISION_EXPRESSION__LEFT);\n createEReference(divisionExpressionEClass, DIVISION_EXPRESSION__RIGHT);\n\n moduloExpressionEClass = createEClass(MODULO_EXPRESSION);\n createEReference(moduloExpressionEClass, MODULO_EXPRESSION__LEFT);\n createEReference(moduloExpressionEClass, MODULO_EXPRESSION__RIGHT);\n\n arrayCallEClass = createEClass(ARRAY_CALL);\n createEReference(arrayCallEClass, ARRAY_CALL__CALLEE);\n createEReference(arrayCallEClass, ARRAY_CALL__SPECIFIER);\n\n fieldCallEClass = createEClass(FIELD_CALL);\n createEReference(fieldCallEClass, FIELD_CALL__CALLEE);\n createEAttribute(fieldCallEClass, FIELD_CALL__FIELD);\n }",
"TGG createTGG();",
"public static void main(String[] args) throws Exception {\n String svg_URI_input = Paths.get(\"chessboard.svg\").toUri().toURL().toString();\n TranscoderInput input_svg_image = new TranscoderInput(svg_URI_input);\n //Step-2: Define OutputStream to PNG Image and attach to TranscoderOutput\n OutputStream png_ostream = new FileOutputStream(\"chessboard.png\");\n TranscoderOutput output_png_image = new TranscoderOutput(png_ostream);\n // Step-3: Create PNGTranscoder and define hints if required\n PNGTranscoder my_converter = new PNGTranscoder();\n // Step-4: Convert and Write output\n my_converter.transcode(input_svg_image, output_png_image);\n // Step 5- close / flush Output Stream\n png_ostream.flush();\n png_ostream.close();\n }",
"private String drawSingleShape(String name, ShapeType type, List<Shape> motions) {\n StringBuilder svg = new StringBuilder();\n Shape initShape = motions.get(0);\n\n if (isRectangleOrSquare(type)) {\n svg.append(\"<rect \");\n\n svg.append(\"id=\\\"\").append(name).append(\"\\\" \").append(\"x=\\\"\")\n .append(initShape.getPosition().getX()).append(\"\\\" \").append(\"y=\\\"\")\n .append(initShape.getPosition().getY()).append(\"\\\" \").append(\"width=\\\"\")\n .append(initShape.getWidth()).append(\"\\\" \").append(\"height=\\\"\")\n .append(initShape.getHeight()).append(\"\\\" \").append(\"fill=\\\"rgb(\")\n .append(initShape.getRValue()).append(\",\").append(initShape.getGValue()).append(\",\")\n .append(initShape.getBValue()).append(\")\\\" visibility=\\\"visible\\\">\\n\");\n } else {\n svg.append(\"<ellipse \");\n\n svg.append(\"id=\\\"\").append(name).append(\"\\\" \").append(\"cx=\\\"\")\n .append(initShape.getPosition().getX()).append(\"\\\" \").append(\"cy=\\\"\")\n .append(initShape.getPosition().getY()).append(\"\\\" \").append(\"rx=\\\"\")\n .append(initShape.getWidth()).append(\"\\\" \").append(\"ry=\\\"\")\n .append(initShape.getHeight()).append(\"\\\" \").append(\"fill=\\\"rgb(\")\n .append(initShape.getRValue()).append(\",\").append(initShape.getGValue()).append(\",\")\n .append(initShape.getBValue()).append(\")\\\" visibility=\\\"visible\\\">\\n\");\n }\n\n for (int i = 1; i < motions.size(); i++) {\n\n Shape prevMotion = motions.get(i - 1);\n Shape currMotion = motions.get(i);\n\n if (this.isRectangleOrSquare(type)) {\n svg.append(\"<animate attributeType=\\\"xml\\\" begin=\\\"\")\n .append((prevMotion.getTime() / this.speed) * 1000).append(\"ms\\\" dur=\\\"\")\n .append((((currMotion.getTime() - prevMotion.getTime()) / this.speed) * 1000))\n .append(\"ms\\\" \")\n .append(\"attributeName=\\\"x\\\" from=\\\"\").append(prevMotion.getPosition().getX())\n .append(\"\\\"\").append(\" to=\\\"\")\n .append(currMotion.getPosition().getX()).append(\"\\\"\").append(\" fill=\\\"freeze\\\"/>\\n\")\n .append(\"<animate attributeType=\\\"xml\\\" begin=\\\"\")\n .append((prevMotion.getTime() / this.speed) * 1000)\n .append(\"ms\\\" dur=\\\"\")\n .append((((currMotion.getTime() - prevMotion.getTime()) / this.speed) * 1000))\n .append(\"ms\\\" \")\n .append(\"attributeName=\\\"y\\\" from=\\\"\").append(prevMotion.getPosition().getY())\n .append(\"\\\"\").append(\" to=\\\"\").append(currMotion.getPosition().getY()).append(\"\\\"\")\n .append(\" fill=\\\"freeze\\\"/>\\n\")\n .append(\"<animate attributeType=\\\"xml\\\" begin=\\\"\")\n .append((prevMotion.getTime() / this.speed) * 1000)\n .append(\"ms\\\" dur=\\\"\")\n .append((((currMotion.getTime() - prevMotion.getTime()) / this.speed) * 1000))\n .append(\"ms\\\" \")\n .append(\"attributeName=\\\"width\\\" from=\\\"\").append(prevMotion.getWidth())\n .append(\"\\\"\").append(\" to=\\\"\").append(currMotion.getWidth()).append(\"\\\"\")\n .append(\" fill=\\\"freeze\\\"/>\\n\")\n .append(\"<animate attributeType=\\\"xml\\\" begin=\\\"\")\n .append((prevMotion.getTime() / this.speed) * 1000)\n .append(\"ms\\\" dur=\\\"\")\n .append((((currMotion.getTime() - prevMotion.getTime()) / this.speed) * 1000))\n .append(\"ms\\\" \")\n .append(\"attributeName=\\\"height\\\" from=\\\"\").append(prevMotion.getHeight())\n .append(\"\\\"\").append(\" to=\\\"\").append(currMotion.getHeight()).append(\"\\\"\")\n .append(\" fill=\\\"freeze\\\"/>\\n\")\n .append(\"<animate attributeType=\\\"xml\\\" begin=\\\"\")\n .append((prevMotion.getTime() / this.speed) * 1000)\n .append(\"ms\\\" dur=\\\"\")\n .append((((currMotion.getTime() - prevMotion.getTime()) / this.speed) * 1000))\n .append(\"ms\\\" \")\n .append(\"attributeName=\\\"fill\\\" from=\").append(\"\\\"rgb(\")\n .append(prevMotion.getRValue()).append(\",\").append(prevMotion.getGValue()).append(\",\")\n .append(prevMotion.getBValue()).append(\")\\\"\")\n .append(\" to=\").append(\"\\\"rgb(\")\n .append(currMotion.getRValue()).append(\",\").append(currMotion.getGValue()).append(\",\")\n .append(currMotion.getBValue()).append(\")\\\"/>\").append(\"\\n\");\n } else {\n\n svg.append(\"<animate attributeType=\\\"xml\\\" begin=\\\"\")\n .append((prevMotion.getTime() / this.speed) * 1000).append(\"ms\\\" dur=\\\"\")\n .append((((currMotion.getTime() - prevMotion.getTime()) / this.speed) * 1000))\n .append(\"ms\\\" \")\n .append(\"attributeName=\\\"cx\\\" from=\\\"\").append(prevMotion.getPosition().getX())\n .append(\"\\\"\").append(\" to=\\\"\")\n .append(currMotion.getPosition().getX()).append(\"\\\"\").append(\" fill=\\\"freeze\\\"/>\\n\")\n .append(\"<animate attributeType=\\\"xml\\\" begin=\\\"\")\n .append((prevMotion.getTime() / this.speed) * 1000)\n .append(\"ms\\\" dur=\\\"\")\n .append((((currMotion.getTime() - prevMotion.getTime()) / this.speed) * 1000))\n .append(\"ms\\\" \")\n .append(\"attributeName=\\\"cy\\\" from=\\\"\").append(prevMotion.getPosition().getY())\n .append(\"\\\"\").append(\" to=\\\"\").append(currMotion.getPosition().getY()).append(\"\\\"\")\n .append(\" fill=\\\"freeze\\\"/>\\n\").append(\"<animate attributeType=\\\"xml\\\" begin=\\\"\")\n .append((prevMotion.getTime() / this.speed) * 1000)\n .append(\"ms\\\" dur=\\\"\")\n .append(((currMotion.getTime() - prevMotion.getTime()) / this.speed) * 1000)\n .append(\"ms\\\" \")\n .append(\"attributeName=\\\"rx\\\" from=\\\"\").append(prevMotion.getWidth())\n .append(\"\\\"\").append(\" to=\\\"\").append(currMotion.getWidth()).append(\"\\\"\")\n .append(\" fill=\\\"freeze\\\"/>\\n\")\n .append(\"<animate attributeType=\\\"xml\\\" begin=\\\"\")\n .append((prevMotion.getTime() / this.speed) * 1000)\n .append(\"ms\\\" dur=\\\"\")\n .append((((currMotion.getTime() - prevMotion.getTime()) / this.speed) * 1000))\n .append(\"ms\\\" \")\n .append(\"attributeName=\\\"ry\\\" from=\\\"\").append(prevMotion.getHeight())\n .append(\"\\\"\").append(\" to=\\\"\").append(currMotion.getHeight()).append(\"\\\"\")\n .append(\" fill=\\\"freeze\\\"/>\\n\")\n .append(\"<animate attributeType=\\\"xml\\\" begin=\\\"\")\n .append((prevMotion.getTime() / this.speed) * 1000)\n .append(\"ms\\\" dur=\\\"\")\n .append((((currMotion.getTime() - prevMotion.getTime()) / this.speed) * 1000))\n .append(\"ms\\\" \")\n .append(\"attributeName=\\\"fill\\\" from=\").append(\"\\\"rgb(\")\n .append(prevMotion.getRValue()).append(\",\").append(prevMotion.getGValue()).append(\",\")\n .append(prevMotion.getBValue()).append(\")\\\"\")\n .append(\" to=\").append(\"\\\"rgb(\")\n .append(currMotion.getRValue()).append(\",\").append(currMotion.getGValue()).append(\",\")\n .append(currMotion.getBValue()).append(\")\\\"/>\").append(\"\\n\");\n }\n\n }\n\n if (this.isRectangleOrSquare(type)) {\n svg.append(\"</rect>\");\n } else {\n svg.append(\"</ellipse>\");\n }\n return svg.toString();\n }",
"private void generateUniverse(Universe universe) throws SAXException{\n saver.addAttribute(\"version\", XmlSaver.CDATA, version+\"\");\n saver.startTag(\"universe\");\n saver.startTag(\"content\");\n generateBackground(universe);\n generateLimits(universe);\n generateLights(universe);\n generateComponents(universe);\n saver.closeTag(\"content\");\n saver.closeTag(\"universe\");\n }",
"public SVCustom build(){\n if(this.disks < 1) return new SVCustom();\n SVCustom s = new SVCustom(new Point(100, (int)Math.pow(2, this.disks)*104 - 52));\n int left[] = new int[]{0,1};\n int right[] = new int[]{1,2};\n int bottom[] = new int[]{0,2};\n SierpinskiTriangle t = new SierpinskiTriangle(0,this.disks,this.disks-1, left, right, bottom, buildInitial(this.disks));\n s.setAttribute(\"font-family\", \"Arial\");\n s.addContent(t, \"Triangle\");\n return s;\n }",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\txActivityDiagramArbiterEClass = createEClass(XACTIVITY_DIAGRAM_ARBITER);\n\n\t\txActivityDiagramArbiterStateEClass = createEClass(XACTIVITY_DIAGRAM_ARBITER_STATE);\n\n\t\txActivityDiagramArbiterTransitionEClass = createEClass(XACTIVITY_DIAGRAM_ARBITER_TRANSITION);\n\t}",
"private void generateComponents(Universe universe) throws SAXException {\n ArrayList<MainSceneComponent> components = universe.getScene().getComponentArray();\n for (int i = 0; i < components.size(); i++) {\n saver.addAttribute(\"src\", XmlSaver.CDATA, relativePath(components.get(i).getSource().getAbsolutePath()));\n saver.addAttribute(\"type\", XmlSaver.CDATA, components.get(i).getType().name());\n saver.startTag(\"object\");\n saver.startTag(\"name\", \"\"+components.get(i).getComponentName());\n saver.startTag(\"scale\", String.valueOf(components.get(i).getScale()));\n saver.startTag(\"location\", Converter.tuple3dToString(components.get(i).getPosition()));\n saver.startTag(\"rotation\", Converter.tuple3dToString(components.get(i).getRotation()));\n saver.closeTag(\"object\");\n }\n }",
"public View getGraphic()\n{\n // Get image for file\n //Image img = _type==FileType.PACKAGE_DIR? Package : ViewUtils.getFileIconImage(_file);\n Image img = ViewUtils.getFileIconImage(_file);\n View grf = new ImageView(img); grf.setPrefSize(18,18);\n \n // If error/warning add Error/Warning badge as composite icon\n /*BuildIssue.Kind status = _proj!=null? _proj.getRootProject().getBuildIssues().getBuildStatus(_file) : null;\n if(status!=null) {\n Image badge = status==BuildIssue.Kind.Error? ErrorBadge : WarningBadge;\n ImageView bview = new ImageView(badge); bview.setLean(Pos.BOTTOM_LEFT);\n StackView spane = new StackView(); spane.setChildren(grf, bview); grf = spane;\n }*/\n \n // Return node\n return grf;\n}",
"public String getAsSVGPath() {\n\n\t\tString d=\"M \"+topleft.x +\",\"+topleft.y+\" \"\n\t\t\t\t+\"L \"+bottomright.x+\",\"+topleft.y+\" \"\n\t\t\t\t+\"L \"+bottomright.x+\",\"+bottomright.y+\" \"\n\t\t\t\t+\"L \"+topleft.x +\",\"+bottomright.y+\" z\";\n\n\n\t\treturn d;\n\t}",
"private void generate() throws FileNotFoundException {\n if (clazz.isInterface())\n generateInterface();\n writer.close();\n }",
"public void generateAndwriteToFile() {\n List<GeneratedJavaFile> gjfs = generate();\n if (gjfs == null || gjfs.size() == 0) {\n return;\n }\n for (GeneratedJavaFile gjf : gjfs) {\n writeToFile(gjf);\n }\n }",
"private JFXHelper() {}",
"public void createPackageContents() {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n calcEClass = createEClass(CALC);\n createEReference(calcEClass, CALC__EXPR);\n\n exprEClass = createEClass(EXPR);\n\n bitShiftExprEClass = createEClass(BIT_SHIFT_EXPR);\n createEReference(bitShiftExprEClass, BIT_SHIFT_EXPR__CHILDREN);\n createEAttribute(bitShiftExprEClass, BIT_SHIFT_EXPR__OPERATORS);\n\n bitShiftExprChildEClass = createEClass(BIT_SHIFT_EXPR_CHILD);\n\n additiveExprEClass = createEClass(ADDITIVE_EXPR);\n createEReference(additiveExprEClass, ADDITIVE_EXPR__CHILDREN);\n createEAttribute(additiveExprEClass, ADDITIVE_EXPR__OPERATORS);\n\n additiveExprChildEClass = createEClass(ADDITIVE_EXPR_CHILD);\n\n multiplicativeExprEClass = createEClass(MULTIPLICATIVE_EXPR);\n createEReference(multiplicativeExprEClass, MULTIPLICATIVE_EXPR__CHILDREN);\n createEAttribute(multiplicativeExprEClass, MULTIPLICATIVE_EXPR__OPERATORS);\n\n multiplicativeExprChildEClass = createEClass(MULTIPLICATIVE_EXPR_CHILD);\n\n numberEClass = createEClass(NUMBER);\n createEAttribute(numberEClass, NUMBER__VALUE);\n\n // Create enums\n bitShiftOpEEnum = createEEnum(BIT_SHIFT_OP);\n additiveOpEEnum = createEEnum(ADDITIVE_OP);\n multiplicativeOpEEnum = createEEnum(MULTIPLICATIVE_OP);\n }",
"public void createPackageContents() {\r\n\t\tif (isCreated) return;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tgemmaEClass = createEClass(GEMMA);\r\n\t\tcreateEReference(gemmaEClass, GEMMA__MACRO_OMS);\r\n\t\tcreateEReference(gemmaEClass, GEMMA__TRANSICIONES);\r\n\t\tcreateEReference(gemmaEClass, GEMMA__VARIABLES_GEMMA);\r\n\r\n\t\tmacroOmEClass = createEClass(MACRO_OM);\r\n\t\tcreateEAttribute(macroOmEClass, MACRO_OM__NAME);\r\n\t\tcreateEAttribute(macroOmEClass, MACRO_OM__TIPO);\r\n\t\tcreateEReference(macroOmEClass, MACRO_OM__OMS);\r\n\r\n\t\tomEClass = createEClass(OM);\r\n\t\tcreateEAttribute(omEClass, OM__NAME);\r\n\t\tcreateEAttribute(omEClass, OM__TIPO);\r\n\t\tcreateEAttribute(omEClass, OM__ES_OM_RAIZ);\r\n\t\tcreateEReference(omEClass, OM__VARIABLES_OM);\r\n\t\tcreateEAttribute(omEClass, OM__ES_VISIBLE);\r\n\r\n\t\ttrasicionEntreOmOmEClass = createEClass(TRASICION_ENTRE_OM_OM);\r\n\t\tcreateEReference(trasicionEntreOmOmEClass, TRASICION_ENTRE_OM_OM__ORIGEN);\r\n\t\tcreateEReference(trasicionEntreOmOmEClass, TRASICION_ENTRE_OM_OM__DESTINO);\r\n\r\n\t\ttransicionEntreMacroOmOmEClass = createEClass(TRANSICION_ENTRE_MACRO_OM_OM);\r\n\t\tcreateEReference(transicionEntreMacroOmOmEClass, TRANSICION_ENTRE_MACRO_OM_OM__ORIGEN);\r\n\t\tcreateEReference(transicionEntreMacroOmOmEClass, TRANSICION_ENTRE_MACRO_OM_OM__DESTINO);\r\n\r\n\t\texpresionBinariaEClass = createEClass(EXPRESION_BINARIA);\r\n\t\tcreateEReference(expresionBinariaEClass, EXPRESION_BINARIA__EXPRESION_IZQUIERDA);\r\n\t\tcreateEReference(expresionBinariaEClass, EXPRESION_BINARIA__EXPRESION_DERECHA);\r\n\t\tcreateEAttribute(expresionBinariaEClass, EXPRESION_BINARIA__OPERADOR);\r\n\r\n\t\telementoExpresionEClass = createEClass(ELEMENTO_EXPRESION);\r\n\r\n\t\tvariableOmEClass = createEClass(VARIABLE_OM);\r\n\t\tcreateEAttribute(variableOmEClass, VARIABLE_OM__NAME);\r\n\r\n\t\ttransicionEClass = createEClass(TRANSICION);\r\n\t\tcreateEAttribute(transicionEClass, TRANSICION__NAME);\r\n\t\tcreateEReference(transicionEClass, TRANSICION__ELEMENTO_EXPRESION);\r\n\r\n\t\tvariableGemmaEClass = createEClass(VARIABLE_GEMMA);\r\n\t\tcreateEAttribute(variableGemmaEClass, VARIABLE_GEMMA__NAME);\r\n\r\n\t\trefVariableGemmaEClass = createEClass(REF_VARIABLE_GEMMA);\r\n\t\tcreateEReference(refVariableGemmaEClass, REF_VARIABLE_GEMMA__VARIABLE_GEMMA);\r\n\t\tcreateEAttribute(refVariableGemmaEClass, REF_VARIABLE_GEMMA__NIVEL_DE_ESCRITURA);\r\n\r\n\t\texpresionNotEClass = createEClass(EXPRESION_NOT);\r\n\t\tcreateEReference(expresionNotEClass, EXPRESION_NOT__ELEMENTO_EXPRESION);\r\n\r\n\t\trefVariableOmEClass = createEClass(REF_VARIABLE_OM);\r\n\t\tcreateEReference(refVariableOmEClass, REF_VARIABLE_OM__VARIABLE_OM);\r\n\r\n\t\texpresionConjuntaEClass = createEClass(EXPRESION_CONJUNTA);\r\n\t\tcreateEReference(expresionConjuntaEClass, EXPRESION_CONJUNTA__ELEMENTO_EXPRESION);\r\n\r\n\t\t// Create enums\r\n\t\ttipoOmEEnum = createEEnum(TIPO_OM);\r\n\t\ttipoMacroOmEEnum = createEEnum(TIPO_MACRO_OM);\r\n\t\ttipoOperadorEEnum = createEEnum(TIPO_OPERADOR);\r\n\t\tnivelDeEscrituraEEnum = createEEnum(NIVEL_DE_ESCRITURA);\r\n\t}",
"@Test\n public void SVGViewTest1() throws FileNotFoundException {\n AnimatorModel model;\n String filename = \"toh-3.txt\";\n Readable inFile = new FileReader(filename);\n\n AnimationBuilder<AnimatorModel> builder =\n new AnimationBuilderImpl();\n\n model = AnimationReader.parseFile(inFile, builder);\n SVGView view = new SVGView(model, filename, 1);\n assertEquals(\"<svg width=\\\"410\\\" height=\\\"220\\\" viewBox=\\\"145 50 555 270\\\" \"\n + \"version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"\n + \"<rect id=\\\"disk1\\\" x=\\\"190\\\" y=\\\"180\\\" width=\\\"20\\\" height=\\\"30\\\" fill=\\\"\"\n + \"rgb(0,49,90)\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" attributeName=\\\"x\\\" \"\n + \"from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" attributeName=\\\"y\\\" \"\n + \"from=\\\"180.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"24000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"24000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"25000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"25000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"35000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"35000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"36000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"36000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"46000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"46000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"47000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"47000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"57000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"57000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"89000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"89000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"99000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"99000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"100000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"100000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"110000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"110000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"111000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"111000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"121000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"121000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"153000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"153000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"163000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"163000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"164000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"164000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"174000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"174000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"175000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"175000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"185000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"185000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"217000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"217000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"227000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"227000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"228000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"228000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"238000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"238000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"239000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"239000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"CSS\\\" begin=\\\"249000.0ms\\\" dur=\\\"8000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(0,49,90)\\\" to=\\\"rgb(0,255,0)\\\" fill=\\\"freeze\\\" \"\n + \"/>\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"257000.0ms\\\" dur=\\\"45000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"257000.0ms\\\" dur=\\\"45000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"<rect id=\\\"disk2\\\" x=\\\"167\\\" y=\\\"210\\\" width=\\\"65\\\" height=\\\"30\\\" \"\n + \"fill=\\\"rgb(6,247,41)\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"56000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"56000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"57000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"57000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"67000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"67000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"68000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"68000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"78000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"78000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"79000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"79000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"89000.0ms\\\" dur=\\\"96000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"89000.0ms\\\" dur=\\\"96000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"185000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"185000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"195000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"195000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"196000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"196000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"206000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"467.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"206000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"207000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"467.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"207000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"CSS\\\" begin=\\\"217000.0ms\\\" dur=\\\"8000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(6,247,41)\\\" to=\\\"rgb(0,255,0)\\\" fill=\\\"freeze\\\" \"\n + \"/>\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"225000.0ms\\\" dur=\\\"77000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"467.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"225000.0ms\\\" dur=\\\"77000.0ms\\\"\"\n + \" attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"<rect id=\\\"disk3\\\" x=\\\"145\\\" y=\\\"240\\\" width=\\\"110\\\" height=\\\"30\\\" \"\n + \"fill=\\\"rgb(11,45,175)\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"120000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"120000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"121000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"121000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"131000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"131000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"132000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"132000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"142000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"445.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"142000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"143000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"445.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"143000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"CSS\\\" begin=\\\"153000.0ms\\\" dur=\\\"8000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(11,45,175)\\\" to=\\\"rgb(0,255,0)\\\" fill=\\\"freeze\\\"\"\n + \" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"161000.0ms\\\" dur=\\\"141000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"445.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"161000.0ms\\\" dur=\\\"141000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"</svg>\", view.getViewState());\n }",
"public static void main1(String args[]) {\n\t\tString commandString = \"\";\n\t\tfor (String arg : args) {\n\t\t\tcommandString += arg;\n\t\t\t/*\n\t\t\t * FileReader fr = null; try {fr = new FileReader(commandString); }\n\t\t\t * catch (FileNotFoundException fnfex) {System.err.println(\"File \"\n\t\t\t * + commandString + \" not found\"); return; }\n\t\t\t */\n\t\t}\n\n\t\tboolean showToolbar = true;\n\t\tboolean showMenu = true;\n\t\tString svgurl = null;\n\t\t// create the applet with the svg-url as argument\n\n\t\tViewer viewer = new Viewer();\n\t\tviewer.invokedStandalone = true;\n\t\tif (svgurl != null) {\n\t\t\tviewer.svgfile = svgurl;\n\t\t}\n\t\tviewer.setShowToolbar(showToolbar);\n\t\tviewer.setShowMenu(showMenu);\n\n\t\t// Context cx = Context.enter();\n\t\t// viewer.setContext(Context.enter());\n\t\t// Scriptable scope = cx.initStandardObjects(null);\n\t\t// viewer.setScope(viewer.getContext().initStandardObjects(new\n\t\t// ImporterTopLevel()));\n\n\t\tJFrame f = new JFrame(viewer.title);\n\t\tf.setBounds(20, 20, 750, 750);\n\t\tf.getContentPane().add(viewer, \"Center\");\n\t\tviewer.frame = f;\n\t\tviewer.init();\n\n\t\tf.addWindowListener(new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\tf.show();\n\n\t\t// zoom to all entities and draw canvas\n\n\t\t// viewer.canvas.fitToWindow();\n\t\t// viewer.canvas.draw();\n\n\t\t/*\n\t\t * Scriptable jsArgs = Context.toObject(viewer,viewer.getScope());\n\t\t * viewer.getScope().put(\"viewer\", viewer.getScope(), jsArgs); //String\n\t\t * commandString =\n\t\t * \"var i = 3; function foo() {i += 1; java.lang.System.out.println(i); i+= 2; java.lang.System.out.println(i);} foo(); viewer.setShowMenu(false); viewer.setShowToolbar(false); viewer.canvas.fitToWindow(); viewer.canvas.draw();viewer.svgfile=\\\"arc.svg\\\";\"\n\t\t * ; Object result = null; try { // result =\n\t\t * cx.evaluateString(scope,commandString,\"<cmd>\",1,null); result =\n\t\t * viewer.getContext().evaluateReader(viewer.getScope(),fr,commandString\n\t\t * ,1,null);// String(getScope(),commandString,\"<cmd>\",1,null);\n\t\t * System.out.println(viewer.getContext().toString(result)); }\n\t\t * catch(JavaScriptException jseex) {\n\t\t * System.err.println(\"Exception caught: \" + jseex.getMessage());\n\t\t * return; } catch (IOException ioex) {\n\t\t * System.err.println(\"IOException reading from file \" + commandString);\n\t\t * return; } Context.exit();\n\t\t */\n\t\tviewer.scriptFrame.loadDocument(commandString);\n\t}",
"@Test\r\n public void testInjest() throws Exception {\r\n System.out.println(\"injest\");\r\n String doc = \"crowd.xml\";\r\n ImageWord word = new ImageWord();\r\n word.setUrl(doc);\r\n ImageTextSource source = new ImageTextSource();\r\n Set sourceSet = new HashSet();\r\n sourceSet.add(\"crowd\");\r\n source.setWordSet(sourceSet);\r\n word.setTextSrc(source);\r\n word.setType(\"svg\");\r\n word.setDataSource(\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" version=\\\"1.0\\\" x=\\\"0px\\\" y=\\\"0px\\\" width=\\\"100px\\\" height=\\\"100px\\\" viewBox=\\\"0 0 100 100\\\" enable-background=\\\"new 0 0 100 100\\\" xml:space=\\\"preserve\\\">\\n\" +\r\n \"<path d=\\\"M19.453,27.837c3.151,0,5.698-2.551,5.698-5.697c0-3.15-2.546-5.702-5.698-5.702 c-3.15,0-5.696,2.551-5.696,5.702C13.757,25.286,16.303,27.837,19.453,27.837z\\\"/>\\n\" +\r\n \"<circle cx=\\\"81.189\\\" cy=\\\"22.138\\\" r=\\\"5.699\\\"/>\\n\" +\r\n \"<path d=\\\"M50.35,27.837c3.147,0,5.697-2.551,5.697-5.697c0-3.15-2.55-5.702-5.697-5.702 c-3.151,0-5.702,2.551-5.702,5.702C44.648,25.286,47.199,27.837,50.35,27.837z\\\"/>\\n\" +\r\n \"<circle cx=\\\"81.189\\\" cy=\\\"22.138\\\" r=\\\"5.699\\\"/>\\n\" +\r\n \"<path d=\\\"M89.036,35.577l9.913-11.868c1.292-1.549,1.085-3.858-0.467-5.151c-1.551-1.293-3.85-1.086-5.146,0.462 c0,0-7.637,9.068-7.658,9.057c-1.274,1.124-2.936,1.811-4.763,1.811c-1.71,0-3.278-0.597-4.507-1.59 c-0.019,0.007-0.01,0.004-0.006,0l-7.873-9.277c-0.771-0.923-1.904-1.366-3.019-1.301c-1.116-0.064-2.242,0.378-3.018,1.301 c0,0-7.637,9.068-7.654,9.057c-1.273,1.124-2.939,1.811-4.763,1.811c-1.709,0-3.278-0.597-4.507-1.59h-0.004l-7.875-9.277 c-0.78-0.93-1.92-1.372-3.044-1.301c-1.128-0.071-2.274,0.371-3.045,1.301c0,0-7.64,9.068-7.658,9.057 c-1.273,1.124-2.939,1.811-4.768,1.811c-1.71,0-3.274-0.597-4.507-1.59l-7.878-9.277c-1.292-1.549-3.596-1.756-5.146-0.462 c-1.552,1.292-1.755,3.602-0.463,5.151L11.61,36.194v12.185c0,0.337,0.026,0.661,0.071,0.987l-1.595,30.765 c-0.146,2.055,1.405,3.838,3.458,3.979c2.054,0.141,3.834-1.401,3.975-3.459l1.269-24.463c0.224,0.017,0.44,0.035,0.665,0.035 c0.273,0,0.542-0.014,0.807-0.044l1.679,24.472c0.137,2.058,1.921,3.6,3.978,3.459c2.05-0.142,3.605-1.925,3.46-3.979 l-2.124-30.939c0.026-0.267,0.044-0.541,0.044-0.813V35.577l7.35-8.799l7.861,9.417v2.594L39,62.291h2.903l-0.925,17.84 c-0.141,2.055,1.405,3.838,3.458,3.979c2.058,0.141,3.842-1.401,3.983-3.459l0.952-18.36h2.199l1.255,18.36 c0.15,2.058,1.93,3.6,3.983,3.459c2.054-0.142,3.604-1.925,3.463-3.979l-1.225-17.84h2.864L58.193,37.37v-1.793l7.318-8.764 l7.838,9.382v12.185c0,0.337,0.021,0.661,0.067,0.987l-1.596,30.765c-0.141,2.055,1.405,3.838,3.458,3.979 c2.054,0.141,3.838-1.401,3.983-3.459l1.267-24.463c0.215,0.017,0.436,0.035,0.66,0.035c0.271,0,0.542-0.014,0.807-0.044 l1.674,24.472c0.145,2.058,1.929,3.6,3.983,3.459c2.05-0.142,3.601-1.925,3.459-3.979l-2.125-30.939 c0.032-0.267,0.049-0.541,0.049-0.813V35.577z\\\"/>\\n\" +\r\n \"<circle cx=\\\"81.189\\\" cy=\\\"22.138\\\" r=\\\"5.699\\\"/>\\n\" +\r\n \"</svg>\");\r\n String xml = new Util().generateXML(word);\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n boolean expResult = true;\r\n System.out.println(xml);\r\n boolean result = instance.injest(doc, xml);\r\n assertEquals(expResult, result);\r\n }",
"public static void main(String args[]) {\n\n\t\tif (args.length > 4) {\n\t\t\tSystem.out.println(\"Usage: java org.csiro.svgv.display.Viewer [-/+toolbar] [-/+menu] [svg-url]\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tboolean showToolbar = true;\n\t\tboolean showMenu = true;\n\t\tString svgurl = null;\n\n\t\tfor (String arg : args) {\n\t\t\tif (arg.equals(\"+toolbar\")) {\n\t\t\t\tshowToolbar = false;\n\t\t\t} else if (arg.equals(\"+menu\")) {\n\t\t\t\tshowMenu = false;\n\t\t\t} else {\n\t\t\t\t// must be a file\n\t\t\t\tsvgurl = arg;\n\t\t\t}\n\t\t}\n\n\t\t// create the applet with the svg-url as argument\n\n\t\tViewer viewer = new Viewer();\n\t\tviewer.invokedStandalone = true;\n\t\tif (svgurl != null) {\n\t\t\tviewer.svgfile = svgurl;\n\t\t}\n\t\tviewer.setShowToolbar(showToolbar);\n\t\tviewer.setShowMenu(showMenu);\n\n\t\tJFrame f = new JFrame(viewer.title);\n\t\tf.setBounds(20, 20, 750, 750);\n\t\tf.getContentPane().add(viewer, \"Center\");\n\t\tviewer.frame = f;\n\t\tviewer.init();\n\n\t\tf.addWindowListener(new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\tf.show();\n\n\t\t// zoom to all entities and draw canvas\n\n\t\tviewer.canvas.fitToWindow();\n\t\tviewer.canvas.draw();\n\t}",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tannotationEClass = createEClass(ANNOTATION);\n\t\tcreateEReference(annotationEClass, ANNOTATION__IMPLEMENTATIONS);\n\n\t\timplementationEClass = createEClass(IMPLEMENTATION);\n\t\tcreateEAttribute(implementationEClass, IMPLEMENTATION__CODE);\n\t\tcreateEReference(implementationEClass, IMPLEMENTATION__TECHNOLOGY);\n\t\tcreateEReference(implementationEClass, IMPLEMENTATION__LANGUAGE);\n\n\t\tsemanticsEClass = createEClass(SEMANTICS);\n\t\tcreateEReference(semanticsEClass, SEMANTICS__ANNOTATIONS);\n\t\tcreateEReference(semanticsEClass, SEMANTICS__LANGUAGES);\n\t\tcreateEReference(semanticsEClass, SEMANTICS__TECHNOLOGIES);\n\n\t\ttargetLanguageEClass = createEClass(TARGET_LANGUAGE);\n\n\t\ttechnologyEClass = createEClass(TECHNOLOGY);\n\n\t\tnamedElementEClass = createEClass(NAMED_ELEMENT);\n\t\tcreateEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);\n\t}",
"private String drawAllShapes() {\n\n /*\n Have list of list for each shape and the motions of each shape\n Need to iterate through the frames and for each motion in a frame\n add it to the corresponding shape in the list of lists\n */\n StringBuilder shapeSVG = new StringBuilder();\n Map<Integer, List<Shape>> animationFrames = this.model.getFrames();\n List<List<Shape>> shapeStates = new ArrayList<>();\n for (Integer key : new TreeSet<>(animationFrames.keySet())) {\n List<Shape> singleFrame = animationFrames.get(key);\n for (Shape shape : singleFrame) {\n if (!this.containsShapeList(shapeStates, shape.getName())) {\n List<Shape> shapeMotions = new ArrayList<>();\n shapeMotions.add(singleFrame.get(singleFrame.indexOf(shape)));\n shapeStates.add(shapeMotions);\n } else {\n shapeStates.get(this.findShape(shapeStates, shape.getName()))\n .add(singleFrame.get(singleFrame.indexOf(shape)));\n }\n }\n }\n\n for (List<Shape> shape : shapeStates) {\n shapeSVG.append(this.drawSingleShape(shape.get(0).getName(), shape.get(0).getType(), shape))\n .append(\"\\n\");\n }\n\n return shapeSVG.toString();\n }",
"public void buildImage(String INPUT_XML_SYMBOL) throws IOException, JAXBException, XMLStreamException {\n\n\t\tFile xmlFile = new File(OUTPUT_FILE_TEMP);\n\n\t\tString outputFileName = (INPUT_XML_SYMBOL).replaceAll(\".xml\", \".png\");\n\t\t\n\n\t\tint resolutionX = 500;\n\t\tJaxbErrorLogRepository errorRep = new JaxbErrorLogRepository(xmlFile);\n\t\tInputRepository inputRep = new JaxbInputRepository(xmlFile);\n\t\tGraphicFactory gFac = new ImageFactory_PNG();\n\t\tGraphicBuilder gBuilder = new GraphicBuilder(inputRep, gFac, errorRep);\n\t\tBufferedImage image = gBuilder.buildImage(resolutionX, outputFileName);\n\t\timage = trim(image);\n\n\t\t// Writing image now:\n\n\t\t// Get all possible Image Writers that are actually available for the\n\t\t// type PNG\n\t\tIterator<ImageWriter> imageWriters = ImageIO.getImageWritersBySuffix(\"PNG\");\n\n\t\t// Ok, we need the output file of course\n\t\tFile file = new File(outputFileName);\n\t\t\n\t\t// select the first found Writer\n\t\tImageWriter imageWriter = (ImageWriter) imageWriters.next();\n\n\t\t// Now we define the output stream\n\t\ttry (ImageOutputStream ios = ImageIO.createImageOutputStream(file)) {\n\t\t\timageWriter.setOutput(ios);\n\n\t\t\t// Here we add the Listener which reports to the logger, so we can\n\t\t\t// see\n\t\t\t// the progress\n\t\t\timageWriter.addIIOWriteProgressListener(new GraphicBuilderImageWriteListener());\n\n\t\t\t// Now start writing the image\n\t\t\timageWriter.write(image);\n\t\t}\n\n\t\t// delete errorLog and output_file_temp\n\t\tString errorLog = OUTPUT_FILE_TEMP.replace(\".xml\", \".graphic_errors.xml\");\n\t\tFile tempErrorLogFile = new File(errorLog);\n\t\ttempErrorLogFile.delete();\n\n\t\txmlFile.delete();\n\n\t}",
"@Override\n\tprotected void generateUml(final IProject project, final Shell shell) throws CoreException, MalformedURLException {\n\t\tLOGGER.log(Level.INFO, \"Starting generation of class diagram for project : \" + project.getName());\n\t\t\n\t\t// create a job such that the long running process can run in background.\n\t\tJob generateJob = new Job(\"Class Diagram Job\") {\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected IStatus run(IProgressMonitor progress) {\n\t\t\t\tboolean success = true;\n\t\t\t\tString reason = \"\";\n\t\t\t\t\n\t\t\t\tprogress.beginTask(\"Starting the task.\", 100);\n\t\t\t\tprogress.subTask(\"Getting user UML generation options.\");\n\t\t\t\t\n\t\t\t\t// get user options for uml generation\n\t\t\t\tfinal GenerateUMLOptionsDialog dialog = new GenerateUMLOptionsDialog(shell);\n\t\t\t\t// create sync execution to make sure that the UI updates are performed in main UI thread.\n\t\t\t\tDisplay.getDefault().syncExec(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tdialog.open();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t// only proceed with UML generation if user pressed OK\n\t\t\t\tif (dialog.getReturnCode() == 0) {\n\t\t\t\t\tIJavaProject javaProject = JavaCore.create(project);\n\t\t\t\t\tprogress.worked(10);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tprogress.subTask(\"Exporting project \"\n\t\t\t\t\t\t\t\t+ project.getName() + \" to jar file.\");\n\t\t\t\t\t\tfinal IPath deployedJarFile = exportProjectJar(project,\n\t\t\t\t\t\t\t\tshell);\n\t\t\t\t\t\tprogress.worked(40);\n\n\t\t\t\t\t\tprogress.subTask(\"Extracting dependent jars for \"\n\t\t\t\t\t\t\t\t+ project.getName());\n\t\t\t\t\t\tList<URL> urls = getDepedentJars(project, javaProject,\n\t\t\t\t\t\t\t\tjavaProject.getRawClasspath(), deployedJarFile);\n\t\t\t\t\t\tprogress.worked(10);\n\n\t\t\t\t\t\t// create output directory\n\t\t\t\t\t\tFile umlDir = project.getFolder(\"uml\").getLocation()\n\t\t\t\t\t\t\t\t.toFile();\n\t\t\t\t\t\tif (!umlDir.exists()) {\n\t\t\t\t\t\t\tumlDir.mkdir();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tprogress.subTask(\"Generating class diagram for \"\n\t\t\t\t\t\t\t\t+ project.getName());\n\t\t\t\t\t\tUmlOptions options = new UmlOptions();\n\t\t\t\t\t\toptions.setPackagesIncluded(dialog\n\t\t\t\t\t\t\t\t.arePackagesIncluded());\n\t\t\t\t\t\toptions.setTestIncluded(dialog.areTestsIncluded());\n\t\t\t\t\t\toptions.setFieldsIncluded(dialog.areFieldsIncluded());\n\t\t\t\t\t\toptions.setMethodsIncluded(dialog.areMethodsIncluded());\n\t\t\t\t\t\toptions.setIncludePatterns(dialog.getIncludePattern());\n\t\t\t\t\t\toptions.setExcludePatterns(dialog.getExcludePatterns());\n\t\t\t\t\t\toptions.setFileFormat(dialog.getFileFormat());\n\t\t\t\t\t\tUmlGenerator.generateClassDiagram(urls.get(0),\n\t\t\t\t\t\t\t\turls.toArray(new URL[] {}), project.getName(),\n\t\t\t\t\t\t\t\tumlDir.getPath(), options);\n\t\t\t\t\t\tLOGGER.log(Level.INFO,\n\t\t\t\t\t\t\t\t\"Finished generation of class diagram for project : \"\n\t\t\t\t\t\t\t\t\t\t+ project.getName());\n\t\t\t\t\t\tprogress.worked(40);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// capture exception and show it to user\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\treason = ExceptionUtils.getStackTrace(e);\n\t\t\t\t\t\tsuccess = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// show the final result\n\t\t\t\t\tshowResultDialog(shell, project.getName(), success, reason);\n\t\t\t\t}\n\t\t\t\treturn Status.OK_STATUS;\n\t\t\t}\n\t\t};\n\t\tgenerateJob.setPriority(Job.SHORT);\n\t\tgenerateJob.schedule();\n\t}",
"public void generateReport() {\n ReportGenerator rg = ui.getReportGenerator();\n if (rg == null || !rg.isVisible()) {\n ui.openReportGenerator();\n rg = ui.getReportGenerator();\n }\n Image img = getImage();\n if (img == null) {\n return;\n }\n rg.addImage(img, \"Plot\");\n }",
"public MonticuloSVG(Lista<Integer> elementos) {\n ordenada = Lista.mergeSort(elementos);\n while (!ordenada.esVacia()) {\n arbol.agrega(ordenada.eliminaPrimero());\n }\n altura = arbol.altura();\n ancho = 100 * ((int) Math.pow(2, altura)) + (100 * ((int) Math.pow(2, altura) - 1)) + 300;\n alto = 100 * altura + 100 * (altura - 1) + 300;\n }",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tinvoiceEClass = createEClass(INVOICE);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_ID);\n\t\tcreateEReference(invoiceEClass, INVOICE__BILLING_ACCOUNT);\n\t\tcreateEReference(invoiceEClass, INVOICE__CONTACT_MECH);\n\t\tcreateEReference(invoiceEClass, INVOICE__CURRENCY_UOM);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__DUE_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_ATTRIBUTES);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_ITEMS);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_MESSAGE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_NOTES);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_STATUSES);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__PAID_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__PARTY);\n\t\tcreateEReference(invoiceEClass, INVOICE__PARTY_ID_FROM);\n\t\tcreateEReference(invoiceEClass, INVOICE__RECURRENCE_INFO);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__REFERENCE_NUMBER);\n\t\tcreateEReference(invoiceEClass, INVOICE__ROLE_TYPE);\n\t\tcreateEReference(invoiceEClass, INVOICE__STATUS);\n\n\t\tinvoiceAttributeEClass = createEClass(INVOICE_ATTRIBUTE);\n\t\tcreateEReference(invoiceAttributeEClass, INVOICE_ATTRIBUTE__INVOICE);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceContactMechEClass = createEClass(INVOICE_CONTACT_MECH);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__INVOICE);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__CONTACT_MECH);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__CONTACT_MECH_PURPOSE_TYPE);\n\n\t\tinvoiceContentEClass = createEClass(INVOICE_CONTENT);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__INVOICE);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__CONTENT);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__INVOICE_CONTENT_TYPE);\n\t\tcreateEAttribute(invoiceContentEClass, INVOICE_CONTENT__FROM_DATE);\n\t\tcreateEAttribute(invoiceContentEClass, INVOICE_CONTENT__THRU_DATE);\n\n\t\tinvoiceContentTypeEClass = createEClass(INVOICE_CONTENT_TYPE);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__INVOICE_CONTENT_TYPE_ID);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemEClass = createEClass(INVOICE_ITEM);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVOICE);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__AMOUNT);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__DESCRIPTION);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVENTORY_ITEM);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVOICE_ITEM_TYPE);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__OVERRIDE_GL_ACCOUNT);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__OVERRIDE_ORG_PARTY);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__PARENT_INVOICE_ID);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__PARENT_INVOICE_ITEM_SEQ_ID);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__PRODUCT);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__PRODUCT_FEATURE);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__QUANTITY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__SALES_OPPORTUNITY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTH_GEO);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTH_PARTY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTHORITY_RATE_SEQ);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__TAXABLE_FLAG);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__UOM);\n\n\t\tinvoiceItemAssocEClass = createEClass(INVOICE_ITEM_ASSOC);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_ASSOC_TYPE);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__FROM_DATE);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ID_FROM);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_SEQ_ID_FROM);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_SEQ_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__AMOUNT);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__PARTY_ID_FROM);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__PARTY_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__QUANTITY);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__THRU_DATE);\n\n\t\tinvoiceItemAssocTypeEClass = createEClass(INVOICE_ITEM_ASSOC_TYPE);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__INVOICE_ITEM_ASSOC_TYPE_ID);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemAttributeEClass = createEClass(INVOICE_ITEM_ATTRIBUTE);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__INVOICE_ID);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceItemTypeEClass = createEClass(INVOICE_ITEM_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_ID);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__DEFAULT_GL_ACCOUNT);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_ATTRS);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_GL_ACCOUNTS);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemTypeAttrEClass = createEClass(INVOICE_ITEM_TYPE_ATTR);\n\t\tcreateEReference(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__INVOICE_ITEM_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__ATTR_NAME);\n\t\tcreateEAttribute(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__DESCRIPTION);\n\n\t\tinvoiceItemTypeGlAccountEClass = createEClass(INVOICE_ITEM_TYPE_GL_ACCOUNT);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__INVOICE_ITEM_TYPE);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__ORGANIZATION_PARTY);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__GL_ACCOUNT);\n\n\t\tinvoiceItemTypeMapEClass = createEClass(INVOICE_ITEM_TYPE_MAP);\n\t\tcreateEReference(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_ITEM_MAP_KEY);\n\t\tcreateEReference(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_ITEM_TYPE);\n\n\t\tinvoiceNoteEClass = createEClass(INVOICE_NOTE);\n\t\tcreateEReference(invoiceNoteEClass, INVOICE_NOTE__INVOICE);\n\n\t\tinvoiceRoleEClass = createEClass(INVOICE_ROLE);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__INVOICE);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__PARTY);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__ROLE_TYPE);\n\t\tcreateEAttribute(invoiceRoleEClass, INVOICE_ROLE__DATETIME_PERFORMED);\n\t\tcreateEAttribute(invoiceRoleEClass, INVOICE_ROLE__PERCENTAGE);\n\n\t\tinvoiceStatusEClass = createEClass(INVOICE_STATUS);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__STATUS);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__INVOICE);\n\t\tcreateEAttribute(invoiceStatusEClass, INVOICE_STATUS__STATUS_DATE);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__CHANGE_BY_USER_LOGIN);\n\n\t\tinvoiceTermEClass = createEClass(INVOICE_TERM);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__INVOICE_TERM_ID);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__DESCRIPTION);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__INVOICE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__INVOICE_TERM_ATTRIBUTES);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TERM_DAYS);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__TERM_TYPE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TERM_VALUE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TEXT_VALUE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__UOM_ID);\n\n\t\tinvoiceTermAttributeEClass = createEClass(INVOICE_TERM_ATTRIBUTE);\n\t\tcreateEReference(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__INVOICE_TERM);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceTypeEClass = createEClass(INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__INVOICE_TYPE_ID);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceTypeEClass, INVOICE_TYPE__INVOICE_TYPE_ATTRS);\n\t\tcreateEReference(invoiceTypeEClass, INVOICE_TYPE__PARENT_TYPE);\n\n\t\tinvoiceTypeAttrEClass = createEClass(INVOICE_TYPE_ATTR);\n\t\tcreateEReference(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__ATTR_NAME);\n\t\tcreateEAttribute(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__DESCRIPTION);\n\t}",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tjElementEClass = createEClass(JELEMENT);\n\t\tcreateEAttribute(jElementEClass, JELEMENT__UUID);\n\t\tcreateEAttribute(jElementEClass, JELEMENT__NAME);\n\t\tcreateEAttribute(jElementEClass, JELEMENT__SHORT_NAME);\n\t\tcreateEAttribute(jElementEClass, JELEMENT__FULL_NAME);\n\t\tcreateEAttribute(jElementEClass, JELEMENT__DESCRIPTION);\n\t\tcreateEAttribute(jElementEClass, JELEMENT__FRAMEWORK);\n\t\tcreateEAttribute(jElementEClass, JELEMENT__PARTICIPATES);\n\t\tcreateEAttribute(jElementEClass, JELEMENT__VISIBILITY);\n\n\t\tjTypeEClass = createEClass(JTYPE);\n\n\t\tjTypedElementEClass = createEClass(JTYPED_ELEMENT);\n\t\tcreateEReference(jTypedElementEClass, JTYPED_ELEMENT__TYPE);\n\t\tcreateEAttribute(jTypedElementEClass, JTYPED_ELEMENT__VALUE);\n\t\tcreateEAttribute(jTypedElementEClass, JTYPED_ELEMENT__DERIVED);\n\t\tcreateEAttribute(jTypedElementEClass, JTYPED_ELEMENT__CALCULATED);\n\t\tcreateEAttribute(jTypedElementEClass, JTYPED_ELEMENT__LOWER);\n\t\tcreateEAttribute(jTypedElementEClass, JTYPED_ELEMENT__UPPER);\n\t\tcreateEAttribute(jTypedElementEClass, JTYPED_ELEMENT__ORDERED);\n\t\tcreateEAttribute(jTypedElementEClass, JTYPED_ELEMENT__UNIQUE);\n\n\t\tjPrimitiveEClass = createEClass(JPRIMITIVE);\n\t\tcreateEReference(jPrimitiveEClass, JPRIMITIVE__PACKAGE);\n\t\tcreateEAttribute(jPrimitiveEClass, JPRIMITIVE__USE_FOR_ID_TYPE);\n\n\t\tjEnumerationEClass = createEClass(JENUMERATION);\n\t\tcreateEReference(jEnumerationEClass, JENUMERATION__PACKAGE);\n\t\tcreateEReference(jEnumerationEClass, JENUMERATION__LITERALS);\n\t\tcreateEReference(jEnumerationEClass, JENUMERATION__CLASS_REPRESENTATION);\n\n\t\tjClassEClass = createEClass(JCLASS);\n\t\tcreateEAttribute(jClassEClass, JCLASS__ABSTRACT);\n\t\tcreateEReference(jClassEClass, JCLASS__STATE_MACHINES);\n\t\tcreateEReference(jClassEClass, JCLASS__OPERATIONS);\n\t\tcreateEReference(jClassEClass, JCLASS__ATTRIBUTE_ORDER);\n\t\tcreateEReference(jClassEClass, JCLASS__ATTRIBUTES_FOR_LISTING);\n\t\tcreateEReference(jClassEClass, JCLASS__FIXED_ENUM);\n\t\tcreateEAttribute(jClassEClass, JCLASS__REPRESENTS_TENANT);\n\t\tcreateEAttribute(jClassEClass, JCLASS__TENANT_MEMBER);\n\t\tcreateEReference(jClassEClass, JCLASS__REPRESENTATION);\n\t\tcreateEAttribute(jClassEClass, JCLASS__REPRESENTS_ENUM);\n\t\tcreateEAttribute(jClassEClass, JCLASS__REPRESENTS_TENANT_USER);\n\t\tcreateEAttribute(jClassEClass, JCLASS__REPRESENTS_USER);\n\t\tcreateEReference(jClassEClass, JCLASS__SUPERTYPE);\n\t\tcreateEReference(jClassEClass, JCLASS__PACKAGE);\n\t\tcreateEReference(jClassEClass, JCLASS__ROLES);\n\t\tcreateEReference(jClassEClass, JCLASS__ATTRIBUTES);\n\t\tcreateEAttribute(jClassEClass, JCLASS__BUSINESS_SINGLETON);\n\t\tcreateEReference(jClassEClass, JCLASS__ALIASES);\n\t\tcreateEAttribute(jClassEClass, JCLASS__WATCHED);\n\t\tcreateEAttribute(jClassEClass, JCLASS__REPRESENTS_ENUM_VALUE);\n\n\t\tjAttributeEClass = createEClass(JATTRIBUTE);\n\t\tcreateEAttribute(jAttributeEClass, JATTRIBUTE__PLACEHOLDER);\n\t\tcreateEAttribute(jAttributeEClass, JATTRIBUTE__REGEXP);\n\t\tcreateEAttribute(jAttributeEClass, JATTRIBUTE__MANDATORY);\n\t\tcreateEAttribute(jAttributeEClass, JATTRIBUTE__DECIMALS);\n\t\tcreateEAttribute(jAttributeEClass, JATTRIBUTE__INTERVAL);\n\t\tcreateEAttribute(jAttributeEClass, JATTRIBUTE__TECHNICAL);\n\t\tcreateEReference(jAttributeEClass, JATTRIBUTE__OWNER_CLASS);\n\t\tcreateEAttribute(jAttributeEClass, JATTRIBUTE__UI_NO_SEARCH);\n\t\tcreateEAttribute(jAttributeEClass, JATTRIBUTE__WATCHED);\n\t\tcreateEAttribute(jAttributeEClass, JATTRIBUTE__REPRESENTS_ID);\n\n\t\tjOperationEClass = createEClass(JOPERATION);\n\t\tcreateEAttribute(jOperationEClass, JOPERATION__CLASS_BASED);\n\t\tcreateEReference(jOperationEClass, JOPERATION__OWNER_CLASS);\n\t\tcreateEReference(jOperationEClass, JOPERATION__PARAMETERS);\n\t\tcreateEReference(jOperationEClass, JOPERATION__TRANSITION);\n\t\tcreateEAttribute(jOperationEClass, JOPERATION__BULK);\n\t\tcreateEAttribute(jOperationEClass, JOPERATION__KIND);\n\t\tcreateEAttribute(jOperationEClass, JOPERATION__UI_MUST_CONFIRM);\n\n\t\tjParameterEClass = createEClass(JPARAMETER);\n\t\tcreateEReference(jParameterEClass, JPARAMETER__OWNER_OPERATION);\n\t\tcreateEAttribute(jParameterEClass, JPARAMETER__INPUT);\n\t\tcreateEAttribute(jParameterEClass, JPARAMETER__INTERVAL);\n\n\t\tjRelationshipEClass = createEClass(JRELATIONSHIP);\n\t\tcreateEReference(jRelationshipEClass, JRELATIONSHIP__PACKAGE);\n\t\tcreateEReference(jRelationshipEClass, JRELATIONSHIP__ROLES);\n\t\tcreateEAttribute(jRelationshipEClass, JRELATIONSHIP__DERIVED);\n\n\t\tjRoleEClass = createEClass(JROLE);\n\t\tcreateEAttribute(jRoleEClass, JROLE__LOWER);\n\t\tcreateEAttribute(jRoleEClass, JROLE__UPPER);\n\t\tcreateEAttribute(jRoleEClass, JROLE__NAVIGABLE);\n\t\tcreateEAttribute(jRoleEClass, JROLE__UNIQUE);\n\t\tcreateEAttribute(jRoleEClass, JROLE__ORDERED);\n\t\tcreateEReference(jRoleEClass, JROLE__OWNER_RELATIONSHIP);\n\t\tcreateEAttribute(jRoleEClass, JROLE__DERIVED_EXPRESSION);\n\t\tcreateEAttribute(jRoleEClass, JROLE__DERIVED_DESCRIPTION);\n\t\tcreateEAttribute(jRoleEClass, JROLE__KIND);\n\t\tcreateEAttribute(jRoleEClass, JROLE__OPTION_SCRIPT);\n\t\tcreateEReference(jRoleEClass, JROLE__OWNER_CLASS);\n\t\tcreateEAttribute(jRoleEClass, JROLE__VALUE);\n\t\tcreateEAttribute(jRoleEClass, JROLE__CALCULATED);\n\t\tcreateEAttribute(jRoleEClass, JROLE__INTERVAL);\n\n\t\tjLiteralEClass = createEClass(JLITERAL);\n\t\tcreateEReference(jLiteralEClass, JLITERAL__ENUMERATION);\n\n\t\tjPackageEClass = createEClass(JPACKAGE);\n\t\tcreateEReference(jPackageEClass, JPACKAGE__ENUMERATIONS);\n\t\tcreateEReference(jPackageEClass, JPACKAGE__PRIMITIVES);\n\t\tcreateEReference(jPackageEClass, JPACKAGE__RELATIONSHIPS);\n\t\tcreateEReference(jPackageEClass, JPACKAGE__CHILDREN);\n\t\tcreateEReference(jPackageEClass, JPACKAGE__PARENT);\n\t\tcreateEReference(jPackageEClass, JPACKAGE__OWNER_MODEL);\n\t\tcreateEReference(jPackageEClass, JPACKAGE__CLASSES);\n\n\t\tjStateMachineEClass = createEClass(JSTATE_MACHINE);\n\t\tcreateEReference(jStateMachineEClass, JSTATE_MACHINE__OWNER_CLASS);\n\t\tcreateEReference(jStateMachineEClass, JSTATE_MACHINE__STATES);\n\t\tcreateEReference(jStateMachineEClass, JSTATE_MACHINE__TRANSITIONS);\n\t\tcreateEReference(jStateMachineEClass, JSTATE_MACHINE__CORRESPONDING_ENUM);\n\n\t\tjTransitionEClass = createEClass(JTRANSITION);\n\t\tcreateEReference(jTransitionEClass, JTRANSITION__STATE_MACHINE);\n\t\tcreateEReference(jTransitionEClass, JTRANSITION__GUARD);\n\t\tcreateEReference(jTransitionEClass, JTRANSITION__TO_STATE);\n\t\tcreateEReference(jTransitionEClass, JTRANSITION__FROM_STATE);\n\t\tcreateEReference(jTransitionEClass, JTRANSITION__EXECUTING_OPERATION);\n\n\t\tjStateEClass = createEClass(JSTATE);\n\t\tcreateEReference(jStateEClass, JSTATE__OWNER_STATE_MACHINE);\n\t\tcreateEReference(jStateEClass, JSTATE__INCOMING_TRANSITIONS);\n\t\tcreateEReference(jStateEClass, JSTATE__OUTGOING_TRANSITIONS);\n\t\tcreateEAttribute(jStateEClass, JSTATE__INITIAL_STATE);\n\t\tcreateEAttribute(jStateEClass, JSTATE__FINAL_STATE);\n\n\t\tjGuardEClass = createEClass(JGUARD);\n\t\tcreateEReference(jGuardEClass, JGUARD__TRANSITION);\n\t\tcreateEAttribute(jGuardEClass, JGUARD__TEXT);\n\t\tcreateEAttribute(jGuardEClass, JGUARD__EXPRESSION);\n\n\t\tjModelEClass = createEClass(JMODEL);\n\t\tcreateEReference(jModelEClass, JMODEL__PACKAGES);\n\t\tcreateEAttribute(jModelEClass, JMODEL__PACKAGE_PREFIX);\n\t\tcreateEReference(jModelEClass, JMODEL__APPLICATION_TOP);\n\t\tcreateEReference(jModelEClass, JMODEL__ROOT_MENU_ITEMS);\n\t\tcreateEReference(jModelEClass, JMODEL__INFO);\n\n\t\tjuiMenuItemEClass = createEClass(JUI_MENU_ITEM);\n\t\tcreateEReference(juiMenuItemEClass, JUI_MENU_ITEM__CHILDREN);\n\t\tcreateEReference(juiMenuItemEClass, JUI_MENU_ITEM__PARENT);\n\t\tcreateEReference(juiMenuItemEClass, JUI_MENU_ITEM__REPRESENT);\n\t\tcreateEReference(juiMenuItemEClass, JUI_MENU_ITEM__UIFILTERS);\n\t\tcreateEAttribute(juiMenuItemEClass, JUI_MENU_ITEM__TYPE);\n\t\tcreateEReference(juiMenuItemEClass, JUI_MENU_ITEM__ALIAS);\n\n\t\tjuiAttributeGroupEClass = createEClass(JUI_ATTRIBUTE_GROUP);\n\t\tcreateEReference(juiAttributeGroupEClass, JUI_ATTRIBUTE_GROUP__ATTRIBUTES);\n\t\tcreateEAttribute(juiAttributeGroupEClass, JUI_ATTRIBUTE_GROUP__POSITION);\n\n\t\tjuiFilterEClass = createEClass(JUI_FILTER);\n\t\tcreateEReference(juiFilterEClass, JUI_FILTER__ATTRIBUTE);\n\t\tcreateEAttribute(juiFilterEClass, JUI_FILTER__OPERATOR);\n\t\tcreateEAttribute(juiFilterEClass, JUI_FILTER__VALUE);\n\n\t\tjuiAliasEClass = createEClass(JUI_ALIAS);\n\t\tcreateEReference(juiAliasEClass, JUI_ALIAS__OWNER_CLASS);\n\n\t\tjInfoEClass = createEClass(JINFO);\n\t\tcreateEReference(jInfoEClass, JINFO__SUBMODELS);\n\n\t\tjSubmodelEClass = createEClass(JSUBMODEL);\n\t\tcreateEAttribute(jSubmodelEClass, JSUBMODEL__VERSION);\n\n\t\t// Create enums\n\t\tjVisibilityEEnum = createEEnum(JVISIBILITY);\n\t\tjAssociationKindEEnum = createEEnum(JASSOCIATION_KIND);\n\t\tjOperationKindEEnum = createEEnum(JOPERATION_KIND);\n\t\tjLayerEEnum = createEEnum(JLAYER);\n\t\tjMenuItemTypeEEnum = createEEnum(JMENU_ITEM_TYPE);\n\t\tjOperatorEEnum = createEEnum(JOPERATOR);\n\t}",
"public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n programmeEClass = createEClass(PROGRAMME);\n createEReference(programmeEClass, PROGRAMME__PROCEDURES);\n\n procedureEClass = createEClass(PROCEDURE);\n createEAttribute(procedureEClass, PROCEDURE__NAME);\n createEAttribute(procedureEClass, PROCEDURE__PARAM);\n createEAttribute(procedureEClass, PROCEDURE__PARAMS);\n createEReference(procedureEClass, PROCEDURE__INST);\n\n instructionEClass = createEClass(INSTRUCTION);\n\n openEClass = createEClass(OPEN);\n createEAttribute(openEClass, OPEN__NAME);\n createEAttribute(openEClass, OPEN__VALUE);\n\n gotoEClass = createEClass(GOTO);\n createEAttribute(gotoEClass, GOTO__NAME);\n createEAttribute(gotoEClass, GOTO__VALUE);\n\n clickEClass = createEClass(CLICK);\n createEAttribute(clickEClass, CLICK__NAME);\n createEAttribute(clickEClass, CLICK__TYPE);\n createEReference(clickEClass, CLICK__IDENTIFIER);\n\n fillEClass = createEClass(FILL);\n createEAttribute(fillEClass, FILL__NAME);\n createEAttribute(fillEClass, FILL__FIELD_TYPE);\n createEReference(fillEClass, FILL__IDENTIFIER);\n createEAttribute(fillEClass, FILL__VAR);\n createEAttribute(fillEClass, FILL__VALUE);\n\n checkEClass = createEClass(CHECK);\n createEAttribute(checkEClass, CHECK__NAME);\n createEAttribute(checkEClass, CHECK__ALL);\n createEReference(checkEClass, CHECK__IDENTIFIER);\n\n uncheckEClass = createEClass(UNCHECK);\n createEAttribute(uncheckEClass, UNCHECK__NAME);\n createEAttribute(uncheckEClass, UNCHECK__ALL);\n createEReference(uncheckEClass, UNCHECK__IDENTIFIER);\n\n selectEClass = createEClass(SELECT);\n createEAttribute(selectEClass, SELECT__NAME);\n createEAttribute(selectEClass, SELECT__ELEM);\n createEReference(selectEClass, SELECT__IDENTIFIER);\n\n readEClass = createEClass(READ);\n createEAttribute(readEClass, READ__NAME);\n createEReference(readEClass, READ__IDENTIFIER);\n createEReference(readEClass, READ__SAVE_PATH);\n\n elementidentifierEClass = createEClass(ELEMENTIDENTIFIER);\n createEAttribute(elementidentifierEClass, ELEMENTIDENTIFIER__NAME);\n createEAttribute(elementidentifierEClass, ELEMENTIDENTIFIER__TYPE);\n createEAttribute(elementidentifierEClass, ELEMENTIDENTIFIER__VALUE);\n createEAttribute(elementidentifierEClass, ELEMENTIDENTIFIER__INFO);\n createEAttribute(elementidentifierEClass, ELEMENTIDENTIFIER__VAR);\n\n verifyEClass = createEClass(VERIFY);\n createEAttribute(verifyEClass, VERIFY__VALUE);\n\n verifY_CONTAINSEClass = createEClass(VERIFY_CONTAINS);\n createEAttribute(verifY_CONTAINSEClass, VERIFY_CONTAINS__TYPE);\n createEReference(verifY_CONTAINSEClass, VERIFY_CONTAINS__IDENTIFIER);\n createEReference(verifY_CONTAINSEClass, VERIFY_CONTAINS__CONTAINED_IDENTIFIER);\n createEReference(verifY_CONTAINSEClass, VERIFY_CONTAINS__VARIABLE);\n\n verifY_EQUALSEClass = createEClass(VERIFY_EQUALS);\n createEReference(verifY_EQUALSEClass, VERIFY_EQUALS__OPERATION);\n createEReference(verifY_EQUALSEClass, VERIFY_EQUALS__REGISTERED_VALUE);\n\n registereD_VALUEEClass = createEClass(REGISTERED_VALUE);\n createEAttribute(registereD_VALUEEClass, REGISTERED_VALUE__VAR);\n\n countEClass = createEClass(COUNT);\n createEAttribute(countEClass, COUNT__NAME);\n createEReference(countEClass, COUNT__IDENTIFIER);\n createEReference(countEClass, COUNT__SAVE_VARIABLE);\n\n savevarEClass = createEClass(SAVEVAR);\n createEAttribute(savevarEClass, SAVEVAR__VAR);\n\n playEClass = createEClass(PLAY);\n createEAttribute(playEClass, PLAY__NAME);\n createEAttribute(playEClass, PLAY__PREOCEDURE);\n createEAttribute(playEClass, PLAY__PARAMS);\n }",
"private void generateGraphCode() {\n StringBuilder finalCode = new StringBuilder(\"digraph G{\\n\");\n for (int idx = 0; idx < jTabbedPane.getTabCount(); idx++) {\n WorkingPanel workingPanel = (WorkingPanel) jTabbedPane.getComponent(idx);\n finalCode.append(generateSubGraphCode(workingPanel.getConnections(), idx));\n }\n finalCode.append(\"\\n}\");\n JFrame generatedCodeFrame = new JFrame(\"Code Generator\");\n JTextArea codeDisplay = new JTextArea();\n generatedCodeFrame.add(codeDisplay);\n codeDisplay.append(finalCode.toString());\n generatedCodeFrame.setSize(400, 700);\n generatedCodeFrame.setVisible(true);\n }",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tinstructionEClass = createEClass(INSTRUCTION);\n\n\t\tnamedElementEClass = createEClass(NAMED_ELEMENT);\n\t\tcreateEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);\n\n\t\tgoForwardEClass = createEClass(GO_FORWARD);\n\t\tcreateEAttribute(goForwardEClass, GO_FORWARD__CM);\n\t\tcreateEAttribute(goForwardEClass, GO_FORWARD__INFINITE);\n\n\t\tgoBackwardEClass = createEClass(GO_BACKWARD);\n\t\tcreateEAttribute(goBackwardEClass, GO_BACKWARD__CM);\n\t\tcreateEAttribute(goBackwardEClass, GO_BACKWARD__INFINITE);\n\n\t\tbeginEClass = createEClass(BEGIN);\n\n\t\trotateEClass = createEClass(ROTATE);\n\t\tcreateEAttribute(rotateEClass, ROTATE__DEGREES);\n\t\tcreateEAttribute(rotateEClass, ROTATE__RANDOM);\n\n\t\treleaseEClass = createEClass(RELEASE);\n\n\t\tactionEClass = createEClass(ACTION);\n\n\t\tblockEClass = createEClass(BLOCK);\n\n\t\tendEClass = createEClass(END);\n\n\t\tchoreographyEClass = createEClass(CHOREOGRAPHY);\n\t\tcreateEReference(choreographyEClass, CHOREOGRAPHY__INSTRUCTIONS);\n\t\tcreateEReference(choreographyEClass, CHOREOGRAPHY__EDGE_INSTRUCTIONS);\n\n\t\tedgeInstructionEClass = createEClass(EDGE_INSTRUCTION);\n\t\tcreateEReference(edgeInstructionEClass, EDGE_INSTRUCTION__SOURCE);\n\t\tcreateEReference(edgeInstructionEClass, EDGE_INSTRUCTION__TARGET);\n\n\t\tgrabEClass = createEClass(GRAB);\n\t}",
"private void generateSolution() {\n\t\t// TODO\n\n\t}",
"public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n modelEClass = createEClass(MODEL);\n createEReference(modelEClass, MODEL__ELEMENTS);\n\n elementEClass = createEClass(ELEMENT);\n createEReference(elementEClass, ELEMENT__STATE);\n createEReference(elementEClass, ELEMENT__TRANSITION);\n\n stateEClass = createEClass(STATE);\n createEAttribute(stateEClass, STATE__NAME);\n createEReference(stateEClass, STATE__STATES_PROPERTIES);\n\n statesPropertiesEClass = createEClass(STATES_PROPERTIES);\n createEAttribute(statesPropertiesEClass, STATES_PROPERTIES__COLOR);\n createEAttribute(statesPropertiesEClass, STATES_PROPERTIES__THICKNESS);\n createEAttribute(statesPropertiesEClass, STATES_PROPERTIES__POSITION);\n\n transitionEClass = createEClass(TRANSITION);\n createEReference(transitionEClass, TRANSITION__START);\n createEReference(transitionEClass, TRANSITION__END);\n createEReference(transitionEClass, TRANSITION__TRANSITION_PROPERTIES);\n createEReference(transitionEClass, TRANSITION__LABEL);\n createEAttribute(transitionEClass, TRANSITION__INIT);\n\n labelEClass = createEClass(LABEL);\n createEAttribute(labelEClass, LABEL__TEXT);\n createEAttribute(labelEClass, LABEL__POSITION);\n\n coordinatesStatesTransitionEClass = createEClass(COORDINATES_STATES_TRANSITION);\n createEAttribute(coordinatesStatesTransitionEClass, COORDINATES_STATES_TRANSITION__STATE_TRANSITION);\n\n transitionPropertiesEClass = createEClass(TRANSITION_PROPERTIES);\n createEAttribute(transitionPropertiesEClass, TRANSITION_PROPERTIES__COLOR);\n createEAttribute(transitionPropertiesEClass, TRANSITION_PROPERTIES__THICKNESS);\n createEAttribute(transitionPropertiesEClass, TRANSITION_PROPERTIES__CURVE);\n }",
"public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n modelEClass = createEClass(MODEL);\n createEReference(modelEClass, MODEL__PARAMS);\n createEReference(modelEClass, MODEL__STATES);\n createEReference(modelEClass, MODEL__POPULATION);\n\n paramEClass = createEClass(PARAM);\n createEAttribute(paramEClass, PARAM__NAME);\n createEAttribute(paramEClass, PARAM__VALUE);\n\n agentStateEClass = createEClass(AGENT_STATE);\n createEAttribute(agentStateEClass, AGENT_STATE__NAME);\n createEReference(agentStateEClass, AGENT_STATE__PREFIXS);\n\n prefixEClass = createEClass(PREFIX);\n createEReference(prefixEClass, PREFIX__ACTION);\n createEAttribute(prefixEClass, PREFIX__CONTINUE);\n\n actionEClass = createEClass(ACTION);\n createEAttribute(actionEClass, ACTION__NAME);\n createEReference(actionEClass, ACTION__RATE);\n\n acT_SpNoMsgEClass = createEClass(ACT_SP_NO_MSG);\n\n acT_SpBrEClass = createEClass(ACT_SP_BR);\n createEReference(acT_SpBrEClass, ACT_SP_BR__RANGE);\n\n acT_SpUniEClass = createEClass(ACT_SP_UNI);\n createEReference(acT_SpUniEClass, ACT_SP_UNI__RANGE);\n\n acT_InBrEClass = createEClass(ACT_IN_BR);\n createEReference(acT_InBrEClass, ACT_IN_BR__VALUE);\n\n acT_InUniEClass = createEClass(ACT_IN_UNI);\n createEReference(acT_InUniEClass, ACT_IN_UNI__VALUE);\n\n iRangeEClass = createEClass(IRANGE);\n\n pR_ExprEClass = createEClass(PR_EXPR);\n createEReference(pR_ExprEClass, PR_EXPR__PR_E);\n\n terminal_PR_ExprEClass = createEClass(TERMINAL_PR_EXPR);\n createEAttribute(terminal_PR_ExprEClass, TERMINAL_PR_EXPR__LINKED_PARAM);\n\n ratE_ExprEClass = createEClass(RATE_EXPR);\n createEReference(ratE_ExprEClass, RATE_EXPR__RT);\n\n terminal_RATE_ExprEClass = createEClass(TERMINAL_RATE_EXPR);\n createEAttribute(terminal_RATE_ExprEClass, TERMINAL_RATE_EXPR__LINKED_PARAM);\n\n agenT_NUMEClass = createEClass(AGENT_NUM);\n createEAttribute(agenT_NUMEClass, AGENT_NUM__TYPE);\n\n populationEClass = createEClass(POPULATION);\n createEReference(populationEClass, POPULATION__POPU);\n\n agentsEClass = createEClass(AGENTS);\n createEAttribute(agentsEClass, AGENTS__TYPE);\n }",
"public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n ledsCodeDSLEClass = createEClass(LEDS_CODE_DSL);\n createEReference(ledsCodeDSLEClass, LEDS_CODE_DSL__PROJECT);\n\n projectEClass = createEClass(PROJECT);\n createEAttribute(projectEClass, PROJECT__NAME);\n createEReference(projectEClass, PROJECT__INFRASTRUCTURE_BLOCK);\n createEReference(projectEClass, PROJECT__INTERFACE_BLOCK);\n createEReference(projectEClass, PROJECT__APPLICATION_BLOCK);\n createEReference(projectEClass, PROJECT__DOMAIN_BLOCK);\n\n interfaceBlockEClass = createEClass(INTERFACE_BLOCK);\n createEAttribute(interfaceBlockEClass, INTERFACE_BLOCK__NAME);\n createEReference(interfaceBlockEClass, INTERFACE_BLOCK__INTERFACE_APPLICATION);\n\n interfaceApplicationEClass = createEClass(INTERFACE_APPLICATION);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__TYPE);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__NAME);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__NAME_APP);\n\n infrastructureBlockEClass = createEClass(INFRASTRUCTURE_BLOCK);\n createEAttribute(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__BASE_PACKAGE);\n createEAttribute(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__PROJECT_VERSION);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__LANGUAGE);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__FRAMEWORK);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__ORM);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__DATABASE);\n\n databaseEClass = createEClass(DATABASE);\n createEAttribute(databaseEClass, DATABASE__VERSION_VALUE);\n createEAttribute(databaseEClass, DATABASE__NAME_VALUE);\n createEAttribute(databaseEClass, DATABASE__USER_VALUE);\n createEAttribute(databaseEClass, DATABASE__PASS_VALUE);\n createEAttribute(databaseEClass, DATABASE__HOST_VALUE);\n createEAttribute(databaseEClass, DATABASE__ENV_VALUE);\n\n nameVersionEClass = createEClass(NAME_VERSION);\n createEAttribute(nameVersionEClass, NAME_VERSION__NAME_VALUE);\n createEAttribute(nameVersionEClass, NAME_VERSION__VERSION_VALUE);\n\n applicationBlockEClass = createEClass(APPLICATION_BLOCK);\n createEAttribute(applicationBlockEClass, APPLICATION_BLOCK__NAME);\n createEAttribute(applicationBlockEClass, APPLICATION_BLOCK__APPLICATION_DOMAIN);\n\n domainBlockEClass = createEClass(DOMAIN_BLOCK);\n createEAttribute(domainBlockEClass, DOMAIN_BLOCK__NAME);\n createEReference(domainBlockEClass, DOMAIN_BLOCK__MODULE);\n\n moduleBlockEClass = createEClass(MODULE_BLOCK);\n createEAttribute(moduleBlockEClass, MODULE_BLOCK__NAME);\n createEReference(moduleBlockEClass, MODULE_BLOCK__ENUM_BLOCK);\n createEReference(moduleBlockEClass, MODULE_BLOCK__ENTITY_BLOCK);\n createEReference(moduleBlockEClass, MODULE_BLOCK__SERVICE_BLOCK);\n\n serviceBlockEClass = createEClass(SERVICE_BLOCK);\n createEAttribute(serviceBlockEClass, SERVICE_BLOCK__NAME);\n createEReference(serviceBlockEClass, SERVICE_BLOCK__SERVICE_FIELDS);\n\n serviceMethodEClass = createEClass(SERVICE_METHOD);\n createEAttribute(serviceMethodEClass, SERVICE_METHOD__NAME);\n createEReference(serviceMethodEClass, SERVICE_METHOD__METHOD_ACESS);\n\n entityBlockEClass = createEClass(ENTITY_BLOCK);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__ACESS_MODIFIER);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__IS_ABSTRACT);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__NAME);\n createEReference(entityBlockEClass, ENTITY_BLOCK__CLASS_EXTENDS);\n createEReference(entityBlockEClass, ENTITY_BLOCK__ATTRIBUTES);\n createEReference(entityBlockEClass, ENTITY_BLOCK__REPOSITORY);\n\n attributeEClass = createEClass(ATTRIBUTE);\n createEAttribute(attributeEClass, ATTRIBUTE__ACESS_MODIFIER);\n createEAttribute(attributeEClass, ATTRIBUTE__TYPE);\n createEAttribute(attributeEClass, ATTRIBUTE__NAME);\n createEAttribute(attributeEClass, ATTRIBUTE__PK);\n createEAttribute(attributeEClass, ATTRIBUTE__UNIQUE);\n createEAttribute(attributeEClass, ATTRIBUTE__NULLABLE);\n createEAttribute(attributeEClass, ATTRIBUTE__MIN);\n createEAttribute(attributeEClass, ATTRIBUTE__MAX);\n\n repositoryEClass = createEClass(REPOSITORY);\n createEAttribute(repositoryEClass, REPOSITORY__NAME);\n createEReference(repositoryEClass, REPOSITORY__METHODS);\n\n repositoryFieldsEClass = createEClass(REPOSITORY_FIELDS);\n createEAttribute(repositoryFieldsEClass, REPOSITORY_FIELDS__NAME);\n createEReference(repositoryFieldsEClass, REPOSITORY_FIELDS__METHODS_PARAMETERS);\n createEAttribute(repositoryFieldsEClass, REPOSITORY_FIELDS__RETURN_TYPE);\n\n enumBlockEClass = createEClass(ENUM_BLOCK);\n createEAttribute(enumBlockEClass, ENUM_BLOCK__NAME);\n createEAttribute(enumBlockEClass, ENUM_BLOCK__VALUES);\n\n methodParameterEClass = createEClass(METHOD_PARAMETER);\n createEReference(methodParameterEClass, METHOD_PARAMETER__TYPE_AND_ATTR);\n\n typeAndAttributeEClass = createEClass(TYPE_AND_ATTRIBUTE);\n createEAttribute(typeAndAttributeEClass, TYPE_AND_ATTRIBUTE__TYPE);\n createEAttribute(typeAndAttributeEClass, TYPE_AND_ATTRIBUTE__NAME);\n\n extendBlockEClass = createEClass(EXTEND_BLOCK);\n createEReference(extendBlockEClass, EXTEND_BLOCK__VALUES);\n }",
"public interface GMLGeometryWriter {\n\n /**\n * Exports a general geometry. This is the method to call when there is no information about the geometry (the case\n * switching is done here).\n * \n * @param geometry\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void export( Geometry geometry )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param compositeCurve\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportCompositeCurve( CompositeCurve compositeCurve )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param geometryComplex\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportCompositeGeometry( CompositeGeometry<GeometricPrimitive> geometryComplex )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param compositeSolid\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportCompositeSolid( CompositeSolid compositeSolid )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param compositeSurface\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportCompositeSurface( CompositeSurface compositeSurface )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param curve\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportCurve( Curve curve )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param envelope\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportEnvelope( Envelope envelope )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param geometry\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportMultiGeometry( MultiGeometry<? extends Geometry> geometry )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param point\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportPoint( Point point )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param geometryRef\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportReference( GeometryReference<Geometry> geometryRef )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param ring\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportRing( Ring ring )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param solid\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportSolid( Solid solid )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param surface\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportSurface( Surface surface )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param tin\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportTin( Tin tin )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param triangSurface\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportTriangulatedSurface( TriangulatedSurface triangSurface )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n}"
] | [
"0.66946304",
"0.6676237",
"0.61945975",
"0.612754",
"0.5906935",
"0.59015995",
"0.5864651",
"0.5840733",
"0.57873315",
"0.5766339",
"0.5708766",
"0.56776124",
"0.56230456",
"0.55722004",
"0.55477744",
"0.55038965",
"0.54804397",
"0.54541206",
"0.5452811",
"0.5429457",
"0.54215413",
"0.5328953",
"0.5318887",
"0.52671313",
"0.5252957",
"0.5251083",
"0.52373695",
"0.5236658",
"0.52332675",
"0.5217327",
"0.5215901",
"0.5212407",
"0.52079135",
"0.520387",
"0.5179238",
"0.5164158",
"0.5151732",
"0.51323915",
"0.51146954",
"0.51020074",
"0.51015043",
"0.50935346",
"0.50882584",
"0.5087301",
"0.50802606",
"0.50716126",
"0.50606847",
"0.505624",
"0.5039106",
"0.5034265",
"0.50280356",
"0.50235915",
"0.49821612",
"0.49805573",
"0.49769807",
"0.4973428",
"0.49718186",
"0.49606514",
"0.4958287",
"0.49582782",
"0.49541414",
"0.49511743",
"0.49458525",
"0.49379498",
"0.49311364",
"0.49301034",
"0.49281716",
"0.49256706",
"0.4922725",
"0.4918292",
"0.4905276",
"0.49043882",
"0.48963845",
"0.48906678",
"0.48865837",
"0.4872451",
"0.48619434",
"0.48568445",
"0.4851351",
"0.4851068",
"0.4835418",
"0.48314297",
"0.48302537",
"0.4825295",
"0.4820483",
"0.48173386",
"0.48107198",
"0.48094767",
"0.48039293",
"0.48014638",
"0.47916445",
"0.47885773",
"0.47848552",
"0.47777975",
"0.47771525",
"0.4774108",
"0.47684708",
"0.47626117",
"0.4760351",
"0.47572035"
] | 0.5214019 | 31 |
Generate the file's name | public String generate(int length) {
String chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
String pass = "";
for (int x = 0; x < length; x++) {
int i = (int) Math.floor(Math.random() * 62);
pass += chars.charAt(i);
}
return pass;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String generateFilename() {\n UUID uuid = UUID.randomUUID();\n return uuid.toString();\n }",
"public String generateFileName()\r\n {\r\n for (;;)\r\n {\r\n String name = generateFileName(\"_\" + Math.abs(random.nextInt()));\r\n if (!(new File(name)).exists())\r\n return name;\r\n }\r\n }",
"public String generateFileName(String midName)\r\n {\r\n return dir + nameBase + midName + nameSuffix;\r\n }",
"private String generateFileName(MultipartFile multiPart) {\n return new Date().getTime() + \"-\" + multiPart.getOriginalFilename().replace(\" \", \"_\");\n }",
"private String generateFileName() {\n\t\t\n\t\treturn \"/tmp/logger.java_log\" + new Random().nextInt();\n\t}",
"protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\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 static String getFileName()\r\n\t{\r\n\t\tString name = \"d3_\";\r\n\t\tjava.util.Date tNow = new java.util.Date();\r\n\r\n\t\tjava.text.SimpleDateFormat df = new java.text.SimpleDateFormat(\"mm_ss\");\r\n\r\n\t\tname = name + \"_\" + df.format(tNow) + \".wmf\";\r\n\r\n\t\treturn name;\r\n\t}",
"private String beautiplyFileNameGenerator() {\r\n\t\t// /randomvalue between 0 to 9\r\n\t\tString name = \"beautiply\" + new Random().nextInt(9) + \".png\";\r\n\r\n\t\treturn name;\r\n\t}",
"public String getFileName() {\n return String.format(\"%s%o\", this.fileNamePrefix, getIndex());\n }",
"java.lang.String getFilename();",
"java.lang.String getFilename();",
"String getFileName();",
"String getFileName();",
"String getFileName();",
"String getFileName();",
"String getFileName();",
"public String getFinalFileName()\r\n\t{\r\n\t\treturn this.getFileName() + this.getFileFormat();\r\n\t}",
"private static String buildFileName(int exportMode, String currentTimestamp)\n {\n String fileNamePrefix;\n\n if(exportMode != -1)\n {\n fileNamePrefix = ExportModeHandler.getFilePrefix(exportMode);\n }\n else\n {\n fileNamePrefix = \"RAW_\";\n }\n\n return fileNamePrefix + Utilities.getDeviceName() + \"_\" + currentTimestamp + \".txt\";\n }",
"private String generateFileName(String folderName) {\n\t\tStringBuilder sb = new StringBuilder(10);\n\t\tString fileName;\n\n\t\tfor (;;) {\n\n\t\t\t// produce the random number 0-9\n\t\t\tRandom ran1 = new Random();\n\n\t\t\t// put the number in the StringBuilder\n\t\t\tsb.append(ran1.nextInt(9));\n\n\t\t\tfor (int i = 0; i < 9; i++) {\n\t\t\t\t// produce random alphabet letters\n\t\t\t\tRandom ran2 = new Random();\n\n\t\t\t\t// put the letters in the StringBuilder\n\t\t\t\tsb.append(ALPHABET[ran2.nextInt(26)]);\n\t\t\t}\n\n\t\t\tfileName = sb.toString();\n\n\t\t\t// create the file\n\t\t\tFile testFile = new File(path + folderName + \"\\\\\" + fileName + \".txt\");\n\n\t\t\t// test if the file exists\n\t\t\tif (!existsFile(testFile)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn fileName;\n\t}",
"private String getNextFileName() {\n\n File fileDir = new File(Environment.getExternalStorageDirectory()\n + File.separator + mTestFolderName\n + File.separator);\n\n if (!fileDir.exists()) {\n fileDir.mkdirs();\n }\n //build filename\n GregorianCalendar gregorianCalendar = new GregorianCalendar();\n gregorianCalendar.setTime(new Date(System.currentTimeMillis()));\n String date = new SimpleDateFormat(\"dd-MM-yy_HH-mm\").format(gregorianCalendar.getTime());\n MainActivity.sTestFileDate = date;\n return Environment.getExternalStorageDirectory()\n + File.separator + mTestFolderName\n + File.separator + \"merge_T1_\" + date\n + \".mp4\";\n }",
"String getFilename();",
"public String getSimpleName() { return FilePathUtils.getFileName(_name); }",
"private String getFileName()\r\n {\r\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd__HH_mm\");\r\n \r\n String ret = new String();\r\n ret += preferences.getPreference(UserPreferences.SAVE_LOCATION_PROP);\r\n ret += format.format(new Date());\r\n \r\n String notationStr = notation.getText().trim();\r\n if (!notationStr.isEmpty()) \r\n {\r\n ret += \"__\" + notationStr.replaceAll(\" \\t/\\\\:\", \"_\");\r\n }\r\n \r\n ret += \".csv\";\r\n \r\n return ret;\r\n }",
"public String getFileName();",
"public String getFileName();",
"public String getName() { return FilePathUtils.getFileName(getPath()); }",
"public String genLogFilePath() {\n\n\t\tString logFileName = generateFileName();\n\t\tString logFilePath = FileIoUtils.getLogFilePathPrefix(logFileName)\n\t\t\t\t+ \"/\" + logFileName;\n\t\treturn logFilePath;\n\n\t}",
"public String getName() {\n return dtedDir + \"/\" + filename;\n }",
"protected String getFilename(String prefix) {\n return prefix + mFileNameDelimiter + UUID.randomUUID();\n }",
"public static String fileName(File file)\n {\n if (file == Configuration.STD_OUT)\n {\n return \"standard output\";\n }\n else\n {\n try\n {\n return file.getCanonicalPath();\n }\n catch (IOException ex)\n {\n return file.getPath();\n }\n }\n }",
"public abstract String toStringForFileName();",
"public String createUniqueSuffix(String filename) {\n \t\tint fileTypeIdx = filename.lastIndexOf('.');\n \t\tString fileType = filename.substring(fileTypeIdx); // Let the fileType include the leading '.'\n \n \t\tfilename = filename.substring(0, fileTypeIdx); // Strip off the leading '/' from the filename\n \n \tSimpleDateFormat timestampFormatter = new SimpleDateFormat(\"yyyyMMddHHmmssSSS\");\n \t\tString timstampStr = '_' + timestampFormatter.format(new Date());\n \n \t\treturn filename + timstampStr + fileType;\n \t}",
"private String generateComponentFileName (String suffix) {\n return FileBroker.generateTemporaryFileName(hashCode(),\n clientSite,\n saveId,\n suffix);\n }",
"public static String getFilename()\n\t{\n\t\tString s = \"scene \"\n//\t\t\t\t+(LORENTZ_WINDOW?\"through Lorentz Window \":\"\")\n\t\t\t\t+\"with camera with \" + APERTURE_SIZE + \" aperture size \"\n\t\t\t\t+\"focussed at z=\"+FOCUSSING_DISTANCE + \" \"\n\t\t\t\t+\"and focus-surface fixed shutter model \"\n\t\t\t\t+(BETA_0?\"at rest\":(\"moving with beta=\"+beta))\n\t\t\t\t+(TEST?\" (test)\":\"\");\n//\t\tif(!PINHOLE_CAMERA)\n//\t\t{\n//\t\t\ts = s+(FOCUSSED_ON_IMAGE?\"image\":\"object\");\n//\t\t}\n\t\treturn s+\".bmp\";\n\t}",
"public static String getFileName(String urlFileGenerated) {\r\n\r\n\t\tString result = \"\";\r\n\r\n\t\tif (urlFileGenerated != null) {\r\n\t\t\tresult = urlFileGenerated.substring(urlFileGenerated.lastIndexOf(\"/\") + 1);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public String getFileName ();",
"public String getName() {\n return _file.getAbsolutePath();\n }",
"public static String getNewSaveName() {\n if (!new File(DIRECTORY_NAME).exists()) {\n boolean success = (new File(DIRECTORY_NAME)).mkdirs();\n if (!success) {\n JOptionPane.showMessageDialog(null, \"Failed to create directory '\" + DIRECTORY_NAME + \"'\");\n return null;\n }\n }\n\n File f;\n String firstPart = DIRECTORY_NAME + \"/\" + SERIALIZED_NAME;\n String s;\n\n // Keep running until an unused name is found\n while (true) {\n // Construct another file name\n s = firstPart + ++count + NAME_EXTENSION;\n\n // Check if file exist\n f = new File(s);\n if (!f.exists()) {\n return s; // return the name if exist\n }\n }\n\n }",
"public String createImageName(File imageFile)\n\t{\n\t\tString name = imageFile.getAbsolutePath();\n\t\t\n\t\t// remove the initial part of the path that is common among all images so that only the relative path within the image folder remains\n\t\t// also remove the file's extension\n\t\tname = name.substring(imageFolder.getAbsolutePath().length() + 1, name.lastIndexOf('.'));\t\t\n\t\treturn name;\n\t}",
"@Override\n\tpublic String getName()\n\t{\n\t\treturn fileName;\n\t}",
"public String getNiceName()\n {\n String name = getBuildFile().getName();\n\n return Utility.replaceBadChars(name);\n }",
"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 synchronized static String getRandomFilename()\n {\n // Reserve space to fill with random bytes\n\n byte bytes[] = new byte[20];\n\n secure_random.nextBytes(bytes);\n\n return convertRandomBytesToFileName(bytes);\n }",
"public String getName()\n {\n return( file );\n }",
"String generateUniqueName();",
"public static String getFileName() {\n File base = new File(\"C:/Users/Steve/IdeaProjects/MiniJavaCompiler/samples/clean/\");\n File file = new File(inputFile);\n String relativePath = base.toURI().relativize(file.toURI()).getPath();\n return relativePath;\n }",
"public String getFilename();",
"public String getFileName(int index) {\n\t\tFile f = openFiles.get(index);\n\t\tString nom = f.getName().substring(0,f.getName().length()-5);\n\t\treturn nom;\n\t}",
"public abstract String getFileName();",
"private String getFilename() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String filename = getExternalStoragePublicDirectory(DIRECTORY_PICTURES).getPath().toString() + \"/\" + timeStamp + \".jpg\";\n\n return filename;\n }",
"private static String filename(String longFileName) {\n try {\n return Util.computeStrongName(longFileName.getBytes(Util.DEFAULT_ENCODING));\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(e);\n }\n }",
"public String fullFileName () {\n\t\tif (directory == null || directory.equals(\"\"))\n\t\t\treturn fileName;\n\t\telse\n\t\t\treturn directory + File.separator + fileName;\t//add a '\\' in the path\n\t}",
"@Override\n\tpublic String getFilename() {\n\t\treturn this.path.getFileName().toString();\n\t}",
"static public String getFileName(ObjectNode schemeId)\n\t{\n\t\treturn schemeId.path(\"fileName\").asText(null);\n\t}",
"private String nakedFileName() {\n return f.getName().split(\"\\\\.\")[0];\n }",
"public String getFileName() {\n\t\treturn file.getFileName();\n\t}",
"private String getFileName() {\n\t\t// retornamos el nombre del fichero\n\t\treturn this.fileName;\n\t}",
"public abstract String createFilename(Entity entity);",
"protected String getFileNamePath()\n {\n String sep = System.getProperty(\"file.separator\", \"/\");\n// String path = System.getProperty(\"user.dir\", \".\");\n\n String filename = getPath() + sep + \"sec.dat\";\n\n return filename;\n }",
"public String getFileName() {\n if (url.endsWith(\"/\")) {\n url = url.substring(0, url.length() - 1);\n }\n\n //Replace illegal characters\n String urlFileName = url.replace(\"http://\", \"\");\n urlFileName = urlFileName.replace(\"https://\", \"\");\n urlFileName = urlFileName.replace(\"/\", \"\");\n urlFileName += \".txt\";\n\n return urlFileName;\n }",
"public final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}",
"private String generateComponentName(String currentName, String fileName, int depth){\n if (depth == 0) return \"\";\n if (currentName.isEmpty()) return fileName;\n return currentName + \".\" + fileName;\n }",
"protected static String getFilename(String base) {\n //return Integer.toHexString(base.hashCode()) + \".map\";\n return base + \".map\";\n }",
"public final String getFileName() {\n\n\t\treturn getValue(FILE_NAME);\n\t}",
"private String constructFileName(String filename, int index, String timestamp)\r\n\t{\r\n\r\n\t\tStringBuffer tempFileName = new StringBuffer();\r\n\t\tif (null == timestamp || \"\".equals(timestamp))\r\n\t\t{\r\n\t\t\tSimpleDateFormat currentDate = new SimpleDateFormat(this.getDatePattern());\r\n\t\t\ttimestamp = currentDate.format(new Date());\r\n\t\t}\r\n\t\tFile file = new File(filename);\r\n\t\tString absFile = file.getName();\r\n\t\tString absPath = file.getParent();\r\n\t\tString filenameFirstPart = absFile;\r\n\t\tString ext = \"\";\r\n\t\tif (this.getSuffixOrPrefix().equals(PREFIXCONST))\r\n\t\t{\r\n\t\t\tfilenameFirstPart = retrieveFileNameWithOutExt(absFile);\r\n\t\t\text = retrieveFileExtension(absFile);\r\n\t\t}\r\n\t\tString appender = ext.equals(\"\") ? \"\" : \".\";\r\n\t\ttempFileName.append(absPath);\r\n\t\ttempFileName.append(File.separatorChar);\r\n\t\ttempFileName.append(filenameFirstPart);\r\n\t\ttempFileName.append(this.getPatternSeparator());\r\n\t\ttempFileName.append(timestamp);\r\n\t\ttempFileName.append(this.getPatternSeparator());\r\n\t\ttempFileName.append(index < 10 ? \"0\" + index : index);\r\n\t\tif (this.getSuffixOrPrefix().equals(PREFIXCONST))\r\n\t\t{\r\n\t\t\ttempFileName.append(appender);\r\n\t\t\ttempFileName.append(ext);\r\n\t\t}\r\n\t\treturn tempFileName.toString();\r\n\r\n\t}",
"private String getSaveName(String filepath) {\r\n String newname = \"\";\r\n for (char c : filepath.toCharArray()) {\r\n if (c == '/' || c == '\\\\' || c == ':') newname+=\"_\";\r\n else newname+=c;\r\n }\r\n newname+=EXTENSION;\r\n return newname;\r\n }",
"public String getFileName()\n {\n return getString(\"FileName\");\n }",
"private String getFileName(String path)\n\t{\n\t\tFile file = new File(path);\n\t\tString name = file.getName();\n\t\treturn name.replace(\".\", \"_\");\n\t}",
"public String GetFileName() {\r\n\treturn fileName;\r\n }",
"private String fileName(ModuleReference mref) {\n URI uri = mref.location().orElse(null);\n if (uri != null) {\n if (uri.getScheme().equalsIgnoreCase(\"file\")) {\n Path file = Path.of(uri);\n return file.getFileName().toString();\n } else {\n return uri.toString();\n }\n } else {\n return \"<unknown>\";\n }\n }",
"public String getFileName() {\n\t\treturn file.getName();\n\t}",
"public String getFilename() {\n\treturn file.getFilename();\n }",
"public String getFileName()\r\n\t{\r\n\t\treturn settings.getFileName();\r\n\t}",
"public String generateName(String baseName, AbstractView view)\n {\n // Try 200 times -- should be plenty.\n for (int i = 1; i < 200; i++)\n {\n String candidate = baseName + i;\n\n if (!m_NameMap.isNameInUse(candidate))\n {\n m_NameMap.registerName(candidate, view);\n return candidate;\n }\n }\n\n throw new IllegalStateException(\n \"Could not generate a unique name for basename \" + baseName);\n }",
"public String filename (){\r\n\t\t\treturn _filename;\r\n\t\t}",
"private String buildDeployFileName(final String originalFileName) {\n String tempDir = System.getProperty(\"java.io.tmpdir\");\n StringBuilder builder = new StringBuilder();\n builder.append(tempDir);\n builder.append(\"/\");\n builder.append(originalFileName);\n return builder.toString();\n }",
"public abstract FileName createName(String absolutePath, FileType fileType);",
"public static String getLastFileName()\r\n\t{\r\n\t\treturn _outputFileName;\r\n\t}",
"public String generateFullName() {\n\n\t\tString fullName;\n\t\tfullName = firstNames.get(roll.nextInt(firstNames.size()));\n\t\tfullName += \" \" + lastNames.get(roll.nextInt(lastNames.size()));\n\t\treturn fullName;\n\t}",
"@Override\r\n\tpublic String getName() {\n\t\treturn \"C:/path/to/file/rdfSpecimen_2013-06-28.xml\";\r\n\t}",
"String getFileName(String filePath) {\n\t\tint lastSlash = savedFilePath.lastIndexOf(\"\\\\\");\n\t\tint dotPos = savedFilePath.lastIndexOf(\".\");\n\t\tString fileName = savedFilePath.substring(lastSlash+1,dotPos);\n\t\treturn fileName;\n\t}",
"private String getOutputFileName(JCas pJCas) {\n String returnValue = null;\n \n String name = getSourceName(pJCas);\n \n if ((this.outputProjectDirectorySaved.startsWith(\"/\")) || (this.outputProjectDirectorySaved.startsWith(\"\\\\\"))\n || (this.outputProjectDirectorySaved.indexOf(\":\") == 1))\n returnValue = this.outputProjectDirectorySaved + \"/\" + name + \".txt.knowtator.xml\";\n else\n returnValue = this.homeDir + \"/\" + this.eHostWorkSpaceName + \"/\" + this.projectName + \"/saved/\" + name\n + \".txt.knowtator.xml\";\n \n return returnValue;\n }",
"public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }",
"public String filename(File f) {\r\n int dot = f.toString().lastIndexOf(\".\");\r\n int sep = f.toString().lastIndexOf(\"\\\\\");\r\n return f.toString().substring(sep + 1, dot);\r\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getFile_name() {\n\t\treturn file_name;\n\t}",
"public String getName() {\n\t\treturn filename;\n\t}"
] | [
"0.83639306",
"0.8169292",
"0.8008117",
"0.7897545",
"0.7893309",
"0.7822783",
"0.780717",
"0.780717",
"0.780717",
"0.780717",
"0.780717",
"0.780717",
"0.780717",
"0.780717",
"0.780717",
"0.7798664",
"0.7602686",
"0.7578787",
"0.7473152",
"0.7473152",
"0.74298525",
"0.74298525",
"0.74298525",
"0.74298525",
"0.74298525",
"0.73446196",
"0.73078185",
"0.7284426",
"0.7254421",
"0.7233738",
"0.71988106",
"0.7192861",
"0.71405786",
"0.71405786",
"0.71321684",
"0.7089089",
"0.7083935",
"0.7082974",
"0.7074013",
"0.70358205",
"0.70312566",
"0.7028169",
"0.7009165",
"0.6968186",
"0.6947327",
"0.69216895",
"0.6915864",
"0.69146067",
"0.6894759",
"0.6890608",
"0.686855",
"0.68579715",
"0.68376154",
"0.6834876",
"0.6827889",
"0.6816143",
"0.68096143",
"0.68035364",
"0.6779324",
"0.6769151",
"0.67628175",
"0.67423373",
"0.67351043",
"0.67342865",
"0.6719303",
"0.6708761",
"0.67031646",
"0.66959786",
"0.66945714",
"0.6659339",
"0.6652003",
"0.66399795",
"0.66382104",
"0.66351825",
"0.66305256",
"0.6625509",
"0.6624692",
"0.6619585",
"0.66165245",
"0.66159666",
"0.6612584",
"0.6605252",
"0.66017973",
"0.65969634",
"0.6586854",
"0.6579376",
"0.65761787",
"0.6574356",
"0.65496266",
"0.65476906",
"0.65471625",
"0.65373474",
"0.65200496",
"0.65128684",
"0.65128684",
"0.65128684",
"0.65128684",
"0.65128684",
"0.65128684",
"0.6501893",
"0.650087"
] | 0.0 | -1 |
getter of the library | public Library getLibrary() {
return library;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getLibrary() {\n return library;\n }",
"public Library getLibrary() {\r\n\t\treturn library;\t\r\n\t}",
"public ArrayList getLibrary() {\n return Library;\n }",
"public Libro getLIBRO() {\r\n return LIBRO;\r\n }",
"public AbstractLibrary getOwningLibrary();",
"public static DataClayRuntime getLib() {\n\t\tfinal DataClayRuntime clib = commonLibs.get();\n\t\treturn clib;\n\t}",
"public abstract String getLibelle();",
"public String getLibele(){\n\t\treturn libeleService;\n\t}",
"public String getLibraryName() {\n return getProperty(Property.LIBRARY_NAME);\n }",
"public String getLibraryNumber()\r\n {\r\n return libraryNumber;\r\n }",
"ISOAErrLibrary getLibrary();",
"public String getLibelle() {\n\t\treturn getTo(true).getLibelle();\n\t}",
"public File getLibraryFile() {\n return ((FilePath) this.getClasses().iterator().next()).getFile();\n }",
"public String getLibraryId() {\n return getProperty(Property.LIBRARY_ID);\n }",
"public String getLibelle() {\n\t\treturn _libelle;\n\t}",
"public interface Libraries {\n Library getByIdentifier(LibraryIdentifier libraryIdentifier);\n}",
"public String getName() {\r\n\t\treturn libraryName;\r\n\t}",
"public int getLibVersionNumber();",
"public String getLibelle() {\n return libelle;\n }",
"public String getAttributeFileLibPath();",
"public PhotoContainer getImageLibrary() {\n\t\treturn imageLibrary;\n\t}",
"public java.lang.String getLibelle(){\r\n return this.libelle;\r\n }",
"@Generated(hash = 290165030)\r\n public Library getLibrary() {\r\n Long __key = this.id;\r\n if (library__resolvedKey == null || !library__resolvedKey.equals(__key)) {\r\n final DaoSession daoSession = this.daoSession;\r\n if (daoSession == null) {\r\n throw new DaoException(\"Entity is detached from DAO context\");\r\n }\r\n LibraryDao targetDao = daoSession.getLibraryDao();\r\n Library libraryNew = targetDao.load(__key);\r\n synchronized (this) {\r\n library = libraryNew;\r\n library__resolvedKey = __key;\r\n }\r\n }\r\n return library;\r\n }",
"public LibraryMap getLibrariesMap() {\n return librariesMap;\n }",
"public void libraryLoaded();",
"public Integer getLibraryId() {\n return libraryId;\n }",
"public String getLibro() {\n return libro;\n }",
"public static void getALibrary()\n \t{\n \t\tProject.pmActive = true;\n \n \t\t// find a list of files (libraries) in the repository\n \t\tString dirName = Project.getRepositoryLocation();\n \t\tFile dir = new File(dirName);\n \t\tFile [] filesInDir = dir.listFiles();\n \t\tif (filesInDir == null && dirName.length() == 0)\n \t\t{\n \t\t\tJob.getUserInterface().showInformationMessage(\"No repository location is set. Use the 'Project Management' Preferences to set it.\", \"Warning\");\n \t\t\treturn;\n \t\t}\n \n \t\t// choose one and read it in\n \t\tnew LibraryDialog(filesInDir);\n \t}",
"public List getLibs() {\r\n\t\tList libs = (List) super.get(LIBS_FIELD_NAME);\r\n\t\tif (libs == null) {\r\n\t\t\tlibs = new JSONArray();\r\n\t\t\tsuper.put(LIBS_FIELD_NAME, libs);\r\n\t\t}\r\n\t\treturn libs;\r\n\t}",
"private String getNuclideLibrary(String LscIniPath) {\n\t\tTxtFileReader txtFileReader = null;\n\t\t;\n\t\ttry {\n\t\t\ttxtFileReader = new TxtFileReader(LscIniPath);\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\tnuclidesLibrary = txtFileReader.nuclideLibrary;\n/*\t\tif (nuclidesLibrary != null)\n\t\t\tSystem.out.println(\"nuclidesLibrary has been got: \"\n\t\t\t\t\t+ nuclidesLibrary);*/\n\n\t\treturn nuclidesLibrary;\n\t}",
"public String getLibraryTitle() {\n return getProperty(Property.LIBRARY_TITLE);\n }",
"String getPackager();",
"String pkg();",
"public String getOverlibURL() {\r\n\t\treturn overlibURL;\r\n\t}",
"Catalog getCatalog();",
"Catalog getCatalog();",
"public com.example.plugins.service.LibroService getLibroService() {\n return libroService;\n }",
"public String getClientLibId() {\n return RcClientLib.CLIENT_LIB_ID;\n }",
"protected static Library readALibrary(URL fileURL, Library lib, String libName, FileType type, Map<Setting,Object> projectSettings)\n \t{\n \t\t// handle different file types\n \t\tLibraryFiles in;\n \t\tif (type == FileType.ELIB)\n \t\t{\n \t\t\tin = new ELIB();\n \t\t\tif (in.openBinaryInput(fileURL)) return null;\n \t\t} else if (type == FileType.JELIB || type == FileType.DELIB)\n \t\t{\n try {\n LibId libId = lib != null ? lib.getId() : EDatabase.serverDatabase().getIdManager().newLibId(libName);\n in = new JELIB(libId, fileURL, type);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n \t\t} else if (type == FileType.READABLEDUMP)\n \t\t{\n \t\t\tin = new ReadableDump();\n \t\t\tif (in.openTextInput(fileURL)) return null;\n \t\t} else\n \t\t{\n \t\t\tSystem.out.println(\"Unknown import type: \" + type);\n \t\t\treturn null;\n \t\t}\n \n \t\t// determine whether this is top-level\n \t\tin.topLevelLibrary = false;\n \t\tif (lib == null)\n \t\t{\n \t\t\tmainLibDirectory = TextUtils.getFilePath(fileURL);\n if (type == FileType.DELIB) {\n mainLibDirectory = mainLibDirectory.replaceAll(libName+\".\"+type.getExtensions()[0], \"\");\n }\n \t\t\tin.topLevelLibrary = true;\n \t\t}\n \n \t\tif (lib == null)\n \t\t{\n \t\t\t// create a new library\n \t\t\tlib = Library.newInstance(libName, fileURL);\n \t\t}\n \n \t\tin.lib = lib;\n \n \t\t// read the library\n \t\tboolean error = in.readInputLibrary();\n \t\tin.closeInput();\n \t\tif (error)\n \t\t{\n \t\t\tSystem.out.println(\"Error reading \" + lib);\n \t\t\tif (in.topLevelLibrary) mainLibDirectory = null;\n \t\t\treturn null;\n \t\t}\n // if (CVS.isEnabled()) {\n // CVSLibrary.addLibrary(lib);\n // }\n if (projectSettings != null)\n projectSettings.putAll(in.projectSettings);\n \t\treturn in.lib;\n \t}",
"public String getPackaging();",
"public abstract @NotNull LibraryTable getLibraryTable();",
"static String getVendor() {return glVendor;}",
"GaewebPackage getGaewebPackage();",
"MystPackage getMystPackage();",
"LtmlPackage getLtmlPackage();",
"public Catalog getCatalog();",
"public String getLicense();",
"public Label getFunctionLibLabel() {\n\t\treturn functionLibLabel;\n\t}",
"private NodeRef getDocumentLibraryFolder(){\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n List<String> pathElements = new ArrayList<String>();\n pathElements.add(TradeMarkModel.DOCUMENT_LIBRARY_FOLDER_NAME);\n NodeRef nr = null;\n try {\n nr = fileFolderService.resolveNamePath(repositoryHelper.getCompanyHome(), pathElements).getNodeRef();\n } catch (FileNotFoundException e) {\n if(LOG.isInfoEnabled()){\n LOG.info(e.getMessage(), e);\n } \n LOG.error(e.getMessage(), e);\n }\n return nr;\n }",
"public DropboxAPI getAPI() {\n \treturn api;\n }",
"Import getTechnology();",
"PiviPackage getPiviPackage();",
"ApiPackage getApiPackage();",
"public void loadingLibrary(String libraryFilename);",
"TggPackage getTggPackage();",
"public Optional<LibraryHook> getHook() {\n if (hook == null) {\n try {\n hook = libraryClass.getDeclaredConstructor().newInstance();\n } catch (Exception | NoClassDefFoundError exception) {\n Bukkit.getConsoleSender().sendMessage(\"Could not grab hook of \" + this.getHumanPluginName());\n exception.printStackTrace();\n return Optional.empty();\n }\n }\n\n return Optional.of(hook);\n }",
"public void setLibele(String lib){\n\t\tlibeleService = lib;\n\t}",
"IFunctionLibrary getFunctionLibrary();",
"Object getPlatform();",
"public LibraryRef getTarget() {\n return new LibraryRef((JsonObject) json.get(\"target\"));\n }",
"private DevLibProperties probeActiveDevLibLocation()\r\n\t\t\tthrows NotAvailableSDLException {\r\n\r\n\t\tString preDevLib = getPreferedDevLibLocation();\r\n\t\tDevLibProperties devLibProp = DevLibPluginController.getInstance()\r\n\t\t\t\t.findDevLibPropFromLabel(preDevLib);\r\n\r\n\t\tif (devLibProp == null) {\r\n\t\t\tSet<DevLibProperties> devLibPropertiesSet = DevLibPluginController\r\n\t\t\t\t\t.getInstance().getDevLibPropertiesSet();\r\n\t\t\tif (devLibPropertiesSet.isEmpty()) {\r\n\t\t\t\tthrow new NotAvailableSDLException(\r\n\t\t\t\t\t\tMessagesConstants.NO_VALID_DEVELOPER_LIBRARY + \":\"\r\n\t\t\t\t\t\t\t\t+ preDevLib);\r\n\t\t\t} else {\r\n\t\t\t\tIterator<DevLibProperties> it = devLibPropertiesSet.iterator();\r\n\t\t\t\tdevLibProp = it.next();\r\n\t\t\t\tString msg = MessagesConstants.PREVIOUS_DEVLIB_NOTFOUND\r\n\t\t\t\t\t\t+ preDevLib + \" \" + MessagesConstants.NEW_DEVLIB_USED\r\n\t\t\t\t\t\t+ devLibProp.getUserFriendlyName();\r\n\t\t\t\tsetPreferedDevLibLocation(devLibProp);\r\n\t\t\t\tDialogHelper.displayErrorDialog(msg);\r\n\t\t\t\tLogger.logWarn(msg);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn devLibProp;\r\n\t}",
"public URL resourceUrl() {\n return SigarLibraries.class.getResource(SIGAR_LIB_PATH);\n }",
"public ArrayList<Book> getLibraryBooks() {\n return this.libraryBooks;\n }",
"boolean includeLibsComponent();",
"RestPackage getRestPackage();",
"CdapPackage getCdapPackage();",
"AsrtPackage getAsrtPackage();",
"CorePackage getCorePackage();",
"java.lang.String getPackage();",
"@Override\n\tpublic String getDesignation() {\n\t\treturn libelle;\n\t}",
"Pkg getPkg(String pkg) {\n return (Pkg)packages.get(pkg);\n }",
"public abstract String getConfig();",
"protected SystemCatalog getSystemCatalog() {\n return catalog;\n }",
"java.lang.String getOutputjar();",
"public abstract String getSystem( );",
"Plugin getPlugin( );",
"public String getLBR_ProductSource();",
"DocbookPackage getDocbookPackage();",
"protected LibReference() {\n\t}",
"public static NativeLibraryLoader getInstance() {\n return instance;\n }",
"public interface DAOLibro {\n\t\n\t/**\n\t * Este metodo permite agregar un libro a la libreria\n\t * \n\t * @param libro el libro a agregar\n\t * @return true si se creo exitosamente, false sino\n\t */\n\tpublic boolean crea(Libro libro);\n\t\n\t/**\n\t * Este metodo busca un libro a partir de su nombre\n\t * \n\t * @param nombre el nombre del libro a buscar\n\t * @return una referencia al libro o null si no se encontro\n\t */\n\tpublic Libro recupera(String nombre);\n\t\n\t/**\n\t * Actualiza libro\n\t * \n\t * @param libro\n\t * @return true si se actualizo correctamente, false si no\n\t */\n\tpublic boolean actualiza(Libro libro);\n\n\t/**\n\t * Retira un libro de la libreria\n\t * \n\t * @param libro el libro a retirar\n\t * @return true si se retiro exitosamente, false sino\n\t */\n\tpublic boolean borra(Libro libro);\n\t\n\t/**\n\t * Regresa la lista de todos los libros\n\t * \n\t * @return un ArrayList con todos los libros de la libreria\n\t */\n\tpublic ArrayList<Libro> recuperaTodos();\n\n\n}",
"public abstract String getModuleName( );",
"public static int getUsersMainLibrary(HttpServletRequest request) {\r\n\t\treturn getUserProfile(request.getSession(false)).getMainLibrary();\r\n\t}",
"public String getPackageName();",
"public static Gadget getInstance(){\r\n\t\t\treturn instance;\r\n\t\t}",
"public String getNativeLibraryPath() {\n\t\treturn nativeLibraryPath;\n\t}",
"public Library(String setName) {\n name = setName;\n }",
"public java.util.Map<java.lang.String, java.lang.Double> libor1M()\n\t{\n\t\treturn _libor1M;\n\t}",
"public String getApp();",
"public static String getImplementationVendor() {\r\n return getJarInfo(\"Implementation-Vendor\");\r\n }",
"public LibroPersistence getLibroPersistence() {\n return libroPersistence;\n }",
"public abstract String getAndroidPackage();",
"ICpPackInfo getPackInfo();",
"public Library (){\r\n\t\tthis.inverntory = new List();\r\n\t}",
"public abstract String packageName();",
"protected Library readExternalLibraryFromFilename(String theFileName, FileType defaultType)\n \t{\n \t\t// get the path to the library file\n \t\tString legalLibName = TextUtils.getFileNameWithoutExtension(theFileName);\n // Checking if the library is already open\n \t\tLibrary elib = Library.findLibrary(legalLibName);\n \t\tif (elib != null) return elib;\n \n //\t\tURL url = TextUtils.makeURLToFile(theFileName);\n //\t\tString fileName = url.getFile();\n //\t\tFile libFile = new File(fileName);\n \n \t\t// see if this library is already read in\n \t\tString libFileName = theFileName;\n //\t\tString libFileName = libFile.getName();\n \n \t\t// special case if the library path came from a different computer system and still has separators\n \t\twhile (libFileName.endsWith(\"\\\\\") || libFileName.endsWith(\":\") || libFileName.endsWith(\"/\"))\n \t\t\tlibFileName = libFileName.substring(0, libFileName.length()-1);\n \t\tint backSlashPos = libFileName.lastIndexOf('\\\\');\n \t\tint colonPos = libFileName.lastIndexOf(':');\n \t\tint slashPos = libFileName.lastIndexOf('/');\n \t\tint charPos = Math.max(backSlashPos, Math.max(colonPos, slashPos));\n \t\tif (charPos >= 0)\n \t\t{\n \t\t\tlibFileName = libFileName.substring(charPos+1);\n \t\t}\n \t\tString libName = libFileName;\n \t\tFileType importType = OpenFile.getOpenFileType(libName, defaultType);\n FileType preferredType = importType;\n \n // this is just to remove the extension from the lib name string\n \t\tif (libName.endsWith(\".elib\"))\n \t\t{\n \t\t\tlibName = libName.substring(0, libName.length()-5);\n \t\t} else if (libName.endsWith(\".jelib\"))\n \t\t{\n \t\t\tlibName = libName.substring(0, libName.length()-6);\n } else if (libName.endsWith(\".delib\"))\n {\n libName = libName.substring(0, libName.length()-6);\n \t\t} else if (libName.endsWith(\".txt\"))\n \t\t{\n \t\t\tlibName = libName.substring(0, libName.length()-4);\n \t\t} else\n \t\t{\n \t\t\t// no recognizable extension, add one to the file name\n \t\t\tlibFileName += \".\" + defaultType.getExtensions()[0];\n \t\t}\n \n StringBuffer errmsg = new StringBuffer();\n \n // first try the library name with the extension it came with\n // However, do not look in electric library area to avoid problems with spice configurations for old chips\n URL externalURL = getLibrary(libName + \".\" + preferredType.getExtensions()[0], theFileName, errmsg, true);\n // Now try all file types, starting with jelib\n // try JELIB\n if (externalURL == null && preferredType != FileType.JELIB) {\n externalURL = getLibrary(libName + \".\" + FileType.JELIB.getExtensions()[0], theFileName, errmsg, true);\n }\n // try ELIB\n if (externalURL == null && preferredType != FileType.ELIB) {\n externalURL = getLibrary(libName + \".\" + FileType.ELIB.getExtensions()[0], theFileName, errmsg, true);\n }\n // try DELIB\n if (externalURL == null && preferredType != FileType.DELIB) {\n externalURL = getLibrary(libName + \".\" + FileType.DELIB.getExtensions()[0], theFileName, errmsg, true);\n }\n // try txt\n if (externalURL == null && preferredType != FileType.READABLEDUMP) {\n externalURL = getLibrary(libName + \".\" + FileType.READABLEDUMP.getExtensions()[0], theFileName, errmsg, true);\n }\n \n boolean exists = (externalURL == null) ? false : true;\n // last option: let user pick library location\n \t\tif (!exists)\n \t\t{\n \t\t\tSystem.out.println(\"Error: cannot find referenced library \" + libName+\":\");\n \t\t\tSystem.out.print(errmsg.toString());\n \t\t\tString pt = null;\n \t\t\twhile (true) {\n \t\t\t\t// continue to ask the user where the library is until they hit \"cancel\"\n \t\t\t\tString description = \"Reference library '\" + libFileName + \"'\";\n \t\t\t\tpt = OpenFile.chooseInputFile(FileType.LIBFILE, description);\n \t\t\t\tif (pt == null) {\n \t\t\t\t\t// user cancelled, break\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\t// see if user chose a file we can read\n \t\t\t\texternalURL = TextUtils.makeURLToFile(pt);\n \t\t\t\tif (externalURL != null) {\n \t\t\t\t\texists = TextUtils.URLExists(externalURL, null);\n \t\t\t\t\tif (exists) {\n \t\t\t\t\t\t// good pt, opened it, get out of here\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\tif (exists)\n \t\t{\n \t\t\tSystem.out.println(\"Reading referenced library \" + externalURL.getFile());\n importType = OpenFile.getOpenFileType(externalURL.getFile(), defaultType);\n elib = Library.newInstance(legalLibName, externalURL);\n \t\t}\n \n if (elib != null)\n {\n // read the external library\n String oldNote = getProgressNote();\n setProgressValue(0);\n setProgressNote(\"Reading referenced library \" + legalLibName + \"...\");\n \n \t\t\t// get the library name\n \t\t\tString eLibName = TextUtils.getFileNameWithoutExtension(externalURL);\n elib = readALibrary(externalURL, elib, eLibName, importType, null);\n setProgressValue(100);\n setProgressNote(oldNote);\n }\n \n if (elib == null)\n {\n System.out.println(\"Error: cannot find referenced library \" + theFileName);\n System.out.println(\"...Creating new \"+legalLibName+\" Library instead\");\n elib = Library.newInstance(legalLibName, null);\n elib.setLibFile(TextUtils.makeURLToFile(theFileName));\n elib.clearFromDisk();\n }\n //\t\tif (failed) elib->userbits |= UNWANTEDLIB; else\n //\t\t{\n //\t\t\t// queue this library for announcement through change control\n //\t\t\tio_queuereadlibraryannouncement(elib);\n //\t\t}\n \n \t\treturn elib;\n \t}",
"RepositoryPackage getRepositoryPackage();",
"JPackage _package();",
"HiphopsPackage getHiphopsPackage();",
"String getProduct();"
] | [
"0.78719544",
"0.7851377",
"0.74417764",
"0.6849319",
"0.67620873",
"0.67553943",
"0.6688496",
"0.66696227",
"0.6649742",
"0.6569055",
"0.6555669",
"0.653491",
"0.6470187",
"0.6420696",
"0.6412356",
"0.6412307",
"0.6288624",
"0.62668514",
"0.62607795",
"0.6257157",
"0.6253411",
"0.6248215",
"0.62322706",
"0.6232019",
"0.6210623",
"0.61953294",
"0.6180625",
"0.6074271",
"0.60436577",
"0.60134023",
"0.59831876",
"0.5981654",
"0.5966744",
"0.59127903",
"0.58915746",
"0.58915746",
"0.58451986",
"0.5842352",
"0.57848966",
"0.5782611",
"0.57699853",
"0.5753156",
"0.57374376",
"0.5692748",
"0.5675786",
"0.5651081",
"0.5649446",
"0.56407344",
"0.5633519",
"0.56295455",
"0.5628659",
"0.5614256",
"0.5593124",
"0.5583902",
"0.55608684",
"0.5549395",
"0.5548795",
"0.5542914",
"0.55252177",
"0.5521652",
"0.55161464",
"0.5512859",
"0.54885316",
"0.54799426",
"0.5474068",
"0.54633003",
"0.5460924",
"0.5441404",
"0.5431272",
"0.5427941",
"0.5426175",
"0.5424141",
"0.54186875",
"0.5416501",
"0.54040456",
"0.54030985",
"0.538129",
"0.53772527",
"0.53763247",
"0.5371473",
"0.53690153",
"0.5368992",
"0.53678197",
"0.5367472",
"0.5366776",
"0.5361466",
"0.5354339",
"0.535364",
"0.5346332",
"0.5345523",
"0.5342743",
"0.5329869",
"0.53156847",
"0.5308226",
"0.5307542",
"0.53050596",
"0.5301033",
"0.52986616",
"0.52928215",
"0.5291112"
] | 0.77517813 | 2 |
getter of the new image | public String getNewImage() {
return newImage;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TiledImage getNewImage() {\n return this.newImage;\n }",
"@Override\r\n\tpublic Image getImg() {\n\t\treturn img.getImage();\r\n\t}",
"@Override\n\tpublic Image getImage() {\n\t\treturn img;\n\t}",
"public ImageInfo getImage() {\n return image;\n }",
"public Image getImage() {\r\n return image;\r\n }",
"@Override\n\tpublic Image getImage() {\n\t\treturn image;\n\t}",
"public String getImage() { return image; }",
"public Image getImage() {\n return image;\n }",
"public Image getImage() {\r\n\t\treturn image;\r\n\t}",
"public Image getImage() {\n\t\treturn image;\r\n\t}",
"public Image getImage() {\n return image;\n }",
"public BufferedImage getImage() {\t\r\n\t\treturn this.image;\t\t\t\r\n\t}",
"public Image getImage() {\n\t\treturn image;\n\t}",
"public Image getImage() {\n\t\treturn image;\n\t}",
"public BufferedImage getImage() {\n\t\t return img;\n\t}",
"public Image getOne();",
"public String getImage()\n {\n return image;\n }",
"public int getImage();",
"public String getImage() {\n return image;\n }",
"public PImage getImage() {\n return this.image;\n }",
"public Image getInstanceImage() {\r\n return this.image;\r\n }",
"PImage getImage() {\n return _img;\n }",
"public String getNewImageTag() {\n return newImageTag;\n }",
"public String getImage() {\n\t\treturn image;\n\t}",
"public String getImage() {\n\t\treturn image;\n\t}",
"public String getImage() {\n return image;\n }",
"public String getImage() {\n return image;\n }",
"public String getImage() {\n return image;\n }",
"public String getImage() {\n return image;\n }",
"public String getImage() {\n return this.Image;\n }",
"public PImage getImg() {\n \treturn img;\n }",
"public BufferedImage getImage() {\n return image;\n }",
"public BufferedImage getImage() {\n\t\treturn this.image;\n\t}",
"public Rectangle getImage() {\n\t\treturn image;\n\t}",
"public Image getTwo();",
"public Bitmap getImage(){\n return images[currentFrame];\n }",
"public abstract Image getImage();",
"public abstract Image getImage();",
"public byte[] getImage() {\n return image;\n }",
"public byte[] getImage() {\n return image;\n }",
"public byte[] getImage() {\n return image;\n }",
"public String getImg(){\n return img;\n }",
"public abstract BufferedImage getSnapshot();",
"public ImageIcon getImage()\n {\n return image;\n }",
"public BufferedImage getImage() {\n/* 81 */ return this.bufImg;\n/* */ }",
"public BufferedImage getCurrentImage(){\n\t\treturn getCurrentImage(System.currentTimeMillis()-lastUpdate);\n\t}",
"public String getImg() {\n return img;\n }",
"public String getImg() {\n return img;\n }",
"public String getImg() {\n return img;\n }",
"public final ImageProcessor getImage() {\r\n return image;\r\n }",
"public Bitmap getImage() {\n return image;\n }",
"public javafx.scene.image.Image getImage() {\n return super.getImage();\n }",
"public javafx.scene.image.Image getImage() {\n return super.getImage();\n }",
"public javafx.scene.image.Image getImage() {\n return super.getImage();\n }",
"public ImageIcon getImage(){\n\t\treturn this.image;\n\t}",
"public ImageArray getCurrentImage() {\n return currentIm;\n }",
"public ModelImage getResultImage() {\r\n return resultImage;\r\n }",
"public ModelImage getResultImage() {\r\n return resultImage;\r\n }",
"public ModelImage getResultImage() {\r\n return resultImage;\r\n }",
"public ImageIcon image() {\n return image;\n }",
"java.lang.String getImage();",
"public String getOriginalImg() {\n return originalImg;\n }",
"public WritableImage getImage(){\n\t\tWritableImage image = SwingFXUtils.toFXImage(BfImage, null);\r\n\t\treturn image;\r\n\t}",
"String getImage();",
"public Image getSix();",
"public BufferedImage getImage()\r\n\t{\r\n\t\treturn mImageBuffer;\r\n\t}",
"public Image getImage() {\n return null;\r\n }",
"public Image getImg(){\n\t\treturn imgs[count];\n\t}",
"public Image getImage()\n {\n return null;\n }",
"public ImageObj currentImage() {\n if (model.getImageList().size() == 0) {\n noImages = true;\n return new ImageObj(\"http://www.xn--flawiler-fachgeschfte-n2b.ch/wp-content/uploads/2016/09/sample-image.jpg\", \"No Image\");\n }\n return model.getImageList().get(position);\n }",
"@Override\n\tImageIcon getImage() {\n\t\treturn img;\n\t}",
"public Image getHotImage () {\r\n\tcheckWidget();\r\n\treturn hotImage;\r\n}",
"public float getIMG(){\n return profile.getImg();\n }",
"public ImageIcon getImage() {\n\t\treturn this.image;\n\t}",
"public ImageArray getOriginalImage() {\n return originalIm;\n }",
"@Output(\"image\")\n public Image getImage() {\n return image;\n }",
"public Image getImage() {\n if (tamagoStats.getAge() <= 0) {\n return images.get(\"oeuf\").get(\"noeuf\");\n } else if (tamagoStats.getAge() <= 3) {\n return images.get(\"bebe\").get(\"metamorph\");\n } else if (tamagoStats.getAge() <= 7) {\n return images.get(\"enfant\").get(\"evoli\");\n } else {\n return images.get(\"adulte\").get(\"noctali\");\n }\n }",
"public String getaImg() {\n return aImg;\n }",
"public int[][] getImage() {\n return m_img;\n }",
"public ObjectImage getObjectImage ()\r\n {\r\n return recoverable_.getObjectImage ();\r\n }",
"public String getImgOriginal() {\r\n return imgOriginal;\r\n }",
"public ColorImage getImagem(){\n\t\treturn copiaFoto(this.fotografia);\n\t}",
"@Override\n public IIOMetadata getImageData() {\n return super.imageData;\n }",
"public Mat getConvertedImage() {\n return this.convertedImage;\n }",
"public String getpImage() {\n return pImage;\n }",
"public Image getImage() {\r\n\t\treturn GDAssemblerUI.getImage(GDAssemblerUI.IMAGE_GD);\r\n\t}",
"@Override\r\n\tpublic int getImage() {\n\t\treturn Parametre.BALLE;\r\n\t}",
"public int getImageNumber() {\n return imageNumber;\n }",
"public Drawable getImage(){\n\t\treturn mImage;\n\t}",
"public BufferedImage getImage ( ) {\n\n BufferedImage img =\n param.Parameters.PROBLEM.getData(param.Parameters.STATE, program, 0, 0);\n\n System.gc();\n\n return img;\n \n }",
"public String getImg_1() {\n return img_1;\n }",
"public String getImage() {\n\t\treturn null;\n\t}",
"Imagem getImagem();",
"public BufferedImage image(){\n\t\treturn shotPic;\n\t}",
"public int getImageID() {\n return imageID;\n }",
"@Override\n\tpublic final Image getImage() {\n\t\treturn this.getSprite().getImage();\n\t}",
"public ImageIcon getCurrentImage() {\n\t\t\treturn this.currentImage;\n\t}",
"protected ImageView getImageView(){\n\t\treturn iv1;\n\t}",
"public BufferedImage getDati()\n { \n return imgDati;\n }",
"private Image getCurrentPicture(){\r\n\t\tif (i >= images.size()) {\r\n\t\t\ti = 0;\r\n\t\t}else if(i<0){\r\n\t\t\ti = images.size() -1;\r\n\t\t}\r\n\t\treturn new Image(images.get(i).getUrl());\r\n\t}"
] | [
"0.81528515",
"0.76820177",
"0.76079446",
"0.7585006",
"0.7561417",
"0.75599957",
"0.7538581",
"0.7505457",
"0.75036925",
"0.74885476",
"0.745831",
"0.7435098",
"0.7432584",
"0.7432584",
"0.7429053",
"0.74164194",
"0.73727477",
"0.73557425",
"0.73337185",
"0.73131275",
"0.7312932",
"0.7307762",
"0.73027456",
"0.72952366",
"0.72952366",
"0.72722864",
"0.72722864",
"0.72722864",
"0.72722864",
"0.726458",
"0.7257267",
"0.7241183",
"0.72076494",
"0.7178161",
"0.7153424",
"0.71344715",
"0.7116782",
"0.7116782",
"0.7113268",
"0.7113268",
"0.7113268",
"0.7109843",
"0.7077794",
"0.7069931",
"0.7060341",
"0.7057427",
"0.70485765",
"0.70485765",
"0.70485765",
"0.7041491",
"0.7019145",
"0.7008698",
"0.7008698",
"0.7008698",
"0.7001506",
"0.69814163",
"0.6977298",
"0.6977298",
"0.6977298",
"0.69681406",
"0.6942996",
"0.6922415",
"0.69191223",
"0.6906955",
"0.690304",
"0.6885679",
"0.6867352",
"0.68649364",
"0.6833586",
"0.6827286",
"0.68223584",
"0.6812379",
"0.68042755",
"0.6791395",
"0.67889327",
"0.6787597",
"0.67786676",
"0.6776989",
"0.67748314",
"0.67622346",
"0.67523086",
"0.6744522",
"0.6735685",
"0.67240673",
"0.6712053",
"0.67067164",
"0.6702835",
"0.6676211",
"0.66755384",
"0.6664411",
"0.66537124",
"0.6653518",
"0.66526455",
"0.6650429",
"0.6648856",
"0.66309124",
"0.66234165",
"0.6622143",
"0.66193336",
"0.66149276"
] | 0.83874744 | 0 |
setter of the library | public void setLibrary(Library library2) {
this.library = library2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Library(String setName) {\n name = setName;\n }",
"public void setLibele(String lib){\n\t\tlibeleService = lib;\n\t}",
"@Generated(hash = 1817530046)\r\n public void setLibrary(Library library) {\r\n synchronized (this) {\r\n this.library = library;\r\n id = library == null ? null : library.getId();\r\n library__resolvedKey = id;\r\n }\r\n }",
"protected LibReference() {\n\t}",
"public abstract void setLibelle(String unLibelle);",
"public Library (){\r\n\t\tthis.inverntory = new List();\r\n\t}",
"public void setPackage()\n {\n ensureLoaded();\n m_flags.setPackage();\n setModified(true);\n }",
"public Library getLibrary() {\r\n\t\treturn library;\t\r\n\t}",
"public LibraryBuilder() {\n\t\tthis.addToLibrary = new MyMusicLibrary();\n\t\tthis.addToArtiLibrary = new MyArtistLibrary();\n\t}",
"protected CommonSettings() {\r\n port = 1099;\r\n objectName = \"library\";\r\n }",
"public String getLibrary() {\n return library;\n }",
"public Library getLibrary() {\r\n\t\treturn library;\r\n\t}",
"public OtmBuiltInLibrary(BuiltInLibrary lib, OtmModelManager mgr) {\r\n\t\tsuper(mgr);\r\n\t\ttlLib = lib;\r\n\t}",
"public void setImageLibrary(PhotoContainer newImageLibrary) {\n\t\timageLibrary = newImageLibrary;\n\t}",
"private static void setupLibrary() {\r\n /*\r\n * For using over http:// and https://\r\n */\r\n DAVRepositoryFactory.setup();\r\n /*\r\n * For using over svn:// and svn+xxx://\r\n */\r\n SVNRepositoryFactoryImpl.setup();\r\n\r\n /*\r\n * For using over file:///\r\n */\r\n FSRepositoryFactory.setup();\r\n }",
"void set(ByteModule byteModule);",
"abstract void set(ByteModule byteModule);",
"public void setLibelle(String libelle) {\n\t\tgetTo(false).setLibelle(libelle);\n\t}",
"public void libraryLoaded();",
"void setLibroCollection(Collection<Libro> libroCollection);",
"public void init (){\n for (int i = 0; i < tvalores.length; i++) {\n tvalores[i] = Almacen1.LIBRE;\n }\n valoresAlmacenados = 0;\n }",
"public void testExtendsLibSet() {\n final LinkerDef baseLinker = new LinkerDef();\n final LibrarySet libset = new LibrarySet();\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker);\n libset.setProject(baseLinker.getProject());\n final CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder(\"advapi32\");\n libset.setLibs(libs);\n baseLinker.addLibset(libset);\n final CommandLineLinkerConfiguration config = (CommandLineLinkerConfiguration) getConfiguration(extendedLinker);\n final String[] libnames = config.getLibraryNames();\n assertEquals(1, libnames.length);\n assertEquals(\"advapi32\", libnames[0]);\n }",
"public static void setCurrentThreadLib(final DataClayRuntime dsLib) {\n\t\tcommonLibs.set(dsLib);\n\t}",
"public void setLibraryActivity(LibraryActivity libraryActivity) {\n mLibraryActivity = libraryActivity;\n }",
"private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}",
"public void set(String name, PyObject value) {\n }",
"void setVersion(long version);",
"protected void setDependencies() {\n\t\t\n\t}",
"public ArrayList getLibrary() {\n return Library;\n }",
"public Libro() {\r\n }",
"public LibraryCache() {\n\t }",
"public void setLibroService(\n com.example.plugins.service.LibroService libroService) {\n this.libroService = libroService;\n }",
"public Library() {\r\n initComponents();\r\n }",
"protected abstract void setSpl();",
"public void setAntlib(String antlib) {\n if (definerSet) {\n tooManyDefinitions();\n }\n if (!antlib.startsWith(\"antlib:\")) {\n throw new BuildException(\n \"Invalid antlib attribute - it must start with antlib:\");\n }\n setURI(antlib);\n this.resource = antlib.substring(\"antlib:\".length()).replace('.', '/')\n + \"/antlib.xml\";\n definerSet = true;\n }",
"public PropertiesSOAErrorLibrary() {\r\n\t\tsuper();\r\n\t}",
"public void setdat()\n {\n }",
"public static void setTesseractLibraryName(String name) {\n \tLIB_NAME = name;\n }",
"private void init() {\n\n\t}",
"@Override\n\tpublic void libraryStateChanged(boolean updating) {\n\t\t\n\t}",
"@Override\n\tpublic void libraryStateChanged(boolean updating) {\n\t\t\n\t}",
"void setConfiguration();",
"private static void init() {\n __lib = new JnaGmpLib();\n }",
"protected void setApi(T api) {\n mApi = api;\n }",
"public void use()\n\t{\n\t}",
"public ULocale setKeywordValue(String keyword, String value) {\n/* 416 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"void setVersion(String version);",
"void setVersion(String version);",
"public Libro getLIBRO() {\r\n return LIBRO;\r\n }",
"public RemoteLibrary putLibrary(String path, Object library);",
"@Override\r\n\tpublic void setVersion(int version) {\n\r\n\t}",
"@Override\r\n public void setCorporation(String corporation) {\n }",
"@Override\n void init() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"public Libreria() {\n\t\tnumLibs = 0;\n\t\tlb = new Libro[CAP_INICIAL];\n\t}",
"private void initialize() {\r\n\t\t//For the library model\r\n\t\tEObject eObject=ModelPersisterHelper.modelLoader();\r\n\t\tLibrary library=null;\r\n\t\tif(eObject instanceof Library){\r\n\t\t\tlibrary=(Library)eObject;\r\n\t\t}\r\n\t\tinvisibleRoot = new TreeParent(\"\");\r\n\t\tinvisibleRoot.addChild(library);\r\n\t}",
"public void setLibroPersistence(LibroPersistence libroPersistence) {\n this.libroPersistence = libroPersistence;\n }",
"@Test\n public void testSetSize() {\n System.out.println(\"setSize\");\n int size = 5;\n Library instance = new Library();\n instance.setSize(size);\n instance.setSize(5);\n }",
"private void init() {\n }",
"protected void _init(){}",
"private Dex2JarProxy() {\r\n\t}",
"public LibraryUpdate(){\n\t\tthis(System.out, System.err);\n\t}",
"@Override\n protected void init() {\n }",
"private void editLibraries() {\n\t\tJOptionPane.showMessageDialog(this, \"No implemented yet!\");\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\tpublic void init() {}",
"public void init() {\r\n\r\n\t}",
"public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Test\n public void testSetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n library.setlibrary(new ArrayList<Song>());\n assertTrue(library.getlibrary().isEmpty());\n\n }",
"public com.autodesk.ws.avro.Call.Builder setModule(java.lang.CharSequence value) {\n validate(fields()[2], value);\n this.module = value;\n fieldSetFlags()[2] = true;\n return this; \n }",
"private SetProperty(Builder builder) {\n super(builder);\n }",
"@Override\n public void init() {\n }",
"@Override\n public void init() {}",
"@Override\n public void init() {\n\n }",
"private void init() {\n\n\n\n }",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"protected void init() {\n // to override and use this method\n }",
"public void setIdLibro(Integer idLibro) {\n this.idLibro = idLibro;\n }",
"public void init(){\n \n }",
"private void initialize() {\n\t}",
"public void init() {\n \n }",
"public void addLib(String lib) {\r\n\t\tgetLibs().add(lib);\r\n\t}",
"protected void initialize() {}",
"protected void initialize() {}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"public void setJGSL(String jgsl) {\n //To change body of implemented methods use File | Settings | File Templates.\n }",
"protected void init(){\n }"
] | [
"0.6778641",
"0.6608035",
"0.65860236",
"0.6400432",
"0.633951",
"0.6090093",
"0.6060491",
"0.6039339",
"0.6027274",
"0.5925005",
"0.58519465",
"0.5795154",
"0.5745732",
"0.5718566",
"0.5715814",
"0.56800914",
"0.56534714",
"0.56519574",
"0.56513107",
"0.56330043",
"0.5628256",
"0.5620534",
"0.56074756",
"0.5602766",
"0.55979526",
"0.559153",
"0.5589577",
"0.55779016",
"0.5576718",
"0.55607396",
"0.5543463",
"0.5534637",
"0.551364",
"0.5512682",
"0.5504127",
"0.55036235",
"0.5488677",
"0.5470561",
"0.54683447",
"0.54488266",
"0.54488266",
"0.540828",
"0.5395479",
"0.5389111",
"0.53881514",
"0.538144",
"0.5377148",
"0.5377148",
"0.5374836",
"0.5372254",
"0.53498834",
"0.5342431",
"0.5331582",
"0.5331093",
"0.5331093",
"0.5331093",
"0.5331093",
"0.5331093",
"0.5331093",
"0.53225684",
"0.53183806",
"0.5317506",
"0.5314565",
"0.5312203",
"0.5310841",
"0.53050464",
"0.530338",
"0.5300999",
"0.530004",
"0.52974796",
"0.52895534",
"0.52871066",
"0.5285233",
"0.5263057",
"0.5261951",
"0.5260354",
"0.52572787",
"0.52520025",
"0.52412754",
"0.5235482",
"0.52320474",
"0.52278113",
"0.52257776",
"0.52257776",
"0.52257776",
"0.52242947",
"0.5217837",
"0.5217245",
"0.5211896",
"0.5209922",
"0.5208097",
"0.5207634",
"0.5207634",
"0.52064115",
"0.5205874",
"0.5205874",
"0.5205874",
"0.5205874",
"0.52050376",
"0.5204444"
] | 0.6786368 | 0 |
setter of the new image | public void setNewImage(String newImage) {
this.newImage = newImage;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void lSetImage(Image img);",
"public void setImage(Image img) {\r\n this.img = img;\r\n }",
"public void setImage(Image newImage)\n {\n if (newImage == null)\n {\n setFill(null);\n }\n else\n {\n setFill(new ImageFill(newImage));\n }\n }",
"void setImage(PImage img) {\n _img = img;\n }",
"protected void setPic() {\n }",
"void setImage(BufferedImage i);",
"public void setImage(Image itemImg) \n {\n img = itemImg;\n }",
"void setImage(BufferedImage valueImage, BufferedImage BackImage);",
"public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }",
"public void setImg(){\n if(PicSingleton.getInstance().getPicToShape() != null){\n\n mResultImg.setImageDrawable(PicSingleton.getInstance().getPicShaped());\n }\n }",
"private void setImage(Bitmap image) {\n }",
"void setImage(String image);",
"public void set(RenderedImage im) {\n this.im = im;\n ic.set(im);\n }",
"public void setImage(byte[] value) {\n this.image = ((byte[]) value);\n }",
"public void setImage(BufferedImage i) {\n // Paint image object\n paint = true;\n image = i;\n this.repaint();\n }",
"public void setImage(Image image) {\n this.image = image;\n }",
"private void setPhotoAttcher() {\n\n }",
"void setImage(Bitmap bitmap);",
"public String getNewImage() {\r\n\t\treturn newImage;\r\n\t}",
"public void setImage(Image image) {\n this.image = image;\n width = image.getWidth();\n height = image.getHeight();\n }",
"private void setImage() {\n BitmapFactory.Options options = new BitmapFactory.Options();\n Bitmap originalBm = BitmapFactory.decodeFile(tempFile.getAbsolutePath(), options);\n // Log.d(TAG, \"setImage : \" + tempFile.getAbsolutePath());\n\n myImage.setImageBitmap(originalBm);\n\n /**\n * tempFile 사용 후 null 처리를 해줘야 합니다.\n * (resultCode != RESULT_OK) 일 때 tempFile 을 삭제하기 때문에\n * 기존에 데이터가 남아 있게 되면 원치 않은 삭제가 이뤄집니다.\n */\n System.out.println(\"setImage : \" + tempFile.getAbsolutePath());\n fileSource = tempFile.getAbsolutePath();\n myImageSource = fileSource;\n check++;\n tempFile = null;\n\n }",
"public void setImage(Image image, boolean isNew)\r\n\t{\r\n\t\tif (isNew)\r\n\t\t{\r\n\t\t\tmRawImage = image;\r\n\t\t\tif (! mZoom)\r\n\t\t\t{\r\n\t\t\t\tint height = image.getHeight(null);\r\n\t\t\t\tint width = image.getWidth(null);\r\n\t\t\t\tif (mCurrentHeight != height) // assume different widths if different heights\r\n\t\t\t\t{\r\n\t\t\t\t\tsetTargetHeight(height);\r\n\t\t\t\t\tsetTargetWidth(width);\r\n\t\t\t\t\tnew ZoomAnimation().start();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// scale image to canvas as necessary\r\n\t\timage = new ImageIcon(image.getScaledInstance(getCurrentWidth(), getCurrentHeight(), Image.SCALE_FAST)).getImage();\r\n\r\n\t\t// check BufferedImage fit\r\n\t\tmImageBuffer = resizeBuffer(image);\r\n\r\n\t\t// paint incoming Image to BufferedImage\r\n\t\tGraphics2D g = mImageBuffer.createGraphics();\r\n\t\tg.drawImage(image, 0, 0, null);\r\n\t\tg.dispose();\r\n\r\n\t\tmCameraListener.newImage();\r\n\t}",
"void setImage(IViewModel image);",
"public void ChangeImage(Image SymImage){\n\n this.imgBackground = SymImage;\n /**\n imwidth = (double) this.imgBackground.getWidth(null);\n oldwidth = 461;\n oldheight = 361;\n */\n }",
"public void changeImage(){\n if(getImage()==storeItemImg) setImage(selected);\n else setImage(storeItemImg);\n }",
"public void setImg() {\n\t\tif (custom) {\n\t\t\tImage img1;\n\t\t\ttry {\n\t\t\t\timg1 = new Image(new FileInputStream(\"tmpImg.png\"));\n\t\t\t\tmainAvatar.setImage(img1); // Sets main user avatar as the custom image\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"void setImageProperty() {\n\t\t imgView.setImageResource(R.drawable.weathericon);\n\t\tMatrix matrix = new Matrix();\n\t\trotate += 30;\n\t\tif (rotate == 360) {\n\t\t\trotate = 0;\n\t\t}\n\t\tfloat centerX = imgView.getWidth() / 2;\n\t\tfloat centerY = imgView.getHeight() / 2;\n\t\tmatrix.setRotate(rotate, centerX, centerY);\n\t\t//matrix.setTranslate(10, 20);\n\t\timgView.setImageMatrix(matrix); \n\t\t//ScaleType type = ScaleType.\n\t\t\n\t\t//imgView.setScaleType(scaleType);\n\t \n\t}",
"void setImageFromFile(File imageFile);",
"public void setImageView() {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image); \n }",
"public void setImage(Bitmap image) {\n this.image = image;\n }",
"private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }",
"void setImage(Layer layer, Image image);",
"public void setImage(byte[] image) {\n this.image = image;\n }",
"public void setImage(byte[] image) {\n this.image = image;\n }",
"private void setImage() throws FileNotFoundException {\n\t\timage = new Image(new FileInputStream(path));\n\t}",
"public void testGetSetImageImage() {\n\t\tassertEquals(testNormal.getImage(), new ImageIcon(\"PACMAN/smallpill.png\").getImage());\n\t\t\n\t\t//SET NEW IMAGE\n\t\ttestNormal.setImage(testImage);\n\t\tassertEquals(testNormal.getImage(), testImage);\n\t}",
"public void setImage(String tmp) {\n this.image = tmp;\n }",
"public void changePhoto() {\r\n\t\tisPictFetche = false;\r\n\t\tlaPhoto = new Photo();\r\n\t\tlaPhotoCandidate = new Photo();\r\n\t}",
"public void setImage(BufferedImage im) {\r\n\t\timage = im;\r\n\t}",
"public void setTempImage()\n {\n URL url = this.getClass().getResource(lastselection.getImage());\n\t\tImage image = Toolkit.getDefaultToolkit().getImage(url);\n\t\ttempImage = new PImage(image);\n\t\ttempImage.setBounds(0,0,65,170);\n\t\ttempImage.setTransparency(0);\n\t\tlayer.addChild(tempImage);\n\t}",
"public abstract void setImageFormat(String format);",
"public void updateImage(ColorImage newImage) {\n currentImage.push(newImage);\n }",
"void setSourceImage(BufferedImage mySourceImage);",
"public void setImage(BufferedImage newImage) {\n if (newImage == null) {\n throw new NullArgumentException(\"Image must not be null\");\n }\n\n ByteArrayOutputStream byteOut = new ByteArrayOutputStream();\n\n try {\n ImageIO.write(newImage, \"png\", byteOut);\n this.setImageBase64(Base64.encodeBase64String(byteOut.toByteArray()));\n }\n catch (IOException e) {\n if (this.logger != null) {\n this.logger.warning(\"Error when encoding base64 server icon\");\n }\n setImageBase64(\"\");\n }\n }",
"public void changeImageMule(){\n\t\tsetIcon(imgm);\n\t}",
"public void setImage(String _image)\n {\n this.image = _image;\n }",
"public void setImg(String img) {\n this.img = img;\n }",
"private void setPic() {\n int targetW = imageIV.getWidth();\n int targetH = imageIV.getHeight();\n\n // Get the dimensions of the bitmap\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 // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n imageIV.setImageBitmap(bitmap);\n }",
"public void setImage(String image){\n this.image = image;\n }",
"public void setProfilePicture(BufferedImage newPicture)\n {\n\n picture = newPicture;\n }",
"public void setImage(Drawable image){\n\t\tmImage = image;\n\t}",
"@Generated\n @Selector(\"setImage:\")\n public native void setImage(@Nullable UIImage value);",
"public void updateImage(final Image image) { //The Reason that we have Set the Image to final over here is because once we fetch the Image from the AbsolutePath then after scaling this should be the Final Image in which we detect the Faces \n\t\timagelabel.setIcon(new ImageIcon(scaleImage(image))); \n\t}",
"public void setProfileImg() {\n }",
"public void setImage(BufferedImage image) {\n\t\tdisplayImage = image;\n\t\tinitBbox();\n\t}",
"public final void replaceImage(final ImageProcessor newImage) {\r\n this.image = newImage;\r\n }",
"private void setPic() {\n int targetW = mImageView.getWidth();\n int targetH = mImageView.getHeight();\n\n\t\t/* Get the size of the image */\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\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 1;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW / targetW, photoH / targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n\t\t/* Associate the Bitmap to the ImageView */\n mImageView.setImageBitmap(bitmap);\n mTextView.setText(mCurrentPhotoPath);\n\n // SendImage(mCurrentPhotoPath);\n\n // AsyncCallWS task = new AsyncCallWS();\n // Call execute\n // task.execute();\n }",
"void setImage(TokenEntry entry, @NonNull String newImage);",
"public void setImage(String path) {\n\t\tthis.path = path;\n\t\tgetImage().set(new Image(path));\n\t}",
"public void update(ImageObject nImage) { \r\n selectedImage = nImage;\r\n \r\n update();\r\n }",
"private void setPic() {\n\t\tint targetW = Constant.sRealWidth;\n\t\tint targetH = Constant.sRealHeight;\n\n\t\t/* Get the size of the image */\n\t\tBitmapFactory.Options bmOptions = new BitmapFactory.Options();\n\t\tbmOptions.inJustDecodeBounds = true;\n\t\tBitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\t\tint photoW = bmOptions.outWidth;\n\t\tint photoH = bmOptions.outHeight;\n\t\t\n\t\t/* Figure out which way needs to be reduced less */\n\t\tint scaleFactor = 1;\n\t\tif ((targetW > 0) || (targetH > 0)) {\n\t\t\tscaleFactor = Math.min(photoW/targetW, photoH/targetH);\t\n\t\t}\n\n\t\t/* Set bitmap options to scale the image decode target */\n\t\tbmOptions.inJustDecodeBounds = false;\n\t\tbmOptions.inSampleSize = scaleFactor;\n\t\tbmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n\t\tBitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\t\t\n\t\tint rotate = ViewUtils.handleRotateBitmap(mCurrentPhotoPath);\n\t\tif (rotate != 0) {\n\t\t\tbitmap = ViewUtils.rotaingBitmap(\n\t\t\t\t\trotate, bitmap);\n\t\t}\n\t\t/* Associate the Bitmap to the ImageView */\n\t\tmPictureView.setImageBitmap(bitmap);\n\t}",
"public void setImage(int imageId) {\n this.imageId=imageId;\n\t}",
"@Override\r\n\tprotected void updateImage(final IScope scope) {\n\t}",
"@Override\n public void setColor(Color newColor) {\n BufferedImage bufferedImage;\n try {\n bufferedImage = ImageIO.read(new URL(this.pieceType.getFileName2D()));\n BufferedImage coloredImage = colorImage(bufferedImage,newColor);\n Image image = SwingFXUtils.toFXImage(coloredImage, null);\n view = new ImageView(image);\n\n //these are temporary\n view.setFitHeight(80);\n view.setFitWidth(80);\n\n } catch (IOException e) {\n System.err.println(\"Error with creating the buffered image\");\n e.printStackTrace();\n }\n }",
"private void setPic()\n {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n int scaleFactor = Math.min(photoW/384, photoH/512);\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n imageCapture.setImageBitmap(bitmap);\n }",
"private void setPicture(BufferedImage image) {\r\n if (image != null) {\r\n int newHeight;\r\n int newWidth;\r\n if (image.getWidth() > image.getHeight()) {\r\n newWidth = jScrollPane1.getWidth();\r\n newHeight = image.getHeight() * newWidth / image.getWidth();\r\n\r\n if (newHeight > jScrollPane1.getHeight()) {\r\n int tmpWidth = newWidth;\r\n int tmpHeight = newHeight;\r\n newHeight = jScrollPane1.getHeight();\r\n newWidth = tmpWidth * newHeight / tmpHeight;\r\n }\r\n } else {\r\n newHeight = jScrollPane1.getHeight();\r\n newWidth = image.getWidth() * newHeight / image.getHeight();\r\n\r\n if (newWidth > jScrollPane1.getWidth()) {\r\n int tmpWidth = newWidth;\r\n int tmpHeight = newHeight;\r\n newWidth = jScrollPane1.getWidth();\r\n newHeight = tmpHeight * newWidth / tmpWidth;\r\n }\r\n }\r\n Image scaled = image.getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH);\r\n photoScrollPane.setIcon(new ImageIcon(scaled));\r\n } else {\r\n photoScrollPane.setIcon(null);\r\n }\r\n }",
"public TiledImage getNewImage() {\n return this.newImage;\n }",
"private void setPic() {\n int targetW = imageView.getWidth();\n int targetH = imageView.getHeight();\n\n // Get the dimensions of the bitmap\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 // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n imageView.setImageBitmap(bitmap);\n imageView.invalidate();\n }",
"private void enhanceImage(){\n }",
"private void setPic() {\n int targetW = mainImageView.getWidth();\n int targetH = mainImageView.getHeight();\n\n // Get the dimensions of the bitmap\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 // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n// bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mainImageView.setImageBitmap(bitmap);\n\n// bmOptions.inBitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n// mainImageView.setImageBitmap(bmOptions.inBitmap);\n }",
"public void changeDirection(int image){\n this.image = image; \n }",
"private void setPic() {\n int targetW = img_clip.getWidth();\n int targetH = img_clip.getHeight();\n\n // Get the dimensions of the bitmap\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 // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n img_clip.setImageBitmap(bitmap);\n }",
"public void set(int index, RenderedImage image) {\n\n checkForLiveOrCompiled();\n // For RenderedImage the width and height checking is done in the retained.\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }",
"public void setImage(String ref){\n\t ImageIcon ii = new ImageIcon(this.getClass().getResource(ref));\n\t image = ii.getImage();\n\t}",
"public void setImage (Product product) {\n\t\t//TODO beh�ver hj�lp. hur s�tter jag mha referens till objektet bilden?\n\t\tpictureLbl.setText(\"\");\n\t\t//picLbl.setIcon(product.getImageName());\n\t\tpictureLbl.repaint();\n\t}",
"public void setImage(ImageIcon image){\n\t\tthis.image = image;\n\t}",
"private void setImage() {\r\n\t\ttry{\r\n\r\n\t\t\twinMessage = ImageIO.read(new File(\"obstacles/win.gif\"));\r\n\t\t\tcoin = ImageIO.read(new File(\"obstacles/Coin.gif\"));\r\n\t\t\toverMessage = ImageIO.read(new File(\"obstacles/over.gif\"));\r\n\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.err.println(\"Image file not found\");\r\n\t\t}\r\n\r\n\t}",
"public void setImage(String image) {\n this.image = image;\n }",
"public void setImage(String image) {\n this.image = image;\n }",
"public void setImageData(byte[] value) {\r\n this.imageData = ((byte[]) value);\r\n }",
"private void setPic() {\n int targetW = mImageView.getWidth();\n int targetH = mImageView.getHeight();\n\n // Get the dimensions of the bitmap\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 // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW / targetW, photoH / targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n// Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mImageView.setImageBitmap(bitmap);\n }",
"void setImagePath(String path);",
"private void setImageDynamic(){\n questionsClass.setQuestions(currentQuestionIndex);\n String movieName = questionsClass.getPhotoName();\n ImageView ReferenceToMovieImage = findViewById(R.id.Movie);\n int imageResource = getResources().getIdentifier(movieName, null, getPackageName());\n Drawable img = getResources().getDrawable(imageResource);\n ReferenceToMovieImage.setImageDrawable(img);\n }",
"public void setImage(String Image) {\n this.Image = Image;\n }",
"public void setActiveImage() {\n\t\tsetGraphic(new ImageView(activePiece));\n\t\tisActiveImageOn = true;\t\t\n\t}",
"public void setImage(String imageName)\n {\n if (imageName == null)\n {\n setImage((Image) null);\n }\n else\n {\n setImage(new Image(imageName));\n }\n }",
"@Test\n\tpublic void testUpdateImage() {\n\n\t\tip = new ImagePlus();\n\t\t//assertNull(ip.img);\n\t\tip.updateImage();\n\t\t//assertNull(ip.img);\n\n\t\tip = new ImagePlus(DataConstants.DATA_DIR + \"head8bit.tif\");\n\t\t//assertNull(ip.img);\n\t\tip.updateImage();\n\t\t//assertNotNull(ip.img);\n\t}",
"private void change_im_val(int boo, ImageView im_obj){\r\n if(boo == 200){ //IMAGEN SI EL VEHICULO ES CORRECTO\r\n im_obj.setImage(new Image(getClass().getResourceAsStream(\"/Images/img57a.png\")));\r\n }else{ //IMAGEN PARA LA BUSQUEDA DE UN VEHICULO\r\n im_obj.setImage(new Image(getClass().getResourceAsStream(\"/Images/img61a.png\")));\r\n }\r\n }",
"private void setImageOnGUI() {\n\n // Capture position and set to the ImageView\n if (AppConstants.fullScreenBitmap != null) {\n fullScreenSnap.setImageBitmap(AppConstants.fullScreenBitmap);\n }\n\n }",
"public void setIm(double im) {\r\n this.im = im;\r\n }",
"protected void setImageData(BufferedImage img) {\n \t\tif (format == null || format == Format.TEXT || format == Format.COLOR16_8x8)\n \t\t\treturn;\n \t\n \t\tequalize(img);\n \t\t\n \t\t//denoise(img);\n \t\t\n \t\tupdatePaletteMapping();\n \t\n \t\tflatten(img);\n \t\t\n \t\tif (!importDirectMappedImage(img)) {\n \t\t\tconvertImageToColorMap(img);\n \t\t}\n \t\n \t\treplaceImageData(img);\n \t}",
"public void setImage(String image) {\n\t\t this.image = image;\n\t}",
"public void setImageName(String name) {\n imageToInsert = name;\n}",
"public void setImage(Bitmap bitmap) {\n this.bitmap = bitmap;\n }",
"public void setImage(String file){ \n try {\n image = ImageIO.read(new File(file));\n } catch (IOException ex) {\n Logger.getLogger(GridSquarePanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Override\n\tpublic Image getImage() {\n\t\treturn img;\n\t}",
"public void setIcon(Image i) {icon = i;}",
"public void set(int index, BufferedImage image) {\n checkForLiveOrCompiled();\n if (image.getWidth(null) != this.getWidth())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D2\"));\n\n\tif (image.getHeight(null) != this.getHeight())\n throw new IllegalArgumentException(J3dI18N.getString(\"ImageComponent3D4\"));\n\n\t((ImageComponent3DRetained)this.retained).set(index, image);\n }",
"public void actualizarImagen() {\n\t\tentidadGrafica.actualizarImagen(this.valor);\n\t}",
"void setImageResource(String imageResource) throws IOException;"
] | [
"0.7663138",
"0.7631961",
"0.7629929",
"0.75064164",
"0.7496825",
"0.7378403",
"0.7369977",
"0.7294773",
"0.72836494",
"0.7262638",
"0.72544104",
"0.72454596",
"0.70826423",
"0.70771813",
"0.70696545",
"0.70512784",
"0.6970745",
"0.6939088",
"0.69191015",
"0.689531",
"0.68945235",
"0.68770474",
"0.6836471",
"0.6808819",
"0.6791113",
"0.6769103",
"0.67627954",
"0.67553824",
"0.67522794",
"0.6744303",
"0.6736136",
"0.6732384",
"0.67203027",
"0.67203027",
"0.67142767",
"0.67071855",
"0.6706973",
"0.6700879",
"0.6682037",
"0.668149",
"0.66464597",
"0.66458374",
"0.6632993",
"0.66126245",
"0.66085076",
"0.6601441",
"0.65942365",
"0.65644866",
"0.6561844",
"0.65607065",
"0.65600175",
"0.6558123",
"0.65553457",
"0.655",
"0.65300244",
"0.6518036",
"0.65055156",
"0.6503844",
"0.65001875",
"0.6491738",
"0.6468551",
"0.6459423",
"0.64434576",
"0.6437184",
"0.6436552",
"0.6421812",
"0.6405887",
"0.64055103",
"0.6399471",
"0.63979465",
"0.6393833",
"0.6387822",
"0.6381791",
"0.63723147",
"0.6371225",
"0.6371103",
"0.6346305",
"0.6321066",
"0.6321066",
"0.631835",
"0.6312876",
"0.6312643",
"0.62983894",
"0.6297793",
"0.62975323",
"0.6279776",
"0.6276965",
"0.6270877",
"0.626346",
"0.6260647",
"0.6244411",
"0.6238873",
"0.6235479",
"0.62215704",
"0.62210375",
"0.6218361",
"0.62177134",
"0.621466",
"0.6207361",
"0.6190312"
] | 0.6666992 | 40 |
Set the size of the book | public void setSizeBook(int ShelfHeight, int ShelfWidth, Book book, int idealWidth, int idealHeight, int widthSup,
int heightSup) {
if (!(book.getWidth() >= idealWidth && book.getWidth() <= widthSup)) {
book.setWidth(widthSup);
}
if (!(book.getHeight() >= idealHeight && book.getHeight() <= heightSup)) {
book.setHeight(heightSup);
}
if (!(book.getWidth() >= book.getHeight() / 10 && book.getWidth() <= book.getHeight() / 8)) {
book.setWidth(book.getHeight() / 9);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBookSize(String value) {\n setAttributeInternal(BOOKSIZE, value);\n }",
"void setPaperSize(short size);",
"public void setSize(int size){\n this.size = size;\n }",
"public void setSize(int size) {\r\n _size = size;\r\n }",
"public void setSize(int _size)\r\n {\r\n size = _size;\r\n }",
"public void setSize(int size);",
"public void setSize(int size) {\n\t\t _size = size;\n\t}",
"public void setSize(int size) {\r\n this.size = size;\r\n }",
"private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}",
"public void set_size(int s);",
"public void setSize(int size) {\n this.size = size;\n }",
"public void setSize(int size) {\n this.size = size;\n }",
"public void setSize(int size) {\n\tthis.sizeNumber = sizeNumber;\r\n}",
"private void setSize(int s){\n\t\tsize = s;\n\t}",
"public void setSize(long size) {\r\n\t\tthis.size = size;\r\n\t}",
"public void setSize(int size) {\n this.size = size;\n }",
"public void setSize(int newSize);",
"public void setSize(int newSize);",
"public void setSize(int size) {\n\t\tthis.size = size;\n\t}",
"public void setSize(int size) {\n\t\tthis.size = size;\n\t}",
"public void setSize(int size) {\n\t\tthis.size = size;\n\t}",
"public void setSize(int size) {\n\t\tthis.size = size;\n\t}",
"public void setSize(Integer size) {\n this.size = size;\n }",
"public void setSize(String size) {\r\n //System.out.print(\"Setting Size...\");\r\n this.Size = size;\r\n }",
"public void setSize(int value) {\n\t\tthis.size = value;\n\t}",
"public void setSize(long value) {\n this.size = value;\n }",
"public void setSize(double size) \n {\n this.size = size;\n }",
"public void setSize(String size) {\n this.size = size;\n }",
"@Element \n public void setSize(String size) {\n this.size = size;\n }",
"public abstract void adjustSize(long size);",
"public void setLocalSize(int size);",
"public Builder setSize(int value) {\n\n size_ = value;\n onChanged();\n return this;\n }",
"public Builder setSize(int value) {\n\n size_ = value;\n onChanged();\n return this;\n }",
"public void setSize(double s)\n\t{\n\t\tsize = s;\n\t}",
"public void setPackageSize(int size){\r\n }",
"@Override\n\tpublic void setSize(String sizeOfTheBeverage) {\n\t\tthis.sizeOfTheBeverage = sizeOfTheBeverage;\n\t}",
"public void setSize(RMSize aSize) { setSize(aSize.width, aSize.height); }",
"public void setSize();",
"public void setSize(TSizeInBytes size) {\n\n\t\tthis.size = size;\n\t}",
"public void setSize(int index, int size);",
"public void setSize(int size){\n\t\tthis.shipSize = size;\n\t}",
"protected abstract void setSize();",
"public int getSetSize(){ return Integer.parseInt(setSize.getText()); }",
"public static void setHotelSize(int size) {\r\n\t\tfor(int count = 0;count< size; count++) {\r\n\t\t\thotel_size.add(count + 1);\r\n\t\t}\r\n\t}",
"@Test\n public void testSetSize() {\n System.out.println(\"setSize\");\n int size = 5;\n Library instance = new Library();\n instance.setSize(size);\n instance.setSize(5);\n }",
"public void setSize(String size) {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}",
"void setWidth(int width);",
"void setWidth(int width);",
"public void sizeHasBeenSet() {\n isSizeSet = true;\n }",
"public void setStructureSize(int size) {\n\t\tmStructureSize = size;\n\t\tvalidateSize();\n\t\trepaint();\n\t\t}",
"public void setSizeE(long s){\n\t\tthis.sizeE = s;\n\t}",
"public com.autodesk.ws.avro.Call.Builder setObjectSize(java.lang.Long value) {\n validate(fields()[6], value);\n this.object_size = value;\n fieldSetFlags()[6] = true;\n return this; \n }",
"void setSize(Dimension size);",
"public void setSize(String size) {\r\n this.size = size == null ? null : size.trim();\r\n }",
"public void setSize(double aWidth, double aHeight) { setWidth(aWidth); setHeight(aHeight); }",
"private void setMemorySize() { }",
"public void setSize(Dimension size) {\r\n this.size = size;\r\n }",
"public void setSize(int size) {\n\t members = size;\n\t}",
"public void setSizeOfDeck(int newSize, int burnCards)\n\t{\n\t\tsizeOfDeck = newSize;\n\t\tsizeOfBurnDeck = burnCards;\n\t}",
"public void changeSize(Integer newLength, Integer newHeight) {\n control.erase();\n width = newLength;\n height = newHeight;\n control.draw();\n }",
"public void setSizeV(long s){\n\t\tthis.sizeV = s;\n\t}",
"public void setSizeModifier(Dimension size) {\n\t\tthis.size = size;\n\t}",
"public void setHeight(int newValue)\r\n {\r\n seatHeight = newValue;\r\n }",
"public void setObjectSize(short size) { this.objectSize=size; }",
"public void setSize(int x, int y)\n {\n \tthis.width = x;\n \tthis.height = y;\n }",
"void setSize(float w, float h) {\n _w = w;\n _h = h;\n }",
"public void setSize(Dimension newSize) {\n\t\tif(newSize.height<80)\n\t\t\tnewSize.height=80;\n\t\tif (newSize != null) {\n\t\t\tsize.setSize(newSize);\n\t\t\tfirePropertyChange(Props.SIZE_PROP.getValue(), null, size);\n\t\t}\n\t}",
"public void setSize(@Nullable String size) {\n this.size = size;\n }",
"void setHeight(int height);",
"void setHeight(int height);",
"public void testSetSize_1()\n\t\tthrows Exception {\n\t\tFiles fixture = new Files();\n\t\tfixture.setAbsolutePath(\"\");\n\t\tfixture.setType(\"\");\n\t\tfixture.setReadable(\"\");\n\t\tfixture.setSize(\"\");\n\t\tfixture.setWritable(\"\");\n\t\tfixture.setExecutable(\"\");\n\t\tfixture.setMtime(\"\");\n\t\tString value = \"\";\n\n\t\tfixture.setSize(value);\n\n\t\t\n\t}",
"public void setSize( int newSize, int newWidth )\n\t{\n\t\tif( newSize > 0 )\n\t\t\tsize = newSize;\n\t\telse\n\t\t{\n\t\t\tsize = 0;\n\t\t\tSystem.err.printf(\"Board's parameter values can not be negative!\");\n\t\t}\n\t\tif( newWidth > 0 )\n\t\t\twidth = newWidth;\n\t\telse\n\t\t{\n\t\t\twidth = 0;\n\t\t\tSystem.err.printf(\"Board's parameter values can not be negative!\");\n\t\t}\n\t\tthis.createBoard();\n\t\tthis.reset();\n\t}",
"private void basicSize(){\n setSize(375,400);\n }",
"public Builder setSize(double value) {\n bitField0_ |= 0x00000020;\n size_ = value;\n onChanged();\n return this;\n }",
"void setThumbSizeX(long thumbSizeX);",
"public void setPageSize(Rectangle pagesize) {\n\t\tthis.pagesize = pagesize;\n\t}",
"public void setSize(float width, float height);",
"@Override\r\n\tpublic void setSequenceSize(int x) {\n\t\tsizeNum = x;\r\n\t\tupdate();\r\n\t}",
"@Test\n public void testSetSize_1()\n throws Exception {\n ColumnPreferences fixture = new ColumnPreferences(\"\", \"\", 1, ColumnPreferences.Visibility.HIDDEN, ColumnPreferences.Hidability.HIDABLE);\n fixture.setVisible(true);\n int size = 1;\n\n fixture.setSize(size);\n\n }",
"public void setSize() {\n\t\t\tthis.size = 1;\n\t\t\tint leftSize = 0;\n\t\t\tint rightSize = 0;\n\t\t\tif (this.getLeft().getKey() != -1) {\n\t\t\t\tleftSize = this.getLeft().getSize();\n\t\t\t}\n\t\t\tif (this.getRight().getKey() != -1) {\n\t\t\t\trightSize = this.getRight().getSize();\n\t\t\t}\n\t\t\tthis.size += leftSize + rightSize;\n\n\t\t\t/**\n\t\t\t * this.size = 1; int leftSize = 0; int rightSize = 0; try { leftSize =\n\t\t\t * this.getLeft().getSize(); this.size += leftSize; } catch\n\t\t\t * (NullPointerException e) { this.size += leftSize; } try { rightSize =\n\t\t\t * this.getRight().getSize(); this.size += rightSize; } catch\n\t\t\t * (NullPointerException e) { this.size += rightSize; } if (this.getSize() >\n\t\t\t * 990) { System.out.println(\"actual size is:\" + this.getSize()); }\n\t\t\t */\n\t\t}",
"@Override\n public void settings(){\n size(500, 500);\n }",
"public void autoSize() {\n\t\t//no op\n\t}",
"void setLength(int length);",
"public void setHeight(int height);",
"public void setHeight(int height);",
"@Override\n\tpublic void setElementSize(int elementSize) {\n\t\t\n\t}",
"public void setFrameSize();",
"public void setHeight(int newValue) {\n seatHeight = newValue;\n }",
"public void setSize(int width, int height) {\n this.width = width;\n this.height = height;\n }",
"public void setSizeP(Number value) {\n setAttributeInternal(SIZEP, value);\n }",
"public void setLength( int length ) { setCapacity( length ); this.length = length; }",
"public void setBarSize(int aValue)\n {\n if (aValue==_barSize) return;\n firePropChange(BarSize_Prop, _barSize, _barSize = aValue);\n }",
"public void setWidth(int newWidth) {\n roomWidth = newWidth;\n }",
"public void sizeActionPerformed(java.awt.event.ActionEvent evt) {\n myFont.size = ((Integer) size.getSelectedItem()).intValue(); /*FAULT:: myFont.size = 5; */\n }",
"public static void setRecorderVideoSize(Size size){\n\t}",
"public void setSize(double value) {\n getElement().setSize(value);\n }",
"public void setPizzaSize(String size) {\n pizzaSize = size;\n }",
"@Override\n\tprotected void changeSize(int x, int y, int previousX, int previousY) {\n this.setWidth(this.getWidth()+(x-previousX));\n this.setHeight(this.getHeight()+(y-previousY));\n this.setX(this.getX()+(x-previousX));\n\t}",
"public Builder setFileSize(long value) {\n \n fileSize_ = value;\n onChanged();\n return this;\n }",
"public void setBoxSize(int bs) {\n\t\tthis.boxSize = bs;\n\t}"
] | [
"0.7663241",
"0.750057",
"0.7416262",
"0.7397474",
"0.73969454",
"0.7370586",
"0.7302626",
"0.7281736",
"0.7276835",
"0.7249936",
"0.7231165",
"0.7231165",
"0.72248346",
"0.7217883",
"0.7197767",
"0.7177045",
"0.71759874",
"0.71759874",
"0.715017",
"0.715017",
"0.715017",
"0.715017",
"0.7057581",
"0.7055626",
"0.70469403",
"0.6989563",
"0.69892466",
"0.6950626",
"0.6770269",
"0.67532337",
"0.6750222",
"0.6740468",
"0.6740468",
"0.67212766",
"0.6663539",
"0.66325086",
"0.6573947",
"0.6572386",
"0.6419036",
"0.6410122",
"0.640712",
"0.63941544",
"0.6388062",
"0.6369567",
"0.6354939",
"0.63496345",
"0.63238996",
"0.63238996",
"0.63189894",
"0.6300141",
"0.62482303",
"0.6242789",
"0.62401515",
"0.62349963",
"0.62180644",
"0.6216471",
"0.619544",
"0.618638",
"0.61811936",
"0.6177827",
"0.6169429",
"0.6162538",
"0.6107023",
"0.6103836",
"0.60921746",
"0.60883135",
"0.60790503",
"0.6077732",
"0.60538256",
"0.60538256",
"0.60402673",
"0.60348046",
"0.6032302",
"0.6023069",
"0.6004692",
"0.6000938",
"0.59961045",
"0.59960425",
"0.5980745",
"0.59768987",
"0.59730315",
"0.5966835",
"0.59631455",
"0.5956433",
"0.5956433",
"0.59439933",
"0.59431076",
"0.59310645",
"0.59256274",
"0.59119135",
"0.59051526",
"0.5892398",
"0.5883514",
"0.58701485",
"0.58683574",
"0.5865574",
"0.5853612",
"0.5835377",
"0.58317834",
"0.5827757"
] | 0.6625614 | 36 |
Define the back and the outlines of the library. | private void drawBackOutlines(int dimCanvasX, int dimCanvasY, int thiknessEdges, String bkColor, String sColor) {
Shape fond = new Rectangle(0, 0, dimCanvasX, dimCanvasY);
List<Shape> edges = getEdges(dimCanvasX, dimCanvasY, thiknessEdges);
switch (bkColor) {
case "Light":
graphics.setPaint(Color.decode("#FFF8DC"));
break;
case "Dark":
graphics.setPaint(Color.decode("#330000"));
break;
default:
graphics.setPaint(Color.decode("#BC8F8F"));
break;
}
graphics.fill(fond);
switch (sColor) {
case "Light":
graphics.setPaint(Color.decode("#CD853F"));
break;
case "Dark":
graphics.setPaint(Color.decode("#660000"));
break;
default:
graphics.setPaint(Color.decode("#8B4513"));
break;
}
for (Shape edge : edges) {
graphics.fill(edge);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AcideDebugPanelHighLighter() {\r\n\t\tsetLines(new HashMap<String, ArrayList<Integer>>());\r\n\t\tsetHighLights(new ArrayList<Object>());\r\n\t\tsetAssertedFacs(new HashSet<String>());\r\n\t\t_highlight = true;\r\n\t}",
"private void drawWindowSetup(){\n\t\t//draw header\n\t\ttopBar.draw(graphics);\n\t\t//draw footer\n\t\tbottomBar.draw(graphics);\n\t\t//draw right bar\n\t\trightBar.draw(graphics);\n\t}",
"private void setup() {\n // init paint\n paint = new Paint();\n paint.setAntiAlias(true);\n\n paintBorder = new Paint();\n setBorderColor(Color.WHITE);\n paintBorder.setAntiAlias(true);\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}",
"private void initHighlightLines()\r\n\t{\t\t\r\n\t\tfofHighlightRect = lang.newRect(new Offset(-2, -2, \"sourceCode\", AnimalScript.DIRECTION_NW), new Offset(2, 13*21, \"sourceCode\", AnimalScript.DIRECTION_NE), \"fofHighlightRect\", null, fofSourceCodeHighlightRect);\r\n\t\taddAdjHighlightRect = lang.newRect(new Offset(0, 5, \"fofHighlightRect\", AnimalScript.DIRECTION_SW), new Offset(2, 2, \"sourceCode\", AnimalScript.DIRECTION_SE), \"addAdjHighlightRect\", null, addAdjSourceCodeHighlightRect);\r\n\t\t\r\n\t\tfofHighlightRect.hide();\r\n\t\taddAdjHighlightRect.hide();\r\n\t}",
"protected void whatColorOfArrows()\n\t{\n\t}",
"private void createBack() {\n String backString = \"\";\n if(host.locale == host.FINNISH) {\n backString = \"TAKAISIN\";\n } else if(host.locale == host.ENGLISH) {\n backString = \"BACK\";\n }\n back = new FontActor(backString,\n screenWidth * 1 / 8,\n screenHeight * 1 / 8);\n }",
"public void createScreenBorders() {\n // set the screen's borders.\n this.upper = 0;\n this.lower = 600;\n this.left = 0;\n this.right = 800;\n }",
"public ArtisticArrowhead() {\n setupControlPoints(4);\n }",
"private void setUpLedger() {\n _ledgerLine = new Line();\n _ledgerLine.setStrokeWidth(Constants.STROKE_WIDTH);\n _staffLine = new Line();\n _staffLine.setStrokeWidth(1);\n }",
"public FinalFrame()\n {\n \tsuper (\"Multi Brush\"); \n \tdrawingPanel = new DrawingPanel (buttons,colors); // A new DrawingPanel object with two parameters.\n \tJMenuBar menuBar = createMenuBar ();\n \tsetJMenuBar (menuBar); \n // Panel layout arrangement code segments.\n \tpanel.setLayout (new BorderLayout ());\n \tpanel.add (drawingPanel,BorderLayout.CENTER);\n \tpanel.add (buttons,BorderLayout.NORTH);\n \tpanel.add (colors,BorderLayout.SOUTH); \n \tgetContentPane().add(panel);\n \taddWindowListener (new WindowCloser());\n }",
"private void setupToolbars(){\n\t\ttopBar = new TopBar(0, 0, setup.getFrameWidth()+12, Constants.WINDOW_HEADER_HEIGHT, \n\t\t\t\tConstants.COLOR_HEADER_1, setup);\n\t\t\n\t\tbottomBar = new BottomBar(0, \n\t\t\t\tConstants.WINDOW_HEADER_HEIGHT+(Constants.WINDOW_MAP_MARGIN*2)+Constants.WINDOW_MAP_HEIGHT, \n\t\t\t\tsetup.getFrameWidth()+12, \n\t\t\t\tConstants.WINDOW_HEADER_HEIGHT, \n\t\t\t\tConstants.COLOR_HEADER_1, setup);\n\t\t\n\t\trightBar = new RightBar((Constants.WINDOW_MAP_MARGIN*2)+Constants.WINDOW_MAP_WIDTH, \n\t\t\t\tConstants.WINDOW_HEADER_HEIGHT, \n\t\t\t\tConstants.WINDOW_RIGHT_BAR_WIDTH, \n\t\t\t\tConstants.WINDOW_RIGHT_BAR_HEIGHT, \n\t\t\t\tConstants.COLOR_MAP_LAND, setup);\n\t}",
"@Override\n public void setup() {\n strokeWeight(1);\n smooth();\n textMode(SHAPE);\n origin = new PVector(width / 2, height / 2,0);\n size = 2000;\n zoom = 1.5f;\n rX = -0.51f;\n rY = -0.65f;\n arm = new Arm(this);\n ik = new InverseK(arm.getL());\n angles = new double[]{0,0,0};\n }",
"private void renderBorder() {\n\t\trenderHorizontalLine(0, BORDER_SIGN_HORIZONTAL);\n\t\trenderHorizontalLine(this.output.length - 1, BORDER_SIGN_HORIZONTAL);\n\t\trenderVerticalLine(0, BORDER_SIGN_VERTICAL);\n\t\trenderVerticalLine(this.output[0].length - 1, BORDER_SIGN_VERTICAL);\n\n\t\tthis.output[0][0] = BORDER_SIGN_EDGE;\n\t\tthis.output[0][this.output[0].length - 1] = BORDER_SIGN_EDGE;\n\t\tthis.output[this.output.length - 1][0] = BORDER_SIGN_EDGE;\n\t\tthis.output[this.output.length - 1][this.output[0].length - 1] = BORDER_SIGN_EDGE;\n\t}",
"private IncreaseEdgeCurvatureBiomeDecorator() {\n }",
"private void drawBackGround() {\r\n\t\tdouble diff = getWidth() / NDECADES;\r\n\t\tdouble xcrd = 0;\r\n\t\tint year = START_DECADE;\r\n\t\tfor (int i = 0; i < NDECADES; i++) {\r\n\t\t\tString yearStr = year + \"\";\r\n\t\t\tadd(new GLine(xcrd, 0, xcrd, getHeight()));\r\n\t\t\tadd(new GLabel(yearStr, xcrd, getHeight()));\r\n\t\t\txcrd = xcrd + diff;\r\n\t\t\tyear = year + 10;\r\n\t\t}\r\n\t\tdouble ycrd = GRAPH_MARGIN_SIZE;\r\n\t\tadd(new GLine(0, ycrd, getWidth(), ycrd));\r\n\t\tadd(new GLine(0, getHeight() - ycrd, getWidth(), getHeight() - ycrd));\r\n\r\n\t}",
"@Override\n\tpublic void showContents() {\n\t\tprogram.add(Background);\n\t\tprogram.add(lvl1);\n\t\tprogram.add(lvl2);\n\t\tprogram.add(lvl3);\n\t\tprogram.add(Back);\n\n\t}",
"private void lineColor() {\n\n\t}",
"protected void setupImpl()\n {\n hint(DISABLE_DEPTH_TEST);\n font = loadFont(\"Futura-CondensedExtraBold-200.vlw\");\n textFont(font, 200);\n mode = 0;\n\n // Mode 3\n w = width * 2;\n dx = (TWO_PI / period) * xspacing;\n yvalues = new float[w/xspacing];\n\n // Mode 5\n mod = loadImage(\"mod.png\");\n modSizes = new int[scaledBandLevels.length];\n }",
"private void createBorders() {\r\n // Upper border rectangle\r\n Rectangle topRecFrame = new Rectangle(new Point(0, 0), WITH, SIZE + 20);\r\n // Left border rectangle\r\n Rectangle leftRecFrame = new Rectangle(new Point(0, SIZE + 21), SIZE, HEIGHT);\r\n // Right border rectangle\r\n Rectangle rightRecFrame = new Rectangle(new Point(WITH - SIZE, SIZE + 21), SIZE, HEIGHT);\r\n // Rectangle for block on top of upper block for the score\r\n Rectangle topRecScore = new Rectangle(new Point(0, 0), WITH, 20);\r\n Block topScore = new Block(topRecScore, Color.LIGHT_GRAY, 0);\r\n Block topFrame = new Block(topRecFrame, Color.GRAY, 0);\r\n Block leftFrame = new Block(leftRecFrame, Color.gray, 0);\r\n Block rightFrame = new Block(rightRecFrame, Color.gray, 0);\r\n topFrame.addToGame(this);\r\n leftFrame.addToGame(this);\r\n rightFrame.addToGame(this);\r\n topScore.addToGame(this);\r\n\r\n }",
"public TransparencyDemo() {\r\n super();\r\n view3DButton.addItemListener(this);\r\n drawBehindButton.addItemListener(this);\r\n transparencySlider.addChangeListener(this);\r\n }",
"void render(Rectangle borders);",
"private void drawHeart2 (float sx, float sy, float sz, Appearance[] app)\n {\n\tfloat x, y, z, r;\n \n BranchGroup tBG = new BranchGroup();\n\ttBG.setCapability (BranchGroup.ALLOW_DETACH);\n\n System.out.println(\"Aqui\");\n \n\tx = sx+0f; y = sy+0.04f; z = sz+0f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[0]);\n\t//tBG.addChild (makeText (new Vector3d (sx+0,sy+1.1,sz+0), \"AP\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[1]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz+1.5), \"IS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[2]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz+1.5), \"IL\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[3]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz+0.5), \"SI\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[4]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz+0.5), \"LI\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[5]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz-0.5), \"SA\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[6]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz-0.5), \"LA\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[7]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz-1.5), \"AS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[8]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz-1.5), \"AL\"));\n\n\tsceneBG.addChild (tBG);\n }",
"private void init_all() \r\n\t{\r\n\t\tinit_draw_line();\r\n\t\tinit_free_hand_draw();\r\n\t}",
"private void decorate() {\n setBorderPainted(false);\n setOpaque(true);\n \n setContentAreaFilled(false);\n setMargin(new Insets(1, 1, 1, 1));\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\n protected void renderInlineAreaBackAndBorders(final InlineArea area) {\n final float borderPaddingStart = area.getBorderAndPaddingWidthStart() / 1000f;\n final float borderPaddingEnd = area.getBorderAndPaddingWidthEnd() / 1000f;\n final float borderPaddingBefore = area.getBorderAndPaddingWidthBefore() / 1000f;\n final float borderPaddingAfter = area.getBorderAndPaddingWidthAfter() / 1000f;\n final float bpwidth = borderPaddingStart + borderPaddingEnd;\n final float bpheight = borderPaddingBefore + borderPaddingAfter;\n\n final float height = area.getBPD() / 1000f;\n if (height != 0.0f || bpheight != 0.0f && bpwidth != 0.0f) {\n final float x = this.currentIPPosition / 1000f;\n final float y = (this.currentBPPosition + area\n .getBlockProgressionOffset()) / 1000f;\n final float width = area.getIPD() / 1000f;\n drawBackAndBorders(area, x, y - borderPaddingBefore, width\n + bpwidth, height + bpheight);\n }\n }",
"void paintViews() {\n\n //Paint the back button in white\n int paintColour = android.graphics.Color.rgb(253, 195, 204);\n Drawable d = VectorDrawableCompat.create(getResources(), R.drawable.kids_ui_back_anim, null);\n d = DrawableCompat.wrap(d);\n DrawableCompat.setTint(d, paintColour);\n back.setImageDrawable(d);\n }",
"private void init()\n\t{\n\t\tinitOpenGL();\n\t\tlatestStroke = new Stroke(this, true);\n\t}",
"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}",
"public String _setthumbcolor(int _bordercolor,int _innercolor) throws Exception{\n_mthumbbordercolor = _bordercolor;\n //BA.debugLineNum = 54;BA.debugLine=\"mThumbInnerColor = InnerColor\";\n_mthumbinnercolor = _innercolor;\n //BA.debugLineNum = 55;BA.debugLine=\"CreateThumb\";\n_createthumb();\n //BA.debugLineNum = 56;BA.debugLine=\"Draw\";\n_draw();\n //BA.debugLineNum = 57;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public OpenArrowhead() {\n setupControlPoints(3);\n }",
"public FilledArrowhead() {\n setupControlPoints(3);\n }",
"public void setBorderEffect(PDBorderEffectDictionary be) {\n/* 447 */ getCOSObject().setItem(COSName.BE, be);\n/* */ }",
"public Emrld() {\n super(\n new Color(211, 242, 163),\n new Color(151, 225, 150),\n new Color(108, 192, 139),\n new Color(76, 155, 130),\n new Color(33, 122, 121),\n new Color(16, 89, 101),\n new Color(7, 64, 80)\n\n );\n\n\n }",
"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 }",
"private void init() {\n\n mCursorPaint = new Paint();\n mCursorPaint.setColor(Color.BLUE);\n\n mLimitPaint = new Paint();\n mLimitPaint.setColor(Color.YELLOW);\n\n mCoveredPaint = new Paint();\n mCoveredPaint.setColor(Color.CYAN);\n\n mRangePaint = new Paint();\n mRangePaint.setColor(Color.DKGRAY);\n\n mEraserPaint = new Paint();\n mEraserPaint.setColor(Color.TRANSPARENT);\n // ensure the erasing effect\n mEraserPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));\n }",
"public UnfilledArrowhead() {\n setupControlPoints(3);\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\n \r\n g=lienzo.getGraphicsContext2D();\r\n \r\n \r\n double w = lienzo.getWidth();\r\n double h = lienzo.getHeight();\r\n \r\n g.setStroke(Color.RED);\r\n g.setLineWidth(3);\r\n g.strokeRect(0, 0, w, h);\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }",
"private void createCanvasBorders() {\n\n\t\tLabel lblBorderMiddle = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderMiddle.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\t\tlblBorderMiddle.setBounds(0, 72, 285, 2);\n\n\t\tLabel lblBorderBottom = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderBottom.setBounds(0, 198, 285, 2);\n\t\tlblBorderBottom.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\n\t\tLabel lblBorderLeft = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderLeft.setBounds(0, 0, 2, 200);\n\t\tlblBorderLeft.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\n\t\tLabel lblBorderRight = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderRight.setBounds(283, 0, 2, 200);\n\t\tlblBorderRight.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\n\t\tLabel lblBorderTop = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderTop.setBounds(0, 0, 285, 2);\n\t\tlblBorderTop.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\t}",
"private void setupListeners()\n\t{\n\t\tequals.addMouseListener(new MouseAdapter()\n\t\t{\n\t\t\tpublic void mouseClicked(MouseEvent click)\n\t\t\t{\n\t\t\t\tappController.calculate();\n\t\t\t\tappController.refocus();\n\t\t\t}\n\n\t\t\tpublic void mousePressed(MouseEvent onClick)\n\t\t\t{\n\t\t\t\tequals.setBackground(Color.RED.darker());\n\t\t\t}\n\n\t\t\tpublic void mouseReleased(MouseEvent offClick)\n\t\t\t{\n\t\t\t\tequals.setBackground(Color.RED);\n\t\t\t}\n\n\t\t\tpublic void mouseEntered(MouseEvent enter)\n\t\t\t{\n\t\t\t\tequals.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.WHITE, 3)));\n\t\t\t}\n\n\t\t\tpublic void mouseExited(MouseEvent exit)\n\t\t\t{\n\t\t\t\tequals.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\t\t}\n\t\t});\n\t\tclear.addMouseListener(new MouseAdapter()\n\t\t{\n\t\t\tpublic void mouseClicked(MouseEvent click)\n\t\t\t{\n\t\t\t\tappController.clearText();\n\t\t\t\tappController.refocus();\n\t\t\t}\n\n\t\t\tpublic void mousePressed(MouseEvent onClick)\n\t\t\t{\n\t\t\t\tclear.setBackground(new Color(0, 170, 100).darker());\n\t\t\t}\n\n\t\t\tpublic void mouseReleased(MouseEvent offClick)\n\t\t\t{\n\t\t\t\tclear.setBackground(new Color(0, 170, 100));\n\t\t\t}\n\n\t\t\tpublic void mouseEntered(MouseEvent enter)\n\t\t\t{\n\t\t\t\tclear.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.WHITE, 3)));\n\t\t\t}\n\n\t\t\tpublic void mouseExited(MouseEvent exit)\n\t\t\t{\n\t\t\t\tclear.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\t\t}\n\t\t});\n\t\tbackspace.addMouseListener(new MouseAdapter()\n\t\t{\n\t\t\tpublic void mouseClicked(MouseEvent click)\n\t\t\t{\n\t\t\t\tappController.backspace();\n\t\t\t\tappController.refocus();\n\t\t\t}\n\n\t\t\tpublic void mousePressed(MouseEvent onClick)\n\t\t\t{\n\t\t\t\tbackspace.setBackground(new Color(0, 170, 100).darker());\n\t\t\t}\n\n\t\t\tpublic void mouseReleased(MouseEvent offClick)\n\t\t\t{\n\t\t\t\tbackspace.setBackground(new Color(0, 170, 100));\n\t\t\t}\n\n\t\t\tpublic void mouseEntered(MouseEvent enter)\n\t\t\t{\n\t\t\t\tbackspace.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.WHITE, 3)));\n\t\t\t}\n\n\t\t\tpublic void mouseExited(MouseEvent exit)\n\t\t\t{\n\t\t\t\tbackspace.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\t\t}\n\t\t});\n\t\tnegative.addMouseListener(new MouseAdapter()\n\t\t{\n\t\t\tpublic void mouseClicked(MouseEvent click)\n\t\t\t{\n\t\t\t\tappController.changeSign();\n\t\t\t\tappController.refocus();\n\t\t\t}\n\n\t\t\tpublic void mousePressed(MouseEvent onClick)\n\t\t\t{\n\t\t\t\tnegative.setBackground(Color.GRAY.darker());\n\t\t\t}\n\n\t\t\tpublic void mouseReleased(MouseEvent offClick)\n\t\t\t{\n\t\t\t\tnegative.setBackground(Color.GRAY);\n\t\t\t}\n\n\t\t\tpublic void mouseEntered(MouseEvent enter)\n\t\t\t{\n\t\t\t\tnegative.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.WHITE, 3)));\n\t\t\t}\n\n\t\t\tpublic void mouseExited(MouseEvent exit)\n\t\t\t{\n\t\t\t\tnegative.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\t\t}\n\t\t});\n\t}",
"private void setupButtons()\n\t{\n\t\tequals.setText(\"=\");\n\t\tequals.setBackground(Color.RED);\n\t\tequals.setForeground(Color.WHITE);\n\t\tequals.setOpaque(true);\n\t\tequals.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tequals.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tclear.setText(\"C\");\n\t\tclear.setBackground(new Color(0, 170, 100));\n\t\tclear.setForeground(Color.WHITE);\n\t\tclear.setOpaque(true);\n\t\tclear.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tclear.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tbackspace.setText(\"<--\");\n\t\tbackspace.setBackground(new Color(0, 170, 100));\n\t\tbackspace.setForeground(Color.WHITE);\n\t\tbackspace.setOpaque(true);\n\t\tbackspace.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tbackspace.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tnegative.setText(\"+/-\");\n\t\tnegative.setBackground(Color.GRAY);\n\t\tnegative.setForeground(Color.WHITE);\n\t\tnegative.setOpaque(true);\n\t\tnegative.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tnegative.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t}",
"private void drawTopBorder(StringBuffer canvas) {\n \t\t\tfor (int i=0; i<width; i++)\r\n \t\t\t\tcanvas.append('_'); //Top bar.\r\n \t\t\tcanvas.append('\\n');}",
"public void setup() {\n\t\tthis.image = new BufferedImage(maxXPos, maxYPos, BufferedImage.TYPE_4BYTE_ABGR);\n\t\tthis.graphics = getImage().createGraphics();\n\t}",
"protected void init() {\n currentState.bgColor = appliedState.bgColor = gc.getBackground();\n currentState.fgColor = appliedState.fgColor = gc.getForeground();\n currentState.font = appliedState.font = gc.getFont();\n currentState.lineAttributes = gc.getLineAttributes();\n appliedState.lineAttributes = clone(currentState.lineAttributes);\n currentState.graphicHints |= gc.getLineStyle();\n currentState.graphicHints |= gc.getAdvanced() ? ADVANCED_GRAPHICS_MASK\n : 0;\n currentState.graphicHints |= gc.getXORMode() ? XOR_MASK : 0;\n\n appliedState.graphicHints = currentState.graphicHints;\n\n currentState.relativeClip = new RectangleClipping(gc.getClipping());\n currentState.alpha = gc.getAlpha();\n }",
"void addEventBorder(DefaultBorder border, DefaultBall ball);",
"private void drawHeart (float sx, float sy, float sz, Appearance[] app)\n {\n\tfloat x, y, z, r;\n\n BranchGroup tBG = new BranchGroup();\n\ttBG.setCapability (BranchGroup.ALLOW_DETACH);\n\n\tx = sx+0f; y = sy+0.04f; z = sz+0f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[0]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+0,sy+1.1,sz+0), \"AP\"));\n\t\n\tx = sx-0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[1]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz+1.5), \"IS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[2]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz+1.5), \"IL\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[3]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz+0.5), \"SI\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[4]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz+0.5), \"LI\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[5]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz-0.5), \"SA\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[6]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz-0.5), \"LA\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[7]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz-1.5), \"AS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[8]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz-1.5), \"AL\"));\n\n\tsceneBG.addChild (tBG);\n }",
"@Test\n public void test82() throws Throwable {\n WaterfallBarRenderer waterfallBarRenderer0 = new WaterfallBarRenderer();\n SystemColor systemColor0 = SystemColor.textInactiveText;\n Line2D.Double line2D_Double0 = new Line2D.Double();\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n combinedRangeCategoryPlot0.setAnchorValue(0.0, false);\n }",
"private void init() {\n\n this.paint.setStyle(Paint.Style.FILL);\n this.mBorder.setStyle(Paint.Style.STROKE);\n this.mBorder.setColor(Color.GRAY);\n this.mBorder.setStrokeWidth(BORDER_STROKE);\n\n }",
"protected void drawBackButton() {\n backButton = new TextButton(\"Back\", skin);\n stage.addActor(backButton);\n\n setPrevious();\n }",
"@Override\n\tprotected void outlineShape(Graphics graphics) {\n\t}",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制三角形\");\t\n\t}",
"private void initRendering() {\n ring = new Ring(0.3f, 0.7f);\n line = new Line(ImageTargets.screenWidth / 2, ImageTargets.screenHeight / 2);\n state_txt = createObject(68f, state_txt_cx, state_txt_cy, R.drawable.state);\n state_img = createObject(120f, state_img_cx, state_img_cy, R.drawable.open);\n record_txt = createObject(68f, record_txt_cx, record_txt_cy, R.drawable.record_txt);\n record_img = createObject(95f, record_img_cx, record_img_cy, R.drawable.record_img);\n recog_txt = createObject(68f, recog_txt_cx, recog_txt_cy, R.drawable.recog_txt);\n recog_img = createObject(155, recog_img_cx, recog_img_cy, R.drawable.person);\n record_num = createObject(85, record_num_cx, record_num_cy, R.drawable.num);\n\n histogram = createHistogram(85, 275.0f, 1150, 2.0f);\n histogram1 = createHistogram(85, 405, 1150, 2.2f);\n histogram2 = createHistogram(85, 540, 1150, 2.58f);\n histogram3 = createHistogram(85, 675, 1150, 0.9f);\n mRenderer = Renderer.getInstance();\n\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, Vuforia.requiresAlpha() ? 0.0f\n : 1.0f);\n setBgTransparent();\n //初始化纹理\n initTexture(res);\n mActivity.loadingDialogHandler\n .sendEmptyMessage(LoadingDialogHandler.HIDE_LOADING_DIALOG);\n\n }",
"public void constructAppearances() {\n/* 860 */ if (this.customAppearanceHandler == null) {\n/* */ PDSoundAppearanceHandler pDSoundAppearanceHandler;\n/* 862 */ PDAppearanceHandler appearanceHandler = null;\n/* 863 */ if (\"Caret\".equals(getSubtype())) {\n/* */ \n/* 865 */ PDCaretAppearanceHandler pDCaretAppearanceHandler = new PDCaretAppearanceHandler(this);\n/* */ }\n/* 867 */ else if (\"FreeText\".equals(getSubtype())) {\n/* */ \n/* 869 */ PDFreeTextAppearanceHandler pDFreeTextAppearanceHandler = new PDFreeTextAppearanceHandler(this);\n/* */ }\n/* 871 */ else if (\"Ink\".equals(getSubtype())) {\n/* */ \n/* 873 */ PDInkAppearanceHandler pDInkAppearanceHandler = new PDInkAppearanceHandler(this);\n/* */ }\n/* 875 */ else if (\"Polygon\".equals(getSubtype())) {\n/* */ \n/* 877 */ PDPolygonAppearanceHandler pDPolygonAppearanceHandler = new PDPolygonAppearanceHandler(this);\n/* */ }\n/* 879 */ else if (\"PolyLine\".equals(getSubtype())) {\n/* */ \n/* 881 */ PDPolylineAppearanceHandler pDPolylineAppearanceHandler = new PDPolylineAppearanceHandler(this);\n/* */ }\n/* 883 */ else if (\"Sound\".equals(getSubtype())) {\n/* */ \n/* 885 */ pDSoundAppearanceHandler = new PDSoundAppearanceHandler(this);\n/* */ } \n/* */ \n/* 888 */ if (pDSoundAppearanceHandler != null)\n/* */ {\n/* 890 */ pDSoundAppearanceHandler.generateAppearanceStreams();\n/* */ }\n/* */ }\n/* */ else {\n/* */ \n/* 895 */ this.customAppearanceHandler.generateAppearanceStreams();\n/* */ } \n/* */ }",
"public void init()\n {\n setBackground(Color.YELLOW);\n setForeground(Color.RED);\n }",
"protected void mo3350a() {\n super.a();\n this.f9051o = new YAxis(AxisDependency.LEFT);\n this.f9052p = new YAxis(AxisDependency.RIGHT);\n this.f9055s = new C3281g(this.Q);\n this.f9056t = new C3281g(this.Q);\n this.f9053q = new C3269t(this.Q, this.f9051o, this.f9055s);\n this.f9054r = new C3269t(this.Q, this.f9052p, this.f9056t);\n this.f9057u = new C2005q(this.Q, this.H, this.f9055s);\n setHighlighter(new C3210b(this));\n this.M = new C3284a(this, this.Q.m15881p(), 3.0f);\n this.f9043g = new Paint();\n this.f9043g.setStyle(Style.FILL);\n this.f9043g.setColor(Color.rgb(240, 240, 240));\n this.f9044h = new Paint();\n this.f9044h.setStyle(Style.STROKE);\n this.f9044h.setColor(ViewCompat.MEASURED_STATE_MASK);\n this.f9044h.setStrokeWidth(C3283i.m15928a(1.0f));\n }",
"private static void mainMenuLines(){\n setMenuLines(\"\",4,6,7,8,9,10,11,12,13,14,15,16,17,18,19);\n setMenuLines(\"Welcome to Ben's CMR program.\",1);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"help\" + ANSI_RESET + \" for a list of valid commands!\",20);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"exit\" + ANSI_RESET + \" to close the application!\",21);\n }",
"public GoalViewer()\r\n/* 25: */ {\r\n/* 26: 28 */ setBorder(BorderFactory.createLineBorder(Color.BLACK));\r\n/* 27: */ }",
"public OutlineZigzagEffect() {\n/* 43 */ setStroke(new ZigzagStroke(null));\n/* */ }",
"public Bordereau() {\n\t\tsuper();\n\t}",
"private void attachFrontlineHUD() {\r\n\t\tResourceManager.getInstance().getCamera().setHUD(HUDRegion);\r\n\t}",
"public JVDraw() {\r\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\r\n\t\tsetLocation(250, 250);\r\n\t\tsetSize(500, 500);\r\n\t\tsetTitle(\"JVDraw\");\r\n\r\n\t\tsetLayout(new BorderLayout());\r\n\r\n\t\tJPanel toolbar = new JPanel(new FlowLayout(FlowLayout.LEFT));\r\n\r\n\t\tJColorArea jca = new JColorArea(Color.BLACK);\r\n\t\tJColorArea jca2 = new JColorArea(Color.WHITE);\r\n\r\n\t\ttoolbar.add(jca);\r\n\t\ttoolbar.add(jca2);\r\n\t\tShapeButtons sbg = new ShapeButtons(Shape.LINE);\r\n\t\ttoolbar.add(sbg);\r\n\t\tadd(toolbar, BorderLayout.NORTH);\r\n\r\n\t\tdrawingModel = new DrawingModelImpl();\r\n\t\tdrawingCanvas = new JDrawingCanvas(drawingModel);\r\n\r\n\t\tadd(drawingCanvas, BorderLayout.CENTER);\r\n\r\n\t\tdrawingModel.addDrawingModelListener(drawingCanvas);\r\n\t\tmouseCreator = new MouseCreator(drawingModel, jca, jca2, sbg);\r\n\t\tdrawingCanvas.addMouseListener(mouseCreator);\r\n\t\tdrawingCanvas.addMouseMotionListener(mouseCreator);\r\n\r\n\t\tlistModel = new DrawingObjectListModel(drawingModel);\r\n\t\tdrawingModel.addDrawingModelListener(listModel);\r\n\r\n\t\tadd(new DrawingObjectList(listModel), BorderLayout.EAST);\r\n\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tsetJMenuBar(menuBar);\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tmenuBar.add(fileMenu);\r\n\t\tfileMenu.add(new OpenAction(this));\r\n\t\tfileMenu.add(new SaveAction(this));\r\n\t\tfileMenu.add(new SaveAsAction(this));\r\n\t\tfileMenu.add(new ExportAction(this));\r\n\t\tfileMenu.add(new ExitAction(this));\r\n\r\n\t\tdrawingModel.addDrawingModelListener(new DrawingModelListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void objectsRemoved(DrawingModel source, int index0, int index1) {\r\n\t\t\t\tmodified = true;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void objectsChanged(DrawingModel source, int index0, int index1) {\r\n\t\t\t\tmodified = true;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void objectsAdded(DrawingModel source, int index0, int index1) {\r\n\t\t\t\tmodified = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tadd(new StatusBar(jca, jca2), BorderLayout.SOUTH);\r\n\t}",
"private static void helpMenuLines(){\n setMenuLines(\"\",7,9,11,13,15,16,18,20);\n setMenuLines(\"Welcome to Ben's CMR program. Here are the main commands:\",1);\n setMenuLines(HIGHLIGHT_COLOR + \"new lead\" + ANSI_RESET + \" - Creates a new Lead\",4);\n setMenuLines(HIGHLIGHT_COLOR + \"convert <ID>\" + ANSI_RESET + \" - Converts a Lead into an Opportunity\",6);\n setMenuLines(HIGHLIGHT_COLOR + \"close-won <ID>\" + ANSI_RESET + \" - Close Won Opportunity\",8);\n setMenuLines(HIGHLIGHT_COLOR + \"close-lost <ID>\" + ANSI_RESET + \" - Close Lost Opportunity\",10);\n setMenuLines(HIGHLIGHT_COLOR + \"lookup <OBJECT> <ID>\" + ANSI_RESET + \" - Search for specific Lead, Opportunity, Account or Contact\",12);\n setMenuLines(HIGHLIGHT_COLOR + \"show <OBJECT PLURAL>\" + ANSI_RESET + \" - List all Leads, Opportunities, Accounts or Contacts\",14);\n setMenuLines(HIGHLIGHT_COLOR + \"help\" + ANSI_RESET + \" - Explains usage of available commands\",17);\n setMenuLines(HIGHLIGHT_COLOR + \"save\" + ANSI_RESET + \" - Saves the changed data\",19);\n setMenuLines(HIGHLIGHT_COLOR + \"exit\" + ANSI_RESET + \" - Saves and exits the program\",21);\n }",
"@Override\r\n\tpublic void BuildArmRight() {\n\t\tg.drawLine(70, 50, 90, 100);\r\n\t}",
"public void initializeFadingEdgesEx() {\n setVerticalFadingEdgeEnabled(true);\n setFadingEdgeLength(this.mGradientHeight);\n }",
"protected void initCrossHairs() {\n guiFont = assetManager.loadFont(\"Interface/Fonts/Default.fnt\");\n BitmapText ch = new BitmapText(guiFont, false);\n ch.setSize(guiFont.getCharSet().getRenderedSize() * 2);\n ch.setText(\"+\"); // crosshairs\n ch.setLocalTranslation( // center\n settings.getWidth() / 2 - ch.getLineWidth()/2, settings.getHeight() / 2 + ch.getLineHeight()/2, 0);\n guiNode.attachChild(ch);\n }",
"public void setup(){\n\n\t\t/*for(Integer group : this.onBeat.keySet()){\n\t\t\tthis.onBeat.put(group, false);\n\t\t}*/\n\t\tdspW=600;\n\t\t\n\t\t//CREATE TABS\n\t\tTab globalTab=controlP5.getTab(\"global\");\n\t\t\n\t\taddSlider(null,\"layer0bgAlpha.v\" ,0,0,1,5,18,80,h,globalTab,null).setCaptionLabel(\"bgAlpha 1\");\n\t\t\n\t\t//Top Buttons\n\t\tint y=3; \n\t\tint x=300;\n\t\taddButton(null,\"Save\",x,y,30,h,globalTab,null);\n\t\tx+=30+wMargin;\n\t\taddButton(null,\"Save All\",x,y,40,h,globalTab,null);\n\t\tx+=40+wMargin;\n\t\tx+=wMargin;\n\t\tif(Config.OSC){\n\t\t\taddButton(null,\"Send\",x,y,45,h,globalTab,null);\n\t\t\tx+=45+wMargin;\n\t\t\taddButton(null,\"SendAll\",x,y,45,h,globalTab,null);\n\t\t\tx+=45+wMargin;\n\t\t\tx+=wMargin;\n\t\t}\n\t\taddButton(null,\"Frame\",x,y,30,h,globalTab,null);\n\t\tx+=30+wMargin;\n\t\taddLabel(null,\"currentLayer\",\"\",x,y,globalTab,null);\n\t\tx+=12;\n\t\taddTextfield(null,\"layerType\",\"\",x,y-2,80,(int)(h*1.5),globalTab,null).setCaptionLabel(\"\");\n\t\tx+=80+wMargin; \n\t\taddTextfield(null,\"layerName\",\"\",x,y-2,80,(int)(h*1.5),globalTab,null).setCaptionLabel(\"\");\n\t\tx+=80+wMargin; \n\t\taddButton(null,\"relocate\",x,y,45,h,globalTab,null);\n\t\tx+=45+wMargin;\n\t\taddSlider(null,\"frames\" ,0,0,80,x,y,60,h,globalTab,null).setCaptionLabel(\"FPS\");\n\t\tx+=60+30+wMargin;\n\t\taddSlider(null,\"refresh\" ,10,0,500,x,y,60,h,globalTab,null).setCaptionLabel(\"Gui(ms)\");\n\t\tx+=90+wMargin; \n\t\taddToggle(null,\"LP\",true,10,300,h,h,globalTab,null);\n\t\t\n\t\t\n\t\t//Layers\n\t\tx=wMargin;\n\t\ty=hMargin+30;\n\t\taddLabel(null,\"Layers label\",\"Layers\",x,y,globalTab,null);\n\t\ty+=h+hMargin;\n\t\tx=5;\n\t\tfor(int i=0;i<app.layers.length;i++){\n\t\t\taddToggle(null,\"Layer Enabled \"+i,((i==0)?true:false),x,y+i*(h+hMargin),h,h,globalTab,null).setCaptionLabel(\"\");\n\t\t\taddButton(null,\"layer\"+(i)+\"fgDsp\", x+wMargin*4+h+3,y+i*(h+hMargin),h*2,h,globalTab,null).setCaptionLabel((1+i)+\"\");\n\t\t} \n\t\tx=h+2*wMargin+1; \n\t\t//layers\n\t\tString[] layerNames = new String[app.layers.length];\n\t\tint[] layerNumbers = new int[app.layers.length];\n\t\tfor(int i=0;i<app.layers.length;i++){\n\t\t\tlayerNames[i]=\"\";\n\t\t\tlayerNumbers[i]=(i);\n\t\t}\n\t\taddRadio(null,\"Layer Selected\",layerNames,x,y,null,null,globalTab,null).setLabel(\"\");\n\t\ty=34;x=60;\n\t\taddRadio(null,\"ghostLayer.v\",new String[]{\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"},x,y,null,null,globalTab,null); \n\n\n\t\t//Sound and FPS\n\t\tx=dspW+h+hMargin-5;\n\t\ty=windowH-(app.soundController.getGroups().size())*(h+hMargin)-50;\n\t\taddToggle(null,\"autoBeatSense\",true,x,y,h,h,globalTab,null).setCaptionLabel(\"\");\n\t\tx+=h+wMargin;\n\t\taddLabel(null,\"autoBeatSenseL\",\"Auto Sense\",x,y,globalTab,null);\n\t\taddSlider(null,\"beatSenseSense\" ,1.1f,0.5f,5,x+15,y,120,null,globalTab,null).setCaptionLabel(\"\");\n\n\t\t\n\t\t//SC groups\n\t\tx=dspW+h+hMargin-5;\n\t\ty=windowH-(app.soundController.getGroups().size())*(h+hMargin)-20;\n\t\tfor(int i=0;i<app.soundController.getGroups().size();i++){\n\t\t\taddToggle(null,\"bang-\"+i,false ,x,y+(i)*(h+hMargin),h,h,globalTab,null).setCaptionLabel(\"\");\n\t\t\tcontrolP5.getController(\"bang-\"+i).setColorActive(app.color(255,0,255));\n\t\t\taddSlider(null,\"score-\"+i ,0,0,20,x+50,y+(i)*(h+hMargin),w,null,globalTab,null).setCaptionLabel(\"\"); \n\t\t\taddSlider(null,\"beatsense-\"+i ,0,0,20,x+50+h+w,y+(i)*(h+hMargin),w/3,null,globalTab,null).setCaptionLabel(\"\");\n\n\t\t}\n\t\tx+=h+wMargin;\n\t\taddRadio(null,\"scGroup\",new String[]{\"g\",\"1\",\"2\",\"3\",\"4\",\"5\"},x,y,null,null,globalTab,null);\n\t\tx+=h+wMargin;\n\t\tx=dspW+h+hMargin-5;\n\t\ty=windowH-(app.soundController.getGroups().size()+1)*(h+hMargin);\n\t\taddLabel(null,\"SC Group : \",\"current : \",x,y-20,globalTab,null);\n\t\tx+=38+wMargin;\n\t\taddLabel(null,\"currentController\",\"\",x,y-20,globalTab,null);\n\t\ty+=h+hMargin;\n\n\t\t\n\t\t//global Buttons\n\t\tx=dspW+h+hMargin-5;\n\t\ty=windowH-(app.soundController.getGroups().size())*(h+hMargin)-80;\n\t\taddButton(null,\"bump+\",x,y+h+hMargin,35,null,globalTab,null) ; \n\t\tx+=40;\n\t\taddButton(null,\"bump-\",x,y+h+hMargin,35,null,globalTab,null) ;\n\t\tx+=40+wMargin;\n\t\taddButton(null,\"speed+\",x,y+h+hMargin,35,null,globalTab,null) ;\n\t\tx+=40;\n\t\taddButton(null,\"speed-\",x,y+h+hMargin,35,null,globalTab,null) ;\n\t\ty+=h+hMargin;\n\n\n\t\t//DSP Band Buttons\n\t\tif(app.soundController!=null && Config.DSP){\n\t\t\tif(bandWidth==0){\n\t\t\t\tcomputeBanWidth();\n\t\t\t}\n\t\t\tfor(int i=0;i<app.soundController.zoneEnabled().length;i++){\n\t\t\t\taddToggle(null,\"band\"+i,true,10+1+(bandWidth+1)*i,windowH-13-20,bandWidth,7,globalTab,null).setCaptionLabel(\"\");\n\t\t\t}\n\t\t}\n\n\n\t\t//LAYER TABS\n\t\tint tabX=80;\n\t\tint tabY=30;\n\t\tboolean first=false;\n\t\tfor(String layerType : Config.LAYER_TYPES.split(\"[, ]+\")){\n\t\t\tString tabName = first?\"default\":layerType;\n\t\t\tfirst=false;\n\t\t\tTab tab = controlP5.getTab(tabName);\n\t\t\ttab.setTitle(layerType.replace(\"Layer\", \"\").replace(\"NineBlockPattern\",\"Pattern\"));\n\t\t\tLayer layer;\n\t\t\ttry {\n\t\t\t\tlayer = Layer.newLayer(app, layerType);\n\t\t\t\tlayer.buildUI(this, tabX, tabY,tab,null);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}\n\n\t}",
"@Override \n public void paintBorder(Component c, Graphics g, int x, int y, int width, int height){ \n g.setColor( c.getForeground() ); \n g.drawLine(0, height - 1, width, height - 1); //Border Bottom \n }",
"private BusRouteLegendOverlay createBusRouteLegendOverlay() {\n ResourceProxy rp = new DefaultResourceProxyImpl(context);\n return new BusRouteLegendOverlay(rp, BusesAreUs.dpiFactor());\n }",
"public BasicLinePix() {\r\n\t\tsetTitle(\"Basic Line Pix 1.0\");\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tContainer cp = getContentPane();\r\n\t\tcp.setLayout(new BorderLayout());\r\n\t\teh = new EventHandler();\r\n\t\tdrawingPanel = makeDrawingPanel();\r\n\t\tdrawingPanel.addMouseListener(eh);\r\n\t\tdrawingPanel.addMouseMotionListener(eh);\r\n\t\tJPanel statusBar = createStatusBar();\r\n\t\tcp.add(drawingPanel, BorderLayout.CENTER);\r\n\t\tcp.add(statusBar, BorderLayout.SOUTH);\r\n\t\tbuildMenu();\r\n\t\tpack();\r\n\t}",
"void setupBars() {\n\n // ID, Horiz, Left\n bars.add(new LedBar(0, false, true));\n bars.add(new LedBar(1, true, true));\n bars.add(new LedBar(2, false, false));\n bars.add(new LedBar(3, false, true));\n bars.add(new LedBar(4, true, true));\n bars.add(new LedBar(5, true, false));\n bars.add(new LedBar(6, true, false));\n bars.add(new LedBar(7, true, false));\n bars.add(new LedBar(8, true, false));\n bars.add(new LedBar(9, true, true));\n bars.add(new LedBar(10, false, true));\n bars.add(new LedBar(11, false, false));\n bars.add(new LedBar(12, true, true));\n bars.add(new LedBar(13, false, false));\n bars.add(new LedBar(14, false, true));\n\n // hnext, hprev, vbro\n bars.get(0).setLinks(null, null, bars.get(4));\n bars.get(1).setLinks(bars.get(4), bars.get(8), bars.get(3));\n bars.get(2).setLinks(null, null, bars.get(5));\n bars.get(3).setLinks(null, null, bars.get(1));\n bars.get(4).setLinks(bars.get(9), bars.get(1), bars.get(0));\n bars.get(5).setLinks(bars.get(6), bars.get(12), bars.get(2));\n bars.get(6).setLinks(bars.get(7), bars.get(5), bars.get(11));\n bars.get(7).setLinks(bars.get(8), bars.get(6), bars.get(13));\n bars.get(8).setLinks(bars.get(1), bars.get(7), null); //Only one that hasn't got a vertical 'brother'\n bars.get(9).setLinks(bars.get(12), bars.get(4), bars.get(14));\n bars.get(10).setLinks(null, null, bars.get(12));\n bars.get(11).setLinks(null, null, bars.get(6));\n bars.get(12).setLinks(bars.get(5), bars.get(9), bars.get(10));\n bars.get(13).setLinks(null, null, bars.get(7));\n bars.get(14).setLinks(null, null, bars.get(9));\n\n verticals.add(0);\n verticals.add(2);\n verticals.add(3);\n verticals.add(10);\n verticals.add(11);\n verticals.add(13);\n verticals.add(14);\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 }",
"@Override\r\n\tpublic void BuildHead() {\n g.drawRoundRect(0, 0, 50, 20, 30, 30);\r\n\t}",
"@Override\r\n\tpublic void howToColor() {\n\t\t\r\n\t}",
"@Override\n\tpublic void onBlue() {\n\t\taddSequential(new DriveStraightByDistance(PEG_STRAIGHT - ROBOT_LENGTH / 2), 3.5);\n\t\t//TODO: might need to change to a little less\n\t\taddSequential(new TurnDegrees(90), 2.5);\n\t\taddSequential(new DriveStraightByDistance(EXTRA_DIS), 4);\n\t\taddSequential(new OpenPlacer2());\n\t\taddSequential(new ArcadeDriveByValues(-0.5, -0.5), 1);// TODO change commad\n\t\taddSequential(new ClosePlacer());\n\t\t\n\t}",
"protected void initialize() {\n\t\tsetBodyColor(Color.BLACK);\r\n\t\tsetGunColor(Color.BLACK);\r\n\t\tsetRadarColor(Color.BLACK);\r\n\t\tsetScanColor(Color.BLUE);\r\n\t\tsetBulletColor(Color.RED);\r\n\t}",
"protected void drawBackAndBorders(final Area area, final float startx,\n final float starty, final float width, final float height) {\n drawBackAndBorders(area, area, startx, starty, width, height);\n }",
"public void setup() {\n\t\tshapes[0] =new Shape (10,10);\n\t\tshapes[1] = new Rect (20,20,10,10);\n\t\tshapes[2]=new Oval (30,30,10,10);\n\t\tshapes[3] = new RoundedRect (70,70,40,40);\n\t}",
"public Color getBackground(){\r\n return back;\r\n }",
"private void colorSetup(){\n Color color2 = Color.GRAY;\n Color color = Color.LIGHT_GRAY;\n this.setBackground(color);\n this.mainPanel.setBackground(color);\n this.leftPanel.setBackground(color);\n this.rightPanel.setBackground(color);\n this.rightCenPanel.setBackground(color);\n this.rightLowPanel.setBackground(color);\n this.rightTopPanel.setBackground(color);\n this.inputPanel.setBackground(color);\n this.controlPanel.setBackground(color);\n this.setupPanel.setBackground(color);\n this.cameraPanel.setBackground(color);\n this.jPanel4.setBackground(color);\n this.sensSlider.setBackground(color); \n }",
"@Override\n\tpublic void onRed() {\n\t\taddSequential(new DriveStraightByDistance(PEG_STRAIGHT - ROBOT_LENGTH / 2), 3.5);\n\t\t//TODO: might need to change to a little less\n\t\taddSequential(new TurnDegrees(90), 2.5);\n\t\taddSequential(new DriveStraightByDistance(EXTRA_DIS), 4);\n\t\taddSequential(new OpenPlacer2());\n\t\taddSequential(new ArcadeDriveByValues(-0.5, -0.5), 1);// TODO change commad\n\t\taddSequential(new ClosePlacer());\n\t}",
"public TopMenuBar(DrawWindow dw){\n\t\tthis.dw = dw;\n\t\tthis.paint = dw.getPaint();\n\t\tbuild();\n\t}",
"@Override\r\n\tpublic void BuildLegRight() {\n\t\tg.drawLine(70, 100, 85, 150);\r\n\t}",
"@Override\n protected void paintBorder(Graphics g) {\n g.setColor(getForeground());\n g.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 15, 50);\n }",
"private void drawBorder(Graphics2D g2, boolean enabled, int x, int y, int w, int h)\r\n/* 193: */ {\r\n/* 194:228 */ g2.setColor(enabled ? PlasticLookAndFeel.getControlDarkShadow() : MetalLookAndFeel.getControlDisabled());\r\n/* 195: */ \r\n/* 196: */ \r\n/* 197:231 */ g2.drawOval(x, y, w, h);\r\n/* 198: */ }",
"protected void drawGuiContainerForegroundLayer(int par1, int par2)\n {\n super.fontRenderer.drawString(this.name, (super.xSize - super.fontRenderer.getStringWidth(this.name)) / 2, 6, 4210752);\n super.fontRenderer.drawString(this.inv, 8, super.ySize - 96 + 2, 4210752);\n }",
"public void drawBorder(boolean blue)\n\t{\n\t\t// copied most of the following from http://forums.inside3d.com/viewtopic.php?t=1326\n\t\tif (blue)\n\t\t\tglColor3f(0, 0, 1); // blue\n\t\telse\n\t\t\tglColor3f(1, 0, 0); // red\n\n\t\tglLineWidth(2); // Set line width to 2\n\t\tglLineStipple(1, (short) 0xf0f0); // Repeat count, repeat pattern\n\t\tglEnable(GL_LINE_STIPPLE); // Turn stipple on\n\n\t\tglBegin(GL_LINE_LOOP);\n\t\tglVertex2d(x - BORDER, y - BORDER);\n\t\tglVertex2d(x + BORDER + width, y - BORDER);\n\t\tglVertex2d(x + BORDER + width, y + BORDER + height);\n\t\tglVertex2d(x - BORDER, y + BORDER + height);\n\t\tglEnd();\n\t\tif (action == 3)\n\t\t{\n\t\t\tglBegin(GL_LINE_LOOP);\n\t\t\tdouble endPoint = endPos;\n\t\t\tif (!downRight)\n\t\t\t\tendPoint = startPos;\n\t\t\t//System.out.println(\"StartPos, EndPos, endPoint: \" + startPos + \", \" + endPos + \", \" + endPoint);\n\t\t\tif (upDown)\n\t\t\t{\n\t\t\t\tglVertex2d(x - BORDER, endPoint - BORDER);\n\t\t\t\tglVertex2d(x + BORDER + width, endPoint - BORDER);\n\t\t\t\tglVertex2d(x + BORDER + width, endPoint + BORDER + height);\n\t\t\t\tglVertex2d(x - BORDER, endPoint + BORDER + height);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglVertex2d(endPoint - BORDER, y - BORDER);\n\t\t\t\tglVertex2d(endPoint + BORDER + width, y - BORDER);\n\t\t\t\tglVertex2d(endPoint + BORDER + width, y + BORDER + height);\n\t\t\t\tglVertex2d(endPoint - BORDER, y + BORDER + height);\n\t\t\t}\n\t\t\tglEnd();\n\t\t}\n\n\t\tglDisable(GL_LINE_LOOP); // Turn it back off\n\t\tglDisable(GL_LINE_STIPPLE); // Turn it back off\n\t\tglEnd();\n\t}",
"public DefaultTheme() {\r\n //sets up alpha values for a nicer look\r\n p1.a = 0.85f;\r\n p2.a = 0.85f;\r\n p3.a = 0.85f;\r\n\r\n s1.a = 0.85f;\r\n s2.a = 0.85f;\r\n s3.a = 0.85f;\r\n }",
"protected abstract void showBottomFace();",
"private void blue(){\n\t\tthis.arretes_fB();\n\t\tthis.coins_fB();\n\t\tthis.coins_a1B();\n\t\tthis.coins_a2B();\n\t\tthis.aretes_aB();\n\t\tthis.cube[22] = \"B\";\n\t}",
"private void paintHand3(Graphics2D gfx)\r\n {\n \r\n }",
"@Override\n\tpublic void buildArmRight() {\n\t\tg.drawLine(70, 50, 100, 80);\n\t}",
"private static void createGUI(){\n DrawingArea drawingArea = new DrawingArea();\n ToolSelect utilityBar = new ToolSelect();\n MenuBar menuBar = new MenuBar();\n JFrame.setDefaultLookAndFeelDecorated(true);\n JFrame frame = new JFrame(\"GUIMk1\");\n frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\n frame.setLayout(new BorderLayout());\n frame.getContentPane().add(utilityBar, BorderLayout.WEST);\n frame.getContentPane().add(menuBar,BorderLayout.NORTH);\n frame.getContentPane().add(drawingArea);\n frame.setLocationRelativeTo( null );\n frame.setVisible(true);\n frame.pack();\n\n }",
"@Before\n public void initialize() {\n model1 = new AnimationModel();\n textView1 = new TextView();\n out = new StringBuffer();\n modelWithRectAndOval = new AnimationModel();\n modelWithRectAndOval.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200,\n 200), new Color(1, 0, 0), 1, 100,\n 50.0, 100.0));\n modelWithRectAndOval.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n }",
"private LineStyleUtils() {\n\n }",
"protected void drawBackground(\n // CSOK: ParameterNumber\n final float startx, final float starty, final float width,\n final float height, final Trait.Background back,\n final BorderProps bpsTop, final BorderProps bpsBottom,\n final BorderProps bpsLeft, final BorderProps bpsRight) {\n if (back != null) {\n endTextObject();\n\n // Calculate padding rectangle\n float sx = startx;\n float sy = starty;\n float paddRectWidth = width;\n float paddRectHeight = height;\n if (bpsLeft != null) {\n sx += bpsLeft.width / 1000f;\n paddRectWidth -= bpsLeft.width / 1000f;\n }\n if (bpsTop != null) {\n sy += bpsTop.width / 1000f;\n paddRectHeight -= bpsTop.width / 1000f;\n }\n if (bpsRight != null) {\n paddRectWidth -= bpsRight.width / 1000f;\n }\n if (bpsBottom != null) {\n paddRectHeight -= bpsBottom.width / 1000f;\n }\n\n if (back.getColor() != null) {\n updateColor(back.getColor(), true);\n fillRect(sx, sy, paddRectWidth, paddRectHeight);\n }\n if (back.getImageInfo() != null) {\n final ImageSize imageSize = back.getImageInfo().getSize();\n saveGraphicsState();\n clipRect(sx, sy, paddRectWidth, paddRectHeight);\n int horzCount = (int) (paddRectWidth * 1000\n / imageSize.getWidthMpt() + 1.0f);\n int vertCount = (int) (paddRectHeight * 1000\n / imageSize.getHeightMpt() + 1.0f);\n if (back.getRepeat() == EN_NOREPEAT) {\n horzCount = 1;\n vertCount = 1;\n } else if (back.getRepeat() == EN_REPEATX) {\n vertCount = 1;\n } else if (back.getRepeat() == EN_REPEATY) {\n horzCount = 1;\n }\n // change from points to millipoints\n sx *= 1000;\n sy *= 1000;\n if (horzCount == 1) {\n sx += back.getHoriz();\n }\n if (vertCount == 1) {\n sy += back.getVertical();\n }\n for (int x = 0; x < horzCount; x++) {\n for (int y = 0; y < vertCount; y++) {\n // place once\n Rectangle2D pos;\n // Image positions are relative to the currentIP/BP\n pos = new Rectangle2D.Float(sx - this.currentIPPosition\n + x * imageSize.getWidthMpt(), sy\n - this.currentBPPosition + y\n * imageSize.getHeightMpt(),\n imageSize.getWidthMpt(),\n imageSize.getHeightMpt());\n drawImage(back.getURL(), pos);\n }\n }\n\n restoreGraphicsState();\n }\n }\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 }",
"Appearance lineApp() {\n\t\tAppearance app = new Appearance();\n\t\tapp.setPolygonAttributes(\n\t\t\tnew PolygonAttributes(\n\t\t\t\tPolygonAttributes.POLYGON_LINE,\n\t\t\t\tPolygonAttributes.CULL_NONE,\n\t\t\t\t0f));\n\t\treturn app;\n\t}",
"protected void drawBackground(\n // CSOK: ParameterNumber\n final float startx, final float starty, final float width,\n final float height, final Trait.Background back,\n final BorderProps bpsBefore, final BorderProps bpsAfter,\n final BorderProps bpsStart, final BorderProps bpsEnd,\n final int level) {\n final BorderProps bpsTop = bpsBefore;\n final BorderProps bpsBottom = bpsAfter;\n BorderProps bpsLeft;\n BorderProps bpsRight;\n if (level == -1 || (level & 1) == 0) {\n bpsLeft = bpsStart;\n bpsRight = bpsEnd;\n } else {\n bpsLeft = bpsEnd;\n bpsRight = bpsStart;\n }\n drawBackground(startx, starty, width, height, back, bpsTop, bpsBottom,\n bpsLeft, bpsRight);\n }",
"public BackWallDemo() {\r\n super();\r\n showBackWallButton.addItemListener(this);\r\n }"
] | [
"0.5945546",
"0.57711923",
"0.5753047",
"0.5621509",
"0.56105244",
"0.55658853",
"0.5558059",
"0.5542003",
"0.54974836",
"0.5491356",
"0.54610676",
"0.5422835",
"0.54091525",
"0.54043126",
"0.540131",
"0.53809214",
"0.5333891",
"0.53087217",
"0.5290505",
"0.52894175",
"0.5287893",
"0.5284299",
"0.5283045",
"0.5281585",
"0.52804744",
"0.52743715",
"0.5263349",
"0.5246912",
"0.5236467",
"0.5230101",
"0.5216875",
"0.5201966",
"0.5200943",
"0.5190874",
"0.5189675",
"0.5187439",
"0.5187246",
"0.5174658",
"0.5157772",
"0.51481587",
"0.5146749",
"0.51339906",
"0.5128227",
"0.5128044",
"0.51270217",
"0.51104456",
"0.51089805",
"0.51028603",
"0.5102588",
"0.50970256",
"0.50902367",
"0.5087861",
"0.5087815",
"0.5084968",
"0.5081588",
"0.5071761",
"0.5068655",
"0.5063352",
"0.5062278",
"0.504925",
"0.5046727",
"0.50390995",
"0.50369394",
"0.50322676",
"0.5030145",
"0.5028821",
"0.50271976",
"0.5025455",
"0.5016379",
"0.50122285",
"0.5010374",
"0.50072265",
"0.50049514",
"0.50048536",
"0.5002609",
"0.4994359",
"0.49886596",
"0.49873117",
"0.4986753",
"0.49860546",
"0.49747536",
"0.49745837",
"0.49726245",
"0.49608847",
"0.4956639",
"0.49561778",
"0.4954009",
"0.49533895",
"0.4946127",
"0.49427876",
"0.49411464",
"0.49411327",
"0.49351877",
"0.4934692",
"0.4934563",
"0.4931949",
"0.4926389",
"0.49249995",
"0.4924969",
"0.49229944"
] | 0.5807201 | 1 |
Draw surround of the shape. | public void drawBorder(Graphics g, Shape s) {
graphics.setStroke(new BasicStroke(8f)); // set the surround size of the shape
graphics.setColor(Color.BLACK);
graphics.draw(s);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override public void draw(){\n // this take care of applying all styles (colors/stroke)\n super.draw();\n // draw our shape\n pg.ellipseMode(PGraphics.CORNER); // TODO: make configurable\n pg.ellipse(0,0,getSize().x,getSize().y);\n }",
"public void drawShape(Shape shape);",
"@Override\r\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\r\n\t\tsetRedBorder(decoratedShape);\r\n\t}",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制圆形\");\n\t}",
"@Override\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\n\t}",
"public Shapes draw ( );",
"void draw(IViewShapes shape);",
"@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(this.color);\r\n\t\tg.fillOval((int)x, (int)y, side, side);\r\n\t\tg.setColor(this.color2);\r\n\t\tg.fillOval((int)x+5, (int)y+2, side/2, side/2);\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}",
"DrawShape(){\r\n super();\r\n setBackground(Color.WHITE);\r\n addMouseListener(this);\r\n }",
"public void draw(){\n if (! this.isFinished() ){\n UI.setColor(this.color);\n double left = this.xPos-this.radius;\n double top = GROUND-this.ht-this.radius;\n UI.fillOval(left, top, this.radius*2, this.radius*2);\n }\n }",
"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 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(Graphics g) {\n\t\t\n\t\tGraphics2D g2d = (Graphics2D) g.create();\n\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\tjava.awt.Shape outer = new Ellipse2D.Double(getCenter().getX() - getRadius(), getCenter().getY() - getRadius(), getRadius()*2, getRadius()*2);\n\t\tjava.awt.Shape inner = new Ellipse2D.Double(getCenter().getX() - innerRadius, getCenter().getY() - innerRadius, innerRadius*2, innerRadius*2);\n\t\t\n\t\tArea circle = new Area(outer);\n\t\tcircle.subtract(new Area(inner));\n\t\t\n\t\tg2d.setColor(getInnerColor());\n\t\tg2d.fill(circle);\n\t\tg2d.setColor(getColor());\n\t\tg2d.draw(circle);\n\t\tg2d.dispose();\n\t\t\n\t\tif (isSelected()) {\n\t\t\tg.setColor(Color.BLUE);\n\t\t\tg.drawRect(this.getCenter().getX() - 3, this.getCenter().getY() - 3, 6, 6);\n\t\t\tg.drawRect(this.getCenter().getX() - getRadius() - 3, this.getCenter().getY() - 3, 6, 6);\n\t\t\tg.drawRect(this.getCenter().getX() + getRadius() - 3, this.getCenter().getY() - 3, 6, 6);\n\t\t\tg.drawRect(this.getCenter().getX() - 3, this.getCenter().getY() - getRadius() - 3, 6, 6);\n\t\t\tg.drawRect(this.getCenter().getX() - 3, this.getCenter().getY() + getRadius() - 3, 6, 6);\n\t\t}\n\t}",
"void drawInterior(DrawContext dc, Object shape);",
"@Override\n\tpublic void BuildShape(Graphics g) {\n\t\t\n\t}",
"private void drawShape(Graphics g, IShape shape) {\r\n Color color = shape.getColor();\r\n if (shape.getPosition() != null) {\r\n int x = shape.getPosition().getX();\r\n int y = shape.getPosition().getY();\r\n int width = shape.getWidth();\r\n int height = shape.getHeight();\r\n\r\n\r\n switch (shape.getShapeType()) {\r\n case \"Ellipse\":\r\n g.setColor(color);\r\n g.fillOval(x, y, width, height);\r\n g.drawOval(x, y, width, height);\r\n break;\r\n case \"Rectangle\":\r\n g.setColor(color);\r\n g.fillRect(x, y, width, height);\r\n g.drawRect(x, y, width, height);\r\n break;\r\n case \"Plus\":\r\n g.setColor(color);\r\n int width1 = width ;\r\n int height2 = height;\r\n int height1 = height / 2;\r\n int width2 = width / 2;\r\n int x1 = x;\r\n int y1 = y + height / 4;\r\n int x2 = x + width / 4;\r\n int y2 = y;\r\n g.fillRect(x1, y1, width1, height1);\r\n g.fillRect(x2, y2, width2, height2);\r\n break;\r\n default:\r\n return;\r\n }\r\n }\r\n }",
"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 paintShapeOver(RMShapePainter aPntr)\n{\n if(getStrokeOnTop() && getStroke()!=null)\n getStroke().paint(aPntr, this);\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 draw(Graphics g) {\n int x = super.getX();\n int y = super.getY();\n int d = (int)radius*2; //d = diameter\n g.setColor(Color.BLACK);\n g.drawOval(265/2,235,265,265);\n g.drawLine(265, 115, 265, 500);\n\n int [ ] x2 = {27, 500, 265}; //lets work on that line?\n int [ ] y2 = {500, 500, 115};\n g.setColor(Color.black);\n g.drawPolygon(x2, y2, 3);\n\n }",
"@Override\n\tpublic void paintObject(Graphics g) {\n\t\tg.setColor(this.color);\n\t\tGraphics2D g2d = (Graphics2D) g;\n\t\tg2d.setStroke(new BasicStroke(3));\n\t\tg2d.drawOval(x, y, width, height);\n\t\tg2d.fillOval(x, y, width, height);\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}",
"@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Draw all shapes\");\r\n\t\t\r\n\t}",
"public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\n }",
"@Override\n\tpublic void paint(Graphics2D g) {\n\t\tg.setColor(Color.WHITE);\n\t\tg.drawOval(this.x,this.y, width,height);\n\t\tg.fillOval(this.x,this.y, width,height);\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\n public void draw() {\n drawAPI.drawCircle(radius, x, y); \n }",
"@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.PINK);\r\n\t\tg.fillRect(getX(), getY(), getWidth(), getHeight());\r\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 draw() {\n \n // TODO\n }",
"@Override\n public void generateShape() {\n AffineTransform tx = new AffineTransform();\n tx.rotate(-this.getRotation(), this.getX(), this.getY());\n this.shape = tx.createTransformedShape(new Ellipse2D.Double(\n this.getX() + this.getWidth() / 2 - D / 2,\n this.getY() + this.getHeight() / 2 - D / 2,\n D, D));\n }",
"public void draw(Shape shape) {\n this.shape = shape; //setter\n System.out.println(shape.draw()); //execute\n }",
"@Override\n protected void paintComponent(Graphics g) {\n\n Graphics2D g2d = (Graphics2D) g.create();\n g2d.setRenderingHint(\n RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setComposite(AlphaComposite.getInstance(\n AlphaComposite.SRC_OVER, opa));\n g2d.setColor(color);\n if (!round) {\n g2d.fillRect(0, 0, getWidth(), getHeight());\n } else {\n g2d.fillRoundRect(0, 0, getWidth(), getHeight(), corner, corner);\n }\n }",
"@Override\n public void draw(GraphicsContext gc) {\n gc.setFill(getFillColor());\n gc.setStroke(getStrokeColor());\n gc.setLineWidth(getStrokeWidth());\n gc.fillRect(getX1(), getY1(), getX2() - getX1(), getX2() - getX1());\n gc.strokeRect(getX1(), getY1(), getX2() - getX1(), getX2() - getX1());\n }",
"@Override\n\tprotected void outlineShape(Graphics graphics) {\n\t}",
"public void paint(Graphics2D g){\n g.setColor(color);\n g.fill(shape);\n }",
"public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}",
"public void paintShape(RMShapePainter aPntr)\n{\n // If fill/stroke present, have them paint\n if(getFill()!=null)\n getFill().paint(aPntr, this);\n if(getStroke()!=null && !getStrokeOnTop())\n getStroke().paint(aPntr, this);\n}",
"@Override\n\tprotected void draw() {\n\t\tif(p != null) {\n\t\t\tp.pushStyle();\n\t\t\tp.noStroke();\n\t\t\tp.textAlign(PApplet.CENTER,PApplet.CENTER);\n\t\t\tp.textSize(12);\n\t\t\tif(this.isPressed) {\n\t\t\t\tp.fill(122, 138, 153);\n\t\t\t\tp.rect(x,y,width,height);\n\t\t\t\tp.fill(181, 206, 228);\n\t\t\t\tp.rect(x+2,y+2,width-4,height-4);\n\t\t\t\tp.fill(Color.BLACK.getRGB());\n\t\t\t\tp.text(text, x, y,width,height);\n\t\t\t}else {\n\t\t\t\tif(this.isHovered) {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+2,y+2,width-5,height-5,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}else {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+1,y+1,width-3,height-3,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.popStyle();\n\t\t}\n\t}",
"public void strokeShape(Shape shape);",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.PINK);\n\t\tg.fillRect(getx(), gety(), getwidth(), getheight());\n\t}",
"@Override\n\tpublic void drawShape(Graphics g) {\n\t\tg.setColor(getColor());\n\t\tg.drawLine(startPoint.getX(), startPoint.getY(), endPoint.getX(), endPoint.getY());\n\t\tif(isSelected())\n\t\t\tselectedShape(g);\n\t}",
"public void draw(Graphics g){\n g.setColor(c);\n if (this.fill){\n g.fillOval(x, y, width, height);\n }else{\n g.drawOval(x, y, width, height);\n }\n }",
"public void renderShape(final Shape theShape) {\n if (myWidth > 0) {\n final Drawing newDrawing = new Drawing(theShape, myColor, myWidth);\n myCurrentShape = newDrawing;\n repaint();\n } \n }",
"@Override\n public void draw(){\n ellipse(mouseX, mouseY, 50, 50);\n }",
"void drawShape() {\n System.out.println(\"Drawing Triangle\");\n this.color.addColor();\n }",
"public abstract void drawFill();",
"void drawOutline(DrawContext dc, Object shape);",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.orange);\n\t\tg.fillRect(getX(), getY(), getW(), getH());\n\t}",
"@Override\n public void draw(Batch batch, float parentAlpha) {\n batch.end();\n\n\n //do custom shape rendering\n shape.setProjectionMatrix(batch.getProjectionMatrix());\n\n shape.begin(ShapeRenderer.ShapeType.Filled);\n //setBounds(getParent().getX(), getParent().getY(), getParent().getWidth(), getParent().getWidth());\n\n\n shape.setColor(Color.GREEN);\n Vector2 coords = new Vector2(getX(), getY());\n localToStageCoordinates(coords);\n shape.circle(coords.x + getWidth()/2, coords.y + getHeight()/2, 10);\n\n shape.circle(coords.x, coords.y, 10);\n shape.circle(coords.x, coords.y+getHeight(), 10);\n shape.circle(coords.x + getWidth(), coords.y, 10);\n shape.circle(coords.x + getWidth(), coords.y + getHeight(), 10);\n\n shape.end();\n shape.setColor(Color.WHITE);\n\n //continue batch\n batch.begin();\n }",
"@Override\n public void draw(Graphics graphics){\n graphics.fillRect(referencePoint.getX() + width / 3, referencePoint.getY() + height / 3, width / 3, height / 3);\n }",
"void drawShape(Shape s) {\n }",
"public void draw(Graphics g) {\r\n\t\tGraphics2D g2d = (Graphics2D) g;\r\n\t\tg2d.setStroke(new BasicStroke((float) penWidth));\r\n\t\tg2d.setPaint(borderColor);\r\n\t\tif (width<height){\r\n\t\t\tg2d.drawPolygon(new int[]{p.x,p.x + (width / 2),p.x + width, p.x + (width/2)}, new int[] {p.y,p.y + (width/3),p.y,p.y + width},4);\r\n\t\t}else{\r\n\t\t\tg2d.drawPolygon(new int[]{p.x,p.x + (height/2),p.x + height, p.x + (height/2)}, new int[] {p.y,p.y+(height/3),p.y,p.y + height},4);\r\n\r\n\t\t}\r\n\t\tdrawHandles(g);\r\n\t}",
"@Override\r\n\tprotected void initShape() {\n\t\tgetPositions().putAll(createSymmetricLines(0, 1.5, .5, 1.1, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//->upper corner\r\n\t\tgetPositions().putAll(createSymmetricLines(.5, 1.1, 1, .7, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower outer corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .7, 1.1, .3, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower inner corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1.1, .3, .7, .25, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> middle\r\n\t\tgetPositions().putAll(createSymmetricLines(.7, .25, .2, 1.35, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//inner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .5, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricLines(0.8, .4, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricPoints(0.9, .5, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_RIGHT, WingPart.INNER_RIGHT));\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_LEFT, WingPart.INNER_LEFT));\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}",
"public void draw() {\n draw(this.root, new RectHV(0.0, 0.0, 1.0, 1.0));\n }",
"@Override\n\tpublic void drawShape(Graphics2D g) {\n\t\tsuper.drawShape(g);\n\t\trect.drawAndFillShape(g);\n\t\tuiText.drawShape(g);\n\t}",
"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(Graphics g) {\n g.setColor(COLOR);\n g.fillOval(x, y, WIDTH, HEIGHT);\n g.setColor(Color.BLUE);\n g.drawOval(x, y, WIDTH, HEIGHT);\n \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 void paint(Graphics g) {\n\t\t\n\t\t//find slope - use to calculate position \n\t\tArrayList <Integer> Xpos = new ArrayList<Integer>();\n\t\tArrayList <Integer> Ypos = new ArrayList<Integer>();\n\n\t\t//contain all the x and y coordinates for horizontal lines\n\t\tArrayList <Integer> HorizXOutline = new ArrayList<Integer>();\n\t\tArrayList <Integer> HorizYOutline = new ArrayList<Integer>();\n\t\t//contain all x any y points for veritical lines\n\t\tArrayList <Integer> VertOutlineX = new ArrayList<Integer>();\n\t\tArrayList <Integer> VertOutlineY = new ArrayList<Integer>();\n\t\t//contain all x and y points of postive and pos diag lines\n\t\tArrayList <Integer> PosDiagOutlineX = new ArrayList<Integer>();\n\t\tArrayList <Integer> PosDiagOutlineY = new ArrayList<Integer>();\n\t\t//contain all x and y points of postive and neg diag lines\n\t\tArrayList <Integer> NegDiagOutlineX = new ArrayList<Integer>();\n\t\tArrayList <Integer> NegDiagOutlineY = new ArrayList<Integer>();\n\n\t\tg.setColor(Color.green);\n\t\t//adding outer shape x coord\n\t\tXpos.add(100);Xpos.add(100);Xpos.add(100);Xpos.add(200);\n\t\tXpos.add(200);Xpos.add(300);Xpos.add(100);Xpos.add(200);\n\t\tXpos.add(300);Xpos.add(400);Xpos.add(300);Xpos.add(350);\n\t\tXpos.add(400);Xpos.add(350);Xpos.add(300);Xpos.add(350);\n\t\tXpos.add(400);Xpos.add(350);Xpos.add(200);Xpos.add(300);//Xpos.add(120);Xpos.add(120);\n\t\tSystem.out.println(Xpos.size());\n\t\t//g.drawArc(100, 10, 200, 200, 0, 360);\n\t\t//adding outer shape y coord\n\t\tYpos.add(100);Ypos.add(10);Ypos.add(10);Ypos.add(10);\n\t\tYpos.add(10);Ypos.add(110);Ypos.add(100);Ypos.add(200);\n\t\tYpos.add(300);Ypos.add(300);Ypos.add(300);Ypos.add(180);\n\t\tYpos.add(300);Ypos.add(180);Ypos.add(300);Ypos.add(420);\n\t\tYpos.add(300);Ypos.add(420);Ypos.add(200);Ypos.add(110);//Ypos.add(100);Ypos.add(10);\n\t\tfor(int x =0;x<Xpos.size();x+=2){\n\t\t\tg.drawLine(Xpos.get(x), Ypos.get(x), Xpos.get(x+1), Ypos.get(x+1));\n\t\t\tif(Ypos.get(x)==Ypos.get(x+1)){\n\t\t\t\tHorizXOutline.add(x);HorizXOutline.add(x+1);\n\t\t\t\tHorizYOutline.add(x);HorizYOutline.add(x+1);\n\t\t\t\tg.drawLine(Xpos.get(x),Ypos.get(x)+20,Xpos.get(x+1),Ypos.get(x+1)+20);\n\t\t\t}\n\t\t\telse if(Xpos.get(x)==Xpos.get(x+1)){\n\t\t\t\tVertOutlineX.add(x);VertOutlineX.add(x+1);\n\t\t\t\tVertOutlineY.add(x);VertOutlineY.add(x+1);\n\t\t\t\tg.drawLine(Xpos.get(x)+20,Ypos.get(x),Xpos.get(x+1)+20,Ypos.get(x+1));\n\t\t\t}\n\t\t\tif((Ypos.get(x+1)-Ypos.get(x))!=0)\n\t\t\t{\n\t\t\t\tint slope = (Xpos.get(x)-Xpos.get(x+1))/(Ypos.get(x+1)-Ypos.get(x));\n\t\t\t\tif(slope<0){\n\t\t\t\t\tNegDiagOutlineX.add(x);NegDiagOutlineX.add(x+1);\n\t\t\t\t\tNegDiagOutlineY.add(x);NegDiagOutlineY.add(x+1);\n\t\t\t\t\tif(Xpos.get(x)<=100){\n\t\t\t\t\t\tg.drawLine(Xpos.get(x),Ypos.get(x)-20,Xpos.get(x+1)+10,Ypos.get(x+1)-10);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\tg.drawLine(Xpos.get(x),Ypos.get(x)+20,Xpos.get(x+1)-10,Ypos.get(x+1)+10);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(slope>0){\n\t\t\t\t\tPosDiagOutlineX.add(x);PosDiagOutlineX.add(x+1);\n\t\t\t\t\tPosDiagOutlineY.add(x);PosDiagOutlineY.add(x+1);\n\t\t\t\t\tg.drawLine(Xpos.get(x)-10,Ypos.get(x)-10,Xpos.get(x+1)-10,Ypos.get(x+1)-10);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n//\t for(int x = 0;x<=120;x+=10){\n//\t \t//change in x-3900/-13 = Xpos\n//\t \tint xpos1 = (int)(350 +(x/10)*(-50/11));\n//\t \tint xpos2 = (int)(350+(x/10)*(50/11));\n//\t \tint ypos = 180+x;\n//\t \tg.setColor(Color.red);\n//\t \tg.drawLine(xpos1, ypos, xpos2, ypos);\n//\t \tXpos.add(xpos1);Ypos.add(ypos);Xpos.add(xpos2);Ypos.add(ypos);\n//\t }\n//\t // g.setColor(Color.blue);\n//\t ////.drawRect(200, 100, 100, 100);\n//\t // g.setColor(Color.red);\n//\t double slope = (300-200)/(110-10);\n//\t int y = (int) (100-slope*20);\n//\t // g.drawRect(220, 130-y, 100, 100);\n//\t for(int x = 20;x<=100;x+=10){\n//\t \t//Y=slope*x+0 : (Y)/slope = X where Y = interval of 20\n//\t \tint ypos = (int)(x/slope)+190;\n//\t \tg.drawLine(100, x, ypos, x);\n//\t \tXpos.add(100);Ypos.add(x);Xpos.add(ypos);Ypos.add(x);\n//\t }\n\t // g.drawLine(300, 100, 200, 200);\n//\t for(int x = 100;x<=200;x+=10){\n//\t \tdouble circleypos = 200+ Math.sqrt((200-x)*100);\n//\t \tg.drawLine(x, x, (int)(circleypos), x);\n//\t \t\n//\t }\n\t double totalDist=0;\n\t for(int x=0; x<Xpos.size();x+=2){\n\t int xd = Xpos.get(x+1)-Xpos.get(x); xd = xd*xd;\n\t int yd = Ypos.get(x+1)-Ypos.get(x); yd = yd*yd;\n\t int distance = (int) (Math.sqrt(xd+yd));\n\t totalDist +=distance;\n\t System.out.println(\"The length of this line is\" + distance + \" and the total distance as of now is \" + totalDist);\n\t }\n\t}",
"public void draw() {\n draw(root, true);\n }",
"@Override\r\n\tpublic void paint(Graphics g) {\n\t\tGraphics2D g2d= (Graphics2D)g;//Cast the Graphics received in the paint method to Graphics2D\r\n\t\tg2d.setColor(Color.RED);//Set the color to red\r\n\t\tg2d.setStroke(new BasicStroke(5));//Set the width of the line to 5px \r\n\t\t//g2d.drawLine(0, 0, 500, 500);//Draw a line starting at point (0,0) and ending at point (500,500)\r\n\t\t//g2d.drawRect(100, 100, 300, 300);//Draw a rectangle with upper left corner at (100,100) and with width and height of 300px\r\n\t\tg2d.setColor(Color.GREEN);//Set the color to green\r\n\t\t//g2d.fillRect(100, 100, 300, 300);//Fill the rectangle\r\n\t\t\r\n\t\t//If we will draw the line first and then the rectangle, the rectangle will be on top of the line and hide part of it\r\n\t\t//g2d.drawOval(100, 100, 300, 300);//Draw circle\r\n\t\t//g2d.fillOval(100, 100, 300, 300);//Fill the circle\r\n\t\t\r\n\t\t//g2d.drawArc(100,100,200,200,0,180);//Draw half circle\r\n\t\r\n\t\t//g2d.drawArc(100,100,200,200,180,180);//Flip it\r\n\t\t//g2d.drawArc(100,100,200,200,0,270);//Draw 3/4 of a circle\r\n\t\t\r\n\t\t//int[] xPoints= {150,250,350};\r\n\t\t//int[] yPoints= {300,150,300};\r\n\t\t//g2d.drawPolygon(xPoints,yPoints,3);//Draw rectangle using polygon, specify x points and y points of the corners and number of corners,\r\n\t\t\t\t\t\t\t\t\t\t //we can specify more than 3 corners and create different shapes.\r\n\t\t\t\t\r\n\t\t//g2d.fillPolygon(xPoints,yPoints,3);//Fill the rectangle using polygon\r\n\t\tg2d.setColor(Color.BLACK);//Set the color to black\r\n\t\tg2d.setFont(new Font(\"Ink Free\", Font.BOLD,40));\r\n\t\tg2d.drawString(\"Hello world\", 100, 100);\r\n\t}",
"public void draw() {\n\t\tapplyColors();\n\n\t\tfloat halfHeight = height / 2,\n\t\t\t\tdiameter = 2 * radius;\n\n\t\tRobotRun.getInstance().translate(0f, 0f, halfHeight);\n\t\t// Draw top of the cylinder\n\t\tRobotRun.getInstance().ellipse(0f, 0f, diameter, diameter);\n\t\tRobotRun.getInstance().translate(0f, 0f, -height);\n\t\t// Draw bottom of the cylinder\n\t\tRobotRun.getInstance().ellipse(0f, 0f, diameter, diameter);\n\t\tRobotRun.getInstance().translate(0f, 0f, halfHeight);\n\n\t\tRobotRun.getInstance().beginShape(RobotRun.TRIANGLE_STRIP);\n\t\t// Draw a string of triangles around the circumference of the Cylinders top and bottom.\n\t\tfor (int degree = 0; degree <= 360; ++degree) {\n\t\t\tfloat pos_x = RobotRun.cos(RobotRun.DEG_TO_RAD * degree) * radius,\n\t\t\t\t\tpos_y = RobotRun.sin(RobotRun.DEG_TO_RAD * degree) * radius;\n\n\t\t\tRobotRun.getInstance().vertex(pos_x, pos_y, halfHeight);\n\t\t\tRobotRun.getInstance().vertex(pos_x, pos_y, -halfHeight);\n\t\t}\n\n\t\tRobotRun.getInstance().endShape();\n\t}",
"public void draw() {\n draw(root, false);\n }",
"@Override\n public void drawingMethod(final Graphics theGraphics, final DrawShape theShape) {\n final Path2D path = new Path2D.Double();\n path.moveTo(theShape.getStartPoint().getX(), \n theShape.getStartPoint().getY());\n path.lineTo(theShape.getEndPoint().getX(),\n theShape.getEndPoint().getY());\n final Graphics2D g2d = (Graphics2D) theGraphics;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \n RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setStroke(new BasicStroke(theShape.getMyThick()));\n g2d.setColor(theShape.getMyColor());\n g2d.draw(path); \n }",
"@Override\r\n\tpublic void draw(Graphics g, PresentationElement presentationelement) {\n\t\t\r\n\t\tRectangle r = presentationelement.getNotCopyBounds();\r\n\t\tint x0 = r.x;\r\n\t\tint y0 = r.y;\r\n\t\tint xStep = r.width / 6;\r\n\t\tint yStep = r.height / 4;\r\n\r\n\t\tint xPoints[] = { x0, x0 + 6 * xStep, x0 + 6 * xStep, x0 + 9 * xStep / 2,\r\n\t\t\t\tx0 + 9 * xStep / 2, x0 + 6 * xStep, x0 + 6 * xStep, x0, x0,\r\n\t\t\t\tx0 + 3 * xStep / 2, x0 + 3 * xStep / 2, x0 };\r\n\t\tint yPoints[] = { y0, y0, y0 + yStep, y0 + yStep, y0 + 2 * yStep,\r\n\t\t\t\ty0 + 2 * yStep, y0 + 4 * yStep, y0 + 4 * yStep, y0 + 2 * yStep,\r\n\t\t\t\ty0 + 2 * yStep, y0 + yStep, y0 + yStep };\r\n\t\tg.drawPolygon(xPoints, yPoints, 12);\r\n\r\n\t\tfor (PresentationElement pe : presentationelement.getPresentationElements()) {\r\n\t\t\tif (pe instanceof ClassHeaderView) {\r\n\t\t\t\tClassHeaderView classHeaderView = (ClassHeaderView) pe;\r\n\t\t\t\tclassHeaderView.getNameLabel().shapeSpecificDraw(g);\r\n\t\t\t\tclassHeaderView.getStereotypeLabel().shapeSpecificDraw(g);\r\n\t\t\t} else {\r\n\t\t\t\tif (pe instanceof PortView) {\r\n\t\t\t\t\tpe.setVisible(true);\r\n\t\t\t\t}\r\n\t\t\t\tif (pe.isVisible()) {\r\n\t\t\t\t\tpe.draw(g);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpresentationelement.paintAdornments(g, presentationelement);\r\n\t}",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"You are drawing a RECTANGLE\");\n\t}",
"private void draw() {\n gsm.draw(g);\n }",
"public void paint(Graphics g) {\r\n\t\tsuper.paint(g);\r\n\t\t// add code below\r\n\t\tGraphics g1 = drawingPanel.getGraphics();\r\n\t\tif (myLine != null && myLine.getIsAPerpendicular() == false) {\r\n\t\t\tShapes.add(myLine);\r\n\t\t\tfor (int i = 0; i < Shapes.size(); i++) {\r\n\t\t\t\tShapes.get(i).draw(g1);\r\n\t\t\t}\r\n\t\t}// End If to prevent null pointer exception\r\n\t\tif (myOval != null) {\r\n\t\t\tShapes.add(myOval);\r\n\t\t\tfor (int i = 0; i < Shapes.size(); i++) {\r\n\t\t\t\tShapes.get(i).draw(g1); // To make this legal an abstract method named draw which accepted graphics g need to be added to the shapes class\r\n\t\t\t}\r\n\t\t}// End If to prevent null pointer exception\r\n\t}",
"public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}",
"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}",
"public void polygone (Graphics g){\n\t}",
"@Override\n\tpublic void draw(Graphics2D g2d) {\n\t\tAffineTransform saveAT = g2d.getTransform() ;\n\t\t// Append this shape's transforms to the graphics object's transform. Note the\n\t\t// ORDER: Translation will be done FIRST, then Scaling, and lastly Rotation\n\t\tg2d.transform(getRotation());\n\t\tg2d.transform(getScale());\n\t\tg2d.transform(getTranslation());\n\t\t\n\t\t// draw this object in the defined color\n\t\t;\n\t\tg2d.drawLine(top.x, top.y, bottomLeft.x, bottomLeft.y);\n\t\tg2d.drawLine(bottomLeft.x,bottomLeft.y,bottomRight.x,bottomRight.y);\n\t\tg2d.drawLine(bottomRight.x,bottomRight.y,top.x,top.y);\n\t\t\n\t\t// restore the old graphics transform (remove this shape's transform)\n\t\tg2d.setTransform (saveAT) ;\n\t}",
"@Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n Graphics2D g2d = (Graphics2D)g;\n\n if (shapeList != null) {\n shapeList.sort(Comparator.comparing(Shape::getLayer));\n for (Shape shape : shapeList) {\n if (shape.getType() == ShapeType.RECTANGLE) {\n g2d.setColor(new Color(shape.getR(), shape.getG(), shape.getB()));\n g2d.fillRect(shape.getX(), shape.getY(), shape.getWidth(), shape.getHeight());\n }\n else if (shape.getType() == ShapeType.ELLIPSE) {\n g2d.setColor(new Color(shape.getR(), shape.getG(), shape.getB()));\n g2d.fillOval(shape.getX(), shape.getY(), shape.getWidth(), shape.getHeight());\n }\n }\n }\n }",
"public void draw() {\n \n }",
"public void draw(){\n\t\tcomponent.draw();\r\n\t}",
"public void draw(Shape s)\r\n\t{\r\n\t\tPathIterator path = s.getPathIterator(_g2.getTransform());\r\n\t\tfloat[] coords = new float[6];\r\n\r\n\t\tPoint lastPoint = null;\r\n\t\tPoint newPoint = null;\r\n\r\n\t\twhile (!path.isDone())\r\n\t\t{\r\n\t\t\tint type = path.currentSegment(coords);\r\n\r\n\t\t\tswitch (type)\r\n\t\t\t{\r\n\t\t\tcase PathIterator.SEG_MOVETO:\r\n\t\t\t{\r\n\t\t\t\tlastPoint = new Point((int) coords[0], (int) coords[1]);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase PathIterator.SEG_LINETO:\r\n\t\t\t{\r\n\t\t\t\tnewPoint = new Point((int) coords[0], (int) coords[1]);\r\n\t\t\t\tif (lastPoint != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.drawLine(lastPoint.x, lastPoint.y, newPoint.x, newPoint.y);\r\n\t\t\t\t}\r\n\t\t\t\tlastPoint = newPoint;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\t\t\tcase PathIterator.SEG_QUADTO:\r\n\t\t\t{\r\n\t\t\t\tlastPoint = new Point((int) coords[0], (int) coords[1]);\r\n\t\t\t\tnewPoint = new Point((int) coords[2], (int) coords[3]);\r\n\t\t\t\tthis.drawLine(lastPoint.x, lastPoint.y, newPoint.x, newPoint.y);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\t\t\tcase PathIterator.SEG_CUBICTO:\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\t\t\tcase PathIterator.SEG_CLOSE:\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tpath.next();\r\n\t\t}\r\n\t}",
"public void draw() {\n\t\tSystem.out.println(getMessageSource().getMessage(\"greeting2\", null, null));\r\n\r\n\t\tSystem.out.println(getMessageSource().getMessage(\"drawing.circle\", null, null));\r\n\t\tSystem.out.println(\"Center's Coordinates: (\" + getCenter().getX() + \", \" + getCenter().getY() + \")\");\r\n\t\tSystem.out.println(getMessageSource().getMessage(\"drawing.center\",\r\n\t\t\t\tnew Object[] { getCenter().getX(), getCenter().getY() }, \"Default point coordinates msg\", null));\r\n\t}",
"public void fillShape(Shape shape);",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.ORANGE);\n\t\tg.fillRect(x, y, WIDTH, HEIGHT);\n\t}",
"@Override\n\tpublic void paintComponent(java.awt.Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg.setColor(java.awt.Color.green);\n\t\tg.fillOval(x, y, 50, 50);\n\t\tg.setColor(java.awt.Color.black);\n\t\tg.drawOval(x, y, 50, 50);\n\t}",
"public void draw(Graphics window)\r\n {\r\n window.setColor(color);\r\n window.fillRect(xPos, yPos, width, height);\r\n window.setColor(Color.green);\r\n window .fillOval(xPos-15, yPos-15, width-20, height-20);\r\n window .fillOval(xPos+35, yPos-15, width-20, height-20);\r\n\r\n }",
"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\r\n public void paintComponent(Graphics g) {\r\n super.paintComponent(g); g.setColor(Color.ORANGE);\r\n if (drawCirc == 0) {\r\n \tg.fillOval(txtLft,txtTop,txtWidth,txtHeight);\r\n }\r\n }",
"public void drawOn(Graphics g);",
"abstract void draw(Graphics g, int xoff, int yoff,\n int x, int y, int width, int height);",
"protected abstract void draw();",
"public void drawStroke(Canvas canvas, Paint eraser, Shape shape, int xPosition, int yPosition, int shapePadding) {\n }",
"@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.green);\r\n\t\tg.fillRect(getX(), getY(), getWidth(), getHeight());\r\n\t}",
"protected void paintComponent(Graphics g){\n g.drawOval(110,110,50,50);\n }",
"public void draw(GraphicsContext gc) {\r\n gc.setStroke(Color.BLACK);\r\n gc.setFill(Color.BLUE);\r\n gc.setLineWidth(5.0);\r\n double r = radius / 2;\r\n gc.fillRect(x - r, y - r, radius * 2, radius * 2);\r\n gc.strokeRect(x - r, y - r, radius * 2, radius * 2);\r\n }",
"public void paint(RMShapePainter aPntr)\n{\n // Clone graphics\n RMShapePainter pntr = aPntr.clone();\n \n // Apply transform for shape\n if(isRSS()) pntr.transform(getTransform().awt());\n else pntr.translate(getX(), getY());\n \n // If shape bounds don't intersect clip bounds, just return\n Rectangle cbounds = pntr.getClip()!=null? pntr.getClipBounds() : null;\n if(cbounds!=null && !getBoundsMarkedDeep().intersects(cbounds))\n return;\n \n // If shape is semi-transparent, apply composite\n if(getOpacityDeep()!=1) {\n float op = pntr.isEditing()? Math.max(.15f, getOpacityDeep()) : getOpacityDeep();\n pntr.setOpacity(op);\n }\n \n // If shape has a effect, have it paint\n if(getEffect()!=null)\n getEffect().paint(pntr, this);\n \n // Otherwise paintShapeAll\n else paintShapeAll(pntr);\n \n // Dispose of graphics\n pntr.dispose();\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\tprotected void drawSub(Canvas canvas) {\n\t\tpaint.setTextSize(30);\n\t\tcanvas.drawText(\"Logic View\", rx, 30, paint);\n\t\t\n\t\tcanvas.drawArc(oval, 0, sweepAngle, true, paint);\n\n\t}",
"public void draw(ShapeRenderer sr){\n this.draw(sr,null,true);\n }",
"@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tgc.setFill(this.color.getColor());\n\t\tgc.fillRect(MyPoint.point[0], MyPoint.point[1], this.width, this.height);\n\t}",
"public void paint( Graphics g )\n {\n g.setColor( drawingColor );\n\n // draw text\n if ( textOn ) {\n g.setFont( new Font( font, Font.PLAIN, fontSize ) );\n g.drawString( text.getText(), topX, topY );\n textOn = false;\n return;\n \n } // end if statement\n\n // set shape's top left coordinates\n if ( shape != LINE ) {\n topX = Math.min( topX, bottomX );\n topY = Math.min( topY, bottomY );\n \n } // end if statement\n\n // draw filled shape\n if ( filled && shape != LINE )\n\n switch ( shape ) {\n\n case OVAL:\n g.fillOval( topX, topY, width, height );\n break;\n\n case RECT:\n g.fillRect( topX, topY, width, height );\n break;\n \n } // end switch statement\n\n // draw unfilled shapes\n else\n\n switch ( shape ) {\n\n case OVAL:\n g.drawOval( topX, topY, width, height );\n break;\n\n case LINE:\n g.drawLine( topX, topY, bottomX, bottomY );\n break;\n\n case RECT:\n g.drawRect( topX, topY, width, height );\n break;\n \n } // ens switch statement\n\n // clear background\n if ( clear == true ) {\n g.setColor( Color.white );\n g.fillRect( 0, 0, getSize().width, getSize().height );\n clear = false;\n \n } // end if statement\n\n }",
"@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n if (bdhcHandler != null) {\n int[] slopes = bdhcHandler.getSelectedPlate().getSlope();\n float angle = (float) Math.atan2(slopes[indexSlope1], slopes[indexSlope2]);\n\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g.setColor(Color.magenta);\n final int angleRadius = (radius * 2) / 3;\n final int angleOffset = size / 2 - angleRadius;\n g2.setStroke(new BasicStroke(2));\n g.drawArc(angleOffset, angleOffset, 2 * angleRadius, 2 * angleRadius, 0, (int) (-(angle * 180) / Math.PI));\n\n g2.setStroke(new BasicStroke(2));\n if (frontView) {\n g.setColor(Color.red);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n } else {\n g.setColor(Color.green);\n //g.drawLine(size / 2, size / 2, size, size / 2);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n }\n\n int circleOffset = size / 2 - radius;\n g.setColor(Color.black);\n g2.setStroke(new BasicStroke(1));\n g.drawOval(circleOffset, circleOffset, radius * 2, radius * 2);\n\n int x = (int) (Math.cos(angle) * radius);\n int y = (int) (Math.sin(angle) * radius);\n int lineOffset = size / 2;\n g.setColor(Color.orange);\n g2.setStroke(new BasicStroke(3));\n g.drawLine(lineOffset - x, lineOffset - y, lineOffset + x, lineOffset + y);\n\n }\n\n }"
] | [
"0.77646726",
"0.7220243",
"0.7184817",
"0.71591353",
"0.71403605",
"0.71309733",
"0.7035527",
"0.7003898",
"0.697834",
"0.6962992",
"0.68839973",
"0.6809501",
"0.67883587",
"0.67441636",
"0.67382014",
"0.6706745",
"0.6673533",
"0.66208637",
"0.6561749",
"0.6549071",
"0.65042156",
"0.649929",
"0.646357",
"0.646357",
"0.646357",
"0.64481574",
"0.6443432",
"0.6442942",
"0.64410144",
"0.6433005",
"0.6424728",
"0.6418342",
"0.6411947",
"0.6411813",
"0.640823",
"0.63902223",
"0.6371554",
"0.6370619",
"0.63705117",
"0.6356657",
"0.6352507",
"0.6351577",
"0.63334155",
"0.6332675",
"0.63311684",
"0.63310385",
"0.6327852",
"0.6317941",
"0.6303141",
"0.63020134",
"0.6300745",
"0.62954754",
"0.62863356",
"0.6285384",
"0.62851024",
"0.6281897",
"0.6276243",
"0.62531203",
"0.6236776",
"0.62278056",
"0.62189883",
"0.6209477",
"0.61997527",
"0.6192157",
"0.6187575",
"0.6173873",
"0.61731815",
"0.61702496",
"0.6169361",
"0.6164914",
"0.6153479",
"0.6151673",
"0.6139555",
"0.61343604",
"0.6132156",
"0.6119585",
"0.6118612",
"0.61158377",
"0.6115117",
"0.6112203",
"0.60959136",
"0.6089736",
"0.6085268",
"0.60815936",
"0.6078426",
"0.6071328",
"0.6067338",
"0.6065097",
"0.60602444",
"0.60560113",
"0.60548973",
"0.605411",
"0.6045414",
"0.60427004",
"0.60426533",
"0.6030864",
"0.60269636",
"0.6022749",
"0.60219866",
"0.6021267",
"0.6017862"
] | 0.0 | -1 |
Draw the title of the book | private void drawBooksAndTitles(int spaceBetweenShelves, int dimCanvasX, int thiknessEdges, int shelfWidth,
boolean leaning, List<Shape> shelves, String bColor) {
List<Shape> bookShapes = new ArrayList<>();
int idealWidth = (int) (0.6 * (shelfWidth / library.getShelves().get(0).getBooks().size()));
int idealHeight = (int) (0.8 * spaceBetweenShelves);
int placeLeftInShelf = shelfWidth;
int shelfNumber = 1;
Random randomGenerator = new Random();
int counterBooks = library.getShelves().get(shelfNumber - 1).getBooks().size();
for (Book book : library.getListOfAllTheBooks()) {
Shape bookShape = null;
int randomWidth = idealWidth + randomGenerator.nextInt(30);
int randomHeightGap = randomGenerator.nextInt(50);
int heightSup = idealHeight + randomHeightGap;
if (heightSup > spaceBetweenShelves) {
heightSup = spaceBetweenShelves;
}
setSizeBook(spaceBetweenShelves, shelfWidth, book, idealWidth, idealHeight, randomWidth, heightSup);
int width = book.getWidth();
int height = book.getHeight();
if (placeLeftInShelf <= width) {
// go to another shelf
placeLeftInShelf = shelfWidth;
shelfNumber++;
}
int bookX = dimCanvasX - thiknessEdges - placeLeftInShelf;
int bookY = shelfNumber * thiknessEdges + (shelfNumber - 1) * spaceBetweenShelves + spaceBetweenShelves
- height;
bookShape = new Rectangle(bookX, bookY, width, height);
bookShapes.add(bookShape);
counterBooks--;
if (counterBooks == 0) {
// go to another shelf
placeLeftInShelf = shelfWidth;
shelfNumber++;
if (shelfNumber < library.getShelves().size()) {
counterBooks = library.getShelves().get(shelfNumber - 1).getBooks().size();
}
} else {
placeLeftInShelf -= width;
}
}
int indexShelf = 0;
int indexBook = 0;
placeLeftInShelf = shelfWidth;
for (Shape bookShape : bookShapes) {
double YOfTheShelf = shelves.get(indexShelf).getBounds().getY();
boolean isLastBookOfTheShelf = (indexBook + 1)
% library.getShelves().get(indexShelf).getBooks().size() == 0;
int[] table = drawBook(randomGenerator, isLastBookOfTheShelf, bookShape,
library.getShelves().get(indexShelf).getBooks().get(indexBook), placeLeftInShelf, YOfTheShelf,
leaning, bColor);
lastColorIndex = table[2];
int bookRotation = table[0];
double bookX = bookShape.getBounds().getX();
double bookY;
if (isLastBookOfTheShelf) {
bookY = table[1];
} else {
bookY = bookShape.getBounds().getY();
}
double bookHeight = bookShape.getBounds().getHeight();
double bookWidth = bookShape.getBounds().getWidth();
String bookTitle = library.getShelves().get(indexShelf).getBooks().get(indexBook).getTitle();
String authorFirstName = library.getShelves().get(indexShelf).getBooks().get(indexBook).getAuthor()
.getFirstName();
String authorLastName = library.getShelves().get(indexShelf).getBooks().get(indexBook).getAuthor()
.getLastName();
int bookYear = library.getShelves().get(indexShelf).getBooks().get(indexBook).getYear();
String bookString = bookTitle + " - " + authorFirstName + " " + authorLastName + " - " + bookYear;
drawTitle(bookRotation, bookString, bookShape, bookX, bookY, indexBook, bookHeight, bColor, bookWidth);
if (isLastBookOfTheShelf) {
indexShelf++;
indexBook = 0;
placeLeftInShelf = shelfWidth;
} else {
indexBook++;
placeLeftInShelf -= bookShape.getBounds().getWidth();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void drawTitle(int bookRotation, String bookString, Shape book, double bookX, double bookY, int indexBook,\r\n\t\t\tdouble bookHeight, String bColor, double bookWidth) {\r\n\r\n\t\t// select the black color for the title\r\n\t\tif (bColor.equals(\"Dark\")) {\r\n\t\t\tgraphics.setPaint(Color.white);\r\n\t\t} else {\r\n\t\t\tgraphics.setPaint(Color.black);\r\n\t\t}\r\n\r\n\t\t// draw the title with the same rotation as the book\r\n\r\n\t\tgraphics.rotate(Math.toRadians(+90 + bookRotation), bookX, bookY);\r\n\t\tint fontSize = 30;\r\n\t\tgraphics.setFont(new Font(\"TimesRoman\", Font.PLAIN, fontSize));\r\n\r\n\t\t// change the size of the title if it is too long\r\n\t\tif (graphics.getFontMetrics().stringWidth(bookString) > 6 * bookHeight / 10) {\r\n\t\t\twhile (graphics.getFontMetrics().stringWidth(bookString) > 6 * bookHeight / 10) {\r\n\t\t\t\tfontSize = fontSize - 3;\r\n\t\t\t\tgraphics.setFont(new Font(\"TimesRoman\", Font.PLAIN, fontSize));\r\n\t\t\t}\r\n\t\t}\r\n\t\tgraphics.drawString(bookString,\r\n\t\t\t\t(float) (bookX + (bookHeight - graphics.getFontMetrics().stringWidth(bookString)) / 2),\r\n\t\t\t\t(float) (bookY - bookWidth / 4));\r\n\r\n\t\tgraphics.rotate(Math.toRadians(-90 - bookRotation), bookX, bookY);\r\n\t}",
"protected void drawTitle(){\n titleBox = new Rectangle(155,380, 490, 200);\n titleBorder = new Rectangle(150, 375, 500, 210);\n titleBorder.setFillColor(pink);\n titleBorder.setFilled(true);\n titleBox.setFillColor(Color.BLACK);\n titleBox.setFilled(true);\n title = new Image(206, 400, \"124-hw4/BreakoutText/breakoutText.png\");\n\n canvas.add(titleBorder);\n canvas.add(titleBox);\n canvas.add(title);\n }",
"private void renderTitle() {\n this.row = sheet.createRow(INT_ROW_START);\n //se crea titulos de la tabla\n this.addCell(column_++, \"CODIGO DE BARRAS\", this.cellStyleTitle());\n this.addCell(column_++, \"FECHA\", this.cellStyleTitle());\n this.addCell(column_++, \"HORA\", this.cellStyleTitle());\n this.addCell(column_++, \"MARBETE\", this.cellStyleTitle());\n this.addCell(column_++, \"PRODUCTO\", this.cellStyleTitle());\n this.addCell(column_++, \"DESCRIPCIÓN\", this.cellStyleTitle());\n this.addCell(column_++, \"LOTE\", this.cellStyleTitle());\n this.addCell(column_++, \"PESO\", this.cellStyleTitle());\n this.addCell(column_++, \"RESPONSABLE\", this.cellStyleTitle());\n }",
"public void Title ()\n {\n\tTitle = new Panel ();\n\tTitle.setBackground (Color.white);\n\tchessboard (Title);\n\tp_screen.add (\"1\", Title);\n }",
"protected void drawTitle(Graphics2D g2) {\n //int xloc = leftDisplay + (rightDisplay - leftDisplay)*xCenter/getWidth();\n FontRenderContext frc = g2.getFontRenderContext();\n Font font = new Font(\"Arial\", Font.BOLD, 9);\n String str = dataSet.getGeneRange().getName() + \" Chr\" + dataSet.getChromosome();\n g2.setColor(Singleton.getUserPreferences().getThumbnailTextColor());\n TextLayout tl = new TextLayout(str, font, frc);\n int x = 2;\n int y = 10;\n tl.draw(g2, x, y);\n \n /*for (Model model : viewData.getModels()) {\n System.out.println(\"Rendering with model \" + model.toString() + \"\\thaving #snps: \" + snps.size());*/\n String modelStr = viewData.getModels().get(0).toString();\n //String modelStr = dataSet.getModels().get(0).toString();\n TextLayout modelTl = new TextLayout(modelStr, font, frc);\n int INTER_TITLE_BREAK = 20;\n int modelX = x;\n int modelY = 20;\n if(tl.getBounds().getWidth() + modelTl.getBounds().getWidth() + INTER_TITLE_BREAK < getWidth()) {\n modelY = y;\n modelX = x + (int) Math.round(tl.getBounds().getWidth()) + INTER_TITLE_BREAK;\n }\n modelTl.draw(g2, modelX, modelY);\n }",
"public void printTitle()\n {\n System.out.println(title);\n }",
"public void title(){\n textFont(select,30);\n fill(150);\n text(\"PLANE SELECT\",482,72);\n fill(0);\n text(\"PLANE SELECT\",480,70);\n}",
"private Text createTitle() {\n\t\tText title = new Text(\"S p a c e Y\");\n\t\ttitle.setFont(new Font(\"Minecraftia\", 80));\n\t\ttitle.setStroke(Color.YELLOW);\n\t\ttitle.setStrokeWidth(2);\n\t\ttitle.setStrokeType(StrokeType.OUTSIDE);\n\t\ttitle.getTransforms().add(new Rotate(-50, 300, 200, 20, Rotate.X_AXIS));\n\t\ttitle.setX(canvas.getWidth() / 2);\n\t\ttitle.setY(canvas.getHeight() / 2);\n\t\treturn title;\n\t}",
"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}",
"public static void printTitle( String title )\r\n {\n }",
"public void showTitle(PGraphics pg, float x, float y){\r\n\t\tString title = getTitle();\r\n\t\tpg.pushStyle();\r\n\t\t\r\n\t\tpg.rectMode(PConstants.CORNER);\r\n\t\t\r\n\t\tpg.stroke(110);\r\n\t\tpg.fill(255,255,255);\r\n\t\tpg.rect(x, y + 15, pg.textWidth(title) +6, 18, 5);\r\n\t\t\r\n\t\tpg.textAlign(PConstants.LEFT, PConstants.TOP);\r\n\t\tpg.fill(0);\r\n\t\tpg.text(title, x + 3 , y +18);\r\n\t\t\r\n\t\t\r\n\t\tpg.popStyle();\r\n\t}",
"protected String getBookTitleBlock( String title )\n {\n return \"<bookinfo><title>\" + 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 titleImage(){\r\n\t\tint x = 75;\r\n\t\tint y = 100;\r\n\t\t//Title is displayed\r\n\t\tString title = \"Ticket Master\";\r\n\t\ttitleImage = new GLabel(title,x,y);\r\n\t\ttitleImage.setColor(Color.green);\r\n\t\ttitleImage.setFont(\"Arial-100\");\r\n\t\tcanvas.add(titleImage);\r\n\t}",
"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 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}",
"public static void header(String title){\n byte titlelength = (byte)title.length();\n System.out.println(\"+================================================+\");\n System.out.printf(\"|%-\" + ((48 - titlelength) / 2) + \"s%\" + titlelength + \"s%-\" + ((49 - titlelength) / 2) + \n \"s|\" + EOF, \"\", title.toUpperCase(), \"\");\n System.out.println(\"+================================================+\");\n }",
"TITLE createTITLE();",
"String getTitle(int row, int column);",
"public static void printTitle(int width, String title)\n {\n title = ConsoleForm.getCentered(width, title);\n System.out.printf(\"\\n%s\\n\\n\", title);\n }",
"public void listTitles() {\n for (int i = 0; i < books.length; i++) {\n System.out.println(\"The title of book\" + (i + 1) + \": \" + books[i].getTitle());\n }\n }",
"private Node createTitle() {\n\t\tText titleText = new Text(\" Restaurant Inventory Management \");\n\t\ttitleText.setFont(Font.font(\"Arial\", FontWeight.BOLD, 40));\n\t\ttitleText.setTextAlignment(TextAlignment.CENTER);\n\t\t\n\n\t\treturn titleText;\n\t}",
"String title();",
"String title();",
"@Override\r\n\tpublic void getTitle() {\n\t\t\r\n\t}",
"protected String getChapterTitleBlock( String title )\n {\n return \"<title>\" + title + \"</title>\";\n }",
"IDisplayString getTitle();",
"void showTitle(String title);",
"private Label createTitle() {\n Label titleLbl = new Label(\"Tank Royale\");\n titleLbl.setFont(Font.loadFont(getClass().getResourceAsStream(\"/resources/fonts/ToetheLineless.ttf\"), 50));\n titleLbl.setPrefWidth(400);\n titleLbl.setLayoutX(545 - titleLbl.getWidth() - 157);\n titleLbl.setLayoutY(125);\n return titleLbl;\n }",
"public void roundTitle() {\n lineDivider();\n System.out.println(\"\\n--------------------- R O U N D ---------------------\");\n System.out.println(\"\\t \" + currentRound++ + \" \\n\");\n }",
"private void drawTitleScreen(Graphics g) {\n \t\tg.setColor(new Color(0, 0x66, 0xcc, 150));\n \t\tg.fillRect(0, 60, getWidth(), getHeight() - 120);\n \t\tg.setColor(Color.WHITE);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 30));\n \t\tg.drawString(\"POP UP QUIZ!\", 50, 100);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 18));\n \t\tg.drawString(\"Where you answer questions whilst cleaning your desktop!\",\n \t\t\t\t50, 120);\n \t\tg.drawString(\"Q LAM, V TONG, A VIJAYARAGAVAN\", 50, 140);\n \n \t\tg.drawString(\"Use the arrow keys to move the recycle bin.\", 50, 180);\n \t\tg.drawString(\"<Space> pauses, and <Esc> quits.\", 50, 200);\n \n \t\tg.drawImage(sprites.get(\"junk\"), 4, 200, null);\n \t\tg.drawString(\"Polish your computer by trashing junk falling \"\n \t\t\t\t+ \"from the sky!\", 50, 220);\n \n \t\tg.drawImage(sprites.get(\"sysfileLarge\"), 4, 330, null);\n \t\tg.drawImage(sprites.get(\"sysfileMedium\"), 8, 390, null);\n \t\tg.drawImage(sprites.get(\"sysfileSmall\"), 16, 440, null);\n \t\tg.drawString(\"You'll mess up your computer if you collect system files.\",\n \t\t\t\t50, 360);\n \t\tg.drawString(\"Note that they fall from the sky at different speeds.\",\n \t\t\t\t50, 390);\n \n \t\tg.drawString(\"The CPU gauge will tell you how well you're doing!\",\n \t\t\t\t50, 420);\n \t\tg.drawString(\"If your CPU usage goes over 100%, your computer goes kaput\"\n \t\t\t\t+ \" and you lose! How long can you clean?\", 50, 450);\n \n \t\tg.drawString(\"By the way, you'll have to answer questions from a barrage\"\n \t\t\t\t+ \" of pop-up as you do this.\", 50, 500);\n \t\tg.drawString(\"Serves you right for not being clean!!!\", 50, 530);\n \n \t\tg.drawString(\"PUSH START TO BEGIN_\", 50, 600);\n \t}",
"public String getPrintTitle();",
"@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 static void printTitle(int year, int month) {\n System.out.println(\" Sun Mon Tue Wed Thu Fri Sat\");//output the title for each month of the year\n }",
"@AutoEscape\n\tpublic String getTitle();",
"@AutoEscape\n\tpublic String getTitle();",
"void setTitle(java.lang.String title);",
"public String toString(){\n\t\treturn this.title+\" av \"+this.painter+\", \"+this.year;\n\t\t\n\t}",
"@Override\n public void title()\n {\n }",
"protected abstract String title ();",
"private void createYourListsTitle() {\n\t\tjlYourLists = new JLabel(\"PLAYLISTS\");\t\t\n\t\tjlYourLists.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourLists.setForeground(new Color(250,250,250));\n\t}",
"public void setTitle(java.lang.String title);",
"public String getTitle()\n {\n return bookTitle;\n }",
"@Override\n\tpublic void draw(Graphics2D g) {\n\t\tdrawWhiteField(g);\t\n\t\tgetTitlebar().draw(g, getTitle());\n\t\tdrawBlackBorder(g);\n\t\tdrawControls(g);\n\t}",
"public void prepareTitle()\n {\n DuelTitle title = new DuelTitle();\n addObject(title, 539, 186);\n }",
"public void title ()\n {\n\tprintSlow (\" _ __\");\n\tprintSlow (\" ___ | ' \\\\\");\n\tprintSlow (\" ___ \\\\ / ___ ,'\\\\_ | .-. \\\\ /|\");\n\tprintSlow (\" \\\\ / | |,'__ \\\\ ,'\\\\_ | \\\\ | | | | ,' |_ /|\");\n\tprintSlow (\" _ | | | |\\\\/ \\\\ \\\\ | \\\\ | |\\\\_| _ | |_| | _ '-. .-',' |_ _\");\n\tprintSlow (\" // | | | |____| | | |\\\\_|| |__ // | | ,'_`. | | '-. .-',' `. ,'\\\\_\");\n\tprintSlow (\" \\\\\\\\_| |_,' .-, _ | | | | |\\\\ \\\\ // .| |\\\\_/ | / \\\\ || | | | / |\\\\ \\\\| \\\\\");\n\tprintSlow (\" `-. .-'| |/ / | | | | | | \\\\ \\\\// | | | | | || | | | | |_\\\\ || |\\\\_|\");\n\tprintSlow (\" | | | || \\\\_| | | | /_\\\\ \\\\ / | |` | | | || | | | | .---'| |\");\n\tprintSlow (\" | | | |\\\\___,_\\\\ /_\\\\ _ // | | | \\\\_/ || | | | | | /\\\\| |\");\n\tprintSlow (\" /_\\\\ | | //_____// .||` `._,' | | | | \\\\ `-' /| |\");\n\tprintSlow (\" /_\\\\ `------' \\\\ | AND `.\\\\ | | `._,' /_\\\\\");\n\tprintSlow (\" \\\\| HIS `.\\\\\");\n\tprintSlow (\" __ __ _ _ _ _ \");\n\tprintSlow (\" | \\\\/ | (_) | | /\\\\ | | | | \");\n\tprintSlow (\" | \\\\ / | __ _ __ _ _ ___ __ _| | / \\\\ __| |_ _____ _ __ | |_ _ _ _ __ ___ \");\n\tprintSlow (\" | |\\\\/| |/ _` |/ _` | |/ __/ _` | | / /\\\\ \\\\ / _` \\\\ \\\\ / / _ \\\\ '_ \\\\| __| | | | '__/ _ \\\\\");\n\tprintSlow (\" | | | | (_| | (_| | | (_| (_| | | / ____ \\\\ (_| |\\\\ V / __/ | | | |_| |_| | | | __/\");\n\tprintSlow (\" |_| |_|\\\\__,_|\\\\__, |_|\\\\___\\\\__,_|_| /_/ \\\\_\\\\__,_| \\\\_/ \\\\___|_| |_|\\\\__|\\\\__,_|_| \\\\___|\");\n\tprintSlow (\" __/ | \");\n\tprintSlow (\" |___/ \\n\\n\\n\");\n\n\n }",
"private void displayByTitle() {\n\t\tString titleHolder; // declares titleHolder\n\t\t\n\t\tSystem.out.println(\"Please enter title of the book you would like displayed:\");\n\t\ttitleHolder = scan.next();\n\t\tscan.nextLine();\n\t\tSystem.out.println(inventoryObject.displayByTitle(titleHolder));\n\t\tgetUserInfo();\n\t}",
"void setTitle(String title);",
"void setTitle(String title);",
"void setTitle(String title);",
"void setTitle(String title);",
"void setTitle(String title);",
"public abstract CharSequence getTitle();",
"private Label setTitle() {\r\n Label title = new Label(TITLE);\r\n title.setFont(Font.font(null, FontWeight.BOLD, null, TITLESZE));\r\n return title;\r\n }",
"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}",
"protected abstract void setTitle();",
"@Override\n public void setTitle(String title) throws IOException {\n title = title.replace(\"\\007\", \"\");\n writeOSCSequenceToTerminal((\"2;\" + title + \"\\007\").getBytes());\n }",
"private void drawHorizontalTitle(GC gc) {\n\t\tboolean useStyleRanges = styleRanges != null;\n\n\t\tint width = getSize().x;\n\t\tint textWidth;\n\t\tif (useStyleRanges) {\n\t\t\ttextWidth = textLayout.getBounds().width;\n\t\t} else {\n\t\t\ttextWidth = gc.textExtent(text).x;\n\t\t}\n\n\t\tint x = (int) (width / 2d - textWidth / 2d);\n\t\tif (x < 0) {\n\t\t\t// this happens when window size is too small\n\t\t\tx = 0;\n\t\t}\n\n\t\tif (useStyleRanges) {\n\t\t\ttextLayout.draw(gc, x, 0);\n\t\t} else {\n\t\t\tgc.drawText(text, x, 0, true);\n\t\t}\n\t}",
"public void renderTitle(Output out, Link link) throws IOException;",
"public void setTitle(String title){\n\t\tplot.setTitle(title);\n\t}",
"public void setTitle(String title) { this.title = title; }",
"public void setTitle(String title);",
"public void setTitle(String title);",
"public void setTitle(String title);",
"private String getHistoryTabImgTitle(String title) {\n return \"<span style=\\\"font-family: 'calibri';\\\">\" + Canvas.imgHTML(\"pieces/16/history.png\") + \" \" + title + \"</span>\";\n }",
"public static void drawMain()\n {\n // Draws the title of the program\n UI.setColor(Color.black);\n UI.fillRect(55, 5, 485, 50);\n UI.setColor(Color.white);\n UI.setFontSize(50);\n UI.drawString(\"Movie Recommender\", 60, 50);\n }",
"protected void addTitlePage(Document doc) throws Exception {\n \n \t\tdoc.add(new Paragraph(\"\\n\\n\\n\\n\"));\r\t\t\t\n // data dictionary\n Font font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 22);\n \t\tParagraph prg = new Paragraph(\"Data Dictionary\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n doc.add(new Paragraph(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\"));\n \n // full definition\n font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 14);\n prg = new Paragraph(\"Definition of\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n // dataset name\n font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 26);\n prg = new Paragraph(dsName, font);\n \t\tprg.setAlignment(Element.ALIGN_CENTER);\n \t\tdoc.add(prg);\n \t\t\n \t\t// dataset word\n font = FontFactory.getFont(FontFactory.HELVETICA, 14);\n \t\tprg = new Paragraph(\"dataset\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n \t\tdoc.add(new Paragraph(\"\\n\\n\"));\n \t\t\n \t\t// version\n \t\tprg = new Paragraph();\n \t\tprg.add(new Chunk(\"Version: \", font));\n \t\tprg.add(new Chunk(dsVersion, font));\n \t\tprg.setAlignment(Element.ALIGN_CENTER);\n \t\tdoc.add(prg);\n \t\t\n \t\t// date\n \t\t//prg = new Paragraph(getTitlePageDate());\n \t\t//prg.setAlignment(Element.ALIGN_CENTER);\n \t\t//doc.add(prg);\n \n doc.add(new Paragraph(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"));\n \n // European Environment Agency\n font = FontFactory.getFont(FontFactory.TIMES_BOLD, 12);\n prg = new Paragraph(\"European Environment Agency\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n \n if (!Util.voidStr(logo)){\n Image img = Image.getInstance(logo);\n img.setAlignment(Image.LEFT);\n \n prg.add(new Chunk(img, 0, 0));\n }\n \n doc.add(prg);\n }",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"private void createYourMusicTitle() {\n\t\tjpYourMusic = new JPanel(new GridLayout(1,1));\n\t\tjpYourMusic.setOpaque(false);\n\t\tJLabel jlYourMusic = new JLabel(\"YOUR MUSIC\");\t\t\n\t\tjlYourMusic.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourMusic.setForeground(new Color(250,250,250));\n\t\tjpYourMusic.add(jlYourMusic);\n\t}",
"protected void drawRainbowTitle(Graphics2D g2d, Font font, List<Color> colors, int offsetX, String text)\n {\n g2d.setFont(new Font(font.getName(), Font.PLAIN, 140));\n Color curr = colors.get(0);\n g2d.setColor(curr);\n\n for (int i = 0; i < text.length(); i++)\n {\n g2d.drawString(String.valueOf(text.charAt(i)), 80 * i + offsetX, 200);\n\n if (text.charAt(i) == ' ') continue;\n curr = colors.get((colors.indexOf(curr) + 1) % colors.size());\n g2d.setColor(curr);\n\n }\n }",
"public void makeTitle(JPanel upperPanel) {\n JLabel mainTitleLabel = new JLabel(\" Courses\");\n mainTitleLabel.setIcon(createImageIcon(\"./images/coursesIconWhite.png\"));\n mainTitleLabel.setFont(new Font(\"Proxima Nova\", Font.BOLD, 30));\n mainTitleLabel.setForeground(Color.white);\n mainTitleLabel.setBorder(new EmptyBorder(70, 70, 70, 0));\n upperPanel.add(mainTitleLabel, BorderLayout.CENTER);\n }",
"public void setTitle(String title) {\n\t\tborder.setTitle(title);\n\t}",
"public void show(String title)\r\n {\r\n\tmakeRGBImage().show (title);\r\n }",
"static String title()\n {\n return \"POKEMON DON'T GO\\n\";\n }",
"@Override\n public void title_()\n {\n }",
"public void setTitle(String title) {\r\n this.title = title;\r\n impl.setTitle(getElement(),legend, title);\r\n }",
"@Override\n \tpublic String toString() {\n \t\treturn title;\n \t}",
"@Override\n\tpublic void setTitle(String title) {\n\t\t\n\t}",
"public Paint getColorTitle() {\n return bufColorTitle;\n }",
"public String getTitle()\n {\n return \"Booking Line Items\";\n }",
"public void setTitle(String title){\n this.title = title;\n }",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"@Override\r\n\tpublic void getTitle(String title) {\n\t\t\r\n\t}"
] | [
"0.8098338",
"0.7447182",
"0.69511896",
"0.69349575",
"0.6911711",
"0.6849773",
"0.67735165",
"0.6733104",
"0.67300636",
"0.6720845",
"0.6654049",
"0.6579086",
"0.6536111",
"0.64545614",
"0.64423406",
"0.643985",
"0.6414478",
"0.6413348",
"0.6394679",
"0.632651",
"0.62208045",
"0.6219506",
"0.6192585",
"0.6192585",
"0.6192409",
"0.6181166",
"0.6176455",
"0.6171813",
"0.61471",
"0.6141783",
"0.6123566",
"0.6093618",
"0.60923964",
"0.6091026",
"0.608847",
"0.608847",
"0.6085078",
"0.6078497",
"0.60778046",
"0.6069461",
"0.6047663",
"0.6045253",
"0.60392684",
"0.602311",
"0.6022257",
"0.6019879",
"0.6017457",
"0.6014732",
"0.6014732",
"0.6014732",
"0.6014732",
"0.6014732",
"0.6012566",
"0.60098755",
"0.6006189",
"0.5989182",
"0.5988211",
"0.5984844",
"0.5984194",
"0.5983788",
"0.5978615",
"0.5975251",
"0.5975251",
"0.5975251",
"0.5973796",
"0.5973219",
"0.5967618",
"0.59628296",
"0.59628296",
"0.59628296",
"0.59628296",
"0.59628296",
"0.5961594",
"0.59579784",
"0.5950431",
"0.59499216",
"0.5942306",
"0.59389496",
"0.5928594",
"0.5925788",
"0.5925402",
"0.59243625",
"0.5916843",
"0.5916381",
"0.5914756",
"0.5892077",
"0.5892077",
"0.5892077",
"0.5892077",
"0.5892077",
"0.5892077",
"0.5892077",
"0.5892077",
"0.5892077",
"0.5892077",
"0.5892077",
"0.5892077",
"0.5892077",
"0.5892077",
"0.5892077",
"0.58865476"
] | 0.0 | -1 |
Draw the title of the book | private void drawTitle(int bookRotation, String bookString, Shape book, double bookX, double bookY, int indexBook,
double bookHeight, String bColor, double bookWidth) {
// select the black color for the title
if (bColor.equals("Dark")) {
graphics.setPaint(Color.white);
} else {
graphics.setPaint(Color.black);
}
// draw the title with the same rotation as the book
graphics.rotate(Math.toRadians(+90 + bookRotation), bookX, bookY);
int fontSize = 30;
graphics.setFont(new Font("TimesRoman", Font.PLAIN, fontSize));
// change the size of the title if it is too long
if (graphics.getFontMetrics().stringWidth(bookString) > 6 * bookHeight / 10) {
while (graphics.getFontMetrics().stringWidth(bookString) > 6 * bookHeight / 10) {
fontSize = fontSize - 3;
graphics.setFont(new Font("TimesRoman", Font.PLAIN, fontSize));
}
}
graphics.drawString(bookString,
(float) (bookX + (bookHeight - graphics.getFontMetrics().stringWidth(bookString)) / 2),
(float) (bookY - bookWidth / 4));
graphics.rotate(Math.toRadians(-90 - bookRotation), bookX, bookY);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void drawTitle(){\n titleBox = new Rectangle(155,380, 490, 200);\n titleBorder = new Rectangle(150, 375, 500, 210);\n titleBorder.setFillColor(pink);\n titleBorder.setFilled(true);\n titleBox.setFillColor(Color.BLACK);\n titleBox.setFilled(true);\n title = new Image(206, 400, \"124-hw4/BreakoutText/breakoutText.png\");\n\n canvas.add(titleBorder);\n canvas.add(titleBox);\n canvas.add(title);\n }",
"private void renderTitle() {\n this.row = sheet.createRow(INT_ROW_START);\n //se crea titulos de la tabla\n this.addCell(column_++, \"CODIGO DE BARRAS\", this.cellStyleTitle());\n this.addCell(column_++, \"FECHA\", this.cellStyleTitle());\n this.addCell(column_++, \"HORA\", this.cellStyleTitle());\n this.addCell(column_++, \"MARBETE\", this.cellStyleTitle());\n this.addCell(column_++, \"PRODUCTO\", this.cellStyleTitle());\n this.addCell(column_++, \"DESCRIPCIÓN\", this.cellStyleTitle());\n this.addCell(column_++, \"LOTE\", this.cellStyleTitle());\n this.addCell(column_++, \"PESO\", this.cellStyleTitle());\n this.addCell(column_++, \"RESPONSABLE\", this.cellStyleTitle());\n }",
"public void Title ()\n {\n\tTitle = new Panel ();\n\tTitle.setBackground (Color.white);\n\tchessboard (Title);\n\tp_screen.add (\"1\", Title);\n }",
"protected void drawTitle(Graphics2D g2) {\n //int xloc = leftDisplay + (rightDisplay - leftDisplay)*xCenter/getWidth();\n FontRenderContext frc = g2.getFontRenderContext();\n Font font = new Font(\"Arial\", Font.BOLD, 9);\n String str = dataSet.getGeneRange().getName() + \" Chr\" + dataSet.getChromosome();\n g2.setColor(Singleton.getUserPreferences().getThumbnailTextColor());\n TextLayout tl = new TextLayout(str, font, frc);\n int x = 2;\n int y = 10;\n tl.draw(g2, x, y);\n \n /*for (Model model : viewData.getModels()) {\n System.out.println(\"Rendering with model \" + model.toString() + \"\\thaving #snps: \" + snps.size());*/\n String modelStr = viewData.getModels().get(0).toString();\n //String modelStr = dataSet.getModels().get(0).toString();\n TextLayout modelTl = new TextLayout(modelStr, font, frc);\n int INTER_TITLE_BREAK = 20;\n int modelX = x;\n int modelY = 20;\n if(tl.getBounds().getWidth() + modelTl.getBounds().getWidth() + INTER_TITLE_BREAK < getWidth()) {\n modelY = y;\n modelX = x + (int) Math.round(tl.getBounds().getWidth()) + INTER_TITLE_BREAK;\n }\n modelTl.draw(g2, modelX, modelY);\n }",
"public void printTitle()\n {\n System.out.println(title);\n }",
"public void title(){\n textFont(select,30);\n fill(150);\n text(\"PLANE SELECT\",482,72);\n fill(0);\n text(\"PLANE SELECT\",480,70);\n}",
"private Text createTitle() {\n\t\tText title = new Text(\"S p a c e Y\");\n\t\ttitle.setFont(new Font(\"Minecraftia\", 80));\n\t\ttitle.setStroke(Color.YELLOW);\n\t\ttitle.setStrokeWidth(2);\n\t\ttitle.setStrokeType(StrokeType.OUTSIDE);\n\t\ttitle.getTransforms().add(new Rotate(-50, 300, 200, 20, Rotate.X_AXIS));\n\t\ttitle.setX(canvas.getWidth() / 2);\n\t\ttitle.setY(canvas.getHeight() / 2);\n\t\treturn title;\n\t}",
"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}",
"public static void printTitle( String title )\r\n {\n }",
"public void showTitle(PGraphics pg, float x, float y){\r\n\t\tString title = getTitle();\r\n\t\tpg.pushStyle();\r\n\t\t\r\n\t\tpg.rectMode(PConstants.CORNER);\r\n\t\t\r\n\t\tpg.stroke(110);\r\n\t\tpg.fill(255,255,255);\r\n\t\tpg.rect(x, y + 15, pg.textWidth(title) +6, 18, 5);\r\n\t\t\r\n\t\tpg.textAlign(PConstants.LEFT, PConstants.TOP);\r\n\t\tpg.fill(0);\r\n\t\tpg.text(title, x + 3 , y +18);\r\n\t\t\r\n\t\t\r\n\t\tpg.popStyle();\r\n\t}",
"protected String getBookTitleBlock( String title )\n {\n return \"<bookinfo><title>\" + 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 titleImage(){\r\n\t\tint x = 75;\r\n\t\tint y = 100;\r\n\t\t//Title is displayed\r\n\t\tString title = \"Ticket Master\";\r\n\t\ttitleImage = new GLabel(title,x,y);\r\n\t\ttitleImage.setColor(Color.green);\r\n\t\ttitleImage.setFont(\"Arial-100\");\r\n\t\tcanvas.add(titleImage);\r\n\t}",
"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 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}",
"public static void header(String title){\n byte titlelength = (byte)title.length();\n System.out.println(\"+================================================+\");\n System.out.printf(\"|%-\" + ((48 - titlelength) / 2) + \"s%\" + titlelength + \"s%-\" + ((49 - titlelength) / 2) + \n \"s|\" + EOF, \"\", title.toUpperCase(), \"\");\n System.out.println(\"+================================================+\");\n }",
"TITLE createTITLE();",
"String getTitle(int row, int column);",
"public static void printTitle(int width, String title)\n {\n title = ConsoleForm.getCentered(width, title);\n System.out.printf(\"\\n%s\\n\\n\", title);\n }",
"public void listTitles() {\n for (int i = 0; i < books.length; i++) {\n System.out.println(\"The title of book\" + (i + 1) + \": \" + books[i].getTitle());\n }\n }",
"private Node createTitle() {\n\t\tText titleText = new Text(\" Restaurant Inventory Management \");\n\t\ttitleText.setFont(Font.font(\"Arial\", FontWeight.BOLD, 40));\n\t\ttitleText.setTextAlignment(TextAlignment.CENTER);\n\t\t\n\n\t\treturn titleText;\n\t}",
"@Override\r\n\tpublic void getTitle() {\n\t\t\r\n\t}",
"String title();",
"String title();",
"protected String getChapterTitleBlock( String title )\n {\n return \"<title>\" + title + \"</title>\";\n }",
"IDisplayString getTitle();",
"void showTitle(String title);",
"private Label createTitle() {\n Label titleLbl = new Label(\"Tank Royale\");\n titleLbl.setFont(Font.loadFont(getClass().getResourceAsStream(\"/resources/fonts/ToetheLineless.ttf\"), 50));\n titleLbl.setPrefWidth(400);\n titleLbl.setLayoutX(545 - titleLbl.getWidth() - 157);\n titleLbl.setLayoutY(125);\n return titleLbl;\n }",
"public void roundTitle() {\n lineDivider();\n System.out.println(\"\\n--------------------- R O U N D ---------------------\");\n System.out.println(\"\\t \" + currentRound++ + \" \\n\");\n }",
"private void drawTitleScreen(Graphics g) {\n \t\tg.setColor(new Color(0, 0x66, 0xcc, 150));\n \t\tg.fillRect(0, 60, getWidth(), getHeight() - 120);\n \t\tg.setColor(Color.WHITE);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 30));\n \t\tg.drawString(\"POP UP QUIZ!\", 50, 100);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 18));\n \t\tg.drawString(\"Where you answer questions whilst cleaning your desktop!\",\n \t\t\t\t50, 120);\n \t\tg.drawString(\"Q LAM, V TONG, A VIJAYARAGAVAN\", 50, 140);\n \n \t\tg.drawString(\"Use the arrow keys to move the recycle bin.\", 50, 180);\n \t\tg.drawString(\"<Space> pauses, and <Esc> quits.\", 50, 200);\n \n \t\tg.drawImage(sprites.get(\"junk\"), 4, 200, null);\n \t\tg.drawString(\"Polish your computer by trashing junk falling \"\n \t\t\t\t+ \"from the sky!\", 50, 220);\n \n \t\tg.drawImage(sprites.get(\"sysfileLarge\"), 4, 330, null);\n \t\tg.drawImage(sprites.get(\"sysfileMedium\"), 8, 390, null);\n \t\tg.drawImage(sprites.get(\"sysfileSmall\"), 16, 440, null);\n \t\tg.drawString(\"You'll mess up your computer if you collect system files.\",\n \t\t\t\t50, 360);\n \t\tg.drawString(\"Note that they fall from the sky at different speeds.\",\n \t\t\t\t50, 390);\n \n \t\tg.drawString(\"The CPU gauge will tell you how well you're doing!\",\n \t\t\t\t50, 420);\n \t\tg.drawString(\"If your CPU usage goes over 100%, your computer goes kaput\"\n \t\t\t\t+ \" and you lose! How long can you clean?\", 50, 450);\n \n \t\tg.drawString(\"By the way, you'll have to answer questions from a barrage\"\n \t\t\t\t+ \" of pop-up as you do this.\", 50, 500);\n \t\tg.drawString(\"Serves you right for not being clean!!!\", 50, 530);\n \n \t\tg.drawString(\"PUSH START TO BEGIN_\", 50, 600);\n \t}",
"public String getPrintTitle();",
"@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 static void printTitle(int year, int month) {\n System.out.println(\" Sun Mon Tue Wed Thu Fri Sat\");//output the title for each month of the year\n }",
"@AutoEscape\n\tpublic String getTitle();",
"@AutoEscape\n\tpublic String getTitle();",
"void setTitle(java.lang.String title);",
"@Override\n public void title()\n {\n }",
"public String toString(){\n\t\treturn this.title+\" av \"+this.painter+\", \"+this.year;\n\t\t\n\t}",
"protected abstract String title ();",
"public void setTitle(java.lang.String title);",
"private void createYourListsTitle() {\n\t\tjlYourLists = new JLabel(\"PLAYLISTS\");\t\t\n\t\tjlYourLists.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourLists.setForeground(new Color(250,250,250));\n\t}",
"public String getTitle()\n {\n return bookTitle;\n }",
"@Override\n\tpublic void draw(Graphics2D g) {\n\t\tdrawWhiteField(g);\t\n\t\tgetTitlebar().draw(g, getTitle());\n\t\tdrawBlackBorder(g);\n\t\tdrawControls(g);\n\t}",
"public void prepareTitle()\n {\n DuelTitle title = new DuelTitle();\n addObject(title, 539, 186);\n }",
"public void title ()\n {\n\tprintSlow (\" _ __\");\n\tprintSlow (\" ___ | ' \\\\\");\n\tprintSlow (\" ___ \\\\ / ___ ,'\\\\_ | .-. \\\\ /|\");\n\tprintSlow (\" \\\\ / | |,'__ \\\\ ,'\\\\_ | \\\\ | | | | ,' |_ /|\");\n\tprintSlow (\" _ | | | |\\\\/ \\\\ \\\\ | \\\\ | |\\\\_| _ | |_| | _ '-. .-',' |_ _\");\n\tprintSlow (\" // | | | |____| | | |\\\\_|| |__ // | | ,'_`. | | '-. .-',' `. ,'\\\\_\");\n\tprintSlow (\" \\\\\\\\_| |_,' .-, _ | | | | |\\\\ \\\\ // .| |\\\\_/ | / \\\\ || | | | / |\\\\ \\\\| \\\\\");\n\tprintSlow (\" `-. .-'| |/ / | | | | | | \\\\ \\\\// | | | | | || | | | | |_\\\\ || |\\\\_|\");\n\tprintSlow (\" | | | || \\\\_| | | | /_\\\\ \\\\ / | |` | | | || | | | | .---'| |\");\n\tprintSlow (\" | | | |\\\\___,_\\\\ /_\\\\ _ // | | | \\\\_/ || | | | | | /\\\\| |\");\n\tprintSlow (\" /_\\\\ | | //_____// .||` `._,' | | | | \\\\ `-' /| |\");\n\tprintSlow (\" /_\\\\ `------' \\\\ | AND `.\\\\ | | `._,' /_\\\\\");\n\tprintSlow (\" \\\\| HIS `.\\\\\");\n\tprintSlow (\" __ __ _ _ _ _ \");\n\tprintSlow (\" | \\\\/ | (_) | | /\\\\ | | | | \");\n\tprintSlow (\" | \\\\ / | __ _ __ _ _ ___ __ _| | / \\\\ __| |_ _____ _ __ | |_ _ _ _ __ ___ \");\n\tprintSlow (\" | |\\\\/| |/ _` |/ _` | |/ __/ _` | | / /\\\\ \\\\ / _` \\\\ \\\\ / / _ \\\\ '_ \\\\| __| | | | '__/ _ \\\\\");\n\tprintSlow (\" | | | | (_| | (_| | | (_| (_| | | / ____ \\\\ (_| |\\\\ V / __/ | | | |_| |_| | | | __/\");\n\tprintSlow (\" |_| |_|\\\\__,_|\\\\__, |_|\\\\___\\\\__,_|_| /_/ \\\\_\\\\__,_| \\\\_/ \\\\___|_| |_|\\\\__|\\\\__,_|_| \\\\___|\");\n\tprintSlow (\" __/ | \");\n\tprintSlow (\" |___/ \\n\\n\\n\");\n\n\n }",
"private void displayByTitle() {\n\t\tString titleHolder; // declares titleHolder\n\t\t\n\t\tSystem.out.println(\"Please enter title of the book you would like displayed:\");\n\t\ttitleHolder = scan.next();\n\t\tscan.nextLine();\n\t\tSystem.out.println(inventoryObject.displayByTitle(titleHolder));\n\t\tgetUserInfo();\n\t}",
"void setTitle(String title);",
"void setTitle(String title);",
"void setTitle(String title);",
"void setTitle(String title);",
"void setTitle(String title);",
"public abstract CharSequence getTitle();",
"private Label setTitle() {\r\n Label title = new Label(TITLE);\r\n title.setFont(Font.font(null, FontWeight.BOLD, null, TITLESZE));\r\n return title;\r\n }",
"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}",
"protected abstract void setTitle();",
"@Override\n public void setTitle(String title) throws IOException {\n title = title.replace(\"\\007\", \"\");\n writeOSCSequenceToTerminal((\"2;\" + title + \"\\007\").getBytes());\n }",
"private void drawHorizontalTitle(GC gc) {\n\t\tboolean useStyleRanges = styleRanges != null;\n\n\t\tint width = getSize().x;\n\t\tint textWidth;\n\t\tif (useStyleRanges) {\n\t\t\ttextWidth = textLayout.getBounds().width;\n\t\t} else {\n\t\t\ttextWidth = gc.textExtent(text).x;\n\t\t}\n\n\t\tint x = (int) (width / 2d - textWidth / 2d);\n\t\tif (x < 0) {\n\t\t\t// this happens when window size is too small\n\t\t\tx = 0;\n\t\t}\n\n\t\tif (useStyleRanges) {\n\t\t\ttextLayout.draw(gc, x, 0);\n\t\t} else {\n\t\t\tgc.drawText(text, x, 0, true);\n\t\t}\n\t}",
"public void renderTitle(Output out, Link link) throws IOException;",
"public void setTitle(String title){\n\t\tplot.setTitle(title);\n\t}",
"public void setTitle(String title) { this.title = title; }",
"public void setTitle(String title);",
"public void setTitle(String title);",
"public void setTitle(String title);",
"private String getHistoryTabImgTitle(String title) {\n return \"<span style=\\\"font-family: 'calibri';\\\">\" + Canvas.imgHTML(\"pieces/16/history.png\") + \" \" + title + \"</span>\";\n }",
"public static void drawMain()\n {\n // Draws the title of the program\n UI.setColor(Color.black);\n UI.fillRect(55, 5, 485, 50);\n UI.setColor(Color.white);\n UI.setFontSize(50);\n UI.drawString(\"Movie Recommender\", 60, 50);\n }",
"protected void addTitlePage(Document doc) throws Exception {\n \n \t\tdoc.add(new Paragraph(\"\\n\\n\\n\\n\"));\r\t\t\t\n // data dictionary\n Font font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 22);\n \t\tParagraph prg = new Paragraph(\"Data Dictionary\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n doc.add(new Paragraph(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\"));\n \n // full definition\n font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 14);\n prg = new Paragraph(\"Definition of\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n // dataset name\n font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 26);\n prg = new Paragraph(dsName, font);\n \t\tprg.setAlignment(Element.ALIGN_CENTER);\n \t\tdoc.add(prg);\n \t\t\n \t\t// dataset word\n font = FontFactory.getFont(FontFactory.HELVETICA, 14);\n \t\tprg = new Paragraph(\"dataset\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n \t\tdoc.add(new Paragraph(\"\\n\\n\"));\n \t\t\n \t\t// version\n \t\tprg = new Paragraph();\n \t\tprg.add(new Chunk(\"Version: \", font));\n \t\tprg.add(new Chunk(dsVersion, font));\n \t\tprg.setAlignment(Element.ALIGN_CENTER);\n \t\tdoc.add(prg);\n \t\t\n \t\t// date\n \t\t//prg = new Paragraph(getTitlePageDate());\n \t\t//prg.setAlignment(Element.ALIGN_CENTER);\n \t\t//doc.add(prg);\n \n doc.add(new Paragraph(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"));\n \n // European Environment Agency\n font = FontFactory.getFont(FontFactory.TIMES_BOLD, 12);\n prg = new Paragraph(\"European Environment Agency\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n \n if (!Util.voidStr(logo)){\n Image img = Image.getInstance(logo);\n img.setAlignment(Image.LEFT);\n \n prg.add(new Chunk(img, 0, 0));\n }\n \n doc.add(prg);\n }",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"private void createYourMusicTitle() {\n\t\tjpYourMusic = new JPanel(new GridLayout(1,1));\n\t\tjpYourMusic.setOpaque(false);\n\t\tJLabel jlYourMusic = new JLabel(\"YOUR MUSIC\");\t\t\n\t\tjlYourMusic.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourMusic.setForeground(new Color(250,250,250));\n\t\tjpYourMusic.add(jlYourMusic);\n\t}",
"protected void drawRainbowTitle(Graphics2D g2d, Font font, List<Color> colors, int offsetX, String text)\n {\n g2d.setFont(new Font(font.getName(), Font.PLAIN, 140));\n Color curr = colors.get(0);\n g2d.setColor(curr);\n\n for (int i = 0; i < text.length(); i++)\n {\n g2d.drawString(String.valueOf(text.charAt(i)), 80 * i + offsetX, 200);\n\n if (text.charAt(i) == ' ') continue;\n curr = colors.get((colors.indexOf(curr) + 1) % colors.size());\n g2d.setColor(curr);\n\n }\n }",
"public void makeTitle(JPanel upperPanel) {\n JLabel mainTitleLabel = new JLabel(\" Courses\");\n mainTitleLabel.setIcon(createImageIcon(\"./images/coursesIconWhite.png\"));\n mainTitleLabel.setFont(new Font(\"Proxima Nova\", Font.BOLD, 30));\n mainTitleLabel.setForeground(Color.white);\n mainTitleLabel.setBorder(new EmptyBorder(70, 70, 70, 0));\n upperPanel.add(mainTitleLabel, BorderLayout.CENTER);\n }",
"public void setTitle(String title) {\n\t\tborder.setTitle(title);\n\t}",
"public void show(String title)\r\n {\r\n\tmakeRGBImage().show (title);\r\n }",
"static String title()\n {\n return \"POKEMON DON'T GO\\n\";\n }",
"@Override\n public void title_()\n {\n }",
"public void setTitle(String title) {\r\n this.title = title;\r\n impl.setTitle(getElement(),legend, title);\r\n }",
"@Override\n \tpublic String toString() {\n \t\treturn title;\n \t}",
"@Override\n\tpublic void setTitle(String title) {\n\t\t\n\t}",
"public String getTitle()\n {\n return \"Booking Line Items\";\n }",
"public Paint getColorTitle() {\n return bufColorTitle;\n }",
"public void setTitle(String title){\n this.title = title;\n }",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"String getTitle();",
"@Override\r\n\tpublic void getTitle(String title) {\n\t\t\r\n\t}"
] | [
"0.74464285",
"0.69507116",
"0.6935365",
"0.69120705",
"0.68513364",
"0.67731327",
"0.6732417",
"0.67307836",
"0.6722624",
"0.6654509",
"0.6579786",
"0.65368956",
"0.6454025",
"0.64426255",
"0.6439923",
"0.641581",
"0.64136696",
"0.63959754",
"0.6327954",
"0.62221384",
"0.62200564",
"0.6194103",
"0.6194028",
"0.6194028",
"0.61814094",
"0.6178724",
"0.61736906",
"0.6147344",
"0.6142736",
"0.6123744",
"0.60955244",
"0.6093577",
"0.609208",
"0.60901064",
"0.60901064",
"0.6086358",
"0.6079119",
"0.60790336",
"0.60704064",
"0.6046521",
"0.60465",
"0.60410446",
"0.6022931",
"0.60225725",
"0.6020624",
"0.601946",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.6014272",
"0.6010598",
"0.60060066",
"0.5990585",
"0.5989092",
"0.59853196",
"0.59845537",
"0.5984318",
"0.59798396",
"0.5976492",
"0.5976492",
"0.5976492",
"0.597399",
"0.59731764",
"0.59683067",
"0.59646946",
"0.59646946",
"0.59646946",
"0.59646946",
"0.59646946",
"0.5960241",
"0.59576297",
"0.59504914",
"0.59503484",
"0.5942839",
"0.594029",
"0.5930218",
"0.592675",
"0.59260863",
"0.59255546",
"0.591717",
"0.5916756",
"0.591592",
"0.589385",
"0.589385",
"0.589385",
"0.589385",
"0.589385",
"0.589385",
"0.589385",
"0.589385",
"0.589385",
"0.589385",
"0.589385",
"0.589385",
"0.589385",
"0.589385",
"0.589385",
"0.5887966"
] | 0.80989575 | 0 |
get the cos of the angle by getting the degree in radian | private double getCos(int rot) {
return Math.cos(Math.toRadians(rot));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double cos(double number);",
"public double cosAngle(Vector3 other) {\n\t\tif (isZeroVector(this) || isZeroVector(other)) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn dot(other) / (norm() * other.norm());\n\t}",
"double cosTheta();",
"@Test\n\tvoid cosTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 60;\n\t\tdouble actual = 0.5000000000000001;\n\t\tdouble result = TrigLib.cosine(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}",
"public T cos(T value);",
"public static double cos(double x)\n {\n int n=(int)(x/PI2)+1;\n if(n<1)n=n-1;\n x=x-(n&0xFFFFFFFE)*PI2; // reduce to the 4th and 1st quadrants\n\n double x2=x*x;\n\n float si=1f;\n if ((n&2)!=0) si=-1f; // if it from the 2nd or the 3rd quadrants\n return si*(0.9457092528f+(-0.4305320537f+0.1914993010e-1f*x2)*x2)/(0.9457093212f+(0.4232119630e-1f+0.9106317690e-3f*x2)*x2);\n }",
"public final static float COSSafer(float deg) {\n\t\tdeg=deg%360;\n\t\tif(deg<0) deg+=360;\n\n\t\tdeg*=SINCOS_INVPREC;\n\t\treturn cosLUT[(int)deg];\n\t}",
"public static double findCos(double radiun) {\r\n\t\treturn Math.cos(radiun);\r\n\t}",
"public final static float COS(float deg) {\n\t\tdeg*=SINCOS_INVPREC;\n\t\treturn cosLUT[(int)deg];\n\t}",
"public static float cos(float x) {\n float upper = PI * PI - 4f * x * x;\n float lower = PI * PI + x * x;\n return upper / lower;\n }",
"public static float acos(float x) {\n \t\tfloat f=asin(x);\n \t\tif(f==Float.NaN)\n \t\t\treturn f;\n \t\treturn PiDiv2-f;\n \t}",
"protected static final double acos(double c) {\n\t\t// case where c is a bit more than 1\n\t\tif (DoubleUtil.isEqual(c, 1) && c > 1) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t// case where c is a bit less than -1\n\t\tif (DoubleUtil.isEqual(c, -1) && c < -1) {\n\t\t\treturn Math.PI;\n\t\t}\n\n\t\treturn Math.acos(c);\n\t}",
"@Test\n\tvoid cosTestWithConvertingToRadians() throws CustomException {\n\t\tdouble input = 60;\n\t\tdouble actual = 0.5000000000000001;\n\t\tdouble result1 = TrigLib.toRadians(input);\n\t\tdouble result = TrigLib.cosine(result1);\n\t\tassertEquals(result, actual, \"Output is as expected as input is converted to radians\");\n\t}",
"public final void cos() {\n\t\tif (size > 0) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tpush(Math.cos(topMostValue));\n\t\t}\n\t}",
"E cos(final E n);",
"@Test\n\tvoid cosTestWithRadiansInput() throws CustomException {\n\t\tdouble input = 1.0471975511965976;\n\t\tdouble actual = 0.5000000000000001;\n\t\tdouble result = TrigLib.cosine(input);\n\t\tassertEquals(result, actual, \"Output is as expected as input is in radians\");\n\t}",
"public static double acos(double d){\n\t\tif (d <= -1)\n\t\t\treturn Math.PI;\n\t\telse if (d >= 1)\n\t\t\treturn 0;\n\t\treturn Math.acos(d);\n\t}",
"public double calculateArcSine(double angle);",
"E acos(final E n);",
"public double calculate(double val) {\n double cosinus = Math.toRadians(val);\n return Math.cos(cosinus);\n }",
"public static Expression cos(final Expression value) {\n return new Expression(\"$cos\", value);\n }",
"private double getStereoAngleCosine(Conformer conformer, double[] n, int atom0, int atom) {\n\t\t// calculate the three vectors leading from atom[0] to the other three atoms\n\t\tdouble[] v = new double[3];\n\t\tv[0] = conformer.getX(atom) - conformer.getX(atom0);\n\t\tv[1] = conformer.getY(atom) - conformer.getY(atom0);\n\t\tv[2] = conformer.getZ(atom) - conformer.getZ(atom0);\n\n\t\t// calculate cos(angle) of coords[2] to normal vector\n\t\treturn (v[0]*n[0]+v[1]*n[1]+v[2]*n[2]) / Math.sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);\n\t\t}",
"EDataType getAngleDegrees();",
"double getAngle();",
"double getAngle();",
"public static Expression acos(final Expression value) {\n return new Expression(\"$acos\", value);\n }",
"public double calculateArcSine(double angle, String angleType);",
"public Cos(Expression expression) {\n super(\"cos(%s)\", expression);\n }",
"public double getAngle() {\n return Math.atan2(sinTheta, cosTheta);\n }",
"public static double myCos(double x) {\n int n = 0;\n int N = 20;\n double y = 0;\n for (; n <= N; n++) {\n double p1 = 1;\n for (int i = 1; i <= n; i++) {\n p1 *= (-1);\n }\n double p2 = 1;\n for (int i = 1; i <= (2 * n); i++){\n p2*=i;\n }\n double p3 = 1;\n for (int i = 1; i <= (2 * n); i++){\n p3*=x;\n }\n y = y + (p1/p2)*p3;\n }\n return y;\n }",
"public double getAngle();",
"public double evaluate() throws Exception {\n if (super.getExpression().evaluate() % 180 == 90) {\n return 0;\n }\n if (super.getExpression().evaluate() % 360 == 180) {\n return -1;\n }\n if (super.getExpression().evaluate() % 360 == 0) {\n return 1;\n }\n return Math.cos(Math.toRadians(super.getExpression().evaluate()));\n }",
"public float getXAngle(){\n Point project=new Point(0,accel.y,accel.z);\n\n float angl=(float)Math.asin(project.y / project.module())* PreferenceHelper.sensetivity;\n //float angl=(float)Math.acos(accel.z/accel.module())*100f;\n if(Float.isNaN(angl)) angl=0.5f;\n return (float)(Math.rint( toFlowX(angl)/1.0) * 1.0);\n }",
"public double getHeadingInDegrees(){\r\n double headingRadians = calculateHeadingRadians();\r\n return headingRadians * 180 / Math.PI;\r\n }",
"public static double conicalAngle(double angle) \r\n {\r\n return (angle < 0.0 ? 2.0 * Math.PI + angle % (2.0 * Math.PI) : angle) % (2.0 * Math.PI);\r\n }",
"public static double toRadians(double degree) {\n\t\treturn (degree * 3.14159) / 180;\r\n\t\t\r\n\t}",
"public String toString() {\n return this.strPrint(\"cos(\");\n }",
"public double getCircunference(){\n return 2.0 * radius * Math.PI; \n }",
"protected void calculateTotalDegrees() {\r\n\t\tmTotalCircleDegrees = (360f - (mStartAngle - mEndAngle)) % 360f; // Length of the entire circle/arc\r\n\t\tif (mTotalCircleDegrees <= 0f) {\r\n\t\t\tmTotalCircleDegrees = 360f;\r\n\t\t}\r\n\t}",
"public double calculateSine(double angle);",
"private static double calculateCos(double dx, double distance) {\n if (distance > 0)\n return (dx) / distance;\n else\n return 0.0;\n }",
"public int getDegrees() {\n\t\treturn (int) (value * (180.0d / Math.PI));\n\t}",
"private double getAngle() {\n double normal= Math.sqrt(((getgAxis(ADXL345_I2C.Axes.kX))*(getgAxis(ADXL345_I2C.Axes.kX)))+((getgAxis(ADXL345_I2C.Axes.kY))*(getgAxis(ADXL345_I2C.Axes.kY))));\n\n return MathUtils.atan(normal / getgAxis(ADXL345_I2C.Axes.kZ));\n }",
"public double radians() {\n return Math.toRadians(this.degrees);\n }",
"public static double degreeToRadians(double num) { return (num*0.0174533); }",
"private static double getSinOfDegrees(double d, int halfCirc) {\n\t\treturn Math.sin((d * Math.PI) / halfCirc);\n\t}",
"public float calculateCelestialAngle(long par1, float par3)\n {\n return 0.5F;\n }",
"public static float map180to360(float angle) {\n return (angle + 360) % 360;\n }",
"public static double acos_safe(double x) {\n return Math.acos(Util.max(-1.0,Util.min(x,1.0)));\n }",
"public static double reduce360Degrees(double degrees){\n return degrees % 360;\n }",
"public static double toDegrees(double radian1) {\n\t\treturn (radian1 * 180) / 3.14159;\r\n\t\t\r\n\t}",
"public static Expression radiansToDegrees(final Expression value) {\n return new Expression(\"$radiansToDegrees\", value);\n }",
"public static Matrix cos(Matrix matrix)\n {\n int row = matrix.getRowDimension(), col = matrix.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double[][] C = X.getArray();\n double[][] M = matrix.getArray();\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n C[i][j] = Math.cos(M[i][j]);\n }\n }\n return X;\n }",
"public double getRadians() {\r\n return degreeNum * (Math.PI / 180.0);\r\n }",
"public static Matrix acos(Matrix matrix)\n {\n double[][] M = matrix.getArray();\n int row = matrix.getRowDimension(), col = matrix.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double[][] C = X.getArray();\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n if (M[i][j] <= 1.0 || M[i][j] >= -1.0)\n {\n C[i][j] = Math.acos(M[i][j]);\n }\n else\n {\n C[i][j] = Double.NaN;\n }\n }\n }\n return X;\n }",
"private static double rad(double deg) {\n return deg*Math.PI/180;\n }",
"public double getAngle() {\n\t\treturn 180 * (this.N - 2) / this.N;\n\t}",
"private static double radToDeg(float rad)\r\n/* 30: */ {\r\n/* 31:39 */ return rad * 180.0F / 3.141592653589793D;\r\n/* 32: */ }",
"public double getCircumference()\r\n\t{\r\n\t\tdouble cir = 2*Math.PI*radius;\r\n\t\treturn cir;\r\n\t}",
"public static double to_360(double deg) {\n return modulo(deg,360);\n }",
"private double calculaPerimetro(){\r\n double perimetro;\r\n perimetro=(float) ((2*(cir.getY()-cir.getX()))*Math.PI);\r\n return perimetro;\r\n }",
"private static double ArcTan(double x) // Using a Chebyshev-Pade approximation\n {\n double x2=x*x;\n return (0.7162721433f+0.2996857769f*x2)*x/(0.7163164576f+(0.5377299313f+0.3951620469e-1f*x2)*x2);\n }",
"public double getAngle() {\n\t\treturn Math.atan2(imaginary, real);\n\t}",
"public double getAngle () {\n return super.getAngle() % 360D;\n }",
"public float calculateCelestialAngle(long par1, float par3) {\n\t\treturn 0.0F;\n\t}",
"private double degToRadian(double angle)\n\t{\n\t\treturn angle/180*Math.PI;\n\t}",
"public double getXDirection() {\r\n return Math.cos(Math.toRadians(angle));\r\n }",
"public static float toDegrees(float radians) {\n float result = radians * FastMath.RAD_TO_DEG;\n return result;\n }",
"public double circumference() {\r\n\t\treturn 2 * PI * radius;\r\n\t}",
"public double getAngle() {\n try {\n switch(Coordinates.angleUnit()) {\n case Coordinates.RADIAN:\n\treturn Double.parseDouble(deg.getText().trim());\n case Coordinates.DEGRE:\n\treturn Math.PI * Double.parseDouble(deg.getText().trim()) / 180.0;\n case Coordinates.DEGMN:\n\tString d = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tString m = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\");\n case Coordinates.DEGMNSEC:\n\td = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tm = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\tString s = sec.getText().trim();\n\tif(s.length() == 0)\n\t s = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\" + s + \"\\\"\");\n }\n }\n catch(NumberFormatException e) {\n }\n return 0.0;\n }",
"public double calculateArcSine(double oppositeSide, double hypotenuseSide, String angleType);",
"public static double radiansToDegrees(double radians) {\n double degrees = radians % (2 * Math.PI);\n return degrees * 180 / Math.PI;\n }",
"public static float cosine(float a, float b, float x) {\n float ft = x * (float) Math.PI;\n float f = (1.0f - (float) Math.cos(ft)) * 0.5f;\n\n return a*(1-f) + b*f;\n }",
"static public double cosine(double complete) {\n\t\treturn Math.cos(Math.PI * (1 + complete)) / 2 + 1 / 2.0;\n\t}",
"public double getAngle() {\n\t\tdouble angle = Math.atan2(imaginary, real);\n\t\tangle = fixNegativeAngle(angle);\n\n\t\treturn angle;\n\t}",
"public double getAngle() { return angle; }",
"private static double degToRad(float deg)\r\n/* 25: */ {\r\n/* 26:32 */ return deg * 3.141592653589793D / 180.0D;\r\n/* 27: */ }",
"private double getSin(int rot) {\r\n\t\treturn Math.sin(Math.toRadians(rot));\r\n\t}",
"public static float rad2deg(float rad) {return rad/D2R;}",
"private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}",
"public float getAngle() {\n return angle;\n }",
"@Test\n\tvoid toRadiansConversionTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 180;\n\t\tdouble actual = 3.141592653589793;\n\t\tdouble result = TrigLib.sine(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}",
"float calcRotate(float rotateDeg, float anglePerIn)\n {\n return rotateDeg / anglePerIn;\n }",
"private int getAngle(int amountOfCars) {\n\t\tint total = model.getNumberOfFloors() * model.getNumberOfRows() * model.getNumberOfPlaces();\n\t\tdouble angle = 1.0 * (double) amountOfCars / (double) total * 360.0;\n\t\treturn (int) angle;\n\t}",
"private double rad2deg(double rad) {\r\n return (rad * 180.0 / Math.PI);\r\n }",
"public int getAngle() {\r\n return angle;\r\n }",
"public double getCircumference()\n\t{\n\t\tdouble circumference = 2 * Math.PI * radius;\n\t\treturn circumference;\n\t}",
"double getAngle(int id);",
"public void setAngle(float angle) {\n this.angle = angle;\n cosAngle = (float) Math.cos(angle);\n sinAngle = 1 - cosAngle * cosAngle;\n }",
"@Override\n\tpublic float calculateCelestialAngle(long par1, float par3) {\n\t\treturn 2.0F;\n\t}",
"public double getTheta()\n\t{\n\t\treturn Math.toRadians(theta);\n\t}",
"public double getAngle() {\n if (r == 0) {\n if (i == 0)\n return 0;// error?\n if (i > 0)\n return p2;\n else\n return -p2;\n }\n double d = Math.atan(i / r);\n if (r >= 0) {\n return d;\n }\n if (i >= 0)\n return Math.PI + d;\n return d + Math.PI;\n }",
"public static double findRadiun(int degree) {\r\n\t\treturn Math.toRadians(degree);\r\n\t}",
"private double rad2deg(double rad) {\n return (rad * 180 / Math.PI);\n }",
"Angle createAngle();",
"public static float headingToArc(float pHeading, boolean pTurnRight){\n pHeading %= 360;\n pHeading = pHeading < 0 ? 360 + pHeading : pHeading;\n pHeading = 360 - pHeading;\n pHeading = pTurnRight ? pHeading - 90 : pHeading + 90;\n return pHeading;\n }",
"private double rad2deg(double rad) {\r\n\t\t\treturn (rad * 180 / Math.PI);\r\n\t\t}",
"private double rad2deg(double rad) {\r\n return (rad * 180.0 / Math.PI);\r\n }",
"public float getAngleForPoint(float x, float y) {\n /* 262 */\n MPPointF c = getCenterOffsets();\n /* */\n /* 264 */\n double tx = (x - c.x), ty = (y - c.y);\n /* 265 */\n double length = Math.sqrt(tx * tx + ty * ty);\n /* 266 */\n double r = Math.acos(ty / length);\n /* */\n /* 268 */\n float angle = (float) Math.toDegrees(r);\n /* */\n /* 270 */\n if (x > c.x) {\n /* 271 */\n angle = 360.0F - angle;\n /* */\n }\n /* */\n /* 274 */\n angle += 90.0F;\n /* */\n /* */\n /* 277 */\n if (angle > 360.0F) {\n /* 278 */\n angle -= 360.0F;\n /* */\n }\n /* 280 */\n MPPointF.recycleInstance(c);\n /* */\n /* 282 */\n return angle;\n /* */\n }",
"public float getAngle() {\n return angle;\n }"
] | [
"0.7698447",
"0.75015265",
"0.7317558",
"0.7160754",
"0.7122437",
"0.7090763",
"0.7042727",
"0.69399256",
"0.6933242",
"0.6928064",
"0.69235593",
"0.6875221",
"0.681981",
"0.6819066",
"0.67443347",
"0.6708625",
"0.6698392",
"0.66300064",
"0.6609953",
"0.659785",
"0.658607",
"0.64707863",
"0.6379213",
"0.6336691",
"0.6336691",
"0.6321318",
"0.6288872",
"0.62772185",
"0.62203443",
"0.62068534",
"0.6175162",
"0.61750853",
"0.61295176",
"0.6113993",
"0.61062807",
"0.60925686",
"0.60768604",
"0.5988548",
"0.597987",
"0.5979777",
"0.5967684",
"0.5943563",
"0.5919915",
"0.591846",
"0.59173924",
"0.5913613",
"0.59099734",
"0.5908776",
"0.5880088",
"0.5879034",
"0.58727103",
"0.5868266",
"0.5854752",
"0.5853714",
"0.58315337",
"0.58102465",
"0.5808112",
"0.5807837",
"0.5798824",
"0.5793681",
"0.57814914",
"0.57718277",
"0.5758326",
"0.5740172",
"0.5719078",
"0.57016927",
"0.5699907",
"0.56955767",
"0.5694375",
"0.5694261",
"0.5689963",
"0.5688551",
"0.5671676",
"0.5662358",
"0.56526166",
"0.56514424",
"0.56513596",
"0.5646415",
"0.5637752",
"0.5633302",
"0.5633243",
"0.56289274",
"0.56281185",
"0.56218535",
"0.56213135",
"0.5608041",
"0.5607233",
"0.5595573",
"0.5593558",
"0.55920625",
"0.55904174",
"0.5586989",
"0.55837315",
"0.558103",
"0.55633056",
"0.5554665",
"0.5553037",
"0.55511415",
"0.5547477",
"0.5539377"
] | 0.7660944 | 1 |
Generate the borders of the library. | private List<Shape> getEdges(int dimCanvasX, int dimCanvasY, int thinknessEdges) {
List<Shape> res = new ArrayList<>();
Shape left = new Rectangle(0, 0, thinknessEdges, dimCanvasY);
Shape right = new Rectangle(dimCanvasX - thinknessEdges, 0, thinknessEdges, dimCanvasY);
Shape top = new Rectangle(0, 0, dimCanvasX, thinknessEdges);
Shape bot = new Rectangle(0, dimCanvasY - thinknessEdges, dimCanvasX, thinknessEdges);
res.add(top);
res.add(bot);
res.add(right);
res.add(left);
return res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createCanvasBorders() {\n\n\t\tLabel lblBorderMiddle = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderMiddle.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\t\tlblBorderMiddle.setBounds(0, 72, 285, 2);\n\n\t\tLabel lblBorderBottom = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderBottom.setBounds(0, 198, 285, 2);\n\t\tlblBorderBottom.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\n\t\tLabel lblBorderLeft = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderLeft.setBounds(0, 0, 2, 200);\n\t\tlblBorderLeft.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\n\t\tLabel lblBorderRight = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderRight.setBounds(283, 0, 2, 200);\n\t\tlblBorderRight.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\n\t\tLabel lblBorderTop = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderTop.setBounds(0, 0, 285, 2);\n\t\tlblBorderTop.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\t}",
"Border createBorder();",
"public void resetBorders(){\n for (int i = 0; i * 25 < width + 40; i++) {\n if (i == 0) {\n topborder.add(new TopBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25, 0, 10));\n } else {\n topborder.add(new TopBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25, 0, topborder.get(i - 1).getHeight() + 1));\n }\n }\n\n\n for (int i = 0; i * 25 < width + 40; i++) {\n if (i == 0) {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25,height-minBorderHeight));\n } else {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25, botborder.get(i - 1).getY() - 1));\n }\n }\n }",
"public void createScreenBorders() {\n // set the screen's borders.\n this.upper = 0;\n this.lower = 600;\n this.left = 0;\n this.right = 800;\n }",
"private void renderBorder() {\n\t\trenderHorizontalLine(0, BORDER_SIGN_HORIZONTAL);\n\t\trenderHorizontalLine(this.output.length - 1, BORDER_SIGN_HORIZONTAL);\n\t\trenderVerticalLine(0, BORDER_SIGN_VERTICAL);\n\t\trenderVerticalLine(this.output[0].length - 1, BORDER_SIGN_VERTICAL);\n\n\t\tthis.output[0][0] = BORDER_SIGN_EDGE;\n\t\tthis.output[0][this.output[0].length - 1] = BORDER_SIGN_EDGE;\n\t\tthis.output[this.output.length - 1][0] = BORDER_SIGN_EDGE;\n\t\tthis.output[this.output.length - 1][this.output[0].length - 1] = BORDER_SIGN_EDGE;\n\t}",
"private void createBorders() {\r\n // Upper border rectangle\r\n Rectangle topRecFrame = new Rectangle(new Point(0, 0), WITH, SIZE + 20);\r\n // Left border rectangle\r\n Rectangle leftRecFrame = new Rectangle(new Point(0, SIZE + 21), SIZE, HEIGHT);\r\n // Right border rectangle\r\n Rectangle rightRecFrame = new Rectangle(new Point(WITH - SIZE, SIZE + 21), SIZE, HEIGHT);\r\n // Rectangle for block on top of upper block for the score\r\n Rectangle topRecScore = new Rectangle(new Point(0, 0), WITH, 20);\r\n Block topScore = new Block(topRecScore, Color.LIGHT_GRAY, 0);\r\n Block topFrame = new Block(topRecFrame, Color.GRAY, 0);\r\n Block leftFrame = new Block(leftRecFrame, Color.gray, 0);\r\n Block rightFrame = new Block(rightRecFrame, Color.gray, 0);\r\n topFrame.addToGame(this);\r\n leftFrame.addToGame(this);\r\n rightFrame.addToGame(this);\r\n topScore.addToGame(this);\r\n\r\n }",
"private void generateBorder() {\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\tif (x == 0 || y == 0 || x == width - 1 || y == height - 1) {\n\t\t\t\t\ttiles[x + y * width] = Tile.darkGrass;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private List<String> extractBorders ()\n {\n List<String> borders = new ArrayList<String> ();\n for (String sortedClass : sortedClasses)\n {\n ProjectDependenciesAnalyzer.DependencyInfo info = infos.get (sortedClass);\n double x = info.getNormalizedUsing ();\n double y = info.getNormalizedExtending ();\n if (x < 0.05 || x > 0.95 || y < 0.05 || y > 0.95)\n {\n borders.add (sortedClass);\n }\n }\n sortedClasses.removeAll (borders);\n return borders;\n }",
"public static Rectangle[] getBorders(){\n\t\treturn borders;\n\t}",
"private void drawBorders(Graphics g) {\n\t\tRectangle field = g.getClipBounds();\n\t\tdouble[] thisCoordinate = plotSheet.toCoordinatePoint(0, 0, field);\n\t\tdouble[] upToThisCoordinate = plotSheet.toCoordinatePoint(0, 0, field);\n\t\tdouble[] leftToThisCoordinate = plotSheet.toCoordinatePoint(0, 0, field);\n\t\t\n\t\tdouble thisF_xy;\n\t\tdouble upToThisF_xy;\n\t\tdouble leftToThisF_xy;\n\t\t\n\t\tfor(int i = field.x+plotSheet.getFrameThickness() + 1; i < field.x + field.width-plotSheet.getFrameThickness(); i++) {\n\t\t\tfor(int j = field.y+plotSheet.getFrameThickness() + 1; j < field.y +field.height-plotSheet.getFrameThickness(); j++) {\n\t\t\t\tthisCoordinate = plotSheet.toCoordinatePoint(i, j, field);\n\t\t\t\tupToThisCoordinate = plotSheet.toCoordinatePoint(i, j-1, field);\n\t\t\t\tleftToThisCoordinate = plotSheet.toCoordinatePoint(i-1, j, field);\n\t\t\t\tthisF_xy = function.f(thisCoordinate[0], thisCoordinate[1]);\n\t\t\t\tupToThisF_xy = function.f(upToThisCoordinate[0], upToThisCoordinate[1]);\n\t\t\t\tleftToThisF_xy = function.f(leftToThisCoordinate[0], leftToThisCoordinate[1]);\n\t\t\t\t\n\t\t\t\tif(onBorder(thisF_xy, upToThisF_xy) || onBorder(thisF_xy, leftToThisF_xy)) {\n\t\t\t\t\tg.drawLine(i, j, i, j);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"private void drawBorders(Graphics g) {\n // set the drawing colour\n g.setColor(DEFAULT_BORDER_COLOR);\n\n // draw the upper border\n g.drawLine(DEFAULT_BORDER_GAP, DEFAULT_BORDER_GAP, this.getWidth()-DEFAULT_BORDER_GAP , DEFAULT_BORDER_GAP);\n\n // draw the bottom border\n g.drawLine(DEFAULT_BORDER_GAP, this.getHeight()-DEFAULT_BORDER_GAP, this.getWidth()-DEFAULT_BORDER_GAP ,\n this.getHeight()-DEFAULT_BORDER_GAP);\n\n // draw the left border\n g.drawLine(DEFAULT_BORDER_GAP, DEFAULT_BORDER_GAP, DEFAULT_BORDER_GAP, this.getHeight()-DEFAULT_BORDER_GAP);\n\n // draw the right border\n g.drawLine(this.getWidth()-DEFAULT_BORDER_GAP , DEFAULT_BORDER_GAP , this.getWidth()-DEFAULT_BORDER_GAP,\n this.getHeight()-DEFAULT_BORDER_GAP);\n\n // draw the horizontal internal border\n g.drawLine(DEFAULT_BORDER_GAP, this.getHeight()-25,\n this.getWidth()-textAreaLenght , this.getHeight()-25);\n\n // draw the vertical internal border\n g.drawLine(this.getWidth()-textAreaLenght , DEFAULT_BORDER_GAP ,\n this.getWidth()-textAreaLenght ,this.getHeight()-25 );\n\n }",
"@Override \n public void paintBorder(Component c, Graphics g, int x, int y, int width, int height){ \n g.setColor( c.getForeground() ); \n g.drawLine(0, height - 1, width, height - 1); //Border Bottom \n }",
"@Test\n public void testGetBorder() {\n Assert.assertEquals(Border.ALL, Border.getBorder(true, true, true, true));\n Assert.assertEquals(Border.BOTTOM, Border.getBorder(false, false, false, true));\n Assert.assertEquals(Border.BOTTOM_LEFT, Border.getBorder(true, false, false, true));\n Assert.assertEquals(Border.BOTTOM_LEFT_RIGHT, Border.getBorder(true, true, false, true));\n Assert.assertEquals(Border.BOTTOM_RIGHT, Border.getBorder(false, true, false, true));\n Assert.assertEquals(Border.BOTTOM_TOP, Border.getBorder(false, false, true, true));\n Assert.assertEquals(Border.BOTTOM_TOP_LEFT, Border.getBorder(true, false, true, true));\n Assert.assertEquals(Border.BOTTOM_TOP_RIGHT, Border.getBorder(false, true, true, true));\n Assert.assertEquals(Border.LEFT, Border.getBorder(true, false, false, false));\n Assert.assertEquals(Border.LEFT_RIGHT, Border.getBorder(true, true, false, false));\n Assert.assertEquals(Border.NONE, Border.getBorder(false, false, false, false));\n Assert.assertEquals(Border.RIGHT, Border.getBorder(false, true, false, false));\n Assert.assertEquals(Border.TOP, Border.getBorder(false, false, true, false));\n Assert.assertEquals(Border.TOP_LEFT, Border.getBorder(true, false, true, false));\n Assert.assertEquals(Border.TOP_LEFT_RIGHT, Border.getBorder(true, true, true, false));\n Assert.assertEquals(Border.TOP_RIGHT, Border.getBorder(false, true, true, false));\n }",
"void render(Rectangle borders);",
"void border(Keywords.BorderSide first, Keywords.BorderSide second, @DelegatesTo(BorderCriterion.class) @ClosureParams(value=FromString.class, options = \"org.modelcatalogue.spreadsheet.query.api.BorderCriterion\") Closure borderConfiguration);",
"void border(Keywords.BorderSide first, Keywords.BorderSide second, Keywords.BorderSide third, @DelegatesTo(BorderCriterion.class) @ClosureParams(value=FromString.class, options = \"org.modelcatalogue.spreadsheet.query.api.BorderCriterion\") Closure borderConfiguration);",
"public XSSFBorderFormatting createBorderFormatting(){\n CTDxf dxf = getDxf(true);\n CTBorder border;\n if(!dxf.isSetBorder()) {\n border = dxf.addNewBorder();\n } else {\n border = dxf.getBorder();\n }\n\n return new XSSFBorderFormatting(border, _sh.getWorkbook().getStylesSource().getIndexedColors());\n }",
"private void drawBorder(Graphics2D g2, boolean enabled, int x, int y, int w, int h)\r\n/* 193: */ {\r\n/* 194:228 */ g2.setColor(enabled ? PlasticLookAndFeel.getControlDarkShadow() : MetalLookAndFeel.getControlDisabled());\r\n/* 195: */ \r\n/* 196: */ \r\n/* 197:231 */ g2.drawOval(x, y, w, h);\r\n/* 198: */ }",
"boolean checkBorders();",
"public BorderDefine[] getBorderDefine() {\n\t\tBorderDefine[] defines = new BorderDefine[4];\n\t\tdefines[0] = border_top != null ? border_top : border;\n\t\tdefines[1] = border_right != null ? border_right : border;\n\t\tdefines[2] = border_bottom != null ? border_bottom : border;\n\t\tdefines[3] = border_left != null ? border_left : border;\n\t\treturn defines;\n\t}",
"CellStyleCriterion border(Keywords.BorderSide first, Keywords.BorderSide second, Consumer<BorderCriterion> borderConfiguration);",
"private void createAreaWithBorder(int borderWidth, int borderHeight){\n image.setColor(borderColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n \n image.setColor(backgroundColor);\n image.fillRect(borderWidth, borderHeight, fieldWidth - (borderWidth * 2), fieldHeight - (borderHeight * 2));\n }",
"void border(Keywords.BorderSide location, @DelegatesTo(BorderCriterion.class) @ClosureParams(value=FromString.class, options = \"org.modelcatalogue.spreadsheet.query.api.BorderCriterion\") Closure borderConfiguration);",
"IOverlayStyle borderThickness(int thick);",
"CellStyleCriterion border(Keywords.BorderSide first, Keywords.BorderSide second, Keywords.BorderSide third, Consumer<BorderCriterion> borderConfiguration);",
"private void drawTopBorder(StringBuffer canvas) {\n \t\t\tfor (int i=0; i<width; i++)\r\n \t\t\t\tcanvas.append('_'); //Top bar.\r\n \t\t\tcanvas.append('\\n');}",
"private void setupAllBorderColorViews(){\n allBorderColorViews = new ArrayList<>();\n\n allBorderColorViews.add(hLLRow1);\n allBorderColorViews.add(hLLRow2);\n allBorderColorViews.add(hLLRow3);\n\n if (hLLRow4 != null){\n allBorderColorViews.add(hLLRow4);\n\n // if hLLRow4 is not null, we assume 5 and 6 aren't either\n allBorderColorViews.add(hLLRow5);\n allBorderColorViews.add(hLLRow6);\n }\n }",
"public Color getBorderColor();",
"private void updateBorder() {\n m_hexPanel.setBorder(new TitledBorder(String.format(\"Binary data of '%s'\", m_module\n .getConfiguration().getName())));\n }",
"String[] addBorder(String[] picture) {\n final int BORDER_HEIGHT = picture.length + 2; // the hight of the border\n final int BORDER_LENGTH = picture[0].length() + 2; // the length of the border\n final int TOP_BORDER = 0; // index of the top border\n final int BOTTOM_BORDER = BORDER_HEIGHT - 1; // index of the bottom border\n \n // a new array to store the output strings with the borders added\n String[] output = new String[BORDER_HEIGHT];\n \n // starting at the row after the top border\n int row = TOP_BORDER + 1;\n \n // examine each line in the supplied picture\n for (String line : picture){\n \n // concat \"*\" to the beginning and end, then add it to the output array\n output[row++] = \"*\" + line + \"*\";\n }\n \n // initialize the top and bottom borders to empty strings to avoid including a null\n output[TOP_BORDER] = \"\";\n output[BOTTOM_BORDER] = \"\";\n \n // concat a number of \"*\" characters of the appropiate length to become\n // the top and bottom borders\n for (int col = 0; col < BORDER_LENGTH; col++){\n output[TOP_BORDER] += \"*\";\n output[BOTTOM_BORDER] += \"*\";\n }\n \n // return the ouput array of strings that includes the border\n return output;\n}",
"private static Border[] getCornerBorders(Tile tile, Map<Border, List<Tile>> borderMap) {\n Border[] result = new Border[2];\n for (Border border : tile.getBorders()) {\n if (borderMap.get(border).size() == 1) {\n result[result[0] == null ? 0 : 1] = border;\n }\n }\n return result;\n }",
"private void drawBorder(Graphics2D g2, boolean enabled, int x, int y, int width, int height)\r\n/* 89: */ {\r\n/* 90:133 */ g2.setColor(enabled ? PlasticLookAndFeel.getControlDarkShadow() : MetalLookAndFeel.getControlDisabled());\r\n/* 91: */ \r\n/* 92: */ \r\n/* 93:136 */ g2.drawRect(x, y, width, height);\r\n/* 94: */ }",
"void setBorder(Color color, int thickness);",
"protected void paintBorder (Graphics g)\r\n {\n }",
"CellStyleCriterion border(Keywords.BorderSide location, Consumer<BorderCriterion> borderConfiguration);",
"void border(@DelegatesTo(BorderCriterion.class) @ClosureParams(value=FromString.class, options = \"org.modelcatalogue.spreadsheet.query.api.BorderCriterion\") Closure borderConfiguration);",
"public Bordereau() {\n\t\tsuper();\n\t}",
"private static void fillBorders()\n\t{\n\t\tfor(int i=0; i<board.length; i++)\n\t\t{\n\t\t\tif(i==0 || i==board.length-1)\n\t\t\t\tArrays.fill(board[i], Cells.WALL);\n\t\t\telse\n\t\t\t{\n\t\t\t\tboard[i][0]=Cells.WALL;\n\t\t\t\tboard[i][board[i].length-1]=Cells.WALL;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\tpublic void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {\n\t\t\tsuper.paintBorder(c, g, x - 1, y, width + 5, height);\n\t\t}",
"public IconBuilder border(float thickness) {\n\t\tthis.borderThickness = thickness;\n\t\treturn this;\n\t}",
"@NonNull\n public Border build() {\n return new Border(mImpl.build(), mFingerprint);\n }",
"private void calculateBorder(ArrayList<double[]> contour,\r\n ArrayList<double[]> border) {\r\n\r\n // Circumradius\r\n double circumradius = (sideLength * Math.sqrt(3)) / 3;\r\n\r\n // Reduce the circumradius by the border width\r\n double scaledCircumRadius = circumradius - borderWidth;\r\n\r\n // Make sure the radius never drops below zero\r\n if (scaledCircumRadius < 0)\r\n scaledCircumRadius = 0;\r\n\r\n // Scaling factor\r\n double scale = scaledCircumRadius / circumradius;\r\n\r\n // Scale each vertex of the contour of the whole polygon\r\n for (double[] vertex : contour) {\r\n double[] borderVertex = new double[9];\r\n borderVertex[0] = vertex[0] * scale;\r\n borderVertex[1] = vertex[1] * scale;\r\n border.add(borderVertex);\r\n }\r\n }",
"IOverlayStyle borderOffset(int offset);",
"private void updateBorderSpecs() {\n if(mPolygonShapeSpec.hasBorder()) {\n mBorderPaint.setStrokeWidth(mPolygonShapeSpec.getBorderWidth());\n mBorderPaint.setColor(mPolygonShapeSpec.getBorderColor());\n } else {\n mBorderPaint.setStrokeWidth(0);\n mBorderPaint.setColor(0);\n }\n updatePolygonSize();\n invalidate();\n }",
"public float border() {\n\t\treturn borderThickness;\n\t}",
"public Border getBorder()\n {\n return null;\n }",
"protected void drawBorders(\n // CSOK: ParameterNumber\n final float startx, final float starty, final float width,\n final float height, final BorderProps bpsBefore,\n final BorderProps bpsAfter, final BorderProps bpsStart,\n final BorderProps bpsEnd, final int level) {\n final Rectangle2D.Float borderRect = new Rectangle2D.Float(startx,\n starty, width, height);\n final BorderProps bpsTop = bpsBefore;\n final BorderProps bpsBottom = bpsAfter;\n BorderProps bpsLeft;\n BorderProps bpsRight;\n if (level == -1 || (level & 1) == 0) {\n bpsLeft = bpsStart;\n bpsRight = bpsEnd;\n } else {\n bpsLeft = bpsEnd;\n bpsRight = bpsStart;\n }\n drawBorders(borderRect, bpsTop, bpsBottom, bpsLeft, bpsRight);\n }",
"public Color getBorderColor() {\r\n return this.borderColor;\r\n }",
"public native MagickImage borderImage(Rectangle borderInfo)\n\t\t\tthrows MagickException;",
"public native PixelPacket getBorderColor() throws MagickException;",
"@Override\n public int getBorderColor() {\n return mBorderColor;\n }",
"@Test\n public void testBorderVertical() {\n System.out.println(\"borderVertical\");\n int x = 0;\n int y = 0;\n int decks = 0;\n int i = 0;\n int[][] field = null;\n int state = 0; \n instance.borderVertical(x, y, decks, i, field, state);\n \n }",
"protected void paintComponentBorder(Graphics g) {\r\n int height = this.getHeight();\r\n int width = this.getWidth();\r\n Color c = g.getColor();\r\n g.setColor(getUiPrefs().getBorderColor());\r\n g.drawRoundRect(0, 0, width - 1, height - getInsets().bottom, 10, 10);\r\n g.setColor(c);\r\n }",
"public void border() {\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tmaze[x][0] = Block.WALL;\n\t\t\tmaze[x][height - 1] = Block.WALL;\n\t\t}\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tmaze[0][y] = Block.WALL;\n\t\t\tmaze[width - 1][y] = Block.WALL;\n\t\t}\n\t}",
"@Test public void testBorderBlinker() {\n int[][] borderHorizontalBlinker = {{1, 1, 1}, {0, 0, 0}, {0, 0, 0}};\n int[][] borderVerticalBlinker = {{0, 1, 0}, {0, 1, 0}, {0, 0, 0}};\n\n GameOfLife gameOfLife = createGame();\n\n gameOfLife.seed(borderHorizontalBlinker);\n\n Assert.assertArrayEquals(borderVerticalBlinker, gameOfLife.next());\n Assert.assertArrayEquals(borderHorizontalBlinker, gameOfLife.next());\n Assert.assertArrayEquals(borderVerticalBlinker, gameOfLife.next());\n Assert.assertArrayEquals(borderHorizontalBlinker, gameOfLife.next());\n }",
"public static int[] addRectangleBorder(final List<DoubleList> output, final double x, final double y, final double width, final double height, final Border border,\n final double thickness) {\n if (border == Border.ALL) {\n return VboUtil.addRectangleBorder(output, x, y, width, height, thickness);\n }\n final IntList modes = new ArrayIntList(8);\n // calculate the metrics\n final double xLeft = x - (width * 0.5);\n final double xRight = x + (width * 0.5);\n final double yBottom = y - (height * 0.5);\n final double yTop = y + (height * 0.5);\n // verts\n final double verts[][] = new double[4][];\n // top\n if (border.isTop()) {\n verts[0] = new double[]{xLeft, yTop};\n verts[1] = new double[]{xLeft, yTop + thickness};\n verts[2] = new double[]{xRight, yTop + thickness};\n verts[3] = new double[]{xRight, yTop};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // bottom\n if (border.isBottom()) {\n verts[0] = new double[]{xLeft, yBottom - thickness};\n verts[1] = new double[]{xLeft, yBottom};\n verts[2] = new double[]{xRight, yBottom};\n verts[3] = new double[]{xRight, yBottom - thickness};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // left\n if (border.isLeft()) {\n verts[0] = new double[]{xLeft - thickness, yBottom};\n verts[1] = new double[]{xLeft - thickness, yTop};\n verts[2] = new double[]{xLeft, yTop};\n verts[3] = new double[]{xLeft, yBottom};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // right\n if (border.isRight()) {\n verts[0] = new double[]{xRight, yBottom};\n verts[1] = new double[]{xRight, yTop};\n verts[2] = new double[]{xRight + thickness, yTop};\n verts[3] = new double[]{xRight + thickness, yBottom};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // upper left corner\n if (border.isLeft() && border.isTop()) {\n verts[0] = new double[]{xLeft - thickness, yTop};\n verts[1] = new double[]{xLeft - thickness, yTop + thickness};\n verts[2] = new double[]{xLeft, yTop + thickness};\n verts[3] = new double[]{xLeft, yTop};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // upper right corner\n if (border.isRight() && border.isTop()) {\n verts[0] = new double[]{xRight, yTop};\n verts[1] = new double[]{xRight, yTop + thickness};\n verts[2] = new double[]{xRight + thickness, yTop + thickness};\n verts[3] = new double[]{xRight + thickness, yTop};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // lower left corner\n if (border.isLeft() && border.isBottom()) {\n verts[0] = new double[]{xLeft - thickness, yBottom - thickness};\n verts[1] = new double[]{xLeft - thickness, yBottom};\n verts[2] = new double[]{xLeft, yBottom};\n verts[3] = new double[]{xLeft, yBottom - thickness};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // lower right corner\n if (border.isRight() && border.isBottom()) {\n verts[0] = new double[]{xRight, yBottom - thickness};\n verts[1] = new double[]{xRight, yBottom};\n verts[2] = new double[]{xRight + thickness, yBottom};\n verts[3] = new double[]{xRight + thickness, yBottom - thickness};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n return modes.toArray();\n }",
"private void init() {\n\n this.paint.setStyle(Paint.Style.FILL);\n this.mBorder.setStyle(Paint.Style.STROKE);\n this.mBorder.setColor(Color.GRAY);\n this.mBorder.setStrokeWidth(BORDER_STROKE);\n\n }",
"public void testFindBorders() {\n System.out.println(\"findBorders\");\n RasterImage rImage = new RasterImage(20,21);\n int expResult[] = {16777215, 0, 0, 0, 0, 0, 0, 16777215, 16777215,\n 16777215, 16777215, 16777215, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 16777215, 16777215, 16777215, 16777215, 0, 16777215, 16777215, 16777215,\n 16777215, 16777215, 0, 0, 0, 16777215, 16777215, 16777215, 0, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 16777215,\n 0, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 0,\n 16777215, 16777215, 0, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215,\n 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215,\n 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215, 16777215, 16777215,\n 16777215, 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215, 16777215,\n 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 16777215, 0, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 0, 16777215, 0, 0, 0, 16777215,\n 16777215, 16777215, 0, 0, 0, 0, 16777215, 16777215, 0, 0, 0, 0, 0, 0, 0, 0, 16777215,\n 16777215, 16777215, 16777215};\n int pixels[] = {16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,0,0,0,\n 0,0,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,0,0,0,\n 0,0,0,0,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,0,0,0,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,0,0,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,0,16777215,16777215,\n 16777215,0,0,0,0,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,0,0,0,\n 0,0,0,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215};\n for(int i=0;i<420;i++){\n int x = i%20;\n int y = i/20;\n rImage.setRGB(x, y, pixels[i]);\n }\n\n\n\n RasterImage result = CutCharacter.findBorders(rImage);\n for(int i=0;i<168;i++)\n assertEquals(expResult[i], result.getRGB(i));\n \n }",
"public void updateBotBorder()\n {\n //update bottom border\n for(int i = 0; i<botborder.size(); i++)\n {\n botborder.get(i).update();\n\n //if border is moving off screen, remove it and add a corresponding new one\n if(botborder.get(i).getX()<-25) {\n botborder.remove(i);\n\n\n //determine if border will be moving up or down\n if (botborder.get(botborder.size() - 1).getY() <= height-maxBorderHeight) {\n down = true;\n }\n if (botborder.get(botborder.size() - 1).getY() >= height - minBorderHeight) {\n down = false;\n }\n\n if (down) {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), botborder.get(botborder.size() - 1).getX() + 25, botborder.get(botborder.size() - 1\n ).getY() + 1));\n } else {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder\n ), botborder.get(botborder.size() - 1).getX() + 25, botborder.get(botborder.size() - 1\n ).getY() - 1));\n }\n }\n }\n }",
"@Override\n public java.lang.Object getUilBoxBorderColor() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (UIL_BOX_BORDER_COLOR_);\n return (java.lang.Object)retnValue;\n }",
"@Override\n protected void paintBorder(Graphics g) {\n g.setColor(getForeground());\n g.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 15, 50);\n }",
"public static ZoneBorders forRegion(int regionId) {\r\n\t\tint baseX = ((regionId >> 8) & 0xFF) << 6;\r\n\t\tint baseY = (regionId & 0xFF) << 6;\r\n\t\tint size = 64 - 1;\r\n\t\treturn new ZoneBorders(baseX, baseY, baseX + size, baseY + size);\r\n\t}",
"private void initBorderPositions(int blockX0, int blockY0, int blockWidth, int blockHeight) {\n\t\t// Top\n\t\tborderTopXMin = blockX0;\n\t\tborderTopXMax = blockX0 + blockWidth;\n\t\tborderTopYMin = blockY0;\n\t\tborderTopYMax = blockY0 + DEFAULT_BORDER_WEIGHT;\n\t\t// Right\n\t\tborderRightXMin = blockX0 + blockWidth - DEFAULT_BORDER_WEIGHT;\n\t\tborderRightXMax = blockX0 + blockWidth;\n\t\tborderRightYMin = blockY0;\n\t\tborderRightYMax = blockY0 + blockHeight;\n\t\t// Bottom\n\t\tborderBottomXMin = blockX0;\n\t\tborderBottomXMax = blockX0 + blockWidth;\n\t\tborderBottomYMin = blockY0 + blockHeight - DEFAULT_BORDER_WEIGHT;\n\t\tborderBottomYMax = blockY0 + blockHeight;\n\t\t// Left\n\t\tborderLeftXMin = blockX0;\n\t\tborderLeftXMax = blockX0 + DEFAULT_BORDER_WEIGHT;\n\t\tborderLeftYMin = blockY0;\n\t\tborderLeftYMax = blockY0 + blockHeight;\n\t}",
"public static int[] addRectangleBorder(final List<DoubleList> output, final double x, final double y, final double z, final double width, final double height, final Border border,\n final double thickness) {\n if (border == Border.ALL) {\n return VboUtil.addRectangleBorder(output, x, y, z, width, height, thickness);\n }\n final IntList modes = new ArrayIntList(8);\n // calculate the metrics\n final double xLeft = x - (width * 0.5);\n final double xRight = x + (width * 0.5);\n final double yBottom = y - (height * 0.5);\n final double yTop = y + (height * 0.5);\n // verts\n final double verts[][] = new double[4][];\n // top\n if (border.isTop()) {\n verts[0] = new double[]{xLeft, yTop, z};\n verts[1] = new double[]{xLeft, yTop + thickness, z};\n verts[2] = new double[]{xRight, yTop + thickness, z};\n verts[3] = new double[]{xRight, yTop, z};\n final ArrayDoubleList vertices = new ArrayDoubleList(18);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // bottom\n if (border.isBottom()) {\n verts[0] = new double[]{xLeft, yBottom - thickness, z};\n verts[1] = new double[]{xLeft, yBottom, z};\n verts[2] = new double[]{xRight, yBottom, z};\n verts[3] = new double[]{xRight, yBottom - thickness, z};\n final ArrayDoubleList vertices = new ArrayDoubleList(18);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // left\n if (border.isLeft()) {\n verts[0] = new double[]{xLeft - thickness, yBottom, z};\n verts[1] = new double[]{xLeft - thickness, yTop, z};\n verts[2] = new double[]{xLeft, yTop, z};\n verts[3] = new double[]{xLeft, yBottom, z};\n final ArrayDoubleList vertices = new ArrayDoubleList(18);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // right\n if (border.isRight()) {\n verts[0] = new double[]{xRight, yBottom, z};\n verts[1] = new double[]{xRight, yTop, z};\n verts[2] = new double[]{xRight + thickness, yTop, z};\n verts[3] = new double[]{xRight + thickness, yBottom, z};\n final ArrayDoubleList vertices = new ArrayDoubleList(18);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // upper left corner\n if (border.isLeft() && border.isTop()) {\n verts[0] = new double[]{xLeft - thickness, yTop, z};\n verts[1] = new double[]{xLeft - thickness, yTop + thickness, z};\n verts[2] = new double[]{xLeft, yTop + thickness, z};\n verts[3] = new double[]{xLeft, yTop, z};\n final ArrayDoubleList vertices = new ArrayDoubleList(18);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // upper right corner\n if (border.isRight() && border.isTop()) {\n verts[0] = new double[]{xRight, yTop, z};\n verts[1] = new double[]{xRight, yTop + thickness, z};\n verts[2] = new double[]{xRight + thickness, yTop + thickness, z};\n verts[3] = new double[]{xRight + thickness, yTop, z};\n final ArrayDoubleList vertices = new ArrayDoubleList(18);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // lower left corner\n if (border.isLeft() && border.isBottom()) {\n verts[0] = new double[]{xLeft - thickness, yBottom - thickness, z};\n verts[1] = new double[]{xLeft - thickness, yBottom, z};\n verts[2] = new double[]{xLeft, yBottom, z};\n verts[3] = new double[]{xLeft, yBottom - thickness, z};\n final ArrayDoubleList vertices = new ArrayDoubleList(18);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // lower right corner\n if (border.isRight() && border.isBottom()) {\n verts[0] = new double[]{xRight, yBottom - thickness, z};\n verts[1] = new double[]{xRight, yBottom, z};\n verts[2] = new double[]{xRight + thickness, yBottom, z};\n verts[3] = new double[]{xRight + thickness, yBottom - thickness, z};\n final ArrayDoubleList vertices = new ArrayDoubleList(18);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n return modes.toArray();\n }",
"private BorderPane initializeBorderPane() {\n BorderPane toReturn = new BorderPane();\n\n // Set menu pane\n HBox menu = addTopBox();\n toReturn.setTop(menu);\n\n // Set center pane\n gameMap = new CreatureControl();\n toReturn.setCenter(gameMap);\n\n // Set bottom pane\n HBox bottom = addBottomBox();\n toReturn.setBottom(bottom);\n\n // Roll the animation\n timeline.setCycleCount(Timeline.INDEFINITE);\n\n // Roll the track\n title.setCycleCount(MediaPlayer.INDEFINITE);\n gaming.setCycleCount(MediaPlayer.INDEFINITE);\n playBGM();\n\n return toReturn;\n }",
"private GPoint [] createArrayOfBallBorders(GOval ball) {\n GPoint [] borderPoints = new GPoint[4];\n borderPoints[0] = new GPoint(ball.getX(), ball.getY());\n borderPoints[1] = new GPoint(ball.getX() + 2 * BALL_RADIUS, ball.getY());\n borderPoints[2] = new GPoint(ball.getX() + 2 * BALL_RADIUS, ball.getY() + 2 * BALL_RADIUS);\n borderPoints[3] = new GPoint(ball.getX(), ball.getY() + 2 * BALL_RADIUS);\n return borderPoints;\n }",
"public GoalViewer()\r\n/* 25: */ {\r\n/* 26: 28 */ setBorder(BorderFactory.createLineBorder(Color.BLACK));\r\n/* 27: */ }",
"protected void paintBorder(Graphics g) {\n super.paintComponent(g);\n\n\n g.setColor(country.getCont().getContColor());\n g.fillRoundRect(innerDiameter,innerDiameter,width-2*innerDiameter, height-2*innerDiameter,0,0);\n g.setColor(country.getOwner().getPlayerColor());\n g.fillOval(innerDiameter, innerDiameter, getSize().width-2*innerDiameter, getSize().height-2*innerDiameter);\n\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"default\", Font.BOLD, 14));\n\n g.drawString(\"\"+country.getArmy(),20,20);\n }",
"public final Color getBorderColor() {\n\t\treturn borderColor;\n\t}",
"public static ArrayList<double[]> isBorder()\n {\n ArrayList<double[]> borders = new ArrayList<double[]>() ;\n // for all points\n for(int i=0; i<POINTS.length; i++)\n {\n // for all neighbouring points\n for(int k=i+1; k<POINTS.length; k++)\n {\n // System.out.println(\"Checking pair: \" + Arrays.toString(POINTS[i]) + \" \" + Arrays.toString(POINTS[k]));\n ArrayList<Double> sides = new ArrayList<Double>();\n // checking tmp vals\n for(int n=0; n<POINTS.length; n++) // O(n^3)\n {\n double[] test = POINTS[n];\n // find which side of line the test is on\n double d = side(POINTS[i], POINTS[k], POINTS[n]);\n // append to sides\n\n sides.add(d);\n //System\n }\n // check if sides for this pairing is same\n if (neg(sides) || pos(sides))\n {\n\n borders.add(POINTS[i]);\n borders.add(POINTS[k]);\n }\n }\n }\n /**double[] tmp = POINTS[i];\n double d = side(p1, p2, tmp);\n sides.add(d);\n //System.out.println(\"Printing sides array for pairing \" + p1[0] + \",\" + p1[1] + \" and \" + p2[0] + \",\" + p2[1] );\n if (neg(sides) || pos(sides))\n {\n System.out.println(\"p1 and p2 are borders\");\n borders.add(p1); borders.add(p2);\n }\n }\n for (int i=0; i<borders.size(); i++){\n System.out.println(Arrays.toString(borders.get(i)));\n }\n /**\n System.out.println(\"is all neg: \");\n System.out.println(neg(sides));\n System.out.println(\"is all pos: \");\n System.out.println(pos(sides));*/\n// return false;\n return borders;\n }",
"@Test\n public void testBorderHorizontal() {\n System.out.println(\"borderHorizontal\");\n int x = 0;\n int y = 0;\n int decks = 0;\n int i = 0;\n int[][] field = null;\n int state = 0; \n instance.borderHorizontal(x, y, decks, i, field, state);\n \n }",
"public ValueExpression getBorder() {\n return border;\n }",
"private static String writeHorisontalBorder(List<StudentRecord> records) {\n\t\tint maxJMBAG = getMax(records, FieldValueGetters.JMBAG);\n\t\tint maxLast = getMax(records, FieldValueGetters.LAST_NAME);\n\t\tint maxFirst = getMax(records, FieldValueGetters.FIRST_NAME);\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tsb.append(\"+\");\n\t\tsb.append(writeEqualsSigns(maxJMBAG + 2));\n\t\tsb.append(\"+\");\n\t\tsb.append(writeEqualsSigns(maxLast + 2));\n\t\tsb.append(\"+\");\n\t\tsb.append(writeEqualsSigns(maxFirst + 2));\n\t\tsb.append(\"+\");\n\t\tsb.append(writeEqualsSigns(3));\n\t\tsb.append(\"+\\n\");\n\t\treturn sb.toString();\n\t}",
"public Color getScrollBorderColor();",
"protected void setBordersFromCell() {\n borderBefore = cell.borderBefore.copy();\n if (rowSpanIndex > 0) {\n borderBefore.normal = BorderSpecification.getDefaultBorder();\n }\n borderAfter = cell.borderAfter.copy();\n if (!isLastGridUnitRowSpan()) {\n borderAfter.normal = BorderSpecification.getDefaultBorder();\n }\n if (colSpanIndex == 0) {\n borderStart = cell.borderStart;\n } else {\n borderStart = BorderSpecification.getDefaultBorder();\n }\n if (isLastGridUnitColSpan()) {\n borderEnd = cell.borderEnd;\n } else {\n borderEnd = BorderSpecification.getDefaultBorder();\n }\n }",
"IOverlayStyle borderColor(int color);",
"public BorderPanel(){\r\n setLayout(new BorderLayout());\r\n setBackground(Color.green);\r\n JButton b1 = new JButton(\"Button 1\");\r\n JButton b2 = new JButton(\"Button 2\");\r\n JButton b3 = new JButton(\"Button 3\");\r\n JButton b4 = new JButton(\"Button 4\");\r\n JButton b5 = new JButton(\"Button 5\");\r\n add(b1, BorderLayout.CENTER);\r\n add(b2, BorderLayout.NORTH);\r\n add(b3, BorderLayout.SOUTH);\r\n add(b4, BorderLayout.EAST);\r\n add(b5, BorderLayout.WEST);\r\n }",
"public void updateBottomBorder(){\n if (player.getScore()%40 ==0){\n botBorders.add(new BotBorder(BitmapFactory.decodeResource(getResources(),R.drawable.brick),\n botBorders.get(botBorders.size()-1).getX()+20,\n (int)(rand.nextDouble()*maxBorderHeight)+HEIGHT-maxBorderHeight));\n }\n //update bottom border\n for (int i =0; i<botBorders.size(); i++){\n botBorders.get(i).update();\n if (botBorders.get(i).getX()<-20) {\n botBorders.remove(i);\n if (botBorders.get(botBorders.size() - 1).getY() <= HEIGHT- maxBorderHeight) {\n botDown = true ;\n }\n if (botBorders.get(botBorders.size() - 1).getY() >= HEIGHT- minBorderHeight) {\n botDown = false;\n }\n if (botDown) {\n botBorders.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.brick),\n botBorders.get(botBorders.size() - 1).getX() + 20,\n botBorders.get(botBorders.size() - 1).getY() + 1));\n } else {\n botBorders.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.brick),\n botBorders.get(botBorders.size() - 1).getX() + 20,\n botBorders.get(botBorders.size() - 1).getY() - 1));\n }\n }\n }\n }",
"CellStyleCriterion border(Consumer<BorderCriterion> borderConfiguration);",
"void updateBorder(int offset) {\n setBorder(new EmptyBorder(0, offset, 0, 0));\n }",
"public CssBorderWidth() {\n }",
"public BorderInfo getBorderEnd() {\n return borderEnd.getBorderInfo();\n }",
"@Override\n\t\tpublic void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {\n\t\t\tsuper.paintBorder(c, g, x, y, width + 1, height);\n\t\t}",
"private void setBorder(TitledBorder titledBorder) {\n\n}",
"public void paintBorder(Graphics g)\n {\n g.setColor(defaultMapBorderColor);\n g.fillRoundRect((int)(Driver.scale*(topLeftX-roundCornerRadius)), (int)(Driver.scale*(topLeftY-roundCornerRadius)), \n (int)(Driver.scale*(mapWidth+2*roundCornerRadius)), (int)(Driver.scale*(mapHeight+2*roundCornerRadius)), \n (int)(Driver.scale*roundCornerRadius), (int)(Driver.scale*roundCornerRadius));\n\n g.setColor(defaultMapBackgroundColor);\n g.fillRect((int)(Driver.scale*topLeftX), (int)(Driver.scale*topLeftY), \n (int)(Driver.scale*mapWidth), (int)(Driver.scale*mapHeight));\n }",
"public Border getBorder() {\n\t return border;\n\t}",
"public void clearBorders() {\n\n findViewById(R.id.eslot1).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#00000000\")));\n findViewById(R.id.eslot2).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#00000000\")));\n findViewById(R.id.eslot3).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#00000000\")));\n findViewById(R.id.eslot4).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#00000000\")));\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 }",
"private View getBorderView() {\n View view = new View(this.getContext());\n TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, 1);\n view.setLayoutParams(layoutParams);\n view.setBackgroundColor(getResources().getColor(R.color.ldstools_gray_light));\n return view;\n }",
"private void createAreaWithoutBorder(){\n image.setColor(backgroundColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n }",
"public MapInterface AddBorder(MapInterface map, ArrayList<Border> arrayBorder) throws Exception{\r\n\t\t\r\n\t\t//We are assigning false value to all of our Boolean Map variable.\r\n\t\tfor (int i = 0; i < Border.globalWidth; ++i) {\t\t\t\r\n\t\t\tfor (int j = 0; j < Border.globalHeight; ++j) {\r\n map.ClearBorder(i, j);\r\n }\r\n }\r\n\t\t\r\n\t\tfor(Border temp:arrayBorder) {\r\n\t\t\tmap.SetBorder(temp.getX(), temp.getY());\r\n\t\t}\r\n\t\t\r\n \treturn map;\r\n\t}",
"private void appearance()\r\n\t\t{\n\t\tgridLayout.setHgap(5);\r\n\t\tgridLayout.setVgap(5);\r\n\r\n\t\t//set the padding + external border with title inside the box\r\n\t\tBorder lineBorder = BorderFactory.createLineBorder(Color.BLACK);\r\n\t\tBorder outsideBorder = BorderFactory.createTitledBorder(lineBorder, title, TitledBorder.CENTER, TitledBorder.TOP);\r\n\t\tBorder marginBorder = BorderFactory.createEmptyBorder(5, 5, 5, 5);\r\n\t\tthis.setBorder(BorderFactory.createCompoundBorder(outsideBorder, marginBorder));\r\n\r\n\t\t//set initial value to builder\r\n\t\tdiceBuilder.setInterval(min, max);\r\n\t\t}",
"@Override\n protected void createLines() {\n\n Line[] lines = new GraphicalLine[(2 * columns * rows) + columns + rows];\n int lineIndex = 0;\n\n int boxCounter = 0;\n int x = settings.dotStartX() + settings.dotWidth();\n int y = settings.dotStartY() + settings.lineOffset();\n boolean isTop = true;\n boolean isFirstRow = true;\n\n /* horizontal lines */\n /* for every row + 1 */\n for (int i = 0; i < rows + 1; i++) {\n\n /* for every column */\n for (int j = 0; j < columns; j++) {\n\n Line line = new GraphicalLine(x, y, settings.lineWidth(), settings.lineHeight());\n line.addBox(boxes[boxCounter]);\n if (isTop) {\n boxes[boxCounter].setTopLine(line);\n } else {\n boxes[boxCounter].setBottomLine(line);\n /* if there is a next row */\n if (i + 1 < rows + 1) {\n line.addBox(boxes[boxCounter + columns]);\n boxes[boxCounter + columns].setTopLine(line);\n }\n }\n boxCounter++;\n lines[lineIndex++] = line;\n x += settings.dotSeparatorLength();\n }\n boxCounter = isTop ? boxCounter - columns : boxCounter;\n if (isFirstRow) {\n isTop = false;\n isFirstRow = false;\n }\n y += settings.dotSeparatorLength();\n x = settings.dotStartX() + settings.dotWidth();\n }\n\n boxCounter = 0;\n x = settings.dotStartX() + settings.lineOffset();\n y = settings.dotStartY() + settings.dotWidth();\n\n /* vertical lines */\n /* for every row */\n for (int i = 0; i < rows; i++) {\n\n /* for every column + 1 */\n for (int j = 0; j < columns + 1; j++) {\n\n Line line = new GraphicalLine(x, y, settings.lineHeight(), settings.lineWidth());\n /* if there is a previous vertical line */\n if (j > 0) {\n boxes[boxCounter - 1].setRightLine(line);\n line.addBox(boxes[boxCounter - 1]);\n }\n /* if there is a next column */\n if (j + 1 < columns + 1) {\n boxes[boxCounter].setLeftLine(line);\n line.addBox(boxes[boxCounter]);\n boxCounter++;\n }\n lines[lineIndex++] = line;\n x += settings.dotSeparatorLength();\n }\n y += settings.dotSeparatorLength();\n x = settings.dotStartX() + settings.lineOffset();\n }\n\n this.lines = lines;\n }",
"public void updateTopBorder(){\n\n\n //Go up until reach maximum border height and then go down, so zig zag, maximum will increase when score increases.\n //Every 100 points insert random blocks\n\n for (int i = 0; i < topborder.size(); i++){\n topborder.get(i).update();\n\n //Remove top border if off map and replace by adding a new one\n if (topborder.get(i).getX()<-25){\n topborder.remove(i);\n\n //Retrieves the last element in the array list\n if (topborder.get(topborder.size()-1).getHeight()>=maxBorderHeight){\n top = false;\n }\n if (topborder.get(topborder.size()-1).getHeight()<=minBorderHeight){\n top = true;\n }\n\n //New border will have a larger height, else smaller height\n if (top){\n topborder.add(new TopBorder(BitmapFactory.decodeResource(getResources(),R.drawable.newborder), topborder.get(topborder.size()-1).getX()+25, 0, topborder.get(topborder.size()-1).getHeight()+1));\n }\n else {\n topborder.add(new TopBorder(BitmapFactory.decodeResource(getResources(),R.drawable.newborder), topborder.get(topborder.size()-1).getX()+25, 0, topborder.get(topborder.size()-1).getHeight()-1));\n }\n }\n }\n\n }",
"private void drawIconBorder(Graphics g) {\n }",
"private void buildCellRowBorder( StringBuffer content, String borderName,\n \t\t\tString cellBorderWidth, String cellBorderStyle,\n \t\t\tString cellBorderColor, int cellWidthValue, String rowBorderWidth,\n \t\t\tString rowBorderStyle, String rowBorderColor, int rowWidthValue )\n \t{\n \t\tboolean bUseCellBorder = true;// true means choose cell's border;\n \t\t// false means choose row's border\n \t\tif ( null == rowBorderStyle )\n \t\t{\n \t\t}\n \t\telse if ( null == cellBorderStyle )\n \t\t{\n \t\t\tbUseCellBorder = false;\n \t\t}\n \t\telse if ( cellBorderStyle.matches( \"hidden\" ) )\n \t\t{\n \t\t}\n \t\telse if ( rowBorderStyle.matches( \"hidden\" ) )\n \t\t{\n \t\t\tbUseCellBorder = false;\n \t\t}\n \t\telse if ( rowBorderStyle.matches( CSSConstants.CSS_NONE_VALUE ) )\n \t\t{\n \t\t}\n \t\telse if ( cellBorderStyle.matches( CSSConstants.CSS_NONE_VALUE ) )\n \t\t{\n \t\t\tbUseCellBorder = false;\n \t\t}\n \t\telse if ( rowWidthValue < cellWidthValue )\n \t\t{\n \t\t}\n \t\telse if ( rowWidthValue > cellWidthValue )\n \t\t{\n \t\t\tbUseCellBorder = false;\n \t\t}\n \t\telse if ( !cellBorderStyle.matches( rowBorderStyle ) )\n \t\t{\n \t\t\tInteger iCellBorderLevel = ( (Integer) borderStyleMap.get( cellBorderStyle ) );\n \t\t\tInteger iRowBorderLevel = ( (Integer) borderStyleMap.get( rowBorderStyle ) );\n \t\t\tif ( null == iCellBorderLevel )\n \t\t\t{\n \t\t\t\tiCellBorderLevel = new Integer( -1 );\n \t\t\t}\n \t\t\tif ( null == iRowBorderLevel )\n \t\t\t{\n \t\t\t\tiRowBorderLevel = new Integer( -1 );\n \t\t\t}\n \n \t\t\tif ( iRowBorderLevel.intValue( ) > iCellBorderLevel.intValue( ) )\n \t\t\t{\n \t\t\t\tbUseCellBorder = false;\n \t\t\t}\n \t\t}\n \n \t\tif ( bUseCellBorder )\n \t\t{\n \t\t\tAttributeBuilder.buildBorder( content,\n \t\t\t\t\tborderName,\n \t\t\t\t\tcellBorderWidth,\n \t\t\t\t\tcellBorderStyle,\n \t\t\t\t\tcellBorderColor );\n \t\t}\n \t\telse\n \t\t{\n \t\t\tAttributeBuilder.buildBorder( content,\n \t\t\t\t\tborderName,\n \t\t\t\t\trowBorderWidth,\n \t\t\t\t\trowBorderStyle,\n \t\t\t\t\trowBorderColor );\n \t\t}\n \t}",
"@Override\n public void draw(Canvas onCanvas) {\n Paint border = new Paint();\n border.setColor(Color.BLACK);\n border.setStyle(Paint.Style.STROKE);\n border.setStrokeWidth(1);\n\n // -1 on width and height because the 1st pixel (0 index) is included\n // Java's placement on the border lines are really weird...\n //\n // It draws the top and left borders on the 0 pixel\n // BUT it draws the right and bottom ones PAST the last pixel\n // WHY U DO DIS\n onCanvas.drawRect(0, 0, getW() - 1, getH() - 1, border);\n\n super.draw(onCanvas);\n }",
"private JPanel getJPanelBorder() {\r\n\t\tif (jPanelBorder == null) {\r\n\t\t\tjPanelBorder = new JPanel();\r\n\t\t\tjPanelBorder.setLayout(new GridBagLayout());\r\n\t\t\t//jPanelBorder.setLayout(new BoxLayout(jPanelBorder, BoxLayout.Y_AXIS));\r\n\t\t\t//jPanelBorder.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 0));\t\r\n\t\t\tjPanelBorder.setBorder(new TitledBorder(null, \"Border\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\r\n\t\t\tGridBagConstraints gbc_Top= new GridBagConstraints();\r\n\t\t\tgbc_Top.gridx = 1;\r\n\t\t\tgbc_Top.gridy = 0;\r\n\t\t\tgbc_Top.gridwidth = 1;\r\n\t\t\tgbc_Top.insets = new Insets(5, 0, 0, 0); // top left bottom right\r\n\t\t\t//gbc_Top.fill = GridBagConstraints.BOTH;\r\n\t\t\t\r\n\t\t\tGridBagConstraints gbc_Left = new GridBagConstraints();\r\n\t\t\tgbc_Left.gridx = 0;\r\n\t\t\tgbc_Left.gridy = 1;\r\n\t\t\tgbc_Left.gridwidth = 1;\r\n\t\t\tgbc_Left.insets = new Insets(10, 0, 0, 0); // top left bottom right\r\n\t\t\t//gbc_Left.fill = GridBagConstraints.BOTH;\r\n\t\t\t\r\n\t\t\tGridBagConstraints gbc_Right = new GridBagConstraints();\r\n\t\t\tgbc_Right.gridx = 2;\r\n\t\t\tgbc_Right.gridy = 1;\r\n\t\t\tgbc_Right.gridwidth = 1;\r\n\t\t\tgbc_Right.insets = new Insets(10, 0, 0, 0); // top left bottom right\r\n\t\t\t//gbc_Right.fill = GridBagConstraints.BOTH;\r\n\t\t\t\r\n\t\t\tGridBagConstraints gbc_Bottom = new GridBagConstraints();\r\n\t\t\tgbc_Bottom.gridx = 1;\r\n\t\t\tgbc_Bottom.gridy = 2;\r\n\t\t\tgbc_Bottom.gridwidth = 1;\r\n\t\t\tgbc_Bottom.insets = new Insets(10, 0, 5, 0); // top left bottom right\r\n\t\t\t//gbc_Bottom.fill = GridBagConstraints.BOTH;\r\n\t\t\r\n\t\t\tjPanelBorder.add(this.getJPanelTop(), gbc_Top);\r\n\t\t\tjPanelBorder.add(this.getJPanelLeft(), gbc_Left);\r\n\t\t\tjPanelBorder.add(this.getJPanelRight(), gbc_Right);\t\r\n\t\t\tjPanelBorder.add(this.getJPanelBottom(), gbc_Bottom);\t\r\n\t\t}\r\n\t\treturn jPanelBorder;\r\n\t}",
"public Border getBorder() {\n\t\treturn border;\n\t}",
"public void drawBorder(int x1, int y1, int x2, int y2)\r\n\t{\r\n\t\tg.drawLine(x1, y1, x1, y2);\r\n\t\tg.drawLine(x1, y1, x2, y1);\r\n\t\tg.drawLine(x1, y2, x2, y2);\r\n\t\tg.drawLine(x2, y1, x2, y2);\r\n\t}",
"@Override\n\t\tpublic void setBorder(Border border) {\n\t\t}",
"void addEventBorder(DefaultBorder border, DefaultBall ball);"
] | [
"0.7512593",
"0.72124314",
"0.718585",
"0.70591813",
"0.7007239",
"0.6930991",
"0.6723843",
"0.6683459",
"0.658525",
"0.6467409",
"0.628891",
"0.61721635",
"0.6145661",
"0.613485",
"0.61292833",
"0.61256325",
"0.6123991",
"0.6090261",
"0.60512245",
"0.60435206",
"0.6042684",
"0.60399204",
"0.60327786",
"0.6029735",
"0.6029128",
"0.5989043",
"0.5979908",
"0.5966657",
"0.59559804",
"0.59557736",
"0.59380376",
"0.59369826",
"0.5931644",
"0.58765274",
"0.5849959",
"0.5825891",
"0.5815241",
"0.5813282",
"0.57920927",
"0.57911986",
"0.5780556",
"0.57800996",
"0.5778915",
"0.5755058",
"0.5754234",
"0.574545",
"0.573197",
"0.57289624",
"0.5718256",
"0.56954694",
"0.5692583",
"0.5676706",
"0.5673895",
"0.5664338",
"0.5657509",
"0.5619907",
"0.5619717",
"0.5586681",
"0.55833536",
"0.5578803",
"0.5573361",
"0.55713284",
"0.55700153",
"0.55402106",
"0.55344343",
"0.5526763",
"0.55092007",
"0.5506794",
"0.55010366",
"0.54844457",
"0.5481595",
"0.5471708",
"0.5467069",
"0.54657954",
"0.5464944",
"0.54606396",
"0.54605246",
"0.5459879",
"0.5456505",
"0.5445012",
"0.54419905",
"0.5439814",
"0.5437702",
"0.54370946",
"0.54318905",
"0.5428141",
"0.5422882",
"0.54094094",
"0.5398283",
"0.5395749",
"0.5392038",
"0.53897935",
"0.5383719",
"0.53592104",
"0.53503495",
"0.5341684",
"0.53416187",
"0.5340662",
"0.53370523",
"0.53245556",
"0.5316645"
] | 0.0 | -1 |
get the sin of the angle by getting the degree in radian | private double getSin(int rot) {
return Math.sin(Math.toRadians(rot));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double calculateSine(double angle);",
"public static float sin(float degrees) {\r\n return sinLookup((int) (degrees * precision + 0.5f));\r\n }",
"public double sin(double number);",
"public double calculateSine(double angle, String angleType);",
"public static double findSin(double radiun) {\r\n\t\treturn Math.sin(radiun);\r\n\t}",
"public static double sin(double a) {\r\n if (a == Double.NEGATIVE_INFINITY || !(a < Double.POSITIVE_INFINITY)) {\r\n return Double.NaN;\r\n }\r\n\r\n final double PI = (22/7);\r\n\r\n a %= 2 * PI;\r\n\r\n /* The following if statement checks whether a is a negative angle\r\n * Converts it to positive angle if true\r\n */\r\n if (a < 0) {\r\n a = 2 * PI - a;\r\n }\r\n\r\n /* The following if statement checks whether sine term is an odd function\r\n * Changes the sign to -ve if true\r\n */\r\n int sign = 1;\r\n if (a > PI) {\r\n a -= PI;\r\n sign = -1;\r\n }\r\n\r\n final int PRECISION = 50;\r\n double temp = 0;\r\n\r\n /* The following for statement calculates the sum of the terms\r\n * Until the set precision is reached\r\n */\r\n for (int i = 0; i <= PRECISION; i++) {\r\n temp += Math.pow(-1, i) * (Math.pow(a, 2 * i + 1) / factorial(2 * i + 1));\r\n }\r\n\r\n return sign * temp;\r\n\r\n }",
"@Test\n\tvoid sinTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 90;\n\t\tdouble actual = 1.0000000000000002;\n\t\tdouble result = TrigLib.sine(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}",
"public double calculateArcSine(double angle);",
"public static float sin(float x) {\n float upper = (PI - x) * 16f * x;\n float lower = 5 * PI * PI - 4f * x * (PI - x);\n return upper / lower;\n\n }",
"private static double getSinSquare(Double value){\r\n\t\treturn Math.pow(Math.sin(value/2), 2);\r\n\r\n }",
"public final static float SINSafer(float deg) {\n\t\tdeg=deg%360;\n\t\tif(deg<0) deg+=360;\n\t\t\n\t\tdeg*=SINCOS_INVPREC;\n\t\treturn sinLUT[(int)deg];\n\t}",
"@Test\n\tvoid sinTestWithRadiansInput() throws CustomException {\n\t\tdouble input = 1.5707963267948966;\n\t\tdouble actual = 1.0000000000000002;\n\t\tdouble result = TrigLib.sine(input);\n\t\tassertEquals(result, actual, \"Output is as expected as input is in radians\");\n\t}",
"private static double calculateSin(double dy, double distance) {\n if (distance > 0)\n return (dy) / distance;\n else\n return 0.0;\n }",
"public double calculateArcSine(double angle, String angleType);",
"public final void sin() {\n\t\tif (size > 0) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tpush(Math.sin(topMostValue));\n\n\t\t}\n\t}",
"@Test\n\tvoid sinTestWithConvertingToRadians() throws CustomException {\n\t\tdouble input = 90;\n\t\tdouble actual = 1.0000000000000002;\n\t\tdouble result1 = TrigLib.toRadians(input);\n\t\tdouble result = TrigLib.sine(result1);\n\t\tassertEquals(result, actual, \"Output is as expected as input is converted to radians\");\n\t}",
"private static double getSinOfDegrees(double d, int halfCirc) {\n\t\treturn Math.sin((d * Math.PI) / halfCirc);\n\t}",
"public double calculateHyperbolicSine(double angle);",
"public static double mySin(double x) {\n int n = 0;\n int N = 20;\n double y = 0;\n for (; n <= N; n++) {\n double p1 = 1;\n for (int i = 1; i <= n; i++) {\n p1 *= (-1);\n }\n double p2 = 1;\n for (int i = 1; i <= (2 * n + 1); i++){\n p2*=i;\n }\n double p3 = 1;\n for (int i = 1; i <= (2 * n + 1); i++){\n p3*=x;\n }\n y = y + (p1/p2)*p3;\n }\n return y;\n }",
"public double calculateSine(double oppositeSide, double hypotenuseSide, String angleType);",
"public double getAngle() {\n return Math.atan2(sinTheta, cosTheta);\n }",
"public static double findRadiun(int degree) {\r\n\t\treturn Math.toRadians(degree);\r\n\t}",
"private static float sinLookup(int a) {\r\n return a >= 0 ? sin[a % (modulus)] : -sin[-a % (modulus)];\r\n }",
"double getAngle();",
"double getAngle();",
"private static double rad(double deg) {\n return deg*Math.PI/180;\n }",
"public static final float sinh(float x) {\n \t\treturn (MoreMath.pow(MoreMath.E, x) - MoreMath.pow(MoreMath.E, -x)) / 2.0f;\n \t}",
"public final static float SIN(float deg) {\n\t\tdeg*=SINCOS_INVPREC;\n\t\treturn sinLUT[(int)deg];\n\t}",
"public static double sin(double x) // Using a Chebyshev-Pade approximation\n {\n int n=(int)(x/PI2)+1; // reduce to the 4th and 1st quadrants\n if(n<1)n=n-1;\n if ((n&2)==0) x=x-(n&0xFFFFFFFE)*PI2; // if it from the 2nd or the 3rd quadrants\n else x=-(x-(n&0xFFFFFFFE)*PI2);\n\n double x2=x*x;\n return (0.9238318854f-0.9595498071e-1f*x2)*x/(0.9238400690f+(0.5797298195e-1f+0.2031791179e-2f*x2)*x2);\n }",
"E sin(final E n);",
"public double calculateArcSine(double oppositeSide, double hypotenuseSide, String angleType);",
"public static float deg2rad(float deg) {return deg*D2R;}",
"public double getAngle();",
"private double degToRadian(double angle)\n\t{\n\t\treturn angle/180*Math.PI;\n\t}",
"public double getYDirection() {\r\n return Math.sin(Math.toRadians(angle));\r\n }",
"static double sineWave(double timeInSeconds, double frequency) {\r\n\t\tdouble result= Math.sin(timeInSeconds);\r\n\t\t\t\r\n\t\treturn result; // hint: use Math.sin(...)\r\n\t}",
"public double radians() {\n return Math.toRadians(this.degrees);\n }",
"static double f(double x){\n \treturn Math.sin(x);\r\n }",
"double cosTheta();",
"public double getSecondAngle(){\r\n\t\treturn Math.atan( \r\n\t\t\t\t(\r\n\t\t\t\t\t\tthis.getSecondObject().getCenterY()\r\n\t\t\t\t\t\t- this.getFirstObject().getCenterY()\r\n\t\t\t\t)\r\n\t\t\t\t/ (\r\n\t\t\t\t\t\tthis.getSecondObject().getCenterX()\r\n\t\t\t\t\t\t- this.getFirstObject().getCenterX()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}",
"public static Expression sin(final Expression value) {\n return new Expression(\"$sin\", value);\n }",
"public static double sinh(double myValue)\n {\n double aValue = (Math.pow(Math.E,myValue)-Math.pow(Math.E,-1*myValue))/2;\n return aValue;\n }",
"final double ssfn(double phi, double sinphi) {\r\n sinphi *= excentricity;\r\n return tan(PI/4 + phi/2.0) * pow((1-sinphi) / (1+sinphi), excentricity/2.0);\r\n }",
"public static double reduce2PiRadians(double radians){\n return radians % (2*Math.PI);\n }",
"private double deg2rad(double deg) {\r\n return (deg * Math.PI / 180.0);\r\n }",
"EDataType getAngleDegrees();",
"public static float rad2deg(float rad) {return rad/D2R;}",
"public static double toRadians(double degree) {\n\t\treturn (degree * 3.14159) / 180;\r\n\t\t\r\n\t}",
"private double deg2rad(double deg) {\r\n return (deg * Math.PI / 180.0);\r\n }",
"private double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }",
"public void setAngle(float angle) {\n this.angle = angle;\n cosAngle = (float) Math.cos(angle);\n sinAngle = 1 - cosAngle * cosAngle;\n }",
"public double getAngle() {\n try {\n switch(Coordinates.angleUnit()) {\n case Coordinates.RADIAN:\n\treturn Double.parseDouble(deg.getText().trim());\n case Coordinates.DEGRE:\n\treturn Math.PI * Double.parseDouble(deg.getText().trim()) / 180.0;\n case Coordinates.DEGMN:\n\tString d = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tString m = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\");\n case Coordinates.DEGMNSEC:\n\td = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tm = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\tString s = sec.getText().trim();\n\tif(s.length() == 0)\n\t s = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\" + s + \"\\\"\");\n }\n }\n catch(NumberFormatException e) {\n }\n return 0.0;\n }",
"public double getAngle() {\n\t\treturn Math.atan2(imaginary, real);\n\t}",
"public static double to_2pi(double rad) {\n return modulo(rad,twopi);\n }",
"private double deg2rad(double deg) {\r\n\t\t\treturn (deg * Math.PI / 180.0);\r\n\t\t}",
"private double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }",
"private double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }",
"private static double degToRad(float deg)\r\n/* 25: */ {\r\n/* 26:32 */ return deg * 3.141592653589793D / 180.0D;\r\n/* 27: */ }",
"private static double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }",
"public double getAngle() {\n\t\tdouble angle = Math.atan2(imaginary, real);\n\t\tangle = fixNegativeAngle(angle);\n\n\t\treturn angle;\n\t}",
"public double getAngle() {\n\t\treturn 180 * (this.N - 2) / this.N;\n\t}",
"public static double getFuncValue(double x){\n return Math.sin(x);\r\n }",
"public double getRadians() {\r\n return degreeNum * (Math.PI / 180.0);\r\n }",
"double getAngle(int id);",
"private static double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }",
"private static double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }",
"private static double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }",
"public static double to_pi(double rad) {\n double r = to_2pi(rad);\n if (r > Math.PI) \n return r-twopi;\n else {\n return r;\n }\n }",
"public static double \t\tsinh(double _x) {\n\t\treturn 0.5D * (Math.exp(_x) - Math.exp(- _x));\n\t}",
"public double getAngle() {\n if (r == 0) {\n if (i == 0)\n return 0;// error?\n if (i > 0)\n return p2;\n else\n return -p2;\n }\n double d = Math.atan(i / r);\n if (r >= 0) {\n return d;\n }\n if (i >= 0)\n return Math.PI + d;\n return d + Math.PI;\n }",
"public static double degreeToRadians(double num) { return (num*0.0174533); }",
"private static double deg2rad(double deg) {\r\n\t\treturn (deg * Math.PI / 180.0);\r\n\t}",
"private static double deg2rad(double deg) {\r\n\t\treturn (deg * Math.PI / 180.0);\r\n\t}",
"private double getAngle() {\n double normal= Math.sqrt(((getgAxis(ADXL345_I2C.Axes.kX))*(getgAxis(ADXL345_I2C.Axes.kX)))+((getgAxis(ADXL345_I2C.Axes.kY))*(getgAxis(ADXL345_I2C.Axes.kY))));\n\n return MathUtils.atan(normal / getgAxis(ADXL345_I2C.Axes.kZ));\n }",
"@Test\n\tvoid toRadiansConversionTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 180;\n\t\tdouble actual = 3.141592653589793;\n\t\tdouble result = TrigLib.sine(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}",
"public double nextAngle()\n {\n return nextAngle();\n }",
"private double getCos(int rot) {\r\n\t\treturn Math.cos(Math.toRadians(rot));\r\n\t}",
"private double deg2rad(double deg) {\n\t\treturn (deg * Math.PI / 180.0);\n\t}",
"public static double getAngle() {\n return NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"ts\").getDouble(0);\n }",
"private double rad2deg(double rad) {\r\n return (rad * 180.0 / Math.PI);\r\n }",
"public double trigonometric(double value, Operator trigType) {\n switch (trigType) {\n case SIN -> { return Math.sin(StrictMath.toRadians(value)); }\n case COS -> { return Math.cos(StrictMath.toRadians(value)); }\n case TAN -> { return Math.tan(StrictMath.toRadians(value)); }\n default -> { return Double.NaN; }\n }\n }",
"private double rad2deg(double rad) {\n return (rad * 180 / Math.PI);\n }",
"public double cos(double number);",
"private double rad2deg(double rad) {\r\n\t\t\treturn (rad * 180 / Math.PI);\r\n\t\t}",
"private static double deg2rad(double deg) {\n\t\treturn (deg * Math.PI / 180.0);\n\t}",
"private static double deg2rad(double deg) {\n\t\treturn (deg * Math.PI / 180.0);\n\t}",
"public double getAngle() { return angle; }",
"private double getAngle()\n {\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return angles.firstAngle;\n }",
"private double rad2deg(double rad) {\r\n return (rad * 180.0 / Math.PI);\r\n }",
"public double circumference() {\r\n\t\treturn 2 * PI * radius;\r\n\t}",
"private static double radToDeg(float rad)\r\n/* 30: */ {\r\n/* 31:39 */ return rad * 180.0F / 3.141592653589793D;\r\n/* 32: */ }",
"public double getRotationAngleInRadians() {\n return Math.toRadians(rotationAngle);\n }",
"private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}",
"public double getAngle () {\n return super.getAngle() % 360D;\n }",
"private static double calculateSekante(double left, double right) {\n\n\t\t// if there was only a small change in angle , should be unnecessary\n\t\tif (Math.abs(newangle) < deviationAngle) {\n\t\t\tdistance = (left + right) / 2.0;\n\t\t\t// isLine = false;\n\t\t\treturn distance;\n\t\t}\n\t\t// compute radius\n\n\t\tdouble r = 0.5 * (left + right) / newangle;\n\t\tradius = r;\n\n\t\tInputHandler.stepForward(\"ra.\" + radius);\n\n\t\t// compute distance with the center pos\n\t\tdistance = 2.0 * (r) * Math.sin(newangle / 2.0);\n\n\t\treturn (distance);\n\t}",
"public static double toRadians(double angdeg) {\n return angdeg * ((2 * PI) / 360.0);\n }",
"public float perimetro(){\r\n return 2*(float)Math.PI*radio;\r\n }",
"public static double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }",
"public static float getAngle(float x, float y)\n\t{\n\t\treturn MathUtils.atan2(y, x) * MathUtils.radiansToDegrees - 90;\n\t}",
"private double calculaPerimetro(){\r\n double perimetro;\r\n perimetro=(float) ((2*(cir.getY()-cir.getX()))*Math.PI);\r\n return perimetro;\r\n }"
] | [
"0.7698675",
"0.7658577",
"0.747728",
"0.7152769",
"0.7123799",
"0.70340115",
"0.69854563",
"0.6954412",
"0.6798659",
"0.6745782",
"0.66827786",
"0.668191",
"0.6679672",
"0.6673103",
"0.66097903",
"0.65967",
"0.6589407",
"0.64977515",
"0.6485657",
"0.64528346",
"0.63658625",
"0.6364622",
"0.63445246",
"0.63398504",
"0.63398504",
"0.6337304",
"0.6264498",
"0.62151533",
"0.6210149",
"0.6204239",
"0.6174075",
"0.6142412",
"0.61218417",
"0.6110185",
"0.61030966",
"0.6093411",
"0.608072",
"0.6050702",
"0.6034006",
"0.5992787",
"0.5991572",
"0.58808565",
"0.5879529",
"0.58715636",
"0.5800252",
"0.57992566",
"0.5756155",
"0.5750062",
"0.5740731",
"0.5722289",
"0.57221335",
"0.57192427",
"0.5715133",
"0.5712926",
"0.5711194",
"0.56953216",
"0.56953216",
"0.56893986",
"0.56837785",
"0.5676401",
"0.5674256",
"0.5670827",
"0.56593",
"0.56488526",
"0.56438965",
"0.56438965",
"0.56438965",
"0.56355256",
"0.5620968",
"0.5612906",
"0.56086737",
"0.55995786",
"0.55995786",
"0.55909675",
"0.5580511",
"0.557424",
"0.5571799",
"0.5567131",
"0.55572087",
"0.55562615",
"0.5549199",
"0.554541",
"0.5519987",
"0.5518943",
"0.5514695",
"0.5514695",
"0.55060333",
"0.5501182",
"0.5498044",
"0.5495407",
"0.5484431",
"0.54810154",
"0.54779357",
"0.5465423",
"0.5457594",
"0.5449946",
"0.5448273",
"0.5448228",
"0.5447823",
"0.54470307"
] | 0.8094332 | 0 |
/ recycle connection pool | public void recycle(SnRpcConnection connection) throws Throwable {
if (null != connection) {
pool.returnObject(connection);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private synchronized void recycleConnection(Connection conn) throws SQLException{\n\t\tif ( !idlePool.contains(conn) ){\n\t\t\tactiveConnectionSemaphore.release();\n\t\t\tidlePool.addLast( conn );\n\t\t} \n\t}",
"void closeConnectionsPool();",
"public void recycle() {\n// synchronized (sPoolSync) {\n// if (sPoolSize < MAX_POOL_SIZE) {\n clearForRecycle();\n// next = sPool;\n// sPool = this;\n// sPoolSize++;\n// }\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 static void shutdownConnPool() {\n\t\ttry {\n\t\t\tBoneCP connectionPool = SQLDataBaseConnector.getConnectionPool();\n\t\t\tif (connectionPool != null) {\n\t\t\t\tconnectionPool.shutdown(); // this method must be called only\n\t\t\t\t\t\t\t\t\t\t\t// once when the application stops.\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void shutdownConnPool() {\n\n\t\ttry {\n\t\t\tBoneCP connectionPool = ConnectionManager.getConnectionPool();\n\t\t\tif (connectionPool != null) {\n\t\t\t\tconnectionPool.shutdown(); \n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t\tthrow new SystemException(\"Shutting Down DB Connection Pool\",e,SystemCode.UNABLE_TO_EXECUTE);\t\n\t\t}\n\t}",
"public static void rebuildPool() throws SQLException {\n // Close pool connections when plugin disables\n if (poolMgr != null) {\n poolMgr.dispose();\n }\n poolMgr = new GameModeInventoriesPoolManager(dataSource, 10);\n }",
"public static void disconnect() {\n \t\tconnPool.stop();\n \t}",
"private void initPool() throws SQLException {\n\t\tint POOL_SIZE = 90;\n\t\tthis.connectionPool = new LinkedBlockingQueue<>(POOL_SIZE);\n\t\tfor(int i = 0; i < POOL_SIZE; i++) {\n\t\t\tConnection con = DriverManager.getConnection(dburl, user, password);\n\t\t\tconnectionPool.offer(con);\n\t\t}\n\t}",
"public synchronized void emptyPool(){\n // Iterate over the entire pool closing the JDBC connections\n for(int x=0; x<pool.size();x++){\n PooledConnection pcon = (PooledConnection)pool.elementAt(x);\n //If the PooledConnection is not in use, close it.\n if(pcon.inUse() == false){\n pcon.close();\n }\n else{\n // If it's still in use, sleep 30 secs and force close\n try{\n java.lang.Thread.sleep(30000);\n pcon.close();\n }catch(InterruptedException ie){\n System.err.println(ie.getMessage() + \" in ConnectionPool.emptyPool()\");\n }\n }\n }\n }",
"public Connection getConnection() {\n\n\t\tConnection conn=null;\n\n\t\tif(available){\n\t\t\tboolean gotOne = false;\n\n\t\t\tfor(int outerloop=1; outerloop<=10; outerloop++) {\n\n\t\t\t\ttry {\n\t\t\t\t\tint loop=0;\n\t\t\t\t\tint roundRobin = connLast + 1;\n\t\t\t\t\tif(roundRobin >= currConnections) roundRobin=0;\n\n\t\t\t\t\tdo {\n\t\t\t\t\t\tsynchronized(connStatus) {\n\t\t\t\t\t\t\tif((connStatus[roundRobin] < 1) &&\n\t\t\t\t\t\t\t\t\t(! connPool[roundRobin].isClosed())) {\n\t\t\t\t\t\t\t\tconn = connPool[roundRobin];\n\t\t\t\t\t\t\t\tconnStatus[roundRobin]=1;\n\t\t\t\t\t\t\t\tconnLockTime[roundRobin] =\n\t\t\t\t\t\t\t\t\t\tSystem.currentTimeMillis();\n\t\t\t\t\t\t\t\tconnLast = roundRobin;\n\t\t\t\t\t\t\t\tgotOne = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tloop++;\n\t\t\t\t\t\t\t\troundRobin++;\n\t\t\t\t\t\t\t\tif(roundRobin >= currConnections) roundRobin=0;\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\twhile((gotOne==false)&&(loop < currConnections));\n\n\t\t\t\t}\n\t\t\t\tcatch (SQLException e1) {\n\t\t\t\t\tlog.println(\"Error: \" + e1);\n\t\t\t\t}\n\n\t\t\t\tif(gotOne) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tsynchronized(this) { // Add new connections to the pool\n\t\t\t\t\t\tif(currConnections < maxConns) {\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcreateConn(currConnections);\n\t\t\t\t\t\t\t\tcurrConnections++;\n\t\t\t\t\t\t\t} catch(SQLException e) {\n\t\t\t\t\t\t\t\tif(debugLevel > 0) {\n\t\t\t\t\t\t\t\t\tlog.println(\"Error: Unable to create new connection: \" + e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttry { Thread.sleep(2000); }\n\t\t\t\t\tcatch(InterruptedException e) {}\n\t\t\t\t\tif(debugLevel > 0) {\n\t\t\t\t\t\tlog.println(\"-----> Connections Exhausted! Will wait and try again in loop \" +\n\t\t\t\t\t\t\t\tString.valueOf(outerloop));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} // End of try 10 times loop\n\n\t\t} else {\n\t\t\tif(debugLevel > 0) {\n\t\t\t\tlog.println(\"Unsuccessful getConnection() request during destroy()\");\n\t\t\t}\n\t\t} // End if(available)\n\n\t\tif(debugLevel > 2) {\n\t\t\tlog.println(\"Handing out connection \" +\n\t\t\t\t\tidOfConnection(conn) + \" --> \" +\n\t\t\t\t\t(new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ss a\")).format(new java.util.Date()));\n\t\t}\n\n\t\treturn conn;\n\n\t}",
"void destroy() throws CouldNotDestroyConnectionPoolException, InterruptedException;",
"@Override\r\n\tpublic Connection getConnection() throws SQLException {\n\t\tif(listConnection.size() > 0){\r\n\t\t\tfinal Connection conn = listConnection.removeFirst();\r\n\t\t\treturn (Connection) Proxy.newProxyInstance(JdbcPool.class.getClassLoader(),\r\n\t\t\t\t\tconn.getClass().getInterfaces(), \r\n\t\t\t\t\tnew InvocationHandler() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tif(!method.getName().equals(\"close\")){\r\n\t\t\t\t\t\t\t\treturn method.invoke(conn, args);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tlistConnection.add(conn);\r\n\t\t\t\t\t\t\t\treturn null;\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}else{\r\n\t\t\tthrow new RuntimeException(\"对不起,数据库忙\");\r\n\t\t}\r\n\t}",
"@Override\r\n\t\tpublic void close() throws SQLException {\n\t\t\t\r\n\t\t\tJdbcPool.list.add(this.conn);\r\n\t\t\tSystem.out.println(\"�и�connection�ͷ���,�ص����ӳ�����list��!��ǰ���ӳ���connection������\" + list.size());\r\n\t\t}",
"void destroy() throws ConnectionPoolDataSourceException;",
"private void closeIdleTimeoutConnection() {\r\n if (poolState.get() == POOL_NORMAL) {\r\n PooledConnection[] array = connArray;\r\n for (int i = 0, len = array.length; i < len; i++) {\r\n PooledConnection pConn = array[i];\r\n int state = pConn.state;\r\n if (state == CONNECTION_IDLE && !existBorrower()) {\r\n boolean isTimeoutInIdle = (currentTimeMillis() - pConn.lastAccessTime - poolConfig.getIdleTimeout() >= 0);\r\n if (isTimeoutInIdle && ConnStUpd.compareAndSet(pConn, state, CONNECTION_CLOSED)) {//need close idle\r\n removePooledConn(pConn, DESC_REMOVE_IDLE);\r\n tryToCreateNewConnByAsyn();\r\n }\r\n } else if (state == CONNECTION_USING) {\r\n ProxyConnectionBase proxyConn = pConn.proxyConn;\r\n boolean isHoldTimeoutInNotUsing = currentTimeMillis() - pConn.lastAccessTime - poolConfig.getHoldTimeout() >= 0;\r\n if (isHoldTimeoutInNotUsing) {//recycle connection\r\n if (proxyConn != null) {\r\n proxyConn.trySetAsClosed();\r\n } else {\r\n removePooledConn(pConn, DESC_REMOVE_BAD);\r\n tryToCreateNewConnByAsyn();\r\n }\r\n }\r\n } else if (state == CONNECTION_CLOSED) {\r\n removePooledConn(pConn, DESC_REMOVE_CLOSED);\r\n tryToCreateNewConnByAsyn();\r\n }\r\n }\r\n ConnectionPoolMonitorVo vo = this.getMonitorVo();\r\n commonLog.debug(\"BeeCP({})idle:{},using:{},semaphore-waiter:{},wait-transfer:{}\", poolName, vo.getIdleSize(), vo.getUsingSize(), vo.getSemaphoreWaiterSize(), vo.getTransferWaiterSize());\r\n }\r\n }",
"public static void returnConnection( Connection conn ) {\n \t\tconnPool.returnConnection( conn );\n \t}",
"private ConnectionPool() {\n connections = new LinkedBlockingQueue<>(DEFAULT_POOL_SIZE);\n this.init();\n }",
"@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 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 interface Pool {\n public PooledConnection getConnection();\n\n public void createConnection(int ocunt);\n}",
"public Connection getConnection() throws SQLException {\r\n if (poolState.get() != POOL_NORMAL) throw PoolCloseException;\r\n\r\n //0:try to get from threadLocal cache\r\n WeakReference<Borrower> ref = threadLocal.get();\r\n Borrower borrower = (ref != null) ? ref.get() : null;\r\n if (borrower != null) {\r\n PooledConnection pConn = borrower.lastUsedConn;\r\n if (pConn != null && pConn.state == CONNECTION_IDLE && ConnStUpd.compareAndSet(pConn, CONNECTION_IDLE, CONNECTION_USING)) {\r\n if (testOnBorrow(pConn)) return createProxyConnection(pConn, borrower);\r\n\r\n borrower.lastUsedConn = null;\r\n }\r\n } else {\r\n borrower = new Borrower();\r\n threadLocal.set(new WeakReference<Borrower>(borrower));\r\n }\r\n\r\n\r\n final long deadlineNanos = nanoTime() + defaultMaxWaitNanos;\r\n try {\r\n if (!borrowSemaphore.tryAcquire(this.defaultMaxWaitNanos, NANOSECONDS))\r\n throw RequestTimeoutException;\r\n } catch (InterruptedException e) {\r\n throw RequestInterruptException;\r\n }\r\n\r\n try {//borrowSemaphore acquired\r\n //1:try to search one from array\r\n PooledConnection pConn;\r\n PooledConnection[] tempArray = connArray;\r\n for (int i = 0, l = tempArray.length; i < l; i++) {\r\n pConn = tempArray[i];\r\n if (pConn.state == CONNECTION_IDLE && ConnStUpd.compareAndSet(pConn, CONNECTION_IDLE, CONNECTION_USING) && testOnBorrow(pConn))\r\n return createProxyConnection(pConn, borrower);\r\n }\r\n\r\n //2:try to create one directly\r\n if (connArray.length < poolMaxSize && (pConn = createPooledConn(CONNECTION_USING)) != null)\r\n return createProxyConnection(pConn, borrower);\r\n\r\n //3:try to get one transferred connection\r\n boolean failed = false;\r\n SQLException failedCause = null;\r\n Thread cThread = borrower.thread;\r\n borrower.state = BORROWER_NORMAL;\r\n waitQueue.offer(borrower);\r\n int spinSize = (waitQueue.peek() == borrower) ? maxTimedSpins : 0;\r\n\r\n do {\r\n Object state = borrower.state;\r\n if (state instanceof PooledConnection) {\r\n pConn = (PooledConnection) state;\r\n if (transferPolicy.tryCatch(pConn) && testOnBorrow(pConn)) {\r\n waitQueue.remove(borrower);\r\n return createProxyConnection(pConn, borrower);\r\n }\r\n } else if (state instanceof SQLException) {\r\n waitQueue.remove(borrower);\r\n throw (SQLException) state;\r\n }\r\n\r\n if (failed) {\r\n if (borrower.state == state)\r\n BwrStUpd.compareAndSet(borrower, state, failedCause);\r\n } else if (state instanceof PooledConnection) {\r\n borrower.state = BORROWER_NORMAL;\r\n yield();\r\n } else {//here:(state == BORROWER_NORMAL)\r\n long timeout = deadlineNanos - nanoTime();\r\n if (timeout > 0L) {\r\n if (spinSize > 0) {\r\n --spinSize;\r\n } else if (borrower.state == BORROWER_NORMAL && timeout > spinForTimeoutThreshold && BwrStUpd.compareAndSet(borrower, BORROWER_NORMAL, BORROWER_WAITING)) {\r\n parkNanos(timeout);\r\n if (cThread.isInterrupted()) {\r\n failed = true;\r\n failedCause = RequestInterruptException;\r\n }\r\n if (borrower.state == BORROWER_WAITING)\r\n BwrStUpd.compareAndSet(borrower, BORROWER_WAITING, failed ? failedCause : BORROWER_NORMAL);//reset to normal\r\n }\r\n } else {//timeout\r\n failed = true;\r\n failedCause = RequestTimeoutException;\r\n if (borrower.state == BORROWER_NORMAL)\r\n BwrStUpd.compareAndSet(borrower, state, failedCause);//set to fail\r\n }\r\n }//end (state == BORROWER_NORMAL)\r\n } while (true);//while\r\n } finally {\r\n borrowSemaphore.release();\r\n }\r\n }",
"void init() throws ConnectionPoolException {\r\n\t\tfreeConnection = new ArrayBlockingQueue<Connection>(poolsize);\r\n\t\tbusyConnection = new ArrayBlockingQueue<Connection>(poolsize);\r\n\t\ttry {\r\n\t\t\tClass.forName(driver);\r\n\t\t\tfor(int i = 0; i < poolsize; i++){\r\n\t\t\t\tConnection connection = DriverManager.getConnection(url, user, password);\r\n\t\t\t\tfreeConnection.add(connection);\r\n\t\t\t}\r\n\t\t\tflag = true;\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tlogger.error(ErrorMessageDAO.ERROR_DB_DRIVER + e);\r\n\t\t\tthrow new ConnectionPoolException(ErrorMessageDAO.ERROR_DB_DRIVER);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(ErrorMessageDAO.ERROR_SQL + e);\r\n\t\t\tthrow new ConnectionPoolException(ErrorMessageDAO.ERROR_SQL);\r\n\t\t}\r\n\t}",
"public void cerrarPool() {\n if (pool != null) {\n pool.shutdown();\n }\n }",
"private void decrConnectionCount() {\n connectionCount.dec();\n }",
"public void init(BeeDataSourceConfig config) throws SQLException {\r\n if (poolState.get() == POOL_UNINIT) {\r\n checkProxyClasses();\r\n if (config == null) throw new SQLException(\"Configuration can't be null\");\r\n poolConfig = config.check();//why need a copy here?\r\n\r\n poolName = !isBlank(config.getPoolName()) ? config.getPoolName() : \"FastPool-\" + poolNameIndex.getAndIncrement();\r\n commonLog.info(\"BeeCP({})starting....\", poolName);\r\n\r\n poolMaxSize = poolConfig.getMaxActive();\r\n connFactory = poolConfig.getConnectionFactory();\r\n connectionTestTimeout = poolConfig.getConnectionTestTimeout();\r\n connectionTester = new SQLQueryTester(poolConfig.isDefaultAutoCommit(), poolConfig.getConnectionTestSQL());\r\n defaultMaxWaitNanos = MILLISECONDS.toNanos(poolConfig.getMaxWait());\r\n delayTimeForNextClearNanos = MILLISECONDS.toNanos(poolConfig.getDelayTimeForNextClear());\r\n connectionTestInterval = poolConfig.getConnectionTestInterval();\r\n createInitConnections(poolConfig.getInitialSize());\r\n\r\n if (poolConfig.isFairMode()) {\r\n poolMode = \"fair\";\r\n transferPolicy = new FairTransferPolicy();\r\n conUnCatchStateCode = transferPolicy.getCheckStateCode();\r\n } else {\r\n poolMode = \"compete\";\r\n transferPolicy = new CompeteTransferPolicy();\r\n conUnCatchStateCode = transferPolicy.getCheckStateCode();\r\n }\r\n\r\n exitHook = new ConnectionPoolHook();\r\n Runtime.getRuntime().addShutdownHook(exitHook);\r\n borrowSemaphoreSize = poolConfig.getBorrowSemaphoreSize();\r\n borrowSemaphore = new Semaphore(borrowSemaphoreSize, poolConfig.isFairMode());\r\n idleSchExecutor.setKeepAliveTime(15, SECONDS);\r\n idleSchExecutor.allowCoreThreadTimeOut(true);\r\n idleCheckSchFuture = idleSchExecutor.scheduleAtFixedRate(new Runnable() {\r\n public void run() {// check idle connection\r\n closeIdleTimeoutConnection();\r\n }\r\n }, 1000, config.getIdleCheckTimeInterval(), TimeUnit.MILLISECONDS);\r\n\r\n registerJmx();\r\n commonLog.info(\"BeeCP({})has startup{mode:{},init size:{},max size:{},semaphore size:{},max wait:{}ms,driver:{}}\",\r\n poolName,\r\n poolMode,\r\n connArray.length,\r\n config.getMaxActive(),\r\n borrowSemaphoreSize,\r\n poolConfig.getMaxWait(),\r\n poolConfig.getDriverClassName());\r\n\r\n poolState.set(POOL_NORMAL);\r\n this.setDaemon(true);\r\n this.setName(\"PooledConnectionAdd\");\r\n this.start();\r\n } else {\r\n throw new SQLException(\"Pool has initialized\");\r\n }\r\n }",
"public static void reset() {\n // shutdown thread-pools\n HystrixThreadPool.Factory.shutdown();\n _reset();\n }",
"public void closeIdleConnections()\n {\n \n }",
"@Test\n public void testIdleReconnect() throws Exception {\n datasource.getPoolProperties().setTimeBetweenEvictionRunsMillis(20000);\n datasource.getPoolProperties().setMaxAge( 1000 );\n datasource.getPoolProperties().setTestWhileIdle(false);\n datasource.getPoolProperties().setMaxIdle(1);\n datasource.getPoolProperties().setInitialSize(0);\n datasource.getPoolProperties().setMinIdle(1);\n\n Assert.assertEquals(0,datasource.getPool().getReconnectedCount());\n datasource.getConnection().close();\n Assert.assertEquals(0,datasource.getPool().getReconnectedCount());\n Assert.assertEquals(\"Pool should have 1 idle.\", 1, datasource.getIdle());\n Thread.sleep(4000);\n Assert.assertEquals(\"Pool should have 1 idle.\", 1, datasource.getIdle());\n Assert.assertTrue(datasource.getPool().getReconnectedCount()>0);\n }",
"public Boolean tcpReuseConn();",
"Connection createConnection(ExecutorService pool);",
"public static void closePool(){\n\t\t\n\t\t// TODO signal to kill all pool.\n\t\t\n\t}",
"public synchronized Connection getConnection() throws Exception{\n System.err.println(\"START ConnectionPool.getConnection()\");\n PooledConnection pcon = null;\n System.err.print(\"pool size = \");\n System.err.println(pool.size());\n // Find a connection not in use\n for(int x=0; x<pool.size();x++){\n pcon = (PooledConnection)pool.elementAt(x);\n //Check to see if this connection is in use\n if(!pcon.inUse()){\n // Mark it as in use\n pcon.setInUse(true);\n // Return the JDBC conn stored in the PooledConnection object\n return pcon.getConnection();\n }\n }\n //Could not find a free connection, create and add a new one\n try{\n //Create a new JDBC Connection\n Connection con = createConnection();\n //Create a new PooledConnection, passing it the JDBC Connection\n pcon = new PooledConnection(con);\n //Mark the connection in use\n pcon.setInUse(true);\n //Add the new PooledConnection object to the pool\n pool.addElement(pcon);\n }catch(Exception e){\n System.err.println(e.getMessage() + \" in ConnectionPool.getConnection()\");\n }\n System.err.println(\"END ConnectionPool.getConnection()\");\n return pcon.getConnection();\n }",
"public void recycle(ClientConnection conn) {\n synchronized (queue) {\n if (pipelining) {\n // Maybe the connection can be reused\n Waiter waiter = queue.getNextWaiter();\n if (waiter != null) {\n Context context = waiter.context;\n if (context == null) {\n context = conn.getContext();\n }\n context.runOnContext(v -> deliverStream(conn, waiter));\n }\n }\n }\n }",
"public synchronized void close() throws SQLException {\n\t\tif (isClosedInternal()) {\n\t\t\t// already close\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tboolean isUnderlyingConnectionClosed;\n\t\t\n\t\ttry {\n\t\t\tisUnderlyingConnectionClosed = this.getDelegateInternal().isClosed();\n\t\t} catch (SQLException e) {\n\t\t\ttry {\n\t\t\t\tpool.invalidateObject(this); // remove from pool\n\t\t\t} catch (IllegalStateException ise) {\n\t\t\t\t// probably pool is closed\n\t\t\t\tpassivateAdnClose();\n\t\t\t} catch (Exception ie) {\n\t\t\t\t// DO NOTHING, exception will be thrown\n\t\t\t}\n\t\t\tthrow new SQLException(\"Cannot close connection (isClosed throw exception\", e);\n\t\t}\n\t\t\n\t\tif (isUnderlyingConnectionClosed) {\n\t\t\t// Abnormal close: underlying connection close unexpectedly\n\t\t\t// must destroy this proxy\n\t\t\ttry {\n\t\t\t\tthis.pool.invalidateObject(this);\n\t\t\t} catch (IllegalStateException ise) {\n\t\t\t\t// probably pool is closed\n\t\t\t\tpassivateAdnClose();\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new SQLException(\"Cannot close connection (invalidate object failed)\", e);\n\t\t\t}\n\t\t} else {\n\t\t\t// Normal close: return proxy to pool\n\t\t\ttry {\n\t\t\t\tthis.pool.returnObject(this);\n\t\t\t} catch (IllegalStateException ise) {\n\t\t\t\t// probably pool is closed\n\t\t\t\tpassivateAdnClose();\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new SQLException(\"Cannot close connection (return to pool failed)\", e);\n\t\t\t}\n\t\t}\n\t}",
"public synchronized Connection getConnection() throws CouponSystemException {\n\t\tif (poolClosed) {\n\t\t\tthrow new CouponSystemException(\"getConnection failed ; pool closed\");\n\t\t}\n\t\twhile (connections.isEmpty()) {\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tIterator<Connection> it = connections.iterator();\n\t\tConnection con = it.next();\n\t\tit.remove();\n\t\treturn con;\n\t}",
"public static void releaseRecycledViewPool() {\n sRecycledViewPool.clear();\n }",
"public void recycle() {\n LOG.trace(\"enter HttpMethodBase.recycle()\");\n\n releaseConnection();\n\n path = null;\n followRedirects = false;\n doAuthentication = true;\n realm = null;\n proxyRealm = null;\n queryString = null;\n getRequestHeaderGroup().clear();\n getResponseHeaderGroup().clear();\n getResponseTrailerHeaderGroup().clear();\n statusLine = null;\n used = false;\n http11 = true;\n responseBody = null;\n recoverableExceptionCount = 0;\n inExecute = false;\n doneWithConnection = false;\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}",
"public void recycle();",
"public void forceClose()\n {\n if (_isClosed)\n return;\n \n _isClosed = true;\n \n if (log.isLoggable(Level.FINE))\n log.fine(\"closing pool \" + getName());\n }",
"public PoolBoneCpManager() {\n pool = null;\n }",
"@Override\n\tpublic void recycle()\n\t{\n\t}",
"@Test\n\tpublic void testReleaseConnection() throws SQLException {\n\t\tConnection connection = pool.getConnection(config.getConnectionTimeout());\n\t\tint count = pool.idleConnectionsCount();\n\t\tpool.releaseConnection(connection);\n\t\tAssert.assertEquals(count + 1, pool.idleConnectionsCount());\n\t\tAssert.assertEquals(((ConnectionItem) connection).state().get(), ConnectionItem.STATE_NOT_IN_USE);\n\t}",
"private DataSource() {\n Connection tmpConn = null;\n while(tmpConn == null) {\n try {\n tmpConn = DriverManager.getConnection(CONNECTION_STRING);\n } catch(SQLException e) {\n print(\"Couldn't connect to \" + DB_NAME + \" database: \" + e.getMessage());\n print(\"Trying again in three seconds...\");\n try {\n Thread.sleep(3000);\n } catch(InterruptedException ie) {}\n }\n }\n conn = tmpConn;\n }",
"@Override\n\tpublic void reconnect() {\n\n\t}",
"@Override\n\tpublic void setConnectionPoolSize(int arg0) {\n\n\t}",
"OMMPool getPool();",
"private void reEstablishConnections() {\n// System.out.println(\"Impossible to create overlay, starting over...\");\n for (NodeRecord node : registeredNodes.values()) {\n node.getNodesToConnectToList().clear();\n node.resetNumberOfConnections();\n }\n createOverlay();\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 }",
"private void setJedisFromPool() {\n\t\tjedis = jedisPool.getResource();\n\t}",
"public static void connect() {\n \t\tconnPool.start();\n \t}",
"public void clear() {\n pool.clear();\n }",
"public void dispose()\n {\n while( m_count > 0 )\n {\n int i = m_count - 1;\n try\n {\n m_factory.decommission( m_pool[ i ] );\n }\n catch( Exception e )\n {\n // To be backwards compatible, we have to support the logger having not been set.\n if( ( getLogger() != null ) && ( getLogger().isDebugEnabled() ) )\n {\n getLogger().debug( \"Error decommissioning object\", e );\n }\n }\n m_pool[ i ] = null;\n m_count--;\n }\n }",
"public static void releaseConnection(){\n Connection conn = THREAD_CONNECTION.get();\n if(conn != null){\n try {\n if(!conn.isClosed()){\n conn.close();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n LOGGER.error(\"releaseConnection error\", e);\n throw new RuntimeException(e);\n } finally {\n THREAD_CONNECTION.remove();\n }\n }\n }",
"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 }",
"private void init() {\n DatabaseInitializer databaseInitializer = new DatabaseInitializer();\n try {\n for (int i = 0; i < DEFAULT_POOL_SIZE; i++) {\n ProxyConnection connection = new ProxyConnection(databaseInitializer.getConnection());\n connections.put(connection);\n }\n } catch (InterruptedException e) {\n logger.log(Level.ERROR, e);\n }\n }",
"private void init() {\n\t\tJedisPoolConfig config = new JedisPoolConfig();\r\n\t\tconfig.setMaxTotal(1024);\r\n\t\tconfig.setMaxIdle(200);\r\n\t\tconfig.setMaxWaitMillis(1000);\r\n\t\tconfig.setTestOnBorrow(false);\r\n\t\tconfig.setTestOnReturn(true);\r\n\t\tString ip = \"sg-redis-new.jo1mjq.0001.apse1.cache.amazonaws.com\";\r\n\t\tint port = 6379;\r\n\t\tjedisPool = new JedisPool(config, ip, port);\r\n\t\tlog.info(\"init redis pool[ip:\" + ip + \",port:\" + port + \"]\");\r\n\t}",
"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 }",
"public static void releaseConnection(Connection con) {\n\t\tinstance.connectionPool.offer(con);\n\t}",
"@Override\n public synchronized void close(final C conn ) {\n if (debug())\n dprint( \"->close: \" + conn ) ;\n\n try {\n final ConnectionState<C> cs = connectionMap.remove( conn );\n\n if (cs == null) return;\n\n int count = cs.busyCount ;\n if (debug())\n dprint( \".close: \" + conn + \" count = \" + count ) ;\n\n if (count == 0)\n totalIdle-- ;\n else\n totalBusy-- ;\n\n final ConcurrentQueue.Handle rh = cs.reclaimableHandle ;\n if (rh != null) {\n if (debug())\n dprint( \".close: \" + conn + \" connection was reclaimable\" ) ;\n\n rh.remove() ;\n }\n\n conn.close() ;\n } finally {\n if (debug())\n dprint( \"<-close: \" + conn ) ;\n }\n }",
"public void closeConnection() {\r\n if (getConnection() != null && StringUtil.isNotBlank(config.getDataSource())\r\n /*&& this.conn.getConnection() instanceof PooledConnection */) {\r\n LOG.ok(\"Close the pooled connection\");\r\n dispose();\r\n }\r\n }",
"private void closeConnection () {\n setConnection (null);\n }",
"private void rebind() {\n\t\tnotaryServers = Client.locateNotaries();\n\t\tconnectToUsers();\n\t\t//lookUpUsers();\n\n\t}",
"public void closePool() {\n threadPool.destroy();\n }",
"public void recycle()\n\t{\n\t\tparams = null;\n\t\tconfigured = false;\n\t\tattributes = null;\n\t\tmyConfig = null;\n\t\tpreviousRequest = null;\n\t\tmyModel = null;\n\t\tvalidationErrors = new HashMap();\n\t\theaders = null;\n\t\tsource = null;\n\t\tlocale = null;\n\n\t\tif (log.isDebugEnabled())\n\t\t{\n\t\t\tlog.debug(\"Request \" + toString() + \" recycled\");\n\t\t}\n\t}",
"private void closeConnection() {\n\t\t_client.getConnectionManager().shutdown();\n\t}",
"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 }",
"protected void configureConnectionPool() {\n JdbcPropertyAdapter adapter = getPropertyAdapter(dbType, properties);\n JdbcConnectionProvider cp = new JdbcConnectionProvider(this.translator, adapter);\n this.connectionPool = new PoolConnectionProvider(cp, this.maxConnectionPoolSize);\n this.transactionProvider = new SimpleTransactionProvider(this.connectionPool);\n }",
"public void reconnect(String name)\n {\n if(alias.containsKey(name))\n {\n name = alias.get(name);\n }\n Context ctx = context.remove(name);\n try\n {\n ctx.close();\n }\n catch(NamingException e)\n {\n // swallow exception\n }\n }",
"@Override\r\n\tpublic void connect(URL url) throws RemoteException {\n\t\tclientPool=ClientPoolManager.INSTANCE.getClientPool(url);\r\n\r\n\t}",
"public void shutdown() {\n for (Connection connection : connections) { //Try closing all connections\n closeConnection(connection);\n }\n }",
"public void reconnected() { }",
"public final void recycle(PooledConnection pConn) {\r\n transferPolicy.beforeTransfer(pConn);\r\n Iterator<Borrower> iterator = waitQueue.iterator();\r\n\r\n while (iterator.hasNext()) {\r\n Borrower borrower = iterator.next();\r\n do {\r\n //pooledConnection has hold by another thread\r\n if (pConn.state != conUnCatchStateCode) return;\r\n\r\n Object state = borrower.state;\r\n //current waiter has received one pooledConnection or timeout\r\n if (!(state instanceof BorrowerState)) break;\r\n if (BwrStUpd.compareAndSet(borrower, state, pConn)) {//transfer successful\r\n if (state == BORROWER_WAITING) unpark(borrower.thread);\r\n return;\r\n }\r\n } while (true);\r\n }//first while loop\r\n\r\n transferPolicy.onFailedTransfer(pConn);\r\n }",
"public ConnectionPoolDataSource createPoolDataSource(CConnection connection);",
"public ConnectionPoolDataSource createPoolDataSource(CConnection connection);",
"public void resetConnection() {\n\t\ttry {\n\t\t\tconnection.close();\n\t\t\tDriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());\n\t\t\tconnection = DriverManager.getConnection(url, username, password);\n\t\t} catch(Exception Ex) {\n\t\t\tSystem.out.println(\"Error connecting to database. Machine Error: \" + Ex.toString());\n\t\t\tEx.printStackTrace();\n\t\t\tSystem.out.println(\"\\nCONNECTION IS REQUIRED: EXITING\");\n\t\t\tSystem.exit(0); // No need to make sure connection is closed since it wasn't made\n\t\t}\n\t}",
"@Override\n public DataSource getDataSource() {\n\n // PostgreSQL does not provide connection pool (as of version 42.1.3) so make one using Apache Commons DBCP \n ds = new BasicDataSource();\n\n // max number of active connections\n Integer maxTotal = AtsSystemProperties.getPropertyAsNumber(\"dbcp.maxTotal\");\n if (maxTotal == null) {\n maxTotal = 8;\n } else {\n log.info(\"Max number of active connections is \"\n + maxTotal);\n }\n ds.setMaxTotal(maxTotal);\n\n // wait time for new connection\n Integer maxWaitMillis = AtsSystemProperties.getPropertyAsNumber(\"dbcp.maxWaitMillis\");\n if (maxWaitMillis == null) {\n maxWaitMillis = 60 * 1000;\n } else {\n log.info(\"Connection creation wait is \"\n + maxWaitMillis\n + \" msec\");\n }\n ds.setMaxWaitMillis(maxWaitMillis);\n\n String logAbandoned = System.getProperty(\"dbcp.logAbandoned\");\n if (logAbandoned != null && (\"true\".equalsIgnoreCase(logAbandoned))\n || \"1\".equalsIgnoreCase(logAbandoned)) {\n String removeAbandonedTimeoutString = System.getProperty(\"dbcp.removeAbandonedTimeout\");\n int removeAbandonedTimeout = (int) ds.getMaxWaitMillis() / (2 * 1000);\n if (!StringUtils.isNullOrEmpty(removeAbandonedTimeoutString)) {\n removeAbandonedTimeout = Integer.parseInt(removeAbandonedTimeoutString);\n }\n log.info(\n \"Will log and remove abandoned connections if not cleaned in \"\n + removeAbandonedTimeout\n + \" sec\");\n // log not closed connections\n ds.setLogAbandoned(true); // issue stack trace of not closed connection\n ds.setAbandonedUsageTracking(true);\n ds.setLogExpiredConnections(true);\n ds.setRemoveAbandonedTimeout(removeAbandonedTimeout);\n ds.setRemoveAbandonedOnBorrow(true);\n ds.setRemoveAbandonedOnMaintenance(true);\n ds.setAbandonedLogWriter(new PrintWriter(System.err));\n }\n ds.setValidationQuery(\"SELECT 1\");\n ds.setDriverClassName(getDriverClass().getName());\n ds.setUsername(user);\n ds.setPassword(password);\n ds.setUrl(getURL());\n return ds;\n }",
"public static Connection getConnection() {\n\n if (concount<conns-1) {\n concount++;\n } else {\n concount=0;\n }\n return con_pool[concount];\n }",
"synchronized void recycle() {\n if (lastAsyncStart == 0) {\n return;\n }\n // Ensure in case of error that any non-container threads that have been\n // paused are unpaused.\n notifyAll();\n asyncCtxt = null;\n state = AsyncState.DISPATCHED;\n lastAsyncStart = 0;\n }",
"@Override\n public void returnConnection(Connection connection) {\n\n boolean closeConnection = false;\n synchronized (connections) {\n if (connections.size() >= 5) { //Close the returned connection if there are already 5 connections in the pool.\n closeConnection = true;\n } else {\n connections.add(connection);\n }\n }\n if (closeConnection) {\n closeConnection(connection);\n }\n }",
"@PreDestroy\n public void close() {\n connectionManagers.values().forEach(ConnectionManager::close);\n }",
"public interface ConnectionManager {\n\tConnection getConnection();\n\tvoid releaseConnection(Connection con);\n}",
"public synchronized void closeExpiredConnections() {\n/* 337 */ if (this.isShutdown.get()) {\n/* */ return;\n/* */ }\n/* 340 */ if (!this.leased) {\n/* 341 */ checkExpiry();\n/* */ }\n/* */ }",
"private void closeInstance(){\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tconn.getConnection().close();\n\t\t\t\n\t\t\tstmt = null;\n\t\t\trs = null;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public static void regenConnection(Connection connection) {\n\t\ttry {\n\t\t\tconnection.abort(Executors.newSingleThreadExecutor());\n\t\t} catch (SQLException ignored) {\n\t\t}\n\t\ttry {\n\t\t\tConnection con;\n\t\t\tcon = DriverManager.getConnection(getInstance().dburl, getInstance().user, getInstance().password);\n\t\t\tgetInstance().connectionPool.offer(con);\n\t\t} catch (SQLException throwables) {\n\t\t\tthrowables.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void run() {\n pool = new JDBCConnectionPool(\n \"org.apache.hive.jdbc.HiveDriver\", \"jdbc:hive2://10.2.216.33:10000\",\n \"\", \"\");\n\n // Get a connection:\n Connection con = pool.checkOut();\n ResultSet set = null;\n try {\n set = con.createStatement().executeQuery(\"show tables\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n System.out.println(Thread.currentThread().getName());\n\n // Use the connection\n\n // Return the connection:\n pool.checkIn(con);\n }",
"public static void setConnectionPool(BoneCP connectionPool) {\n\t\tSQLDataBaseConnector.connectionPool = connectionPool;\n\t}",
"private void recycle() {\n attributes.clear();\n creationTime = 0L;\n expiring = false;\n id = null;\n lastAccessedTime = 0L;\n maxInactiveInterval = -1;\n\n isNew = false;\n valid = false;\n Manager savedManager = manager;\n manager = null;\n\n // Tell our Manager that this Session has been recycled\n if ((savedManager != null) && (savedManager instanceof ManagerBase))\n ((ManagerBase) savedManager).recycle(this);\n //setAuthType(null);\n //notes.clear();\n //setPrincipal(null);\n }",
"int getPoolSize();",
"public DataSourcePool() throws NamingException, \r\n SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException {\r\n InitialContext ctx = new InitialContext();\r\n //DataSource ds =(DataSource)ctx.lookup(\"java:jboss/jdbc/webapp\");\r\n DataSource ds =(DataSource)ctx.lookup(\"java:jboss/datasources/WebApp\");\r\n connection = ds.getConnection();\r\n }",
"protected void disconnect() {\n try {\n if (connection != null) {\n connection.close();\n }\n connection = null;\n queryRunner = null;\n thread = null;\n queries = null;\n } catch (SQLException ex) {\n Logger.getGlobal().log(Level.WARNING, ex.getMessage(), ex);\n }\n }",
"private JedisPool getPool() {\n if (pool == null) {\n JedisPoolConfig config = new JedisPoolConfig();\n config.setMinIdle(poolMinIdle);\n config.setMaxIdle(poolMaxIdle);\n config.setMaxTotal(poolMaxTotal);\n pool = new JedisPool(config, host, port, (int) timeout);\n logger.debug(\"Creando jedisPool@ \" + host + \":\" + port + \". MinIdle/MaxIdle/MaxTotal: \" + poolMinIdle + \"/\" + poolMaxIdle + \"/\" + poolMaxTotal + \". Timeout: \" + timeout);\n }\n return pool;\n }",
"public void closeConnections() {\n for (Object i : connections.keySet().toArray()) {\n connections.get(i).closeConnection();\n }\n\n }",
"public static void disableConnectionReuseIfNecessary() {\n\t\t// HTTP connection reuse which was buggy pre-froyo\n\t\tif (hasHttpConnectionBug()) {\n\t\t\tSystem.setProperty(\"http.keepAlive\", \"false\");\n\t\t}\n\t}",
"public void desconectar(){\n\t\tconn = null;\n\t}",
"public synchronized void decreaseUsersConn() {\r\n\t\tusersConn--;\r\n\t}",
"public void cancelAllClients(){\n clientsPool.shutdownNow();\n }",
"public void close()\n {\n getConnectionManager().shutdown();\n }",
"public interface ConnectionManager\n{\n String ROLE = ConnectionManager.class.getName();\n\n /**\n * Start managing a connection.\n * Management involves accepting connections and farming them out to threads\n * from pool to be handled.\n *\n * @param name the name of connection\n * @param socket the ServerSocket from which to\n * @param handlerFactory the factory from which to aquire handlers\n * @param threadPool the thread pool to use\n * @exception Exception if an error occurs\n */\n void connect( String name,\n ServerSocket socket,\n ConnectionHandlerFactory handlerFactory,\n ThreadPool threadPool )\n throws Exception;\n\n /**\n * Start managing a connection.\n * This is similar to other connect method except that it uses default thread pool.\n *\n * @param name the name of connection\n * @param socket the ServerSocket from which to\n * @param handlerFactory the factory from which to aquire handlers\n * @exception Exception if an error occurs\n */\n void connect( String name,\n ServerSocket socket,\n ConnectionHandlerFactory handlerFactory )\n throws Exception;\n\n /**\n * This shuts down all handlers and socket, waiting for each to gracefully shutdown.\n *\n * @param name the name of connection\n * @exception Exception if an error occurs\n */\n void disconnect( String name )\n throws Exception;\n\n /**\n * This shuts down all handlers and socket.\n * If tearDown is true then it will forcefully shutdown all connections and try\n * to return as soon as possible. Otherwise it will behave the same as\n * void disconnect( String name );\n *\n * @param name the name of connection\n * @param tearDown if true will forcefully tear down all handlers\n * @exception Exception if an error occurs\n */\n void disconnect( String name, boolean tearDown )\n throws Exception;\n}"
] | [
"0.7638424",
"0.7560004",
"0.743772",
"0.700768",
"0.6901019",
"0.6691343",
"0.6642597",
"0.6596791",
"0.6570288",
"0.655006",
"0.653636",
"0.6520299",
"0.6448161",
"0.62781894",
"0.6266406",
"0.6263133",
"0.62602174",
"0.6204365",
"0.6194799",
"0.6174137",
"0.6151545",
"0.61440086",
"0.6136535",
"0.61100286",
"0.6102897",
"0.60960245",
"0.6090877",
"0.608533",
"0.6056896",
"0.60392314",
"0.59793997",
"0.59535456",
"0.59529865",
"0.59342057",
"0.5923202",
"0.5919077",
"0.59168863",
"0.5906384",
"0.59000623",
"0.58994293",
"0.5894111",
"0.5893593",
"0.5846251",
"0.5844013",
"0.5837305",
"0.5827854",
"0.58140093",
"0.5809253",
"0.5801506",
"0.5798389",
"0.5773835",
"0.57736653",
"0.5770597",
"0.57663006",
"0.5764407",
"0.5754664",
"0.57502437",
"0.5745953",
"0.5736814",
"0.5725528",
"0.57242846",
"0.5710122",
"0.56835574",
"0.56830263",
"0.5679303",
"0.5670247",
"0.5653567",
"0.56532544",
"0.5651929",
"0.5636975",
"0.56329906",
"0.5631396",
"0.5626617",
"0.5605944",
"0.5590901",
"0.5590901",
"0.5585714",
"0.5585084",
"0.5582418",
"0.55816925",
"0.5576454",
"0.557094",
"0.5566467",
"0.5565049",
"0.55581325",
"0.55576426",
"0.55547875",
"0.5553805",
"0.5541158",
"0.5534467",
"0.5524639",
"0.55209696",
"0.5520681",
"0.5513529",
"0.55124384",
"0.550771",
"0.5502938",
"0.55024266",
"0.5502076",
"0.55008596"
] | 0.7198179 | 3 |
//////////////////////////////////////////////////////////////////////////////////////////////// Proxy Invocation Handler | @Override
public Object invoke(Object o, Method method, Object[] objects) throws Throwable {
String name = method.getName();
try {
Method proxyMethod = proxyObject.getClass().getMethod(method.getName(), method.getParameterTypes());
return proxyMethod.invoke( proxyObject, objects );
}
catch (NoSuchMethodException e) {
if ( proxyObject instanceof ProxyAccessor ) {
ProxyAccessor access = (ProxyAccessor) proxyObject;
if (( name.startsWith("get") || name.startsWith("is"))
&& objects == null) {
return access._getValueByName(getField(name));
}
else if (name.startsWith("set")
&& objects != null && objects.length==1) {
access._setValueByName(getField(name), objects[0]);
return null;
}
}
throw e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Proxy(InvocationHandler h) { }",
"Proxy getProxy();",
"public static void main(String[] args) {\n Executor executor = new Executor();\n InvocationHandler handler = new DynamicProxy(executor);\n IProxy proxy = (IProxy) Proxy.newProxyInstance(handler.getClass().getClassLoader(), executor.getClass().getInterfaces(), handler);\n proxy.action();\n }",
"@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tSystem.out.println(\"do some work before proxy\");\n\t\tObject invokeObj = method.invoke(delegator, args);\n\t\tSystem.out.println(\"do some work after proxy\");\n\t\treturn invokeObj;\n\t}",
"@Override\n public Object invoke(Object proxy, Method method, Object[] args)\n throws Throwable {\n if (method.getDeclaringClass() == Object.class) {\n return method.invoke(this, args);\n }\n ServiceMethod<Object, Object> serviceMethod =\n (ServiceMethod<Object, Object>) loadServiceMethod(method);\n ServiceCall<Object> serviceCall = new ServiceCall<>(serviceMethod, args);\n return serviceMethod.adapt(serviceCall, args);\n }",
"public static interface Proxy {\r\n\t\t/** \r\n\t\t * Returns self of current context.\r\n\t\t * @return self of current context.\r\n\t\t */\r\n\t\tpublic Component getSelf(ExecutionCtrl exec);\r\n\t\t/** Sets an execution attribute.\r\n\t\t */\r\n\t\tpublic void setAttribute(Execution exec, String name, Object value);\r\n\t\t/** Removes an execution attribute.\r\n\t\t */\r\n\t\tpublic void removeAttribute(Execution exec, String name);\r\n\t\t\r\n\t\t/** Sets an session attribute.\r\n\t\t */\r\n\t\tpublic void setAttribute(Session ses, String name, Object value);\r\n\t\t\r\n\t\t/** Removes an session attribute.\r\n\t\t */\r\n\t\tpublic void removeAttribute(Session session, String name);\r\n\t\t\r\n\t\t/** Called when ZK Update Engine has sent a response to the client.\r\n\t\t *\r\n\t\t * <p>Note: the implementation has to maintain one last-sent\r\n\t\t * response information for each channel, since a different channel\r\n\t\t * has different set of request IDs and might resend in a different\r\n\t\t * condition.\r\n\t\t *\r\n\t\t * @param channel the request channel.\r\n\t\t * For example, \"au\" for AU requests and \"cm\" for Comet requests.\r\n\t\t * @param reqId the request ID that the response is generated for.\r\n\t\t * Ingore if null.\r\n\t\t * @param resInfo the response infomation. Ignored if reqId is null.\r\n\t\t * The real value depends on the caller.\r\n\t\t */ \r\n\t\tpublic void responseSent(DesktopCtrl desktopCtrl, String channel, String reqId, Object resInfo);\r\n\t}",
"public interface Proxy {\n\n /**\n * Provide proxy method handler {@link MethodHandler}.\n *\n * @param handler target method handler\n */\n void setHandler(MethodHandler handler);\n\n /**\n * Return method handler.\n *\n * @return method handler\n */\n MethodHandler getHandler();\n}",
"protected void doInvocation(){\n org.omg.CORBA.portable.Delegate delegate=StubAdapter.getDelegate(\n _target);\n // Initiate Client Portable Interceptors. Inform the PIHandler that\n // this is a DII request so that it knows to ignore the second\n // inevitable call to initiateClientPIRequest in createRequest.\n // Also, save the RequestImpl object for later use.\n _orb.getPIHandler().initiateClientPIRequest(true);\n _orb.getPIHandler().setClientPIInfo(this);\n InputStream $in=null;\n try{\n OutputStream $out=delegate.request(null,_opName,!_isOneWay);\n // Marshal args\n try{\n for(int i=0;i<_arguments.count();i++){\n NamedValue nv=_arguments.item(i);\n switch(nv.flags()){\n case ARG_IN.value:\n nv.value().write_value($out);\n break;\n case ARG_OUT.value:\n break;\n case ARG_INOUT.value:\n nv.value().write_value($out);\n break;\n }\n }\n }catch(Bounds ex){\n throw _wrapper.boundsErrorInDiiRequest(ex);\n }\n $in=delegate.invoke(null,$out);\n }catch(ApplicationException e){\n // REVISIT - minor code.\n // This is already handled in subcontract.\n // REVISIT - uncomment.\n //throw new INTERNAL();\n }catch(RemarshalException e){\n doInvocation();\n }catch(SystemException ex){\n _env.exception(ex);\n // NOTE: The exception should not be thrown.\n // However, JDK 1.4 and earlier threw the exception,\n // so we keep the behavior to be compatible.\n throw ex;\n }finally{\n delegate.releaseReply(null,$in);\n }\n }",
"@Override\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n System.out.println(number);\n counter++;\n return method.invoke(target, args);\n\n //return ;\n\n }",
"InvocationResult invoke(RemoteService service, MethodInvocation invocation);",
"public interface ProxyInterface {\n public String execute();\n\n public String execute0();\n}",
"protected RemoteInvocation readRemoteInvocation(HttpExchange exchange)\n/* */ throws IOException, ClassNotFoundException\n/* */ {\n/* 97 */ return readRemoteInvocation(exchange, exchange.getRequestBody());\n/* */ }",
"public abstract String intercept(ActionInvocation invocation) throws Exception;",
"@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws UnknownHostException, IOException, ClassNotFoundException {\n\t\tSocket sock = new Socket(IP_adr, Port);\n\t\tCommunicationModule cm = new CommunicationModule();\n\n\t\tTranSegment seg = new TranSegment(Obj_Key, method.getName(), args);\n\n\t\tboolean s = cm.SendObj(sock, seg);\n\t\tif (s) {\n\t\t\t//Get the invoking result returned from server end\n\t\t\tObject result = cm.RecObj(sock);\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}",
"public Object getProxy() {\n\t\t\r\n\t\treturn getProxy(this.advised.getTargetClass().getClassLoader());\r\n\t}",
"public interface InvocationHandler\n\textends Callback\n{\n\n\tpublic abstract Object invoke(Object obj, Method method, Object aobj[])\n\t\tthrows Throwable;\n}",
"Stub.Proxy(IBinder ibinder)\n\t\t{\n\t\t\tmRemote = ibinder;\n\t\t// 2 4:aload_0 \n\t\t// 3 5:aload_1 \n\t\t// 4 6:putfield #19 <Field IBinder mRemote>\n\t\t// 5 9:return \n\t\t}",
"public static void main(String[] args) {\n\n JDKProxy proxy = new JDKProxy();\n Person person = (Person)proxy.getInstance(new Son());\n person.getJob();\n\n /*Person person = (Person)new CglibInterceptor().getInstance(new Son());\n person.getJob();*/\n }",
"public Object invoke( Object proxy, Method method, Object[] args ) \n throws Throwable {\n try {\n if (method.getName().equals(\"getInputStream\")) { \n return this.getInputStream(); \n } else if (method.getName().equals(\"getInputSource\")) { \n return this.getInputSource(); \n } else if (method.getName().equals(\"getSystemId\")) {\n return this.getSystemId();\n } else if(method.getName().equals(\"recycle\")) { \n this.recycle(); \n return null; \n } else if(method.getName().equals(\"toSAX\")) { \n this.toSAX((ContentHandler) args[0]); \n return null; \n } else{\n return method.invoke(source, args);\n }\n }\n catch ( InvocationTargetException e ){\n throw e.getTargetException();\n }\n }",
"interface Handler{\n /**\n * The proxy will call it when it has new data coming from the opponent. The implementation should handle the\n * checkpoints in the way the client needs.\n *\n * @param checkPoint <code>CheckPoint</code> received from the opponent.\n */\n void hasNewData(CheckPoint checkPoint);\n\n /**\n * Will be called when the proxy receives notification that the opponent is ready.\n */\n void isReady();\n\n /**\n * Will be called when the proxy receives notification that the opponent has finished.\n */\n void isFinished();\n\n /**\n * Will be called when the proxy receives notification that the opponent has left the challenge.\n */\n void hasLeft();\n\n /**\n * Will be called when the proxy receives notification that the opponent has joined the challenge room.\n */\n void opponentInRoom();\n }",
"protected RemoteInvocation readRemoteInvocation(HttpExchange exchange)\r\n/* 38: */ throws IOException, ClassNotFoundException\r\n/* 39: */ {\r\n/* 40: 91 */ return readRemoteInvocation(exchange, exchange.getRequestBody());\r\n/* 41: */ }",
"@Override\n public Object intercept(MyInvocation invocation) throws Throwable {\n System.out.println(invocation);\n System.out.println(\"==============\");\n return invocation.proceed();\n }",
"@Test\n public void testProxy() {\n Dell dell = new Dell();\n Proxy proxy = new Proxy(dell);\n proxy.salePc();\n }",
"public interface InvocationContext {\n\n /**\n * Gets the class of the invocation target.\n *\n * @return the target class\n */\n Class<?> getTargetClass();\n\n /**\n * Gets the method which was invoked.\n *\n * @return the method\n */\n Method getMethod();\n\n /**\n * Gets the arguments with which the method was invoked.\n *\n * @return the arguments\n */\n Object[] getArguments();\n\n /**\n * Proceeds with the invocation on the intercepted method.\n *\n * @return the result of the original invocation\n * @throws Throwable any exception can be thrown by the intercepted method\n */\n Object proceed() throws Throwable;\n}",
"@Override\r\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tbeforeMethod();\r\n\t\tObject result = method.invoke(target, args);\r\n\t\tafterMethod();\r\n\t\treturn result;\r\n\t}",
"Object intercept(T proxy, Method method, Object[] args, SuperMethod superMethod);",
"@Override\n public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {\n if (method.getName().equals(\"toString\") || method.getName().equals(\"hashCode\")) {\n return methodProxy.invokeSuper(o, objects);\n }\n logger.debug(\"Start microservice method {} in {}\", method.getName(), o.toString());\n\n List<String> result = new ArrayList<>();\n result.add(\"Ivan\");\n result.add(\"Petr\");\n\n logger.debug(\"End microservice method {} in {}\", method.getName(), o.toString());\n return result;\n }",
"@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args)\n\t\t\tthrows Throwable {\n\t\tSystem.out.println(\"before log\");\n\t\tObject o = method.invoke(target, args);\n\t\tSystem.out.println(\"after log\");\n\t\treturn o;\n\t}",
"@Override\r\n\tpublic Object invoke(MethodInvocation invocation) throws Throwable {\n\t\tSystem.out.println(\"AroundMethodInterceptor start ......\");\r\n\t\tObject or=invocation.proceed();\r\n\t\tSystem.out.println(\"AroundMethodInterceptor end ......\");\r\n\t\treturn or;\r\n\t}",
"@Override\r\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tMethod realObjMethod = routerObj.getClass().getMethod(method.getName(), method.getParameterTypes());\r\n\t\tif (realObjMethod.getName().startsWith(RouterProxyFactory.METHOD_PREFIX_SET)){\r\n\t\t\tthrow new UnsupportedOperationException();\r\n\t\t}\r\n\t\t\r\n\t\treturn realObjMethod.invoke(routerObj, args);\r\n\t}",
"private Object getProxy() throws ExportException{\n if (proxy == null){\n try {\n proxy = AccessController.doPrivileged(new PrivilegedExceptionAction<Object>(){\n\n @Override\n public Object run() throws ExportException {\n return exporter.export(RemoteListener.this);\n }\n\n }, context);\n } catch (PrivilegedActionException ex) {\n throw (ExportException) ex.getException();\n }\n }\n return proxy;\n }",
"@Override\r\n \tpublic Object invoke(Object arg0, Method arg1, Object[] arg2)\r\n \t\t\tthrows Throwable {\n \t\tString urlfortheobject = baseUrl+methodToID(arg1);\r\n \t\t\r\n \t\t// Get the IRemoteRestCall object for this method...\r\n\t\tClientResource cr = new ClientResource(urlfortheobject);\r\n \t\tIRemoteRestCall resource = cr.wrap(IRemoteRestCall.class, arg1.getReturnType());\r\n \t\t\r\n \t\t// Call\r\n \t\tObject returnObject = resource.doCall(arg2);\r\n\t\tcr.release();\r\n \t\t\r\n \t\t// return\r\n \t\treturn returnObject;\r\n \t}",
"public interface ProxyConnector {\n\n /**\n * Comprueba que se cumplan los requisitos para la conexión con el servicio proxy.\n * @throws IOException Cuando ocurre algún error en la comprobación.\n */\n void init() throws IOException;\n\n /**\n * Comprueba si el servicio configurado pertenece a un proxy compatible.\n * @return {@code true} si el proxy configurado es compatible, {@code false} en caso contrario.\n * @throws IOException Cuando se produce un error al conectarse al proxy.\n */\n boolean isCompatibleService() throws IOException;\n\n /**\n * Indica si el servicio de Portafirmas correspondiente a este conector requiere un proceso\n * de login previo.\n * @return {@code true} si el servicio requiere login, {@code false} en caso contrario.\n */\n boolean needLogin();\n\n /**\n * Solicita el acceso para el usuario.\n * @return Respuesta a la petición con el token de acceso.\n * @throws Exception Cuando ocurre un error en la comunicación.\n */\n RequestResult loginRequest() throws Exception;\n\n /**\n * Envia el token de acceso firmado al servidor para validar el acceso del usuario.\n * @param pkcs1 Firma PKCS#1 del token de acceso.\n * @param cert Certificado usado para firmar.\n * @return @code true} si el acceso se completo correctamente, {@code false} en caso contrario.\n * @throws Exception Cuando ocurre un error en la comunicación.\n */\n boolean tokenValidation(byte[] pkcs1, String cert) throws Exception;\n\n /**\n * Enváa una solicitud de cierre de sesión.\n * @throws Exception Cuando se produce un error en la comunicación.\n */\n void logoutRequest() throws Exception;\n\n /**\n * Obtiene la peticiones de firma. Las peticiones devueltas deben cumplir\n * las siguientes condiciones:\n * <ul>\n * <li>Estar en el estado señalado (unresolved, signed o rejected).</li>\n * <li>Que todos los documentos que contiene se tengan que firmar con los\n * formatos de firma indicados (sólo si se indica alguno)</li>\n * <li>Que las solicitudes cumplan con los filtros establecidos. Estos\n * filtros tendran la forma: key=value</li>\n * </ul>\n * @param signRequestState Estado de las peticiones que se desean obtener.\n * @param filters\n * Listado de filtros que deben cumplir las peticiones\n * recuperadas. Los filtros soportados son:\n * <ul>\n * <li><b>orderAscDesc:</b> con valor \"asc\" para que sea orden\n * ascendente en la consulta, en cualquier otro caso será\n * descendente</li>\n * <li><b>initDateFilter:</b> fecha de inicio de las peticiones</li>\n * <li><b>endDateFilter:</b> fecha de fin de las peticiones</li>\n * <li><b>orderAttribute:</b> parámetro para ordenar por\n * una columna de la petición</li>\n * <li><b>searchFilter:</b> busca la cadena introducida en\n * cualquier texto de la petición (asunto, referencia,\n * etc)</li>\n * <li><b>labelFilter:</b> texto con el nombre de una etiqueta.\n * Filtra las peticiones en base a esa etiqueta, ej: \"IMPORTANTE\"\n * </li>\n * <li><b>applicationFilter:</b> texto con el identificador de\n * una aplicación. Filtra las peticiones en base a la\n * aplicación, ej: \"SANCIONES\"</li>\n * </ul>\n * @param numPage Número de página del listado.\n * @param pageSize Número de peticiones por página.\n * @return Lista de peticiones de firma\n * @throws SAXException\n * Si el XML obtenido del servidor no puede analizarse\n * @throws IOException\n * Si ocurre un error de entrada / salida\n */\n PartialSignRequestsList getSignRequests(\n String signRequestState, String[] filters, int numPage, int pageSize)\n throws SAXException, IOException;\n\n /** Inicia la pre-firma remota de las peticiones.\n * @param request Petición de firma.\n * @return Prefirmas de las peticiones enviadas.\n * @throws IOException Si ocurre algun error durante el tratamiento de datos.\n * @throws CertificateEncodingException Si no se puede obtener la codificación del certificado.\n * @throws SAXException Si ocurren errores analizando el XML de respuesta. */\n TriphaseRequest[] preSignRequests(SignRequest request) throws IOException,\n CertificateException,\n SAXException;\n\n /**\n * Inicia la post-firma remota de las peticiones.\n *\n * @param requests\n * Peticiones a post-firmar\n * @return Listado con el resultado de la operación de firma de cada\n * petición.\n * @throws IOException\n * Si ocurre algun error durante el proceso\n * @throws CertificateEncodingException\n * Cuando el certificado está mal codificado.\n * @throws SAXException\n * Si ocurren errores analizando el XML de respuesta\n */\n RequestResult postSignRequests(TriphaseRequest[] requests) throws IOException,\n CertificateEncodingException, SAXException;\n\n /**\n * Obtiene los datos de un documento.\n *\n * @param requestId\n * Identificador de la petición.\n * @return Datos del documento.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n RequestDetail getRequestDetail(String requestId) throws SAXException, IOException;\n\n /**\n * Obtiene el listado de aplicaciones para las que hay peticiones de firma.\n * @return Configuracion de aplicación.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n AppConfiguration getApplicationList()\n throws SAXException, IOException;\n\n /**\n * Rechaza las peticiones de firma indicadas.\n *\n * @param requestIds\n * Identificadores de las peticiones de firma que se quieren\n * rechazar.\n * @return Resultado de la operacion para cada una de las peticiones de\n * firma.\n * @throws SAXException\n * Si el XML obtenido del servidor no puede analizarse\n * @throws IOException\n * Si ocurre un error de entrada / salida\n */\n RequestResult[] rejectRequests(String[] requestIds,\n String reason) throws SAXException, IOException;\n\n /** Obtiene la previsualización de un documento.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @param mimetype MIME-Type del documento.\n * @return Datos del documento.\n * @throws IOException Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewDocument(String documentId,\n String filename,\n String mimetype) throws IOException;\n\n /** Obtiene la previsualización de una firma.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @return Datos del documento.\n * @throws IOException Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewSign(String documentId,\n String filename) throws IOException;\n\n /** Obtiene la previsualización de un informe de firma.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @param mimetype MIME-Type del documento.\n * @return Datos del documento.\n * @throws IOException Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewReport(String documentId,\n String filename, String mimetype) throws IOException;\n\n /**\n * Aprueba peticiones de firma (les da el visto bueno).\n *\n * @param requestIds\n * Identificador de las peticiones.\n * @return Resultado de la operación.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n RequestResult[] approveRequests(String[] requestIds) throws SAXException, IOException;\n\n /**\n * Indica si el conector soporta las funciones de notificación.\n * @return {@code true} si se soportan las notificaciones, {@code false} en caso contrario.\n */\n boolean isNotificationsSupported();\n\n /**\n * Da de alta en el sistema de notificaciones.\n * @param token\n * \t\t\tToken de registro en GCM.\n * @param device\n * \t\t\tIdentificador de dispositivo.\n * @param certB64\n * \t\t\tCertificado en base 64 del usuario.\n * @return Resultado del proceso de alta en el sistema de notificaciones.\n * \t\t\tIndica\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe algún problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n NotificationState signOnNotificationService(\n String token, String device, String certB64)\n throws SAXException, IOException;\n\n\n}",
"public abstract void doInvoke(InvocationContext ic) throws Exception;",
"@Override\n public void sendToProxy(String message) {\n }",
"@Override\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n if (\"startActivity\".equals(method.getName())) {\n // 只拦截这个方法\n // 替换参数, 任你所为;甚至替换原始Activity启动别的Activity偷梁换柱\n // API 23:\n // public final Activity startActivityNow(Activity parent, String id,\n // Intent intent, ActivityInfo activityInfo, IBinder token, Bundle state,\n // Activity.NonConfigurationInstances lastNonConfigurationInstances) {\n // 找到参数里面的第一个Intent 对象\n Intent raw;\n int index = 0;\n for (int i = 0; i < args.length; i++) {\n if (args[i] instanceof Intent) {\n index = i;\n break;\n }\n }\n raw = (Intent) args[index];\n Intent newIntent = new Intent();\n // 这里包名直接写死,如果再插件里,不同的插件有不同的包 传递插件的包名即可\n String targetPackage = \"com.landy.dynamicload\";\n // 这里我们把启动的Activity临时替换为 StubActivity\n ComponentName componentName = new ComponentName(targetPackage, StubActivity.class.getCanonicalName());\n newIntent.setComponent(componentName);\n\n // 把我们原始要启动的TargetActivity先存起来\n newIntent.putExtra(SystemServiceHookHelper.EXTRA_TARGET_INTENT, raw);\n // 替换掉Intent, 达到欺骗AMS的目的\n args[index] = newIntent;\n MLog.log(\"hook start activity success\");\n MLog.log(\"method:\" + method.getName() + \" called with args:\" + Arrays.toString(args));\n return method.invoke(mBase, args);\n }\n return method.invoke(mBase, args);\n }",
"protected interface InvocationCallback {\n\n\t\tObject proceedWithInvocation() throws Throwable;\n\t}",
"public static void main(String[] args) throws Throwable {\n LdhExtJdkInvocationHandler handler = new LdhExtJdkInvocationHandler(new OrderServiceImpl());\n OrderService orderService = (OrderService) MyProxy.newProxyInstance(new JavaClassLoader(),OrderService.class,handler);\n orderService.order();\n }",
"RequestDelegator getDelegator();",
"public interface MethodInvocation<T> {\n\n\t/**\n\t * Executes for all method invocations on proxies.\n\t *\n\t * @param proxy that received the method call.\n\t * @param method called.\n\t * @param args given to the method call.\n\t * @param superMethod allowing calls to the overriden original method. A super method call only makes sense for\n\t * concrete class proxies.\n\t * @return the method call return.\n\t */\n\tObject intercept(T proxy, Method method, Object[] args, SuperMethod superMethod);\n}",
"@Override @SuppressWarnings({ \"cast\",\"unchecked\" })\n\tpublic Object invoke(final MethodInvocation invocation) throws Throwable {\t\t\t\n\t\t// Do not intercept the ServicesClientProxy base type methods\n\t\tif (!_isInterceptedMethodCall(invocation.getMethod())) return invocation.proceed();\n\n\t\t// If the return type is a ServiceInteface or a SubServiceInterface, do the lazy load if needed\n\t\tObject out = invocation.proceed();\t// <-- this can return null if the ServiceInterface or SubServiceInterface was NOT created previously\n\t\t\n\t\tif (out != null) return out;\t\t// the ServiceInterface was previously created\n\t\t\n\t\t// Type of the proxy aggregator\n\t\tServiceProxiesAggregator serviceProxyAggregator = (ServiceProxiesAggregator)invocation.getThis();\n\t\tClass<? extends ServiceProxiesAggregator> serviceProxyAggregatorType = (Class<? extends ServiceProxiesAggregator>)serviceProxyAggregator.getClass();\n\t\t\n\t\t// the ServiceInterface or SubServiceInterface concrete type \n\t\tClass<?> returnType = invocation.getMethod().getReturnType();\n\t\t\n\t\tif (returnType != null && ReflectionUtils.isImplementing(returnType,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ServiceInterface.class)) {\n\t\t\t// Find the field at the aggregator type that contains the proxy\n\t\t\tClass<? extends ServiceInterface> serviceInterfaceType = (Class<? extends ServiceInterface>)returnType;\n\t\t\tField serviceInterfaceBaseField = _findServiceInterfaceField(serviceProxyAggregatorType,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t serviceInterfaceType);\n\t\t\t\n\t\t\t// get the service impl (if available) or proxy instance from the injected MapBinder\n\t\t\tServiceInterface serviceImplOrProxy = _allServiceInterfaceTypesToImplOrProxyMappings.get().get(serviceInterfaceType);\n\t\t\tif (serviceImplOrProxy != null) {\n\t\t\t\tReflectionUtils.setFieldValue(serviceProxyAggregator,serviceInterfaceBaseField,\n\t\t\t\t\t\t\t\t\t\t\t serviceImplOrProxy,\n\t\t\t\t\t\t\t\t\t\t\t false);\n\t\t\t\tout = serviceImplOrProxy;\n\t\t\t\tlog.info(\"[ServiceProxy aggregation] > {} field of type {} was not initialized on services proxy aggregator {} so an instance of {} was lazily created\",\n\t\t\t\t\t\t serviceInterfaceBaseField.getName(),serviceInterfaceType,serviceProxyAggregator.getClass(),serviceImplOrProxy.getClass());\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}",
"ProxyValue createProxyValue();",
"public static void main(String[] args) {\n MyHandler myHandler = new MyHandler();\n\n Subject proxy = (Subject) Proxy.newProxyInstance(RealSubject.class.getClassLoader(), RealSubject.class.getInterfaces(), myHandler);\n proxy.sailBook();\n }",
"protected final ActionProxy getProxy(String action,String [] params){\n \tsetUpRequestTestParams(params);\n\t\tActionProxy actionProxy = getActionProxy(action);\n\t\tassertNotNull(\"Action proxy shouldn't be null\", actionProxy);\n\t\tactionProxy.setExecuteResult(false);\n\t\treturn actionProxy;\t \t\n }",
"@RuntimeType\n public static Object intercept(@AllArguments Object[] args, @Morph Invoker invoker, @Origin Method method,\n @This Object proxy) {\n if (method.getName().equals(\"route\")) {\n return route(args, invoker, method, proxy);\n }\n return doList(args, invoker, method, proxy);\n }",
"protected ProxiedInvocationHandler(String name, Map<Method, Dispatcher> targets) {\n this.name = name;\n this.targets = targets;\n }",
"@Around(\"execution(* be.pxl.backend.restcontrollers.*.*(..))\")\n public Object logServiceAccess(ProceedingJoinPoint joinPoint) throws Throwable {\n //What the proxy will return\n Object retVal ;\n //Get the userdetails (Spring) of the user performing the request\n try{\n UserDetails auth = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n //Get the account of that user\n Account account = accountService.findByUsername(auth.getUsername());\n //Checks whether or not the request is allowed to be executed and if it is, executes it and saves the request to the database\n Boolean isAllowedToMakeRequest = performedRequestService.ExecuteRequest(account,joinPoint.getSignature().toLongString());\n\n\n if(isAllowedToMakeRequest){\n //Proceed the request as usual\n retVal = joinPoint.proceed();\n }\n else {\n //If the user has done too many requests, log that he tried again and return TOO_MANY_REQUESTS status code\n LOGGER.info(auth.getUsername() + \" has done too many requests\");\n retVal = new ResponseEntity(HttpStatus.TOO_MANY_REQUESTS);\n }\n\n }catch (Exception ex){\n retVal = joinPoint.proceed();\n }\n\n return retVal;\n }",
"@Override\n\tpublic void invoke(String origin, boolean allow, boolean remember) {\n\t\t\n\t}",
"@Override\r\n\tprotected String doIntercept(ActionInvocation invoker) throws Exception {\n\t\tSystem.out.println(\"ssssssssssss\");\r\n\t\t\r\n\t\treturn invoker.invoke();\r\n\t}",
"ProxyFluent(T o) {\n proxy = (InterceptableProxy) InterceptableProxyFactory.createANewObjectProxyIfNeeded(o);\n }",
"protected RemoteInvocation readRemoteInvocation(HttpExchange exchange, InputStream is)\n/* */ throws IOException, ClassNotFoundException\n/* */ {\n/* 116 */ ObjectInputStream ois = createObjectInputStream(decorateInputStream(exchange, is));\n/* 117 */ return doReadRemoteInvocation(ois);\n/* */ }",
"@Override\n\tpublic Object invoke(MethodInvocation arg0) throws Throwable {\n\t\tSystem.out.println(\"The name of the method that is getting executed is :\"+arg0.getMethod().getName());\n\t\tObject[] args=arg0.getArguments();\n\t\tSystem.out.println(\"First argument:\"+args[0]);\n\t\tSystem.out.println(\"Second argument:\"+args[1]);\n\t\tObject ret=arg0.proceed();\n\t\treturn ret;\n\t}",
"public Object captureExecution(Object proxy, Method method,Object[] args) {\r\n \tObject _caller = _callerStack.peek();\r\n \tInvocation invocation = new Invocation(_caller,proxy,method,args,null) ;\r\n \t_supervisor._invocations.add(invocation) ;\r\n \t_callerStack.push(proxy);\r\n \t_supervisor.echo(\"Capturing \"+invocation.getString());\r\n \tObject target = _supervisor._attachments.getTarget(proxy) ;\r\n \tif(target==null) {\r\n \tString message = \"No Target Attached at \" + getCallingClassSignature() ;\r\n \t_supervisor.echo(message);\r\n \t\tthrow new ExecutionException(message) ;\r\n \t}\r\n \tObject theReturnValue = executeMethod(target, method, args) ;\r\n \tinvocation._result = new InvocationResult();\r\n \tinvocation._result.setReturn(theReturnValue) ;\r\n \t_callerStack.pop();\r\n\t\treturn theReturnValue ;\r\n }",
"public interface AopProxy {\n Object getProxy();\n\n Object getProxy(ClassLoader classLoader);\n\n}",
"@Pointcut(\"execution(* genarateClientResponse(..))\")\n private void AccessLogingpc() {\n }",
"@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tmethodInvocation.invoke();\n\t\treturn method.invoke(bean, args);\n\t}",
"public Object invoke(MethodInvocation invocation)\r\n/* 97: */ throws Throwable\r\n/* 98: */ {\r\n/* 99:187 */ Context ctx = this.exposeAccessContext ? getJndiTemplate().getContext() : null;\r\n/* 100: */ try\r\n/* 101: */ {\r\n/* 102:189 */ return invokeInContext(invocation);\r\n/* 103: */ }\r\n/* 104: */ finally\r\n/* 105: */ {\r\n/* 106:192 */ getJndiTemplate().releaseContext(ctx);\r\n/* 107: */ }\r\n/* 108: */ }",
"public Proxy getProxy(){\n mode = COMMAND_MODE;\n pack();\n show();\n return proxy;\n }",
"public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n String methodName = method.getName();\n Class<?>[] params = method.getParameterTypes();\n\n // equals and hashCode are special cased\n if (methodName.equals(\"equals\") && params.length == 1 && params[0].equals(Object.class)) {\n Object value = args[0];\n if (value == null || !Proxy.isProxyClass(value.getClass())) {\n return Boolean.FALSE;\n }\n\n AMQPProxy handler = (AMQPProxy) Proxy.getInvocationHandler(value);\n\n return _factory.equals(handler._factory);\n } else if (methodName.equals(\"hashCode\") && params.length == 0) {\n return _factory.hashCode();\n } else if (methodName.equals(\"toString\") && params.length == 0) {\n return \"[HessianProxy \" + proxy.getClass() + \"]\";\n }\n\n ConnectionFactory connectionFactory = _factory.getConnectionFactory();\n\n\n Message response = sendRequest(connectionFactory, method, args);\n\n if (response == null) {\n throw new TimeoutException();\n }\n\n MessageProperties props = response.getMessageProperties();\n boolean compressed = \"deflate\".equals(props.getContentEncoding());\n\n InputStream is = new ByteArrayInputStream(response.getBody());\n if (compressed) {\n is = new InflaterInputStream(is, new Inflater(true));\n }\n\n return _factory.getSerializationHandler().readObject(method.getReturnType(), is);\n }",
"void intercept(BeanInvocation<_B> invocation) throws Exception;",
"Result invoke(Invoker<?> invoker, Invocation invocation);",
"@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args)\n\t\t\tthrows Throwable {\n\t\tObject result = null;\n\t\ttry{\n\t\t\tSystem.out.println(\"Before is OK!\");\n\t\t\tresult = method.invoke(this.ob, args);\n\t\t\tSystem.out.println(\"After is OK!\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}",
"org.omg.CORBA.portable.OutputStream try_invoke(java.lang.String method, org.omg.CORBA.portable.InputStream input,\r\n org.omg.CORBA.portable.ResponseHandler handler) throws X;",
"protected void setProxiedClient(URL paramURL, String paramString, int paramInt) throws IOException {\n/* 127 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt);\n/* */ }",
"ManagedEndpoint next();",
"public ProxyHandler( ProtocolSession clientSession )\n\t{\n\t\tthis.clientSession = clientSession;\n\t}",
"public HttpHandler createProxyHandler() {\n return ProxyHandler.builder()\n .setProxyClient(container.getProxyClient())\n .setMaxRequestTime(maxRequestTime)\n .setMaxConnectionRetries(maxRetries)\n .setReuseXForwarded(reuseXForwarded)\n .build();\n }",
"private Dex2JarProxy() {\r\n\t}",
"protected void setProxiedClient(URL paramURL, String paramString, int paramInt, boolean paramBoolean) throws IOException {\n/* 143 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt, paramBoolean);\n/* */ }",
"@Override\r\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable\r\n {\r\n HashSet<IInterceptor> interceptors;\r\n\r\n // Instantiation of the desired service\r\n if(implementation != null) {\r\n try {\r\n instance = InstanceManager.getInstance(implementation);\r\n\r\n // Cascade injection\r\n EJBInjector.inject(instance);\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n throw new ImpossibleAllocationException();\r\n }\r\n }\r\n\r\n // Get interceptors\r\n interceptors = InterceptorManager.getInterceptors(instance, method);\r\n\r\n // Before\r\n for(IInterceptor interceptor : interceptors) {\r\n interceptor.before(instance, method, args);\r\n }\r\n\r\n Object methodReturn = null;\r\n Throwable exceptionReturn = null;\r\n\r\n try {\r\n methodReturn = method.invoke(instance, args);\r\n } catch (InvocationTargetException e) {\r\n exceptionReturn = e.getTargetException();\r\n }\r\n\r\n // After\r\n for(IInterceptor interceptor : interceptors) {\r\n interceptor.after(instance, method, methodReturn, exceptionReturn, args);\r\n }\r\n\r\n // If there has been an exception, throw it\r\n if(exceptionReturn != null) {\r\n throw exceptionReturn;\r\n }\r\n\r\n return methodReturn;\r\n }",
"public static void main(String[] args) throws Exception{\n\t\tProperties properties = System.getProperties();\r\n\t\t//System.out.println(System.lineSeparator());\r\n\t\tSystem.getProperties().put(\"sun.misc.ProxyGenerator.saveGeneratedFiles\", true);\r\n\t\t/*Set<Entry<Object,Object>> entrySet = properties.entrySet();\r\n\t\tfor (Entry<Object, Object> entry : entrySet) {\r\n\t\t\tSystem.out.println(entry.getKey()+\":\"+entry.getValue());\r\n\t\t}*/\r\n\t\t/*HelloProxy hp = new HelloProxy();\r\n\t\tHelloService he = (HelloService) hp.bind(new HelloServiceImpl());\r\n\t\the.sayHello(\"郑金磊\");*/\r\n\t\tClass proxyClazz = Proxy.getProxyClass(HelloService.class.getClassLoader(), HelloService.class);\r\n\t\tConstructor constructor = proxyClazz.getConstructor(InvocationHandler.class);\r\n\t\tHelloService proxy = (HelloService) constructor.newInstance(new HelloProxy(new HelloServiceImpl()));\r\n\t\tproxy.sayHello(\"老狼\");\r\n\t}",
"public Object handleRequest(P request) throws Exception;",
"protected HttpResponse executeRequest(\n\t\t\tRPCRequest invocation, MethodInvocation originalInvocation) throws Exception {\n\t\treturn executeRequest(invocation);\n\t}",
"protected HttpResponse executeRequest(RPCRequest invocation) throws Exception {\n\t\treturn getHttpInvokerRequestExecutor().executeRequest(getServiceUrl(), invocation);\n\t}",
"public static void main(String[] args) {\n\n IPersonDao ipe = new PersonDao();\n PersonInvocation pi = new PersonInvocation(ipe);\n PersonProxy pp = new PersonProxy(pi);\n IPersonDao kjhk = (IPersonDao) pp.getPersonProxy();\n\n kjhk.update();\n\n\n\n\n }",
"public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {\n Test demoproxy = (Test)Proxy.newProxyInstance(Demo.class.getClassLoader(), Demo.class.getInterfaces(), new InvocationHandler() {\n @Override\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n System.out.println(\"向观众问好\");\n //执行目标对象方法\n Object returnValue = method.invoke(Demo.class.newInstance(), args);\n System.out.println(\"谢谢大家\");\n return returnValue;\n }\n });\n demoproxy.sing(\"aaa\",\"bbb\");\n\n ProxyFactory proxyFactory = new ProxyFactory(Demo001.class);\n Demo demoproxy1 = (Demo)proxyFactory.getProxyInstance();\n demoproxy1.sing(\"aaa\",\"bbb\");\n\n\n ProxyFactory proxyFactory1 = new ProxyFactory(Demo.class);\n Demo demoproxy2 = (Demo)proxyFactory.getProxyInstance();\n demoproxy2.sing(\"aaa1\",\"bbb1\");\n\n ThreadLocal threadLocal = new ThreadLocal();\n threadLocal.set(\"aa\");\n System.out.println(threadLocal.get());\n threadLocal.remove();\n Lock lock = new ReentrantLock();\n lock.newCondition().signal();\n\n }",
"public interface ProxySkeletonInterface {\n /**\n * Writes a command on the socket by writing the command first\n * and any other object just after.\n *\n * @param command the command\n * @param params the params\n * @throws IOException the io exception\n */\n void writeCommand(CommProtocolCommands command, Object ... params) throws IOException;\n\n /**\n * Reads a command from the socket and executes a reserved\n * portion of code according to the type of command.\n *\n * @param command the command\n * @throws IOException the io exception\n * @throws ClassNotFoundException the class not found exception\n */\n void readCommand(String command) throws IOException, ClassNotFoundException, InterruptedException;\n}",
"public void doInstallDProxy(ClassLoader webapploader, final String appid) {\n dpInstall.setTargetClassLoader(webapploader);\n\n /**\n * install proxy to rocketmqClient\n */\n DynamicProxyProcessor processor = new DynamicProxyProcessor() {\n\n @Override\n public void process(DPMethod m) throws Exception {\n\n if ((m.getExceptionTypes().length != 0 || \"shutdown\".equals(m.getName())\n || \"unsubscribe\".equals(m.getName()) || \"registerMessageListener\".equals(m.getName()))\n && /*\n * this method could be blocked for a long time, the statics is meaningless, so we ignore it.\n */\n !(\"pullBlockIfNotFound\").equals(m.getName())) {\n if (\"registerMessageListener\".equals(m.getName())) {\n if (\"MessageListenerConcurrently\".equals(m.getParameterTypes()[0].getSimpleName())) {\n\n m.insertBefore(\"{$1=(MessageListenerConcurrently)RocketmqIT.start(\\\"\" + appid + \"\\\",this,\\\"\"\n + m.getName() + \"\\\",$args);}\");\n }\n else if (\"MessageListenerOrderly\".equals(m.getParameterTypes()[0].getSimpleName())) {\n\n m.insertBefore(\"{$1=(MessageListenerOrderly)RocketmqIT.start(\\\"\" + appid + \"\\\",this,\\\"\"\n + m.getName() + \"\\\",$args);}\");\n }\n m.insertAfter(\"{RocketmqIT.end(-1,\\\"\" + m.getName() + \"\\\");}\");\n\n }\n else if (m.getName().equals(\"pull\") && !m.getReturnType().getSimpleName().equals(\"PullResult\")) {\n m.insertBefore(\"{$5=(PullCallback)RocketmqIT.start(\\\"\" + appid + \"\\\",this,\\\"\" + m.getName()\n + \"\\\",$args);}\");\n m.insertAfter(\"{RocketmqIT.end(-1,\\\"\" + m.getName() + \"\\\");}\");\n\n }\n else {\n m.insertBefore(\"{RocketmqIT.start(\\\"\" + appid + \"\\\",this,\\\"\" + m.getName() + \"\\\",$args);}\");\n m.insertAfter(\"{RocketmqIT.end(1,\\\"\" + m.getName() + \"\\\");}\");\n }\n dpInstall.addCatch(m, \"RocketmqIT.end(0,\\\"\" + m.getName() + \"\\\");\");\n }\n\n }\n };\n\n dpInstall.installProxy(\"com.alibaba.rocketmq.client.producer.DefaultMQProducer\", new String[] {\n \"com.creditease.uav.hook.rocketmq.interceptors\", \"com.alibaba.rocketmq.client.consumer.listener\" },\n processor, false);\n\n dpInstall.installProxy(\"com.alibaba.rocketmq.client.consumer.DefaultMQPushConsumer\",\n new String[] { \"com.creditease.uav.hook.rocketmq.interceptors\" }, processor, false);\n\n dpInstall.installProxy(\n \"com.alibaba.rocketmq.client.consumer.DefaultMQPullConsumer\", new String[] {\n \"com.creditease.uav.hook.rocketmq.interceptors\", \"com.alibaba.rocketmq.client.consumer\" },\n processor, false);\n\n dpInstall.releaseTargetClassLoader();\n }",
"@WebMethod\n URI proxify(URI wsdlURI);",
"public Object intercept(final Object object, final Method method, final Object[] args,\n final MethodProxy methodProxy) throws Throwable {\n if (!PersistenceService.isDynamicFinder(method))\n return methodProxy.invokeSuper(object, args);\n\n\n //otherwise dispatch to finder logic\n return finderInterceptor.invoke(new MethodInvocation() {\n\n public Method getMethod() {\n return method;\n }\n\n public Object[] getArguments() {\n return args;\n }\n\n public Object proceed() throws Throwable {\n return methodProxy.invoke(object, args);\n }\n\n public Object getThis() {\n return object;\n }\n\n public AccessibleObject getStaticPart() {\n return method;\n }\n });\n }",
"protected RemoteInvocation readRemoteInvocation(HttpExchange exchange, InputStream is)\r\n/* 44: */ throws IOException, ClassNotFoundException\r\n/* 45: */ {\r\n/* 46:110 */ ObjectInputStream ois = createObjectInputStream(decorateInputStream(exchange, is));\r\n/* 47:111 */ return doReadRemoteInvocation(ois);\r\n/* 48: */ }",
"public void testBeforeInvoke() throws Exception {\r\n GroovyClassLoader gcl = new GroovyClassLoader();\r\n final Class<?> testClass = gcl.parseClass(\"class Test { def invokeMe() {'hello'} }\");\r\n GroovyObject go = (GroovyObject)testClass.newInstance();\r\n\r\n ProxyMetaClass pmc = ProxyMetaClass.getInstance(testClass);\r\n go.setMetaClass(pmc);\r\n\r\n pmc.setInterceptor( new Interceptor() {\r\n public Object beforeInvoke(Object object, String methodName, Object[] arguments, InvocationCallback callback) {\r\n callback.markInvoked();\r\n return \"success\";\r\n }\r\n public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result) {\r\n return result;\r\n }\r\n });\r\n\r\n Object result = go.invokeMethod(\"invokeMe\", null);\r\n assertNotNull(result);\r\n assertEquals(\"success\",result);\r\n }",
"@Override\r\n\tpublic Object request(Invocation invocation) throws Exception {\n\t\tRpcRequest req=new RpcRequest();\r\n\t\treq.setId(UUID.randomUUID().toString());\r\n\t\treq.setArgs(invocation.getAgrs());\r\n\t\treq.setMethod(invocation.getMethod().getName());\r\n\t\treq.setParameterTypes(invocation.getMethod().getParameterTypes());\r\n\t\treq.setType(invocation.getInterface());\r\n\t\treq.setAsyn(invocation.isAsyn());\r\n\t\tCompletableFuture<Object> result=new CompletableFuture<>();\r\n\t\tclientPool.borrowObject().request(req,result);\r\n\t\tif(invocation.isAsyn()){\r\n\t\t\treturn result;\r\n\t\t}else{\r\n\t\t\treturn result.get();\r\n\t\t}\r\n\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tOfficeInternetAccess access = new ProxyInternetAccess(\"Sohan Chougule\"); \n access.grantInternetAccess(); \n\t}",
"protected void handlerAdded0(ChannelHandlerContext ctx) throws Exception {}",
"public interface HttpResponseProxylet extends Proxylet {\n \n /**\n * Possible return code of method 'accept'.\n * <br/>The proxylet accepts the message and will not block while processing it\n */\n public static final int ACCEPT = 0x03;\n /**\n * Possible return code of method 'accept'.\n * the proxylet accepts the message but might block while processing it\n */\n public static final int ACCEPT_MAY_BLOCK = 0x7;\n /**\n * Possible return code of method 'accept'.\n * <br/>The proxylet is not interested in the message\n */\n public static final int IGNORE = 0;\n \n /**\n * Called by the Engine to know how the proxylet will handle the Response.\n * <br/>The possible return codes are: ACCEPT, ACCEPT_MAY_BLOCK, IGNORE.\n * <b>NOTE: This method can be called by the Engine several times in a row for the same request.</b>\n * Therefore it should behave accordingly.\n * @param prolog the response prolog\n * @param headers the response headers\n * @return ACCEPT, ACCEPT_MAY_BLOCK, or IGNORE\n */\n public int accept(HttpResponseProlog prolog, HttpHeaders headers);\n \n}",
"@Test\r\n public void testSetProxy() {\r\n // Not required\r\n }",
"@Override\n\tpublic CommandProxy execute() {\n\t\tCommandProxy proxy = build();\n\t\tproxy.execute();\n\t\treturn proxy;\n\t}",
"public Proxy getProxy() {\n return proxy;\n }",
"abstract protected Object invoke0 (Object obj, Object[] args);",
"public Response internalInvocation(HttpRequest request, HttpResponse response, Object entity)\n {\n ResteasyProviderFactory.addContextDataLevel();\n boolean pushedBody = false;\n try\n {\n MessageBodyParameterInjector.pushBody(entity);\n pushedBody = true;\n ResourceInvoker invoker = getInvoker(request);\n if (invoker != null)\n {\n pushContextObjects(request, response);\n return getResponse(request, response, invoker);\n }\n \n // this should never happen, since getInvoker should throw an exception\n // if invoker is null\n return null;\n }\n finally\n {\n ResteasyProviderFactory.removeContextDataLevel();\n if (pushedBody)\n {\n MessageBodyParameterInjector.popBody();\n }\n }\n }",
"Object handle(Object request);",
"public void testAfterInvoke() throws Exception {\r\n GroovyClassLoader gcl = new GroovyClassLoader();\r\n final Class<?> testClass = gcl.parseClass(\"class Test { def invokeMe() {'hello'} }\");\r\n GroovyObject go = (GroovyObject)testClass.newInstance();\r\n\r\n ProxyMetaClass pmc = ProxyMetaClass.getInstance(testClass);\r\n go.setMetaClass(pmc);\r\n\r\n pmc.setInterceptor( new Interceptor() {\r\n public Object beforeInvoke(Object object, String methodName, Object[] arguments, InvocationCallback callback) {\r\n return null;\r\n }\r\n public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result) {\r\n assertEquals(\"hello\", result);\r\n assertEquals(\"invokeMe\", methodName);\r\n return result.toString() + 1;\r\n }\r\n });\r\n\r\n Object result = go.invokeMethod(\"invokeMe\", null);\r\n assertNotNull(result);\r\n assertEquals(\"hello1\",result);\r\n }",
"private void registerRequestProxyHandler(BeanDefinitionRegistry registry) {\n GenericBeanDefinition jdbcDaoProxyDefinition = new GenericBeanDefinition();\n jdbcDaoProxyDefinition.setBeanClass(DaoProxy.class);\n registry.registerBeanDefinition(\"daoProxy\", jdbcDaoProxyDefinition);\n }",
"public abstract Object invoke(T target , Method method , Object[] args) throws Throwable;",
"public Object logCall(ProceedingJoinPoint joinPoint) {\n Method method = ((MethodSignature) joinPoint.getSignature()).getMethod();\n long start = System.currentTimeMillis();\n Object result = null;\n try {\n result = joinPoint.proceed();\n } catch (Throwable ex) {\n Logger.getLogger(TodoServiceInterceptor.class.getName())\n .log(Level.SEVERE, null, ex);\n }\n long duration = System.currentTimeMillis() - start;\n\n publisher.publishEvent(new TodoServiceMethodInvokedEvent(\n method.getName(),\n duration\n )\n );\n return result;\n }",
"@Override\n\tpublic boolean usingProxy() {\n\t\treturn false;\n\t}",
"@Override\n public void onResponse(Result appResponse, Invoker<?> invoker, Invocation invocation) {\n }",
"private void callHandler(String method, HttpServletRequest request, HttpServletResponse response) throws IOException {\n JsonElement payload = getPayload(request, response);\n RequestContext context = new RequestContext(\n request, response, urlVariables, request.getParameterMap(), payload);\n PathNode apiStructure = getApiStructure(method);\n\n if (request.getPathInfo() == null) {\n logger.warn(\"Received \" + method + \" request with empty path.\");\n return;\n }\n\n PathNode.PathNodeResult result = apiStructure.getBindingForSubPath(request.getPathInfo());\n if (result != null) {\n urlVariables.putAll(result.getArgValues());\n result.getApiSpec().apiInterface.call(context);\n }\n }",
"@Override\n @SuppressWarnings({\"unchecked\", \"raw\"})\n public Object invoke(Object proxy, Method method, Object[] args) throws Exception {\n if (\"toString\".equals(method.getName())) {\n return null;\n }\n\n HummerRestApiDeclare declare = method.getAnnotation(HummerRestApiDeclare.class);\n if (declare == null) {\n log.error(\"method {} proxy {} not use annotation HummerRestApiDeclare\"\n , method.getName(), proxy);\n throw new IllegalArgumentException(\"not found annotation HummerRestApiDeclare\");\n }\n long start = System.currentTimeMillis();\n ApiMetadata apiMetadata = builderApiMetadata(declare, method, args);\n long costMills = System.currentTimeMillis() - start;\n if (costMills > 0) {\n log.debug(\"method {} builder api metadata done,cost {} mills\", method.getName(), costMills);\n }\n //todo cache\n\n //call remote api\n Object o = apiMetadata.getAsync() ? invokeOfAsync(apiMetadata) : invokeOfSync(apiMetadata);\n //after handler\n if (apiMetadata.getAfterHandler() != null) {\n apiMetadata.getAfterHandler().handler(o);\n }\n return o;\n }"
] | [
"0.76682025",
"0.7203623",
"0.68828946",
"0.6795199",
"0.6792482",
"0.6685512",
"0.66576517",
"0.6457817",
"0.6314063",
"0.6291939",
"0.62623954",
"0.6256214",
"0.6246262",
"0.62401783",
"0.6235129",
"0.6220681",
"0.621733",
"0.62071455",
"0.61722314",
"0.61685884",
"0.61382943",
"0.61018",
"0.6101284",
"0.6088225",
"0.60870564",
"0.60799605",
"0.60643274",
"0.60601705",
"0.6036525",
"0.6013504",
"0.60055286",
"0.59732103",
"0.5956137",
"0.5928625",
"0.59230316",
"0.5921292",
"0.59087473",
"0.59028506",
"0.5888188",
"0.5869679",
"0.5868784",
"0.5868314",
"0.5860187",
"0.5856726",
"0.5852559",
"0.5828462",
"0.58206487",
"0.581166",
"0.5792068",
"0.5789788",
"0.5773744",
"0.575378",
"0.5749396",
"0.57438236",
"0.5735903",
"0.5729088",
"0.57289594",
"0.5728544",
"0.572589",
"0.5725575",
"0.57241523",
"0.572393",
"0.57159925",
"0.5715456",
"0.5714336",
"0.57112265",
"0.57076883",
"0.5702895",
"0.5697717",
"0.5691634",
"0.56910294",
"0.5685574",
"0.56819683",
"0.568127",
"0.5662427",
"0.5648831",
"0.5639276",
"0.5637321",
"0.5631924",
"0.56243914",
"0.56066287",
"0.56065637",
"0.56051695",
"0.5596835",
"0.5591682",
"0.5579821",
"0.55784595",
"0.55756253",
"0.5574717",
"0.5566314",
"0.5560177",
"0.55567884",
"0.55544174",
"0.55533904",
"0.55533355",
"0.5552862",
"0.555154",
"0.5542387",
"0.5540913",
"0.5532462"
] | 0.5633545 | 78 |
Creates new form EmployeeManagement | public CustomerManagement() {
initComponents();
setLocationRelativeTo(null);
loadTable();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GetMapping(\"/showNewEmpForm\")\n\tpublic String showNewEmpForm(Model model) {\n\t\tEmployees employee = new Employees();\n\t\tmodel.addAttribute(\"employee\", employee);\n\t\treturn \"new_employee\";\n\t}",
"public addEmployee() {\n initComponents();\n \n conn = db.java_db();\n Toolkit toolkit = getToolkit();\n Dimension size = toolkit.getScreenSize();\n setLocation(size.width / 2 - getWidth() / 2, size.height / 2 - getHeight() / 2);\n }",
"@GetMapping(\"/showNewEmployeeForm\")\n public String showNewEmployeeForm(Model model){\n Employee employee=new Employee();\n model.addAttribute(\"employee\",employee);\n return \"Add_Employee\";\n }",
"public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}",
"@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}",
"@PostMapping(value = \"/addEmployee\")\n\tpublic void addEmployee() {\n\t\tEmployee e = new Employee(\"Iftekhar Khan\");\n\t\tdataServiceImpl.add(e);\n\t}",
"@FXML\r\n\tprivate void saveEmployee(ActionEvent event) {\r\n\t\tif (validateFields()) {\r\n\t\t\tEmployee e;\r\n\t\t\tif (newEmployee) {\r\n\t\t\t\te = new Employee();\r\n\t\t\t\tlistaStaff.getItems().add(e);\r\n\t\t\t} else {\r\n\t\t\t\te = listaStaff.getSelectionModel().getSelectedItem();\r\n\t\t\t}\r\n\t\t\te.setUsername(txUsuario.getText());\r\n\t\t\te.setPassword(txPassword.getText());\r\n\t\t\tif (checkAdmin.isSelected())\r\n\t\t\t\te.setIsAdmin(1);\r\n\t\t\telse\r\n\t\t\t\te.setIsAdmin(0);\r\n\t\t\tif (checkTPV.isSelected())\r\n\t\t\t\te.setTpvPrivilege(1);\r\n\t\t\telse\r\n\t\t\t\te.setTpvPrivilege(0);\r\n\t\t\tif (newEmployee) {\r\n\t\t\t\tservice.saveEmployee(e);\r\n\t\t\t\tnewEmployee = false;\r\n\t\t\t} else\r\n\t\t\t\tservice.updateEmployee(e);\r\n\t\t\tbtGuardar.setDisable(true);\r\n\t\t\tbtEditar.setDisable(false);\r\n\t\t\tconmuteFields();\r\n\t\t\tupdateList();\r\n\t\t}\r\n\t}",
"@RequestMapping(\"Home1\")\r\n\tpublic String createUser1(Model m) \r\n\t{\n\t\tm.addAttribute(\"employee\",new Employee());\r\n\t\treturn \"register\";//register.jsp==form action=register\r\n\t}",
"@Override\n\tpublic void create(Empleado e) {\n\t\tSystem.out.println(\"Graba el empleado \" + e + \" en la BBDD.\");\n\t}",
"private static void newEmployee(UserType employeeType) {\n\n\t\tString username = null, password;\n\n\t\tboolean valid = false;\n\n\t\t// make sure that the username is not already taken\n\t\twhile (!valid) {\n\t\t\tSystem.out.print(\"What username would you like for your account? \");\n\t\t\tusername = input.nextLine();\n\t\t\tif (nameIsTaken(username, customerList)) {\n\t\t\t\tSystem.out.println(\"Sorry but that username has already been taken.\");\n\t\t\t} else\n\t\t\t\tvalid = true;\n\t\t}\n\t\t// set valid to false after each entry\n\t\tvalid = false;\n\n\t\tSystem.out.print(\"What password would you like for your account? \");\n\t\tpassword = input.nextLine();\n\n\t\tEmployee e = new Employee(username, password);\n\n\t\te.setType(employeeType);\n\t\temployeeList.add(e);\n\t\tcurrentUser = e;\n\t\twriteObject(employeeFile, employeeList);\n\t\temployeeDao.create(e);\n\t}",
"@PostMapping(\"addEmployee\")\r\n\tpublic String addEmployee(@ModelAttribute(\"employee\") Employee employee) {\r\n\r\n\t\temployeeDao.addEmployee(employee);\r\n\t\t\r\n\t\treturn \"EmployeeDetails\";\r\n\t}",
"@Test\n\tpublic void testingAddNewEmployee() {\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tthis.sendingKeys();\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\tdriver.findElement(By.id(\"_asf1\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl1\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase1\")).sendKeys(\"emailAddress\");\n\t\t\n\t\tdriver.findElement(By.id(\"_as_save_multiple\")).click();\n\t\t\n\t\tWebElement newEmployee = driver.findElement(By.linkText(\"FirstName LastName\"));\n\t\tassertNotNull(newEmployee);\n\t\t\n\t}",
"@RequestMapping(params = \"saveEmployee\", method = RequestMethod.POST)\n\tpublic ModelAndView addEmployee(\n\t\t\t@ModelAttribute(\"employee\") Employee employee,\n\t\t\tBindingResult result, Model m) {\n\n\t\temployee.setCreateddate(new Timestamp(new Date().getTime()));\n\t\temployee.setModifieddate(new Timestamp(new Date().getTime()));\n\t\tint empId = empServiceimpl.addUsers(employee);\n\t\tSystem.out.println(\"Employee id after save is \" + empId);\n\t\tString message = \"Employee: \" + empId + \" has been added successfully\";\n\t\t/*\n\t\t * @SuppressWarnings(\"unchecked\") List<Employee> lists =\n\t\t * service.fetchAllDetails(); m.addAttribute(\"lists\", lists);\n\t\t */\n\t\treturn new ModelAndView(\"index\", \"message\", message);\n\t}",
"public manage_employee_attendance() {\n initComponents();\n }",
"@RequestMapping(method = RequestMethod.GET)\n\tpublic String setupForm(Model model) \n\t{\n\t\tEmployeeEntity employeeVO = new EmployeeEntity();\n\t\tmodel.addAttribute(\"employee\", employeeVO);\n\t\treturn \"listEmployeeView\";\n\t}",
"Employee() {\n\t}",
"@RequestMapping(value = \"/add\", method = RequestMethod.GET)\r\n\tpublic ModelAndView addEmployee(@ModelAttribute Employee employee) {\r\n\t\tSystem.out.println(\"------------- redirecting to emp registration page --------------\" + employee);\r\n\t\tMap<String, Object> model = new HashMap<String, Object>();\r\n\t\treturn new ModelAndView(\"add\", model);\r\n\t}",
"@FXML\r\n\tprivate void newEmployee(ActionEvent event) {\r\n\t\tnewEmployee = true;\r\n\t\tputEditables(true);\r\n\t\teraseFieldsContent();\r\n\t\tbtEditar.setDisable(true);\r\n\t\tbtGuardar.setDisable(false);\r\n\t\tbtDelete.setDisable(true);\r\n\t}",
"public void actionPerformed(ActionEvent event) {\n try {\n anEmplist.add(new Manager(nameField.getText(),\n Double.parseDouble(salaryField.getText()),\n Double.parseDouble(bonusField.getText())));\n System.out.println(\"New manager successfully added.\");\n frame.dispose();\n }\n catch (Exception e) {\n System.out.println(\"Unable to add Employee. Please make\"\n + \" sure that all fields are filled out with valid\"\n + \" input.\");\n frame.dispose();\n }\n }",
"public Employee createNewEmployee(String name) {\n Employee newEmployee = new Employee(DumbDB.employeeCounter++, name, NO_DEPARTMENT_ID);\n getAllEmployees().add(newEmployee);\n return newEmployee;\n }",
"public EmployeePage() {\n initComponents();\n try {\n //Connects to database with an absolute path\n Path con = Paths.get(\"ScrumProject.FDB\").toRealPath(LinkOption.NOFOLLOW_LINKS);\n idb = new InfDB(con.toString());\n } catch (InfException | IOException e) {\n JOptionPane.showMessageDialog(null, e);\n }\n Validation val = new Validation();\n txtNameE.setText(val.getUserName(Validation.getIdInlogged()));\n txtPhoneE.setText(val.getUserTelefon(Validation.getIdInlogged()));\n txtEmailE.setText(val.getUserEmail(Validation.getIdInlogged()));\n }",
"public String addEmployee() {\n\t\t\t//logger.info(\"addEmployee method called\");\n\t\t\t//userGroupBO.save(userGroup);;\n\t\t\treturn SUCCESS;\n\t\t}",
"@Override\n\tpublic Employee createEmployee() {\n\t\treturn new Manager(name, age);\n\t}",
"@Override\n public ResponseEntity createEmployee(@Valid Employee employeeRequest) {\n Employee savedemployee = employeeService.create(employeeRequest);\n URI location= ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\").buildAndExpand(savedemployee.getId()).toUri();\n return ResponseEntity.created(location).build();\n\n }",
"public FrmCrearEmpleado() {\n initComponents();\n tFecha.setDate(new Date());\n }",
"@RequestMapping(value = \"/edit/{employeeID}\", method = RequestMethod.GET)\n public ModelAndView initUpdateOwnerForm(@PathVariable(\"employeeID\") String employeeID, Model model) {\n \tEmployee e = empService.findById(employeeID);\n\t\tModelAndView mav= new ModelAndView(\"CreateOrUpdateEmployee\",\"employee\",e);\n\t\tString s=\"edit\";\n\t\tmav.addObject(\"actiont\", s);\n\t\t mav.addObject(\"roleList\", roleRepo.findAll());\n\t\t mav.addObject(\"SupervisorList\",empService.ListOfSuperVisor());\n return mav;\n }",
"public EmployeeInfo() {\n initComponents();\n }",
"public void createEmployee(Employee newEmployee) {\n\t\tif(false == this.employee.contains(newEmployee)) {\n\t\t\tthis.employee.add(newEmployee);\n\t\t}\n\t}",
"private void addEmployee(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString firstName = request.getParameter(\"firstName\");\r\n\t\tString lastName = request.getParameter(\"lastName\");\r\n\t\tString gender = request.getParameter(\"gender\");\r\n\t\tint age = Integer.parseInt(request.getParameter(\"age\"));\r\n\t\tString email = request.getParameter(\"email\");\t\t\r\n\t\t\r\n\t\t// create a new employee object\r\n\t\tEmployee theEmployee = new Employee (firstName, lastName,gender,age, email);\r\n\t\t\r\n\t\t// add the employee to the database\r\n\t\temployeeDAO.addEmployee(theEmployee);\r\n\t\t\t\t\r\n\t\t// send back to main page (the student list)\r\n\t\tlistEmployees(request, response);\r\n\t}",
"public AddEmployeeGUI() {\r\n\t\tsetBackground(Color.RED);\r\n\t\tsetTitle(\"Add Employee\");\r\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 450, 500);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\r\n\t\tJLabel lblSelectEmployeeType = new JLabel(\"Select Employee Type\");\r\n\t\tlblSelectEmployeeType.setBounds(5, 0, 207, 25);\r\n\t\tcontentPane.add(lblSelectEmployeeType);\r\n\r\n\t\tlabel = new JLabel(\"\");\r\n\t\tlabel.setBounds(180, 36, 212, 24);\r\n\t\tcontentPane.add(label);\r\n\r\n\t\tJLabel lblFirstName = new JLabel(\"First Name\");\r\n\t\tlblFirstName.setBounds(5, 55, 207, 45);\r\n\t\tcontentPane.add(lblFirstName);\r\n\r\n\t\ttxtFirstName = new JTextField();\r\n\t\ttxtFirstName.setBounds(180, 71, 212, 24);\r\n\t\tcontentPane.add(txtFirstName);\r\n\t\ttxtFirstName.setColumns(10);\r\n\r\n\t\tJLabel lblLastName = new JLabel(\"Last Name\");\r\n\t\tlblLastName.setBounds(5, 105, 207, 45);\r\n\t\tcontentPane.add(lblLastName);\r\n\r\n\t\ttxtLastName = new JTextField();\r\n\t\ttxtLastName.setBounds(180, 119, 212, 24);\r\n\t\tcontentPane.add(txtLastName);\r\n\t\ttxtLastName.setColumns(10);\r\n\r\n\t\tJLabel lblDateOfBirth = new JLabel(\"Date of Birth (yyyy-mm-dd)\");\r\n\t\tlblDateOfBirth.setBounds(5, 155, 207, 45);\r\n\t\tcontentPane.add(lblDateOfBirth);\r\n\r\n\t\ttxtDOB = new JTextField();\r\n\t\ttxtDOB.setBounds(180, 167, 212, 24);\r\n\t\tcontentPane.add(txtDOB);\r\n\t\ttxtDOB.setColumns(10);\r\n\r\n\t\tJLabel lblTelephoneNo = new JLabel(\"Telephone no.\");\r\n\t\tlblTelephoneNo.setBounds(5, 205, 207, 45);\r\n\t\tcontentPane.add(lblTelephoneNo);\r\n\r\n\t\ttxtTel = new JTextField();\r\n\t\ttxtTel.setBounds(180, 215, 212, 24);\r\n\t\tcontentPane.add(txtTel);\r\n\t\ttxtTel.setColumns(10);\r\n\r\n\t\tJLabel lblEmail = new JLabel(\"Email\");\r\n\t\tlblEmail.setBounds(5, 255, 207, 45);\r\n\t\tcontentPane.add(lblEmail);\r\n\r\n\t\ttxtEmail = new JTextField();\r\n\t\ttxtEmail.setBounds(180, 263, 212, 24);\r\n\t\tcontentPane.add(txtEmail);\r\n\t\ttxtEmail.setColumns(10);\r\n\r\n\t\tJLabel lblGener = new JLabel(\"Gender\");\r\n\t\tlblGener.setBounds(5, 305, 207, 45);\r\n\t\tcontentPane.add(lblGener);\r\n\r\n\t\ttxtGender = new JTextField();\r\n\t\ttxtGender.setBounds(180, 311, 212, 24);\r\n\t\tcontentPane.add(txtGender);\r\n\t\ttxtGender.setColumns(10);\r\n\r\n\t\tJLabel lblStartDate = new JLabel(\"Start Date (yyyy-mm-dd)\");\r\n\t\tlblStartDate.setBounds(5, 355, 207, 45);\r\n\t\tcontentPane.add(lblStartDate);\r\n\r\n\t\ttxtStartDate = new JTextField();\r\n\t\ttxtStartDate.setBounds(180, 359, 212, 24);\r\n\t\tcontentPane.add(txtStartDate);\r\n\t\ttxtStartDate.setColumns(10);\r\n\r\n\t\tlabel_1 = new JLabel(\" \");\r\n\t\tlabel_1.setBounds(5, 405, 207, 50);\r\n\t\tcontentPane.add(label_1);\r\n\r\n\t\tbtnAdd = new JButton(\"Add\");\r\n\t\tbtnAdd.setBounds(325, 405, 67, 24);\r\n\t\tcontentPane.add(btnAdd);\r\n\t}",
"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 }",
"@POST\n @Consumes( { \"application/xml\", \"text/xml\", \"application/json\" })\n public Response createEmployee(Employee employee) {\n final int staffNo = this.employeeMgr.createEmployee(employee);\n final URI location = createdLocation(staffNo);\n return Response.created(location).build();\n }",
"public FrmNuevoEmpleado() {\n initComponents();\n }",
"public EmployeeHome() {\n initComponents();\n }",
"public boolean addEmp(Employee e) {\n\t\treturn edao.create(e);\n\t\t\n\t}",
"@PostMapping(\"/employees\")\n\tpublic Employee addEmployee(@RequestBody Employee theEmployee) {\n\t\t theEmployee.setId(0);\n\t\t employeeService.save(theEmployee);\n\t\t \n\t return theEmployee;\n\t}",
"public void setCreateEmp(String createEmp) {\n this.createEmp = createEmp;\n }",
"public void addEmployee(ActionRequest request, ActionResponse response)\n\t\t\tthrows SystemException, IOException, PortalException {\n\t\tlong employeeId = CounterLocalServiceUtil.increment(Employee.class.getName());\n\t\tEmployee employee = null;\n\t\temployee = EmployeeLocalServiceUtil.createEmployee(employeeId);\n\t\temployee.setEmployeeName(ParamUtil.getString(request, \"employeeName\"));\n\t\temployee.setEmployeeDesignation(ParamUtil.getString(request, \"employeeDesignation\"));\n\t\temployee.setAddress(ParamUtil.getString(request, \"address\"));\n\t\temployee.setEmail(ParamUtil.getString(request, \"email\"));\n\t\temployee.setPhoneNumber(ParamUtil.getString(request, \"phoneNumber\"));\n\t\t/* Uploading employee documents */\n\t\tThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);\n\t\t// Checking permission for ADD_EMPLOYEE\n//\t\tEmployeePermission.insertPermission(themeDisplay);\n\t\tcreateFolder(request, themeDisplay);\n\t\tlong fileEntryId = fileUpload(employee, themeDisplay, request);\n\t\temployee.setFileEntryId(fileEntryId);\n\t\t// setting groupId\n\t\temployee.setGroupId(themeDisplay.getScopeGroupId());\n\t\tEmployeeLocalServiceUtil.addEmployee(employee);\n\t\tResourceLocalServiceUtil.addResources(themeDisplay.getCompanyId(), themeDisplay.getScopeGroupId(),\n\t\t\t\tthemeDisplay.getUserId(), Employee.class.getName(), employeeId, false, true, true);\n\t}",
"public FrmEmployee(Employee employee, Modes mode) {\n initComponents();\n this.employee = employee;\n this.mode = mode;\n actions = new ActionsEmployee(this);\n actions.initComponents();\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(method=RequestMethod.GET)\n\tpublic String intializeForm(Model model) {\t\t\n\t\tlog.info(\"GET method is called to initialize the registration form\");\n\t\tEmployeeManagerRemote employeeManager = null;\n\t\tEmployeeRegistrationForm employeeRegistrationForm = new EmployeeRegistrationForm();\n\t\tList<Supervisor> supervisors = null;\n\t\ttry{\n\t\t\temployeeManager = (EmployeeManagerRemote) ApplicationUtil.getEjbReference(emplManagerRef);\n\t\t\tsupervisors = employeeManager.getAllSupervisors();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tmodel.addAttribute(\"supervisors\", supervisors);\n\t\tmodel.addAttribute(\"employeeRegistrationForm\", employeeRegistrationForm);\n\t\t\n\t\treturn FORMVIEW;\n\t}",
"@PostMapping(\"/addNewEmployee/save\")\n public String saveEmployee(@ModelAttribute(\"employee\") Employee employee){\n employeeService.saveEmployee(employee);\n return \"redirect:/\";\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew EmployeeView().init();\r\n\t\t\t}",
"@RequestMapping(value = \"/createUser\", method = RequestMethod.GET)\n\tpublic ModelAndView createUser(ModelMap model) throws CustomException {\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\t\tCollection<EndUser> endUsers = endUserDAOImpl.getList();\n\t\tList<Role> roles = endUserDAOImpl.findAll();\n\t\tmodel.put(\"roles\", roles);\n\n\t\tmodel.put(\"endUsers\", endUsers);\n\t\treturn new ModelAndView(\"createUser\", \"model\", model);\n\t}",
"public Employee() {\n\t\t\n\t}",
"public Employee() {\t}",
"public Employee() {\n this.isActivated = false;\n this.salt = CryptographicHelper.getInstance().generateRandomString(32);\n\n this.address = new Address();\n this.reports = new ArrayList<>();\n }",
"public andrewNamespace.xsdconfig.EmployeeDocument.Employee addNewEmployee()\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().add_element_user(EMPLOYEE$0);\r\n return target;\r\n }\r\n }",
"public Employee(){\n\t\t\n\t}",
"public Employee(){\n\t\t\n\t}",
"public Employee() {\n\t\tsuper();\n\t}",
"Employee(String name, String password, String username, String email) {\n this.name = name;\n this.username = username;\n this.email = email;\n this.password = password;\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnBack = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jComboBoxOrganzationType = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jComboBoxOrganizationName = new javax.swing.JComboBox();\n jLabel3 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblEmployee = new javax.swing.JTable();\n btnViewProfile = new javax.swing.JButton();\n btnCreateEmployee = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n lblFirstName = new javax.swing.JLabel();\n lblLastName = new javax.swing.JLabel();\n txtFirstName = new javax.swing.JTextField();\n txtLastName = new javax.swing.JTextField();\n lblSecondaryPhoneNo = new javax.swing.JLabel();\n txtPrimaryPhoneNo = new javax.swing.JTextField();\n lblPrimaryPhoneNo = new javax.swing.JLabel();\n txtSecondaryPhoneNo = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n jSeparator2 = new javax.swing.JSeparator();\n lblEmailId = new javax.swing.JLabel();\n txtEmailId = new javax.swing.JTextField();\n btnUpdateOrCreate = new javax.swing.JButton();\n lblFirstNameValidator = new javax.swing.JLabel();\n lblLastNameValidator = new javax.swing.JLabel();\n lblPrimaryPhoneNoValidator = new javax.swing.JLabel();\n lblEmailIdValidator = new javax.swing.JLabel();\n lblSecondaryPhoneValidator = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(153, 153, 153));\n\n btnBack.setBackground(new java.awt.Color(102, 102, 255));\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 jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel4.setText(\"Manage Employees !\");\n\n jComboBoxOrganzationType.setBackground(new java.awt.Color(102, 102, 255));\n jComboBoxOrganzationType.setPreferredSize(new java.awt.Dimension(200, 25));\n jComboBoxOrganzationType.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBoxOrganzationTypeActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Organization Type:\");\n\n jLabel2.setText(\"Organziation Name:\");\n\n jComboBoxOrganizationName.setBackground(new java.awt.Color(102, 102, 255));\n jComboBoxOrganizationName.setPreferredSize(new java.awt.Dimension(200, 25));\n jComboBoxOrganizationName.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBoxOrganizationNameActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Employee List of Organization-Organization Name\");\n\n tblEmployee.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Employee Id\", \"First Name\", \"Last Name\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(tblEmployee);\n\n btnViewProfile.setBackground(new java.awt.Color(102, 102, 255));\n btnViewProfile.setText(\"View Profile\");\n btnViewProfile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnViewProfileActionPerformed(evt);\n }\n });\n\n btnCreateEmployee.setBackground(new java.awt.Color(102, 102, 255));\n btnCreateEmployee.setText(\"Create New Employee\");\n btnCreateEmployee.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCreateEmployeeActionPerformed(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jPanel1.setEnabled(false);\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblFirstName.setText(\"*First Name:\");\n lblFirstName.setEnabled(false);\n jPanel1.add(lblFirstName, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 10, -1, -1));\n\n lblLastName.setText(\"*Last Name:\");\n lblLastName.setEnabled(false);\n jPanel1.add(lblLastName, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 50, -1, -1));\n\n txtFirstName.setEnabled(false);\n jPanel1.add(txtFirstName, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 10, 150, -1));\n\n txtLastName.setEnabled(false);\n jPanel1.add(txtLastName, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 50, 150, -1));\n\n lblSecondaryPhoneNo.setText(\"Secondary Phone No:\");\n lblSecondaryPhoneNo.setEnabled(false);\n jPanel1.add(lblSecondaryPhoneNo, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 140, -1, -1));\n\n txtPrimaryPhoneNo.setEnabled(false);\n jPanel1.add(txtPrimaryPhoneNo, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 100, 150, -1));\n\n lblPrimaryPhoneNo.setText(\"*Primary Phone No:\");\n lblPrimaryPhoneNo.setEnabled(false);\n jPanel1.add(lblPrimaryPhoneNo, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 100, -1, -1));\n\n txtSecondaryPhoneNo.setEnabled(false);\n jPanel1.add(txtSecondaryPhoneNo, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 140, 150, -1));\n jPanel1.add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 170, 330, -1));\n jPanel1.add(jSeparator2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 330, -1));\n\n lblEmailId.setText(\"*Email Id:\");\n lblEmailId.setEnabled(false);\n jPanel1.add(lblEmailId, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 190, -1, -1));\n\n txtEmailId.setEnabled(false);\n jPanel1.add(txtEmailId, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 190, 150, -1));\n\n btnUpdateOrCreate.setBackground(new java.awt.Color(102, 102, 255));\n btnUpdateOrCreate.setText(\"Update or Create\");\n btnUpdateOrCreate.setEnabled(false);\n btnUpdateOrCreate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUpdateOrCreateActionPerformed(evt);\n }\n });\n jPanel1.add(btnUpdateOrCreate, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 230, 140, 30));\n\n lblFirstNameValidator.setForeground(new java.awt.Color(255, 0, 0));\n lblFirstNameValidator.setPreferredSize(new java.awt.Dimension(200, 20));\n jPanel1.add(lblFirstNameValidator, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 270, 340, -1));\n\n lblLastNameValidator.setForeground(new java.awt.Color(255, 0, 0));\n lblLastNameValidator.setPreferredSize(new java.awt.Dimension(200, 20));\n jPanel1.add(lblLastNameValidator, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 290, 340, -1));\n\n lblPrimaryPhoneNoValidator.setForeground(new java.awt.Color(255, 0, 0));\n lblPrimaryPhoneNoValidator.setPreferredSize(new java.awt.Dimension(200, 20));\n jPanel1.add(lblPrimaryPhoneNoValidator, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 310, 340, -1));\n\n lblEmailIdValidator.setForeground(new java.awt.Color(255, 0, 0));\n lblEmailIdValidator.setPreferredSize(new java.awt.Dimension(200, 20));\n jPanel1.add(lblEmailIdValidator, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 370, 340, -1));\n\n lblSecondaryPhoneValidator.setForeground(new java.awt.Color(255, 0, 0));\n lblSecondaryPhoneValidator.setPreferredSize(new java.awt.Dimension(200, 20));\n jPanel1.add(lblSecondaryPhoneValidator, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 340, 340, -1));\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, 705, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnBack)\n .addGap(235, 235, 235)\n .addComponent(jLabel4))\n .addGroup(layout.createSequentialGroup()\n .addGap(13, 13, 13)\n .addComponent(jLabel1)\n .addGap(30, 30, 30)\n .addComponent(jComboBoxOrganzationType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(13, 13, 13)\n .addComponent(jLabel2)\n .addGap(27, 27, 27)\n .addComponent(jComboBoxOrganizationName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(13, 13, 13)\n .addComponent(jLabel3))\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 652, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(btnViewProfile, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(btnCreateEmployee))\n .addGroup(layout.createSequentialGroup()\n .addGap(160, 160, 160)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 370, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 690, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnBack)\n .addComponent(jLabel4))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(3, 3, 3)\n .addComponent(jLabel1))\n .addComponent(jComboBoxOrganzationType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(3, 3, 3)\n .addComponent(jLabel2))\n .addComponent(jComboBoxOrganizationName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(34, 34, 34)\n .addComponent(jLabel3)\n .addGap(6, 6, 6)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(6, 6, 6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnViewProfile)\n .addComponent(btnCreateEmployee))\n .addGap(7, 7, 7)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 400, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n }",
"public Employee() {\n }",
"public Employee() {\n }",
"public Employee() {\n }",
"public Employee() {\n \n }",
"public Add_E() {\n initComponents();\n this.setTitle(\"Add Engineer\");\n }",
"@GetMapping(\"/showNewTeamForm\")\n public String showNewTeamForm(Model model) {\n\n Page<Employee> page = employeeService.findPaginated(1, 5,\"firstName\", \"asc\");\n List<Employee> listEmployees = page.getContent();\n\n Team team= new Team();\n model.addAttribute(\"team\", team);\n model.addAttribute(\"listEmployees\", listEmployees);\n model.addAttribute(\"listEmployeesFromTeam\", team.getEmployeeList());\n return \"new_team\";\n }",
"@PostMapping(\"/employee\")\n\tpublic Employee createEmployee(@RequestBody Employee employee) {\n\t\treturn emprepo.save(employee);\n\t}",
"@PostMapping(value=\"/employes\")\n\tpublic void createEmployeeDeatils(@RequestBody Employee employee){\n\t\t\t\n\t\temployeeService.saveEmployeeDetails(employee);\n\t\t\n\t}",
"public static void createEmployees() {\n Connection con = getConnection();\n\n String createString;\n createString = \"create table Employees (\" +\n \"Employee_ID INTEGER, \" +\n \"Name VARCHAR(30))\";\n try {\n stmt = con.createStatement();\n stmt.executeUpdate(createString);\n stmt.close();\n con.close();\n\n } catch (SQLException ex) {\n System.err.println(\"SQLException: \" + ex.getMessage());\n }\n JOptionPane.showMessageDialog(null, \"Employees Table Created\");\n }",
"@RequestMapping(value = \"/showProductGrn\", method = RequestMethod.GET)\n\t public ModelAndView showEmployee(ModelAndView model) \n\t {\n\t model.addObject(\"grnProduct\", new GrnProduct());\n\t \n\t model.setViewName(\"productgrn/createProductGrn\");\n\t \n\t\t\treturn model;\n\t }",
"public void create(Employee employee, Company company, IncomingReport incoming_report) throws IllegalArgumentException, DAOException;",
"public Employee() {\n\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}",
"@Override\n\tpublic Employee create(Employee emp) {\n\t\tlog.debug(\"Welcome to logging\");\n\t\tSystem.out.println(\"Server logs \");\n\t\temployeeDAO.create(emp);\n\t\treturn null;\n\t}",
"public AddEmployee() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Large_Employee(\n String txtMobile,\n String txtEmail,\n String emailPassword,\n String corpPhoneType,\n String corpPhoneNumber,\n int employeeID){\n this.txtMobile = txtMobile;\n this.txtEmail = txtEmail;\n this.emailPassword = emailPassword;\n this.corpPhoneType = corpPhoneType;\n this.corpPhoneNumber = corpPhoneNumber;\n this.employeeID = employeeID;\n }",
"public Employee(){\r\n }",
"@PostMapping(\"/save\")\n\tpublic ResponseEntity<String> createEmployee(@RequestBody Employee employee) {\n\t\tInteger id = service.saveEmployee(employee);\n\t\tString message = \"Employee '\" + id + \"' Created!\";\n\t\treturn new ResponseEntity<String>(message, HttpStatus.CREATED); // 201\n\t}",
"public void setCreateEmpId(Integer createEmpId) {\n this.createEmpId = createEmpId;\n }",
"@Override\n public void setEmployees() throws EmployeeCreationException {\n\n }",
"@PostMapping(\"/addEmployee\")\n\tpublic ResponseEntity<EmployeeMon> createEmployee(@RequestBody EmployeeMon employee)\n\t{\n\t\ttry {\n\t\t\tEmployeeMon stud = repository.save(\n\t\t\t\t\tnew EmployeeMon(employee.getId(),employee.getName(),employee.getAddress(), employee.getEmail(),\n\t\t\t\t\t\t\temployee.getSalary()));\n\t\t\tLOGGER.info(\"Inserted data into Table\");\n\t\t\treturn new ResponseEntity<>(stud, HttpStatus.CREATED);\n\t\t} catch(Exception e) {\n\t\t\treturn new ResponseEntity<>(null, HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t}",
"@PostMapping(\"/createEmployee\")\n\tpublic Employee createEmployee(@RequestBody Employee employee) {\n\t\treturn repo.save(employee);\n\t}",
"public Employee() {}",
"public String addEmployee(EmployeeDetails employeeDetails) throws NullPointerException;",
"public EmployeeController()\n\t{\n\t\tValidatorFactory validatorFactory = Validation.buildDefaultValidatorFactory();\n\t\tvalidator = validatorFactory.getValidator();\n\t}",
"Employee(String id, Kitchen kitchen) {\r\n this.id = id;\r\n this.kitchen = kitchen;\r\n this.attendance = \"Present\";\r\n this.password = \"password\";\r\n }",
"public void attemptToCreateEmployee(String firstName, String lastName, String employeeId, String documentNo) {\n driver.findElement(By.cssSelector(\"ms-add-button[tooltip=\\\"EMPLOYEE.TITLE.ADD\\\"]\")).click();\n\n // Fill in the form\n driver.findElement(By.cssSelector(\"ms-text-field[formcontrolname='firstName']>input\")).sendKeys(firstName);\n driver.findElement(By.cssSelector(\"ms-text-field[formcontrolname=\\\"lastName\\\"]>input\")).sendKeys(lastName);\n driver.findElement(By.cssSelector(\"input[formcontrolname=\\\"employeeId\\\"]\")).sendKeys(employeeId);\n\n driver.findElement(By.cssSelector(\"mat-card >div:nth-child(2)>:nth-child(1)\")).click();\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(\"mat-option:nth-child(1)\"))).click();\n\n driver.findElement(By.cssSelector(\"input[formcontrolname=\\\"documentNumber\\\"]\")).sendKeys(documentNo);\n\n //Click on Save button\n driver.findElement(By.cssSelector(\"ms-save-button > button\")).click();\n }",
"@PostMapping(\"/employees\")\r\n\tpublic Employee addEmployee(@RequestBody Employee theEmployee) {\r\n\t\t\r\n\t\t// also just in case the pass an id in JSON... set id to 0\r\n\t\t// this force a save of new item...instead of update\r\n\t\ttheEmployee.setId(0);\r\n\t\t\r\n\t\temployeeService.saveEmployee(theEmployee);\r\n\t\t\r\n\t\treturn theEmployee;\r\n\t\t\r\n\t}",
"private void newJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newJMenuItemActionPerformed\n // TODO add your handling code here:\n //Event handler for Adding a new employee \n try\n {\n //Create and display a new AddDialog\n boolean empExists = false;\n AddEmployee addEmployee = new AddEmployee(this, true);\n addEmployee.setVisible(true);\n Employee newEmployee = addEmployee.getEmployee();\n String employeeName = newEmployee.getName();\n empExists = findEmployee(employeeName) != null;\n if(newEmployee != null && empExists == false)\n { \n employees.add(newEmployee);\n displayEmployee();\n saveEmployee();\n }\n else\n {\n String first = employeeName + \" already exists.\";\n String second = \"No update was made.\";\n displayResults(first, second);\n employeeJList.setVisible(true);\n employeeJList.setSelectedIndex(0);\n }\n }\n catch(NullPointerException nullex)\n {\n JOptionPane.showMessageDialog(null, \"Employee not added\", \"Input error\",\n JOptionPane.WARNING_MESSAGE);\n employeeJList.setVisible(true);\n employeeJList.setSelectedIndex(0); \n }\n }",
"public Employee() {\n\t\tSystem.out.println(\"Employee Contructor Called...\");\n\t}",
"public EmployeeLoginController() {\n }",
"public void addEmployee(Employee emp) {\n\t\t\r\n\t}",
"@RequestMapping(value=\"/addEmployeeSubmit\", method=RequestMethod.POST)\n /* Add submitted new employee details to database, and then redirect to listEmployees */\n public String addEmployeeSubmit(Employee employee) {\n employeeservice.saveEmployee(employee);\n\n return \"redirect:/employee/listEmployees\";\n }",
"public Employee(String nama, int usia) {\r\n // Constructor digunakan untuk inisialisasi value, yang di inisiate saat melakukan instantiation\r\n this.nama = nama;\r\n this.usia = usia;\r\n }",
"@PostMapping(\"/add_employee\")\n public ResponseEntity<?> createEmployee(@Valid @RequestBody Employee employee){\n\n employeeService.add_employee(employee);\n\n return new ResponseEntity<>(\"Employee was added successfully!\", HttpStatus.OK);\n }",
"@PostMapping(\"/saveEmployee\")\n\tpublic String saveEmployee(@ModelAttribute(\"employee\") Employees employee) {\n\t\tservice.saveEmployee(employee);\n\t\treturn \"redirect:/employees\";\n\t}",
"public void setCreateEmpId(String createEmpId) {\n this.createEmpId = createEmpId;\n }",
"@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}",
"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}",
"public EmployeeView(Employees employees,int status, /*EmployeWork setEmpl,*/ JFrame frame)\n {\n super(frame, \"EmployeeView\", true);\n this.setResizable(false);\n this.setSize(300, 200);\n //this.status = status;\n //this.setEmpl = setEmpl;\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n this.employeesModel = employees;\n textFieldfirstname.setText(employeesModel.getFirstName());\n textsecondtname.setText(employeesModel.getSecondName());\n textFieldfphone.setText(employeesModel.getPhoneNumber());\n String salary = \"\";\n salary += employeesModel.getSalary();\n textsalary.setText(salary);\n JPanel panel = new JPanel();\n this.add(panel);\n panel.setLayout(new BorderLayout());\n JPanel panelname = new JPanel();\n panelname.add(labalfirstname);\n panelname.add(textFieldfirstname);\n panel.add(panelname, BorderLayout.NORTH);\n JPanel panelsname = new JPanel();\n JPanel panelcenter = new JPanel();\n JPanel panelphone = new JPanel();\n panelcenter.setLayout(new BorderLayout());\n panelsname.add(labalsecondtname);\n panelsname.add(textsecondtname);\n panelcenter.add(panelsname, BorderLayout.NORTH);\n panelphone.add(labelphone);\n panelphone.add(textFieldfphone);\n panelcenter.add(panelphone, BorderLayout.CENTER);\n JPanel panelsalary = new JPanel();\n panelsalary.add(labelsalary);\n panelsalary.add(textsalary);\n panelcenter.add(panelsalary, BorderLayout.SOUTH);\n panel.add(panelcenter, BorderLayout.CENTER);\n JPanel panelbut = new JPanel();\n JPanel panelchec= new JPanel();\n panelbut.add(buttonset);\n panelbut.add(buttonOk);\n panel.add(panelbut, BorderLayout.SOUTH);\n buttonOk.addActionListener(new ActionListener()\n {\n @Override\n public void actionPerformed(ActionEvent e)\n {\n try\n {\n if (flagcreate == GOOD_CREATE)\n {\n setVisible(false);\n dispose();\n }\n else throw new Exception();\n }\n catch (Exception e1)\n {\n JOptionPane.showMessageDialog(EmployeeView.this, \"Ошибка\", \"Вы вы вели плохие параметры\", JOptionPane.WARNING_MESSAGE);\n }\n }\n });\n buttonset.addActionListener(new ActionListener()\n {\n @Override\n public void actionPerformed(ActionEvent e)\n {\n try\n {\n if (textFieldfirstname.getText().equals(\"\") || textsecondtname.getText().equals(\"\")\n || textFieldfphone.getText().equals(\"\"))\n {\n throw new Exception();\n }\n employeesModel.setFirstName(textFieldfirstname.getText());\n employeesModel.setSecondName(textsecondtname.getText());\n employeesModel.setPhoneNumber(textFieldfphone.getText());\n employeesModel.setSalary(Integer.parseInt(textsalary.getText()));\n flagcreate = GOOD_CREATE;\n }\n catch (Exception e1)\n {\n flagcreate = BAD_CREATE;\n JOptionPane.showMessageDialog(EmployeeView.this, \"Ошибка\", \"Вы вы вели плохие параметры\", JOptionPane.WARNING_MESSAGE);\n }\n }\n\n });\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}",
"@PostMapping(\"/employee\")\r\n\tpublic Employee createEmployee(@RequestBody Employee emp)\r\n\t{\r\n\t\treturn empdao.save(emp);\t\r\n\t}",
"public void registhourly_employee(Hourly_employee form) throws UserException, ClassNotFoundException, InstantiationException, IllegalAccessException{\n\t\tHourly_employee hrs = hourly_employeeDao.findByHourly_ssn(form.gethourly_ssn());\r\n\t\tString hrsID = hrs.gethourly_ssn();\r\n\t\tString formID = form.gethourly_ssn();\r\n\t\t\r\n\t\tif(hrsID == formID)\r\n\t\t\tthrow new UserException(\"This Employee ID has already been in your Database!\");\r\n\t\t\r\n\t\thourly_employeeDao.add(form);\r\n\t}",
"public AJAXEmployeeEditHandler() {\n super();\n // TODO Auto-generated constructor stub\n }",
"public creacionempresa() {\n initComponents();\n mostrardatos();\n }",
"public frmMantEmpresas() {\n initComponents();\n this.presentarDatos();\n ClaseUtil.activarComponente(jPanelDatos, false);\n ClaseUtil.activarComponente(jPanelTabla, true);\n ClaseUtil.activarComponente(jPanelAcciones, false);\n }",
"@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}",
"void addEmployee(Employee emp){\n\t\tEntityManager em = emf.createEntityManager();\n\t\tEntityTransaction tx = em.getTransaction();\n\t\ttx.begin();\n\t\tem.persist(emp);\n\t\ttx.commit();\n\t\tem.close();\n\t}"
] | [
"0.7641928",
"0.6853509",
"0.68508226",
"0.6632706",
"0.6629085",
"0.65116733",
"0.6508229",
"0.6430332",
"0.63982755",
"0.6385436",
"0.6363622",
"0.63491917",
"0.6301066",
"0.62939125",
"0.62746435",
"0.6273666",
"0.62608683",
"0.6247043",
"0.62442756",
"0.622158",
"0.6211675",
"0.61867183",
"0.6182612",
"0.61519396",
"0.6133973",
"0.6109775",
"0.6107318",
"0.6103607",
"0.607544",
"0.60595703",
"0.60579544",
"0.60562503",
"0.60539764",
"0.6049636",
"0.6037623",
"0.6035924",
"0.6022756",
"0.6018585",
"0.6015316",
"0.5971949",
"0.59705114",
"0.5966322",
"0.59476334",
"0.59210616",
"0.59113306",
"0.59091336",
"0.5891192",
"0.5889298",
"0.5880966",
"0.5880966",
"0.58805877",
"0.5876834",
"0.5872302",
"0.58708304",
"0.58708304",
"0.58708304",
"0.5870143",
"0.5867555",
"0.58596355",
"0.5859621",
"0.58586705",
"0.58516747",
"0.5848828",
"0.58405566",
"0.5833245",
"0.5826708",
"0.5823982",
"0.58174056",
"0.581649",
"0.5807354",
"0.5805924",
"0.58047986",
"0.57975173",
"0.5794435",
"0.57845116",
"0.5782669",
"0.5781214",
"0.5774559",
"0.5772258",
"0.5765579",
"0.5755185",
"0.57544655",
"0.5751326",
"0.57483166",
"0.5746931",
"0.5732045",
"0.57308203",
"0.57250166",
"0.57221997",
"0.5721767",
"0.5713286",
"0.57115173",
"0.57049125",
"0.5693438",
"0.569122",
"0.567959",
"0.5675974",
"0.56751037",
"0.5663648",
"0.5660676",
"0.5657647"
] | 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")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
panel_title = new javax.swing.JPanel();
lb_title = new javax.swing.JLabel();
btn_exit = new javax.swing.JButton();
panel_total = new javax.swing.JPanel();
panel_cusmanagement = new javax.swing.JPanel();
lb_cusid = new javax.swing.JLabel();
lb_getcusid = new javax.swing.JLabel();
lb_cusname = new javax.swing.JLabel();
lb_cusaddress = new javax.swing.JLabel();
lb_cusphone = new javax.swing.JLabel();
tf_getcusname = new javax.swing.JTextField();
tf_getcusaddress = new javax.swing.JTextField();
tf_getcusphone = new javax.swing.JTextField();
panel_inputidcus = new javax.swing.JPanel();
tf_cusid = new javax.swing.JTextField();
panel_cuslist = new javax.swing.JPanel();
scroll_cuslist = new javax.swing.JScrollPane();
tab_cuslist = new javax.swing.JTable();
btn_addcus = new javax.swing.JButton();
btn_updatecus = new javax.swing.JButton();
btn_deletecus = new javax.swing.JButton();
btn_addcus1 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setUndecorated(true);
setPreferredSize(new java.awt.Dimension(865, 700));
panel_title.setBackground(new java.awt.Color(51, 102, 255));
panel_title.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 0, 2, new java.awt.Color(0, 0, 0)));
lb_title.setFont(new java.awt.Font("Times New Roman", 1, 48)); // NOI18N
lb_title.setForeground(new java.awt.Color(255, 255, 255));
lb_title.setText("CUSTOMER MANAGEMENT");
btn_exit.setBackground(new java.awt.Color(255, 255, 255));
btn_exit.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
btn_exit.setText("X");
btn_exit.setOpaque(false);
btn_exit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_exitActionPerformed(evt);
}
});
javax.swing.GroupLayout panel_titleLayout = new javax.swing.GroupLayout(panel_title);
panel_title.setLayout(panel_titleLayout);
panel_titleLayout.setHorizontalGroup(
panel_titleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel_titleLayout.createSequentialGroup()
.addContainerGap(108, Short.MAX_VALUE)
.addComponent(lb_title, javax.swing.GroupLayout.PREFERRED_SIZE, 665, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(33, 33, 33)
.addComponent(btn_exit)
.addContainerGap())
);
panel_titleLayout.setVerticalGroup(
panel_titleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel_titleLayout.createSequentialGroup()
.addGroup(panel_titleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel_titleLayout.createSequentialGroup()
.addContainerGap()
.addComponent(btn_exit, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panel_titleLayout.createSequentialGroup()
.addGap(25, 25, 25)
.addComponent(lb_title, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(20, Short.MAX_VALUE))
);
getContentPane().add(panel_title, java.awt.BorderLayout.PAGE_START);
panel_total.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
panel_cusmanagement.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "Customer Management", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Times New Roman", 3, 12))); // NOI18N
lb_cusid.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
lb_cusid.setText("Customer ID:");
lb_getcusid.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
lb_getcusid.setText("00111");
lb_cusname.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
lb_cusname.setText("Customer Name:");
lb_cusaddress.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
lb_cusaddress.setText("Customer Address:");
lb_cusphone.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
lb_cusphone.setText("Customer Phone:");
tf_getcusname.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
tf_getcusphone.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
javax.swing.GroupLayout panel_cusmanagementLayout = new javax.swing.GroupLayout(panel_cusmanagement);
panel_cusmanagement.setLayout(panel_cusmanagementLayout);
panel_cusmanagementLayout.setHorizontalGroup(
panel_cusmanagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel_cusmanagementLayout.createSequentialGroup()
.addContainerGap()
.addGroup(panel_cusmanagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel_cusmanagementLayout.createSequentialGroup()
.addComponent(lb_cusid)
.addGap(64, 64, 64)
.addComponent(lb_getcusid, javax.swing.GroupLayout.DEFAULT_SIZE, 283, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel_cusmanagementLayout.createSequentialGroup()
.addComponent(lb_cusname)
.addGap(45, 45, 45)
.addComponent(tf_getcusname))
.addGroup(panel_cusmanagementLayout.createSequentialGroup()
.addGroup(panel_cusmanagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lb_cusaddress)
.addComponent(lb_cusphone))
.addGap(31, 31, 31)
.addGroup(panel_cusmanagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(tf_getcusaddress)
.addComponent(tf_getcusphone))))
.addContainerGap())
);
panel_cusmanagementLayout.setVerticalGroup(
panel_cusmanagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel_cusmanagementLayout.createSequentialGroup()
.addGap(1, 1, 1)
.addGroup(panel_cusmanagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lb_cusid)
.addComponent(lb_getcusid, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, Short.MAX_VALUE)
.addGroup(panel_cusmanagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lb_cusname)
.addComponent(tf_getcusname, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(panel_cusmanagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lb_cusaddress)
.addComponent(tf_getcusaddress, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(panel_cusmanagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lb_cusphone)
.addComponent(tf_getcusphone, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(23, 23, 23))
);
panel_inputidcus.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "Input Customer ID", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Times New Roman", 3, 12))); // NOI18N
javax.swing.GroupLayout panel_inputidcusLayout = new javax.swing.GroupLayout(panel_inputidcus);
panel_inputidcus.setLayout(panel_inputidcusLayout);
panel_inputidcusLayout.setHorizontalGroup(
panel_inputidcusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel_inputidcusLayout.createSequentialGroup()
.addContainerGap()
.addComponent(tf_cusid, javax.swing.GroupLayout.DEFAULT_SIZE, 299, Short.MAX_VALUE)
.addContainerGap())
);
panel_inputidcusLayout.setVerticalGroup(
panel_inputidcusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel_inputidcusLayout.createSequentialGroup()
.addContainerGap()
.addComponent(tf_cusid, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)
.addContainerGap())
);
panel_cuslist.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "Customer List", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Times New Roman", 3, 12))); // NOI18N
tab_cuslist.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
scroll_cuslist.setViewportView(tab_cuslist);
javax.swing.GroupLayout panel_cuslistLayout = new javax.swing.GroupLayout(panel_cuslist);
panel_cuslist.setLayout(panel_cuslistLayout);
panel_cuslistLayout.setHorizontalGroup(
panel_cuslistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel_cuslistLayout.createSequentialGroup()
.addContainerGap()
.addComponent(scroll_cuslist, javax.swing.GroupLayout.DEFAULT_SIZE, 811, Short.MAX_VALUE)
.addContainerGap())
);
panel_cuslistLayout.setVerticalGroup(
panel_cuslistLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel_cuslistLayout.createSequentialGroup()
.addContainerGap()
.addComponent(scroll_cuslist, javax.swing.GroupLayout.PREFERRED_SIZE, 279, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
btn_addcus.setBackground(new java.awt.Color(0, 153, 255));
btn_addcus.setFont(new java.awt.Font("Times New Roman", 1, 12)); // NOI18N
btn_addcus.setForeground(new java.awt.Color(255, 255, 255));
btn_addcus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/plus.png"))); // NOI18N
btn_addcus.setText("SAVE");
btn_addcus.setToolTipText("");
btn_addcus.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_addcusActionPerformed(evt);
}
});
btn_updatecus.setBackground(new java.awt.Color(0, 153, 255));
btn_updatecus.setFont(new java.awt.Font("Times New Roman", 1, 12)); // NOI18N
btn_updatecus.setForeground(new java.awt.Color(255, 255, 255));
btn_updatecus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/update.png"))); // NOI18N
btn_updatecus.setText("EDIT");
btn_updatecus.setPreferredSize(new java.awt.Dimension(111, 49));
btn_deletecus.setBackground(new java.awt.Color(0, 153, 255));
btn_deletecus.setFont(new java.awt.Font("Times New Roman", 1, 12)); // NOI18N
btn_deletecus.setForeground(new java.awt.Color(204, 0, 51));
btn_deletecus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/minus.png"))); // NOI18N
btn_deletecus.setText("DELETE");
btn_addcus1.setBackground(new java.awt.Color(0, 153, 255));
btn_addcus1.setFont(new java.awt.Font("Times New Roman", 1, 12)); // NOI18N
btn_addcus1.setForeground(new java.awt.Color(255, 255, 255));
btn_addcus1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/plus.png"))); // NOI18N
btn_addcus1.setText("NEW\\");
btn_addcus1.setMaximumSize(new java.awt.Dimension(105, 49));
btn_addcus1.setMinimumSize(new java.awt.Dimension(105, 49));
btn_addcus1.setPreferredSize(new java.awt.Dimension(105, 49));
btn_addcus1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_addcus1ActionPerformed(evt);
}
});
javax.swing.GroupLayout panel_totalLayout = new javax.swing.GroupLayout(panel_total);
panel_total.setLayout(panel_totalLayout);
panel_totalLayout.setHorizontalGroup(
panel_totalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel_totalLayout.createSequentialGroup()
.addContainerGap()
.addGroup(panel_totalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel_totalLayout.createSequentialGroup()
.addComponent(panel_cuslist, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
.addGroup(panel_totalLayout.createSequentialGroup()
.addComponent(panel_cusmanagement, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panel_totalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel_totalLayout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panel_totalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(btn_addcus1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btn_addcus, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panel_totalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(btn_updatecus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btn_deletecus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(14, 14, 14))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel_totalLayout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(panel_inputidcus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(49, 49, 49))))
);
panel_totalLayout.setVerticalGroup(
panel_totalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel_totalLayout.createSequentialGroup()
.addGroup(panel_totalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(panel_totalLayout.createSequentialGroup()
.addGap(43, 43, 43)
.addComponent(panel_inputidcus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(panel_totalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btn_addcus1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btn_updatecus, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panel_totalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btn_addcus, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btn_deletecus, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(12, 12, 12))
.addGroup(panel_totalLayout.createSequentialGroup()
.addContainerGap()
.addComponent(panel_cusmanagement, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(panel_cuslist, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
btn_addcus1.getAccessibleContext().setAccessibleName("NEW");
getContentPane().add(panel_total, java.awt.BorderLayout.PAGE_END);
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 quotaGUI() {\n initComponents();\n }",
"public BloodDonationGUI() {\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 LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public kunde() {\n initComponents();\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 EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public UploadForm() {\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 Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\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.7319037",
"0.7290621",
"0.7290621",
"0.7290621",
"0.7285163",
"0.72480375",
"0.72130316",
"0.7207723",
"0.7195822",
"0.7189463",
"0.7183591",
"0.71580946",
"0.7147075",
"0.70924276",
"0.70795405",
"0.7056352",
"0.6986753",
"0.6976759",
"0.6954958",
"0.69533294",
"0.6944831",
"0.69417095",
"0.6934517",
"0.6930924",
"0.6926761",
"0.69241685",
"0.6923851",
"0.69112706",
"0.6910913",
"0.689217",
"0.689193",
"0.6890017",
"0.68896353",
"0.6888143",
"0.68825865",
"0.6881063",
"0.6880471",
"0.6877822",
"0.68752986",
"0.6873734",
"0.68713146",
"0.6859294",
"0.6856707",
"0.685489",
"0.6854541",
"0.68543345",
"0.68526614",
"0.68516856",
"0.68516856",
"0.6842822",
"0.6836592",
"0.6836195",
"0.68277925",
"0.6827518",
"0.68260497",
"0.682339",
"0.68222433",
"0.6816619",
"0.6815844",
"0.68096834",
"0.6808133",
"0.68078655",
"0.6807532",
"0.68070555",
"0.6802426",
"0.6794083",
"0.679347",
"0.6791848",
"0.6790225",
"0.6788846",
"0.67884487",
"0.6787538",
"0.67819446",
"0.6766094",
"0.676505",
"0.6764832",
"0.67562455",
"0.6754961",
"0.67515653",
"0.6750421",
"0.6742601",
"0.673875",
"0.67371166",
"0.6735209",
"0.6732373",
"0.6727282",
"0.6726048",
"0.6719771",
"0.67154175",
"0.6714355",
"0.671359",
"0.67079127",
"0.670646",
"0.670331",
"0.6700197",
"0.669957",
"0.6698499",
"0.6697054",
"0.6693929",
"0.6690299",
"0.66896695"
] | 0.0 | -1 |
Sets the private key registry by alias. | public void setPrivateKeyRegistryByAlias(PrivateKeyRegistryByAlias privateKeyRegistryByAlias) {
this.privateKeyRegistryByAlias = privateKeyRegistryByAlias;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static void setKeyStoreAlias(String keyStoreAlias) {\n Program.keyStoreAlias = keyStoreAlias;\n }",
"public void setAlias(String newAlias) {\n alias = newAlias;\n }",
"public void setAlias(String alias);",
"public void setAlias(String alias)\n {\n this.alias = alias;\n }",
"void registerAlias( String beanName, String alias );",
"public void addAlias (String alias)\n {\n if (aliases.contains(alias)) {\n return;\n }\n aliases.add(alias);\n }",
"public void setAlias(String alias) {\r\n\t\tthis.alias = alias;\r\n\t}",
"public void setAliases(final String alias, final String rowAlias, final String rowSetAlias);",
"public void setAlias(String alias) {\n\t\tthis.alias = alias;\n\t}",
"public void addAlias(Origin alias, Origin target) {\n aliases.put(alias, target);\n }",
"public ConnectInfo setPrivateKey(final char[] privateKey) {\n\t\tif(privateKey==null) throw new IllegalArgumentException(\"The passed privateKey was null\");\n\t\tthis.privateKey = privateKey;\n\t\treturn this;\n\t}",
"public PrivateKey getPrivateKey(String alias) {\n if (alias != null)\n\t\t System.out.println(\"==KeyManager. Get private key for \" + alias);\n\t\tPrivateKey pk = myKeyManager.getPrivateKey(alias);\n\t\treturn pk;\n\t}",
"public ConnectInfo setPrivateKey(final String privateKey) {\n\t\tif(privateKey==null) throw new IllegalArgumentException(\"The passed privateKey was null\");\n\t\tthis.privateKey = privateKey.toCharArray();\n\t\treturn this;\t\t\n\t}",
"public void setAliases(Set<Object> aliases)\n {\n // WARNING: This code is hack for backwards compatiblity\n \n // Here we fixup the aliases to map JMX like ObjectNames to their canonical form\n // I've made it a protected method needsAnAlias so others can subclass and\n // change the rules (including not doing this at all)\n // NOTE: This method should be invoked from all constructors\n if (aliases == null)\n {\n // There are no explicit aliases so just see whether the name is an ObjectName.\n Object alias = needsAnAlias(name);\n // No alias required\n if (alias == null)\n this.aliases = null;\n else\n // Add a single alias with canonical name\n this.aliases = Collections.singleton(alias);\n }\n else\n {\n // Always clone the aliases passed it\n this.aliases = new HashSet<Object>();\n // Check the main name\n Object alias = needsAnAlias(name);\n if (alias != null)\n this.aliases.add(alias);\n // Check the aliases\n for (Object passedAlias : aliases)\n {\n this.aliases.add(passedAlias);\n alias = needsAnAlias(passedAlias);\n if (alias != null)\n this.aliases.add(alias);\n }\n }\n }",
"void setAuthInfoKey(Object key);",
"@Accessor(qualifier = \"privateKey\", type = Accessor.Type.SETTER)\n\tpublic void setPrivateKey(final String value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(PRIVATEKEY, value);\n\t}",
"public ConnectInfo setPrivateKey(final File privateKey) {\n\t\tif(privateKey==null) throw new IllegalArgumentException(\"The passed privateKey was null\");\n\t\tif(!privateKey.canRead()) throw new IllegalArgumentException(\"The passed privateKey file [\" + privateKey.getAbsolutePath() + \"] cannot be read\");\n\t\tthis.privateKey = URLHelper.getCharsFromURL(privateKey.getAbsolutePath());\n\t\treturn this;\t\t\n\t}",
"public void setPrivateKey(java.nio.ByteBuffer privateKey) {\n this.privateKey = privateKey;\n }",
"private void putPrivateDnsSettings(int mode, @Nullable String host) {\n mInjector.binderWithCleanCallingIdentity(() -> {\n ConnectivitySettingsManager.setPrivateDnsMode(mContext, mode);\n ConnectivitySettingsManager.setPrivateDnsHostname(mContext, host);\n });\n }",
"public export.serializers.avro.DeviceInfo.Builder setAlias(java.lang.CharSequence value) {\n validate(fields()[4], value);\n this.alias = value;\n fieldSetFlags()[4] = true;\n return this;\n }",
"public PropertySpecBuilder<T> alias(String alias)\n {\n Preconditions.checkArgument(this.alias == null, \"alias already set\");\n this.alias = alias;\n\n return this;\n }",
"public void modificarPlayer2(String alias){\n ListIterator itr=listaJugadores.listIterator();\n while(itr.hasNext()){\n Player p=(Player)itr.next();\n if(p.getAlias().equals(alias))\n jugador2=p;\n }\n }",
"@Override\n public void setAlias(String alias) {\n throw new UnsupportedOperationException(\"View doesn't support alias\");\n }",
"void setDevkey(String devkey);",
"public void setPrivateKey(PrivateKey privateKey) {\n this.privateKey = privateKey;\n }",
"void privateSetAgregateKey(com.hps.july.persistence.StorageCardKey inKey) throws java.rmi.RemoteException;",
"public void addKey(SecretKey key, String alias, String password) throws KeyStoreException {\n // check alias\n if (keystore.containsAlias(alias)) {\n // should be replaced if exist\n keystore.deleteEntry(alias);\n }\n \n keystore.setKeyEntry(alias, key, password.toCharArray(), null);\n }",
"Set getLocalKeySet();",
"public static void setAlias(String alias, String value) throws ConfigurationException, IOException {\r\n if (!alias.equals(\"\")) {\r\n UnitAction.SetRunTimeData(alias, value);\r\n }\r\n }",
"public OwnerTrace<T> alias(String alias) {\n\t\tdata.alias = alias;\n\t\treturn this;\n\t}",
"protected final void setPrivateKeyLocation(final String privateKeyLocation) {\n this.privateKeyLocation = privateKeyLocation;\n }",
"public void setAlias(String alias) {\n this.alias = alias == null ? null : alias.trim();\n }",
"public void setAlias(String alias) {\n this.alias = alias == null ? null : alias.trim();\n }",
"void privateSetOrganizationKey(com.hps.july.persistence.OrganizationKey inKey) throws java.rmi.RemoteException;",
"public void privateSetOrganizationKey(com.hps.july.persistence.OrganizationKey arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().privateSetOrganizationKey(arg0);\n }",
"private void addAlias(Entity e, String alias){\n\t\tif(e != null){\n\t\t\tif(!this.wikiLookup.containsKey(alias))\n\t\t\t\tthis.wikiLookup.put(alias, new HashSet<Entity>());\n\t\t\tthis.wikiLookup.get(alias).add(e);\n\t\t}\n\t}",
"public static void setPrivateKeyPath(String privateKeyPath) {\n Program.privateKeyPath = privateKeyPath;\n Program.authType = AUTH_TYPE.CERT;\n }",
"public void setKey(String e)\n {\n ScControlRegistry r;\n r = getRegistry();\n r.unregister(this);\n\n _key = e;\n r.register(this);\n }",
"public void privateSetOperatorKey(com.hps.july.persistence.OperatorKey arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().privateSetOperatorKey(arg0);\n }",
"public void setPrivateKey(String privateKey) {\n this.privateKey = privateKey;\n }",
"public void setPrivateKey(String privateKey) {\n this.privateKey = privateKey;\n }",
"public void setPrivateKey(String privateKey) {\n this.privateKey = privateKey;\n }",
"public void setAlias(java.lang.CharSequence value) {\n this.alias = value;\n }",
"public void modificarPlayer1(String alias){\n ListIterator itr=listaJugadores.listIterator();\n while(itr.hasNext()){\n Player p=(Player)itr.next();\n if(p.getAlias().equals(alias))\n jugador1=p;\n }\n }",
"public void addAliases(String... aliases) {\n this.aliases.addAll(Lists.newArrayList(aliases));\n Collections.sort(this.aliases);\n }",
"public void _setKey(String e)\n {\n _key = e;\n }",
"public void registerPaypal(String alias, String user) {\n }",
"public boolean isPrivateKeyAlias(String alias) throws CryptoException {\n\t\ttry {\n\t // does alias refer to a private key?\n\t\t\treturn keystore.isKeyEntry(alias);\n\t\t} catch(KeyStoreException e) {\n\t\t\tlogger.error(\"error checking alias '\" + alias + \"' with the keystore\", e);\n\t\t\tthrow new CryptoException(\"error checking alias '\" + alias + \"' with the keystore\", e);\t\t\t\n\t\t}\n\t}",
"@ReactMethod\n public void alias(String newId) {\n mixpanel.alias(newId, mixpanel.getDistinctId());\n }",
"public void setLookupGroups( String[] groups ) throws RemoteException {\n\t\tStringBuffer l = new StringBuffer();\n\t\tl.append(\"Set lookup groups:\");\n\t\tfor( int i = 0; i< groups.length; ++i ) {\n\t\t\tl.append(\" \"+groups[i] );\n\t\t}\n\t\tlog.log(Level.CONFIG, l.toString() );\n\t\ttry {\n\t\t\tPersistentData data = io.readState();\n\t\t\tdata.groups = groups;\n\t\t\tio.writeState( data );\n\t\t\tdisco.setGroups(data.groups);\n\t\t} catch( ClassNotFoundException ex ) {\n\t\t\tthrow new RemoteException(ex.toString());\n\t\t} catch( IOException ex ) {\n\t\t\tthrow new RemoteException(ex.toString());\n\t\t}\n\t}",
"void setKey(String key);",
"public void addAlias(String domain)\n {\n _aliasList.add(domain);\n }",
"public String getEntryAlias(String keystoreAlias) {\n return keystoreAlias;\n }",
"public abstract void setRefKey(String paramString);",
"public final void mT__89() throws RecognitionException {\n try {\n int _type = T__89;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalEsm.g:83:7: ( 'alias' )\n // InternalEsm.g:83:9: 'alias'\n {\n match(\"alias\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"@Deprecated\r\n public Criteria setAlias(String alias) {\r\n this.alias = alias.trim();\r\n return this;\r\n }",
"private void setPrivateKey(String b64key) {\n\t\ttry {\n\t\t\tbyte[] bytes = Base64.decodeBase64(b64key);\n\t\t\tPKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(bytes);\n\t\t\tKeyFactory fact = KeyFactory.getInstance(\"RSA\");\n\t\t\tpk = fact.generatePrivate(keySpec);\n\t\t} catch (NoSuchAlgorithmException | InvalidKeySpecException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private static String setPlayerAlias(String theLine, Map<String,String> aliases){\n\n\t\tString[] splitLine = theLine.split(\";\");\n\n\t\tString alias = aliases.get(splitLine[0]);\n\n\t\tif(alias != null){\n\t\t\tsplitLine[0] = alias;\n\n\t\t\tString toReturn = \"\";\n\n\t\t\tfor(int i = 0; i < splitLine.length; i++){\n\t\t\t\ttoReturn += (splitLine[i] + \";\");\n\t\t\t}\n\n\t\t\treturn toReturn;\n\t\t}else{\n\t\t\treturn theLine;\n\t\t}\n\t}",
"public void privateSetSuperregionKey(com.hps.july.persistence.SuperRegionKey arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().privateSetSuperregionKey(arg0);\n }",
"public KeyStoreSigner(@Nonnull KeyStore keyStore, char[] password, String alias) {\n\tthis.keyStore = keyStore;\n\tthis.password = password;\n\tthis.alias = alias;\n }",
"public void passkey_SET(String src, Bounds.Inside ph)\n {passkey_SET(src.toCharArray(), 0, src.length(), ph);}",
"public final String getAlias() {\n return this.keyAlias;\n }",
"public static PrivateKey loadPrivateKey(String path, String alias, String storepassword) {\n\n PrivateKey privateKey = null;\n try {\n KeyStore keyStore = KeyStore.getInstance(\"JKS\");\n keyStore.load(new FileInputStream(path), storepassword.toCharArray());\n KeyStore.PrivateKeyEntry prvKeyEntry = (KeyStore.PrivateKeyEntry) keyStore.getEntry(alias, new KeyStore.PasswordProtection(storepassword.toCharArray()));\n privateKey = prvKeyEntry.getPrivateKey();\n } catch (Exception e) {\n Logger.error(\"Error loading private key\");\n } finally {\n return privateKey;\n }\n }",
"public void setUserAlias(java.lang.String userAlias) {\r\n this.userAlias = userAlias;\r\n }",
"public void registerCheque(String alias, String Bank_name) {\n }",
"public ConnectInfo setPrivateKeyPassword(final String privateKeyPassword) {\n\t\tif(privateKeyPassword==null) throw new IllegalArgumentException(\"The passed privateKeyPassword was null\");\n\t\tthis.privateKeyPassword = privateKeyPassword;\n\t\treturn this;\n\t}",
"protected static String getKeyStoreAlias() {\n return keyStoreAlias;\n }",
"private void setResourcePrivate(Object object, String key, Object value)\r\n throws IllegalArgumentException,\r\n NullPointerException\r\n {\r\n if (object == null)\r\n {\r\n throw new NullPointerException(\"ResourceManager.setResource(): \"+\r\n \"object is null\");\r\n }\r\n\r\n // determine the name of the object\r\n String name = retrieveAbsoluteName(object);\r\n\r\n if (name == null)\r\n {\r\n throw new IllegalArgumentException(\"ResourceManager.setResource(): \"+\r\n \"object '\"+object+\"' not registered\"+\r\n \"with manager\");\r\n }\r\n\r\n String res = name+TIGHT_BINDING+key;\r\n\r\n // set resource under the node\r\n Node node = getNode(name);\r\n if (node == null)\r\n {\r\n // the node was not found, so create it as we go\r\n setTheResource(root, res, value);\r\n\r\n // inform listeners\r\n resourceSet(res);\r\n }\r\n else\r\n {\r\n // set resource from the node\r\n setTheResource(node, key, value);\r\n\r\n // inform listeners\r\n resourceSet(res);\r\n }\r\n }",
"public Key getPrivateKey(String alias) throws CryptoException {\n\t\treturn getPrivateKey(alias, null);\n\t}",
"public void setReg2(String inMemoryEntry);",
"protected void set(Class k,String paramName,Object o) {\n\t\ttry {\n\t\t\tField f=k.getField(paramName);\n\t\t\tf.setAccessible(true);\n\t\t\tf.set(this,o);\n\t\t} catch (Exception x) {\n\t\t\tx.printStackTrace();\n\t\t}\n\t}",
"String setKey(String newKey);",
"public void registerCard(String alias, int card_nr, String Bank_name) {\n }",
"@Override\n\tpublic String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) {\n\n\t//\tcount = count + 1;\n\t\t// if the user did specify an alias then use what they passed else find one \n\t\tif (!parms.alias.equals(\"\"))\n\t\t\t\treturn parms.alias; \n\t\t// so use the Sun version \n\t\tString ret = myKeyManager.chooseServerAlias(keyType, issuers, socket);\n\t\tString printRet = ret;\n\t\tif (printRet == null) \n\t\t\tprintRet = \"null\";\n\t\t// build the issuer (is)\n\t\tString is = \"\";\n\t\tif ( issuers == null)\n\t\t\tis = \" :Issuer CA names :none\";\n\t\telse {\n\t\t\tis = \"Issuer CA names:\";\n\t\t\tfor ( Principal i : issuers) {\n\t\t\t\tis = is +\" \"+ i;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"==KeyManager.chooseServerAlias keytype:\" + keyType +is + \" returned \" + printRet);\n\t\tif ( issuers != null)\n\t\t\tfor (Principal p : issuers)\n\t\t\t\tSystem.out.println(\"issuers\"+p);\n\t\t// build a list of key types which some browsers complain about\n\t\t List<String> list = Arrays.asList(\"RSASSA-PSS\");\n\t\t if (list.contains(keyType))\n\t\t\t System.out.println(\"==KeyManager: WARNING This may not be supported and cause bad certificate errors \");\n\t\treturn ret;\n\t}",
"public KeyStore createPKCS12KeyStore(String alias, char[] password) {\n try {\r\n KeyStore keyStore = KeyStore.getInstance(CertificateHelper.TOLVEN_CREDENTIAL_FORMAT_PKCS12);\r\n try {\r\n keyStore.load(null, password);\r\n } catch (IOException ex) {\r\n throw new RuntimeException(\"Could not load keystore for alias: \" + alias, ex);\r\n }\r\n X509Certificate[] certificateChain = new X509Certificate[1];\r\n certificateChain[0] = getX509Certificate();\r\n keyStore.setKeyEntry(alias, getPrivateKey(), password, certificateChain);\r\n return keyStore;\r\n } catch (GeneralSecurityException ex) {\r\n throw new RuntimeException(\"Could not create a PKCS12 keystore for alias: \" + alias, ex);\r\n }\r\n }",
"void setKey(final String key);",
"void privateSetTechStuffKey(com.hps.july.persistence.WorkerKey inKey) throws java.rmi.RemoteException;",
"protected void setProvider() {\n fs.getClient().setKeyProvider(cluster.getNameNode().getNamesystem()\n .getProvider());\n }",
"public Gateway setAltMid(java.lang.String altMid) {\n return genClient.setOther(altMid, CacheKey.altMid);\n }",
"void saveKeys(String publicKeyFileLocation, String secretKeyFileLocation) throws IOException;",
"public final MF addAliases(Map<String, String> aliases) {\n\t\tfor(Map.Entry<String, String> e : aliases.entrySet()) {\n\t\t\taddAlias(e.getKey(), e.getValue());\n\t\t}\n\t\treturn (MF) this;\n\t}",
"@Override\n public void addTzAlias(final TzAlias val) throws TzException {\n final Connection conn = getDb();\n\n try (final var stmt = conn.prepareStatement(\n \"insert into \" + aliasTable +\n \" values(?, ?)\")) {\n\n if (debug()) {\n debug(\"Adding alias: \" + val);\n }\n\n final Blob b = conn.createBlob();\n b.setBytes(0, bytesJson(val));\n\n stmt.setString(1, val.getAliasId());\n stmt.setBlob(2, b);\n\n stmt.executeUpdate();\n } catch (final Throwable t) {\n // Always bad.\n error(t);\n throw new TzException(t);\n }\n }",
"public void setAlias(com.flexnet.opsembedded.webservices.SimpleQueryType alias) {\n this.alias = alias;\n }",
"private void storeKeys(String key, String secret) {\n\t // Save the access key for later\n\t SharedPreferences prefs = getSharedPreferences(ACCOUNT_PREFS_NAME, 0);\n\t Editor edit = prefs.edit();\n\t edit.putString(ACCESS_KEY_NAME, key);\n\t edit.putString(ACCESS_SECRET_NAME, secret);\n\t edit.commit();\n\t }",
"public void generateNewKeyPair(String alias, Context context) throws Exception {\n Calendar start = Calendar.getInstance();\n Calendar end = Calendar.getInstance();\n // expires 1 year from today\n end.add(Calendar.YEAR, 1);\n KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(context)\n .setAlias(alias)\n .setSubject(new X500Principal(\"CN=\" + alias))\n .setSerialNumber(BigInteger.TEN)\n .setStartDate(start.getTime())\n .setEndDate(end.getTime())\n .build();\n // use the Android keystore\n KeyPairGenerator gen = KeyPairGenerator.getInstance(\"RSA\",ANDROID_KEYSTORE);\n gen.initialize(spec);\n // generates the keypair\n gen.generateKeyPair();\n }",
"void setObjectKey(String objectKey);",
"void setKey(K key);",
"private void storeKeys(String key, String secret) {\n\t\t// Save the access key for later\n\t\tSharedPreferences prefs = EReaderApplication.getAppContext()\n\t\t\t\t.getSharedPreferences(ACCOUNT_PREFS_NAME, 0);\n\t\tEditor edit = prefs.edit();\n\t\tedit.putString(ACCESS_KEY_NAME, key);\n\t\tedit.putString(ACCESS_SECRET_NAME, secret);\n\t\tedit.commit();\n\t}",
"private void extractAliases(XMLElement pluginDescriptor) {\n XMLElement aliasesDescriptor = findExtension(pluginDescriptor, AliasManager.ALIASES_EP_NAME);\n if (aliasesDescriptor == null) {\n return;\n }\n for (XMLElement aliasDescriptor : aliasesDescriptor.getChildren()) {\n if (aliasDescriptor.getName().equals(\"alias\")) {\n String alias = aliasDescriptor.getStringAttribute(\"name\");\n String className = aliasDescriptor.getStringAttribute(\"class\");\n aliasMgr.add(alias, className);\n }\n }\n }",
"Set<Eid> aliases();",
"public void setEncryptionKey(Class<?> k) throws Exception\n {\n setEncryptionKey(k.getName());\n }",
"@Override\n\tpublic PrivateKey readPrivateKey(String file, String alias, String password) {\n\t\tKeyStore ks;\n\t\ttry {\n\t\t\tks = KeyStore.getInstance(\"JKS\", \"SUN\");\n\t\t\tBufferedInputStream in = new BufferedInputStream(new FileInputStream(file));\n\t\t\tks.load(in, password.toCharArray());\n\n\t\t\tif (ks.isKeyEntry(alias)) {\n\t\t\t\tPrivateKey pk = (PrivateKey) ks.getKey(alias, password.toCharArray());\n\t\t\t\treturn pk;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (KeyStoreException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (NoSuchProviderException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (CertificateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (UnrecoverableKeyException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t}",
"void accountSet(boolean admin, String username, String password, String fName, String lName, int accountId);",
"public void registerPaymentType(String alias, int cod_sys) {\n }",
"public void onClickAddAlias(View v) {\n aliasDefined = true;\n aliasStringList += aliases.getText() + \";\";\n aliases.setText(\"\");\n }",
"public void setKeyStore(String keyStoreLocation) {\n if (!complete) {\n this.keyStoreLocation = keyStoreLocation;\n } else {\n log.warn(\"Connection Descriptor setter used outside of factory.\");\n }\n }",
"private void register()\n {\n ScControlRegistry r = getRegistry();\n\n _key = r.getNextKey();\n r.register(this);\n }",
"public void setUserAlias(String userAlias) {\n\t\t\tthis.userAlias = userAlias;\n\t\t}",
"private native void switchKey(String newKey);",
"public final void setDeviceKey(String key){\n peripheralKey = key;\n }"
] | [
"0.60610324",
"0.5987886",
"0.5987753",
"0.56464183",
"0.5588365",
"0.55017966",
"0.5496479",
"0.5446572",
"0.54440117",
"0.5439121",
"0.53883094",
"0.53462064",
"0.5322626",
"0.53113365",
"0.5227174",
"0.5177357",
"0.51652294",
"0.5135347",
"0.5116525",
"0.5098767",
"0.50922334",
"0.5052097",
"0.50458175",
"0.5037366",
"0.50349635",
"0.5032188",
"0.5017562",
"0.5001432",
"0.5001265",
"0.49779108",
"0.49592558",
"0.49369195",
"0.49369195",
"0.49252933",
"0.49061507",
"0.48816764",
"0.48411354",
"0.48275653",
"0.4819047",
"0.48152775",
"0.48152775",
"0.48152775",
"0.47834194",
"0.47784513",
"0.47549772",
"0.47484705",
"0.4744549",
"0.47401592",
"0.4731053",
"0.47076443",
"0.47071102",
"0.47031054",
"0.46943244",
"0.4694212",
"0.46712762",
"0.4668509",
"0.46487153",
"0.4636021",
"0.46346784",
"0.46236742",
"0.46192127",
"0.4618499",
"0.46153638",
"0.46119496",
"0.46098208",
"0.46022907",
"0.45799854",
"0.4566749",
"0.4553512",
"0.45525327",
"0.45523",
"0.45465428",
"0.45319498",
"0.4531742",
"0.4528233",
"0.45088315",
"0.4508634",
"0.45030206",
"0.4501725",
"0.44984034",
"0.44901302",
"0.44882002",
"0.44840753",
"0.4480942",
"0.4470914",
"0.44645125",
"0.44622734",
"0.4459337",
"0.44592363",
"0.4452889",
"0.44508252",
"0.444623",
"0.44436637",
"0.44372424",
"0.44348666",
"0.44326806",
"0.44301963",
"0.4425516",
"0.44247165",
"0.44025344"
] | 0.7864472 | 0 |
The signature algorithm. The default is SHA1withRSA. | public void setAlgorithm(String algorithm) {
this.algorithm = algorithm;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSigAlgOID()\n {\n return c.getSignatureAlgorithm().getAlgorithm().getId();\n }",
"String getDigestAlgorithm();",
"public SingleSignConstants.SignAlgorithm getSignAlgorithm() {\r\n\t\treturn this.algorithm;\r\n\t}",
"public static String getKeyAlgorithmFromSigAlg(final String signatureAlgorithm) {\n\t\tfinal String ret;\n\t\tif ( signatureAlgorithm.contains(\"ECDSA\") ) {\n\t\t\tret = AlgorithmConstants.KEYALGORITHM_ECDSA;\n\t\t} else if ( signatureAlgorithm.contains(\"DSA\") ) {\n\t\t\tret = AlgorithmConstants.KEYALGORITHM_DSA;\n\t\t} else {\n\t\t\tret = AlgorithmConstants.KEYALGORITHM_RSA;\t\t\t\n\t\t}\n\t\treturn ret;\n\t}",
"String getMessageDigestAlgorithm();",
"public static void registerDefaultAlgorithms() {\n/* 390 */ algorithmHash.put(\"http://www.w3.org/2000/09/xmldsig#dsa-sha1\", SignatureDSA.class);\n/* */ \n/* */ \n/* 393 */ algorithmHash.put(\"http://www.w3.org/2009/xmldsig11#dsa-sha256\", SignatureDSA.SHA256.class);\n/* */ \n/* */ \n/* 396 */ algorithmHash.put(\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\", SignatureBaseRSA.SignatureRSASHA1.class);\n/* */ \n/* */ \n/* 399 */ algorithmHash.put(\"http://www.w3.org/2000/09/xmldsig#hmac-sha1\", IntegrityHmac.IntegrityHmacSHA1.class);\n/* */ \n/* */ \n/* 402 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-md5\", SignatureBaseRSA.SignatureRSAMD5.class);\n/* */ \n/* */ \n/* */ \n/* 406 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160\", SignatureBaseRSA.SignatureRSARIPEMD160.class);\n/* */ \n/* */ \n/* */ \n/* 410 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\", SignatureBaseRSA.SignatureRSASHA256.class);\n/* */ \n/* */ \n/* 413 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha384\", SignatureBaseRSA.SignatureRSASHA384.class);\n/* */ \n/* */ \n/* 416 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512\", SignatureBaseRSA.SignatureRSASHA512.class);\n/* */ \n/* */ \n/* 419 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1\", SignatureECDSA.SignatureECDSASHA1.class);\n/* */ \n/* */ \n/* 422 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256\", SignatureECDSA.SignatureECDSASHA256.class);\n/* */ \n/* */ \n/* 425 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384\", SignatureECDSA.SignatureECDSASHA384.class);\n/* */ \n/* */ \n/* 428 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512\", SignatureECDSA.SignatureECDSASHA512.class);\n/* */ \n/* */ \n/* 431 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-md5\", IntegrityHmac.IntegrityHmacMD5.class);\n/* */ \n/* */ \n/* 434 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160\", IntegrityHmac.IntegrityHmacRIPEMD160.class);\n/* */ \n/* */ \n/* 437 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-sha256\", IntegrityHmac.IntegrityHmacSHA256.class);\n/* */ \n/* */ \n/* 440 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-sha384\", IntegrityHmac.IntegrityHmacSHA384.class);\n/* */ \n/* */ \n/* 443 */ algorithmHash.put(\"http://www.w3.org/2001/04/xmldsig-more#hmac-sha512\", IntegrityHmac.IntegrityHmacSHA512.class);\n/* */ }",
"String getHashAlgorithm();",
"public abstract String getSigAlgName();",
"public void setSignatureAlgorithm(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.setSignatureAlgorithm(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.setSignatureAlgorithm(java.lang.String):void\");\n }",
"public String getJCEAlgorithmString() {\n/* 187 */ return this.signatureAlgorithm.engineGetJCEAlgorithmString();\n/* */ }",
"private static String getAlgorithmName(String sha, String mgf) throws NoSuchAlgorithmException {\n try {\n Signature.getInstance(\"RSASSA-PSS\");\n return \"RSASSA-PSS\";\n } catch (NoSuchAlgorithmException ex) {\n // RSASSA-PSS is not known. Try the other options.\n }\n String md = compactDigestName(sha);\n try {\n // Try the legacy naming for JCE.\n String name = md + \"WITHRSAand\" + mgf;\n Signature.getInstance(name);\n return name;\n } catch (NoSuchAlgorithmException ex) {\n // name is not supported. Try other options.\n }\n String name = md + \"withRSA/PSS\";\n Signature.getInstance(name);\n return name;\n }",
"public int getAlgorithm()\n {\n return publicPk.getAlgorithm();\n }",
"public String getMessageDigestAlgorithm() {\r\n\t\treturn this.messageDigestAlgorithm;\r\n\t}",
"public String getDigestAlgOID()\n {\n return digestAlgorithm.getAlgorithm().getId();\n }",
"public String getSigAlgName()\n {\n Provider prov = Security.getProvider(BouncyCastleProvider.PROVIDER_NAME);\n\n if (prov != null)\n {\n String algName = prov.getProperty(\"Alg.Alias.Signature.\" + this.getSigAlgOID());\n\n if (algName != null)\n {\n return algName;\n }\n }\n\n Provider[] provs = Security.getProviders();\n\n //\n // search every provider looking for a real algorithm\n //\n for (int i = 0; i != provs.length; i++)\n {\n String algName = provs[i].getProperty(\"Alg.Alias.Signature.\" + this.getSigAlgOID());\n if (algName != null)\n {\n return algName;\n }\n }\n\n return this.getSigAlgOID();\n }",
"public static String getEncSigAlgFromSigAlg(final String signatureAlgorithm) {\n\t\tString encSigAlg = signatureAlgorithm;\n\t\tif ( signatureAlgorithm.equals(AlgorithmConstants.SIGALG_SHA256_WITH_ECDSA) ) {\n\t\t\tencSigAlg = AlgorithmConstants.SIGALG_SHA256_WITH_RSA;\n\t\t} else if ( signatureAlgorithm.equals(AlgorithmConstants.SIGALG_SHA224_WITH_ECDSA) ) {\n\t\t\tencSigAlg = AlgorithmConstants.SIGALG_SHA256_WITH_RSA;\n\t\t} else if ( signatureAlgorithm.equals(AlgorithmConstants.SIGALG_SHA1_WITH_ECDSA) ) {\n\t\t\tencSigAlg = AlgorithmConstants.SIGALG_SHA1_WITH_RSA;\n\t\t} else if( signatureAlgorithm.equals(AlgorithmConstants.SIGALG_SHA1_WITH_DSA) ) {\n\t\t\tencSigAlg = AlgorithmConstants.SIGALG_SHA1_WITH_RSA;\n\t\t}\n\t\treturn encSigAlg;\n\t}",
"String getSignature();",
"String getSignature();",
"String getSignature();",
"public abstract String getSigAlgOID();",
"BigInteger getDigitalSignature();",
"int getSignatureType();",
"protected String getAlgorithmURI(String algorithm) {\n if(algorithm == null) {\n return null;\n }\n if(algorithm.equals(\"RSA\")) {\n return SAMLConstants.ALGO_ID_SIGNATURE_RSA;\n } else if(algorithm.equals(\"DSA\")) {\n return SAMLConstants.ALGO_ID_SIGNATURE_DSA;\n } else {\n return null;\n }\n }",
"@Override\n public String getAlgorithm()\n {\n return algorithm;\n }",
"public byte[] getSigAlgParams()\n {\n if (c.getSignatureAlgorithm().getParameters() != null)\n {\n try\n {\n return c.getSignatureAlgorithm().getParameters().toASN1Primitive().getEncoded(ASN1Encoding.DER);\n }\n catch (IOException e)\n {\n return null;\n }\n }\n else\n {\n return null;\n }\n }",
"public String getAlgorithm() {\n return _algorithm;\n }",
"java.lang.String getManifestHashAlgorithm();",
"int getSignature ();",
"public String getAlgorithmName() {\n\t}",
"public com.android.org.bouncycastle.asn1.x509.AlgorithmIdentifier getHashAlgorithm() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: com.android.org.bouncycastle.asn1.pkcs.RSAESOAEPparams.getHashAlgorithm():com.android.org.bouncycastle.asn1.x509.AlgorithmIdentifier, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.asn1.pkcs.RSAESOAEPparams.getHashAlgorithm():com.android.org.bouncycastle.asn1.x509.AlgorithmIdentifier\");\n }",
"public String getAlgorithm() {\r\n return algorithm;\r\n }",
"public String getEncryptionAlgOID()\n {\n return encryptionAlgorithm.getAlgorithm().getId();\n }",
"Signature getSignature();",
"@Override\n\tprotected AbstractAlgorithm<ISDSRPacket> generateSignatureAlgorithm(HashMap<String, String> params) {\n\t\tparams.put(\"uid\", this.addr.getHostAddress());\n\t\tSystem.out.println(\"uid=\" + this.addr.getHostAddress());\n\t\t\n\t\treturn new IBSASalgorithm(params);\n\t}",
"public TPM_ALG_ID manifestSignatureSigAlg() { return manifestSignature != null ? manifestSignature.GetUnionSelector() : TPM_ALG_ID.NULL; }",
"public SignatureAlgorithm(Document paramDocument, String paramString, int paramInt) throws XMLSecurityException {\n/* 92 */ super(paramDocument, paramString);\n/* 93 */ this.algorithmURI = paramString;\n/* */ \n/* 95 */ this.signatureAlgorithm = getSignatureAlgorithmSpi(paramString);\n/* 96 */ this.signatureAlgorithm.engineGetContextFromElement(this.constructionElement);\n/* */ \n/* 98 */ this.signatureAlgorithm.engineSetHMACOutputLength(paramInt);\n/* 99 */ ((IntegrityHmac)this.signatureAlgorithm).engineAddContextToElement(this.constructionElement);\n/* */ }",
"public static String getKeyAlgorithm(final PublicKey publickey) {\n\t\tString keyAlg = null;\n\t\tif ( publickey instanceof RSAPublicKey ) {\n\t\t\tkeyAlg = AlgorithmConstants.KEYALGORITHM_RSA;\n\t\t} else if ( publickey instanceof DSAPublicKey ) {\n\t\t\tkeyAlg = AlgorithmConstants.KEYALGORITHM_DSA;\n\t\t} else if ( publickey instanceof ECPublicKey ) {\n\t\t\tkeyAlg = AlgorithmConstants.KEYALGORITHM_ECDSA;\n\t\t}\n\t\treturn keyAlg;\n\t}",
"public abstract String getSignature();",
"com.google.protobuf.ByteString getSignature();",
"String getUniqueSignature();",
"public String calculateSignature(String str) {\n try {\n String signingKey = getSigningKey();\n byte[] bytes = str.getBytes(\"UTF8\");\n SecretKeySpec secretKeySpec = new SecretKeySpec(signingKey.getBytes(\"UTF8\"), \"HmacSHA1\");\n Mac instance = Mac.getInstance(\"HmacSHA1\");\n instance.init(secretKeySpec);\n byte[] doFinal = instance.doFinal(bytes);\n return ByteString.of(doFinal, 0, doFinal.length).base64();\n } catch (InvalidKeyException e) {\n Twitter.getLogger().e(\"Twitter\", \"Failed to calculate signature\", e);\n return \"\";\n } catch (NoSuchAlgorithmException e2) {\n Twitter.getLogger().e(\"Twitter\", \"Failed to calculate signature\", e2);\n return \"\";\n } catch (UnsupportedEncodingException e3) {\n Twitter.getLogger().e(\"Twitter\", \"Failed to calculate signature\", e3);\n return \"\";\n }\n }",
"com.google.protobuf.ByteString\n getSignatureBytes();",
"com.google.protobuf.ByteString\n getSignatureBytes();",
"public String algorithmName();",
"private static SignatureAlgorithmSpi getSignatureAlgorithmSpi(String paramString) throws XMLSignatureException {\n/* */ try {\n/* 150 */ Class<SignatureAlgorithmSpi> clazz = (Class)algorithmHash.get(paramString);\n/* 151 */ if (log.isLoggable(Level.FINE)) {\n/* 152 */ log.log(Level.FINE, \"Create URI \\\"\" + paramString + \"\\\" class \\\"\" + clazz + \"\\\"\");\n/* */ }\n/* */ \n/* 155 */ return clazz.newInstance();\n/* 156 */ } catch (IllegalAccessException illegalAccessException) {\n/* 157 */ Object[] arrayOfObject = { paramString, illegalAccessException.getMessage() };\n/* 158 */ throw new XMLSignatureException(\"algorithms.NoSuchAlgorithm\", arrayOfObject, illegalAccessException);\n/* 159 */ } catch (InstantiationException instantiationException) {\n/* 160 */ Object[] arrayOfObject = { paramString, instantiationException.getMessage() };\n/* 161 */ throw new XMLSignatureException(\"algorithms.NoSuchAlgorithm\", arrayOfObject, instantiationException);\n/* 162 */ } catch (NullPointerException nullPointerException) {\n/* 163 */ Object[] arrayOfObject = { paramString, nullPointerException.getMessage() };\n/* 164 */ throw new XMLSignatureException(\"algorithms.NoSuchAlgorithm\", arrayOfObject, nullPointerException);\n/* */ } \n/* */ }",
"public abstract byte[] getSignature();",
"AlgorithmIdentifier getAlgorithmIdentifier();",
"public byte[] getDigestAlgParams()\n {\n try\n {\n return encodeObj(digestAlgorithm.getParameters());\n }\n catch (Exception e)\n {\n throw new RuntimeException(\"exception getting digest parameters \" + e);\n }\n }",
"int getSignatureProviderDetails();",
"void setDigestAlgorithm(String digestAlgorithm);",
"public String getAlg() {\r\n\t\treturn alg;\r\n\t}",
"long getCryptAlgorithmSid();",
"public String getMechanismName() {\n return \"DIGEST-MD5\";\n }",
"@Override\n public String generateSignature(String requestPath, String method, String body, String timestamp) {\n try {\n String prehash = timestamp + method.toUpperCase() + requestPath + body;\n byte[] secretDecoded = Base64.getDecoder().decode(secretKey);\n SecretKeySpec keyspec = new SecretKeySpec(secretDecoded, \"HmacSHA256\");\n Mac sha256 = (Mac) GdaxConstants.SHARED_MAC.clone();\n sha256.init(keyspec);\n return Base64.getEncoder().encodeToString(sha256.doFinal(prehash.getBytes()));\n } catch (CloneNotSupportedException | InvalidKeyException e) {\n e.printStackTrace();\n throw new RuntimeErrorException(new Error(\"Cannot set up authentication headers.\"));\n }\n }",
"org.apache.calcite.avatica.proto.Common.Signature getSignature();",
"private byte[] getExternalAlgorithmParameter() {\n if (encoding == COMPID_JPEG && compression != 0) {\n final byte[] extAlgData = new byte[] {\n (byte)0x9F, // ID\n 0x00, // Length\n 0x10, // ALGTYPE = Compression Algorithm\n 0x00, // Reserved\n COMPID_JPEG, // COMPRID = JPEG\n 0x00, // Reserved\n 0x00, // Reserved\n 0x00, // Reserved\n compression, // MARKER\n 0x00, // Reserved\n 0x00, // Reserved\n 0x00, // Reserved\n };\n extAlgData[1] = (byte)(extAlgData.length - 2);\n return extAlgData;\n }\n return new byte[0];\n }",
"java.lang.String getSignatureProviderId();",
"@Test\n public void testRandomization() {\n String sha = \"SHA-256\";\n String mgf = \"MGF1\";\n int saltLen = 32;\n int keySizeInBits = 2048;\n int samples = 8;\n Set<String> signatures = new HashSet<String>();\n Signature signer;\n PrivateKey priv;\n try {\n String algorithm = getAlgorithmName(sha, mgf);\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n keyGen.initialize(keySizeInBits);\n KeyPair keypair = keyGen.genKeyPair();\n priv = keypair.getPrivate();\n signer = Signature.getInstance(algorithm);\n PSSParameterSpec params = getPssParameterSpec(sha, mgf, sha, saltLen, 1);\n signer.setParameter(params);\n byte[] messageBytes = new byte[8];\n for (int i = 0; i < samples; i++) {\n signer.initSign(priv);\n signer.update(messageBytes);\n byte[] signature = signer.sign();\n String hex = TestUtil.bytesToHex(signature);\n assertTrue(\"Same signature computed twice\", signatures.add(hex));\n }\n } catch (GeneralSecurityException ex) {\n TestUtil.skipTest(\"Failed to generat signatures:\" + ex);\n return;\n }\n }",
"public SignatureAlgorithm(Element paramElement, String paramString, boolean paramBoolean) throws XMLSecurityException {\n/* 124 */ super(paramElement, paramString);\n/* 125 */ this.algorithmURI = getURI();\n/* */ \n/* 127 */ Attr attr = paramElement.getAttributeNodeNS(null, \"Id\");\n/* 128 */ if (attr != null) {\n/* 129 */ paramElement.setIdAttributeNode(attr, true);\n/* */ }\n/* */ \n/* 132 */ if (paramBoolean && (\"http://www.w3.org/2001/04/xmldsig-more#hmac-md5\".equals(this.algorithmURI) || \"http://www.w3.org/2001/04/xmldsig-more#rsa-md5\"\n/* 133 */ .equals(this.algorithmURI))) {\n/* 134 */ Object[] arrayOfObject = { this.algorithmURI };\n/* */ \n/* 136 */ throw new XMLSecurityException(\"signature.signatureAlgorithm\", arrayOfObject);\n/* */ } \n/* */ \n/* 139 */ this.signatureAlgorithm = getSignatureAlgorithmSpi(this.algorithmURI);\n/* 140 */ this.signatureAlgorithm.engineGetContextFromElement(this.constructionElement);\n/* */ }",
"public SignatureAlgorithm(Document paramDocument, String paramString) throws XMLSecurityException {\n/* 74 */ super(paramDocument, paramString);\n/* 75 */ this.algorithmURI = paramString;\n/* */ \n/* 77 */ this.signatureAlgorithm = getSignatureAlgorithmSpi(paramString);\n/* 78 */ this.signatureAlgorithm.engineGetContextFromElement(this.constructionElement);\n/* */ }",
"public String mo34971a() {\n return \"SHA-384\";\n }",
"public synchronized MessageDigest getDigest() {\n\n MessageDigest digest = null;\n if (_algorithm != null) {\n\n try {\n digest = MessageDigest.getInstance(_algorithm);\n logger.debug(\"Using hash algorithm/encoding : \" + _algorithm);\n } catch (NoSuchAlgorithmException e) {\n logger.error(\"Algorithm not supported : \" + _algorithm, e);\n try {\n digest = MessageDigest.getInstance(DEFAULT_ALGORITHM);\n } catch (NoSuchAlgorithmException f) {\n logger.error(\"Algorithm not supported : \" + DEFAULT_ALGORITHM, e);\n digest = null;\n }\n }\n }\n\n return digest;\n\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(\n value =\n \"The TSIG Algorithm configured in the DNS supporting RFC2136. Used only when ``tsigSecretSecretRef`` and ``tsigKeyName`` are defined. Supported values are (case-insensitive): ``HMACMD5`` (default), ``HMACSHA1``, ``HMACSHA256`` or ``HMACSHA512``.\")\n public String getTsigAlgorithm() {\n return tsigAlgorithm;\n }",
"public org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder() {\n if (signatureBuilder_ != null) {\n return signatureBuilder_.getMessageOrBuilder();\n } else {\n return signature_ == null ?\n org.apache.calcite.avatica.proto.Common.Signature.getDefaultInstance() : signature_;\n }\n }",
"@Override\n public String digestParams(RestInvocation restInvocation) {\n Params params = Params.of();\n restInvocation.getParamsMap().get(FormParam.class).asHttpHeaders().entrySet().stream()\n .filter(e -> !e.getKey().equalsIgnoreCase(\"signature\"))\n .forEach(e -> params.add(e.getKey(), e.getValue()));\n\n // Parse Query String\n byte[] queryString = params.asQueryString().trim().getBytes(UTF8);\n\n // Create And Return Signature\n return hex(getMac().doFinal(queryString));\n }",
"public String getSignature()\r\n {\r\n return signature;\r\n }",
"public org.apache.calcite.avatica.proto.Common.Signature getSignature() {\n if (signatureBuilder_ == null) {\n return signature_ == null ? org.apache.calcite.avatica.proto.Common.Signature.getDefaultInstance() : signature_;\n } else {\n return signatureBuilder_.getMessage();\n }\n }",
"public static String getHashKey(Context context) {\n String hashKey = null;\n try {\n PackageInfo info = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n hashKey = Base64.encodeToString(md.digest(), Base64.DEFAULT);\n }\n } catch (PackageManager.NameNotFoundException | NoSuchAlgorithmException ignored) {\n logE(\"Failed to get hash key\");\n }\n\n return hashKey;\n }",
"byte[] getSignatureImage();",
"private String computeDigest(boolean paramBoolean, String paramString1, char[] paramArrayOfchar, String paramString2, String paramString3, String paramString4, String paramString5, String paramString6, String paramString7) throws NoSuchAlgorithmException {\n/* 470 */ String str1, str3, str5, str2 = this.params.getAlgorithm();\n/* 471 */ boolean bool = str2.equalsIgnoreCase(\"MD5-sess\");\n/* */ \n/* 473 */ MessageDigest messageDigest = MessageDigest.getInstance(bool ? \"MD5\" : str2);\n/* */ \n/* 475 */ if (bool) {\n/* 476 */ if ((str1 = this.params.getCachedHA1()) == null) {\n/* 477 */ str3 = paramString1 + \":\" + paramString2 + \":\";\n/* 478 */ String str7 = encode(str3, paramArrayOfchar, messageDigest);\n/* 479 */ String str6 = str7 + \":\" + paramString5 + \":\" + paramString6;\n/* 480 */ str1 = encode(str6, (char[])null, messageDigest);\n/* 481 */ this.params.setCachedHA1(str1);\n/* */ } \n/* */ } else {\n/* 484 */ String str = paramString1 + \":\" + paramString2 + \":\";\n/* 485 */ str1 = encode(str, paramArrayOfchar, messageDigest);\n/* */ } \n/* */ \n/* */ \n/* 489 */ if (paramBoolean) {\n/* 490 */ str3 = paramString3 + \":\" + paramString4;\n/* */ } else {\n/* 492 */ str3 = \":\" + paramString4;\n/* */ } \n/* 494 */ String str4 = encode(str3, (char[])null, messageDigest);\n/* */ \n/* */ \n/* 497 */ if (this.params.authQop()) {\n/* 498 */ str5 = str1 + \":\" + paramString5 + \":\" + paramString7 + \":\" + paramString6 + \":auth:\" + str4;\n/* */ }\n/* */ else {\n/* */ \n/* 502 */ str5 = str1 + \":\" + paramString5 + \":\" + str4;\n/* */ } \n/* */ \n/* */ \n/* 506 */ return encode(str5, (char[])null, messageDigest);\n/* */ }",
"org.openxmlformats.schemas.presentationml.x2006.main.STAlgType xgetCryptAlgorithmType();",
"java.lang.String getSignatureText();",
"public static void main(String[] args)\n throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, UnsupportedEncodingException {\n final String text = \"We would like to provide data integrity.\";\n\n /**\n * STEP 1.\n * We create a public-private key pair.\n * Standard Algorithm Names\n * http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html\n */\n final KeyPair key = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n /**\n * Alice creates Signature object defining Signature algorithm.\n */\n final Signature signatureAlg = Signature.getInstance(\"SHA1withRSA\");\n\n /**\n * We initialize the signature object with\n * - Operation modes (SIGN) and\n * - provides appropriate ***Private*** Key\n */\n signatureAlg.initSign(key.getPrivate());\n\n // Finally, we load the message into the signature object and sign it\n signatureAlg.update(text.getBytes(\"UTF-8\"));\n final byte[] signedText = signatureAlg.sign();\n System.out.println(\"Signature: \" + DatatypeConverter.printHexBinary(signedText));\n\n /**\n * To verify the signature, we create another signature object\n * and specify its algorithm\n */\n final Signature signatureAlg2 = Signature.getInstance(\"SHA1withRSA\");\n\n /**\n * We have to initialize it with the mode. But to verify the algorithm,\n * we only need the public key of the original signee\n */\n signatureAlg2.initVerify(key.getPublic());\n\n //Finally, we can check whether the signature is valid\n signatureAlg2.update(text.getBytes(\"UTF-8\"));\n\n if (signatureAlg2.verify(signedText))\n System.out.println(\"Valid signature.\");\n else\n System.err.println(\"Invalid signature.\");\n }",
"public String getAlgorithmName ()\n {\n return algName; //(new String (algName + \" --> Input Stream : \" + this.inputName));\n }",
"public String getSignature() {\n\t\treturn signature;\n\t}",
"@Test\n public void testNullRandom() {\n String sha = \"SHA-256\";\n String mgf = \"MGF1\";\n int saltLen = 32;\n int keySizeInBits = 2048;\n int samples = 8;\n Signature signer;\n PrivateKey priv;\n try {\n String algorithm = getAlgorithmName(sha, mgf);\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n keyGen.initialize(keySizeInBits);\n KeyPair keypair = keyGen.genKeyPair();\n priv = keypair.getPrivate();\n signer = Signature.getInstance(algorithm);\n PSSParameterSpec params = getPssParameterSpec(sha, mgf, sha, saltLen, 1);\n signer.setParameter(params);\n } catch (GeneralSecurityException ex) {\n TestUtil.skipTest(\"RSA key generation is not supported.\" + ex);\n return;\n }\n Set<String> signatures = new HashSet<String>();\n byte[] messageBytes = new byte[8];\n for (int i = 0; i < samples; i++) {\n byte[] signature;\n try {\n signer.initSign(priv, null);\n signer.update(messageBytes);\n signature = signer.sign();\n } catch (GeneralSecurityException ex) {\n fail(\"Failed to sign. \" + ex);\n return;\n }\n String hex = TestUtil.bytesToHex(signature);\n assertTrue(\"Same signature computed twice\", signatures.add(hex));\n }\n }",
"public static boolean isCompatibleSigAlg(final PublicKey publicKey, final String signatureAlgorithm) {\n\t\tboolean ret = false;\n\t\tif (StringUtils.contains(signatureAlgorithm, AlgorithmConstants.KEYALGORITHM_RSA)) {\n\t\t\tif (publicKey instanceof RSAPublicKey) {\n\t\t\t\tret = true;\n\t\t\t}\n\t\t} else if (StringUtils.contains(signatureAlgorithm, AlgorithmConstants.KEYALGORITHM_ECDSA)) {\n \t\tif (publicKey instanceof ECPublicKey) {\n \t\t\tret = true;\n \t\t}\n \t} else if (StringUtils.contains(signatureAlgorithm, AlgorithmConstants.KEYALGORITHM_DSA)) {\n \t\tif (publicKey instanceof DSAPublicKey) {\n \t\t\tret = true;\n \t\t}\n \t}\n\t\treturn ret;\n\t}",
"public byte[] generateSignature()\n {\n if (!forSigning)\n {\n throw new IllegalStateException(\"PairingDigestSigner not initialised for signature generation.\");\n }\n\n byte[] hash = new byte[digest.getDigestSize()];\n digest.doFinal(hash, 0);\n\n Element[] sig = pairingSigner.generateSignature(hash);\n\n try {\n return pairingSigner.derEncode(sig);\n } catch (IOException e) {\n throw new IllegalStateException(\"unable to encode signature\");\n }\n }",
"String componentSignature();",
"public static Collection<String> getSignatureAlgorithms(final PublicKey publickey) {\n\t\tfinal Collection<String> ret;\n\t\tif ( publickey instanceof RSAPublicKey ) {\n\t\t\tret = SIG_ALGS_RSA;\n\t\t} else if ( publickey instanceof DSAPublicKey ) {\n\t\t\tret = SIG_ALGS_DSA;\n\t\t} else if ( publickey instanceof ECPublicKey ) {\n\t\t\tret = SIG_ALGS_ECDSA;\n\t\t} else {\n\t\t\tret = Collections.emptyList();\t\t\t\n\t\t}\n\t\treturn ret;\n\t}",
"default String getSignature() {\n StringBuilder sb = new StringBuilder();\n sb.append(getName());\n sb.append(\"(\");\n for (int i = 0; i < getNumberOfParams(); i++) {\n if (i != 0) {\n sb.append(\", \");\n }\n sb.append(getParam(i).describeType());\n }\n sb.append(\")\");\n return sb.toString();\n }",
"public String getSignature() {\n return signature;\n }",
"public String getSignature() {\n return signature;\n }",
"public String getSignature() {\n return signature;\n }",
"private String signature() {\n\t\t++this.nonce;\n\t\tString message = new String(this.nonce + this.username + this.apiKey);\n\t\tMac hmac = null;\n\n\t\ttry {\n\t\t\thmac = Mac.getInstance(\"HmacSHA256\");\n\t\t\tSecretKeySpec secret_key = new SecretKeySpec(\n\t\t\t\t\t((String) this.apiSecret).getBytes(\"UTF-8\"), \"HmacSHA256\");\n\t\t\thmac.init(secret_key);\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidKeyException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn String.format(\"%X\",\n\t\t\t\tnew BigInteger(1, hmac.doFinal(message.getBytes())));\n\t}",
"public byte[] sign() throws XMLSignatureException {\n/* 177 */ return this.signatureAlgorithm.engineSign();\n/* */ }",
"public String getJCEProviderName() {\n/* 196 */ return this.signatureAlgorithm.engineGetJCEProviderName();\n/* */ }",
"public String getSignature() {\n Object ref = signature_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n signature_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getSignature() {\n Object ref = signature_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n signature_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public SignatureAlgorithm(Element paramElement, String paramString) throws XMLSecurityException {\n/* 110 */ this(paramElement, paramString, false);\n/* */ }",
"public ISignature getSignature() {\n return _signature;\n }",
"@Override\r\n\tprotected String getAlgorithmName() {\n\t\treturn \"capture\";\r\n\t}",
"@Nullable protected String resolveCanonicalizationAlgorithm(@Nonnull final CriteriaSet criteria) {\n\n final SignatureSigningConfigurationCriterion criterion =\n criteria.get(SignatureSigningConfigurationCriterion.class);\n assert criterion != null;\n\n for (final SignatureSigningConfiguration config : criterion.getConfigurations()) {\n if (config.getSignatureCanonicalizationAlgorithm() != null) {\n return config.getSignatureCanonicalizationAlgorithm();\n }\n }\n \n return null;\n }",
"public java.lang.String getSigAlgName() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getSigAlgName():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getSigAlgName():java.lang.String\");\n }",
"String getAlgorithm();",
"org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder();",
"public void setAlgorithm(String algorithm) {\n _algorithm = algorithm;\n }",
"public void initSign(Key paramKey, AlgorithmParameterSpec paramAlgorithmParameterSpec) throws XMLSignatureException {\n/* 269 */ this.signatureAlgorithm.engineInitSign(paramKey, paramAlgorithmParameterSpec);\n/* */ }",
"public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getSignatureBytes() {\n Object ref = signature_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n signature_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"private static byte[] sign(KeyPair keyPair, Path path, String signatureAlgorithm)\n\t{\n\t\tbyte[] signature = null;\n\n\t\ttry\n\t\t{\n\t\t\tbyte[] dataFromFile = Files.readAllBytes(path);\n\t\t\tSignature sign = Signature.getInstance(signatureAlgorithm);\n\t\t\tsign.initSign(keyPair.getPrivate());\n\t\t\tsign.update(dataFromFile);\n\t\t\tsignature = sign.sign();\n\t\t} catch (IOException | InvalidKeyException | NoSuchAlgorithmException | SignatureException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn signature;\n\t}"
] | [
"0.69939893",
"0.6778169",
"0.6668125",
"0.6550361",
"0.6508874",
"0.6500723",
"0.6434484",
"0.6330362",
"0.6272048",
"0.62718815",
"0.62515086",
"0.62288344",
"0.6223611",
"0.62201387",
"0.6170791",
"0.6104757",
"0.60045505",
"0.60045505",
"0.60045505",
"0.59810334",
"0.5926879",
"0.5869512",
"0.58537847",
"0.5841969",
"0.5814294",
"0.57696736",
"0.57635385",
"0.57635003",
"0.57628477",
"0.5759646",
"0.57514113",
"0.57285935",
"0.5711551",
"0.5700957",
"0.56823075",
"0.56708854",
"0.5638899",
"0.56132954",
"0.5606416",
"0.56060565",
"0.55759054",
"0.5533816",
"0.5533816",
"0.5493804",
"0.5489816",
"0.5485337",
"0.54747456",
"0.5469732",
"0.546839",
"0.5465884",
"0.5422988",
"0.5420033",
"0.541369",
"0.54081225",
"0.53900146",
"0.5377169",
"0.53762877",
"0.536968",
"0.5362288",
"0.53498966",
"0.5348183",
"0.5346349",
"0.5323216",
"0.5321055",
"0.53207195",
"0.53053397",
"0.530234",
"0.52901155",
"0.5287266",
"0.5284637",
"0.52823913",
"0.5271419",
"0.5269105",
"0.52646804",
"0.5264643",
"0.52513593",
"0.52512646",
"0.52479595",
"0.5247496",
"0.52456576",
"0.52389795",
"0.5235923",
"0.5235923",
"0.5235923",
"0.5230102",
"0.5220254",
"0.52075005",
"0.5199634",
"0.5199634",
"0.51804584",
"0.51781785",
"0.5172836",
"0.51673627",
"0.5166437",
"0.5153869",
"0.51503277",
"0.51435816",
"0.51426876",
"0.51387423",
"0.51387423",
"0.51348925"
] | 0.0 | -1 |
The charset to use when converting a string into a raw byte array representation. The default is UTF8. | public void setCharsetName(String charsetName) {
this.charsetName = charsetName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static final byte[] asUTF8(final String s) {\n return s.getBytes(StandardCharsets.UTF_8);\n }",
"@NonNull\n public static byte[] StringToByte(String string) throws UnsupportedEncodingException\n {\n return string.getBytes(\"UTF-8\");\n }",
"public static byte[] stringToBytes(String string) {\n return string.getBytes(ENCODING);\n }",
"public static byte[] getUTF8Bytes(String str) {\r\n try { return str.getBytes(\"UTF-8\"); } catch (Exception ex) { return null; }\r\n }",
"public byte[] getUTF8Bytes(String str) {\n\t try { return str.getBytes(\"UTF-8\"); } catch (Exception ex) { return null; }\n\t }",
"public static byte[] toBytes(String s) {\n return s.getBytes(UTF8_CHARSET);\n }",
"private byte[] getUTF8Bytes(String input) {\n\t\treturn input.getBytes(StandardCharsets.UTF_8);\n\t}",
"public static byte[] encode(CharSequence string) {\r\n try {\r\n return CHARSET.newEncoder().encode(CharBuffer.wrap(string)).array();\r\n } catch (CharacterCodingException e) {\r\n throw new IllegalArgumentException(\"Encoding failed\", e);\r\n }\r\n }",
"@Override\n\t\tpublic byte[] convert(String s) {\n\t\t\treturn s.getBytes();\n\t\t}",
"public default String getCharset() {\n return Constants.CHARSET_UTF8;\n }",
"public static String convertToUTF8(String s) {\n String out = null;\n try {\n out = new String(s.getBytes(\"UTF-8\"), \"ISO-8859-1\");\n } catch (java.io.UnsupportedEncodingException e) {\n return null;\n }\n return out;\n }",
"public String getStringEncoding()\n\t{\n\t\treturn \"utf-8\";\n\t}",
"public byte[] charToByte(String text, String encoding);",
"public static byte[] toBytes(String s)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// int l = 4 - (s.length()%4);\n\t\t\t// for(int i=0;i<l;++i)\n\t\t\t// \ts+=\" \";\n\n\t\t\t// return Base64.getDecoder().decode(s);\n\t\t\treturn s.getBytes(ISO_8859_1);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"private static byte[] string2Bytes(final String string) {\n if (string == null) return null;\n return string.getBytes();\n }",
"protected byte[] stringToByte_8859_1(String str) throws SaslException {\n char[] buffer = str.toCharArray();\n try {\n if (useUTF8) {\n for (int i = 0; i < buffer.length; i++) {\n if (buffer[i] > 'ÿ') {\n return str.getBytes(\"UTF8\");\n }\n }\n }\n return str.getBytes(\"8859_1\");\n } catch (UnsupportedEncodingException e) {\n throw new SaslException(\"cannot encode string in UTF8 or 8859-1 (Latin-1)\", e);\n }\n }",
"public static String convertToUTF8(String s) {\n String converted = null;\n\n if (s != null) {\n byte[] bytes = new byte[s.length()];\n\n for (int i = 0; i < s.length(); i++) {\n bytes[i] = (byte) s.charAt(i);\n }\n\n try {\n converted = new String(bytes, \"UTF-8\");\n if (log.isDebugEnabled()) {\n log.debug(\"Converted '\" + s + \"' to UTF-8 '\" + converted + \"'.\");\n }\n } catch (UnsupportedEncodingException ue) {\n log.error(\"Unable to set UTF-8 character encoding for string '\" + s + \"'!\", ue);\n }\n }\n\n return converted;\n }",
"public static String convertToUTF8(String s) {\n\n String out = null;\n\n try {\n\n out = new String(s.getBytes(\"UTF-8\"), \"ISO-8859-1\");\n\n } catch (java.io.UnsupportedEncodingException e) {\n\n return null;\n }\n\n return out;\n }",
"public static byte[] decodeToBytes(String string){\n\t\treturn decode(string.getBytes());\n\t}",
"protected byte[] encodeString(String in) {\n\t\tbyte[] rv = null;\n\t\ttry {\n\t\t\trv = in.getBytes(charset);\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\treturn rv;\n\t}",
"public static String convertFromUTF8(String s) {\n String out = null;\n try {\n out = new String(s.getBytes(\"ISO-8859-1\"), \"UTF-8\");\n } catch (Exception e) {\n\n return null;\n }\n return out;\n }",
"String getStringCharset() {\n\t\treturn this.charset;\n\t}",
"private static Buffer toBytes(String str) {\n try {\n return new Buffer(str.getBytes(\"UTF-8\"));\n } catch(java.io.UnsupportedEncodingException e) {\n throw new RuntimeException(\"UTF-8 not supported.\", e);\n }\n }",
"protected String getUTF8Str(String str) throws UnsupportedEncodingException {\n return new String(str.getBytes(\"iso-8859-1\"), \"utf-8\");\r\n }",
"public static Charset getUtf8Charset(){\n\t\tif(utf8 == null){\n\t\t\tutf8 = Charset.forName(\"UTF-8\");\n\t\t}\n\t\treturn utf8;\n\t}",
"public static byte[] toByteArray(String string) {\n byte[]\tbytes = new byte[string.length()];\n char[] chars = string.toCharArray();\n\n for (int i = 0; i != chars.length; i++) {\n bytes[i] = (byte)chars[i];\n }\n\n return bytes;\n }",
"static ByteString toBytes(String str) {\n return ByteString.copyFrom(str.getBytes(Internal.UTF_8));\n }",
"public static byte[] decodeToBytes(String string, String enc) throws UnsupportedEncodingException {\n\t\treturn decode(string.getBytes(enc));\n\t}",
"private static ByteBuffer toByteBuffer(final String str, final Charset charset) {\n Objects.requireNonNull(str);\n Objects.requireNonNull(charset);\n return (BytesUtils.allocateAndPutFlip(charset.encode(str).array()));\n }",
"public static byte[] convertirString(String archivo) {\n\t\ttry {\n\t\t\treturn archivo.getBytes(\"UTF-8\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"public static byte[] stringToBytes(String input) {\n return Base64.decodeBase64(input);\n }",
"public static String getString(ByteBuffer buffer,String charsetName) throws UnsupportedEncodingException {\n\t\tString retString = new String(buffer.array());\n\t\tretString = retString.trim();\n\t\treturn retString;\n\t}",
"public Charset getPreferredCharset();",
"String getCharset();",
"public static Bytes valueOf(final String string) throws StringValueConversionException\n\t{\n\t\treturn valueOf(string, Locale.getDefault(Locale.Category.FORMAT));\n\t}",
"Charset getEncoding();",
"public static byte[] hexString2bytes(String s)\r\n\t{\r\n\t\tif (null == s)\r\n\t\t\treturn null;\r\n\t\ts = trimSpace(s);\r\n\t\treturn hex2byte(s, 0, s.length() >> 1);\r\n\t}",
"public static byte[] stringToByteArray(String str) {\r\n return str.getBytes();\r\n }",
"private ByteBuffer encode(String str) {\n ByteBuffer bb = null;\n CharsetEncoder isoencoder = UTF8.newEncoder();\n try {\n bb = isoencoder.encode(CharBuffer.wrap(str));\n } catch (CharacterCodingException e) {\n log.error(e);\n }\n return bb;\n }",
"public String getCharSet() throws VlException\n {\n return ResourceLoader.CHARSET_UTF8;\n }",
"public static byte[] decode(String s) {\r\n \t\treturn decode(s.toCharArray());\r\n \t}",
"@NonNull\n public static String byteToString(byte[] byteArray) throws UnsupportedEncodingException\n {\n return new String(byteArray, \"UTF-8\");\n }",
"public static byte[] stringToBytes(String str) {\n\t\tif (str==null)\n\t\t\treturn null;\n\t\tif (str.charAt(str.length()-1)!='\\0') str+='\\0';\n\t\treturn str.getBytes();\n\t}",
"public byte[] readRawString() throws IOException {\n int length = in.readInt();\n byte[] bytes = new byte[5 + length];\n bytes[0] = (byte) Type.STRING.code;\n bytes[1] = (byte) (0xff & (length >> 24));\n bytes[2] = (byte) (0xff & (length >> 16));\n bytes[3] = (byte) (0xff & (length >> 8));\n bytes[4] = (byte) (0xff & length);\n in.readFully(bytes, 5, length);\n return bytes;\n }",
"@Override\n public byte[] serialize(String str) throws SerializationException {\n return str.getBytes(UTF8);\n }",
"public synchronized String getBodyString(String charsetName)\r\n\t{\r\n\t\tif (this.bodyString == null)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tthis.bodyString = new String(this.bodyBytes, charsetName);\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.bodyString;\r\n\t}",
"public String getCharset() {\n\t\treturn charset;\n\t}",
"String getEncoding();",
"private byte[] stringToArrayOfByte(String string)\n\t\t\tthrows NumberFormatException {\n\n\t\tbyte[] bytes = new byte[string.length() + 1];\n\n\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\tbytes[i] = charToByte(string.charAt(i));\n\t\t}\n\n\t\tbytes[string.length()] = nullByte;\n\n\t\treturn bytes;\n\n\t}",
"public static byte[] toByteArray(final Reader input, final String encoding) throws IOException {\n return toByteArray(input, Charset.forName(encoding));\n }",
"public String encode(String str, String charsetName) throws UnsupportedEncodingException {\n/* 230 */ if (str == null) {\n/* 231 */ return null;\n/* */ }\n/* 233 */ return StringUtils.newStringUsAscii(encode(str.getBytes(charsetName)));\n/* */ }",
"protected static byte[] toByteArray(String str) {\n byte[] bytes = new byte[str.length()];\n for (int i = 0; i < bytes.length; i++) {\n bytes[i] = (byte) str.charAt(i);\n }\n return bytes;\n }",
"public static String toString(final byte[] input, final String encoding) throws IOException {\n return new String(input, Charset.forName(encoding));\n }",
"private static byte[] getBytes(String string) {\n log.log(Level.FINEST, String.format(\"%d %s\", string.length(), string));\n return string.getBytes();\n }",
"public String getJavaEncoding();",
"public String getCharSet()\n\t{\n\t\tParameterParser parser = new ParameterParser();\n\t\tparser.setLowerCaseNames(true);\n\t\t// Parameter parser can handle null input\n\t\tMap<?, ?> params = parser.parse(getContentType(), ';');\n\t\treturn (String)params.get(\"charset\");\n\t}",
"public String getDeclaredEncoding();",
"public String getEncoding() {\r\n return \"B\";\r\n }",
"public byte[] charToByte(char char1, String encoding);",
"public String byteToChar(byte b[], String encoding);",
"public String decode(String str, String charsetName) throws DecoderException, UnsupportedEncodingException {\n/* 276 */ if (str == null) {\n/* 277 */ return null;\n/* */ }\n/* 279 */ return new String(decode(StringUtils.getBytesUsAscii(str)), charsetName);\n/* */ }",
"public void setCharset(String string) {\n\t\t\r\n\t}",
"public String peekString(Charset charset) {\n if (charset == null)\n charset = Charsets.UTF_8;\n StringBuilder builder = new StringBuilder();\n for (ByteBuffer bb : mBuffers) {\n byte[] bytes;\n int offset;\n int length;\n if (bb.isDirect()) {\n bytes = new byte[bb.remaining()];\n offset = 0;\n length = bb.remaining();\n bb.get(bytes);\n } else {\n bytes = bb.array();\n offset = bb.arrayOffset() + bb.position();\n length = bb.remaining();\n }\n builder.append(new String(bytes, offset, length, charset));\n }\n return builder.toString();\n }",
"public static byte[] toByteArray(String s) {\n return DatatypeConverter.parseHexBinary(s.toUpperCase());\n }",
"public String getResponseCharset()\r\n {\r\n Header header = httpMethod.getResponseHeader( \"Content-Type\" );\r\n if( header != null )\r\n {\r\n for( HeaderElement headerElement : header.getElements() )\r\n {\r\n NameValuePair parameter = headerElement.getParameterByName( \"charset\" );\r\n if( parameter != null )\r\n return parameter.getValue();\r\n }\r\n }\r\n \r\n Header contentEncodingHeader = httpMethod.getResponseHeader( \"Content-Encoding\" );\r\n if( contentEncodingHeader != null )\r\n {\r\n try\r\n {\r\n String value = contentEncodingHeader.getValue();\r\n if( CompressionSupport.getAvailableAlgorithm( value ) == null )\r\n {\r\n new String( \"\" ).getBytes( value );\r\n return value;\r\n }\r\n }\r\n catch( Exception e )\r\n {\r\n }\r\n }\r\n \r\n return null;\r\n }",
"public static byte[] base64ToByteArray(String s) {\n return base64ToByteArray(s, false);\n }",
"public String getDefaultCharset() {\n/* 359 */ return this.charset;\n/* */ }",
"public String encode(String pString, String charset) \n throws UnsupportedEncodingException \n {\n if (pString == null) {\n return null;\n }\n return new String(encode(pString.getBytes(charset)), US_ASCII);\n }",
"protected String getDefaultEncoding() {\n return DEFAULT_ENCODING;\n }",
"public String getDefaultCharset() {\n return this.charset;\n }",
"private CharsetDecoder getJavaEncoding(String encoding) {\n Charset charset = Charset.forName(encoding);\n return charset.newDecoder();\n }",
"public Optional<String> charset() {\n return body.contentType()\n .flatMap(\n h -> {\n String[] parts = SPLIT_CHARSET.split(h, 2);\n if (parts.length > 1) {\n String charset = parts[1];\n return Optional.of(charset.trim());\n } else {\n return Optional.empty();\n }\n });\n }",
"public BEROctetString(byte[] string)\n {\n this(string, DEFAULT_CHUNK_SIZE);\n }",
"private Charset getCharset(ResponseBody body) {\n MediaType contentType = body.contentType();\n return contentType != null ? contentType.charset(Util.UTF_8) : Util.UTF_8;\n }",
"public static byte[] GetBytesFromOctetString(String p) throws IOException {\n Charset encoding = StandardCharsets.UTF_8;\n return StringUtility.GetBytesFromOctetString(p, encoding);\n }",
"public static byte[] dataStringToByteArray(String inDataString) throws JCavernInternalError\n\t{\n\t\tStringTokenizer aTokenizer = new StringTokenizer(inDataString);\n\t\tint\t\t\t\tindex = 0;\n\t\tbyte[]\t\t\ttheBytes = new byte[aTokenizer.countTokens()];\n\n\t\twhile (aTokenizer.hasMoreTokens())\n\t\t{\n\t\t\tString\taToken = aTokenizer.nextToken();\n\t\t\ttheBytes[index] = (byte) Integer.parseInt(aToken, 16);\n\t\t\tindex++;\n\t\t}\n\t\t\n\t\treturn theBytes;\n\t}",
"public String getCharacterEncoding() {\n\t\treturn null;\n\t}",
"@Override\n\t\tpublic String getCharacterEncoding() {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic String getCharacterEncoding() {\n\t\treturn null;\n\t}",
"public byte[] getContentBytes(String protocolCharset) throws UnsupportedEncodingException {\n if (getContentBuilder() != null) {\n return getContentBuilder().getContentBytes(protocolCharset);\n }\n return null;\n }",
"public static String isoToUTF8(String value) throws Exception{\n \treturn value;\n\t}",
"private byte[] toByteArray(String s)\r\n\t\t{\n\t\t\tlong l = 0;\r\n\t\t\tif (s.startsWith(\"0x\") || s.startsWith(\"0X\")) {\r\n\t\t\t\tfinal byte[] d = new byte[(s.length() - 1) / 2];\r\n\t\t\t\tint k = (s.length() & 0x01) != 0 ? 3 : 4;\r\n\t\t\t\tfor (int i = 2; i < s.length(); i = k, k += 2)\r\n\t\t\t\t\td[(i - 1) / 2] = (byte) Short.parseShort(s.substring(i, k), 16);\r\n\t\t\t\treturn d;\r\n\t\t\t}\r\n\t\t\telse if (s.length() > 1 && s.startsWith(\"0\"))\r\n\t\t\t\tl = Long.parseLong(s, 8);\r\n\t\t\telse if (s.startsWith(\"b\"))\r\n\t\t\t\tl = Long.parseLong(s.substring(1), 2);\r\n\t\t\telse\r\n\t\t\t\tl = Long.parseLong(s);\r\n\t\t\tint i = 0;\r\n\t\t\tfor (long test = l; test != 0; test /= 0x100)\r\n\t\t\t\t++i;\r\n\t\t\tfinal byte[] d = new byte[i == 0 ? 1 : i];\r\n\t\t\tfor (; i-- > 0; l /= 0x100)\r\n\t\t\t\td[i] = (byte) (l & 0xff);\r\n\t\t\treturn d;\r\n\t\t}",
"private byte[] stringToBytes(String bytesInStringForm) {\n byte[] bytes = new byte[16];\n String[] byteValues = bytesInStringForm.split(\",\");\n for (int byteIndex = 0; byteIndex < 16; byteIndex++) {\n bytes[byteIndex] = (byte) Integer.parseInt(byteValues[byteIndex]);\n }\n return bytes;\n\n }",
"public static String UTF8toISO(String str)\n\t{\n\t\tCharset utf8charset = Charset.forName(\"UTF-8\");\n\t\tCharset iso88591charset = Charset.forName(\"ISO-8859-1\");\n\n\t\tByteBuffer inputBuffer = ByteBuffer.wrap(str.getBytes());\n\n\t\t// decode UTF-8\n\t\tCharBuffer data = utf8charset.decode(inputBuffer);\n\n\t\t// encode ISO-8559-1\n\t\tByteBuffer outputBuffer = iso88591charset.encode(data);\n\t\tbyte[] outputData = outputBuffer.array();\n\n\t\treturn new String(outputData);\n\t}",
"public static String guessAppropriateEncoding(CharSequence contents) {\n for (int i = 0; i < contents.length(); i++) {\n if (contents.charAt(i) > 0xFF) {\n return \"UTF-8\";\n }\n }\n return null;\n }",
"public static Charset defaultCharset() {\n\t\treturn new Windows1250();\n\t}",
"private static String guessAppropriateEncoding(CharSequence contents) {\n\t\tfor (int i = 0; i < contents.length(); i++) {\n\t\t\tif (contents.charAt(i) > 0xFF) {\n\t\t\t\treturn \"UTF-8\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private static String guessAppropriateEncoding(CharSequence contents) {\n\t\tfor (int i = 0; i < contents.length(); i++) {\n\t\t\tif (contents.charAt(i) > 0xFF) {\n\t\t\t\treturn \"UTF-8\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n public String getCharacterEncoding() {\n return null;\n }",
"public String randomCharacterEncoding() {\n return \"UTF-8\";\n }",
"public void setCharset(String charset) {\n this.charset = charset;\n }",
"String decodeString();",
"public String readUTF() throws IOException;",
"public String getContentCharset() {\n\t\tString ct = header.getContentType();\n\t\treturn Streams.getCharsetFromContentTypeString(ct);\n\t}",
"public static byte[] asciiStringToByteArray(String text, int length) {\n return Arrays.copyOf(text.getBytes(Charset.US_ASCII), length);\n }",
"public static String encodeString(String s) throws UnsupportedEncodingException {\r\n \t\treturn new String(encode(s.getBytes(\"UTF-8\")));\r\n \t}",
"public static char[] encode(byte[] in) {\r\n \t\treturn encode(in, in.length);\r\n \t}",
"public void setCharacterEncoding(String s) {\n\n\t}",
"public static Bytes valueOf(final String string, final Locale locale)\n\t\tthrows StringValueConversionException\n\t{\n\t\tfinal Matcher matcher = valuePattern.matcher(string);\n\n\t\t// Valid input?\n\t\tif (matcher.matches())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Get double precision value\n\t\t\t\tfinal double value = NumberFormat.getNumberInstance(locale)\n\t\t\t\t\t.parse(matcher.group(1))\n\t\t\t\t\t.doubleValue();\n\n\t\t\t\t// Get units specified\n\t\t\t\tfinal String units = matcher.group(3);\n\n\t\t\t\tif (units.equalsIgnoreCase(\"\"))\n\t\t\t\t{\n\t\t\t\t\treturn bytes(value);\n\t\t\t\t}\n\t\t\t\telse if (units.equalsIgnoreCase(\"K\"))\n\t\t\t\t{\n\t\t\t\t\treturn kilobytes(value);\n\t\t\t\t}\n\t\t\t\telse if (units.equalsIgnoreCase(\"M\"))\n\t\t\t\t{\n\t\t\t\t\treturn megabytes(value);\n\t\t\t\t}\n\t\t\t\telse if (units.equalsIgnoreCase(\"G\"))\n\t\t\t\t{\n\t\t\t\t\treturn gigabytes(value);\n\t\t\t\t}\n\t\t\t\telse if (units.equalsIgnoreCase(\"T\"))\n\t\t\t\t{\n\t\t\t\t\treturn terabytes(value);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthrow new StringValueConversionException(\"Units not recognized: \" + string);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (ParseException e)\n\t\t\t{\n\t\t\t\tthrow new StringValueConversionException(\"Unable to parse numeric part: \" + string,\n\t\t\t\t\te);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new StringValueConversionException(\"Unable to parse bytes: \" + string);\n\t\t}\n\t}",
"public String getCharSet() {\n\treturn strCharSet;\n }",
"private byte[] toBytes(String obj){\n return Base64.getDecoder().decode(obj);\n }"
] | [
"0.70015234",
"0.6910601",
"0.6723373",
"0.6577787",
"0.64898956",
"0.64464164",
"0.6287899",
"0.6165732",
"0.60677445",
"0.60632277",
"0.5991832",
"0.5960137",
"0.5924071",
"0.59033227",
"0.5903058",
"0.5887798",
"0.58793193",
"0.5872444",
"0.5865107",
"0.5844142",
"0.5834002",
"0.5718146",
"0.5694119",
"0.5678394",
"0.565761",
"0.5655111",
"0.56477666",
"0.5641199",
"0.5621107",
"0.5618385",
"0.5581446",
"0.5557165",
"0.555322",
"0.5523621",
"0.54950345",
"0.54895514",
"0.5463268",
"0.5428065",
"0.54079604",
"0.5406373",
"0.53976846",
"0.5393491",
"0.53901297",
"0.5365943",
"0.5333472",
"0.5316239",
"0.5315457",
"0.52695656",
"0.52639574",
"0.52609926",
"0.52479154",
"0.524428",
"0.5243805",
"0.52332073",
"0.5213783",
"0.5205324",
"0.51928705",
"0.51862055",
"0.5175696",
"0.5174715",
"0.51685554",
"0.51168096",
"0.511198",
"0.5109443",
"0.50974125",
"0.5092367",
"0.50548446",
"0.50504327",
"0.5031385",
"0.502374",
"0.50060207",
"0.499621",
"0.49938136",
"0.49918857",
"0.4991133",
"0.49875116",
"0.49863836",
"0.4978044",
"0.49595103",
"0.4954266",
"0.49443495",
"0.49435115",
"0.49274403",
"0.4925749",
"0.49194545",
"0.49182343",
"0.49163458",
"0.49163458",
"0.49054056",
"0.48856017",
"0.48821434",
"0.48750144",
"0.48707506",
"0.48546883",
"0.48492396",
"0.48433983",
"0.48291177",
"0.48223773",
"0.48022053",
"0.47992146",
"0.47965083"
] | 0.0 | -1 |
Sets the provider name of the specific implementation requested (e.g., "BC" for BouncyCastle, "SunJCE" for the default Sun JCE provider). | public void setProvider(String provider) {
this.provider = provider;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setProvider(String value) { _provider = value; }",
"public static void setProvider(String providerName) {\n provider = providerName;\n logger.debug(\"Provider set to : \" + providerName);\n }",
"public void setProvider(String value) {\n setAttributeInternal(PROVIDER, value);\n }",
"public Builder setProvider(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n provider_ = value;\n onChanged();\n return this;\n }",
"public Builder setProviderName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n providerName_ = value;\n onChanged();\n return this;\n }",
"public void setProvider(String provider) {\r\n this.provider = provider == null ? null : provider.trim();\r\n }",
"public void setNameProvider(NameProvider nameProvider2) {\n\t\tnameProvider = nameProvider2;\n\t}",
"void setCryptProvider(java.lang.String cryptProvider);",
"java.lang.String getProvider();",
"protected void setProvider() {\n fs.getClient().setKeyProvider(cluster.getNameNode().getNamesystem()\n .getProvider());\n }",
"void setProvider(JainTcapProvider provider);",
"public void setProviderId(String value) { _providerId = value; }",
"public String getProviderClassName();",
"@objid (\"a3188449-2f95-4e02-a233-e2e48fa5e5b0\")\n void setProvider(ProvidedInterface value);",
"@Override\n public String getProviderName() {\n return \"SimpleEncryptionKeyStoreProvider\";\n }",
"void setCryptProviderTypeExtSource(java.lang.String cryptProviderTypeExtSource);",
"@Test\n public void determine_what_provider_JRE_selected_for_our_Cipher() throws Exception {\n Cipher cipher = Cipher.getInstance(\"Blowfish/ECB/NoPadding\");\n System.out.println(cipher.getProvider());\n /**\n * Or we can create our Cipher asking the JRE to get a specific implementation\n * of an algorithim from a given provider, e.g. BC\n */\n Cipher bc = Cipher.getInstance(\"Blowfish/ECB/NoPadding\", \"BC\"); //or\n // Cipher bc = Cipher.getInstance(\"Blowfish/ECB/NoPadding\", Security.getProvider(\"BC\")); //or\n System.out.println(bc.getProvider());\n }",
"public java.lang.String getProviderName() {\n java.lang.Object ref = providerName_;\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 providerName_ = s;\n return s;\n }\n }",
"public String getJCEProviderName() {\n/* 196 */ return this.signatureAlgorithm.engineGetJCEProviderName();\n/* */ }",
"String getProviderString();",
"public interface ProviderNames {\n String YAHOO = \"Yahoo\";\n String GTALK = \"GTalk\";\n String MSN = \"MSN\";\n String ICQ = \"ICQ\";\n String AIM = \"AIM\";\n String XMPP = \"XMPP\";\n String JABBER = \"JABBER\";\n String SKYPE = \"SKYPE\";\n String QQ = \"QQ\";\n }",
"@Override\n public String getProviderName() {\n return mDeveloperProvider;\n }",
"public String getProvider() {\r\n return provider;\r\n }",
"public String getProvider() {\n\t\treturn provider;\n\t}",
"public String getProvider() {\n return provider;\n }",
"public java.lang.String getProviderName() {\n java.lang.Object ref = providerName_;\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 providerName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public synchronized void setProvider(FontProvider fontProvider) {\n/* 136 */ this.fontInfoByName = createFontInfoByName(fontProvider.getFontInfo());\n/* 137 */ this.fontProvider = fontProvider;\n/* */ }",
"public void setProviderURL (URL url) {\n impl.setProviderURL (url);\n }",
"public void setProviderType(java.lang.String providerType) {\n this._providerType = providerType;\n }",
"public Builder setProviderNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n providerName_ = value;\n onChanged();\n return this;\n }",
"public Builder setProviderId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n providerId_ = value;\n onChanged();\n return this;\n }",
"void setCryptProviderTypeExt(long cryptProviderTypeExt);",
"void setCryptProviderType(org.openxmlformats.schemas.presentationml.x2006.main.STCryptProv.Enum cryptProviderType);",
"void setProvider(modelProvidersI IDProvider);",
"public void setSslProvider(String sslProvider) {\n this.sslProvider = sslProvider;\n }",
"public java.lang.String getProvider() {\n java.lang.Object ref = provider_;\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 provider_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getProvider() {\n java.lang.Object ref = provider_;\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 if (bs.isValidUtf8()) {\n provider_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getProvider() {\n\t\treturn this.provider;\n\t}",
"private static synchronized Provider getProvider() throws Exception {\n\t\t\tProvider provider = SunPKCS11BlockCipherFactory.provider;\n\n\t\t\tif ((provider == null) && useProvider) {\n\t\t\t\ttry {\n\t\t\t\t\tClass<?> clazz = Class.forName(\"sun.security.pkcs11.SunPKCS11\");\n\n\t\t\t\t\tif (Provider.class.isAssignableFrom(clazz)) {\n\t\t\t\t\t\tConstructor<?> contructor = clazz.getConstructor(String.class);\n\n\t\t\t\t\t\t// The SunPKCS11 Config name should be unique in order\n\t\t\t\t\t\t// to avoid repeated initialization exceptions.\n\t\t\t\t\t\tString name = null;\n\t\t\t\t\t\tPackage pkg = AES.class.getPackage();\n\n\t\t\t\t\t\tif (pkg != null)\n\t\t\t\t\t\t\tname = pkg.getName();\n\t\t\t\t\t\tif (name == null || name.length() == 0)\n\t\t\t\t\t\t\tname = \"org.jitsi.impl.neomedia.transform.srtp\";\n\n\t\t\t\t\t\tprovider = (Provider) contructor.newInstance(\"--name=\" + name + \"\\\\n\" + \"nssDbMode=noDb\\\\n\" + \"attributes=compatibility\");\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (provider == null)\n\t\t\t\t\t\tuseProvider = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tSunPKCS11BlockCipherFactory.provider = provider;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn provider;\n\t\t}",
"@objid (\"13e63a4b-fab3-4b16-b7f9-69b4d6187c94\")\n ProvidedInterface getProvider();",
"public String getProvider() {\n return mProvider;\n }",
"@Column(name = \"provider_name\")\n\tpublic java.lang.String getProviderName() {\n\t\treturn providerName;\n\t}",
"public void setProviderUrl(String providerUrl) {\r\n this.providerUrl = providerUrl;\r\n }",
"Builder addProvider(String value);",
"public java.lang.String getProviderType() {\n return this._providerType;\n }",
"@ApiModelProperty(example = \"GitHub\", required = true, value = \"Name of the VCS provider (e.g. GitHub, Bitbucket).\")\n public String getProviderName() {\n return providerName;\n }",
"public void setProvider(DownloadProvider newValue) {\n DownloadProvider oldValue = provider;\n provider = newValue;\n firePropertyChange(PROVIDER_CHANGED_PROPERTY, oldValue, newValue);\n }",
"public String getProviderName(){\n\t\treturn proxy.getName();\n\t}",
"@Override\n\tpublic void setAuthProvider(AuthProvider arg0) {\n\t}",
"@Override\r\n public void onProviderEnabled(String provider) {\n }",
"public IProvider lookupProvider(Class<? extends IProvider> providerType);",
"@Override\n public void onProviderEnabled(String provider) {\n }",
"@Override\n public void onProviderEnabled(String provider) {\n }",
"@Override\n public void onProviderEnabled(String provider) {\n }",
"@Override\n public void onProviderEnabled(String provider) {\n }",
"@Override\n public void onProviderEnabled(String provider) {\n\n }",
"@Override\n public void onProviderEnabled(String provider) {\n\n }",
"public Provider() {\n super(PROVIDER_NAME, 0.1, \"WebID-TLS Provider\");\n }",
"public void setSelectionProvider(final SelectionProvider selectionProvider) {\n\t\tthis.selectionProvider = selectionProvider;\n\t}",
"public com.google.protobuf.ByteString\n getProviderBytes() {\n java.lang.Object ref = provider_;\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 provider_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Override\n public void onProviderEnabled(String provider) {\n }",
"@Override\n public void onProviderEnabled(String provider) {\n }",
"@Override\n public void onProviderEnabled(String provider) {\n }",
"@Override\n public void onProviderEnabled(String provider) {\n }",
"@Override\n public void onProviderEnabled(String provider) {\n }",
"@Override\r\n\t\tpublic void onProviderEnabled(String provider) {\n\t\t\t\r\n\t\t}",
"public static void setPoolProvider(PoolProvider provider) {\n SharedRedisPools.poolProvider = provider;\n }",
"@Override\n\t\tpublic void onProviderEnabled(String provider) {\n\n\t\t}",
"@Override\n\t\tpublic void onProviderEnabled(String provider) {\n\n\t\t}",
"@Override\n\t\t\t\tpublic void onProviderEnabled(String provider)\n\t\t\t\t\t{\n\n\t\t\t\t\t}",
"@Override\r\n\t\tpublic void onProviderEnabled(String provider)\r\n\t\t{\n\t\t\t\r\n\t\t}",
"@Override\n \t\tpublic void onProviderEnabled(String provider) {\n \t\t}",
"@Override\n \t\tpublic void onProviderEnabled(String provider) {\n \t\t\t\n \t\t}",
"@Override\n\t\t\tpublic void onProviderEnabled(String provider) {\n\t\t\t\t\n\t\t\t}",
"void setSignatureProviderId(java.lang.String signatureProviderId);",
"public Builder setProviderBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n provider_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n\tpublic void onProviderEnabled(String provider) {\n\t}",
"public void setProviderContext(Context providerContext) {\r\n mProviderContext = providerContext;\r\n }",
"@Override\n public void onProviderEnabled(String provider) {\n\n }",
"@Override\n public void onProviderEnabled(String provider) {\n\n }",
"@Override\n public void onProviderEnabled(String provider) {\n\n }",
"@Override\n public void onProviderEnabled(String provider) {\n\n }",
"public com.google.protobuf.ByteString\n getProviderNameBytes() {\n java.lang.Object ref = providerName_;\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 providerName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Override\r\n\t\t\tpublic void onProviderEnabled(String provider) {\n\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onProviderEnabled(String provider) {\n\r\n\t\t\t}",
"Provider updateProvider(Provider prov) throws RepoxException;",
"Provider updateProvider(Provider prov) throws RepoxException;",
"@Override\n\tpublic void onProviderEnabled(String provider) {\n\n\t}",
"@Override\n\tpublic void onProviderEnabled(String provider) {\n\n\t}",
"@Override\n\tpublic void onProviderEnabled(String provider) {\n\n\t}",
"@Override\n\tpublic void onProviderEnabled(String provider) {\n\n\t}",
"protected void setSipProvider(SipProviderImpl sipProviderImpl) {\n\t\tthis.sipProviderImpl = sipProviderImpl;\n\t}",
"@Override\n \tpublic void onProviderEnabled(String provider) {\n \n \t}",
"public void setProviderRef(ContentProvider provider) {\n if (providerRef != null) {\n Log.w(\n TAG,\n String.format(\n \"Reference to Provider instance \" + \"with authority %s already set\", authority));\n }\n providerRef = new WeakReference<>(provider);\n }",
"public com.google.protobuf.ByteString\n getProviderBytes() {\n java.lang.Object ref = provider_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n provider_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Override\n\tpublic void onProviderEnabled(String provider) {\n\t}",
"@Override\n\tpublic void onProviderEnabled(String provider) {\n\t\t\n\t}",
"@Override\n\tpublic void onProviderEnabled(String provider) {\n\t\t\n\t}",
"@Override\n\tpublic void onProviderEnabled(String provider) {\n\t\t\n\t}"
] | [
"0.75884897",
"0.72551656",
"0.690718",
"0.6896059",
"0.68836",
"0.6831495",
"0.6823036",
"0.67362475",
"0.6651835",
"0.6633427",
"0.6414008",
"0.6375595",
"0.63256824",
"0.6307755",
"0.6296746",
"0.6290519",
"0.62546945",
"0.61975366",
"0.61728543",
"0.6142747",
"0.61412615",
"0.61205983",
"0.6101636",
"0.6069351",
"0.6048597",
"0.6047672",
"0.6045554",
"0.60413504",
"0.6003178",
"0.5957516",
"0.5950718",
"0.5921974",
"0.5903906",
"0.5900987",
"0.5867496",
"0.5864867",
"0.5854538",
"0.5833877",
"0.5815578",
"0.5806901",
"0.5799406",
"0.57970417",
"0.5774646",
"0.57674354",
"0.5749471",
"0.57483256",
"0.5743313",
"0.570505",
"0.56890714",
"0.5672363",
"0.56680834",
"0.56654847",
"0.5661281",
"0.5661281",
"0.5661281",
"0.56558084",
"0.56558084",
"0.5651767",
"0.5650644",
"0.5624114",
"0.56174606",
"0.56174606",
"0.56174606",
"0.56174606",
"0.56174606",
"0.5616966",
"0.5614557",
"0.55923927",
"0.55923927",
"0.5588138",
"0.55853707",
"0.5584937",
"0.55775476",
"0.5577128",
"0.5576446",
"0.55675244",
"0.55627924",
"0.5550196",
"0.5549781",
"0.5549781",
"0.5549781",
"0.5549781",
"0.55495393",
"0.55366176",
"0.55366176",
"0.55359304",
"0.55359304",
"0.55334884",
"0.55334884",
"0.55334884",
"0.55334884",
"0.5529912",
"0.5528155",
"0.5526936",
"0.55229586",
"0.55225885",
"0.5517705",
"0.5517705",
"0.5517705"
] | 0.72750235 | 2 |
Retrieving all item in the calls' list | public List<CallItem> findAllCalls() {
String orderBy = CallsDBOpenHelper.COLUMN_CALL_DATE + " DESC, " + CallsDBOpenHelper.COLUMN_CALL_HOUR + " DESC";
Cursor cursor = dataBase.query(CallsDBOpenHelper.TABLE_CALLS, callsTable_allColumns,
null, null, null, null, orderBy);
List<CallItem> calls = cursorToCallItemList(cursor);
return calls;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Call[] getCalls();",
"public List<MExampleCall> getExampleCalls();",
"public Set getCalls() { return calls; }",
"public CallLog[] getCallLogs();",
"public Long getCalls() {\r\n return calls;\r\n }",
"public Call getCall() {\n\treturn call;\n }",
"@Override\n public Collection<PhoneCall> getPhoneCalls() {\n return this.calls;\n }",
"public void getCallDetails()\n\t {\n\t @SuppressWarnings(\"deprecation\")\n\t String sortOrder = String.format(\"%s limit 100 \", CallLog.Calls.DATE + \" DESC\");\n\t managedCursor = managedQuery( CallLog.Calls.CONTENT_URI, null, null, null, sortOrder);\n\t int number = managedCursor.getColumnIndex( CallLog.Calls.NUMBER );\n\t int type = managedCursor.getColumnIndex( CallLog.Calls.TYPE );\n\t int date = managedCursor.getColumnIndex( CallLog.Calls.DATE);\n\t int duration = managedCursor.getColumnIndex( CallLog.Calls.DURATION);\n\t int id = managedCursor.getColumnIndex(CallLog.Calls._ID);\n\t \n\t while (managedCursor.moveToNext())\n\t {\n\t \n\t phoneNumber = managedCursor.getString(number);\n\t callType = managedCursor.getString(type);\n\t callDate = managedCursor.getString(date);\n\t contactName = getContactname(phoneNumber); \n\t call_id = managedCursor.getString(id);\n\t //contactId = getContactId(phoneNumber);\n\t \n\t //callDateTime = new Date(Long.valueOf(callDate));\n\t long seconds=Long.parseLong(callDate);\n\t SimpleDateFormat format1 = new SimpleDateFormat(\"dd-MM-yyyy hh:mm a\");\n\t callDateTime = format1.format(new Date(seconds));\n\t \n\t callDuration = managedCursor.getString(duration);\n\t \n\t String cType = null;\n\t \n\t int cTypeCode = Integer.parseInt(callType);\n\t \n\t switch(cTypeCode){\n\t \n\t case CallLog.Calls.OUTGOING_TYPE:\n\t cType = \"OUTGOING\";\n\t break;\n\t \n\t case CallLog.Calls.INCOMING_TYPE:\n\t cType= \"INCOMING\";\n\t break;\n\t \n\t case CallLog.Calls.MISSED_TYPE:\n\t cType = \"MISSED\";\n\t break;\n\t }\n\t \n\t CallData calldata=new CallData(cType, phoneNumber, contactName, callDateTime, callDuration, call_id);\n\t list.add(calldata);\n\t \n\t }\n\t \n\t // managedCursor.close();\n\t \n\t }",
"public Call getCurrentCall();",
"java.util.List<Rsp.RequestFromSelf>\n getRequestsList();",
"public List<StaticCallVO> getStaticCallCurrent(StaticCallVO vo) throws Exception {\n\t\treturn statisticsDao.getStaticCallCurrent(vo);\n\t}",
"public Call[] getCalls(QName arg0) throws ServiceException {\n\t\treturn null;\n\t}",
"public List<Record> getAllCallRecords() {\n return new ArrayList<>(mCallRecords);\n }",
"java.util.List<Pokemon.Request> \n getRequestsList();",
"Rsp.RequestFromSelf getRequests(int index);",
"public List<MExampleCall> getRandomExampleCalls();",
"private ArrayList<CallLogsData> getCallLogEntry() {\n ArrayList<CallLogsData> calllogsList = new ArrayList<CallLogsData>();\n try {\n File file = new File(mParentFolderPath + File.separator + ModulePath.FOLDER_CALLLOG\n + File.separator + ModulePath.NAME_CALLLOG);\n BufferedReader buffreader = new BufferedReader(new InputStreamReader(\n new FileInputStream(file)));\n String line = null;\n CallLogsData calllogData = null;\n while ((line = buffreader.readLine()) != null) {\n if (line.startsWith(CallLogsData.BEGIN_VCALL)) {\n calllogData = new CallLogsData();\n// MyLogger.logD(CLASS_TAG,\"startsWith(BEGIN_VCALL)\");\n }\n if (line.startsWith(CallLogsData.ID)) {\n calllogData.id = Integer.parseInt(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(ID) = \" +calllogData.id);\n }\n\n if (line.startsWith(CallLogsData.SIMID)) {\n calllogData.simid = Utils.slot2SimId(Integer.parseInt(getColonString(line)),\n mContext);\n }\n if (line.startsWith(CallLogsData.NEW)) {\n calllogData.new_Type = Integer.parseInt(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(NEW) = \" +calllogData.new_Type);\n }\n if (line.startsWith(CallLogsData.TYPE)) {\n calllogData.type = Integer.parseInt(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(TYPE) = \" +calllogData.type);\n }\n if (line.startsWith(CallLogsData.DATE)) {\n String time = getColonString(line);\n// Date date = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").parse(time);\n// calllogData.date = date.getTime();\n\n calllogData.date = Utils.unParseDate(time);\n\n MyLogger.logD(CLASS_TAG, \"startsWith(DATE) = \" + calllogData.date);\n }\n if (line.startsWith(CallLogsData.NAME)) {\n calllogData.name = getColonString(line);\n// MyLogger.logD(CLASS_TAG,\"startsWith(NAME) = \" +calllogData.name);\n }\n if (line.startsWith(CallLogsData.NUMBER)) {\n calllogData.number = getColonString(line);\n// MyLogger.logD(CLASS_TAG,\"startsWith(NUMBER) = \"+calllogData.number);\n }\n if (line.startsWith(CallLogsData.DURATION)) {\n calllogData.duration = Long.parseLong(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(DURATION) = \"+calllogData.duration);\n }\n if (line.startsWith(CallLogsData.NMUBER_TYPE)) {\n calllogData.number_type = Integer.parseInt(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(NMUBER_TYPE) = \"+calllogData.number_type);\n }\n if (line.startsWith(CallLogsData.END_VCALL)) {\n// MyLogger.logD(CLASS_TAG,calllogData.toString());\n calllogsList.add(calllogData);\n MyLogger.logD(CLASS_TAG, \"startsWith(END_VCALL)\");\n }\n }\n buffreader.close();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n MyLogger.logE(CLASS_TAG, \"init failed\");\n }\n return calllogsList;\n }",
"private String getCallDetails() {\n Cursor managedCursor = getContentResolver().query(\n CallLog.Calls.CONTENT_URI, null, null, null, null);\n // Get the number\n int number = managedCursor.getColumnIndex(CallLog.Calls.NUMBER);\n // Get the name\n int name = managedCursor.getColumnIndex(CallLog.Calls.CACHED_NAME);\n // Get the type of the call\n int type = managedCursor.getColumnIndex(CallLog.Calls.TYPE);\n // Get the date of the call\n int date = managedCursor.getColumnIndex(CallLog.Calls.DATE);\n // Get the time of the call\n int duration = managedCursor.getColumnIndex(CallLog.Calls.DURATION);\n // Check whether the cursor has more elements\n while (managedCursor.moveToNext()) {\n // Get the phone number\n String phNumber = managedCursor.getString(number);\n // Get the name\n String nameType = managedCursor.getString(name);\n // Get the type of the call\n String callType = managedCursor.getString(type);\n // Get the date of the call\n String callDate = managedCursor.getString(date);\n // Get the date of the call\n Date callDayTime = new Date(Long.valueOf(callDate));\n // Get the length of the call\n String callDuration = managedCursor.getString(duration);\n String dir = null;\n int dircode = Integer.parseInt(callType);\n switch (dircode) {\n case CallLog.Calls.OUTGOING_TYPE:\n dir = \"OUTGOING\";\n break;\n\n case CallLog.Calls.INCOMING_TYPE:\n dir = \"INCOMING\";\n break;\n\n case CallLog.Calls.MISSED_TYPE:\n dir = \"MISSED\";\n break;\n }\n // Add phone number to the ArrayList\n initialisaton.callDetails.add(phNumber);\n // Check whether the name is null\n if (nameType != null) {\n // Add the name to the ArrayList\n initialisaton.callDetails.add(nameType);\n } else {\n // Add \"Uknown\" to the ArrayList\n initialisaton.callDetails.add(\"Unknown\");\n }\n // Add time to the ArrayList\n initialisaton.callDetails.add(callDuration);\n // Add String Date to the ArrayList\n initialisaton.callDetails.add(callDayTime.toString());\n // Add call type to the ArrayList\n initialisaton.callDetails.add(dir);\n // Add ArrayList to the ArrayList\n initialisaton.listOfArray.add(initialisaton.callDetails);\n // Create a new object\n initialisaton.callDetails = new ArrayList<String>();\n }\n // Close the cursor\n managedCursor.close();\n\n // initialize all contact information to ZERO\n int outcoming = 0;\n int incoming = 0;\n int seconds = 0;\n int lastCallInSec = 0;\n int missed = 0;\n String contactName = \"Unknown\";\n String lastCall = \"\";\n\n /*\n * Create a new Object\n * The map to hold phone numbers as a key and call history details as value\n */\n initialisaton.map = new HashMap<String, ArrayList<String>>();\n\n initialisaton.arrayList = new ArrayList<String>();\n\n // Loop through the ArrayList holding contact information as ArrayList\n for (int i = 0; i < initialisaton.listOfArray.size(); i++) {\n /*\n * Create a new Object Store elements of the old ArrayList to the\n * new ArrayList\n */\n ArrayList<String> callDetail = initialisaton.listOfArray.get(i);\n /*\n * Create a new Object Store phone number from the ArrayList\n */\n String phoneNumber = callDetail.get(0);\n // Check whether the phone number already exists in the ArrayList of\n // phone Numbers\n if (initialisaton.phonenumbers.contains(phoneNumber)) {\n // Do nothing\n } else {\n // Add the phone number to the ArrayList\n initialisaton.phonenumbers.add(phoneNumber);\n // Loop through the ArrayList\n for (int j = 0; j < initialisaton.listOfArray.size(); j++) {\n /*\n * Create a new Object Store elements of the old ArrayList\n * to the new ArrayList\n */\n ArrayList<String> callDetail2 = initialisaton.listOfArray.get(j);\n // Get phone number from the ArrayList\n String phoneNumberCompare = callDetail2.get(0);\n // Compare, check if the phone number repreats its self in\n // the Arraylist\n if (phoneNumberCompare.equals(phoneNumber)) {\n\n // If the contact Arrylist has incoming calls\n if (callDetail2.get(4).equals(\"INCOMING\")) {\n // increment\n incoming++;\n }\n\n // If the contact Arrylist has outgoing calls\n if (callDetail2.get(4).equals(\"OUTGOING\")) {\n // increment\n outcoming++;\n }\n\n // If the contact Arrylist has missed calls\n if (callDetail2.get(4).equals(\"MISSED\")) {\n // increment\n missed++;\n }\n\n // Get the date of the last call\n lastCall = callDetail2.get(3);\n // Get contact name\n contactName = callDetail2.get(1);\n // Get last a time of the last call\n lastCallInSec = Integer.parseInt(callDetail2.get(2));\n // Get the total time of the current phone number\n seconds += Integer.parseInt(callDetail2.get(2));\n }\n }\n\n // Append to the String Buffer\n initialisaton.sb.append(\"\\nPhone number: \" + phoneNumber + \" \\nName: \"\n + contactName + \" \\nIncoming calls: \" + incoming\n + \" \\nOutgoing calls: \" + outcoming\n + \" \\nMissed calls: \" + missed\n + \" \\nLast call in sec: \" + lastCallInSec\n + \" \\nCall duration in sec: \" + seconds\n + \"\\nLast call: \" + lastCall);\n initialisaton.sb.append(\"\\n----------------------------------\");\n\n //arrayList.add(phoneNumber);\n initialisaton.arrayList.add(contactName + \" \" + phoneNumber);\n initialisaton.array1.add(contactName);\n initialisaton.array2.add(phoneNumber);\n\n ArrayList<String> list = new ArrayList<String>();\n list.add(phoneNumber);\n list.add(contactName);\n list.add(Integer.toString(incoming));\n list.add(Integer.toString(outcoming));\n list.add(Integer.toString(missed));\n list.add(Integer.toString(seconds));\n list.add(Integer.toString(lastCallInSec));\n list.add(lastCall.toString());\n initialisaton.map.put(contactName + \" \" + phoneNumber, list);\n\n // Initialize to ZERO\n incoming = 0;\n outcoming = 0;\n seconds = 0;\n missed = 0;\n lastCallInSec = 0;\n }\n }\n\n // Initialize Array of Strings\n String Array1[] = new String[initialisaton.array1.size()];\n String Array2[] = new String[initialisaton.array2.size()]; \n \n /*\n * Copy ArrayList to String[]\n */\n functions.copyArrayListToStringArray(Array1, initialisaton.array1);\n functions.copyArrayListToStringArray(Array2, initialisaton.array2);\n\n /*\n * Sort 2 String[]\n */\n functions.sort(Array1, Array2);\n \n /*\n * Copy String[] to ArrayList\n */ \n functions.copyStringArrayToArrayList(initialisaton.arrayList, Array1, Array2);\n // Return String Buffer as a string\n return initialisaton.sb.toString();\n }",
"public Map getCalls(String key, Map calls) {\n Map result = (Map) calls.get(key);\n if (result == null) {\n return new LinkedHashMap();\n }\n return result;\n }",
"public Object[] getElements(Object inputElement) {\n\t\t\tString method_id = (String)inputElement;\n\t\t\treturn (((SeedsModel)model).getCallsDescriptions(method_id)).toArray();\n\n\t\t}",
"private void fetchNewCalls() {\n fetchCalls(QUERY_NEW_CALLS_TOKEN, true);\n }",
"public List<Item> getAllItemsAvailable();",
"java.util.List<com.rpg.framework.database.Protocol.Item> \n getItemsList();",
"com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);",
"com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);",
"com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);",
"com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);",
"public List<R> getAll();",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn grpcallinginfo.getCallingGroupMembersize();\n\t\t}",
"public int getCallsNb();",
"List<SBCallAlarm> selectAll();",
"@Override\n public List<String> call() {\n List<String> nameList = null;\n nameList = doScan(basePackage, new ArrayList<>());\n\n return nameList;\n }",
"private void getListAccountHandleMakeCall(Context context){\n mPhoneAccountIdList.clear();\n Cursor cursor = context.getContentResolver().query(CallLog.Calls.CONTENT_URI, null,\n null, null, null);\n int phoneAccountIdColumn = cursor.getColumnIndex(CallLog.Calls.PHONE_ACCOUNT_ID);\n while (cursor.moveToNext()){\n String id = cursor.getString(phoneAccountIdColumn);\n if (!mPhoneAccountIdList.contains(id)){\n mPhoneAccountIdList.add(id);\n }\n }\n }",
"public List<CustomerRequest> getCurrentRequests();",
"java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();",
"java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();",
"java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();",
"java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();",
"void getRequests();",
"public List<ReturnItem> getItems() {\n return (List<ReturnItem>) get(\"items\");\n }",
"Map getAll();",
"public RequestFromSelf getRequests(int index) {\n return instance.getRequests(index);\n }",
"@Override\n\tpublic List<item> findAll() {\n\t\treturn donkyClientFeign.lista().stream().map(p -> new item(p,1)).collect(Collectors.toList());\n\t}",
"private Vector getContactItems() {\n return protocol.getContactItems();\n }",
"private static boolean getInfo(int nCalls, int nMaxCalls, WebDriver driver, String sLocator,\n\t\t\tString sAttribute, int nMethod, int nExpectedItems, int nProcessIndex, List<String> collected)\n\t{\n\t\t// Prevent infinite recursion as it is possible that not enough items may be returned\n\t\tif (nCalls > nMaxCalls)\n\t\t\treturn false;\n\n\t\t// We cannot continue if the data available is less than the expected data\n\t\tList<WebElement> data = Framework.findElementsAJAX(driver, sLocator, nExpectedItems);\n\t\tif (data.size() < nExpectedItems)\n\t\t\treturn false;\n\n\t\t// Is this a special case in which processing complete is already complete?\n\t\tif (nExpectedItems == 0 && data.size() == 0)\n\t\t\treturn true;\n\n\t\t// We cannot continue if the process index is greater than the data available\n\t\tif (nProcessIndex >= data.size())\n\t\t\treturn false;\n\n\t\tfor (int i = nProcessIndex; i < data.size(); i++)\n\t\t{\n\t\t\t// Which method should be used to get the data?\n\t\t\tString sValue;\n\t\t\tif (nMethod == _VisibleAttribute)\n\t\t\t{\n\t\t\t\tsValue = Framework.getAttribute(data.get(i), sAttribute);\n\t\t\t}\n\t\t\telse if (nMethod == _JavaScriptText)\n\t\t\t{\n\t\t\t\tsValue = JS_Util.getText(data.get(i));\n\t\t\t}\n\t\t\telse if (nMethod == _JavaScriptAttribute)\n\t\t\t{\n\t\t\t\tsValue = JS_Util.getAttribute(data.get(i), sAttribute);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsValue = Framework.getText(data.get(i));\n\t\t\t}\n\n\t\t\t// NULL indicates that stale element occurred and the list needs to be refreshed else the value\n\t\t\t// can be added to the list and processing can continue\n\t\t\tif (sValue == null)\n\t\t\t{\n\t\t\t\treturn getInfo(nCalls + 1, nMaxCalls, driver, sLocator, sAttribute, nMethod, i + 1, i,\n\t\t\t\t\t\tcollected);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcollected.add(sValue);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"List<Item> getItems(IDAOSession session);",
"public CallRegistry() {\n\t\tidGen = new IdGenerator();\n\t\tidGen.reserve(NO_RESPONSE_EXPECTED);\n\t\tcurrentCalls = new LinkedHashMap<Integer, RegisteredCall>();\n\t\tcurrentIteration = new LinkedList<RegisteredCall>();\n\t}",
"public List<AntCall> getAntCalls()\n {\n return antCalls;\n }",
"private void getItems() {\n getComputers();\n getPrinters();\n }",
"public void getRemoteItems() {\n url = getAllItemsOrderedByCategory;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItems(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }",
"public void fetchCalls() {\n cancelFetch();\n invalidate();\n fetchNewCalls();\n fetchOldCalls();\n }",
"private void fetchOldCalls() {\n fetchCalls(QUERY_OLD_CALLS_TOKEN, false);\n }",
"public List<Call> addCall(Call call, String cid) throws CustomerNotFoundException {\r\n \treturn null;\r\n }",
"public List<String> getMethodList() throws CallError, InterruptedException {\n return (List<String>)service.call(\"getMethodList\").get();\n }",
"public String getAllCallsStatement() {\n\t\treturn \"SELECT * FROM CALLS\";\n\t}",
"java.util.List<TransmissionProtocol.Request> \n getRequestList();",
"public ArrayList<UserRequest> getUserRequests(){return userRequests;}",
"ArrayList<Episode> getEpisodes(){\n\n\n Uri builtUri = Uri.parse(episodesURL)\n .buildUpon()\n .build();\n String url = builtUri.toString();\n\n return doCallEpisode(url);\n\n }",
"java.util.List<com.example.grpc.SimpleServiceOuterClass.Aois> \n getAoisList();",
"public List<Item> getItemList();",
"@Override\n public List<DgCallService> getCallServiceTop5(String posID) {\n \tDgPos dgPos = dgPosMapper.selectPosByPosId(Integer.valueOf(posID));\n\t\tList<Integer> integers = StringUtil.arrayToList(dgPos\n\t\t\t\t.getConsumerAreas());\n\t\tMap org = new HashMap();\n\t\torg.put(\"areaIds\",integers);\n\t\torg.put(\"type\",1);\n return dgCallServiceMapper.selectTop5(org);\n }",
"public List<BusinessObject> getItems(Package pkg);",
"public CallSpec<List<XingUser>, HttpError> getYourContacts() {\n return getContacts(ME);\n }",
"public ArrayList<Voice> getReceivedVoiceCalls() {\n ArrayList<Voice> receivedVoiceCalls = new ArrayList<Voice>();\n for (Communication communication : getCommunicationReceived())\n if (communication instanceof Voice) {\n receivedVoiceCalls.add((Voice) communication);\n }\n return receivedVoiceCalls;\n }",
"public Call getCallById(Integer num) {\n return this.mCallMapById.get(num);\n }",
"List<SdkHttpRequest> getRequests();",
"public static BasicPhoneCall getPhoneCall(String sid){\n return loggedCalls.get(sid);\n }",
"public Future<List<String>> getMethodList() throws DynamicCallException, ExecutionException {\n return call(\"getMethodList\");\n }",
"@Override\r\n\tpublic List<CallVO> getUserList(HashMap<String, Object> map) throws Exception{\n\t\t\r\n\t\tList<CallVO> list = sqlSessionTemplat.selectList(\"admin.getUserList\",map);\r\n\t\treturn list;\r\n\t}",
"private void getCallLog(@NotNull Context context) {\n Cursor cursor = context.getApplicationContext().getContentResolver().query(CallLog.Calls.CONTENT_URI, null, null,\n null, CallLog.Calls.DATE + \" DESC\");\n DatabaseHelper dbHelper = DatabaseHelper.getHelper(context);\n\n assert cursor != null;\n if (cursor.getCount() > 0) {\n try {\n cursor.moveToFirst();\n long epoch = Long.parseLong(cursor.getString(cursor.getColumnIndex(CallLog.Calls.DATE)));\n String date = new java.text.SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss z\").format(new java.util.Date(epoch));\n if (BuildConfig.DEBUG) {\n Log.d(\"DATE\", date);\n Log.d(\"TYPE\", cursor.getString(cursor.getColumnIndex(CallLog.Calls.TYPE)));\n Log.d(\"DURATION\", cursor.getString(cursor.getColumnIndex(CallLog.Calls.DURATION)));\n }\n dbHelper.addRecordCallData(cursor.getColumnIndex(CallLog.Calls.TYPE), UserIDStore.id(context.getApplicationContext()), date, cursor.getColumnIndex(CallLog.Calls.DURATION));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"List<CommandInfo> list();",
"public ArrayList<Voice> getReceivedVoiceCalls() {\n\t\tArrayList<Voice> receivedVoiceCalls = new ArrayList<Voice>();\n\t\tfor (Communication communication : getCommunicationReceived())\n\t\t\tif (communication instanceof Voice) {\n\t\t\t\treceivedVoiceCalls.add((Voice) communication);\n\t\t\t}\n\t\treturn receivedVoiceCalls;\n\t}",
"com.rpg.framework.database.Protocol.Item getItems(int index);",
"Object getTolist();",
"E[] getAll();",
"void list()\n\t{\n\t\toperation.list();\n\t\t\n\t}",
"java.util.List<java.lang.Integer> getItemsList();",
"private void getAll(){\n if (!LOADED_ALL) {\n Message msg_getpersons = Message.obtain(getPersonsHandlerThread.getHandler());\n msg_getpersons.what = GetPersonsHandlerThread.TASK_GET_PERSONS;\n int table1 = TABLE_ALL;\n msg_getpersons.arg1 = table1;\n Log.d(TAG, \"DbOperationsRunnable: run(): preparing message msg_getperson with following attributes:\");\n Log.d(TAG, \"DbOperationsRunnable: run(): msg_getpersons.what = \" + msg_getpersons.what);\n Log.d(TAG, \"DbOperationsRunnable: run(): msg_getpersons.arg1 = \" + msg_getpersons.arg1);\n Log.d(TAG, \"DbOperationsRunnable: run(): sending message...\");\n msg_getpersons.sendToTarget();\n while (true) {\n if (DONE_TASK_GETPERSONS) {\n DONE_TASK_GETPERSONS = false;\n break;\n }\n }\n LOADED_ALL = true;\n } else {\n persons_list.clear();\n persons_list.addAll(all_list);\n }\n }",
"@Override\n public void call(Result<List<HealthInfor>> listResult) {\n }",
"@Override\n\tpublic void listAllItems() {\n\t\t\n\t}",
"java.util.List<Rsp.Msg>\n getMsgList();",
"private Collection<ConnectionEntry> getMyInvites(Map<String, String> parameters)throws ProfileServiceException{\n \t\tif (logger.isLoggable(Level.FINEST)) {\n \t\t\tlogger.entering(sourceClass, \"getMyInvites\", parameters);\n \t\t}\n \n \t\tDocument data = null;\n \t\tCollection<ConnectionEntry> invites = null;\n \t\tString url = resolveProfileUrl(ProfileEntity.NONADMIN.getProfileEntityType(),\n \t\t\t\tProfileType.CONNECTIONS.getProfileType());\n \t\tdata = executeGet(url, parameters, ClientService.FORMAT_XML);\n \t\tif(parameters.containsKey(\"outputType\")){\n \t\t\tif(parameters.get(\"outputType\").equalsIgnoreCase(\"profile\")){\n \t\t\t\tinvites = Converter.returnConnectionEntries(data, \"profile\");\n \t\t\t}\n \t\t\telse \n \t\t\t\tinvites = Converter.returnConnectionEntries(data, \"connection\");\n \t\t}\n \t\telse{\n \t\t\tinvites = Converter.returnConnectionEntries(data, \"connection\");\n \t\t}\n \t\tif (logger.isLoggable(Level.FINEST)) {\n \t\t\tlogger.exiting(sourceClass, \"getMyInvites\");\n \t\t}\n \t\treturn invites;\n \t}",
"public List<String> getMethodList() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getMethodList\").get();\n }",
"public RequestFromSelf getRequests(int index) {\n return requests_.get(index);\n }",
"private void getTravelItems() {\n String[] columns = Columns.getTravelColumnNames();\n Cursor travelCursor = database.query(TABLE_NAME, columns, null, null, null, null, Columns.KEY_TRAVEL_ID.getColumnName());\n travelCursor.moveToFirst();\n while (!travelCursor.isAfterLast()) {\n cursorToTravel(travelCursor);\n travelCursor.moveToNext();\n }\n travelCursor.close();\n }",
"public ArrayList<String> call() {\n\t\t\treturn grepMultiThreadExecute(file, pattern, start, end);\n\t\t}",
"public java.util.List<RequestFromSelf> getRequestsList() {\n return java.util.Collections.unmodifiableList(\n instance.getRequestsList());\n }",
"public abstract void listKnownUsers(Call serviceCall, Response serviceResponse, CallContext messageContext);",
"private void readItems() {\n }",
"void getPeopleRx();",
"public List<ContentInterventoBOBean> execGetAll() {\n System.out.println(\"InterventoLogics - execGetAll\");\n InterventoClient client = new InterventoClient(new ContentInterventoRequestBean());\n try {\n client.getAll();\n return BOFactory.convertWorkableToBOInterventi(client.getResList());\n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }",
"private static void addCall(Call call, ArrayList<Call> calls)\n {\n synchronized(calls)\n {\n if(call.getCallGroup() == null)\n calls.add(call);\n }\n }",
"public abstract List<Object> getAll();",
"private void getItemsInBasket(){\n Disposable disposable = mViewModel.getItemsInBasket()\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .doOnError(throwable -> Log.e(\"BasketFragment\",throwable.getMessage()))\n .subscribe(basketItems -> basketListAdapter.submitList(basketItems));\n mDisposable.add(disposable);\n }",
"public final synchronized String list()\r\n { return a_info(true); }",
"java.util.List<Res.Msg>\n getMsgList();",
"ArrayList<IItem> getItems(Position position);",
"public void getCallList(){\n audioList = new ArrayList<>();\n\n // Audio directory path\n String path = Environment.getExternalStorageDirectory().toString().toLowerCase()+\"/\"+AllKeys.RECORD_DIRECTORY_NAME;\n File mainFolder = new File(path);\n\n // Checking is the main folder exist or not\n if (mainFolder.isDirectory()){\n\n // All sub folder under the main directory\n File[] listOfFolders = mainFolder.listFiles();\n if (listOfFolders != null) {\n for (File item : listOfFolders) {\n\n // When file type is directory\n if (item.isDirectory()) {\n\n File subFolder = new File(path + \"/\" + item.getName());\n File[] fileList = subFolder.listFiles();\n\n for (File audio : fileList) {\n\n // When file is not a audio file -> continue for next file\n if (audio.getName().equals(\".nomedia\")) continue;\n\n // Analise file name\n FileAnalyser analyser = new FileAnalyser(audio.getName());\n\n // Add a item to audio list\n audioList.add(new Audio(analyser.getPhoneNo(),\n audio.getAbsolutePath(),\n analyser.getDateTime(item.getName()),\n analyser.getCallType(),\n analyser.getAudioDuration(this,\n audio.length(),\n audio.getAbsolutePath()))\n );\n }\n\n }\n }\n // sort array as descending order\n Collections.reverse(audioList);\n }\n\n }\n\n // Visible empty message when audio list is empty\n if (audioList.size() < 1){\n noRecordFound.setVisibility(View.VISIBLE);\n }else{\n noRecordFound.setVisibility(View.GONE);\n }\n }",
"public IScapSyncSearchResult[] getResults();",
"public void getRecentNames() {\r\n try {\r\n URLConnection conn = new URL(\"http://example.com/recent?ssid=\" + session_slot_id).openConnection();\r\n conn.setConnectTimeout(5000);\r\n conn.setReadTimeout(5000);\r\n BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));\r\n String line;\r\n while ((line = in.readLine()) != null) {\r\n if (line.contains(\",\")) {\r\n names = line.split(\",\");\r\n }\r\n }\r\n in.close();\r\n } catch (MalformedURLException e) {\r\n System.out.println(\"MalformedURLException while fetching list\");\r\n } catch (SocketTimeoutException e) {\r\n System.out.println(\"SocketTimeoutException while fetching list\");\r\n } catch (IOException e) {\r\n System.out.println(\"IOException while fetching list\");\r\n e.printStackTrace();\r\n }\r\n }"
] | [
"0.7402448",
"0.63885283",
"0.63680375",
"0.62834597",
"0.62733895",
"0.61824584",
"0.6095812",
"0.6087766",
"0.60676086",
"0.59990036",
"0.5910869",
"0.59009457",
"0.5845386",
"0.58055174",
"0.5778235",
"0.5753392",
"0.5704363",
"0.56838626",
"0.5652095",
"0.56124866",
"0.56091404",
"0.555994",
"0.5556189",
"0.5532368",
"0.5532368",
"0.5532368",
"0.5532368",
"0.5515969",
"0.5513665",
"0.54431343",
"0.5442344",
"0.54238534",
"0.5420849",
"0.540257",
"0.5400942",
"0.5400942",
"0.5400942",
"0.5400942",
"0.5392258",
"0.5385437",
"0.53834325",
"0.53641635",
"0.5360838",
"0.5352802",
"0.53412896",
"0.53305435",
"0.5330223",
"0.53298855",
"0.5319429",
"0.5306799",
"0.53033066",
"0.5294834",
"0.5291113",
"0.5291096",
"0.5276731",
"0.527384",
"0.5272427",
"0.5271958",
"0.5265768",
"0.5255942",
"0.5247791",
"0.52445304",
"0.5241428",
"0.52402234",
"0.52363694",
"0.52354133",
"0.52347445",
"0.5226993",
"0.5215919",
"0.52074116",
"0.51991343",
"0.51887655",
"0.5181522",
"0.51810944",
"0.51758856",
"0.5175252",
"0.5159816",
"0.5157861",
"0.51578075",
"0.5154166",
"0.51500356",
"0.51483065",
"0.5142517",
"0.5134743",
"0.5131434",
"0.5126341",
"0.5122836",
"0.5117522",
"0.51141334",
"0.5113449",
"0.5112887",
"0.5109787",
"0.5102809",
"0.5095754",
"0.50950146",
"0.50885403",
"0.5088074",
"0.50877994",
"0.5084602",
"0.50768834"
] | 0.6804872 | 1 |
// confirm login for admin | @RequestMapping(value = "/admin_login")
public String adminLogin(@ModelAttribute("AdminLogCommand") Admin a, HttpSession session) {
if (a.getEmail().trim() == null || a.getPassword().trim() == null) {
return "redirect: /admin_login_page?msg=field missing";
}
Admin admin = adminService.loginAdmin(a.getEmail(), a.getPassword());
System.out.println("admin obj : " + admin);
if (admin != null) {
addAdminInSession(admin, session);
return "redirect: admin_dashboard";
}
return "redirect: admin_login_page?msg=invalid credentials";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void confirmLogin() {\n String nameString1 = this.adminName.getText();\n String passwordString1 = this.adminPassword.getText();\n UserType userType = (UserType) this.user_type_combobox.getSelectedItem();\n if (\"系统管理员\".equals(userType.getName())) {\n AdminDao adminDao = new AdminDao();\n SystemAdmin admin = adminDao.selectAdmin(nameString1, passwordString1);\n if (admin == null) {\n JOptionPane.showMessageDialog(this, \"用户名或者密码错误!!\");\n return;\n }\n IndexFrame indexFrame = new IndexFrame(userType, admin, passwordString1);\n indexFrame.setVisible(true);\n this.dispose();\n }\n }",
"private void loginAsAdmin() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"admin\");\n vinyardApp.fillPassord(\"321\");\n vinyardApp.clickSubmitButton();\n }",
"private void adminLogin() {\n\t\tdriver.get(loginUrl);\r\n\t\t// fill the form\r\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(USERNAME);\r\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(PASSWORD);\r\n\t\t// submit login\r\n\t\tdriver.findElement(By.name(\"btn_submit\")).click();\r\n\t}",
"@Override\r\n\tpublic boolean doLogin(Admin admin) {\n\t\tSession session=sessionFactory.openSession();\r\n\t\tQuery query=\r\n\t\t\t\tsession.createQuery(\"select o from Admin o where o.Email=:email and o.password=:password\");\r\n\t\tquery.setParameter(\"email\", admin.getEmail());\r\n\t\tquery.setParameter(\"password\", admin.getPassword());\r\n\t\tList<Admin> adminList=query.list();\r\n\t\t\r\n\t\tif(adminList.isEmpty())\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\treturn true;\r\n\t}",
"protected void doAdminLogin() {\n\t\tif (et_pin.getText().toString().trim().equals(\"\")) {\r\n//\t\t\td.dialogShow(v, AdminLoginActivity.this, \"Sorry\",\r\n//\t\t\t\t\t\"Please enter your master pin\");\r\n\t\t\t\r\n\t\t\td.showSingleButtonDialog( AdminLoginActivity.this,\r\n\t\t\t\t\t\"Please enter your master pin\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t} else {\r\n\r\n\t\t\tGlobalVariable.adminMasterPin = et_pin.getText().toString().trim();\r\n\t\t\tIntent i = new Intent(AdminLoginActivity.this,\r\n\t\t\t\t\tAdminConfirmLoginActivity.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\toverridePendingTransition(R.anim.open_translate,\r\n\t\t\t\t\tR.anim.close_translate);\r\n\r\n\t\t}\r\n\t}",
"public String adminlogin() {\n\t\tfactory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);\n\t\tEntityManager em = factory.createEntityManager();\n\t\t//Query to select user account where email and password entered by the user\n\t\tQuery q = em\n\t\t\t\t.createQuery(\"SELECT u FROM AdminAccount u WHERE u.email = :email AND u.password = :pass\");\n\t\tq.setParameter(\"email\", email);\n\t\tq.setParameter(\"pass\", password);\n\t\ttry {\n\t\t\tAdminAccount user = (AdminAccount) q.getSingleResult();\n\t\t\tif (email.equalsIgnoreCase(user.getEmail())\n\t\t\t\t\t&& password.equals(user.getPassword())) {\t//If passwords match,\n\t\t\t\n\t\t\t\t HttpSession session = Util.getSession();\t//create session\n\t\t session.setAttribute(\"email\", email);\n\t\t\n\t\t\t\treturn \"success\";\n\t\t\t}\n\t\t\taddMessage(new FacesMessage(FacesMessage.SEVERITY_ERROR,\n\t\t\t\t\t\"Invalid credentials entered!\", null));\n\t\t\treturn \"failure\";\n\n\t\t} catch (Exception e) {\n\t\t\taddMessage(new FacesMessage(FacesMessage.SEVERITY_ERROR,\n\t\t\t\t\t\"System error occured. Contact system admin!\", null));\n\t\t\treturn \"systemError\";\n\t\t}\n\t}",
"@Test\n\tpublic void checkValidLoginAdmin() {\n\t\ttest = report.createTest(\"CheckValidLoginAdmin\");\n\t\t\n\t\tadminhomepage = loginpage.successfullLoginAdmin(UserContainer.getAdmin());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(adminhomepage.getUserNameText(), UserContainer.getAdmin().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = adminhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}",
"@Given ( \"I am logged into iTrust2 as an Admin\" )\r\n public void loginAsAdmin () {\r\n driver.get( baseUrl );\r\n final WebElement username = driver.findElement( By.name( \"username\" ) );\r\n username.clear();\r\n username.sendKeys( \"admin\" );\r\n final WebElement password = driver.findElement( By.name( \"password\" ) );\r\n password.clear();\r\n password.sendKeys( \"123456\" );\r\n final WebElement submit = driver.findElement( By.className( \"btn\" ) );\r\n submit.click();\r\n\r\n }",
"private void jConfirmActionPerformed(final ActionEvent evt)\n {\n if (jAdmin.getText().length() == 0)\n {\n JOptionPane.showMessageDialog(null, \"用户名不能为空!\");\n return;\n }\n if (DA.checkAdmin(jAdmin.getText()))\n {\n JOptionPane.showMessageDialog(null, \"用户名已经被使用!\");\n return;\n }\n if (jPassWord.getPassword().length == 0\n || jPassWordRepeat.getPassword().length == 0)\n {\n JOptionPane.showMessageDialog(null, \"密码不能为空!\");\n jPassWord.setText(\"\");\n jPassWordRepeat.setText(\"\");\n return;\n }\n final String password = new String(jPassWord.getPassword());\n final String passwordRepeat = new String(jPassWordRepeat.getPassword());\n // System.out.println(password+\" \"+passwordRepeat);\n if (password.equals(passwordRepeat) == false)\n {\n JOptionPane.showMessageDialog(null, \"两次密码输入不匹配,请重新输入!\");\n jPassWord.setText(\"\");\n jPassWordRepeat.setText(\"\");\n return;\n }\n\n final MD5 md5 = new MD5(password);\n final AdminData admin = new AdminData();\n admin.setAdmin(jAdmin.getText());\n admin.setPassWord(md5.get());\n\n DA.addAdmin(admin);\n JOptionPane.showMessageDialog(null, \"注册成功!\");\n dispose();\n }",
"public void loginAsAdmin() {\n mAuth.signInWithEmailAndPassword(\"admin@gmail.com\", \"password\")\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (! task.isSuccessful()) {\n alert(\"Firebase\", \"ERROR: Invalid username or password!\");\n return;\n }\n\n authenticationDone = true;\n if (splashTimeoutFinished) {\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(intent);\n }\n }\n });\n }",
"@Override\n public void onLoginConfirmation(int success) {\n if (success == 5) {\n dialog.dismiss();\n saveToSharedPreferences();\n Intent in = new Intent(LoginActivity.this, UserProfileActivity.class);\n startActivity(in);\n }\n\n // User is found on server but not activated\n if (success == 4) {\n dialog.dismiss();\n Toast.makeText(LoginActivity.this, R.string.activate_your_account,Toast.LENGTH_SHORT).show();\n Intent in = new Intent(LoginActivity.this, ConfirmationActivity.class);\n startActivity(in);\n }\n // User, pass is incorrect\n else if (success == 3) {\n dialog.dismiss();\n Toast.makeText(LoginActivity.this, R.string.wrong_user_pass,Toast.LENGTH_SHORT).show();\n }\n // There is no such user\n else if(success == 2) {\n dialog.dismiss();\n Toast.makeText(LoginActivity.this, R.string.not_signup,Toast.LENGTH_SHORT).show();\n\n }\n // Server error\n else {\n dialog.dismiss();\n Toast.makeText(LoginActivity.this,R.string.server_failure,Toast.LENGTH_SHORT).show();\n }\n }",
"public boolean confirmLoginClicked() {\n return confirmLogin;\n }",
"@Action(value = \"adminLogin\", results = { @Result(name = \"success\", location = \"/success.jsp\") })\r\n\tpublic String login() throws IOException {\r\n\t\tString userName = RequestUtil.getParam(request, \"username\", \"\");\r\n\t\tString password = RequestUtil.getParam(request, \"password\", \"\");\r\n\t\tresponse.reset();\r\n\t\tresponse.setCharacterEncoding(\"utf-8\");\r\n\t\tif (\"admin\".equals(userName) && \"admin\".equals(password)) {\r\n\t\t\tresponse.getWriter().print(\"{success:'true',msg:'登录成功'}\");\r\n\t\t\tif (null == user)\r\n\t\t\t\tuser = new LoginUser();\r\n\t\t\tuser.setUsername(userName);\r\n\t\t\tuser.setPassword(password);\r\n\t\t\trequest.getSession()\r\n\t\t\t\t\t.setAttribute(Contants.SESSION_USER_ADMIN, user);\r\n\t\t\tOnlineUser.getInstance().addUser(user, 1);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tresponse.getWriter().print(\"{success:'false',msg:'登录失败'}\");\r\n\t\treturn null;\r\n\t}",
"private void confirmAction() {\r\n try {\r\n PreparedStatement prep = conn.prepareStatement(\"SELECT * FROM admin WHERE login = ? and (paswd = ? or paswd = ?)\");\r\n prep.setString(1, tf_login.getText());\r\n prep.setString(2, pf_pass.getText());\r\n prep.setString(3, tf_pass.getText());\r\n ResultSet wynikLogowania = prep.executeQuery();\r\n if (wynikLogowania.next()) {\r\n// if (!wynikLogowania.getString(\"login\").equals(\"\")) {\r\n System.out.println(\"\\n=========================================================\");\r\n System.out.println(\"===|||Zalogowano poprawnie do aplikacji JAKO ADMIN!|||===\");\r\n System.out.println(\"=========================================================\\n\");\r\n try {\r\n Stage administratorStage = new Stage();\r\n Parent root = FXMLLoader.load(getClass().getResource(\"../view/adminMainView.fxml\")); //w tym miejscu wywołamy okno ADMINA po zalogowaniu!!!\r\n administratorStage.setTitle(\"Witamy w panelu administratora!!!\");\r\n administratorStage.setScene(new Scene(root));\r\n administratorStage.show();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n// }\r\n } else {\r\n System.out.println(\"\\n=======================================================\");\r\n System.out.println(\"\\tUWAGA: Wprowadzono niepoprawny login lub hasło!\");\r\n System.out.println(\"=======================================================\\n\");\r\n// licznikLogowan = licznikLogowan - 1;\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"ALERT: Nieprawidłowe dane logowania!\");\r\n alert.setHeaderText(\"Niepoprawny login lub hasło!\");\r\n// alert.setContentText(\"Pozostało: \" + licznikLogowan + \" prób logowania!\");\r\n alert.showAndWait();\r\n// if (licznikLogowan == 0) {\r\n// System.out.println(\"To była Twoja OSTATNIA próba zalogowania! Nie udało się! Zapraszamy jak się zastanowisz nad sobą!\");\r\n// System.exit(0);\r\n// }\r\n }\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n System.out.println(\"\\n#############################\");\r\n System.out.println(\"###Błędne zapytanie do DB!###\");\r\n System.out.println(\"##############################\\n\");\r\n }\r\n tf_login.clear();\r\n pf_pass.clear();\r\n tf_pass.clear();\r\n }",
"@Override\r\n public Boolean loginAdmin(LoginAccessVo vo) throws Exception {\n return null;\r\n }",
"@Override\r\n public Boolean loginAdmin(LoginAccessVo vo) throws Exception {\n return null;\r\n }",
"public Admin login(Admin admin) {\n\t\t\n\t\treturn adminDao.select(admin);\n\t}",
"public boolean adminLogInCheck(String username, String password) {\r\n\t\tif (username.equals(ADMIN_USERNAME) && password.equals(ADMIN_PASSWORD)) {\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\tpublic int validLogin(String adminid, String adminpw) {\n\t\tif (\"admin\".equals(adminid)\n\t\t\t\t&& \"12345\".equals(adminpw))\n\t\t\t{\n\t\t\t\treturn 99;\n\t\t\t}\n\t\t\treturn -1;\n\t}",
"private boolean isUserAnAdmin(String login) {\n EUser user = null;\n try {\n user = eUserController.findUserByLogin(login);\n if (user.getStatus().equals(EUser.statusAdmin)) {\n return true;\n } else {\n return false;\n }\n } catch (Exception ex) {\n return false;\n //throw new AuthenticationException(\"Incorrect login.\");\n }\n }",
"public abstract boolean login(String email, String passwaord) throws CouponSystemException;",
"public boolean changeAdmin() {\n\t\tString username = Inputs.getUserInput(\"Enter username:\");\n\t\tint pin = InputsValidator.getPinInput(\"Enter pin ( XXXX ) :\");\n\n\t\tif (adminDao.changeAdmin(username, pin)) {\n\t\t\tSystem.out.println(\"Admin changed! Username: \" + username + \"; pin: \" + pin);\n\t\t\tAdminMenu.getAdminMenu();\n\t\t\treturn true;\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\t\t\tAdminMenu.getAdminMenu();\n\t\t\treturn false;\n\t\t}\n\t}",
"private void checkRole() {\n if (tools.checkNewPassword(new String(txtNewPass.getPassword()))) {\n if (new String(txtNewPass.getPassword()).equals(new String(txtConfirmPass.getPassword()))) {\n try {\n controller.changePassword(employee.getUsername(), new String(txtNewPass.getPassword()));\n Tools tools = new Tools();\n tools.sendMessage(employee, 3);\n tampilPesan(\"Password successfully updated.\");\n Login login = new Login(sessionFactory);\n this.getParent().add(login);\n login.setLocation(480, 200);\n login.setVisible(true);\n \n dispose();\n } catch (SQLException ex) {\n Logger.getLogger(ChangePasswordView.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n tampilPesan(\"New password doesn't match with confirm password\");\n }\n } else {\n tampilPesan(\"Password must have 8 characters minimum containing Uppercase, Lowercase, and number!!!\");\n }\n }",
"public String confirm()\n\t{\n\t\tconfirm = true;\n\t\treturn su();\n\t}",
"@Override\r\n\tpublic void login_admin() {\n\t\trender(\"admin/login.jsp\");\r\n\t}",
"private void loginAdmin(HttpServletRequest request, HttpServletResponse response) throws IOException, SQLException {\n\t\tString username = request.getParameter(\"username\");\n\t\tString pass = request.getParameter(\"password\");\n\t\tCookie[] theCookieLoop=request.getCookies();\n\t\t\n\t\tif(username.equals(\"admin\") && pass.equals(\"123456\")) {\n\t\t\tif(theCookieLoop !=null) {\n\t\t\t\tfor(Cookie tempCookie:theCookieLoop) {\n\t\t\t\t\tif(\"checkLoginPageAdmin\".equals(tempCookie.getName())) {\n\t\t\t\t\t\ttempCookie.setValue(\"true\");\n\t\t\t\t\t\tresponse.addCookie(tempCookie);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(Cookie tempCookie:theCookieLoop) {\n\t\t\t\t\tif(\"UserLoginAdmin\".equals(tempCookie.getName())) {\n\t\t\t\t\t\ttempCookie.setValue(request.getParameter(\"username\"));\n\t\t\t\t\t\tresponse.addCookie(tempCookie);\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\tresponse.sendRedirect(\"/WebBuyPhone/admin/darkboard.jsp\");\n\t\t}\n\t\tboolean check;\n\t\tcheck=daoPageAdmin.LoginPageAdmin(request.getParameter(\"username\"),MD5Encrypt.hashPass(request.getParameter(\"password\")));\n\t\tif(check) {\n\t\t\ttheCookieLoop=request.getCookies();\n\t\t\tif(theCookieLoop !=null) {\n\t\t\t\tfor(Cookie tempCookie:theCookieLoop) {\n\t\t\t\t\tif(\"checkLoginPageAdmin\".equals(tempCookie.getName())) {\n\t\t\t\t\t\ttempCookie.setValue(\"true\");\n\t\t\t\t\t\tresponse.addCookie(tempCookie);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(Cookie tempCookie:theCookieLoop) {\n\t\t\t\t\tif(\"UserLoginAdmin\".equals(tempCookie.getName())) {\n\t\t\t\t\t\ttempCookie.setValue(request.getParameter(\"username\"));\n\t\t\t\t\t\tresponse.addCookie(tempCookie);\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\ttheCookie =new Cookie(\"userLoginPageAdmin\",request.getParameter(\"username\"));\n\t\t\ttheCookie.setMaxAge(60*60*24*365);\n\t\t\tresponse.addCookie(theCookie);\n\t\t\tresponse.sendRedirect(\"/WebBuyPhone/admin/darkboard.jsp\");\n\t\t}\n\t}",
"@Test\n\tpublic void testLoginAdminAccExist() {\n\t\tAccount acc1 = new Account(00000, \"ADMIN\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"ADMIN\", 00000, 0, \"A\"));\n\t\ttransactions.add(1, new Transaction(00, \"ADMIN\", 00000, 0, \"A\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Session Started Admin\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to find that admin account\", testResult);\n\t}",
"public void gotoAdminLogin(){ application.gotoAdminLogin(); }",
"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}",
"@Override\n\tpublic Admin adminLogin(Admin admin) {\n\t\tString sql = \"select * from admin where adminName = ? and adminPwd = ?\";\n\t\tAdmin admin1 = (Admin) JDBCUtil.executeQueryOne(sql, new adminMapping(), admin.getAdminName(),admin.getAdminPwd());\n\t\tif(admin1 != null){\n\t\t\treturn admin1;\n\t\t}\n\t\treturn null;\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 static void navigateAdminLoginPage() {\n Browser.driver.get(\"http://shop.pragmatic.bg/admin\");\n }",
"public void login() {\n\t\tUser user = new User(\"admin\", \"12345678\", Role.ADMIN);\n\t\tuser.setEmail(\"admin@gibmit.ch\");\n\t\t\n\t\tif(user != null) {\n\t\t\tuserBean.setLoggedInUser(user);\n\t\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\tHttpServletRequest req = (HttpServletRequest)context.getExternalContext().getRequest();\n\t\t\treq.getSession().setAttribute(ATTR_USER, user);\n\t\t}else{\n\t\t\tkeepDialogOpen();\n\t\t\tdisplayErrorMessageToUser(\"Wrong Username/Password. Try again\");\n\t\t}\n\t\t\n\t}",
"public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tint selection=JOptionPane.showConfirmDialog(mainWin,\"Are you sure you want to log out\",\"Choose\",JOptionPane.YES_NO_OPTION);\r\n\t\t\t\tif( selection==JOptionPane.YES_OPTION) {\r\n\t\t\t\t\tmainWin.dispose();\r\n\t\t\t\t\tMainLoginPage returntologin=new MainLoginPage();\r\n\t\t\t\t\treturntologin.display();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}",
"protected void login() {\n\t\t\r\n\t}",
"void successLogin();",
"void loginDone();",
"public boolean adminAccess (String password) throws PasswordException;",
"@Override\n\t\t\tpublic boolean onLongClick(View v) {\n\t\t\t\tconfirmAdmin(\"admin12345\");\n\t\t\t\treturn true;\n\t\t\t}",
"void confirm();",
"@Test\n\tpublic void adminLogin()\n\t{\n\t\tAdminFacade af = admin.login(\"admin\", \"1234\", ClientType.ADMIN);\n\t\tAssert.assertNotNull(af);\n\t}",
"private final static void onLoginAdmin(TextField username, PasswordField password)\n\t{\n\t\tif(ProfileManipulation.findUsername(username.getText()) && !ProfileManipulation.checkLoginStatus(username.getText())){\n\t\t\tif (ProfileManipulation.isVerfied(username.getText())) {\n\t\t\t\tProfileManipulation.updateLoginStatus(username.getText(), true);\n\n\t\t\t\t// Jetzt wird das Profil aufgerufen\n\t\t\t\tPartylize.setUsername(username.getText());\n\n\t\t\t\tProfileManipulation.changePassword(password.getText());\n\n\t\t\t\tPartylize.showMainScene();\n\t\t\t} else {\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showVerification();\n\t\t\t}\n\t\t}\n\t\t// Funktionsaufruf Datenbankanbindung -> Erstellen einer Session ID\n\t\t// Funktionsaufruf Profildaten in lokalen Speicher laden - WIP\n\t\telse {\n\t\t\tusername.setText(\"\");\n\t\t\tpassword.setText(\"\");\n\t\t}\n\t}",
"boolean verificarLogin(FichaDocente regDcnt);",
"@Test\n\tpublic void adminLogin2()\n\t{\n\t\tAdminFacade af = admin.login(\"admin\", \"4321\", ClientType.ADMIN);\n\t\tAssert.assertNull(af);\n\t}",
"public String verificarCredenciales() {\n String resultado = \"\";\n \n Usuario usuario = usuarioBean.verificarCredenciales(this.usuario, this.password);\n \n if (usuario != null) {\n FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(\"usuario\", usuario);\n resultado = \"home?faces-redirect=true\";\n \n \n } else {\n FacesContext fc = FacesContext.getCurrentInstance();\n fc.addMessage(\"\", new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Acceso Denegado\", \"Las credenciales son incorrectas\"));\n }\n return resultado;\n }",
"public void onClick(View view){\n if(password.getText().toString().equals(confirm.getText().toString()))\n creatAccount(email.getText().toString(), password.getText().toString(), username.getText().toString());\n else\n showMessage(\"Confirmed Password is not the same as Password\");\n }",
"private static boolean admin(String username, String password) {\r\n\t\tFile file = new File(\"admin.txt\");\r\n\t\tScanner scanner;\r\n\t\tString user = null;\r\n\t\tString pwd = null;\r\n\t\ttry {\r\n\t\t\tscanner = new Scanner(file);\r\n\t\t\tString nextLine = scanner.nextLine();\r\n\t\t\tString[] parts = nextLine.split(\"=\");\r\n\t\t\tuser = parts[0];\r\n\t\t\tpwd = parts[1];\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\t\r\n\t\t\r\n\t\treturn (username.equals(user) && password.equals(pwd));\r\n\t\t\r\n\t}",
"public void verAsignarPermiso(Administrador adminactual)\r\n\t{\r\n\t\tasignarpermiso = new AsignarPermiso(this, adminactual);\r\n\t\tasignarpermiso.setVisible(true);\r\n\t}",
"@Test\n\tpublic void testLoginAdminAccountSuccessfully() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.loginAdminAccount(USERNAME2, PASSWORD2);\n\t\t} catch (InvalidInputException e) {\n\t\t\tfail();\n\t\t}\n\n\t\tassertNotNull(user);\t\t\t\n\t\tassertEquals(USERNAME2, user.getUsername());\n\t\tassertEquals(PASSWORD2, user.getPassword());\n\t\tassertEquals(NAME2, user.getName());\n\t}",
"private Boolean authorize() {\n\n return Session.getInstance().login(user.getText(), password.getText());\n }",
"@Override\r\n\t\r\n\t@Transactional(readOnly = true, propagation=Propagation.SUPPORTS)\r\n\tpublic Admin authenticateAdmin(Admin login) {\n\t\treturn adminDAO.authenticateAdmin(login);\r\n\t}",
"public boolean logincheck(String user, String pass) \r\n {\n \r\n try{\r\n Connection conn = DriverManager.getConnection(url, userName, password);\r\n String Sql = \"Select * from APP.MEMBER where email=? and password=?\";\r\n PreparedStatement pst = conn.prepareStatement(Sql);\r\n pst.setString(1,user);\r\n pst.setString(2,pass);\r\n ResultSet rs = pst.executeQuery();\r\n if (rs.next())\r\n {\r\n JOptionPane.showMessageDialog(null,\"Welcome user\");\r\n createEventsUI w = new createEventsUI();\r\n w.setVisible(true);\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid username or password\", \"Access Denied\",JOptionPane.ERROR_MESSAGE);\r\n }\r\n }catch(Exception e) \r\n {\r\n JOptionPane.showMessageDialog(null, e);\r\n }\r\n return false;\r\n \r\n }",
"private void proseslogin() {\n String user = username.getText();\n char[] pass = password.getPassword();\n \n if (user.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"Username Harus Diisi\");\n username.requestFocus();\n } else if (pass.length == 0){\n JOptionPane.showMessageDialog(this, \"Password Harus Diisi\");\n password.requestFocus();\n }else{\n String password = new String(pass);\n login.setEnabled(false);\n try {\n Connection conn = koneksi.sambungDB();\n Statement st = conn.createStatement();\n String n = \"SELECT * FROM tb_admin \"\n +\"WHERE admin_username='\"+user+\"' \"\n +\"AND admin_password=MD5('\"+password+\"')\" ;\n// System.out.println(q);\n ResultSet rs = st.executeQuery(n);\n if (rs.next()) {\n Data_perumahan h = new Data_perumahan();\n h.setExtendedState(Frame.MAXIMIZED_BOTH);\n this.setVisible(false);\n h.setVisible(true);\n }else{\n JOptionPane.showMessageDialog(this, \"Username dan Password Salah\");\n username.requestFocus();\n }\n login.setEnabled(true);\n } catch (HeadlessException | SQLException e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n }\n }",
"public static boolean login() {\n\t\t// DB\n\t\tString[] usr = { \"NICOLAS\", \"CELESTE\" };\n\t\tString[] pass = { \"cerveza\", \"fernet\" };\n\t\tString usrAuth = \"\";\n\t\tboolean auth = false;\n\t\tint intentos = 1;\n\n\t\tdo {\n\t\t\tJTextField usuario = new JTextField();\n\t\t\tJTextField password = new JPasswordField();\n\t\t\tObject[] ingresarUsuarioPassword = { \"Usuario: \", usuario, \"Password\", password };\n\t\t\tint ingresarLogin = JOptionPane.showConfirmDialog(null, ingresarUsuarioPassword,\n\t\t\t\t\t\"Ingrese credenciales de usuario\", JOptionPane.OK_CANCEL_OPTION);\n\t\t\tif (ingresarLogin == JOptionPane.OK_OPTION) {\n\t\t\t\t// Busca el usuario en un bucle For\n\t\t\t\tfor (int i = 0; i < usr.length; i++) {\n\t\t\t\t\t// Si encuentra el usuario, verifica si el usuario y la contraseña coinciden\n\t\t\t\t\tif (usr[i].equals(usuario.getText().toUpperCase()) && pass[i].equals(password.getText())) {\n\t\t\t\t\t\tusrAuth = usr[i];\n\t\t\t\t\t\tauth = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Si no coincide, muestra los intentos restantes y vuelve a pedir credenciales\n\t\t\t\tif (!auth) {\n\t\t\t\t\tif (intentos < 3) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\\n\" + (3 - intentos) + \" Intentos restantes\",\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tintentos++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\\n\" + \"Se supero en numero de intentos\",\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tintentos++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Cierra si no se selecciona OK\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!auth & (intentos <= 3));\n\t\t// Si autentica, muestra mensaje de bienvenida\n\t\tif (auth)\n\t\t\tJOptionPane.showMessageDialog(null, \"Bienvenido \" + usrAuth, \"Bienvenido\", JOptionPane.INFORMATION_MESSAGE);\n\t\treturn auth;\n\t}",
"boolean checkUserCorrispondenceLogin(String emailLogin, String passwordLogin);",
"public void loginStatus(Boolean success) {\n if (success.equals(true))\n System.out.println(\"Login Successful\");\n else {\n System.out.println(\"Login Failed -> Username or password may be incorrect\");\n }\n }",
"public boolean loginUser();",
"public void login() throws ClassNotFoundException, SQLException {\n\t\tConnectionManager con=new ConnectionManager();//connection manager\r\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the username\");\r\n\t\tString name=s.next();\r\n\t\tSystem.out.println(\"Enter the password\");\r\n\t\tString pass=s.next();\r\n\t\tint flag=0;\r\n\t\tStatement st=con.getConnection().createStatement();\r\n\t\tResultSet set=st.executeQuery(\"select * from adminlogin\"); \r\n\t\twhile(set.next()) {\r\n\t\t\t//to display the values\r\n\t\t\tString name1=set.getString(1);\r\n\t\t\tString pw1=set.getString(2);\r\n\t\t\r\n\t\tif(name1.contentEquals(name)&& pass.contentEquals(pw1)) \r\n\t\t\tflag=1;\r\n\t\t}\r\n\t\tif(flag==1) {\r\n\r\n\t\t\tSystem.out.println(\"Admin login successful\");\r\n\t\t\tadminlogin ad=new adminlogin();\r\n\t\t\tad.option();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Sorry..!! Incorrect details.\\nLogin again\\n\");\r\n\t\t}\r\n\t\t\t\r\n\t\tHotelmanagement first=new Hotelmanagement();\r\n\t\tfirst.choice();\r\n\t}",
"public abstract boolean confirm();",
"@Test\n public void t01_buscaAdmin() throws Exception {\n Usuario admin;\n admin = usuarioServico.login(\"administrador\", \".Ae12345\");\n assertNotNull(admin);\n }",
"public void login() {\n try {\n callApi(\"GET\", \"account/session\", null, null, true);\n } catch (RuntimeException re) {\n\n }\n\n Map<String, Object> payload = new HashMap<>();\n payload.put(\"name\", \"admin\");\n payload.put(\"password\", apiAdminPassword);\n payload.put(\"remember\", 1);\n\n callApi(\"POST\", \"account/signin\", null, payload, true);\n }",
"@FXML\n private void handleOKPressed() {\n\n if (Authenticator.validatePassword(accountId.getText(), password.getText())) {\n application.accountLogging(accountId.getText());\n confirmLogin = true;\n dialogStage.close();\n } else {\n errorMessage.setVisible(true);\n }\n }",
"void legeAn(String login, String name, String password, boolean isAdmin, String email);",
"static void acceptLogin() throws IOException\n\t{\n\t\tboolean validLogin = false, loginAccepted=false, emptyInput=false;;\n\t\tint dialogButton, attempts = 0,option;\n\t\tString info, title = \"Registration\";\n\t\tdialogButton = JOptionPane.showConfirmDialog (null, \"Are you an existing user?\",\"Login\", JOptionPane.YES_NO_OPTION);\n \n JTextField email = new JTextField(); //A text field is a basic text control that enables the user to type a small amount of text.\n JTextField password = new JPasswordField();\n JTextField confirmEmail = new JTextField(); //A text field is a basic text control that enables the user to type a small amount of text.\n JTextField confirmPassword = new JPasswordField();\n \n if(dialogButton == JOptionPane.YES_OPTION)//Executes only if the user is already an existing user\n\t\t{\n\t\t\tSystem.out.println(\"User selected yes..\");\n //Creates an object that accepts both username and password using JTextField\n \n Object[]message = {\"Username:\", username,\"Password:\", password};\n String attempted=\"***\";\n System.out.println(attempted);\n //Loop will keep running until three attempts are made or a valid input is entered\n\t\t\twhile(attempts<3 && !validLogin && !emptyInput)\n\t\t\t{\n\n\t\t\t\toption = JOptionPane.showConfirmDialog(null, message, \"Login\", JOptionPane.OK_CANCEL_OPTION);\n System.out.println(username.getText()+\"\\n\"+password.getText());\n\n //if user presses Cancel button the program loops through acceptLogin Method\n if(option == JOptionPane.CANCEL_OPTION)\n {\n acceptLogin();\n validLogin = true;\n }\n\n else \n\t\t\t\t{\n\t\t\t\t validLogin = validLoginEntered(username.getText(), password.getText());\n\t\t\t\t if(!validLogin)\n {\n\t\t\t\t JOptionPane.showMessageDialog(null, \"User Could Not Be Found!\\nAttempt \"+(attempts+1)+\" of 3\", title, 2);\n\t\t\t\t attempts++;\t\n\t\t\t\t if (attempts==3) \n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"Login Failed\");\n\t\t\t\t \tdialogButton= JOptionPane.showConfirmDialog (null, \"Do you want to Login Again?\",\"Login Failed\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t \t if(dialogButton==JOptionPane.YES_OPTION)\n\t\t\t\t \t \t{acceptLogin();System.out.println(\"Reseting Login...\");\n\t\t\t\t \t \tvalidLogin=true;}\n\t\t\t\t \t else {\n\t\t\t\t \t \tSystem.out.println(\"Terminating Login...\");\n\t\t\t\t \t \tJOptionPane.showMessageDialog(null,\"Goodbye!!\");\n\t\t\t\t \t }\n\t\t\t\t }\n\t\t\t\t attempted=attempted.substring(0,attempted.length()-1);\n\t\t\t\t System.out.println(attempted);\n\t\t\t\t }\n else\n {\n loggedin = true;\n user(username.getText());\n getUsername(username.getText());\n }\n\t\t\t\t}\n }\n }\n //if user presses NO option then the user is asked to create a new user\n else if(dialogButton == JOptionPane.NO_OPTION)\n\t\t{ \n boolean userExists = false;\n\t\t\tFile fileReader = new File(\"loginDetails.txt\");\n\t\t\tObject[] message= {\"Email:\",email,\"Username:\", username,\"Password:\", password,\"Confirm Password:\", confirmPassword};\n JOptionPane.showMessageDialog(null, message, \"Create user\",1);\n info = username.getText()+\",\"+password.getText()+\",\"+email.getText()+\"\\n\"; \n //this is used to check if the user already exists. If user already exists then the user is asked to try logging in \n if (validpassword(password.getText())==true) {\n \t\n \n if(validemail(email.getText())==true)\n {\n if(loginDetails.get(0).contains(username.getText()) || username.getText().equals(\"\"))\n {\n JOptionPane.showMessageDialog(null,\"Username Taken or Empty Input, Try Again\",\"Registration Error!\",0);\n userExists = true;\n acceptLogin();\n }\n //if user doesn't exist then a new user is created\n if(!userExists&&confirmPassword.getText().matches(password.getText()))\n {\n \tSystem.out.println(\"New user Added to log...\");\n writeToFile(fileReader, info);\n writeUserFile(username.getText()+\".txt\",\"\");\n userDetails(username.getText()+\".txt\");\n loginDetails.get(0).add(username.getText());\n loginDetails.get(1).add(password.getText());\n loginDetails.get(2).add(\"0\");\n userIndex = loginDetails.get(0).indexOf(username.getText());\n validLogin=true;\n loggedin = true;\n }else{JOptionPane.showMessageDialog(null,\"Password does not match, Try again\",\"Password Error\",0);acceptLogin();}\n \t}else \n \t{\n \t\t\n \t\t acceptLogin();\n \t}\n }else\n {\n\n \t\t acceptLogin();\n }\n \n }\n //if the login is not succesfull then the program exists \n\t}",
"@Test\n\tpublic void testAuthenticateAdminAccountSuccessfully() {\n\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.authenticateAdminAccount(USERNAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\tfail();\n\t\t}\n\t\tassertNotNull(user);\n\t\tassertNotEquals(0, user.getToken());\n\t}",
"public boolean loginAdmin(String user, String password) {\r\n\t\t//Inicio sesion administrador\r\n\t\tif(user.equals(this.nombreAdmin) && password.equals(this.contraseñaAdmin)) { \r\n\t\t\tthis.modoAdmin = true;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private void checkAction(HttpServletRequest req, HttpServletResponse resp) throws SQLException, IOException {\n\t\tString account = req.getParameter(\"account\");\r\n\t\tString password = req.getParameter(\"password\");\r\n\t\tManage manage = this.service.checkLogin(account, password);\r\n\r\n\t\t// 如果User不是空,证明账号密码正确\r\n\t\tif (manage != null) {\r\n\t\t\tsession.setAttribute(\"MANAGEINSESSION\", manage);\r\n//\t\t\tresp.sendRedirect(path + \"/jsps/manage/index.jsp\");\r\n\t\t\tpw.print(true);\r\n\t\t} else {\r\n\t\t\tpw.print(false);\r\n//\t\t\tresp.sendRedirect(path + \"/jsps/manage/login.jsp\");\r\n\t\t}\r\n\t\treturn;\r\n\t}",
"private void formDashboardMainButtonLogoutActionPerformed(java.awt.event.ActionEvent evt) {\n try {\n int action = JOptionPane.showConfirmDialog(null,\n Constanta.Messages.MESSAGE_CONFIRM_LOGOUT,\n Constanta.Messages.BANNER_CONFIRM,\n JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE);\n\n if (action == JOptionPane.YES_OPTION) {\n Login login = new Login();\n login.show();\n this.dispose();\n }\n } catch (HeadlessException e) {\n JOptionPane.showMessageDialog(null, Constanta.Messages.MESSAGE_ERROR + e.getMessage());\n }\n }",
"void redirectToLogin();",
"@Override\r\n\tpublic boolean checkAdmin(String email) {\n\t\treturn adminDAO.checkAdmin(email);\r\n\t}",
"public void doLoginClod()\r\n {\r\n this.executeLoginAttemp(this.loginForForm, this.passwordForForm);\r\n String navigateResult = this.navigateAfterLoginAttemp();\r\n if (!navigateResult.equals(\"/\")) redirectSession(\"/clodwar/index.xhtml\");\r\n }",
"default void protectAdmin(@NotNull HttpSession session)\n {\n this.protect(session);\n\n if (!auth(session).isAdmin()) {\n throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, \"Login please as admin\");\n }\n }",
"public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}",
"public static String getAdminIdIfLoggedIn(final Http.Context ctx){\n AuthUser u = PlayAuthenticate.getUser(ctx.session());\n if (u == null) return null;\n if (ADMIN_ID.equals(u.getId())) {\n System.out.println(\"SECURED ADMIN nech sa paci\");\n User user = User.find.ref(u.getId());\n if (new Date().getTime() - user.lastUpdate > 1_700_000){\n System.out.println(\"--------------------update access token from SecuredAdmin\");\n try {\n user.updateAccessToken();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n ctx.session().put(\"accessToken\", user.accessToken);\n }else{\n System.out.println(\"Secured Admin A sakra POST sa nerobil ubehlo zatial: \" + (new Date().getTime() - user.lastUpdate));\n }\n return u.getId();\n }\n System.out.println(\"SECURED ADMIN vracia NULL pristup odoporeny\");\n return null;\n }",
"private ModelAndView returnToAdminLogin(HttpSession session) {\n ModelAndView mv = new ModelAndView(\"redirect:adminlogin.secu\");\n mv.addObject(\"msg\", \"Sorry try again\");\n session.setAttribute(\"login\", false);\n return mv;\n }",
"public void login(ActionEvent e) {\n boolean passwordCheck = jf_password.validate();\n boolean emailCheck = jf_email.validate();\n if (passwordCheck && emailCheck) {\n\n\n new LoginRequest(jf_email.getText(), jf_password.getText()) {\n @Override\n protected void success(JSONObject response) {\n Platform.runLater(fxMain::switchToDashboard);\n }\n\n @Override\n protected void fail(String error) {\n Alert alert = new Alert(Alert.AlertType.ERROR, error, ButtonType.OK);\n alert.showAndWait();\n }\n };\n\n\n }\n }",
"private void checkLogin(final String email, final String password) {\n\n pDialog.setMessage(\"Logging in...\");\n showDialog();\n\n mSocket.emit(CLIENT_LOGIN, email, password);\n }",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n String login = req.getParameter(\"login\");\n String password = req.getParameter(\"password\");\n if (logic.isExisting(login, password)) {\n HttpSession session = req.getSession();\n session.setAttribute(\"login\", login);\n if (logic.isAdmin(login)) {\n session.setAttribute(\"role\", \"admin\");\n }\n resp.sendRedirect(String.format(\"%s/\", req.getContextPath()));\n } else {\n req.setAttribute(\"error\", \"Credentional is invalid\");\n doGet(req, resp);\n }\n }",
"public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }",
"public void checkAdmin (){exxampe for findElement combinations:\n\t \t//driver.findElement(By.partialLinkText(\"Super Admin\")).findElement(By.xpath(\"parent::*\")).findElement(By.xpath(\"parent::*\")).findElement(By.xpath(\"td[1]/input\")).click();\n\t \t//\n\t \t\n\t \tdriver.findElement(By.xpath(\"//table[@class='table table-striped']/tbody/tr[*]/td[contains(text(), 'admin')]/../td[1]/input\")).click();\n\t \t \n\t \t\n\t }",
"public static boolean checkPassword()\n {\n String pw = SmartDashboard.getString(\"Password\");\n SmartDashboard.putString(\"Password\", \"\"); //Clear the password field so that it must be reentered\n\n if(pw.equals(ADMIN_PASSWORD))\n return true;\n else\n {\n log(\"Password invalid\"); //The user gave an incorrect password, inform them.\n return false;\n }\n }",
"public void logOutAdministrator() {\n logOutGeneral();\n }",
"@Override\n\tpublic AdminDTO login(AdminloginDTO login) {\n\t\treturn adao.login(login);\n\t}",
"@Override\n public Result onUnauthorized(Context ctx) {\n return redirect(routes.Admin.loginPage());\n }",
"private void validateLoginUser() {\n\t\tUser user = userDao.getByPin(et_password.getText().toString());\n\t\tSession.setDriver(user);\n\n\t\tif (user.getWorkStatus().equals(User.STATUS_INACTIVE)) {\n\n\t\t\tdoLogin();\n\t\t} else {\n\t\t\tString locAt = \"\";\n\t\t\tif (user.getWorkStatus().equals(User.STATUS_IN_VEHICLE)) {\n\t\t\t\tVehiclesDao dao = new VehiclesDao();\n\t\t\t\tlocAt = dao.getById(user.getCurrentVehicleId()).getName();\n\t\t\t} else {\n\t\t\t\tServiceLocationDao dao = new ServiceLocationDao();\n\t\t\t\tlocAt = dao.getById(user.getCurrentServiceLocationId()).getName();\n\t\t\t}\n\t\t\tString msg = \"You are currently marked as \" + user.getWorkStatus() + \" at \" + locAt + \" since \" + user.getWorkStatusDate()\n\t\t\t\t\t+ \"\\n\" + \"Do you want to continue and override this status?\";\n\t\t\tAlertDialog.Builder alert_box = new AlertDialog.Builder(this);\n\t\t\talert_box.setIcon(R.drawable.icon);\n\t\t\talert_box.setMessage(msg);\n\t\t\talert_box.setPositiveButton(\"YES\", new DialogInterface.OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdoPunchOut(et_password.getText().toString());\n\t\t\t\t\tdoLogin();\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\t\t\talert_box.setNeutralButton(\"NO\", new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\talert_box.show();\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tString pass = password.getText().toString();\n\t\t\t\tif (!adminPass.equalsIgnoreCase(pass)) {\n\t\t\t\t\ttoastMessage(\"You're not a ADMIN\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsetup();\n\t\t\t}",
"@Test(priority = 0)\n public void correctLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.loginContainer);\n }",
"@Override\n public void login(String nome, String email, int senha) {\n if (getNome() == nome && this.getEmail() == email && this.getSenha() == senha){\n System.out.println(\"Login efetuado com sucesso\");\n } else {\n System.out.println(\"0 - Sair\");\n System.out.println(\"Saiu do usuario\");\n }\n\n }",
"public abstract boolean showLogin();",
"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\tpublic void testadminLogout(){\n\t\tlic.logon(\"nadmin\", \"admin\", true);\n\t\tassertTrue(loc.adminLogout(\"nadmin\"));\n\t\tassertFalse(loc.adminLogout(\"oops\"));\n\t}",
"public void login(ActionEvent e) throws IOException {\r\n\t\t\r\n \tString username = loginuser.getText().trim();\r\n \t//if user is admin, change to userlist screen\r\n \tif (username.equals(\"admin\")) {\r\n \tPhotos.userlistscreen();\r\n \t} else {\r\n \t\tUser user = currentAdmin.findUser(username);\r\n \t\t//if user is found, log into that user and show the album view for that user specifically\r\n \t\tif (user!=null) {\r\n \t\t\tAlbumController.currentUser = (NonAdmin) user;\r\n \t\t\tCopyController.currentUser = (NonAdmin) user;\r\n \t\t\tMoveController.currentUser = (NonAdmin) user;\r\n \t\t\tPhotos.albumscreen(user);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\r\n \t\t\talert.setTitle(\"Error\");\r\n \t\t\talert.setHeaderText(\"Invalid username\");\r\n \t\t\talert.setContentText(\"Please try again\");\r\n \t\t\talert.showAndWait();\r\n \t\t\tloginuser.setText(\"\");\r\n \t\t}\r\n \t}\r\n\t}",
"@BeforeGroups(groups = \"SUPER_ADMIN\")\n protected void loginSuperAdmin() throws Exception {\n login(\"spravce@eos.cz\", \"spravce\");\n }",
"@Override\r\n\tpublic boolean updateApwd(Admin admin) {\n\t\tint i = adminDao.updatePwd(admin);\r\n\t\treturn i > 0?true:false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"private static void loginToAccount() {\n\n\t\tSystem.out.println(\"Please enter your userName : \");\n\t\tString userName=scan.nextLine();\n\n\t\tSystem.out.println(\"Please enter your Password : \");\n\t\tString password=scan.nextLine();\n\n\t\tif(userName.equals(userName)&& password.equals(password))\n\t\t\tSystem.out.println(\"Welcome to AnnyBank\");\n\n\t\ttransactions();\n\t}",
"public void loginSuccess(@Observes org.jboss.seam.security.events.LoggedInEvent event) {\n try {\n log.info(\"Login successfully for user : \" + event.getUser().getId());\n FacesContext context = FacesContext.getCurrentInstance();\n HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest();\n //Redirect to the home page\n if (identity.hasRole(\"admin\", \"crm\", \"GROUP\")\n || identity.hasRole(\"commercial\", \"crm\", \"GROUP\")) {\n context.getExternalContext().redirect(request.getContextPath() + \"/backoffice/home.jsf\");\n }else if(identity.hasRole(\"client\", \"crm\", \"GROUP\")){\n context.getExternalContext().redirect(request.getContextPath() + \"/frontoffice/home.jsf\");\n }\n //Sending welcome message\n messages.info(\"Bienvenue \"+event.getUser().getId());\n } catch (IOException ex) {\n log.error(ex.getMessage());\n }\n }",
"@Override\n public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n PrintWriter out = response.getWriter();\n HttpSession session = request.getSession();\n LoginBean lb = (LoginBean)form;\n admin_id = lb.getAdmin_id();\n pass = lb.getPass();\n fpass = lb.getFpass();\n boolean status=false;\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n Connection con=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/medical_nituk\",\"root\",\"9897089099\");\n try{\n if(fpass.equals(\"yes\")){\n String s_ques=\"\",s_ans=\"\";\n PreparedStatement psti = con.prepareStatement(\"select admin.sec_ques,admin.sec_ans from admin where admin.admin_id=?\");\n psti.setString(1, admin_id);\n ResultSet rsi=psti.executeQuery();\n if(rsi.first()){\n s_ques = rsi.getString(1);\n s_ans = rsi.getString(2);\n }\n request.setAttribute(\"ques\", s_ques);\n request.setAttribute(\"ans\", s_ans);\n request.setAttribute(\"admin_id\",admin_id);\n SUCCESS = \"forget\";\n }\n else{\n throw new Exception();\n }\n }catch(Exception e1){ \n PreparedStatement pst=con.prepareStatement(\"select * from admin where admin.admin_id=? and password=?\");\n pst.setString(1, admin_id);\n pst.setString(2, PasswordGenerator.generate(pass));\n ResultSet rs=pst.executeQuery();\n status=rs.next();\n\n if(status){\n session.setAttribute(\"admin_id\",admin_id);\n session.setAttribute(\"admin_name\",rs.getString(\"name\").toUpperCase());\n SUCCESS=\"success\"; \n }\n else{\n request.setAttribute(\"msgg\", \"Invalid Login\");\n SUCCESS=\"fail\";\n }\n }\n }\n catch(Exception e){\n\te.printStackTrace();\n\t}\n \n return mapping.findForward(SUCCESS);\n }",
"@Override\r\n public void logoutAdmin() throws Exception {\n \r\n }"
] | [
"0.8052373",
"0.7008123",
"0.69400495",
"0.68611735",
"0.6780575",
"0.67700875",
"0.6659536",
"0.65954685",
"0.65147924",
"0.641674",
"0.6361121",
"0.6321161",
"0.630699",
"0.62868524",
"0.62805116",
"0.62805116",
"0.6252684",
"0.6238185",
"0.6209148",
"0.62018335",
"0.6166315",
"0.61188406",
"0.61102194",
"0.6089829",
"0.60548913",
"0.6053477",
"0.6042464",
"0.6034352",
"0.5980398",
"0.5978669",
"0.5966755",
"0.5962828",
"0.5961376",
"0.59538984",
"0.5948913",
"0.5946622",
"0.5945829",
"0.59384507",
"0.5915289",
"0.59148264",
"0.58971626",
"0.58963925",
"0.5876035",
"0.5857978",
"0.585701",
"0.58417803",
"0.5810224",
"0.57824206",
"0.57754695",
"0.5773936",
"0.5772788",
"0.57542825",
"0.57495683",
"0.57375646",
"0.573738",
"0.57238466",
"0.57233536",
"0.5718243",
"0.5708927",
"0.57035106",
"0.5702018",
"0.5680746",
"0.5653499",
"0.56419975",
"0.5641396",
"0.56319773",
"0.5631393",
"0.5627585",
"0.5620196",
"0.56181383",
"0.5610348",
"0.5607346",
"0.5605786",
"0.55927587",
"0.5558661",
"0.5541635",
"0.5540638",
"0.5536852",
"0.5535035",
"0.5533077",
"0.55234015",
"0.55203575",
"0.5517543",
"0.55158436",
"0.5514947",
"0.5512326",
"0.5509056",
"0.55027145",
"0.54984164",
"0.5492193",
"0.54871166",
"0.5487092",
"0.5486328",
"0.5474992",
"0.54677474",
"0.54677474",
"0.5466686",
"0.54652244",
"0.5464498",
"0.5461451"
] | 0.5808041 | 47 |
Admin Edit account page | @RequestMapping(value = "/admin/admin_edit_account")
public String adminEdtitAccountPage(Model m, HttpSession session) {
AdminEditCommand adminEditCommand = new AdminEditCommand();
Admin a = (Admin) session.getAttribute("admin");
adminEditCommand.setA(a);
System.out.println("admin in edit account method :" + a);
m.addAttribute("AdminEditCommand", adminEditCommand);
return "admin/admin_edit_account";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }",
"public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}",
"@RequestMapping(value = \"/admin/update_admin__account\")\r\n public String adminUpdateAccountPage(@ModelAttribute(\"AdminEditCommand\") AdminEditCommand cmd, HttpSession session) {\r\n System.out.println(\"form data: \" + cmd.getA());\r\n \r\n Admin current_admin = (Admin) session.getAttribute(\"admin\");\r\n Admin a = cmd.getA();\r\n a.setId(current_admin.getId());\r\n a.setImage(\"default.png\");\r\n Admin admin = adminService.updateAdminDetails(a);\r\n System.out.println(\"new admin : \" + admin);\r\n if(admin != null ) {\r\n addAdminInSession(admin, session);\r\n return \"redirect:/admin/admin_profile?Account Updated\";\r\n } else {\r\n return \"redirect:/admin/admin_edit_account?Upload failed\";\r\n }\r\n\r\n \r\n }",
"public void editAccount() {\n try {\n editAccountEndpointLocal.editAccount(accountDTO);\n ResourceBundles.emitMessageWithFlash(null,\"page.edit.account.message\");\n } catch (AppOptimisticLockException ex) {\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, \"error.account.optimisticlock\");\n } catch (ExceededTransactionRetriesException ex) {\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, ex.getMessage());\n } catch (DatabaseQueryException ex) {\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, ex.getMessage());\n } catch (DatabaseConnectionException ex){\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, ex.getMessage());\n } catch (ValidationException e) {\n log.severe(e.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageByPlainText(null, e.getMessage());\n } catch (AppBaseException e) {\n log.severe(e.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, e.getMessage());\n }\n }",
"public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}",
"public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }",
"public void editTheirProfile() {\n\t\t\n\t}",
"@Override\n public void edit(User user) {\n }",
"@Action( value=\"editAdmin\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editAdmin() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ getNick()+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t \n }\n rol=\"ADMIN\";\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}",
"@RequestMapping(value = \"/editAccountPage\", method = RequestMethod.GET)\n\tpublic String jobseekerEditAccount(Model m, HttpServletRequest req) {\n\t\tHttpSession session = req.getSession();\n\t\tString username = (String) session.getAttribute(\"username\");\n\t\tSystem.out.println(\"session username = \" + username);\n\t\tString firstname = (String) session.getAttribute(\"firstname\");\n\t\tm.addAttribute(\"firstname\", firstname);\n\t\tm.addAttribute(\"state\", \"editAccount\");\n\t\tSystem.out.println(\"I'm jobseeker editAccount\");\n\t\treturn \"js.editAccount\";\n\t\t// return \"redirect:../home\";\n\t}",
"@RequestMapping (value = \"/edit\", method = RequestMethod.GET)\r\n public String edit (ModelMap model, Long id)\r\n {\r\n TenantAccount tenantAccount = tenantAccountService.find (id);\r\n Set<Role> roles =tenantAccount.getRoles ();\r\n model.put (\"tenantAccount\", tenantAccount);\r\n if (roles != null && roles.iterator ().hasNext ())\r\n {\r\n model.put (\"roleInfo\", roles.iterator ().next ());\r\n }\r\n return \"tenantAccount/edit\";\r\n }",
"public void editUser(User user) {\n\t\t\n\t}",
"public void editBalance() {\n\t\tAccount account = getAccountForEditBalance();\n\n\t\tif (adminDao.editBalance(account))\n\t\t\tSystem.out.println(\"Balance edited!\");\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}",
"@RequestMapping(\"edit\")\n\tpublic String edit(ModelMap model, HttpSession httpSession) {\n\t\tCustomer user = (Customer) httpSession.getAttribute(\"user\");\n\t\tmodel.addAttribute(\"user\", user);\n\t\treturn \"user/account/edit\";\n\t}",
"EditAccountPage openEditAccountPageByLoginID(String loginID) throws NoSuchElementException;",
"void updateAccount();",
"@RequestMapping(value = { \"/edit-{loginID}-user\" }, method = RequestMethod.GET)\r\n public String edituser(@PathVariable String loginID, ModelMap model) {\r\n\r\n User user = service.findUserByLoginID(loginID);\r\n model.addAttribute(\"user\", user);\r\n model.addAttribute(\"edit\", true);\r\n return \"registration\";\r\n }",
"private void editAccountType() throws Exception, EditUserException {\n String userChange = userIDInput.getText();\n String accountTypeInput = accountTypeValueEdit;\n try {\n Admin.editAccountType(userChange, accountTypeInput);\n String msg = \"Change user \" + userChange + \" to \" + accountTypeInput + \" success!\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset values\n userIDInput.setText(\"\");\n } catch (NullPointerException e) {\n String msg = \"Edit User Error: Empty values. Please try again.\";\n JOptionPane.showMessageDialog(null, msg);\n throw new NullPointerException(msg);\n } catch (SQLException e) {\n String msg = \"Edit User SQL Error: Could not add to database.\";\n JOptionPane.showMessageDialog(null, msg);\n throw new Exception(msg);\n } catch (EditUserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }",
"User editUser(User user);",
"public static void editProfile(String form, String ly) {\n\t\tboolean layout;\n\t\tif(ly == null || ly.equalsIgnoreCase(\"yes\"))\n\t\t\tlayout = true;\n\t\telse\n\t\t\tlayout = false;\n\t\t\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\t//set password into session\n\t\tsession.put(\"edit_password\", user.password);\n\t\t\n\t\tif(form == null)\n\t\t\tform = \"account\";\n\t\t\n\t\trender(user, userprofile, layout, form);\n\t}",
"public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}",
"private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }",
"void editUser(String uid, User newUser);",
"public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }",
"@RequestMapping(value = { \"/edit-user-{loginId}\" }, method = RequestMethod.GET)\n\tpublic String editUser(@PathVariable String loginId, ModelMap model) {\n\t\tUser user = userService.findByLoginId(loginId);\n\t\tmodel.addAttribute(\"user\", user);\n\t\tmodel.addAttribute(\"edit\", true);\n\t\treturn \"registration\";\n\t}",
"@RequestMapping(value = \"/jsEditAccounts\", method = RequestMethod.GET)\n\tpublic String jsEdit(Model m, @RequestParam(value = \"username\") String username, HttpServletRequest req) {\n\t\tSystem.out.println(\"Proceed to editAccountJobSeeker Page\");\n\t\tHttpSession session = req.getSession();\n\t\tsession.setAttribute(\"username\", username);\n\t\tm.addAttribute(\"state\", \"editAccount\");\n\t\tm.addAttribute(\"username\", username);\n\t\treturn \"js.home\";\n\t}",
"@FXML\n private void editSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"Edit DonorReceiver\");\n } else {\n EditPaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.EDIT);\n }\n }",
"@RequestMapping(value = \"/editAdminProfile\", method = RequestMethod.GET)\n\tpublic ModelAndView editAdminProfile(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser userProfile = endUserDAOImpl.findId(id);\n\n\t\tif (userProfile.getImageName() != null) {\n\t\t\tString type = ImageService.getImageType(userProfile.getImageName());\n\n\t\t\tString url = \"data:image/\" + type + \";base64,\" + Base64.encodeBase64String(userProfile.getImage());\n\t\t\tuserProfile.setImageName(url);\n\n\t\t\tendUserForm.setImageName(url);\n\t\t} else {\n\t\t\tendUserForm.setImageName(\"\");\n\t\t}\n\n\t\tendUserForm.setId(userProfile.getId());\n\t\tendUserForm.setDisplayName(userProfile.getDisplayName());\n\t\tendUserForm.setUserName(userProfile.getUserName());\n\t\tendUserForm.setAltContactNo(userProfile.getAltContactNo());\n\t\tendUserForm.setAltEmail(userProfile.getAltEmail());\n\t\tendUserForm.setContactNo(userProfile.getContactNo());\n\t\tendUserForm.setEmail(userProfile.getEmail());\n\n\t\tendUserForm.setPassword(userProfile.getPassword());\n\t\tendUserForm.setTransactionId(userProfile.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editAdminProfile\", \"model\", model);\n\n\t}",
"public EditAccount(java.awt.Frame parent, boolean modal, UserCredentials account) {\n super(parent, modal);\n \n this.account = account;\n \n initComponents();\n }",
"@RequestMapping(value = \"/editAdminPWD\", method = RequestMethod.GET)\n\tpublic ModelAndView editAdminPWD(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser userProfile = endUserDAOImpl.findId(id);\n\n\t\tendUserForm.setId(userProfile.getId());\n\n\t\tendUserForm.setTransactionId(userProfile.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editAdminPWD\", \"model\", model);\n\n\t}",
"@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}",
"void editAddressUser(String uid, Address address);",
"@PreAuthorize(\"hasRole('ROLE_USER')\")\r\n\tpublic void updateUserAccount(UserAccount account);",
"void gotoEditProfile();",
"protected void enterEditMode(){\n saveButton.setVisibility(View.VISIBLE);\n //when editMode is active, allow user to input in editTexts\n //By default have the editTexts not be editable by user\n editName.setEnabled(true);\n editEmail.setEnabled(true);\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n userReference = FirebaseDatabase.getInstance().getReference(\"Users\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid());\n\n user = FirebaseAuth.getInstance().getCurrentUser();\n\n user.updateEmail(String.valueOf(editEmail.getText()))\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n userReference.child(\"name\").setValue(editName.getText().toString());\n userReference.child(\"email\").setValue(editEmail.getText().toString());\n final String TAG = \"EmailUpdate\";\n Log.d(TAG, \"User email address updated.\");\n Toast.makeText(getActivity().getApplicationContext(), \"Saved\", Toast.LENGTH_SHORT).show();\n }\n else {\n FirebaseAuthException e = (FirebaseAuthException)task.getException();\n Toast.makeText(getActivity().getApplicationContext(), \"Re-login to edit your profile!\", Toast.LENGTH_LONG).show();\n goToLoginActivity();\n }\n }\n });\n exitEditMode();\n\n }\n });\n }",
"public void editUser(User selectedUser,String fullName, String loginName, String password) throws IOException {\n userManager.editUser(selectedUser,fullName,loginName,password);\n userManager.emptyLists();\n userManager.fillLists();\n AdminMainViewController.emptyStaticLists();\n AdminMainViewController.adminsObservableList.addAll(userManager.getAdminsList());\n AdminMainViewController.usersObservableList.addAll(userManager.getUsersList());\n }",
"public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }",
"private void edit() {\n\n\t}",
"private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }",
"public static void ShowAdminPreferences() {\n if (Controller.permission.GetUserPermission(\"EditUser\")) {\n ToggleVisibility(UsersPage.adminWindow);\n } else {\n DialogWindow.NoAccessTo(\"Admin options\");\n }\n }",
"public UpdateAccountInfoUI() {\n initComponents();\n userNameLabel.setText(Authentication.online_user.getUserName());\n usernamePlaceholder.setText(Authentication.online_user.getUserName());\n emailPlaceholder.setText(Authentication.online_user.getEmail());\n passwordPLaceholder.setText(Authentication.online_user.getPassword());\n \n }",
"UserEditForm getEditForm(User user);",
"public abstract void edit();",
"private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }",
"@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }",
"public void saveProfileEditData() {\r\n\r\n }",
"@RequestMapping(\"/editUsr\")\r\n\tpublic ModelAndView editUsr(@ModelAttribute(\"UserEditForm\") final UserEditForm form) {\r\n\t\tModelAndView mav = new ModelAndView(\"users/edit\");\r\n\t\t// GET ACTUAL SESSION USER\r\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n\t\tUser user = us.findUserSessionByUsername(principal);\r\n\t\tmav.addObject(\"user\", user);\r\n\t\treturn mav;\r\n\t}",
"@RequestMapping(value = \"/backoffice/accounts\")\n\tpublic String listAccountsAdmin(Model model) {\n\n\t\tmodel.addAttribute(\"listeAdmin\", adminDao.chercherTout());\n\t\tmodel.addAttribute(\"listeCandidat\", candidatDao.chercherTout());\n\n\t\treturn \"backoffice/accounts\";\n\t}",
"public void Admin_Configuration_EmailSubscriptions_Editbtn()\n\t{\n\t\tAdmin_Configuration_EmailSubscriptions_Editbtn.click();\n\t}",
"@RequestMapping(value = \"/{id}/edit\", method = RequestMethod.GET)\n public String editRole(@PathVariable Long id, Model model) {\n model.addAttribute(\"roleEdit\", roleFacade.getRoleById(id));\n return (WebUrls.URL_ROLE+\"/edit\");\n }",
"public void editButtonClicked(){\n String first = this.firstNameInputField.getText();\n String last = this.lastNameInputField.getText();\n String email = this.emailInputField.getText();\n String dep = \"\";\n String role=\"\";\n if(this.departmentDropdown.getSelectionModel().getSelectedItem() == null){\n dep= this.departmentDropdown.promptTextProperty().get();\n //this means that the user did not change the dropdown\n \n }else{\n dep = this.departmentDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.roleDropdown.getSelectionModel().getSelectedItem()== null){\n role = this.roleDropdown.promptTextProperty().get();\n }else{\n role = this.roleDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.isDefaultValue(first) && \n this.isDefaultValue(last) && \n this.isDefaultValue(email) && \n this.isDefaultValue(role) && \n this.isDefaultValue(dep)){\n //this is where we alert the user that no need for update is needed\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setContentText(\"User information has not changed...no update performed\");\n alert.showAndWait();\n \n }else{\n \n if(this.userNameLabel.getText().equals(\"User\")){\n System.out.println(\"This is empty\");\n }else{\n //create a new instance of the connection class\n this.dbConnection = new Connectivity();\n //this is where we do database operations\n if(this.dbConnection.ConnectDB()){\n //we connected to the database \n \n boolean update= this.dbConnection.updateUser(first, last, email, dep,role , this.userNameLabel.getText());\n \n \n }else{\n System.out.println(\"Could not connect to the database\");\n }\n \n }\n }\n }",
"@Override\n\tpublic void updateAccount(String pwd, String field, String company) {\n\t}",
"public void editCommissionAccounts(CommissionAccount commissionAccount);",
"public User editProfile(String firstName, String lastName, String username, String password, char type, char status)\n {\n return this.userCtrl.editProfile(username, password, firstName, lastName, type, status);\n }",
"public String editEmploye(Employee emp){\n System.out.println(\"******* Edit employe ************\");\n System.out.println(emp.toString());\n employeeService.editEmployee(emp);\n sessionController.logInEmp();\n\n return \"/pages/childCareCenterDashboard.xhtml?faces-redirect=true\";\n }",
"void accountSet(boolean admin, String username, String password, String fName, String lName, int accountId);",
"public String update() {\r\n\t\tuserService.update(userEdit);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"update\";\r\n\t}",
"@Override\n\tpublic String editUser(Map<String, Object> reqs) {\n\t\treturn null;\n\t}",
"public String edit() {\n return \"edit\";\n }",
"public void editUser()\r\n\t{\r\n\t\tsc.nextLine();\r\n\t\tint index=loginattempt();\r\n\t\tif(index==-1)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString password=\"\",repassword=\"\";\r\n\t\t\tboolean flag=false;\r\n\t\t\twhile(!flag)\r\n\t\t\t{\r\n\t\t\t\tboolean validpassword=false;\r\n\t\t\t\twhile(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Please enter your new password: \");\r\n\t\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\t\tif(!validpassword)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"Please re-enter your new password: \");\r\n\t\t\t\trepassword=sc.nextLine();\r\n\t\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\t\tif(!flag)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString hash_password=hashfunction(password); \r\n\t\t\tSystem.out.print(\"Please enter your new full name: \");\r\n\t\t\tString fullname=sc.nextLine();\r\n\t\t\tSystem.out.print(\"Please enter your new email address: \");\r\n\t\t\tString email=sc.nextLine();\r\n\t\t\t((User)user_records.get(index)).set_hash_password(hash_password);\r\n\t\t\t((User)user_records.get(index)).set_fullname(fullname);\r\n\t\t\t((User)user_records.get(index)).set_email(email);\r\n\t\t\tSystem.out.println(\"Record update successfully!\");\r\n\t\t}\r\n\t}",
"private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }",
"@Action( value=\"editUser\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editUser() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ (String) contexto.getSession().get(\"loginId\")+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t rol=result1.getString(\"tipo\");\n }\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}",
"@GetMapping(\"/edit\")\r\n public String editView() {\r\n return \"modify\";\r\n }",
"@GetMapping(\"/updateUser/{id}\")\n\t public String editUser(@PathVariable(\"id\") Long userId, Model model) {\n\t\t model.addAttribute(\"userId\", userId);\n\t\t return \"updatePage.jsp\";\n\t }",
"@Override\r\n\tpublic void showAccount() {\n\t\t\r\n\t}",
"protected void submitEdit(ActionEvent e) {\n\t\tString oldPassword = oldPasswordTextField.getText().toString();\r\n\t\tString newPassword = newPasswordTextField.getText().toString();\r\n\t\tString confirmPassword = confirmPasswordTextField.getText().toString();\r\n\t\tif(com.car.util.StringUtil.isEmpty(oldPassword)){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"请填写旧密码!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(com.car.util.StringUtil.isEmpty(newPassword)){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"请填写新密码!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(com.car.util.StringUtil.isEmpty(confirmPassword)){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"请确认新密码!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(!newPassword.equals(confirmPassword)){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"两次密码输入不一致!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(\"系统管理员\".equals(MaimFrame.userType.getName())) {\r\n\t\t\tAdminDao adminDao = new AdminDao();\r\n\t\t\tAdmin adminTmp = new Admin();\r\n\t\t\tAdmin admin = (Admin)MaimFrame.userObject;\r\n\t\t\tadminTmp.setName(admin.getName());\r\n\t\t\tadminTmp.setId(admin.getId());\r\n\t\t\tadminTmp.setPassword(oldPassword);\r\n\t\t\tJOptionPane.showMessageDialog(this, adminDao.editPassword(adminTmp, newPassword));\r\n\t\t\tadminDao.closeDao();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(\"客户\".equals(MaimFrame.userType.getName())){\r\n\t\t\tCustomerDao customerDao = new CustomerDao();\r\n\t\t\tCustomer customerTmp = new Customer();\r\n\t\t\tCustomer customer = (Customer)MaimFrame.userObject;\r\n\t\t\tcustomerTmp.setName(customer.getName());\r\n\t\t\tcustomerTmp.setPassword(oldPassword);\r\n\t\t\tcustomerTmp.setId(customer.getId());\r\n\t\t\tJOptionPane.showMessageDialog(this, customerDao.editPassword(customerTmp, newPassword));\r\n\t\t\tcustomerDao.closeDao();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(\"员工\".equals(MaimFrame.userType.getName())){\r\n\t\t\tEmployeeDao employeeDao = new EmployeeDao();\r\n\t\t\tEmployee employeeTmp = new Employee();\r\n\t\t\tEmployee employee = (Employee)MaimFrame.userObject;\r\n\t\t\temployeeTmp.setName(employee.getName());\r\n\t\t\temployeeTmp.setPassword(oldPassword);\r\n\t\t\temployeeTmp.setId(employee.getId());\r\n\t\t\tJOptionPane.showMessageDialog(this, employeeDao.editPassword(employeeTmp, newPassword));\r\n\t\t\temployeeDao.closeDao();\r\n\t\t\treturn;\r\n\t\t}\r\n\t}",
"public void editUser(User tmpUser, User user) {\n\t\t\n\t}",
"@RequestMapping(\"/admin/profile\")\n\tpublic ModelAndView adminprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.setViewName(\"profile/adminprofile.jsp\");\n\t\treturn mav;\n\t}",
"@Override\r\n\tpublic void edit(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tthis.URL1=\"../admin/xiaoshuolist.jsp\";\r\n\t\tthis.URL2=\"../novel/one.do\";\r\n\t\tthis.msg1=\"修改成功!\";\r\n\t\tthis.msg2=\"修改失败!\";\r\n\t\tsuper.edit(request, response);\r\n\t}",
"public void setEditUser(User editUser)\r\n/* */ {\r\n/* 179 */ this.editUser = editUser;\r\n/* */ }",
"@RequestMapping(value = \"/edituserdetails/{id}\", method = RequestMethod.GET)\n\n\tpublic ModelAndView editUserDetails(HttpServletRequest request, HttpSession session, @PathVariable int id,\n\t\t\t@ModelAttribute(\"edituser\") UserBean edituser, Model model) {\n\n\t\tString adminId = (String) request.getSession().getAttribute(\"adminId\");\n\t\tif (adminId != null) {\n\t\t\tUserBean user = userdao.getUserById(id);\n\t\t\tmodel.addAttribute(\"user\", user);\n\n\t\t\treturn new ModelAndView(\"editUserDetailsForm\");\n\t\t}\n\n\t\telse\n\t\t\treturn new ModelAndView(\"redirect:/Login\");\n\t}",
"@Override\n\tpublic void edit(HttpServletRequest request,HttpServletResponse response) {\n\t\tint id=Integer.parseInt(request.getParameter(\"id\"));\n\t\tQuestionVo qv=new QuestionVo().getInstance(id);\n\t\tcd.edit(qv);\n\t\ttry{\n\t\t\tresponse.sendRedirect(\"Admin/question.jsp\");\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t}",
"int edit(final PaymentAccountScope scope);",
"public int getEditAuthUserType() {\n return editAuthUserType;\n }",
"public void editProfile(String username, String fname, String lname, String email, String phoneno, String newpw) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\"); \n\t callStmt = con.prepareCall(\" {call team5.customer_updateProfile_Proc(?,?,?,?,?,?,?,?,?)}\");\n\t callStmt.setString(1,phoneno);\n\t callStmt.setString(2,email);\n\t callStmt.setString(3,fname);\n\t callStmt.setString(4,lname);\n\t callStmt.setString(5,\"Y\");\n\t callStmt.setString(6,\"Y\");\n\t callStmt.setString(7,username);\n\t callStmt.setString(8,newpw);\n\t callStmt.setInt(9,this.id);\n\t callStmt.execute();\n\t \n\t callStmt.close();\n\t }",
"void gotoEditProfile(String fbId);",
"@Override\n\tpublic Usuario edit(Usuario obj) {\n\t\treturn null;\n\t}",
"public String editarRutina(Rutina tp) {\n\t\t//newRutina = ts;\n\t\tvEditing = true;\n\t\tvTitulo = \"EDITAR\";\n\t\treturn \"nueva-rutina?faces-redirect=true&id=\"+tp.getIdRutina();\n\t}",
"@Execute(validator = true, input = \"error.jsp\", urlPattern = \"editpage/{crudMode}/{id}\")\n /* CRUD COMMENT: END */\n /* CRUD: BEGIN\n @Execute(validator = true, input = \"error.jsp\", urlPattern = \"editpage/{crudMode}/{${table.primaryKeyPath}}\")\n CRUD: END */\n public String editpage() {\n if (crudTableForm.crudMode != CommonConstants.EDIT_MODE) {\n throw new ActionMessagesException(\"errors.crud_invalid_mode\",\n new Object[] { CommonConstants.EDIT_MODE,\n crudTableForm.crudMode });\n }\n \n loadCrudTable();\n \n return \"edit.jsp\";\n }",
"public String edit(Entidades entidade) {\n\t\tif(verificaPermissao()) {\n\t\t\tEntidadesDAO.saveOrUpdate(entidade);\n\t\t\tthis.entidades = new Entidades();\n\t\t}\n\t\treturn \"/Consulta/consulta_entidades\";\n\t}",
"void updateAccount(Account account);",
"@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}",
"@RequestMapping(value = \"/changepassword/{id}\", method = RequestMethod.GET)\n\n\tpublic ModelAndView changePassword(HttpServletRequest request, HttpSession session, @PathVariable int id,\n\t\t\t@ModelAttribute(\"edituser\") UserBean edituser, Model model) {\n\t\tString adminId = (String) request.getSession().getAttribute(\"adminId\");\n\t\tif (adminId != null) {\n\t\t\tUserBean user = userdao.getUserById(id);\n\t\t\tmodel.addAttribute(\"user\", user);\n\n\t\t\treturn new ModelAndView(\"changePasswordView\");\n\t\t} else\n\t\t\treturn new ModelAndView(\"redirect:Login\");\n\t}",
"@Override\n\tpublic void editAction(int id) {\n\t\t\n\t}",
"@RequestMapping(method = RequestMethod.PUT, value = \"/branch/{branchCode}/accounts\")\n public void editAccount(@RequestBody Account account, @PathVariable int branchCode){\n accountService.updateAccount(account, branchCode);\n }",
"public void editUser(UserBean ub) throws DBException {\n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tconn = factory.getConnection();\n\t\t\tps = conn\n\t\t\t\t\t.prepareStatement(\"UPDATE `webdesigner`.`users` SET `id` = ?,`username` = '?,`email` = ?,`password` = ?,`firstname` = ?,`lastname` = ?' WHERE `users`.`id` =?;\");\n\t\t\tuserLoader.loadParameters(ps, ub);\n\t\t\tint parameterCount = ps.getParameterMetaData().getParameterCount();\n\t\t\tps.setLong(parameterCount, ub.getId());\n\t\t\tps.executeUpdate();\n\t\t} catch (SQLException | NamingException e) {\n\n\t\t\tthrow new DBException(e);\n\t\t} finally {\n\t\t\tDBUtil.closeConnection(conn, ps);\n\t\t}\n\t}",
"int updateAccountInfo(Account account);",
"@RequestMapping(value = { \"/edit-module-{code}\" }, method = RequestMethod.GET)\n\t\tpublic String editModule(@PathVariable String code, ModelMap model) {\n\n\t\t\tmodel.addAttribute(\"students\", studentService.listAllStudents());\n\t\t\tmodel.addAttribute(\"teachers\", teacherService.listAllTeachers());\n\t\t\tModule module = moduleService.findByCode(code);\n\t\t\tmodel.addAttribute(\"module\", module);\n\t\t\tmodel.addAttribute(\"edit\", true);\n\t\t\t\n\t\t\treturn \"addStudentToModule\";\n\t\t}",
"public Account getAccountForEditBalance() {\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(\"Account: \" + account.getAccountNumber() + \" Balance: \" + account.getBalance());\n\n\t\tdouble balance = Inputs.getUserDoubleInput(\"Enter new balance:\");\n\t\taccount.setBalance(balance);\n\t\treturn account;\n\t}",
"@RequestMapping(value=\"/admin\" , method= RequestMethod.GET)\n\tpublic String adminPage(ModelMap model) { \n\t\t\n\t\tmodel.addAttribute(\"user\",getUserData());\n\t\treturn\"admin\";\n\t}",
"public static void ulogujSeKaoAdmin() {\r\n\t\tprikazIProveraSifre(-2, 'a');\r\n\t}",
"@RequestMapping(value = \"/editUser\", method = RequestMethod.GET)\n\tpublic ModelAndView editUser(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser endUser = endUserDAOImpl.findId(id);\n\n\t\tendUserForm.setId(endUser.getId());\n\t\tendUserForm.setBankId(endUser.getBankId());\n\t\tendUserForm.setRole(endUser.getRole());\n\t\tendUserForm.setContactNo(endUser.getContactNo());\n\t\tendUserForm.setEmail(endUser.getEmail());\n\t\tendUserForm.setDisplayName(endUser.getDisplayName());\n\t\t;\n\t\tendUserForm.setUserName(endUser.getUserName());\n\t\tendUserForm.setTransactionId(endUser.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editUser\", \"model\", model);\n\n\t}",
"public static void retrocedi_admin(int id) {\r\n\t\ttry {\r\n\t\tDatabase.connect();\r\n\t\tDatabase.updateRecord(\"utente\", \"utente.ruolo=2\", \"utente.id=\"+id); \t\t\r\n\t\tDatabase.close();\r\n\t\t}catch(NamingException e) {\r\n \t\tSystem.out.println(e);\r\n }catch (SQLException e) {\r\n \tSystem.out.println(e);\r\n }catch (Exception e) {\r\n \tSystem.out.println(e); \r\n }\r\n\t}",
"void EditWorkerProfileUser(String uid, boolean isWorker, List<Skill> skills);",
"private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }",
"@Override\n\tpublic void editUser(ERSUser user) {\n\t\tuserDao.updateUser(user);\n\t}",
"public User editUser(User user) {\n\t\treturn null;\r\n\t}",
"void userChangeByAdmin(AdminUserDTO adminUserDTO) throws RecordExistException;",
"@Override\n\tpublic void edit(User user){\n\t\tuserRepo.save(user);\n\t}",
"@RequestMapping(value=\"/settings/account\", method=RequestMethod.GET)\n\tpublic String showForm(Model model, HttpServletRequest request, HttpServletResponse response) {\n\t\tString users_id = SessionHandler.sessionExists(request, response);\n\t\tif (users_id == null)\n\t\t\treturn \"login\";\n\t\t\n\t\tUserModel user = UserModel.selectUser(users_id);\t\t\n\t\tmodel.addAllAttributes(user.getUser());\t\t\n\t\treturn \"settingsaccount\";\n\t\t\n\t}"
] | [
"0.7366031",
"0.7284476",
"0.7258471",
"0.70941466",
"0.6898081",
"0.6825",
"0.6784004",
"0.6783607",
"0.66596115",
"0.6657883",
"0.6622889",
"0.65877485",
"0.6563285",
"0.65374535",
"0.6511079",
"0.64894927",
"0.64833224",
"0.6434093",
"0.64036465",
"0.6392816",
"0.63903517",
"0.63681597",
"0.6359492",
"0.63387376",
"0.6322929",
"0.62986386",
"0.6276665",
"0.6238535",
"0.62288606",
"0.6211628",
"0.62103075",
"0.6181747",
"0.61654484",
"0.6161882",
"0.61563885",
"0.61526155",
"0.6143629",
"0.609422",
"0.6090996",
"0.6081643",
"0.6061685",
"0.6058602",
"0.6053661",
"0.6042365",
"0.6041265",
"0.603487",
"0.60327023",
"0.6018976",
"0.59954226",
"0.5987565",
"0.5982038",
"0.59691775",
"0.59627855",
"0.5961765",
"0.59590083",
"0.59414047",
"0.59409976",
"0.59372336",
"0.59129167",
"0.5907115",
"0.58869743",
"0.5886364",
"0.58808076",
"0.5876545",
"0.5875924",
"0.58745885",
"0.5868528",
"0.5868414",
"0.5859844",
"0.58509713",
"0.5825611",
"0.58148694",
"0.57999367",
"0.5798343",
"0.57925206",
"0.5789794",
"0.5777969",
"0.57775486",
"0.57767814",
"0.57766885",
"0.5775771",
"0.5775676",
"0.57590884",
"0.5753538",
"0.5747067",
"0.5739631",
"0.5726383",
"0.5720654",
"0.57191545",
"0.571551",
"0.5710832",
"0.5710639",
"0.5708752",
"0.57082415",
"0.57049376",
"0.5704078",
"0.5692021",
"0.56859803",
"0.56746936",
"0.56746083"
] | 0.6775564 | 8 |
after edit admin account Update Admiit | @RequestMapping(value = "/admin/update_admin__account")
public String adminUpdateAccountPage(@ModelAttribute("AdminEditCommand") AdminEditCommand cmd, HttpSession session) {
System.out.println("form data: " + cmd.getA());
Admin current_admin = (Admin) session.getAttribute("admin");
Admin a = cmd.getA();
a.setId(current_admin.getId());
a.setImage("default.png");
Admin admin = adminService.updateAdminDetails(a);
System.out.println("new admin : " + admin);
if(admin != null ) {
addAdminInSession(admin, session);
return "redirect:/admin/admin_profile?Account Updated";
} else {
return "redirect:/admin/admin_edit_account?Upload failed";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateAccount();",
"Account.Update update();",
"@Override\npublic void update(Account account) {\n\taccountdao.update(account);\n}",
"void updateAccount(Account account);",
"@Override\n\tpublic void updateAccount(String pwd, String field, String company) {\n\t}",
"public void testUpdateAccount(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tacc.setDatetime(CommUtil.getNowDate()) ;\n\t\tint r = this.bean.updateAccount(acc) ;\n\t\tAssert.assertEquals(r, 1) ;\n\t}",
"int updateAccountInfo(Account account);",
"public void update(Account account) {\n\t\t\n\t}",
"void editAdvert(String aid, Advert advert);",
"private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }",
"public void editTheirProfile() {\n\t\t\n\t}",
"public void updateAds() {\n }",
"public void handleUpdate(){\n increaseDecrease(\"i\");\n action=\"update\";\n buttonSave.setVisible(true);\n admission.setEditable(false);\n\n }",
"public void editAccount() {\n try {\n editAccountEndpointLocal.editAccount(accountDTO);\n ResourceBundles.emitMessageWithFlash(null,\"page.edit.account.message\");\n } catch (AppOptimisticLockException ex) {\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, \"error.account.optimisticlock\");\n } catch (ExceededTransactionRetriesException ex) {\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, ex.getMessage());\n } catch (DatabaseQueryException ex) {\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, ex.getMessage());\n } catch (DatabaseConnectionException ex){\n log.severe(ex.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, ex.getMessage());\n } catch (ValidationException e) {\n log.severe(e.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageByPlainText(null, e.getMessage());\n } catch (AppBaseException e) {\n log.severe(e.getMessage() + \", \" + LocalDateTime.now());\n ResourceBundles.emitErrorMessageWithFlash(null, e.getMessage());\n }\n }",
"public ApAccountRec updateApAccount(ApAccountRec acntRec,String view){\n \n if(!trans.isActive()){\n trans.begin();\n }\n ApAccount acnt = this.buildApAccount(acntRec, view);\n if(acntRec.getId() == null){\n acntRec.setId(acnt.getId());\n }\n LOGGER.log(INFO, \"ApAccountDM.updateApAccount returns id {0}\", acntRec.getId());\n trans.commit();\n return acntRec;\n}",
"private void updateAccountStatus() {\n\r\n }",
"private void handleAccountUpdateOnPre() {\n }",
"private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }",
"public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}",
"public void ModPwd(Administrator ad){\n\t\t//修改密码\n\t\tAdministratorManage admin=new AdministratorManage();\n\t\tScanner input=new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter your new password.\");\n\t\tString pwd=input.next();\n\t\tadmin.setPwd(ad, pwd);\n\t\tSystem.out.println(\"Modify new password succeed.\");\n\t\tMenu(ad);\n\t}",
"public void editBalance() {\n\t\tAccount account = getAccountForEditBalance();\n\n\t\tif (adminDao.editBalance(account))\n\t\t\tSystem.out.println(\"Balance edited!\");\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}",
"private void updateUserAccount() {\n final UserDetails details = new UserDetails(HomeActivity.this);\n //Get Stored User Account\n final Account user_account = details.getUserAccount();\n //Read Updates from Firebase\n final Database database = new Database(HomeActivity.this);\n DatabaseReference user_ref = database.getUserReference().child(user_account.getUser().getUser_id());\n user_ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //Read Account Balance\n String account_balance = dataSnapshot.child(Database.USER_ACC_BALANCE).getValue().toString();\n //Read Expire date\n String expire_date = dataSnapshot.child(Database.USER_ACC_SUB_EXP_DATE).getValue().toString();\n //Read Bundle Type\n String bundle_type = dataSnapshot.child(Database.USER_BUNDLE_TYPE).getValue().toString();\n //Attach new Values to the Account Object\n user_account.setBalance(Double.parseDouble(account_balance));\n //Attach Expire date\n user_account.setExpire_date(expire_date);\n //Attach Bundle Type\n user_account.setBundle_type(bundle_type);\n //Update Local User Account\n details.updateUserAccount(user_account);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n //No Implementation\n }\n });\n }",
"boolean adminUpdate(int userId, int statusId, int reimbId);",
"Account refresh();",
"public boolean updateAcct(String id, Account updAcc){\n if(id.startsWith(\"9\")){\n proList.put(id, (AccntPro) updAcc);\n System.out.println(\"#\"+id+\" a été mis à jour dans la liste des professionnels.\");\n\n } else {\n memberList.put(id, (AccntMember) updAcc);\n System.out.println(\"#\"+id+\" a été mis à jour dans la liste des membres.\");\n }\n return true;\n }",
"public Account update(Account user);",
"protected void edit(HttpServletRequest request, HttpServletResponse response, EcAnonymousPaymentInfoForm _EcAnonymousPaymentInfoForm, EcAnonymousPaymentInfo _EcAnonymousPaymentInfo) throws Exception{\n\r\n _EcAnonymousPaymentInfo.setAnonymousUserId(WebParamUtil.getLongValue(_EcAnonymousPaymentInfoForm.getAnonymousUserId()));\r\n _EcAnonymousPaymentInfo.setFirstName(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getFirstName()));\r\n _EcAnonymousPaymentInfo.setMiddleInitial(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getMiddleInitial()));\r\n _EcAnonymousPaymentInfo.setLastName(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getLastName()));\r\n _EcAnonymousPaymentInfo.setAddress1(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getAddress1()));\r\n _EcAnonymousPaymentInfo.setAddress2(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getAddress2()));\r\n _EcAnonymousPaymentInfo.setCity(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getCity()));\r\n _EcAnonymousPaymentInfo.setState(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getState()));\r\n _EcAnonymousPaymentInfo.setZip(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getZip()));\r\n _EcAnonymousPaymentInfo.setCountry(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getCountry()));\r\n _EcAnonymousPaymentInfo.setPaymentType(WebParamUtil.getIntValue(_EcAnonymousPaymentInfoForm.getPaymentType()));\r\n _EcAnonymousPaymentInfo.setPaymentNum(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getPaymentNum()));\r\n _EcAnonymousPaymentInfo.setPaymentExpireMonth(WebParamUtil.getIntValue(_EcAnonymousPaymentInfoForm.getPaymentExpireMonth()));\r\n _EcAnonymousPaymentInfo.setPaymentExpireYear(WebParamUtil.getIntValue(_EcAnonymousPaymentInfoForm.getPaymentExpireYear()));\r\n _EcAnonymousPaymentInfo.setPaymentExtraNum(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getPaymentExtraNum()));\r\n _EcAnonymousPaymentInfo.setTimeCreated(WebParamUtil.getDateValue(_EcAnonymousPaymentInfoForm.getTimeCreated()));\r\n\r\n m_actionExtent.beforeUpdate(request, response, _EcAnonymousPaymentInfo);\r\n m_ds.update(_EcAnonymousPaymentInfo);\r\n m_actionExtent.afterUpdate(request, response, _EcAnonymousPaymentInfo);\r\n }",
"@PreAuthorize(\"hasRole('ROLE_USER')\")\r\n\tpublic void updateUserAccount(UserAccount account);",
"public void editCommissionAccounts(CommissionAccount commissionAccount);",
"@RequestMapping(value = \"/admin/admin_edit_account\")\r\n public String adminEdtitAccountPage(Model m, HttpSession session) {\r\n \r\n AdminEditCommand adminEditCommand = new AdminEditCommand();\r\n Admin a = (Admin) session.getAttribute(\"admin\");\r\n adminEditCommand.setA(a);\r\n System.out.println(\"admin in edit account method :\" + a);\r\n m.addAttribute(\"AdminEditCommand\", adminEditCommand);\r\n return \"admin/admin_edit_account\";\r\n\r\n }",
"@Override\r\n\tpublic boolean updateAdminInfo(Admin admin) {\n\t\tint i = adminDao.updateAdminInfo(admin);\r\n\t\treturn i > 0?true:false;\r\n\t}",
"public void updateAccountInfo(ModifAccount account, String oldCI){\n // modifica el nombre de usuario\n updateUserName(account.getNombreUsuario(), oldCI);\n\n // modifica la informacion\n jdbcTemplate.update(\n \"UPDATE Usuario SET usuarioNombre=?, usuarioApellido=?, paisID=?, ciudadID=?, direccion=?, correo=?, telefono=? WHERE CI=?\",\n account.getUsuarioNombre(), account.getUsuarioApellido(), account.getPaisID(), account.getCiudadID(), account.getDireccion(), account.getCorreo(), account.getTelefono(), oldCI\n );\n\n //modifica el CI\n updateCI(account.getCI(), oldCI); \n }",
"private void modifyAccount(HttpServletRequest p_request,\n HttpSession p_session)\n throws EnvoyServletException\n {\n TaskHelper.saveBasicInformation(p_session, p_request);\n\n TaskHelper.modifyUserAccount(p_session);\n String uiLocaleString = p_request.getParameter(USER_UI_LOCALE);\n\n Locale uiLocale = PageHandler.getUILocale(uiLocaleString);\n // only use ui locale from the cookie\n // Error: p_request.getParameter(USER_UI_LOCALE) is always en_US\n // It is hardcode in accountInfo.jsp\n // p_session.setAttribute(UILOCALE, uiLocale);\n\n // If the calendar was modified too, save it.\n SessionManager sessionMgr =\n (SessionManager)p_session.getAttribute(SESSION_MANAGER);\n UserFluxCalendar cal = (UserFluxCalendar)\n sessionMgr.getAttribute(CalendarConstants.CALENDAR);\n if (cal != null)\n {\n CalendarHelper.modifyUserCalendar(p_session, cal);\n }\n\n // If account options were modified, save those too\n HashMap optionsHash = (HashMap) sessionMgr.getAttribute(\"optionsHash\");\n if (optionsHash != null)\n {\n AccountOptionsHelper.modifyOptions(p_session, p_request, optionsHash);\n }\n }",
"@Override\r\n\tpublic void update(Account account) throws ServiceException {\n\r\n\t}",
"private void updateBalance(){\n Intent toUpdateBal = new Intent(this, UpdateAccount.class);\n startActivity(toUpdateBal);\n }",
"public void saveProfileEditData() {\r\n\r\n }",
"public void update() throws NotFoundException {\n\tUserDA.update(this);\n }",
"@Override\n public int update(J34SiscomexMercadoriaAdi j34SiscomexMercadoriaAdi) {\n return super.doUpdate(j34SiscomexMercadoriaAdi);\n }",
"public void updateforwadentry(String amit, String id) {\n\t\tContentValues up=new ContentValues();\n\t \n\t up.put(Sales_Amt, amit);\n\t \n\t\tourDatabase.update(DATABASE_TABLE5, up, Sales_Id+\" = \"+id, null);\n\t\t\t\n\t\t\n\t}",
"public String update() {\r\n\t\tuserService.update(userEdit);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"update\";\r\n\t}",
"public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }",
"int updateByPrimaryKey(AdminTab record);",
"@Override\r\n\tpublic boolean updateApwd(Admin admin) {\n\t\tint i = adminDao.updatePwd(admin);\r\n\t\treturn i > 0?true:false;\r\n\t}",
"public void actualizarActividad (Actividad act) {\r\n String query = \"UPDATE actividad SET identificacion_navegate = \\\"\" + act.getIdentificacionNavegante() \r\n + \"\\\", numero_matricula = \\\"\" + act.getNumeroMatricula() \r\n + \"\\\", fecha = \\\"\" + act.getFecha() \r\n + \"\\\", hora = \\\"\" + act.getHora() \r\n + \"\\\", destino = \\\"\" + act.getDestino() \r\n + \"\\\" WHERE id_salida = \\\"\" + act.getIdentificacionSalida() + \"\\\"\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad actualizada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }",
"@Override\r\n\tpublic boolean updateUser(AccountDTO account) {\n\t\taccountDao.update(account);\r\n\t\treturn true;\r\n\t}",
"void userChangeByAdmin(AdminUserDTO adminUserDTO) throws RecordExistException;",
"@Override\r\n\tpublic void adminSelectUpdate() {\n\t\t\r\n\t}",
"void accountSet(boolean admin, String username, String password, String fName, String lName, int accountId);",
"@Override//修改信息\r\n\tpublic void AdminUpdata(String oldpassword, Admin admin) {\n\t\tString AdminUpdatasql = \"update Admin set Password=? where id=? and Password=?\" ;\r\n\t\ttry {\r\n\t\t\tPreparedStatement pStatement=this.connection.prepareStatement(AdminUpdatasql);\r\n\t\t\tpStatement.setString(1, admin.getAdminpassword());\r\n\t\t\tpStatement.setInt(2, admin.getId());\r\n\t\t\tpStatement.setString(3, oldpassword);\r\n\t\t\tpStatement.execute();//ִ执行\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"AdPartner updateAdPartner(AdPartner adPartner);",
"public static void retrocedi_admin(int id) {\r\n\t\ttry {\r\n\t\tDatabase.connect();\r\n\t\tDatabase.updateRecord(\"utente\", \"utente.ruolo=2\", \"utente.id=\"+id); \t\t\r\n\t\tDatabase.close();\r\n\t\t}catch(NamingException e) {\r\n \t\tSystem.out.println(e);\r\n }catch (SQLException e) {\r\n \tSystem.out.println(e);\r\n }catch (Exception e) {\r\n \tSystem.out.println(e); \r\n }\r\n\t}",
"void updateAccount(int id, double accountBalance, String account) {\n // Update only the required keys\n sql = \"UPDATE CashiiDB2 \" + \"SET \" + account + \" ='\" + accountBalance + \"' WHERE AccountNum in ('\" + id + \"')\";\n try {\n st.executeUpdate(sql);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public void launchUpdate() {\n\n\t\tif (checkRegister() == true && psw.getText() != newpsw.getText()) {\n\t\t\tDatabase.getInstance().updateUser(newpsw.getText(), username.getText());\n\t\t\tstatus.setText(\"Account updated\");\n\t\t} else {\n\t\t\tstatus.setText(\"Password already exist or this account doesn't exist\");\n\t\t}\n\n\t}",
"public void editar() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Atualizar(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente editado com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }",
"private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }",
"public void editButtonClicked(){\n String first = this.firstNameInputField.getText();\n String last = this.lastNameInputField.getText();\n String email = this.emailInputField.getText();\n String dep = \"\";\n String role=\"\";\n if(this.departmentDropdown.getSelectionModel().getSelectedItem() == null){\n dep= this.departmentDropdown.promptTextProperty().get();\n //this means that the user did not change the dropdown\n \n }else{\n dep = this.departmentDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.roleDropdown.getSelectionModel().getSelectedItem()== null){\n role = this.roleDropdown.promptTextProperty().get();\n }else{\n role = this.roleDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.isDefaultValue(first) && \n this.isDefaultValue(last) && \n this.isDefaultValue(email) && \n this.isDefaultValue(role) && \n this.isDefaultValue(dep)){\n //this is where we alert the user that no need for update is needed\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setContentText(\"User information has not changed...no update performed\");\n alert.showAndWait();\n \n }else{\n \n if(this.userNameLabel.getText().equals(\"User\")){\n System.out.println(\"This is empty\");\n }else{\n //create a new instance of the connection class\n this.dbConnection = new Connectivity();\n //this is where we do database operations\n if(this.dbConnection.ConnectDB()){\n //we connected to the database \n \n boolean update= this.dbConnection.updateUser(first, last, email, dep,role , this.userNameLabel.getText());\n \n \n }else{\n System.out.println(\"Could not connect to the database\");\n }\n \n }\n }\n }",
"public abstract void updateAccount(JSONObject account);",
"public void accountModified(AccountEvent accountEvent) {\n Account account = accountEvent.getAccount();\n /**\n * If this is the account then update the GUI display per the potential change in Permissions.\n */\n if (getContest().getClientId().equals(account.getClientId())) {\n // They modified us!!\n initializePermissions();\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n updateGUIperPermissions();\n }\n });\n\n }\n }",
"private void edit() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null)) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.update(Integer.parseInt(idField.getText().toString().trim()),nama_pasien2,nama_dokter2, tgl_pengobatanField.getText().toString().trim(),waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }",
"@Override\n public boolean updateUserPersonalInfo(String text) {\n User tmp = this.getLoggedUser();\n tmp.setPersonal_details(text);\n if(this.setLoggedUser(tmp)) System.out.print(\"done\");\n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"UPDATE user_personal_information set information = + '\" + text + \"' where user_id = \" + this.getLoggedUser().getId();\n \n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n \n }",
"public void updateUser(int uid, String name, String phone, String email, String password, int money, int credit);",
"private void editUserCard() {\n getUserCard();\n }",
"private void editAccountType() throws Exception, EditUserException {\n String userChange = userIDInput.getText();\n String accountTypeInput = accountTypeValueEdit;\n try {\n Admin.editAccountType(userChange, accountTypeInput);\n String msg = \"Change user \" + userChange + \" to \" + accountTypeInput + \" success!\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset values\n userIDInput.setText(\"\");\n } catch (NullPointerException e) {\n String msg = \"Edit User Error: Empty values. Please try again.\";\n JOptionPane.showMessageDialog(null, msg);\n throw new NullPointerException(msg);\n } catch (SQLException e) {\n String msg = \"Edit User SQL Error: Could not add to database.\";\n JOptionPane.showMessageDialog(null, msg);\n throw new Exception(msg);\n } catch (EditUserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }",
"@Override\r\n\tpublic int updatepassword(Account account) {\n\t\taccountMapper.updatepassword(account);\r\n\t\treturn 0;\r\n\t}",
"int updateByPrimaryKey(AdminUser record);",
"int updateByPrimaryKey(AdminUser record);",
"public int updateAccount(Accounts account) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, account.getName());\n values.put(KEY_PASSWORD, account.getPassword());\n values.put(KEY_PH_NO, account.getPhoneNumber());\n values.put(KEY_EMAIL, account.getEmail());\n\n // updating row\n return db.update(TABLE_ACCOUNTS, values, KEY_ID + \" = ?\",\n new String[]{String.valueOf(account.getID())});\n }",
"private void edit() {\n\n\t}",
"@Override\r\n\tpublic boolean update(int id, Account account) {\n\t\treturn daoref.update(id, account);\r\n\t}",
"public void onChangedAdBtnPressed() {\n String uniqueID = advertisement.getUniqueID();\n view.showEditView(uniqueID);\n }",
"@Override\n\t\tpublic void update(Metodologia metodologia,String name) {\n\t\t\t\n\t\t}",
"@Override\n public void changeContact(String id,String pass,String newno) throws IOException\n {\n \tNode<Admin> pos = adm_list.getFirst();\n \twhile(pos!=null)\n \t{\n \t\tif(pos.getData().employee_id.equals(id) && pos.getData().password.equals(pass))\n \t\t{\n \t\t\tpos.getData().contact = newno;\n \t\t}\n \t\tpos = pos.getNext();\n \t}\n \twrite_adm_file();\n }",
"@Override\n\t\tpublic boolean update(AccountTransaction t) {\n\t\t\treturn false;\n\t\t}",
"int updateByPrimaryKeySelective(AdminTab record);",
"int updateByPrimaryKey(PasswdDo record);",
"@Override\n\tpublic void updateAccount(int idUsuario, int idCarteira) {\n\t}",
"@Override\n public void edit(User user) {\n }",
"private void updateUserDate(UserEditHead userEditHead){\n ApiInterface client = ServiceGenerator.createService(ApiInterface.class);\n\n Call<UserGetUpdateHead> call=client.update_profile(\"Token \"+userPreferences.getUserToken(),userEditHead);\n\n call.enqueue(new Callback<UserGetUpdateHead>() {\n @Override\n public void onResponse(Call<UserGetUpdateHead> call, Response<UserGetUpdateHead> response) {\n Log.i(\"ResponseCode\", String.valueOf(response.code()));\n\n try {\n if (!response.isSuccessful()) {\n\n try{\n APIError apiError= ErrorUtils.parseError(response);\n\n showMessage(\"Failed Entry: \" + apiError.getErrors());\n Log.i(\"Invalid EntryK\",apiError.getErrors().toString());\n Log.i(\"Invalid Entry\",response.errorBody().toString());\n mAvi1.setVisibility(View.GONE);\n mUpdateBtn.setVisibility(View.VISIBLE);\n\n }catch (Exception e){\n Log.i(\"InvalidEntry\",e.getMessage());\n Log.i(\"ResponseError\",response.errorBody().string());\n showMessage(\"Failed to Update\" + e.getMessage());\n mUpdateBtn.setVisibility(View.VISIBLE);\n mAvi1.setVisibility(View.GONE);\n\n }\n mUpdateBtn.setVisibility(View.VISIBLE);\n mAvi1.setVisibility(View.GONE);\n return;\n }\n\n firstname=response.body().getUser().getFirstName();\n lastname=response.body().getUser().getLastName();\n username=response.body().getUser().getUsername();\n phone_num=response.body().getUser().getPhone();\n\n userPreferences.setAgentFirstName(firstname);\n userPreferences.setAgentLastName(lastname);\n userPreferences.setAgentUsername(username);\n userPreferences.setAgentPhoneNUM(phone_num);\n\n mUpdateBtn.setVisibility(View.VISIBLE);\n mAvi1.setVisibility(View.GONE);\n\n showMessage(\"Profile Updated Successfully\");\n getUserProfile();\n\n mProfilePhoto.setClickable(false);\n mEditLayout.setVisibility(View.GONE);\n\n mProfileDataLayout.setVisibility(View.VISIBLE);\n mEditProf.setVisibility(View.VISIBLE);\n\n\n\n }catch (Exception e){\n showMessage(\"Submission Error: \" + e.getMessage());\n Log.i(\"Submission\", e.getMessage());\n mUpdateBtn.setVisibility(View.VISIBLE);\n mAvi1.setVisibility(View.GONE);\n }\n\n }\n @Override\n public void onFailure(Call<UserGetUpdateHead> call, Throwable t) {\n showMessage(\"Update Failed \" + t.getMessage());\n mUpdateBtn.setVisibility(View.VISIBLE);\n mAvi1.setVisibility(View.GONE);\n Log.i(\"GEtError\",t.getMessage());\n }\n });\n\n }",
"public void mod(AddrBean ad) {\n\t\tString nm = ad.getUsername();\n\t\tfor (AddrBean addrBean : addrlist) {\n\t\t\tif (nm.equals(addrBean.getUsername())) {\n\t\t\t\taddrBean.setEmail(ad.getEmail());\n\t\t\t\taddrBean.setGender(ad.getGender());\n\t\t\t\taddrBean.setTel(ad.getTel());\n\t\t\t}\n\t\t}\n\n\t}",
"private void hitEditProfileApi() {\n appUtils.showProgressDialog(getActivity(), false);\n HashMap<String, String> params = new HashMap<>();\n params.put(ApiKeys.NAME, etFirstName.getText().toString().trim());\n params.put(ApiKeys.PHONE_NO, etPhoneNo.getText().toString().trim());\n params.put(ApiKeys.ADDRESS, etAdress.getText().toString().trim());\n params.put(ApiKeys.POSTAL_CODE, etPostal.getText().toString().trim());\n\n if (countryId != null) {\n params.put(ApiKeys.COUNTRY, countryId);\n }\n if (stateId != null) {\n params.put(ApiKeys.STATE, stateId);\n }\n if (cityId != null) {\n params.put(ApiKeys.CITY, cityId);\n }\n\n ApiInterface service = RestApi.createService(ApiInterface.class);\n Call<ResponseBody> call = service.editProfile(AppSharedPrefs.getInstance(getActivity()).\n getString(AppSharedPrefs.PREF_KEY.ACCESS_TOKEN, \"\"), appUtils.encryptData(params));\n ApiCall.getInstance().hitService(getActivity(), call, new NetworkListener() {\n @Override\n public void onSuccess(int responseCode, String response) {\n try {\n JSONObject mainObject = new JSONObject(response);\n if (mainObject.getInt(ApiKeys.CODE) == 200) {\n JSONObject dataObject = mainObject.getJSONObject(\"DATA\");\n changeEditMode(false);\n isEditModeOn = false;\n ((EditMyAccountActivity) getActivity()).setEditButtonLabel(getString(R.string.edit));\n\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_NAME, dataObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_MOBILE, dataObject.getString(ApiKeys.MOBILE_NUMBER));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ADDRESS, dataObject.getString(ApiKeys.ADDRESS));\n JSONObject countryObject = dataObject.getJSONObject(ApiKeys.COUNTRY_ID);\n JSONObject stateObject = dataObject.getJSONObject(ApiKeys.STATE_ID);\n JSONObject cityObject = dataObject.getJSONObject(ApiKeys.CITY_ID);\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_NAME, countryObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_NAME, stateObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_NAME, cityObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ISO_CODE, countryObject.getString(ApiKeys.ISO_CODE));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_ID, countryObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_ID, stateObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_ID, cityObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.POSTAL_CODE, dataObject.optString(ApiKeys.POSTAL_CODE));\n\n } else if (mainObject.getInt(ApiKeys.CODE) == ApiKeys.UNAUTHORISED_CODE) {\n appUtils.logoutFromApp(getActivity(), mainObject.optString(ApiKeys.MESSAGE));\n } else {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), mainObject.optString(ApiKeys.MESSAGE));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onSuccessErrorBody(String response) {\n\n }\n\n @Override\n public void onFailure() {\n\n }\n });\n\n }",
"public void AddToAccountInfo();",
"@Override\r\n\tpublic int updateAdminPassword(Admin admin) {\n\t\treturn adminMapper.updateAdminPassword(admin);\r\n\t}",
"@Override\n \tpublic void update(DbManager db)\n \t{\n \t\tDbController DbC = DbController.getInstance(this, this);\n \t\tviewedRecipe = DbC.getUserRecipe(uri);\n \t\trecipeName.setText(viewedRecipe.getTitle());\n \t\tinstructions.setText(viewedRecipe.getInstructions());\n \t\t\n \t}",
"public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}",
"@Override\r\n\t\t\tpublic void onSuccess() {\n\t\t\t\tfinal User c = userManager.getCurrentUser(User.class);\r\n\t\t\t\tShowToast(\"修改成功:\"+c.getNick());\r\n\t\t\t\tfinish();\r\n\t\t\t}",
"@Test\n\tpublic void updateAccount() throws Exception {\n\n\t\tFacebookAdaccountBuilder fbAccount = SocialEntity\n\t\t\t\t.facebookAccount(accessToken);\n\t\tfbAccount.addAccount(\"New Test AdAccount\", \"USD\", 1);\n\t\t// fbAccount.create();\n\n\t\tfbAccount.updateAccountName(\"275668082617836\",\n\t\t\t\t\"Update Test New AdAccount\");\n\t\tfbAccount.updateAccountName(\"1419302888335966\",\n\t\t\t\t\"Batch AdAccount Name Update\");\n\t\tSystem.out.println(fbAccount.update());\n\t}",
"@PutMapping\n public ResponseEntity<AccountResponse> updateAccount(\n @Validated @RequestBody AccountForm accountForm,\n @RequestParam(\"acctPid\") UUID accountPublicId) {\n\n\n AccountResponse responseDto = accountModifier.update(accountForm, accountPublicId);\n return new ResponseEntity<>(responseDto,HttpStatus.OK);\n }",
"@Override\r\n\tpublic boolean update(Account account) {\n\t\tint i= iInsert.update(account);\r\n\t\tif(1==i){\r\n\t\t\tflag=true;\r\n\t\t}\r\n\t\treturn flag;\r\n\t}",
"public void UpdateAccount(int ID) throws InterruptedException, HeadlessException, AWTException, IOException\n {\n\n // Populating the data from Excel\n \t ExcelDataConfig excel=new ExcelDataConfig(ConfigReader.getExcelPath());\n \t try {\n \t\t //Check whether navigated to update account page\n \t\t Thread.sleep(1000);\n Assert.assertTrue(BrowserFactory.driver.findElement(By.linkText(\"Update Account\")).isDisplayed());\n BaseClass.testLog.log(Status.PASS, \"Navigated to update account page\");\n \t }\n \t catch(Exception e) \n \t {\n \t\t//Capture screenshot of the fail page\n\t\t ScreenShot.captureScreenshot(BrowserFactory.driver, \"Navigate to update account page unsuccessfull\");\n\n BaseClass.testLog.log(Status.PASS, \"Navigate to update account page unsuccessfull\");\n \t }\n\n //Click on change name link\n Thread.sleep(1000);\n ChangeName.click();\n\n //Enter first name\n FirstName.clear();\n FirstName.sendKeys(excel.getData(\"Account\",ID, 1));\n\n //Enter last name\n LastName.clear();\n LastName.sendKeys(excel.getData(\"Account\",ID, 2));\n\n //Click on submit button\n SubmitName.click();\n BaseClass.testLog.log(Status.PASS, \"Update Name Successfull\");\n\n //Click on change password\n //ChangePassword.click();\n //Enter current password\n //CurrentPassword.sendKeys(excel.getData(\"Account\",ID, 3));\n //Enter new password\n // NewPassword.sendKeys(excel.getData(\"Account\",ID, 4));\n //Enter confirm password\n //ConfirmPassword.sendKeys(excel.getData(\"Account\",ID, 5));\n //Click on submit button\n //SubmitPassword.click();\n BaseClass.testLog.log(Status.PASS, \"Update password Successfull\");\n\n\n //Click on change email\n ChangeEmail.click();\n //Enter Email address\n Email.clear();\n Email.sendKeys(excel.getData(\"Account\",ID, 6));\n //Click submit button\n SubmitEmail.click();\n BaseClass.testLog.log(Status.PASS, \"Update email Successfull\");\n\n\n //Update cerdit card details\n ChangeCard.click();\n //Click forget button to remove the credit card\n ForgetButton.click();\n BaseClass.testLog.log(Status.PASS,\"Remove credit card details Successfull\");\n\n\n //Click on change region link\n ChangeRegion.click();\n //Select a region fro dropdown list\n Region.click();\n Thread.sleep(1000);\n Actions action = new Actions(BrowserFactory.driver);\n action.sendKeys(Region, Keys.ARROW_DOWN).perform();\n action.sendKeys(Region, Keys.RETURN).click();\n //Click on submit button\n SubmitRegion.click();\n try\n {\n Thread.sleep(1000);\n Assert.assertTrue(BrowserFactory.driver.findElement(By.linkText(\"Your region has been updated\")).isDisplayed());\n BaseClass.testLog.log(Status.PASS, \"Updated region successfully\");\n }\n catch (Exception e)\n {\n \t//Capture screenshot of the fail page\t\n \t ScreenShot.captureScreenshot(BrowserFactory.driver, \"Update region unsuccessfull\");\n \t BaseClass.testLog.log(Status.FAIL,\"Update region unsuccessfull\");\n }\n\n //Click on Change address\n Thread.sleep(1000);\n ChangeAddress.click();\n //Click on Add new address button\n Thread.sleep(1000);\n AddNewAddress.click();\n String Expected = \"Add Address\";\n String Actual = BrowserFactory.driver.findElement(By.xpath(\"//*[@id='content']/div[2]/div[2]/div/h1\")).getText();\n if (Expected == Actual)\n {\n \t BaseClass.testLog.log(Status.PASS, \"Navigated to Add Address page\");\n }\n else\n { \n \t //Capture screenshot of the fail page\t\n \t ScreenShot.captureScreenshot(BrowserFactory.driver, \"Failed to navigate to Address page\");\n \t BaseClass.testLog.log(Status.FAIL, \"Navigate to Add Address page unsuccessfull\");\n }\n //Enter the details in address page\n Thread.sleep(1000);\n Label.sendKeys(excel.getData(\"Account\",ID, 8));\n Thread.sleep(1000);\n Name.clear();\n Name.sendKeys(excel.getData(\"Account\",ID, 9));\n Thread.sleep(1000);\n Address.sendKeys(excel.getData(\"Account\",ID, 10));\n Thread.sleep(1000);\n Suburb.sendKeys(excel.getData(\"Account\",ID, 11));\n Thread.sleep(1000);\n City.sendKeys(excel.getData(\"Account\",ID, 12));\n Thread.sleep(1000);\n PostCode.sendKeys(excel.getData(\"Account\",ID, 13));\n Thread.sleep(1000);\n ContactPhone.sendKeys(excel.getData(\"Account\",ID, 14));\n Thread.sleep(1000);\n AddAddress.click();\n Thread.sleep(1000);\n try\n {\n //string ExpectedMessage = \"Your address has been saved as work\";\n //String ActualMessage = Driver.driver.FindElement(By.PartialLinkText(ExpectedMessage)).Text;\n Thread.sleep(1000);\n Assert.assertTrue(BrowserFactory.driver.findElement(By.linkText(\"Update Account\")).isDisplayed());\n \n BaseClass.testLog.log(Status.PASS,\"Updated address successfully\");\n }\n catch (Exception e)\n {\n \t//Capture screenshot of the fail page\n\t\t ScreenShot.captureScreenshot(BrowserFactory.driver, \"Update address unsuccessfull\");\n \t BaseClass.testLog.log(Status.FAIL,\"Update address unsuccessfull\");\n }\n BaseClass.testLog.log(Status.PASS, \"Update useraccount successfull\");\n \t\n }",
"@Override\r\n\tpublic boolean updatePostPaidAccount(int customerID, PostpaidAccount account) {\n\t\treturn false;\r\n\t}",
"int updateByPrimaryKey(Admin record);",
"int updateByPrimaryKey(Admin record);",
"public String update() {\n\t\tif (getElement().getIdTipo() == null) {\n\t\t\tFacesContext.getCurrentInstance()\n\t\t\t\t\t.addMessage(\n\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\tnew FacesMessage(\"Tipo non valido\",\n\t\t\t\t\t\t\t\t\t\"Selezionare il tipo.\"));\n\t\t\treturn null;\n\t\t}\n\t\tModulo t = getSession().update(element);\n\t\t// refresh locale\n\t\telement = t;\n\t\trefreshModel();\n\t\t// vista di destinzione\n\t\toperazioniLogHandler.save(OperazioniLog.MODIFY, JSFUtils.getUserName(),\n\t\t\t\t\"modifica moduli: \" + this.element.getNome());\n\t\treturn viewPage();\n\t}",
"@Override\n public void onSuccess(final Account account) {\n userid = account.getId();\n user = getApplicationContext().getSharedPreferences(\"USER_INFO\", Context.MODE_PRIVATE);\n editor = user.edit();\n editor.clear();\n editor.putString(\"ID\", userid);\n editor.commit();\n\n }",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n actualizar_administrador();\n aceptoCambios.aceptar(administrador, especialidades);\n dismiss();\n }",
"@Override\n\tpublic boolean modify(Administrateur admin) {\n\t\ttry\n\t\t{\n\t\t\topenCurrentSessionWithTransaction();\n\t\t\tgetCurrentSession().update(admin);\n\t\t\tcloseCurrentSessionWithTransaction();\n\t\t\treturn true;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"public void updateUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk updateUser\");\r\n\t}",
"Integer updateUserInfo(UpdateEntry updateEntry);",
"@Override\n public void onClick(View v) {\n String newPass=et_newPassword.getText().toString().trim();\n String oldPass=et_oldPassword.getText().toString().trim();\n String prefpass=SharedPrefManager.getInstance(getApplicationContext()).getPass();\n if(newPass.equals(\"\")||oldPass.equals(\"\"))\n {\n Toast.makeText(AdminHomeActivity.this, \"Enter All Fields\", Toast.LENGTH_SHORT).show();\n }\n else if(!prefpass.equals(oldPass))\n {\n Toast.makeText(AdminHomeActivity.this, \"Incorrect Old Password\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n repo.updatePass(oldPass,newPass,\"Admin\");\n Toast.makeText(AdminHomeActivity.this, \"Password Successfully Changed\", Toast.LENGTH_SHORT).show();\n logout();\n dialog.dismiss();\n }\n }",
"@Override\n public void edit(ReporteAccidente rep) {\n repr.save(rep);\n }"
] | [
"0.71645373",
"0.66107166",
"0.6523741",
"0.65005964",
"0.6490725",
"0.64523715",
"0.6449855",
"0.63964456",
"0.639011",
"0.6309596",
"0.6308933",
"0.63037",
"0.62955505",
"0.6261428",
"0.625325",
"0.6183802",
"0.61657035",
"0.6160067",
"0.6142764",
"0.6142531",
"0.6116135",
"0.6082122",
"0.60796756",
"0.6047801",
"0.6047012",
"0.59974134",
"0.5984468",
"0.59720284",
"0.59329003",
"0.59242165",
"0.5914778",
"0.59108174",
"0.58963984",
"0.5859601",
"0.5845637",
"0.58455384",
"0.5837856",
"0.5836762",
"0.582879",
"0.5821701",
"0.5808463",
"0.57957333",
"0.5795049",
"0.57914555",
"0.57904726",
"0.57900673",
"0.5761979",
"0.5758823",
"0.5758067",
"0.57566476",
"0.5739908",
"0.5718752",
"0.57181823",
"0.57158923",
"0.57135123",
"0.5711991",
"0.5710703",
"0.57101446",
"0.5702463",
"0.5702319",
"0.56976914",
"0.5691064",
"0.5687067",
"0.56835073",
"0.5668227",
"0.5668227",
"0.5662629",
"0.5657868",
"0.5653396",
"0.5650874",
"0.56417584",
"0.564052",
"0.56400025",
"0.56347245",
"0.5623754",
"0.5617552",
"0.561632",
"0.5608808",
"0.56084794",
"0.5603476",
"0.5597151",
"0.55879575",
"0.5582644",
"0.5576592",
"0.5572643",
"0.55699074",
"0.5565138",
"0.5555496",
"0.5554719",
"0.55336165",
"0.5531859",
"0.5531859",
"0.5529886",
"0.5529356",
"0.5529129",
"0.55258584",
"0.552584",
"0.5518763",
"0.5517666",
"0.55089974"
] | 0.68495035 | 1 |
/int deleteByPrimaryKey(Long customerId); int insert(Customers customers); int insertSelective(Customers customers); | List<Customers> selectByCustomers(Customers customers); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deleteCustomerById(int customerId);",
"void delete(Customer customer);",
"@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}",
"public boolean deleteCustomer(String custId);",
"void deleteCustomerById(Long id);",
"void insert(Customer customer);",
"public void DeleteCust(String id);",
"public void deleteCustomer(Customer customer){\n _db.delete(\"Customer\", \"customer_name = ?\", new String[]{customer.getName()});\n }",
"public boolean addCustomer(Customer customer) throws DatabaseOperationException;",
"public void deletecustomer(long id) {\n\t\t customerdb.deleteById(id);\n\t }",
"boolean delete(CustomerOrder customerOrder);",
"int deleteByPrimaryKey(Integer cId);",
"int deleteByPrimaryKey(Integer cId);",
"int deleteByPrimaryKey(Integer zid);",
"public Customer findCustomerById(long id) throws DatabaseOperationException;",
"public void delete(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"DELETE FROM customer WHERE customer_key = ?\");\n ppst.setInt(1, c.getCustomerKey());\n ppst.executeUpdate();\n System.out.println(\"Successfully deleted.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Delete error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }",
"@Test\n public void deleteCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"dominick.dechristofaro@gmail.com\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Delete the Customer from the database\n service.removeCustomer(customer.getCustomerId());\n\n // Test the deleteCustomer() method\n verify(customerDao, times(1)).deleteCustomer(integerArgumentCaptor.getValue());\n assertEquals(customer.getCustomerId(), integerArgumentCaptor.getValue().intValue());\n }",
"public void deleteCustomerbyId(int i) {\n\t\tObjectSet result = db.queryByExample(new Customer(i, null, null, null, null, null));\n\n\t\twhile (result.hasNext()) {\n\t\t\tdb.delete(result.next());\n\t\t}\n\t\tSystem.out.println(\"\\nEsborrat el customer \" + i);\n\t}",
"public void delete(Customer customer) {\n\t\tcustRepo.delete(customer);\n\t}",
"public interface CustomerDAO {\n Customer getCustomer(String customerName);\n\n Customer getCustomer(int customerID);\n\n ObservableList<Customer> getAllCustomers() throws SQLException;\n\n void addCustomer(Customer newCustomer) throws SQLException;\n\n void updateCustomer(Customer toUpdate) throws SQLException;\n\n void deleteCustomer(Customer deleteTarget);\n}",
"@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// delete object with primary key\n\t\tQuery theQuery = \n\t\t\t\tcurrentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\t\t\n\t}",
"@Override\n\tpublic boolean deleteCustomer(int customerId) {\n\t\treturn false;\n\t}",
"Boolean updateOrInsert(Customer customer);",
"int deleteByPrimaryKey(String num);",
"int deleteByPrimaryKey(String num);",
"@Test\n\tpublic void deleteCustomer() {\n\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tlong id = customer.getId();\n\t\tint originalLength = customerController.read().size();\n\n\t\t// When\n\t\tICustomer cus = customerController.delete(id);\n\n\t\t// Then\n\t\tint expected = originalLength - 1;\n\t\tint actual = customerController.read().size();\n\t\tAssert.assertEquals(expected, actual);\n\t\tAssert.assertNotNull(cus);\n\t}",
"@Override\n\tpublic void deleteCustomer(Long custId) {\n\t\tcustomerRepository.deleteById(custId);\n\t\t\n\t}",
"public void delete(String custNo) {\n\t\tcstCustomerDao.update(custNo);\n\t\t\n\t}",
"@Test\n public void testDeleteCustomer() {\n System.out.println(\"deleteCustomer\");\n String name = \"Gert Hansen\";\n String address = \"Grønnegade 12\";\n String phone = \"98352010\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(name, address, phone);\n instance.deleteCustomer(customerID);\n Customer result = instance.getCustomer(customerID);\n assertNull(result);\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }",
"@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"Mobile Customer delete()\");\n\t}",
"@Override\r\n\tpublic boolean deleteCustomer(int customerID) {\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// delete object with primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\n\t\ttheQuery.executeUpdate();\n\t}",
"int deleteByPrimaryKey(String maht);",
"@Override\n\t@Transactional\n\tpublic void deleteCustomer(Customer customer) {\n\t\thibernateTemplate.delete(customer);\n\n\t\tSystem.out.println(customer + \"is deleted\");\n\t}",
"@Override\n\tpublic int deleteCustomerReprieve(Integer id) {\n\t\treturn customerDao.deleteCustomerReprieve(id);\n\t}",
"@Override\r\n\tpublic int insertCustomer(Customer customer) throws BillingServicesDownException {\n\t\treturn 0;\r\n\t}",
"public boolean insertCustomer(Customer customer){\n\n ContentValues cv = new ContentValues();\n\n cv.put(\"customer_name\", customer.getName());\n cv.put(\"customer_description\", customer.getDescription());\n\n long insert = _db.insert(\"Customer\", null, cv);\n\n // Checks if rows have been updated.\n if(insert == -1){\n return false;\n }\n\n return true;\n }",
"public interface CustomerDao {\n// 添加一个用户信息\n Customers add(Customers customers);\n\n// 删除一个用户信息\n void delete(int customerId);\n\n// 更新一个用户信息\n Customers update(Customers customers);\n\n// 得到所有的用户\n List<Customers> getAll();\n\n// 得到一个用户序号对应的用户信息\n Customers getOne(int customerId);\n}",
"@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// delete the object with the primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\n\t}",
"Customer saveCustomer(Customer customer) throws CustomerExistsException;",
"public static void deleteCustomer(int customerID) throws SQLException{\r\n\r\n //connection and prepared statement set up\r\n Connection conn = DBConnection.getConnection();\r\n String deleteStatement = \"DELETE from customers WHERE Customer_ID = ?;\";\r\n DBQuery.setPreparedStatement(conn, deleteStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n ps.setInt(1,customerID);\r\n ps.execute();\r\n\r\n if (ps.getUpdateCount() > 0) {\r\n System.out.println(ps.getUpdateCount() + \" row(s) effected\");\r\n } else {\r\n System.out.println(\"no change\");\r\n }\r\n }",
"@Writer\n int deleteByPrimaryKey(Integer id);",
"int deleteByPrimaryKey(String number);",
"void deleteCustomerDDPayById(int id);",
"int deleteByPrimaryKey(String vendorid);",
"int deleteByPrimaryKey(String fucno);",
"@Override\n\t@Transactional\n\tpublic void deleteCustomer(int theId) {\n\t\tcustomerDAO.deleteCustomer(theId);\n\t}",
"public abstract void delete(CustomerOrder customerOrder);",
"public int insertCustomer() {\n\t\treturn 0;\r\n\t}",
"int deleteByPrimaryKey(Integer cid);",
"int deleteByPrimaryKey(Integer cid);",
"int deleteByPrimaryKey(String cid);",
"int updateByPrimaryKey(CustomerTag record);",
"int deleteByPrimaryKey(String debtsId);",
"void removeCustomer(Customer customer);",
"int updateByPrimaryKey(OcCustContract record);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);",
"int deleteByPrimaryKey(String id);"
] | [
"0.7366059",
"0.7291827",
"0.6986678",
"0.6986678",
"0.6945057",
"0.68889683",
"0.66910255",
"0.6674438",
"0.66255456",
"0.65827185",
"0.6500497",
"0.64798754",
"0.64561474",
"0.64561474",
"0.6422951",
"0.6385572",
"0.6373173",
"0.6363183",
"0.63464636",
"0.632571",
"0.6323928",
"0.63052016",
"0.6289897",
"0.6287234",
"0.6279252",
"0.6279252",
"0.6258964",
"0.6256891",
"0.6253049",
"0.6251239",
"0.6249484",
"0.6246637",
"0.6234883",
"0.6227245",
"0.62265164",
"0.6212139",
"0.621117",
"0.61862135",
"0.61798203",
"0.6172801",
"0.61677355",
"0.61523914",
"0.6145851",
"0.6139206",
"0.61331844",
"0.6132431",
"0.61156726",
"0.610666",
"0.6100264",
"0.6093987",
"0.6093604",
"0.6093604",
"0.6084533",
"0.60795295",
"0.60784674",
"0.606958",
"0.606036",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188",
"0.6060188"
] | 0.0 | -1 |
Find by reference: deployment | public List<ActProcessDefinition> findByDeployment(ActDeployment deployment) {
return this.findByDeploymentId(deployment.getId());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Optional<V1Deployment> existingDeployment(AppsV1Api appsApi) {\n try {\n return Optional.of(appsApi.readNamespacedDeployment(config.getName(),config.getNamespace(),null,false,false));\n } catch (ApiException e) {\n return Optional.empty();\n }\n }",
"private WebApp findWebAppForDep(final App.Dependency dep, final Set<WebApp> webApps) {\n\t\tfor (final WebApp webApp : webApps) {\n\t\t\tif (webApp.getFullName().equalsIgnoreCase(dep.getName())) {\n\t\t\t\treturn webApp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public IDeploymentTarget findTarget(ITMWProject project, String id) {\n return null;\r\n }",
"protected URL convertedFindResource(String name) {\n ServiceReference reference = bundle.getBundleContext().getServiceReference(PackageAdmin.class.getName());\n PackageAdmin packageAdmin = (PackageAdmin) bundle.getBundleContext().getService(reference);\n try {\n List<URL> resources = findResources(packageAdmin, bundle, name, false);\n if (resources.isEmpty() && isMetaInfResource(name)) {\n LinkedHashSet<Bundle> wiredBundles = getWiredBundles();\n Iterator<Bundle> iterator = wiredBundles.iterator();\n while (iterator.hasNext() && resources.isEmpty()) { \n Bundle wiredBundle = iterator.next();\n resources = findResources(packageAdmin, wiredBundle, name, false);\n }\n }\n return (resources.isEmpty()) ? null : resources.get(0);\n } catch (Exception e) {\n return null;\n } finally {\n bundle.getBundleContext().ungetService(reference);\n }\n }",
"public org.biocatalogue.x2009.xml.rest.ServiceDeployment getServiceDeployment()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.ServiceDeployment target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.ServiceDeployment)get_store().find_element_user(SERVICEDEPLOYMENT$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n @ResponseBody\n public Deployment getDeployment(@PathVariable(\"id\") String id) {\n return processService.getDeployment(id);\n }",
"public static int searchref(String ref) {\n String target = ref.toUpperCase() ;\n existebis = 0;\n Cars xx = new Cars();\n for (int i = 0; i < listcars.size(); i++) {\n xx = listcars.get(i);\n String record = xx.getReference().toUpperCase() ;\n if (record.equals(target)) {\n existebis = 1;\n break;\n\n\n } else {\n existebis = 0;\n }\n }\n\n return existebis;}",
"public GitRef getRef(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); }\n catch(Exception e) { throw new RuntimeException(e); }\n return ref!=null ? new GitRef(ref) : null;\n}",
"static Env find (Env env, String targetKey) {\n for (; env != null; env = env.next) {\n if (env.key.equals (targetKey)) {\n return env;\n }\n }\n return null;\n }",
"public DeploymentModel locate( String path )\n {\n return m_model.getModel( path );\n }",
"private InjectionMetadata findReferenceMetadata(String beanName, Class<?> clazz, PropertyValues pvs) {\n String cacheKey = (StringUtils.hasLength(beanName) ? beanName : clazz.getName());\n // Quick check on the concurrent map first, with minimal locking.\n ReferenceInjectionMetadata metadata = this.injectionMetadataCache.get(cacheKey);\n if (InjectionMetadata.needsRefresh(metadata, clazz)) {\n synchronized (this.injectionMetadataCache) {\n metadata = this.injectionMetadataCache.get(cacheKey);\n if (InjectionMetadata.needsRefresh(metadata, clazz)) {\n if (metadata != null) {\n metadata.clear(pvs);\n }\n try {\n metadata = buildReferenceMetadata(clazz);\n this.injectionMetadataCache.put(cacheKey, metadata);\n } catch (NoClassDefFoundError err) {\n throw new IllegalStateException(\"Failed to introspect bean class [\" + clazz.getName() +\n \"] for reference metadata: could not find class that it depends on\", err);\n }\n }\n }\n }\n return metadata;\n }",
"public DeploymentStatus getDeploymentStatus();",
"String deploymentModel();",
"Object find(String name);",
"public String getImplementationBean(String linkName);",
"void search( RealLocalizable reference );",
"Optional<BankBranch> getByName(String name) throws ObjectNotFoundException;",
"public GitBranch getBranch(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); if (ref==null) return null; }\n catch(Exception e) { throw new RuntimeException(e); }\n String name = ref.getTarget().getName();\n GitBranch b = _branches.get(name);\n if (b==null) _branches.put(name, b=new GitBranch(name));\n return b;\n}",
"@Override\n @Transactional(readOnly = true)\n\tpublic ProductDTO findByReferenceAndVisibleTrue(String reference) {\n \tlog.debug(\"Request to get Product by reference : {}\", reference);\n Product product = productRepository.findByReferenceIgnoreCaseAndVisibleTrue(reference);\n return productMapper.toDto(product);\n\t}",
"@Override\n public Long action(MBeanServerConnection connection, JBoss5ProfileServiceProxy profileService) throws Exception {\n Object info = connection.invoke(new ObjectName(\"jboss.system:service=MainDeployer\"), // NOI18N\n \"getDeployment\", new Object[] {fileToDeploy.getCanonicalFile().toURL()}, new String[] {\"java.net.URL\"}); // NOI18N\n if (info == null) {\n info = connection.invoke(new ObjectName(\"jboss.system:service=MainDeployer\"), // NOI18N\n \"getDeployment\", new Object[] {fileToDeploy.toURL()}, new String[] {\"java.net.URL\"}); // NOI18N\n }\n if (info == null) {\n return Long.MIN_VALUE;\n }\n\n Class infoClass = info.getClass();\n return infoClass.getDeclaredField(\"lastDeployed\").getLong(info); // NOI18N\n }",
"public String getDeploymentName()\n {\n return _deploymentName;\n }",
"public ReferenceRemote getReferenceServer() throws RemoteException, IOException {\n String rmiServiceName\n = PropertiesRemote.getInstance().getProperty(\"remoteServiceName\");\n String rmiHost\n = PropertiesRemote.getInstance().getProperty(\"remoteHost\");\n int rmiPort\n = Integer.parseInt(PropertiesRemote.getInstance().getProperty(\"remotePort\"));\n String lookupString = \"rmi://\" + rmiHost + \":\" + rmiPort + \"/\" + rmiServiceName;\n\n try {\n refObj = (ReferenceRemote) Naming.lookup(lookupString);\n return refObj;\n } catch (NotBoundException nbex) {\n throw new RemoteException(nbex.toString());\n }\n }",
"public abstract ServiceLocator find(String name);",
"Optional<AgentContainer> findAgentContainer(String containerName);",
"public String getDeployment() {\n if (plan.startsWith(\"pooled-\") || plan.startsWith(\"standard-small\") || plan.startsWith(\"standard-medium\")) {\n return \"broker\";\n } else {\n return address;\n }\n }",
"private FileObject findServiceArchiveForName(String appName) throws FileSystemException {\n List<FileObject> serviceArchives\n = Utils.findChildrenWithSuffix(deploymentDirectoryFile,\n com.stratuscom.harvester.Strings.JAR);\n //Then find the one that starts with the client name\n for (FileObject fo : serviceArchives) {\n if (fo.getName().getBaseName().startsWith(appName + com.stratuscom.harvester.Strings.DASH)) {\n return fo;\n }\n }\n return null;\n }",
"private void defaultDeploymentShouldBeFound(String filter) throws Exception {\n restDeploymentMockMvc.perform(get(\"/api/deployments?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(deployment.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME.toString())))\n .andExpect(jsonPath(\"$.[*].date\").value(hasItem(DEFAULT_DATE.toString())));\n\n // Check, that the count call also returns 1\n restDeploymentMockMvc.perform(get(\"/api/deployments/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"1\"));\n }",
"String getContainmentReference();",
"public Object lookupConfigurationEntry(String key);",
"public interface ICSARRepositorySearchService {\n\n /**\n * Get an archive from it's id.\n *\n * @param archiveName The name of the archive.\n * @param archiveVersion The version of the archive.\n * @return The cloud service archive matching the given id.\n */\n Csar getArchive(String archiveName, String archiveVersion);\n\n /**\n * Check if an element exists in the given dependencies.\n *\n * @param elementClass The element class.\n * @param elementId The TOSCA element id of the element (without archive version).\n * @param dependencies A list of CSAR in which the element may be defined.\n * @return True if the element is found, false if not.\n */\n boolean isElementExistInDependencies(Class<? extends AbstractToscaType> elementClass, String elementId, Set<CSARDependency> dependencies);\n\n /**\n * Get an element from defined dependencies.\n *\n * @param elementClass The element class.\n * @param dependencies A list of CSAR in which the element may be defined.\n * @param keyValueFilters List of key1, value1, key2, value2 to add term filters to the query for each dependency.\n * @return The requested element or null if the element is not found.\n */\n <T extends AbstractToscaType> T getElementInDependencies(Class<T> elementClass, Set<CSARDependency> dependencies, String... keyValueFilters);\n\n /**\n * Get an element from defined dependencies.\n *\n * @param elementClass The element class.\n * @param elementId The TOSCA element id of the element (without archive version).\n * @param dependencies A list of CSAR in which the element may be defined.\n * @return The requested element or null if the element is not found.\n */\n <T extends AbstractToscaType> T getElementInDependencies(Class<T> elementClass, String elementId, Set<CSARDependency> dependencies);\n\n /**\n * Get an element from defined dependencies.\n *\n * @param elementClass The element class.\n * @param elementId The TOSCA element id of the element (without archive version).\n * @param dependencies A list of CSAR in which the element may be defined.\n * @return The requested element. The method must throw an {@link NotFoundException}.\n * @throws NotFoundException in case the element cannot be found.\n */\n <T extends AbstractToscaType> T getRequiredElementInDependencies(Class<T> elementClass, String elementId, Set<CSARDependency> dependencies)\n throws NotFoundException;\n}",
"private ReportConcept getRelatedConcept(ReportConcept entry) {\n\t\t// if completly removed, no point in searching\n\t\tif(entry.getLabels().isEmpty())\n\t\t\treturn null;\n\t\t\n\t\tfor (ReportConcept c : concepts) {\n\t\t\t// labels in the new concept are contained within the old concept label list\n\t\t\tif(Collections.indexOfSubList(entry.getLabels(),c.getLabels()) > -1 || Collections.indexOfSubList(c.getLabels(),entry.getLabels()) > -1){\n\t\t\t\t//if(entry.getName().contains(c.getName()) || c.getName().contains(entry.getName())){\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<NetBarDeployEntity> getDeploysByBarId(String barId,String isDeploy) {\n\t\tList<NetBarDeployEntity> data = new ArrayList<NetBarDeployEntity>();\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\tStringBuffer sql = new StringBuffer();\n\t\tsql.append(\"select \"+getQueryColumns())\n\t\t.append(\" FROM \"+TableConstants.NETBAR_DEPLOY_TABLE+\" d WHERE d.netbarCode= :netbarCode \");\n\t\tparameters.put(\"netbarCode\", barId);\n\t\tif(CommonUtil.isNotEmpty(isDeploy)){\n\t\t\tsql.append(\" and d.is_deploy= :isDeploy\");\n\t\t\tparameters.put(\"isDeploy\", isDeploy);\n\t\t}\n\t\tList<Object> list = findNativeQuery(sql.toString(), parameters);\n\t\tfor (Object object : list) {\n\t\t\tif(object instanceof Object[]){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tNetBarDeployEntity entity=this.obj2Entity(obj);\n\t\t\t\tdata.add(entity);\n\t\t\t}\n\t\t}\n\t\tif(data == null || data.size() <= 0){\n\t\t\treturn null;\n\t\t}\n\t\treturn data;\n\t}",
"public ICodeBaseEntry lookupResource(String resourceName) throws ResourceNotFoundException;",
"@Override\n public EnvironmentVariable find(Long id) throws Exception {\n return null;\n }",
"private File getDeploymentDescriptorFile(String applicationShortName) {\n\t\t\n\t\tString deploymentDescriptorFile = Configuration.getDeploymentDescriptorFile();\n\t\tif (deploymentDescriptorFile != null ) {\n\t\t\tFile file = new File(deploymentDescriptorFile);\n\t\t\tif (! file.exists()){\n\t\t\t\tthrow new RuntimeException(\"DeploymentDescriptor file '\"+file.getAbsolutePath()+\"' specified with property '\"+Configuration.DEPLOYMENT_CONFIG_DEPLOYMENT_DESCRIPTOR+\"' does not exist.\");\n\t\t\t}\n\t\t\treturn file;\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\tif (!Configuration.isDontCheckoutDeploymentDescriptorsFolder()) {\n\t\t\t\tlog.debug(\"Checking out deployment descriptor files\");\n\t\t\t EMGitManager.checkoutRemoteEnvironmentDeploymentDescriptorsFiles();\n\t\t\t}\n\t\t\t\n\t\t\tFile ddDir = new File(Configuration.getLocalEnvironmentDeploymentDescriptorsCheckoutDir());\n\t\t\t//find the right directory\n\t\t\tString shortName = getApplicationVersion(applicationShortName).getApplication().getShortName();\n\t\t\tString version = getApplicationVersion(applicationShortName).getVersion();\n\t\t\t\n\t\t\tlog.debug(String.format(\"Shortname:%s Version:%s\", shortName, version));\n\t\t\tFile directory = new File(ddDir, shortName);\n\t\t\tif (!directory.exists()) {\n\t\t\t\tthrow new RuntimeException(\"Cannot find deployment descriptor sub-directory for applicaitons with a shot name of '\"+shortName+\"'.. There should be a subfolder of '\"+ddDir.getAbsolutePath()+\"' with the same name as the application short name of the application being deployed and the deployment descriptors for that application should be in there.\");\n\t\t\t}\n\t\t\tFile[] possibleFiles = directory.listFiles();\n\t\t\t\n\t\t\tFile currentSelectedDD = null;\n\t\t\t\n\t\t\tMap<String, File> orderedDDs = orderDDsByMinVersion(possibleFiles, applicationShortName);\n\t\t\t\n\t\t\t// Loop through DDs is ascending minApplicationVersion order\n\t\t\tfor (String minVersion : orderedDDs.keySet()) {\n\t\t\t\tVersionCompare versionCompare = new VersionCompare();\n\t\t\t\tlog.debug(String.format(\"Comparing: '%s' '%s'\", version, minVersion));\n\t\t\t\tint result = versionCompare.compare(version, minVersion);\n\t\t\t\tlog.debug(String.format(\"Compare Result: %s\", result));\t\t\t\n\t\t\t\t\n\t\t\t\tif (result < 0) {\n\t\t\t\t\t// This version is less than the minimum version supported by the descriptor we are looking at.\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\t// This version is supported by the deployment descriptor\n\t\t\t\t\tlog.debug(String.format(\"Setting file: %s MinVersion: %s\", orderedDDs.get(minVersion).getAbsolutePath(), minVersion));\n\t\t\t\t\tcurrentSelectedDD = orderedDDs.get(minVersion);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tif (currentSelectedDD == null) {\n\t\t\t\tthrow new RuntimeException(\"Could not find a suitable deployment descriptor.\");\n\t\t\t}\n\t\t\t\n\t\t\treturn currentSelectedDD;\n\t\t}\n\t}",
"private String getReference(RequestInfo requestInfo) throws DefectException { \r\n\t\tlog.info(\"Start - getReference\");\r\n\t\tif(CommonUtil.isNull(requestInfo)){\r\n\t\t\tlog.error(\"Request Info is null - \"+ requestInfo);\t\t\t\r\n\t\t\tthrow new DefectException(\"failed to read, request information is missing\");\r\n\t\t}\r\n\t\tif(CommonUtil.isNull(restApi))\r\n\t\t\tcreateInstance();\r\n\t\t\r\n\t\tString ref = null;\r\n try {\r\n\r\n log.info(\"Getting Query Response\");\r\n \r\n QueryResponse qryResponse = getQueryResponse(requestInfo);\r\n \r\n log.info(\"Got Query Response : \" + qryResponse);\r\n \r\n JsonArray qryResults = qryResponse.getResults();\r\n JsonElement qryElement = qryResults.get(0);\r\n JsonObject qryObject = qryElement.getAsJsonObject();\r\n ref = qryObject.get((requestInfo.getRefField() != null)?requestInfo.getRefField():RallyConstants._REF).toString();\r\n\r\n } finally {\r\n \tcloseDefect();\r\n \t\tlog.info(\"End - getReference\");\r\n \t\t System.out.println(\"value of ref is\"+ ref);\r\n }\r\n \r\n\t\treturn ref;\r\n \t}",
"private Element getElementByKeyRef(Node node) {\n\t\tElement ref ;\n\t\t\t\n\t\tString refType = getDocumentXpath(node);\n\t\tSystem.out.println(\"search ref for : \"+refType);\n\t\t/* get ref attribute */\n\t\tString refId = node.getTextContent();\n\t\tif (refId == null || refId.equals(\"\")){ \n\t\t\tfor (int i = 0; i< node.getAttributes().getLength(); i++) {\n//\t\t\t\tSystem.out.println(node.getAttributes().item(i).getNodeName()+\" :: \"+node.getAttributes().item(i).getTextContent());\n\t\t\t\tif (node.getAttributes().item(i).getNodeName().equals(refAttribute)){\n\t\t\t\t\t\trefId = node.getAttributes().item(i).getNodeValue();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString referedType = (String) refType2referedType.get(refType)\t;\t\n\t\t\n\t\tref = (Element) xsKeyNodes.get(referedType+\"#\"+refId);\t\t\n\t\treturn ref;\n\t}",
"com.hps.july.persistence.Worker getTechStuff() throws java.rmi.RemoteException, javax.ejb.FinderException;",
"public PrimObject reference(String name) {\n return resolveObject(name);\n }",
"public static Object lookupBean(String name) {\n BeanManager manager = lookupBeanManager();\n Set<Bean<?>> beans = manager.getBeans(name);\n if (beans != null && !beans.isEmpty()) {\n Bean<?> bean = beans.iterator().next();\n CreationalContext<?> context = manager.createCreationalContext(bean);\n return manager.getReference(bean, Object.class, context);\n }\n return null;\n }",
"String getServiceRef();",
"private Resource deployResource(Resource developmentResource) throws Exception {\n List<Resource> releaseResources = findResources(m_releaseRepo, getIdentityVersionRequirement(developmentResource));\n if (releaseResources.size() > 0) {\n return deployReleasedResource(releaseResources.get(0));\n }\n else {\n return deploySnapshotResource(developmentResource);\n }\n }",
"public String getDeploymentName() {\n return this.deploymentName;\n }",
"public String getDeploymentName() {\n return this.deploymentName;\n }",
"public String getResourceName(String ref){\n\t\treturn getResourceName(ref, true);\n\t}",
"public Entry find(Object key) {\n int hashCode = key.hashCode();\n int index = compFunction(hashCode);\n\n if(defTable[index].isEmpty()) {\n return null;\n }\n\n Entry entry = new Entry();\n ListNode current = defTable[index].front();\n\n try{\n while(true) {\n if(((Entry) current.item()).key().equals(key)) {\n entry.key = key;\n entry.value = ((Entry) current.item()).value();\n return entry;\n }\n if(current==defTable[index].back()) {\n break;\n }\n current = current.next();\n }\n } catch(Exception err) {\n System.out.println(err);\n }\n return null;\n }",
"public RTContainer container_element(RTContainer a, int element){\n\t\tif(a.getDecompGoals().size()>0 && a.getDecompPlans().size()==0)\n\t\t\treturn a.getDecompGoals().get(element); \n\t\telse \n\t\t\treturn a.getDecompPlans().get(element);\n\t}",
"public T find (T target);",
"@Override\n public GetDeploymentResponse executeRequest() throws MorpheusApiRequestException {\n return (GetDeploymentResponse) RequestHelper.executeRequest(GetDeploymentResponse.class, this, \"/api/deployments/\" + deploymentId, HttpPut.METHOD_NAME);\n }",
"public FileObject findResource(String name) {\n Enumeration en = getFileSystems ();\n while (en.hasMoreElements ()) {\n FileSystem fs = (FileSystem)en.nextElement ();\n FileObject fo = fs.findResource(name);\n if (fo != null) {\n // object found\n return fo;\n }\n }\n return null;\n }",
"public interface Deployer extends UpdatableDomainObject<Long> {\r\n\r\n /**\r\n * Retrieves the name of the deployer.\r\n * \r\n * @return Returns the name of the deployer.\r\n */\r\n String getName();\r\n\r\n /**\r\n * Retrieves the parameters that are part of this deployer.\r\n * \r\n * @return Returns a {@link List} of parameters or an empty one if no\r\n * parameters are needed.\r\n */\r\n List<DeployerParameterTemplate> getParameters();\r\n\r\n /**\r\n * Sets the parameters for this deployer.\r\n * \r\n * @param parameters\r\n * The parameters that should be set.\r\n */\r\n void setParameters(List<DeployerParameterTemplate> parameters);\r\n\r\n}",
"private String getSiteReference(Site site) {\r\n\tString siteId = site.getId();\r\n\tString val2 = contentHostingService.getSiteCollection(siteId);\r\n\tString refString = contentHostingService.getReference(val2);\r\n\treturn refString;\r\n }",
"public Object getObjectInstance(\n Object object, Name name, Context context, Hashtable environment) {\n if (object instanceof Reference) {\n Reference reference = (Reference) object;\n RefAddr url = reference.get(URL_PARAMETER);\n if (url != null && url.getContent() != null) {\n try {\n return getRepository(url.getContent().toString());\n } catch (Exception e) {\n return null;\n }\n }\n }\n return null;\n }",
"DeploymentDescriptor createDeploymentDescriptor();",
"boolean references(ResourceElement<S, V> referred, ResourceElement<?, ?> refers);",
"private Object findByNameProperty(String key, Collection collection) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException {\n for (Object candidate : collection) {\n Object candidateName = getProperty(candidate, \"name\");\n if (candidateName != null && key.equals(candidateName.toString())) {\n return candidate;\n }\n }\n return null;\n }",
"public void testFindContainersForLocation() {\n \t\t//should find the workspace root\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tIContainer[] result = root.findContainersForLocation(root.getLocation());\n \t\tassertEquals(\"1.0\", 1, result.length);\n \t\tassertEquals(\"1.1\", root, result[0]);\n \t\t\n \t\t//deep linked resource\n \t\tIProject p1 = root.getProject(\"p1\");\n \t\tIProject p2 = root.getProject(\"p2\");\n \t\tIFolder parent = p2.getFolder(\"parent\");\n \t\tIFolder link = parent.getFolder(\"link\");\n \t\tensureExistsInWorkspace(new IResource[] {p1, p2, parent}, true);\n \t\ttry {\n \t\t\tlink.createLink(p1.getLocationURI(), IResource.NONE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"1.99\", e);\n \t\t}\n \t\tresult = root.findContainersForLocation(p1.getLocation());\n \t\tassertEquals(\"2.0\", 2, result.length);\n \t\tboolean p1Found = false, linkFound = false;\n \t\tfor (int i = 0; i < result.length; i++) {\n \t\t\tif (result[i].equals(p1))\n \t\t\t\tp1Found = true;\n \t\t\telse if (result[i].equals(link))\n \t\t\t\tlinkFound = true;\n \t\t}\n \t\tassertTrue(\"2.1\", p1Found);\n \t\tassertTrue(\"2.2\", linkFound);\n \t\t\n \t\t// TODO add more tests\n \t}",
"public interface DeployRepository extends PagingAndSortingRepository<Deploy, Long> {\n public List<Deploy> findAll();\n\n //根据配置名称,获取配置值\n @Query(value = \"select de.value from Deploy de where de.name=:name\")\n public String getEmailTemplate(@Param(\"name\")String name);\n}",
"@Remote\npublic interface ExplorerService {\n\n /**\n * Return a list of items for the specified Path. The Path can be either:-\n * - A Project Root (i.e. folder containing pom.xml and parent of folder containing kmodule.xml)\n * - Within a Project Package (i.e. folder within Project Root and src/main/resources)\n * - Within a Project but outside of a Package (i.e. between pom.xml and src/main/resources)\n * - Other\n * @param path\n * @return\n */\n ExplorerContent getContentInScope( final Path path );\n\n}",
"@SuppressWarnings(\"all\")\n private Record findTarget() {\n final ConcurrentMap<String, Record> address = ORIGIN.getRegistryData();\n final String target = this.getValue(\"to\");\n final String name = this.getValue(\"name\");\n // 1. Find service names\n final List<Record> records = this.findRecords();\n final Record record = records.stream().filter(item ->\n target.equals(item.getMetadata().getString(\"path\")))\n .findAny().orElse(null);\n // Service Name\n Fn.outWeb(null == record, this.logger,\n _501RpcImplementException.class, this.getClass(),\n name, target, this.event);\n // Address Wrong\n Fn.outWeb(null == record.getMetadata() ||\n !target.equals(record.getMetadata().getString(\"path\")), this.logger,\n _501RpcAddressWrongException.class, this.getClass(),\n target, name);\n this.logger.info(Info.RECORD_FOUND, record.toJson());\n return record;\n }",
"public boolean containsByReference(ParameterReference ref);",
"private org.apache.maven.artifact.Artifact findMatchingArtifact(MavenProject project, Artifact requestedArtifact) {\n String requestedRepositoryConflictId = getConflictId(requestedArtifact);\n\n org.apache.maven.artifact.Artifact mainArtifact = project.getArtifact();\n if (requestedRepositoryConflictId.equals(getConflictId(mainArtifact))) {\n return mainArtifact;\n }\n\n Collection<org.apache.maven.artifact.Artifact> attachedArtifacts = project.getAttachedArtifacts();\n if (attachedArtifacts != null && !attachedArtifacts.isEmpty()) {\n for (org.apache.maven.artifact.Artifact attachedArtifact : attachedArtifacts) {\n if (requestedRepositoryConflictId.equals(getConflictId(attachedArtifact))) {\n return attachedArtifact;\n }\n }\n }\n\n return null;\n }",
"@Override\n\tpublic RenWutable findByName(String name) {\n\t\treturn null;\n\t}",
"private void readEntityDeploymentAssociations() {\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n readDeployAssociations(info);\n }\n }",
"public ServiceInstance lookupInstance(String serviceName);",
"public interface EjbReference extends NamedInformation, InjectionCapable {\n \n /** \n * Get the type of the EJB (Session, Entity or Message-Driven). \n * @return the type of the EJB.\n */\n public String getType();\n\n /**\n * Set the type of the EJB. Allowed values are Session, Entity or\n * Message-driven.\n * @param the type of the EJB.\n */\n public void setType(String type);\n\n /** \n * Gets the home classname of the referee EJB. \n * @return the class name of the EJB home.\n */\n public String getEjbHomeInterface();\n\n /** \n * Sets the local or remote home classname of the referee EJB. \n * @param the class name of the EJB home.\n */\n public void setEjbHomeInterface(String ejbHomeInterface);\n\n /** \n * Gets the local or remote interface classname of the referee EJB. \n * @return the classname of the EJB remote object.\n */\n public String getEjbInterface();\n\n /** \n * Sets the local or remote bean interface classname of the referee EJB. \n * @param the classname of the EJB remote object.\n */\n public void setEjbInterface(String ejbInterface);\n \n /** \n * Gets the link name of the reference. For use when linking to an EJB \n * within a J2EE application. \n * @return the link name.\n */\n public String getLinkName();\n\n /** \n * Sets the link name of the reference. For use when linking to an EJB \n * within a J2EE application. \n * @param the link name.\n */\n public void setLinkName(String linkName);\n \n /**\n * Tests if the reference to the referree EJB is through local or \n * remote interface\n * @return true if using the local interfaces\n */\n public boolean isLocal();\n \n /**\n * Sets whether the reference uses the local or remote interfaces of \n * the referring EJB\n * @param true if using the local interface\n */\n public void setLocal(boolean isLocal);\n \n /**\n * Set the referring bundle, i.e. the bundle within which this\n * EJB reference is declared. \n */\n public void setReferringBundleDescriptor(BundleDescriptor referringBundle);\n\n /**\n * Get the referring bundle, i.e. the bundle within which this\n * EJB reference is declared. \n */\n public BundleDescriptor getReferringBundleDescriptor();\n \n /**\n * Set the jndi name for this ejb reference\n */\n public void setJndiName(String jndiName);\n \n /**\n * @return the jndi name for this ejb reference\n */\n public String getJndiName();\n\n public boolean hasJndiName();\n\n public boolean hasLookupName();\n public String getLookupName();\n \n public EjbDescriptor getEjbDescriptor();\n public void setEjbDescriptor(EjbDescriptor descriptor);\n\n /**\n * @return true if the EJB reference is a 30 client view\n */\n public boolean isEJB30ClientView();\n\n}",
"private StoragePort lookupVPlexFrontStoragePortByName(DbClient dbClient, StorageHADomain vplexDirector, String name) {\n String cacheKey = generateStoragePortKey(vplexDirector, name);\n // Check if this is something that we encountered that does not look to be a StoragePort\n if (NOT_PORTS.contains(cacheKey)) {\n return null;\n }\n StoragePort port = (StoragePort) OBJECT_CACHE.get(cacheKey);\n if (port == null) {\n port = findStoragePortByNameInDB(dbClient, vplexDirector, name);\n if (port != null) {\n OBJECT_CACHE.put(cacheKey, port);\n return port;\n } else {\n // Stash as not a StoragePort\n NOT_PORTS.add(cacheKey);\n }\n }\n return port;\n }",
"private String locateTargetSiteCrb(Site copyOriginSite) {\n return copyOriginSite.getWebAPIConnection().resolve(SiteWebApi.class)\n .listCopyRepositories().iterator().next().getUrn();\n }",
"Optional<Resource> find(Session session, IRI identifier);",
"public <T> T lookup(String jndiName);",
"private static RubyProject findRubyProject(Project aweProject, String rubyProjectName) {\r\n \t\tfor (RubyProject ruby : aweProject.getElements(RubyProject.class)) {\r\n \t\t\tif (ruby.getName().equals(rubyProjectName)) {\r\n \t\t\t\treturn ruby;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}",
"private com.hps.july.persistence.EquipmentSet ejbRef() throws java.rmi.RemoteException {\n if ( ejbRef == null )\n return null;\n if ( __ejbRef == null )\n __ejbRef = (com.hps.july.persistence.EquipmentSet) PortableRemoteObject.narrow(ejbRef, com.hps.july.persistence.EquipmentSet.class);\n\n return __ejbRef;\n }",
"public abstract List<AbstractDeploymentArtifact> getDeploymentArtifacts();",
"public static Service retrieve(String code) {\n \treturn find.ref(code); \n }",
"public Object elGetReference(Object bean);",
"Repository findByName(String name);",
"@SuppressWarnings(\"unchecked\")\r\n\t@Test\r\n\tpublic void testDeployAndFindProcessDefinition()\r\n\t{\r\n\t\tthis.processDefinition = this.jbpmService.parseXMLResource(PROCESS_FILE);\r\n\r\n\t\tthis.jbpmService.deployProcessDefinition(this.processDefinition);\r\n\r\n\t\tProcessDefinition processDefFromDb = this.jbpmService.findLatestProcessDefinition(this.processDefinition.getName());\r\n\t\t\r\n\t\t// All nodes equal?\r\n\t\tList<Node> origNodes = this.processDefinition.getNodes();\r\n\t\tList<Node> rndTripNodes = processDefFromDb.getNodes();\r\n\t\tassertTrue(origNodes.size() == rndTripNodes.size());\r\n\t\tint idx = 0;\r\n\t\tfor (Object origObjNode : origNodes)\r\n\t\t{\r\n\t\t\tNode origNode = (Node) origObjNode;\r\n\t\t\tNode rndTripNode = (Node) (rndTripNodes.get(idx++));\r\n\t\t\tassertTrue(origNode.getName().equals(rndTripNode.getName()));\r\n\t\t\tassertTrue(origNode.getId() == rndTripNode.getId());\r\n\t\t\tassertTrue(origNode.getParent().getName().equals(rndTripNode.getParent().getName()));\r\n\t\t}\r\n\t}",
"LinkedService get(String resourceGroupName, String workspaceName, String linkedServiceName);",
"@Override\n public Object getReferenced(Optional<?> reference) {\n return reference.orElse(null);\n }",
"java.lang.String getDeployedIndexId();",
"public Object lookup(String key){\n ListNode<String,Object> temp = getNode(key);\n if(temp != null)\n return temp.value;\n else\n return null;\n }",
"public Asset findAsset(Task t){\n Asset found = getAssetFromTask (t);\n return found;\n }",
"@SuppressWarnings(\"unused\")\n @Provides\n @Singleton\n private DeploymentType provideDeploymentsType() {\n return deploymentType;\n }",
"SyncRecord findObject(String name, int type) throws NotFoundException\r\n\t{\r\n\t\tfor (int i=0; i<syncTable.size(); i++)\r\n\t\t{\r\n\t\t\tSyncRecord myrec = (SyncRecord)syncTable.elementAt(i);\r\n\t\t\tif ((myrec.name).equals(name) && (myrec.type)==type)\r\n\t\t\t\treturn myrec;\r\n\t\t}\r\n\t\tthrow new NotFoundException();\r\n\t}",
"String getExecRefId();",
"public interface BillInfoRepository extends MongoRepository<BillInfo, String>{\n\n BillInfo findByBillRefNo(String BillRefNo);\n\n}",
"public AssetRef retrieveRef(String name) throws IOException, SQLException {\n String select = \"select definition_id, name, ref from ASSET_REF where name = ?\";\n try (Connection conn = getDbConnection();\n PreparedStatement stmt = conn.prepareStatement(select)) {\n stmt.setString(1, name);\n try (ResultSet rs = stmt.executeQuery()) {\n if (rs.next()) {\n return new AssetRef(name, rs.getLong(\"definition_id\"), rs.getString(\"ref\"));\n }\n }\n }\n return null;\n }",
"private int getIndexInList(List aDeployList, String aName) {\n for (int i = 0; i < aDeployList.size(); i++) {\n\n List innerList = (ArrayList) aDeployList.get(i);\n String currentCPName = ((CasProcessor) innerList.get(0)).getProcessingResourceMetaData()\n .getName();\n if (aName != null && aName.trim().equals(currentCPName.trim())) {\n return i;\n }\n }\n return 0;\n }",
"private Variable findVariable(String varToFind){\r\n\t\tScope curScope = this;\r\n\t\twhile (curScope!=null) {\r\n\t\t\tif(curScope.contains(varToFind)){\r\n\t\t\t\treturn curScope.getVariable(varToFind);\r\n\t\t\t}else{\r\n\t\t\t\tcurScope = curScope.parent;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public UrbanDeploySite getSite() {\r\n UrbanDeploySite[] sites = DESCRIPTOR.getSites();\r\n if (siteName == null && sites.length > 0) {\r\n // default\r\n return sites[0];\r\n }\r\n for (UrbanDeploySite site : sites) {\r\n if (site.getDisplayName().equals(siteName)) {\r\n return site;\r\n }\r\n }\r\n return null;\r\n }",
"Optional<V> lookup(K k);",
"Artifact getArtifact(String version) throws ArtifactNotFoundException;",
"@Override\n\tpublic T find(T targetElement) {\n\t\tif(contains(targetElement))\n\t\t return targetElement;\n\t\telse \n\t\t\treturn null;\n\t\t\n\t}",
"SolutionRef getCurrentSolution();",
"@Override\n public String deploy(String applicationName, Environment environment, Component component) {\n return null;\n }",
"private Target getMatchingTarget(Element targetElement)\n {\n String targetName = targetElement.getAttribute(\"name\").getValue();\n\n for (Target target : targets)\n {\n String label = target.getName();\n\n if (label.equals(targetName))\n {\n return target;\n }\n }\n\n return null;\n }",
"public Entry find(Object key) {\n int i = compFunction(key.hashCode());\n SList chain = buckets[i];\n try {\n for (SListNode n = (SListNode) chain.front(); n.isValidNode(); n = (SListNode) n.next()) {\n Entry e = (Entry) n.item();\n if (e.key.equals(key)) {\n return e;\n }\n }\n } catch(InvalidNodeException e) {\n System.out.println(e);\n }\n return null;\n }",
"public Class<? extends Annotation> getDeploymentType()\n {\n return _deploymentType;\n }",
"@Override\n @Cacheable(value = \"wfDeployResource\", key = \"\\\"deploymentId=\\\" + #deploymentId + \\\" resourceCode=\\\" + #resourceCode\")\n public String getResourceContent(String deploymentId, String resourceCode) {\n logger.info(\"load deploy resource from db/IO. deploymentId={}, resourceCode={}\", deploymentId, resourceCode);\n InputStream in = this.deployDao.getResource(deploymentId, resourceCode);\n try {\n return new String(FileCopyUtils.copyToByteArray(in), \"UTF-8\");\n } catch (IOException e) {\n throw new CoreException(e);\n }\n }",
"Optional<Company> findByName(String name);",
"@Override\n public Persistable locatePersistentReference(final String guid, final Class<?> clazz) throws SyncToolConfigurationException {\n for (final EntityLocator locator : entityLocators) {\n if (locator.isResponsibleFor(clazz)) {\n return locator.locatePersistentReference(guid, clazz);\n }\n }\n throw new SyncToolConfigurationException(COULD_NOT_FIND + clazz.getName() + AT_CONFIGURATION);\n }"
] | [
"0.55745804",
"0.545345",
"0.5416131",
"0.54142684",
"0.5390493",
"0.5094392",
"0.50744855",
"0.4970015",
"0.49570495",
"0.4953929",
"0.4883444",
"0.4846162",
"0.48436332",
"0.48120567",
"0.4784141",
"0.47829473",
"0.47747567",
"0.4772457",
"0.4771788",
"0.47475374",
"0.47466788",
"0.470742",
"0.46875346",
"0.46583003",
"0.46488354",
"0.46356982",
"0.46288133",
"0.46213433",
"0.4605783",
"0.46047673",
"0.46036682",
"0.4601837",
"0.45970958",
"0.45962885",
"0.45688343",
"0.45622957",
"0.45614573",
"0.45565432",
"0.45508423",
"0.45155033",
"0.45116717",
"0.4504077",
"0.44999564",
"0.44999564",
"0.44730482",
"0.44692165",
"0.4455846",
"0.44543982",
"0.4453707",
"0.4452675",
"0.4451602",
"0.4451353",
"0.44373477",
"0.4435026",
"0.44239944",
"0.4420996",
"0.44189999",
"0.44162607",
"0.44130373",
"0.4412937",
"0.44100517",
"0.4402986",
"0.44016373",
"0.4395263",
"0.43945274",
"0.43924192",
"0.43898267",
"0.4388088",
"0.43877086",
"0.43860796",
"0.4378522",
"0.4378146",
"0.43721113",
"0.43720496",
"0.43636116",
"0.43601763",
"0.43533987",
"0.43516976",
"0.4344674",
"0.43445703",
"0.4340802",
"0.43389228",
"0.43369767",
"0.43304718",
"0.432707",
"0.4318963",
"0.4318262",
"0.4309836",
"0.43090826",
"0.43082717",
"0.4304622",
"0.43026856",
"0.42986488",
"0.42930788",
"0.42917988",
"0.42878252",
"0.4285512",
"0.42829534",
"0.4281056",
"0.42740935",
"0.4273442"
] | 0.0 | -1 |
Find by ID of reference: deployment.id | public List<ActProcessDefinition> findByDeploymentId(String deploymentId) {
return (List<ActProcessDefinition>) this
.getEntityManager()
.createQuery(
"select e from ActProcessDefinition e where e.deployment.id = :pDeploymentId",
ActProcessDefinition.class)
.setParameter("pDeploymentId", deploymentId).getResultList();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n @ResponseBody\n public Deployment getDeployment(@PathVariable(\"id\") String id) {\n return processService.getDeployment(id);\n }",
"public IDeploymentTarget findTarget(ITMWProject project, String id) {\n return null;\r\n }",
"@Override\n public EnvironmentVariable find(Long id) throws Exception {\n return null;\n }",
"@Override\n public Optional<Container> findOne(String id) {\n log.debug(\"Request to get Container : {}\", id);\n return containerRepository.findById(id);\n }",
"private Optional<V1Deployment> existingDeployment(AppsV1Api appsApi) {\n try {\n return Optional.of(appsApi.readNamespacedDeployment(config.getName(),config.getNamespace(),null,false,false));\n } catch (ApiException e) {\n return Optional.empty();\n }\n }",
"E find(final ID identifier) throws ResourceNotFoundException;",
"public Object lookup(String id) {\n return null;\n }",
"public BlogEntry findBlogEntry(Long id);",
"java.lang.String getDeployedIndexId();",
"private ResourceLocation findMatchingEntry(String publicId) {\n return getElements().stream()\n .filter(e -> e.getPublicId().equals(publicId)).findFirst()\n .orElse(null);\n }",
"ReferenceData findById(ReferenceDataId id) throws DataException;",
"@Override\n\tpublic PI findById(Long id) throws NotFoundException {\n\t\treturn null;\n\t}",
"Recipe findRecipeById(Long id) throws ServiceFailureException;",
"E find(Id id) throws RepositoryException;",
"public final E find(final K id) {\n return getJpaTemplate().find(getEntityClass(), id);\n }",
"private SiteReservation findById(Integer id){\n SiteReservation reservation;\n try {\n reservation = repo.findById(id).get();\n } catch (NoSuchElementException e){\n throw new ReservationNotFoundException(id);\n }\n return reservation;\n }",
"@Override\r\n\tpublic void find(Integer id) {\n\r\n\t}",
"public Conge find( Integer idConge ) ;",
"public Service findById(int theId);",
"DcsResourceDO findResourceForUpdate(String resourceId);",
"Optional<Job> findOne(String id);",
"String getExecRefId();",
"public Blog FindById(String id) {\n\t\treturn null;\r\n\t}",
"Tag findById(int id);",
"public AssetRef retrieveRef(Long id) throws IOException, SQLException {\n String select = \"select definition_id, name, ref from ASSET_REF where definition_id = ?\";\n try (Connection conn = getDbConnection();\n PreparedStatement stmt = conn.prepareStatement(select)) {\n stmt.setLong(1, id);\n try (ResultSet rs = stmt.executeQuery()) {\n if (rs.next()) {\n return new AssetRef(rs.getString(\"name\"), id, rs.getString(\"ref\"));\n }\n }\n }\n return null;\n }",
"public Application findApplication(Long id)\n {\n for (Application app : _apps) {\n if (app.getId().equals(id)) {\n return app;\n }\n }\n\n return null;\n }",
"@Override\n\tpublic Resource findLinkById(Integer id) {\n\t\treturn em.find(Resource.class, id);\n\t}",
"public Recipe findById(Long id) {\n\t\tOptional<Recipe> findRecipe = recipeRepository.findById(id);\n\t\tif(findRecipe.isPresent()) {\n\t\t\treturn findRecipe.get();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n public T findById(Long id) {\n return manager.find(elementClass, id);\n }",
"public ConProcess getById(int id) throws AppException;",
"public org.biocatalogue.x2009.xml.rest.ServiceDeployment getServiceDeployment()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.ServiceDeployment target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.ServiceDeployment)get_store().find_element_user(SERVICEDEPLOYMENT$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }",
"Concept getConcept(String id);",
"private int getIndex(String id) {\n for (int i = 0; i < this.container.size(); i++) {\n if (id.equals(this.container.get(i).getId())) {\n return i;\n }\n }\n return -1;\n }",
"@Override\n public ProductBacklog findProductBacklogById(String id) {\n return backlogRepository.findOne(id);\n }",
"public Container findById(long id) {\n\t\tSession currentSession = em.unwrap(Session.class);\n\t\t\n\t\tContainer container = currentSession.get(Container.class, id);\n\t\t\n\t\treturn container;\n\t}",
"Optional<Resource> find(Session session, IRI identifier);",
"@Override\n @Transactional(readOnly = true)\n public Optional<RefSiteDTO> findOne(Long id) {\n log.debug(\"Request to get RefSite : {}\", id);\n return refSiteRepository.findById(id)\n .map(refSiteMapper::toDto);\n }",
"Persistent getResolved(Map id) {\n return resolved.get(id);\n }",
"@Override\n\tpublic Historico findById(Long id) throws ApplicationException {\n\t\treturn null;\n\t}",
"Corretor findOne(Long id);",
"public Vacuna findById(Long id) {\n\t\tVacuna vacuna = vacunaRepository.findById(id).orElseThrow(() -> new RuntimeException(\"La vacuna no existe...\"));\n\t\treturn vacuna;\n\t}",
"RouteBean findRouteId(String routeID);",
"@Transactional(readOnly = true)\n public Optional<ScriptParam> findOne(Long id) {\n log.debug(\"Request to get ScriptParam : {}\", id);\n return scriptParamRepository.findById(id);\n }",
"public Object getResource(String id) {\n\t\tint idx = rks.indexOf(id);\n\t\tif (idx < 0) throw new NoSuchElementException(id);\n\t\telse return rvs.get(idx);\n\t}",
"public Optional<CheckingAcc> find(Long id){\n if (checkingAccRepository.findById(id).isPresent()){\n return checkingAccRepository.findById(id);\n } else {\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"There is no account with the provided id\");\n }\n }",
"Permanent getPermanent(UUID permanentId);",
"public Voto find(int id ) { \n\t\treturn em.find(Voto.class, id);\n\t}",
"public Company findCompany(long id);",
"public SegmentRefOrGroup get(Set<SegmentRefOrGroup> structure, String id){\n \treturn structure.stream().filter(x -> x.getId().equals(id)).findFirst().orElse(null);\n }",
"static Env find (Env env, String targetKey) {\n for (; env != null; env = env.next) {\n if (env.key.equals (targetKey)) {\n return env;\n }\n }\n return null;\n }",
"@GetMapping(\"/rest/{id}\")\n\t\tpublic @ResponseBody Optional<Transaction> findTranscationRest(@PathVariable(\"id\") Long transactionId) {\n\t\t\tUserDetails user = (UserDetails) SecurityContextHolder.getContext()\n\t\t\t\t\t.getAuthentication().getPrincipal();\n\t\t\tString username = user.getUsername();\n\t\t\tUser currentUser = userRepo.findByUsername(username);\n\t\t\tList<Transaction> transactions = traRepo.findByUser(currentUser);\n\t\t\tfor(int i = 0; i < transactions.size(); i++) {\n\t\t\t\tif(transactions.get(i).getId() == transactionId) {\n\t\t\t\t\ttransactionId = transactions.get(i).getId();\n\t\t\t\t\treturn traRepo.findById(transactionId);\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t}\n\t\t\treturn Optional.empty();\n\t\t}",
"public NetElement lookupNetElement(String id);",
"private Basket findById(int idBasket) {\n\t\treturn null;\n\t}",
"E findById(K id);",
"public Product findProduct(int id)\n {\n for(Product product : stock)\n {\n if(id == product.getID())\n {\n return product;\n }\n }\n System.out.println(\"Error: Could not find ID: \" + id);\n return null;\n }",
"@Transactional\r\n\tpublic Blog findById(String id) {\n\t\tString hql = \"from Blog where id=\" + \"'\" + id + \"'\";\r\n\t\tQuery query =(Query) sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\tList<Blog> listBlog= (List<Blog>) query.getResultList();\r\n\t\tif (listBlog!= null && !listBlog.isEmpty()) {\r\n\t\t\treturn listBlog.get(0);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Dependent getDependent(String id) {\n\t\tOptional<Dependent> dependent = depDao.findById(id);\n\t\tif(dependent.isPresent())\n\t\t\treturn dependent.get();\n\t\telse\n\t\t\treturn null;\n\t}",
"@Override\n\tpublic Eleve findById(int id) {\n\t\treturn map.get(id);\n\t}",
"@Override\n @Cacheable(value = \"wfDeployResource\", key = \"\\\"deploymentId=\\\" + #deploymentId + \\\" resourceCode=\\\" + #resourceCode\")\n public String getResourceContent(String deploymentId, String resourceCode) {\n logger.info(\"load deploy resource from db/IO. deploymentId={}, resourceCode={}\", deploymentId, resourceCode);\n InputStream in = this.deployDao.getResource(deploymentId, resourceCode);\n try {\n return new String(FileCopyUtils.copyToByteArray(in), \"UTF-8\");\n } catch (IOException e) {\n throw new CoreException(e);\n }\n }",
"public Build findBuild(int buildID){\n for (int i = 0; i < buildHistory.size(); i++) {\n if(buildHistory.get(i).getBuildID() == buildID){\n return buildHistory.get(i);\n }\n }\n return null;\n }",
"public abstract ArrayList<T> findFromReference(int id);",
"@Transactional(readOnly = true)\n public Optional<ItemInstance> findOne(Long id) {\n log.debug(\"Request to get ItemInstance : {}\", id);\n return itemInstanceRepository.findById(id);\n }",
"public Optional<Transaction> findTransactionById(int id);",
"V get(K id);",
"String getId() throws RepositoryException;",
"private WebApp findWebAppForDep(final App.Dependency dep, final Set<WebApp> webApps) {\n\t\tfor (final WebApp webApp : webApps) {\n\t\t\tif (webApp.getFullName().equalsIgnoreCase(dep.getName())) {\n\t\t\t\treturn webApp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"String getArtifactId();",
"Optional<ServiceAppliedStatusHistory> findOne(Long id);",
"private Optional<Payments> findPaymentById(Integer id) {\n return paymentsList.stream()\n .filter(payment -> payment.getId().equals(id))\n .findAny();\n }",
"private static Person findPersonById(int id) {\n Person personReturn = null;\n\n for (Person person : persons) {\n if (id == person.getId()) {\n personReturn = person;\n }\n }\n\n return personReturn;\n }",
"@Override\n\tpublic DomainObject find(long id) {\n\t\treturn null;\n\t}",
"private RevObject getRevObject(ObjectId anId)\n{\n RevWalk rwalk = new RevWalk(getRepo());\n try { return rwalk.parseAny(anId); }\n catch(Exception e) { throw new RuntimeException(e); }\n}",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n public void deleteDeployment(@PathVariable(\"id\") String id, HttpServletResponse response) {\n Deployment deployment = processService.getDeployment(id);\n if (deployment == null) {\n response.setStatus(HttpServletResponse.SC_NOT_FOUND); // 404\n } else {\n processService.deleteDeployment(id);\n response.setStatus(HttpServletResponse.SC_NO_CONTENT); // 204\n }\n\n }",
"@Override\n public Workload get(@NotNull UUID id) throws InstanceNotFoundException {\n return workloadRepository.findById(id)\n .orElseThrow(new PersistentExceptionSupplier(new InstanceNotFoundException(id)));\n }",
"static ElementalDefinition forId(int id) {\r\n for (ElementalDefinition def : ElementalDefinition.values()) {\r\n if (def != null) {\r\n if (def.getId() == id) {\r\n return def;\r\n }\r\n }\r\n }\r\n return null;\r\n }",
"protected static int findResourceInList(List resources, String id)\n\t{\n\t\tfor (int i = 0; i < resources.size(); i++)\n\t\t{\n\t\t\t// if this is the one, return this index\n\t\t\tif (((BrowseItem) (resources.get(i))).getId().equals(id)) return i;\n\t\t}\n\n\t\t// not found\n\t\treturn -1;\n\n\t}",
"public AuditLogAction findById(String id) {\r\n log.debug(\"getting AuditLogAction instance with id: \" + id);\r\n try {\r\n AuditLogAction instance = (AuditLogAction) this.getHibernateSession().get(AuditLogAction.class, id);\r\n return instance;\r\n } catch (Exception re) {\r\n log.error(\"get failed\", re);\r\n throw new RuntimeException(re);\r\n }\r\n }",
"@Transactional(readOnly = true) \n public TaskProject findOne(Long id) {\n log.debug(\"Request to get TaskProject : {}\", id);\n TaskProject taskProject = taskProjectRepository.findOne(id);\n return taskProject;\n }",
"private DBObject getById(MongoDbServer entity, String id) throws Exception {\n MongoClient mongoClient = new MongoClient(entity.getAttribute(SoftwareProcess.HOSTNAME));\n try {\n DB db = mongoClient.getDB(TEST_DB);\n DBCollection testCollection = db.getCollection(TEST_COLLECTION);\n DBObject doc = testCollection.findOne(new BasicDBObject(\"_id\", new ObjectId(id)));\n return doc;\n } finally {\n mongoClient.close();\n }\n }",
"@GetMapping(\"/dependencies/{id}\")\n @Timed\n public ResponseEntity<Dependency> getDependency(@PathVariable Long id) {\n log.debug(\"REST request to get Dependency : {}\", id);\n Dependency dependency = dependencyService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(dependency));\n }",
"PSTemplateSummary find(String id) throws PSDataServiceException;",
"@Override\n\tpublic Carpo findCar(String id) {\n\t\treturn inList.find(id);\n\t}",
"Contract findById(int id);",
"static WorkflowRun findRun(String externalizableId) {\n Run run = Run.fromExternalizableId(externalizableId);\n if (run == null) {\n throw new NullPointerException(\"not run found for id `\" + externalizableId + \"` this should not happen here.\");\n }\n if (!(run instanceof WorkflowRun)) {\n throw new NullPointerException(\"run with id `\" + externalizableId + \"` cannot be an instance of WorkflowRun.\");\n }\n return (WorkflowRun) run;\n }",
"@Override\n\tpublic Audit getOne(Integer id) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Optional<Audit> findById(Integer id) {\n\t\treturn null;\n\t}",
"ProductCategory find(int id)throws IllegalArgumentException;",
"public Integer ejbFindByPrimaryKey(final Integer id)\n throws FinderException\n {\n PreparedStatement ps = null;\n try \n {\n ps = getConnection().prepareStatement(\"SELECT ID FROM CCBMPACCOUNT WHERE ID = ?\");\n ps.setInt(1, id.intValue());\n ResultSet rs = ps.executeQuery();\n if (!rs.next()) \n {\n throw new ObjectNotFoundException(\"No such account: \" + id);\n } // end of if ()\n rs.close();\n\n }\n catch (Exception e)\n {\n Category.getInstance(getClass().getName()).info(\"Exception in findByPK\", e);\n throw new EJBException(\"Problem in findByPrimaryKey: \" + e);\n } // end of try-catch\n finally\n {\n try \n {\n if (ps != null) {ps.close();}\n }\n catch (Exception e)\n {\n Category.getInstance(getClass().getName()).info(\"Exception closing ps: \" + e);\n } // end of try-catch\n } // end of finally\n return id;\n }",
"void changeDeploymentParentDeploymentId(String deploymentId, String newParentDeploymentId);",
"public int get(int id) {\r\n return configurations[id];\r\n }",
"@Override\n @Transactional(readOnly = true)\n public Optional<Recipe> findOne(Long id) {\n log.debug(\"Request to get Recipe : {}\", id);\n return recipeRepository.findById(id);\n }",
"public Part lookupPart(int partId) {\n for( Part part : allParts ) {\n if(part.getId() == partId) {\n return part;\n }\n }\n return null;\n }",
"Optional<OrdPaymentRefDTO> findOne(Long id);",
"public Part lookupPart(int partId) {\n for(Part part : allParts) {\n if(part.getId() == partId) {\n return part;\n }\n }\n \n return null;\n }",
"@Override\r\n\tpublic Element findById(int id) {\n\t\t\r\n\t\treturn em.find(Element.class, id);\r\n\t}",
"@Nullable\n public static EnvoyContainer getEnvoy(String id){\n if(!hasEnvoy(id)){\n return null;\n }\n return envoys.get(id);\n }",
"public Karton findOne(Integer id) {\n\t\treturn kartonRepository.findById(id).orElseGet(null);\n\t}",
"public Warehouse find(Integer id) {\n\t\t return warehouseDAO.find(id);\r\n\t\t\r\n\t}",
"@Override\n\tpublic Owner findById(Long id) {\n\t\treturn ownerRepository.findById(id).orElse(null);\n\t}",
"@Override\n\tpublic Object findByID(Serializable id) {\n\t\treturn getSession().get(DirectTalentAdvertBean.class, id);\n\t}",
"@Override\n\tpublic String findId(String name) throws Exception {\n\t\treturn null;\n\t}"
] | [
"0.62308764",
"0.588686",
"0.57650524",
"0.5469259",
"0.54275936",
"0.5271427",
"0.5241",
"0.5169751",
"0.51611173",
"0.51004773",
"0.5097516",
"0.50684416",
"0.50680196",
"0.50554925",
"0.5045578",
"0.5024132",
"0.50237906",
"0.50230527",
"0.5022186",
"0.5020842",
"0.50163054",
"0.49950892",
"0.49898115",
"0.4966847",
"0.4953869",
"0.4940505",
"0.49184868",
"0.4918228",
"0.491783",
"0.49132454",
"0.4906078",
"0.4902014",
"0.48849928",
"0.48840064",
"0.48809785",
"0.48785767",
"0.48781145",
"0.48678222",
"0.4864564",
"0.48629427",
"0.48625687",
"0.4858285",
"0.48471054",
"0.4845764",
"0.4838317",
"0.48370728",
"0.48329037",
"0.48221403",
"0.482109",
"0.48113665",
"0.48018104",
"0.47959074",
"0.47906804",
"0.47793782",
"0.47763366",
"0.47761935",
"0.47752538",
"0.47658712",
"0.47653157",
"0.47582737",
"0.47548056",
"0.4751865",
"0.47460935",
"0.4745409",
"0.4745193",
"0.47418514",
"0.47390252",
"0.4736634",
"0.47349134",
"0.47319865",
"0.47275397",
"0.47257727",
"0.4725612",
"0.47247052",
"0.4723851",
"0.47231087",
"0.47216403",
"0.47163403",
"0.47121248",
"0.47042802",
"0.47034743",
"0.46986452",
"0.4688057",
"0.4687853",
"0.46862912",
"0.46853405",
"0.46839976",
"0.46769252",
"0.46710557",
"0.4668363",
"0.4668076",
"0.46614683",
"0.46608052",
"0.46588513",
"0.46567813",
"0.46557635",
"0.46547568",
"0.46535003",
"0.465326",
"0.46524358",
"0.46506113"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int getCount() {
return resInfo.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Object getItem(int position) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.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 | @Override
public long getItemId(int position) {
return 0;
} | {
"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 |
click on the Sign in button | public boolean isSuccessful() {
//loadSettingsFromFile(filePath);
Login();
if (EXPECTED_TITLE.equals(driver.getTitle()))
return true;
else
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void click_SIGN_IN() {\r\n\t\tbtn_SIGN_IN.click();\r\n\t}",
"public void clickSignIn() {\r\n\t\tdriver.findElement(signIn).click();\r\n\t}",
"public void clickSignInButton() {\r\n\t\tdriver.findElement(signInButton).click();\r\n\t}",
"public void clickSignInButton() {\r\n\t\tsignInButton = driver.findElement(signInButtonSelector);\r\n\t\tsignInButton.click();\r\n\t\t\r\n\t}",
"public void ClickSignIn() {\n if (lnkSignIn.isDisplayed()) {\n lnkSignIn.click();\n }\n else{System.out.println(\"Sign In link is not displayed\");\n }\n }",
"private void clickSignOn() {\n\t\tthis.clickElement(signon);\n\t}",
"public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}",
"public void clickLoginBtn() {\r\n\t\tthis.loginBtn.click(); \r\n\t}",
"public void clickOnLoginButton(){\n\t\tthis.loginButton.click();\n\t}",
"public void clickSignInLink()\n\t{\n \telementUtils.performElementClick(wbSignInLink);\n\t}",
"public void onSignInClick(MouseEvent e) {\n\t\tsignin();\n\t}",
"public SignInPage clickSignin() {\n\t\tclick(SIGNIN_LOCATOR);\n\t\treturn new SignInPage(driver);\n\t\t\n\t}",
"public void clickLogin() {\r\n\t\tdriver.findElement(SignIn).click();\r\n\t\t//SignIn.click();\r\n\t\t//SignIn.click();\r\n\t\t//return new LoginPage();\r\n\t}",
"public void clickLogin() {\n\t\tcontinueButton.click();\n\t}",
"void onSignInButtonClicked();",
"public void clickLogin() {\n\t\t driver.findElement(loginBtn).click();\n\t }",
"@And(\"^I click the signin button$\")\n public void iClickTheSigninButton() throws Throwable {\n }",
"public void clickIconSignin()\n\t{\n \telementUtils.performElementClick(wbIconSignin); //wbIconSignin.click();\n\t}",
"public void clickOnLoginButton() {\n\t\tutil.clickOnElement(this.loginPageLocators.getLoginButtonElement());\n\t}",
"public void clickOnLogin() {\n\t\tWebElement loginBtn=driver.findElement(loginButton);\n\t\tif(loginBtn.isDisplayed())\n\t\t\tloginBtn.click();\n\t}",
"@Given(\"^I am on the Sign in page$\")\n\tpublic void I_am_on_the_Sign_in_page() throws Throwable {\n\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.linkText(\"Sign in\")).click();\n\t}",
"@When(\"I click on log in\")\n\tpublic void i_click_on_log_in() {\n\t\tlogger.info(\"Clicking on Sign in\");\n\t\thomepage.login.click();\n\t\tBrowserUtilities.waitFor(2);\n\n\t}",
"public HomePage clickOnSignInButton() {\n driver.findElement(signInButton).submit();\n\n // Return a new page object representing the destination. Should the login page\n // ever\n // go somewhere else (for example, a legal disclaimer) then changing the method\n // signature\n // for this method will mean that all tests that rely on this behaviour won't\n // compile.\n return new HomePage(driver);\n }",
"public void clickLoginButton() {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the login button is available or not\");\n\t\tAssert.assertTrue(clickLoginButton.isDisplayed());\n\t\tclickLoginButton.click();\n\t}",
"private void signIn() {\n }",
"public void clickLogin(){\n\t\tdriver.findElement(login).click();\n\t}",
"public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}",
"public void clickLogin(){\n\t\t\tdriver.findElement(login).click();\n\t}",
"@Override\n public void onSignInClicked() {\n Prefs.setSignedIn(true);\n // Proceed to Main and finish\n proceedToMainActivityAndFinish();\n }",
"public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}",
"private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"@Test\r\n\tpublic void test_2_SignIn() {\n\t\tdriver.findElement(By.cssSelector(\"#nav-link-accountList > span.nav-line-2\")).click();\r\n\t\tString signIn = driver.getTitle();\r\n\t\tAssert.assertEquals(signIn, \"Amazon Sign In\");\r\n\t\t// enter email\r\n\t\tdriver.findElement(By.id(\"ap_email\")).sendKeys(email);\r\n\t\t// enter password\r\n\t\tdriver.findElement(By.id(\"ap_password\")).sendKeys(password);\r\n\t\t// click on submit\r\n\t\tdriver.findElement(By.id(\"signInSubmit\")).click();\r\n\t\tSystem.out.println(\"Sign in is successful\");\r\n\t}",
"public void signIn(View view) {\n requestSignIn();\n }",
"public static void signin() {\n browseSetUp(chromeDriver, chromeDriverPath, url);\n // click on my account web element\n driver.findElement(By.cssSelector(\"#headerMyAccount > div.MyAccount__icon > div > div.HeaderIcon__primary > svg\")).click();\n // step two: enter your credentials\n //valid user name:\n driver.findElement(By.cssSelector(\"#SPSOSignIn > a > span\")).click();\n // step three: enter valid email\n driver.findElement(By.cssSelector(\"#email\")).sendKeys(\"ibrahimsidisaid@gmail.com\");\n // valid passoword:\n driver.findElement(By.id(\"password-input-field\")).sendKeys(\"java206java206\");\n // click on sign in\n driver.findElement(By.cssSelector(\"#single-signin__body > div > div.col__12-12.col__8-12--xs.u--paddingNone-top.col__4-12--lg.col__4-12--md.col__6-12--sm > form > button > span\")).click();\n\n\n\n\n }",
"public void clickGoToYourAccountButton() {\n\t\telement(signUpObjects.getOTPButton).click();\n\t}",
"@When(\"^Click on Sign Up Button$\")\npublic void click_on_Sign_Up_Button() throws Throwable \n{\n\tdriver.findElement(By.xpath(\"//*[@id=\\\"login-block\\\"]/div/ul/li[1]/a\")).click();\n\tSystem.out.println(\"User is successfully navigated to Registration screen\");\n \n}",
"public void user_signin()\r\n\t{\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"email\")).clear();\r\n\t\tdriver.findElement(By.id(\"email\")).sendKeys(UID);\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"pass\")).clear();\r\n\t\tdriver.findElement(By.id(\"pass\")).sendKeys(PWD);\r\n\t}",
"@Given(\"landing to the loginpage and signin\")\n\tpublic void user_on_login_page_andSignin() {\n\t\t\n\t\t\n\t\tdriver.findElement(By.className(\"login\")).click();\n\t\t\n\t}",
"void onSignInButtonClicked(String userEmail, String userPassword);",
"private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"@When(\"^click on login button$\")\n\tpublic void click_on_login_button() throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//input[@name='btnLogin']\")).click();\n\t}",
"@Override\n public void onClick(View v) {\n openLogIn();\n\n }",
"@OnClick(R.id.email_sign_in_button) public void onLoginClicked() {\n String uname = username.getText().toString();\n String pass = password.getText().toString();\n\n loginForm.clearAnimation();\n\n // Start login\n presenter.doLogin(new AuthCredentials(uname, pass));\n }",
"private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n finish();\n }",
"private void onSignInClicked() {\n mState.enableConnection();\n mState.mShouldResolve = true;\n mState.mSignInClicked = true;\n mState.connectGoogleGames();\n\n // Show a message to the user that we are signing in.\n status.setText(\"Connecting...\");\n }",
"private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, SIGN_IN_CODE);\n }",
"public void irParaPaginaDeLogin (){\n\n click(By.className(btnLoginClass));\n }",
"@And(\"click on login button\")\n\tpublic void click_on_login_button() {\n\t\tSystem.out.println(\"click on login button\");\n\t\tdriver.findElement(By.name(\"Submit\")).click();\n\t \n\t}",
"public GitHubSignInPage openSignInPage() {\n\t\tsignInBtn = driver.findElement(By.linkText(SIGNIN_BTN_ID));\n\t\tsignInBtn.click();\n\t\tSystem.out.println(\"Navigating to signin page...\");\n\n\t\treturn new GitHubSignInPage(driver);\n\t}",
"protected void launchSignIn()\r\n {\r\n \tIntent i = new Intent(this, LoginActivity.class);\r\n \tstartActivity(i);\r\n }",
"@Override\r\n\tpublic void clickOnLoginLink() {\r\n\t\t\r\n\t\tSelenium.click(lnkLogIn());\r\n\t}",
"public void clkSignInBtn(WebDriver Driver) {\n\t\twait = new WebDriverWait(driver,20);\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(signInBtn)).isDisplayed();\n\t\tDriver.findElement(signInBtn).click();\n\t\tExtentTestManager.getTest().log(LogStatus.INFO, \"Click on 'Sign In' button\");\n\t}",
"@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\t\t\t}",
"public void onClick(View view) {\n switch (view.getId()) {\n case R.id.sign_in:\n if (hasInternetConnection()) {\n serverInterface = new ServerInterface();\n serverInterface.getAuthActivityAndTypedData(this, emailTyped, passwordTyped);\n serverInterface.followingFunction = Functions.AUTHENTIFIER;\n serverInterface.execute(\"\");\n signIn.setEnabled(false);\n }\n else {\n break;\n }\n break;\n default:\n break;\n }\n }",
"@Then(\"^Browser display Sign In page$\")\n public void browser_display_Sign_In_page() throws Throwable {\n sign.browserDisplaySignIn();\n\n\n }",
"@And(\"^clicks the 'Log in' button$\")\n public void clicksTheLogInButton() throws Throwable {\n }",
"@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\n\t\t\t}",
"public void onClick(View v) {\n //find view\n Log.e(LOG_TAG, \"sign in\");\n switch (v.getId()) {\n //sign in button pressed\n case R.id.signin:\n Log.e(LOG_TAG, \"sign in\");\n //take user to twitter authentication web page to allow app access to their twitter account\n String authURL = emyRequestToken.getAuthenticationURL();\n Log.v(LOG_TAG, authURL);\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authURL)));\n break;\n //other listeners here\n\n default:\n break;\n }\n }",
"@When(\"^click on Login Button$\")\npublic void click_on_Login_Button() throws Throwable \n{\n\tdriver.findElement(By.id(\"form-login_submitAuth\")).click();\n}",
"public void signInUser(){\n Intent intent = new Intent(this, AuthUiActivity.class);\n startActivity(intent);\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tlogin();\r\n\t\t\t}",
"public HomePage clickOnLogin() {\n// Actions action = new Actions(driver);\n// action.moveToElement(login).build().perform();\n// closeAd.click();\n login.isDisplayed();\n login.click();\n return this;\n }",
"private void signIn() {\n Utility.showLoader(this);\n mGoogleApiClient.clearDefaultAccountAndReconnect();\n\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signIn() {\n mGoogleSignInClient = buildGoogleSignInClient();\n startActivityForResult(mGoogleSignInClient.getSignInIntent(), REQUEST_CODE_SIGN_IN);\n }",
"public void performLogin(View view) {\r\n // Do something in response to button\r\n\r\n Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://dev.m.gatech.edu/login/private?url=gtclicker://loggedin&sessionTransfer=window\"));\r\n startActivity(myIntent);\r\n }",
"public SignInPage selectSignInButtonFromNavBar() {\n \t new WebDriverWait (DRIVER, 5)\n \t .until (ExpectedConditions.presenceOfElementLocated(navigationBarSignInLinkLocator))\n \t .click();\n \t\n \t new WebDriverWait (DRIVER, 5).until(\n \t\t\t ExpectedConditions.stalenessOf(DRIVER.findElement(navigationBarSignInLinkLocator)));\n \t \n return new SignInPage(); \n }",
"@Then (\"^SignIn with new credentials$\")\t\t\t\t\t\n public void SignIn_with_new_credentials() throws Throwable \t\t\t\t\t\t\t\n { \t\t\n \tdriver.findElement(By.xpath(\"//*[@id='passwordNext']/content/span\")).click();\t\t\t\t\t\n }",
"public void clickRegisterLink() {\n $(registerLink).click();\n }",
"@When(\"user clicks on login button\")\r\n\tpublic void user_clicks_on_login_button() {\n\t\tdriver.findElement(By.name(\"Login\")).click();\r\n\t}",
"private void signIn() {\n // [START_EXCLUDE silent]\n // [END_EXCLUDE]\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"@Override\n public void onClick(View view) {\n attemptLogin();\n }",
"public void onSignInPressed(View view) {\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }",
"public void onSignInPressed(View view) {\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }",
"@Then(\"^The user clicks the login button$\")\n\tpublic void the_user_clicks_the_login_button() throws Throwable {\n\t\t\n\t lpw.click_login_button();\n\t}",
"@And(\"^clicks the 'Log In' button$\")\n public void clicksTheLogInButton1() throws Throwable {\n }",
"public AccountPage Signup_through_loginpage() {\n\tJavascriptExecutor js = (JavascriptExecutor)driver;\n\tjs.executeScript( \"arguments[0].click();\", SignUpButton );\n\tsignupPage.SignUp_Form();\n\treturn new AccountPage();\n\t}",
"public void User_login()\r\n\t{\n\t\tdriver.findElement(FB_Locators.Signin_Email).clear();\r\n\t\tdriver.findElement(FB_Locators.Signin_Email).sendKeys(username);\r\n\t\t\r\n\t\t//Script using element referral..\r\n\t\tWebElement Password_Element=driver.findElement(FB_Locators.Signin_password);\r\n\t\tPassword_Element.clear();\r\n\t\tPassword_Element.sendKeys(password);\r\n\t\t\r\n\t\t//Login button using webelemnet referral\r\n\t\tWebElement Login_btn_Element=driver.findElement(FB_Locators.Signin_btn);\r\n\t\tLogin_btn_Element.click();\r\n\t}",
"@Then(\"^Click on signup button$\")\t\t\t\t\t\n public void Click_on_signup_button() throws Throwable \t\t\t\t\t\t\t\n { \n \tdriver.findElement(By.xpath(\"//*[@id='accountDetailsNext']/content/span\")).click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\t\t\n }",
"@When(\"^user should cliks the Login Button in login page$\")\n\tpublic void user_should_cliks_the_Login_Button_in_login_page() throws Throwable {\n\t\telementClick(pa.getAp().getLoginclick());\n\t \n\t}",
"@Override\n public void onClick(View view) {\n Intent intent = googleSignInClient.getSignInIntent();\n //Start activity for result\n startActivityForResult(intent, 100);\n }",
"@Given(\"^I am able to access the sign in page$\")\n public void i_am_able_to_access_the_sign_in_page() throws Throwable {\n bbcSite.bbcSignInPage().goToSignInPage();\n Assert.assertEquals(bbcSite.bbcSignInPage().getSignInPageURL(), bbcSite.getCurrentURL());\n }",
"@When(\"^I click on login button$\")\n public void iClickOnLoginButton() throws Throwable {\n }",
"@When(\"^click on login button$\")\n\tpublic void click_on_login_button() throws Throwable {\n\t throw new PendingException();\n\t}",
"@Test(priority = 0)\n public void cickOnSignInButton()\n {\n apdOBJ.clickOnSignInButton();\n }",
"private void signInEvt() {\n // Retrieve Details\n String email = this.view.getWelcomePanel().getSignInPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignInPanel().getPasswordText().getPassword()).trim();\n if (!email.equals(\"\") && !password.equals(\"\")) {\n if (model.getSudokuDB().checkLogin(email, password)) {\n // Set Player\n Player player = model.getSudokuDB().loadPlayer(email, password);\n if (player != null) {\n model.setPlayer(model.getSudokuDB().loadPlayer(email, password));\n // Clear Fields\n view.getWelcomePanel().getSignInPanel().clear();\n // Show Home Screen\n refreshHomePanel();\n view.getCardLayoutManager().show(view.getContent(), \"home\");\n } else {\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"An error occured during sign in, please try again.\", \"Sign In Error\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"The credentials you have provided are invalid, please enter them correctly or create a new account.\", \"Invalid Credentials\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to sign in, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }",
"public void signInPage(Report signInReport) {\n\t\twaitForElementToBeClickable(\"id\", skipSignInButton,signInReport);\n\t\tsignInReport.passReporting(\"Login Page is displayed\");\n\t\tclick(\"id\", skipSignInButton, signInReport);\n\t}",
"@And(\"clicks on login button\")\n\tpublic void clicks_on_login_button() {\n\t\tdriver.findElement(By.id(\"login\")).click();\n\t\t\n\n\t}",
"@Override\n public void loginClickedSignUp() {\n startSignInFragment();\n }",
"private void signIn() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(getActivity(), gso);\n\n // Starting the intent prompts the user to select a Google account to sign in with\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"@Override\n public void onLoginButtonClick(String email, String password) {\n AGConnectAuthCredential credential = EmailAuthProvider.credentialWithPassword(email, password);\n AGConnectAuth.getInstance().signIn(credential)\n .addOnSuccessListener(signInResult -> onLoginCorrect())\n .addOnFailureListener(e -> Toast.makeText(MainActivity.this, \"Bad credentials\", Toast.LENGTH_LONG).show());\n }",
"private void signInFeature() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n Button signInButton = (Button) findViewById(R.id.login_button);\n signInButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n signIn();\n }\n });\n }",
"public void clickOnRegisterButton() {\n Reporter.addStepLog(\" Click on register button \" + _registerBtn.toString());\n clickOnElement(_registerBtn);\n log.info(\" Click on register button \" + _registerBtn.toString());\n }",
"static void logIn (WebDriver driver) {\n driver.findElement(By.xpath(\"//a[@id=\\\"sign-in\\\"]\")).click();\n driver.findElement(By.xpath(\"//input[@id=\\\"session_email\\\"]\")).\n sendKeys(\"almost145@yandex.ru\");\n driver.findElement(By.xpath(\"//input[@id=\\\"session_password\\\"]\")).\n sendKeys(\"qwerty\");\n driver.findElement(By.cssSelector(\"input[value=\\\"Sign in\\\"]\")).click();\n }",
"private void signIn(){\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, Constants.RC_SIGN_IN);\n\n }",
"@Override public void onSignInButtonClicked() {\n mSignInClicked = true;\n mGoogleApiClient.connect();\n }",
"public void signin() {\n\t\tStage window = new Stage();\n\t\t//Scene scene = new Scene(primarygridpane,400,500);\n\t\tSigninForm signin = new SigninForm();\n\t\tsignin.start(window);\n\t\tsignin.isLogged(this);\n\t}"
] | [
"0.9051268",
"0.85858274",
"0.85505134",
"0.85047007",
"0.8230019",
"0.8099968",
"0.79788756",
"0.7913509",
"0.7883297",
"0.78498363",
"0.7838617",
"0.77460134",
"0.7701183",
"0.7641741",
"0.76122826",
"0.76079977",
"0.7586359",
"0.75589925",
"0.7535602",
"0.75162476",
"0.74722815",
"0.7399652",
"0.7362139",
"0.73486584",
"0.7325332",
"0.73140866",
"0.73020726",
"0.72985816",
"0.7244979",
"0.7225383",
"0.7209549",
"0.7209549",
"0.7209549",
"0.7209432",
"0.7192812",
"0.7188928",
"0.71523285",
"0.71460503",
"0.7141109",
"0.7118568",
"0.7071493",
"0.70637655",
"0.70637655",
"0.70637655",
"0.70637655",
"0.70627517",
"0.7025109",
"0.7022343",
"0.7021852",
"0.7006484",
"0.7003325",
"0.69992864",
"0.6994136",
"0.6981941",
"0.6977198",
"0.69704306",
"0.69679725",
"0.69656914",
"0.6955746",
"0.6942525",
"0.6931947",
"0.69277406",
"0.6917369",
"0.6911239",
"0.68850446",
"0.6865994",
"0.6854803",
"0.6833067",
"0.68243486",
"0.6819003",
"0.68153644",
"0.67957264",
"0.6788086",
"0.6777728",
"0.6770788",
"0.67681545",
"0.67599845",
"0.67599845",
"0.67442626",
"0.6743699",
"0.67430973",
"0.6740423",
"0.6736873",
"0.6730896",
"0.67182624",
"0.6715708",
"0.67081857",
"0.6705927",
"0.67052275",
"0.6700212",
"0.6685808",
"0.6681651",
"0.66754645",
"0.6672774",
"0.66622716",
"0.66543865",
"0.66506",
"0.6647237",
"0.6644264",
"0.66411996",
"0.6640637"
] | 0.0 | -1 |
TODO Autogenerated method stub int[][] arr = new int[4][4]; print(arr, 3, 0, 0, ""); | public static void main(String[] args) {
int n = 4;
int[] col = new int[n];
int[] d1 = new int[2 * n];
int[] d2 = new int[2 * n];
printopti(n, 0, "", col, d1, d2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void printOneDimensionalArray(int[] arr) {\n\n\t\tfor (int value : arr) {\n\t\t\tSystem.out.print(value + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void main(String[] args) {\n\t\t\r\nint arr[][]= {{1,2,3},{4,5,6},{7,8,9}};\r\nfor(int row=0;row<3;row++)\t{\t\r\n\tfor(int col=0;col<3;col++) {\r\n\t\tSystem.out.print(arr[row][col]+\" \");}\r\nSystem.out.println();\r\n}\r\n\t}",
"public static void print1D(int[] arr) {\n\t for (int ele : arr) {\n\t System.out.print(ele + \" \");\n\t }\n\t System.out.println();\n\t }",
"public static void printArray(int[] arr) {\n String output = \"[ \";\n for (int i = 0; i < arr.length; i++) {\n if (i != 0) {\n output += \", \" + arr[i];\n }\n else {\n output += arr[i];\n }\n }\n output += \" ]\";\n System.out.println(output);\n }",
"private static void print(int[] arr) {\n\t\tfor(int i=0;i<=arr.length;i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(arr[i]+\" \");\r\n\t\t}\r\n\t}",
"public static void printTwoDimensionalArray(int[][] arr) {\n\n\t\tfor (int[] row : arr) { // rows means a 1-D array\n\t\t\tfor (int item : row) { // item - all the elements present in each row\n\t\t\t\tSystem.out.print(item + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}",
"private static void printIntArray(int[] arr){\n\t\tSystem.out.print(\"[ \");\n\t\tfor(Integer i : arr){\n\t\t\tSystem.out.print(i + \" \");\n\t\t}\n\t\tSystem.out.println(\" ]\");\n\t}",
"public static void printArray(int[] arr) {\n System.out.println(\"===\");\n for (int i = 0; i < arr.length; i++) {\n System.out.println(arr[i]);\n }\n System.out.println(\"===\");\n }",
"static void printArray(int arr[]) \n\t { \n\t\t int n = arr.length; \n\t\t for (int i=0; i<n; ++i) \n\t\t\t System.out.print(arr[i] + \" \"); \n\t\t System.out.println(); \n\t }",
"public static void show(int[][] arr) {\n\t\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\t\tfor(int j=0;j<arr.length;j++) {\n\t\t\t\t\tSystem.out.print(arr[i][j]+\"\\t \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}",
"private static void printArray(int[] arr) {\n\t\tSystem.out.println(\"array is \");\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.print(arr[i]+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"static void printArray(int arr[]) {\n int n = arr.length;\n for (int i = 0; i < n; ++i)\n System.out.print(arr[i] + \" \");\n \tSystem.out.println();\n }",
"static void printArray(int arr[]) {\n\t\tint n = arr.length;\n\t\tfor (int i = 0; i < n; ++i)\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t\tSystem.out.println();\n\t}",
"static void printMatrix(int[][] inp){\n\n for(int i=0;i<inp.length;i++){\n for(int j=0;j<inp[0].length;j++){\n System.out.print(inp[i][j]+\" \");\n }\n System.out.println(\"\");\n }\n }",
"public static void display2dArray(int [][] arr){\n for (int i = 0; i < arr.length; i++){ \n System.out.println(Arrays.toString(arr[i]));\n }\n \n // the iterative approach\n for (int i = 0; i < arr.length; i++){\n for (int j = 0; j < arr[i].length; j++){\n System.out.print(arr[i][j]+ \" \");\n }\n System.out.println();\n }\n System.out.println();\n }",
"public static void printArray(int[] arr) {\r\n\t\tfor (int element : arr) {\r\n\t\t\tSystem.out.print(element + \" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\t}",
"public void printArray(int[] arr) {\n int n = arr.length;\n for (int i = 0; i < n; i++) {\n System.out.print(arr[i] + \" \");\n }\n }",
"void printArray(int[] arr) {\n\t\tfor (int ele : arr) {\n\t\t\tSystem.out.print(ele + \" \");\n\t\t}\n\t}",
"static void printArray(int arr[])\n {\n int n = arr.length;\n for (int i=0; i<n; ++i)\n System.out.print(arr[i]+\" \");\n System.out.println();\n }",
"public void printIntArray(int[] arr) {\n\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t}",
"public static void printArr(int[] arr) {\n\n\t\tfor (int item : arr)\n\t\t\tSystem.out.print(item + \" \");\n\n\t\tSystem.out.println();\n\n\t}",
"public static void printArray(int[] arr) {\n\t\t\t\t\tfor (int j = 0; j < arr.length - 1; j++) {\n\t\t\t\t\t\tSystem.out.print(arr[j] + \", \");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(arr[arr.length - 1]);\n\t\t\t\t}",
"static void printArray(int[] arr) {\n for (int item : arr) {\n System.out.print(item+ \" \");\n }\n }",
"static void printArray(int[] arr) {\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif (i != arr.length - 1)\n\t\t\t\tSystem.out.print(arr[i] + \", \");\n\t\t\telse\n\t\t\t\tSystem.out.print(arr[i]);\n\t\t}\n\t\tSystem.out.println();\n\t}",
"static void printArray(int arr[])\n {\n int n = arr.length;\n for (int i=0; i<n; ++i)\n System.out.print(arr[i] + \" \");\n System.out.println();\n }",
"static void printArray(int arr[])\n {\n int n = arr.length;\n for (int i=0; i<n; ++i)\n System.out.print(arr[i] + \" \");\n\n System.out.println();\n }",
"static void printArray(int arr[]) \n { \n for (int i = 0; i < arr.length; i++) \n System.out.print(arr[i] + \" \"); \n }",
"public static void main(String[] args) {\n\t\tint arr[][] = { {2, 6, 4} , {1, 8, 4} , {11, 55, 77} };\n\t\t\n\t\tfor(int i =0 ; i<3;i++) {\n\t\t\tfor(int j =0; j<3; j++) {\n\t\t\t\tSystem.out.print(arr[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\tfor(int i =0 ; i<3;i++) {\n\t\t\tfor(int j =0; j<3; j++) {\n\t\t\t\tSystem.out.println(\"arr[\" + i + \"][\" + j + \"] = \" + arr[i][j]);\n\t\t\t}\n\t\t}\n\n\t}",
"public void printdia(int[][] array){\n\t\tint dim = array.length;\n\n\t for( int k = 0 ; k < dim * 2 ; k++ ) {\n\t for( int j = 0 ; j <= k ; j++ ) {\n\t int i = k - j;\n\t if( i < dim && j < dim ) {\n\t System.out.print( array[i][j] + \" \" );\n\t }\n\t }\n\t System.out.println();\n\t }\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tint[][] arr=new int[][]{{21,22},{32,25},{25,58}};\r\nfor (int i = 0; i < arr.length; i++) {\r\n\tfor (int j = 0; j < 2; j++) {\r\n\t\tSystem.out.println(arr[i][j]+\" \");\r\n\t\t\r\n\t}\r\n\tSystem.out.println(\" \");\r\n\t\r\n}\r\n//int[][][] arr2=new int[][][] {{{10,12},{30}},{{30,15},{80}}};\r\n//for (int i = 0; i < arr2.length; i++) {\r\n//\tfor (int j = 0; j < 2; j++) {\r\n//\t\tfor (int j2 = 0; j2 < 3; j2++) {\r\n//\t\t\tSystem.out.println(arr2[i][j][j2]+\" \");\r\n//\t\t\t\r\n//\t\t}\r\n//\t\tSystem.out.println(\" \");\r\n//\t\t\r\n//\t}\r\n//\t\r\n//}\r\n\t}",
"private static void display(int[] arr) {\n\t\tif (null != arr && arr.length > 0) {\n\t\t\tfor (int n : arr) {\n\t\t\t\tSystem.out.print(n + \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}",
"private static void printArray(Node[][] puzzle) {\r\n\t\tfor (int i = 0; i < puzzle.length; i++) {\r\n\t\t\tfor (int j = 0; j < puzzle[0].length; j++) {\r\n\t\t\t\tSystem.out.print(puzzle[i][j].getValue());\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\r\n\t}",
"public static void main(String[] args) {\n int[][] numbers = {{1, 2, 3}, {4, 5, 6, 7, 8}, {9, 10, 11, 12, 13,}};\n // 0 1 2\n\n // numbers[0]==>{1,2,3} numbers[0][i]\n //numbers[1]==>{4,5,6,7,8} numbers[1][i]\n //numbers[2]==>{9,10,11,12,13} numbers[2][i]\n\n for (int j = 0; j < numbers.length; j++) {\n for (int i = 0; i < numbers[j].length; i++) {\n System.out.print(numbers[j][i] + \" \");\n }\n\n System.out.println();\n\n\n }\n }",
"public static void print1( int[][] a )\n {\n for(int x = 0; a.length > x; x++) { //for the amount of rows...\n\t for(int y = 0; a[x].length > y; y++){//...and for the length of the\n\t //nested array\n\t System.out.println(a[x][y]); //print out that specific array point\n\t }\n }\n }",
"public static void printArray(int[] arr)\n {\n int i;\n // your code goes here\n for(i = 0;i< arr.length;i++)\n {\n\t\t System.out.println(arr[i]);\n }\n \n \n }",
"public static void printArray(Cell[] arr) {\r\n\t\tConstants.logger.info(\"\\nWhole Field as single Array[\");\r\n\t\tfor (int j = 0; j < arr.length; j++) {\r\n\t\t\tSystem.out.print(arr[j]);\r\n\t\t}\r\n\t\tConstants.logger.info(\"]\\n\");\r\n\t}",
"public static void printArray(int[] array){\n for(int i=0;i<array.length;i++){\n System.out.print(array[i]+\" \");\n }}",
"public void displayData(int[][] arr);",
"public static void printSudokuField(int[][] arr) {\n\t\tfor (int row = 0; row < NUM_OF_ROWS; row++) {\n\t\t\tif(row % 3 == 0)\n\t\t\t\tprintln(\"+---+---+---+\");\n\t\t\t\n\t\t\tfor (int column = 0; column < NUM_OF_COLS; column++) {\n\t\t\t\tif(column % 3 == 0)\n\t\t\t\t\tprint(\"|\");\n\t\t\t\tprint(arr[row][column]);\n\t\t\t}\n\t\t\tprintln(\"|\");\n\t\t}\n\t\tprintln(\"+---+---+---+\");\n\t}",
"public static void printArr(int[] arr){\n int i;\n System.out.print(\"Array { \");\n for(i = 0; i < n; i++){\n System.out.print(arr[i] + ((i < n - 1)? \",\":\"\") + \" \");\n }\n System.out.println(\"}\");\n }",
"public static void main(String args[]){\n int int2DArr[][] = new int[4][5];\n int k=0;\n for (int i=0;i<4;i++) {\n for (int j=0;j<5;j++){\n int2DArr[i][j] = k++;\n }\n }\n for (int i=0;i<4;i++) {\n for (int j=0;j<5;j++){\n System.out.print(int2DArr[i][j] + \" \");\n }\n System.out.println();\n }\n }",
"static void printArray(int arr[], int size)\r\n {\r\n int i;\r\n for (i=0; i < size; i++)\r\n System.out.print(arr[i] + \" \");\r\n System.out.println(\"\");\r\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint [][] numbers = {{2,3,4},{6,7,8}};\n\t\tSystem.out.println(Arrays.deepToString(numbers));\n\t\t//multidimensional arrays\n\n\t}",
"private static void printArray(int[] array) {\n\t\tfor(int i: array) {\n\t\t\tSystem.out.print(i + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void printIntegerArray(int[] arr) {\n\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\tSystem.out.println(arr[i]);\n\t}",
"public static void main (String[] args) {\n int[][] twoD = new int[3][4];\n// Where x is an integer\n// [[x, x, x, x],\n// [x, x, x, x],\n// [x, x, x, x]]\n\n// int[][][] threeD = new int[3][4][3];\n\n// 4x3\n int[][] twoDInit = {{1, 3, 5}, {4, 3, 5}, {1, 4, 5}, {4, 3, 5}};\n\n for (int i = 0; i < twoDInit.length; i++) {\n for (int j = 0; j < twoDInit[i].length; j++) {\n System.out.println(twoDInit[i][j]);\n }\n }\n\n for (int[] ints : twoDInit) {\n for (int anInt : ints) {\n System.out.println(anInt);\n }\n }\n\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 7; j++) {\n System.out.print(\"*\");\n }\n System.out.println();\n }\n\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < i + 1; j++) {\n System.out.print(\"*\");\n }\n System.out.println();\n }\n }",
"public static void printArray(int[][] Array) {\r\n\t\t\tfor (int i = 0; i < Array.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < Array[0].length; j++) {\r\n\t\t\t\t\tSystem.out.print(Array[i][j] + \" \");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t}",
"public static void print2DArray(int input[][]) {\n int m = input.length;\n if (m == 0)\n return;\n int n = input[0].length;\n\n for (int i = 0; i < m; i++) {\n int k = i;\n while (k < m) {\n for (int j = 0; j < n; j++) {\n System.out.print(input[i][j] + \" \");\n }\n k++;\n System.out.println();\n }\n }\n }",
"public static void main(String[] args) {\n int [][] flats; // A 2-D Array\n flats = new int[3][3];\n flats[0][0] = 101; flats[1][0] = 201; flats[2][0] = 301;\n flats[0][1] = 102; flats[1][1] = 202; flats[2][1] = 302;\n flats[0][2] = 103; flats[1][2] = 203; flats[2][2] = 303;\n\n\n //Displaying the Array (for loop)\n System.out.println(\"Printing a 2-D array using for loop\");\n for (int i=0; i<flats.length; i++){\n for (int j=0; j<flats[i].length; j++) {\n System.out.print(flats[i][j]);\n System.out.print(\" \");\n }\n System.out.print(\"\\n\");\n }\n }",
"public static void printArray(int[] arr, int size) {\n for (int i = 0; i < size; i++)\n System.out.print(arr[i] + \" \");\n }",
"void printArray(int arr[]) {\r\n\r\n //enhanced for loop\r\n for (int item:arr) {\r\n System.out.print(item + \" \");\r\n }\r\n System.out.println();\r\n }",
"public void PrintGameBoard(int [][] arr) {\r\n\t\tsb.append(\" | A B C D E F G H I J\");\r\n\t\tSystem.out.println(sb.toString());\r\n\t\tsb.delete(0, sb.length());\r\n\t\tfor (int i = 0; i <arr.length; i++ ) {\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < arr.length; j++) {\r\n\t\t\t\tif (arr[i][j] == 0 || arr[i][j] == 3) {\r\n\t\t\t\t\tsb.append(\"* \");\r\n\t\t\t\t}\r\n\t\t\t\telse if(arr[i][j] == 1) {\r\n\t\t\t\t\tsb.append(\"O \");\r\n\t\t\t\t}\r\n\t\t\t\telse if (arr[i][j] == 2) {\r\n\t\t\t\t\tsb.append(\"X \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(i+\"| \"+sb.toString());\r\n\t\t\tsb.delete(0, sb.length());\r\n\t\t}\r\n\t}",
"public static void Print(int [] Arr)\n\t { \n\t\tfor(int i=0;i<Arr.length;i++)\n\t\t {\n\t\t\tSystem.out.println(Arr[i]);\n\t\t }\n\t }",
"private static void printRow(int[] row) {\r\n for (int i : row) {\r\n System.out.print(i);\r\n System.out.print(\"\\t\");\r\n }\r\n System.out.println();\r\n }",
"public void printArrayValues(int[] arr){\n for(int val : arr){\n System.out.println( val );\n }\n }",
"void printArray(Integer arr[])\n {\n int n = arr.length;\n for (int i=0; i<n; ++i)\n System.out.print(arr[i] + \" \");\n System.out.println();\n System.out.println();\n }",
"private static void printArray(int[] array) {\n\t\tif(array==null){\n\t\t\tSystem.out.println(\"Nothing in the array.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint Len = array.length;\n\t\tfor(int i=0; i<Len; i++){\n\t\t\tSystem.out.print(\" \" + array[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}",
"public static void jkPrintArrOneInt(int[] inputArr) {\n\n int printArrLen = inputArr.length;\n\n for (int printCount = 0; printCount < printArrLen; printCount++) {\n System.out.print(inputArr[printCount]);\n if (printCount != printArrLen - 1) System.out.print(\", \");\n }\n System.out.println();\n //---------------------------- /print elements of array\n\n }",
"static void printArray(int arr[], int size)\n {\n int i;\n for (i = 0; i < size; i++)\n System.out.print(arr[i] + \" \");\n System.out.println();\n }",
"static void printArray(int arr[], int size)\n {\n int i;\n for (i = 0; i < size; i++)\n System.out.print(arr[i] + \" \");\n System.out.println();\n }",
"public static void main(String[] args) {\n\t\tint a[][]=new int [5][5];\r\n\t\tfor(int i=0;i<a.length; i++)\r\n\t\t{\r\n\t\t\tfor (int j=0;j<a[i].length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(i==0 ||j==0||i==4||j==4)\r\n\t\t\t\t{\r\n\t\t\t\t\ta[i][j]=1;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tSystem.out.print(a[i][j]+\" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}",
"private static void printArray(int[] a) {\n\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\tSystem.out.print(a[k] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void main(String[] args) {\n int[][] array=new int[3][5];\n int[][] array1=new int[3][];\n int[][] array3=new int[][]{};\n int[] a[]={};\n\n int[][] array4=new int[][] {\n {1,2,3},\n {4,5,6,7,9,10},\n {9,10,11,15}\n };\n System.out.println(array4.length);\n System.out.println(array4[0].length);\n System.out.println(array4[1].length);\n System.out.println(array4[0][1]);\n System.out.println(array4[2][3]);\n\n int sum=0;\n for (int i=0; i<array4.length; i++) {\n for (int j=0; j<array4[i].length; j++) {\n sum=sum+array4[i][j];\n System.out.print(array4[i][j]+\" \");\n }\n }\n System.out.println();\n System.out.println(\"Sum of all numbers is: \" +sum);\n\n }",
"static void printArray(int[] array) {\n\n\n for (int i = 0; i < array.length; i++) {\n\n System.out.print(array[i] + \" \");\n\n\n }\n\n System.out.println();\n\n }",
"public void print() {\r\n\r\n\t\tfor (int row=0; row<10; row++) \r\n\t\t{\r\n\t\t\tfor (int col=0; col<10; col++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"\\t\"+nums[row][col]); //separated by tabs\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tint a[][] = new int[2][3];\r\n\r\n\t\ta[0][0] = 2;\r\n\t\ta[0][1] = 4;\r\n\t\ta[0][2] = 5;\r\n\t\ta[1][0] = 3;\r\n\t\ta[1][1] = 4;\r\n\t\ta[1][2] = 7;\r\n\r\n\t\t// int b[][]= {{2,4,5},{3,4,7}}.....; you can declare Multidimesion as well\r\n\r\n\t\t// System.out.println(a[1][0]);\r\n\r\n\t\tfor (int i = 0; i < 2; i++)\r\n\r\n\t\t{\r\n for(int j=0; j<3;j++)\r\n {\r\n \t System.out.println(a[i][j]+ \"\");\r\n }\r\n\t\t} \r\n\r\n\t}",
"public static void print1( int[][] a )\n {\n\t for (int i = 0; i < a.length; i++) { \t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents pf each individual array\n\t\t\t System.out.print(a[i][n] + \" \");\t\t//print out the number with a space in between each one\n\t\t }\n\n\t\t System.out.println();\t\t\t\t\t\t//add a new line after each \"row\" (individual array) is looped through\n\t }\n }",
"public static void printIntArray(int[] array){\n for(int i = 0; i < array.length; i++)\n System.out.print(\"[\" + i + \"]\" + \" = \" + array[i] + \" \");\n }",
"public static void printArray( int[] a ) {\n\tSystem.out.print(\"[\");\n\tfor( int i : a )\n\t System.out.print( i + \",\");\n\tSystem.out.print(\"]\");\n }",
"public static void printArray( int[] a ) {\n\tSystem.out.print(\"[\");\n\tfor( int i : a )\n\t System.out.print( i + \",\");\n\tSystem.out.println(\"]\");\n }",
"private void printBoard() {\r\n for (int i = 0; i < board.length; i++) {\r\n for (int j = 0; j < board[i].length; j++) {\r\n System.out.print(board[j][i] + \" \");\r\n }\r\n System.out.println();\r\n }\r\n }",
"static void print(int[] array)\n\t{\n\t\tfor(int i = 0; i < array.length; i++)\n\t\t{\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}",
"public static void printArray(int[][] twoDArray) {\n\t\tfor (int i = 0; i < twoDArray.length; i++) {\n\t\t\tSystem.out.println(Arrays.toString(twoDArray[i]));\n\t\t}\n\t}",
"public static void printMatrix(int[][] array, boolean format) {\n if (format) {\n \n }\n }",
"public static void printArray(int[] array) {\r\n\t\tSystem.out.print(\"4. All values stored in the array is: \");\r\n\t\tfor (int i = 0; i < myList.length; i++) {\r\n\t\t\tSystem.out.print(myList[i] + \" \");\r\n\t\t}\r\n\t}",
"public static void printArray( int[] a ) {\n System.out.print(\"[\");\n for( int i : a )\n System.out.print( i + \",\");\n System.out.println(\"]\");\n }",
"public static void printArray( int[] a ) {\n System.out.print(\"[\");\n for( int i : a )\n System.out.print( i + \",\");\n System.out.println(\"]\");\n }",
"static void spiral_disp(int arr[][]) {\n\t\t\tint mincol, minrow, maxcol, maxrow, count = 0;\n\t\t\tmincol = 0;\n\t\t\tminrow = 0;\n\t\t\tmaxrow = arr.length - 1;\n\t\t\tmaxcol = arr[0].length - 1;\n\t\t\tint net = arr.length * arr[0].length;\n\t\t\twhile (count < net) {\n\n\t\t\t\tfor (int row = minrow; row <= maxrow && count < net; row++) {\n\t\t\t\t\tSystem.out.print(arr[row][mincol] + \", \");\n\t\t\t\t\tcount++;\n\t\t\t\t}\t\t\n\t\t\t\tmincol++;\n\t\t\t\tfor (int col = mincol; col <= maxcol && count < net; col++) {\n\t\t\t\t\tSystem.out.print(arr[maxrow][col] + \", \");\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tmaxrow--;\n\t\t\t\tfor (int row = maxrow; row >= minrow && count < net; row--) {\n\t\t\t\t\tSystem.out.print(arr[row][maxcol] + \", \");\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tmaxcol--;\n\t\t\t\tfor (int col = maxcol; col>= mincol && count < net; col--) {\n\t\t\t\t\tSystem.out.print(arr[minrow][col] + \", \");\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tminrow++;\n\n\t\t\t}\n\n\t\t}",
"public static void main(String[] args) {\n\t\t\tint[][] arr = new int[2][3];\n\t\t\t\n\t\t\t//First row\n\t\t\tarr[0][0]=111;\n\t\t\tarr[0][1]=121;\n\t\t\tarr[0][2]=131;\n\t\t\t\n\t\t\t//Second row\n\t\t\t\n\t\t\tarr[1][0]=211;\n\t\t\tarr[1][1]=311;\n\t\t\tarr[1][2]=411;\n\t\t\t\n\t\t\tint row = arr.length;\n\t\t\tint col = arr[0].length;\n\t\t\t\n\t\t\tfor(int i=0; i<row; i++) {\n\t\t\t\tfor(int j=0; j<col; j++) {\n\t\t\t\t\tSystem.out.print(arr[i][j]+\" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\n\t}",
"public void printArray(int array[]) {\n\t\tfor(int i = 0;i<array.length;i++) {\n\t\t\tSystem.out.println(\"Array[\"+ (i+1) +\"] = \"+array[i]);\n\t\t}\n\t}",
"private static void printArray(Integer[] a) {\n\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\tSystem.out.print(a[k] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void printArray(int[] array)\r\n {\r\n //Loop through array and print each individual element\r\n for (int n=0; n < array.length; ++n)\r\n {\r\n System.out.println(array [n]); \r\n \r\n }\r\n \r\n }",
"public static void main(String[] args){\n int[] arr = {12, 3, 5};\n System.out.println(Arrays.toString(arr));\n }",
"public void printArray()\n {\n for (int i=0;i<array.length; i++)\n {\n System.out.print(array[i] + \" \"); \n }\n System.out.println();\n }",
"public static void printArray(int[] array) {\n\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tSystem.out.print(array[i] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void printArray(int[] a) {\n System.out.print(\"{\" + a[0]);\n for (int i = 1; i < a.length; i++) {\n System.out.print(\", \" + a[i]);\n }\n System.out.println(\"}\");\n }",
"public static void displayArr(int[] a)\r\n {\r\n for(int i : a)\r\n System.out.print(i + \" \");\r\n System.out.println();\r\n }",
"public static void print2DArray(int[][] myDataGrid){\n\t\n\tfor(int i=0; i<3; i++){\n\t\tfor(int j=0; j<5; j++){\n\t\t\tSystem.out.println(myDataGrid[i][j] + \", \");\n\t\t}\n\t\tSystem.out.println();\n\t}\n}",
"public void printBoard(int[][] board) //creates a user-freindly representation of the board and prints it for the user\n {\n for (int i = 0; i < 9; i++) //n\n {\n if (i == 0) { //1\n System.out.println(\"-------------------------\"); //prints top border of board //1\n }\n \n for (int j = 0; j < 9; j++) //n\n {\n if (j == 0)\n {\n System.out.print(\"| \" + board[i][j] + \" \");\n }\n else if ((j+1) % 3 == 0) // 3\n {\n System.out.print(board[i][j] + \" | \"); //prints divider to separate into sets of 3 columns //3\n }\n else \n {\n System.out.print(board[i][j] + \" \");\n }\n }\n System.out.println(); //1\n\n if ((i+1) % 3 == 0) //3\n {\n System.out.println(\"-------------------------\"); //prints to separate into sets of 3 rows //1\n }\n }\n }",
"public void print() {\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[i].length; j++) {\n System.out.print(matrix[i][j] + \" \");\n }\n System.out.println();\n }\n }",
"static void printPuzzle(int sudoku[][])\n\t{\n\t\tfor (int y = 0; y < 9; y++)\n\t\t{\n\t\t\tfor (int x = 0; x < 9; x++)\n\t\t\t\tSystem.out.print(sudoku[y][x]+\" \");\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public int[][] print() {\r\n\t\tif(n_row!=-1) {\r\n\t\t\t\r\n\t\tint[][] res=new int[n_row][n_col];\r\n\t\t\r\n\t\tfor(Node n:allNodes.values()) {\r\n\t\t\t\r\n\t\t\tres[n.rowIndex][n.colIndex]=n.path;\r\n\t\t}\r\n\t\t\r\n\t\treturn res;\r\n\t}\r\n\t\telse {\r\n\t\t\tint[][] res=new int[length][length];\r\n\t\t\tSystem.out.println(paths.size());\r\n\t\t\tfor(Integer pi:paths.keySet()) {\r\n\t\t\t\t\r\n\t\t\t\tStack<Node> p=paths.get(pi);\r\n\t\t\t\tSystem.out.println(p.toString());\r\n\t\t\t\tNode n1=p.pop();\r\n\t\t\t\twhile(!p.isEmpty()) {\r\n\t\t\t\t\tNode n2=p.pop();\r\n\t\t\t\t\tres[n1.index][n2.index]=pi;\r\n\t\t\t\t\tres[n2.index][n1.index]=pi;\r\n\t\t\t\t\tn1=n2;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\t\tint[][] arr=new int[5][5];\r\n\t\t\tint k=1;\r\n\t\t\tfor(int i=0; i<=2;i++)\r\n\t\t\t{\r\n\t\t\t\tfor(int j=2-i;j<=i+2;j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tarr[i][j]=k++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int i=3;i<=4;i++)\r\n\t\t\t{\r\n\t\t\t\tfor(int j=i-2;j<=6-i;j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tarr[i][j]=k++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//출력\r\n\t\t\tfor(int i=0;i<5;i++)\r\n\t\t\t{\r\n\t\t\t\tfor(int j=0;j<5;j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(arr[i][j]==0)\r\n\t\t\t\t\t\tSystem.out.print(\"\\t\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tSystem.out.print(arr[i][j]+\"\\t\");\r\n\t\t\t\t}\r\n\t\t\t\t//줄간격\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tint ma[][] = new int[3][2];\n\t\t//how to print multi-dimentional array\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [0, 0], [0, 0], [0, 0] ]\n\t\t\n\t\t//how to assing values to the elements\n\t\tma[0][1] = 2;\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [0, 2], [0, 0], [0, 0] ]\n\t\t\n\t\tma[2][0] = 5;\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [0, 2], [0, 0], [5, 0] ]\n\t\t\n\t\tma[0][0] = 1;\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [1, 2], [0, 0], [5, 0] ]\n\t\t\n\t\tma[1][0] = 3;\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [1, 2], [3, 0], [5, 0] ]\n\t\t\n\t\tma[1][1] = 4;\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [1, 2], [3, 4], [5, 0] ]\n\t\t\n\t\tma[2][1] = 6;\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [1, 2], [3, 0], [5, 6] ]\n\t\t\n\t\tint maa[][] = { {1}, {3, 4}, {5, 6, 7} };\n\t\tSystem.out.println(Arrays.deepToString(maa));\n\t\t\n\t\t//how to print a specific inner arrays on the console\n\t\tSystem.out.println(Arrays.toString(maa[1])); //[3,4]\n\t\t\n\t\t// how to print a specific element in a multidimentioanl array\n\t\tSystem.out.println(maa[2][1]); // 6\n\t\t\n\t\t// How to print all elements one by one on the console in the same line with aa \"*\" at the beginning \n\t\t//of very elemnt\n\t\t\n\t\tfor(int i=0; i<maa.length; i++) {\n\t\t\t\n\t\t\tfor (int k=0; k<maa[i].length; k++) {\n\t\t\t\tSystem.out.print(\"*\" + maa[i][k]); //*1*3*4*5*6*7\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\t//How to find the product of all elements in the array \"maa\"\n\n\t\tint product = 1; // for addition begin with 1\n\t\tfor(int i=0; i<maa.length; i++) {\n\t\t\tfor(int k=0; k<maa[i].length; k++) {\n\t\t\t\tproduct = product * maa[i][k];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The product of all elements: \" + product); //The product of all elements: 2520\n\t\t\n\t\t// How to find the sum of all elements (Homework)\n\t\t\n\t\tint sum = 0; // for sum begin with 0\n\t\tfor(int i=0; i<maa.length; i++) {\n\t\t\tfor(int k=0; k<maa[i].length; k++) {\n\t\t\t\tsum = sum + maa[i][k];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The sum of all elements: \" + sum); //The sum of all elements: 26\n\t\t\n\n\t\t//yeni bi array yaz otomatik\n\t\tint count=1;\n\t\t\tfor(int i=0;i<3;i++) {\n\t\t\tfor(int k=0;k<2;k++) {\n\t\t\t\tma[i][k]=count;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[[1, 2], [3, 4], [5, 6]]\n\t\n\t\t \n\t}",
"static void printArray(int ints[], int len)\n\t{\n\t\tint i;\n\t\tfor (i = 0; i < len; i++)\n\t\t{\n\t\t\tSystem.out.print(ints[i] + \" \");\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}",
"public void printArray(int [] array) {\n\t\t\n\t\tfor(int i =0; i<array.length; i++) {\n\t\t\tSystem.out.print(array[i] + \" \");\n\t\t}\n\t}",
"public static void printArray(int[] a) {\n for (int el : a) {\n System.out.print(el + \" \");\n }\n System.out.println();\n }",
"void printMatrix(int[][] matrix){\n\t\tfor(int i = 0; i < matrix.length; i++){\n\t\t\tfor(int j = 0; j < matrix[i].length; j++){\n\t\t\t\tSystem.out.print(matrix[i][j] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}",
"public void printArray2D(int[][] array2D) {\r\n\t\tfor (int i = 0; i < array2D.length; i++) {\r\n\t\t\tfor (int j = 0; j < array2D[i].length; j++) {\r\n\t\t\t\tSystem.out.print(array2D[i][j] + \", \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}",
"public static void printArray(int[] array) {\n \n for (int i = 0; i < array.length; i++) {\n \n System.out.println(\"array[\" + i + \"] = \" + array[i]);\n }\n }",
"public static void main(String[] args) {\n\r\n\t\tint[][] array = new int[5][5];\r\n\t\t\r\n\t//좌측 코드는 5행 5열 2차원 배열을 생성함\r\n\t\t//25개의 방이 생성되고 메모리에 총 100바이트 생성함\r\n\t\t\r\n\t\tint[][] array = new int[][] {\r\n\t\t\t{100,20,30},\r\n\t\t\t{30,40,50},\r\n\t\t\t{40,50,60}\r\n\t\t};//선언과 동시에 3행 3열의 값을 초기화를 해주고 있다. 메모리에 총 9*4=36byte가 생성됨ㄴ\r\n\t\t}"
] | [
"0.7582327",
"0.7491363",
"0.737072",
"0.72139287",
"0.719301",
"0.7192546",
"0.7151909",
"0.71141344",
"0.7091622",
"0.7088155",
"0.7054176",
"0.7017754",
"0.70035523",
"0.6967018",
"0.69552886",
"0.6941485",
"0.6934961",
"0.69201404",
"0.6913715",
"0.6910875",
"0.69090974",
"0.69054866",
"0.687977",
"0.6844089",
"0.6842604",
"0.6830756",
"0.6829214",
"0.68260694",
"0.68062407",
"0.67943656",
"0.67648494",
"0.6728707",
"0.67230284",
"0.6712884",
"0.6707952",
"0.668416",
"0.6680351",
"0.6645679",
"0.66429263",
"0.6632031",
"0.66242",
"0.6617086",
"0.6604104",
"0.6600895",
"0.6580214",
"0.65721124",
"0.65452725",
"0.6541605",
"0.6535386",
"0.6534653",
"0.6520929",
"0.650709",
"0.65058005",
"0.650173",
"0.6490331",
"0.64832014",
"0.647369",
"0.64723694",
"0.64611626",
"0.64611626",
"0.6456519",
"0.64564085",
"0.64558905",
"0.6439789",
"0.64350176",
"0.64338887",
"0.6431183",
"0.64303595",
"0.64277565",
"0.64268243",
"0.6424321",
"0.64196664",
"0.63966167",
"0.6395811",
"0.63825655",
"0.6376834",
"0.6376834",
"0.63640106",
"0.63616675",
"0.6335803",
"0.6335707",
"0.6333753",
"0.6330739",
"0.63047564",
"0.6303204",
"0.6301303",
"0.6298016",
"0.6290469",
"0.6284193",
"0.62778574",
"0.62745315",
"0.62717444",
"0.62575686",
"0.6246439",
"0.62334394",
"0.62293226",
"0.6225859",
"0.6215816",
"0.6213881",
"0.6200396",
"0.61912245"
] | 0.0 | -1 |
Gets the tumbler display component. | public TumblerDisplay getTumblerDisplay() {
return tumblerDisplay;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Display getDisplay () {\n return Display.getDisplay(this);\n }",
"public Display getDisplay () {\n return Display.getDisplay(this);\n }",
"public Display getDisplay() {\n return Display.getDisplay(this);\n }",
"public abstract Display getDisplay();",
"public javax.swing.JLabel getDisplay() {\n return display;\n }",
"protected Display getDisplay() {\n return display;\n }",
"public Display getDisplay() {\n return display;\n }",
"com.ctrip.ferriswheel.proto.v1.Display getDisplay();",
"public static Display getDisplay(){\r\n return THIS;\r\n }",
"public JBaseScreen getDisplayScreen()\n {\n return (JBaseScreen)JBasePanel.getSubScreen(m_displayParent, JBaseScreen.class);\n }",
"@Override\n\tpublic Component getDisplayComponent() {\n\t\treturn null;\n\t}",
"public DisplayType getDisplayType();",
"public JComponent getComponent() {\n return getGradleUI().getComponent();\n }",
"public ViewJComponentLUT getLUTComponent() {\r\n return componentLUT;\r\n }",
"@Override\n\tpublic Widget getMainWidget() {\n\t\treturn display.asWidget();\n\t}",
"public JComponent getWidget() {\n return itsComp;\n }",
"public FRTableDisplay getTableDisplay() {\n\t\treturn tableDisplay;\n\t}",
"private Component getPreviewPane() {\n\t\tImageIcon img = new ImageIcon(image.getScaledInstance(100, 140, Image.SCALE_DEFAULT));\n\t\tJLabel preview = new JLabel(img);\n\t\t\n\t\treturn preview;\n\t}",
"JComponent getImpl();",
"@Override\n public Component getComponent() {\n if (component == null) {\n component = new PubMLSTVisualPanel2();\n }\n component.setPreferredSize(new java.awt.Dimension(480,340));\n return component;\n }",
"public String getComponent() {\n return this.component;\n }",
"public static DisplayDevice getInstance(){\t\t\r\n\t\treturn instance;\r\n\t}",
"public String getComponent() {\r\n\t\treturn component;\r\n\t}",
"public ViewJComponentHLUTBase getHistoLUTComponent() {\r\n return componentHistogram;\r\n }",
"public DisplayInfo getDisplayInfo() {\n return this.mDisplayInfo;\n }",
"public String getDisplayId() {\n return displayId;\n }",
"public static String getDisplay() {\n return android.os.Build.DISPLAY;\n }",
"public String getDisplayType();",
"public java.awt.Component getControlledUI() {\r\n return ratesBaseWindow;\r\n }",
"public JComponent getSmallPodComponent() {\r\n if (summaryView == null) {\r\n summaryView = new LogSummaryView(getLogToFileAction());\r\n }\r\n return summaryView;\r\n }",
"public Component getViewerComponent() {\n\t\treturn null;\n\t}",
"public ABLGraphicsLCD GraphicsLCD() {\r\n\t\treturn new ABLGraphicsLCD(BrickFinder.getDefault().getGraphicsLCD());\r\n\t}",
"public Component display() {\n\t\treturn new JLabel(\"3 ;)\");\n\t}",
"@Override\r\n\tpublic Widget getWidget() {\n\t\treturn asWidget();\r\n\t}",
"public Class getPreferredDisplayClass() {\n\t\treturn Object.class;\n\t}",
"public Component getComponent() {\n return component;\n }",
"@Override\n public Widget getWidget() {\n if (widget == null) {\n if (Profiler.isEnabled()) {\n Profiler.enter(\"AbstractComponentConnector.createWidget for \"\n + getClass().getSimpleName());\n }\n widget = createWidget();\n if (Profiler.isEnabled()) {\n Profiler.leave(\"AbstractComponentConnector.createWidget for \"\n + getClass().getSimpleName());\n }\n }\n\n return widget;\n }",
"JComponent getRenderComponent();",
"@Override\n\tpublic Component getComponent() {\n\t\treturn toolbox;\n\t}",
"public VideoDisplay<MBFImage> getDisplay() {\n\t\treturn videoFrame;\n\t}",
"public PhotoUI getPhotoUI() {\n if (this.mUI == null) {\n this.mUI = new PhotoUI(this.mActivity, this, this.mActivity.getModuleLayoutRoot());\n }\n return this.mUI;\n }",
"public Printable getPrintableComponent();",
"public JawbComponent getMainComponent () {\n return null;\n }",
"public JPanel getScreen();",
"public String getCurrentScreenDisplay();",
"JTextArea getDisplay();",
"public ComponentLabel getComponentLabel() {\n\t\treturn componentLabel;\n\t}",
"public Component getTabComponent();",
"public POGOProtos.Rpc.QuestDisplayProto.Builder getDisplayBuilder() {\n \n onChanged();\n return getDisplayFieldBuilder().getBuilder();\n }",
"@Override // com.android.server.wm.ConfigurationContainer\n public String getName() {\n return \"Display \" + this.mDisplayId + \" name=\\\"\" + this.mDisplayInfo.name + \"\\\"\";\n }",
"public XCDisplay getActiveDisplay() {\n\t\treturn activeDisplay;\n\t}",
"C getGlassPane();",
"String getComponentName();",
"String getComponentName();",
"private List<Turtle> createActiveDisplay() {\n\t\tactiveListDisplay = new FlowPane();\n\t\tactiveListDisplay.setPrefWrapLength(turtleView.getWidth());\n\t\tif (tManager != null) {\n\t\t\tactiveTurtles = tManager.getActiveTurtles();\n\t\t\tfor(Turtle turtle: activeTurtles) {\n\t\t\t\tLabel currentTurtle = new Label(Double.toString(turtle.getID()));\n\t\t\t\tturtleView.getChildren().add(currentTurtle);\n\t\t\t\tlabels.add(currentTurtle);\n\t\t\t\ttoggleTurtle(currentTurtle, turtle);\n\t\t\t}\n\t\t\treturn activeTurtles;\n\t\t}\n\t\treturn null;\n\t}",
"public JComponent getComponent() {\n return itsComp;\n }",
"@Override\n public GeneralOrthoMclSettingsVisualPanel getComponent() {\n if (component == null) {\n component = new GeneralOrthoMclSettingsVisualPanel();\n\n }\n return component;\n }",
"public JComponent getComponent();",
"private com.google.protobuf.SingleFieldBuilderV3<\n POGOProtos.Rpc.QuestDisplayProto, POGOProtos.Rpc.QuestDisplayProto.Builder, POGOProtos.Rpc.QuestDisplayProtoOrBuilder> \n getDisplayFieldBuilder() {\n if (displayBuilder_ == null) {\n displayBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n POGOProtos.Rpc.QuestDisplayProto, POGOProtos.Rpc.QuestDisplayProto.Builder, POGOProtos.Rpc.QuestDisplayProtoOrBuilder>(\n getDisplay(),\n getParentForChildren(),\n isClean());\n display_ = null;\n }\n return displayBuilder_;\n }",
"protected Node getComponentNode() {\n return componentNode;\n }",
"public LWToolkit getLWToolkit() {\n return LWToolkit.getLWToolkit();\n }",
"public @Nullable ContainerSwitchUi getSwitchPane() {\n\t\tif (layout!=null && layout.getChild() instanceof ContainerSwitch cs) return cs.ui;\n\t\telse return null;\n\t}",
"@Override\n\tpublic ElementView getComponent() {\n\t\treturn jc;\n\t}",
"private APanelTonArt getPanelTon()\n\t{\n\t\tif (panelTon == null)\n\t\t{\n\t\t\tpanelTon = new APanelTonArt(this);\n\t\t\tpanelTon.setBounds(235, 168, 200, 200);\n\t\t\tpanelTon.setLayout(null);\n\t\t}\n\t\treturn panelTon;\n\t}",
"EconomyDisplayTransmitter getEconomyDisplayTransmitter();",
"public RtTimePanel getTimePanel() {\n return timePanel ;\n }",
"public POGOProtos.Rpc.QuestDisplayProto getDisplay() {\n if (displayBuilder_ == null) {\n return display_ == null ? POGOProtos.Rpc.QuestDisplayProto.getDefaultInstance() : display_;\n } else {\n return displayBuilder_.getMessage();\n }\n }",
"private TestUnitPanel getSelectedPanel(){\n\t\t\n\t\tTestUnitPanel selectedPanel = (TestUnitPanel)tabbedPane.getComponentAt(tabbedPane.getSelectedIndex());\n\t\tConsoleLog.Print(\"[TestMonitor] returned Unit: \" + getUnitKey());\n\t\treturn selectedPanel;\n\t}",
"public JPanel getPaneDisplay() {\r\n\t\tif (paneDisplay == null) {\r\n\t\t\tpaneDisplay = new JPanel();\r\n\t\t\tpaneDisplay.setLayout(new CardLayout());\r\n\t\t\tpaneDisplay.setName(\"paneDisplay\");\r\n\t\t\tpaneDisplay.add(getWorkbench(), getWorkbench().getName());\r\n\t\t}\r\n\t\treturn paneDisplay;\r\n\t}",
"@Deprecated\n Component getVisualComponent(CallPeer peer);",
"public ComponentName getComponentName() {\n return mInternal.getComponentName();\n }",
"public Component getComponent() {\n\treturn component;\n}",
"protected LttlComponent getHostComponent()\n\t{\n\t\tif (hostCompId < 0) return null;\n\t\treturn Lttl.scenes.findComponentByIdAllScenes(hostCompId);\n\t}",
"private JPanel getTpjPanel() {\r\n\t\tif (tpjPanel == null) {\r\n\t\t\ttpjLabel = new JPanel();\r\n\t\t\ttpjLabel.setBackground(Color.GRAY);\r\n\t\t\ttpjLabel.setBounds(new Rectangle(0, 0, 788, 360));\r\n\t\t\ttpjPanel = new JPanel();\r\n\t\t\ttpjPanel.setLayout(null);\r\n\t\t\ttpjPanel.setBounds(new Rectangle(50, 78, 788, 360));\r\n\t\t\ttpjPanel.add(qdsj1jLabel, null);\r\n\t\t\ttpjPanel.add(qdsj2jLabel, null);\r\n\t\t\ttpjPanel.add(getJssjjLabel(), null);\r\n\t\t\ttpjPanel.add(getJssj2jLabel(), null);\r\n\t\t\ttpjPanel.add(tpjLabel, null);\r\n\r\n\t\t}\r\n\t\treturn tpjPanel;\r\n\t}",
"public SnifferUI getSnifferUI() {\n return snifferUI;\n }",
"public Entity getComponent() {\n return component;\n }",
"public TDropListItem getSwitcherFac();",
"public JPanel getPanel() {\n\t\treturn barChartPanel;\n\t}",
"public FrameUIModel getFrameUI()\n {\n return uiModel.getFrameUI();\n }",
"Component getComponent() {\n/* 224 */ return this.component;\n/* */ }",
"@Override\r\n\tpublic Panel getUI() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Panel getUI() {\n\t\treturn null;\r\n\t}",
"public Component getComponent() {\n if (getUserObject() instanceof Component)\n return (Component)getUserObject();\n return null;\n }",
"protected JPanel getPanel() {\n\t\treturn (JPanel) window.getContentPane();\n\t}",
"private JLabel getJLCurrentEnquirer() {\r\n if (jlCurrentEnquirer == null) {\r\n jlCurrentEnquirer = new JLabel();\r\n }\r\n return jlCurrentEnquirer;\r\n }",
"@Override //Done\n public USBMonitor getUSBMonitor() {\n return mUSBMonitor;\n }",
"private DisplayDevice(){\t\t\r\n\t\t\r\n\t}",
"@AutoEscape\n\tpublic String getDisplay();",
"public int getDisplayId() {\n return this.mDisplayId;\n }",
"public HTMLDivElement getElementDivTableroControl() { return this.$element_DivTableroControl; }",
"public interface Displayable {\n\n /**\n * Updates the DetailWindow with the information of the Component currently\n * selected\n */\n public void updateDetailWindow();\n\n /**\n * Retrieves the type of the displayable\n * @return A string representing the type of the component\n */\n public String getType();\n\n /**\n * Retrieves the ID of the displayable\n * @return A string representing the ID of the component\n */\n public String getID();\n \n \n /**\n * Retrieves the name of the displayable\n * @return A string representing the name of the displayable\n */\n public String getName();\n}",
"protected JPanel getTopPanel() {\n List topComps = new ArrayList();\n getTopComponents(topComps);\n if (topComps.size() == 0) {\n return null;\n }\n JPanel topPanel = GuiUtils.left(GuiUtils.doLayout(topComps, 0, GuiUtils.WT_N, GuiUtils.WT_N));\n topPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n \n return McVGuiUtils.makeLabeledComponent(\"Options:\", topPanel);\n }",
"@Override\n public Component getUiComponent() {\n return this;\n }",
"@java.lang.Override\n public POGOProtos.Rpc.QuestDisplayProto getDisplay() {\n return display_ == null ? POGOProtos.Rpc.QuestDisplayProto.getDefaultInstance() : display_;\n }",
"public JPanel getPanel() {\n RepositoryPanel repositoryPanel = (RepositoryPanel) repositoryStep.getComponent();\n return repositoryPanel;\n }",
"public static JComponent getUILogger() {\n if (txtAreaHandler!=null)\n return txtAreaHandler.getComponent();\n else\n return null;\n }",
"public JPanel getPnlLevelSwitch() {\n\t\treturn pnlLevelSwitch;\n\t}",
"public interface SwingDisplayable {\n\n /* constants */\n \n /* public methods */\n \n /**\n * Returns a Swing display of this.\n *\n * @return A JComponent that displays the state of this Object.\n */\n public JComponent toSwingComponent();\n\n}",
"protected final Component getComponent()\n\t{\n\t\treturn component;\n\t}",
"public Boolean getDisplay() {\n return display;\n }"
] | [
"0.67499065",
"0.67499065",
"0.66568524",
"0.64220405",
"0.63460404",
"0.6342053",
"0.6333044",
"0.62031674",
"0.6134991",
"0.61168593",
"0.60636395",
"0.5878158",
"0.58622015",
"0.57866806",
"0.57827044",
"0.5760438",
"0.57341194",
"0.5686793",
"0.56633055",
"0.56168056",
"0.56086123",
"0.55917084",
"0.55841124",
"0.5532533",
"0.5507094",
"0.5502277",
"0.5486572",
"0.54668444",
"0.5466339",
"0.54657406",
"0.54461926",
"0.54455566",
"0.54450023",
"0.54213184",
"0.54120016",
"0.54092777",
"0.53776956",
"0.5368397",
"0.5358678",
"0.53492343",
"0.5336727",
"0.5287477",
"0.527058",
"0.5267505",
"0.52659035",
"0.5253003",
"0.5241572",
"0.5230639",
"0.5225112",
"0.52241814",
"0.5220993",
"0.5215273",
"0.52105594",
"0.52105594",
"0.52031046",
"0.518023",
"0.51763296",
"0.51591533",
"0.5141718",
"0.5140498",
"0.5125729",
"0.5125169",
"0.51234925",
"0.512347",
"0.5116213",
"0.511093",
"0.5109428",
"0.5104023",
"0.5094969",
"0.5093761",
"0.5090502",
"0.5089128",
"0.50848407",
"0.50845575",
"0.5071355",
"0.507103",
"0.5067448",
"0.50657237",
"0.5061581",
"0.50597465",
"0.5056385",
"0.5056385",
"0.50497705",
"0.5047705",
"0.50448424",
"0.5044719",
"0.50389004",
"0.50280267",
"0.50268364",
"0.5022769",
"0.50172335",
"0.50157034",
"0.50140375",
"0.5013705",
"0.50132495",
"0.5011853",
"0.5009344",
"0.50020784",
"0.49981833",
"0.4996475"
] | 0.8144527 | 0 |
Turns all the lights on. | public void turnLightsOn() {
if (isFlashing()) {
return;
}
for (int i = 0; i < topBorder.size(); i++) {
topBorder.get(i).turnOn();
}
for (int i = 0; i < bottomBorder.size(); i++) {
bottomBorder.get(i).turnOn();
}
for (int i = 0; i < leftBorder.size(); i++) {
leftBorder.get(i).turnOn();
}
for (int i = 0; i < rightBorder.size(); i++) {
rightBorder.get(i).turnOn();
}
topLeft.turnOn();
topRight.turnOn();
bottomLeft.turnOn();
bottomRight.turnOn();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void turnOffAllLights() {\r\n\t\tfor (Light light : lights) {\r\n\t\t\tif(light.isOn()) {\r\n\t\t\t\tlight.toogle();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void lighting(boolean onOrOff)\r\n {\r\n \tint i;\r\n \tfor (i=0;i<LightSet.size();i++) {\r\n \t\t((Light)LightSet.elementAt(i)).setState(onOrOff);\r\n \t}\r\n }",
"public void setIntakeLights(){\n \tintakeLights.set(true);\n }",
"public void setLights(boolean lights) {\n \tthis.lightsAreOn = lights;\n }",
"public void turnOn( ) {\n\t\t\t\tSystem.out.println(\"Light is on \");\n\t\t}",
"public void turnOffAllTheLights() {\r\n for (Light li : lightsArray) {\r\n li.turnOffLight();\r\n }\r\n }",
"private void turnOnLights(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_turnOnLights\n\n this.selectedTrain.setLights(1); // turn on lights\n this.operatingLogbook.add(\"Lights on.\");\n this.printOperatingLogs();\n }",
"private void lightOn(Map<Light, Matrix4f> lights) {\n numLight = 0;\n GL3 gl = glContext.getGL().getGL3();\n FloatBuffer fb4 = Buffers.newDirectFloatBuffer(4);\n LightLocation lightLoc = new LightLocation();\n for (Entry<Light, Matrix4f> entry : lights.entrySet()) {\n Light light = entry.getKey();\n Matrix4f lightTransForm = entry.getValue();\n Vector4f lightPosition = lightTransForm.transform(new Vector4f(light.getPosition()));\n Vector4f lightDirection = lightTransForm.transform(new Vector4f(light.getSpotDirection()));\n String lightName = \"light[\" + numLight + \"]\";\n lightLoc.position = shaderLocations.getLocation(lightName + \".position\");\n lightLoc.ambient = shaderLocations.getLocation(lightName + \".ambient\");\n lightLoc.diffuse = shaderLocations.getLocation(lightName + \".diffuse\");\n lightLoc.specular = shaderLocations.getLocation(lightName + \".specular\");\n lightLoc.direction = shaderLocations.getLocation(lightName + \".direction\");\n lightLoc.cutOff = shaderLocations.getLocation(lightName + \".cutOff\");\n\n gl.glUniform4fv(lightLoc.position, 1, lightPosition.get(fb4));\n gl.glUniform3fv(lightLoc.ambient, 1, light.getAmbient().get(fb4));\n gl.glUniform3fv(lightLoc.diffuse, 1, light.getDiffuse().get(fb4));\n gl.glUniform3fv(lightLoc.specular, 1, light.getSpecular().get(fb4));\n gl.glUniform4fv(lightLoc.direction, 1, lightDirection.get(fb4));\n gl.glUniform1f(lightLoc.cutOff, light.getSpotCutoff());\n numLight++;\n }\n gl.glUniform1i(shaderLocations.getLocation(\"numLights\"), numLight);\n }",
"public void setgearClawLights(){\n \tgearClawLights.set(true);\n }",
"public void changingLights(int[][] lightsOnOff) {\n if(this.command.equals(\"turn on\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 1;\n }\n }\n }\n /* if the command is \"turn off\", the range of\n * lights are made to have value of 0 */\n if(this.command.equals(\"turn off\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 0;\n }\n }\n }\n /* if the command is \"toggle all\", the range of\n * lights are made to have value of 1 if they\n * were 0 before and 0 if they were 1 before */\n if(this.command.equals(\"toggle all\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 1 - lightsOnOff[i][j];\n }\n }\n }\n }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"private void renderLights() {\n\t\t\n\t}",
"public void turnOn() {\n this.status = true;\n update(this.redValue, this.greenValue, this.blueValue);\n }",
"private void resetLights() {\n\n List<Integer> colors = DataHolder.getInstance().getColors();\n int iter = 0;\n for (int color: colors) {\n if (color == 2) {\n colors.set(iter, 0);\n }\n iter++;\n }\n DataHolder.getInstance().setColors(colors);\n }",
"private void toggle_light() {\n\t\ttry {\n\t\t\tif (!light_on) {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light_selected);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n\t\t\t\tgetCameraManager().getFramingRect();\n//\t\t\t\tCameraManager.get().turn_onFlash();\n\t\t\t\tgetCameraManager().setTorch(true);\n\n\t\t\t} else {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n//\t\t\t\tCameraManager.get().turn_offFlash();\n\t\t\t\tgetCameraManager().setTorch(false);\n\n\t\t\t}\n\t\t\tlight_on = !light_on;\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}",
"public void renderLights()\r\n\t{\r\n\t\tlightHandler.render();\r\n\t}",
"@Override\n\tpublic void on() {\n\t\tSystem.out.println(\"turn on the \"+name+\" Light\");\n\t}",
"void setupLights() {\n\n lightGroup = new Group();\n\n // Set up the ambient light\n lightAmbient = new AmbientLight(darkGrey);\n lightAmbient.setInfluencingBounds(infiniteBounds);\n lightAmbient.setCapability(Light.ALLOW_STATE_WRITE);\n lightAmbient.setEnable(true);\n lightGroup.addChild(lightAmbient);\n\n // Set up the directional light\n Vector3f lightDirection = new Vector3f(0.65f, -0.65f, -0.40f);\n lightDirectional = new DirectionalLight(white, lightDirection);\n lightDirectional.setInfluencingBounds(infiniteBounds);\n lightDirectional.setEnable(true);\n lightDirectional.setCapability(Light.ALLOW_STATE_WRITE);\n lightGroup.addChild(lightDirectional);\n\n // Set up the point light\n Point3f lightPosition = new Point3f(-1.0f, 1.0f, 0.6f);\n lightPoint = new PointLight(white, lightPosition, attenuation);\n lightPoint.setInfluencingBounds(infiniteBounds);\n lightPoint.setEnable(false);\n lightPoint.setCapability(Light.ALLOW_STATE_WRITE);\n lightPoint.setCapability(PointLight.ALLOW_ATTENUATION_WRITE);\n lightGroup.addChild(lightPoint);\n\n // Set up the spot light\n // Point the light back at the origin\n lightSpot = new SpotLight(white, lightPosition, attenuation,\n lightDirection, (float) Math.toRadians(spotSpreadAngle),\n spotConcentration);\n lightSpot.setInfluencingBounds(infiniteBounds);\n lightSpot.setEnable(false);\n lightSpot.setCapability(Light.ALLOW_STATE_WRITE);\n lightSpot.setCapability(PointLight.ALLOW_ATTENUATION_WRITE);\n lightSpot.setCapability(SpotLight.ALLOW_CONCENTRATION_WRITE);\n lightSpot.setCapability(SpotLight.ALLOW_SPREAD_ANGLE_WRITE);\n lightGroup.addChild(lightSpot);\n }",
"private void enableMoonlightMode() {\n stopService(new Intent(this, SunriseService.class));\n\n // Kill the previous moonlight service (in case it's running)\n stopService(new Intent(this, MoonlightService.class));\n\n // (Re)start the moonlight service\n startService(new Intent(this, MoonlightService.class));\n }",
"private void initLighting() {\n\t\t\n\t\t\n\t\tfloat lmodel_ambient[] = { 1f, 1f, 1f, 1.0f };\n\t\t// Hintergrundbeleuchtung definieren\n\t\tglLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);\n\n\t\t// Eine weitere Lichtquellen definieren\n\t\t\n\t\tglEnable(GL_LIGHTING);\n\n\t\tspotLight.turnLightOn();\n\t\tpointLight.turnLightOn();\n\t}",
"private void updateLight() {\r\n\t}",
"private void setLightStatus() {\n if (mCmd.equals(MSG_ON)) {\n setLighIsOn(true);\n } else {\n setLighIsOn(false);\n }\n }",
"public void searchLights() {\n\t\n\t\t// try to limit searching\n\t\tif(ports.contains(motors)) ports.remove(motors);\n\t\tif(state.get(State.values.serialport) != null) \n\t\t\tports.remove(state.get(State.values.serialport));\n\t\t\t\n\t\tUtil.debug(\"discovery for lights starting on ports: \" + ports.size(), this);\n\t\t\n\t\tfor (int i = ports.size() - 1; i >= 0; i--) {\n\t\t\tif (state.get(State.values.lightport)!=null) { break; } // stop if find it\n\t\t\t//if (connect(ports.get(i), BAUD_RATES[0])) {\t\n\t\t\tif (connect(ports.get(i), 57600)) {\n\t\t\t\tUtil.delay(TIMEOUT*2);\n\t\t\t\tif (serialPort != null) { close(); }\n\t\t\t}\n\t\t}\n\t}",
"public void hookLEDs() {\r\n\t\ttable.putBoolean(\"hooked\", true);\r\n\t}",
"private void refreshLights(){\n\n if (this.selectedTrain.getLights() == 1){ this.lightsOnRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == 0){ this.lightsOffRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == -1){ this.lightsFailureRadioButton.setSelected(true); }\n }",
"public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}",
"public void changeState(){\n\t\t//red - Green\n\t\tif (lights[0].isOn()){\n\t\t\tlights[0].turnOff();\n\t\t\tlights[2].turnOn();\n\t\t}\n\t\t\n\t\t//Green -yellow\n\t\telse if(lights[2].isOn()){\n\t\t\tlights[2].turnOff();\n\t\t\tlights[1].turnOn();\n\t\t}\n\t\t//yellow to red\n\t\telse if (lights[1].isOn()){\n\t\t\tlights[1].turnOff();\n\t\t\tlights[0].turnOn();\n\t\t}\n\t\t\n\t}",
"public void toggleLightSpheres() {\r\n\t\tmodel.control(AbstractModel.TOGGLE_LIGHT_SPHERES, null);\r\n\t}",
"void animate( LightCondition lights );",
"private void on(){\n\n\t\t// if light is off and there is a flash object\n\t\tif(_flash != null && !isFlashOn){\n\n\t\t\t_flash.on();\n\t\t\tisFlashOn = true;\n\t\t}\n\t}",
"@Override\n public void initialize() {\n limelight.disableDriverMode();\n limelight.enableLEDs();\n }",
"private static void turnFlashlightOn() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_TORCH);\n cam.setParameters(p);\n }",
"public static void setLightInfo()\n {\n for(int i = 0; i <= 19; i++)\n {\n lights.add(new Light());\n }\n\n //-----set position for all 15 lights-----\\\n //light1 -- middle light\n lights.get(0).setX(475);\n lights.get(0).setY(585);\n\n //--- left side --- \\\\\n\n //light2 - -\n lights.get(1).setX(350);\n lights.get(1).setY(570);\n\n //light3 - -\n lights.get(2).setX(230);\n lights.get(2).setY(530);\n\n //light4 - -\n lights.get(3).setX(130);\n lights.get(3).setY(470);\n\n //light5 - -\n lights.get(4).setX(110);\n lights.get(4).setY(410);\n\n //light6 - -\n lights.get(5).setX(165);\n lights.get(5).setY(370);\n\n //light7 - -\n lights.get(6).setX(230);\n lights.get(6).setY(350);\n\n //light8 - -\n lights.get(7).setX(290);\n lights.get(7).setY(340);\n\n //light9 - -\n lights.get(8).setX(355);\n lights.get(8).setY(337);\n\n //light10 - -\n lights.get(9).setX(420);\n lights.get(9).setY(336);\n\n\n //---- middle ----\\\\\n\n //light11 -\n lights.get(10).setX(485);\n lights.get(10).setY(335);\n\n //---- Right side of circle ----\\\\\n\n //light12 -\n lights.get(11).setX(540);\n lights.get(11).setY(336);\n\n //light13 -\n lights.get(12).setX(595);\n lights.get(12).setY(337);\n\n //light14 -\n lights.get(13).setX(655);\n lights.get(13).setY(340);\n\n //light15 -\n lights.get(14).setX(720);\n lights.get(14).setY(350);\n\n //light16 -\n lights.get(15).setX(785);\n lights.get(15).setY(370);\n\n //light17 -\n lights.get(16).setX(840);\n lights.get(16).setY(410);\n\n //light18 -\n lights.get(17).setX(820);\n lights.get(17).setY(470);\n\n //light19 -\n lights.get(18).setX(720);\n lights.get(18).setY(530);\n\n //light20 -\n lights.get(19).setX(600);\n lights.get(19).setY(570);\n\n }",
"public static void forceLightUpdate() {\n PLC_Sender.getInstance().updatePLC_Lights(true);\n }",
"public void turnOn() {\n\t\tOn = true;\n\t}",
"@Override\n public void execute() {\n light.on();\n }",
"public void lightsOff() {\n PHBridge bridge = PHHueSDK.getInstance().getSelectedBridge();\n PHLightState lightState = new PHLightState();\n lightState.setOn(false);\n bridge.setLightStateForDefaultGroup(lightState);\n }",
"public void turn_on () {\n this.on = true;\n }",
"private void toggleLight(){\n\t\tmyGLView.queueEvent(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmRenderer.toggleLight();\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"public void setLight1(){\n }",
"public void on() {\n // Sets the LED pin state to 1 (high)\n ledPin.high();\n }",
"private void addLights() {\n \t\tLight light = new DirectionalLight(\n \t\t\t\tnew Color3f(1f, 1f, 1f), new Vector3f(-1f, -1f, -1f));\n \t\t\n \t\tlight.setInfluencingBounds(\n \t\t\t\tnew BoundingSphere(new Point3d(0, 0, 0), 10));\n \t\t\n \t\tmyScene.addChild(light);\n \t\t\n \t\tlight = new DirectionalLight(\n \t\t\t\tnew Color3f(0.3f, 0.1f, 0.1f), new Vector3f(1f, 0f, 0f));\n \t\t\n \t\tlight.setInfluencingBounds(\n \t\t\t\tnew BoundingSphere(new Point3d(0, 0, 0), 10));\n \t\t\n \t\tmyScene.addChild(light);\n \t}",
"public void updateLighting() {\n\t\tint k;\n\t\tint i;\n\n\t\tfor (k=0; k<num_vobjects;k++) {\t\t\t// Loop through all the objects to be illuminated \n\t\t\t\n\t\t\tif ((vobject[k].potentially_visible) && (vobject[k].needs_lighting) ) {\n\t\t\t\tvobject[k].resetLighting();\n\t\t\t\tfor (i=0; i<num_vobjects;i++) {\t// Loop through all the light sources that can illuminate this object\n\t\t\t\t\tif (vobject[i].light_source) {\n\t\t\t\t\t\tvobject[k].addLightSource(vobject[i].abs_x_pos, vobject[i].abs_y_pos, vobject[i].abs_z_pos, vobject[i].light_red, vobject[i].light_green, vobject[i].light_blue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvobject[k].calculateAverageLighting();\n\t\t\t\tvobject[k].needs_lighting=false;\n\t\t\t}\n\t\t}\n\t}",
"public void removeAllLights() {\n if (_lights != null){\n _lights.clear();\n }\n }",
"private void reDrawLEDs(){\r\n if (this.isLEDEnable == false) {\r\n for (int i = 1; i < 8; i++) {\r\n LEDs[i].setOff();\t\t\t// turn off all display LEDs\r\n }\r\n }\r\n else {\r\n for (int i = 1; i < 8; i++) {\r\n LEDs[i].setOn(); \r\n LEDs[i].setColor(LEDColor.BLUE);\r\n //Utils.sleep(200);\r\n //leds[i].setOff();\r\n //Utils.sleep(200);\r\n }\r\n }\r\n }",
"public void setgearExtendLights(){\n \tgearExtendLights.set(true);\n }",
"public void run() {\n // check if lights are already flashing\n if (isFlashing()) {\n return;\n }\n \n // set the keep flashing flag\n keepFlashing = true;\n \n // set the flashing flag\n isFlashing = true;\n \n // turn all the lights on\n turnLightsOn();\n \n // toggle all the lights as if they were flashing\n while (keepFlashing) {\n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).toggle();\n }\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).toggle();\n }\n for (int i = 0; i < leftBorder.size(); i++) {\n leftBorder.get(i).toggle();\n }\n for (int i = 0; i < rightBorder.size(); i++) {\n rightBorder.get(i).toggle();\n }\n topLeft.toggle();\n topRight.toggle();\n bottomLeft.toggle();\n bottomRight.toggle();\n \n // take a time out\n try {\n Thread.sleep(500);\n } catch (Exception exception) {\n // empty body\n }\n }\n \n // set the is flashing flag\n isFlashing = false;\n \n // reset all the lights to off\n turnLightsOff();\n }",
"public Light(boolean isOn) {\n\t\tthis.isOn = isOn;\n\t}",
"@Override\n\tpublic void turnOn() {\n\n\t}",
"public void turnOn() {\n\t\tisOn = true;\n\t}",
"public void setLEDLights(int lightID);",
"@Override\n public void lightOn(INode root, Stack<Matrix4f> modelView) {\n Stack<Matrix4f> mvCopy = new Stack<>();\n for (Matrix4f mv : modelView) {\n mvCopy.push(new Matrix4f(mv));\n }\n Map<Light, Matrix4f> lights = root.getLights(mvCopy);\n this.lightOn(lights);\n }",
"@Override\n\tpublic void execute() {\n\t\tlight.on();\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlightOn = !lightOn;\n\t\t\t\tactiveLightSource(lightOn);\n\t\t\t\tlightButton.setLabel(lightOn ? \"Light off\" : \"Light On\");\n\t\t\t}",
"public void setStaticLight(boolean staticLight);",
"public void addLight(int id) {\n\tif(!lights.containsKey(id)) {\n\t lights.put(id, true);\n\t GL11.glEnable(id);\n\t}\n }",
"public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }",
"@Override\r\n public void turnOn(){\r\n isOn = true;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_ON);\r\n if (isOn){\r\n engageLoads();\r\n }\r\n }",
"protected void doLessLight() {\r\n\t\talpha = Math.max(0, alpha - 0.05f);\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"public void useLighting(Lighting[] lightings) {\n int num = 0;\n for (Lighting lighting : lightings)\n for (int j = 0; j < lighting.getNumLights(); j++) {\n SpotLightSource source = lighting.getSource(j);\n setUniformV3(getLightsMemberLocation(num, STRUCT_POS), source.getPos());\n setUniformV3(getLightsMemberLocation(num, STRUCT_COLOR), source.getColor());\n setUniformV3(getLightsMemberLocation(num, STRUCT_AM_COLOR), source.getAmColor());\n setUniformf(getLightsMemberLocation(num, STRUCT_ATTENUATION), source.getAttenuation());\n setUniformf(getLightsMemberLocation(num, STRUCT_GRADIENT), source.getGradient());\n num++;\n }\n setUniformi(uNumLights, num);\n }",
"public final void setLed(boolean on_off){\n LIBRARY.CLEyeCameraLED(camera_, on_off ? 1 :0);\n }",
"public void freeLights(){\n\t\t//android.util.Log.d(TAG,\"freeLights()\");\n\t\tfinal int size = this.lights.size();\n\t\tfor(int index=0; index < size; index++){\n\t\t\tthis.lights.delete(this.lights.keyAt(index));\n\t\t}\n\t}",
"public void enable() {\n TalonHelper.configNeutralMode(Arrays.asList(armMotor, armMotorSlave), NeutralMode.Brake);\n }",
"private void updateLEDs() {\n\t\t\n\t\t/*\n\t\t * LOGIC\n\t\t * if no close bots and not waiting for bot to connect, set all LEDs off as you need to be roaming around\n\t\t * if connected to a bot and that bot is not yet GREEN, turn BLUE\n\t\t * if there are WHITE LEDs on, turn off any WHITE LEDs where there are blue bots\n\t\t * if it has reached a bots white LED, connect to it and look at it\n\t\t * if the botConnectedTo has turned its LEDs GREEN and our LEDs are BLUE, request connection for other bot behind\n\t\t */\n\t\t\n\t\t// if no close bots and not waiting for bot to connect, set all LEDs off as you need to be roaming around\n\t\tif (closeBots.size() < 1 && !LEDManager.hasLEDSetTo(Color.WHITE)) { \n\t\t\tbotConnectedTo = null;\n\t\t\tthis.LEDManager.turnOffAllLEDs(); \n\t\t}\n\t\t\n\t\t// if connected to a bot and that bot is not yet GREEN, turn BLUE\n\t\tif (botConnectedTo != null && !botConnectedTo.LEDManager.hasLEDSetTo(Color.GREEN)) {\n\t\t\tthis.LEDManager.setAllLEDs(Color.BLUE);\n\t\t}\n\t\t\n\t\t// if there are WHITE LEDs on, turn off any WHITE LEDs where there are blue bots\n\t\tif (LEDManager.hasLEDSetTo(Color.WHITE)) {\n\t\t\tsens.turnOffWhiteLEDsIfBlueBotConnected();\n\t\t\t\n\t\t\t// if no WHITE LEDs remain, turn GREEN\n\t\t\tif (!LEDManager.hasLEDSetTo(Color.WHITE)) {\n\t\t\t\tLEDManager.setAllLEDs(Color.GREEN);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if it has reached a bots white LED, connect to it and look at it\n\t\tif (closestWhiteLED != null && sens.isCloseTo(closestWhiteLED.getTargetX(), closestWhiteLED.getTargetY(), 2)) {\n\t\t\tbotConnectedTo = closestWhiteLED.getOwner();\n\t\t\tthis.lookAt(botConnectedTo);\n\t\t}\n\t\t\n\t\t// if the botConnectedTo has turned its LEDs GREEN and our LEDs are BLUE, request connection for other bot behind\n\t\tif (botConnectedTo != null && botConnectedTo.LEDManager.hasLEDSetTo(Color.GREEN) && this.LEDManager.hasLEDSetTo(Color.BLUE)) {\n\t\t\tLEDManager.requestConnection(\"b\");\n\t\t}\n\t\t\n\t}",
"private void createLights(TiledMap map)\r\n\t{\r\n\t\tlightLayer = map.getLayers().get(\"Lights\").getObjects();\r\n\r\n\t\tfor (int count = 0; count < lightLayer.getCount(); count++)\r\n\t\t{\r\n\t\t\tRectangleMapObject obj = (RectangleMapObject) lightLayer.get(count);\r\n\r\n\t\t\tnew PointLight(lightHandler, 10, Color.WHITE, 30,\r\n\t\t\t\t\tobj.getRectangle().x / Constants.BOX_SCALE,\r\n\t\t\t\t\tobj.getRectangle().y / Constants.BOX_SCALE);\r\n\t\t}\r\n\t}",
"public void turnLightsOff() {\n if (isFlashing()) {\n return;\n }\n \n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).turnOff();\n }\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).turnOff();\n }\n for (int i = 0; i < leftBorder.size(); i++) {\n leftBorder.get(i).turnOff();\n }\n for (int i = 0; i < rightBorder.size(); i++) {\n rightBorder.get(i).turnOff();\n }\n topLeft.turnOff();\n topRight.turnOff();\n bottomLeft.turnOff();\n bottomRight.turnOff();\n }",
"public void setAllLeds(int red, int green, int blue)\n {\n // Verify service is connected\n assertService();\n \n try {\n \tmLedService.setAllLeds(mBinder, red, green, blue);\n } catch (RemoteException e) {\n Log.e(TAG, \"setAllLeds failed\");\n }\n }",
"private void activateTrafficLight(TrafficLight activeTrafficLight) {\n for (TrafficLight trafficLight : trafficLights) {\n trafficLight.setState(TrafficLight.State.RED);\n }\n\n // Activating light\n this.activeTrafficLight = activeTrafficLight;\n activeTrafficLight.nextState();\n stepCounter = 0;\n }",
"private void generateLights(Universe universe) throws SAXException {\n ArrayList<SceneLight> lights = universe.getScene().getLightArray();\n for (int i = 0; i < lights.size(); i++) {\n saver.addAttribute(\"type\", XmlSaver.CDATA, lights.get(i).getLightType().name());\n saver.startTag(\"light\");\n Color3f color = new Color3f(lights.get(i).getColor());\n saver.startTag(\"color\", Converter.tuple3fToString(color));\n switch(lights.get(i).getLightType()){\n// case ambient:\n case point:\n Point3f position = lights.get(i).getPosition();\n saver.startTag(\"position\", Converter.tuple3fToString(position));\n Point3f attenuation = lights.get(i).getAttenuation();\n saver.startTag(\"attenuation\", Converter.tuple3fToString(attenuation));\n break;\n case directional:\n Vector3f direction = lights.get(i).getDirection();\n saver.startTag(\"direction\", Converter.tuple3fToString(direction));\n break;\n }\n saver.closeTag(\"light\");\n }\n }",
"@Override\n public void discardRemainingLights() {\n while (nextLightIndex < MAX_POINT_LIGHTS) {\n setPointLight(new Vector3f(), Color4f.INVISIBLE, 0);\n }\n }",
"void setShutterLEDState(boolean on);",
"protected void doMoreLight() {\r\n\t\talpha = Math.min(1f, alpha + 0.05f);;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"public void setLighting(GL3 gl) {\n\t\t // Set the lighting properties\n\t\t\n\t\t// get sunlight vector coords\n\t\tfloat xSun = terrain.getSunlight().getX();\n\t\tfloat ySun = terrain.getSunlight().getY();\n\t\tfloat zSun = terrain.getSunlight().getZ();\n\t\t\n/*\t\t// check fps\n\t\tPoint3D torchPos;\n\t\tif (camera.getPerson().isFps()) {\n\t\t\ttorchPos = new Point3D(camera.getGlobalPosition().getX(), camera.getGlobalPosition().getY(), camera.getGlobalPosition().getZ());\n*/\n\t\tPoint3D torchPos;\n\t\t// check fps\n\t\tif (person.isFps()) {\n\t\t\ttorchPos = new Point3D(person.getCamera().getGlobalPosition().getX(),\n\t\t\t\t\tperson.getCamera().getGlobalPosition().getY(),\n\t\t\t\t\tperson.getCamera().getGlobalPosition().getZ());\n\t\t} else { \n\t\t\ttorchPos = new Point3D(person.getGlobalPosition().getX(),\n\t\t\t\t\tperson.getGlobalPosition().getY() + 0.2f, \n\t\t\t\t\tperson.getGlobalPosition().getZ());\n\t\t}\n\t\t\n Shader.setPoint3D(gl, \"sunlight\", new Point3D(xSun,ySun,zSun)); // set sunlight vector to passed in vector \n Shader.setColor(gl, \"lightIntensity\", Color.WHITE);\n \n // Set the material properties\n Shader.setColor(gl, \"ambientCoeff\", Color.WHITE);\n Shader.setColor(gl, \"diffuseCoeff\", new Color(0.5f, 0.5f, 0.5f));\n Shader.setFloat(gl, \"phongExp\", 16f);\n \n // for torch light\n Shader.setFloat(gl, \"cutoff\", 90f); // in degrees\n Shader.setPoint3D(gl, \"posTorch\", torchPos);\n Shader.setFloat(gl, \"attenuationFactor\", 40f); \n Shader.setColor(gl, \"lightIntensityTorch\", Color.YELLOW); \n \n if (day) {\n \t// light properties for day\n Shader.setColor(gl, \"specularCoeff\", new Color(0.8f, 0.8f, 0.8f));\n \tShader.setColor(gl, \"ambientIntensity\", new Color(0.2f, 0.2f, 0.2f));\n Shader.setPoint3D(gl, \"dirTorch\", new Point3D(0,0,0)); // set torchDir vector \n } else { \n \t// light properties for night \n Shader.setColor(gl, \"specularCoeff\", new Color(0.5f, 0.5f, 0.5f));\n \tShader.setColor(gl, \"ambientIntensity\", new Color(0.01f, 0.01f, 0.01f));\n Shader.setPoint3D(gl, \"dirTorch\", new Point3D(0,0,1)); // set torchDir vector \n }\n\t}",
"public void enableLighting(boolean enable)\n\t{\n\t\tthis.glStateChanger.setLighting(enable);\n\t}",
"@Override\n protected void initialize() {\n //Robot.limelight.setLiveStream(0);\n Robot.limelight.setLEDMode(3);\n }",
"public static void lightOn(Window window) {\n\t\tWindowManager.LayoutParams lp = window.getAttributes();\r\n\t\tlp.alpha = 1.0f;\r\n\t\twindow.setAttributes(lp);\r\n\t}",
"public static void init() {\n\t\tsetOrtho(Display.getWidth(), Display.getHeight());\n\t\tglEnable(GL_BLEND);\n\t\tglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\t\t\n\t\tLights.init();\n\t\tenableCulling();\n\t}",
"private void renderLights(Graphics g) {\n\t\tfor (int i = 0; i < LEDs.size(); i++) {\n\t\t\tLEDs.get(i).render(g);\n\t\t}\n\t}",
"public void switchOn() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"o\");\n setCurrentState(true);\n }",
"public void addLight(LightSource... lights) {\r\n for (int i = 0; i < lights.length; ++i)\r\n _lights.add(lights[i]);\r\n }",
"public void stopFlashingLights() {\n keepFlashing = false;\n }",
"protected void initialize() {\n \t\n \t// TODO: Switch to execute on changes based on alignment\n \tRobot.lightingControl.set(LightingObjects.BALL_SUBSYSTEM,\n LightingControl.FUNCTION_BLINK,\n LightingControl.COLOR_ORANGE,\n 0,\t\t// nspace - don't care\n 300);\t// period_ms \n }",
"public void disablecameraLights(){\n \tcamLights.set(true);\n }",
"public static void setLightScreenOnNotification(Context context, boolean lightsOn)\n\t{\n\t\tPreferenceUtils.setLightScreenOnNotification(context, lightsOn);\n\t}",
"@Override\n\tpublic void open() {\n\t\tlight.open();\n\t}",
"public void addLights(LightSource... lights) {\n if(lights == null){\n return;\n }\n\n for (LightSource lightSource: lights\n ) {\n _lights.add(lightSource);\n }\n }",
"public void enableLight(final boolean enable) {\n mLightEnabled = enable;\n if (!mLightEnabled) {\n mPaint.setColorFilter(null);\n } else {\n mPaint.setAlpha(0xFF);\n }\n invalidate();\n }",
"private void blink(final boolean lit){\n \n if(mRobot != null){\n \n //If not lit, send command to show blue light, or else, send command to show no light\n if(lit){\n RGBLEDOutputCommand.sendCommand(mRobot, 0, 0, 0);\n }else{\n RGBLEDOutputCommand.sendCommand(mRobot, 0, 0, 255);\n }\n \n //Send delayed message on a handler to run blink again\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n blink(!lit);\n }\n }, 1000);\n }\n }",
"private void setOneAllChecks() {\r\n\r\n checkIman.setEnabled(true);\r\n checkBonferroni.setEnabled(true);\r\n checkHolm.setEnabled(true);\r\n checkHochberg.setEnabled(true);\r\n checkHommel.setEnabled(true);\r\n checkHolland.setEnabled(true);\r\n checkRom.setEnabled(true);\r\n checkFinner.setEnabled(true);\r\n checkLi.setEnabled(true);\r\n\r\n }",
"public void turnOn(boolean truth) {\r\n setEnabled(truth);\r\n }",
"protected void initLight(GL10 gl) {\n\t\tgl.glEnable(GL10.GL_LIGHTING);\n\t\tgl.glEnable(GL10.GL_LIGHT0);\n\t\tgl.glEnable(GL10.GL_LIGHT1);\n\t\tgl.glShadeModel(GL10.GL_SMOOTH);\n\t\tthis.mLight = new Light();\n\t\tthis.mLight.initAmbient(-0.2f, -0.2f, -0.2f, 1.0f);\n\t\tthis.mLight.initDiffuse(1.f, 1.0f, 1.0f, 1f);\n\t\tthis.mLight.initSpecular(1.0f, 1.0f, 1.0f, 1.0f);\n\t\tthis.mLight.initPosition(0.0f, 3f, 20f, 0.0f);\n\t\tthis.mLight.setLight(gl, GL10.GL_LIGHT0);\n\t\t\n\t\tthis.mLight2 = new Light();\n\t\tthis.mLight2.initAmbient(-0.1f, -0.1f, -0.1f, 1.0f);\n\t\tthis.mLight2.initDiffuse(1f, 1f, 1f, 1f);\n\t\tthis.mLight2.initSpecular(1f, 1f, 1f, 1f);\n\t\tthis.mLight2.initPosition(0f, 2f, 13.5f, 0.0f);\n\t\tthis.mLight2.setLight(gl, GL10.GL_LIGHT1);\n//\t\tgl.glDisable(GL10.GL_LIGHT1);\n\t}",
"public void flashlightSwitch()\n {\n usingFlashlight = !usingFlashlight;\n }",
"public void resolveLights(){trafficList.forEach(TrafficLight::resolve);}",
"public void turnOn(){\n Logger.getGlobal().log(Level.INFO,\" Turning On..\");\n vendingMachine = new VendingMachine();\n inventoryPopulation();\n idle();\n }",
"public void allOff() {\r\n\t\tsetAllColor(0, 0, 0);\r\n\t}",
"private void blink(final boolean lit) {\n\t\tif (mRobot == null) {\n\t\t\tblinking = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// If not lit, send command to show blue light, or else, send command to\n\t\t// show no light\n\t\tif (lit) {\n\t\t\tmRobot.setColor(0, 0, 0);\n\n\t\t} else {\n\t\t\tmRobot.setColor(0, 255, 0);\n\t\t}\n\n\t\tif (blinking) {\n\t\t\t// Send delayed message on a handler to run blink again\n\t\t\tfinal Handler handler = new Handler();\n\t\t\thandler.postDelayed(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tblink(!lit);\n\t\t\t\t}\n\t\t\t}, 2000);\n\t\t}\n\t}",
"public void initLight(GL10 gl)\n\t{\n\t\tgl.glEnable(GL10.GL_LIGHT0);// 打开0号光源\n\n\t\t// 环境光设置\n\t\tfloat[] ambientParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };// 光参数 RGBA\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_AMBIENT, ambientParams, 0);\n\n\t\t// 散射光设置\n\t\tfloat[] diffuseParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_DIFFUSE, diffuseParams, 0);\n\n\t\t// 镜面光设置\n\t\tfloat[] specularParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_SPECULAR, specularParams, 0);\n\n\t\t// 指定光源位置\n\t\tfloat[] directionParams =\n\t\t{ -1f, 1f, 1f, 0 };// 定向光\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, directionParams, 0);\n\t}",
"public void lightBuild() {\n buildPawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }",
"public static synchronized void idleAllLiftMotors() {\r\n\t\t\tsynchronized(armStage1.motorLock) {\r\n//\t\t\t\tsynchronized(armStage2.motorLock) {\r\n\t\t\t\t\tarmStage1.motorObj.set(ControlMode.PercentOutput, 0.0);\r\n//\t\t\t\t\tarmStage1.auxMotorObj.set(ControlMode.PercentOutput, 0.0);\r\n//\t\t\t\t\tarmStage2.motorObj.set(ControlMode.PercentOutput, 0.0);\r\n\t\t\t\t\tarmStage1.operatingMode = OperatingModesE.IDLE;\r\n//\t\t\t\t\tarmStage2.operatingMode = OperatingModesE.IDLE;\r\n//\t\t\t\t}\r\n\t\t\t}\r\n\t\t}"
] | [
"0.7563086",
"0.74004674",
"0.73539585",
"0.7250736",
"0.723721",
"0.7081113",
"0.6985954",
"0.69205964",
"0.69098926",
"0.68636703",
"0.686316",
"0.6823526",
"0.67917407",
"0.6785274",
"0.6764499",
"0.6671959",
"0.66578543",
"0.66411674",
"0.6638394",
"0.6610078",
"0.65866154",
"0.64874",
"0.6486652",
"0.6431718",
"0.639795",
"0.63931406",
"0.63919604",
"0.63824373",
"0.6381457",
"0.63714516",
"0.63398796",
"0.6327083",
"0.6307124",
"0.62525165",
"0.6249627",
"0.6247103",
"0.62369794",
"0.6228532",
"0.62223357",
"0.62197846",
"0.62106216",
"0.6178735",
"0.61724967",
"0.6153401",
"0.61456716",
"0.61436003",
"0.61343026",
"0.6126772",
"0.6109734",
"0.60679764",
"0.604288",
"0.6023543",
"0.6015562",
"0.59900606",
"0.59798497",
"0.5978233",
"0.5974207",
"0.5969782",
"0.59670115",
"0.5957523",
"0.59568113",
"0.5949352",
"0.5948955",
"0.59182876",
"0.59162736",
"0.59159786",
"0.590032",
"0.5893855",
"0.58892536",
"0.5887766",
"0.5872011",
"0.5867206",
"0.5861723",
"0.5843009",
"0.58357793",
"0.58353096",
"0.58333224",
"0.58257514",
"0.5813911",
"0.5807879",
"0.5802266",
"0.5747226",
"0.57411164",
"0.5730734",
"0.5721849",
"0.5704359",
"0.5684537",
"0.5680946",
"0.56700563",
"0.5670045",
"0.5659013",
"0.5652409",
"0.562835",
"0.56237525",
"0.5619326",
"0.56148493",
"0.5613921",
"0.55957377",
"0.5585925",
"0.55816734"
] | 0.7780391 | 0 |
Turns all the lights off. | public void turnLightsOff() {
if (isFlashing()) {
return;
}
for (int i = 0; i < topBorder.size(); i++) {
topBorder.get(i).turnOff();
}
for (int i = 0; i < bottomBorder.size(); i++) {
bottomBorder.get(i).turnOff();
}
for (int i = 0; i < leftBorder.size(); i++) {
leftBorder.get(i).turnOff();
}
for (int i = 0; i < rightBorder.size(); i++) {
rightBorder.get(i).turnOff();
}
topLeft.turnOff();
topRight.turnOff();
bottomLeft.turnOff();
bottomRight.turnOff();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void turnOffAllLights() {\r\n\t\tfor (Light light : lights) {\r\n\t\t\tif(light.isOn()) {\r\n\t\t\t\tlight.toogle();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void turnOffAllTheLights() {\r\n for (Light li : lightsArray) {\r\n li.turnOffLight();\r\n }\r\n }",
"public void lightsOff() {\n PHBridge bridge = PHHueSDK.getInstance().getSelectedBridge();\n PHLightState lightState = new PHLightState();\n lightState.setOn(false);\n bridge.setLightStateForDefaultGroup(lightState);\n }",
"public void allOff() {\r\n\t\tsetAllColor(0, 0, 0);\r\n\t}",
"public void off() {\n // Sets the LED pin state to (low)\n ledPin.low();\n }",
"private void turnOffLights(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_turnOffLights\n\n this.selectedTrain.setLights(0); // turn off lights\n this.operatingLogbook.add(\"Lights off.\");\n this.printOperatingLogs();\n }",
"public void turnOff() {\n update(0,0,0);\n this.status = false;\n }",
"public void unhookLEDs() {\r\n\t\ttable.putBoolean(\"hooked\", false);\r\n\t\tleftOff();\r\n\t\trightOff();\r\n\t}",
"public void stopFlashingLights() {\n keepFlashing = false;\n }",
"public void removeAllLights() {\n if (_lights != null){\n _lights.clear();\n }\n }",
"public void turnOff() {\n\t\tOn = false;\n\t\tVolume = 1;\n\t\tChannel = 1;\n\t}",
"@Override\n\tpublic void off() {\n\t\tSystem.out.println(\"turn off the \"+name+\" Light\");\n\t}",
"public void turnOff() {\n\t\tisOn = false;\n\t}",
"@Override\n\tpublic void turnOff() {\n\n\t}",
"public void turn_off () {\n this.on = false;\n }",
"public void switchOff();",
"public void disablecameraLights(){\n \tcamLights.set(true);\n }",
"private void off(){\n\n\t\t// if light is on and there is a flash object\n\t\tif (_flash != null && isFlashOn){\n\n\t\t\t_flash.off();\n\t\t\tisFlashOn = false;\n\t\t}\n\t}",
"private static void turnFlashlightOff() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_OFF);\n cam.setParameters(p);\n }",
"public void turnOff(){\n vendingMachine = null;\n Logger.getGlobal().log(Level.INFO,\" Turning Off...\");\n }",
"public static void stopAllMotors() {\r\n\t\tleftMotorReg.stop(true);\r\n\t\trightMotorReg.stop(true);\r\n\t\tarmMotor1Reg.stop(true);\r\n\t\tarmMotor2Reg.stop(true);\r\n\t}",
"private void resetLights() {\n\n List<Integer> colors = DataHolder.getInstance().getColors();\n int iter = 0;\n for (int color: colors) {\n if (color == 2) {\n colors.set(iter, 0);\n }\n iter++;\n }\n DataHolder.getInstance().setColors(colors);\n }",
"public void freeLights(){\n\t\t//android.util.Log.d(TAG,\"freeLights()\");\n\t\tfinal int size = this.lights.size();\n\t\tfor(int index=0; index < size; index++){\n\t\t\tthis.lights.delete(this.lights.keyAt(index));\n\t\t}\n\t}",
"@Override\n public void discardRemainingLights() {\n while (nextLightIndex < MAX_POINT_LIGHTS) {\n setPointLight(new Vector3f(), Color4f.INVISIBLE, 0);\n }\n }",
"public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }",
"public void switchOff() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"f\");\n setCurrentState(false);\n }",
"public void turnOff() {\n // set the flag\n onFlag = false;\n \n // set the image\n setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), offImageIcon));\n }",
"public void stopTracking()\n {\n pixyThread.interrupt();\n leds.setMode(LEDController.Mode.OFF);\n }",
"@Override\r\n public void turnOff() {\r\n isOn = false;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_OFF);\r\n if (this.engaged()) {\r\n disengageLoads();\r\n }\r\n }",
"private void killLight() {\n stopService(new Intent(this, SunriseService.class));\n\n // Kill the moonlight service (in case it's running)\n stopService(new Intent(this, MoonlightService.class));\n\n // Actually turn off the light (by zone)\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n // Turn off the light for the selected zone\n SingletonServices.getMQTT(Main.this).fadeOut();\n }\n catch (Exception exc) {\n // Log errors to logcat\n Log.e(Logging.TAG, \"Kill error\", exc);\n }\n }\n }).start();\n }",
"public void disable() {\n TalonHelper.configNeutralMode(Arrays.asList(armMotor, armMotorSlave), NeutralMode.Coast);\n }",
"public void off() {\n this.relay.set(Relay.Value.kOff);\n }",
"public void turnStrobeOff(){\n Intent stop_strobe_intent = new Intent(FlareConstants.STOP_STROBE);\n stop_strobe_intent.putExtra(FlareConstants.STOP_STROBE, FlareConstants.STOP_STROBE);\n LocalBroadcastManager.getInstance(this).sendBroadcast(stop_strobe_intent);\n Log.d(TAG, \"Sent stop strobe intent broadcast\");\n }",
"@Invalidate\n\tpublic synchronized void stop() {\n\t\tSystem.out.println(\"Component is stopping...\");\n\t\tfor (PresenceSensor sensor : presenceSensors) {\n\t\t\tsensor.removeListener(this);\n\t\t}\n\t\tfor (BinaryLight binaryLight : binaryLights) {\n\t\t\tbinaryLight.removeListener(this);\n\t\t}\n\t}",
"private void unsetOneAllChecks() {\r\n\r\n checkIman.setEnabled(false);\r\n checkBonferroni.setEnabled(false);\r\n checkHolm.setEnabled(false);\r\n checkHochberg.setEnabled(false);\r\n checkHommel.setEnabled(false);\r\n checkHolland.setEnabled(false);\r\n checkRom.setEnabled(false);\r\n checkFinner.setEnabled(false);\r\n checkLi.setEnabled(false);\r\n\r\n }",
"public void reset() {\n // stop motors\n Motor.A.stop();\t\n Motor.A.setPower(0);\t\n Motor.B.stop();\n Motor.B.setPower(0);\t\n Motor.C.stop();\n Motor.C.setPower(0);\t\n // passivate sensors\n Sensor.S1.passivate();\n Sensor.S2.passivate();\n Sensor.S3.passivate();\n for(int i=0;i<fSensorState.length;i++)\n fSensorState[i] = false;\n }",
"private void stopMotors() {\n pidDrive.disable();\n pidRotate.disable();\n robot.rightDrive.setPower(0);\n robot.leftDrive.setPower(0);\n }",
"public void off() {\n\n\t}",
"public void stopRobot(){\n LAM.setPower(0);\n RAM.setPower(0);\n ILM.setPower(0);\n IRM.setPower(0);\n BLM.setPower(0);\n BRM.setPower(0);\n FLM.setPower(0);\n FRM.setPower(0);\n }",
"public void turnOff(int x, int y);",
"public void disable()\n {\n // Verify service is connected\n assertService();\n \n try {\n \tmLedService.disable(mBinder);\n } catch (RemoteException e) {\n Log.e(TAG, \"disable failed\");\n }\n }",
"public void stop(){\n started = false;\n for (DcMotor motor :this.motors) {\n motor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor.setPower(0);\n }\n this.reset();\n }",
"public void sendAllSoundsOff()\n {\n super.sendAllSoundsOff();\n }",
"public void stopMotors() {\n\t\tRobotMap.frontLeft.set(0);\n\t\tRobotMap.backLeft.set(0);\n\t\tRobotMap.frontRight.set(0);\n\t\tRobotMap.backRight.set(0);\n\t}",
"public void setEngineOff();",
"void turnOffPads() throws ToyPadException;",
"public void stop()\n {\n robot.FL_drive.setPower(0);\n robot.FR_drive.setPower(0);\n robot.BL_drive.setPower(0);\n robot.BR_drive.setPower(0);\n }",
"protected static void stopAllSounds() {\r\n\t\tSoundManager.stopAll(GameSound.effects);\r\n\t\tSoundManager.stopAll(GameSound.music);\r\n\t\tSoundManager.stopAll(GameSound.melodies);\r\n\t}",
"private void turnBeaconOff() {\n\t\t\t\n\t\t\tString beaconSetAdvertisingDisable = getSetAdvertisingEnableCmd( false);\n\t\t\t\n\t\t\tfinal String envVars[] = { \n\t\t\t\t\t\"SET_ADV_ENABLE_CMD=\" + beaconSetAdvertisingDisable\n\t\t\t};\n\t\t\t\n\t\t\tfinal String cmd = \"./scripts/beacon_stop\";\n\t\t\t\n\t\t\tboolean status = runScript( cmd, envVars, null, null);\n\t\t\t\n\t\t}",
"public void disableMonsters(){\n enabled = false;\n }",
"@Override\n public void turnOff() {\n System.out.println(\"this wont happen\");\n }",
"private void turnOffCamera() {\n playSound();\n preview.removeAllViews();\n params = camera.getParameters();\n params.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);\n camera.setParameters(params);\n camera.stopPreview();\n camera.release();\n camera = null;\n isCameraOn = false;\n strobo.setChecked(false);\n turnOffFlash();\n toggleButtonImageCamera();\n\n }",
"public void offMovimentSensor(){\r\n long timestamp= System.currentTimeMillis();\r\n for (Moviment sm:listSensorMoviment()){\r\n if(sm.isDetection()==true){\r\n long limit=sm.getTime()+sm.getInterval();\r\n if(timestamp>limit){\r\n sm.setDetection(false);\r\n sm.setTime(0);\r\n for (Light l:lights)\r\n l.setStatus(false);\r\n }\r\n }\r\n }\r\n }",
"void turnOff() throws ActorServiceCallException;",
"private void reDrawLEDs(){\r\n if (this.isLEDEnable == false) {\r\n for (int i = 1; i < 8; i++) {\r\n LEDs[i].setOff();\t\t\t// turn off all display LEDs\r\n }\r\n }\r\n else {\r\n for (int i = 1; i < 8; i++) {\r\n LEDs[i].setOn(); \r\n LEDs[i].setColor(LEDColor.BLUE);\r\n //Utils.sleep(200);\r\n //leds[i].setOff();\r\n //Utils.sleep(200);\r\n }\r\n }\r\n }",
"@Override\r\n\tpublic void execute() {\n\t\tlight.off();\r\n\t}",
"public void stopTurning() {\r\n turningPID.disable();\r\n tankDrive(0, 0);\r\n }",
"protected void stopAll() {\n\t\tif (this.udpServer!=null)\n\t\t\tthis.udpServer.interrupt();\n\t\tif (this.connectionServer!=null)\n\t\t\tthis.connectionServer.interrupt();\n\t\tthis.connectionServer=null; // supprime le TCPServer et les Sockets associés\n\t\tthis.udpServer=null; // supprime l'UDPServer et les Sockets associés\n\t\tif (this.agent.getUserStatusManager()!=null)\n\t\t\tfor (String u : this.agent.getUserStatusManager().getActiveUsers())\n\t\t\t\tthis.removeSocket(u);; // interrompt tous les UserSockets\n\t\tthis.mapSockets.clear();\n\t}",
"@Input(\"onOff\")\n synchronized public void onOff() {\n try {\n _switchJMXSource.setValue(false);\n } catch (PropertyVetoException e) {}\n }",
"public void reset() {\n onoff.reset();\n itiefe.reset();\n itiefe.setEnabled(false);\n }",
"void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }",
"private void turnOff(View v) {\n bluetoothAdapter.disable();\n }",
"private void halt() {\n robot.leftFront.setPower(0);\n robot.leftBack.setPower(0);\n robot.rightFront.setPower(0);\n robot.rightBack.setPower(0);\n }",
"public void resetAllOperations() {\n\t\t/*\n\t\t * Check to see if we are in any countdown modes\n\t\t */\n\t\tif(inCountdown1Mode) {\n\t\t\twarmUpWindow1.dismiss();\n\t\t}\t\t\n\t\tif(inBaselineMode) {\n\t\t\tbaselineWindow.dismiss();\n\t\t}\n\t\t\n\t\t/**\n\t\t * Turn off any red leds\n\t\t */\n\t\tledOn1.setVisibility(View.INVISIBLE);\n\t\tledOn2.setVisibility(View.INVISIBLE);\n\t\tledOn3.setVisibility(View.INVISIBLE);\n\t\tledOn4.setVisibility(View.INVISIBLE);\n\t\tledOn5.setVisibility(View.INVISIBLE);\n\t\tledOn6.setVisibility(View.INVISIBLE);\n\t\tledOn7.setVisibility(View.INVISIBLE);\n\t\tledOn8.setVisibility(View.INVISIBLE);\n\t\tledOn9.setVisibility(View.INVISIBLE);\n\t\t\n\t\t/*\n\t\t * Reset any program flow variables\n\t\t */\n\t\tinCountdown1Mode = false;\n\t\tinBaselineMode = false;\n\t\ton = false;\n\t\tmodeChange = false;\n\t\twarmedUp = false;\n\t\t\n\t\t/*\n\t\t * Reset counts\n\t\t */\n\t\tcountdown1 = WARMUP_COUNT;\n\t\tcountdown2 = BASELINE_COUNT;\n\t\ttvUpdate(tvSensorValue, \"--\");\n\t\t\n\t\tcountdown1Handler.removeCallbacksAndMessages(null);\n\t\tcountdown2Handler.removeCallbacksAndMessages(null);\n\t\tmodeHandler.removeCallbacksAndMessages(null);\n\t\ttickHandler.removeCallbacksAndMessages(null);\n\t\tsetLEDsHandler.removeCallbacksAndMessages(null);\n\t\t\n\t\t// Stop taking measurements\n\t\tstreamer.disable();\n\t\t// Disable the sensor\n\t\tdroneApp.myDrone.quickDisable(qsSensor);\n\t}",
"public static void clearSkin() {\r\n\t\tMain.skinIsIowaState = false;\r\n\t\tMain.skinIsIowa = false;\r\n\t\tMain.skinIsNorthernIowa = false;\r\n\t\t\r\n\t\tGameOptions.iowaState.setState(false);\r\n\t\tGameOptions.iowa.setState(false);\r\n\t\tGameOptions.northernIowa.setState(false);\r\n\t}",
"void disablePWM();",
"void turnOff() {\n System.out.println(\"Turning off the TV\");\n }",
"void stopAll();",
"public void stopMotors(){\n\t\tsynchStop(MMXCOMMAND_BRAKE);\n\t}",
"public void stop() {\n climberMotors.stopMotor();\n }",
"public void stop() {\n m_enabled = false;\n }",
"void unsetSurfaceRefs();",
"private void unbindTexturedModel() {\n\t\tGL20.glDisableVertexAttribArray(0);\n\t\tGL20.glDisableVertexAttribArray(1);\n\t\tGL20.glDisableVertexAttribArray(2);\n\t\t\t\t\n\t\t// Then also have to unbind the VAO, instead of putting a ID in, we just put in 0\n\t\tGL30.glBindVertexArray(0);\n\t}",
"private void stopAllListeners() {\n if (unitReg != null && unitListener != null) {\n unitReg.remove();\n }\n }",
"public static void shutDown(){\n for(int i = PS3_LIST_.size()-1; i >= 0; i--){\n PS3 instance = PS3_LIST_.get(i);\n instance.setLed(false);\n instance.destroy();\n }\n PS3Logger.log(PS3Logger.TYPE.DEBUG, null, \"PS3 SHUTDOWN\");\n }",
"@SimpleFunction(description = \"Stop the drive motors of the robot.\")\n public void Stop() {\n String functionName = \"Stop\";\n if (!checkBluetooth(functionName)) {\n return;\n }\n\n for (NxtMotorPort port : driveMotorPorts) {\n setOutputState(functionName, port, 0,\n NxtMotorMode.Brake, NxtRegulationMode.Disabled, 0, NxtRunState.Disabled, 0);\n }\n }",
"public void stop() {\n\tanimator = null;\n\toffImage = null;\n\toffGraphics = null;\n }",
"private void unsetMultipleChecks() {\r\n\r\n checkNemenyi.setEnabled(false);\r\n checkShaffer.setEnabled(false);\r\n checkBergman.setEnabled(false);\r\n\r\n }",
"private void stopSensors() {\n for (MonitoredSensor sensor : mSensors) {\n sensor.stopListening();\n }\n }",
"public void lighting(boolean onOrOff)\r\n {\r\n \tint i;\r\n \tfor (i=0;i<LightSet.size();i++) {\r\n \t\t((Light)LightSet.elementAt(i)).setState(onOrOff);\r\n \t}\r\n }",
"private void reactMain_region_digitalwatch_Display_glowing_GlowOff() {\n\t\tif (sCIButtons.topRightPressed) {\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\tsCIDisplay.operationCallback.setIndiglo();\n\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowOn;\n\t\t}\n\t}",
"public void noteOff()\n\t{\n\t\ttimeFromOff = 0f;\n\t\tisTurnedOff = true;\n\t}",
"private void clearAllButtonStates() {\n for (int i = 1; i <= 10; i++) {\n xbox.getRawButtonPressed(i);\n }\n\n for (int i = 1; i <= 12; i++) {\n joystick.getRawButtonPressed(i);\n }\n }",
"public void turnShieldOff(IServerCallback callback) {\n ServerCall sc = new ServerCall(ServiceName.matchMaking, ServiceOperation.SHIELD_OFF, null, callback);\n _client.sendRequest(sc);\n }",
"public void setSwitchOff() throws UnavailableDeviceException, ClosedDeviceException, IOException {\n\t\tswitch1.setValue(true);\n\t\tthis.switchState = false; \n\t}",
"public void deactivate() {\n\t\tcameraNXT.enableTracking(false);\n\t}",
"public void off() {\n\t\tSystem.out.println(\"Tuner is off\");\n\t}",
"private void unbindGameTerrain(){\r\n\t\t//Disable the vertex position attribute from VAO\r\n\t\tGL20.glDisableVertexAttribArray(0);\r\n\t\t//Disable the texture coordinate attribute from VAO\r\n\t\tGL20.glDisableVertexAttribArray(1);\r\n\t\t//Disable the normal coordinate attribute from VAO\r\n\t\tGL20.glDisableVertexAttribArray(2);\r\n\t\t//Unbind\r\n\t\tGL30.glBindVertexArray(0);\r\n\t}",
"public static void main(String[] args) {\n\n List<RemoteControllable> devices = List.of (\n new Light(\"Pool Light\"),\n new Light(\"Back Light\"),\n new Television(\"Guest TV\"),\n new Television(\"Pool TV\")\n\n );\n turnAllOff(devices);\n\n System.out.println(RemoteControllable.getSystemStatus());\n }",
"public void powerOff() \n\t{\n\t\tif(active)\n\t\t{\n\t\t\tif (FactoryModPlugin.LEVER_OUTPUT_ENABLED) {\n\t\t\t\tsetActivationLever(false);\n\t\t\t}\n\t\t\t\n\t\t\t//lots of code to make the furnace turn off, without loosing contents.\n\t\t\tFurnace furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\t\tbyte data = furnace.getData().getData();\n\t\t\tItemStack[] oldContents = furnace.getInventory().getContents();\n\t\t\tfurnace.getInventory().clear();\n\t\t\tfactoryPowerSourceLocation.getBlock().setType(Material.FURNACE);\n\t\t\tfurnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\t\tfurnace.setRawData(data);\n\t\t\tfurnace.update();\n\t\t\tfurnace.getInventory().setContents(oldContents);\n\t\t\t\n\t\t\t//put active to false\n\t\t\tactive = false;\n\t\t\t//reset the production timer\n\t\t\tcurrentProductionTimer = 0;\n\t\t}\n\t}",
"public void stop() {\n enable = false;\n }",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"private void turnOffFlash() {\n getCamera();\n Log.d(\"Flash on?\", \"============+>\" + String.valueOf(isFlashOn));\n if (isFlashOn) {\n if (camera == null || params == null) {\n isFlashOn = false;\n return;\n }\n // play sound\n playSound();\n params = camera.getParameters();\n params.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);\n camera.setParameters(params);\n if (!isCameraOn) {\n mPreview = null;\n camera.stopPreview();\n }\n if (t != null) {\n sr.stopRunning = true;\n t = null;\n }\n isFlashOn = false;\n // changing button/switch image\n toggleButtonImageSwitch();\n }\n }",
"public void disable() {\r\n m_enabled = false;\r\n useOutput(0, 0);\r\n }",
"public static void unsetPairedFlagAllSensors() {\n\t\tfor (Sensor s : mSensors) {\n\t\t\ts.mPaired = false;\n\t\t}\n\t}",
"public void stop() {\n done=true;\n bridges.forEach(Bridge::stop);\n bridges.clear();\n }",
"public void stopSensors() {\r\n\t\tsensorManager.unregisterListener(this);\r\n\r\n\t\tLog.d(TAG, \"Called stopSensors\");\r\n\t}",
"void unsetState();",
"public void setOff(){\n state = false;\n //System.out.println(\"El requerimiento esta siendo atendido!\");\n }",
"public void setSensorOff() {\n\n }"
] | [
"0.8990175",
"0.8594699",
"0.82892364",
"0.786323",
"0.7641463",
"0.7496751",
"0.7477325",
"0.74292123",
"0.7418322",
"0.7416207",
"0.74044245",
"0.7343862",
"0.7336816",
"0.7205784",
"0.7184631",
"0.71432805",
"0.7139164",
"0.7131101",
"0.7130283",
"0.70716375",
"0.70678777",
"0.70414126",
"0.69809043",
"0.6913357",
"0.6906033",
"0.6809186",
"0.67997646",
"0.679864",
"0.6757951",
"0.6746343",
"0.670947",
"0.66956276",
"0.6619936",
"0.6617914",
"0.6523426",
"0.65048707",
"0.6501324",
"0.64881897",
"0.64549965",
"0.64358085",
"0.6434469",
"0.6405043",
"0.63949937",
"0.63331056",
"0.63188016",
"0.6274123",
"0.62723136",
"0.62670434",
"0.6267008",
"0.6245554",
"0.622439",
"0.62178254",
"0.62070465",
"0.6205923",
"0.6200327",
"0.61990565",
"0.6188392",
"0.6168202",
"0.61514467",
"0.61421394",
"0.61311126",
"0.6117523",
"0.6108825",
"0.6106746",
"0.610582",
"0.6103124",
"0.6100554",
"0.60985476",
"0.6096043",
"0.60830027",
"0.6078967",
"0.60700417",
"0.60685",
"0.6064626",
"0.6056457",
"0.60537744",
"0.6047718",
"0.60448676",
"0.6031005",
"0.6021098",
"0.6010696",
"0.5997989",
"0.59930706",
"0.5989029",
"0.59663355",
"0.5962737",
"0.59590435",
"0.5955135",
"0.59492975",
"0.5949282",
"0.5945001",
"0.5942652",
"0.5941489",
"0.59414107",
"0.5929052",
"0.5928881",
"0.5899326",
"0.58861953",
"0.5874823",
"0.58741766"
] | 0.81383973 | 3 |
Tells weather the lights are flashing or not. | public boolean isFlashing() {
return isFlashing;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void flash(){\n phoneCam.setFlashlightEnabled(!flash);\n flash = !flash;\n }",
"@Override\n\tpublic void setFlashing(int bool) {\n\n\t}",
"public void machineFlash() {\n\t\tmachineFlash = !machineFlash;\n\t}",
"private void on(){\n\n\t\t// if light is off and there is a flash object\n\t\tif(_flash != null && !isFlashOn){\n\n\t\t\t_flash.on();\n\t\t\tisFlashOn = true;\n\t\t}\n\t}",
"public void turnOn( ) {\n\t\t\t\tSystem.out.println(\"Light is on \");\n\t\t}",
"public void flashlightSwitch()\n {\n usingFlashlight = !usingFlashlight;\n }",
"public void stopFlashingLights() {\n keepFlashing = false;\n }",
"void animate( LightCondition lights );",
"private void blink(final boolean lit){\n \n if(mRobot != null){\n \n //If not lit, send command to show blue light, or else, send command to show no light\n if(lit){\n RGBLEDOutputCommand.sendCommand(mRobot, 0, 0, 0);\n }else{\n RGBLEDOutputCommand.sendCommand(mRobot, 0, 0, 255);\n }\n \n //Send delayed message on a handler to run blink again\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n blink(!lit);\n }\n }, 1000);\n }\n }",
"private void blink(final boolean lit) {\n\t\tif (mRobot == null) {\n\t\t\tblinking = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// If not lit, send command to show blue light, or else, send command to\n\t\t// show no light\n\t\tif (lit) {\n\t\t\tmRobot.setColor(0, 0, 0);\n\n\t\t} else {\n\t\t\tmRobot.setColor(0, 255, 0);\n\t\t}\n\n\t\tif (blinking) {\n\t\t\t// Send delayed message on a handler to run blink again\n\t\t\tfinal Handler handler = new Handler();\n\t\t\thandler.postDelayed(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tblink(!lit);\n\t\t\t\t}\n\t\t\t}, 2000);\n\t\t}\n\t}",
"private void turnOnFlash() {\n if (!batteryOk) {\n showBatteryLowDialog();\n return;\n }\n getCamera();\n Log.d(\"Flash on?\", \"============+>\" + String.valueOf(isFlashOn));\n if (!isFlashOn) {\n if (camera == null || params == null) {\n isFlashOn = false;\n return;\n }\n // play sound\n playSound();\n try {\n if (freq != 0) {\n sr = new StroboRunner();\n t = new Thread(sr);\n t.start();\n } else {\n params = camera.getParameters();\n params.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);\n }\n camera.setParameters(params);\n camera.startPreview();\n }\n } catch (Exception e) {\n // Do nothing;\n }\n\n isFlashOn = true;\n // changing button/switch image\n toggleButtonImageSwitch();\n }\n\n }",
"public void setLights(boolean lights) {\n \tthis.lightsAreOn = lights;\n }",
"private void updateLight() {\r\n\t}",
"public void run() {\n // check if lights are already flashing\n if (isFlashing()) {\n return;\n }\n \n // set the keep flashing flag\n keepFlashing = true;\n \n // set the flashing flag\n isFlashing = true;\n \n // turn all the lights on\n turnLightsOn();\n \n // toggle all the lights as if they were flashing\n while (keepFlashing) {\n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).toggle();\n }\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).toggle();\n }\n for (int i = 0; i < leftBorder.size(); i++) {\n leftBorder.get(i).toggle();\n }\n for (int i = 0; i < rightBorder.size(); i++) {\n rightBorder.get(i).toggle();\n }\n topLeft.toggle();\n topRight.toggle();\n bottomLeft.toggle();\n bottomRight.toggle();\n \n // take a time out\n try {\n Thread.sleep(500);\n } catch (Exception exception) {\n // empty body\n }\n }\n \n // set the is flashing flag\n isFlashing = false;\n \n // reset all the lights to off\n turnLightsOff();\n }",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"private static void turnFlashlightOn() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_TORCH);\n cam.setParameters(p);\n }",
"private void setLightStatus() {\n if (mCmd.equals(MSG_ON)) {\n setLighIsOn(true);\n } else {\n setLighIsOn(false);\n }\n }",
"void turnFrontScreenFlashOn();",
"public boolean isHighLighted(){\n return HIGHLIGHTED;\n }",
"public void flash() {\n mFlash = true;\n invalidate();\n }",
"public void turnLightsOn() {\n if (isFlashing()) {\n return;\n }\n \n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).turnOn();\n }\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).turnOn();\n }\n for (int i = 0; i < leftBorder.size(); i++) {\n leftBorder.get(i).turnOn();\n }\n for (int i = 0; i < rightBorder.size(); i++) {\n rightBorder.get(i).turnOn();\n }\n topLeft.turnOn();\n topRight.turnOn();\n bottomLeft.turnOn();\n bottomRight.turnOn();\n }",
"public void toggleFlash() {\n\t\tsetFlashState(!mFlashState);\n\t}",
"public boolean isStaticLight();",
"public static void forceLightUpdate() {\n PLC_Sender.getInstance().updatePLC_Lights(true);\n }",
"private static void mystate() {\n\t\tSystem.out.println(\"My livind state is Mairiland\");\n\t}",
"@Override\n\tpublic void on() {\n\t\tSystem.out.println(\"turn on the \"+name+\" Light\");\n\t}",
"@Override\n public void chew() {\n MessageUtility.logSound(name,\"Bleats and Stomps its legs, then chews\");\n }",
"Flash getFlash();",
"public boolean hasLightWork() {\n/* 48 */ if (this.skyEngine != null && this.skyEngine.hasLightWork()) {\n/* 49 */ return true;\n/* */ }\n/* 51 */ return (this.blockEngine != null && this.blockEngine.hasLightWork());\n/* */ }",
"public abstract void setBlinking(boolean status);",
"@NonNull\n LiveData<Boolean> isFlashAvailable();",
"public void blink234() {\n printMessage(\"Entering method blink234\\n\");\r\n // Set pin 7 to be output.\r\n if (pin2Out == null) {\r\n pin2Out = new OutPin(2, DEBUGGING, PRINTTRACE);\r\n }\r\n \r\n if (pin3Out == null) {\r\n pin3Out = new OutPin(3, DEBUGGING, PRINTTRACE);\r\n }\r\n \r\n if (pin4Out == null) {\r\n pin4Out = new OutPin(4, DEBUGGING, PRINTTRACE);\r\n }\r\n \r\n pin2Out.setValue(true);\r\n delayMilliSec(5000);\r\n pin2Out.setValue(false);\r\n pin3Out.setValue(true);\r\n delayMilliSec(5000);\r\n pin3Out.setValue(false);\r\n pin4Out.setValue(true);\r\n delayMilliSec(5000);\r\n pin4Out.setValue(false);\r\n \r\n for (int j = 0; j < 120; j++) {\r\n pin2Out.setValue(true);\r\n pin3Out.setValue(true);\r\n pin4Out.setValue(true);\r\n delayMilliSec(250);\r\n pin2Out.setValue(false);\r\n pin3Out.setValue(false);\r\n pin4Out.setValue(false);\r\n delayMilliSec(250);\r\n }\r\n \r\n printMessage(\"End of method blink234\");\r\n }",
"void setShutterLEDState(boolean on);",
"public void setStaticLight(boolean staticLight);",
"public void lighting(boolean onOrOff)\r\n {\r\n \tint i;\r\n \tfor (i=0;i<LightSet.size();i++) {\r\n \t\t((Light)LightSet.elementAt(i)).setState(onOrOff);\r\n \t}\r\n }",
"public void hookLEDs() {\r\n\t\ttable.putBoolean(\"hooked\", true);\r\n\t}",
"public void blink(){\r\n boolean p = false;\r\n for (int i=1; i<=5; i++){\r\n buzzer(p); \r\n p = !p;\r\n try {\r\n Thread.sleep(500);\r\n } catch (InterruptedException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }",
"public static void setLightScreenOnNotification(Context context, boolean lightsOn)\n\t{\n\t\tPreferenceUtils.setLightScreenOnNotification(context, lightsOn);\n\t}",
"public void update() {\r\n\t\ttimePassed++; //increment time\r\n\t\t\r\n\t\tswitch(state) {\r\n\t\tcase GNS_REW:\r\n\t\t\tif (timePassed > greenNS) {\r\n\t\t\t\tstate = LightState.YNS_REW; // turn NS light yellow\r\n\t\t\t\ttimePassed = 0;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase YNS_REW:\r\n\t\t\tif (timePassed > yellowNS) {\r\n\t\t\t\tstate = LightState.RNS_GEW; // turn NS light red and EW light green\r\n\t\t\t\ttimePassed = 0;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase RNS_GEW:\r\n\t\t\tif (timePassed > greenEW) {\r\n\t\t\t\tstate = LightState.RNS_YEW; // turn EW light yellow\r\n\t\t\t\ttimePassed = 0;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase RNS_YEW:\r\n\t\t\tif (timePassed > yellowEW) {\r\n\t\t\t\tstate = LightState.GNS_REW; // turn NS light green and EW light red\r\n\t\t\t\ttimePassed = 0;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t//if the state is something other than these four options, we have a serious issue...\r\n\t\t\tSystem.out.println(\"update(StopLight): something has gone horribly wrong\"); \r\n\t\t}\r\n\t}",
"boolean useCamera2FakeFlash();",
"public void setIntakeLights(){\n \tintakeLights.set(true);\n }",
"public void setLight1(){\n }",
"private boolean hasFlash() {\n return getApplicationContext().getPackageManager()\n .hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH);\n }",
"private static void turnFlashlightOff() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_OFF);\n cam.setParameters(p);\n }",
"public boolean isHasLight() {\n\t\treturn hasLight;\n\t}",
"private void off(){\n\n\t\t// if light is on and there is a flash object\n\t\tif (_flash != null && isFlashOn){\n\n\t\t\t_flash.off();\n\t\t\tisFlashOn = false;\n\t\t}\n\t}",
"public static void lightOn(Window window) {\n\t\tWindowManager.LayoutParams lp = window.getAttributes();\r\n\t\tlp.alpha = 1.0f;\r\n\t\twindow.setAttributes(lp);\r\n\t}",
"private void renderLights() {\n\t\t\n\t}",
"private void toggle_light() {\n\t\ttry {\n\t\t\tif (!light_on) {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light_selected);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n\t\t\t\tgetCameraManager().getFramingRect();\n//\t\t\t\tCameraManager.get().turn_onFlash();\n\t\t\t\tgetCameraManager().setTorch(true);\n\n\t\t\t} else {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n//\t\t\t\tCameraManager.get().turn_offFlash();\n\t\t\t\tgetCameraManager().setTorch(false);\n\n\t\t\t}\n\t\t\tlight_on = !light_on;\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}",
"private void turnOnLights(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_turnOnLights\n\n this.selectedTrain.setLights(1); // turn on lights\n this.operatingLogbook.add(\"Lights on.\");\n this.printOperatingLogs();\n }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"@Override\n\tpublic void onSensorChanged(final SensorEvent event) {\n\t\tSensor sensor = event.sensor;\n\t\twhile (System.currentTimeMillis() - startTime < 5002 && System.currentTimeMillis() - startTime > 1000) {\n\t\t\tif (System.currentTimeMillis() - startTime > 5000) {\n\t\t\t\tsetContentView(R.layout.maler);\n\t\t\t\tsetActivityBackgroundColor(0xFF000000);\n\t\t\t\tblackScreen = true;\n\t\t\t}\n\t\t}\n\t\tif (sensor.getType() == Sensor.TYPE_LIGHT) {\n\n\t\t\tSystem.out.println(\"System.currentTimeMillis() - startTime \"\n\t\t\t\t\t+ (startTime));\n\n\t\t\tnew Timer().scheduleAtFixedRate(new TimerTask() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgetLights(event);\n\t\t\t\t}\n\t\t\t}, 0, 50);\n\n\t\t\t// Wenn Grenze erreicht => Animation\n\t\t\tif (event.values[0] > (helligkeitsGrenze + 200)\n\t\t\t\t\t&& !animations[0].isStarted() && !animations[1].isStarted()\n\t\t\t\t\t&& !animations[2].isStarted() && blackScreen) {\n\n\t\t\t\t// Bildschirmhelligkeit maximal setzen\n\t\t\t\tWindowManager.LayoutParams layout = getWindow().getAttributes();\n\t\t\t\tlayout.screenBrightness = 1F;\n\t\t\t\tgetWindow().setAttributes(layout);\n\n\t\t\t\tsetContentView(R.layout.maler);\n\t\t\t\tanimations[counter].start();\n\t\t\t\tcounter++;\n\n\t\t\t\tif (counter == 3) {\n\t\t\t\t\tcounter = 0;\n\t\t\t\t}\n\t\t\t\tv.vibrate(pattern, -1);\n\n\t\t\t}\n\t\t}\n\t}",
"private void penguinStormReaction(){\n if(obstacle.getUserData().getAssetId().equals(OBSTACLE_CLOUD_ASSETS_ID)){\n if(penguin.isFrightStopped()){\n obstacle.setStormRaining(false);\n }else{\n obstacle.setStormRaining(true);\n }\n }\n }",
"private static boolean isLightMode(Context context)\n {\n return ((BladeSampleApplication)context.getApplicationContext()).isLightMode();\n }",
"public void UpdateTrafficLights(TrafficLight t1, TrafficLight t2, TrafficLight t3){\n String t1StatusWord;\n String t2StatusWord;\n String t3StatusWord;\n if(t1.status == 1)\n t1StatusWord = \"Green\";\n else if(t1.status == 0)\n t1StatusWord = \"Red\";\n else\n t1StatusWord = \"Unknown\";\n \n if(t2.status == 1)\n t2StatusWord = \"Green\";\n else if(t2.status == 0)\n t2StatusWord = \"Red\";\n else\n t2StatusWord = \"Unknown\";\n\n if(t3.status == 1)\n t3StatusWord = \"Green\";\n else if(t3.status == 0)\n t3StatusWord = \"Red\";\n else\n t3StatusWord = \"Unknown\";\n\n trafficModel.setValueAt(t1StatusWord, 0, 1);\n if(t1.status == 1)\n trafficModel.setValueAt(t1.time, 0, 2);\n else\n trafficModel.setValueAt(\"--\", 0, 2); \n trafficModel.setValueAt(t2StatusWord, 1, 1);\n if(t2.status == 1)\n trafficModel.setValueAt(t2.time, 1, 2);\n else\n trafficModel.setValueAt(\"--\", 1, 2);\n trafficModel.setValueAt(t3StatusWord, 2, 1);\n if(t3.status == 1)\n trafficModel.setValueAt(t3.time, 2, 2);\n else\n trafficModel.setValueAt(\"--\", 2, 2);\n }",
"public void setIsLight(boolean blight){\n\t\tm_bLight = blight;\n\t\tinitPaint();\n\t}",
"@When(\"^I check whether to show a notification for WOF$\")\n public void i_check_whether_to_show_a_notification_for_WOF() throws Throwable {\n result = car.showWofNotification();\n }",
"private void white(){\n\t\tthis.arretes_fW();\n\t\tthis.coins_fW();\n\t\tthis.coins_a1W();\n\t\tthis.coins_a2W();\n\t\tthis.aretes_aW();\n\t\tthis.cube[4] = \"W\";\n\t}",
"public void changingLights(int[][] lightsOnOff) {\n if(this.command.equals(\"turn on\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 1;\n }\n }\n }\n /* if the command is \"turn off\", the range of\n * lights are made to have value of 0 */\n if(this.command.equals(\"turn off\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 0;\n }\n }\n }\n /* if the command is \"toggle all\", the range of\n * lights are made to have value of 1 if they\n * were 0 before and 0 if they were 1 before */\n if(this.command.equals(\"toggle all\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 1 - lightsOnOff[i][j];\n }\n }\n }\n }",
"public void turnOn() {\n this.status = true;\n update(this.redValue, this.greenValue, this.blueValue);\n }",
"public void setHasLight(boolean hasLight) {\n\t\tthis.hasLight = hasLight;\n\t}",
"public void lightPause() {\n stopPawn.setStyle(\"-fx-background-color: RED;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n }",
"private void turnOffFlash() {\n getCamera();\n Log.d(\"Flash on?\", \"============+>\" + String.valueOf(isFlashOn));\n if (isFlashOn) {\n if (camera == null || params == null) {\n isFlashOn = false;\n return;\n }\n // play sound\n playSound();\n params = camera.getParameters();\n params.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);\n camera.setParameters(params);\n if (!isCameraOn) {\n mPreview = null;\n camera.stopPreview();\n }\n if (t != null) {\n sr.stopRunning = true;\n t = null;\n }\n isFlashOn = false;\n // changing button/switch image\n toggleButtonImageSwitch();\n }\n }",
"public void pauseHumans()\n\t{\n\t\tpause(IS_HUMAN);\n\t}",
"public void blink(double frequency) {\n timer = new Timer((int) Math.round(1000 / frequency));\n if (timer.timeout()) {\n this.status = !this.status;\n if (status)\n update(this.redValue, this.greenValue, this.blueValue);\n else\n update(0,0,0);\n }\n }",
"public final void markTempo() {\n\t\tclock.activateAfterWait(() -> view.flash(1),\n\t\t\t\tConstants.FLASH_TIME);\n\t\tclock.activateAfterWait(() -> soundEmettor.makeSound(),\n\t\t\t\tConstants.FLASH_TIME);\n\t}",
"public boolean isLowLightShow() {\n return false;\n }",
"private void updateLightSensorValues()\n {\n sendMessage((byte)Constants.LIGHTSENSVAL,(byte)Constants.REQ);\n try {\n Thread.sleep(4000);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n sendMessage((byte)Constants.POTVAL, (byte)Constants.REQ);\n if(progPotToggleButton.isChecked())\n {\n int x =0;\n try {\n x = Integer.parseInt(progValueEditText.getText().toString());\n if(x>=0 && x<256)\n sendMessage((byte)Constants.PROGVAL,(byte)x);\n try {\n Thread.sleep(4000);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n sendMessage((byte)Constants.USEPOT,(byte)Constants.NO);\n } catch (NumberFormatException e) {\n messageView.append(\"int för helvete\");\n }\n }else\n sendMessage((byte)Constants.USEPOT,(byte)Constants.YES);\n\n }",
"public void blink7() {\n printMessage(\"Entering method blink7\\n\");\r\n\r\n // Set pin 7 to be output.\r\n if (pin7Out == null) {\r\n pin7Out = new OutPin(7, DEBUGGING, PRINTTRACE);\r\n }\r\n\r\n // Loop through this 3 times, change the \"3\" in \"i<3\" to \r\n // the number of times you want it to loop.\r\n for (int i = 0; i < 3; i++) {\r\n // Print out a message with the loop number.\r\n printMessage(\"Entering loop, iteration: \" + i);\r\n\r\n\r\n // Turn on pin 7.\r\n pin7Out.setValue(true);\r\n\r\n // Delay for number of milliseconds in parentheses.\r\n // this leaves LED on for a time period.\r\n delayMilliSec(500 * (i + 1));\r\n\r\n // turn off gpio pin 7\r\n pin7Out.setValue(false);\r\n\r\n // Delay for number of milliseconds in parentheses.\r\n // This leaves LED off for a time period.\r\n delayMilliSec(500 * (i + 1));\r\n }\r\n\r\n // Print \"End of method blink7\" to the screen\r\n printMessage(\"End of method blink7\");\r\n }",
"public boolean isFalling() { return isFalling; }",
"public void endGunFlash() {\n if (System.currentTimeMillis() - lastAttack > 200) {\n gunFlash = false;\n ((Geometry)gun.getChild(\"Box\")).getMaterial().setColor(\"Color\", ColorRGBA.Gray);\n }\n }",
"public boolean isOnFight();",
"public void changeState(){\n\t\t//red - Green\n\t\tif (lights[0].isOn()){\n\t\t\tlights[0].turnOff();\n\t\t\tlights[2].turnOn();\n\t\t}\n\t\t\n\t\t//Green -yellow\n\t\telse if(lights[2].isOn()){\n\t\t\tlights[2].turnOff();\n\t\t\tlights[1].turnOn();\n\t\t}\n\t\t//yellow to red\n\t\telse if (lights[1].isOn()){\n\t\t\tlights[1].turnOff();\n\t\t\tlights[0].turnOn();\n\t\t}\n\t\t\n\t}",
"@NonNull boolean waterlogged();",
"private void reactMain_region_digitalwatch_Display_glowing_GlowOn() {\n\t\tif (sCIButtons.topRightReleased) {\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\ttimer.setTimer(this, 5, 2 * 1000, false);\n\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowDelay;\n\t\t}\n\t}",
"public boolean isFlashShow() {\n return (isBeautyShow() || isMaskSelected()) ? false : true;\n }",
"public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }",
"private void updateSpotLight() {\n\t\tfloat light0_position[] = { player.getPosition().x, 16.0f, player.getPosition().z, 1.0f }; // x,y,z,1\n\t\tfloat light0_diff_spec[] = { 1f, 1f, 1f, 1.0f };\n\t\tfloat light0_direction[] = {-(float)Math.sin(Math.toRadians(player.getRotY())),0,-(float)Math.cos(Math.toRadians(player.getRotY())), 1f};\n\t\t// Eine weitere Lichtquellen definieren\n\t\tspotLight.setPosition(light0_position);\n\t\tspotLight.setCutoff(45.f);\n\t\tspotLight.setDirection(light0_direction);\n\t\tspotLight.setDiffAndSpek(light0_diff_spec);\n\t\t\n\t\tglEnable(GL_LIGHTING);\n\t}",
"protected void doDark() {\r\n\t\talpha = 0.5f;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"public Result flashing(Map<String, String> values) {\n if (this.flash == null) {\n return withFlash(values);\n } else {\n return withFlash(this.flash.adding(values));\n }\n }",
"Light getEWlight();",
"public void sleep() {\n hunger += 1;\n fatigue = 0;\n\n if (isHungry()) {\n mood -= 1;\n } else {\n mood += 1;\n }\n\n if (!muted) {\n System.out.println(\"sleep\\t|\\tzzzZZZ *sheep*\");\n }\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \tapp.toggleLightMode();\n \tisDark = !isDark;\n }",
"public boolean isLightEnabled() {\n return mLightEnabled;\n }",
"public LimeState limeEnabled();",
"private void beat() {\n\t\t\tSystem.out.println(\"Heart beating\");\n\t\t}",
"public int getLight();",
"void onEnoughLightAvailable() {\n //start eye tracking if it is not running already\n startEyeTracking();\n }",
"@RequestMapping(\"/light\")\n public ResponseEntity light() {\n if (lightPin == null) {\n GpioController gpio = GpioFactory.getInstance();\n lightPin = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_00, \"MyLights\");\n }\n\n lightPin.high();\n lightPin.low();\n try {\n Thread.sleep(250);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);\n }\n lightPin.high();\n\n return new ResponseEntity(HttpStatus.OK);\n }",
"public boolean getCallLightState() {\n\t\treturn this.isCallLightOn;\n\t}",
"private String lightConversion() {\n int reading = ((record[16] & 255) + ((record[21] & 0xC0) << 2));\n //return reading + \"\";\n return formatter.format(((reading * reading) * (-.0009)) + (2.099 * reading));\n }",
"private void toggleLight(){\n\t\tmyGLView.queueEvent(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmRenderer.toggleLight();\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"public void setStatus (String message, boolean flash)\n {\n super.setText(message);\n if (_flashAlert != null) {\n _flashAlert.cancel();\n }\n final Icon alert = _icons[getState()];\n final BlankIcon blank = (alert == null) ?\n null : new BlankIcon(alert.getWidth(), alert.getHeight());\n setIcon(flash ? alert : blank);\n if (flash) {\n (_flashAlert = new Interval(_ctx.getApp().getRunQueue()) {\n public void expired () {\n _flashCount++;\n setIcon(_flashCount % 2 == 0 ? alert : blank);\n if (_flashCount == 5) {\n cancel();\n }\n }\n protected int _flashCount = 0;\n }).schedule(FLASH_DELAY, true);\n }\n }",
"private boolean fireAutoFlashFrontScreen() {\n final int iso_threshold = 750;\n return capture_result_has_iso && capture_result_iso >= iso_threshold;\n }",
"OnOffSwitch alarmSwitch();",
"public void monsterSound(){\n System.out.println(\"\\n\\nYou hear gutteral moans and the shambling of a creature nearby.\\n\\n\");\n }",
"public void warningSound() {\n\t\tSystem.out.println(signal);\n\t}",
"public void setLighting(GL3 gl) {\n\t\t // Set the lighting properties\n\t\t\n\t\t// get sunlight vector coords\n\t\tfloat xSun = terrain.getSunlight().getX();\n\t\tfloat ySun = terrain.getSunlight().getY();\n\t\tfloat zSun = terrain.getSunlight().getZ();\n\t\t\n/*\t\t// check fps\n\t\tPoint3D torchPos;\n\t\tif (camera.getPerson().isFps()) {\n\t\t\ttorchPos = new Point3D(camera.getGlobalPosition().getX(), camera.getGlobalPosition().getY(), camera.getGlobalPosition().getZ());\n*/\n\t\tPoint3D torchPos;\n\t\t// check fps\n\t\tif (person.isFps()) {\n\t\t\ttorchPos = new Point3D(person.getCamera().getGlobalPosition().getX(),\n\t\t\t\t\tperson.getCamera().getGlobalPosition().getY(),\n\t\t\t\t\tperson.getCamera().getGlobalPosition().getZ());\n\t\t} else { \n\t\t\ttorchPos = new Point3D(person.getGlobalPosition().getX(),\n\t\t\t\t\tperson.getGlobalPosition().getY() + 0.2f, \n\t\t\t\t\tperson.getGlobalPosition().getZ());\n\t\t}\n\t\t\n Shader.setPoint3D(gl, \"sunlight\", new Point3D(xSun,ySun,zSun)); // set sunlight vector to passed in vector \n Shader.setColor(gl, \"lightIntensity\", Color.WHITE);\n \n // Set the material properties\n Shader.setColor(gl, \"ambientCoeff\", Color.WHITE);\n Shader.setColor(gl, \"diffuseCoeff\", new Color(0.5f, 0.5f, 0.5f));\n Shader.setFloat(gl, \"phongExp\", 16f);\n \n // for torch light\n Shader.setFloat(gl, \"cutoff\", 90f); // in degrees\n Shader.setPoint3D(gl, \"posTorch\", torchPos);\n Shader.setFloat(gl, \"attenuationFactor\", 40f); \n Shader.setColor(gl, \"lightIntensityTorch\", Color.YELLOW); \n \n if (day) {\n \t// light properties for day\n Shader.setColor(gl, \"specularCoeff\", new Color(0.8f, 0.8f, 0.8f));\n \tShader.setColor(gl, \"ambientIntensity\", new Color(0.2f, 0.2f, 0.2f));\n Shader.setPoint3D(gl, \"dirTorch\", new Point3D(0,0,0)); // set torchDir vector \n } else { \n \t// light properties for night \n Shader.setColor(gl, \"specularCoeff\", new Color(0.5f, 0.5f, 0.5f));\n \tShader.setColor(gl, \"ambientIntensity\", new Color(0.01f, 0.01f, 0.01f));\n Shader.setPoint3D(gl, \"dirTorch\", new Point3D(0,0,1)); // set torchDir vector \n }\n\t}",
"public Light(boolean isOn) {\n\t\tthis.isOn = isOn;\n\t}",
"private void reactMain_region_digitalwatch_Display_glowing_GlowDelay() {\n\t\tif (timeEvents[5]) {\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\ttimer.unsetTimer(this, 5);\n\n\t\t\tsCIDisplay.operationCallback.unsetIndiglo();\n\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowOff;\n\t\t} else {\n\t\t\tif (sCIButtons.topRightPressed) {\n\t\t\t\tnextStateIndex = 3;\n\t\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\t\ttimer.unsetTimer(this, 5);\n\n\t\t\t\tsCIDisplay.operationCallback.setIndiglo();\n\n\t\t\t\tnextStateIndex = 3;\n\t\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowOn;\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.694418",
"0.67083186",
"0.6612025",
"0.6590465",
"0.65647066",
"0.65565616",
"0.6511759",
"0.6492263",
"0.6446797",
"0.63400596",
"0.6298835",
"0.6291381",
"0.62600154",
"0.6236019",
"0.621581",
"0.6177126",
"0.61766493",
"0.6097698",
"0.60154337",
"0.5986245",
"0.5984965",
"0.59629065",
"0.59384066",
"0.5877145",
"0.58704394",
"0.5843814",
"0.5836471",
"0.58069617",
"0.58052415",
"0.5804344",
"0.5780717",
"0.5779081",
"0.574137",
"0.57260716",
"0.57119703",
"0.56962234",
"0.5682643",
"0.56779975",
"0.56652737",
"0.5597709",
"0.5581179",
"0.5569301",
"0.55585074",
"0.5538446",
"0.55284834",
"0.5526734",
"0.55107105",
"0.55064416",
"0.5501306",
"0.54978114",
"0.5491249",
"0.5485975",
"0.54671246",
"0.5466184",
"0.5445338",
"0.54364306",
"0.54348844",
"0.5430758",
"0.54267657",
"0.54153496",
"0.54070216",
"0.5397889",
"0.5385435",
"0.5380503",
"0.5374437",
"0.53616065",
"0.5346258",
"0.53435296",
"0.5340997",
"0.5339562",
"0.53349507",
"0.5333543",
"0.533044",
"0.53301585",
"0.5322586",
"0.53206164",
"0.531391",
"0.5304476",
"0.5303381",
"0.5294762",
"0.52902293",
"0.5284388",
"0.5282593",
"0.52819306",
"0.52787495",
"0.5275814",
"0.5270316",
"0.52652615",
"0.5260637",
"0.5253856",
"0.5252704",
"0.5250487",
"0.5248502",
"0.5244841",
"0.5243267",
"0.523852",
"0.5238044",
"0.5231583",
"0.5226874",
"0.5218936"
] | 0.6537787 | 6 |
called when the thread starts | public void run() {
// check if lights are already flashing
if (isFlashing()) {
return;
}
// set the keep flashing flag
keepFlashing = true;
// set the flashing flag
isFlashing = true;
// turn all the lights on
turnLightsOn();
// toggle all the lights as if they were flashing
while (keepFlashing) {
for (int i = 0; i < topBorder.size(); i++) {
topBorder.get(i).toggle();
}
for (int i = 0; i < bottomBorder.size(); i++) {
bottomBorder.get(i).toggle();
}
for (int i = 0; i < leftBorder.size(); i++) {
leftBorder.get(i).toggle();
}
for (int i = 0; i < rightBorder.size(); i++) {
rightBorder.get(i).toggle();
}
topLeft.toggle();
topRight.toggle();
bottomLeft.toggle();
bottomRight.toggle();
// take a time out
try {
Thread.sleep(500);
} catch (Exception exception) {
// empty body
}
}
// set the is flashing flag
isFlashing = false;
// reset all the lights to off
turnLightsOff();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void threadStarted() {\n }",
"public synchronized void startup() {\n\n if (mThread == null) {\n mThread = new CounterThread();\n new Thread(mThread).start();\n }\n Log.d(TAG, \"startup\");\n }",
"@Override\n public synchronized void start() {\n init();\n }",
"protected void onThreadStart() {\n\t\tparent.startLock.countDown();\n\t\t//wait for all other threads ready\n\t\ttry {\n\t\t\tparent.startLock.await();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthreadStartTime = new Date();\n\t}",
"private void start() {\n\n\t}",
"@Override\r\n\tpublic void start() {\n\t\t\r\n\t}",
"@Override\r\n public void start() {\r\n }",
"@Override\n public void start() {}",
"@Override public void start() {\n }",
"@Override\n public void start() { }",
"@Override\n public void start() {\n\n }",
"@Override\n public void start() {\n\n }",
"@Override\n public void start() {\n\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\r\n\tpublic void start() {\n\t\tsuper.start();\r\n\t\t\r\n\t}",
"@Override\n\tpublic void start() {\n\t\t\n\t}",
"@Override\n\tpublic void start() {\n\t\t\n\t}",
"@Override\n\tpublic void start() {\n\t\t\n\t}",
"@Override\n\tpublic void start() {\n\t\t\n\t}",
"protected void start() {\n }",
"@Override\n\tpublic void start() {\n\n\t}",
"public void start(){\n\t\tstarted = true;\n\t\tlastTime = System.nanoTime();\n\t}",
"@Override\r\n\tpublic synchronized void start() {\n\t\tsuper.start();\r\n\t}",
"public void start() {\n\t\t\n\t}",
"public void start() {\n\t\t\n\t}",
"@Override\n public void onStart() {\n this.dataGenerator = new DataGenerator(this.dataSize, this.dataValues, this.dataValuesBalancing);\n this.dataStream = new DataStream();\n if (this.flowRate != 0)\n this.sleepTime = dataStream.convertToInterval(this.flowRate);\n this.count = 0L;\n// this.me = this.me + \"_\" + getRuntimeContext().getIndexOfThisSubtask();\n new Thread(this::receive).start();\n }",
"@Override\n\tpublic void start() {\n\t}",
"@Override\n\tpublic void start() {\n\t}",
"@Override\n public synchronized void start()\n {\n if (run)\n return;\n run = true;\n super.start();\n }",
"@Override\n public synchronized void start() {\n m_startTime = getMsClock();\n m_running = true;\n }",
"@Override\n protected void Start() {\n }",
"public void start() {}",
"public void start() {}",
"public void start() {\n\n\t}",
"@Override\n public void runInit() {\n }",
"public void start(){\n thread.start();\n }",
"private void start(){\n isRunning = true;\n thread = new Thread(this);\n thread.start();\n }",
"public void start () {\r\n // Declaras un hilo\r\n Thread th = new Thread (this);\r\n // Empieza el hilo\r\n th.start ();\r\n }",
"public void start() {\n startTime = System.currentTimeMillis();\n }",
"public void start(){\n\t\tsuper.start();\n\t}",
"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 start()\n {\n }",
"public void onStart() {\n\t new Thread() {\n\t @Override public void run() {\n\t receive();\n\t }\n\t }.start();\n\t }",
"@Override\n public void run() {\n startup();\n }",
"@Override\n public synchronized void start() {\n super.start(); //To change body of generated methods, choose Tools | Templates.\n }",
"public void start() {\n \tupdateHeader();\n }",
"public void start(){\n }",
"public void start() {\n // Declaras un hilo\n Thread th = new Thread(this);\n // Empieza el hilo\n th.start();\n }",
"public void start(){\n hiloAux = new Thread(this);\n hiloAux.start();\n }",
"void onStarted();",
"public void start() {\n }",
"@Override\n\tpublic void run() {\n\t\tinit();\n\t}",
"public void start() {\n startTime = System.currentTimeMillis();\n }",
"public void init() {\n Thread run = new Thread(new Run());\n run.start();\n }",
"public final void start(){\n cpt = 0;\n inProgress = true;\n init();\n UpdateableManager.addToUpdate(this);\n }",
"public void start() {\n\n }",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tSystem.out.println(\"onStart\");\n\t\t\t\tif(listener!=null) listener.onMessage(\"onStart\");\n\t\t\t\tisRun = true;\n\t\t\t}",
"protected void initialize() { \tthePrintSystem.printWithTimestamp(getClass().getName()); \n\tthis.isDone = false;\n\t\n\ttheLoader.setSetpoint(1.5);\n\t\n }",
"protected void initialize() {\n \tthis.running= false;\n }",
"public void start() {\n\t\ttrackerThread.start();\n\t}",
"public void start() {\n\r\n }",
"@Override\n public void startThread() {\n Log.d(TAG, \"Starting \" + getName() + \" thread!\");\n if (!started)\n start();\n running = enabled;\n doStartAction();\n }",
"public void start() {\n\t\tmyThread = new Thread(this); myThread.start();\n\t}",
"protected void sync() {\n System.out.println(\"Starting playback thread with \" + terms);\n startThread();\n }",
"public void start(){\n return;\n }",
"@Override\n public void Start() {\n\n }",
"@Override\n public void Start() {\n\n }",
"@Override\n public void Start() {\n\n }",
"public void startOnNewTread() {\n stop();\n\n mReadLogsHandler = new ReadLogsHandler();\n\n mReadLogThread = new ReadLogsThread();\n mReadLogThread.start();\n }",
"public void start ()\n {\n Thread th = new Thread (this);\n // start this thread\n th.start ();\n\n }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void taskStarting() {\n\n }",
"@Override\r\n\tprotected void doStart() throws Exception {\n\r\n\t}",
"public void Start() {\r\n\t\tthread.run();\r\n\t}",
"public void start()\n\t{\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}",
"@Override\n\t\t\tpublic void start() {\n\t\t\t\tinitResource();\n\t\t\t\t//获取通讯录信息\n\t\t\t\tinitContactsData();\n\t\t\t\t//同步通讯录\n\t\t\t\tupLoadPhones();\n\t\t\t}",
"public void starting();",
"public void ThreadStart()\r\n\t{\r\n\t\tthread_running=true;\r\n\t\tNewBallTheard.start();\r\n\t}",
"public void start(){\n\t\tthis.lastUpdate = System.currentTimeMillis();\n\t\tthis.millisIntoFrame=0;\n\t\tthis.currentFrame=0;\n\t}",
"public void startup() {\n\t\tstart();\n }",
"public void start() {\n thread = new Thread(this);\n thread.setPriority(Thread.MIN_PRIORITY);\n thread.start();\n }",
"void start() {\n\tsleepThread = new Thread(this);\n\tsleepThread.start();\n }",
"public abstract void started();",
"private void startClient(){\n if (started) return;\n\n// //GET RID OF THIS!!\n// sensorReadingArrayList = new ArrayList<MHLSensorReading>();\n\n started = true;\n clientThread = new Thread(new MHLClientThread(ip, port, userID));\n clientThread.start();\n }",
"protected void onBegin() {}",
"@Override\n\tpublic void start() throws Exception {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@EncoderThread\n protected abstract void onStart();",
"@Override\n\t\t\tpublic void contectStarted() {\n\n\t\t\t}",
"@Override\n public void startup() {\n }",
"public void start() {\n\n\t\tisRunning = true;\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\n\t}",
"private void startThread()\n {\n if (workerThread == null || !workerThread.isLooping())\n {\n workerThread = new LiveViewThread(this);\n workerThread.start();\n }\n }",
"private void start() {\r\n\t\tif (running)\r\n\t\t\treturn;\r\n\t\trunning = true;\r\n\t\tthread = new Thread(this);//creates threat to run program on\r\n\t\tthread.start();\r\n\t}"
] | [
"0.770231",
"0.752599",
"0.7494456",
"0.74117047",
"0.73645794",
"0.7334728",
"0.73040056",
"0.7195476",
"0.7190969",
"0.71807563",
"0.71807235",
"0.71807235",
"0.71807235",
"0.7177022",
"0.71737486",
"0.71737486",
"0.71737486",
"0.71737486",
"0.71737486",
"0.71737486",
"0.71737486",
"0.7153295",
"0.7138671",
"0.7138671",
"0.7138671",
"0.7138671",
"0.7131238",
"0.71044815",
"0.7089883",
"0.7079738",
"0.70771134",
"0.70771134",
"0.7066025",
"0.70571005",
"0.70571005",
"0.70508844",
"0.7030723",
"0.7012926",
"0.70058286",
"0.70058286",
"0.70042235",
"0.69929",
"0.6987381",
"0.69617105",
"0.6952376",
"0.69481665",
"0.69464695",
"0.69449764",
"0.6911859",
"0.6894118",
"0.6890422",
"0.6888628",
"0.6866307",
"0.68661183",
"0.6865901",
"0.6856354",
"0.6854034",
"0.6853923",
"0.68411267",
"0.6834854",
"0.6818868",
"0.6812891",
"0.68098116",
"0.6808298",
"0.6806101",
"0.6805443",
"0.6803651",
"0.6799345",
"0.6790601",
"0.6787423",
"0.67862856",
"0.67861336",
"0.677033",
"0.677033",
"0.677033",
"0.677026",
"0.6760182",
"0.6758202",
"0.6754881",
"0.6727252",
"0.6715147",
"0.671228",
"0.6711724",
"0.6711204",
"0.67107046",
"0.67038333",
"0.66989774",
"0.66966474",
"0.6696347",
"0.6694424",
"0.6694172",
"0.66921175",
"0.66896284",
"0.6683535",
"0.6683535",
"0.6681837",
"0.6680243",
"0.667002",
"0.6666538",
"0.6664803",
"0.6660704"
] | 0.0 | -1 |
Stops the lights from flashing. | public void stopFlashingLights() {
keepFlashing = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void turnLightsOff() {\n if (isFlashing()) {\n return;\n }\n \n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).turnOff();\n }\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).turnOff();\n }\n for (int i = 0; i < leftBorder.size(); i++) {\n leftBorder.get(i).turnOff();\n }\n for (int i = 0; i < rightBorder.size(); i++) {\n rightBorder.get(i).turnOff();\n }\n topLeft.turnOff();\n topRight.turnOff();\n bottomLeft.turnOff();\n bottomRight.turnOff();\n }",
"private static void turnFlashlightOff() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_OFF);\n cam.setParameters(p);\n }",
"private void off(){\n\n\t\t// if light is on and there is a flash object\n\t\tif (_flash != null && isFlashOn){\n\n\t\t\t_flash.off();\n\t\t\tisFlashOn = false;\n\t\t}\n\t}",
"private void turnOffLights(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_turnOffLights\n\n this.selectedTrain.setLights(0); // turn off lights\n this.operatingLogbook.add(\"Lights off.\");\n this.printOperatingLogs();\n }",
"private void killLight() {\n stopService(new Intent(this, SunriseService.class));\n\n // Kill the moonlight service (in case it's running)\n stopService(new Intent(this, MoonlightService.class));\n\n // Actually turn off the light (by zone)\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n // Turn off the light for the selected zone\n SingletonServices.getMQTT(Main.this).fadeOut();\n }\n catch (Exception exc) {\n // Log errors to logcat\n Log.e(Logging.TAG, \"Kill error\", exc);\n }\n }\n }).start();\n }",
"public void turnOffAllLights() {\r\n\t\tfor (Light light : lights) {\r\n\t\t\tif(light.isOn()) {\r\n\t\t\t\tlight.toogle();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void turnOffAllTheLights() {\r\n for (Light li : lightsArray) {\r\n li.turnOffLight();\r\n }\r\n }",
"@Invalidate\n\tpublic synchronized void stop() {\n\t\tSystem.out.println(\"Component is stopping...\");\n\t\tfor (PresenceSensor sensor : presenceSensors) {\n\t\t\tsensor.removeListener(this);\n\t\t}\n\t\tfor (BinaryLight binaryLight : binaryLights) {\n\t\t\tbinaryLight.removeListener(this);\n\t\t}\n\t}",
"public void lightsOff() {\n PHBridge bridge = PHHueSDK.getInstance().getSelectedBridge();\n PHLightState lightState = new PHLightState();\n lightState.setOn(false);\n bridge.setLightStateForDefaultGroup(lightState);\n }",
"@Override\n\tpublic void off() {\n\t\tSystem.out.println(\"turn off the \"+name+\" Light\");\n\t}",
"public void turnStrobeOff(){\n Intent stop_strobe_intent = new Intent(FlareConstants.STOP_STROBE);\n stop_strobe_intent.putExtra(FlareConstants.STOP_STROBE, FlareConstants.STOP_STROBE);\n LocalBroadcastManager.getInstance(this).sendBroadcast(stop_strobe_intent);\n Log.d(TAG, \"Sent stop strobe intent broadcast\");\n }",
"private void turnOffFlash() {\n getCamera();\n Log.d(\"Flash on?\", \"============+>\" + String.valueOf(isFlashOn));\n if (isFlashOn) {\n if (camera == null || params == null) {\n isFlashOn = false;\n return;\n }\n // play sound\n playSound();\n params = camera.getParameters();\n params.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);\n camera.setParameters(params);\n if (!isCameraOn) {\n mPreview = null;\n camera.stopPreview();\n }\n if (t != null) {\n sr.stopRunning = true;\n t = null;\n }\n isFlashOn = false;\n // changing button/switch image\n toggleButtonImageSwitch();\n }\n }",
"public void stopTracking()\n {\n pixyThread.interrupt();\n leds.setMode(LEDController.Mode.OFF);\n }",
"public void stop() {\n\t\tmotor1.set( Constants.CLAW_MOTOR_STOPPED );\n\t\t}",
"public void flash(){\n phoneCam.setFlashlightEnabled(!flash);\n flash = !flash;\n }",
"public void stop()\n {\n robot.FL_drive.setPower(0);\n robot.FR_drive.setPower(0);\n robot.BL_drive.setPower(0);\n robot.BR_drive.setPower(0);\n }",
"public void stop() {\n\t\tResources.getmScene().unregisterUpdateHandler(time);\n\t\trunning = false;\n\t}",
"public void stop() {\n intake(0.0);\n }",
"public void freeLights(){\n\t\t//android.util.Log.d(TAG,\"freeLights()\");\n\t\tfinal int size = this.lights.size();\n\t\tfor(int index=0; index < size; index++){\n\t\t\tthis.lights.delete(this.lights.keyAt(index));\n\t\t}\n\t}",
"@Override\r\n public void stop() {\n WorldWind.shutDown();\r\n }",
"public void stop() {\n\t\tsetPower(Motor.STOP);\r\n\t}",
"public void stopSoft() {\n stopped.set(true);\n }",
"public void stop()\n\t{\n\t\tindex = 0;\n\t\tlastUpdate = -1;\n\t\tpause();\n\t}",
"public void turnOff() {\n update(0,0,0);\n this.status = false;\n }",
"public void stopScene()\r\n\t{\r\n\t\tthis.stop();\r\n\t}",
"@Override\n public void stop() {\n smDrive.stop();\n smArm.stop();\n }",
"public void stopping();",
"public void stop() {\n\t\tsound.stop();\n\t}",
"private void blink(final boolean lit){\n \n if(mRobot != null){\n \n //If not lit, send command to show blue light, or else, send command to show no light\n if(lit){\n RGBLEDOutputCommand.sendCommand(mRobot, 0, 0, 0);\n }else{\n RGBLEDOutputCommand.sendCommand(mRobot, 0, 0, 255);\n }\n \n //Send delayed message on a handler to run blink again\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n blink(!lit);\n }\n }, 1000);\n }\n }",
"public void stop() {\n\tanimator = null;\n\toffImage = null;\n\toffGraphics = null;\n }",
"public void stop() {}",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"@Override\n public void stop() {\n\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n armMotor.setPower(0);\n // extendingArm.setPower(0);\n\n telemetry.addData(\"Status\", \"Terminated Interative TeleOp Mode\");\n telemetry.update();\n\n\n }",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"public void removeAllLights() {\n if (_lights != null){\n _lights.clear();\n }\n }",
"public void stop() {\n\t\tthis.controller.terminate();\n\t}",
"public void stop()\n\t{\n\t\tupdateState( MotorPort.STOP);\n\t}",
"public void stopRobot(){\n LAM.setPower(0);\n RAM.setPower(0);\n ILM.setPower(0);\n IRM.setPower(0);\n BLM.setPower(0);\n BRM.setPower(0);\n FLM.setPower(0);\n FRM.setPower(0);\n }",
"@Override\r\n\tpublic void stop() {\n\t\tthis.controller.stop();\r\n\t}",
"public void stop() {\n enemyTimeline.stop();\n }",
"public void stop()\r\n {\r\n breakoutAnimator = null;\r\n }",
"public void stop() {\n m_enabled = false;\n }",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"public void stop() {\n\t\tthis.stopper = true;\n\t}",
"void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }",
"private void blink(final boolean lit) {\n\t\tif (mRobot == null) {\n\t\t\tblinking = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// If not lit, send command to show blue light, or else, send command to\n\t\t// show no light\n\t\tif (lit) {\n\t\t\tmRobot.setColor(0, 0, 0);\n\n\t\t} else {\n\t\t\tmRobot.setColor(0, 255, 0);\n\t\t}\n\n\t\tif (blinking) {\n\t\t\t// Send delayed message on a handler to run blink again\n\t\t\tfinal Handler handler = new Handler();\n\t\t\thandler.postDelayed(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tblink(!lit);\n\t\t\t\t}\n\t\t\t}, 2000);\n\t\t}\n\t}",
"public void stop() {\n climberMotors.stopMotor();\n }",
"public void freeLight(final int id){\n\t\t//android.util.Log.d(TAG,\"freeLight(\"+id+\")\");\n\t\tthis.lights.delete(id);\n\t}",
"public void stop ()\n\t{\n\t\tif (core.hasLock (frame))\n\t\t{\n\t\t\tif (model != null) model.stop();\n\t\t\tstop = true;\n\t\t}\n\t}",
"private void resetLights() {\n\n List<Integer> colors = DataHolder.getInstance().getColors();\n int iter = 0;\n for (int color: colors) {\n if (color == 2) {\n colors.set(iter, 0);\n }\n iter++;\n }\n DataHolder.getInstance().setColors(colors);\n }",
"@SimpleFunction(description = \"Stop the drive motors of the robot.\")\n public void Stop() {\n String functionName = \"Stop\";\n if (!checkBluetooth(functionName)) {\n return;\n }\n\n for (NxtMotorPort port : driveMotorPorts) {\n setOutputState(functionName, port, 0,\n NxtMotorMode.Brake, NxtRegulationMode.Disabled, 0, NxtRunState.Disabled, 0);\n }\n }",
"public void stopGame() {\n\t\tgetGameThread().stop();\n\t\tgetRenderer().stopRendering();\n\t}",
"public void run() {\n // check if lights are already flashing\n if (isFlashing()) {\n return;\n }\n \n // set the keep flashing flag\n keepFlashing = true;\n \n // set the flashing flag\n isFlashing = true;\n \n // turn all the lights on\n turnLightsOn();\n \n // toggle all the lights as if they were flashing\n while (keepFlashing) {\n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).toggle();\n }\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).toggle();\n }\n for (int i = 0; i < leftBorder.size(); i++) {\n leftBorder.get(i).toggle();\n }\n for (int i = 0; i < rightBorder.size(); i++) {\n rightBorder.get(i).toggle();\n }\n topLeft.toggle();\n topRight.toggle();\n bottomLeft.toggle();\n bottomRight.toggle();\n \n // take a time out\n try {\n Thread.sleep(500);\n } catch (Exception exception) {\n // empty body\n }\n }\n \n // set the is flashing flag\n isFlashing = false;\n \n // reset all the lights to off\n turnLightsOff();\n }",
"public void toggleFlash() {\n\t\tsetFlashState(!mFlashState);\n\t}",
"public void turnOff(){\n vendingMachine = null;\n Logger.getGlobal().log(Level.INFO,\" Turning Off...\");\n }",
"public void stop() {\n m_servo.setSpeed(0.0);\n }",
"public void flash() {\n mFlash = true;\n invalidate();\n }",
"public void off() {\n // Sets the LED pin state to (low)\n ledPin.low();\n }",
"public void stop() {\n\t\t\n\t}",
"private void stop() {\r\n\t\t\tstopped = true;\r\n\t\t}",
"public void stop()\n {\n mover.stop();\n }",
"public synchronized void stop() {\n stopping = true;\n }",
"void halt() {\n this.ws.stop = true;\n this.wr.stop = true;\n }",
"public void stop() {\n stop = true;\n }",
"private void toggle_light() {\n\t\ttry {\n\t\t\tif (!light_on) {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light_selected);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n\t\t\t\tgetCameraManager().getFramingRect();\n//\t\t\t\tCameraManager.get().turn_onFlash();\n\t\t\t\tgetCameraManager().setTorch(true);\n\n\t\t\t} else {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n//\t\t\t\tCameraManager.get().turn_offFlash();\n\t\t\t\tgetCameraManager().setTorch(false);\n\n\t\t\t}\n\t\t\tlight_on = !light_on;\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}",
"public void stopped();",
"@Override\n public void discardRemainingLights() {\n while (nextLightIndex < MAX_POINT_LIGHTS) {\n setPointLight(new Vector3f(), Color4f.INVISIBLE, 0);\n }\n }",
"public void stopPressed() {\n // display\n TextLCD.print(STOP);\n // reset\n reset();\n }",
"public void disablecameraLights(){\n \tcamLights.set(true);\n }",
"public void stop() {\n }"
] | [
"0.75701153",
"0.74674433",
"0.7421466",
"0.71589696",
"0.7120681",
"0.69463295",
"0.6919583",
"0.6896689",
"0.68727386",
"0.6768375",
"0.672957",
"0.6687545",
"0.6652182",
"0.66471666",
"0.6646972",
"0.6570211",
"0.65449685",
"0.6531733",
"0.645898",
"0.6449866",
"0.6397397",
"0.6394855",
"0.63764733",
"0.6367387",
"0.63651925",
"0.63562363",
"0.6348345",
"0.6342399",
"0.633518",
"0.63313955",
"0.6298169",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6296947",
"0.6295141",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.6291882",
"0.62916",
"0.6283984",
"0.62409925",
"0.62378985",
"0.6214783",
"0.62050664",
"0.62032825",
"0.6202627",
"0.6192363",
"0.6192264",
"0.6183923",
"0.6180775",
"0.6180488",
"0.6151492",
"0.6148638",
"0.6145553",
"0.61434776",
"0.61394125",
"0.6129979",
"0.6129871",
"0.6125341",
"0.61230236",
"0.6121472",
"0.6120204",
"0.612009",
"0.61042744",
"0.61038107",
"0.61032665",
"0.6084662",
"0.60784113",
"0.6078047",
"0.607778",
"0.60777366",
"0.60771567",
"0.6076335",
"0.6071251"
] | 0.8501288 | 0 |
Called when the component is resized. | public void componentResized(ComponentEvent event) {
// first, size the lights and corners
double width = (double)getWidth() / ((double)maxHorizontalLights + 2); //< +2 for the corners!
double height = (double)getHeight() / ((double)maxVerticalLights + 2); //< +2 for the corners!
Dimension lightDimension = new Dimension((int)Math.round(width), (int)Math.round(height));
// now set the locations and sizes of each light
// top border location
double x = width;
double y = 0;
for (int i = 0; i < topBorder.size(); i++) {
topBorder.get(i).setPosition(x, y);
topBorder.get(i).setPreferredSize(lightDimension);
topBorder.get(i).setSize(lightDimension);
x += width;
}
// bottom border locations
x = width;
y = getHeight() - height;
for (int i = 0; i < bottomBorder.size(); i++) {
bottomBorder.get(i).setPosition(x, y);
bottomBorder.get(i).setPreferredSize(lightDimension);
bottomBorder.get(i).setSize(lightDimension);
x += width;
}
bottomRight.setPosition(x, y);
// left border locations
x = 0;
y = height;
for (int i = 0; i < leftBorder.size(); i++) {
leftBorder.get(i).setPosition(x, y);
leftBorder.get(i).setPreferredSize(lightDimension);
leftBorder.get(i).setSize(lightDimension);
y += height;
}
// right border
x = getWidth() - width;
y = height;
for (int i = 0; i < rightBorder.size(); i++) {
rightBorder.get(i).setPosition(x, y);
rightBorder.get(i).setPreferredSize(lightDimension);
rightBorder.get(i).setSize(lightDimension);
y += height;
}
// set the size and locations of the corners
x = 0;
y = 0;
topLeft.setPosition(x, y);
topLeft.setPreferredSize(lightDimension);
topLeft.setSize(lightDimension);
x = getWidth() - width;
y = 0;
topRight.setPosition(x, y);
topRight.setPreferredSize(lightDimension);
topRight.setSize(lightDimension);
x = 0;
y = getHeight() - height;
bottomLeft.setPosition(x, y);
bottomLeft.setPreferredSize(lightDimension);
bottomLeft.setSize(lightDimension);
x = getWidth() - width;
y = getHeight() - height;
bottomRight.setPosition(x, y);
bottomRight.setPreferredSize(lightDimension);
bottomRight.setSize(lightDimension);
// set the location and size of the tumbler display
width = getWidth() - (2 * width);
height = getHeight() - (2 * height);
Dimension tumblerDisplayDimension = new Dimension((int)Math.round(width), (int)Math.round(height));
tumblerDisplay.setPreferredSize(tumblerDisplayDimension);
tumblerDisplay.setSize(tumblerDisplayDimension);
tumblerDisplay.setLocation(topLeft.getWidth(), topLeft.getHeight());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void componentResized(ComponentEvent arg0) {\r\n\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n public void componentResized(ComponentEvent e) {\n }",
"@Override\r\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\n\n\t\t}",
"@Override\r\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\tsuper.componentResized(e);\r\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\twidthAttitude=e.getComponent().getSize().getWidth()/Width;\n\t\theightAttitude=e.getComponent().getSize().getHeight()/Height;\n\t}",
"@Override\n\tpublic void resized() {\n\t}",
"@SuppressWarnings(\"synthetic-access\")\r\n\t @Override\r\n\t public void componentResized(final ComponentEvent arg0) {\n\t\tupdateLocation(WSResizeHandleComponent.this.parent);\r\n\t }",
"public void componentResized(ComponentEvent e) {\r\n\r\n int width = getWidth();\r\n int height = getHeight();\r\n\r\n //we check if either the width\r\n //or the height are below minimum\r\n\r\n boolean resize = false;\r\n\r\n if (width < minWidth) {\r\n resize = true;\r\n width = minWidth;\r\n }\r\n if (height < minHeight) {\r\n resize = true;\r\n height = minHeight;\r\n }\r\n if (resize) {\r\n this.setSize(width, height);\r\n }\r\n }",
"public void componentResized(ComponentEvent e) {\n\t\tresizeBackgroundImage();\n\t\trepaint();\n\t}",
"public abstract void windowResized();",
"@Override\r\npublic void componentResized(ComponentEvent arg0) {\n\tsetSizeBackgr(getSize());\r\n\tsetSizeHat (getSize());\r\n\tsetSizeGift(getSize());\r\n}",
"public void componentResized(ComponentEvent e) \r\n\t{\r\n\t\t//System.out.println(\"Resized: \" + e);\r\n\t\tsuper.componentResized(e);\r\n\t}",
"public void componentResized(ComponentEvent e) {\n myReshape(getSize().width, getSize().height);\n display();\n repaint();\n }",
"public void componentResized(ComponentEvent e) {\n myReshape(getSize().width, getSize().height);\n display();\n repaint();\n }",
"public void componentResized(ComponentEvent e) {\n notifyViewportListeners(getXOrigin(), getYOrigin(), panelWidth, panelHeight);\n }",
"protected abstract void onResize(int width, int height);",
"public void componentResized(ComponentEvent e) {\n System.out.println(\"componentResized\");\n container.setPreferredSize(new Dimension(getWidth(), getHeight()));\n \t\tcontainer.imageContainer.setBounds(0, 30, container.getPreferredSize().width, container.getPreferredSize().height);\n \t\tcontainer.toolbar.setSize(container.getPreferredSize().width-16, 25);\n \t\tSystem.out.println(container.imageContainer.getPreferredSize());\n \t\trepaint();\n }",
"@Override\n protected void sizeChanged () {\n }",
"@Override\n public void componentResized(java.awt.event.ComponentEvent evt) {\n resizeGrid();\n }",
"public void componentResized(ComponentEvent e)\n/* 410: */ {\n/* 411:478 */ TileGIS.this.mapPanel.setSize(TileGIS.this.placeholder.getJComponent().getSize());\n/* 412: */ }",
"@Override\n public void componentResized(final ComponentEvent e) {\n buttonWidth = position.isHorizontal() ? 150 : (parent.getWidth() / cells);\n relayout();\n }",
"@Override\n\tpublic void onResize(int width, int height) {\n\t}",
"public void onResized(Integer width,Integer height);",
"void onResized(int width, int height);",
"public void componentResized(ComponentEvent event) {\n // resize the image\n if (isOn()) {\n setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), onImageIcon));\n } else {\n setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), offImageIcon));\n }\n }",
"public void componentResized(ComponentEvent e) {\n\t\t\t\t\n\t\t\t\tDimension size = e.getComponent().getSize();\n\t\t\t\tint infoWidth = 200;\n\t\t\t\tint tabPaneWidth = 200;\n\t\t\t\tint padY = 80;\n\t\t\t\tint padX = 40;\n\t\t\t\tint canvasWidth = (int) (size.width - padX - infoWidth - tabPaneWidth);\n\t\t\t\tint canvasHeight = (int) (size.height - padY);\n\t\t\t\tcanvas.setSize(canvasWidth, canvasHeight);\n\t\t\t\twindow.setSize(canvasWidth, canvasHeight);\n\t\t\t\tinfoPanel.setSize(infoWidth, canvasHeight); \n\t\t\t\t\n\t\t\t\tint tabPadX = 10;\n\t\t\t\tint tabPadY = 30;\n\t\t\t\ttabbedPane.setSize(tabPaneWidth, canvasHeight);\n\t\t\t\texplorerPanel.setSize(tabPaneWidth-tabPadX, canvasHeight-tabPadY);\n\t\t\t\tplanPanel.setSize(tabPaneWidth-tabPadX, canvasHeight-tabPadY);\n\t\t\t\tcanvas.revalidate();\n\t\t\t}",
"@Override\n protected final void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n this.invalidate();\n }",
"@Override\r\n\tpublic void resize() {\n\t\t\r\n\t}",
"@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\tthis.mapImage.resizeImage(this.getWidth() - 15, this.getHeight() - 60);\n\t\t// make the thread \"go to sleep\" to avoid smearing the screen\n\t\ttry {\n\t\t\tThread.sleep(20);\n\t\t} catch (InterruptedException e0) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te0.printStackTrace();\n\t\t}\n\t\tdrawAll();\n\t}",
"@Override\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\tisOpen = true;\n\t\t\t}",
"@Override\n public void componentResized(ComponentEvent componentEvent) {\n ControlFrame.this.pack();\n }",
"void windowResized(ResizeEvent e);",
"@Override\n\tpublic void resize() {\n\t\t\n\t}",
"@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n this.w = w;\n this.h = h;\n }",
"@Override\n\tpublic void resize(float width, float height) {\n\t}",
"public void onWindowResized(int width, int height) {\n this.setHeight(\"\" + (height - TopPanel.HEIGHT));\n }",
"public void resize() {\n\t\tsp.doLayout();\n\t}",
"@Override\n public void componentResized(ComponentEvent e) {\n setShape(new Ellipse2D.Double(0,0,FRAME_WIDTH,FRAME_WIDTH));\n }",
"@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\r\n\t\tif (w > 0 && h > 0) {\r\n\t\t\tcontainerWidth = w;\r\n\t\t\tcontainerHeight = h;\r\n\t\t}\r\n\t}",
"private void resize() {\n }",
"private void onResize() {\n /*\n * IE (pre IE9 at least) will give us some false resize events due to\n * problems with scrollbars. Firefox 3 might also produce some extra\n * events. We postpone both the re-layouting and the server side event\n * for a while to deal with these issues.\n * \n * We may also postpone these events to avoid slowness when resizing the\n * browser window. Constantly recalculating the layout causes the resize\n * operation to be really slow with complex layouts.\n */\n boolean lazy = resizeLazy\n || (BrowserInfo.get().isIE() && BrowserInfo.get()\n .getIEVersion() <= 8) || BrowserInfo.get().isFF3();\n \n if (lazy) {\n delayedResizeExecutor.trigger();\n } else {\n windowSizeMaybeChanged(Window.getClientWidth(),\n Window.getClientHeight());\n }\n }",
"public void componentShown(ComponentEvent event) {\n // resize this\n componentResized(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));\n }",
"public void componentShown(ComponentEvent event) {\n // resize this\n componentResized(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));\n }",
"@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\tcardPanel.setPreferredSize(new Dimension(appFrame.getWidth(), appFrame.getCentrePanel().getHeight() * 2 / 3));\n\t\tsummaryPanel.setPreferredSize(new Dimension(appFrame.getWidth(), appFrame.getCentrePanel().getHeight() / 3));\n\t\t\n\t\tcardPanel.repaint();\n\t\tcardPanel.revalidate();\n\t\tsummaryPanel.repaint();\n\t\tsummaryPanel.revalidate();\n\t}",
"@Override\n public void resize()\n {\n if (this.resizer != null)\n {\n this.resizer.apply(this.area);\n }\n\n if (this.children != null)\n {\n this.children.resize();\n }\n\n if (this.resizer != null)\n {\n this.resizer.postApply(this.area);\n }\n }",
"@Override\n public void resize(int width, int height) {\n \n }",
"@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\twidth = w;\n\t\theigth = h;\n\t\tajestPosition();\n\t\tthis.invalidate();\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\t}",
"@Override public void onSizeChanged(int w, int h, int oldw, int oldh)\n {\n super.onSizeChanged(w, h, oldw, oldh);\n // Release the buffer, if any and it will be reallocated on the next draw\n mBuffer = null;\n }",
"@Override\r\n public void resize(int width, int height) {\r\n\r\n }",
"@Override\r\n\tpublic void resize(int width, int height) {\n\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\r\n\t}",
"@Override\n public void resize(int width, int height) {\n\n }",
"private void controlResized() {\n disposeBackBuffer();\n initializeBackBuffer();\n\n redraw();\n }",
"@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\r\n\t\t// 图所占范围大小\r\n\t\tchart.setChartRange(w, h);\r\n\t}",
"@Override\n public void componentResized(ComponentEvent e) {\n //throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n int width = this.getWidth();\n this.jButton1.setLocation(width / 4 - this.jButton1.getWidth() / 2, this.jButton1.getY());\n this.jButton2.setLocation(width * 3 / 4 - this.jButton2.getWidth() / 2, this.jButton2.getY());\n this.jButton3.setLocation(width / 2 - this.jButton3.getWidth() / 2, this.jButton3.getY());\n }",
"@Override\n public void resize(int width, int height) {\n }",
"protected abstract void resize();",
"@Override\n protected void onSizeChanged(int w, int h, int oldW, int oldH) {\n super.onSizeChanged(w, h, oldW, oldH);\n\n canvasWidth = w;\n canvasHeight = h;\n updatePolygonSize();\n\n if (Math.min(canvasWidth, canvasHeight) != Math.min(oldW, oldH)) {\n refreshImage();\n }\n }",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t}",
"protected final void fireResize() {\r\n\t\tfireEvent(new ResizeEvent(this));\r\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n setGameCards();\n }",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}"
] | [
"0.83997416",
"0.8314756",
"0.8314756",
"0.82875186",
"0.8232234",
"0.8202646",
"0.8116406",
"0.7863458",
"0.78351635",
"0.7798397",
"0.77858084",
"0.76980734",
"0.76959985",
"0.76549083",
"0.7650625",
"0.7643026",
"0.7643026",
"0.76367515",
"0.7630392",
"0.7589877",
"0.7538979",
"0.7528335",
"0.75128704",
"0.75065464",
"0.7493468",
"0.74532723",
"0.73991764",
"0.7325161",
"0.73084325",
"0.7236627",
"0.7224941",
"0.7207157",
"0.7196112",
"0.71919674",
"0.7191168",
"0.71597874",
"0.7150449",
"0.71040463",
"0.7076876",
"0.7064131",
"0.70630705",
"0.7051311",
"0.70448655",
"0.704318",
"0.7028807",
"0.7028807",
"0.7015056",
"0.69892424",
"0.6974824",
"0.6971208",
"0.69181806",
"0.6905029",
"0.6850064",
"0.6850064",
"0.6850064",
"0.6843852",
"0.6834603",
"0.68281645",
"0.68262976",
"0.67917466",
"0.6786732",
"0.67845696",
"0.6781821",
"0.6772342",
"0.6765533",
"0.6765533",
"0.6765533",
"0.6765533",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.67532057",
"0.67532057",
"0.67532057",
"0.67532057",
"0.67532057",
"0.67532057",
"0.67532057",
"0.67532057",
"0.67506754",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435"
] | 0.0 | -1 |
Called when the component is moved. | public void componentMoved(ComponentEvent event) {
// empty body
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void componentMoved(ComponentEvent e)\n {\n \n }",
"@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n public void componentMoved(ComponentEvent e) {\n }",
"@Override\r\n public void componentMoved(ComponentEvent e) {\n }",
"@Override\r\n\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\r\n\t\t}",
"@Override\n public void componentMoved(ComponentEvent arg0) {\n }",
"@Override\r\n\tpublic void componentMoved(ComponentEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void componentMoved(ComponentEvent arg0) {\n\r\n\t}",
"private void handleMoved()\n {\n toolkit.postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_MOVED));\n }",
"@Override\n\tpublic void componentMoved(ComponentEvent e) {\n\n\t}",
"@Override\n\tpublic void componentMoved(ComponentEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void componentMoved(ComponentEvent e) {\n\t\t\n\t}",
"@Override\n\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\n\n\t\t}",
"@Override\n\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\n\t}",
"@Override\r\npublic void componentMoved(ComponentEvent arg0) {\n\t\r\n}",
"public void componentMoved(ComponentEvent e) {\n\t\t\t\n\t\t}",
"public void componentMoved(ComponentEvent e) {\n // !!! TODO: Do we want to save absolute positions???\n if (DEBUG)\n System.out.println(\"componentMoved: \" + e);\n }",
"public void componentMoved(ComponentEvent arg0) {\n\t\t\n\t}",
"public void componentMoved(ComponentEvent e) {\n\t\tsuper.componentMoved(e);\r\n\t}",
"@Override\n public void componentMoved(final ComponentEvent e) {\n // Do nothing\n }",
"public void componentMoved(ComponentEvent e)\n/* 415: */ {\n/* 416:482 */ TileGIS.this.mapPanel.setLocation(TileGIS.this.placeholder.getJComponent().getLocation());\n/* 417: */ }",
"protected void onMove() {\r\n }",
"@Override\r\n\tprotected void onMove() {\n\t\t\r\n\t}",
"private void moved(MouseEvent e)\r\n {\n }",
"public void setMoved() {\r\n\t\tmoved = true;\r\n\t}",
"@Override\n public void onMove(float x, float y) {\n }",
"public void move() {\n\t\t// Override move so we don't move, then get location set by owner.\n\t}",
"protected final void handleMove(final int x, final int y,\n final boolean updateTarget) {\n if (updateTarget) {\n AWTAccessor.getComponentAccessor().setLocation(getTarget(), x, y);\n postEvent(new ComponentEvent(getTarget(),\n ComponentEvent.COMPONENT_MOVED));\n }\n }",
"@Override\n public void mouseDragged(MouseEvent evt) {\n setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\n }",
"@Override\n public void onDragPositionsChanged(int oldPosition, int newPosition) {\n }",
"@Override\n public void move () {\n }",
"@Override\r\n public void mouseDragged(MouseEvent e) {\r\n int deltaX = e.getXOnScreen() - screenX;\r\n int deltaY = e.getYOnScreen() - screenY; \r\n \r\n setLocation(myX + deltaX, myY + deltaY);\r\n }",
"@Override\n\tpublic void mouseReleased(MouseEvent e)\n\t{\n\t\tif (!potentialDrag) return;\n\n\t\tswappedComponent = null;\n\t\tswappedComponentPreviousLocation = null;\n\t\tsource.removeMouseMotionListener( this );\n\t\tpotentialDrag = false;\n\n\t\tif (changeCursor)\n\t\t\tsource.setCursor( originalCursor );\n\n\t\tif (destination instanceof JComponent)\n\t\t{\n\t\t\t((JComponent)destination).setAutoscrolls( autoscrolls );\n\t\t}\n\n\t\t// Layout the components on the parent container\n\n\t\tif (autoLayout)\n\t\t{\n\t\t\tif (destination instanceof JComponent)\n\t\t\t{\n\t\t\t\t((JComponent)destination).revalidate();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdestination.validate();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onMove(boolean absolute) {\n \n }",
"@Override\n public void mouseDragged(MouseEvent e) {\n switch (GlobalVariable.dragState) {\n case init:\n Point abPoint = EventUtil.getAbsolutePointBy(e);\n // the component that the mouse at (as it's not e.getComponent if you move far away.\n Component componentOfMouse = e.getComponent().getParent().getComponentAt(abPoint);\n if (componentOfMouse instanceof BaseUnitUI) {\n if (!(EventUtil.isPointInComponents(e, \"In\"))\n && !(EventUtil.isPointInComponents(e, \"Out\"))) {\n // You are attempt to relocate the Unit\n e.getComponent().setLocation(abPoint);\n GlobalVariable.dragState = GlobalVariable.DragState.forRelocate;\n } else {\n // You drag a In or Out, so it is to Link Unit\n GlobalVariable.dragState = GlobalVariable.DragState.forLink;\n // get the line you create during mousePress and update its endPoint\n Line line = GlobalVariable.lastLine;\n if (line != null) {\n line.updateEndPoint(abPoint);\n GlobalVariable.workPanel.updateUI();\n }\n }\n }\n break;\n case forRelocate:\n // if it is called during dragging label around\n Point newLoc = EventUtil.getAbsolutePointBy(e);\n e.getComponent().setLocation(newLoc);\n // get the unit which this UI belong to.\n int unitIndex = GlobalVariable.componentArray.indexOf(e.getComponent());\n SuperUnit unit = GlobalVariable.unitArray.get(unitIndex);\n // update the line linked with the unit you want to relocate.\n Line[] lines = unit.getOutLine();\n for (int iLine = 0; iLine < lines.length; iLine ++) {\n if (lines[iLine] != null) {\n // get the label center location\n Point origin = unit.unitUI.getComponent(unit.getInLines().length).getLocation();\n origin = EventUtil.transformToSuperLoca(origin, unit.unitUI);\n origin.x += GlobalVariable.actionWidth / 2;\n lines[iLine].updateStartPoint(origin);\n }\n }\n for (int iIn = 0; iIn < unit.getInLines().length; iIn ++) {\n if (unit.getInLines()[iIn] != null) {\n // get the label center location\n Point origin = unit.unitUI.getComponent(iIn).getLocation();\n origin = EventUtil.transformToSuperLoca(origin, unit.unitUI);\n origin.x += GlobalVariable.actionWidth / 2;\n unit.getInLines()[iIn].updateEndPoint(origin);\n }\n }\n break;\n case forLink:\n Point endPoint = EventUtil.getAbsolutePointBy(e);\n Line line = GlobalVariable.lastLine;\n if (line != null) {\n line.updateEndPoint(endPoint);\n GlobalVariable.workPanel.updateUI();\n }\n break;\n }\n }",
"@Override\n\tpublic void update() {\n\t\tmove();\n\t\tplace();\n\t}",
"@Override\n\tpublic void move() {\n\n\t}",
"@Override\r\n\tpublic void move() {\n\r\n\t}",
"void onMove();",
"public void move(){\n super.move();\n load.updateCoordinates(this.x,this.y);\n }",
"@Override\n\tpublic void move() {\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tPoint dragged = e.getLocationOnScreen();\n\t\tint dragX = getDragDistance(dragged.x, pressed.x, snapSize.width);\n\t\tint dragY = getDragDistance(dragged.y, pressed.y, snapSize.height);\n\n\t\tint locationX = location.x + dragX;\n\t\tint locationY = location.y + dragY;\n\n\t\t// Mouse dragged events are not generated for every pixel the mouse\n\t\t// is moved. Adjust the location to make sure we are still on a\n\t\t// snap value.\n\n\t\twhile (locationX < edgeInsets.left)\n\t\t\tlocationX += snapSize.width;\n\n\t\twhile (locationY < edgeInsets.top)\n\t\t\tlocationY += snapSize.height;\n\n\t\tDimension d = getBoundingSize(destination);\n\n\t\twhile (locationX + destination.getSize().width + edgeInsets.right > d.width)\n\t\t\tlocationX -= snapSize.width;\n\n\t\twhile (locationY + destination.getSize().height + edgeInsets.bottom > d.height)\n\t\t\tlocationY -= snapSize.height;\n\n\t\t// Restore old location for swapped component\n\t\tif (swappedComponent != null) {\n\t\t\tswappedComponent.setLocation(swappedComponentPreviousLocation.x, swappedComponentPreviousLocation.y);\n\t\t}\n\n\t\t// Get component that was originally at (locationX, locationY)\n\t\tComponent componentUnderCursor = componentUnderCursorThatIsNotDestination(locationX, locationY);\n\t\tif (componentUnderCursor != null) {\t\n\t\t\tif (!componentUnderCursor.equals(destination)) {\n\t\t\t\tswappedComponent = componentUnderCursor;\n\t\t\t\tswappedComponentPreviousLocation = componentUnderCursor.getLocation();\n\t\t\t\tif (IJ.debugMode)\n\t\t\t\t\tSystem.out.println(\"Swapped Item Location: (\"+swappedComponentPreviousLocation.x+\",\"+swappedComponentPreviousLocation.y+\")\");\n\t\t\t}\n\t\t\tcomponentUnderCursor.setLocation(location.x, location.y);\n\t\t}\n\t\t\n\t\t// Adjustments are finished, move the component\n\t\tdestination.setLocation(locationX, locationY);\n\t\t\n\t\tif (IJ.debugMode)\n\t\t\tSystem.out.println(\"Dragged Item Location: (\"+locationX+\",\"+locationY+\")\");\n\t}",
"@Override\n public void mouseDragged(MouseEvent e){\n newerlabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }",
"public void onSwapPosition() {\n\n\t}",
"@Override\n\tpublic void onPlayerMove(PlayerMoveEvent e) {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {\n\t\t\t\t\tgameObject.moveBy(0,y-gameObject.getHeight()/2);\n\t\t\t\t}",
"@Override\n\tpublic void move() {\n\t\t\n\t}",
"@Override\r\n public void mouseDragged(MouseEvent e) {\n int thisX = getLocation().x;\r\n int thisY = getLocation().y;\r\n\r\n //determina el desplazamiento\r\n int xMoved = (thisX + e.getX()) - (thisX + initialClick.x);\r\n int yMoved = (thisY + e.getY()) - (thisY + initialClick.y);\r\n\r\n //mueve la ventana a su nueva posicion\r\n int X = thisX + xMoved;\r\n int Y = thisY + yMoved;\r\n this.setLocation(X, Y);\r\n }",
"@Override\n\t\t\t\tpublic void drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {\n\t\t\t\t\tgameObject.moveBy(x-gameObject.getWidth()/2, y-gameObject.getHeight()/2);\n\t\t\t\t}",
"@Override\r\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void onMoveCompleted(MoveEvent arg0) {\n\t\t\n\t}",
"void windowMoved(MoveEvent e);",
"@Override\r\n\t\t\tpublic void ancestorMoved(AncestorEvent event) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\tpublic void ancestorMoved(AncestorEvent arg0) {\n\t\t\t\r\n\t\t}",
"void onDragged();",
"@Override\r\n\t\t\tpublic void mouseMoved(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\n\t\t\t}",
"@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}",
"@Override\r\n\tpublic void onMovableChanged(Movable movable) {\r\n\t\tControllerEventSource.notifyMovableChanged(movable);\r\n\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent e)\n\t{\n\t}",
"@Override\n\t\t\t\tpublic void drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {\n\t\t\t\t\tgameObject.moveBy(x-gameObject.getWidth()/2, 0);\n\t\t\t\t}",
"@Override\r\n\t\t\tpublic void ancestorMoved(AncestorEvent event) {\n\t\t\t}",
"@Override\r\n public void mouseMoved(MouseEvent e) {\r\n\r\n }",
"@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n public void handleMouseMovedEvent(Mouse.MotionEvent event) {\n }",
"@Override\r\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\r\n\t\t\t}",
"public void moveComponentsFrom(ComponentContainer source);",
"@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\n\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\n\t}",
"@Override\r\n\t\t\t\t\t\t\tpublic void ancestorMoved(AncestorEvent event) {\n\t\t\t\t\t\t\t}",
"public void mouseDragged(MouseEvent me) {\n if(this.controler.isPlayerOK(this.pieceClicked.getCoord())) {\n\n \tif (chessPiece == null) return;\n \tchessPiece.setLocation(me.getX() + xAdjustment, me.getY() + yAdjustment);\n \n }\n }",
"@Override\n public void mouseMoved(MouseEvent e){\n \n }",
"@Override\n\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\t\t\n\t}",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tmoving = false;\n\t\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tChessPiece p = (ChessPiece)e.getSource();\r\n\t\tint newX = e.getX() - p.draggedAtX + p.getLocation().x;\r\n\t\tint newY = e.getY() - p.draggedAtY + p.getLocation().y;\r\n\t\tp.setLocation(newX, newY);\r\n\t}",
"@SuppressWarnings(\"synthetic-access\")\r\n\t @Override\r\n\t public void componentResized(final ComponentEvent arg0) {\n\t\tupdateLocation(WSResizeHandleComponent.this.parent);\r\n\t }",
"@Override\n public void mouseMoved(MouseEvent arg0) {\n \n }",
"@Override\n\tpublic void mouseMoved(MouseEvent arg0) {\n\t}",
"@Override\r\n public void mouseMoved(MouseEvent e) {\n }",
"@Override\n\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t}",
"@Override\n public void onDragStarted(int position) {\n }",
"@Override\r\n public void moveSoldier(int previousLocationX, int previousLocationY, int newLocationX, int newLocationY) {\r\n\r\n // delete soldier representation from previous location \r\n // then render soldier representation in new location \r\n }",
"@Override\n\tpublic void updatePosition()\n\t{\n\t\tif(!fired && !pathfinding)\n\t\t{\n\t\t\tif(x == destX && y == destY)\n\t\t\t{\n\t\t\t\tfired = true;\n\t\t\t\tvehicle.msgAnimationDestinationReached();\n\t\t\t\tcurrentDirection = MovementDirection.None;\n\t\t\t\t\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\tif(cIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t{\n\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\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(nextIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t{\n\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(allowedToMove || drunk)\n\t\t\t{\n\t\t\t\tswitch(currentDirection)\n\t\t\t\t{\n\t\t\t\t\tcase Right:\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Down:\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:\n\t\t\t\t\t\tx--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x % CityPanel.GRID_SIZE == 0 && y % CityPanel.GRID_SIZE == 0 && !moves.isEmpty())\n\t\t\t{\t\n\t\t\t\tif(allowedToMove || drunk)\n\t\t\t\t{\n\t\t\t\t\tcurrentDirection = moves.pop();\n\t\t\t\t\n\t\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\t\n\t\t\t\t\tif(current != next)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\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\tif(nextIntersection == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tguiList.remove(this);\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//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrent = next;\n\t\t\t\t\t\n\t\t\t\t\tswitch(currentDirection)\n\t\t\t\t\t{\n\t\t\t\t\tcase Down:next = new Point(current.x,current.y + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:next = new Point(current.x - 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Right:next = new Point(current.x + 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:next = new Point(current.x,current.y - 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:next = current;\n\t\t\t\t\t\tbreak;\n\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\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[next.y][next.x].tryAcquire())\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\treturn;\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(cIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(next.y).get(next.x);\n\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(Pathfinder.isCrossWalk(next, city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(Gui g : guiList)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(g instanceof PassengerGui)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\t\treturn;\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\tif(nextIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextIntersection.acquireAll();\n\t\t\t\t\t\t\t\t\tallowedToMove = true;\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\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tguiList.add(this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!allowedToMove && drunk)\n\t\t{\n\t\t\tcity.addGui(new ExplosionGui(x,y));\n\t\t\tSystem.out.println(\"DESTROYING\");\n\t\t\tcity.removeGui(this);\n\t\t\tvehicle.stopThread();\n\t\t\tsetPresent(false);\n\t\t\t\n\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\n\t\t\tif(cIntersection == null)\n\t\t\t{\n\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t{\n\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t{\n\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t}\n\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) \n\t{\n\t\tsuper.mouseDragged(e);\n\n\t\tthis.model.setPosition(e.getX()/2, e.getY()/2);\t//TODO: Important: test this! is it always /2 ? \n\t}",
"@Override\n public void mouseDragged(MouseEvent e){\n newLabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }",
"@Override\n public void mouseMoved(MouseEvent e) {\n }",
"@Override\n\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent arg0) {\n\n\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent arg0) {\n\n\t}",
"@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\n\r\n\t}",
"@Override\n public void mouseMoved(MouseEvent e) {\n\n }"
] | [
"0.7963142",
"0.793399",
"0.790175",
"0.790175",
"0.7889652",
"0.7889652",
"0.7884502",
"0.7880069",
"0.7868672",
"0.78404564",
"0.7833209",
"0.78271246",
"0.7788659",
"0.77826816",
"0.7761193",
"0.77410215",
"0.77410215",
"0.77300555",
"0.7723345",
"0.75920016",
"0.7513733",
"0.72835535",
"0.7252054",
"0.72290564",
"0.72113395",
"0.7087065",
"0.696562",
"0.6766951",
"0.662435",
"0.6441827",
"0.6426504",
"0.6393315",
"0.6377453",
"0.6377089",
"0.63586617",
"0.63158023",
"0.62925756",
"0.62821156",
"0.62751645",
"0.6275025",
"0.6226237",
"0.61913204",
"0.61840385",
"0.6175337",
"0.6167909",
"0.6163968",
"0.61621237",
"0.6153618",
"0.61435515",
"0.6134506",
"0.61246324",
"0.6120337",
"0.61141026",
"0.6084496",
"0.6077573",
"0.607587",
"0.6071565",
"0.6058376",
"0.60548824",
"0.60483223",
"0.6033312",
"0.6032108",
"0.6032108",
"0.6032108",
"0.60132194",
"0.6009086",
"0.60085595",
"0.6003767",
"0.6002591",
"0.6000871",
"0.59984064",
"0.59869367",
"0.5980877",
"0.5980628",
"0.5980501",
"0.5980501",
"0.5976251",
"0.5970516",
"0.5968748",
"0.5964561",
"0.5961532",
"0.5956197",
"0.5949255",
"0.5943423",
"0.59410655",
"0.59408337",
"0.59395427",
"0.59329593",
"0.5930262",
"0.59291166",
"0.59290016",
"0.59287596",
"0.5926028",
"0.5923123",
"0.5923123",
"0.5920164",
"0.5920164",
"0.59187067",
"0.5915118"
] | 0.7338636 | 21 |
Called when the component is shown. Weeee! | public void componentShown(ComponentEvent event) {
// resize this
componentResized(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\t\tpublic void componentShown(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void componentShown(ComponentEvent e) {\n\n }",
"@Override\n\t\t\t\t\t\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n public void componentShown(ComponentEvent e)\n {\n \n }",
"@Override\r\n\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\r\n\t}",
"@Override\n public void componentShown(ComponentEvent e) {\n }",
"@Override\n public void componentShown(ComponentEvent arg0) {\n\n }",
"@Override\n\tpublic void componentShown(ComponentEvent e) {\n\t}",
"@Override\r\n public void componentShown(ComponentEvent e) {\n }",
"@Override\n\tpublic void componentShown(ComponentEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void componentShown(ComponentEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void componentShown(ComponentEvent e) {\n\n\t}",
"@Override\r\n\tpublic void componentShown(ComponentEvent arg0) {\n\r\n\t}",
"@Override\r\npublic void componentShown(ComponentEvent arg0) {\n\t\r\n}",
"public void componentShown(ComponentEvent e) {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void onShow() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void aboutToBeShown() {\n\t\tsuper.aboutToBeShown();\r\n\t}",
"@Override\n\tpublic void shown() {\n\n\t}",
"public void componentShown(ComponentEvent arg0) {\n\t\t\n\t}",
"private void HalKelasComponentShown(java.awt.event.ComponentEvent evt) {\n\t\n }",
"abstract void onShown();",
"public void componentShown(ComponentEvent e) {\n\t\tsuper.componentShown(e);\r\n\t}",
"public void componentShown(ComponentEvent arg0) {\n }",
"void init() {\n setVisible(true);\n\n }",
"@Override\n public void componentShown(final ComponentEvent e) {\n // Do nothing\n }",
"public void onStart() {\r\n\t\tthis.setVisible(true);\r\n\t}",
"@Override\r\n public void show()\r\n {\r\n\r\n }",
"@Override\r\n public void show()\r\n {\r\n\r\n }",
"@Override\n public void componentOpened() {\n super.componentOpened();\n\n }",
"@Override\n public boolean isShown() {\n return super.isShown();\n }",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"public void show() {\n/* 104 */ Component component = getComponent();\n/* */ \n/* 106 */ if (component != null) {\n/* 107 */ component.show();\n/* */ }\n/* */ }",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public void show() {\n\n }",
"@Override\n public void show() {\n\n }",
"public void onDisplay() {\n\n\t}",
"@Override\n public void show() {\n }",
"@Override\r\n\tpublic void show() {\n\t}",
"@Override\n\tpublic void show() {\n\t\tsuper.show();\n\t\t\n\t}",
"@Override\n public void componentOpened() {\n }",
"@Override\n public void show() {\n \n }",
"@Override\n public void componentOpened() {\n // TODO add custom code on component opening\n }",
"@Override\n public void componentOpened() {\n // TODO add custom code on component opening\n }",
"@Override\n public void componentOpened() {\n // TODO add custom code on component opening\n }",
"@Override\n public void componentOpened() {\n // TODO add custom code on component opening\n }",
"@Override\n public void componentOpened() {\n }",
"@Override\n public void componentOpened() {\n }",
"@Override\n public void componentOpened() {\n }",
"@Override\n public void componentOpened() {\n }",
"@Override\r\n\tpublic void show() {\n\r\n\t}",
"@Override\r\n\tpublic void show() {\n\r\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"public void show() {\n visible=true;\n }",
"@Override\n public void componentHidden(ComponentEvent e)\n {\n \n }",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\t}",
"@Override\n\tpublic void show() {\n\t}",
"@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"void zeigeFenster() {\r\n\t\t_panel.setVisible(true);\r\n\t}",
"@Override\r\n\t\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\t\r\n\t\t}",
"@Override\r\npublic void componentHidden(ComponentEvent arg0) {\n\t\r\n}",
"public void display() {\n\t\tthis.setVisible(true);\n\t}",
"public void display() {\r\n\t\tsetVisible(true);\r\n\t}",
"@Override\r\n\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\r\n\t}",
"public void onDisplay() {\n }",
"@Override\r\n\tpublic void componentHidden(ComponentEvent arg0) {\n\r\n\t}",
"@Override\n public void componentHidden(ComponentEvent arg0) {\n }",
"private void jPanel1ComponentShown(java.awt.event.ComponentEvent evt) {\n }",
"public void ver() {\n\t\tthis.setVisible(true);\n\t}",
"@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void componentHidden(ComponentEvent e) {\n\t\t\r\n\t}",
"@Override\r\n public void componentHidden(ComponentEvent e) {\n }"
] | [
"0.8476182",
"0.8464792",
"0.84403604",
"0.8430428",
"0.84124565",
"0.84124565",
"0.84086305",
"0.84054196",
"0.8402616",
"0.840246",
"0.8397498",
"0.83912164",
"0.83852094",
"0.83852094",
"0.83780456",
"0.83780456",
"0.83424926",
"0.8320678",
"0.8158309",
"0.8015051",
"0.77926",
"0.77719486",
"0.77282125",
"0.7727651",
"0.7702625",
"0.7639044",
"0.7606589",
"0.75842875",
"0.7517851",
"0.7486742",
"0.74139196",
"0.7363927",
"0.7363927",
"0.73323953",
"0.73050296",
"0.7278689",
"0.7278689",
"0.7278689",
"0.7278407",
"0.7273077",
"0.7201949",
"0.7201949",
"0.71906",
"0.718921",
"0.7187709",
"0.71870005",
"0.7180222",
"0.71802217",
"0.71732897",
"0.71732897",
"0.71732897",
"0.71732897",
"0.7130309",
"0.7130309",
"0.7130309",
"0.7130309",
"0.71190447",
"0.71190447",
"0.711734",
"0.711734",
"0.711734",
"0.711734",
"0.711734",
"0.711734",
"0.711734",
"0.711734",
"0.711734",
"0.711734",
"0.711734",
"0.711734",
"0.711734",
"0.711734",
"0.711734",
"0.71071744",
"0.70862174",
"0.70820487",
"0.70820487",
"0.70820487",
"0.70820487",
"0.70820487",
"0.70820487",
"0.70820487",
"0.70820487",
"0.7079551",
"0.7079551",
"0.706873",
"0.7062951",
"0.70563173",
"0.7052264",
"0.7048054",
"0.7047787",
"0.7036013",
"0.7010734",
"0.7000605",
"0.698619",
"0.69741833",
"0.6960353",
"0.6954599",
"0.6954599",
"0.6954397",
"0.69509715"
] | 0.0 | -1 |
Called when the component is hidden. | public void componentHidden(ComponentEvent event) {
// empty body
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void componentHidden(ComponentEvent e)\n {\n \n }",
"public void componentHidden(ComponentEvent e) {}",
"@Override\r\n public void componentHidden(ComponentEvent e) {\n }",
"@Override\n public void componentHidden(ComponentEvent arg0) {\n }",
"@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void componentHidden(ComponentEvent e) {\n\t}",
"@Override\r\n\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void componentHidden(ComponentEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void componentHidden(ComponentEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void componentHidden(ComponentEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void componentHidden(ComponentEvent e) {\n\n\t}",
"@Override\n\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\n\t}",
"public void componentHidden(ComponentEvent e) { }",
"public void componentHidden(ComponentEvent e) { }",
"public void componentHidden(ComponentEvent e) { }",
"public void componentHidden(ComponentEvent e) { }",
"@Override\n public void componentHidden(final ComponentEvent e) {\n // Do nothing\n }",
"@Override\n public void wasHidden() {\n hide();\n }",
"@Override\r\n\tpublic void componentHidden(ComponentEvent arg0) {\n\r\n\t}",
"public void componentHidden(ComponentEvent e) {\n\t\t\t\n\t\t}",
"public void componentHidden(ComponentEvent e) {\r\n\t}",
"public void componentHidden(ComponentEvent e) {\n\t}",
"public void componentHidden(final ComponentEvent arg0) {\n\t\t\t}",
"public void componentHidden(ComponentEvent arg0) {\n\t\t\n\t}",
"public void componentHidden(ComponentEvent arg0) {\n }",
"@Override\n\tpublic void onHide() {\n\n\t}",
"@Override\r\npublic void componentHidden(ComponentEvent arg0) {\n\t\r\n}",
"public void componentHidden(ComponentEvent e) {\n\t\tsuper.componentHidden(e);\r\n\t}",
"@Override\n public void hide() {\n mHandler.post(mHide);\n }",
"public void componentHidden(ComponentEvent e) {\n f.setVisible(true);\n }",
"public void hide() {\n hidden = true;\n }",
"public void hide() {\n\t\thidden = true;\n\t}",
"@Override\r\n public void hide() {\r\n\r\n }",
"@Override\n\tpublic void hide() {\n\t\tdispose();\n\n\t}",
"@Override\n\tpublic void hide() {\n\t\tdispose();\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\tthis.dispose();\r\n\t\t\r\n\t}",
"@Override\r\n public void hide() {\n }",
"@Override\n public void hide() {\n \n }",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"abstract void onHidden();",
"@Override\n public void hide() {\n\n }",
"@Override\n public void hide() {\n\n }",
"@Override\n public void hide() {\n\n }",
"public void hide() {\n visible=false;\n }",
"@Override\n\tpublic void hide()\n\t{\n\n\t}",
"@Override\n\tpublic void hide()\n\t{\n\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\t}",
"@Override\n\tpublic void hide() {\n\t}",
"@Override\n\tpublic void hide() {\n\t}",
"@Override\n\tpublic void hide() {\n\t}",
"@Override\r\n\tpublic void hide() {\n\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\r\n\t}",
"@Override\r\n\tpublic void aboutToBeHidden() {\n\t\tsuper.aboutToBeHidden();\r\n\t}",
"public void hideIt(){\n this.setVisible(false);\n }"
] | [
"0.83220524",
"0.8314688",
"0.8305834",
"0.83042413",
"0.8271392",
"0.8265295",
"0.8246965",
"0.8241001",
"0.82213783",
"0.8208623",
"0.8208623",
"0.8191876",
"0.8191876",
"0.8188189",
"0.8187741",
"0.8187741",
"0.8157129",
"0.8157129",
"0.8157129",
"0.8157129",
"0.81489164",
"0.81392765",
"0.81368065",
"0.81234926",
"0.8101031",
"0.8081922",
"0.7990737",
"0.7957016",
"0.78973204",
"0.7876491",
"0.7855765",
"0.78450155",
"0.77079195",
"0.75619173",
"0.75088745",
"0.74938834",
"0.74625385",
"0.74273103",
"0.74023616",
"0.73982996",
"0.7387746",
"0.73827773",
"0.73783547",
"0.73783547",
"0.73783547",
"0.73783547",
"0.73783547",
"0.73783547",
"0.73783547",
"0.73783547",
"0.7368044",
"0.73017097",
"0.73017097",
"0.73017097",
"0.72848666",
"0.72800004",
"0.72800004",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72406024",
"0.72406024",
"0.72406024",
"0.72406024",
"0.7182836",
"0.7182836",
"0.7182836",
"0.7182836",
"0.7147477",
"0.7096702"
] | 0.7786034 | 32 |
turns the light on | public void turnOn() {
// set the flag
onFlag = true;
// set the image
setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), onImageIcon));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void turnOn( ) {\n\t\t\t\tSystem.out.println(\"Light is on \");\n\t\t}",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"private void toggle_light() {\n\t\ttry {\n\t\t\tif (!light_on) {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light_selected);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n\t\t\t\tgetCameraManager().getFramingRect();\n//\t\t\t\tCameraManager.get().turn_onFlash();\n\t\t\t\tgetCameraManager().setTorch(true);\n\n\t\t\t} else {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n//\t\t\t\tCameraManager.get().turn_offFlash();\n\t\t\t\tgetCameraManager().setTorch(false);\n\n\t\t\t}\n\t\t\tlight_on = !light_on;\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}",
"@Override\n\tpublic void on() {\n\t\tSystem.out.println(\"turn on the \"+name+\" Light\");\n\t}",
"public void turnOn() {\n this.status = true;\n update(this.redValue, this.greenValue, this.blueValue);\n }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"public void turn_on () {\n this.on = true;\n }",
"private void turnOnLights(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_turnOnLights\n\n this.selectedTrain.setLights(1); // turn on lights\n this.operatingLogbook.add(\"Lights on.\");\n this.printOperatingLogs();\n }",
"public Light(boolean isOn) {\n\t\tthis.isOn = isOn;\n\t}",
"public void setIntakeLights(){\n \tintakeLights.set(true);\n }",
"private void setLightStatus() {\n if (mCmd.equals(MSG_ON)) {\n setLighIsOn(true);\n } else {\n setLighIsOn(false);\n }\n }",
"private void toggleLight(){\n\t\tmyGLView.queueEvent(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmRenderer.toggleLight();\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}",
"public void turnOn() {\n\t\tOn = true;\n\t}",
"public void lighting(boolean onOrOff)\r\n {\r\n \tint i;\r\n \tfor (i=0;i<LightSet.size();i++) {\r\n \t\t((Light)LightSet.elementAt(i)).setState(onOrOff);\r\n \t}\r\n }",
"private void on(){\n\n\t\t// if light is off and there is a flash object\n\t\tif(_flash != null && !isFlashOn){\n\n\t\t\t_flash.on();\n\t\t\tisFlashOn = true;\n\t\t}\n\t}",
"public void turnOn() {\n\t\tisOn = true;\n\t}",
"private void updateLight() {\r\n\t}",
"private static void turnFlashlightOn() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_TORCH);\n cam.setParameters(p);\n }",
"public void setLights(boolean lights) {\n \tthis.lightsAreOn = lights;\n }",
"public void setLight1(){\n }",
"void setShutterLEDState(boolean on);",
"public void turnLightsOn() {\n if (isFlashing()) {\n return;\n }\n \n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).turnOn();\n }\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).turnOn();\n }\n for (int i = 0; i < leftBorder.size(); i++) {\n leftBorder.get(i).turnOn();\n }\n for (int i = 0; i < rightBorder.size(); i++) {\n rightBorder.get(i).turnOn();\n }\n topLeft.turnOn();\n topRight.turnOn();\n bottomLeft.turnOn();\n bottomRight.turnOn();\n }",
"@Override\n public void execute() {\n light.on();\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlightOn = !lightOn;\n\t\t\t\tactiveLightSource(lightOn);\n\t\t\t\tlightButton.setLabel(lightOn ? \"Light off\" : \"Light On\");\n\t\t\t}",
"public final void setLed(boolean on_off){\n LIBRARY.CLEyeCameraLED(camera_, on_off ? 1 :0);\n }",
"@Override\n\tpublic void turnOn() {\n\n\t}",
"public void turnOn(boolean truth) {\r\n setEnabled(truth);\r\n }",
"@Override\r\n public void turnOn(){\r\n isOn = true;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_ON);\r\n if (isOn){\r\n engageLoads();\r\n }\r\n }",
"public void setIsLight(boolean blight){\n\t\tm_bLight = blight;\n\t\tinitPaint();\n\t}",
"public LightOnCommand(Light light) {\n this.light = light;\n }",
"public void on() {\n // Sets the LED pin state to 1 (high)\n ledPin.high();\n }",
"public void flashlightSwitch()\n {\n usingFlashlight = !usingFlashlight;\n }",
"public void setStaticLight(boolean staticLight);",
"@Override\n\tpublic void execute() {\n\t\tlight.on();\n\t}",
"private void lightOn(Map<Light, Matrix4f> lights) {\n numLight = 0;\n GL3 gl = glContext.getGL().getGL3();\n FloatBuffer fb4 = Buffers.newDirectFloatBuffer(4);\n LightLocation lightLoc = new LightLocation();\n for (Entry<Light, Matrix4f> entry : lights.entrySet()) {\n Light light = entry.getKey();\n Matrix4f lightTransForm = entry.getValue();\n Vector4f lightPosition = lightTransForm.transform(new Vector4f(light.getPosition()));\n Vector4f lightDirection = lightTransForm.transform(new Vector4f(light.getSpotDirection()));\n String lightName = \"light[\" + numLight + \"]\";\n lightLoc.position = shaderLocations.getLocation(lightName + \".position\");\n lightLoc.ambient = shaderLocations.getLocation(lightName + \".ambient\");\n lightLoc.diffuse = shaderLocations.getLocation(lightName + \".diffuse\");\n lightLoc.specular = shaderLocations.getLocation(lightName + \".specular\");\n lightLoc.direction = shaderLocations.getLocation(lightName + \".direction\");\n lightLoc.cutOff = shaderLocations.getLocation(lightName + \".cutOff\");\n\n gl.glUniform4fv(lightLoc.position, 1, lightPosition.get(fb4));\n gl.glUniform3fv(lightLoc.ambient, 1, light.getAmbient().get(fb4));\n gl.glUniform3fv(lightLoc.diffuse, 1, light.getDiffuse().get(fb4));\n gl.glUniform3fv(lightLoc.specular, 1, light.getSpecular().get(fb4));\n gl.glUniform4fv(lightLoc.direction, 1, lightDirection.get(fb4));\n gl.glUniform1f(lightLoc.cutOff, light.getSpotCutoff());\n numLight++;\n }\n gl.glUniform1i(shaderLocations.getLocation(\"numLights\"), numLight);\n }",
"@Override\n\tpublic void open() {\n\t\tlight.open();\n\t}",
"private void turnOnFlash() {\n if (!batteryOk) {\n showBatteryLowDialog();\n return;\n }\n getCamera();\n Log.d(\"Flash on?\", \"============+>\" + String.valueOf(isFlashOn));\n if (!isFlashOn) {\n if (camera == null || params == null) {\n isFlashOn = false;\n return;\n }\n // play sound\n playSound();\n try {\n if (freq != 0) {\n sr = new StroboRunner();\n t = new Thread(sr);\n t.start();\n } else {\n params = camera.getParameters();\n params.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);\n }\n camera.setParameters(params);\n camera.startPreview();\n }\n } catch (Exception e) {\n // Do nothing;\n }\n\n isFlashOn = true;\n // changing button/switch image\n toggleButtonImageSwitch();\n }\n\n }",
"public static void lightOn(Window window) {\n\t\tWindowManager.LayoutParams lp = window.getAttributes();\r\n\t\tlp.alpha = 1.0f;\r\n\t\twindow.setAttributes(lp);\r\n\t}",
"public void changeState(){\n\t\t//red - Green\n\t\tif (lights[0].isOn()){\n\t\t\tlights[0].turnOff();\n\t\t\tlights[2].turnOn();\n\t\t}\n\t\t\n\t\t//Green -yellow\n\t\telse if(lights[2].isOn()){\n\t\t\tlights[2].turnOff();\n\t\t\tlights[1].turnOn();\n\t\t}\n\t\t//yellow to red\n\t\telse if (lights[1].isOn()){\n\t\t\tlights[1].turnOff();\n\t\t\tlights[0].turnOn();\n\t\t}\n\t\t\n\t}",
"private void blink(final boolean lit) {\n\t\tif (mRobot == null) {\n\t\t\tblinking = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// If not lit, send command to show blue light, or else, send command to\n\t\t// show no light\n\t\tif (lit) {\n\t\t\tmRobot.setColor(0, 0, 0);\n\n\t\t} else {\n\t\t\tmRobot.setColor(0, 255, 0);\n\t\t}\n\n\t\tif (blinking) {\n\t\t\t// Send delayed message on a handler to run blink again\n\t\t\tfinal Handler handler = new Handler();\n\t\t\thandler.postDelayed(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tblink(!lit);\n\t\t\t\t}\n\t\t\t}, 2000);\n\t\t}\n\t}",
"private void enableMoonlightMode() {\n stopService(new Intent(this, SunriseService.class));\n\n // Kill the previous moonlight service (in case it's running)\n stopService(new Intent(this, MoonlightService.class));\n\n // (Re)start the moonlight service\n startService(new Intent(this, MoonlightService.class));\n }",
"public void enableLight(final boolean enable) {\n mLightEnabled = enable;\n if (!mLightEnabled) {\n mPaint.setColorFilter(null);\n } else {\n mPaint.setAlpha(0xFF);\n }\n invalidate();\n }",
"private void blink(final boolean lit){\n \n if(mRobot != null){\n \n //If not lit, send command to show blue light, or else, send command to show no light\n if(lit){\n RGBLEDOutputCommand.sendCommand(mRobot, 0, 0, 0);\n }else{\n RGBLEDOutputCommand.sendCommand(mRobot, 0, 0, 255);\n }\n \n //Send delayed message on a handler to run blink again\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n blink(!lit);\n }\n }, 1000);\n }\n }",
"public void switchOn();",
"public void switchOn() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"o\");\n setCurrentState(true);\n }",
"protected void toggleLaser() {\n laserOn = !laserOn;\n }",
"public void flash(){\n phoneCam.setFlashlightEnabled(!flash);\n flash = !flash;\n }",
"public void changeLight(int pos) {\r\n if (pos < lightsArray.size()) {\r\n Light li = lightsArray.get(pos);\r\n li.switchLight();\r\n System.out.println(\"Light \" + (pos + 1) + \" \" + li.toString());\r\n }\r\n }",
"void animate( LightCondition lights );",
"public void enableLighting(boolean enable)\n\t{\n\t\tthis.glStateChanger.setLighting(enable);\n\t}",
"public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }",
"public void addLight(int id) {\n\tif(!lights.containsKey(id)) {\n\t lights.put(id, true);\n\t GL11.glEnable(id);\n\t}\n }",
"private void activateTrafficLight(TrafficLight activeTrafficLight) {\n for (TrafficLight trafficLight : trafficLights) {\n trafficLight.setState(TrafficLight.State.RED);\n }\n\n // Activating light\n this.activeTrafficLight = activeTrafficLight;\n activeTrafficLight.nextState();\n stepCounter = 0;\n }",
"public void toggleLightSpheres() {\r\n\t\tmodel.control(AbstractModel.TOGGLE_LIGHT_SPHERES, null);\r\n\t}",
"public void setGlowing ( boolean flag ) {\n\t\texecute ( handle -> handle.setGlowing ( flag ) );\n\t}",
"@Override\n public void powerOn() {\n if(isOn)System.out.println(\"The Projector is already ON!\");\n else{\n System.out.println(\"The Projector is now ON!\");\n isOn = true;\n }\n }",
"public static void setLightScreenOnNotification(Context context, boolean lightsOn)\n\t{\n\t\tPreferenceUtils.setLightScreenOnNotification(context, lightsOn);\n\t}",
"public void setgearClawLights(){\n \tgearClawLights.set(true);\n }",
"public void hookLEDs() {\r\n\t\ttable.putBoolean(\"hooked\", true);\r\n\t}",
"public void turnOn(){\n Logger.getGlobal().log(Level.INFO,\" Turning On..\");\n vendingMachine = new VendingMachine();\n inventoryPopulation();\n idle();\n }",
"private void updateSpotLight() {\n\t\tfloat light0_position[] = { player.getPosition().x, 16.0f, player.getPosition().z, 1.0f }; // x,y,z,1\n\t\tfloat light0_diff_spec[] = { 1f, 1f, 1f, 1.0f };\n\t\tfloat light0_direction[] = {-(float)Math.sin(Math.toRadians(player.getRotY())),0,-(float)Math.cos(Math.toRadians(player.getRotY())), 1f};\n\t\t// Eine weitere Lichtquellen definieren\n\t\tspotLight.setPosition(light0_position);\n\t\tspotLight.setCutoff(45.f);\n\t\tspotLight.setDirection(light0_direction);\n\t\tspotLight.setDiffAndSpek(light0_diff_spec);\n\t\t\n\t\tglEnable(GL_LIGHTING);\n\t}",
"@Override\r\n\tpublic void undo() {\n\t\tlight.on();\r\n\t}",
"public void turnOn(int x, int y);",
"private void renderLights() {\n\t\t\n\t}",
"public void turnStrobeOn(){\n if (!WatchFlags.gestureSensingOn){\n Log.d(TAG, \"Gesture sensing mode is off, aborting start strobe command\");\n return;\n }\n if (WatchFlags.strobeIsOn == false) {\n startActivity(new Intent(this, wSignalingActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));\n }\n }",
"public void powerOn() \n\t{\n\t\t//put active to true\n\t\tactive = true;\n\t\t\n\t\t// Set attached lever\n\t\tif (FactoryModPlugin.LEVER_OUTPUT_ENABLED) {\n\t\t\tsetActivationLever(true);\n\t\t}\n\t\t\n\t\t//lots of code to make the furnace light up, without loosing contents.\n\t\tFurnace furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\tbyte data = furnace.getData().getData();\n\t\tItemStack[] oldContents = furnace.getInventory().getContents();\n\t\tfurnace.getInventory().clear();\n\t\tfactoryPowerSourceLocation.getBlock().setType(Material.BURNING_FURNACE);\n\t\tfurnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\tfurnace.setRawData(data);\n\t\tfurnace.update();\n\t\tfurnace.getInventory().setContents(oldContents);\n\t\t//reset the production timer\n\t\tcurrentProductionTimer = 0;\n\t}",
"public void LightUpScreen(){\n PowerManager pm = (PowerManager)this.getSystemService(this.POWER_SERVICE);\n\n //Is the screen already on?\n boolean isScreenOn = pm.isScreenOn();\n\n //If the screen is NOT on, light it up for 5 seconds, and then turn it off again.\n if(isScreenOn == false){\n PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK |PowerManager.ACQUIRE_CAUSES_WAKEUP |PowerManager.ON_AFTER_RELEASE,\"MyLock\");\n wl.acquire(5000);\n }\n }",
"void setupLights() {\n\n lightGroup = new Group();\n\n // Set up the ambient light\n lightAmbient = new AmbientLight(darkGrey);\n lightAmbient.setInfluencingBounds(infiniteBounds);\n lightAmbient.setCapability(Light.ALLOW_STATE_WRITE);\n lightAmbient.setEnable(true);\n lightGroup.addChild(lightAmbient);\n\n // Set up the directional light\n Vector3f lightDirection = new Vector3f(0.65f, -0.65f, -0.40f);\n lightDirectional = new DirectionalLight(white, lightDirection);\n lightDirectional.setInfluencingBounds(infiniteBounds);\n lightDirectional.setEnable(true);\n lightDirectional.setCapability(Light.ALLOW_STATE_WRITE);\n lightGroup.addChild(lightDirectional);\n\n // Set up the point light\n Point3f lightPosition = new Point3f(-1.0f, 1.0f, 0.6f);\n lightPoint = new PointLight(white, lightPosition, attenuation);\n lightPoint.setInfluencingBounds(infiniteBounds);\n lightPoint.setEnable(false);\n lightPoint.setCapability(Light.ALLOW_STATE_WRITE);\n lightPoint.setCapability(PointLight.ALLOW_ATTENUATION_WRITE);\n lightGroup.addChild(lightPoint);\n\n // Set up the spot light\n // Point the light back at the origin\n lightSpot = new SpotLight(white, lightPosition, attenuation,\n lightDirection, (float) Math.toRadians(spotSpreadAngle),\n spotConcentration);\n lightSpot.setInfluencingBounds(infiniteBounds);\n lightSpot.setEnable(false);\n lightSpot.setCapability(Light.ALLOW_STATE_WRITE);\n lightSpot.setCapability(PointLight.ALLOW_ATTENUATION_WRITE);\n lightSpot.setCapability(SpotLight.ALLOW_CONCENTRATION_WRITE);\n lightSpot.setCapability(SpotLight.ALLOW_SPREAD_ANGLE_WRITE);\n lightGroup.addChild(lightSpot);\n }",
"public void setHasLight(boolean hasLight) {\n\t\tthis.hasLight = hasLight;\n\t}",
"public void power()\r\n {\r\n powerOn = true;\r\n }",
"private void initLighting() {\n\t\t\n\t\t\n\t\tfloat lmodel_ambient[] = { 1f, 1f, 1f, 1.0f };\n\t\t// Hintergrundbeleuchtung definieren\n\t\tglLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);\n\n\t\t// Eine weitere Lichtquellen definieren\n\t\t\n\t\tglEnable(GL_LIGHTING);\n\n\t\tspotLight.turnLightOn();\n\t\tpointLight.turnLightOn();\n\t}",
"protected void doMoreLight() {\r\n\t\talpha = Math.min(1f, alpha + 0.05f);;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"public void changingLights(int[][] lightsOnOff) {\n if(this.command.equals(\"turn on\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 1;\n }\n }\n }\n /* if the command is \"turn off\", the range of\n * lights are made to have value of 0 */\n if(this.command.equals(\"turn off\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 0;\n }\n }\n }\n /* if the command is \"toggle all\", the range of\n * lights are made to have value of 1 if they\n * were 0 before and 0 if they were 1 before */\n if(this.command.equals(\"toggle all\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 1 - lightsOnOff[i][j];\n }\n }\n }\n }",
"public void power() {\r\n\t\tpowerOn = !powerOn;\r\n\t}",
"public abstract void setBlinking(boolean status);",
"public void setSensorOn() {\n\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \tapp.toggleLightMode();\n \tisDark = !isDark;\n }",
"private void turnOnCamera() {\n // play sound\n playSound();\n isCameraOn = true;\n turnOffFlash();\n strobo.setChecked(false);\n previewCamera();\n toggleButtonImageCamera();\n }",
"public boolean isLightEnabled() {\n return mLightEnabled;\n }",
"private void updatePointLight() {\n\t\tfloat light1_position[] = { player.getPosition().x, 0.0f, player.getPosition().z, 1.0f }; // x,y,z,1\n\t\tfloat light1_diff_spec[] = { 1f, 1f, 1f, 1.0f };\n\t\t\n\t\t// Eine weitere Lichtquellen definieren\n\t\tpointLight.setPosition(light1_position);\n\t\tpointLight.setDiffAndSpek(light1_diff_spec);\n\t\t\n\t\tglEnable(GL_LIGHTING);\n\t}",
"public void initLight(GL10 gl)\n\t{\n\t\tgl.glEnable(GL10.GL_LIGHT0);// 打开0号光源\n\n\t\t// 环境光设置\n\t\tfloat[] ambientParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };// 光参数 RGBA\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_AMBIENT, ambientParams, 0);\n\n\t\t// 散射光设置\n\t\tfloat[] diffuseParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_DIFFUSE, diffuseParams, 0);\n\n\t\t// 镜面光设置\n\t\tfloat[] specularParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_SPECULAR, specularParams, 0);\n\n\t\t// 指定光源位置\n\t\tfloat[] directionParams =\n\t\t{ -1f, 1f, 1f, 0 };// 定向光\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, directionParams, 0);\n\t}",
"@Override\n public void turnOn() {\n System.out.println(\"this wont happen\");\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent light = new Intent(MainActivity.this,Light.class);\n\t\t\t\tstartActivity(light);\n\t\t\t}",
"public void setLEDLights(int lightID);",
"private void rumble(boolean on) {\n // Set the time point, so we know when to start or stop rumbling\n timePoint = Timer.getFPGATimestamp();\n\n // Set the state\n state = on ? RUMBLE : BREAK;\n\n // If rumble is on, full power. Otherwise, no power.\n double rumbleIntensity = (on ? intensity : 0.0);\n\n // Rumble the appropriate joysticks\n if (controllerToRumble == JoystickSelection.DRIVER_JOYSTICK || controllerToRumble == JoystickSelection.BOTH_JOYSTICKS) {\n driver.setRumble(RumbleType.kRightRumble, rumbleIntensity);\n driver.setRumble(RumbleType.kLeftRumble, rumbleIntensity);\n }\n\n if (controllerToRumble == JoystickSelection.OPERATOR_JOYSTICK || controllerToRumble == JoystickSelection.BOTH_JOYSTICKS) {\n operator.setRumble(RumbleType.kRightRumble, rumbleIntensity);\n operator.setRumble(RumbleType.kLeftRumble, rumbleIntensity);\n }\n }",
"public void turnOn() {\n Appearance appearance = appearances.get(currentAppearance);\r\n if (appearance.hasAlternativeAppearance()) {\r\n appearance.setSelectedName(appearance.getOnName());\r\n }\r\n }",
"private void reactMain_region_digitalwatch_Display_glowing_GlowOn() {\n\t\tif (sCIButtons.topRightReleased) {\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\ttimer.setTimer(this, 5, 2 * 1000, false);\n\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowDelay;\n\t\t}\n\t}",
"public void drawLight(Light light, int offX, int offY) {\n\tlightRequest.add(new LightRequest(light, offX, offY));\r\n }",
"public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }",
"private void refreshLights(){\n\n if (this.selectedTrain.getLights() == 1){ this.lightsOnRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == 0){ this.lightsOffRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == -1){ this.lightsFailureRadioButton.setSelected(true); }\n }",
"public void undo() {\n\t\tlight.on();\n\t}",
"public void updateConeLight() {\n if (coneLight.isActive()) {\n coneLight.setDirection((float)(getBody().getAngle()*180 / Math.PI));\n }\n }",
"protected void doLessLight() {\r\n\t\talpha = Math.max(0, alpha - 0.05f);\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"public void lightMove() {\n movePawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }",
"public static void forceLightUpdate() {\n PLC_Sender.getInstance().updatePLC_Lights(true);\n }",
"public void lightPause() {\n stopPawn.setStyle(\"-fx-background-color: RED;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n }",
"public void setLighting(GL3 gl) {\n\t\t // Set the lighting properties\n\t\t\n\t\t// get sunlight vector coords\n\t\tfloat xSun = terrain.getSunlight().getX();\n\t\tfloat ySun = terrain.getSunlight().getY();\n\t\tfloat zSun = terrain.getSunlight().getZ();\n\t\t\n/*\t\t// check fps\n\t\tPoint3D torchPos;\n\t\tif (camera.getPerson().isFps()) {\n\t\t\ttorchPos = new Point3D(camera.getGlobalPosition().getX(), camera.getGlobalPosition().getY(), camera.getGlobalPosition().getZ());\n*/\n\t\tPoint3D torchPos;\n\t\t// check fps\n\t\tif (person.isFps()) {\n\t\t\ttorchPos = new Point3D(person.getCamera().getGlobalPosition().getX(),\n\t\t\t\t\tperson.getCamera().getGlobalPosition().getY(),\n\t\t\t\t\tperson.getCamera().getGlobalPosition().getZ());\n\t\t} else { \n\t\t\ttorchPos = new Point3D(person.getGlobalPosition().getX(),\n\t\t\t\t\tperson.getGlobalPosition().getY() + 0.2f, \n\t\t\t\t\tperson.getGlobalPosition().getZ());\n\t\t}\n\t\t\n Shader.setPoint3D(gl, \"sunlight\", new Point3D(xSun,ySun,zSun)); // set sunlight vector to passed in vector \n Shader.setColor(gl, \"lightIntensity\", Color.WHITE);\n \n // Set the material properties\n Shader.setColor(gl, \"ambientCoeff\", Color.WHITE);\n Shader.setColor(gl, \"diffuseCoeff\", new Color(0.5f, 0.5f, 0.5f));\n Shader.setFloat(gl, \"phongExp\", 16f);\n \n // for torch light\n Shader.setFloat(gl, \"cutoff\", 90f); // in degrees\n Shader.setPoint3D(gl, \"posTorch\", torchPos);\n Shader.setFloat(gl, \"attenuationFactor\", 40f); \n Shader.setColor(gl, \"lightIntensityTorch\", Color.YELLOW); \n \n if (day) {\n \t// light properties for day\n Shader.setColor(gl, \"specularCoeff\", new Color(0.8f, 0.8f, 0.8f));\n \tShader.setColor(gl, \"ambientIntensity\", new Color(0.2f, 0.2f, 0.2f));\n Shader.setPoint3D(gl, \"dirTorch\", new Point3D(0,0,0)); // set torchDir vector \n } else { \n \t// light properties for night \n Shader.setColor(gl, \"specularCoeff\", new Color(0.5f, 0.5f, 0.5f));\n \tShader.setColor(gl, \"ambientIntensity\", new Color(0.01f, 0.01f, 0.01f));\n Shader.setPoint3D(gl, \"dirTorch\", new Point3D(0,0,1)); // set torchDir vector \n }\n\t}",
"public void switchColor() {\r\n\t\tcolor = !color;\r\n\t}",
"public void lookThrough()\r\n {\r\n //rotate the pitch around the X axis\r\n glRotatef(pitch, 1.0f, 0.0f, 0.0f);\r\n //rotate the yaw around the Y axis\r\n glRotatef(yaw, 0.0f, 1.0f, 0.0f);\r\n //translate to the position vector's location\r\n glTranslatef(position.x, position.y, position.z);\r\n \r\n FloatBuffer lightPosition = BufferUtils.createFloatBuffer(4);\r\n lightPosition.put(lPosition.x).put(\r\n lPosition.y).put(lPosition.z).put(1.0f).flip();\r\n glLight(GL_LIGHT0, GL_POSITION, lightPosition);\r\n }"
] | [
"0.86642015",
"0.8274964",
"0.80111545",
"0.8011073",
"0.7962846",
"0.77929753",
"0.77447134",
"0.7694096",
"0.7670061",
"0.7656643",
"0.7629563",
"0.7613128",
"0.76055294",
"0.75675154",
"0.75656706",
"0.7559075",
"0.7510131",
"0.743296",
"0.73640555",
"0.73018825",
"0.72616017",
"0.7257044",
"0.7213435",
"0.719147",
"0.717097",
"0.7160213",
"0.71311384",
"0.7126329",
"0.7059903",
"0.70420134",
"0.70275295",
"0.7012669",
"0.6970855",
"0.6959115",
"0.69385064",
"0.687414",
"0.6867726",
"0.6854108",
"0.683525",
"0.68151885",
"0.6808275",
"0.67955714",
"0.6795447",
"0.6787052",
"0.675165",
"0.6695631",
"0.6671649",
"0.6661847",
"0.6648601",
"0.6626395",
"0.6585661",
"0.6579511",
"0.6552238",
"0.6548532",
"0.6527266",
"0.6522148",
"0.64932793",
"0.6473715",
"0.64597005",
"0.64576805",
"0.64397883",
"0.64311564",
"0.64262646",
"0.642352",
"0.6422248",
"0.64180523",
"0.6416792",
"0.6415504",
"0.6406064",
"0.6404548",
"0.6396883",
"0.6389542",
"0.6370313",
"0.63647646",
"0.6360652",
"0.6347035",
"0.6343424",
"0.6343345",
"0.63272613",
"0.6308758",
"0.6301392",
"0.6296375",
"0.62909716",
"0.6277258",
"0.62762237",
"0.6267051",
"0.6261954",
"0.62595266",
"0.62550557",
"0.62508637",
"0.6250239",
"0.6223935",
"0.6215077",
"0.6215003",
"0.6213864",
"0.61944425",
"0.61599267",
"0.615847",
"0.6142911",
"0.614134"
] | 0.6637306 | 49 |
truns the light off | public void turnOff() {
// set the flag
onFlag = false;
// set the image
setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), offImageIcon));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void off() {\n\t\tSystem.out.println(\"turn off the \"+name+\" Light\");\n\t}",
"public void lightsOff() {\n PHBridge bridge = PHHueSDK.getInstance().getSelectedBridge();\n PHLightState lightState = new PHLightState();\n lightState.setOn(false);\n bridge.setLightStateForDefaultGroup(lightState);\n }",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"private void turnOffLights(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_turnOffLights\n\n this.selectedTrain.setLights(0); // turn off lights\n this.operatingLogbook.add(\"Lights off.\");\n this.printOperatingLogs();\n }",
"public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }",
"public void turnOffAllLights() {\r\n\t\tfor (Light light : lights) {\r\n\t\t\tif(light.isOn()) {\r\n\t\t\t\tlight.toogle();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void turnOff() {\n update(0,0,0);\n this.status = false;\n }",
"private void off(){\n\n\t\t// if light is on and there is a flash object\n\t\tif (_flash != null && isFlashOn){\n\n\t\t\t_flash.off();\n\t\t\tisFlashOn = false;\n\t\t}\n\t}",
"private void toggle_light() {\n\t\ttry {\n\t\t\tif (!light_on) {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light_selected);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n\t\t\t\tgetCameraManager().getFramingRect();\n//\t\t\t\tCameraManager.get().turn_onFlash();\n\t\t\t\tgetCameraManager().setTorch(true);\n\n\t\t\t} else {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n//\t\t\t\tCameraManager.get().turn_offFlash();\n\t\t\t\tgetCameraManager().setTorch(false);\n\n\t\t\t}\n\t\t\tlight_on = !light_on;\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}",
"public void off() {\n // Sets the LED pin state to (low)\n ledPin.low();\n }",
"public void undo() {\n\t\tlight.on();\n\t}",
"public void turnOffAllTheLights() {\r\n for (Light li : lightsArray) {\r\n li.turnOffLight();\r\n }\r\n }",
"public void stopFlashingLights() {\n keepFlashing = false;\n }",
"private static void turnFlashlightOff() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_OFF);\n cam.setParameters(p);\n }",
"public void turnOff() {\n\t\tOn = false;\n\t\tVolume = 1;\n\t\tChannel = 1;\n\t}",
"private void reactMain_region_digitalwatch_Display_glowing_GlowOff() {\n\t\tif (sCIButtons.topRightPressed) {\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\tsCIDisplay.operationCallback.setIndiglo();\n\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowOn;\n\t\t}\n\t}",
"public void lighting(boolean onOrOff)\r\n {\r\n \tint i;\r\n \tfor (i=0;i<LightSet.size();i++) {\r\n \t\t((Light)LightSet.elementAt(i)).setState(onOrOff);\r\n \t}\r\n }",
"@Override\r\n\tpublic void undo() {\n\t\tlight.on();\r\n\t}",
"public void unhookLEDs() {\r\n\t\ttable.putBoolean(\"hooked\", false);\r\n\t\tleftOff();\r\n\t\trightOff();\r\n\t}",
"public void turn_off () {\n this.on = false;\n }",
"public void turnLightsOff() {\n if (isFlashing()) {\n return;\n }\n \n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).turnOff();\n }\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).turnOff();\n }\n for (int i = 0; i < leftBorder.size(); i++) {\n leftBorder.get(i).turnOff();\n }\n for (int i = 0; i < rightBorder.size(); i++) {\n rightBorder.get(i).turnOff();\n }\n topLeft.turnOff();\n topRight.turnOff();\n bottomLeft.turnOff();\n bottomRight.turnOff();\n }",
"public void turnOff() {\n\t\tisOn = false;\n\t}",
"public void turnStrobeOff(){\n Intent stop_strobe_intent = new Intent(FlareConstants.STOP_STROBE);\n stop_strobe_intent.putExtra(FlareConstants.STOP_STROBE, FlareConstants.STOP_STROBE);\n LocalBroadcastManager.getInstance(this).sendBroadcast(stop_strobe_intent);\n Log.d(TAG, \"Sent stop strobe intent broadcast\");\n }",
"public void turnOff(){\n vendingMachine = null;\n Logger.getGlobal().log(Level.INFO,\" Turning Off...\");\n }",
"@Override\n\tpublic void turnOff() {\n\n\t}",
"private void toggleLight(){\n\t\tmyGLView.queueEvent(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmRenderer.toggleLight();\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"public void switchOff();",
"private void updateLight() {\r\n\t}",
"public void setIntakeLights(){\n \tintakeLights.set(true);\n }",
"private void killLight() {\n stopService(new Intent(this, SunriseService.class));\n\n // Kill the moonlight service (in case it's running)\n stopService(new Intent(this, MoonlightService.class));\n\n // Actually turn off the light (by zone)\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n // Turn off the light for the selected zone\n SingletonServices.getMQTT(Main.this).fadeOut();\n }\n catch (Exception exc) {\n // Log errors to logcat\n Log.e(Logging.TAG, \"Kill error\", exc);\n }\n }\n }).start();\n }",
"public void allOff() {\r\n\t\tsetAllColor(0, 0, 0);\r\n\t}",
"@Override\n public void discardRemainingLights() {\n while (nextLightIndex < MAX_POINT_LIGHTS) {\n setPointLight(new Vector3f(), Color4f.INVISIBLE, 0);\n }\n }",
"void setShutterLEDState(boolean on);",
"public void noteOff()\n\t{\n\t\ttimeFromOff = 0f;\n\t\tisTurnedOff = true;\n\t}",
"private void resetLights() {\n\n List<Integer> colors = DataHolder.getInstance().getColors();\n int iter = 0;\n for (int color: colors) {\n if (color == 2) {\n colors.set(iter, 0);\n }\n iter++;\n }\n DataHolder.getInstance().setColors(colors);\n }",
"public final void setLed(boolean on_off){\n LIBRARY.CLEyeCameraLED(camera_, on_off ? 1 :0);\n }",
"public void setBoulderLockOff(){\r\n\t\tservoTarget = Constants.BALL_HOLDER_RETRACTED;\r\n\t}",
"private void setLightStatus() {\n if (mCmd.equals(MSG_ON)) {\n setLighIsOn(true);\n } else {\n setLighIsOn(false);\n }\n }",
"public void rightOff() {\r\n\t\tsetRightColor(0, 0, 0);\r\n\t}",
"public LightOffCommand(final Light light) {\n this.light = light;\n }",
"public void turnOn( ) {\n\t\t\t\tSystem.out.println(\"Light is on \");\n\t\t}",
"@Override\n\tpublic void undo() {\n\t\tlight.off();\n\t}",
"@Override\r\n\tpublic void execute() {\n\t\tlight.off();\r\n\t}",
"public void turnOff(int x, int y);",
"public void flashlightSwitch()\n {\n usingFlashlight = !usingFlashlight;\n }",
"@Override\n\tprotected void takeOff(){\n\t\tgvh.log.i(TAG, \"Drone taking off\");\n\t\tsetControlInput(0, 0, 0, 1);\n\t}",
"public void off() {\n this.relay.set(Relay.Value.kOff);\n }",
"public void toggleLightSpheres() {\r\n\t\tmodel.control(AbstractModel.TOGGLE_LIGHT_SPHERES, null);\r\n\t}",
"public void powerOff() \n\t{\n\t\tif(active)\n\t\t{\n\t\t\tif (FactoryModPlugin.LEVER_OUTPUT_ENABLED) {\n\t\t\t\tsetActivationLever(false);\n\t\t\t}\n\t\t\t\n\t\t\t//lots of code to make the furnace turn off, without loosing contents.\n\t\t\tFurnace furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\t\tbyte data = furnace.getData().getData();\n\t\t\tItemStack[] oldContents = furnace.getInventory().getContents();\n\t\t\tfurnace.getInventory().clear();\n\t\t\tfactoryPowerSourceLocation.getBlock().setType(Material.FURNACE);\n\t\t\tfurnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\t\tfurnace.setRawData(data);\n\t\t\tfurnace.update();\n\t\t\tfurnace.getInventory().setContents(oldContents);\n\t\t\t\n\t\t\t//put active to false\n\t\t\tactive = false;\n\t\t\t//reset the production timer\n\t\t\tcurrentProductionTimer = 0;\n\t\t}\n\t}",
"public void disablecameraLights(){\n \tcamLights.set(true);\n }",
"protected void doLessLight() {\r\n\t\talpha = Math.max(0, alpha - 0.05f);\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"public void setSensorOff() {\n\n }",
"public void flash(){\n phoneCam.setFlashlightEnabled(!flash);\n flash = !flash;\n }",
"@Override\r\n public void turnOff() {\r\n isOn = false;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_OFF);\r\n if (this.engaged()) {\r\n disengageLoads();\r\n }\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlightOn = !lightOn;\n\t\t\t\tactiveLightSource(lightOn);\n\t\t\t\tlightButton.setLabel(lightOn ? \"Light off\" : \"Light On\");\n\t\t\t}",
"private void blink(final boolean lit){\n \n if(mRobot != null){\n \n //If not lit, send command to show blue light, or else, send command to show no light\n if(lit){\n RGBLEDOutputCommand.sendCommand(mRobot, 0, 0, 0);\n }else{\n RGBLEDOutputCommand.sendCommand(mRobot, 0, 0, 255);\n }\n \n //Send delayed message on a handler to run blink again\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n blink(!lit);\n }\n }, 1000);\n }\n }",
"private void reDrawLEDs(){\r\n if (this.isLEDEnable == false) {\r\n for (int i = 1; i < 8; i++) {\r\n LEDs[i].setOff();\t\t\t// turn off all display LEDs\r\n }\r\n }\r\n else {\r\n for (int i = 1; i < 8; i++) {\r\n LEDs[i].setOn(); \r\n LEDs[i].setColor(LEDColor.BLUE);\r\n //Utils.sleep(200);\r\n //leds[i].setOff();\r\n //Utils.sleep(200);\r\n }\r\n }\r\n }",
"private void blink(final boolean lit) {\n\t\tif (mRobot == null) {\n\t\t\tblinking = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// If not lit, send command to show blue light, or else, send command to\n\t\t// show no light\n\t\tif (lit) {\n\t\t\tmRobot.setColor(0, 0, 0);\n\n\t\t} else {\n\t\t\tmRobot.setColor(0, 255, 0);\n\t\t}\n\n\t\tif (blinking) {\n\t\t\t// Send delayed message on a handler to run blink again\n\t\t\tfinal Handler handler = new Handler();\n\t\t\thandler.postDelayed(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tblink(!lit);\n\t\t\t\t}\n\t\t\t}, 2000);\n\t\t}\n\t}",
"private void halt() {\n robot.leftFront.setPower(0);\n robot.leftBack.setPower(0);\n robot.rightFront.setPower(0);\n robot.rightBack.setPower(0);\n }",
"public void toggleGrab(){\n \tif (isClosed == true){\n \t\ttriggerTimer.reset();\n \t\tisClosed = false;\n \t\tClawAct.set(false);\n \t\tRobot.oi.armRumble(RUMBLE_DURATION);\n\n \t} else {\n \t\tisClosed = true;\n \t\tClawAct.set(true);\n \t\tRobot.oi.armRumble(RUMBLE_DURATION);\n\n \t}\n }",
"public void leftOff() {\r\n\t\tsetLeftColor(0, 0, 0);\r\n\t}",
"public void lightPause() {\n stopPawn.setStyle(\"-fx-background-color: RED;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n }",
"public void freeLights(){\n\t\t//android.util.Log.d(TAG,\"freeLights()\");\n\t\tfinal int size = this.lights.size();\n\t\tfor(int index=0; index < size; index++){\n\t\t\tthis.lights.delete(this.lights.keyAt(index));\n\t\t}\n\t}",
"private void turnOffHeat(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_turnOffHeat\n\n this.selectedTrain.setHeat(0); // turn off heat\n this.operatingLogbook.add(\"Turned off heat\");\n this.printOperatingLogs();\n }",
"public void powerOff() { //power_off\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.OFF));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.OFF) {\n isTurningOff = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n }\n }",
"public void offMovimentSensor(){\r\n long timestamp= System.currentTimeMillis();\r\n for (Moviment sm:listSensorMoviment()){\r\n if(sm.isDetection()==true){\r\n long limit=sm.getTime()+sm.getInterval();\r\n if(timestamp>limit){\r\n sm.setDetection(false);\r\n sm.setTime(0);\r\n for (Light l:lights)\r\n l.setStatus(false);\r\n }\r\n }\r\n }\r\n }",
"public void setLight1(){\n }",
"public void off() {\n\n\t}",
"void turnOff() {\n System.out.println(\"Turning off the TV\");\n }",
"public void removeAllLights() {\n if (_lights != null){\n _lights.clear();\n }\n }",
"private void turnOffFlash() {\n getCamera();\n Log.d(\"Flash on?\", \"============+>\" + String.valueOf(isFlashOn));\n if (isFlashOn) {\n if (camera == null || params == null) {\n isFlashOn = false;\n return;\n }\n // play sound\n playSound();\n params = camera.getParameters();\n params.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);\n camera.setParameters(params);\n if (!isCameraOn) {\n mPreview = null;\n camera.stopPreview();\n }\n if (t != null) {\n sr.stopRunning = true;\n t = null;\n }\n isFlashOn = false;\n // changing button/switch image\n toggleButtonImageSwitch();\n }\n }",
"public void action() {\r\n\t\tsuppressed = false;\r\n\t\tMotor.B.stop();\r\n\t\tMotor.C.stop();\r\n\t\tDelay.msDelay(1000);\r\n\t\tMotor.B.setSpeed(180);\r\n\t\tMotor.C.setSpeed(180);\r\n\t\tMotor.B.forward();\r\n\t\tMotor.C.forward();\r\n\t\tif((light.getLightValue()>46 && light.getLightValue()<49) || (light.getLightValue()>27 && light.getLightValue()<31)){\r\n\t\t\tMotor.B.stop();\r\n\t\t\tMotor.C.stop();\r\n\t\t\tDelay.msDelay(500);\r\n\t\t\tMotor.B.forward();\r\n\t\t\tMotor.C.forward();\r\n\t\t\tif(light.getLightValue()>44 && light.getLightValue()<45){//home base\r\n\t\t\t\tMotor.B.stop();\r\n\t\t\t\tMotor.C.stop();\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(!suppressed){\r\n\t\t\tThread.yield();\r\n\t\t}\r\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n \tapp.toggleLightMode();\n \tisDark = !isDark;\n }",
"public void liftOff() {\n\t\tL.trace(\"liftOff\");\n\t\tif (canFly()) {\n\t\t\tjump();\n\t\t}\n\t}",
"protected void doDark() {\r\n\t\talpha = 0.5f;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"public Light(boolean isOn) {\n\t\tthis.isOn = isOn;\n\t}",
"void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }",
"private void reactMain_region_digitalwatch_Display_glowing_GlowOn() {\n\t\tif (sCIButtons.topRightReleased) {\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\ttimer.setTimer(this, 5, 2 * 1000, false);\n\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowDelay;\n\t\t}\n\t}",
"public void freeLight(final int id){\n\t\t//android.util.Log.d(TAG,\"freeLight(\"+id+\")\");\n\t\tthis.lights.delete(id);\n\t}",
"public void switchOff() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"f\");\n setCurrentState(false);\n }",
"@Override\n public void turnOff() {\n System.out.println(\"this wont happen\");\n }",
"void unsetStraight();",
"protected void toggleLaser() {\n laserOn = !laserOn;\n }",
"void turnOff() throws ActorServiceCallException;",
"public void changeState(){\n\t\t//red - Green\n\t\tif (lights[0].isOn()){\n\t\t\tlights[0].turnOff();\n\t\t\tlights[2].turnOn();\n\t\t}\n\t\t\n\t\t//Green -yellow\n\t\telse if(lights[2].isOn()){\n\t\t\tlights[2].turnOff();\n\t\t\tlights[1].turnOn();\n\t\t}\n\t\t//yellow to red\n\t\telse if (lights[1].isOn()){\n\t\t\tlights[1].turnOff();\n\t\t\tlights[0].turnOn();\n\t\t}\n\t\t\n\t}",
"public void stopTracking()\n {\n pixyThread.interrupt();\n leds.setMode(LEDController.Mode.OFF);\n }",
"public void arm_down() {\n arm_analog(-RobotMap.Arm.arm_speed);\n }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"public void setLights(boolean lights) {\n \tthis.lightsAreOn = lights;\n }",
"Light getEWlight();",
"public void stop()\n {\n robot.FL_drive.setPower(0);\n robot.FR_drive.setPower(0);\n robot.BL_drive.setPower(0);\n robot.BR_drive.setPower(0);\n }",
"public void turnOn() {\n this.status = true;\n update(this.redValue, this.greenValue, this.blueValue);\n }",
"public void power() {\r\n\t\tpowerOn = !powerOn;\r\n\t}",
"public void endYellow() {\n if (System.currentTimeMillis() - lastAttack > 200) {\n isYellow = false;\n ((Geometry)model.getChild(\"Sphere\")).getMaterial().setColor(\"Color\", ColorRGBA.Red);\n }\n }",
"public void arm_kill() {\n arm_analog(0);\n }",
"public void setEngineOff();",
"public void off() {\n\t\tSystem.out.println(\"Tuner is off\");\n\t}",
"@FXML\n\tprivate void desligarLuz(){\n\t boxEntity.setEffect(new Lighting()); \n\t\t\n\t\t\n\t\t\n\t}",
"public void setOff(){\n state = false;\n //System.out.println(\"El requerimiento esta siendo atendido!\");\n }",
"public void LightUpScreen(){\n PowerManager pm = (PowerManager)this.getSystemService(this.POWER_SERVICE);\n\n //Is the screen already on?\n boolean isScreenOn = pm.isScreenOn();\n\n //If the screen is NOT on, light it up for 5 seconds, and then turn it off again.\n if(isScreenOn == false){\n PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK |PowerManager.ACQUIRE_CAUSES_WAKEUP |PowerManager.ON_AFTER_RELEASE,\"MyLock\");\n wl.acquire(5000);\n }\n }"
] | [
"0.78768814",
"0.77079475",
"0.76592565",
"0.7435238",
"0.7414166",
"0.73731303",
"0.73213655",
"0.727186",
"0.72547215",
"0.72520596",
"0.7224435",
"0.7216423",
"0.7215032",
"0.7192048",
"0.7188262",
"0.71565884",
"0.71564376",
"0.71223676",
"0.7116798",
"0.710545",
"0.707377",
"0.6972276",
"0.6945475",
"0.69155324",
"0.69027466",
"0.68980247",
"0.6890643",
"0.6887036",
"0.6880814",
"0.6876401",
"0.6868616",
"0.6821211",
"0.68061423",
"0.67670757",
"0.6763638",
"0.6754349",
"0.6684568",
"0.6661016",
"0.66558117",
"0.6649155",
"0.6639961",
"0.6629111",
"0.66217345",
"0.6572127",
"0.65439487",
"0.6530105",
"0.65279794",
"0.6524138",
"0.65050805",
"0.6483187",
"0.64799106",
"0.64770156",
"0.6456002",
"0.64542586",
"0.64474165",
"0.6441307",
"0.64331704",
"0.64314646",
"0.6405339",
"0.64048845",
"0.6376269",
"0.6374752",
"0.63645303",
"0.6338765",
"0.63331336",
"0.63264626",
"0.6299492",
"0.62914747",
"0.6283664",
"0.6275624",
"0.62738067",
"0.6266264",
"0.6255434",
"0.6250516",
"0.6233909",
"0.62259406",
"0.6223439",
"0.6216393",
"0.62146723",
"0.6212792",
"0.6204152",
"0.6201942",
"0.6193333",
"0.6179077",
"0.61694175",
"0.6169392",
"0.61441",
"0.6141168",
"0.6136603",
"0.6132789",
"0.61319834",
"0.61315376",
"0.61281353",
"0.61263096",
"0.61169213",
"0.6094449",
"0.6092128",
"0.60913146",
"0.6089612",
"0.6086259"
] | 0.6673135 | 37 |
turns the light on if it's off, and viceversa | public void toggle() {
if (isOn()) {
turnOff();
} else {
turnOn();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"private void toggle_light() {\n\t\ttry {\n\t\t\tif (!light_on) {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light_selected);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n\t\t\t\tgetCameraManager().getFramingRect();\n//\t\t\t\tCameraManager.get().turn_onFlash();\n\t\t\t\tgetCameraManager().setTorch(true);\n\n\t\t\t} else {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n//\t\t\t\tCameraManager.get().turn_offFlash();\n\t\t\t\tgetCameraManager().setTorch(false);\n\n\t\t\t}\n\t\t\tlight_on = !light_on;\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}",
"public void lighting(boolean onOrOff)\r\n {\r\n \tint i;\r\n \tfor (i=0;i<LightSet.size();i++) {\r\n \t\t((Light)LightSet.elementAt(i)).setState(onOrOff);\r\n \t}\r\n }",
"public void turnOn( ) {\n\t\t\t\tSystem.out.println(\"Light is on \");\n\t\t}",
"private void setLightStatus() {\n if (mCmd.equals(MSG_ON)) {\n setLighIsOn(true);\n } else {\n setLighIsOn(false);\n }\n }",
"public void setIntakeLights(){\n \tintakeLights.set(true);\n }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"public void turn_on () {\n this.on = true;\n }",
"public Light(boolean isOn) {\n\t\tthis.isOn = isOn;\n\t}",
"public void flashlightSwitch()\n {\n usingFlashlight = !usingFlashlight;\n }",
"public void turnOn() {\n this.status = true;\n update(this.redValue, this.greenValue, this.blueValue);\n }",
"public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}",
"private void toggleLight(){\n\t\tmyGLView.queueEvent(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmRenderer.toggleLight();\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"void setShutterLEDState(boolean on);",
"public void turnOn() {\n\t\tOn = true;\n\t}",
"public void setLights(boolean lights) {\n \tthis.lightsAreOn = lights;\n }",
"public final void setLed(boolean on_off){\n LIBRARY.CLEyeCameraLED(camera_, on_off ? 1 :0);\n }",
"public void turnOn() {\n\t\tisOn = true;\n\t}",
"public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }",
"private void on(){\n\n\t\t// if light is off and there is a flash object\n\t\tif(_flash != null && !isFlashOn){\n\n\t\t\t_flash.on();\n\t\t\tisFlashOn = true;\n\t\t}\n\t}",
"protected void toggleLaser() {\n laserOn = !laserOn;\n }",
"public void turnOn(boolean truth) {\r\n setEnabled(truth);\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlightOn = !lightOn;\n\t\t\t\tactiveLightSource(lightOn);\n\t\t\t\tlightButton.setLabel(lightOn ? \"Light off\" : \"Light On\");\n\t\t\t}",
"@Override\n\tpublic void on() {\n\t\tSystem.out.println(\"turn on the \"+name+\" Light\");\n\t}",
"public void turn_off () {\n this.on = false;\n }",
"public void turnLightsOn() {\n if (isFlashing()) {\n return;\n }\n \n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).turnOn();\n }\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).turnOn();\n }\n for (int i = 0; i < leftBorder.size(); i++) {\n leftBorder.get(i).turnOn();\n }\n for (int i = 0; i < rightBorder.size(); i++) {\n rightBorder.get(i).turnOn();\n }\n topLeft.turnOn();\n topRight.turnOn();\n bottomLeft.turnOn();\n bottomRight.turnOn();\n }",
"private void updateLight() {\r\n\t}",
"private void turnOnLights(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_turnOnLights\n\n this.selectedTrain.setLights(1); // turn on lights\n this.operatingLogbook.add(\"Lights on.\");\n this.printOperatingLogs();\n }",
"public void changeState(){\n\t\t//red - Green\n\t\tif (lights[0].isOn()){\n\t\t\tlights[0].turnOff();\n\t\t\tlights[2].turnOn();\n\t\t}\n\t\t\n\t\t//Green -yellow\n\t\telse if(lights[2].isOn()){\n\t\t\tlights[2].turnOff();\n\t\t\tlights[1].turnOn();\n\t\t}\n\t\t//yellow to red\n\t\telse if (lights[1].isOn()){\n\t\t\tlights[1].turnOff();\n\t\t\tlights[0].turnOn();\n\t\t}\n\t\t\n\t}",
"@Override\r\n public void turnOn(){\r\n isOn = true;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_ON);\r\n if (isOn){\r\n engageLoads();\r\n }\r\n }",
"public void setStaticLight(boolean staticLight);",
"public void setIsLight(boolean blight){\n\t\tm_bLight = blight;\n\t\tinitPaint();\n\t}",
"private static void turnFlashlightOn() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_TORCH);\n cam.setParameters(p);\n }",
"@Override\n\tpublic void off() {\n\t\tSystem.out.println(\"turn off the \"+name+\" Light\");\n\t}",
"public void setLight1(){\n }",
"public void switchOn();",
"public void toggleLightSpheres() {\r\n\t\tmodel.control(AbstractModel.TOGGLE_LIGHT_SPHERES, null);\r\n\t}",
"@Override\n\tpublic void turnOn() {\n\n\t}",
"public void turnOff() {\n\t\tOn = false;\n\t\tVolume = 1;\n\t\tChannel = 1;\n\t}",
"private void enableMoonlightMode() {\n stopService(new Intent(this, SunriseService.class));\n\n // Kill the previous moonlight service (in case it's running)\n stopService(new Intent(this, MoonlightService.class));\n\n // (Re)start the moonlight service\n startService(new Intent(this, MoonlightService.class));\n }",
"public boolean switchOn(){\n if(this.is_Switched_On){\n return false;\n }\n this.is_Switched_On = true;\n return true;\n }",
"public void flash(){\n phoneCam.setFlashlightEnabled(!flash);\n flash = !flash;\n }",
"public void lightsOff() {\n PHBridge bridge = PHHueSDK.getInstance().getSelectedBridge();\n PHLightState lightState = new PHLightState();\n lightState.setOn(false);\n bridge.setLightStateForDefaultGroup(lightState);\n }",
"public void changingLights(int[][] lightsOnOff) {\n if(this.command.equals(\"turn on\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 1;\n }\n }\n }\n /* if the command is \"turn off\", the range of\n * lights are made to have value of 0 */\n if(this.command.equals(\"turn off\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 0;\n }\n }\n }\n /* if the command is \"toggle all\", the range of\n * lights are made to have value of 1 if they\n * were 0 before and 0 if they were 1 before */\n if(this.command.equals(\"toggle all\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 1 - lightsOnOff[i][j];\n }\n }\n }\n }",
"private void blink(final boolean lit){\n \n if(mRobot != null){\n \n //If not lit, send command to show blue light, or else, send command to show no light\n if(lit){\n RGBLEDOutputCommand.sendCommand(mRobot, 0, 0, 0);\n }else{\n RGBLEDOutputCommand.sendCommand(mRobot, 0, 0, 255);\n }\n \n //Send delayed message on a handler to run blink again\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n blink(!lit);\n }\n }, 1000);\n }\n }",
"public void power() {\r\n\t\tpowerOn = !powerOn;\r\n\t}",
"public void turnOff() {\n update(0,0,0);\n this.status = false;\n }",
"private void refreshLights(){\n\n if (this.selectedTrain.getLights() == 1){ this.lightsOnRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == 0){ this.lightsOffRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == -1){ this.lightsFailureRadioButton.setSelected(true); }\n }",
"public void toggle(){\n isOn = !isOn;\n }",
"public void switchOn() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"o\");\n setCurrentState(true);\n }",
"@Override\r\n\tpublic boolean powerOnOff() {\n\t\tif (power == true)\r\n\t\t{\r\n\t\t\tpower = false;\r\n\t\t}\r\n\t\telse if(power == false)\r\n\t\t{\r\n\t\t\tpower = true;\r\n\t\t}\r\n\t\treturn power;\r\n\t}",
"private void blink(final boolean lit) {\n\t\tif (mRobot == null) {\n\t\t\tblinking = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// If not lit, send command to show blue light, or else, send command to\n\t\t// show no light\n\t\tif (lit) {\n\t\t\tmRobot.setColor(0, 0, 0);\n\n\t\t} else {\n\t\t\tmRobot.setColor(0, 255, 0);\n\t\t}\n\n\t\tif (blinking) {\n\t\t\t// Send delayed message on a handler to run blink again\n\t\t\tfinal Handler handler = new Handler();\n\t\t\thandler.postDelayed(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tblink(!lit);\n\t\t\t\t}\n\t\t\t}, 2000);\n\t\t}\n\t}",
"public abstract void setBlinking(boolean status);",
"@Override\r\n\tpublic void undo() {\n\t\tlight.on();\r\n\t}",
"public void turnOff() {\n\t\tisOn = false;\n\t}",
"public static boolean lightAdjustment() {\n leftMotor.stop(true);\n rightMotor.stop(false);\n \n //if left sensor doesn't detect a line, \n if(leftLineDetect == false) {\n //turn left motor until it detects a line\n while(true) {\n if(Math.abs(rightRedVal - initialRedValue) > rgbThres) {\n leftMotor.stop(true);\n rightMotor.stop(false);\n break;\n }\n leftMotor.forward();\n }\n }\n \n //if right sensor doesn't detect a line\n else if(rightLineDetect == false) {\n //turn right motor until it detects a line\n while(true) {\n if(Math.abs(leftRedVal - initialRedValue) > rgbThres) {\n leftMotor.stop(true);\n rightMotor.stop(false);\n break;\n }\n rightMotor.forward();\n }\n }\n return true;\n }",
"private void turnOnFlash() {\n if (!batteryOk) {\n showBatteryLowDialog();\n return;\n }\n getCamera();\n Log.d(\"Flash on?\", \"============+>\" + String.valueOf(isFlashOn));\n if (!isFlashOn) {\n if (camera == null || params == null) {\n isFlashOn = false;\n return;\n }\n // play sound\n playSound();\n try {\n if (freq != 0) {\n sr = new StroboRunner();\n t = new Thread(sr);\n t.start();\n } else {\n params = camera.getParameters();\n params.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);\n }\n camera.setParameters(params);\n camera.startPreview();\n }\n } catch (Exception e) {\n // Do nothing;\n }\n\n isFlashOn = true;\n // changing button/switch image\n toggleButtonImageSwitch();\n }\n\n }",
"public void turnStrobeOn(){\n if (!WatchFlags.gestureSensingOn){\n Log.d(TAG, \"Gesture sensing mode is off, aborting start strobe command\");\n return;\n }\n if (WatchFlags.strobeIsOn == false) {\n startActivity(new Intent(this, wSignalingActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));\n }\n }",
"public void turnOffAllLights() {\r\n\t\tfor (Light light : lights) {\r\n\t\t\tif(light.isOn()) {\r\n\t\t\t\tlight.toogle();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void on() {\n // Sets the LED pin state to 1 (high)\n ledPin.high();\n }",
"public void setSwitchOn() throws UnavailableDeviceException, ClosedDeviceException, IOException{\n\t\tswitch1.setValue(false);\n\t\tthis.switchState = true; \n\t}",
"public boolean isLightEnabled() {\n return mLightEnabled;\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \tapp.toggleLightMode();\n \tisDark = !isDark;\n }",
"public void hookLEDs() {\r\n\t\ttable.putBoolean(\"hooked\", true);\r\n\t}",
"public void power()\r\n {\r\n powerOn = true;\r\n }",
"public void LightUpScreen(){\n PowerManager pm = (PowerManager)this.getSystemService(this.POWER_SERVICE);\n\n //Is the screen already on?\n boolean isScreenOn = pm.isScreenOn();\n\n //If the screen is NOT on, light it up for 5 seconds, and then turn it off again.\n if(isScreenOn == false){\n PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK |PowerManager.ACQUIRE_CAUSES_WAKEUP |PowerManager.ON_AFTER_RELEASE,\"MyLock\");\n wl.acquire(5000);\n }\n }",
"public void handleToggleButtonLowPass() {\n\t\tif (toggleButtonLowPass.isSelected() == true) {\n\t\t\tcontroller.audioManipulatorUseLowPassProcessor(true);\n\t\t\tsliderLowPass.setDisable(false);\n\t\t\ttextFieldLowPass.setDisable(false);\n\t\t\ttoggleButtonLowPass.setText(bundle.getString(\"mixerToggleButtonOn\"));\n\t\t} else {\n\t\t\tcontroller.audioManipulatorUseLowPassProcessor(false);\n\t\t\tsliderLowPass.setDisable(true);\n\t\t\ttextFieldLowPass.setDisable(true);\n\t\t\ttoggleButtonLowPass.setText(bundle.getString(\"mixerToggleButtonOff\"));\n\t\t}\n\n\t}",
"public void undo() {\n\t\tlight.on();\n\t}",
"public void stopFlashingLights() {\n keepFlashing = false;\n }",
"public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }",
"@Override\n public void execute() {\n light.on();\n }",
"private void lightOn(Map<Light, Matrix4f> lights) {\n numLight = 0;\n GL3 gl = glContext.getGL().getGL3();\n FloatBuffer fb4 = Buffers.newDirectFloatBuffer(4);\n LightLocation lightLoc = new LightLocation();\n for (Entry<Light, Matrix4f> entry : lights.entrySet()) {\n Light light = entry.getKey();\n Matrix4f lightTransForm = entry.getValue();\n Vector4f lightPosition = lightTransForm.transform(new Vector4f(light.getPosition()));\n Vector4f lightDirection = lightTransForm.transform(new Vector4f(light.getSpotDirection()));\n String lightName = \"light[\" + numLight + \"]\";\n lightLoc.position = shaderLocations.getLocation(lightName + \".position\");\n lightLoc.ambient = shaderLocations.getLocation(lightName + \".ambient\");\n lightLoc.diffuse = shaderLocations.getLocation(lightName + \".diffuse\");\n lightLoc.specular = shaderLocations.getLocation(lightName + \".specular\");\n lightLoc.direction = shaderLocations.getLocation(lightName + \".direction\");\n lightLoc.cutOff = shaderLocations.getLocation(lightName + \".cutOff\");\n\n gl.glUniform4fv(lightLoc.position, 1, lightPosition.get(fb4));\n gl.glUniform3fv(lightLoc.ambient, 1, light.getAmbient().get(fb4));\n gl.glUniform3fv(lightLoc.diffuse, 1, light.getDiffuse().get(fb4));\n gl.glUniform3fv(lightLoc.specular, 1, light.getSpecular().get(fb4));\n gl.glUniform4fv(lightLoc.direction, 1, lightDirection.get(fb4));\n gl.glUniform1f(lightLoc.cutOff, light.getSpotCutoff());\n numLight++;\n }\n gl.glUniform1i(shaderLocations.getLocation(\"numLights\"), numLight);\n }",
"public void setHasLight(boolean hasLight) {\n\t\tthis.hasLight = hasLight;\n\t}",
"public void setgearClawLights(){\n \tgearClawLights.set(true);\n }",
"@Override\n public void powerOn() {\n if(isOn)System.out.println(\"The Projector is already ON!\");\n else{\n System.out.println(\"The Projector is now ON!\");\n isOn = true;\n }\n }",
"public void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tif (lights_onoff_button.isSelected()) {\n\t\t\t\t\tSystem.out.println(\"down Lights ON\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"down Lights OFF\");\n\t\t\t\t}\n\t\t\t}",
"public void steady(){\n if(steady){\n if(!bellySwitch.get()) {\n leftMotor.set(-.3);\n rightMotor.set(-.3);\n }else {\n leftMotor.set(0);\n rightMotor.set(0);\n } \n }\n }",
"private void off(){\n\n\t\t// if light is on and there is a flash object\n\t\tif (_flash != null && isFlashOn){\n\n\t\t\t_flash.off();\n\t\t\tisFlashOn = false;\n\t\t}\n\t}",
"@Override\r\n public boolean isSwitchOn() {\r\n return isOn;\r\n }",
"public void enableLighting(boolean enable)\n\t{\n\t\tthis.glStateChanger.setLighting(enable);\n\t}",
"public void turnOn() {\n // set the flag\n onFlag = true;\n \n // set the image\n setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), onImageIcon));\n }",
"public void toggle() {\n if (volume == 1f) {\n volume = 0f;\n }\n else if (volume == 0f) {\n volume = 1f;\n }\n\n }",
"@Override\r\n public void turnOff() {\r\n isOn = false;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_OFF);\r\n if (this.engaged()) {\r\n disengageLoads();\r\n }\r\n }",
"public boolean switchOff(){\n if(!this.is_Switched_On){\n return false;\n }\n this.is_Switched_On = false;\n return true;\n }",
"public void setGlowing ( boolean flag ) {\n\t\texecute ( handle -> handle.setGlowing ( flag ) );\n\t}",
"private void turnOffLights(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_turnOffLights\n\n this.selectedTrain.setLights(0); // turn off lights\n this.operatingLogbook.add(\"Lights off.\");\n this.printOperatingLogs();\n }",
"private void rumble(boolean on) {\n // Set the time point, so we know when to start or stop rumbling\n timePoint = Timer.getFPGATimestamp();\n\n // Set the state\n state = on ? RUMBLE : BREAK;\n\n // If rumble is on, full power. Otherwise, no power.\n double rumbleIntensity = (on ? intensity : 0.0);\n\n // Rumble the appropriate joysticks\n if (controllerToRumble == JoystickSelection.DRIVER_JOYSTICK || controllerToRumble == JoystickSelection.BOTH_JOYSTICKS) {\n driver.setRumble(RumbleType.kRightRumble, rumbleIntensity);\n driver.setRumble(RumbleType.kLeftRumble, rumbleIntensity);\n }\n\n if (controllerToRumble == JoystickSelection.OPERATOR_JOYSTICK || controllerToRumble == JoystickSelection.BOTH_JOYSTICKS) {\n operator.setRumble(RumbleType.kRightRumble, rumbleIntensity);\n operator.setRumble(RumbleType.kLeftRumble, rumbleIntensity);\n }\n }",
"public LightOnCommand(Light light) {\n this.light = light;\n }",
"public static void forceLightUpdate() {\n PLC_Sender.getInstance().updatePLC_Lights(true);\n }",
"public void setOnline() {\n if (this.shutdownButton.isSelected() == false) {\n this.online = true;\n this.statusLed.setStatus(\"ok\");\n this.updateOscilloscopeData();\n }\n }",
"public void toggleGrab(){\n \tif (isClosed == true){\n \t\ttriggerTimer.reset();\n \t\tisClosed = false;\n \t\tClawAct.set(false);\n \t\tRobot.oi.armRumble(RUMBLE_DURATION);\n\n \t} else {\n \t\tisClosed = true;\n \t\tClawAct.set(true);\n \t\tRobot.oi.armRumble(RUMBLE_DURATION);\n\n \t}\n }",
"public void enableLight(final boolean enable) {\n mLightEnabled = enable;\n if (!mLightEnabled) {\n mPaint.setColorFilter(null);\n } else {\n mPaint.setAlpha(0xFF);\n }\n invalidate();\n }",
"public void setSensorOn() {\n\n }",
"private static void turnFlashlightOff() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_OFF);\n cam.setParameters(p);\n }",
"public void toggleEnable();",
"public void switchColor() {\r\n\t\tcolor = !color;\r\n\t}",
"private void turnOnOffColors () {\r\n\t\tif (store.getString(CDTFoldingConstants.COMBO_CHOICE).equals(\r\n\t\t\t\tCDTFoldingConstants.COMBO_CHOICE_HIGHLIGHT)) {\r\n\t\t\tfgLabel.setVisible(true);\r\n\t\t\tbgLabel.setVisible(true);\r\n\t\t\tbgColorSelector.setEnabled(true);\r\n\t\t\tfgColorSelector.setEnabled(true);\r\n\t\t} else {\r\n\t\t\tfgLabel.setVisible(false);\r\n\t\t\tbgLabel.setVisible(false);\r\n\t\t\tbgColorSelector.setEnabled(false);\r\n\t\t\tfgColorSelector.setEnabled(false);\r\n\t\t}\r\n\t}",
"public static void setLightScreenOnNotification(Context context, boolean lightsOn)\n\t{\n\t\tPreferenceUtils.setLightScreenOnNotification(context, lightsOn);\n\t}",
"public void toggleSignal() {\n if (green) {\n green = false;\n } else {\n green = true;\n }\n }",
"public void changeStatus()\n {\n if(this.isActivate == false)\n {\n this.isActivate = true;\n switchSound.play();\n //this.dungeon.updateSwitches(true); \n }\n else{\n this.isActivate = false;\n switchSound.play(1.75, 0, 1.5, 0, 1);\n //this.dungeon.updateSwitches(false); \n }\n notifyObservers();\n\n }"
] | [
"0.8792364",
"0.8098801",
"0.79675096",
"0.7901149",
"0.7798379",
"0.75747067",
"0.7551085",
"0.7539186",
"0.75265104",
"0.75240624",
"0.7512232",
"0.74966747",
"0.7426221",
"0.7425106",
"0.73939526",
"0.73798865",
"0.7361288",
"0.73475546",
"0.72835875",
"0.7214392",
"0.7147227",
"0.7141417",
"0.70883",
"0.7074781",
"0.70525175",
"0.7014491",
"0.70107067",
"0.7003138",
"0.69697994",
"0.6963435",
"0.68563503",
"0.68129015",
"0.6803074",
"0.67801625",
"0.67739594",
"0.6763929",
"0.676041",
"0.67600584",
"0.675081",
"0.67479026",
"0.66761667",
"0.66636634",
"0.66633415",
"0.66398823",
"0.6612379",
"0.65961844",
"0.65949965",
"0.65901464",
"0.657663",
"0.6564125",
"0.65567744",
"0.6552467",
"0.6545229",
"0.6539056",
"0.65255105",
"0.6519183",
"0.6490668",
"0.6475412",
"0.64734423",
"0.64708334",
"0.6451254",
"0.642332",
"0.63903373",
"0.6379462",
"0.6376336",
"0.6369698",
"0.6368156",
"0.63616824",
"0.63514256",
"0.6349388",
"0.6312767",
"0.6302265",
"0.62875515",
"0.6285684",
"0.62618786",
"0.6253701",
"0.62486535",
"0.62416714",
"0.62378716",
"0.6236118",
"0.6227456",
"0.6221858",
"0.62207794",
"0.6208602",
"0.62063885",
"0.62047356",
"0.6204251",
"0.6203738",
"0.62022424",
"0.6189376",
"0.61706966",
"0.6165475",
"0.6164058",
"0.61473495",
"0.6137791",
"0.61356",
"0.61267966",
"0.6121928",
"0.6120248",
"0.6113772"
] | 0.6756682 | 38 |
returns true if the ligh is on, and false if not | public boolean isOn() {
return onFlag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isOn() throws Exception;",
"public boolean isOn() {\n\t\treturn false;\n\t}",
"public boolean isOn(){\n return state;\n }",
"public boolean isOn() {\n return on;\n }",
"public boolean isOn()\n {\n // Check the pin state\n return ledPin.isHigh();\n }",
"public boolean limeAvailable();",
"protected boolean isOn() {\r\n\t\treturn this.isOn;\r\n\t}",
"public boolean isHighLighted(){\n return HIGHLIGHTED;\n }",
"@Override\n\tpublic boolean isOnLadder() {\n\t\t// this better doesn't happen...\n\t\treturn false;\n\t}",
"boolean hasHeadGear();",
"public boolean isHasLight() {\n\t\treturn hasLight;\n\t}",
"public boolean getCallLightState() {\n\t\treturn this.isCallLightOn;\n\t}",
"public boolean hasLanded ();",
"public boolean isLever() {\n return this.type == Type.LEVER;\n }",
"@Override\r\n public boolean isSwitchOn() {\r\n return isOn;\r\n }",
"public boolean isPowerOn() {\n Log.d(TAG, \"Is Fist Power On: \" + (SystemProperties.getBoolean(IS_POWER_ON_PROPERTY, false)));\n\n if (!SystemProperties.getBoolean(IS_POWER_ON_PROPERTY, false)) {\n SystemProperties.set(IS_POWER_ON_PROPERTY, \"true\");\n return true;\n } else {\n return false;\n }\n }",
"public LimeState limeEnabled();",
"public boolean isLegOut()\n{\n if (jumpState == 1)\n return true;\n return false;\n}",
"public boolean isEngineOn();",
"public boolean isFlagged();",
"public boolean isLightEnabled() {\n return mLightEnabled;\n }",
"public boolean isOnFight();",
"boolean isOpen();",
"boolean isOpen();",
"public static boolean isPowerOn() {\n try {\n return BlueCoveImpl.instance().getBluetoothStack().isLocalDevicePowerOn();\n } catch (BluetoothStateException e) {\n return false;\n }\n }",
"boolean hasLte();",
"public boolean isOnWay(){\n\t\treturn onWay;\n\t}",
"@Override\n public boolean isStealthOn() {\n // Try to find a Mek Stealth system.\n for (Mounted mEquip : getMisc()) {\n MiscType mtype = (MiscType) mEquip.getType();\n if (mtype.hasFlag(MiscType.F_STEALTH)) {\n if (mEquip.curMode().equals(\"On\")) {\n // Return true if the mode is \"On\"\n return true;\n }\n }\n }\n // No Mek Stealth or system inactive. Return false.\n return false;\n }",
"public boolean switchOn(){\n if(this.is_Switched_On){\n return false;\n }\n this.is_Switched_On = true;\n return true;\n }",
"public boolean hasLightWork() {\n/* 48 */ if (this.skyEngine != null && this.skyEngine.hasLightWork()) {\n/* 49 */ return true;\n/* */ }\n/* 51 */ return (this.blockEngine != null && this.blockEngine.hasLightWork());\n/* */ }",
"public boolean checkLionStatus() {//opening checkLionStatus method\n return isCatRunning;\n }",
"boolean hasCompatibilityState();",
"public boolean isThisThingOn(){\r\n return isActive;\r\n }",
"boolean hasGlossaryConfig();",
"private boolean isLava() {\n/* 317 */ return this.isLava;\n/* */ }",
"public boolean isStaticLight();",
"public boolean isApplianceOn() {\n\n return isOn;\n }",
"boolean hasEnabled();",
"boolean hasHat();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean hasState();",
"boolean hasState();",
"boolean hasState();",
"boolean hasState();",
"boolean hasState();",
"boolean hasState();",
"boolean hasState();",
"boolean hasState();",
"public boolean isLethal() {\n\t\treturn false;\n\t}",
"public boolean lokiAlive() {\n\t\tif (lokiHp <= 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean status() {\n return hatchkicker.get();\n }",
"public static boolean debugOn()\r\n {\r\n on = true;\r\n System.out.println(\"Debug Mode On\");\r\n return on;\r\n }",
"@Override\n public boolean isAiOn()\n {\n return aiIsOn;\n }",
"boolean getCheckState();",
"@Override\r\n public boolean isLy(){\r\n return this.isLoyal;\r\n }",
"@Override\n\tpublic boolean livre() {\n\t\treturn true;\n\t}",
"public boolean isHvacStateOn() {\r\n return hvacStateOn;\r\n }",
"protected final boolean hasStateFlag(int flg) {\n\t\treturn (m_flags & flg) != 0 ? true : false;\n\t}",
"@Override\n\tpublic boolean isOnLadder() {\n\t\treturn false;\n\t}",
"public boolean isSoft();",
"public void turn_on () {\n this.on = true;\n }",
"boolean isSetLegs();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"public boolean isHatstall() {\r\n return this.isHatstall;\r\n }",
"boolean hasLineage();",
"public boolean isGlowing() {\n return _glowing;\n }",
"public boolean getServerIsORBActivated() {\n/* 313 */ return this.serverIsORBActivated;\n/* */ }",
"public boolean isGlowing ( ) {\n\t\treturn extract ( handle -> handle.isGlowing ( ) );\n\t}",
"public boolean isLooting() {\r\n\t\t\treturn this.isLooting;\r\n\t\t}",
"public boolean isGlow() {\n return glow;\n }",
"public boolean isSwitchedOn(){\r\n return _switchedOn;\r\n }",
"public boolean isOpen();",
"public boolean isOpen();",
"public boolean winState() {\n\t\treturn this.numTargets == this.onTargets;\n\t}",
"private static boolean getState(Context context) {\n return Settings.System.getInt(context.getContentResolver(),\n Settings.System.AIRPLANE_MODE_ON, 0) == 1;\n }",
"private boolean poleSwitchEngaged(){\n return true; //poleSwitch.get();\n }",
"public boolean isPowered(){\n\t\tint value = sensor.readRawValue();\n\t\tDiscoveryVehicle.getMonitor().log(\"raw: \"+value);\n//\t\treturn Button.ENTER.isDown();\n\t\treturn (value < Configuration.HYDROGEN_MEASURE_TRIGGER_PRECISION);\n\t}",
"boolean getStatus();",
"boolean getStatus();",
"boolean getStatus();",
"boolean hasServerState();",
"boolean isMonitoring();",
"boolean isMonitoring();",
"public boolean getPowerState() {\n\t\tSharedPreferences settings = parentContext.getSharedPreferences(PREFERENCE_FILE,\n\t\t\t\tContext.MODE_PRIVATE);\n\t\treturn settings.getBoolean(TOGGLE_KEY, true);\n\t}",
"public boolean isLaugher() {\n return this.isLaughter;\n }",
"public boolean isOpen() {\n\t\treturn luaState != 0;\n\t}",
"public boolean estOuvert(){\n\n return netLinkIp.isOpen();\n\n }",
"public final boolean mo4161yL() {\n return this.bUG.get(C5773a.clicfg_matrix_battery_detect_wake_lock_enable.name(), true);\n }"
] | [
"0.7309443",
"0.728884",
"0.6965781",
"0.6918012",
"0.6887905",
"0.6835912",
"0.66867495",
"0.66785896",
"0.66563416",
"0.6616217",
"0.6584682",
"0.6490996",
"0.6490947",
"0.6472041",
"0.6470144",
"0.64534193",
"0.6447711",
"0.6431251",
"0.64092934",
"0.63749105",
"0.636237",
"0.63130844",
"0.6307559",
"0.6307559",
"0.6306702",
"0.62925965",
"0.6280298",
"0.6278191",
"0.62686515",
"0.6264909",
"0.62624377",
"0.62433195",
"0.62409633",
"0.6237386",
"0.62352806",
"0.62270063",
"0.6224263",
"0.6222668",
"0.62119544",
"0.61982435",
"0.61982435",
"0.61982435",
"0.61982435",
"0.61982435",
"0.61982435",
"0.61982435",
"0.61982435",
"0.61970717",
"0.61970717",
"0.61970717",
"0.61970717",
"0.61970717",
"0.61970717",
"0.61970717",
"0.61970717",
"0.6193661",
"0.6190785",
"0.6186924",
"0.61829036",
"0.6175215",
"0.61699253",
"0.61611265",
"0.61258394",
"0.61179626",
"0.6117642",
"0.61168885",
"0.61164224",
"0.61151063",
"0.6114937",
"0.61039144",
"0.61039144",
"0.61039144",
"0.61039144",
"0.61039144",
"0.61039144",
"0.6099585",
"0.6097768",
"0.6089797",
"0.6083808",
"0.6070484",
"0.60702103",
"0.606887",
"0.60627407",
"0.60545015",
"0.60545015",
"0.6053537",
"0.6052409",
"0.6048913",
"0.60483235",
"0.604709",
"0.604709",
"0.604709",
"0.6036046",
"0.60275257",
"0.60275257",
"0.6026261",
"0.6025521",
"0.60223275",
"0.6017993",
"0.60142857"
] | 0.6737976 | 6 |
Sets the exact position of this component. | public void setPosition(double x, double y) {
// set the location
setLocation((int)Math.round(x), (int)Math.round(y));
// set the position variables
position.x = x;
position.y = y;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPosition(Position pos);",
"void setPosition(Position position);",
"void setPosition(Position position);",
"public void setPosition(int position);",
"void setPosition(double xPos, double yPos);",
"@Override\n public void setPosition(float x, float y) {\n }",
"public abstract void setPosition(Position position);",
"protected void setPosition(Position p) {\n\t\tposition = p;\n\t}",
"public void setPosition(float x, float y);",
"public void setPosition(Point position);",
"public void setPosition(Position p);",
"public void setPosition(Position pos) {\n position = new Position(pos);\n }",
"public void setPosition(){\r\n currentPosition = 0; \r\n }",
"public void setPosition(Coordinate position) {\n cPosition = position;\n }",
"public void setPos(int pos);",
"public void setPos(int pos);",
"public void PositionSet(int position);",
"void setPosition(Position p);",
"@Override\n\tpublic void setPosition(Position p) {\n\t\tthis.position = p;\n\n\t}",
"public void setPosition(int position) {\r\r\r\r\r\r\n this.position = position;\r\r\r\r\r\r\n }",
"@Override\n public void setPosition(int position) {\n this.position = position;\n }",
"public void setPosition(Point newPosition);",
"public void setPosition(int position)\r\n {\r\n this.position = position;\r\n }",
"public void setPosition(Integer position);",
"public final void setPosition(int p) {\n this.position = p;\n }",
"public void setPosition(final Position param) {\n this.position = param;\n }",
"public void setPosition(int position) {\r\n this.position = position;\r\n }",
"public void setPosition(int position) {\r\n\t\tthis.position = position;\r\n\t}",
"public void setPosition(Position position) {\n this.position = position;\n }",
"public void setPosition(Position position) {\n this.position = position;\n }",
"public void setPosition(Position position) {\n this.position = position;\n }",
"public void setPosition(Point position) {\n this.position = position;\n }",
"public void setPosition(Point position) {\n this.position = new Point(position);\n update();\n }",
"void setPosition(int position) {\n mPosition = position;\n }",
"public void setPosition(float x, float y)\n {\n bounds.offsetTo(\n x - positionAnchor.x,\n y - positionAnchor.y);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }",
"@Override\n\tpublic void setPos(int x, int y) {\n\t\txPos = x;\n\t\tyPos = y;\n\t}",
"public void setPosition(Position pos) {\n \tthis.position = pos;\n \t//setGrade();\n }",
"private void setPosition(int startPosition) {\n switch (direction) {\n case UP:\n case DOWN:\n this.posX = componentToMove.getX();\n this.posY = componentToMove.getY() + (direction == Direction.UP ? startPosition : -startPosition);\n break;\n default:\n this.posX = componentToMove.getX() + (direction == Direction.LEFT ? startPosition : -startPosition);\n this.posY = componentToMove.getY();\n }\n }",
"public void setPosition(int posX, int posY) {\n\t}",
"public void setPosition(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n }",
"void setPosition(Point point);",
"@Override public void setPosition(double nx, double ny) {\n super.setPosition(nx, ny);\n ppx = px = nx;\n ppy = py = ny;\n }",
"public void setPosition(Point p) {\r\n\t\tthis.position = p;\r\n\t\tc.setPosition(p);\r\n\t}",
"@Override\n\tpublic void setPosition(int left)\n\t{\n\t\t_mainPanel.getElement().getStyle().setLeft(left, Style.Unit.PX) ;\n\t}",
"public void setPosition(Point pos) {\n this.topLeft = pos.asVector();\n }",
"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 setPosition(Vector2fc position){\n glfwSetWindowPos(handle, (int) position.x(), (int) position.y());\n this.position.set(position);\n }",
"public void setPosition(final Point p) {\n this.position = p;\n }",
"public void setPosition(ScreenPoint p) {\n setX(p.x);\n setY(p.y);\n }",
"void setPos(float x, float y);",
"@External\r\n\t@ClientFunc\r\n\tpublic MetaVar SetPos(MetaVarVector positionVar);",
"public void setPosition(BlockVector position)\n {\n this.position = position;\n }",
"public void setPosition(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public void setPosition(Point2D position)\n {\n mPosition = position;\n }",
"public void setPosition(Position position_)\n\t{\n\t\tposition=position_;\n\t}",
"public void setPosition(double x, double y)\n {\n mPosition = new Point2D.Double(x, y);\n }",
"protected void setPosition(long positionRequested) {\n\t\tsetPosition(positionRequested, true);\n\t}",
"public void setPosition(int x, int y) {\n this.x = x;\n this.y = y;\n }",
"public void setPosition(int position) {\r\n if (position > 24) position = 24;\r\n this.position = position;\r\n }",
"public void setPosicao() {\n Dimension d = this.getDesktopPane().getSize();\n this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);\n }",
"public void setPosition(int x, int y) {\r\n\t\tmyX = x;\r\n\t\tmyY = y;\r\n\t}",
"public void setPosition(double x, double y){\r\n this.x = (float)x;\r\n this.y = (float)y;\r\n changed();\r\n }",
"public void setPosition(Vector2 pos) {\n\t\tsetX(pos.x);\n\t\tsetY(pos.y);\n\t}",
"public void setPosition(Point point) {\n setPosition(point.x, point.y);\n }",
"public void setPosition(double x, double y) {\n\t\tsetX(x);\n\t\tsetY(y);\n\t}",
"PositionedObject(){\n float x = DrawingHelper.getGameViewWidth()/2;\n float y = DrawingHelper.getGameViewHeight()/2;\n _position.set(x,y);\n }",
"public void setPosition(Integer position) {\n this.position = position;\n }",
"public void setPosition(Point2 position) {\r\n this.position = position;\r\n }",
"public void setX(int x){ xPosition = x; }",
"public void setPosition(int x, int y) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}",
"public void setPosition(Coordinate coord) {\n this.coordinate = coord;\n }",
"public void setPosition(final MowerPosition position) {\n this.position = position;\n }",
"public void setPosition(int x, int y) {\n this.mXPosition = x;\n this.mYPosition = y;\n }",
"@Override\n public Position setPosition(double x, double y) {\n this.x = x;\n this.y = y;\n\n return new Position(x, y);\n }",
"public void setPosition(int x, int y)\n\t{\n\t\tint w = getSize().width;\n\t\tint h = getSize().height;\n\n\t\tpos.x = x;\n\n\t\tpos.y = y;\n\n\t\trect.setLocation(x - w / 2, y - h / 2);\n\t}",
"public void setPosition(float x, float y) {\n this.x = x;\n this.y = y;\n }",
"public void setPosition(int position)\n {\n put(\"Position\", position);\n }",
"public void SetPosition(Vector2 position)\n\t{\n\t\tTransform transform = parent.transform;\n\t\ttransform.position = position;\n\t\t// Dont loose your dP!\n\t\tpreviousPosition = Vector2.Add(position,velocity.negate());\n\t}",
"@Override\n public void setCoord(PuertoPosition pp, Point2D newCoord) {\n layout.setLocation(pp, newCoord);\n }",
"public void setPosition(Dot position) {\r\n\t\tthis.position = position;\r\n\t}",
"public void setCurrentPosition(int value) {\n this.currentPosition = value;\n }",
"@PropertySetter(role = POSITION)\n\t<E extends CtElement> E setPosition(SourcePosition position);",
"@Override\n public void setLoc(Point p) {\n this.rect.setLocation(p);\n }",
"public void setPosition(com.hps.july.persistence.Position arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().setPosition(arg0);\n }",
"@Override\n\tpublic void setPosition(Interface inter, Point position) {\n\t\tthis.position=new Point(position);\n\t}",
"public void setPosition(final Vector2f position);",
"@Override\n public void setPosition(long position) throws IOException {\n super.setPosition(position - startPosition);\n }",
"public final void setPosition(float x, float y) {\n\t\ttranslate(x - this.x(), y - this.y());\n\t}",
"void setX(int x) {\n position = position.setX(x);\n }",
"public void setPosition(int x, int y) {\n this.coordX = x;\n this.coordY = y;\n }",
"@Generated\n @Selector(\"setPosition:\")\n public native void setPosition(@ByValue CGPoint value);",
"public void setPosition(Vector2 position);",
"private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }",
"@Override\n\tpublic void setPosition(Vector3 pos) {\n\t\t\n\t}",
"private void setPosition(float x, float y) {\n this.x = x;\r\n this.y = y;\r\n group();\r\n }",
"@Override\n\t/**\n\t * sets the position of the class\n\t * \n\t * @param i\n\t */\n\tpublic void setPosition(int i) {\n\t\tposition = i;\n\t}",
"@Test\r\n\tpublic void testSetPosition(){\n\t\tWinnerTitle title = new WinnerTitle(1, 0, 0);\r\n\t\ttitle.setPosition(10, 40);\r\n\t\t\r\n\t\tassertEquals(10, title.getPositionX());\r\n\t\tassertEquals(40, title.getPositionY());\r\n\t}",
"public void setLocation(Point p) {\n // Not supported for MenuComponents\n }",
"public void setPosition(Point l) throws IllegalArgumentException {\n\t\tposition = l;\n\t\tupdateEdges();\n\t}",
"public void setPosition(double x, double y) {\n getMotion().setPosition(x, y);\n }",
"void setPosition(Vector3f position);"
] | [
"0.73748195",
"0.7231641",
"0.7231641",
"0.7212502",
"0.71671486",
"0.71660334",
"0.71380705",
"0.713478",
"0.712597",
"0.7086784",
"0.7084612",
"0.70820147",
"0.7080909",
"0.7060005",
"0.70122606",
"0.70122606",
"0.69872487",
"0.6956721",
"0.69344336",
"0.69273657",
"0.6925795",
"0.691801",
"0.69125026",
"0.6903251",
"0.68942064",
"0.6886205",
"0.6875834",
"0.6843409",
"0.6814744",
"0.6814744",
"0.6814744",
"0.67998",
"0.6798957",
"0.6788327",
"0.6782737",
"0.67806625",
"0.677508",
"0.67606354",
"0.67488295",
"0.6740359",
"0.6727105",
"0.67242956",
"0.671351",
"0.6713258",
"0.67057776",
"0.669979",
"0.66763335",
"0.6676172",
"0.6675919",
"0.66429883",
"0.66408515",
"0.66378313",
"0.66357535",
"0.6623937",
"0.66148573",
"0.66101444",
"0.6604291",
"0.66022635",
"0.65952957",
"0.6580167",
"0.6569241",
"0.6568552",
"0.65589267",
"0.65507275",
"0.6545077",
"0.6535981",
"0.65287584",
"0.6527391",
"0.6527262",
"0.6508726",
"0.6508581",
"0.65063673",
"0.65057766",
"0.6502004",
"0.65007293",
"0.64975065",
"0.64941823",
"0.64931107",
"0.64928573",
"0.64869833",
"0.6482152",
"0.6478903",
"0.6470651",
"0.6462366",
"0.64523",
"0.6445787",
"0.64384776",
"0.6433959",
"0.6431052",
"0.64067477",
"0.64010245",
"0.63977504",
"0.6390008",
"0.6385915",
"0.63859105",
"0.63610744",
"0.6356692",
"0.6356353",
"0.6348273",
"0.6345891",
"0.63441396"
] | 0.0 | -1 |
gets the position of this component. | public Position getPosition() {
return position;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@JsOverlay\n\tpublic final String getPosition() {\n\t\treturn this.position;\n\t}",
"public Coordinate getPosition() {\n return cPosition;\n }",
"public final ControlPosition getPosition() {\n return impl.getPosition();\n }",
"public Point getPosition() {\n return this.position;\n }",
"public final int getPosition() {\n return position;\n }",
"public Pos getPos()\r\n\t{\r\n\t\treturn position;\r\n\t}",
"public Position getPosition() {\n return this.position;\n }",
"public Point getPosition() {\n return position;\n }",
"public int getPosition() {\r\n\t\treturn position;\r\n\t}",
"public Vector2D getPosition() {\n\t\treturn position;\n\t}",
"public Point getPosition(){\n\t\treturn position;\n\t}",
"public Position getPosition() {\n\t\treturn position;\n\t}",
"public Point getPosition()\n\t{\n\t\treturn pos;\n\t}",
"@Override\n\tpublic Position getPosition() {\n\t\treturn this.posn;\n\t}",
"public int getPosition() {\r\n return position;\r\n }",
"public int getPosition() {\n return position;\n }",
"@Override\n public Position getPosition() {\n return position;\n }",
"public final Vector2D getPosition() {\n return position;\n }",
"public int getPosition() {\n return position;\n }",
"public int getPosition() {\n return position;\n }",
"public int getPosition() {\n return position;\n }",
"public Position getPosition()\n\t{\n\t\treturn position;\n\t}",
"public int getPosition()\n\t{\n\t\treturn position;\n\t}",
"public int getPositionX() {\n return positionX;\n }",
"public final Point getPosition()\n\t{\n\t\treturn pos;\n\t}",
"public final Vector2f getPosition() {\r\n return position;\r\n }",
"public int getPos()\n {\n return pos;\n }",
"public int getPosition()\r\n {\r\n return position;\r\n }",
"@Override\n public Position getPosition() {\n return new Position(this.x, this.y);\n }",
"public Vector2 getPosition() {\n\t\treturn pos;\n\t}",
"public int getX() { return position.x; }",
"public Position getPosition(){\n return this.position;\n }",
"public Vector2 getPosition() {\n\t\treturn position;\n\t}",
"@Override\n\tpublic D3int getPos() {\n\t\treturn myPos;\n\t}",
"public int getPositionX() {\r\n\t\treturn positionX;\r\n\t}",
"public long position() {\n return _pos;\n }",
"public int getX() {\n return positionX;\n }",
"@Override\n public int getPosition() {\n return position;\n }",
"public java.lang.Integer getPosition() {\n return position;\n }",
"public int getPositionX(){\n\t\treturn positionx;\n\t}",
"public PVector getPosition(){\n\t\treturn position;\n\t}",
"public int getXPosition() {\n return this.xPosition;\n }",
"public Vector3f getPosition() {\r\n\t\treturn this.position;\r\n\t}",
"public java.lang.Integer getPosition() {\n return position;\n }",
"public String getPosition(){\r\n\t\treturn position;\r\n\t}",
"public Point getPosition(){\r\n return new Point(this.position);\r\n }",
"@Override\n\t/**\n\t * returns the position of the class\n\t * \n\t * @return position\n\t */\n\tpublic int getPosition() {\n\t\treturn position;\n\t}",
"public Integer getPosition() {\n return this.position;\n }",
"public String getPosition() {\n return position;\n }",
"public String getPosition() {\n return position;\n }",
"public String getPosition() {\n return position;\n }",
"public String getPosition() {\n return position;\n }",
"public String getPosition() {\n return position;\n }",
"public PVector getPos() {\n\t\treturn pos;\n\t}",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public Position getPosition() {\r\n\t\treturn new Position(this.position.getX(), this.position.getY());\r\n\t}",
"public Position2D getPosition()\n {\n return position;\n }",
"@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}",
"@Override\n\tpublic int getPosition() {\n\t\treturn 0;\n\t}",
"public PVector getPosition() { return position; }",
"public double getXPos() {\n\t\treturn this.position[0];\n\t}",
"public Point2 getPosition() {\r\n return this.position;\r\n }",
"public GeoPoint getPosition() {\n\t\treturn position;\n\t}",
"public int position() {\n return pos;\n }",
"@Override\n public double getPosX() {\n return this.pos[0];\n }",
"public double getPosition() {\n return sequence.getPosition(BPMNode);\n }",
"public Point getPosition() {\n return new Point(position);\n }",
"public int getXPosition() {\n return xPosition;\n }",
"public Integer getPosition() {\n return position;\n }",
"public int getPos()\n {\n return pos;\n }",
"public int getX() {\n return pos_x;\n }",
"public int getX() {\n return posX;\n }",
"public float getPos() {\n return (spos - xpos) / (swidth - sheight);\n }",
"public double getX() {\n return position.getX();\n }",
"public int getXPosition()\n {\n return xPosition;\n }",
"public int getXPosition()\n {\n return xPosition;\n }",
"public Point getPos() {\n return this.pos;\n }",
"public final int getPositionX() {\r\n return (int) position.x();\r\n }",
"Position getPosition();",
"Position getPosition();",
"public Point getLocation() {\n return pos;\n }",
"public float getPositionX() {return this.position.getX();}",
"public DVector getPosition()\n\t{\n\t\treturn this.screenPos;\n\t}",
"@Override\n public Optional<Position> getPosition() {\n return this.pos;\n }",
"public final native CoOrdinates getPosition() /*-{\r\n\t\treturn this.position;\r\n\t}-*/;",
"public int getXPosition() {\n\t\treturn this.position.x;\n\t}",
"public Coordinate getPosition();",
"public int getPosX() {\n return posX;\n }",
"public Point2D getPosition()\n {\n return mPosition;\n }",
"public Cartesian3d getPosition() {\n return getMotion().getPosition();\n }"
] | [
"0.79439014",
"0.7907107",
"0.78304607",
"0.78230995",
"0.78109634",
"0.7806335",
"0.7742854",
"0.7741231",
"0.7697471",
"0.7697221",
"0.7694806",
"0.76736647",
"0.7659204",
"0.76489085",
"0.76457006",
"0.7638861",
"0.76294285",
"0.76292425",
"0.76106817",
"0.76106817",
"0.76106817",
"0.760083",
"0.7598843",
"0.759651",
"0.7577847",
"0.75691116",
"0.75663996",
"0.75652",
"0.7562798",
"0.7539739",
"0.75367546",
"0.7526692",
"0.7497562",
"0.74895155",
"0.7486676",
"0.74836373",
"0.7482511",
"0.74801415",
"0.7456642",
"0.7455258",
"0.7453034",
"0.74480814",
"0.743336",
"0.7417959",
"0.74132377",
"0.74079",
"0.7402955",
"0.7402369",
"0.7399825",
"0.7399825",
"0.7399825",
"0.7399825",
"0.7399825",
"0.73850465",
"0.7375457",
"0.73732525",
"0.73732525",
"0.7372975",
"0.7372975",
"0.73725677",
"0.73577976",
"0.7354942",
"0.73542976",
"0.73379827",
"0.7333348",
"0.73260003",
"0.7315057",
"0.7298281",
"0.72964597",
"0.7295616",
"0.729337",
"0.7291886",
"0.7288528",
"0.72844386",
"0.72826284",
"0.72765994",
"0.72734684",
"0.72692716",
"0.72656685",
"0.72642803",
"0.72642803",
"0.72595775",
"0.7258257",
"0.7246017",
"0.7246017",
"0.7245853",
"0.72413975",
"0.7235765",
"0.72268957",
"0.72248054",
"0.72163874",
"0.72129875",
"0.71897393",
"0.71853644",
"0.71826136"
] | 0.76230985 | 23 |
Called when the component is resized. | public void componentResized(ComponentEvent event) {
// resize the image
if (isOn()) {
setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), onImageIcon));
} else {
setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), offImageIcon));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void componentResized(ComponentEvent arg0) {\r\n\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n public void componentResized(ComponentEvent e) {\n }",
"@Override\r\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\tpublic void componentResized(ComponentEvent arg0) {\n\t\t\t\n\n\t\t}",
"@Override\r\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\tsuper.componentResized(e);\r\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\twidthAttitude=e.getComponent().getSize().getWidth()/Width;\n\t\theightAttitude=e.getComponent().getSize().getHeight()/Height;\n\t}",
"@Override\n\tpublic void resized() {\n\t}",
"@SuppressWarnings(\"synthetic-access\")\r\n\t @Override\r\n\t public void componentResized(final ComponentEvent arg0) {\n\t\tupdateLocation(WSResizeHandleComponent.this.parent);\r\n\t }",
"public void componentResized(ComponentEvent e) {\r\n\r\n int width = getWidth();\r\n int height = getHeight();\r\n\r\n //we check if either the width\r\n //or the height are below minimum\r\n\r\n boolean resize = false;\r\n\r\n if (width < minWidth) {\r\n resize = true;\r\n width = minWidth;\r\n }\r\n if (height < minHeight) {\r\n resize = true;\r\n height = minHeight;\r\n }\r\n if (resize) {\r\n this.setSize(width, height);\r\n }\r\n }",
"public void componentResized(ComponentEvent e) {\n\t\tresizeBackgroundImage();\n\t\trepaint();\n\t}",
"public abstract void windowResized();",
"@Override\r\npublic void componentResized(ComponentEvent arg0) {\n\tsetSizeBackgr(getSize());\r\n\tsetSizeHat (getSize());\r\n\tsetSizeGift(getSize());\r\n}",
"public void componentResized(ComponentEvent e) \r\n\t{\r\n\t\t//System.out.println(\"Resized: \" + e);\r\n\t\tsuper.componentResized(e);\r\n\t}",
"public void componentResized(ComponentEvent e) {\n myReshape(getSize().width, getSize().height);\n display();\n repaint();\n }",
"public void componentResized(ComponentEvent e) {\n myReshape(getSize().width, getSize().height);\n display();\n repaint();\n }",
"public void componentResized(ComponentEvent e) {\n notifyViewportListeners(getXOrigin(), getYOrigin(), panelWidth, panelHeight);\n }",
"protected abstract void onResize(int width, int height);",
"public void componentResized(ComponentEvent e) {\n System.out.println(\"componentResized\");\n container.setPreferredSize(new Dimension(getWidth(), getHeight()));\n \t\tcontainer.imageContainer.setBounds(0, 30, container.getPreferredSize().width, container.getPreferredSize().height);\n \t\tcontainer.toolbar.setSize(container.getPreferredSize().width-16, 25);\n \t\tSystem.out.println(container.imageContainer.getPreferredSize());\n \t\trepaint();\n }",
"@Override\n protected void sizeChanged () {\n }",
"@Override\n public void componentResized(java.awt.event.ComponentEvent evt) {\n resizeGrid();\n }",
"public void componentResized(ComponentEvent e)\n/* 410: */ {\n/* 411:478 */ TileGIS.this.mapPanel.setSize(TileGIS.this.placeholder.getJComponent().getSize());\n/* 412: */ }",
"@Override\n public void componentResized(final ComponentEvent e) {\n buttonWidth = position.isHorizontal() ? 150 : (parent.getWidth() / cells);\n relayout();\n }",
"@Override\n\tpublic void onResize(int width, int height) {\n\t}",
"public void onResized(Integer width,Integer height);",
"void onResized(int width, int height);",
"public void componentResized(ComponentEvent e) {\n\t\t\t\t\n\t\t\t\tDimension size = e.getComponent().getSize();\n\t\t\t\tint infoWidth = 200;\n\t\t\t\tint tabPaneWidth = 200;\n\t\t\t\tint padY = 80;\n\t\t\t\tint padX = 40;\n\t\t\t\tint canvasWidth = (int) (size.width - padX - infoWidth - tabPaneWidth);\n\t\t\t\tint canvasHeight = (int) (size.height - padY);\n\t\t\t\tcanvas.setSize(canvasWidth, canvasHeight);\n\t\t\t\twindow.setSize(canvasWidth, canvasHeight);\n\t\t\t\tinfoPanel.setSize(infoWidth, canvasHeight); \n\t\t\t\t\n\t\t\t\tint tabPadX = 10;\n\t\t\t\tint tabPadY = 30;\n\t\t\t\ttabbedPane.setSize(tabPaneWidth, canvasHeight);\n\t\t\t\texplorerPanel.setSize(tabPaneWidth-tabPadX, canvasHeight-tabPadY);\n\t\t\t\tplanPanel.setSize(tabPaneWidth-tabPadX, canvasHeight-tabPadY);\n\t\t\t\tcanvas.revalidate();\n\t\t\t}",
"@Override\n protected final void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n this.invalidate();\n }",
"@Override\r\n\tpublic void resize() {\n\t\t\r\n\t}",
"@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\tthis.mapImage.resizeImage(this.getWidth() - 15, this.getHeight() - 60);\n\t\t// make the thread \"go to sleep\" to avoid smearing the screen\n\t\ttry {\n\t\t\tThread.sleep(20);\n\t\t} catch (InterruptedException e0) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te0.printStackTrace();\n\t\t}\n\t\tdrawAll();\n\t}",
"@Override\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\tisOpen = true;\n\t\t\t}",
"@Override\n public void componentResized(ComponentEvent componentEvent) {\n ControlFrame.this.pack();\n }",
"void windowResized(ResizeEvent e);",
"@Override\n\tpublic void resize() {\n\t\t\n\t}",
"@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n this.w = w;\n this.h = h;\n }",
"@Override\n\tpublic void resize(float width, float height) {\n\t}",
"public void onWindowResized(int width, int height) {\n this.setHeight(\"\" + (height - TopPanel.HEIGHT));\n }",
"public void resize() {\n\t\tsp.doLayout();\n\t}",
"@Override\n public void componentResized(ComponentEvent e) {\n setShape(new Ellipse2D.Double(0,0,FRAME_WIDTH,FRAME_WIDTH));\n }",
"@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\r\n\t\tif (w > 0 && h > 0) {\r\n\t\t\tcontainerWidth = w;\r\n\t\t\tcontainerHeight = h;\r\n\t\t}\r\n\t}",
"private void resize() {\n }",
"private void onResize() {\n /*\n * IE (pre IE9 at least) will give us some false resize events due to\n * problems with scrollbars. Firefox 3 might also produce some extra\n * events. We postpone both the re-layouting and the server side event\n * for a while to deal with these issues.\n * \n * We may also postpone these events to avoid slowness when resizing the\n * browser window. Constantly recalculating the layout causes the resize\n * operation to be really slow with complex layouts.\n */\n boolean lazy = resizeLazy\n || (BrowserInfo.get().isIE() && BrowserInfo.get()\n .getIEVersion() <= 8) || BrowserInfo.get().isFF3();\n \n if (lazy) {\n delayedResizeExecutor.trigger();\n } else {\n windowSizeMaybeChanged(Window.getClientWidth(),\n Window.getClientHeight());\n }\n }",
"public void componentShown(ComponentEvent event) {\n // resize this\n componentResized(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));\n }",
"public void componentShown(ComponentEvent event) {\n // resize this\n componentResized(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));\n }",
"@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\tcardPanel.setPreferredSize(new Dimension(appFrame.getWidth(), appFrame.getCentrePanel().getHeight() * 2 / 3));\n\t\tsummaryPanel.setPreferredSize(new Dimension(appFrame.getWidth(), appFrame.getCentrePanel().getHeight() / 3));\n\t\t\n\t\tcardPanel.repaint();\n\t\tcardPanel.revalidate();\n\t\tsummaryPanel.repaint();\n\t\tsummaryPanel.revalidate();\n\t}",
"@Override\n public void resize()\n {\n if (this.resizer != null)\n {\n this.resizer.apply(this.area);\n }\n\n if (this.children != null)\n {\n this.children.resize();\n }\n\n if (this.resizer != null)\n {\n this.resizer.postApply(this.area);\n }\n }",
"@Override\n public void resize(int width, int height) {\n \n }",
"@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\twidth = w;\n\t\theigth = h;\n\t\tajestPosition();\n\t\tthis.invalidate();\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\t}",
"@Override public void onSizeChanged(int w, int h, int oldw, int oldh)\n {\n super.onSizeChanged(w, h, oldw, oldh);\n // Release the buffer, if any and it will be reallocated on the next draw\n mBuffer = null;\n }",
"@Override\r\n public void resize(int width, int height) {\r\n\r\n }",
"@Override\r\n\tpublic void resize(int width, int height) {\n\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\r\n\t}",
"@Override\n public void resize(int width, int height) {\n\n }",
"private void controlResized() {\n disposeBackBuffer();\n initializeBackBuffer();\n\n redraw();\n }",
"@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\r\n\t\t// 图所占范围大小\r\n\t\tchart.setChartRange(w, h);\r\n\t}",
"@Override\n public void componentResized(ComponentEvent e) {\n //throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n int width = this.getWidth();\n this.jButton1.setLocation(width / 4 - this.jButton1.getWidth() / 2, this.jButton1.getY());\n this.jButton2.setLocation(width * 3 / 4 - this.jButton2.getWidth() / 2, this.jButton2.getY());\n this.jButton3.setLocation(width / 2 - this.jButton3.getWidth() / 2, this.jButton3.getY());\n }",
"@Override\n public void resize(int width, int height) {\n }",
"protected abstract void resize();",
"@Override\n protected void onSizeChanged(int w, int h, int oldW, int oldH) {\n super.onSizeChanged(w, h, oldW, oldH);\n\n canvasWidth = w;\n canvasHeight = h;\n updatePolygonSize();\n\n if (Math.min(canvasWidth, canvasHeight) != Math.min(oldW, oldH)) {\n refreshImage();\n }\n }",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t}",
"protected final void fireResize() {\r\n\t\tfireEvent(new ResizeEvent(this));\r\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resize(int width, int height) {\n\t\t\r\n\t}",
"@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n setGameCards();\n }",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}",
"@Override\n\tpublic void resize(int width, int height) {\n\t\t\n\t}"
] | [
"0.83997416",
"0.8314756",
"0.8314756",
"0.82875186",
"0.8232234",
"0.8202646",
"0.8116406",
"0.7863458",
"0.78351635",
"0.7798397",
"0.77858084",
"0.76980734",
"0.76959985",
"0.76549083",
"0.7650625",
"0.7643026",
"0.7643026",
"0.76367515",
"0.7630392",
"0.7589877",
"0.7538979",
"0.7528335",
"0.75128704",
"0.75065464",
"0.7493468",
"0.74532723",
"0.73991764",
"0.73084325",
"0.7236627",
"0.7224941",
"0.7207157",
"0.7196112",
"0.71919674",
"0.7191168",
"0.71597874",
"0.7150449",
"0.71040463",
"0.7076876",
"0.7064131",
"0.70630705",
"0.7051311",
"0.70448655",
"0.704318",
"0.7028807",
"0.7028807",
"0.7015056",
"0.69892424",
"0.6974824",
"0.6971208",
"0.69181806",
"0.6905029",
"0.6850064",
"0.6850064",
"0.6850064",
"0.6843852",
"0.6834603",
"0.68281645",
"0.68262976",
"0.67917466",
"0.6786732",
"0.67845696",
"0.6781821",
"0.6772342",
"0.6765533",
"0.6765533",
"0.6765533",
"0.6765533",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.6757328",
"0.67532057",
"0.67532057",
"0.67532057",
"0.67532057",
"0.67532057",
"0.67532057",
"0.67532057",
"0.67532057",
"0.67506754",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435",
"0.67332435"
] | 0.7325161 | 27 |
Called when the component is moved. | public void componentMoved(ComponentEvent event) {
// empty body
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void componentMoved(ComponentEvent e)\n {\n \n }",
"@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n public void componentMoved(ComponentEvent e) {\n }",
"@Override\r\n public void componentMoved(ComponentEvent e) {\n }",
"@Override\r\n\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\r\n\t\t}",
"@Override\n public void componentMoved(ComponentEvent arg0) {\n }",
"@Override\r\n\tpublic void componentMoved(ComponentEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void componentMoved(ComponentEvent arg0) {\n\r\n\t}",
"private void handleMoved()\n {\n toolkit.postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_MOVED));\n }",
"@Override\n\tpublic void componentMoved(ComponentEvent e) {\n\n\t}",
"@Override\n\tpublic void componentMoved(ComponentEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void componentMoved(ComponentEvent e) {\n\t\t\n\t}",
"@Override\n\t\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\t\n\n\t\t}",
"@Override\n\tpublic void componentMoved(ComponentEvent arg0) {\n\t\t\n\t}",
"@Override\r\npublic void componentMoved(ComponentEvent arg0) {\n\t\r\n}",
"public void componentMoved(ComponentEvent e) {\n\t\t\t\n\t\t}",
"public void componentMoved(ComponentEvent e) {\n // !!! TODO: Do we want to save absolute positions???\n if (DEBUG)\n System.out.println(\"componentMoved: \" + e);\n }",
"public void componentMoved(ComponentEvent arg0) {\n\t\t\n\t}",
"public void componentMoved(ComponentEvent e) {\n\t\tsuper.componentMoved(e);\r\n\t}",
"@Override\n public void componentMoved(final ComponentEvent e) {\n // Do nothing\n }",
"public void componentMoved(ComponentEvent e)\n/* 415: */ {\n/* 416:482 */ TileGIS.this.mapPanel.setLocation(TileGIS.this.placeholder.getJComponent().getLocation());\n/* 417: */ }",
"protected void onMove() {\r\n }",
"@Override\r\n\tprotected void onMove() {\n\t\t\r\n\t}",
"private void moved(MouseEvent e)\r\n {\n }",
"public void setMoved() {\r\n\t\tmoved = true;\r\n\t}",
"@Override\n public void onMove(float x, float y) {\n }",
"public void move() {\n\t\t// Override move so we don't move, then get location set by owner.\n\t}",
"protected final void handleMove(final int x, final int y,\n final boolean updateTarget) {\n if (updateTarget) {\n AWTAccessor.getComponentAccessor().setLocation(getTarget(), x, y);\n postEvent(new ComponentEvent(getTarget(),\n ComponentEvent.COMPONENT_MOVED));\n }\n }",
"@Override\n public void mouseDragged(MouseEvent evt) {\n setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\n }",
"@Override\n public void onDragPositionsChanged(int oldPosition, int newPosition) {\n }",
"@Override\n public void move () {\n }",
"@Override\r\n public void mouseDragged(MouseEvent e) {\r\n int deltaX = e.getXOnScreen() - screenX;\r\n int deltaY = e.getYOnScreen() - screenY; \r\n \r\n setLocation(myX + deltaX, myY + deltaY);\r\n }",
"@Override\n\tpublic void mouseReleased(MouseEvent e)\n\t{\n\t\tif (!potentialDrag) return;\n\n\t\tswappedComponent = null;\n\t\tswappedComponentPreviousLocation = null;\n\t\tsource.removeMouseMotionListener( this );\n\t\tpotentialDrag = false;\n\n\t\tif (changeCursor)\n\t\t\tsource.setCursor( originalCursor );\n\n\t\tif (destination instanceof JComponent)\n\t\t{\n\t\t\t((JComponent)destination).setAutoscrolls( autoscrolls );\n\t\t}\n\n\t\t// Layout the components on the parent container\n\n\t\tif (autoLayout)\n\t\t{\n\t\t\tif (destination instanceof JComponent)\n\t\t\t{\n\t\t\t\t((JComponent)destination).revalidate();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdestination.validate();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onMove(boolean absolute) {\n \n }",
"@Override\n public void mouseDragged(MouseEvent e) {\n switch (GlobalVariable.dragState) {\n case init:\n Point abPoint = EventUtil.getAbsolutePointBy(e);\n // the component that the mouse at (as it's not e.getComponent if you move far away.\n Component componentOfMouse = e.getComponent().getParent().getComponentAt(abPoint);\n if (componentOfMouse instanceof BaseUnitUI) {\n if (!(EventUtil.isPointInComponents(e, \"In\"))\n && !(EventUtil.isPointInComponents(e, \"Out\"))) {\n // You are attempt to relocate the Unit\n e.getComponent().setLocation(abPoint);\n GlobalVariable.dragState = GlobalVariable.DragState.forRelocate;\n } else {\n // You drag a In or Out, so it is to Link Unit\n GlobalVariable.dragState = GlobalVariable.DragState.forLink;\n // get the line you create during mousePress and update its endPoint\n Line line = GlobalVariable.lastLine;\n if (line != null) {\n line.updateEndPoint(abPoint);\n GlobalVariable.workPanel.updateUI();\n }\n }\n }\n break;\n case forRelocate:\n // if it is called during dragging label around\n Point newLoc = EventUtil.getAbsolutePointBy(e);\n e.getComponent().setLocation(newLoc);\n // get the unit which this UI belong to.\n int unitIndex = GlobalVariable.componentArray.indexOf(e.getComponent());\n SuperUnit unit = GlobalVariable.unitArray.get(unitIndex);\n // update the line linked with the unit you want to relocate.\n Line[] lines = unit.getOutLine();\n for (int iLine = 0; iLine < lines.length; iLine ++) {\n if (lines[iLine] != null) {\n // get the label center location\n Point origin = unit.unitUI.getComponent(unit.getInLines().length).getLocation();\n origin = EventUtil.transformToSuperLoca(origin, unit.unitUI);\n origin.x += GlobalVariable.actionWidth / 2;\n lines[iLine].updateStartPoint(origin);\n }\n }\n for (int iIn = 0; iIn < unit.getInLines().length; iIn ++) {\n if (unit.getInLines()[iIn] != null) {\n // get the label center location\n Point origin = unit.unitUI.getComponent(iIn).getLocation();\n origin = EventUtil.transformToSuperLoca(origin, unit.unitUI);\n origin.x += GlobalVariable.actionWidth / 2;\n unit.getInLines()[iIn].updateEndPoint(origin);\n }\n }\n break;\n case forLink:\n Point endPoint = EventUtil.getAbsolutePointBy(e);\n Line line = GlobalVariable.lastLine;\n if (line != null) {\n line.updateEndPoint(endPoint);\n GlobalVariable.workPanel.updateUI();\n }\n break;\n }\n }",
"@Override\n\tpublic void update() {\n\t\tmove();\n\t\tplace();\n\t}",
"@Override\n\tpublic void move() {\n\n\t}",
"@Override\r\n\tpublic void move() {\n\r\n\t}",
"void onMove();",
"public void move(){\n super.move();\n load.updateCoordinates(this.x,this.y);\n }",
"@Override\n\tpublic void move() {\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tPoint dragged = e.getLocationOnScreen();\n\t\tint dragX = getDragDistance(dragged.x, pressed.x, snapSize.width);\n\t\tint dragY = getDragDistance(dragged.y, pressed.y, snapSize.height);\n\n\t\tint locationX = location.x + dragX;\n\t\tint locationY = location.y + dragY;\n\n\t\t// Mouse dragged events are not generated for every pixel the mouse\n\t\t// is moved. Adjust the location to make sure we are still on a\n\t\t// snap value.\n\n\t\twhile (locationX < edgeInsets.left)\n\t\t\tlocationX += snapSize.width;\n\n\t\twhile (locationY < edgeInsets.top)\n\t\t\tlocationY += snapSize.height;\n\n\t\tDimension d = getBoundingSize(destination);\n\n\t\twhile (locationX + destination.getSize().width + edgeInsets.right > d.width)\n\t\t\tlocationX -= snapSize.width;\n\n\t\twhile (locationY + destination.getSize().height + edgeInsets.bottom > d.height)\n\t\t\tlocationY -= snapSize.height;\n\n\t\t// Restore old location for swapped component\n\t\tif (swappedComponent != null) {\n\t\t\tswappedComponent.setLocation(swappedComponentPreviousLocation.x, swappedComponentPreviousLocation.y);\n\t\t}\n\n\t\t// Get component that was originally at (locationX, locationY)\n\t\tComponent componentUnderCursor = componentUnderCursorThatIsNotDestination(locationX, locationY);\n\t\tif (componentUnderCursor != null) {\t\n\t\t\tif (!componentUnderCursor.equals(destination)) {\n\t\t\t\tswappedComponent = componentUnderCursor;\n\t\t\t\tswappedComponentPreviousLocation = componentUnderCursor.getLocation();\n\t\t\t\tif (IJ.debugMode)\n\t\t\t\t\tSystem.out.println(\"Swapped Item Location: (\"+swappedComponentPreviousLocation.x+\",\"+swappedComponentPreviousLocation.y+\")\");\n\t\t\t}\n\t\t\tcomponentUnderCursor.setLocation(location.x, location.y);\n\t\t}\n\t\t\n\t\t// Adjustments are finished, move the component\n\t\tdestination.setLocation(locationX, locationY);\n\t\t\n\t\tif (IJ.debugMode)\n\t\t\tSystem.out.println(\"Dragged Item Location: (\"+locationX+\",\"+locationY+\")\");\n\t}",
"@Override\n public void mouseDragged(MouseEvent e){\n newerlabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }",
"public void onSwapPosition() {\n\n\t}",
"@Override\n\tpublic void onPlayerMove(PlayerMoveEvent e) {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {\n\t\t\t\t\tgameObject.moveBy(0,y-gameObject.getHeight()/2);\n\t\t\t\t}",
"@Override\n\tpublic void move() {\n\t\t\n\t}",
"@Override\r\n public void mouseDragged(MouseEvent e) {\n int thisX = getLocation().x;\r\n int thisY = getLocation().y;\r\n\r\n //determina el desplazamiento\r\n int xMoved = (thisX + e.getX()) - (thisX + initialClick.x);\r\n int yMoved = (thisY + e.getY()) - (thisY + initialClick.y);\r\n\r\n //mueve la ventana a su nueva posicion\r\n int X = thisX + xMoved;\r\n int Y = thisY + yMoved;\r\n this.setLocation(X, Y);\r\n }",
"@Override\n\t\t\t\tpublic void drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {\n\t\t\t\t\tgameObject.moveBy(x-gameObject.getWidth()/2, y-gameObject.getHeight()/2);\n\t\t\t\t}",
"@Override\r\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void onMoveCompleted(MoveEvent arg0) {\n\t\t\n\t}",
"void windowMoved(MoveEvent e);",
"@Override\r\n\t\t\tpublic void ancestorMoved(AncestorEvent event) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\tpublic void ancestorMoved(AncestorEvent arg0) {\n\t\t\t\r\n\t\t}",
"void onDragged();",
"@Override\r\n\t\t\tpublic void mouseMoved(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\n\t\t\t}",
"@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}",
"@Override\r\n\tpublic void onMovableChanged(Movable movable) {\r\n\t\tControllerEventSource.notifyMovableChanged(movable);\r\n\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent e)\n\t{\n\t}",
"@Override\n\t\t\t\tpublic void drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {\n\t\t\t\t\tgameObject.moveBy(x-gameObject.getWidth()/2, 0);\n\t\t\t\t}",
"@Override\r\n\t\t\tpublic void ancestorMoved(AncestorEvent event) {\n\t\t\t}",
"@Override\r\n public void mouseMoved(MouseEvent e) {\r\n\r\n }",
"@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n public void handleMouseMovedEvent(Mouse.MotionEvent event) {\n }",
"@Override\r\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\r\n\t\t\t}",
"public void moveComponentsFrom(ComponentContainer source);",
"@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\n\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\n\t}",
"@Override\r\n\t\t\t\t\t\t\tpublic void ancestorMoved(AncestorEvent event) {\n\t\t\t\t\t\t\t}",
"public void mouseDragged(MouseEvent me) {\n if(this.controler.isPlayerOK(this.pieceClicked.getCoord())) {\n\n \tif (chessPiece == null) return;\n \tchessPiece.setLocation(me.getX() + xAdjustment, me.getY() + yAdjustment);\n \n }\n }",
"@Override\n public void mouseMoved(MouseEvent e){\n \n }",
"@Override\n\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\t\t\n\t}",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tmoving = false;\n\t\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tChessPiece p = (ChessPiece)e.getSource();\r\n\t\tint newX = e.getX() - p.draggedAtX + p.getLocation().x;\r\n\t\tint newY = e.getY() - p.draggedAtY + p.getLocation().y;\r\n\t\tp.setLocation(newX, newY);\r\n\t}",
"@SuppressWarnings(\"synthetic-access\")\r\n\t @Override\r\n\t public void componentResized(final ComponentEvent arg0) {\n\t\tupdateLocation(WSResizeHandleComponent.this.parent);\r\n\t }",
"@Override\n public void mouseMoved(MouseEvent arg0) {\n \n }",
"@Override\n\tpublic void mouseMoved(MouseEvent arg0) {\n\t}",
"@Override\r\n public void mouseMoved(MouseEvent e) {\n }",
"@Override\n\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t}",
"@Override\n public void onDragStarted(int position) {\n }",
"@Override\r\n public void moveSoldier(int previousLocationX, int previousLocationY, int newLocationX, int newLocationY) {\r\n\r\n // delete soldier representation from previous location \r\n // then render soldier representation in new location \r\n }",
"@Override\n\tpublic void updatePosition()\n\t{\n\t\tif(!fired && !pathfinding)\n\t\t{\n\t\t\tif(x == destX && y == destY)\n\t\t\t{\n\t\t\t\tfired = true;\n\t\t\t\tvehicle.msgAnimationDestinationReached();\n\t\t\t\tcurrentDirection = MovementDirection.None;\n\t\t\t\t\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\tif(cIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t{\n\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\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(nextIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t{\n\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(allowedToMove || drunk)\n\t\t\t{\n\t\t\t\tswitch(currentDirection)\n\t\t\t\t{\n\t\t\t\t\tcase Right:\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Down:\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:\n\t\t\t\t\t\tx--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x % CityPanel.GRID_SIZE == 0 && y % CityPanel.GRID_SIZE == 0 && !moves.isEmpty())\n\t\t\t{\t\n\t\t\t\tif(allowedToMove || drunk)\n\t\t\t\t{\n\t\t\t\t\tcurrentDirection = moves.pop();\n\t\t\t\t\n\t\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\t\n\t\t\t\t\tif(current != next)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\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\tif(nextIntersection == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tguiList.remove(this);\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//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrent = next;\n\t\t\t\t\t\n\t\t\t\t\tswitch(currentDirection)\n\t\t\t\t\t{\n\t\t\t\t\tcase Down:next = new Point(current.x,current.y + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:next = new Point(current.x - 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Right:next = new Point(current.x + 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:next = new Point(current.x,current.y - 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:next = current;\n\t\t\t\t\t\tbreak;\n\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\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[next.y][next.x].tryAcquire())\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\treturn;\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(cIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(next.y).get(next.x);\n\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(Pathfinder.isCrossWalk(next, city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(Gui g : guiList)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(g instanceof PassengerGui)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\t\treturn;\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\tif(nextIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextIntersection.acquireAll();\n\t\t\t\t\t\t\t\t\tallowedToMove = true;\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\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tguiList.add(this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!allowedToMove && drunk)\n\t\t{\n\t\t\tcity.addGui(new ExplosionGui(x,y));\n\t\t\tSystem.out.println(\"DESTROYING\");\n\t\t\tcity.removeGui(this);\n\t\t\tvehicle.stopThread();\n\t\t\tsetPresent(false);\n\t\t\t\n\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\n\t\t\tif(cIntersection == null)\n\t\t\t{\n\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t{\n\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t{\n\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t}\n\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) \n\t{\n\t\tsuper.mouseDragged(e);\n\n\t\tthis.model.setPosition(e.getX()/2, e.getY()/2);\t//TODO: Important: test this! is it always /2 ? \n\t}",
"@Override\n public void mouseDragged(MouseEvent e){\n newLabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }",
"@Override\n public void mouseMoved(MouseEvent e) {\n }",
"@Override\n\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent arg0) {\n\n\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent arg0) {\n\n\t}",
"@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\n\r\n\t}",
"@Override\n public void mouseMoved(MouseEvent e) {\n\n }"
] | [
"0.7963142",
"0.793399",
"0.790175",
"0.790175",
"0.7889652",
"0.7889652",
"0.7884502",
"0.7880069",
"0.7868672",
"0.78404564",
"0.7833209",
"0.78271246",
"0.7788659",
"0.77826816",
"0.7761193",
"0.77410215",
"0.77410215",
"0.77300555",
"0.7723345",
"0.75920016",
"0.7513733",
"0.72835535",
"0.7252054",
"0.72290564",
"0.72113395",
"0.7087065",
"0.696562",
"0.6766951",
"0.662435",
"0.6441827",
"0.6426504",
"0.6393315",
"0.6377453",
"0.6377089",
"0.63586617",
"0.63158023",
"0.62925756",
"0.62821156",
"0.62751645",
"0.6275025",
"0.6226237",
"0.61913204",
"0.61840385",
"0.6175337",
"0.6167909",
"0.6163968",
"0.61621237",
"0.6153618",
"0.61435515",
"0.6134506",
"0.61246324",
"0.6120337",
"0.61141026",
"0.6084496",
"0.6077573",
"0.607587",
"0.6071565",
"0.6058376",
"0.60548824",
"0.60483223",
"0.6033312",
"0.6032108",
"0.6032108",
"0.6032108",
"0.60132194",
"0.6009086",
"0.60085595",
"0.6003767",
"0.6002591",
"0.6000871",
"0.59984064",
"0.59869367",
"0.5980877",
"0.5980628",
"0.5980501",
"0.5980501",
"0.5976251",
"0.5970516",
"0.5968748",
"0.5964561",
"0.5961532",
"0.5956197",
"0.5949255",
"0.5943423",
"0.59410655",
"0.59408337",
"0.59395427",
"0.59329593",
"0.5930262",
"0.59291166",
"0.59290016",
"0.59287596",
"0.5926028",
"0.5923123",
"0.5923123",
"0.5920164",
"0.5920164",
"0.59187067",
"0.5915118"
] | 0.7338636 | 22 |
Called when the component is shown. Weeee! | public void componentShown(ComponentEvent event) {
// resize this
componentResized(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\t\tpublic void componentShown(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void componentShown(ComponentEvent e) {\n\n }",
"@Override\n\t\t\t\t\t\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n public void componentShown(ComponentEvent e)\n {\n \n }",
"@Override\r\n\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\r\n\t}",
"@Override\n public void componentShown(ComponentEvent arg0) {\n\n }",
"@Override\n public void componentShown(ComponentEvent e) {\n }",
"@Override\n\tpublic void componentShown(ComponentEvent e) {\n\t}",
"@Override\r\n public void componentShown(ComponentEvent e) {\n }",
"@Override\n\tpublic void componentShown(ComponentEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void componentShown(ComponentEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void componentShown(ComponentEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void componentShown(ComponentEvent e) {\n\n\t}",
"@Override\r\n\tpublic void componentShown(ComponentEvent arg0) {\n\r\n\t}",
"@Override\r\npublic void componentShown(ComponentEvent arg0) {\n\t\r\n}",
"public void componentShown(ComponentEvent e) {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void onShow() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void aboutToBeShown() {\n\t\tsuper.aboutToBeShown();\r\n\t}",
"public void componentShown(ComponentEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void shown() {\n\n\t}",
"private void HalKelasComponentShown(java.awt.event.ComponentEvent evt) {\n\t\n }",
"abstract void onShown();",
"public void componentShown(ComponentEvent e) {\n\t\tsuper.componentShown(e);\r\n\t}",
"public void componentShown(ComponentEvent arg0) {\n }",
"void init() {\n setVisible(true);\n\n }",
"@Override\n public void componentShown(final ComponentEvent e) {\n // Do nothing\n }",
"public void onStart() {\r\n\t\tthis.setVisible(true);\r\n\t}",
"@Override\r\n public void show()\r\n {\r\n\r\n }",
"@Override\r\n public void show()\r\n {\r\n\r\n }",
"@Override\n public void componentOpened() {\n super.componentOpened();\n\n }",
"@Override\n public boolean isShown() {\n return super.isShown();\n }",
"public void show() {\n/* 104 */ Component component = getComponent();\n/* */ \n/* 106 */ if (component != null) {\n/* 107 */ component.show();\n/* */ }\n/* */ }",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public void show() {\n\n }",
"@Override\n public void show() {\n\n }",
"public void onDisplay() {\n\n\t}",
"@Override\n public void show() {\n }",
"@Override\r\n\tpublic void show() {\n\t}",
"@Override\n\tpublic void show() {\n\t\tsuper.show();\n\t\t\n\t}",
"@Override\n public void componentOpened() {\n }",
"@Override\n public void show() {\n \n }",
"@Override\n public void componentOpened() {\n // TODO add custom code on component opening\n }",
"@Override\n public void componentOpened() {\n // TODO add custom code on component opening\n }",
"@Override\n public void componentOpened() {\n // TODO add custom code on component opening\n }",
"@Override\n public void componentOpened() {\n // TODO add custom code on component opening\n }",
"@Override\n public void componentOpened() {\n }",
"@Override\n public void componentOpened() {\n }",
"@Override\n public void componentOpened() {\n }",
"@Override\n public void componentOpened() {\n }",
"@Override\r\n\tpublic void show() {\n\r\n\t}",
"@Override\r\n\tpublic void show() {\n\r\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"public void show() {\n visible=true;\n }",
"@Override\n public void componentHidden(ComponentEvent e)\n {\n \n }",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\t}",
"@Override\n\tpublic void show() {\n\t}",
"@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"void zeigeFenster() {\r\n\t\t_panel.setVisible(true);\r\n\t}",
"@Override\r\n\t\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\t\r\n\t\t}",
"@Override\r\npublic void componentHidden(ComponentEvent arg0) {\n\t\r\n}",
"public void display() {\n\t\tthis.setVisible(true);\n\t}",
"public void display() {\r\n\t\tsetVisible(true);\r\n\t}",
"@Override\r\n\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\r\n\t}",
"public void onDisplay() {\n }",
"@Override\r\n\tpublic void componentHidden(ComponentEvent arg0) {\n\r\n\t}",
"@Override\n public void componentHidden(ComponentEvent arg0) {\n }",
"private void jPanel1ComponentShown(java.awt.event.ComponentEvent evt) {\n }",
"public void ver() {\n\t\tthis.setVisible(true);\n\t}",
"@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void componentHidden(ComponentEvent e) {\n\t\t\r\n\t}",
"@Override\r\n public void componentHidden(ComponentEvent e) {\n }"
] | [
"0.8476429",
"0.8464999",
"0.84403676",
"0.843049",
"0.84126574",
"0.84126574",
"0.84086204",
"0.84056103",
"0.8402873",
"0.8402847",
"0.839749",
"0.83913696",
"0.8384998",
"0.8384998",
"0.83780295",
"0.83780295",
"0.834243",
"0.8320708",
"0.81582797",
"0.801468",
"0.7791258",
"0.77693725",
"0.77273816",
"0.7724735",
"0.77025735",
"0.7637115",
"0.7606524",
"0.7584331",
"0.7516548",
"0.74875736",
"0.7413839",
"0.73611057",
"0.73611057",
"0.733477",
"0.73032826",
"0.7277664",
"0.7275607",
"0.7275607",
"0.7275607",
"0.7269936",
"0.71991557",
"0.71991557",
"0.7189058",
"0.7186367",
"0.718458",
"0.7184236",
"0.7182525",
"0.71776706",
"0.71760684",
"0.71760684",
"0.71760684",
"0.71760684",
"0.71327657",
"0.71327657",
"0.71327657",
"0.71327657",
"0.71160084",
"0.71160084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.7114084",
"0.710399",
"0.7086405",
"0.7078901",
"0.7078901",
"0.7078901",
"0.7078901",
"0.7078901",
"0.7078901",
"0.7078901",
"0.7078901",
"0.7076448",
"0.7076448",
"0.7069131",
"0.706176",
"0.7056648",
"0.7052152",
"0.70460874",
"0.704555",
"0.7036313",
"0.70094305",
"0.7000713",
"0.69867665",
"0.69741476",
"0.69589674",
"0.6954739",
"0.6954739",
"0.6954451",
"0.69512063"
] | 0.0 | -1 |
Called when the component is hidden. | public void componentHidden(ComponentEvent event) {
// empty body
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void componentHidden(ComponentEvent e)\n {\n \n }",
"public void componentHidden(ComponentEvent e) {}",
"@Override\r\n public void componentHidden(ComponentEvent e) {\n }",
"@Override\n public void componentHidden(ComponentEvent arg0) {\n }",
"@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void componentHidden(ComponentEvent e) {\n\t}",
"@Override\r\n\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void componentHidden(ComponentEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void componentHidden(ComponentEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void componentHidden(ComponentEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void componentHidden(ComponentEvent e) {\n\n\t}",
"@Override\n\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void componentHidden(ComponentEvent arg0) {\n\t\t\n\t}",
"public void componentHidden(ComponentEvent e) { }",
"public void componentHidden(ComponentEvent e) { }",
"public void componentHidden(ComponentEvent e) { }",
"public void componentHidden(ComponentEvent e) { }",
"@Override\n public void componentHidden(final ComponentEvent e) {\n // Do nothing\n }",
"@Override\n public void wasHidden() {\n hide();\n }",
"@Override\r\n\tpublic void componentHidden(ComponentEvent arg0) {\n\r\n\t}",
"public void componentHidden(ComponentEvent e) {\n\t\t\t\n\t\t}",
"public void componentHidden(ComponentEvent e) {\r\n\t}",
"public void componentHidden(ComponentEvent e) {\n\t}",
"public void componentHidden(final ComponentEvent arg0) {\n\t\t\t}",
"public void componentHidden(ComponentEvent arg0) {\n\t\t\n\t}",
"public void componentHidden(ComponentEvent arg0) {\n }",
"@Override\n\tpublic void onHide() {\n\n\t}",
"@Override\r\npublic void componentHidden(ComponentEvent arg0) {\n\t\r\n}",
"public void componentHidden(ComponentEvent e) {\n\t\tsuper.componentHidden(e);\r\n\t}",
"@Override\n public void hide() {\n mHandler.post(mHide);\n }",
"public void componentHidden(ComponentEvent e) {\n f.setVisible(true);\n }",
"public void hide() {\n hidden = true;\n }",
"public void hide() {\n\t\thidden = true;\n\t}",
"@Override\r\n public void hide() {\r\n\r\n }",
"@Override\n\tpublic void hide() {\n\t\tdispose();\n\n\t}",
"@Override\n\tpublic void hide() {\n\t\tdispose();\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\tthis.dispose();\r\n\t\t\r\n\t}",
"@Override\r\n public void hide() {\n }",
"@Override\n public void hide() {\n \n }",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"abstract void onHidden();",
"@Override\n public void hide() {\n\n }",
"@Override\n public void hide() {\n\n }",
"@Override\n public void hide() {\n\n }",
"public void hide() {\n visible=false;\n }",
"@Override\n\tpublic void hide()\n\t{\n\n\t}",
"@Override\n\tpublic void hide()\n\t{\n\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\t\t\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\n\t}",
"@Override\n\tpublic void hide() {\n\t}",
"@Override\n\tpublic void hide() {\n\t}",
"@Override\n\tpublic void hide() {\n\t}",
"@Override\n\tpublic void hide() {\n\t}",
"@Override\r\n\tpublic void hide() {\n\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\r\n\t}",
"@Override\r\n\tpublic void aboutToBeHidden() {\n\t\tsuper.aboutToBeHidden();\r\n\t}",
"public void hideIt(){\n this.setVisible(false);\n }"
] | [
"0.83220524",
"0.8314688",
"0.8305834",
"0.83042413",
"0.8271392",
"0.8265295",
"0.8246965",
"0.8241001",
"0.82213783",
"0.8208623",
"0.8208623",
"0.8191876",
"0.8191876",
"0.8188189",
"0.8187741",
"0.8187741",
"0.8157129",
"0.8157129",
"0.8157129",
"0.8157129",
"0.81489164",
"0.81392765",
"0.81368065",
"0.81234926",
"0.8101031",
"0.8081922",
"0.7990737",
"0.7957016",
"0.78973204",
"0.7876491",
"0.7855765",
"0.78450155",
"0.77079195",
"0.75619173",
"0.75088745",
"0.74938834",
"0.74625385",
"0.74273103",
"0.74023616",
"0.73982996",
"0.7387746",
"0.73827773",
"0.73783547",
"0.73783547",
"0.73783547",
"0.73783547",
"0.73783547",
"0.73783547",
"0.73783547",
"0.73783547",
"0.7368044",
"0.73017097",
"0.73017097",
"0.73017097",
"0.72848666",
"0.72800004",
"0.72800004",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.7276114",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72573274",
"0.72406024",
"0.72406024",
"0.72406024",
"0.72406024",
"0.7182836",
"0.7182836",
"0.7182836",
"0.7182836",
"0.7147477",
"0.7096702"
] | 0.7786034 | 33 |
Get the corresponding externalized name for this value. | public String getExternalName() {
return externalName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$26);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public String getCustomName ( ) {\n\t\treturn extract ( handle -> handle.getCustomName ( ) );\n\t}",
"String getValueName();",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$8);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public String getName() {\r\n\t\treturn LocalizedTextManager.getDefault().getProperty(name());\r\n\t}",
"public java.lang.String getName()\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(NAME$4);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$2);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public java.lang.String getName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public java.lang.String getName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public java.lang.String getName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"@Override\n\tpublic String getValue() {\n\t\treturn name;\n\t}",
"public String getName() {\n return (String) getValue(NAME);\n }",
"public String name() {\n return myStrVal;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getName() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(NAME_PROP.get());\n }",
"public AXValue getName() {\n return name;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getName() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(NAME_PROP.get());\n }",
"public String getInternalName();",
"public GenericName getName() {\n return Names.parseGenericName(codeSpace, null, value);\n }",
"public YangString getNameValue() throws JNCException {\n return (YangString)getValue(\"name\");\n }",
"public YangString getNameValue() throws JNCException {\n return (YangString)getValue(\"name\");\n }",
"public java.lang.String getName();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getName();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getName();",
"public String getName() {\r\n\t\treturn name.get();\r\n\t}",
"public String asName() {\n return this.name().toLowerCase(Locale.getDefault());\n }",
"public String getName() {\n return getProperty(Property.NAME);\n }",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"public String getName() {\n return (String) mProperties.get(FIELD_NAME);\n }",
"public String getName() {\n\t\treturn getNonVisualProperties().getName();\n\t}",
"public String getName() {\n return name.get();\n }",
"public String getName() {\n\t\treturn this.toString();\n\t}",
"public static String getName()\n {\n read_if_needed_();\n \n return _get_name;\n }",
"public String getName() {\n\t\treturn this.data.getName();\n\t}",
"@Override\n @XmlElement(name = \"referenceSystemIdentifier\")\n public final ReferenceIdentifier getName() {\n ReferenceIdentifier name = super.getName();\n if (isLegacyMetadata) {\n name = RS_Identifier.wrap(name);\n }\n return name;\n }",
"PropertyName getName();",
"public String name() {\n return getString(FhirPropertyNames.PROPERTY_NAME);\n }",
"public String getName() { return name.get(); }",
"public String getName()\n {\n return (String)getAttributeInternal(NAME);\n }",
"public String getNameKey() {\n return getName();\n }",
"public String getter() {\n\t\treturn name;\n\t}",
"public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}",
"public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}",
"public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}",
"public org.hl7.fhir.String getName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.String target = null;\n target = (org.hl7.fhir.String)get_store().find_element_user(NAME$8, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public java.lang.String getFriendlyName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FRIENDLYNAME$2, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"@Override\n public String getName() {\n return this.name();\n }",
"@VTID(7)\r\n java.lang.String name();",
"public String getName() { \n\t\treturn getNameElement().getValue();\n\t}"
] | [
"0.69516534",
"0.69140345",
"0.69021076",
"0.6737662",
"0.672619",
"0.6717947",
"0.67064345",
"0.67002976",
"0.6697547",
"0.6697547",
"0.668337",
"0.66692096",
"0.66532624",
"0.6647644",
"0.6647305",
"0.66165996",
"0.6612935",
"0.6529099",
"0.65250504",
"0.6477402",
"0.6477402",
"0.641713",
"0.64150286",
"0.64150286",
"0.64094114",
"0.6397223",
"0.6395931",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.63873917",
"0.6387296",
"0.6383484",
"0.6370867",
"0.63512033",
"0.6331327",
"0.63273615",
"0.63025576",
"0.630063",
"0.62942326",
"0.62941504",
"0.6286946",
"0.62740725",
"0.62740314",
"0.62602055",
"0.62602055",
"0.62602055",
"0.6256373",
"0.6234714",
"0.62343955",
"0.6233949",
"0.62329483"
] | 0.6904213 | 2 |
Resolve an AccessType from its external name. | public static AccessType fromExternalName(String externalName) {
if (externalName == null) {
return null;
}
for (AccessType accessType : AccessType.values()) {
if (accessType.getExternalName().equals(externalName)) {
return accessType;
}
}
throw new UnknownEnumExternalNameException(externalName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private @Nullable Type resolveType(@NotNull String typeName) {\n QnTypeRef typeRef = new QnTypeRef(Qn.fromDotSeparated(typeName));\n return (Type) typesResolver.resolve(typeRef);\n }",
"<T> T resolve(String name, Class<T> type);",
"public Type handleTypeName(SourceLocation loc, Identifier name) {\n return lookupType(name, loc).getAliasType();\n }",
"public AbsenceType findByName(String name);",
"public static Type getByHttpName(String httpName) {\n/* 126 */ if (httpName == null) return null; \n/* 127 */ return byName.get(httpName.toUpperCase(Locale.ROOT));\n/* */ }",
"Type<?> get(String name);",
"public Type type(String name);",
"Symbol resolve(String name);",
"T as(String alias);",
"public static Type findType(String name) {\n if (MZTabUtils.isEmpty(name)) {\n throw new IllegalArgumentException(\"Modification type name should not be empty!\");\n }\n\n Type type;\n try {\n type = Type.valueOf(name.trim().toUpperCase());\n } catch (IllegalArgumentException e) {\n type = null;\n }\n\n return type;\n }",
"@Override\n public SymbolReference<ReferenceTypeDeclaration>\n tryToSolveType(String name)\n {\n if (foundTypes.containsKey(name)) {\n return SymbolReference.solved(foundTypes.get(name));\n }\n \n SymbolReference<ReferenceTypeDeclaration> result\n = tryToSolveTypeUncached(name);\n \n if (result.isSolved()) {\n foundTypes.put(name, result.getCorrespondingDeclaration());\n }\n return result;\n }",
"public TypeDefinition findInternalType(DefinitionName name){\n \treturn(internalTypeDefs.get(name));\n }",
"public String getLocallyAccessibleName( String name );",
"@Override\n public SymbolReference<ResolvedReferenceTypeDeclaration> tryToSolveType(String name) {\n try {\n return foundTypes.get(name, () -> {\n SymbolReference<ResolvedReferenceTypeDeclaration> result = tryToSolveTypeUncached(name);\n if (result.isSolved()) {\n return SymbolReference.solved(result.getCorrespondingDeclaration());\n }\n return result;\n });\n } catch (ExecutionException e) {\n throw new RuntimeException(e);\n }\n }",
"boolean isResolvable(String name, Class<?> type);",
"public org.omg.CORBA.Object resolve(String name)\n {\n NameComponent nc = new NameComponent(name, \"Object\");\n NameComponent path[] = {nc};\n org.omg.CORBA.Object objRef = null;\n try\n {\n objRef = namingContext.resolve(path);\n }\n catch (Exception e)\n {\n fatalError(\"Cound not get object with name \\\"\" + name +\n \"\\\" from NameService\", e);\n }\n return objRef;\n }",
"@Override\n\tpublic BasicType resolveCastTargetType(String name) {\n\t\torg.hibernate.type.BasicType ormBasicType = (org.hibernate.type.BasicType) sessionFactory.getTypeHelper().heuristicType( name );\n\t\tif ( ormBasicType == null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn resolveBasicType( ormBasicType.getReturnedClass() );\n\t}",
"private String resolveAttrType(String aType){\n\t\tif(aType == \"int\" || aType == \"Int\") return \"int\";\n\t\telse if(aType == \"String\") return \"String\";\n\t\telse if(aType == \"univ\") assertMessage(\"TODO: Map univ with Java type\");\n\t\telse if(aType == \"none\") assertMessage(\"TODO: Map none with Java type\");\n\t\telse if(aType.contains(\"seq\")) assertMessage(\"TODO: Map seqInt with Java type\");\n\n\t\treturn aType;\n\t}",
"Class<? extends JavaTypeMapping> getMappingType(String javaTypeName);",
"public abstract JavaType resolveType(java.lang.reflect.Type jdkType);",
"String getIdentifierName(String name, String type);",
"NamedType createNamedType();",
"public static IInterfaceDefinition searchType(String unresolvedTypeName,\n\t\t\tEnvironment env)\n\t{\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Token\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))// c.rawName.equals(unresolvedTypeName))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all root productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Production\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all sub productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.SubProduction\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all alternatives\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Alternative\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup for all raw names no matter the type\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all with not raw name\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.classToType.get(cd) == ClassType.Custom)\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, false, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().getTag().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IInterfaceDefinition i : env.getInterfaces())\n\t\t{\n\t\t\tif (i.getName().getName().equals(unresolvedTypeName))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn null;// \"%\" + type;\n\n\t}",
"public static Material getType(String name) {\n Material material = null;\n name = name.toUpperCase(Locale.ROOT).trim();\n if (!name.startsWith(\"#\")) {\n if (name.contains(NAMESPACE.toUpperCase(Locale.ROOT))) {\n name = name.split(\":\")[1];\n }\n\n name = BukkitAdapter.ADAPTER.parseLegacyName(name);\n material = Material.matchMaterial(name);\n }\n\n return material;\n }",
"<T> T resolve(Class<T> type);",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Type.cpp\", line = 545,\n FQN=\"llvm::Module::getTypeByName\", NM=\"_ZNK4llvm6Module13getTypeByNameENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Type.cpp -nm=_ZNK4llvm6Module13getTypeByNameENS_9StringRefE\")\n //</editor-fold>\n public StructType /*P*/ getTypeByName(StringRef Name) /*const*/ {\n return getContext().pImpl.NamedStructTypes.lookup(new StringRef(Name));\n }",
"Authority findByName(AuthorityName name);",
"private static String getCorrectTypeName(final String typeName)\n {\n String result = \"\";\n\n // Type is an XSD built-in type\n if (mapping.containsKey(typeName))\n {\n result = mapping.get(typeName);\n }\n // Type is a custom type\n else\n {\n result = typeName;\n }\n\n return result;\n }",
"private Class<?> resolveBuiltInAttrType(String anAlloyAttrType){\n\t\tif(anAlloyAttrType == \"int\" || anAlloyAttrType == \"Int\") return int.class;\n\t\telse if(anAlloyAttrType == \"String\") return String.class;\n\t\telse if(anAlloyAttrType == \"univ\") assertMessage(\"TODO: Map univ with Java type\");\n\t\telse if(anAlloyAttrType == \"none\") assertMessage(\"TODO: Map none with Java type\");\n\t\telse if(anAlloyAttrType.contains(\"seq\")) assertMessage(\"TODO: Map seqInt with Java type\");\n\t\t\n\t\treturn null;\n\t}",
"ActivityType loadActivityType(int id) throws DataAccessException;",
"static LoanType assignLoanType(String loan) {\n String name = loan.substring(0, 1).toUpperCase() + loan.substring(1).toLowerCase() + \"Loan\";\n try {\n Class clazz = Class.forName(name);\n return (LoanType) clazz.getConstructor().newInstance();\n } catch (Exception e) {\n return new UnidentifiedLoan();\n }\n }",
"default Object resolve(String name) {\n return resolve(name, Object.class);\n }",
"private static Class<?> tryName(String name) throws ClassNotFoundException {\n return Class.forName(name);\r\n }",
"ComponentTypes.AccessPoint getType();",
"private static DirType getEnum(String name) {\n\t\t\t//Find provided string in directions map.\n\t\t\tDirType direction = directions.get(name.toUpperCase());\n\t\t\tif (direction == null) {\n\t\t\t\tdirection = DirType.NONE;\n\t\t\t}\n\t\t\treturn direction;\n\t\t}",
"private TYPE getType(final String type) {\n String temp = type.replaceAll(\"-\", \"_\");\n TYPE answer = Arrays.stream(\n TYPE.values()\n )\n .filter(value -> value.name().equals(temp))\n .findFirst()\n .orElse(TYPE.unknown);\n return answer;\n }",
"public AssetClass findAssetClassByName(String name_);",
"public final static ScopeType getScopeTypeByName(String name) {\n if (name != null && !(name = name.replace(\" \", \"\")).isEmpty()) {\n for (ScopeType scopeType : ScopeType.values()) {\n if (scopeType.getName().equalsIgnoreCase(name)) {\n return scopeType;\n }\n }\n }\n return null;\n }",
"private static String resolveQualifierFromTypeName(IType sigInterfaceType, String typeName) {\n\n\t\ttry {\n\n\t\t\tString[][] types = sigInterfaceType.resolveType(typeName);\n\t\t\tif (types != null) {\n\t\t\t\t// Returns the first candidate\n\t\t\t\tString qualifier = types[0][0];\n\t\t\t\t//\t\t\t\tString name = types[0][1];\n\t\t\t\treturn qualifier;\n\t\t\t}\n\t\t}\n\t\tcatch (JavaModelException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}",
"String lookupMashFromName(String name);",
"public static DsoType parse(String text) {\n DsoType result = map.get(text);\n if (result == null) {\n throw new IllegalArgumentException(\"Unknown type: '\" + text + \"'\");\n }\n return result;\n }",
"FieldType getFieldTypeByName(QName name) throws FieldTypeNotFoundException, TypeException, InterruptedException;",
"protected Type getPokemonTypeByName(String typeName) {\n Optional<Type> type = typeDao.getTypeByName(typeName);\n if (!type.isPresent()) {\n throw new TypeNotFoundException(typeName);\n }\n return type.get();\n }",
"public Type getChosenType(AST ast, String umlTypeName,\r\n\t\t\tString umlQualifiedTypeName, String sourceDirectoryPackageName) {\r\n\t\tString typeName = packageHelper.getFullPackageName(\r\n\t\t\t\tumlQualifiedTypeName, sourceDirectoryPackageName);\r\n\r\n\t\t// Check whether primitive or array type or parameterized type\r\n\t\t// or simple type?\r\n\t\tType chosenType = null;\r\n\t\tif (dataTypeUtils.isPrimitiveType(typeName)) {\r\n\t\t\tchosenType = getAstPrimitiveType(ast, typeName);\r\n\t\t} else if (dataTypeUtils.isArrayType(typeName)) {\r\n\t\t\tchosenType = getAstArrayType(ast, typeName);\r\n\t\t} else if (dataTypeUtils.isParameterizedType(typeName)) {\r\n\t\t\tchosenType = getAstParameterizedType(ast, typeName);\r\n\t\t} else {\r\n\t\t\tchosenType = getAstSimpleType(ast, typeName);\r\n\t\t}\r\n\t\treturn chosenType;\r\n\t}",
"@Nullable\n public static Class<?> tryGetCanonicalClass(String canonicalName, ClassLoader... loaders)\n {\n try\n {\n return Class.forName(canonicalName);\n }\n catch (ClassNotFoundException e)\n {\n try\n {\n ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();\n if (contextClassLoader == null)\n {\n return null;\n }\n return contextClassLoader.loadClass(canonicalName);\n }\n catch (ClassNotFoundException e2)\n {\n for (ClassLoader loader : loaders)\n {\n try\n {\n return loader.loadClass(canonicalName);\n }\n catch (ClassNotFoundException ignored)\n {\n }\n }\n return null;\n }\n }\n }",
"public PrimClass resolveClass(String name) {\n return findPrimClass(importFor(name));\n }",
"public int findAliasTypeInPackage(String typeName, int packageId) {\n if(packageId == -1\n || !(singleCollect.getEntities().get(packageId) instanceof AbsFLDEntity) ) {\n return -1;\n }\n for (int fileId : singleCollect.getEntities().get(packageId).getChildrenIds()) {\n int structId = nameSearchFile.findAliasTypeInFile(typeName, fileId);\n if (structId != -1) {\n return structId;\n }\n }\n return -1;\n }",
"private AccessType(String rtCode) {\n\t this.rtCode = rtCode;\n\t}",
"public static DataType get(String type)\n {\n return lookup.get(type);\n }",
"public ClassEntity getTypeImportWC(String name)\n {\n // Try non-static wildcard imports first\n Iterator i = wildcardImports.iterator();\n \n while (i.hasNext()) {\n PackageOrClass importEntity = (PackageOrClass) i.next();\n try {\n PackageOrClass member = importEntity.getPackageOrClassMember(name);\n if (member.isClass()) {\n return (ClassEntity) member;\n }\n }\n catch (SemanticException se) { }\n }\n \n // Now try static wildcard imports\n i = staticWildcardImports.iterator();\n while (i.hasNext()) {\n ClassEntity importEntity = (ClassEntity) i.next();\n try {\n ClassEntity member = importEntity.getStaticMemberClass(name);\n return member;\n }\n catch (SemanticException se) { }\n }\n \n return null;\n }",
"public StateType getStateTypeFromName(String name) {\n\t\tfor(StateType stateType : StateType.values()) {\n\t\t\tif(stateType.toString().equals(name)) {\n\t\t\t\treturn stateType;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static ArchetypeDescriptor getArchetypeDescriptor(String shortName) {\r\n IArchetypeService service\r\n = ArchetypeServiceHelper.getArchetypeService();\r\n return getArchetypeDescriptor(shortName, service);\r\n }",
"TypeImport createTypeImport();",
"private AccessTypeInjector getInjector(String classCanonicalName) {\n try {\n for (AccessTypeInjector injector : accessTypeInjectors\n .select(new AccessTypeInjector.Selector(classCanonicalName))) {\n return injector;\n }\n } catch (Exception e) {\n log.error(\"No access type injector found for class name: {}\", classCanonicalName, e);\n }\n return null;\n }",
"public String TypeOf(String name) {\n\t\tValues tmp = currScope.get(name);\n\t\t\n\t\tif(tmp != null)\n\t\t\treturn tmp.getType();\n\t\t\n\t\tif(currScope != classScope) {\n\t\t\ttmp = classScope.get(name);\n\t\t\tif(tmp != null)\n\t\t\t\treturn tmp.getType();\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public ClassEntity getTypeImport(String name)\n {\n // See if there is a normal import for the given name\n ClassEntity r = (ClassEntity) normalImports.get(name);\n if (r != null)\n return r;\n \n // There might be a suitable static import\n List l = (List) staticImports.get(name);\n if (l != null) {\n Iterator i = l.iterator();\n while (i.hasNext()) {\n r = (ClassEntity) i.next();\n try {\n r = (ClassEntity) r.getPackageOrClassMember(name);\n return r;\n }\n catch (SemanticException se) { }\n }\n }\n \n return null;\n }",
"public static Type valueOfIgnoreCase(String name) throws IllegalArgumentException {\n for(Type type: Type.values()) {\n if(type.getName().equalsIgnoreCase(name)) return type;\n }\n\n throw new IllegalArgumentException(String.format(\"Type object with the name '%s' could not be found.\", name));\n }",
"public String resolve(final String name) {\n return name.length() > pathLength ? pathLength > 0 ? name.substring(pathLength) : name : null;\n }",
"public PrimObject resolveObject(String name) {\n return findObject(importFor(name));\n }",
"public android.icu.text.TimeZoneNames.NameType nameType() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.icu.text.TimeZoneNames.MatchInfo.nameType():android.icu.text.TimeZoneNames$NameType, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.text.TimeZoneNames.MatchInfo.nameType():android.icu.text.TimeZoneNames$NameType\");\n }",
"public Type resolveReferenceType( Object name ) {\n throw new UnsupportedOperationException( Messages.getErrorString( \"PMSFormulaContext.ERROR_0001_INVALID_USE\" ) ); //$NON-NLS-1$\n }",
"public Optional<TypeUsage> getFieldType(String name) {\n if (!typeDeclaration.hasField(name)) {\n return Optional.empty();\n }\n TypeUsage typeUsage = typeDeclaration.getField(name).getType();\n typeUsage = replaceTypeParams(typeUsage);\n return Optional.of(typeUsage);\n }",
"public IAttributeType<?> getAttributeType(String name);",
"public Optional<ResolvedType> getFieldType(String name) {\n if (!typeDeclaration.hasField(name)) {\n return Optional.empty();\n }\n ResolvedType type = typeDeclaration.getField(name).getType();\n type = useThisTypeParametersOnTheGivenType(type);\n return Optional.of(type);\n }",
"public static UpdateModuleType nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }",
"public FieldIdItem lookupField(final Class<?> clazz, final String name, final Class<?> type) {\n\t\treturn lookupField(TypeUtils.getTypeDescriptor(clazz), name, TypeUtils.getTypeDescriptor(type));\n\t}",
"HxType createReference(final HxType resolvedType);",
"public Class<?> lookupClass(String name) throws ClassNotFoundException {\n return getClass().getClassLoader().loadClass(name);\n }",
"ResolvedReferenceTypeDeclaration declaringType();",
"public static GSC_DataType getReference( String s )\n {\n return( (GSC_DataType)( nameHash.get( s ) ) );\n }",
"public static RegisterModuleType nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }",
"VarRef lookupField(String fieldUse);",
"public String resolveElementName(String id, String type) {\r\n // resolve element name\r\n String elementName;\r\n if (id.startsWith(\"0c\")) {\r\n elementName = \"cabinet\";\r\n } else if (id.startsWith(\"0b\")) {\r\n elementName = \"folder\";\r\n } else if (id.startsWith(\"09\")) {\r\n elementName = \"document\";\r\n } else {\r\n elementName = type;\r\n }\r\n return elementName;\r\n }",
"@Override\r\n\tpublic UserType getByAcronym(char acronym) {\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(\"FROM UserType WHERE Acronym =:acronym \"); \r\n\t\tquery.setParameter(\"acronym\", acronym);\r\n\t\t\r\n\t\treturn (UserType) query.getSingleResult();\r\n\t}",
"public static CompressorType fromString(String name) {\n for (CompressorType v : values()) {\n if (v.name().equalsIgnoreCase(name)) {\n return v;\n }\n }\n\n // cannot get here\n assert false;\n return null;\n }",
"@Override\n public TypeImpl getType(String typeName) {\n return typeName2TypeImpl.get(typeName);\n }",
"@Override\n\tpublic Symbol resolveMember(String name) {\n\t\tSymbol s = symbols.get(name);\n\t\tif (s != null)\n\t\t\treturn s;\n\t\t\n\t\t// don't look in the enclosing scope for this one\n\t\t\n\t\t// otherwise it doesn't exist\n\t\treturn null;\n\t}",
"private String replaceNamesWithType(String filter, String name, String type) {\r\n int pos = filter.indexOf(ALIAS_PREFIX + name);\r\n int lastPos = 0;\r\n StringBuffer sb = new StringBuffer();\r\n\r\n while (pos > -1) {\r\n sb.append(filter.substring(lastPos, pos));\r\n sb.append(\"/\" + type);\r\n lastPos = pos + (ALIAS_PREFIX + name).length();\r\n pos = filter.indexOf(ALIAS_PREFIX + name, lastPos);\r\n }\r\n\r\n sb.append(filter.substring(lastPos));\r\n\r\n return sb.toString();\r\n }",
"public static TypeDefinitionReference getTypeDefRef(String sType) throws WTException \r\n\t{\n\t QuerySpec qs = new QuerySpec(WTPart.class);\r\n\t SearchCondition condition = new SearchCondition(TypeDefinitionReference.class, TypeDefinitionReference.KEY, SearchCondition.EQUAL, sType);\r\n\t qs.appendWhere(condition, new int[]{0});\r\n\t QueryResult qr = PersistenceHelper.manager.find((StatementSpec)qs);\r\n\t TypeDefinitionReference typedef = null;\r\n\t\twhile(qr.hasMoreElements())\r\n\t\t{\r\n\t\t\ttypedef = (TypeDefinitionReference)qr.nextElement();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn typedef;\r\n\t}",
"Type_use getType_use();",
"private SymObject findField(Struct type, String name) {\n for (SymObject field : type.fields) {\n if (field.name.equals(name)) {\n return field;\n }\n }\n\n error(name + \" can't be find as a field\");\n return SymbolTable.OBJECT_NONE;\n }",
"public static Class<?> getCanonicalClass(String canonicalName, ClassLoader... loaders) throws IllegalArgumentException\n {\n try\n {\n return Class.forName(canonicalName);\n }\n catch (ClassNotFoundException e)\n {\n try\n {\n ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();\n if (contextClassLoader == null)\n {\n throw new IllegalArgumentException(\"Cannot find \" + canonicalName, e);\n }\n return contextClassLoader.loadClass(canonicalName);\n }\n catch (ClassNotFoundException e2)\n {\n e2.addSuppressed(e);\n for (ClassLoader loader : loaders)\n {\n try\n {\n return loader.loadClass(canonicalName);\n }\n catch (ClassNotFoundException ignored)\n {\n e2.addSuppressed(ignored);\n }\n }\n throw new IllegalArgumentException(\"Cannot find \" + canonicalName, e2);\n }\n }\n }",
"static Identifier makeTypeClass(final QualifiedName name) {\r\n if (name == null) {\r\n return null;\r\n } else {\r\n return new Identifier(Category.TYPE_CLASS, name);\r\n }\r\n }",
"public TypeBinding resolveType(ClassScope scope) {\n\tthis.constant = Constant.NotAConstant;\n\tif (this.resolvedType != null) // is a shared type reference which was already resolved\n\t\treturn this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error\n\n\tTypeBinding type = this.resolvedType = getTypeBinding(scope);\n\tif (this.resolvedType == null)\n\t\treturn null; // detected cycle while resolving hierarchy\t\n\tif (!this.resolvedType.isValidBinding()) {\n\t\treportInvalidType(scope);\n\t\treturn null;\n\t}\n\tif (isTypeUseDeprecated(this.resolvedType, scope))\n\t\treportDeprecatedType(scope);\n\ttype = scope.environment().convertToRawType(type);\n\tif (type.isRawType() \n\t\t\t&& (this.bits & IgnoreRawTypeCheck) == 0 \n\t\t\t&& scope.compilerOptions().getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore) {\n\t\tscope.problemReporter().rawTypeReference((/*@OwnPar*/ /*@NoRep*/ TypeReference)this, type);\n\t}\t\t\t\n\treturn this.resolvedType = type;\t\n}",
"public void setAccessType(String accessType) {\n this.accessType = Integer.parseInt(accessType);\n }",
"public String resolvePlayAlias( IApplicationInstance appInstance,\n\t\tString name, IClient client )\n\t{\n\t\tgetLogger().info(\"Resolve Play Flash: \" + name);\n\t\ttry\n\t\t{\n\t\t\treturn decryptStreamName( name, client.getIp() );\n\t\t}\n\t\tcatch ( Exception ex )\n\t\t{\n\t\t\tgetLogger().warn( \"Error decrypting stream\", ex );\n\t\t\tsendClientOnStatusError(\n\t\t\t\tclient, \"NetStream.Play.Failed\",\n\t\t\t\tex.getMessage().replaceAll(\": .*\",\"\")\n\t\t\t);\n\t\t\treturn null;\n\t\t}\n\t}",
"private SymbolTableItem resolveFromImports(String id) {\n ListIterator<Imported> i = imports.listIterator(imports.size());\n while(i.hasPrevious()) {\n Imported item = i.previous();\n if (item.fullNamesOnly == false || item.fullNamesOnly && id.startsWith(item.table.unitName)) {\n SymbolTableItem resolved = item.table.resolveImmediateOnly(id);\n if (resolved != null && \n (resolved.desc.visibility == SymbolVisibility.PUBLIC ||\n (resolved.desc.visibility == SymbolVisibility.PROTECTED &&\n item.table.parentNamespace.equals(parentNamespace))))\n return resolved;\n }\n }\n return null;\n }",
"AlphabetNameReference createAlphabetNameReference();",
"public TypeBinding resolveType(BlockScope scope, boolean checkBounds) {\n\tthis.constant = Constant.NotAConstant;\n\tif (this.resolvedType != null) // is a shared type reference which was already resolved\n\t\treturn this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error\n\n\tTypeBinding type = this.resolvedType = getTypeBinding(scope);\n\tif (this.resolvedType == null)\n\t\treturn null; // detected cycle while resolving hierarchy\t\n\tif (!this.resolvedType.isValidBinding()) {\n\t\treportInvalidType(scope);\n\t\treturn null;\n\t}\n\tif (isTypeUseDeprecated(this.resolvedType, scope))\n\t\treportDeprecatedType(scope);\n\ttype = scope.environment().convertToRawType(type);\n\tif (type.isRawType() \n\t\t\t&& (this.bits & IgnoreRawTypeCheck) == 0 \n\t\t\t&& scope.compilerOptions().getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore) {\t\n\t\tscope.problemReporter().rawTypeReference((/*@OwnPar*/ /*@NoRep*/ TypeReference)this, type);\n\t}\t\t\t\n\treturn this.resolvedType = type;\n}",
"public static EnumMoreSwords getType(String name) {\n\n for (EnumMoreSwords swordType : values()) {\n\n if (swordType.swordName.equalsIgnoreCase(name)) {\n\n return swordType;\n }\n }\n\n Constants.LOGGER.info(\"There was an error when attempting to look up \" + name);\n return null;\n }",
"public abstract int getTipoByName(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;",
"public DmcNamedObjectIF findNamedObject(String name){\n\t\tthrow(new IllegalStateException(\"The SchemaManager is designed to work with ambiguous naming. Use DmcObject.resolveReferences(DmcNameResolverWithClashSupportIF, DmcNameClashResolverIF)\\n\\n\" + DebugInfo.getCurrentStack()));\n }",
"public Character get_charac(String name, char type) throws IllegalArgumentException{\n if(check_charac_exist(name)){\n if(type == 'N')\n return (NonPlayableCharacter)this.charac_store.get(name);\n else if(type == 'P')\n return (PlayableCharacter)this.charac_store.get(name);\n else\n throw new IllegalArgumentException();\n }\n else\n throw new IllegalArgumentException();\n }",
"Act getCDAType();",
"public static int getType(String name) {\n if (name == null)\n return UNKNOWN_TYPE;\n Integer i = (Integer) TYPE_MAP.get(name);\n if (i != null) {\n return i.intValue();\n } else {\n return UNKNOWN_TYPE;\n }\n }",
"public TypeAlarme rechercheTypeAlarme(String Num) {\n\t\tint Numero = Integer.parseInt(Num);\n\t\tTypeAlarme T = em.find(TypeAlarme.class, Numero);\n\t\treturn T;\n\t}",
"private Class m16122a(String str) {\n try {\n return Class.forName(str);\n } catch (ClassNotFoundException unused) {\n return null;\n }\n }",
"public String resolveDriverNameBinding() {\n Optional<String> driverTypeName = cache.values().stream()\n .map(objectCreationExpr -> objectCreationExpr.getType().getNameAsString())\n .findFirst();\n\n return driverTypeName.orElse(null);\n }",
"XADLType createXADLType();",
"public Privilege findByName(UserPrivilegeType name);"
] | [
"0.6087455",
"0.59618735",
"0.5809944",
"0.57581747",
"0.56522405",
"0.5582447",
"0.54430157",
"0.54268676",
"0.53512007",
"0.5264008",
"0.5254119",
"0.51733017",
"0.5172064",
"0.51116776",
"0.5087829",
"0.50766534",
"0.50543565",
"0.5012492",
"0.49585792",
"0.49475518",
"0.49407813",
"0.49391964",
"0.49377495",
"0.49350965",
"0.48721302",
"0.48564893",
"0.48544288",
"0.48342374",
"0.48168308",
"0.47982746",
"0.47966486",
"0.47908577",
"0.4776586",
"0.4767323",
"0.47642428",
"0.47554046",
"0.4711319",
"0.47056395",
"0.47046915",
"0.4679699",
"0.46685955",
"0.4637597",
"0.46271342",
"0.46263674",
"0.4624191",
"0.46163926",
"0.4614955",
"0.46038842",
"0.45997417",
"0.45937258",
"0.45912775",
"0.45666504",
"0.45580465",
"0.4554323",
"0.45533806",
"0.45522085",
"0.4549415",
"0.45431206",
"0.4534369",
"0.45303044",
"0.4515912",
"0.4509077",
"0.4493231",
"0.44793564",
"0.44725227",
"0.44714215",
"0.44685346",
"0.44653782",
"0.4458556",
"0.44405112",
"0.4423627",
"0.44226813",
"0.44157436",
"0.44083005",
"0.44059673",
"0.44052204",
"0.44037437",
"0.44008252",
"0.4396798",
"0.43959367",
"0.43954006",
"0.43899837",
"0.43811518",
"0.4375558",
"0.43667352",
"0.4366219",
"0.43651327",
"0.4363878",
"0.43621907",
"0.4357996",
"0.43569615",
"0.4354008",
"0.43529978",
"0.4338485",
"0.43270665",
"0.43226862",
"0.43208197",
"0.43198746",
"0.43046552",
"0.43043053"
] | 0.68841743 | 0 |
db instance =========// METHODS // =========// | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mAlarmId = Constants.DEFAULT_ALARM_ID;
mDb = AppDatabase.getInstance(this);
// Init the data binding object
mDetailBinding = DataBindingUtil.setContentView(this, R.layout.activity_detail);
// Init the save button
Button mMapButton = mDetailBinding.locationDetails.OpenMapButton;
mMapButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onOpenMapButtonClicked();
}
});
LinearLayout ringtone = mDetailBinding.clockDetails.alert;
ringtone.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
pickRingtone();
}
});
// Check for saved state (like after phone orientation change) - and load it
if (savedInstanceState != null) {
if (savedInstanceState.containsKey(INSTANCE_ALARM_ID))
mAlarmId = savedInstanceState.getInt(INSTANCE_ALARM_ID, Constants.DEFAULT_ALARM_ID);
if (savedInstanceState.containsKey(INSTANCE_ALARM_ADDRESS_DATA)) {
mMapDestination = savedInstanceState.getParcelable(INSTANCE_ALARM_ADDRESS_DATA);
}
if (savedInstanceState.containsKey(INSTANCE_ALARM_RINGTONE)) {
mAlarmRingtone = Uri.parse(savedInstanceState.getString(INSTANCE_ALARM_RINGTONE));
}
}
// If ALARM_ID was sent, it is update mode (list item clicked)
Intent intent = getIntent();
if (intent != null && intent.hasExtra(Constants.EXTRA_ALARM_ID)) {
setAlarmData(intent);
}
updateMapImage(true);
setRingtoneName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Object getDB();",
"@Override\r\n public Db_db currentDb(){return curDb_;}",
"public DB getDB() {\n\treturn _db;\n }",
"public DB() {\r\n\t\r\n\t}",
"private void getDatabase(){\n\n }",
"private Db() {\n super(Ke.getDatabase(), null);\n }",
"public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}",
"Database createDatabase();",
"private DbQuery() {}",
"public Database(){\n ItemBox.getLogger().info(\"[Database] protocol version \" + net.mckitsu.itembox.protocol.ItemBoxProtocol.getVersion());\n }",
"@Override\n public void onDbStarted() {\n }",
"public DB getDB() {\n return database;\n }",
"DBConnect() {\n \n }",
"public ODatabaseDocumentTx db();",
"@Override\n\tpublic void initDemoDB() {\n\t}",
"public Database() {\n size = 0;\n tables = new HashMap();\n p = new Parse(this);\n }",
"private void updateDB() {\n }",
"private DBConnection() \n {\n initConnection();\n }",
"public AbysswalkerGame(DataBase db) { this.db = db; }",
"private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }",
"public ValuesDAO(Database db) \n\t{\n\t\tthis.db = db;\n\t}",
"private void connectDatabase(){\n }",
"private TexeraDb() {\n super(\"texera_db\", null);\n }",
"@Override\n public Database getDatabase() {\n return m_database;\n }",
"Database getDataBase() {\n return database;\n }",
"private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}",
"public int dbId() { return dbId; }",
"public abstract ODatabaseInternal<?> openDatabase();",
"public GraphDatabaseService GetDatabaseInstance() {\r\n\t\treturn _db;\r\n\t}",
"public Database() {\n\t\tconn = null;\n\t}",
"public Database initDB() {\n Database db = new Database(\"dataBase.db\");\n\n// db.insertData(\"1 Dragos Dinescu dragos@yahoo.com 0744522600 Digi 10-12-2020\");\n// db.insertData(\"2 Adelina Mirea ademirea@gmail.com 0733651320 Orange 14-10-2020\");\n// db.insertData(\"3 Radu Sorostinean radusoro@gmail.com 0733723321 Digi 1-10-2020\");\n// db.insertData(\"4 Andrei Brasoveanu andreibraso@gmail.com 0732341390 Vodafone 12-11-2020\");\n return db;\n\n //db.deleteFromDB();\n //db.updateDB(\"1 alex radu radu@gmail.com 022256926 orange 10/08/2010\");\n }",
"private DatabaseCustomAccess(Context context) {\n\t\thelper = new SpokaneValleyDatabaseHelper(context);\n\n\t\tsaveInitialPoolLocation(); // save initial pools into database\n\t\tsaveInitialTotalScore(); // create total score in database\n\t\tsaveInitialGameLocation(); // create game location for GPS checking\n\t\tLoadingDatabaseTotalScore();\n\t\tLoadingDatabaseScores();\n\t\tLoadingDatabaseGameLocation();\n\t}",
"private DatabaseRepository() {\n try {\n // connect to database\n\n DB_URL = \"jdbc:sqlite:\"\n + this.getClass().getProtectionDomain()\n .getCodeSource()\n .getLocation()\n .toURI()\n .getPath().replaceAll(\"[/\\\\\\\\]\\\\w*\\\\.jar\", \"/\")\n + \"lib/GM-SIS.db\";\n connection = DriverManager.getConnection(DB_URL);\n mapper = ObjectRelationalMapper.getInstance();\n mapper.initialize(this);\n }\n catch (SQLException | URISyntaxException e) {\n System.out.println(e.toString());\n }\n }",
"public Database getDatabase() {\n return dbHandle;\n }",
"private Database() throws SQLException, ClassNotFoundException {\r\n Class.forName(\"org.postgresql.Driver\");\r\n con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/postgres\", \"postgres\", \"kuka\");\r\n }",
"DatabaseController() {\n\n\t\tloadDriver();\n\t\tconnection = getConnection(connection);\n\t}",
"private DatabaseHandler(){\n createConnection();\n }",
"public DbUtil() {}",
"public void setDatabase(Connection _db);",
"public DB getDatabase(){\n\t\treturn database;\n\t}",
"public ConexionDB() {\n\n\t\tconn = null;\n\n\t}",
"public FakeDatabase() {\n\t\t\n\t\t// Add initial data\n\t\t\n//\t\tSystem.out.println(authorList.size() + \" authors\");\n//\t\tSystem.out.println(bookList.size() + \" books\");\n\t}",
"public Database() {\n if (init) {\n\n //creating Transaction data\n Transaction transactionOne\n = new Transaction(1, \"Debit\", \"Spar Grocery\", 54.68,1);\n\n transactionDB.add(transactionOne);\n\n // Creating an Account data\n Account accountOne = new Account(1, 445, 111111111, \"Savings\",\n 1250.24, transactionDB);\n\n accountDB.add(accountOne);\n\n //creating withdrawal data\n Withdrawal withdrawalOne = new Withdrawal(1, 64422545, 600.89);\n withdrawalDB.add(withdrawalOne);\n\n //creating transfer data\n Transfer transferOne = new Transfer(1, 25252525, 521.23);\n transferDB.add(transferOne);\n\n //creating lodgement data\n Lodgement lodgementOne = new Lodgement(1, 67766666, 521.23);\n lodgementDB.add(lodgementOne);\n\n //add Customer data \n Customer customerOne\n = new Customer(1, \"Darth Vader\", \"DarthVader@deathStar.com\",\n \"Level 5, Suit Dark\", \"darkSideIsGoodStuff\",\n accountDB, withdrawalDB, transferDB, lodgementDB);\n\n customerDB.add(customerOne);\n\n init = false;\n }\n }",
"private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}",
"public ConnectDB(){\r\n\r\n\t}",
"public RepoSQL() { // constructor implicit\r\n\t\t super();\r\n\t }",
"@Override\r\n\tpublic boolean supportsDb(String type) {\r\n \treturn true;\r\n }",
"DataBase createDataBase();",
"private Connection dbacademia() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public Persistence() {\n\t\tconn = dbConnection();\n\t}",
"private DatabaseContext() {\r\n datastore = createDatastore();\r\n init();\r\n }",
"private DB getDB() {\n\t\tServletContext context = this.getServletContext();\n\t\tsynchronized (context) {\n\t\t\tDB db = (DB)context.getAttribute(\"DB\");\n\t\t\tif(db == null) {\n\t\t\t\tdb = DBMaker.newFileDB(new File(\"db\")).closeOnJvmShutdown().make();\n\t\t\t\tcontext.setAttribute(\"DB\", db);\n\t\t\t}\n\t\t\tcheckAdminInDB(db);\n\t\t\tcheckCategoriaInDB(db);\n\t\t\treturn db;\n\t\t}\n\t}",
"@Test\n public void test() throws SQLException {\n System.out.println(new MyDbutilsDemo().load(12));\n }",
"public SpokaneValleyDatabaseHelper getDatabase() {\n\t\treturn helper;\n\t}",
"public sqlDatabase() {\n }",
"public static DatabaseConnection getDb() {\n return db;\n }",
"public String getDb() {\n return db;\n }",
"public String getDb() {\n return db;\n }",
"yandex.cloud.api.mdb.mongodb.v1.DatabaseOuterClass.DatabaseSpec getDatabaseSpec();",
"public ODatabaseInternal<?> db() {\n return ODatabaseRecordThreadLocal.INSTANCE.get().getDatabaseOwner();\n }",
"private OpenSimDB() {\n instance = this;\n }",
"protected abstract ODatabaseInternal<?> newDatabase();",
"@Override\n\tpublic void closeDB()\n\t{\n\n\t}",
"private void initDb() {\n\t\tif (dbHelper == null) {\n\t\t\tdbHelper = new DatabaseOpenHelper(this);\n\t\t}\n\t\tif (dbAccess == null) {\n\t\t\tdbAccess = new DatabaseAccess(dbHelper.getWritableDatabase());\n\t\t}\n\t}",
"public interface DBContext {\n <E> boolean persist(E entity) throws SQLException, IllegalAccessException;\n\n <E> Iterable<E> find(Class<E> table) throws SQLException, IllegalAccessException, ClassNotFoundException, InstantiationException;\n\n <E> Iterable<E> find(Class<E> table, String where) throws SQLException, IllegalAccessException, ClassNotFoundException, InstantiationException;\n\n <E> E findFirst(Class<E> table) throws SQLException, IllegalAccessException, InstantiationException;\n\n <E> E findFirst(Class<E> table, String where) throws SQLException, IllegalAccessException, InstantiationException;\n\n void closeConn() throws SQLException ;\n}",
"public DBManager(){\r\n connect(DBConstant.driver,DBConstant.connetionstring);\r\n }",
"public ODatabaseDocumentTx getOrCreateDB();",
"public Database<T> getDatabase();",
"private void configureDB() {\n\t\tmDb = mDbHelper.getWritableDatabase();\n\t}",
"public Database() {\n //Assign instance variables.\n this.movies = new ArrayList<>();\n this.users = new ArrayList<>();\n }",
"public FamilyPlaningSupplyItemDB(ConnectionInf db)\n {\n theConnectionInf=db;\n dbObj = new FamilyPlaningSupplyItem();\n initConfig();\n }",
"public DatabaseClient getDb() {\n return db;\n }",
"public Driving getDB() {\n\t\treturn this.db;\n\t}",
"public Database(Context context)\n\t{\n\t\t/* Instanciation de l'openHelper */\n\t\tDBOpenHelper helper = new DBOpenHelper(context);\n\t\t\n\t\t/* Load de la database */\n\t\t//TODO passer en asynchrone pour les perfs\n\t\tmainDatabase = helper.getWritableDatabase();\n\t\t\n\t\t/* DEBUG PRINT */\n\t\tLog.i(\"info\", \"Database Loading Suceeded\");\n\t}",
"public PostDatabase() {\r\n\ttry {\r\n\t Class.forName(DRIVER);\r\n\t db = DriverManager.getConnection(URI);\r\n\t Statement create = db.createStatement();\r\n\t create.execute(\"CREATE TABLE IF NOT EXISTS posts ( id INTEGER PRIMARY KEY, author TEXT, date INTEGER, isPublic INTEGER, content TEXT );\");\r\n\t} catch (ClassNotFoundException e) {\r\n\t System.err.println(\"Caught exception while attempting to use database driver: \" + e.getMessage());\r\n\t} catch (SQLException e) {\r\n\t System.err.println(\"Caught exception while doing something to the database: \" + e.getMessage());\r\n\t}\r\n }",
"private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}",
"private ServerError updateDatabase() {\n return updateDatabase(WebConf.DB_CONN, WebConf.JSON_OBJECTS, WebConf.DEFAULT_VERSION);\r\n }",
"protected static Database getInstance() {\n if (instance == null) {\n instance = new Database();\n }\n return instance;\n }",
"public Database(Context context) { \n\t\tsuper( context, database_MEF, null, 2); \n\t}",
"private void ini_SelectDB()\r\n\t{\r\n\r\n\t}",
"DatabaseConnector getConnector() {return db;}",
"public static synchronized Database get() {\n return instance;\n }",
"public DataHandlerDBMS() {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tDBMS = DriverManager.getConnection(url);\n\t\t\tSystem.out.println(\"DBSM inizializzato\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Errore apertura DBMS\");\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Assenza driver mySQL\");\n\t\t}\n\t}",
"public ArtistDb(Connection connection) {\r\n super(connection);\r\n }",
"public DatabaseHandler(Context context){\n super(context, \"tienda.db\", null, 1);\n }",
"private DBManager() throws Exception {\n file = new File(\"pdfLibraryDB.mv.db\");\n if (!file.exists()) {\n conn = connect();\n stmt = conn.createStatement();\n query = \"CREATE TABLE user(username VARCHAR(30) PRIMARY KEY, password VARCHAR(32));\" +\n \"CREATE TABLE category(id VARCHAR(30) PRIMARY KEY, name VARCHAR(30), username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE);\"+\n \"CREATE TABLE favorite(id VARCHAR(30) PRIMARY KEY, path VARCHAR(500), keyword VARCHAR(200), searchType VARCHAR(10), category VARCHAR(30),username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY(category) REFERENCES category(id) ON UPDATE CASCADE ON DELETE CASCADE);\" +\n \"CREATE TABLE history(id VARCHAR(30) PRIMARY KEY, keyword VARCHAR(200), type VARCHAR(10), directory VARCHAR(500), username VARCHAR(30), FOREIGN KEY(username) REFERENCES user(username) ON UPDATE CASCADE ON DELETE CASCADE);\";\n stmt.executeUpdate(query);\n stmt.close();\n conn.close();\n System.out.println(\"DB created!\");\n }\n }",
"public static synchronized NoteDatabase getInstance(Context context){\n if(instance == null){//Instantiate if instance is null\n instance = Room.databaseBuilder(context.getApplicationContext(),NoteDatabase.class,\"note_database\")\n .fallbackToDestructiveMigration()\n .addCallback(roomCallBack)\n .build();\n }\n return instance;\n }",
"public DatabaseAccess(Context context) {\n this.openHelper = new OlpbhtbDatabase(context);\n }",
"protected DaoRWImpl() {\r\n super();\r\n }",
"private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}",
"DatabaseInformationFull(Database db) {\n super(db);\n }",
"public SoilMoistureDB() {\n\t\tsuper();\n\t\tLocalDateTime nowTime = LocalDateTime.now();\n\t\tthis.setReadTime(nowTime);\n\t}",
"public static DbHandler getInstance()\n\t{\n\t\treturn instance;\n\t}",
"public abstract void loadFromDatabase();",
"public String getDatabase();",
"public static void test()\n\t{\n\t Environment myDbEnvironment = null;\n\t Database myDatabase = null;\n\n\t /* OPENING DB */\n\n\t // Open Database Environment or if not, create one.\n\t EnvironmentConfig envConfig = new EnvironmentConfig();\n\t envConfig.setAllowCreate(true);\n\t myDbEnvironment = new Environment(new File(\"db/\"), envConfig);\n\n\t // Open Database or if not, create one.\n\t DatabaseConfig dbConfig = new DatabaseConfig();\n\t dbConfig.setAllowCreate(true);\n\t dbConfig.setSortedDuplicates(true);\n\t myDatabase = myDbEnvironment.openDatabase(null, \"schema\", dbConfig);\n\n\t Cursor cursor = null;\n\t /* GET <K,V > FROM DB */\n\t DatabaseEntry foundKey = new DatabaseEntry();\n\t DatabaseEntry foundData = new DatabaseEntry();\n\n\t cursor = myDatabase.openCursor(null, null);\n\t cursor.getFirst(foundKey, foundData, LockMode.DEFAULT);\n\n\t do {\n\t try {\n\t String keyString = new String(foundKey.getData(), \"UTF-8\");\n\t String dataString = new String(foundData.getData(), \"UTF-8\");\n\t System.out.println(\"<\" + keyString + \", \" + dataString + \">\");\n\t } catch (UnsupportedEncodingException e) {\n\t e.printStackTrace();\n\t }\n\t } while (cursor.getNext(foundKey, foundData, LockMode.DEFAULT) == OperationStatus.SUCCESS);\n\t if (cursor != null) cursor.close();\n\t System.out.println(\"-----\");\n\t \n\t if (myDatabase != null) myDatabase.close();\n\t if (myDbEnvironment != null) myDbEnvironment.close();\n\t}",
"@Override\r\n @SuppressWarnings(\"empty-statement\")\r\n public Db_db selectDb(Db_db db)\r\n {\r\n Db_db returnValue = null;\r\n if(curDb_ != null && (curDb_.getName() == null ? db.getName() == null : curDb_.getName().equals(db.getName())))\r\n {\r\n returnValue = curDb_;\r\n }\r\n else\r\n {\r\n try\r\n {\r\n Connection newCon;\r\n if((newCon = this.connections_.get(db))!=null)\r\n {\r\n this.curDb_ = db;\r\n this.curConnection_ = newCon;\r\n returnValue = db;\r\n }\r\n else\r\n {\r\n if(setupConnection(db, Boolean.FALSE) != null)\r\n {\r\n returnValue = db;\r\n }\r\n }\r\n }catch(Exception e){};\r\n }\r\n \r\n return returnValue;\r\n }",
"public Database(String dbName) {\n this.dbName = dbName;\n }",
"public String getDBString();",
"public KVDatabase() {\n //private constructor to prevent instantiation.\n }",
"private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\tdatabase = DatabaseHelperFactory.getInstance();\r\n\t}"
] | [
"0.724839",
"0.7133187",
"0.68746966",
"0.68362606",
"0.6820639",
"0.67652935",
"0.66539425",
"0.66487724",
"0.6631093",
"0.6584926",
"0.65564966",
"0.6551844",
"0.6547353",
"0.65453994",
"0.64788276",
"0.6458635",
"0.64537066",
"0.64407945",
"0.6430379",
"0.6421652",
"0.64072996",
"0.64062697",
"0.6372323",
"0.63683325",
"0.635525",
"0.6350007",
"0.63435036",
"0.63292694",
"0.63173056",
"0.63122636",
"0.63114226",
"0.6310216",
"0.6302851",
"0.6295793",
"0.62954205",
"0.62849426",
"0.6277953",
"0.62774926",
"0.6269784",
"0.6261304",
"0.62582445",
"0.624464",
"0.6223417",
"0.6219772",
"0.62121737",
"0.6209862",
"0.62074816",
"0.6202302",
"0.61961114",
"0.61946595",
"0.6193296",
"0.61776745",
"0.61767554",
"0.61726886",
"0.617022",
"0.6169852",
"0.616186",
"0.616186",
"0.6143366",
"0.6142333",
"0.61396563",
"0.6134569",
"0.61303836",
"0.6128653",
"0.61272264",
"0.61234176",
"0.61195153",
"0.61042154",
"0.61036766",
"0.61017144",
"0.6100362",
"0.6089164",
"0.6085362",
"0.6070892",
"0.60706604",
"0.60671556",
"0.6064455",
"0.6064076",
"0.60588586",
"0.6049232",
"0.60491294",
"0.6034354",
"0.6032721",
"0.6028675",
"0.6025188",
"0.6024061",
"0.6009557",
"0.60087454",
"0.6000735",
"0.6000462",
"0.59977514",
"0.5996873",
"0.599152",
"0.5976833",
"0.596086",
"0.5960641",
"0.5955181",
"0.5952321",
"0.59470826",
"0.59386045",
"0.59381986"
] | 0.0 | -1 |
Save alarm ID to state (to keep it in case of phone orientation change for example) | @Override
protected void onSaveInstanceState(Bundle outState) {
outState.putParcelable(INSTANCE_ALARM_ADDRESS_DATA, mMapDestination);
outState.putInt(INSTANCE_ALARM_ID, mAlarmId);
if(mAlarmRingtone != null)
outState.putString(INSTANCE_ALARM_RINGTONE, mAlarmRingtone.toString());
super.onSaveInstanceState(outState);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setAlarm() {\n\t\tid.toAlarm();\n\t}",
"private static void saveAlarm(\n Context context, int id, boolean enabled, int hour, int minute,\n Alarm.DaysOfWeek daysOfWeek, boolean vibrate, String label,\n String alert, boolean popToast) {\n if (Log.LOGV) Log.v(\"** saveAlarm \" + id + \" \" + label + \" \" + enabled\n + \" \" + hour + \" \" + minute + \" vibe \" + vibrate);\n\n // Fix alert string first\n long time = Alarms.setAlarm(context, id, enabled, hour, minute, daysOfWeek, vibrate, label, alert);\n \n }",
"private void saveRingtone() {\n \tif(((GotoRingtoneActivity.musicID!=-1)&&(GotoRingtoneActivity.musicActivity==0))){\n \t\tsendToService();\n \t}\n \t// PR 587415 - Neo Skunkworks - Soar Gao - 001 end\n SharedPreferences sharedPre = getSharedPreferences(\n RingtoneList.TIMER_RPREFERENCES,\n 0);\n// PR 587415 - Neo Skunkworks - Soar Gao - 001 begin\n/*\n if (!mFilePath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, mPreRingtone)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, mFilePath)\n .putInt(\"mSystemPosition\", mSystemPosition)\n .commit();\n }\n Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n mPreRingtone);\n String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n mFilePath);\n*/\n if (!GotoRingtoneActivity.musicPath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, GotoRingtoneActivity.musicName)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, GotoRingtoneActivity.musicPath)\n .putInt(\"mSystemPosition\", GotoRingtoneActivity.musicID)\n .commit();\n }\n Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n \t\tGotoRingtoneActivity.musicName);\n String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n \t\tGotoRingtoneActivity.musicPath);\n// PR 587415 - Neo Skunkworks - Soar Gao - 001 end\n mIntent.putExtra(\"ringtone\", ringtoneName);\n mIntent.putExtra(\"ringtonePath\", ringtonePath);\n mIntent.putExtra(\"ringtonePosition\", mSystemPosition);\n sendBroadcast(mIntent);\n stopService(new Intent(this, MediaPlayerService.class));\n }",
"public void setAlarm (int alarm) { this.alarm = alarm; }",
"public void saveAlarms(String Epillname, Date date) {\n Gson gson = new Gson();\n String record = gson.toJson(date, Date.class);\n SharedPreferences sp = mContext.getSharedPreferences(\"alarmInfo\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n editor.putString(Epillname, record);\n editor.commit();\n }",
"private void saveState() {\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n // Store our count..\n editor.putInt(\"count\", this._tally);\n\n // Save changes\n editor.commit();\n }",
"public void update_storage( ) {\n SharedPreferences sp_file = getPreferences(Context.MODE_PRIVATE); //make shared preferences object\n SharedPreferences.Editor editor = sp_file.edit(); //make editor object\n editor.putInt(\"alarm_set\", alarm_set);\n editor.apply();\n }",
"public void setAlarm(Context context, Alarm alarm) {\n // instantiate the system alarm service manager\n alarmMgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n // instantiate an intent for the AlarmReciever\n Intent intent = new Intent(context, AlarmReceiver.class);\n // pass the alarm id as an extra to be extracted in the receivier\n intent.putExtra(\"alarmID\", alarm.getId());\n // check if the alarm is on\n if (alarm.isOn()) {\n // if so check if it is recurring\n if (alarm.isRecurring()) {\n // for each day stipulated in the alarm, schedule an new alarm, each alarm id will\n // be multiplied with 10 and then an integer representation of each day will be\n // added i.e. alarm id = 10 and days a Sun = 1, Mon = 2... Sat = 7 therefore\n // sun alarm id = 101, Mon alarm id = 102... Sat alarm id = 107.\n for (Integer day : alarm.getDays()) {\n //multiply by 10 to uniquely identify the intent for each day or ends with 0 if not recurring\n alarmIntent = PendingIntent.getBroadcast(context, new BigDecimal(alarm.getId() * 10).intValueExact() + day, intent, 0);\n // instantiate a calander object\n Calendar calendar = Calendar.getInstance();\n // set to the current system time\n calendar.setTimeInMillis(System.currentTimeMillis());\n // set the calender day to day i.e. sun = 1, mon = 2 etc...\n calendar.set(Calendar.DAY_OF_WEEK, day);\n // set the calendar hour to alarm hour\n calendar.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n // as per hour, set to alarm minutes\n calendar.set(Calendar.MINUTE, new Integer(alarm.getMin()));\n // set seconds to 0 alarm activates close to 0th second of minute\n calendar.set(Calendar.SECOND, 0);\n // as alarm is recurring schedule the alarm to repeat every 7 day from set time\n // specified by alarm set calendar object\n alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY * 7, alarmIntent);\n }\n } else {\n // if the alarm is not recurring\n // uniquely identify the intent for each day and ends with 0 if not recurring\n alarmIntent = PendingIntent.getBroadcast(context, new BigDecimal(alarm.getId() * 10).intValueExact(), intent, 0);\n // get a calendar object\n Calendar calNow = Calendar.getInstance();\n // set the time to current system time\n calNow.setTimeInMillis(System.currentTimeMillis());\n // get a second instance of calendar\n Calendar calSet = (Calendar) calNow.clone();\n // set the time of the calendar object to the alarm specified time\n calSet.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n calSet.set(Calendar.MINUTE, new Integer(alarm.getMin()));\n calSet.set(Calendar.SECOND, 0);\n // check if the alarm specified time is set to before the current time\n if (calSet.compareTo(calNow) <= 0) {\n //Today Set time passed, count to tomorrow\n calSet.add(Calendar.DATE, 1);\n }\n // set the alarm to activate at once at the calendar specified time\n alarmMgr.setExact(AlarmManager.RTC_WAKEUP,\n calSet.getTimeInMillis(), alarmIntent);\n }\n }\n }",
"private void setAlarmData(Intent intent) {\n if (mAlarmId == Constants.DEFAULT_ALARM_ID) {\n\n mAlarmId = intent.getIntExtra(Constants.EXTRA_ALARM_ID, Constants.DEFAULT_ALARM_ID);\n // factory view model is used for sending parameters to the view model in our case\n // with alarm entry id to make sure we have one entity on our viewModel\n DetailViewModelFactory factory = new DetailViewModelFactory(mDb, mAlarmId);\n mViewModel =\n ViewModelProviders.of(this, factory).get(DetailViewModel.class);\n\n // Observe changes in model in order to update UI\n mViewModel.getAlarm().observe(this, new Observer<AlarmEntry>() {\n @Override\n public void onChanged(@Nullable AlarmEntry alarmEntry) {\n mViewModel.getAlarm().removeObserver(this);\n if (alarmEntry == null) {\n return;\n }\n mAlarmId = alarmEntry.getId();\n mMapDestination =\n new MapDestination(alarmEntry.getLatitude(), alarmEntry.getLongitude(),\n alarmEntry.getLocation(), alarmEntry.getRadius());\n mAlarmRingtone = alarmEntry.getAlert() != null ? Uri.parse(alarmEntry.getAlert()) : null;\n\n // populate the UI\n populateUI(alarmEntry);\n }\n });\n }\n }",
"@Override\n public void onClick(View v) {\n if(v.getId() == R.id.alarmCheck){\n // Put extras for RingtoneService\n myIntent.putExtra(\"extra\", \"no\");\n myIntent.putExtra(\"extra1\", \"main\");\n cal = Calendar.getInstance();\n // Get the time for the alarm at the index\n String tempTime = App.getTimes().get(indexofIntent);\n String[] times = tempTime.split(\":\");\n // Get the hour and minute from the string and set them to int\n int hour = Integer.parseInt(times[0]);\n int minute = Integer.parseInt(times[1]);\n // Set the alarm time\n cal.setTimeInMillis(System.currentTimeMillis());\n cal.set(Calendar.HOUR_OF_DAY, hour);\n cal.set(Calendar.MINUTE, minute);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n // State pattern used here\n state = new CreateState();\n manager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // add 24 hours\n cal.setTimeInMillis(cal.getTimeInMillis() + 86400000);\n // set the reciever\n Intent intent = new Intent(this.getApplicationContext(), AlarmReceiver.class);\n intent.putExtra(\"extra\", \"yes\");\n intent.putExtra(\"index\", indexofIntent);\n // Create a new intent\n PendingIntent pending = PendingIntent.getBroadcast(this.getApplicationContext(), App.getIds(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n // Overwrite the correct intent at the index\n App.setIntentAtIndex(indexofIntent, pending);\n App.setIds(App.getIds() + 1);\n // Handle the alarm\n // State pattern used here\n state.handle(manager, pending, cal, false);\n // Turn off ringtone\n sendBroadcast(myIntent);\n\n }\n // If snoozed then stop the media player and set the timer/calendar to 10 minutes\n else if(v.getId() == R.id.snooze){\n // Put extras for RingtoneService\n myIntent.putExtra(\"extra\", \"no\");\n myIntent.putExtra(\"extra1\", \"main\");\n // initialize AlarmManager\n manager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // set the state\n // State pattern used here\n state = new SnoozeState();\n cal = Calendar.getInstance();\n // Get the time the alarm was set\n String tempTime = App.getTimes().get(indexofIntent);\n String[] times = tempTime.split(\":\");\n int hour = Integer.parseInt(times[0]);\n int minute = Integer.parseInt(times[1]);\n // Set calendar to time initially set\n cal.setTimeInMillis(System.currentTimeMillis());\n cal.set(Calendar.HOUR_OF_DAY, hour);\n cal.set(Calendar.MINUTE, minute);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n // Create a new intent for alarm receiver\n Intent intent = new Intent(this.getApplicationContext(), AlarmReceiver.class);\n // Add extras for RingtoneService\n intent.putExtra(\"extra\", \"yes\");\n intent.putExtra(\"index\", indexofIntent);\n // Create a new intent wiht the BroadcastReceiver\n PendingIntent pending = PendingIntent.getBroadcast(this.getApplicationContext(), App.getIds(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n // Set the new intent in the list\n App.setIntentAtIndex(indexofIntent, pending);\n App.setIds(App.getIds() + 1);\n // handle the snooze state\n // State pattern used here\n state.handle(manager, pending, cal, false);\n //send a toast to the user letting them know it will snooze for 10 minutes\n Toast t = Toast.makeText(getApplicationContext(), \"Alarm Snoozed for 10 minutes\",\n Toast.LENGTH_SHORT);\n t.setGravity(Gravity.FILL_HORIZONTAL, 10, 1500);\n t.show();\n // Stop the current ringtone\n sendBroadcast(myIntent);\n }\n }",
"public void setAlarm(AlarmTime alarm){\r\n\t\t//write to XML file\r\n\t\txmanager.write(alarm);\r\n\t\talarmList.add(alarm);\r\n\t}",
"@Override\r\n\tpublic void saveAlarm(String uniqueCode, Alarm alarm) {\n\t\tinterfaceAlarmDao.saveDevice(uniqueCode, alarm);\r\n\t}",
"public void setAlarm(int time, String name){\n\t}",
"private void saveDefaultRing(){\n \t SharedPreferences sharedPre = getSharedPreferences(\n RingtoneList.TIMER_RPREFERENCES,\n 0);\n \t if (!GotoRingtoneActivity.musicPath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, GotoRingtoneActivity.musicName)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, GotoRingtoneActivity.musicPath)\n .putInt(\"mSystemPosition\", GotoRingtoneActivity.musicID)\n .commit();\n }\n \t// PR 590654 - Neo Skunkworks - Soar Gao - 001 begin\n// Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n// String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n// \t\tGotoRingtoneActivity.musicName);\n// String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n// \t\tGotoRingtoneActivity.musicPath);\n// mIntent.putExtra(\"ringtone\", ringtoneName);\n// mIntent.putExtra(\"ringtonePath\", ringtonePath);\n// mIntent.putExtra(\"ringtonePosition\", mSystemPosition);\n// sendBroadcast(mIntent);\n \t// PR 590654 - Neo Skunkworks - Soar Gao - 001 end\n }",
"public int getAlarmStatus() {\n return alarmStatus;\n }",
"public boolean alarm_is_set( ) {\n SharedPreferences sp_file = getPreferences( Context.MODE_PRIVATE ); //make shared preferences object\n alarm_set = sp_file.getInt( \"alarm_set\", -1 ); //get number of alarms set\n if( alarm_set < 0 ) { //if empty we make a new field called alarm_set\n SharedPreferences.Editor editor = sp_file.edit( );\n editor.putInt( \"alarm_set\", 0 );\n editor.apply( );\n return false;\n }\n return alarm_set == 1;\n }",
"@Override\r\n public void onClick(View v) {\n Alarm alarm = new Alarm(getContext(), userId);\r\n alarm.setAlarmWithNewPracticeTimes();\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch (id){\n case R.id.action_save:\n ahour = timer.getCurrentHour();\n amin = timer.getCurrentMinute();\n if ( ahour < 10) {\n shour = \"0\" + String.valueOf(ahour);\n } else {\n shour = String.valueOf(ahour);\n }\n if (amin < 10) {\n smin = \"0\" + String.valueOf(amin);\n } else {\n smin = String.valueOf(amin);\n }\n stime = shour + \":\" + smin;\n am = new MyAlarmManager(getApplicationContext());\n\n if (shour == null || smin ==null) {\n Toast.makeText(\n this,\n \"Please enter timer\",\n Toast.LENGTH_LONG\n ).show();\n } else {\n ContentValues values = new ContentValues();\n values.put(MyContract.Alarms.COLUMN_TIME, stime);\n\n\n // updated\n\n Uri uri = ContentUris.withAppendedId(MyContentprovider.CONTENT_URI, timeId);\n String selection = MyContract.Alarms.COLUMN_ID + \" = ?\";\n String[] selectionArgs = new String[] { Long.toString(timeId) };\n getContentResolver().update(\n uri,\n values,\n selection,\n selectionArgs\n );\n\n\n Intent intent = new Intent(EditActivity.this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n am.setAlarm();\n startActivity(intent);\n finish();\n }\n\n break;\n case R.id.action_delete:\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);\n alertDialog.setTitle(\"アラーム削除\");\n alertDialog.setMessage(\"このアラームを削除してもいいですか?\");\n\n alertDialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n am = new MyAlarmManager(getApplicationContext());\n Uri uri = ContentUris.withAppendedId(MyContentprovider.CONTENT_URI, timeId);\n String selection = MyContract.Alarms.COLUMN_ID + \" = ?\";\n String[] selectionArgs = new String[] { Long.toString(timeId) };\n getContentResolver().delete(\n uri,\n selection,\n selectionArgs\n );\n\n Intent intent = new Intent(EditActivity.this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n am.setAlarm();\n startActivity(intent);\n finish();\n }\n }).show();\n\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"void setTestAlarm() \n {\n \t// start with now\n java.util.Calendar c = java.util.Calendar.getInstance();\n c.setTimeInMillis(System.currentTimeMillis());\n\n int nowHour = c.get(java.util.Calendar.HOUR_OF_DAY);\n int nowMinute = c.get(java.util.Calendar.MINUTE);\n\n int minutes = (nowMinute + 1) % 60;\n int hour = nowHour + (nowMinute == 0 ? 1 : 0);\n\n saveAlarm(this, mId, true, hour, minutes, mRepeatPref.getDaysOfWeek(),\n true, \"\", mAlarmPref.getAlertString(), true);\n }",
"public int updateAlarm(String name, int hour, int minute, int state, int id) {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n\n values.put(KEY_NAME, name);\n values.put(KEY_HOUR, hour);\n values.put(KEY_MINUTE, minute);\n values.put(KEY_STATE, state);\n\n int rowIdUpdated = database.update(TABLE_NAME,\n values,\n KEY_ID + \"= ?\",\n new String[]{String.valueOf(id)});\n\n database.close();\n return rowIdUpdated;\n }",
"int updateByPrimaryKey(SBCallAlarm record);",
"@Override\n public void onClick(View v) {\n\n if(wake!=null && sleep!=null){\n int id= db.insertSleepReminder(\"\"+sleep.getTimeInMillis(),\"\"+wake.getTimeInMillis());\n Intent intent = new Intent(AddSleep.this, UnlockReceiver.class);\n intent.putExtra(\"wake_up\",\"\"+wake.getTimeInMillis());\n intent.putExtra(\"sleep\",\"\"+sleep.getTimeInMillis());\n intent.putExtra(\"id\",\"\"+id );\n\n PendingIntent intent1 = PendingIntent.getBroadcast(AddSleep.this,id,intent,PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);\n alarmManager.setExact(AlarmManager.RTC, sleep.getTimeInMillis(),intent1);\n\n intent = new Intent(AddSleep.this, WakeUpReceiver.class);\n intent.putExtra(\"wake_up\",\"\"+wake.getTimeInMillis());\n intent.putExtra(\"sleep\",\"\"+sleep.getTimeInMillis());\n intent.putExtra(\"id\",\"\"+id);\n\n intent1 = PendingIntent.getBroadcast(AddSleep.this,id,intent,PendingIntent.FLAG_UPDATE_CURRENT);\n\n alarmManager.setExact(AlarmManager.RTC, wake.getTimeInMillis(),intent1);\n\n Intent intent2 = new Intent(AddSleep.this,Reminder.class);\n startActivity(intent2);\n finish();} else\n {\n Toast.makeText(AddSleep.this,\"Please,Enter Sleep and Wake Up Time!\",Toast.LENGTH_SHORT).show();\n\n }\n\n\n }",
"public void setNextAlarm(){\n }",
"public void onCallStateChanged(int state, String incomingNumber) {\n if (state == 2) {\n\n String msg = \" New Phone Call Event. Incoming Number : \"+incomingNumber;\n int mID = 1;\n long when = System.currentTimeMillis();\n NotificationManager notificationManager = (NotificationManager) context\n .getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent notificationIntent = new Intent(context, afterCall.class);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,\n notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n\n Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n writeToFile(2, Calendar.getInstance().getTime().toString(), context);\n NotificationCompat.Builder mNotifyBuilder = new NotificationCompat.Builder(\n context).setSmallIcon(R.drawable.ic_launcher)\n .setContentTitle(\"Phone Call Made\")\n .setContentText(\"Touch to Take Survey\")\n .setSound(alarmSound)\n .setAutoCancel(true).setWhen(when)\n .setContentIntent(pendingIntent)\n .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000});\n notificationManager.notify(mID,mNotifyBuilder.build());\n mID++;\n\n }\n }",
"public void onClick(View v) \n {\n mEnabled = true;\n saveAlarm();\n finish();\n }",
"@Override\n protected void onSaveInstanceState(@NonNull Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putString(KEY_VERIFICATION_ID,mVerificationId);\n }",
"@Override\n public void onSaveInstanceState(Bundle outState) {\n //saves mEventId and the time in milliseconds by putting it in a bundle\n outState.putInt(INSTANCE_EVENT_ID, mEventId);\n outState.putLong(INSTANCE_TIME, mDueDateCalendar.getTimeInMillis());\n super.onSaveInstanceState(outState);\n }",
"private void setAlarm(Alarm alarm, int flags) {\n // this set alarm based on TimePicker so we need to set Calendar like the\n // trigger time\n // get instant of Calendar\n Calendar myCalendar = Calendar.getInstance();\n Calendar calendar = (Calendar) myCalendar.clone();\n // set current hour for calendar\n calendar.set(Calendar.HOUR_OF_DAY, alarm.getHour_x());\n // set current minute\n calendar.set(Calendar.MINUTE, alarm.getMinute_x());\n // set current second for calendar\n calendar.set(Calendar.SECOND, 0);\n // plus one day if the time set less than the the Calendar current time\n if (calendar.compareTo(myCalendar) <= 0) {\n calendar.add(Calendar.DATE, 1);\n }\n // get id of alarm and set for PendingIntent to multiply multiple PendingIntent for cancel\n // time, this also put into PendingIntent to compare with the cancel Alarm's id=\n int alarmId = (int) alarm.getId();\n // make intent to broadCast\n Intent intent = new Intent(AlarmsetActivity.this, AlarmReceiver.class);\n // put intent type to check which intent trigger add or cancel\n intent.putExtra(\"intentType\", Constants.ADD_INTENT);\n // put id to intent\n intent.putExtra(\"PendingId\", alarmId);\n // this pendingIntent include alarm id to manage\n PendingIntent alarmIntent = PendingIntent.getBroadcast(AlarmsetActivity.this, alarmId,\n intent, flags);\n // create alarm manager ALARM_SERVICE\n AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // Set alarm, at the trigger time \"calandar.getTimeInMillis\" this pendingIntent will be\n // sent to AlarmReceiver and then sent to alarm service to play music\n // this \"AlarmManager.INTERVAL_DAY\" mean this will set one new alarm at the trigger time\n // setInExactRepeating this may set alarm again and again also this may be not\n // trigger at the right time( at the first second start) but this will save the battery.\n // \"AlarmManager.RTC_WAKEUP\" allow this app wake device from idle time and the time\n // based on device time\n\n alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, alarmIntent);\n\n }",
"private void saveData() {\n // Save data to ReminderData class\n reminderData.setMinutes(timePicker.getMinute());\n reminderData.setDataHours(timePicker.getHour());\n reminderData.setNotificationText(reminderText.getText().toString());\n reminderData.saveDataToSharedPreferences();\n }",
"@Override\n public void onPause() {\n \t\t//Save settings Enabled, Alarm Hour, Alarm Minute\n SharedPreferences settings = getSharedPreferences(MainActivity.PREFS_NAME, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(MainActivity.ALARM_ENABLED, AlarmEnabled);\n editor.putInt(MainActivity.SNOOZE_MINUTE, SnoozeMin);\n \n //Commit the edits\n editor.commit();\n \n super.onPause();\n }",
"public void on_toggle( View view ) {\n if ( toggle.isChecked( ) ) { //if it just toggled on\n Calendar calendar = Calendar.getInstance( ); //get a calendar object\n calendar.set( Calendar.HOUR_OF_DAY, time_picker.getHour( ) ); //set the hour\n calendar.set( Calendar.MINUTE, time_picker.getMinute( ) ); //set the minute\n calendar.set( Calendar.SECOND, 0 ); //set seconds\n Intent intent = new Intent( Alarm.this, AlarmReceiver.class ); //make the intent to alarm receiver\n final EditText edit = ( EditText ) this.findViewById( R.id.reminder_text );\n final String text = edit.getText( ).toString( );\n intent.putExtra( \"msg\", text ); //put the user message in the intent\n pending_intent = PendingIntent.getBroadcast( Alarm.this, 0, intent, 0 ); //get pending intent from intent\n alarm_manager.setExact( AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis( ), pending_intent );\n alarm_set = 1;\n //Toast.makeText( getApplicationContext( ), \"alarm is set\", Toast.LENGTH_SHORT ).show( );\n } else { //if it just toggled off\n //stop the ringtone service if it's playing\n Intent ringing = new Intent( getApplicationContext( ), RingtonePlayingService.class );\n stopService( ringing );\n //cancel the pending intent for alarm\n Intent intent = new Intent( Alarm.this, AlarmReceiver.class );\n pending_intent = PendingIntent.getBroadcast( Alarm.this, 0, intent, 0 );\n alarm_manager.cancel( pending_intent );\n alarm_set = 0;\n //Toast.makeText( getApplicationContext( ), \"alarm disabled\", Toast.LENGTH_SHORT ).show( );\n }\n update_storage( );\n }",
"public String idToState(int id);",
"private void saveAppState(Context context) {\n LogHelper.v(LOG_TAG, \"Saving state.\");\n }",
"@Override\n public void onClick(DialogInterface dialog, int which)\n {\n String b = customtime.getText().toString().trim();\n \n Toast.makeText(RadioUi.this, b +getString(R.string.closeradio), Toast.LENGTH_SHORT).show();\n sleeptime = b;\n // time=0;\n time = Integer.parseInt(b)*100000;\n // TinyDB tb = new TinyDB(getApplicationContext());\n\t\t\t\t// tb.putString(\"sleep_time\", sleeptime);\n\t\t\t\t \n\t\t\t\t alarm();\n\t\t\t\t \n }",
"@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n public void onSaveButtonClicked() {\n\n //check for getting address data from map at all\n if(mMapDestination == null){\n Toast.makeText(getApplicationContext(),\n R.string.error_mandatory, Toast.LENGTH_SHORT)\n .show();\n return;\n }\n\n // Parse numeric fields to their appropriate types\n String location = mMapDestination.getLocation();\n float radius = mMapDestination.getRadius();\n double latitude = mMapDestination.getLatitude();\n double longitude = mMapDestination.getLongitude();\n String ringtone =\n mAlarmRingtone == null ? getDefaultRingtone().toString() : mAlarmRingtone.toString();\n\n boolean vibrate = mDetailBinding.clockDetails.vibrate.isChecked();\n String message = mDetailBinding.clockDetails.message.getText().toString();\n\n /*\n Validation check\n */\n\n // Show error and abort save if one of the mandatory fields is empty\n if (radius <= 0 || location == null) {\n Toast.makeText(getApplicationContext(),\n R.string.error_mandatory,\n Toast.LENGTH_SHORT)\n .show();\n return;\n }\n\n // Check if coordinates are valid: -90 < latitude < 90 && -180 < longitude < 180\n if (latitude < -90 || latitude > 90) {\n Toast.makeText(getApplicationContext(),\n R.string.error_latitude,Toast.LENGTH_SHORT).show();\n return;\n }\n if (longitude < -180 || longitude > 180) {\n Toast.makeText(getApplicationContext(),\n R.string.error_longitude,Toast.LENGTH_SHORT).show();\n return;\n }\n\n // \"enabled\" field is not shown on this screen - keep current value (if exists)\n boolean enabled = (mViewModel == null) || (mViewModel.getAlarm() == null) ||\n Objects.requireNonNull(mViewModel.getAlarm().getValue()).isEnabled();\n\n // Save the added/updated alarm entity\n final AlarmEntry alarm;\n if (mAlarmId == Constants.DEFAULT_ALARM_ID) {\n alarm = new AlarmEntry(location, latitude, longitude, radius,\n enabled, vibrate, message, ringtone);\n } else {\n alarm = new AlarmEntry(mAlarmId, location, latitude, longitude, radius,\n enabled, vibrate, message, ringtone);\n }\n // Save the added/updated alarm entity\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n if (mAlarmId == Constants.DEFAULT_ALARM_ID) {\n mAlarmId = (int) mDb.alarmDao().insertAlarm(alarm);\n } else {\n mDb.alarmDao().updateAlarm(alarm);\n }\n FileUtils.saveMapImage(mAlarmId);\n finish();\n }\n });\n }",
"public int getAlarm () { return alarm; }",
"public static void SaveCounter4(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter4, SaveCounter4).commit();\n\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (IAlarmHelper.FILE_SAVE_SLEEP_ALARM.exists()) {\n\t\t\t\t\tString sleepAlarms = IAlarmHelper.androidFileload(IAlarmOnActivity.this, IAlarmHelper.FILENAME_SAVE_SLEEP_ALARM);\n\t\t\t\t\tsleepAlarms = sleepAlarms + getTime + \"-\";\n\t\t\t\t\tLog.e(\"Save sleeping alarms: \", sleepAlarms);\n\t\t\t\t\tIAlarmHelper.androidFileSave(IAlarmOnActivity.this, IAlarmHelper.FILENAME_SAVE_SLEEP_ALARM, sleepAlarms);\n\t\t\t\t} else {\n\t\t\t\t\tIAlarmHelper.androidFileSave(IAlarmOnActivity.this, IAlarmHelper.FILENAME_SAVE_SLEEP_ALARM, (getTime + \"-\"));\n\t\t\t\t}\n\t\t\t\tstartService(new Intent(IAlarmOnActivity.this, IAlarmSleepService.class));\n\t\t\t\tfinish();\n\t\t\t}",
"public rx.Observable<Alarm> save() {\n\n int min = 0;\n int hour = 0;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {\n hour = binding.viewAlarm.timePicker.getHour();\n min = binding.viewAlarm.timePicker.getMinute();\n\n } else {\n hour = binding.viewAlarm.timePicker.getCurrentHour();\n min = binding.viewAlarm.timePicker.getCurrentMinute();\n\n }\n Log.d(AlarmVM.class.getSimpleName(), \"hours \" + hour + \"minu\" + min);\n alarmVM.updateName(binding.etName.getText().toString());\n alarmVM.updateTimeSelected(hour, min);\n alarmVM.updateRepeated(binding.viewAlarm.swRepeat.isChecked());\n AnalyticsManager.logCreateAlarm(alarm, true);\n alarmVM.updateStatus(alarmVM.isActivated());\n return alarmVM.save();\n }",
"public static void storeID(long l, Context cont)\n\t{\n\t\tSharedPreferences.Editor editor = cont.getSharedPreferences(\"StatPump\", 0).edit();\n\t\teditor.putLong(\"Use ID\", l);\n\t\teditor.commit();\n\t}",
"static void setAlertFiredInSharedPrefs(Context context, long eventId, long beginTime,\n long alarmTime) {\n // Store alarm time as the value too so we don't have to parse all the keys to flush\n // old alarms out of the table later.\n SharedPreferences prefs = getFiredAlertsTable(context);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putLong(getFiredAlertsKey(eventId, beginTime, alarmTime), alarmTime);\n editor.apply();\n }",
"public void configureReturnAlarm(int BID){\n alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);\n\n //Configure intent with proper information\n Intent intent = new Intent(this, RequestPushService.class);\n\n intent.putExtra(\"TO\", FirebaseInstanceId.getInstance().getToken());\n intent.putExtra(\"BODY\", \"This is just a reminder that a book you have checked out is due in 5 days.\");\n intent.putExtra(\"TITLE\", \"Don't forget to return your book!\");\n intent.putExtra(\"BID\", BID);\n intent.putExtra(\"ALARM_TYPE\", getResources().getInteger(R.integer.ALARM_5_DAY_WARNING));\n PendingIntent serviceIntent = PendingIntent.getService(this, getResources().getInteger(R.integer.ALARM_5_DAY_WARNING) + BID, intent, 0);\n\n //Calculate ring time from now in ms\n long currentTime = System.currentTimeMillis();\n long oneDay = 60 * 60 * 24 * 1000;\n long nineDays = oneDay * 9;\n\n //Set alarm\n alarmManager.set(\n AlarmManager.RTC,\n currentTime + nineDays,\n serviceIntent\n );\n\n //Save alarm so it can be reset in case of reboot\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n prefEditor.putString(\"ALARM\" + BID + \"-TO\", FirebaseInstanceId.getInstance().getToken());\n prefEditor.putString(\"ALARM\" + BID + \"-BODY\", \"This is just a reminder that a book you have checked out is due in 5 days.\");\n prefEditor.putString(\"ALARM\" + BID + \"-TITLE\", \"Don't forget to return your book!\");\n prefEditor.putInt(\"ALARM-BID\" + BID, BID);\n prefEditor.putInt(\"ALARM\" + BID + \"-TYPE\", getResources().getInteger(R.integer.ALARM_5_DAY_WARNING));\n prefEditor.putLong(\"ALARM\" + BID + \"-RING-TIME\", currentTime + nineDays);\n prefEditor.apply();\n }",
"void save() {\r\n if (actionCompleted) {\r\n forget();\r\n } else {\r\n AccountSettings.stateStored = new Bundle();\r\n save(AccountSettings.stateStored);\r\n }\r\n }",
"private void currentStateSaveToSharedPref() {\n sharedPreferences = getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"nameOfActiveChallenge\", nameOfCurrentChallenge);\n editor.putInt(\"key1OfActiveChallenge\", key1OfActiveChallenge);\n editor.putString(\"dateOfLastEdit\", dateOfLastEdit);\n editor.putFloat(\"goal\", goal);\n editor.putFloat(\"carry\", carry);\n editor.putInt(\"challengeDaysRunning\", challengeDaysRunning);\n editor.commit();\n }",
"int updateByPrimaryKey(PineAlarm record);",
"@Override\n public void onClick(View v) {\n calendar.set(Calendar.HOUR_OF_DAY, alarm_timepicker.getHour());\n calendar.set(Calendar.MINUTE, alarm_timepicker.getMinute());\n\n // getting the int values of the hour and minute\n int hour = alarm_timepicker.getHour();\n int minute = alarm_timepicker.getMinute();\n\n //converting the int values to strings\n String hour_string = String.valueOf(hour);\n String minute_string = String.valueOf(minute);\n\n // 10:4 -> 10:04\n if (minute < 10) {\n minute_string = \"0\" + String.valueOf(minute);\n }\n\n // method that changes the update text Textbox\n set_alarm_text(\"Alarm set to: \" + hour_string + \":\" + minute_string);\n\n\n // put in extra string into my_intent\n // tells the clock that you pressed the \"alarm on\" button\n my_intent.putExtra(\"extra\", \"alarm on\");\n\n //put in an extra long value into my intent\n //tells the clock that you want a certain value from the\n // dropdown menu/spinners\n my_intent.putExtra(\"alarm_choice\", choose_alarm_sound);\n\n // create a pending intent that delays the intent\n // until the specified calendar time\n pending_intent = PendingIntent.getBroadcast(MainActivity.this, 0, my_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //set the alarm manager\n alarm_manager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pending_intent);\n\n }",
"@Override\n public void onRestoreInstanceState(Bundle savedInstanceState) {\n \t\tsuper.onRestoreInstanceState(savedInstanceState);\n \t\t\n //Fetch Saved settings (Alarm Hour, Minute, Enable) and assign values accordingly\n SharedPreferences settings = getSharedPreferences(MainActivity.PREFS_NAME, 0);\n AlarmEnabled = settings.getBoolean(MainActivity.ALARM_ENABLED, false);\n SnoozeMin = settings.getInt(MainActivity.SNOOZE_MINUTE, 10);\n \n //Re-Initialize UI Components\n SnoozeRadio1.setChecked(false);\n \tSnoozeRadio2.setChecked(false); \t \n \tSnoozeRadio5.setChecked(false); \n \tSnoozeRadio10.setChecked(false); \n \t\n \t//Set Default Value based on saved preference\n if (SnoozeMin == 1) {\n SnoozeRadio1.setChecked(true); \t\t\n }\n else if(SnoozeMin == 2) {\n \tSnoozeRadio2.setChecked(true); \n }\n else if(SnoozeMin == 5 ) { \t \n \tSnoozeRadio5.setChecked(true); \n }\n else if(SnoozeMin == 10) {\n \tSnoozeRadio10.setChecked(true); \t\n }\t\n }",
"public void saveActivity(int i){\n\n int activityID = i;\n\n SharedPreferences sp = this.getActivity().getSharedPreferences(SHARED_PREF_NAME,Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sp.edit();\n\n editor.putInt(KEY_CHOSENACTIVITY, activityID);\n\n editor.apply();\n }",
"OnOffSwitch alarmSwitch();",
"private void handlePhoneStateChanged(String str) {\n Assert.isMainThread();\n Log.d(\"KeyguardUpdateMonitor\", \"handlePhoneStateChanged(\" + str + \")\");\n if (TelephonyManager.EXTRA_STATE_IDLE.equals(str)) {\n this.mPhoneState = 0;\n } else if (TelephonyManager.EXTRA_STATE_OFFHOOK.equals(str)) {\n this.mPhoneState = 2;\n } else if (TelephonyManager.EXTRA_STATE_RINGING.equals(str)) {\n this.mPhoneState = 1;\n }\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onPhoneStateChanged(this.mPhoneState);\n }\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n int id = prefs.getInt(\"id\", R.id.radioButton1);\n\n if(id == R.id.radioButton1){\n Toast my_toast = Toast.makeText(context, R.string.rb1, Toast.LENGTH_LONG);\n my_toast.show();\n }\n else {\n Toast my_toast = Toast.makeText(context, R.string.rb2, Toast.LENGTH_LONG);\n my_toast.show();\n }\n\n }",
"private void saveNote() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"E,MMM d, hh:mm a\");\n String lastSavedDate = sdf.format(new Date());\n String id;\n boolean isNew = true;\n if (oldNote != null && oldNote.getId() != null && !oldNote.getId().isEmpty()) {\n id = oldNote.getId();\n isNew = false;\n } else\n id = UUID.randomUUID().toString();\n Note note = new Note(id, etTitle.getText().toString().trim(), lastSavedDate, etNote.getText().toString().trim());\n note.setNew(isNew);\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"NEW_NOTE\", note);\n setResult(Activity.RESULT_OK, returnIntent);\n finish();\n }",
"public static void setAlarm(Context context) {\n Intent i = new Intent(context, AlarmManagerHandler.class);\n\n //helps in creating intent that must be fired at some later time\n PendingIntent pi = PendingIntent.getService(context, 0, i, 0);\n\n //schedule a repeating alarm; they are inexact\n AlarmManager mgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n mgr.setRepeating(\n AlarmManager.ELAPSED_REALTIME, //type of time(UTC, elapsed) & wake mobile or not\n SystemClock.elapsedRealtime() + PERIOD, //trigger at Milliseconds; time at which alarm should go off\n PERIOD, //interval in Milliseconds between subsequent repeat of alarm\n pi //action to perform when alarm goes off pending intent\n );\n }",
"public static void SaveCounter5(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter5, SaveCounter5).commit();\n\n }",
"@Override\n\tpublic int getID() {\n\t\treturn stateID;\n\t}",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeInt(id);\n dest.writeInt(date);\n dest.writeString(event);\n dest.writeString(location);\n dest.writeString(startTime);\n dest.writeString(endTime);\n dest.writeString(notes);\n dest.writeByte((byte) (allDay == null ? 0 : allDay ? 1 : 2));\n dest.writeInt(bigId);\n dest.writeInt(alarm);\n }",
"private void saveState() {\r\n \tSharedPreferences settings = getSharedPreferences(TEMP, 0);\r\n \tEditor editor = settings.edit();\r\n \tif (mRowId != null)\r\n \t\teditor.putLong(DbAdapter.KEY_ROWID, mRowId);\r\n \teditor.putLong(DbAdapter.KEY_DATE, mTime);\r\n \teditor.putString(DbAdapter.KEY_PAYEE, mPayeeText != null && \r\n \t\t\tmPayeeText.getText() != null ? mPayeeText.getText().toString() : null);\r\n \teditor.putString(DbAdapter.KEY_AMOUNT, mAmountText != null && \r\n \t\t\tmAmountText.getText() != null ? mAmountText.getText().toString() : null);\r\n \teditor.putString(DbAdapter.KEY_CATEGORY, mCategoryText != null && \r\n \t\t\tmCategoryText.getText() != null ? mCategoryText.getText().toString() : null);\r\n \teditor.putString(DbAdapter.KEY_MEMO, mMemoText != null && \r\n \t\t\tmMemoText.getText() != null ? mMemoText.getText().toString() : null);\r\n \teditor.putString(DbAdapter.KEY_TAG, mTagText != null && \r\n \t\t\tmTagText.getText() != null ? mTagText.getText().toString() : null);\r\n \teditor.commit();\r\n }",
"public void setRecord(int value){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this.getContext());\n SharedPreferences.Editor editor = prefs.edit(); editor.putInt(\"record\", value);\n editor.commit();\n }",
"@Override\n protected void onRestoreInstanceState(Parcelable state) {\n if (state == null || !state.getClass().equals(SavedState.class)) {\n super.onRestoreInstanceState(state);\n return;\n }\n\n SavedState savedState = (SavedState) state;\n super.onRestoreInstanceState(savedState);\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(savedState.timeInMillSecs);\n setTimePicker(calendar);\n }",
"public Alarm(String alarmName, String street, String city, String state,\n String zipcode, double radius, double latitude, double longitude, int id, boolean on ){\n this.alarmName = alarmName;\n this.street = street;\n this.city = city;\n this.state = state;\n this.zipcode = zipcode;\n this.radius = radius;\n this.latitude = latitude;\n this.longitude = longitude;\n isOn = on;\n this.id = id;\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(), ReminderBroadcastReceiver.class);\n intent.putExtra(\"notificationText\", reminderData.getNotificationText());\n\n // Create pending intent with time given\n PendingIntent alarmIntent = PendingIntent.getBroadcast(getApplicationContext(), notificationId,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Create AlarmManager which is sent with pending intent\n AlarmManager alarm = (AlarmManager) getSystemService(ALARM_SERVICE);\n // Create time when notification will fire\n Calendar startTime = Calendar.getInstance();\n startTime.set(Calendar.DAY_OF_WEEK, startTime.get(Calendar.DAY_OF_WEEK));\n startTime.set(Calendar.HOUR_OF_DAY, timePicker.getHour());\n startTime.set(Calendar.MINUTE, timePicker.getMinute());\n startTime.set(Calendar.SECOND, 0);\n\n long alarmStartTime = startTime.getTimeInMillis();\n\n\n /* If reminder time is smaller than current time, start notification on next day, still in progress */\n\n /*\n if (startTime.getTimeInMillis() < System.currentTimeMillis()) {\n startTime.set(Calendar.DAY_OF_WEEK, startTime.get(Calendar.DAY_OF_WEEK + 1));\n alarmStartTime = startTime.getTimeInMillis();\n }\n else\n {\n alarmStartTime = startTime.getTimeInMillis();\n }\n */\n\n\n // Set alarm with (type, milliseconds, intent)\n // With RTC_WAKEUP we wake the device up and deliver the pending intent\n alarm.set(AlarmManager.RTC_WAKEUP, alarmStartTime, alarmIntent);\n saveData();\n\n }",
"private void saveNewAddress() {\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(deviceAddress, \"previousDeviceAddress\");\n editor.commit();\n }",
"private void guardaRecord() {\n // Guardamos el record\n SharedPreferences datos = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor miEditor = datos.edit();\n miEditor.putInt(\"RECORD\", record);\n miEditor.apply();\n }",
"public Alarm_Msg(Context context, Bundle extras){\n /*AlarmManager alarmMgr =\n (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(context, Alarm_Msg.class);\n intent.putExtra(REMINDER_BUNDLE, extras);\n PendingIntent pendingIntent =\n PendingIntent.getBroadcast(context, 0, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n Calendar time = Calendar.getInstance();\n time.setTimeInMillis(System.currentTimeMillis());\n time.set(Calendar.HOUR_OF_DAY, Integer.parseInt(extras.getString(\"time_h\")));\n time.set(Calendar.MINUTE, Integer.parseInt(extras.getString(\"time_m\")));\n\n alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP, time.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, pendingIntent);*/\n\n\n AlarmManager alarmMgr = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(context, Alarm_Msg.class);\n intent.putExtra(REMINDER_BUNDLE, extras);\n Bundle getBundle = intent.getBundleExtra(REMINDER_BUNDLE);\n NOTIFY_ID = NOTIFY_ID + getBundle.getInt(\"id\");\n //Toast.makeText(context, Integer.toString(NOTIFY_ID), Toast.LENGTH_LONG).show();\n PendingIntent pendingIntent =\n PendingIntent.getBroadcast(context, NOTIFY_ID, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n alarmMgr.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,\n SystemClock.elapsedRealtime() +\n 60 * 1000, pendingIntent);\n }",
"protected void setAlarmStatus(int alarmStatus) {\n this.alarmStatus = alarmStatus;\n }",
"public void OnToggleClicked(View view)\n {\n\n long time;\n if (((ToggleButton) view).isChecked())\n {\n //startActivity(Intent)\n Toast.makeText(MainActivity.this, \"ALARM ON\", Toast.LENGTH_SHORT).show();\n Calendar calendar=Calendar.getInstance();\n\n int currentApiVersion = android.os.Build.VERSION.SDK_INT;\n if (currentApiVersion > android.os.Build.VERSION_CODES.LOLLIPOP_MR1)\n {\n calendar.set(Calendar.HOUR_OF_DAY,alarmTimePicker.getHour());\n calendar.set(Calendar.MINUTE, alarmTimePicker.getMinute());\n }\n else {\n calendar.set(Calendar.HOUR_OF_DAY,alarmTimePicker.getCurrentHour());\n calendar.set(Calendar.MINUTE, alarmTimePicker.getCurrentMinute());\n }\n\n Intent intent = new Intent(this, AlarmReceiver.class);\n pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0);\n\n time=(calendar.getTimeInMillis()-(calendar.getTimeInMillis()%60000));\n if(System.currentTimeMillis()>time)\n {\n if (Calendar.AM_PM == 0)\n time = time + (1000*60*60*12);\n else\n time = time + (1000*60*60*24);\n }\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, time, 10000, pendingIntent);\n }\n else\n {\n alarmManager.cancel(pendingIntent);\n Toast.makeText(MainActivity.this, \"ALARM OFF\", Toast.LENGTH_SHORT).show();\n }\n //public class DeezerConnect.Builder();\n }",
"public void setAlarms()\n\t{\n\t\tSharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n\t\tAlarmManager alarm = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\t\t\n\t\tSet<String> set;\n\t\tset=sp.getStringSet(\"lowattnotifs\", null);\n\t\tif(set!=null)\n\t\t{\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.set(Calendar.HOUR_OF_DAY, 19);\n\t\t\tcal.set(Calendar.MINUTE, 0);\n\t\t\tcal.set(Calendar.SECOND, 0);\n\t\t\t\n\t\t\tIntent attintent = new Intent(this, Monitor.class);\n\t\t\tattintent.putExtra(\"attordate\", 0);\n\t\t\tPendingIntent attpintent = PendingIntent.getService(this, 0, attintent, 0);\n\t\t\t\n\t\t\talarm.cancel(attpintent);\t\t//cancel all alarms for attendance reminders\n\t\t\t\n\t\t\t//check if set contains these days\n\t\t\tfor(int i=0; i<7; i++)\n\t\t\t{\n\t\t\t\tif(set.contains(String.valueOf(i)))\n\t\t\t\t{\n\t\t\t\t\tcal.set(Calendar.DAY_OF_WEEK, i);\n\t\t\t\t\talarm.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), attpintent);\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Set for day: \"+i, Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void saveState() { }",
"@Override\n public void onCreate() {\n\n mNM = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n if(AlarmTask.code == 3) {\n spref = getApplicationContext().getSharedPreferences(\"my_data\", 0);\n food = new AddFoodActivity();\n editor = spref.edit();\n message = \"Reset data\";\n Toast.makeText(NotifyService.this, \"Notification reset: \" + spref.getFloat(\"kalori\",0), Toast.LENGTH_LONG).show();\n editor.putStringSet(\"SetSiang\", null);\n editor.putStringSet(\"SetPagi\", null);\n editor.putStringSet(\"SetMalam\", null);\n editor.commit();\n food.setNull();\n }\n\n\n }",
"public int addAlarm(Alarm alarm) {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n\n values.put(KEY_NAME, alarm.getName());\n values.put(KEY_HOUR, alarm.getHour());\n values.put(KEY_MINUTE, alarm.getMinute());\n values.put(KEY_STATE, alarm.getState());\n\n int rowInserted = (int) database.insert(TABLE_NAME, null, values);\n database.close();\n\n return rowInserted;\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tint ind=spinner.getSelectedItemPosition();\n\t\t\t\tString mus=list_uri.get(ind);\n\t\t\t String ic=list_id.get(ind);\n\t\t\t Uri songg=Uri.parse(mus+\"/\"+ic);\n\t\t\t\tIntent ii=new Intent(MainActivity.this,SerTest.class);\n\t\t\t ii.putExtra(\"ringtone-uri\", String.valueOf(songg));\n\t\t\t stopService(ii);\n\t\t\t\tint sid=radio_group.getCheckedRadioButtonId();\n\t\t\t\tradio_button=(RadioButton)findViewById(sid);\n\t\t\t\tString r=radio_button.getText().toString();\n\t\t\t\ttime=System.currentTimeMillis();\n\t\t\t\tcalendar.set(Calendar.HOUR_OF_DAY,alarmTimePicker.getCurrentHour());\n\t\t\t\tcalendar.set(Calendar.MINUTE,alarmTimePicker.getCurrentMinute());\n\t\t\t\tcalendar.set(Calendar.SECOND,0);\n\t\t\t\tlong hl=alarmTimePicker.getCurrentHour();\n\t\t\t\tlong ml=alarmTimePicker.getCurrentMinute();\n\t\t\t\tsong=spinner.getSelectedItemPosition();\n\t\t\t\tString h=String.valueOf(hl);\n\t\t\t\tString m=String.valueOf(ml);\n\t\t\t\tif(h.length()==1)\n\t\t\t\t\th=\"0\"+h;\n\t\t\t\tif(m.length()==1)\n\t\t\t\t\tm=\"0\"+m;\n\n\t\t\t\ti.putExtra(\"Extra\",\"alarm on\");\n\t\t\t\ti.putExtra(\"idd\", String.valueOf(time));\n\t\t\t\ti.putExtra(\"play\", String.valueOf(song));\n\t\t\t\tString vibration=\"no\";\n\t\t\t\tif(checkbok.isChecked()){\n\t\t\t\t\ti.putExtra(\"vib\",\"yes\");\n\t\t\t\t\tvibration=\"yes\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\ti.putExtra(\"vib\",\"no\");\n\t\t\t\tpending_intent=PendingIntent.getBroadcast(MainActivity.this,(int) time,i,PendingIntent.FLAG_UPDATE_CURRENT);\n\t\n\n\t\t\t\tlong time=System.currentTimeMillis();\n\t\t\t\tlong t=calendar.getTimeInMillis();\n\t\t\t\tif(t>=time){\n\n\t\t\t\t\tif(r.equals(\"Once\"))\n\t\t\t\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),pending_intent);\n\t\t\t\t\telse if(r.equals(\"Daily\"))\n\t\t\t\t\t\talarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),60*1000*24*60,pending_intent);\n\t\t\t\t\telse\n\t\t\t\t\t\talarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),60*1000*24*60*7,pending_intent);\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Alarm set at \"+h+\":\"+m+\".\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\tif(r.equals(\"Once\"))\n\t\t\t\t\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),pending_intent);\n\t\t\t\t\t\telse if(r.equals(\"Daily\"))\n\t\t\t\t\t\t\talarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis()+86400000,60*1000*24*60,pending_intent);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\talarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis()+86400000,60*1000*24*60*7,pending_intent);\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Alarm set at \"+h+\":\"+m+\" tomorrow.\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\n\t\t\t\tFirst.db.execSQL(\"INSERT INTO alarm VALUES\"+\"('\"+id+\"','alarm','\"+h+\":\"+m+\"','\"+time+\"','\"+r+\"','\"+vibration+\"','\"+song+\"')\");\n\t\t\t\tIntent back=new Intent(MainActivity.this,First.class);\n\t\t\t\tback.putExtra(\"S\",h+\":\"+m);\n\t\t\t\tstartActivity(back);\n\t\t\t}",
"@Override\n protected Parcelable onSaveInstanceState() {\n final Parcelable superParcel = super.onSaveInstanceState();\n if (isPersistent()){\n return superParcel;\n }\n\n final SavedState currentState = new SavedState(superParcel);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, timePicker.getHour());\n calendar.set(Calendar.MINUTE, timePicker.getMinute());\n currentState.timeInMillSecs = calendar.getTimeInMillis();\n return currentState;\n }",
"public synchronized static Uri newAlarm(Context context) {\n return context.getContentResolver().insert(\n Uri.parse(CONTENT_URI_ALL_ALARMS), null);\n }",
"public String getAlarm() {\n\t\treturn mAlarm;\n\t}",
"public void SetAlarm(Context context)\n {\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, 7);\n calendar.set(Calendar.MINUTE,20);\n Log.i(\"Set calendar\", \"for time: \" + calendar.toString());\n\n //Intent i = new Intent(context, AlarmService.class);\n Intent i = new Intent(context, Alarm.class);\n boolean alarmRunning = (PendingIntent.getBroadcast(context, 0, i, PendingIntent.FLAG_NO_CREATE) !=null);\n if (!alarmRunning) {\n //PendingIntent pi = PendingIntent.getService(context, 0, i, PendingIntent.FLAG_UPDATE_CURRENT);\n PendingIntent pi = PendingIntent.getService(context, 0, i, 0);\n\n\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, i, 0);\n AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);\n am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);\n //am.cancel(pi);\n }\n\n //PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0 );\n\n\n //am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),AlarmManager.INTERVAL_DAY, pi);\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n setAlarm(context);\n }",
"public void saveNewAlarmButton_click(View view) throws JSONException {\n\n File Root = new File(Environment.getExternalStorageDirectory() + \"/Android/data/\" + BuildConfig.APPLICATION_ID + \"/\");\n File file = new File(Root, \"Alarms.json\");\n\n Button thb = (Button) findViewById(R.id.timeHourButton);\n Button tmb = (Button) findViewById(R.id.timeMinuteButton);\n EditText et = (EditText) findViewById(R.id.alarmName);\n\n ArrayList<String> text = new ArrayList<>();\n ArrayList<JSONObject> json = new ArrayList<>();\n ArrayList<Integer> Ids = new ArrayList<>();\n String JsonString = new String();\n //region Create directory\n try {\n if (Root.mkdir()) {\n System.out.println(\"Directory created\");\n } else {\n System.out.println(\"Directory is not created, like whatever...\");\n }\n } catch (Exception e) {\n System.out.println(e);\n }\n //endregion\n\n //region ReadFile\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n String line;\n //Read the file line by line\n while ((line = br.readLine()) != null) {\n JSONObject obj = new JSONObject(line);\n json.add(obj);\n text.add(line);\n Ids.add(obj.getInt(\"Id\"));\n }\n br.close();\n } catch (Exception Ex) {\n System.out.println(Ex);\n }\n //endregion\n\n //region Create Json object\n String hourtext = thb.getText().toString();\n String minutetext = tmb.getText().toString();\n String alarmname = et.getText().toString();\n int max = -1;\n if (Ids.size() != 0)\n max = Collections.max(Ids);\n if (getIntent().getIntExtra(\"Id\", -1) == -1)\n Json.put(\"Id\", max + 1);\n else\n Json.put(\"Id\", getIntent().getIntExtra(\"Id\", -1));\n Json.put(\"Hour\", hourtext);\n Json.put(\"Minute\", minutetext);\n Json.put(\"Name\", alarmname);\n\n //Add the date\n if (Date != null && !Date.equals(\"No dates selected\"))\n Json.put(\"Date\", Date);\n else {\n Calendar c = Calendar.getInstance();\n int CurHour = c.get(Calendar.HOUR_OF_DAY);\n int CurMinute = c.get(Calendar.MINUTE);\n\n int AlarmHour = Integer.parseInt(hourtext);\n int AlarmMinute = Integer.parseInt(minutetext);\n\n\n int curDay = c.get(Calendar.DAY_OF_MONTH);\n int curMonth = c.get(Calendar.MONTH) + 1;\n int curYear = c.get(Calendar.YEAR);\n int CurTimeInmins = CurHour * 60 + CurMinute;\n int AlarmTimeInMins = AlarmHour * 60 + AlarmMinute;\n\n if (CurTimeInmins < AlarmTimeInMins) {\n String CurrentDate;\n\n if (curDay < 10)\n CurrentDate = \"0\" + curDay + \"-\" + curMonth + \"-\" + curYear;\n else if (curDay < 10 && curMonth < 10)\n CurrentDate = \"0\" + curDay + \"-0\" + curMonth + \"-\" + curYear;\n else if (curMonth < 10)\n CurrentDate = curDay + \"-0\" + curMonth + \"-\" + curYear;\n else\n CurrentDate = curDay + \"-\" + curMonth + \"-\" + curYear;\n Json.put(\"Date\", CurrentDate);\n } else {\n String TomorrahDate;\n if (curDay < 10) {\n curDay++;\n TomorrahDate = \"0\" + curDay + \"-\" + curMonth + \"-\" + curYear;\n } else if (curDay < 10 && curMonth < 10) {\n curDay++;\n TomorrahDate = \"0\" + curDay + \"-0\" + curMonth + \"-\" + curYear;\n } else if (curMonth < 10) {\n curDay++;\n TomorrahDate = curDay + \"-0\" + curMonth + \"-\" + curYear;\n } else {\n curDay++;\n TomorrahDate = curDay + \"-\" + curMonth + \"-\" + curYear;\n }\n\n Json.put(\"Date\", TomorrahDate);\n }\n }\n\n Json.put(\"Tone\", FName);\n if (FName == null) {\n AlarmType = 0;\n }\n\n SeekBar seek = (SeekBar) findViewById(R.id.volumeBar);\n\n Json.put(\"Volume\", seek.getProgress());\n Json.put(\"Type\", AlarmType);\n Json.put(\"Latitude\", getIntent().getDoubleExtra(\"Latitude\", 0));\n Json.put(\"Longitude\", getIntent().getDoubleExtra(\"Longitude\", 0));\n intent.putExtra(\"LocationType\", LocType);\n intent.putExtra(\"LocationRadius\", LocRad);\n //endregion\n\n //region WriteFile\n for (int i = 0; i < text.size(); i++) {\n //Combine old string with the listobject\n if (getIntent().getIntExtra(\"Id\", -1) == json.get(i).getInt(\"Id\")) {\n } else {\n JsonString = JsonString + text.get(i) + \"\\n\";\n }\n }\n\n JsonString = JsonString + Json.toString();\n\n FileWriter out;\n try {\n //Write to file\n out = new FileWriter(new File(Root, \"Alarms.json\"));\n out.append(JsonString);\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n //endregion\n\n Intent intent = new Intent(this, Main.class);\n setResult(RESULT_OK, intent);\n finish();\n startActivity(intent);\n\n }",
"public void onRestorePendingState() {\n }",
"public static void resetSaveCounter4(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter4 = prefs.getInt(saveCounter4, 0);\n SaveCounter4=0;\n prefs.edit().putInt(saveCounter4, SaveCounter4).commit();\n\n }",
"private void saveData() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n Gson gson = new Gson();\n String jsonItem = gson.toJson(reminderItems);\n editor.putString(REMINDER_ITEM, jsonItem);\n editor.apply();\n }",
"public static void SaveCounter6(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter6, SaveCounter6).commit();\n\n }",
"public void saveSettings(View v) {\n SharedPreferences sharedPref = this.getPreferences(Context.MODE_PRIVATE); // get shared preferences\n SharedPreferences.Editor editor = sharedPref.edit();\n int seconds_rec = Integer.parseInt(time_recording.getText().toString());\n int notif_occ = Integer.parseInt(time_occurance.getText().toString());\n\n editor.putInt(getString(R.string.time_recording_seconds), seconds_rec); // save values to a sp\n editor.putInt(getString(R.string.time_notification_minutes), notif_occ);\n editor.commit(); // commit the differences\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }",
"@Override\n public void onTimeSet(android.widget.TimePicker view, int hourOfDay, int minute) {\n boolean timeInAM = true;\n\n if(hourOfDay>=12) { //if it's pm\n hourOfDay-=12;\n timeInAM = false;\n } else { //if it's am\n timeInAM = true;\n }\n\n //update shared preferences with alarm time\n PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putInt(\"alarmHour_\"+alarmID, hourOfDay).apply(); //will be 0:00 if 12:00\n PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putInt(\"alarmMinutes_\"+alarmID, minute).apply();\n PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putBoolean(\"timeInAM_\"+alarmID, timeInAM).apply();\n\n //set minuteString of alarm time\n String minuteString;\n if(minute<10) {\n minuteString = \"0\" + PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt(\"alarmMinutes_\"+alarmID, 0);\n } else {\n minuteString = \"\" + PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt(\"alarmMinutes_\"+alarmID, 10);\n }\n int alarmHour = PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt(\"alarmHour_\"+alarmID, 0);\n if(alarmHour<10 && alarmHour>0) {\n alarmTimeButton.setText(\" \"+alarmHour+\":\"+minuteString);\n } else if(alarmHour==0) {\n alarmTimeButton.setText(\"12:\"+minuteString);\n } else {\n alarmTimeButton.setText(alarmHour+\":\"+minuteString);\n }\n\n //show alarm time\n if(PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean(\"timeInAM_\"+alarmID, true)) {\n dayOrNight.setText(\"AM\");\n } else {\n dayOrNight.setText(\"PM\");\n }\n\n }",
"public static void SaveCounter1(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter1, SaveCounter1).commit();\n\n }",
"public void writeEncounterNumPreferences(long encounterNum){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=mSharedPreference.edit();\n editor.putLong(mContext.getString(R.string.encounter),encounterNum);\n editor.commit();\n}",
"@Override\n\tpublic long getStateId() {\n\t\treturn _state.getStateId();\n\t}",
"@Override\n protected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n Log.d(TAG, \"onSaveInstanceState:method fYred\");\n outState.putInt(\"qestion We are on\", currentq);\n }",
"public void setAlarm(Context context, int pk, long time, int Hora, int Minuto) {\n\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, Hora);\n calendar.set(Calendar.MINUTE, Minuto);\n\n\n //Se crea la hora correcta para el sistema\n long newTime = 1000 * 60 * 60 * time;\n AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n Intent alarmIntent = new Intent(context, AlarmReceiver.class);\n alarmIntent.putExtra(\"alarma\", pk);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, pk, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), newTime, pendingIntent);\n\n\n\n }",
"public void setAlarm(String eAlarm) {\n\t\tmAlarm = eAlarm;\n\t}",
"Alarm createAlarm();",
"public void testCantSaveStateLaunchAndSwitch() throws Exception {\n if (!supportsCantSaveState()) {\n return;\n }\n\n final Intent activity1Intent = new Intent();\n activity1Intent.setPackage(CANT_SAVE_STATE_1_PACKAGE_NAME);\n activity1Intent.setAction(Intent.ACTION_MAIN);\n activity1Intent.addCategory(Intent.CATEGORY_LAUNCHER);\n activity1Intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n final Intent activity2Intent = new Intent();\n activity2Intent.setPackage(CANT_SAVE_STATE_2_PACKAGE_NAME);\n activity2Intent.setAction(Intent.ACTION_MAIN);\n activity2Intent.addCategory(Intent.CATEGORY_LAUNCHER);\n activity2Intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n final Intent homeIntent = new Intent();\n homeIntent.setAction(Intent.ACTION_MAIN);\n homeIntent.addCategory(Intent.CATEGORY_HOME);\n homeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n ActivityManager am = mContext.getSystemService(ActivityManager.class);\n UiDevice device = UiDevice.getInstance(getInstrumentation());\n\n InstrumentationRegistry.getInstrumentation().getUiAutomation().grantRuntimePermission(\n STUB_PACKAGE_NAME, android.Manifest.permission.PACKAGE_USAGE_STATS);\n\n // We don't want to wait for the uid to actually go idle, we can force it now.\n String cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_1_PACKAGE_NAME;\n String result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_2_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n ApplicationInfo app1Info = mContext.getPackageManager().getApplicationInfo(\n CANT_SAVE_STATE_1_PACKAGE_NAME, 0);\n WatchUidRunner uid1Watcher = new WatchUidRunner(getInstrumentation(), app1Info.uid,\n WAIT_TIME);\n\n ApplicationInfo app2Info = mContext.getPackageManager().getApplicationInfo(\n CANT_SAVE_STATE_2_PACKAGE_NAME, 0);\n WatchUidRunner uid2Watcher = new WatchUidRunner(getInstrumentation(), app2Info.uid,\n WAIT_TIME);\n\n try {\n // Start the first heavy-weight app, should launch like a normal app.\n mContext.startActivity(activity1Intent);\n\n // Make sure the uid state reports are as expected.\n uid1Watcher.waitFor(WatchUidRunner.CMD_ACTIVE, null);\n uid1Watcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_TOP);\n\n // Now go to home, leaving the app. It should be put in the heavy weight state.\n mContext.startActivity(homeIntent);\n\n // Wait for process to go down to background heavy-weight.\n uid1Watcher.expect(WatchUidRunner.CMD_CACHED, null);\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_HEAVY_WEIGHT);\n\n // Start the second heavy-weight app, should ask us what to do with the two apps\n startActivityAndWaitForShow(activity2Intent);\n\n // First, let's try returning to the original app.\n maybeClick(device, new UiSelector().resourceId(\"android:id/switch_old\"));\n device.waitForIdle();\n\n // App should now be back in foreground.\n uid1Watcher.expect(WatchUidRunner.CMD_UNCACHED, null);\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_TOP);\n\n // Return to home.\n mContext.startActivity(homeIntent);\n uid1Watcher.expect(WatchUidRunner.CMD_CACHED, null);\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_HEAVY_WEIGHT);\n\n // Again try starting second heavy-weight app to get prompt.\n startActivityAndWaitForShow(activity2Intent);\n\n // Now we'll switch to the new app.\n maybeClick(device, new UiSelector().resourceId(\"android:id/switch_new\"));\n device.waitForIdle();\n\n // The original app should now become cached.\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_RECENT);\n\n // And the new app should start.\n uid2Watcher.waitFor(WatchUidRunner.CMD_ACTIVE, null);\n uid2Watcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uid2Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_TOP);\n\n // Make sure the original app is idle for cleanliness\n cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_1_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n uid1Watcher.expect(WatchUidRunner.CMD_IDLE, null);\n\n // Return to home.\n mContext.startActivity(homeIntent);\n uid2Watcher.waitFor(WatchUidRunner.CMD_CACHED, null);\n uid2Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_HEAVY_WEIGHT);\n\n // Try starting the first heavy weight app, but return to the existing second.\n startActivityAndWaitForShow(activity1Intent);\n maybeClick(device, new UiSelector().resourceId(\"android:id/switch_old\"));\n device.waitForIdle();\n uid2Watcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uid2Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_TOP);\n\n // Return to home.\n mContext.startActivity(homeIntent);\n uid2Watcher.waitFor(WatchUidRunner.CMD_CACHED, null);\n uid2Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_HEAVY_WEIGHT);\n\n // Again start the first heavy weight app, this time actually switching to it\n startActivityAndWaitForShow(activity1Intent);\n maybeClick(device, new UiSelector().resourceId(\"android:id/switch_new\"));\n device.waitForIdle();\n\n // The second app should now become cached.\n uid2Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_RECENT);\n\n // And the first app should start.\n uid1Watcher.waitFor(WatchUidRunner.CMD_ACTIVE, null);\n uid1Watcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_TOP);\n\n // Exit activity, check to see if we are now cached.\n waitForAppFocus(CANT_SAVE_STATE_1_PACKAGE_NAME, WAIT_TIME);\n getInstrumentation().getUiAutomation().performGlobalAction(\n AccessibilityService.GLOBAL_ACTION_BACK);\n uid1Watcher.expect(WatchUidRunner.CMD_CACHED, null);\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_RECENT);\n\n // Make both apps idle for cleanliness.\n cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_1_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_2_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n } finally {\n uid2Watcher.finish();\n uid1Watcher.finish();\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Intent ringtoneIntent = new Intent(context, AlarmService.class);\n\n //1. get EXTRA VALUE from \"alarm_intent\"\n String AlarmStatus = intent.getExtras().getString(EXTRA);\n Remind chosenRemind = (Remind) intent.getExtras().get(NEW_REMIND);\n\n Log.d(\"SAMN\", \"test: Alarm Status:: \" + AlarmStatus);\n\n if(AlarmStatus.equals(ALARM_OFF)){\n /*set up Diable receiver*/\n //to \"enable the receiver\": override the manifest\n ComponentName receiver = new ComponentName(context, AlarmReceiver.class);\n PackageManager pm = context.getPackageManager();\n ///--- ///\n\n pm.setComponentEnabledSetting(receiver,\n PackageManager.COMPONENT_ENABLED_STATE_DISABLED,\n PackageManager.DONT_KILL_APP);\n\n Log.d(\"COMPONENT SETTING: \", String.valueOf(pm.getComponentEnabledSetting(receiver)));\n }\n /*else {\n Intent alarmIntent = new Intent(context, AlarmActivity.class);\n alarmIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(alarmIntent);\n }*/\n\n // 2. pass it to ringtoneIntent to send to RingtonePlayingService\n ringtoneIntent.putExtra(EXTRA, AlarmStatus);\n ringtoneIntent.putExtra(NEW_REMIND, chosenRemind);\n\n //start service ringtone\n context.startService(ringtoneIntent);\n //explain: ringtoneIntent will be sent to RingtonePlayingService => out Extra Value to notice if ALARM IS ON OR OFF?\n }",
"@Override\n public void onClick(View view) {\n calendar.set(Calendar.HOUR_OF_DAY, tp.getHour());\n calendar.set(Calendar.MINUTE, tp.getMinute());\n\n //get int value of timepicker selected time\n int hour = tp.getHour();\n int minute = tp.getMinute();\n\n String hour_string = String.valueOf(hour);\n String minute_string = String.valueOf(minute);\n\n if (hour > 12) {\n hour_string = String.valueOf(hour - 12);\n }\n\n if (minute < 10) {\n minute_string = \"0\" + String.valueOf(minute);\n }\n\n //update status box method\n alarm_text(\"Alarm set for \" + hour_string + \":\" + minute_string);\n //put extra string in my_intent\n //tells clock \"set alarm\" button pressed\n my_intent.putExtra(\"extra\", \"alarm on\");\n //create pending intent that delays intent until user selects time\n pending_intent = PendingIntent.getBroadcast(AlarmClock.this, 0, my_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n //set alarm manager\n am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pending_intent);\n }",
"@Override\n public void onSaveInstanceState(Bundle outState){\n // Save current booking times to outstate\n outState.putInt(BOOKING_HOUR_KEY, bookingHour);\n outState.putInt(BOOKING_MINUTE_KEY, bookingMinute);\n\n super.onSaveInstanceState(outState);\n }",
"private void saveState() throws IOException {\n speakerManager.saveState();\n roomManager.saveState();\n organizerManager.saveState();\n eventManager.saveState();\n chatManager.saveState();\n attendeeManager.saveState();\n\n }",
"private void soundAlarm(long alarmId) {\n AlarmSettings settings = db.readAlarmSettings(alarmId);\n if (settings.getVibrate()) {\n MediaSingleton.INSTANCE.vibrate();\n }\n\n volumeIncreaseCallback.reset(settings);\n MediaSingleton.INSTANCE.normalizeVolume(\n NotificationService.this, volumeIncreaseCallback.volume());\n MediaSingleton.INSTANCE.play(NotificationService.this, settings.getTone());\n //Store getTone value for notification activity\n currentTone = settings.getTone();\n // Start periodic events for handling this notification.\n handler.post(volumeIncreaseCallback);\n handler.post(soundCheck);\n handler.post(notificationBlinker);\n // Set up a canceler if this notification isn't acknowledged by the timeout.\n int timeoutMillis = 60 * 1000 * AppSettings.alarmTimeOutMins(NotificationService.this);\n handler.postDelayed(autoCancel, timeoutMillis);\n }",
"private void setState(Intent intent, String calledFrom) {\r\n // We are creating new state?\r\n boolean isNew = false;\r\n String message = \"\";\r\n \r\n if (state == null) {\r\n state = new StateClass();\r\n message += (state.restored ? \"Old state restored; \" : \"No previous state; \");\r\n } else {\r\n message += \"State existed and \" + (state.restored ? \"restored earlier; \" : \"was not restored earlier; \");\r\n }\r\n isNew = state.actionCompleted;\r\n \r\n StateClass stateNew = new StateClass(intent.getAction());\r\n\r\n Bundle extras = intent.getExtras();\r\n if (extras != null) {\r\n // For a usage example see also com.android.email.activity.setup.AccountSettings.onCreate(Bundle)\r\n\r\n // Unparcel Extras!\r\n stateNew.response = extras.getParcelable(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE);\r\n if (stateNew.response != null) {\r\n // In order to force initializing state\r\n isNew = true;\r\n }\r\n android.accounts.Account ac = null;\r\n if (android.os.Build.VERSION.SDK_INT < 16 ) { // before Jelly Bean\r\n // Starting with Jelly Bean (16) there is only one link for the the setting of all AndStatus accounts\r\n // So we must select account in our code\r\n ac = (android.accounts.Account) intent\r\n .getParcelableExtra(EXTRA_ACCOUNT_MANAGER_ACCOUNT);\r\n }\r\n if (ac != null) {\r\n // We have persistent account in the intent\r\n stateNew.builder = new MyAccount.Builder(ac);\r\n isNew = true;\r\n } else {\r\n // Maybe we received MyAccount name as as parameter?!\r\n String accountGuid = extras.getString(EXTRA_MYACCOUNT_GUID);\r\n if (!TextUtils.isEmpty(accountGuid)) {\r\n stateNew.builder = MyAccount.Builder.valueOf(accountGuid);\r\n isNew = stateNew.getMyAccount().isPersistent();\r\n }\r\n }\r\n }\r\n\r\n if (isNew) {\r\n message += \"State initialized; \";\r\n state = stateNew;\r\n if (state.builder == null && !state.getAccountAction().equals(Intent.ACTION_INSERT)) {\r\n if (state.getAccountAction().equals(ACTION_ACCOUNT_MANAGER_ENTRY) && android.os.Build.VERSION.SDK_INT < 16) {\r\n // This case occurs if we're changing account settings from Settings -> Accounts\r\n state.setAccountAction(Intent.ACTION_INSERT);\r\n } else {\r\n message += \"Select Account; \";\r\n Intent i = new Intent(this, AccountSelector.class);\r\n startActivityForResult(i, REQUEST_SELECT_ACCOUNT);\r\n }\r\n }\r\n \r\n if (state.builder == null) {\r\n if (state.getAccountAction().equals(Intent.ACTION_INSERT)) {\r\n state.builder = MyAccount.Builder.valueOf(\"\");\r\n } else {\r\n state.builder = MyAccount.Builder.valueOf(MyAccount.getCurrentMyAccountGuid());\r\n }\r\n if (!state.builder.getMyAccount().isPersistent()) {\r\n state.setAccountAction(Intent.ACTION_INSERT);\r\n // Check if there are changes to avoid \"ripples\"\r\n // ...\r\n // TODO check this: state.actionCompleted = false;\r\n } else {\r\n state.setAccountAction(Intent.ACTION_VIEW);\r\n }\r\n } else {\r\n if (state.getMyAccount().isPersistent()) {\r\n state.setAccountAction(Intent.ACTION_EDIT);\r\n } else {\r\n state.setAccountAction(Intent.ACTION_INSERT);\r\n }\r\n }\r\n\r\n message += \"action=\" + state.getAccountAction() + \"; \";\r\n\r\n showUserPreferences();\r\n }\r\n \r\n if (state.response != null) {\r\n message += \"response; \";\r\n }\r\n MyLog.v(TAG, \"setState from \" + calledFrom +\"; \" + message + \"intent=\" + intent.toUri(0));\r\n }",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n choose_alarm_sound = (int) id;\n }",
"public void viewAlarm() {\n\t\tfinal Dialog dialog = new Dialog(this);\n\t\tdialog.setContentView(R.layout.date_time_picker);\n\t\tdialog.setTitle(\"Set Reminder\");\n\t\tButton saveDate = (Button)dialog.findViewById(R.id.btnSave);\n\t\tsaveDate.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t\tsetAlarm(dialog);\n\t\t\t}\n\t\t});\n\t\tdialog.show();\n\t}",
"int updateByPrimaryKey(BachAlarmRole record);"
] | [
"0.66699404",
"0.60995144",
"0.5920001",
"0.59132856",
"0.5887128",
"0.58520585",
"0.5842702",
"0.5820369",
"0.5672103",
"0.5614559",
"0.55826527",
"0.5565496",
"0.55088884",
"0.5454942",
"0.5453884",
"0.5431364",
"0.54228604",
"0.5417847",
"0.5416836",
"0.54041547",
"0.5398159",
"0.53917676",
"0.53757614",
"0.5373717",
"0.53647393",
"0.5342951",
"0.5327193",
"0.52839875",
"0.5265841",
"0.52632004",
"0.5257245",
"0.5255381",
"0.5228263",
"0.52221376",
"0.52112573",
"0.52056944",
"0.5195119",
"0.51922184",
"0.51822543",
"0.51693606",
"0.51482487",
"0.5145455",
"0.5140647",
"0.5131786",
"0.51273227",
"0.5105716",
"0.50966054",
"0.50965184",
"0.5089192",
"0.50889117",
"0.5087704",
"0.5083407",
"0.50684",
"0.5056559",
"0.50347394",
"0.5032888",
"0.50268275",
"0.5025269",
"0.5019368",
"0.5002701",
"0.49994525",
"0.49952555",
"0.49918327",
"0.4989254",
"0.49826148",
"0.49797806",
"0.4977435",
"0.49749908",
"0.49725577",
"0.49656543",
"0.4957772",
"0.4954899",
"0.4948913",
"0.49426898",
"0.49410832",
"0.4929754",
"0.49242663",
"0.49229112",
"0.49183926",
"0.49117514",
"0.49042428",
"0.4900612",
"0.48996106",
"0.48993552",
"0.48941973",
"0.48915583",
"0.48888737",
"0.48833975",
"0.48788422",
"0.4874227",
"0.4874143",
"0.48739457",
"0.48730266",
"0.48636705",
"0.48630416",
"0.48622182",
"0.48530173",
"0.4846661",
"0.4845984",
"0.48435125"
] | 0.65017366 | 1 |
If member alarm is new and there is ID from intent it should load from db | private void setAlarmData(Intent intent) {
if (mAlarmId == Constants.DEFAULT_ALARM_ID) {
mAlarmId = intent.getIntExtra(Constants.EXTRA_ALARM_ID, Constants.DEFAULT_ALARM_ID);
// factory view model is used for sending parameters to the view model in our case
// with alarm entry id to make sure we have one entity on our viewModel
DetailViewModelFactory factory = new DetailViewModelFactory(mDb, mAlarmId);
mViewModel =
ViewModelProviders.of(this, factory).get(DetailViewModel.class);
// Observe changes in model in order to update UI
mViewModel.getAlarm().observe(this, new Observer<AlarmEntry>() {
@Override
public void onChanged(@Nullable AlarmEntry alarmEntry) {
mViewModel.getAlarm().removeObserver(this);
if (alarmEntry == null) {
return;
}
mAlarmId = alarmEntry.getId();
mMapDestination =
new MapDestination(alarmEntry.getLatitude(), alarmEntry.getLongitude(),
alarmEntry.getLocation(), alarmEntry.getRadius());
mAlarmRingtone = alarmEntry.getAlert() != null ? Uri.parse(alarmEntry.getAlert()) : null;
// populate the UI
populateUI(alarmEntry);
}
});
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void onNewIntent(Intent intent) {\n\n Bundle bundle=intent.getExtras();\n int uniqueFlagID=1;\n if(bundle!=null && (bundle.getInt(\"uniqueAppId\") > 0)) {\n DBAdapter adapter = new DBAdapter(getApplicationContext());\n adapter.getUpdatePresFlag(bundle.getString(\"type\"), bundle.getInt(\"uniqueAppId\"), \"1\");\n String AppointmentMessage1 = bundle.getString(AlarmReceiver.APPOINTMENT_MESSAGE);\n ApplicationBackgroundCheck.showNotificationDialog(\"Appointment Alert\", AppointmentMessage1, \"App\",uniqueFlagID,getApplicationContext(),getFragmentManager());\n }\n if(bundle!=null && (bundle.getInt(\"presUniqueId\") > 0)) {\n DBAdapter adapter = new DBAdapter(getApplicationContext());\n adapter.getUpdatePresFlag(bundle.getString(\"type\"),bundle.getInt(\"presUniqueId\"),\"1\");\n String RenewalMessage = bundle.getString(AlarmReceiver.PRESCRIPTION_RENEWAL_MESSAGE);\n ApplicationBackgroundCheck.showNotificationDialog(\"Prescription Renewal Alert\", RenewalMessage, \"PRES\",uniqueFlagID,getApplicationContext(),getFragmentManager());\n }\n if(bundle!=null && (bundle.getString(\"type\").equals(\"MED_TIT\"))) {\n String TitrationMessage = bundle.getString(AlarmReceiver.MEICATION_TITRATION_MESSAGE);\n ApplicationBackgroundCheck.showNotificationDialog(\"Medication Titration Alert\", TitrationMessage, \"MED_TIT\", uniqueFlagID,getApplicationContext(),getFragmentManager());\n }\n if(bundle!=null && (bundle.getString(\"type\").equals(\"EME\"))) {\n DBAdapter adapter= new DBAdapter(getApplicationContext());\n adapter.getUpdateReminderFlag(bundle.getString(\"type\"), bundle.getInt(\"id\"),\"1\");\n String EmergencyMedicationMessage = bundle.getString(AlarmReceiver.EMERGENCY_MEDICATION_MESSAGE);\n ApplicationBackgroundCheck.showNotificationDialog(\"Emergency Medication Alert\", EmergencyMedicationMessage, \"EME\",uniqueFlagID,getApplicationContext(),getFragmentManager());\n\n }\n\n\n }",
"@Override\r\n public void onClick(View v) {\n Alarm alarm = new Alarm(getContext(), userId);\r\n alarm.setAlarmWithNewPracticeTimes();\r\n }",
"@Override\n public void onClick(View v) {\n\n if(wake!=null && sleep!=null){\n int id= db.insertSleepReminder(\"\"+sleep.getTimeInMillis(),\"\"+wake.getTimeInMillis());\n Intent intent = new Intent(AddSleep.this, UnlockReceiver.class);\n intent.putExtra(\"wake_up\",\"\"+wake.getTimeInMillis());\n intent.putExtra(\"sleep\",\"\"+sleep.getTimeInMillis());\n intent.putExtra(\"id\",\"\"+id );\n\n PendingIntent intent1 = PendingIntent.getBroadcast(AddSleep.this,id,intent,PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);\n alarmManager.setExact(AlarmManager.RTC, sleep.getTimeInMillis(),intent1);\n\n intent = new Intent(AddSleep.this, WakeUpReceiver.class);\n intent.putExtra(\"wake_up\",\"\"+wake.getTimeInMillis());\n intent.putExtra(\"sleep\",\"\"+sleep.getTimeInMillis());\n intent.putExtra(\"id\",\"\"+id);\n\n intent1 = PendingIntent.getBroadcast(AddSleep.this,id,intent,PendingIntent.FLAG_UPDATE_CURRENT);\n\n alarmManager.setExact(AlarmManager.RTC, wake.getTimeInMillis(),intent1);\n\n Intent intent2 = new Intent(AddSleep.this,Reminder.class);\n startActivity(intent2);\n finish();} else\n {\n Toast.makeText(AddSleep.this,\"Please,Enter Sleep and Wake Up Time!\",Toast.LENGTH_SHORT).show();\n\n }\n\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch (id){\n case R.id.action_save:\n ahour = timer.getCurrentHour();\n amin = timer.getCurrentMinute();\n if ( ahour < 10) {\n shour = \"0\" + String.valueOf(ahour);\n } else {\n shour = String.valueOf(ahour);\n }\n if (amin < 10) {\n smin = \"0\" + String.valueOf(amin);\n } else {\n smin = String.valueOf(amin);\n }\n stime = shour + \":\" + smin;\n am = new MyAlarmManager(getApplicationContext());\n\n if (shour == null || smin ==null) {\n Toast.makeText(\n this,\n \"Please enter timer\",\n Toast.LENGTH_LONG\n ).show();\n } else {\n ContentValues values = new ContentValues();\n values.put(MyContract.Alarms.COLUMN_TIME, stime);\n\n\n // updated\n\n Uri uri = ContentUris.withAppendedId(MyContentprovider.CONTENT_URI, timeId);\n String selection = MyContract.Alarms.COLUMN_ID + \" = ?\";\n String[] selectionArgs = new String[] { Long.toString(timeId) };\n getContentResolver().update(\n uri,\n values,\n selection,\n selectionArgs\n );\n\n\n Intent intent = new Intent(EditActivity.this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n am.setAlarm();\n startActivity(intent);\n finish();\n }\n\n break;\n case R.id.action_delete:\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);\n alertDialog.setTitle(\"アラーム削除\");\n alertDialog.setMessage(\"このアラームを削除してもいいですか?\");\n\n alertDialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n am = new MyAlarmManager(getApplicationContext());\n Uri uri = ContentUris.withAppendedId(MyContentprovider.CONTENT_URI, timeId);\n String selection = MyContract.Alarms.COLUMN_ID + \" = ?\";\n String[] selectionArgs = new String[] { Long.toString(timeId) };\n getContentResolver().delete(\n uri,\n selection,\n selectionArgs\n );\n\n Intent intent = new Intent(EditActivity.this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n am.setAlarm();\n startActivity(intent);\n finish();\n }\n }).show();\n\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public void run() {\n if (intent != null && intent.hasExtra(\"id\")) {\n eventData.setId(intent.getIntExtra(\"id\", 0));\n eventDatabase.eventDAO().updateEvent(eventData);\n }\n // the condition when user click plus button from MainActivity.java (Insert a new row)\n else {\n eventDatabase.eventDAO().insertNewEvent(eventData);\n\n }\n finish(); // destroy activity (when u press back key after clicking \"save btn\", this activity won't be called again)\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Alibi alibi = (Alibi) context.getApplicationContext();\n UserEventManager uem = alibi.getUserEventManager();\n UserEvent event = uem.getCurrentEvent();\n\n if (event == null) {\n Log.d(Alibi.TAG, \"ReminderAlarm: null current event\");\n return;\n }\n\n String msgNotify = getNotificationMessage(event);\n String msgToast = context.getString(R.string.reminder_title) + \"\\n\" +\n msgNotify + \" since \" + event.getNiceStartTime();\n\n setNotification(context, msgNotify);\n remind(context, msgToast);\n }",
"@Override\n\tprotected void onResume() {\n\t\t_id=getIntent().getLongExtra(Globle._ID,0);\n\t\tSystem.out.println(\"\"+_id);\n\t\tloadData(_id);\n\t\tsuper.onResume();\n\t}",
"private void startPopup(Context context, Long id) {\n\n //Intent emaIntent = new Intent(context, VoiceRecognitionActivity.class); //The activity you want to start.\n //Intent emaIntent = new Intent(context, PopupActivity.class); //The activity you want to start.\n //Log.d(\"Alarm receiver\", \"received intent\");\n Random random = new Random();\n int value = random.nextInt(1);\n Intent emaIntent = new Intent(context, PopupActivity.class);\n emaIntent.putExtra(\"pos\", id);\n\n\n\n// if (value == 1) {\n// emaIntent = new Intent(context, PopupActivity.class); //The activity you want to start.\n// } else {\n// emaIntent = new Intent(context, VoiceRecognitionActivity.class);\n// }\n\n\n\n emaIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(emaIntent);\n }",
"public void startAlarm(Context context){\n Intent intent = new Intent(this,MonthlyReminderService.class);\n int received = intent.getIntExtra(\"recieved\", 0);\n intent.putExtra(\"received\", received);\n //int type = intent.getIntExtra(\"type\", 0);\n //Log.e(\"SurveyType\", Integer.toString(type));\n //intent.putExtra(\"type\", type);\n //intent.putExtra(\"date\", surveyDate);\n //intent.putExtra(\"type\", \"Health Literacy\");\n //Calendar now = Calendar.getInstance();\n //intent.putExtra(\"dayofYear\",now.get(Calendar.DAY_OF_YEAR));\n startService(intent);\n }",
"@Override\n public void onClick(View v) {\n Intent i = new Intent(ShakeActivity.this, JournalEntry.class);\n i.putExtra(\"ENTRY_TIME\", AlarmReceiver.getMidnight());\n startActivity(i);\n }",
"@Override\r\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\t\tBundle b = intent.getExtras();\r\n\t\tint id = 0;\r\n\r\n\t\tif ((id = b.getInt(AlarmFactory.ARG_NEWS_ID, -1)) >= 0) {\r\n\t\t\t// Toast.makeText(this, \"\"+id, Toast.LENGTH_SHORT).show();\r\n\t\t\tnew UpdateSourceTask(this, handler).execute(id, UpdateSourceTask.ALARM_TRIGER);\r\n\r\n\t\t}\r\n\t\treturn mStartMode;\r\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(\"android.intent.action.BOOT_COMPLETED\")) {\n // instatiate an alarm scheduler\n AlarmScheduler alarmScheduler = new AlarmScheduler();\n // instantiate the database\n SQLiteHelperAlarm sqLiteHelper = new SQLiteHelperAlarm(context);\n // get all the alarms stored in the database\n List<Alarm> alarms = sqLiteHelper.getAllAlarms();\n // pass each alarm to the alarmScheduler object\n for (Alarm alarm : alarms) {\n alarmScheduler.setAlarm(context, alarm);\n }\n }\n }",
"public void setAlarm(Context context, Alarm alarm) {\n // instantiate the system alarm service manager\n alarmMgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n // instantiate an intent for the AlarmReciever\n Intent intent = new Intent(context, AlarmReceiver.class);\n // pass the alarm id as an extra to be extracted in the receivier\n intent.putExtra(\"alarmID\", alarm.getId());\n // check if the alarm is on\n if (alarm.isOn()) {\n // if so check if it is recurring\n if (alarm.isRecurring()) {\n // for each day stipulated in the alarm, schedule an new alarm, each alarm id will\n // be multiplied with 10 and then an integer representation of each day will be\n // added i.e. alarm id = 10 and days a Sun = 1, Mon = 2... Sat = 7 therefore\n // sun alarm id = 101, Mon alarm id = 102... Sat alarm id = 107.\n for (Integer day : alarm.getDays()) {\n //multiply by 10 to uniquely identify the intent for each day or ends with 0 if not recurring\n alarmIntent = PendingIntent.getBroadcast(context, new BigDecimal(alarm.getId() * 10).intValueExact() + day, intent, 0);\n // instantiate a calander object\n Calendar calendar = Calendar.getInstance();\n // set to the current system time\n calendar.setTimeInMillis(System.currentTimeMillis());\n // set the calender day to day i.e. sun = 1, mon = 2 etc...\n calendar.set(Calendar.DAY_OF_WEEK, day);\n // set the calendar hour to alarm hour\n calendar.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n // as per hour, set to alarm minutes\n calendar.set(Calendar.MINUTE, new Integer(alarm.getMin()));\n // set seconds to 0 alarm activates close to 0th second of minute\n calendar.set(Calendar.SECOND, 0);\n // as alarm is recurring schedule the alarm to repeat every 7 day from set time\n // specified by alarm set calendar object\n alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY * 7, alarmIntent);\n }\n } else {\n // if the alarm is not recurring\n // uniquely identify the intent for each day and ends with 0 if not recurring\n alarmIntent = PendingIntent.getBroadcast(context, new BigDecimal(alarm.getId() * 10).intValueExact(), intent, 0);\n // get a calendar object\n Calendar calNow = Calendar.getInstance();\n // set the time to current system time\n calNow.setTimeInMillis(System.currentTimeMillis());\n // get a second instance of calendar\n Calendar calSet = (Calendar) calNow.clone();\n // set the time of the calendar object to the alarm specified time\n calSet.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n calSet.set(Calendar.MINUTE, new Integer(alarm.getMin()));\n calSet.set(Calendar.SECOND, 0);\n // check if the alarm specified time is set to before the current time\n if (calSet.compareTo(calNow) <= 0) {\n //Today Set time passed, count to tomorrow\n calSet.add(Calendar.DATE, 1);\n }\n // set the alarm to activate at once at the calendar specified time\n alarmMgr.setExact(AlarmManager.RTC_WAKEUP,\n calSet.getTimeInMillis(), alarmIntent);\n }\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Bundle bundle = intent.getExtras();\n int messageCID = bundle.getInt(\"clubID\",0);\n int messageTID = bundle.getInt(\"tournamentID\",0);\n if ( tournamentID != 0 ) { // tournament chat\n if ( messageTID == tournamentID ) {\n Log.d(TAG,\"New Tournament Chat\");\n loadMoreRecentChat();\n }\n } else if ( clubID != 0) { // club chat\n if ( clubID == messageCID ) {\n Log.d(TAG,\"New Club Chat\");\n loadMoreRecentChat();\n }\n } else {\n Log.d(TAG,\"Unknown Notification\");\n loadMoreRecentChat();\n }\n\n }",
"public void onClick(DialogInterface dialog, int id) {\n if (isCreate) {\n mDbAdapter.createReminder(userInput.getText().toString(), isImportant.isChecked());\n } else {\n Reminder reminder = mDbAdapter.fetchReminderById(selectedReminderId);\n reminder.setContent(userInput.getText().toString());\n reminder.setImportant(isImportant.isChecked()? 1 : 0);\n mDbAdapter.updateReminder(reminder);\n }\n updateListView();\n }",
"private void startYourLunchActivy() {\n UserHelper.getUser(this.getCurrentUser().getUid()).addOnSuccessListener(documentSnapshot -> {\n User user = documentSnapshot.toObject(User.class);\n String restaurantId = Objects.requireNonNull(user).getRestaurantId();\n\n if (!restaurantId.equals(\"\")) {\n Intent intent = new Intent(this, RestaurantActivity.class);\n intent.putExtra(RESTAURANT_TAG, restaurantId);\n startActivity(intent);\n } else {\n showSnackBar(getResources().getString(R.string.no_restaurant_picked));\n }\n });\n }",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n session = new Session(getActivity());\n sessionManager = SessionManager.getInstance(getActivity());\n userInfoSession = new UserInfoSession(getActivity());\n\n mCurrentUserId = sessionManager.getCurrentUserID();\n\n Bundle getBundle = getArguments();\n muteUserList = (ArrayList<MuteUserPojo>) getBundle.getSerializable(\"MuteUserList\");\n\n rg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n if (rb1.isChecked()) {\n muteDuration = \"8 Hours\";\n } else if (rb2.isChecked()) {\n muteDuration = \"1 Week\";\n } else if (rb3.isChecked()) {\n muteDuration = \"1 Year\";\n }\n }\n });\n\n if (muteUserList != null && muteUserList.size() == 1) {\n MuteUserPojo muteUserItem = muteUserList.get(0);\n String toUserId = muteUserItem.getReceiverId();\n ContactDB_Sqlite contactDB_sqlite = CoreController.getContactSqliteDBintstance(getActivity());\n\n MuteStatusPojo muteData = null;\n\n if (muteUserItem.getChatType().equalsIgnoreCase(\"group\")) {\n muteData = contactDB_sqlite.getMuteStatus(mCurrentUserId, null, toUserId, false);\n } else {\n String docId = mCurrentUserId + \"-\" + toUserId;\n String convId = userInfoSession.getChatConvId(docId);\n muteData = contactDB_sqlite.getMuteStatus(mCurrentUserId, toUserId, convId, false);\n Log.e(\"DataBase-->\", muteData + \"\");\n// muteData = contactsDB.getMuteStatus(mCurrentUserId, toUserId, convId, false);\n }\n\n\n if (muteData != null && muteData.getMuteStatus().equals(\"1\")) {\n if (muteData.getDuration().equalsIgnoreCase(\"8 Hours\")) {\n rb1.setChecked(true);\n } else if (muteData.getDuration().equalsIgnoreCase(\"1 Week\")) {\n rb2.setChecked(true);\n } else if (muteData.getDuration().equalsIgnoreCase(\"1 Year\")) {\n rb3.setChecked(true);\n }\n if (muteData.getNotifyStatus().equals(\"1\")) {\n check.setChecked(true);\n }\n }\n } else {\n rb1.setChecked(true);\n }\n\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (ConnectivityInfo.isInternetConnected(getActivity())) {\n listener.onMuteDialogClosed(false);\n getDialog().dismiss();\n } else {\n Toast.makeText(getActivity(), \"Check Your Network Connection\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n ok.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (ConnectivityInfo.isInternetConnected(getActivity())) {\n if (muteDuration == null || muteDuration.equals(\"\")) {\n Toast.makeText(getActivity(), \"Please choose duration\", Toast.LENGTH_SHORT).show();\n } else {\n for (MuteUserPojo muteUserItem : muteUserList) {\n String receiverId = muteUserItem.getReceiverId();\n String chatType = muteUserItem.getChatType();\n String secretType = muteUserItem.getSecretType();\n mLastMuteUserId = receiverId;\n\n String locDbDocId = getLocDBDocId(muteUserItem);\n// session.setMuteDuration(locDbDocId, muteDuration);\n\n String convId = null;\n if (chatType.equalsIgnoreCase(MessageFactory.CHAT_TYPE_SINGLE)) {\n if (userInfoSession.hasChatConvId(locDbDocId)) {\n convId = userInfoSession.getChatConvId(locDbDocId);\n }\n } else {\n // For group --- Group id and conversation id are same\n convId = receiverId;\n }\n\n if (!muteDuration.equals(\"\")) {\n int notifyStatus = 0;\n String value = getString(R.string.Default_ringtone);\n session.putTone(value);\n session.putgroupTone(value);\n if (check.isChecked()) {\n notifyStatus = 1;\n session.putTone(\"None\");\n session.putgroupTone(\"None\");\n }\n\n MuteUnmute.muteUnmute(EventBus.getDefault(), mCurrentUserId, receiverId, convId,\n chatType, secretType, 1, muteDuration, notifyStatus);\n\n } else {\n listener.onMuteDialogClosed(false);\n }\n\n /*if (!check.isChecked()) {\n session.setNotificationOnMute(locDbDocId, true);\n\n } else {\n session.setNotificationOnMute(locDbDocId, false);\n }*/\n\n mActivity.showProgressDialog();\n }\n }\n } else {\n Toast.makeText(getActivity(), \"Check Your Network Connection\", Toast.LENGTH_SHORT).show();\n }\n }\n\n });\n }",
"@Override\n public void onClick(View view) {\n if(eventType.equals(EventType.ORGANISE)){\n Log.d(TAG, \"In update event\");\n\n Bundle bundle = new Bundle();\n bundle.putString(BundleAndSharedPreferencesConstants.CREATE_OR_UPDATE, BundleAndSharedPreferencesConstants.UPDATE);\n bundle.putInt(DbConstants.EVENT_KEY_EVENT_ID, eventId);\n startNewActivity(CreateUpdateEventActivity.class, bundle);\n finish();\n }\n else if(eventType.equals(EventType.ATTEND)){\n Bundle bundle = new Bundle();\n bundle.putInt(DbConstants.EVENT_KEY_EVENT_ID, eventId);\n\n startNewActivity(SignInActivity.class, bundle);\n }\n }",
"@Override\n\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\t\t\t\tSQLiteDatabase db = helper.getWritableDatabase();\n\t\t\t\tContentValues values = new ContentValues();\n\t\t\t\tvalues.put(Globle.TITLE,et_title.getText().toString());\n\t\t\t\tvalues.put(Globle.CONTENT,et_content.getText().toString());\n\t\t\t\tvalues.put(Globle.SET_ITEM,set_date);\n\t\t\t\tvalues.put(Globle.ATTACK_TIEM,date);\n\t\t\t\tString where=Globle._ID+\"=\"+_id;\n\t\t\t\tint i=DBUtil.update(db, Globle.TABLE_NAME,values, where);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(i>=1){\n\t\t\t\t\tToast.makeText(Update_Activity.this,\"修改成功 \",Toast.LENGTH_SHORT).show();\n//\t\t\t\t\t\n\t\t\t\t\tAlarmManager alarmManager=(AlarmManager) getSystemService(ALARM_SERVICE);\n\t\t\t\t\tIntent intent=new Intent(Update_Activity.this,Ring_Activity.class);\n\t\t\t\t\tintent.putExtra(\"text\",et_content.getText().toString());\n\t\t\t\t\tcount++;\n\t\t\t\t\tSystem.out.println(\"\"+count);\n\t\t\t\t\tPendingIntent p_intent=PendingIntent.getActivity(Update_Activity.this,count,intent,PendingIntent.FLAG_UPDATE_CURRENT);\n\t\t\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),p_intent);\n\t\t\t\t\tIntent intent1=new Intent(Update_Activity.this,MainActivity.class);\n\t\t\t\t\tstartActivity(intent1);\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tToast.makeText(Update_Activity.this,\"修改失败\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\tIntent intent1=new Intent(Update_Activity.this,MainActivity.class);\n\t\t\t\t\tstartActivity(intent1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n System.out.println(\"Has Match Status : One \");\n if (intent.hasExtra(\"matchStatus\")){\n System.out.println(\"Has Match Status : Two \");\n sessionManager.setRefreshChatFragment(true);\n viewPager.setCurrentItem(2,true);\n }\n }",
"SBCallAlarm selectByPrimaryKey(@Param(\"mainId\") Integer mainId, @Param(\"alarmId\") Integer alarmId);",
"private void getAlarmsFromDB(){\n \t\tAlarmManager.getInstance().reset();\n \t\tAlarmManager.getInstance().load4DB(ctx, SimpleAlarm.class);\n \t\tStatus.getCurrentStatus().addObserver(AlarmManager.getInstance());\n \t}",
"public Alarm_Msg(Context context, Bundle extras){\n /*AlarmManager alarmMgr =\n (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(context, Alarm_Msg.class);\n intent.putExtra(REMINDER_BUNDLE, extras);\n PendingIntent pendingIntent =\n PendingIntent.getBroadcast(context, 0, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n Calendar time = Calendar.getInstance();\n time.setTimeInMillis(System.currentTimeMillis());\n time.set(Calendar.HOUR_OF_DAY, Integer.parseInt(extras.getString(\"time_h\")));\n time.set(Calendar.MINUTE, Integer.parseInt(extras.getString(\"time_m\")));\n\n alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP, time.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, pendingIntent);*/\n\n\n AlarmManager alarmMgr = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(context, Alarm_Msg.class);\n intent.putExtra(REMINDER_BUNDLE, extras);\n Bundle getBundle = intent.getBundleExtra(REMINDER_BUNDLE);\n NOTIFY_ID = NOTIFY_ID + getBundle.getInt(\"id\");\n //Toast.makeText(context, Integer.toString(NOTIFY_ID), Toast.LENGTH_LONG).show();\n PendingIntent pendingIntent =\n PendingIntent.getBroadcast(context, NOTIFY_ID, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n alarmMgr.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,\n SystemClock.elapsedRealtime() +\n 60 * 1000, pendingIntent);\n }",
"int updateByPrimaryKey(PineAlarm record);",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(), ReminderBroadcastReceiver.class);\n intent.putExtra(\"notificationText\", reminderData.getNotificationText());\n\n // Create pending intent with time given\n PendingIntent alarmIntent = PendingIntent.getBroadcast(getApplicationContext(), notificationId,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Create AlarmManager which is sent with pending intent\n AlarmManager alarm = (AlarmManager) getSystemService(ALARM_SERVICE);\n // Create time when notification will fire\n Calendar startTime = Calendar.getInstance();\n startTime.set(Calendar.DAY_OF_WEEK, startTime.get(Calendar.DAY_OF_WEEK));\n startTime.set(Calendar.HOUR_OF_DAY, timePicker.getHour());\n startTime.set(Calendar.MINUTE, timePicker.getMinute());\n startTime.set(Calendar.SECOND, 0);\n\n long alarmStartTime = startTime.getTimeInMillis();\n\n\n /* If reminder time is smaller than current time, start notification on next day, still in progress */\n\n /*\n if (startTime.getTimeInMillis() < System.currentTimeMillis()) {\n startTime.set(Calendar.DAY_OF_WEEK, startTime.get(Calendar.DAY_OF_WEEK + 1));\n alarmStartTime = startTime.getTimeInMillis();\n }\n else\n {\n alarmStartTime = startTime.getTimeInMillis();\n }\n */\n\n\n // Set alarm with (type, milliseconds, intent)\n // With RTC_WAKEUP we wake the device up and deliver the pending intent\n alarm.set(AlarmManager.RTC_WAKEUP, alarmStartTime, alarmIntent);\n saveData();\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n int msgType = intent.getIntExtra(\"NOTIF_TYPE\", 0); // grabs the notification message type\n int uniqueID = intent.getIntExtra(\"ID\", 0); // grabs the ID\n\n String msgExpire = \"Your food has expired!\";\n String msgSoonExpire = \"Your food is about to expire!\";\n\n if (msgType == 0) {\n createNotification(context, \"Fridge Manager\", msgExpire, \"Alarm\", uniqueID);\n }\n else {\n createNotification(context, \"Fridge Manager\", msgSoonExpire, \"Alarm\", uniqueID);\n }\n }",
"int updateByPrimaryKey(SBCallAlarm record);",
"@Override\n protected void startCreatingAlarm() {\n mSelectedAlarm = null;\n AlarmUtils.showTimeEditDialog(getChildFragmentManager(),\n null, AlarmClockFragmentPreL.this, DateFormat.is24HourFormat(getActivity()));\n }",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n Realm.init(getApplicationContext());\n Realm realm = Realm.getDefaultInstance();\n realm.beginTransaction();\n Activity toUpdate =\n realm.where(Activity.class).equalTo(\"id\", activity.getId()).findFirst();\n if (toUpdate == null) {\n return;\n }\n toUpdate.setDeleted(true);\n realm.copyToRealmOrUpdate(toUpdate);\n realm.commitTransaction();\n realm.close();\n finish();\n dialog.dismiss();\n }",
"@Override\n public void onClick(View v) {\n if(v.getId() == R.id.alarmCheck){\n // Put extras for RingtoneService\n myIntent.putExtra(\"extra\", \"no\");\n myIntent.putExtra(\"extra1\", \"main\");\n cal = Calendar.getInstance();\n // Get the time for the alarm at the index\n String tempTime = App.getTimes().get(indexofIntent);\n String[] times = tempTime.split(\":\");\n // Get the hour and minute from the string and set them to int\n int hour = Integer.parseInt(times[0]);\n int minute = Integer.parseInt(times[1]);\n // Set the alarm time\n cal.setTimeInMillis(System.currentTimeMillis());\n cal.set(Calendar.HOUR_OF_DAY, hour);\n cal.set(Calendar.MINUTE, minute);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n // State pattern used here\n state = new CreateState();\n manager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // add 24 hours\n cal.setTimeInMillis(cal.getTimeInMillis() + 86400000);\n // set the reciever\n Intent intent = new Intent(this.getApplicationContext(), AlarmReceiver.class);\n intent.putExtra(\"extra\", \"yes\");\n intent.putExtra(\"index\", indexofIntent);\n // Create a new intent\n PendingIntent pending = PendingIntent.getBroadcast(this.getApplicationContext(), App.getIds(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n // Overwrite the correct intent at the index\n App.setIntentAtIndex(indexofIntent, pending);\n App.setIds(App.getIds() + 1);\n // Handle the alarm\n // State pattern used here\n state.handle(manager, pending, cal, false);\n // Turn off ringtone\n sendBroadcast(myIntent);\n\n }\n // If snoozed then stop the media player and set the timer/calendar to 10 minutes\n else if(v.getId() == R.id.snooze){\n // Put extras for RingtoneService\n myIntent.putExtra(\"extra\", \"no\");\n myIntent.putExtra(\"extra1\", \"main\");\n // initialize AlarmManager\n manager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // set the state\n // State pattern used here\n state = new SnoozeState();\n cal = Calendar.getInstance();\n // Get the time the alarm was set\n String tempTime = App.getTimes().get(indexofIntent);\n String[] times = tempTime.split(\":\");\n int hour = Integer.parseInt(times[0]);\n int minute = Integer.parseInt(times[1]);\n // Set calendar to time initially set\n cal.setTimeInMillis(System.currentTimeMillis());\n cal.set(Calendar.HOUR_OF_DAY, hour);\n cal.set(Calendar.MINUTE, minute);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n // Create a new intent for alarm receiver\n Intent intent = new Intent(this.getApplicationContext(), AlarmReceiver.class);\n // Add extras for RingtoneService\n intent.putExtra(\"extra\", \"yes\");\n intent.putExtra(\"index\", indexofIntent);\n // Create a new intent wiht the BroadcastReceiver\n PendingIntent pending = PendingIntent.getBroadcast(this.getApplicationContext(), App.getIds(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n // Set the new intent in the list\n App.setIntentAtIndex(indexofIntent, pending);\n App.setIds(App.getIds() + 1);\n // handle the snooze state\n // State pattern used here\n state.handle(manager, pending, cal, false);\n //send a toast to the user letting them know it will snooze for 10 minutes\n Toast t = Toast.makeText(getApplicationContext(), \"Alarm Snoozed for 10 minutes\",\n Toast.LENGTH_SHORT);\n t.setGravity(Gravity.FILL_HORIZONTAL, 10, 1500);\n t.show();\n // Stop the current ringtone\n sendBroadcast(myIntent);\n }\n }",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int pos, long id) {\n Intent intent = new Intent(getApplicationContext(), Detail.class);\n // intent.putExtra(\"i\",listAlarm.i);\n startActivity(intent);\n\n\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n\n boolean isAlarmOn = Utils.isAlarmOn();\n PollService.setServiceAlarm(MyApplication.getContext(), isAlarmOn);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n setAlarm(context);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Bundle alarmRingtoneData = intent.getExtras();\n int alarmRingtoneNumber = alarmRingtoneData.getInt(\"alarmClipNumber\");\n\n Intent serviceIntent = new Intent(context, RingtonePlayingService.class);\n serviceIntent.putExtra(\"alarmClipNumber\", alarmRingtoneNumber);\n\n context.startService(serviceIntent);\n }",
"int updateByPrimaryKey(BachAlarmRole record);",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (resultCode == RESULT_OK && !data.getBooleanExtra(NOTIFICATION, false)) {\n Log.d(TAG, \"RESULT OKAY! \");\n\n time = sCentre.getEstTime();\n\n setBookingView();\n SharedPreferences sharedpreferences = getSharedPreferences(BOOKING_PREFERENCE, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedpreferences.edit();\n Gson gson = new GsonBuilder().create();\n\n editor.putBoolean(BOOKING, true);\n editor.putString(BOOKING_MODEL, gson.toJson(sBooking));\n editor.putString(STUDENT_MODEL, gson.toJson(sStudent));\n editor.putString(CENTRE_MODEL, gson.toJson(sCentre));\n editor.commit();\n\n mCancelBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n CancelDialogue cancelDialogue = new CancelDialogue();\n cancelDialogue.show(getSupportFragmentManager(), \"CancelDialogue\");\n }\n });\n\n /* Retrieve a PendingIntent that will perform a broadcast */\n Intent alarmIntent = new Intent(this, AlarmReceiver.class);\n pendingIntent = PendingIntent.getBroadcast(this, 0, alarmIntent, 0);\n startAlarm();\n\n startup(); // start the Thread for count\n\n }\n }",
"@Override\n public void loadData(Intent intent) {\n alarmClock = AlarmClock.fromByteArray(intent.getByteArrayExtra(\"ALARM_CLOCK\"));\n\n if (alarmClock == null) alarmClock = AlarmClock.load(context);\n\n if (alarmClock == null)\n alarmClock = new AlarmClock(System.currentTimeMillis(), AlarmClock.AlarmState.OFF,\n false, \"\", \"\");\n else {\n Calendar c = Calendar.getInstance();\n c.setTime(new Date(alarmClock.getTime()));\n view.setTimePicker(c.get(Calendar.HOUR_OF_DAY), c.get(Calendar.MINUTE));\n\n if (alarmClock.getState().equals(AlarmClock.AlarmState.ON))\n countdownStart(alarmClock.getTime());\n }\n\n updateUI();\n }",
"@Override\n public void onClick(View v) {\n boolean newReminder = false;\n if (reminder == null){\n reminder = new Reminder();\n newReminder = true;\n }\n //\n reminder.setName(mName.getText().toString());\n reminder.setNotes(mNotes.getText().toString());\n //\n if (newReminder) {\n // Creacion de nuevo reminder\n EventBus.getDefault().post(new Events.ReminderCreateEvent(reminder));\n } else{\n // Actualizacion de reminder\n EventBus.getDefault().post(new Events.ReminderUpdateEvent(reminder));\n }\n\n getActivity().finish(); // TODO: don't just finish()!\n }",
"private void getIncomingIntent()\n {\n if(getIntent().hasExtra(\"Title\")\n && getIntent().hasExtra(\"Time\")\n && getIntent().hasExtra(\"Date\")\n && getIntent().hasExtra(\"Duration\")\n && getIntent().hasExtra(\"Location\")\n && getIntent().hasExtra(\"EventDetails\"))\n {\n Title = getIntent().getStringExtra(\"Title\");\n Time = getIntent().getStringExtra(\"Time\");\n Date = getIntent().getStringExtra(\"Date\");\n Duration = getIntent().getStringExtra(\"Duration\");\n Location = getIntent().getStringExtra(\"Location\");\n EventDetails = getIntent().getStringExtra(\"EventDetails\");\n\n setData(Title,Time,Date,Duration,Location,EventDetails);\n }\n }",
"@Override\n public void onClick(View v) {\n\n title = mTitle.getText().toString();\n details = mDetails.getText().toString();\n repeats = 0;\n date.setHours(hour);\n date.setMinutes(minute);\n try {\n repeats = Integer.parseInt(mRepeats.getText().toString());\n } catch (NumberFormatException io){\n\n }\n if (mSpinner.getSelectedItem().toString().equals(\"Days\")) {\n repeats = repeats*24*60;\n }\n else if (mSpinner.getSelectedItem().toString().equals(\"Hours\")) {\n repeats = repeats*60;\n }\n Assignment newAssignment = new Assignment(title, details, repeats, date);\n AssignmentList.get(getActivity()).addAssignment(newAssignment);\n //Calendar c = Calendar.getInstance();\n //c.setTime(date);\n mScheduleClient.setAlarmForNotification(newAssignment); // tell service to set alarm for this date\n // (talks to client which then talks to service)\n if (mScheduleClient!=null) {\n mScheduleClient.doUnbindService();\n }\n getActivity().finish();\n\n }",
"public void onClick(DialogInterface dialog,int id) {\n Intent in = new Intent(OnOffTime.this,AddTime.class);\n in.putExtra(\"posEdit\",position);\n in.putExtra(\"Start\", collections.get(position).get(\"Start\"));\n in.putExtra(\"Stop\",collections.get(position).get(\"Stop\"));\n in.putExtra(\"Switch\",collections.get(position).get(\"Switch\"));\n in.putExtra(\"DayOfWeeks\",collections.get(position).get(\"DayOfWeeks\"));\n //in.putExtra(\"Sex\",collections.get(position).get(\"Sex\"));\n startActivityForResult(in,202);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n SharedPreferences preferences = context.getSharedPreferences(SettingsActivity.prefFile,\n Context.MODE_PRIVATE);\n if (!preferences.getBoolean(SettingsActivity.notificationSetting, false))\n return;\n\n // Get intent data\n this.name = intent.getStringExtra(\"name\");\n this.dose = intent.getStringExtra(\"dose\");\n this.time = intent.getStringExtra(\"time\");\n\n //\n DBHelper db = new DBHelper(context);\n Map<String, String> idTimeMap = db.getIDTimeMap(this.name);\n\n // Medication notifications will have sound\n Uri sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n // Setting up intent, ad building the notification\n NotificationManager mNM = (NotificationManager) context.getSystemService(\n Context.NOTIFICATION_SERVICE);\n Intent intent1 = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(\n context, NewMedActivity.pendingId++, intent1, 0);\n\n Notification notification = new Notification.Builder(context)\n .setContentTitle(this.time)\n .setContentText(String.format(\"%s %s.\",\n context.getText(R.string.nt_txt), this.name))\n .setSmallIcon(R.mipmap.fmn_app_icon_round)\n .setContentIntent(pendingIntent)\n .setAutoCancel(true)\n .build();\n\n // Sending the notification\n mNM.notify(NotifyService.notificationTag, Integer.parseInt(idTimeMap.get(this.time)),\n notification);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_alarm_list_set_member);\n\n\t\tIntent getIntent = getIntent();\n\n\t\towner = (TextView) findViewById(R.id.owner);\n\t\talarmTime = (TextView) findViewById(R.id.alarm_time);\n\t\trepeatDay = (TextView) findViewById(R.id.repeat_day);\n\t\tsound = (TextView) findViewById(R.id.sound);\n\t\tvolume = (TextView) findViewById(R.id.volume);\n\t\tcondition = (TextView) findViewById(R.id.condition);\n\t\tlistFriend = (ListView) findViewById(R.id.list_friend);\n\n\t\tbackBtn = (Button) findViewById(R.id.back);\n\n\t\tupdateCondition = (Button) findViewById(R.id.update_condition);\n\t\tupdateFriend = (Button) findViewById(R.id.update_friend);\n\t\talarmBtn = (Button) findViewById(R.id.btn_alarm);\n\t\tfriendBtn = (Button) findViewById(R.id.btn_friend);\n\t\tsearchBtn = (Button) findViewById(R.id.btn_search);\n\t\tsetBtn = (Button) findViewById(R.id.btn_set);\n\n\t\towner.setText(getIntent.getStringExtra(\"owner_id\"));\n\t\t// Log.i(\"디\", \" \");\n\t\talarmTime.setText(getIntent.getStringExtra(\"alarm_time\"));\n\t\t// Log.i(\"서\", \" \");\n\t\tif (getIntent.getStringExtra(\"repeat_day\").equals(\"x/x/x/x/x/x/x\")) {\n\t\t\t// Log.i(\"터\", \" \");\n\t\t\trepeatDay.setText(\"반복 없음\");\n\t\t\t// Log.i(\"지\", \" \");\n\t\t\trepeatDay.setTextColor(Color.parseColor(\"#DC143C\"));\n\t\t\t// Log.i(\"니\", \" \");\n\t\t} else if (getIntent.getStringExtra(\"repeat_day\").equals(\n\t\t\t\t\"월/화/수/목/금/토/일\")) {\n\t\t\t// Log.i(\"모\", \" \");\n\t\t\trepeatDay.setText(\"매일\");\n\t\t\t// Log.i(\"르\", \" \");\n\t\t\trepeatDay.setTextColor(Color.parseColor(\"#228B22\"));\n\t\t\t// Log.i(\"겠\", \" \");\n\t\t} else {\n\t\t\t// Log.i(\"음\", \" \");\n\t\t\tString temp1 = getIntent.getStringExtra(\"repeat_day\").replaceAll(\n\t\t\t\t\t\"/\", \"\");\n\t\t\t// Log.i(\"알\", \" \");\n\t\t\tString temp2 = temp1.replaceAll(\"x\", \"\");\n\t\t\t// Log.i(\"려\", \" \");\n\t\t\trepeatDay.setText(temp2);\n\t\t\t// Log.i(\"주\", \" \");\n\t\t\trepeatDay.setTextColor(Color.parseColor(\"#228B22\"));\n\t\t\t// Log.i(\"세\", \" \");\n\t\t}\n\t\tsound.setText(getIntent.getStringExtra(\"sound\"));\n\t\tvolume.setText(\"volume = \" + getIntent.getStringExtra(\"volume\"));\n\t\tif (getIntent.getStringExtra(\"condition\").equals(\"(waiting)\")) {\n\t\t\tcondition.setText(getIntent.getStringExtra(\"condition\"));\n\t\t\tcondition.setTextColor(Color.parseColor(\"#A9A9A9\"));\n\t\t} else if (getIntent.getStringExtra(\"condition\").equals(\"(using)\")) {\n\t\t\tcondition.setText(getIntent.getStringExtra(\"condition\"));\n\t\t\tcondition.setTextColor(Color.parseColor(\"#228B22\"));\n\t\t} else {\n\t\t\tcondition.setText(getIntent.getStringExtra(\"condition\"));\n\t\t\tcondition.setTextColor(Color.parseColor(\"#DC143C\"));\n\t\t}\n\t\tmemberCondition = getIntent.getStringExtra(\"condition\");\n\t\tcondition.setText(getIntent.getStringExtra(\"condition\"));\n\t\ttalkAlarmCode = Long.parseLong(getIntent.getStringExtra(\"alarm_code\"));\n\t\talarmTimeString = getIntent.getStringExtra(\"alarm_time\");\n\t\tsoundString = getIntent.getStringExtra(\"sound\");\n\t\tvolumeString = getIntent.getStringExtra(\"volume\");\n\t\trepeatDayString = getIntent.getStringExtra(\"repeat_day\");\n\n\t\tadapterSelectInfo = new AdptSelectInfo8(getApplicationContext(),\n\t\t\t\tR.layout.select_info7, arraySelectInfo);\n\t\tlistFriend.setAdapter(adapterSelectInfo);\n\n\t\ttry {\n\t\t\tloadJspSearchAlarmMember = new LoadJspSearchAlarmMember(\n\t\t\t\t\ttalkAlarmCode);\n\t\t\tresult = loadJspSearchAlarmMember.execute().get();\n\n\t\t\tif (talkAlarmCode == -1) {\n\n\t\t\t} else {\n\t\t\t\taddSelectInfo(result);\n\t\t\t\tadapterSelectInfo.setArraySelectInfo(arraySelectInfo);\n\t\t\t\tlistFriend.setAdapter(adapterSelectInfo);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tupdateCondition.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\tconditionUpdate = createDialog2(\n\t\t\t\t\t\tpref.getValue(\"member_code\", -1), talkAlarmCode,\n\t\t\t\t\t\tmemberCondition);\n\t\t\t\tconditionUpdate.show();\n\t\t\t}\n\t\t});\n\n\t\tupdateFriend.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\tIntent i = new Intent(AlarmListSetMemberActivity.this,\n\t\t\t\t\t\tAlarmInviteActivity.class);\n\t\t\t\ti.putExtra(\"talk_alarm_code\", talkAlarmCode);\n\t\t\t\tstartActivity(i);\n\t\t\t\toverridePendingTransition(0, 0);\n\n\t\t\t}\n\t\t});\n\n\t\tbackBtn.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\tIntent i = new Intent(AlarmListSetMemberActivity.this,\n\t\t\t\t\t\tAlarmListSetActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\toverridePendingTransition(0, 0);\n\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\tsearchBtn.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\tIntent i = new Intent(AlarmListSetMemberActivity.this,\n\t\t\t\t\t\tSearchFriendActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\toverridePendingTransition(0, 0);\n\n\t\t\t\tfinish();\n\n\t\t\t}\n\t\t});\n\n\t\tfriendBtn.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\tIntent i = new Intent(AlarmListSetMemberActivity.this,\n\t\t\t\t\t\tFriendListActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\toverridePendingTransition(0, 0);\n\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public void onClick(View v) {\n Calendar calendar = Calendar.getInstance();\n Date now = calendar.getTime();\n int hour = calendar.get(Calendar.HOUR_OF_DAY);\n int minute = calendar.get(Calendar.MINUTE);\n Alarm alarm = new Alarm();\n alarm.setHour(hour);\n alarm.setMinute(minute);\n\n mAlarmClockViewModel.insertNewAlarmClock(alarm);\n AlarmClock currentClock = (AlarmClock) mRecyclerView.findViewById(R.id.alarm_clock_item);\n currentClock.setDate(now);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n AppUtils.setMorningAlarm(context);\n }",
"PineAlarm selectByPrimaryKey(Long pineAlarmId);",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n iboClass ibo = dataSnapshot.getValue(iboClass.class);\n\n System.out.println(\"IBONum_Input: \" + ibo.IBONum);\n fullName = ibo.fullName;\n\n SharedPreferences.Editor ed = savedValues.edit();\n makeToast(\"Welcome back, \" + fullName);\n ed.putString(\"IBONum\", ibo.IBONum);\n ed.commit();\n startNewActivity();\n\n\n\n }",
"public void setAlarm() {\n\t\tid.toAlarm();\n\t}",
"@Override\n public void onClick(View view) {\n namaReminder = etNama.getText().toString().trim();\n tanggal = etTanggal.getText().toString().trim();\n waktu = etWaktu.getText().toString().trim();\n catatan = edCatatan.getText().toString().trim();\n\n //mengambil value dari spinner\n frekuensiData = spnrPilih.getSelectedItem().toString();\n\n //mengambil value dari RadioButton\n prioritas = \"\";\n if (rbPenting.isChecked()) {\n prioritas = \"penting\";\n } else if (rbSedang.isChecked()) {\n prioritas = \"sedang\";\n } else if (rbKecil.isChecked()) {\n prioritas = \"kecil\";\n }\n //bisa juga syntaxnya if (rbPenting.isChecked()){ prioritas = rbpenting.getText().toString();\n\n tag = \"\";\n if (cbMediasi.isChecked()) {\n tag += \"mediasi, \";\n }\n if (cbBelanja.isChecked()) {\n tag += \"belanja, \";\n }\n if (cbKonsumsi.isChecked()) {\n tag += \"konsumsi, \";\n }\n if (cbTravel.isChecked()) {\n tag += \"travel, \";\n }\n // pengunaan + pada sama dengan(=) untuk penambahan data yang dimasukan\n\n reminderActive = swthAktif.isChecked();\n\n //insert data ke model\n Reminder reminder = new Reminder();\n reminder.setNamaReminder(namaReminder);\n reminder.setTanggal(tanggal);\n reminder.setWaktu(waktu);\n reminder.setCatatan(catatan);\n reminder.setFrekuensiData(frekuensiData);\n reminder.setPrioritas(prioritas);\n reminder.setTag(tag);\n reminder.setReminderActive(reminderActive);\n int id = getIntent().getIntExtra(\"id\", 0);\n\n //Memanggil database Realm\n Realm realm = Realm.getDefaultInstance();\n // Membuat id pada Realm auto incremenet\n Number lastId = realm.where(Reminder.class).max(\"id\");\n\n// jika id > 0 (mode edit)\n if (id > 0) {\n reminder.setId(id);\n } else {\n int nextId;\n if (lastId == null) {\n nextId = 1;\n } else {\n nextId = lastId.intValue() + 1;\n }\n reminder.setId(nextId);\n }\n\n\n //insert data ke realm database\n realm.beginTransaction();\n realm.insertOrUpdate(reminder);\n realm.commitTransaction();\n\n //read realm database\n Reminder reminderRealm = realm.where(Reminder.class).sort(\"id\", Sort.DESCENDING).findFirst();\n\n Toast.makeText(FormReminderActivity.this, \"Data berhasil disimpan -> \" + reminderRealm.getId(), Toast.LENGTH_SHORT).show();\n finish();\n\n //action disini tanpa menggunakan realm\n// Toast.makeText(FormReminderActivity.this, \"button diclik : \" +\n// namaReminder + \" \" + tanggal + \" \" + waktu + \" \" + prioritas + \" \" + tag + \" \" + frekuensiData + \" \" + reminderActive + \" \" + catatan, Toast.LENGTH_LONG).show();\n }",
"public void onReceive(Context context, Intent intent) {\n\t\t\tBundle extras = intent.getExtras();\n\t\t\tString flags = extras != null ? extras.getString(REMINDER_BUNDLE)\n\t\t\t\t\t: \"nothing returned\";\n\t\t\tif (Lullabye.debug) Log.d(tag,\"alarm received \"+flags+\" intent \"+intent);\n\t\t\tif (flags.equals(\"alarm\")) {\n\t\t\t\tif (Lullabye.debug) Log.d(tag, \"starting automatically \");\n\t\t\t\t// if repeat is true, set new alarm in 24 h (86 400seconds)\n\t\t\t\tif (Options.isMalarmRepeat()) {\n\t\t\t\t\tnew Alarm(context, \"alarm\", (86400));\n\t\t\t\t}\n\t\t\t\tLullabye.startplaying();\n\t\t\t} \n\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t\t\t\tif (which == 0) {\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition = new LoadJspUpdateAlarmCondition(\n\t\t\t\t\t\t\t\t\t\tmemberCode, talkAlarmCode, \"using\");\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition.execute();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition = new LoadJspUpdateAlarmCondition(\n\t\t\t\t\t\t\t\t\t\tmemberCode, talkAlarmCode,\n\t\t\t\t\t\t\t\t\t\t\"non-activity\");\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition.execute();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\t\t\t\tAlarmListSetMemberActivity.this,\n\t\t\t\t\t\t\t\t\tAlarmListSetActivity.class);\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t\toverridePendingTransition(0, 0);\n\n\t\t\t\t\t\t\tfinish();\n\n\t\t\t\t\t\t\tsetDismiss(conditionUpdate);\n\n\t\t\t\t\t\t}",
"public void intentHandler() {\n Intent intent = getIntent();\n if (intent.hasExtra(\"DATA\")) {\n data = (String[]) getIntent().getSerializableExtra(\"DATA\");\n recievedPosition = (int) getIntent().getSerializableExtra(\"POS\");\n if(recievedPosition != 0){\n IOException e = new IOException();\n try {\n itemArrAdapt.updateItem(recievedPosition, data, e);\n this.setPrefs();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n } else {\n // Start Normal\n }\n }",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tif (which == 0) {\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition = new LoadJspUpdateAlarmCondition(\n\t\t\t\t\t\t\t\t\t\tmemberCode, talkAlarmCode, \"using\");\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition.execute();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition = new LoadJspUpdateAlarmCondition(\n\t\t\t\t\t\t\t\t\t\tmemberCode, talkAlarmCode,\n\t\t\t\t\t\t\t\t\t\t\"non-activity\");\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition.execute();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\t\t\t\tAlarmListSetMemberActivity.this,\n\t\t\t\t\t\t\t\t\tAlarmListSetActivity.class);\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t\toverridePendingTransition(0, 0);\n\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\tsetDismiss(conditionUpdate);\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tif (which == 0) {\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition = new LoadJspUpdateAlarmCondition(\n\t\t\t\t\t\t\t\t\t\tmemberCode, talkAlarmCode, \"using\");\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition.execute();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition = new LoadJspUpdateAlarmCondition(\n\t\t\t\t\t\t\t\t\t\tmemberCode, talkAlarmCode,\n\t\t\t\t\t\t\t\t\t\t\"non-activity\");\n\t\t\t\t\t\t\t\tloadJspUpdateAlarmCondition.execute();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\t\t\t\tAlarmListSetMemberActivity.this,\n\t\t\t\t\t\t\t\t\tAlarmListSetActivity.class);\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t\toverridePendingTransition(0, 0);\n\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\tsetDismiss(conditionUpdate);\n\t\t\t\t\t\t}",
"private void editAlarm(Alarm affectedAlarm) {\n \t\t//TODO: Launch AddAlarmActivity with this alarm as base so the user can edit it.\n \t}",
"@Override\n public void onClick(View v) {\n dbHelper = new DBHelper(getBaseContext());\n final SQLiteDatabase db = dbHelper.getWritableDatabase();\n dbHelper.eventReg(db,event.id,\"2\");\n }",
"public void onReceive(final String delId) {\n //Toast.makeText(getApplicationContext(),\"onReceive\",Toast.LENGTH_LONG).show();\n\n String action = getIntent().getAction();\n if(\"Delete\".equals(action)) {// to execute delete option\n //Toast.makeText(getApplicationContext(), \"Delete\", Toast.LENGTH_LONG).show();\n gHelper = new DbHelperGoal(this.getBaseContext());\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \"+ DbHelperGoal.TABLE_NAME + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + delId, null);\n if (mCursor.moveToFirst()) {\n do{\n keyIndex = Integer.valueOf(delId);\n final String delGoal = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.GOAL_TITLE)), delAmount = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.CURRENCY)) + \" \" + mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.AMOUNT));\n final String delDate = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.DAY)) + \"-\" + monStr.get(mCursor.getInt(mCursor.getColumnIndex(DbHelperGoal.MONTH)) - 1) + \"-\" + mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.YEAR));\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Delete \" + delGoal + \" \" + delDate + \"of amount \" + delAmount);\n build.setMessage(\"Do you want to delete ?\");\n build.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), delGoal + \" \" + delDate + \" of amount \" + delAmount + \" \" + \" is deleted.\", Toast.LENGTH_LONG).show();\n dataBase.delete(DbHelperGoal.TABLE_NAME, DbHelperGoal.KEY_ID + \"=\" + keyIndex, null);\n myGoalNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n myGoalNotifyMgr.cancel(keyIndex);\n displayData();\n dialog.cancel();\n }\n });\n build.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n //AlertDialog alert = build.create();\n alert = build.create();\n alert.show();\n }while (mCursor.moveToNext());\n }else{\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setMessage(\"Sorry, the data might have been moved or deleted.\");\n build.setNegativeButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n }\n } else if(\"Pay\".equals(action)){\n //Toast.makeText(getApplicationContext(), \"Contribute\", Toast.LENGTH_LONG).show();\n //onContribute(delId);\n LayoutInflater li = LayoutInflater.from(GoalDisActivity.this);\n View promptsPaymentView = li.inflate(R.layout.payment_layout, null);\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Payment\");\n build.setMessage(\"Please Enter payment amount\");\n build.setView(promptsPaymentView);\n PayValue = (EditText) promptsPaymentView.findViewById(R.id.PaymentEnter1);\n //PayValue.isFocused();\n PayValue.setFocusableInTouchMode(true);\n PayValue.setFocusable(true);\n PayValue.requestFocus();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.showSoftInput(PayValue, InputMethodManager.SHOW_IMPLICIT);\n build.setPositiveButton(\"Ok\",new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n check = 0; val = 0;\n moneyValue = \"0\"; dbExpAmount = \"0\";\n\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \"+ DbHelperGoal.TABLE_NAME+\" WHERE \"+DbHelperGoal.KEY_ID+\" = \"+ delId , null);\n if (mCursor.moveToFirst()) {\n do {\n moneyValue = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.ALT_PAYMENT));\n dbExpAmount = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.AMOUNT));\n check = mCursor.getFloat(mCursor.getColumnIndex(DbHelperGoal.ALT_EXPENSE));\n } while (mCursor.moveToNext());\n Toast.makeText(getApplication(), \"Money Paid:\" + moneyValue, Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(getApplication(), \"Money not Paid:\" + delId, Toast.LENGTH_LONG).show();\n }\n val = Float.valueOf(PayValue.getText().toString())+ Float.valueOf(moneyValue);\n if(val-check <= Float.valueOf(dbExpAmount) && val-check >= 0) {// within the Target Amount\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + delId;\n dataBase.execSQL(strSQL);\n ContentValues values = new ContentValues();\n values.put(DbHelperGoal.ALT_PAYMENT, String.valueOf(val));\n Toast.makeText(getApplication(), PayValue.getText().toString() + \" added\", Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n myGoalNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n myGoalNotifyMgr.cancel(keyIndex);\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }else if(val-check > Float.valueOf(dbExpAmount) && val-check >= 0){// if client collects extra amount for that goal, the Target amount extends\n build2 = new AlertDialog.Builder(GoalDisActivity.this);\n build2.setTitle(\"Confirmation\");\n build2.setMessage(\"The Payment Amount is exceeding the Target Amount. Do you want to increment the Target amount to the new value?\");\n build2.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.AMOUNT + \"=\" + String.valueOf(val - check) + \",\" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + delId;\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n myGoalNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n myGoalNotifyMgr.cancel(keyIndex);\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n build2.setNeutralButton(\"No, only Savings\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + delId;\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n myGoalNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n myGoalNotifyMgr.cancel(keyIndex);\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n\n build2.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"Payment Cancelled\", Toast.LENGTH_SHORT).show();\n //displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n\n alert2 = build2.create();\n alert2.show();\n alert2.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\n }else{\n Toast.makeText(getApplication(),\"Sorry, the amount is beyond the Target Amount\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n build.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"Payment Cancelled\", Toast.LENGTH_SHORT).show();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n } else if(\"Extend\".equals(action)) {\n Toast.makeText(getApplicationContext(), \"Extend\", Toast.LENGTH_LONG).show();\n onUpdate(delId);\n }\n }",
"private void setUpNotification() {\n if (getIntent().getExtras() != null) {\n for (String key : getIntent().getExtras().keySet()) {\n Object value = getIntent().getExtras().get(key);\n Logger.e(\"Key: \" + key + \" Value: \" + value);\n\n if(key.equals(\"Key\")) {\n try {\n String idStr = String.valueOf(value);\n int id = Integer.parseInt(idStr);\n onOpenJobItem(id);\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n\n }\n }\n // [END handle_data_extras]\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n ArrayList<String> key=intent.getStringArrayListExtra(\"time\");\n Calendar calendar = Calendar.getInstance();\n int hours = calendar.get(Calendar.HOUR_OF_DAY);\n int minutes = calendar.get(Calendar.MINUTE);\n Toast.makeText(context, String.valueOf(key.size()), Toast.LENGTH_LONG).show();\n /*if (Data.size()>0) {\n Toast.makeText(context, Data.get(0), Toast.LENGTH_LONG).show();\n /*int hour = Integer.valueOf(Data.get(0).substring(0, Data.get(0).indexOf(\":\")));\n int minute = Integer.valueOf(Data.get(0).substring(Data.get(0).indexOf(\":\")));\n if ((hours == hour) && (minutes == minute))\n try {\n play(context, R.raw.girlfart01);//vibrator.vibrate(2000);Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);\n Data.remove(0);\n Data.remove(1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }*/\n Log.v(this.getClass().getName(), \"Timed alarm onReceive() started at time: \" + new java.sql.Timestamp(System.currentTimeMillis()).toString());\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch(id){\n case R.id.History_of_appointments:\n Intent intent_history = new Intent(this,history_of_appointments.class);\n intent_history.putExtra(\"netId\", getIntent().getStringExtra(\"netId\").toString());\n this.startActivity(intent_history);\n return true;\n case R.id.Create_appointment_slot:\n Intent intent_create_appointment = new Intent(this,create_appointment_slot.class);\n intent_create_appointment.putExtra(\"netId\", getIntent().getStringExtra(\"netId\").toString());\n this.startActivity(intent_create_appointment);\n return true;\n case R.id.Messenger:\n Intent intent_messenger = new Intent(this,Messenger.class);\n intent_messenger.putExtra(\"netId\", getIntent().getStringExtra(\"netId\").toString());\n this.startActivity(intent_messenger);\n return true;\n case R.id.Search:\n Intent intent_search = new Intent(this,search.class);\n this.startActivity(intent_search);\n return true;\n case R.id.Logout:\n Intent intent_Logout = new Intent(this,LoginActivity.class);\n SharedPreferences settings = getSharedPreferences(\"UTA_APPT_SCHEDULER\", 0);\n\n settings.edit()\n .putString(\"UserName\", \"NA\")\n .putString(\"Password\", \"NA\")\n .putString(\"user_name\", \"NA\")\n .putString(\"user_dept\", \"NA\")\n .putString(\"user_type\", \"NA\")\n .putString(\"user_email\", \"NA\")\n .putString(\"user_deptname\", \"NA\")\n .apply();\n intent_Logout.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent_Logout.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n intent_Logout.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n this.startActivity(intent_Logout);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n\n long when = System.currentTimeMillis();\n NotificationManager notificationManager = (NotificationManager) context\n .getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent notificationIntent = new Intent(context, MainActivity.class);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,\n notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n\n Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n NotificationCompat.Builder mNotifyBuilder = new NotificationCompat.Builder(\n context).setSmallIcon(R.drawable.ic_file_download)\n .setContentTitle(\"App of the Day\")\n .setContentText(\"Get today's App of the Day...\").setSound(alarmSound)\n .setAutoCancel(true).setWhen(when)\n .setContentIntent(pendingIntent)\n .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000});\n notificationManager.notify(MID, mNotifyBuilder.build());\n MID++;\n\n }",
"@Override\n public void onClick(View v) {\n Bundle emptyBundle = new Bundle();\n emptyBundle.putBoolean(\"isEmpty\",true);\n emptyBundle.putInt(\"ReminderCode\",returnNewReminderCode());\n Intent resultIntent=new Intent(MainActivity.this,NewReminder.class);\n resultIntent.putExtras(emptyBundle);\n startActivityForResult(resultIntent,0);\n }",
"public void onReceive(Context context, Intent intent) {\n\n Toast.makeText(context, \"Alarm worked.\", Toast.LENGTH_LONG).show();\n final Calendar c = Calendar.getInstance();\n long mHour = c.get(Calendar.HOUR_OF_DAY);\n long mMinute = c.get(Calendar.MINUTE);\n Log.d(\"myTag\", \"Alarm executed at : \" + mHour + \":\" + mMinute);\n\n }",
"@Override\n public void RelationshipAdded(boolean ok) {\n final Intent i = new Intent(this,ELFStaff.class);\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n }",
"public void prepare_intent(int requestCode, long invoking_id){\n Intent intent = new Intent(BilansView.this, BilansAdd.class);\n\n if (invoking_id > 0) {\n HashMap<String, String> map = GetItem(invoking_id);\n intent.putExtra(\"item_id\", invoking_id);\n String timestamp[] = map.get(\"data\").split(\" \");\n intent.putExtra(\"data\", timestamp[0]);\n intent.putExtra(\"time\", timestamp[1]);\n intent.putExtra(\"tytul\", map.get(\"tytul\"));\n } else {\n intent.putExtra(\"data\", Utils.datenow());\n intent.putExtra(\"time\", Utils.timenow());\n intent.putExtra(\"amount\", \"\");\n }\n startActivityForResult(intent, requestCode);\n }",
"public synchronized static Uri newAlarm(Context context) {\n return context.getContentResolver().insert(\n Uri.parse(CONTENT_URI_ALL_ALARMS), null);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n mAlarmId = Constants.DEFAULT_ALARM_ID;\n\n mDb = AppDatabase.getInstance(this);\n\n // Init the data binding object\n mDetailBinding = DataBindingUtil.setContentView(this, R.layout.activity_detail);\n\n // Init the save button\n Button mMapButton = mDetailBinding.locationDetails.OpenMapButton;\n mMapButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n onOpenMapButtonClicked();\n }\n });\n\n LinearLayout ringtone = mDetailBinding.clockDetails.alert;\n ringtone.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View view) {\n pickRingtone();\n }\n\n });\n\n // Check for saved state (like after phone orientation change) - and load it\n if (savedInstanceState != null) {\n if (savedInstanceState.containsKey(INSTANCE_ALARM_ID))\n mAlarmId = savedInstanceState.getInt(INSTANCE_ALARM_ID, Constants.DEFAULT_ALARM_ID);\n if (savedInstanceState.containsKey(INSTANCE_ALARM_ADDRESS_DATA)) {\n mMapDestination = savedInstanceState.getParcelable(INSTANCE_ALARM_ADDRESS_DATA);\n }\n if (savedInstanceState.containsKey(INSTANCE_ALARM_RINGTONE)) {\n mAlarmRingtone = Uri.parse(savedInstanceState.getString(INSTANCE_ALARM_RINGTONE));\n }\n }\n\n // If ALARM_ID was sent, it is update mode (list item clicked)\n Intent intent = getIntent();\n if (intent != null && intent.hasExtra(Constants.EXTRA_ALARM_ID)) {\n setAlarmData(intent);\n }\n updateMapImage(true);\n setRingtoneName();\n }",
"@Override\n public void onClick(View v) {\n calendar.set(Calendar.HOUR_OF_DAY, alarm_timepicker.getHour());\n calendar.set(Calendar.MINUTE, alarm_timepicker.getMinute());\n\n // getting the int values of the hour and minute\n int hour = alarm_timepicker.getHour();\n int minute = alarm_timepicker.getMinute();\n\n //converting the int values to strings\n String hour_string = String.valueOf(hour);\n String minute_string = String.valueOf(minute);\n\n // 10:4 -> 10:04\n if (minute < 10) {\n minute_string = \"0\" + String.valueOf(minute);\n }\n\n // method that changes the update text Textbox\n set_alarm_text(\"Alarm set to: \" + hour_string + \":\" + minute_string);\n\n\n // put in extra string into my_intent\n // tells the clock that you pressed the \"alarm on\" button\n my_intent.putExtra(\"extra\", \"alarm on\");\n\n //put in an extra long value into my intent\n //tells the clock that you want a certain value from the\n // dropdown menu/spinners\n my_intent.putExtra(\"alarm_choice\", choose_alarm_sound);\n\n // create a pending intent that delays the intent\n // until the specified calendar time\n pending_intent = PendingIntent.getBroadcast(MainActivity.this, 0, my_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //set the alarm manager\n alarm_manager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pending_intent);\n\n }",
"private void checkIntentInformation() {\n Bundle extras = getIntent().getExtras();\n Gson gson = new Gson();\n if (extras != null) {\n Curso aux;\n aux = (Curso) getIntent().getSerializableExtra(\"addCurso\");\n if (aux == null) {\n aux = (Curso) getIntent().getSerializableExtra(\"editCurso\");\n if (aux != null) {//Accion de actualizar\n //found an item that can be updated\n String cursoU = \"\";\n cursoU = gson.toJson(aux);\n\n apiUrlTemp = apiUrlAcciones+\"acc=updateC\" +\"&cursoU=\"+cursoU +\"&profesor_id=\"+aux.getProfesor().getCedula();\n MyAsyncTasksCursoOperaciones myAsyncTasksOp = new MyAsyncTasksCursoOperaciones();\n myAsyncTasksOp.execute();\n }\n } else {//Accion de agregar\n //found a new Curso Object\n String cursoA = \"\";\n cursoA = gson.toJson(aux);\n\n apiUrlTemp = apiUrlAcciones+\"acc=addC\" +\"&cursoA=\"+cursoA +\"&profesor_id=\"+aux.getProfesor().getCedula();\n MyAsyncTasksCursoOperaciones myAsyncTasksOp = new MyAsyncTasksCursoOperaciones();\n myAsyncTasksOp.execute();\n }\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n // setOneTimeAlarm();\n System.out.println(\"inside boot complete\");\n setRepeatingAlarm(context);\n //throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n ApproveIttekaafModel approveIttekaafModel;\n approveIttekaafModel= IttekaafLists.get(position);\n\n\n\n Intent myIntent = new Intent(IttekaafListActivity.this, IttekaafAcceptedRejected.class);\n myIntent.putExtra(\"userName\", approveIttekaafModel.getName());\n myIntent.putExtra(\"userPhoneNo\", approveIttekaafModel.getPhoneNo());\n\n\n myIntent.putExtra(\"mosqueId\",myphone);//mosqueid\n startActivity(myIntent);\n\n }",
"public void onClick(View v) {\n switch (v.getId()) {\n case R.id.hsmic:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // je récupère le PID de la donnée cliquée\n in.putExtra(TAG_PID, id_hsmic);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in, 100);\n\n break;\n case R.id.msmic:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in2 = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // sending pid to next activity\n in2.putExtra(TAG_PID, id_msmic);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in2, 100);\n\n break;\n case R.id.ming:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in3 = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // sending pid to next activity\n in3.putExtra(TAG_PID, id_ming);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in3, 100);\n\n break;\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String taskName = intent.getStringExtra(\"taskName\");\n int order = intent.getIntExtra(\"order\",-1);\n Toast.makeText(work.this,taskName +\" \" ,Toast.LENGTH_SHORT).show();\n\n if(taskName != null)\n {\n Cursor data = myDB.getListContents();\n\n if(data.getCount() > 0)\n {\n if(order == 2)\n myDB.deleteTask(taskName);\n else if(order == 0)\n {\n myDB.updateTask(taskName,taskName,\"\",1,\"WORK\",\"ordinary\",\"Done\");\n }\n else\n {\n Intent transferIntent = new Intent(getBaseContext(), AddActivity.class );\n // whichActivity = \"WEEKEND\";\n\n //we need to transfer the task we want to edit now and change add Bt to save changes\n // transferIntent.putExtra(\"taskName\",taskName);\n\n while (data.moveToNext()) {\n if (data.getString(3).equals(whichActivity) && data.getString(1).equals(taskName)) {\n transferIntent.putExtra(\"taskName\",taskName);\n transferIntent.putExtra(\"description\",data.getString(2));\n transferIntent.putExtra(\"date\",data.getString(4));\n }\n }\n // transferIntent.putExtra(\"taskName\",taskName);\n startActivity(transferIntent);\n }\n\n\n loadData();\n }\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n showReminderNotification(context);\n }",
"@Override\n protected void onResume() {\n super.onResume();\n alarmList = DataManager.getInstance().getAlarmListForDevice(mSelectedDevice);\n mAlarmAdapter.notifyAdapter(alarmList);\n }",
"public void OnToggleClicked(View view)\n {\n\n long time;\n if (((ToggleButton) view).isChecked())\n {\n //startActivity(Intent)\n Toast.makeText(MainActivity.this, \"ALARM ON\", Toast.LENGTH_SHORT).show();\n Calendar calendar=Calendar.getInstance();\n\n int currentApiVersion = android.os.Build.VERSION.SDK_INT;\n if (currentApiVersion > android.os.Build.VERSION_CODES.LOLLIPOP_MR1)\n {\n calendar.set(Calendar.HOUR_OF_DAY,alarmTimePicker.getHour());\n calendar.set(Calendar.MINUTE, alarmTimePicker.getMinute());\n }\n else {\n calendar.set(Calendar.HOUR_OF_DAY,alarmTimePicker.getCurrentHour());\n calendar.set(Calendar.MINUTE, alarmTimePicker.getCurrentMinute());\n }\n\n Intent intent = new Intent(this, AlarmReceiver.class);\n pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0);\n\n time=(calendar.getTimeInMillis()-(calendar.getTimeInMillis()%60000));\n if(System.currentTimeMillis()>time)\n {\n if (Calendar.AM_PM == 0)\n time = time + (1000*60*60*12);\n else\n time = time + (1000*60*60*24);\n }\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, time, 10000, pendingIntent);\n }\n else\n {\n alarmManager.cancel(pendingIntent);\n Toast.makeText(MainActivity.this, \"ALARM OFF\", Toast.LENGTH_SHORT).show();\n }\n //public class DeezerConnect.Builder();\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String pid = ((TextView) view.findViewById(R.id.pid)).getText()\n .toString();\n String idresp = ((TextView) view.findViewById(R.id.idresp)).getText()\n .toString();\n\n // Starting new intent\n Intent in = new Intent(getApplicationContext(),\n MainActivity.class);\n // sending pid to next activity\n in.putExtra(TAG_PID, pid);\n in.putExtra(TAG_RESPID, respid);\n db.deleteResi();\n db.addResidencia(pid,null,null,null,null,null,null,null,idresp,null);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in, 100);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.newalarm);\n\n loadAfterRedirect();\n if (getIntent().getIntExtra(\"Id\", -1) != -1) {\n //Put everything to text, delete old view with this id\n Button timeHourButton = (Button) findViewById(R.id.timeHourButton);\n Button timeMinuteButton = (Button) findViewById(R.id.timeMinuteButton);\n EditText alarmName = (EditText) findViewById(R.id.alarmName);\n TextView dateContent = (TextView) findViewById(R.id.dateContent);\n SeekBar volumeBar = (SeekBar) findViewById(R.id.volumeBar);\n Button toneButton = (Button) findViewById(R.id.toneButton);\n\n FName = getIntent().getStringExtra(\"Tone\");\n String[] UFFName = FName.split(\"/\");\n\n timeHourButton.setText(getIntent().getStringExtra(\"Hour\"));\n timeMinuteButton.setText(getIntent().getStringExtra(\"Minute\"));\n alarmName.setText(getIntent().getStringExtra(\"Name\"));\n volumeBar.setProgress(getIntent().getIntExtra(\"Volume\", 75));\n toneButton.setText(\"Alarm tone: \" + UFFName[UFFName.length - 1]);\n dateContent.setText(Date);\n\n Hours = Integer.parseInt(getIntent().getStringExtra(\"Hour\"));\n Minutes = Integer.parseInt(getIntent().getStringExtra(\"Minute\"));\n Date = getIntent().getStringExtra(\"Date\");\n AlarmType = getIntent().getIntExtra(\"Type\", 0);\n\n //Only location is missing.\n } else {\n\n String curDayS;\n String curMonthS;\n Calendar c = Calendar.getInstance();\n\n int Minute = c.get(Calendar.MINUTE);\n int Hour = c.get(Calendar.HOUR_OF_DAY);\n\n int curDay = c.get(Calendar.DAY_OF_MONTH);\n int curMonth = c.get(Calendar.MONTH) + 1;\n int curYear = c.get(Calendar.YEAR);\n\n if (curDay < 10)\n curDayS = \"0\" + curDay;\n else\n curDayS = \"\" + curDay;\n\n if (curMonth < 10)\n curMonthS = \"0\" + curMonth;\n else\n curMonthS = \"\" + curMonth;\n\n\n String Hourstring = Integer.toString(Hour);\n String Minutestring = Integer.toString(Minute);\n\n if (Integer.toString(Hour).length() == 1) {\n Hourstring = \"0\" + Integer.toString(Hour);\n }\n\n if (Integer.toString(Minute).length() == 1) {\n Minutestring = \"0\" + Integer.toString(Minute);\n }\n\n\n Date = curDayS + \"-\" + curMonthS + \"-\" + curYear;\n final String CurrentTime = Hourstring + \":\" + Minutestring;\n }\n }",
"@Override\n public void onClick(View view) {\n Intent intent = AlarmPagerActivity.newIntent(sApplicationContext, mAlarm.getId());\n startActivity(intent);\n }",
"public void configureReturnAlarm(int BID){\n alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);\n\n //Configure intent with proper information\n Intent intent = new Intent(this, RequestPushService.class);\n\n intent.putExtra(\"TO\", FirebaseInstanceId.getInstance().getToken());\n intent.putExtra(\"BODY\", \"This is just a reminder that a book you have checked out is due in 5 days.\");\n intent.putExtra(\"TITLE\", \"Don't forget to return your book!\");\n intent.putExtra(\"BID\", BID);\n intent.putExtra(\"ALARM_TYPE\", getResources().getInteger(R.integer.ALARM_5_DAY_WARNING));\n PendingIntent serviceIntent = PendingIntent.getService(this, getResources().getInteger(R.integer.ALARM_5_DAY_WARNING) + BID, intent, 0);\n\n //Calculate ring time from now in ms\n long currentTime = System.currentTimeMillis();\n long oneDay = 60 * 60 * 24 * 1000;\n long nineDays = oneDay * 9;\n\n //Set alarm\n alarmManager.set(\n AlarmManager.RTC,\n currentTime + nineDays,\n serviceIntent\n );\n\n //Save alarm so it can be reset in case of reboot\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n prefEditor.putString(\"ALARM\" + BID + \"-TO\", FirebaseInstanceId.getInstance().getToken());\n prefEditor.putString(\"ALARM\" + BID + \"-BODY\", \"This is just a reminder that a book you have checked out is due in 5 days.\");\n prefEditor.putString(\"ALARM\" + BID + \"-TITLE\", \"Don't forget to return your book!\");\n prefEditor.putInt(\"ALARM-BID\" + BID, BID);\n prefEditor.putInt(\"ALARM\" + BID + \"-TYPE\", getResources().getInteger(R.integer.ALARM_5_DAY_WARNING));\n prefEditor.putLong(\"ALARM\" + BID + \"-RING-TIME\", currentTime + nineDays);\n prefEditor.apply();\n }",
"@Override\n public void onClick(View v) {\n String id = (String) mapTmp.get(\"id\");\n Intent intent = new Intent(MapActivity.this, ViewMeetingActivity.class);\n intent.putExtra(\"id\", id);\n startActivity(intent);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n /*if (id == android.R.id.home){\n //Intent intent = new Intent();\n setResult(Activity.RESULT_CANCELED);\n finish();\n\n overridePendingTransition(\n R.anim.left_to_right_in, R.anim.left_to_right_out);\n }*/\n\n if(id == R.id.action_save){\n\n objectId = extras.getString(\"ObjectId\");\n\n final ParseQuery<ParseObject> object = ParseQuery.getQuery(\"Materia\");\n object.whereEqualTo(\"objectId\", objectId);\n object.getInBackground(objectId, new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject object, ParseException e) {\n if (e == null) {\n String newSummary, newHour;\n\n newSummary = editSummary.getText().toString();\n newHour = values[editHours.getValue()];\n\n object.put(\"Clase\", newSummary);\n object.put(\"Hora\", newHour);\n object.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Toast.makeText(getApplicationContext(),\n \"Error al intentar agregar materia. Intente de nuevo.\",\n Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }\n });\n\n setResult(Activity.RESULT_OK);\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"public void onClick(View v) {\n switch (v.getId()) {\n case R.id.pss:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // je récupère le PID de la donnée cliquée\n in.putExtra(TAG_PID, id_pss);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in, 100);\n\n break;\n case R.id.pab:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in2 = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // sending pid to next activity\n in2.putExtra(TAG_PID, id_pab);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in2, 100);\n\n break;\n case R.id.tpr:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in3 = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // sending pid to next activity\n in3.putExtra(TAG_PID, id_tpr);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in3, 100);\n\n break;\n }\n }",
"public void updatePatient(View view) {\r\n\t\tboolean seenByDoctor;\r\n\t\t\r\n\t\tIntent intent = getIntent();\r\n\r\n\t\t// Get the staff member from AccessRecordActivity.\r\n\t StaffMember staff = (StaffMember) intent.getSerializableExtra(\"staff\");\r\n\t \r\n\t // Get Record from AccessRecordActivity\r\n\t Record record = (Record) intent.getSerializableExtra(\"record\");\r\n\t \r\n\t // Sets patient's new blood pressure measurement . \r\n\t EditText pressure = (EditText) findViewById(R.id.blood_pressure);\r\n\t String bloodPressureString = pressure.getText().toString();\r\n\t int bloodPressure = Integer.parseInt(bloodPressureString);\r\n\t \r\n\t // Sets patient's new heart rate measurement .\r\n\t EditText rate = (EditText) findViewById(R.id.heart_rate);\r\n\t String heartRateString = rate.getText().toString();\r\n\t int heartRate = Integer.parseInt(heartRateString);\r\n\t \r\n\t // Sets patient's new blood pressure measurement .\r\n\t EditText seenBy = (EditText) findViewById(R.id.prescription_name);\r\n\t String seenByDoctorString = seenBy.getText().toString();\r\n\t \r\n\t //Sets in the record whether this patient has seen a doctor yet. \r\n\t seenByDoctor = seenByDoctorString.equalsIgnoreCase(\"Yes\");\r\n\t \r\n\t // Sets the new patient's symptoms.\r\n\t EditText symptom = \r\n\t \t\t(EditText) findViewById(R.id.prescription_instructions);\r\n\t String symptoms = symptom.getText().toString();\r\n\t \r\n\t // Sets the new patient's temperature. \r\n\t EditText temp = (EditText) findViewById(R.id.temperature);\r\n\t String temperatureString = temp.getText().toString();\r\n\t double temperature = Double.parseDouble(temperatureString);\r\n\t \r\n\t try {\r\n\t \t//This patient's record exists add to it.\r\n\t \tstaff.setTemperature(record, temperature);\r\n\t \tstaff.setBloodPressure(record, bloodPressure);\r\n\t\t staff.setHeartRate(record, heartRate);\r\n\t\t staff.setSeenByDoctor(record, seenByDoctor,\r\n\t\t \t\tthis.getApplicationContext());\r\n\t\t staff.setSymptoms(record, symptoms);\r\n\t\t staff.updateUrgency(record);\r\n\t\t \r\n\t\t} catch (Exception e) {\r\n\t\t\t// prompt for a record\r\n\t\t\t Intent reenter = new Intent(this, RetryUpdateInfo.class);\r\n\t\t\t reenter.putExtra(\"staff\", staff);\r\n\t\t\t startActivity(reenter);\r\n\t\t}\r\n\t \r\n\t\ttry {\r\n\t\t\tif (StaffMember.getRecords().getUrgencyRecords().\r\n\t\t\t\t\tcontains(record.getHealthCardNum())){\r\n\t\t\t StaffMember.getRecords().removePatientFromUrgency(record);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tStaffMember.getRecords().removePatient(record.getHealthCardNum());\r\n\t\t\tStaffMember.getRecords().add(record);\r\n\t\t\tStaffMember.getRecords().saveRecordsToFile(\"PatientsAndRecords\", \r\n\t\t\t\t\topenFileOutput(\"PatientsAndRecords\",\r\n\t\t\t\t\t\t\tContext.MODE_PRIVATE));\r\n\t\t\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t //With this patient dealt with the previous activity is returned too.\r\n\t Intent intent1 = new Intent(this, UpdatePatientActivity.class);\r\n\t intent1.putExtra(\"staff\", staff);\r\n\t intent1.putExtra(\"record\", record);\r\n\t startActivity(intent1);\t \r\n\t}",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(mContext, viewUpdateDeleteAMedicine.class);\n\n int mID= medData.get(position).getMedID();\n String medid = String.valueOf(mID);\n\n int uID= medData.get(position).getMedID();\n String userid = String.valueOf(uID);\n\n intent.putExtra(\"MedID\", medid);\n intent.putExtra(\"UserID\",medData.get(position).getUserID());\n intent.putExtra(\"MedName\", medData.get(position).getMedName());\n intent.putExtra(\"MedType\",medData.get(position).getMedType());\n intent.putExtra(\"MedFrequency\", medData.get(position).getMedFreq());\n intent.putExtra(\"MedDose\", medData.get(position).getMedDose());\n intent.putExtra(\"MedTime\", medData.get(position).getMedTime());\n intent.putExtra(\"MedDuration\", medData.get(position).getMedDuration());\n intent.putExtra(\"MedStart\", medData.get(position).getMedStartdate());\n intent.putExtra(\"MedDescript\", medData.get(position).getMedDescrip());\n\n mContext.startActivity(intent);\n\n }",
"@SuppressLint(\"RestrictedApi\")\n public void getEmergencyAssistance(){\n final String uID = objAccount.getCurrentUser().getUid();\n ArrayList<String> allMemberID = new ArrayList<>();\n\n ArrayList<objFamily> allFamily = tb_Family.getInstance(context).getAllFamilyByUid(uID);\n for(objFamily family : allFamily){\n for(String memberID : family.getMembersList()){\n if(!memberID.matches(uID)\n && !allMemberID.contains(memberID))\n allMemberID.add(memberID);\n }\n }\n\n //Add listening events for each member\n for(String id : allMemberID){\n Query mRef = mDatabase.getReference()\n .child(keyUtils.emergencyAssistanceList)\n .child(id)\n .limitToLast(1);\n\n mRef.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n if(dataSnapshot.getValue() != null){\n\n boolean isNewEmergency = false;\n\n fb_emergencyAssistance fireBase_EmergencyAssistance = dataSnapshot.getValue(fb_emergencyAssistance.class);\n\n if(fireBase_EmergencyAssistance != null){\n\n if(!fireBase_EmergencyAssistance.getListSeen().contains(uID))\n isNewEmergency = true;\n\n final String pathEmergency = dataSnapshot.getRef().getPath().toString();\n objEmergencyAssistance emergencyAssistance = new objEmergencyAssistance(pathEmergency, fireBase_EmergencyAssistance);\n\n boolean flag = false;\n //If not received, notice and write in SQLite\n if(!emergencyAssistance.getListReceived().contains(uID)){\n //Set received\n List<String> listReceived = emergencyAssistance.getListReceived();\n listReceived.add(uID);\n setReceivedEmergencyAssistance(pathEmergency,listReceived);\n tb_EmergencyAssistance.getInstance(context).addEmergencyAssistance(emergencyAssistance);\n\n flag = true;\n }\n\n //Notifications have news\n if(flag)\n mView.emergencyAssistance(tb_Account.getInstance(context).getAccountByID(id), emergencyAssistance, isNewEmergency);\n else\n mView.emergencyAssistance(null, null, isNewEmergency);\n\n }\n }\n }\n\n @Override\n public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }\n }",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\n\t\t\tBundle bundleBroadcast = intent.getExtras();\n\t\t\tdateTextView.setText(bundleBroadcast.getString(\"key\"));\n\n\t\t\tList.clear();\n\t\t\tList = ActivityModule.get_fitmi_exercise_log(databaseObject);\n\t\t\t// setAdapter();\n\t\t\tactivityAdapter.notifyDataSetChanged();\n\n\t\t}",
"@SuppressLint(\"WrongConstant\")\n @Override\n public int onStartCommand(Intent myIntent, int flags, int startId) {\n if (myIntent != null && myIntent.getExtras() != null) {\n id = myIntent.getExtras().getString(\"id\");\n time = myIntent.getExtras().getString(\"time\");\n\n }\n\n\n return START_STICKY;\n }",
"private void populateListView() {\n Log.d(TAG, \"populateListView: Displaying data in the ListView.\");\n\n Cursor data = mDatabaseHelper.getEventData();\n ArrayList<String> listData = new ArrayList<>();\n while(data.moveToNext()){\n listData.add(data.getString(1));\n }\n\n /* Set list adapter */\n ListAdapter adapter = new ArrayAdapter<>(this, R.layout.event_list_item, listData);\n mListView.setAdapter(adapter);\n\n /* Set onClick Listener to take user to single event and transfer ID and Name intent to new activity */\n mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n String eventName = adapterView.getItemAtPosition(i).toString();\n Log.d(TAG, \"onItemClick: You Clicked on \" + eventName);\n\n Cursor data = mDatabaseHelper.getEventID(eventName);\n int eventID = -1;\n while(data.moveToNext()){\n eventID = data.getInt(0);\n }\n if(eventID > -1){\n Log.d(TAG, \"onItemClick: The ID is: \" + eventID);\n Intent SingleEventIntent = new Intent(calendarAllEvents.this, calendarSingleEvent.class);\n SingleEventIntent.putExtra(\"eventID\",eventID);\n SingleEventIntent.putExtra(\"eventName\",eventName);\n startActivity(SingleEventIntent);\n }\n else{\n toastMessage(getResources().getString(R.string.noID));\n }\n }\n });\n }",
"public void setAlarm(Context context, int pk, long time, int Hora, int Minuto) {\n\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, Hora);\n calendar.set(Calendar.MINUTE, Minuto);\n\n\n //Se crea la hora correcta para el sistema\n long newTime = 1000 * 60 * 60 * time;\n AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n Intent alarmIntent = new Intent(context, AlarmReceiver.class);\n alarmIntent.putExtra(\"alarma\", pk);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, pk, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), newTime, pendingIntent);\n\n\n\n }",
"public int addAlarm(Alarm alarm) {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n\n values.put(KEY_NAME, alarm.getName());\n values.put(KEY_HOUR, alarm.getHour());\n values.put(KEY_MINUTE, alarm.getMinute());\n values.put(KEY_STATE, alarm.getState());\n\n int rowInserted = (int) database.insert(TABLE_NAME, null, values);\n database.close();\n\n return rowInserted;\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n\n AlarmAlertWakeLock.acquireScreenCpuWakeLock(context);\n Bundle bundle = intent.getExtras();\n final Alarm alarm = (Alarm) bundle.getSerializable(\"alarm\");\n\n Intent alarmActivityIntent = new Intent(context, AlarmAlertActivity.class);\n alarmActivityIntent.putExtra(\"alarm\", alarm);\n\n alarmActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n context.startActivity(alarmActivityIntent);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (IAlarmHelper.FILE_SAVE_SLEEP_ALARM.exists()) {\n\t\t\t\t\tString sleepAlarms = IAlarmHelper.androidFileload(IAlarmOnActivity.this, IAlarmHelper.FILENAME_SAVE_SLEEP_ALARM);\n\t\t\t\t\tsleepAlarms = sleepAlarms + getTime + \"-\";\n\t\t\t\t\tLog.e(\"Save sleeping alarms: \", sleepAlarms);\n\t\t\t\t\tIAlarmHelper.androidFileSave(IAlarmOnActivity.this, IAlarmHelper.FILENAME_SAVE_SLEEP_ALARM, sleepAlarms);\n\t\t\t\t} else {\n\t\t\t\t\tIAlarmHelper.androidFileSave(IAlarmOnActivity.this, IAlarmHelper.FILENAME_SAVE_SLEEP_ALARM, (getTime + \"-\"));\n\t\t\t\t}\n\t\t\t\tstartService(new Intent(IAlarmOnActivity.this, IAlarmSleepService.class));\n\t\t\t\tfinish();\n\t\t\t}",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == ADD_NEW_COFFEEMAKER) {\r\n // Make sure the request was successful\r\n if (resultCode == RESULT_OK) {\r\n Bundle MBuddle = data.getExtras();\r\n String identity = MBuddle .getString(\"identity\");\r\n int minutes = MBuddle.getInt(\"minutes\");\r\n int seconds = MBuddle.getInt(\"seconds\");\r\n\r\n AddItem(identity,minutes,seconds);\r\n }\r\n }\r\n }",
"@Override public void onClick(View view) {\n Intent nuevo_lugar = new Intent(getApplicationContext(), EdicionLugarActivity.class);\n nuevo_lugar.putExtra(\"_id\", \"UID\");\n startActivity(nuevo_lugar);\n }",
"private void update_medplan(final Context context) {\n SharedPreferences pref = getSharedPreferences(\"user_key\", MODE_PRIVATE);\n String url = \"https://mobsysbackend.herokuapp.com/request.json\";\n\n RequestQueue queue = Volley.newRequestQueue(this);\n\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"uat\", pref.getString(\"user_key\", \"missing\"));\n JSONObject parameters = new JSONObject(params);\n\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST,\n url, parameters,\n new Response.Listener() {\n @Override\n public void onResponse(Object response) {\n if (Meds.listAll(Meds.class).size() > 0) {\n for (Meds m : Meds.listAll(Meds.class)) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n }\n JSONObject json = (JSONObject) response;\n Gson g = new Gson();\n medplan = g.fromJson(json.toString(), MedPlan.class);\n Log.i(\"JSONtoString\", \"onResponse: \" + json.toString());\n tvarzt.setText(\"Austellender Arzt: \" + medplan.getDoctor());\n tvpatient.setText(\"Ausgestellt für: \" + medplan.getPatient());\n\n List<Meds> medlist = medplan.getMeds();\n MedicineListAdapter adapter = new MedicineListAdapter(context, R.layout.adapter_view_layout, medlist);\n listView.setAdapter(adapter);\n\n for (Meds m : Meds.listAll(Meds.class)) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n //doing some databse stuff\n //remember record indexes start with 1\n Medplaninfo check = Medplaninfo.findById(Medplaninfo.class, (long) 1);\n\n if (check == null) {\n Log.e(\"CHECK\", \"No empty object was found. something must have went wrong\");\n } else {\n check.setDoctor(medplan.getDoctor());\n check.setMedcount(medplan.getMedcount());\n check.setPatient(medplan.getPatient());\n //delete old meds\n Meds.deleteAll(Meds.class);\n //save new meds\n for (Meds _med : medplan.meds) {\n _med.save();\n }\n check.save();\n }\n\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n Log.i(\"TAG\", \"onErrorResponse: Something went wrong during the updateing\");\n\n }\n }\n );\n requestQueue.add(jsonObjReq);\n }",
"@Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n long lastMessageTime = sharedPref.getLong(\"last_announcement\", System.currentTimeMillis());\n\n /*get announcementItem from database*/\n AnnouncementItem announcementItem = dataSnapshot.getValue(AnnouncementItem.class);\n\n /*compare time of last read announcementItem and announcementItem from database*/\n if (announcementItem.getTime() > lastMessageTime) {\n /*builder for push notification*/\n Notification.Builder builder = new Notification.Builder(AnnouncementService.this)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"Announcement\")\n .setContentText(\"There is a new announcement\");\n\n /*intent for push notification*/\n Intent resultIntent = new Intent(AnnouncementService.this, AnnouncementsActivity.class);\n\n /*build stack for intent calls*/\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(AnnouncementService.this);\n stackBuilder.addParentStack(Sahaya.class);\n stackBuilder.addNextIntent(resultIntent);\n PendingIntent resultPendingIntent =\n stackBuilder.getPendingIntent(\n 0,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n\n /*add resultPendingIndent to builder*/\n builder.setContentIntent(resultPendingIntent);\n\n /*build push notification*/\n Notification notification = builder.build();\n notification.defaults |= Notification.DEFAULT_SOUND;\n notification.defaults |= Notification.DEFAULT_VIBRATE;\n\n /*get notification manager*/\n NotificationManager notificationManager = (NotificationManager) getSystemService(Service.NOTIFICATION_SERVICE);\n\n /*show notification*/\n notificationManager.notify(0, notification);\n }\n\n /*set last read message time as current time*/\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putLong(\"last_announcement\", System.currentTimeMillis());\n editor.apply();\n\n }",
"@Override\n\t\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\t\tSystem.out.println(\"ALARM CALLED\");\n\t\t\tsendPostRequest();\n\t\t}",
"@Override\n public void onClick(View view) {\n String interactionType = _interactionTypeSpinner.getSelectedItem() + \"\";\n String details = _details.getText().toString();\n String specialNote = _specialNote.getText().toString();\n String nextActionType = _nextActionTypeSpinner.getSelectedItem() + \"\";\n String nextActionDate = _nextActionDate.getText().toString();\n String nextMeetingLocation = _nextMeetingLocation.getText().toString();\n\n CommunicationDM.SpecificCommRecord specificCommRecord = new CommunicationDM.SpecificCommRecord();\n specificCommRecord.setInteractionType(interactionType);\n specificCommRecord.setInteractionDate(TimeUtils.getToday());\n specificCommRecord.setAgentId(Session.getSeassionData().getId() + \"\");\n specificCommRecord.setDetails(details);\n specificCommRecord.setSpecialNote(specialNote);\n specificCommRecord.setActionType(nextActionType);\n specificCommRecord.setDate(nextActionDate);\n specificCommRecord.setLocation(nextMeetingLocation);\n specificCommRecord.setLName(Session.getSeassionData().getName());\n\n //TODO: Need to write code for add data to server\n commList.add(specificCommRecord);\n\n\n addNewCommunicationRecord(((ClientDetails) getActivity()).getMemberProfile().getGeneralInfo().getLandownerName(),interactionType,\n TimeUtils.getToday(),details,specialNote,nextActionType,Session.getSeassionData().getName(),nextActionDate,nextMeetingLocation);\n\n adapter.notifyDataSetChanged();\n alertDialog.cancel();\n }",
"@Override\n public void onCreate() {\n\n mNM = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n if(AlarmTask.code == 3) {\n spref = getApplicationContext().getSharedPreferences(\"my_data\", 0);\n food = new AddFoodActivity();\n editor = spref.edit();\n message = \"Reset data\";\n Toast.makeText(NotifyService.this, \"Notification reset: \" + spref.getFloat(\"kalori\",0), Toast.LENGTH_LONG).show();\n editor.putStringSet(\"SetSiang\", null);\n editor.putStringSet(\"SetPagi\", null);\n editor.putStringSet(\"SetMalam\", null);\n editor.commit();\n food.setNull();\n }\n\n\n }"
] | [
"0.66436666",
"0.63221097",
"0.6057678",
"0.59358597",
"0.59141576",
"0.58034813",
"0.57818455",
"0.57773095",
"0.574783",
"0.5684301",
"0.5677872",
"0.56712544",
"0.56188244",
"0.5607395",
"0.55901074",
"0.55799735",
"0.55732554",
"0.5572143",
"0.55623007",
"0.55608314",
"0.554041",
"0.55220586",
"0.55196846",
"0.55193055",
"0.55104095",
"0.55086833",
"0.5495589",
"0.54742384",
"0.5465236",
"0.5458704",
"0.5458446",
"0.54412925",
"0.54390633",
"0.54342246",
"0.54203546",
"0.541638",
"0.541207",
"0.54117805",
"0.5409161",
"0.5407092",
"0.54030186",
"0.54016036",
"0.5398133",
"0.53971744",
"0.5392327",
"0.5385067",
"0.5378902",
"0.5374968",
"0.5372405",
"0.53693634",
"0.5364547",
"0.535583",
"0.5345689",
"0.5345689",
"0.5337637",
"0.5336949",
"0.53337896",
"0.5332713",
"0.53176636",
"0.5314955",
"0.531385",
"0.5310013",
"0.5299577",
"0.5296048",
"0.52895564",
"0.5286097",
"0.52818066",
"0.52813333",
"0.5280643",
"0.52683634",
"0.5265399",
"0.5258212",
"0.5253322",
"0.525077",
"0.52472454",
"0.5245462",
"0.52449226",
"0.52420676",
"0.5228734",
"0.52211004",
"0.52179873",
"0.52172345",
"0.5216926",
"0.52168417",
"0.5214755",
"0.5213181",
"0.52127004",
"0.520545",
"0.52046156",
"0.5204346",
"0.52012575",
"0.5201023",
"0.5196287",
"0.5195988",
"0.51801074",
"0.5179343",
"0.51706034",
"0.51701576",
"0.5165428",
"0.5164434"
] | 0.6484676 | 1 |
populateUI would be called to populate the UI when in update mode | private void populateUI(AlarmEntry alarm) {
mDetailBinding.clockDetails.vibrate.setChecked(alarm.isVibrate());
mDetailBinding.clockDetails.message.setText(alarm.getMessage());
setRingtoneName();
updateMapImage(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateUI(){}",
"@Override\r\n public void updateUI() {\r\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"protected void setupUI() {\n\n }",
"private void updateUI() {\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n updateText();\n updateChart();\n }",
"private void populateUI() {\n\n tipPercentTextView.setText(Double.toString(tipPercent));\n noPersonsTextView.setText(Integer.toString(noPersons));\n populateResultsUI();\n }",
"public void populateUI() {\n // setup toggle button on click listener\n toggleButton.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n toggleExtension();\n }\n });\n\n // setup open details click listener\n this.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n budgetListener.showAccountDetails(refAcc);\n }\n });\n updateUI();\n }",
"public void forceUpdateUI() {\n\t\tupdateUI();\n\t}",
"private void initUI() {\n }",
"public void updateUI() {\n\t\tgetLoaderManager().restartLoader(0, null, this);\n\t}",
"void successUiUpdater();",
"private void updateUi() {\n this.tabDetail.setDisable(false);\n this.lblDisplayName.setText(this.currentChild.getDisplayName());\n this.lblPersonalId.setText(String.format(\"(%s)\", this.currentChild.getPersonalId()));\n this.lblPrice.setText(String.format(\"%.2f\", this.currentChild.getPrice()));\n this.lblAge.setText(String.valueOf(this.currentChild.getAge()));\n this.dtBirthDate.setValue(this.currentChild\n .getBirthDate()\n .toInstant()\n .atZone(ZoneId.systemDefault())\n .toLocalDate());\n this.lblWeight.setText(String.format(\"%.1f kg\", this.currentChild.getWeight()));\n this.sldWeight.setValue(this.currentChild.getWeight());\n this.checkboxTrueRace.setSelected(!this.currentChild.isRace());\n this.imgChildProfile.setImage(this.currentChild.getAvatar());\n if (this.currentChild.getGender().equals(GenderType.MALE)){\n this.imgSex.setImage(FileUtils.loadImage(\"assets/image/gender/boy.png\"));\n this.lblSex.setText(\"Male\");\n }\n else {\n this.imgSex.setImage(FileUtils.loadImage(\"assets/image/gender/girl.png\"));\n this.lblSex.setText(\"Female\");\n }\n if (this.currentChild.isVirginity()){\n this.imgVirginity.setImage(FileUtils.loadImage(\"assets/image/virginity/virgin.png\"));\n this.lblVirginity.setText(\"Virgin\");\n }\n else {\n this.imgVirginity.setImage(FileUtils.loadImage(\"assets/image/virginity/not-virgin.png\"));\n this.lblVirginity.setText(\"Not Virgin\");\n }\n\n // TODO [assignment2] nastavit obrazek/avatar ditete v karte detailu\n // TODO [assignment2] nastavit spravny obrazek pohlavi v karte detailu\n // TODO [assignment2] nastavit spravny obrazek virginity atribut v v karte detailu\n }",
"public void updateUI() {\n\t setUI( LinkButtonUI.createUI( this));\n\t}",
"@Override\r\n\tprotected void initUI() {\n\r\n\t}",
"private void reloadUI() {\n\t\tMessages.reloadUIi18n(uis);\n\t}",
"protected void followup(Refactoring refactoring) {\r\n updateSummaries();\r\n\r\n // Update the GUIs\r\n ReloaderSingleton.reload();\r\n }",
"@Override\n public void updateUI() {\n setUI(SubstanceRibbonGalleryUI.createUI(this));\n }",
"private void refreshUI() {\n\t\t\n\t\tif (MusicApplication.getInstance().getDiscussView() != null) {\n\t\t\tMusicApplication.getInstance().getDiscussView().renew();\n\t\t}\n\t\t\n\t\tif (MusicApplication.getInstance().getQueueView() != null) {\n\t\t\tMusicApplication.getInstance().getQueueView().renew();\n\t\t}\n\t\t\n\t\tif (MusicApplication.getInstance().getNetworkView() != null) {\n\t\t\tMusicApplication.getInstance().getNetworkView().renew();\n\t\t}\t\n\t\t\n\t\t//Phone Music\n\t\tif ( MusicApplication.getInstance().getMusicListView().mLocalView != null ){\n\t\t\tMusicApplication.getInstance().getMusicListView().mLocalView.renew();\n\t\t}\n\t\t//Folder Music\n\t\tif ( MusicApplication.getInstance().getMusicListView().mLocalView2 != null ){\n\t\t\tMusicApplication.getInstance().getMusicListView().mLocalView2.renew();\n\t\t}\n\t\t//Favorite Music\n\t\tif ( MusicApplication.getInstance().getMusicListView().mCollectView != null ){\n\t\t\tMusicApplication.getInstance().getMusicListView().mCollectView.refresh();\n\t\t}\n\t\t//Download Music\n\t\tif ( MusicApplication.getInstance().getMusicListView().mDownloadView != null ){\n\t\t\t\n\t\t\tif ( MusicApplication.getInstance().getMusicListView().mDownloadView.mLoadedView != null ){\n\t\t\t\tMusicApplication.getInstance().getMusicListView()\n\t\t\t\t\t.mDownloadView.mLoadedView.mLocalMusicList.renew();\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t}",
"public void updateUI() {\n if (ui != null) {\n removeKeymap(ui.getClass().getName());\n }\n setUI(UIManager.getUI(this));\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"private void refreshUI(){\r\n\t\t//update text fields\r\n\t\tConfiguration conf = m_Categorizer.Configuration();\r\n\t\tm_MCSTf.setText(String.valueOf(conf.getMCSScore()));\r\n\t\tm_RelScoreTf.setText(String.valueOf(conf.getRelevanceWeight()));\r\n\t\tm_CohScoreTf.setText(String.valueOf(conf.getCoherenceWeight()));\r\n\t\tm_KeyTf.setText(String.valueOf(conf.getKeywordsWeight()));\r\n\t\tm_CatConfTf.setText(String.valueOf(conf.getCategoryConfidenceWeight()));\r\n\t\tm_RepeatTf.setText(String.valueOf(conf.getRepeatedConceptWeight()));\r\n\t\tm_MinCatsTf.setText(String.valueOf(conf.getMinOutputCategories()));\r\n\t\tm_MaxCatsTf.setText(String.valueOf(conf.getMaxOutputCategories()));\r\n\t\tm_MinCatScoreTf.setText(String.valueOf(conf.getMinScore()));\r\n\t\t//refresh tables\r\n\t\tm_DatasetTable.refresh();\r\n\t\tm_ConceptTable.refresh();\r\n\t\t//refresh statistics window\r\n\t\tm_StatisticsWindow.refresh();\r\n\t\t//refresh filter choicebox\r\n\t\tupdateFilterChoiceBox();\r\n\t}",
"public void updateUi() {\n\t\t// // update the car color to reflect premium status or lack thereof\n\t\t// ((ImageView)findViewById(R.id.free_or_premium)).setImageResource(mIsPremium\n\t\t// ? R.drawable.premium : R.drawable.free);\n\t\t//\n\t\t// // \"Upgrade\" button is only visible if the user is not premium\n\t\t// findViewById(R.id.upgrade_button).setVisibility(mIsPremium ?\n\t\t// View.GONE : View.VISIBLE);\n\t\t//\n\t\t// // \"Get infinite gas\" button is only visible if the user is not\n\t\t// subscribed yet\n\t\t// findViewById(R.id.infinite_gas_button).setVisibility(mSubscribedToInfiniteGas\n\t\t// ?\n\t\t// View.GONE : View.VISIBLE);\n\t\t//\n\t\t// // update gas gauge to reflect tank status\n\t\t// if (mSubscribedToInfiniteGas) {\n\t\t// ((ImageView)findViewById(R.id.gas_gauge)).setImageResource(R.drawable.gas_inf);\n\t\t// }\n\t\t// else {\n\t\t// int index = mTank >= TANK_RES_IDS.length ? TANK_RES_IDS.length - 1 :\n\t\t// mTank;\n\t\t// ((ImageView)findViewById(R.id.gas_gauge)).setImageResource(TANK_RES_IDS[index]);\n\t\t// }\n\t}",
"public void updateUI()\n\t{\n\t\tif( isRunning() == false) \n\t\t{\n\t\t\tupdateButton(\"Run\");\n\t\t\tbutton.setClickable(true);\n\t\t\tupdateTextView(Feedback.getMessage(Feedback.TYPE.NEW_TEST, null));\n\t\t}else\n\t\t{\n\t\t\tbutton.setClickable(true);\n\t\t\tupdateButton( \"Stop\" );\n\t\t\tupdateTextView(\"Tests are running.\");\n\n\t\t}\n\t}",
"private void updateUI() {\n user = mAuth.getCurrentUser();\n if (user != null) {\n user.reload().addOnCompleteListener(userReloadListener);\n }\n }",
"private void updateUI(){\n\t\tString eventType = eventbean.getEventType();\n\t\n\t\t//THE FOLLOWING MAKE EVERYTHING DISAPPEAR BEFORE UPDATING THE UI\n\t\t\n\t\t// set invisible text views not used and enable based on request\n\t\tresponse_tv.setVisibility(View.GONE);\n\t\tbtnContacts.setVisibility(View.GONE);\n\t\tbtnCallLog.setVisibility(View.GONE);\n\t\tbtnEnterNumManually.setVisibility(View.GONE);\n\t\tbtnEnterText.setVisibility(View.GONE);\n\t\thint_tv.setVisibility(View.GONE);\n\t\t\n\t\t// IF THERE ARE ALREADY INPUT TEXT REPONSE, THEN SHOW\n\t\tif (eventbean.getTextResponse().length() > 1){\n\t\t\t\n\t\t\tresponse_tv.setVisibility(View.VISIBLE);\n\t\t\tresponse_tv.setText(eventbean.getTextResponse());\n\t\t\t\n\t\t\t}\n\t\t\n\t\t// Clean up all the items in the radio group and check box layout\n\t\tradioGroup.removeAllViews();\n\t\tcheckboxLayout.removeAllViews();\n\t\t\n\t\t// based on the event type, dynamically change the user interface\n\t\tif (eventType.equals(\"TEXT_DISPLAY\")){\n\t\t\t\n\t\t\t// get text value from bean\n\t\t\tString textbody = eventbean.getTextbody().replace(\"\\\"\", \"\");\n\t\t\t\n\t\t\t//update user interface\n\t\t\ttitle_tv.setVisibility(View.GONE);\n\t\t\ttextbody_tv.setText(textbody);\n\t\t\tradioGroup.setVisibility(View.GONE);\n\t\t\t\n\t\t}\n\t\t\n\t\telse if(eventType.equals(\"TIE_DISPLAY\")){\n\t\t\t\n\t\t\t// getting the list of tie criteria associated with this event\n\t\t\tTieCriteria tieCriteria = eventbean.getTieCriteria().get(0);\n\t\t\t\n\t\t\t// initiate a String and a ArrayList to store names\n\t\t\tTie tie = null;\n\t\t\t\n\t\t\tTieGenerator tieGT = new TieGenerator(getActivity());\n\t\t\t\n\t\t\tif(eventbean.getDynamicText().length()<1){\n\t\t\t\n\t\t\t\t/* The following applies SELECTION METHOD = Random\n\t\t\t\t * As only random selection is used in TIE DISPLAY event\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tint nameCount = tieGT.countTies(tieCriteria);\n\t\t\t\t\t\n\t\t\t\t\t// randomize to get a random name\n\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\tint place = rand.nextInt(nameCount)+1;\n\t\t\t\t\ttieCriteria.setPlace(place);\n\t\t\t\t\t\n\t\t\t\t\t// get a name based on the tie criteria\n\t\t\t\t\ttie = tieGT.getTieByCriteria(tieCriteria);\n\t\t\t\t\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\n\t\t\t\t\ttie = new Tie(eventbean.getQid(),\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\tLog.v(\"failedcriteria\",tieCriteria.toString());\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\teventbean.setDynamicText(tie.getName());\n\t\t\t\t\n\t\t\t\t//show in text view\n\t\t\t\ttextbody_tv.setText(tie.getName());\n\t\t\t}\n\t\t\t\n\t\t\t\telse{\n\t\t\t\t\n\t\t\t\t//show in text view\n\t\t\t\ttextbody_tv.setText(eventbean.getDynamicText());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//update user interface\n//\t\t\ttitle_tv.setText(eventIndex+\".Tie Display\");\n\t\t\ttitle_tv.setVisibility(View.GONE);\n\t\t\tradioGroup.setVisibility(View.GONE);\n\t\t}\n\t\t\n\t\telse if(eventType.equals(\"SURVEY_QUESTION\")){\n\t\t\t\n\t\t\t//IF EVENT IS SURVEY QUESTIONS \n\t\t\t//disable confirm button every time to DISALLOW skipping questions\n\t\t\t\n\t\t\t// setting the text for the question title text view\n//\t\t\tString qtitle = eventIndex+\".Survey Question\";\n\t\t\t\n\t\t\t// setting the text for the question body text view\n\t\t\tString qbody = eventbean.getTextbody().replace(\"\\\"\", \"\");\n\t\t\t\n\t\t\tint choiceTotal = eventbean.getChoicecount();\n\t\t\t\n\t\t\t// setting the current question title\n//\t\t\ttitle_tv.setText(qtitle);\n\t\t\ttitle_tv.setVisibility(View.GONE);\n\t\t\t\n\t\t\t// BRANCH ENABLED ONLY\n\t\t\t// if enabled branch, the hint will show that response can't be changed\n\t\t\tif (eventbean.isBranchEnabled()){\n\t\t\t\t\n\t\t\t\thint_tv.setVisibility(View.VISIBLE);\n\t\t\t\thint_tv.setText(R.string.branchenabled_hint);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* THE FOLLOWING APPLIES TO: DYNAMIC QUESTIONS\n\t\t\t * If the survey question requires dynamic text, will based on it\n\t\t\t * to modify the text body\n\t\t\t */\n\t\t\t\n\t\t\t// getting the list of tie criteria associated with this event\n\t\t\tArrayList<TieCriteria> criteriaList = eventbean.getTieCriteria();\n\t\t\t\n\t\t\t// if it is NOT empty, then there's dynamic text to show\n\t\t\tif(!criteriaList.isEmpty()){\n\t\t\t\t\n\t\t\t\t// rearrange the array list in order of text position\n\t\t\t\t// this is necessary for later inserting the text into question body\n\t\t\t\tComparator <TieCriteria> compareTextPosition = new Comparator<TieCriteria>(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(TieCriteria tc1, TieCriteria tc2) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tc1.getTextPosition()!=tc2.getTextPosition()){\n\t\t\t\t\t\t\treturn tc1.getTextPosition() - tc2.getTextPosition(); \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// rearrange the list in order of text position\n\t\t\t\tCollections.sort(criteriaList,compareTextPosition);\n\t\t\t\t\n\t\t\t\t// this array list is used locally, to make sure multiple tie criteria\n\t\t\t\t// in a single question does not generate the same name\n\t\t\t\tArrayList<String> event_local_namepool = new ArrayList<String>();\n\n\t\t\t\tTieGenerator tieGT = new TieGenerator(getActivity());\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//IF THERE ARE NO EXISTING GENERATED TIES(NEW EVENT)\n\t\t\t\t/* THE if(event.getDynamicText().length()<1) IS USED FOR THE \"BACK\" \n\t\t\t\t * CHECK FIRST IF THE TIE HAS ALREADY BEEN GENERATED\n\t\t\t\t * IF IT DOES, THEN USE PREVIOUSLY GENERATED TIES\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tif(eventbean.getDynamicText().length()<1){\n\t\t\t\t\n\t\t\t\t\t// this value is added up as tie is inserted into the question\n\t\t\t\t\tint differPos = 0;\n\t\t\t\t\n\t\t\t\tfor (TieCriteria tieCriteria:criteriaList){\n\t\t\t\t\t\n\t\t\t\t\t/* The following applies to when\n\t\t\t\t\t * SELECTION METHOD = Random\n\t\t\t\t\t */\n\t\t\t\t\tTie tie = null;\n\t\t\t\t\t\n\t\t\t\t\tif (tieCriteria.getMethod().equals(\"random\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint nameCount = tieGT.countTies(tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t// randomize to get a random name\n\t\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\t\tint place = rand.nextInt(nameCount)+1;\n\t\t\t\t\t\t\ttieCriteria.setPlace(place);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// get a name based on the tie criteria\n\t\t\t\t\t\t\ttie = tieGT.getTieByCriteria(tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}while(event_local_namepool.indexOf(tie.getName())!=-1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// assigning question id and event index to the tie\n\t\t\t\t\t\t\ttie.setQid(eventbean.getQid());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttie = new Tie(eventbean.getQid(),\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\t\t\tLog.v(\"failedcriteria\",tieCriteria.toString());\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// register the name in the name pool\n\t\t\t\t\t\ttieGenerateCallBack.onTieGenerated(tie);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if (tieCriteria.getMethod().equals(\"walk_through\")){\n\t\t\t\t\t\n\t\t\t\t\t\t/* the extra step in WALK THROUGH is just to check the name Pool\n\t\t\t\t\t\t * and make sure the name does not appear again.\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint nameCount = tieGT.countTies(tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t// randomize to get a random name\n\t\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\t\tint place = rand.nextInt(nameCount)+1;\n\t\t\t\t\t\t\ttieCriteria.setPlace(place);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// get a name based on the tie criteria\n\t\t\t\t\t\t\ttie = tieGT.getTieByCriteria(tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}while(local_tiePool.contains(tie) || //PAY ATTENTION IF IT WORKS\n\t\t\t\t\t\t\t\t\tevent_local_namepool.indexOf(tie.getName())!=-1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// assigning question id to the tie\n\t\t\t\t\t\t\ttie.setQid(eventbean.getQid());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttie = new Tie(eventbean.getQid(),\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\t\t\tLog.v(\"failedcriteria\",tieCriteria.toString());\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\t\t\t// register the name in the name pool\n\t\t\t\t\t\t\ttieGenerateCallBack.onTieGenerated(tie);\n\t\t\t\t\t\t\t\n\t\t\t\t\t}else if (tieCriteria.getMethod().contains(\"use\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* the extra step in USE PREVIOUS TIE is just to check the name Pool\n\t\t\t\t\t\t * and pick up the name used in a previous question.\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\t// first of all, parsing the USE PREVIOUS TIE STRING to get the question id and tie id\n\t\t\t\t\t\tString methodStr = tieCriteria.getMethod();\n\t\t\t\t\t\tint qid = Integer.parseInt(methodStr.substring(methodStr.indexOf(\"q\")+1, methodStr.indexOf(\"t\")));\n\t\t\t\t\t\tint criteria_id = Integer.parseInt(methodStr.substring(methodStr.indexOf(\"t\")+1, methodStr.length()));\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// iterate through the tie pool to find a previous tie that fits the question id and criteria id\n\t\t\t\t\t\t\tfor (int i = 0; i < local_tiePool.size(); i++){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tint q_id = local_tiePool.get(i).getQid();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tint c_id = local_tiePool.get(i).getCriteria().getId();\n\n\t\t\t\t\t\t\t\t// if match is found, get this tie!\n\t\t\t\t\t\t\t\tif(qid == q_id && c_id == criteria_id){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// get this tie\n\t\t\t\t\t\t\t\t\ttie = local_tiePool.get(i);\n\t\t\t\t\t\t\t\t\tbreak;\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// NO NEED TO REGISTER, BECAUSE USED PREVIOUS TIE\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// error control: if not found previous tie, then assign NONAME\n\t\t\t\t\t\t\tif(tie == null)tie = new Tie(eventbean.getQid(),\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//this should not happen, if it does there's a big warning\n\t\t\t\t\t\t\tLog.v(\"debugtag\",\"Warning: Can't find previous tie.\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttie = new Tie(\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\t\t\tLog.v(\"failedcriteria\",tieCriteria.toString());\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}\n\t\t\t\t\t\n\t\t\t\t\t// add to a name list to later avoid having two same names\n\t\t\t\t\tif(!tie.getName().equals(\"NONAME\"))event_local_namepool.add(tie.getName());\n\t\t\t\n\t\t\t\t\t// save this name to the event bean\n\t\t\t\t\teventbean.setDynamicText(eventbean.getDynamicText() + tie.getName() + \",\" );\n\t\t\t\t\t\n\t\t\t\t\t// get the position that this tie wants to be placed\n\t\t\t\t\tint position = tieCriteria.getTextPosition();\n\t\t\t\t\t\n\t\t\t\t\t// use a String Builder to insert the name into the text body\n\t\t\t\t\tStringBuilder inserted_qbody = new StringBuilder(qbody);\n\t\t\t\t\n\t\t\t\t\tint destination_position = (int)position + (int)differPos;\n\t\t\t\t\t\n\t\t\t\t\tif(destination_position > qbody.length())destination_position = qbody.length()-1;\n\t\t\t\n\t\t\t\t\tinserted_qbody.insert(destination_position,tie.getName());\n\t\t\t\t\t\n\t\t\t\t\tqbody = inserted_qbody+\"\";\n\t\t\t\t\t\n\t\t\t\t\tdifferPos = differPos + tie.getName().length();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// ELSE IF the Dynamic Text is not empty\n\t\t\t\t\t// meaning ties have already been generated\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t\t// this value is added up as tie is inserted into the question\n\t\t\t\t\tint differPos = 0;\n\t\t\t\t\t\n\t\t\t\t\tfor (int i=0 ; i < criteriaList.size();i++){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// retrieve the name from the already generated list\n\t\t\t\t\t\t\tString name = eventbean.getDynamicText().split(\",\")[i];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// get the position that this tie wants to be placed\n\t\t\t\t\t\t\tint position = criteriaList.get(i).getTextPosition();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// use a String Builder to insert the name into the text body\n\t\t\t\t\t\t\tStringBuilder inserted_qbody = new StringBuilder(qbody);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tint destination_position = (int)position + (int)differPos;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(destination_position > qbody.length())destination_position = qbody.length()-1;\n\t\t\t\t\t\n\t\t\t\t\t\t\tinserted_qbody.insert(destination_position,name);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tqbody = inserted_qbody+\"\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdifferPos = differPos + name.length();\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}//correspond to the else\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// setting the question body\n\t\t\ttextbody_tv.setText(qbody);\n\t\t\t\n\t\t\t// identify the question type\n\t\t\t\n\t\t\tString questionType = eventbean.getQuestionType();\n\t\t\t\n\t\t\t/* Based on the question type (single or multiple)\n\t\t\t * Different UI updates code will be initiated\n\t\t\t * 1. Single Choice: RadioGroup and RadioButtons will be used\n\t\t\t * 2. Multiple Choice: Check boxes will be used\n\t\t\t */\n\t\t\t\n\t\t\t\n\t\t\tif (questionType.equals(\"single\")){\n\t\t\t\t\n\t\t\t\t/*1. Single Choice Questions: update radio button for every choice\n\t\t\t\t * \n\t\t\t\t * The following code has been changed from its previous version\n\t\t\t\t * Now, it allows dynamically adding the radio buttons so there are no limit of choices\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tradioGroup.setVisibility(View.VISIBLE);\n\t\t\t\t\n\t\t\t\tfor (int i = 0 ; i < choiceTotal ; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t// getting the text from the bean and update radio button text\n\t\t\t\t\t\tString choice_text = eventbean.getChoice(i);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// instantiate new radio buttons\n\t\t\t\t\t\tRadioButton choiceRadioButton = new RadioButton(getActivity());\n\t\t\t\t\t\t\n\t\t\t\t\t\t// setting the text and tag(used later to read choice text) of the radio button\n\t\t\t\t\t\tchoiceRadioButton.setText(choice_text.replace(\"\\\"\", \"\"));\n\t\t\t\t\t\tchoiceRadioButton.setTag((char) ('A' + i)); // this is to set characters as tags\n\t\t\t\t\t\t\n\t\t\t\t\t\t// setting the layout and style for the radio button\n\t\t\t\t\t\tRadioGroup.LayoutParams params = new RadioGroup.LayoutParams(\n\t\t\t\t LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\t\t\tparams.setMargins(0, 0, 0, 30);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// styling the new added radio button\n\t\t\t\t choiceRadioButton.setLayoutParams(params);\n\t\t\t\t\t\tchoiceRadioButton.setTextSize(27);\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\tradioGroup.addView(choiceRadioButton,i);\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 * Setting a checked change lister for the radio Group\n\t\t\t\t * So when it is selected, will release the \"next\" button\n\t\t\t\t * And user can go to the next event\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tradioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\n\t\t \t/* Error Control\n\t\t \t * Every time a radio button is checked/unchecked,\n\t\t \t * it will check if there are radio buttons checked\n\t\t \t * if not, it will disable the \"next\" button\n\t\t \t */\n\t\t \t\n\t\t\t\t\t\t// if there exists radio button checked, then enable the next button\n\t\t\t\t\t\tif (checkedId != -1){\n\t\t \t\t\t\t\n\t\t \t\t\t\tRadioButton checkedButton = (RadioButton) group.findViewById(checkedId);\n\t\t \t\t\t\tint checkedIndex = group.indexOfChild(checkedButton) + 1;\n\t\t \t\t\t\t\n\t\t \t\t\t\tresponseCallBack.onEventResponded(eventbean.getIndex(),eventbean.getQid(),\"S\",checkedIndex+\"\");\n\t\t\t\t\t\t\t\n\t\t \t\t\t}else {responseCallBack.onEventResponded(eventbean.getIndex(),eventbean.getQid(),\"S\",\"-1\");}\n\t\t \t\t\t\n\t\t\t\t\t\t// FOR BRANCH ENABLED EVENTS ONLY\n\t\t\t\t\t\t// if branching is enabled, the response will NOT be allowed to change \n\t\t\t\t\t\t\n\t\t\t\t\t\tif(eventbean.isBranchEnabled())disableResponse();\n\t\t\t\t\t\t\n\t\t\t \t\t//record response\n\t\t\t \t\tcheckSingleChoice();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t }\n\t\t ); \n\t\t\t\t\n\t\t\t\tString responseString = eventbean.getChoiceResponse();\n\t\t\t\t\n\t\t\t\t// make sure selected tag is not null first\n\t\t\t\tif(responseString!=null){\n\t\t\t\t\n\t\t\t\t\t// READ FROM RESPONSE: IF HAVE PREVIOUS RESPONSE, THEN RECALL\n\t\t\t\t\tString selectedTag = responseString.split(\"\\\\.\")[0];\n\t\t\t\t\t\n\t\t\t\t\tfor(int i = 0 ; i < radioGroup.getChildCount(); i++ ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tRadioButton choice = (RadioButton)radioGroup.getChildAt(i);\n\n\t\t\t\t\t\tString choiceTag = choice.getTag()+\"\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (choiceTag.equals(selectedTag)){((RadioButton) radioGroup.getChildAt(i)).setChecked(true);}\n\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}else if (questionType.equals(\"multiple\")){\n\t\t\t\t/*2. Multiple Choice Questions: update check boxes for every choice\n\t\t\t\t *Since there's no thing as \"check box group\" the code here just\n\t\t\t\t *add the check boxes to the input linear layout\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tradioGroup.setVisibility(View.GONE);\n\t\t\t\t\n\t\t\t\t// used to store checked choices, accessed by later code \n\t\t\t\tArrayList<String> checkedChoices = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\t// if there has already been response, check the boxes\n\t\t\t\tif(eventbean.getChoiceResponse().length()>1){\n\t\t\t\t\t\n\t\t\t\t\tString responseStr = eventbean.getChoiceResponse();\n\t\t\t\t\t\n\t\t\t\t\t\t// parsing every choice from the response string and add them to the list\n\t\t\t\t\t\tfor (int i = 0; i < responseStr.split(\",\").length ; i++ ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString choice = responseStr.split(\",\")[i].split(\"\\\\.\")[0];\n\t\t\t\t\t\t\tcheckedChoices.add(choice);\n\t\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\n\t\t\t\tfor (int i = 0 ; i < choiceTotal ; i++)\n\t\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t// getting the text from the bean and update radio button text\n\t\t\t\t\tString choice_text = eventbean.getChoice(i);\n\t\t\t\t\t\n\t\t\t\t\t// instantiate new radio buttons\n\t\t\t\t\tCheckBox choiceCheckBox = new CheckBox(getActivity());\n\t\t\t\t\t\n\t\t\t\t\t// setting the text and tag(used later to read choice text) of the radio button\n\t\t\t\t\tchoiceCheckBox.setText(choice_text.replace(\"\\\"\", \"\"));\n\t\t\t\t\tchoiceCheckBox.setTag((char) ('A' + i)); // this is to set characters as tags\n\t\t\t\t\t\n\t\t\t\t\t// setting the layout and style for the radio button\n\t\t\t\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(\n\t\t\t LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\t\tparams.setMargins(0, 0, 0, 30);\n\t\t\t\t\t\n\t\t\t choiceCheckBox.setLayoutParams(params);\n\t\t\t choiceCheckBox.setTextSize(21);\n\t\t\t\t\t\n\t\t\t // setting the listener that will release the \"next\" button when checked\n\t\t\t choiceCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\n\t\t\t @Override\n\t\t\t public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {\n\t\t\t\t\t\t\t\n\t\t\t \t/* = Error Control =\n\t\t\t \t * Every time a box is checked/unchecked,\n\t\t\t \t * it will check if there are still boxes checked by the user\n\t\t\t \t * if not, it will disable the \"next\" button\n\t\t\t \t */\n\t\t\t \t\n\t\t\t \tString checkedBoxIndexString = \"\";\n\t\t\t \t\n\t\t\t \tfor (int i =0; i < checkboxLayout.getChildCount();i++){\n\t\t\t \t\t\t\n\t\t\t \t\t\tCheckBox choiceBox = (CheckBox) checkboxLayout.getChildAt(i);\n\t\t\t \t\t\t\n\t\t\t \t\t\t// if there exists checked box, then continue and enable \"next\" button\n\t\t\t \t\t\tif(choiceBox.isChecked()){\n\t\t\t \t\t\t\t\n\t\t\t \t\t\t\t// set the choice index string format\n\t\t\t \t\t\t\tcheckedBoxIndexString = checkedBoxIndexString + (i + 1) + \"&\";\n\t\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// if there exists checked box, then continue and enable \"next\" button\n\t\t\t \tif(!checkedBoxIndexString.equals(\"\")){\n\t\t\t \t\t\n\t\t\t \t\t// remove the & sign at end if exists\n\t\t\t\t \t\tif(checkedBoxIndexString.endsWith(\"&\")){\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\t// remove the & at the end\n\t\t\t\t \t\t\tcheckedBoxIndexString = checkedBoxIndexString.substring(0, checkedBoxIndexString.length()-1);\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\tresponseCallBack.onEventResponded(eventbean.getIndex(),eventbean.getQid(),\"M\",checkedBoxIndexString);\n\t\t\t \t\t\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\t// if no checked box is found, then disable the button\n\t\t \t\t\t// THIS IS BECAUSE, we don't want to continue without at least a box checked\n\t\t\t \t\tresponseCallBack.onEventResponded(eventbean.getIndex(),eventbean.getQid(),\"M\",\"-1\");\n\t \t\t\t\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \t//record the response\n\t\t\t \tcheckMultipleChoice();\n\t\t\t \t\n\t\t\t }\n\t\t\t }\n\t\t\t ); \n\t\t\t\t\t\n\t\t\t // looking up saved choices and check the selected boxes\n\t\t\t if (!checkedChoices.isEmpty()){\n\t\t\t \t\n\t\t\t \t// tag of the current check box\n\t\t\t \tString box_tag = choiceCheckBox.getTag()+\"\";\n\t\t\t \t\n\t\t\t \t// compared with all checked choices in the list\n\t\t\t \tif (checkedChoices.contains(box_tag))choiceCheckBox.setChecked(true);// if has, then check\n\t\t\t \t\n\t\t\t }\n\t\t\t \n\t\t\t\t\tcheckboxLayout.addView(choiceCheckBox,i);\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t// if the question asks user to select from contacts/call log/enter manually\n\t\t\t// the corresponding function button will show\n\t\t\tif(eventbean.isSelectContacts())btnContacts.setVisibility(View.VISIBLE);\n\t\t\tif(eventbean.isSelectCallLog())btnCallLog.setVisibility(View.VISIBLE);\n\t\t\tif(eventbean.isEnterManually())btnEnterNumManually.setVisibility(View.VISIBLE);\n\t\t\tif(eventbean.isEnterText())btnEnterText.setVisibility(View.VISIBLE);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}",
"private void updateUI() {\n Bite bite = BiteLab.get(getActivity()).getBite(mBiteId);\n\n mPlacementTextView.setText(bite.getPlacement());\n\n Calendar c = bite.getCalendar();\n int year = c.get(Calendar.YEAR);\n int month = c.get(Calendar.MONTH)+1;\n int day = c.get(Calendar.DAY_OF_MONTH);\n mDateTextView.setText(getString(R.string.show_date, day, month, year));\n\n mDaysSinceBiteTextView.setText(getString(R.string.days_since_bite\n , bite.getDaysSinceBite()));\n\n mStageTextView.setText(getString(R.string.show_stage, bite.getStage()));\n }",
"void initUI();",
"public void updateUI() {\n appViewModel.usersList.observe(getViewLifecycleOwner(), new Observer<PagedList<UserModel>>() {\n @Override\n public void onChanged(PagedList<UserModel> userModels) {\n adapter.submitList(userModels);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"public void updateUI(){\n\n getCurrentDate();\n List<Object> tasks = new ArrayList<Object>(TaskManager.sharedInstance().GetTasksInProject());\n //creating a welcome message for when there are no tasks\n if(tasks.size() == 0){\n welcome.setVisibility(View.VISIBLE);\n welcome.setText(R.string.no_tasks);\n\n }else {\n welcome.setText(R.string.empty);\n welcome.setVisibility(View.GONE);\n }\n Project currentProject = ProjectManager.sharedInstance().getCurrentProject();\n List<Object> sortedTaskLists = sortTasks(tasks);\n\n if (mTaskAdapter == null) {\n mTaskAdapter = new TaskAdapter(this.getContext(), sortedTaskLists);\n myTaskListView.setAdapter(mTaskAdapter);\n } else {\n mTaskAdapter.updateData(sortedTaskLists);\n mTaskAdapter.notifyDataSetChanged();\n }\n }",
"protected void initUI() {\n\r\n\t\t((Button) findViewById(R.id.project_site_start_wifiscan_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_calculate_ap_positions_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_add_known_ap)).setOnClickListener(this);\r\n\r\n\t\t((Button) findViewById(R.id.project_site_step_detect)).setOnClickListener(this);\r\n\t\t\r\n\t\t((ToggleButton) findViewById(R.id.project_site_toggle_autorotate)).setOnClickListener(this);\r\n\r\n\t\tmultiTouchView = ((MultiTouchView) findViewById(R.id.project_site_resultview));\r\n\t\tmultiTouchView.setRearrangable(false);\r\n\r\n\t\tmultiTouchView.addDrawable(map);\r\n\r\n\t\tif (site.getTitle().equals(ProjectSite.UNTITLED)) {\r\n\t\t\tshowDialog(DIALOG_TITLE);\r\n\t\t} else {\r\n\t\t\tif (freshSite) {\r\n\t\t\t\t// start configuration dialog\r\n\t\t\t\tshowDialog(DIALOG_FRESH_SITE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"private void updateUI() {\n swipeRefreshLayout.setRefreshing(false);\n adapter.clearItems();\n itemList.addAll(DatabaseController.getInstance(getApplicationContext()).getItems());\n if (itemList.size() > 0){\n emptyTextView.setVisibility(View.GONE);\n adapter.notifyDataSetChanged();\n } else {\n emptyTextView.setVisibility(View.VISIBLE);\n }\n }",
"private void initializeUI() {\r\n this.parentFrame = game.getFrame();\r\n parentFrame.setEnabled(false); // Disable main game UI during the ending dialog.\r\n createResultPopup();\r\n }",
"private void populateUI() {\n\n Picasso.get()\n .load(Codes.BACKDROP_URL + movie.backdropPath)\n .error(R.drawable.error)\n .into(mBinding.backdrop);\n\n Picasso.get()\n .load(Codes.POSTER_URL + movie.posterPath)\n .error(R.drawable.error)\n .into(mBinding.movieDetails.poster);\n\n diskIO.execute(new Runnable() {\n @Override\n public void run() {\n MiniMovie miniMovie = mDatabase.movieDao().getMovieById(movie.movieId);\n\n if (miniMovie != null) {\n isFavorite = true;\n mBinding.favoriteButton.setImageResource(R.drawable.ic_star_white_24px);\n } else {\n isFavorite = false;\n mBinding.favoriteButton.setImageResource(R.drawable.ic_star_border_white_24px);\n }\n }\n });\n }",
"public void refreshUI(){\n\n // disable/endable certain UI elements depending on mode\n this.setModeUI();\n\n if (this.inManualMode == false){ this.automaticModeChecks(); }\n\n /**\n * @bug When selected a train from a TCDispatchedTrainsFrame, a NullPointerException is thrown.\n *\n */\n if (this.isUtilityFailure()){ this.vitalsButton.setForeground(Color.red); } // change to red\n else if (this.isUtilityFailure() == false){this.vitalsButton.setForeground(new Color(0,0,0));}\n\n // checks so that the doors can't open doors if moving..\n if (this.canOpenDoors()){ this.enableOpeningDoors(); }\n\n else{ // shut the doors if moving\n this.disableOpeningDoors();\n if (this.selectedTrain.getLeftDoor() != -1){ this.selectedTrain.setLeftDoor(0); }\n if (this.selectedTrain.getRightDoor() != -1){ this.selectedTrain.setRightDoor(0); }\n }\n\n // set utility stuff based on train information\n this.refreshAC();\n this.refreshHeat();\n this.refreshLights();\n this.refreshLeftDoors();\n this.refreshRightDoors();\n }",
"@Override\n\tprotected void UpdateUI() {\n\t\tFineModulationDisplay(FineModulation);\n\t\tAutoGreaseDisplay(AutoGrease);\n\t\tQuickcouplerDisplay(Quickcoupler);\n\t\tRideControlDisplay(RideControl);\n\t\tBeaconLampDisplay(BeaconLamp);\n\t\tMirrorHeatDisplay(MirrorHeat);\n//\t\tFNKeyDisplay(ParentActivity.LockEntertainment);\n\t}",
"@Override\r\n\tpublic void refreshUI(int id, MSG msg) {\n\r\n\t}",
"private void initUI() {\n mEditTextFatherName = findViewById(R.id.editTextKycParentsAndSpouseInfoFatherName);\n mEditTextMotherName = findViewById(R.id.editTextKycParentsAndSpouseInfoMotherName);\n mEditTextSpouseTitle = findViewById(R.id.editTextKycParentsAndSpouseInfoSpouseTitle);\n mEditTextSpouseName = findViewById(R.id.editTextKycParentsAndSpouseInfoSpouseName);\n mBtnSubmit = findViewById(R.id.btnKycParentsAndSpouseUpdateSubmit);\n mBtnSubmit.setOnClickListener(this);\n mTextViewShowServerResponse = findViewById(R.id.textViewKycParentsAndSpouseInfoServerResponse);\n mStrMasterKey = GlobalData.getStrMasterKey();\n\n if (getSupportActionBar() != null) {\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }\n\n checkInternet();\n mEditTextFatherName.setText(GlobalData.getStrKYCPersonalAndSpourFathername());\n mEditTextMotherName.setText(GlobalData.getStrKYCPersonalAndSpouseMotherName());\n mEditTextSpouseTitle.setText(GlobalData.getStrKYCPersonalAndSpouseTitle());\n mEditTextSpouseName.setText(GlobalData.getStrKYCPersonalAndSpouseName());\n\n }",
"public void updateUI() {\n/* 393 */ setUI((ScrollPaneUI)UIManager.getUI(this));\n/* */ }",
"@Override\n\tprotected void UpdateUI() {\n\t\tDisplayFuelData(AverageFuelRate, LatestFuelConsumed);\n\t\t\n\t\tif(bCursurIndex == false && ParentActivity.ScreenIndex == Home.SCREEN_STATE_MENU_MONITORING_FUELHISTORY_GENERALRECORD)\n\t\t\tCursurDisplay(CursurIndex);\n\t}",
"private void initUI()\r\n\t{\r\n\t\tthis.label = new Label();\r\n\t\t\r\n\t\tthis.label.setText(\"This view is also saveable\");\r\n\t\t\r\n\t\tthis.label.setSizeUndefined();\r\n\t\tthis.add(this.label);\r\n\t\tthis.setSizeFull();\r\n\t}",
"public abstract void initUiAndListener();",
"public updatedata() {\n initComponents();\n }",
"private void updateUI() {\n mAdapter = new GoalAdapter(userGoals);\n goalRecyclerView.setAdapter(mAdapter);\n }",
"@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tupdateUI();\n\t\t\t\t\t\t}",
"private void updateUI() {\n mLatestFeedsAdapter.notifyDataSetChanged();\n }",
"private void updateUIAfterTick(){ \n //turn counter\n this.turnClock.setText(\"Turn: \" + this.village.getTurnCountAsString());\n \n //population\n this.populationAmount.setText(\"Population: \" + Integer.toString(this.village.getPopulation().getPopulationAmount()) );\n this.populationGrowthrate.setText(\"Growthrate: \" + Float.toString(this.village.getPopulation().getGrowthrate()));\n\n //buildings:\n this.constructedBuildingsArea.setText(this.getConstructedBuildingsAsList());\n \n //event\n this.eventText.setText(this.currentEvent.getEventText());\n this.eventOption1Btn.setText(this.currentEvent.getOption1Text());\n this.eventOption2Btn.setText(this.currentEvent.getOption2Text());\n this.eventOption3Btn.setText(this.currentEvent.getOption3Text());\n this.eventOption4Btn.setText(this.currentEvent.getOption4Text());\n \n }",
"private void updateGUI() {\n\t\tsfrDlg.readSFRTableFromCPU();\n\t\tsourceCodeDlg.updateRowSelection(cpu.PC);\n\t\tsourceCodeDlg.getCyclesLabel().setText(\"Cycles count : \" + cpu.getCyclesCount());\n\t\tdataMemDlg.fillDataMemory();\n\t\t//ioPortsDlg.fillIOPorts();\t\t\n\t\tIterator iter = seg7DlgList.iterator();\n\t\twhile(iter.hasNext())\n\t\t\t((GUI_7SegDisplay)iter.next()).drawSeg();\n\t}",
"private void update()\n {\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"UPDATE\");\n updateHumanPlayerMoney();\n updateListViewDoctorItems();\n updateListViewHospitalItems();\n updateListViewLogWindow();\n updateListViewComputerPlayer();\n load_figure();\n updateComputerPlayerMoney();\n }\n });\n }",
"protected void updateUi() {\n final boolean canInput = mSaveAndFinishWorker == null;\n byte[] password = LockPatternUtils.charSequenceToByteArray(mPasswordEntry.getText());\n final int length = password.length;\n if (mUiStage == Stage.Introduction) {\n mPasswordRestrictionView.setVisibility(View.VISIBLE);\n final int errorCode = validatePassword(password);\n String[] messages = convertErrorCodeToMessages(errorCode);\n // Update the fulfillment of requirements.\n mPasswordRequirementAdapter.setRequirements(messages);\n // Enable/Disable the next button accordingly.\n setNextEnabled(errorCode == NO_ERROR);\n } else {\n // Hide password requirement view when we are just asking user to confirm the pw.\n mPasswordRestrictionView.setVisibility(View.GONE);\n setHeaderText(getString(mUiStage.getHint(mIsAlphaMode, getStageType())));\n setNextEnabled(canInput && length >= mPasswordMinLength);\n mSkipOrClearButton.setVisibility(toVisibility(canInput && length > 0));\n }\n int message = mUiStage.getMessage(mIsAlphaMode, getStageType());\n if (message != 0) {\n mMessage.setVisibility(View.VISIBLE);\n mMessage.setText(message);\n } else {\n mMessage.setVisibility(View.INVISIBLE);\n }\n\n setNextText(mUiStage.buttonText);\n mPasswordEntryInputDisabler.setInputEnabled(canInput);\n Arrays.fill(password, (byte) 0);\n }",
"private void updateUI() {\n if (mAccount != null) {\n signInButton.setEnabled(false);\n signOutButton.setEnabled(true);\n callGraphApiInteractiveButton.setEnabled(true);\n callGraphApiSilentButton.setEnabled(true);\n currentUserTextView.setText(mAccount.getUsername());\n } else {\n signInButton.setEnabled(true);\n signOutButton.setEnabled(false);\n callGraphApiInteractiveButton.setEnabled(false);\n callGraphApiSilentButton.setEnabled(false);\n currentUserTextView.setText(\"None\");\n }\n\n deviceModeTextView.setText(mSingleAccountApp.isSharedDevice() ? \"Shared\" : \"Non-shared\");\n }",
"@Override\n public void updateUI() {\n setUI(new RangeSliderUI(this));\n // Update UI for slider labels. This must be called after updating the\n // UI of the slider. Refer to JSlider.updateUI().\n updateLabelUIs();\n }",
"private void updateSetupGUI() {\n\t\tif (isLoggedIn == false) {\n\t\t\trestoreGameLabel.setVisible(false);\n\t\t\trestoreGameButton.setVisible(false);\n\t\t\tcreateAccountButton.setVisible(true);\n\t\t\tcreateAccountLabel.setVisible(true);\n\t\t\tseparator_1.setVisible(true);\n\t\t} else {\n\t\t\tcreateAccountButton.setVisible(false);\n\t\t\tcreateAccountLabel.setVisible(false);\n\t\t\tseparator_1.setVisible(false);\n\t\t\trestoreGameLabel.setVisible(true);\n\t\t\trestoreGameButton.setVisible(true);\n\t\t}\n\t}",
"private void populateUI(Event event){\n mTitle.setText(event.getTitle()); //sets title to event title\n mDescription.setText(event.getDescription());\n }",
"private void updateUi(final BoxItem sharedItem){\n if (!checkIfHasRequiredFields(sharedItem)){\n refreshShareItemInfo();\n return;\n }\n if (getMainItem().getId().equals(sharedItem.getId())) {\n setMainItem(sharedItem);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n setupUi();\n }\n });\n }\n }",
"private void setupUI(){\n this.setupTimerSchedule(controller, 0, 500);\n this.setupFocusable(); \n this.setupSensSlider();\n this.setupInitEnable();\n this.setupDebugger();\n }",
"@Override\n public\n void\n updateView()\n {\n // Stop responding to events.\n setAllowEvents(false);\n\n getAccountChooser().displayElements(getAccounts());\n getPanel().removeAll();\n\n // Get new reference to account incase the type or collection has changed.\n setAccount(getProperAccountReference());\n\n if(getAccount() != null)\n {\n setRegisterPanel(new RegisterPanel(getAccount()));\n\n getAccountChooser().setSelectedItem(getAccount().getIdentifier());\n getFilter().updateFormats();\n\n // Build panel.\n getPanel().setFill(GridBagConstraints.BOTH);\n getPanel().add(getRegisterPanel(), 0, 0, 1, 1, 100, 100);\n\n displayTransactions(null);\n }\n\n // Resume responding to events.\n setAllowEvents(true);\n }",
"private void updateGui() {\n final IDebugger debugger = m_debugPerspectiveModel.getCurrentSelectedDebugger();\n final TargetProcessThread thread = debugger == null ? null : debugger.getProcessManager().getActiveThread();\n\n final boolean connected = debugger != null && debugger.isConnected();\n final boolean suspended = connected && thread != null;\n\n m_hexView.setEnabled(connected && suspended && m_provider.getDataLength() != 0);\n\n if (connected) {\n m_hexView.setDefinitionStatus(DefinitionStatus.DEFINED);\n } else {\n // m_hexView.setDefinitionStatus(DefinitionStatus.UNDEFINED);\n\n m_provider.setMemorySize(0);\n m_hexView.setBaseAddress(0);\n m_hexView.uncolorizeAll();\n }\n }",
"public void UI_Refresh ()\r\n\t{\r\n\t\tUI_RefreshSensorData ();\r\n\t\tUI_RefreshConnStatus ();\r\n\t}",
"protected void _updateWidgets()\n\t{\n\t\t// Show the title\n\t\tString title = _spItem.getTitleAttr() ;\n\t\tif( title != null )\n\t\t\t_obsTitle.setText( title ) ;\n\t\telse\n\t\t\t_obsTitle.setText( \"\" ) ;\n\n\t\tString state = _avTab.get( \"state\" ) ;\n\t\tif( state == null )\n\t\t\t_obsState.setText( \"Not in Active Database\" ) ;\n\t\telse\n\t\t\t_obsState.setText( state ) ;\n\n\t\tignoreActions = true ; // MFO\n\n\t\tSpObs obs = ( SpObs )_spItem ;\n\t\t\n\t\t// Set the priority\n\t\tint pri = obs.getPriority() ;\n\t\t_w.jComboBox1.setSelectedIndex( pri - 1 ) ;\n\n\t\t// Set whether or not this is a standard\n\t\t_w.standard.setSelected( obs.getIsStandard() ) ;\n\n\t\t// Added for OMP (MFO, 7 August 2001)\n\t\t_w.optional.setValue( obs.isOptional() ) ;\n\n\t\tint numberRemaining = obs.getNumberRemaining();\n\t\t_w.setRemainingCount(numberRemaining);\n\n\t\t_w.unSuspendCB.addActionListener( this ) ;\n\n\t\tignoreActions = false ;\n\n\t\t_w.estimatedTime.setText( OracUtilities.secsToHHMMSS( obs.getElapsedTime() , 1 ) ) ;\n\n\t\t_updateMsbDisplay() ;\n\t}",
"@Override\n\tpublic void refreshUI(Object pushMsg) {\n\t\t\n\t}",
"private void refreshScreen() {\n app.getMainMenu().getTextField().clear();\n for (int key = 0; key < 96; key++) {\n app.getWorkSpace().getGridCell(key).unhighlightGridCell();\n app.getWorkSpace().getGridCell(key).updateState(app);\n }\n Storage.getInstance().writeObject(\"workspace\", app.getWorkSpace().getWorkSpaceMap());\n app.show();\n }",
"public BridgingUI() {\n initComponents();\n initUserActions();\n }",
"@Override\n\t\t protected void onPreExecute() {\n\t\t\t InitializeUI();\n\t\t }",
"private void updateUI() {\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - start\");\n\n btnBTScan.setEnabled(btAdapter.isEnabled() && !btAdapter.isDiscovering());\n\n if (btAdapter.isDiscovering())\n btnBTScan.setText(R.string.btn_bt_devices_scan_running_text);\n else\n btnBTScan.setText(R.string.btn_bt_devices_scan_text);\n tglBTToggle.setChecked(btAdapter.isEnabled());\n\n // remove all found (if any) devices when BT is disabled\n if (!btAdapter.isEnabled())\n lvAdapter.clear();\n\n if (lvAdapter.getCount() > 0)\n tvHeader.setText(R.string.tv_bt_devices_header_text_devices_found);\n else\n tvHeader.setText(R.string.tv_bt_devices_header_text_no_devices);\n\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - finish\");\n }",
"public void update()\n {\n for (Container container : containers)\n container.update(false);\n\n Gui.update(BanksGUI.class);\n Gui.update(BankGUI.class);\n Gui.update(ItemsGroupsGUI.class);\n }",
"private void updateUi() {\n mBuyButton = (Button) findViewById(R.id.but_purchase);\n mMessageText = (TextView)findViewById(R.id.txt_purchase);\n }",
"@Override\n\tpublic void handleUpdateUI(String text, int code) {\n\t\t\n\t}",
"public void updateUI() {\n List<Animal> animals;\n\n String searchQuery = LexiconPreferences.getSearchQuery(getActivity());\n\n // Check if there's a search query present\n if (searchQuery != null) {\n ArrayList<String> whereArgs = new ArrayList<>();\n whereArgs.add(LexiconPreferences.getFilterValue(getActivity()));\n\n animals = mAnimalManager.searchAnimals(\n mAnimalManager.createWhereClauseFromFilter(LexiconPreferences.getFilterKey(getActivity())),\n whereArgs,\n searchQuery\n );\n } else {\n animals = mAnimalManager.getAnimals(\n mAnimalManager.createWhereClauseFromFilter(LexiconPreferences.getFilterKey(getActivity())),\n new String[]{LexiconPreferences.getFilterValue(getActivity())}\n );\n }\n\n if (animals.size() > 0) {\n // If the fragment is already running, update the data in case something changed (some animal)\n if (mAnimalAdapter == null) {\n mAnimalAdapter = new AnimalAdapter(animals);\n mAnimalRecyclerView.setAdapter(mAnimalAdapter);\n } else {\n mAnimalAdapter.setAnimals(animals);\n mAnimalAdapter.notifyDataSetChanged();\n }\n } else {\n RelativeLayout emptyList = (RelativeLayout) mView.findViewById(R.id.list_empty);\n emptyList.setVisibility(View.VISIBLE);\n }\n }",
"public abstract void updateFragmentUI();",
"public void update() {\n\n\t\tdisplay();\n\t}",
"private void updateUi(){\n competencia = (CompetitionMin) getArguments().getSerializable(\"competencia\");\n\n edtCiudad = vista.findViewById(R.id.edt_ciudad_edit_comp);\n\n spinGenero = vista.findViewById(R.id.spinner_genero_edit);\n spinEstado = vista.findViewById(R.id.spinner_estado_edit);\n\n generos = new ArrayList<>();\n estados = new ArrayList<>();\n\n btnUpdateCompetition = vista.findViewById(R.id.btn_update_edit_comp);\n }",
"@Override\n public void setUpUI(Bundle savedInstanceState)\n {\n }",
"private void setUpViews() {\n\n updateFooterCarInfo();\n updateFooterUsrInfo();\n\n\n setResultActionListener(new ResultActionListener() {\n @Override\n public void onResultAction(AppService.ActionType actionType) {\n if (ModelManager.getInstance().getGlobalInfo() != null) {\n GlobalInfo globalInfo = ModelManager.getInstance().getGlobalInfo();\n\n switch (actionType) {\n case CarInfo:\n updateFooterCarInfo();\n break;\n case UsrInfo:\n updateFooterUsrInfo();\n break;\n case Charger:\n updateChargeStationList();\n break;\n }\n }\n }\n });\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 }",
"public void refresh() {\r\n\t\tneeds.setText(needs());\r\n\t\tproduction.setText(production());\r\n\t\tjobs.setText(jobs());\r\n\t\tmarketPrices.setText(marketPrices());\r\n\t\tmarketSellAmounts.setText(marketSellAmounts());\r\n\t\tmarketBuyAmounts.setText(marketBuyAmounts());\r\n\t\tcompanies.setText(companies());\r\n\t\tmoney.setText(money());\r\n\t\ttileProduction.setText(tileProduction());\r\n\t\tcapital.setText(capital());\r\n\t\thappiness.setText(happiness());\r\n\t\tland.setText(land());\r\n\t\t//ArrayList of Agents sorted from lowest to highest in money is retrieved from Tile\r\n\t\tagents=tile.getAgentsByMoney();\r\n\t\tgui3.refresh();\r\n\t\tsliderPerson.setText(\"\"+agents.get(slider.getValue()).getMoney());\r\n\t\ttick.setText(tick());\r\n\t\tthis.pack();\r\n\t}",
"public UpdateDialogPage(UpdateState updateState) {\r\n\t\tsuper(new SWTUIPlatform(), \"Update Operation Definition\", \"Define update operations to perform\");\r\n\r\n\t\t// set manipulated data\r\n\t\t_updateState = updateState;\r\n\r\n\t\t// create all UI fields\r\n\t\t_requirementsField = createRequirementsField();\r\n\t\t_addItemToImportField = createAddItemToImportField();\r\n\t\t_addItemToUpdateField = createAddItemToUpdateField();\r\n\t\t_addItemToRevertField = createAddItemToRevertField();\r\n\t\t_updateAllItemsField = createUpdateAllItemsField();\r\n\t\t_clearOpsField = createClearOpsField();\r\n\t\t_computeImpactsField = createComputeImpactsField();\r\n\t\t_impactsField = createImpactsField();\r\n\t\t_errorsField = createErrorsField();\r\n\t\t_causesField = createCausesField();\r\n\t\t_consequencesField = createConsequencesField();\r\n\t\t\r\n\t\tDefaultMC_AttributesItem defaultMc = new DefaultMC_AttributesItem();\r\n\r\n\t\t/*\r\n\t\t * Requirements part\r\n\t\t */\r\n\t\t_requirementsField._field.setHSpan(1);\r\n\t\t\r\n\t\tDGridUI requirementsListGrid = _swtuiPlatforms.createDGridUI(_page, \"#requirementsListPart\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\t_requirementsField, _computeImpactsField);\r\n\t\trequirementsListGrid._field.setFlag(Item.UI_NO_BORDER, true);\r\n\t\t\r\n\t\tDGridUI requirementsButtonsGrid = _swtuiPlatforms.createDGridUI(_page, \"#requirementsButtonPart\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\t_addItemToImportField, _addItemToUpdateField, _addItemToRevertField, \r\n\t\t\t\t_updateAllItemsField, _clearOpsField);\r\n\t\trequirementsButtonsGrid._field.setFlag(Item.UI_NO_BORDER, true);\r\n\t\t\r\n\t\tDGridUI requirementsGrid = _swtuiPlatforms.createDGridUI(_page, \"#requirementsPart\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\trequirementsListGrid, requirementsButtonsGrid);\r\n\t\trequirementsGrid.setColumnNb(2);\r\n\t\t\r\n\t\t/*\r\n\t\t * Impacts part\r\n\t\t */\r\n\t\tDGridUI impactsGrid = _swtuiPlatforms.createDGridUI(_page, \"#impactsPart\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\t_impactsField, _errorsField);\r\n\t\t\r\n\t\tDGridUI analysisGrid = _swtuiPlatforms.createDGridUI(_page, \"#analysisPart\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\t_causesField, _consequencesField);\r\n\r\n\t\t_selectedImpactDependentFields.add(_causesField);\r\n\t\t_selectedImpactDependentFields.add(_consequencesField);\r\n\r\n\t\t_separateImpactsAndAnalysisSash = _swtuiPlatforms.createDSashFormUI(_page, \"#selectSash\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\timpactsGrid, analysisGrid);\r\n\t\t_separateImpactsAndAnalysisSash.setWeight(50); // 50% , 50%\r\n\t\t\r\n\r\n\t\t_separateRequirementsAndImpactsSashField = _swtuiPlatforms.createDSashFormUI(_page, \"#separateRequirementsAndImpactsSash\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\trequirementsGrid, _separateImpactsAndAnalysisSash);\r\n\t\t_separateRequirementsAndImpactsSashField.setHorizontal(false);\r\n\t\t// 40%\r\n\t\t// 60%\r\n\t\t_separateRequirementsAndImpactsSashField.setWeight(40);\r\n\r\n\t\t// add main field\r\n\t\taddLast(_separateRequirementsAndImpactsSashField);\r\n\r\n\t\t// add listeners\r\n\t\tregisterListener();\r\n\t\t\r\n\t\t\r\n\t}",
"public void updateUI(){\n\t\t\n\t\ttimeTV.setText(\"\"+String.format(\"\" + gameClock%10));\n\t\ttimeTV2.setText(\"\"+ gameClock/10+\".\");\n\t\tif (currentGameEngine!=null) {\n\t\t\tmultLeft.setText(\"multiplier: \"+currentGameEngine.getMultiplier()+\"X\");\n\t\t\tscoreTV.setText(\"\"+currentGameEngine.getScore());\n\t\t} else {\n\t\t\tscoreTV.setText(\"0\");\n\t\t}\n\n\t\t//errorTV.setText(\"\"+mFrameNum);\n\t\t\n\t\t\n\t}",
"public void updateChooser()\r\n\t{\r\n\t\t/*\twhat shall we do here ? */\r\n\t}",
"private void refresh() {\n updatePopulationInfo();\n\n // Update current production info\n updateProductionInfo();\n\n // Update the building grid\n updateBuildingInfo();\n\n // Update the warehouse display\n updateWarehouse();\n\n // Update the list of ships/carriers in port\n updateInPortInfo();\n\n // Update the list of cargo on the selected carrier\n updateCargoInfo();\n }",
"public Update_info() {\n initComponents();\n display_data();\n }",
"private void refreshUI(boolean updateAll) {\n if (updateAll) {\n refreshAutoTab();\n refreshManualTab();\n } else {\n if (TAB_AUTO == mTabIndex) {\n refreshAutoTab();\n } else if (TAB_MANUAL == mTabIndex) {\n refreshManualTab();\n } else {\n myAssert(false, \"No such tab!\");\n }\n }\n }",
"public ruser() {\n initComponents();\n update();\n }",
"protected void updateUI() {\n this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n xWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro X:\\n\"\n + mWakeupUncalibratedGyroData[0]);\n yWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro Y:\\n\"\n + mWakeupUncalibratedGyroData[1]);\n zWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro Z:\\n\"\n + mWakeupUncalibratedGyroData[2]);\n }\n });\n }",
"private void updateUI() {\n\t\t\tfinal TextView MessageVitesse = (TextView) findViewById(R.id.TextView01);\r\n\t\t\tfinal ProgressBar Progress = (ProgressBar) findViewById (R.id.ProgressBar01);\r\n\t\t\tfinal TextView MessageStatus = (TextView)findViewById (R.id.TextView02);\r\n\t\t\t\t\t\r\n\t\t\t//on affecte des valeurs aux composant\r\n\t\t\tMessageVitesse.setText(\"Vitesse Actuelle : \"+ Vitesse + \" Ko/s\");\r\n\t\t\tProgress.setProgress(Pourcent);\r\n\t\t\tMessageStatus.setText (Status);\r\n\t\t\tif (Status.equals(\"Télèchargement terminé!!!\")&&NotifDejaLancée==false){\r\n\t\t\t\tlanceNotification();\r\n\t\t\t\tNotifDejaLancée=true;\r\n\t\t\t}\r\n\t\t\t}",
"private void setupUI() \n\t{\n\t\t\n\t\tthis.setLayout( new FormLayout() );\n\t\tmyInterfaceContainer = new Composite( this, SWT.NONE );\n\t\tmyInterfaceContainer.setLayoutData( FormDataMaker.makeFullFormData());\n\t\t\n\t\tsetupInterfaceContainer();\n\t}",
"@Override\n\t\t\tpublic void stateChanged() {\n\t\t\t\tupdateUi();\n\t\t\t\tmakeUserContentPanel(panel);\n\t\t\t}",
"@Override\r\n\t\tpublic void updateUI() {\n\t\t\tif(deparments != null){\r\n\r\n\t\t\t\ttv.setText(deparments.toString());\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"deparments \"+deparments.toString());\r\n\t\t\t}\r\n\t\t}",
"private void updateGUIStatus() {\r\n\r\n }",
"@Override\n public void update() {\n if ((mLikesDialog != null) && (mLikesDialog.isVisible())) {\n return;\n }\n\n if ((mCommentariesDialog != null) && (mCommentariesDialog.isVisible())) {\n return;\n }\n\n if (!getUserVisibleHint()) {\n return;\n }\n\n updateUI();\n }",
"private void initUI() {\n fileCount = wizard.getFileCount();\n fileByteCount = wizard.getByteCount();\n fileCountLabel.setText(String.valueOf(fileCount));\n updateByteCount(byteCountLabel, byteCountUnit, \"KB\", fileByteCount, 0);\n progressBar.setProgress(0);\n }",
"private void UpdateContentUI() {\n Log.d(TAG, \"UpdateContentUI called\");\n //TODO: choose only the alarms for current user\n SharedPreferences sp = sApplicationContext.getSharedPreferences(PREF_NAME, MODE_PRIVATE);\n String currentUserUUIDString = sp.getString(PREF_CURRENT_USER_UUID, null);\n List<Alarm> alarms = myLab.getAlarms();\n if(mAlarmAdapter == null){\n mAlarmAdapter = new AlarmAdapter(alarms);\n mAlarmRecyclerView.setAdapter(mAlarmAdapter);\n }else {\n mAlarmAdapter.setAlarms(alarms);\n mAlarmAdapter.notifyDataSetChanged();\n }\n\n mEmptyElementTextView.setVisibility(alarms.size() < 1 ? View.VISIBLE : View.GONE);\n }",
"public void update() {\n menu = new PopupMenu();\n\n final MenuItem add = new MenuItem(Messages.JOINCHANNEL);\n\n final MenuItem part = new MenuItem(Messages.PARTCHANNEL);\n\n final MenuItem reload = new MenuItem(Messages.RELOAD);\n\n final Menu language = new Menu(Messages.LANGUAGE);\n\n final MenuItem eng = new MenuItem(Messages.ENGLISH);\n\n final MenuItem fr = new MenuItem(Messages.FRENCH);\n\n final MenuItem sp = new MenuItem(Messages.SPANISH);\n\n final MenuItem debug = new MenuItem(Messages.DEBUG);\n\n final MenuItem about = new MenuItem(Messages.ABOUT);\n\n final MenuItem exit = new MenuItem(Messages.EXIT);\n exit.addActionListener(e -> Application.getInstance().disable());\n about.addActionListener(e -> JOptionPane.showMessageDialog(null,\n Messages.ABOUT_MESSAGE));\n add.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(final ActionEvent e) {\n if (Application.getInstance().getChrome().getToolbar()\n .getButtonCount() < 10) {\n Application.getInstance().getChrome().getToolbar().parent\n .actionPerformed(new ActionEvent(this, e.getID(),\n \"add\"));\n } else {\n JOptionPane.showMessageDialog(null,\n \"You have reached the maximum amount of channels!\");\n }\n }\n });\n part.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(final ActionEvent e) {\n Application.getInstance().getChrome().getToolbar().parent\n .actionPerformed(new ActionEvent(this,\n ActionEvent.ACTION_PERFORMED, \"remove\"\n + \".\"\n + Application.getInstance().getChrome()\n .getToolbar().getCurrentTab()));\n }\n });\n debug.addActionListener(e -> {\n if (!LoadScreen.getDebugger().isVisible()) {\n LoadScreen.getDebugger().setVisible(true);\n } else {\n LoadScreen.getDebugger().setVisible(true);\n }\n });\n\n eng.addActionListener(arg0 -> {\n Messages.setLanguage(Language.ENGLISH);\n Application.getInstance().getTray().update();\n });\n\n fr.addActionListener(arg0 -> {\n Messages.setLanguage(Language.FRENCH);\n Application.getInstance().getTray().update();\n });\n\n sp.addActionListener(arg0 -> {\n Messages.setLanguage(Language.SPANISH);\n Application.getInstance().getTray().update();\n });\n\n if (eng.getLabel().equalsIgnoreCase(Messages.CURR)) {\n eng.setEnabled(false);\n }\n\n if (fr.getLabel().equalsIgnoreCase(Messages.CURR)) {\n fr.setEnabled(false);\n }\n\n if (sp.getLabel().equalsIgnoreCase(Messages.CURR)) {\n sp.setEnabled(false);\n }\n\n if (Application.getInstance().getChrome().getToolbar().getCurrentTab() == -1) {\n part.setEnabled(false);\n }\n if (!Application.getInstance().getChrome().getToolbar().isAddVisible()) {\n add.setEnabled(false);\n }\n\n language.add(eng);\n language.add(fr);\n language.add(sp);\n\n menu.add(add);\n menu.add(part);\n menu.add(reload);\n menu.addSeparator();\n menu.add(language);\n menu.addSeparator();\n menu.add(debug);\n menu.add(about);\n menu.addSeparator();\n menu.add(exit);\n Tray.sysTray.setPopupMenu(menu);\n }",
"public void buildGui() {\n\t}",
"@Override\n\tpublic void updateUser(UserInfo ui) {\n\n\t}",
"private void updateUI() {\n /* Making an array of strings to store tasks entered by the user. */\n ArrayList<String> taskList = new ArrayList<>();\n SQLiteDatabase db = OpenDB.getReadableDatabase();\n Cursor cursor = db.query(AccessData.ToDoEntry.table,\n new String[]{AccessData.ToDoEntry._ID, AccessData.ToDoEntry.todo_title},\n null, null, null, null, null);\n while (cursor.moveToNext()) {\n int idx = cursor.getColumnIndex(AccessData.ToDoEntry.todo_title);\n taskList.add(cursor.getString(idx));\n }\n\n /* Check if array adapter is created. */\n if (listAdapter == null) {\n /* If adapter is not created i.e. NULL, create a new adapter */\n listAdapter = new ArrayAdapter<>(this,\n R.layout.todo_item,\n R.id.task_title,\n taskList);\n /* Set the above created adapter as the todoListView adapter */\n todoListView.setAdapter(listAdapter);\n } else {\n /* If created: it is assigned to the todoListView */\n listAdapter.clear(); // clear it\n listAdapter.addAll(taskList); // re-populate it\n listAdapter.notifyDataSetChanged(); // notify view to refresh with new data values\n }\n\n cursor.close();\n db.close();\n }",
"@Override\r\n\tpublic void setModel() {\n\t\tnew UpUI(context).execute();\r\n\t}",
"private void initUI() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\trenderer = new LWJGLRenderer();\n\t\t\tgui = new GUI(stateWidget, renderer);\n\t\t\tthemeManager = ThemeManager.createThemeManager(StateWidget.class.getResource(\"gameui.xml\"), renderer);\n\t\t\tgui.applyTheme(themeManager);\n\t\t\t\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}"
] | [
"0.78316545",
"0.7755091",
"0.7455374",
"0.7455374",
"0.7455374",
"0.72996426",
"0.72996426",
"0.71371466",
"0.7111963",
"0.71100706",
"0.70988864",
"0.70792586",
"0.70641184",
"0.7051993",
"0.70130646",
"0.69866633",
"0.6956352",
"0.68888867",
"0.68683517",
"0.68628126",
"0.68513423",
"0.6840163",
"0.6700098",
"0.6697435",
"0.6648783",
"0.66479295",
"0.66361463",
"0.66280997",
"0.6607343",
"0.6543284",
"0.65288043",
"0.65283823",
"0.65271324",
"0.649665",
"0.6482288",
"0.6446465",
"0.644471",
"0.642894",
"0.6418815",
"0.6408363",
"0.6393281",
"0.6392645",
"0.63902944",
"0.6379758",
"0.6376501",
"0.6327699",
"0.62897897",
"0.62882215",
"0.6285606",
"0.6284404",
"0.62634176",
"0.62580574",
"0.6251719",
"0.6237745",
"0.62210506",
"0.6215396",
"0.61876625",
"0.6177627",
"0.61631656",
"0.61531544",
"0.61526376",
"0.61374843",
"0.6132973",
"0.6129881",
"0.61143166",
"0.6106866",
"0.6103626",
"0.6092696",
"0.6084539",
"0.6084403",
"0.6073824",
"0.6066112",
"0.6065033",
"0.60475284",
"0.60436743",
"0.6038396",
"0.6017992",
"0.60090315",
"0.60063726",
"0.5990885",
"0.59811383",
"0.5979007",
"0.5978104",
"0.59776086",
"0.59760094",
"0.59730154",
"0.5969209",
"0.59640926",
"0.5963715",
"0.59635687",
"0.5961763",
"0.59616065",
"0.5961099",
"0.595995",
"0.59594357",
"0.59594107",
"0.59588903",
"0.5958151",
"0.595615",
"0.594948",
"0.59474367"
] | 0.0 | -1 |
onSaveButtonClicked is called when the "save" button is clicked. It retrieves user input and inserts that new alarm data into the underlying database. | @RequiresApi(api = Build.VERSION_CODES.KITKAT)
public void onSaveButtonClicked() {
//check for getting address data from map at all
if(mMapDestination == null){
Toast.makeText(getApplicationContext(),
R.string.error_mandatory, Toast.LENGTH_SHORT)
.show();
return;
}
// Parse numeric fields to their appropriate types
String location = mMapDestination.getLocation();
float radius = mMapDestination.getRadius();
double latitude = mMapDestination.getLatitude();
double longitude = mMapDestination.getLongitude();
String ringtone =
mAlarmRingtone == null ? getDefaultRingtone().toString() : mAlarmRingtone.toString();
boolean vibrate = mDetailBinding.clockDetails.vibrate.isChecked();
String message = mDetailBinding.clockDetails.message.getText().toString();
/*
Validation check
*/
// Show error and abort save if one of the mandatory fields is empty
if (radius <= 0 || location == null) {
Toast.makeText(getApplicationContext(),
R.string.error_mandatory,
Toast.LENGTH_SHORT)
.show();
return;
}
// Check if coordinates are valid: -90 < latitude < 90 && -180 < longitude < 180
if (latitude < -90 || latitude > 90) {
Toast.makeText(getApplicationContext(),
R.string.error_latitude,Toast.LENGTH_SHORT).show();
return;
}
if (longitude < -180 || longitude > 180) {
Toast.makeText(getApplicationContext(),
R.string.error_longitude,Toast.LENGTH_SHORT).show();
return;
}
// "enabled" field is not shown on this screen - keep current value (if exists)
boolean enabled = (mViewModel == null) || (mViewModel.getAlarm() == null) ||
Objects.requireNonNull(mViewModel.getAlarm().getValue()).isEnabled();
// Save the added/updated alarm entity
final AlarmEntry alarm;
if (mAlarmId == Constants.DEFAULT_ALARM_ID) {
alarm = new AlarmEntry(location, latitude, longitude, radius,
enabled, vibrate, message, ringtone);
} else {
alarm = new AlarmEntry(mAlarmId, location, latitude, longitude, radius,
enabled, vibrate, message, ringtone);
}
// Save the added/updated alarm entity
AppExecutors.getInstance().diskIO().execute(new Runnable() {
@Override
public void run() {
if (mAlarmId == Constants.DEFAULT_ALARM_ID) {
mAlarmId = (int) mDb.alarmDao().insertAlarm(alarm);
} else {
mDb.alarmDao().updateAlarm(alarm);
}
FileUtils.saveMapImage(mAlarmId);
finish();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void onSaveButtonClicked() {\n final String date = dayValue + \".\" + monthValue + \".\" + yearValue;\n final String name = edtEventName.getText().toString();\n final String location = edtEventLocation.getText().toString();\n final String desc = edtEventDesc.getText().toString();\n final EventData eventData = new EventData(name,\n date, location, desc);\n\n // create a new thread to insert or update db\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // the condition when user click the one of the items in recyclerView (Update existing row)\n if (intent != null && intent.hasExtra(\"id\")) {\n eventData.setId(intent.getIntExtra(\"id\", 0));\n eventDatabase.eventDAO().updateEvent(eventData);\n }\n // the condition when user click plus button from MainActivity.java (Insert a new row)\n else {\n eventDatabase.eventDAO().insertNewEvent(eventData);\n\n }\n finish(); // destroy activity (when u press back key after clicking \"save btn\", this activity won't be called again)\n }\n });\n }",
"public void onSaveButtonClicked() {\n String description = mEditText.getText().toString();\n Date date = new Date();\n\n final DiaryEntry entry = new DiaryEntry(description, date);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n if (mEntryId == DEFAULT_ENTRY_ID) {\n // insert new task\n mDb.entryDao().insertEntry(entry);\n } else {\n //update task\n entry.setId(mEntryId);\n mDb.entryDao().updateEntry(entry);\n }\n finish();\n }\n });\n }",
"void onSaveClicked();",
"public void onSaveClicked(View view) {\n\n if (mInterest != 0.0f) {\n\n ContentValues values = new ContentValues();\n values.put(SavingsItemEntry.COLUMN_NAME_BANK_NAME, bankInput.getText().toString());\n values.put(SavingsItemEntry.COLUMN_NAME_AMOUNT, mAmount);\n values.put(SavingsItemEntry.COLUMN_NAME_YIELD, mYield);\n values.put(SavingsItemEntry.COLUMN_NAME_START_DATE, mStartDate.getTime());\n values.put(SavingsItemEntry.COLUMN_NAME_END_DATE, mEndDate.getTime());\n values.put(SavingsItemEntry.COLUMN_NAME_INTEREST, mInterest);\n\n if (mEditMode){\n //Update the data into database by ContentProvider\n getContentResolver().update(SavingsContentProvider.CONTENT_URI, values,\n SavingsItemEntry._ID + \"=\" + mSavingsBean.getId(), null);\n Log.d(Constants.LOG_TAG, \"Edit mode, updated existing savings item: \" + mSavingsBean.getId());\n }else {\n // Save the data into database by ContentProvider\n getContentResolver().insert(\n SavingsContentProvider.CONTENT_URI,\n values\n );\n }\n // Go back to dashboard\n //Intent intent = new Intent(this, DashboardActivity.class);\n //startActivity(intent);\n Utils.gotoDashBoard(this);\n finish();\n } else {\n Toast.makeText(this, R.string.missing_savings_information, Toast.LENGTH_LONG).show();\n }\n\n }",
"public void saveAction (){\n\t \tif(dayNum ==7){\n\t \t\tintPhaseCompletes = intPhaseCompletes +1;\n\t \t\tdb.execSQL(\"UPDATE Phases SET Completions= \"+ intPhaseCompletes + \" WHERE PhaseID = \" + \"'\" + phaseID + \"'\");\n\t \t}\n \tcontent = timerTextView.getText().toString();\n \tstrDate = functions.getDate();\n \tintCompletes = intCompletes +1;\n \tdb.execSQL(\"INSERT INTO results (ExerciseName,time,date) VALUES(\"+ \"'\" + dayName +\"'\" + \",\" \n \t\t\t+ \"'\" + content + \"'\" + \",\"+ \"'\" + strDate +\"'\"+ \")\");\n \tdb.execSQL(\"UPDATE Days SET LastDate= \"+ \"'\" + strDate + \"'\" + \" WHERE _id = \" + \"'\" + dayID + \"'\");\n \tdb.execSQL(\"UPDATE Days SET Completions= \"+ intCompletes + \" WHERE _id = \" + \"'\" + dayID + \"'\");\n \tdb.close();\n \tdialogShare();\n }",
"public void saveAppointment(ActionEvent event) throws IOException {\n if(!validateInputFields()){\n return;\n }\n if(!validateTime()){\n return;\n }\n LocalDate date = startLDT.toLocalDate();\n int customer = customerCombo.getSelectionModel().getSelectedItem().getId();\n overlaps = getSameDateAppointments(customer, date);\n if(overlaps.size() > 0){\n boolean noOverlap = validateOverlap(overlaps);\n if (!noOverlap){\n showError(true, \"Selected time for customer overlaps with another appointment. Please select another time.\");\n return;\n }\n }\n // update db\n String titleField = titleText.getText();\n String descriptionField = descriptionText.getText();\n String loc = locationCombo.getSelectionModel().getSelectedItem().toString();\n int contact = contactCombo.getSelectionModel().getSelectedItem().getId();\n String ty = typeCombo.getSelectionModel().getSelectedItem().toString();\n int user = userCombo.getSelectionModel().getSelectedItem().getId();\n Timestamp start = convertZDT(startZDT);\n Timestamp end = convertZDT(endZDT);\n updateAppointment(selectedRow.getId(), titleField, descriptionField, loc, start, end, ty, user, contact, customer);\n backToMain(event);\n }",
"public void saveNewAlarmButton_click(View view) throws JSONException {\n\n File Root = new File(Environment.getExternalStorageDirectory() + \"/Android/data/\" + BuildConfig.APPLICATION_ID + \"/\");\n File file = new File(Root, \"Alarms.json\");\n\n Button thb = (Button) findViewById(R.id.timeHourButton);\n Button tmb = (Button) findViewById(R.id.timeMinuteButton);\n EditText et = (EditText) findViewById(R.id.alarmName);\n\n ArrayList<String> text = new ArrayList<>();\n ArrayList<JSONObject> json = new ArrayList<>();\n ArrayList<Integer> Ids = new ArrayList<>();\n String JsonString = new String();\n //region Create directory\n try {\n if (Root.mkdir()) {\n System.out.println(\"Directory created\");\n } else {\n System.out.println(\"Directory is not created, like whatever...\");\n }\n } catch (Exception e) {\n System.out.println(e);\n }\n //endregion\n\n //region ReadFile\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n String line;\n //Read the file line by line\n while ((line = br.readLine()) != null) {\n JSONObject obj = new JSONObject(line);\n json.add(obj);\n text.add(line);\n Ids.add(obj.getInt(\"Id\"));\n }\n br.close();\n } catch (Exception Ex) {\n System.out.println(Ex);\n }\n //endregion\n\n //region Create Json object\n String hourtext = thb.getText().toString();\n String minutetext = tmb.getText().toString();\n String alarmname = et.getText().toString();\n int max = -1;\n if (Ids.size() != 0)\n max = Collections.max(Ids);\n if (getIntent().getIntExtra(\"Id\", -1) == -1)\n Json.put(\"Id\", max + 1);\n else\n Json.put(\"Id\", getIntent().getIntExtra(\"Id\", -1));\n Json.put(\"Hour\", hourtext);\n Json.put(\"Minute\", minutetext);\n Json.put(\"Name\", alarmname);\n\n //Add the date\n if (Date != null && !Date.equals(\"No dates selected\"))\n Json.put(\"Date\", Date);\n else {\n Calendar c = Calendar.getInstance();\n int CurHour = c.get(Calendar.HOUR_OF_DAY);\n int CurMinute = c.get(Calendar.MINUTE);\n\n int AlarmHour = Integer.parseInt(hourtext);\n int AlarmMinute = Integer.parseInt(minutetext);\n\n\n int curDay = c.get(Calendar.DAY_OF_MONTH);\n int curMonth = c.get(Calendar.MONTH) + 1;\n int curYear = c.get(Calendar.YEAR);\n int CurTimeInmins = CurHour * 60 + CurMinute;\n int AlarmTimeInMins = AlarmHour * 60 + AlarmMinute;\n\n if (CurTimeInmins < AlarmTimeInMins) {\n String CurrentDate;\n\n if (curDay < 10)\n CurrentDate = \"0\" + curDay + \"-\" + curMonth + \"-\" + curYear;\n else if (curDay < 10 && curMonth < 10)\n CurrentDate = \"0\" + curDay + \"-0\" + curMonth + \"-\" + curYear;\n else if (curMonth < 10)\n CurrentDate = curDay + \"-0\" + curMonth + \"-\" + curYear;\n else\n CurrentDate = curDay + \"-\" + curMonth + \"-\" + curYear;\n Json.put(\"Date\", CurrentDate);\n } else {\n String TomorrahDate;\n if (curDay < 10) {\n curDay++;\n TomorrahDate = \"0\" + curDay + \"-\" + curMonth + \"-\" + curYear;\n } else if (curDay < 10 && curMonth < 10) {\n curDay++;\n TomorrahDate = \"0\" + curDay + \"-0\" + curMonth + \"-\" + curYear;\n } else if (curMonth < 10) {\n curDay++;\n TomorrahDate = curDay + \"-0\" + curMonth + \"-\" + curYear;\n } else {\n curDay++;\n TomorrahDate = curDay + \"-\" + curMonth + \"-\" + curYear;\n }\n\n Json.put(\"Date\", TomorrahDate);\n }\n }\n\n Json.put(\"Tone\", FName);\n if (FName == null) {\n AlarmType = 0;\n }\n\n SeekBar seek = (SeekBar) findViewById(R.id.volumeBar);\n\n Json.put(\"Volume\", seek.getProgress());\n Json.put(\"Type\", AlarmType);\n Json.put(\"Latitude\", getIntent().getDoubleExtra(\"Latitude\", 0));\n Json.put(\"Longitude\", getIntent().getDoubleExtra(\"Longitude\", 0));\n intent.putExtra(\"LocationType\", LocType);\n intent.putExtra(\"LocationRadius\", LocRad);\n //endregion\n\n //region WriteFile\n for (int i = 0; i < text.size(); i++) {\n //Combine old string with the listobject\n if (getIntent().getIntExtra(\"Id\", -1) == json.get(i).getInt(\"Id\")) {\n } else {\n JsonString = JsonString + text.get(i) + \"\\n\";\n }\n }\n\n JsonString = JsonString + Json.toString();\n\n FileWriter out;\n try {\n //Write to file\n out = new FileWriter(new File(Root, \"Alarms.json\"));\n out.append(JsonString);\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n //endregion\n\n Intent intent = new Intent(this, Main.class);\n setResult(RESULT_OK, intent);\n finish();\n startActivity(intent);\n\n }",
"@OnClick(R.id.btn_save_event)\n public void saveChanges() {\n if (isNewEvent) {\n createEvent();\n } else {\n updateEvent();\n }\n }",
"public void savePatientDetails(View view){\r\n\t\tsaveToSQLite();\r\n createCalendarEntry();\r\n\t\tToast.makeText(this, \"Saved. Reminder created.\", Toast.LENGTH_SHORT).show();\r\n\t}",
"public void saveButtonClicked(View view) {\n if (selectedType.equals(\"\")) {\n Log.e(Globals.TAG, \"tried to save the dish without type (possibly also without quantity) entered\");\n Toast.makeText(getApplicationContext(), \"must enter pasta type\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (enteredUnit.equals(\"\")) {\n Log.e(Globals.TAG, \"tried to save the dish without quantity entered\");\n Toast.makeText(getApplicationContext(), \"must enter pasta unit\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (enteredAmount<0) {\n Log.e(Globals.TAG, \"tried to save the dish without amount entered\");\n Toast.makeText(getApplicationContext(), \"must enter nonzero pasta amount\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n //pass data and return to MainActivity\n Intent intent = new Intent();\n intent.putExtra(\"selectedType\", selectedType);\n intent.putExtra(\"enteredAmount\", enteredAmount);\n intent.putExtra(\"enteredUnit\", enteredUnit);\n setResult(RESULT_OK, intent);\n\n finish();\n }",
"void onSaveButtonClicked(int hour, int min, String time);",
"private void save(){\n\n this.title = mAssessmentTitle.getText().toString();\n String assessmentDueDate = dueDate != null ? dueDate.toString():\"\";\n Intent intent = new Intent();\n if (update){\n assessment.setTitle(this.title);\n assessment.setDueDate(assessmentDueDate);\n assessment.setType(mAssessmentType);\n intent.putExtra(MOD_ASSESSMENT,assessment);\n } else {\n intent.putExtra(NEW_ASSESSMENT, new Assessment(course.getId(),this.title,mAssessmentType,assessmentDueDate));\n }\n setResult(RESULT_OK,intent);\n finish();\n }",
"void handleSaveClicked(ActionEvent event);",
"public void onSaveButtonClicked(MenuItem item){\n //gets the title from mTitle\n String title = mTitle.getText().toString();\n //gets description from mDescription\n String description = mDescription.getText().toString();\n //uses try and catch to parse the mHour and mMinute edit text into a long\n long hour ;\n try {\n //mHour to hour long\n hour = TimeUnit.HOURS.toMillis(Long.parseLong(mHour.getText().toString()));\n } catch (Exception e){\n hour = 0; //if cant parse, long hour = 0\n }\n long minute;\n try {\n //mMinute to long minute\n minute = TimeUnit.MINUTES.toMillis(Long.parseLong(mMinute.getText().toString()));\n } catch (Exception e){\n minute = 0; //if can't parse, long hour = 0\n }\n //finds total time length\n timeLengthInMillis = hour + minute;\n //gets the selected category\n Category category = mCategories.get(mCategorySpinner.getSelectedItemPosition());\n //Creates an event with values so far\n final Event event = new Event(title, description, null, null, category);\n //sets the start and end time of the calendar\n mScheduler.setStartCalendar(Calendar.getInstance());\n mScheduler.setEndCalendar(mDueDateCalendar); //the end time is the due date the user entered\n //creates a toast if scheduler fails\n final Toast toast = Toast.makeText(getApplicationContext(), \"No Available Time for Event!\", Toast.LENGTH_LONG);\n //uses AppExecutors to run database transactions on a separate thread\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n //gets events from the database\n List<Event> events = mDatabase.eventDao().getEventsFromToTimeList(\n Calendar.getInstance().getTimeInMillis(), mDueDateCalendar.getTimeInMillis());\n mScheduler.setEvents(events); //sets events to mScheduler\n Event eventWithTime = mScheduler.scheduleEvent(event, timeLengthInMillis);\n// //if an event couldn't be scheduled\n if(eventWithTime == null){\n toast.show();\n }\n //if a new event is being created\n else if (mEventId == DEFAULT_EVENT_ID) {\n // insert new event\n mDatabase.eventDao().insertEvent(eventWithTime);\n } else {\n //update event\n eventWithTime.setId(mEventId);\n mDatabase.eventDao().updateEvent(eventWithTime);\n }\n finish(); //closes activity\n }\n\n });\n }",
"@UiHandler(\"save\")\n\tvoid onSaveClicked(ClickEvent evt) {\n\t\tScheduler.get().scheduleDeferred(new ScheduledCommand() {\n\t\t\t@Override\n\t\t\tpublic void execute() {\n\t\t\t\tpresenter.save();\n\t\t\t}\n\t\t});\n\t}",
"public void saveClicked()\n {\n String name = nameText.getText().toString();\n if(name.length() == 0)\n {\n showMessage(\"Name cannot be empty!\");\n return;\n }\n // create a new record;\n Record r = new Record(name, timeUsed, shapeMissed);\n Intent intent = new Intent(this, RankScore.class);\n intent.putExtra(\"record\", r);\n startActivityForResult(intent, 1, null);\n }",
"private void saveData() {\n // Save data to ReminderData class\n reminderData.setMinutes(timePicker.getMinute());\n reminderData.setDataHours(timePicker.getHour());\n reminderData.setNotificationText(reminderText.getText().toString());\n reminderData.saveDataToSharedPreferences();\n }",
"@Override\n public void onClick(View v) {\n titleTask = txtTitle.getText().toString();\n descriptionTask = txtDescription.getText().toString();\n locationTask = txtLocation.getText().toString();\n\n\n //Also set the code to add the object to the server,\n //It should call getInfo() which will store all of the inputs into strings or ints\n\n\n //This checks to make sure the input is valid, if not will not allow the user to save to database\n if (dayPass == 0 || monthPass == 0 || yearPass == 0 || titleTask == null || descriptionTask == null || startMinute == 0 || startHour == 0)\n Toast.makeText(AddTask.this, \"Incorrect input, please try again\", Toast.LENGTH_SHORT).show();\n else {\n if(MainActivity.groupview)\n MainActivity.dh.writeTask(MainActivity.user.getUserID(), MainActivity.group.getGroupID(), new Task(dayPass, monthPass, yearPass, startHour, startMinute, categoryTask, titleTask, descriptionTask, locationTask, false, MainActivity.user));\n else\n MainActivity.dh.writeTask(MainActivity.user.getUserID(), \"\", new Task(dayPass, monthPass, yearPass, startHour, startMinute, categoryTask, titleTask, descriptionTask, locationTask, false, MainActivity.user));\n //MainActivity.dh.readBlock(MainActivity.user.getUserID(), \"\", \"04202019\");\n Toast.makeText(AddTask.this, \"Task saved to your calendar\", Toast.LENGTH_LONG).show();\n Intent intentHome = new Intent(AddTask.this,\n MainActivity.class);\n startActivity(intentHome);\n }\n\n }",
"public void onSaveClicked(View view) {\n if (isAllInputValid()) {\n saveValues();\n showToast(R.string.toast_changes_applied);\n finish();\n }\n else {\n new AlertDialog.Builder(this).\n setTitle(R.string.dialog_error_title).\n setMessage(R.string.dialog_error_msg).\n setPositiveButton(R.string.dialog_error_pos, (dialog, which) -> {}).\n create().show();\n }\n }",
"private void saveEvent(){\n String event_name = eventName.getText().toString();\r\n String coach = coach_string;\r\n String time = class_time_string;\r\n int nfcID= 4;\r\n\r\n Map<String, Object> data = new HashMap<>();\r\n\r\n data.put(\"event_name\", event_name);\r\n data.put(\"coach\", coach);\r\n data.put(\"class_time\", time);\r\n data.put(\"nfcID\", nfcID);\r\n\r\n Database.writeClassDb(data, time ,date);\r\n startActivity(new Intent(addCalenderEvent.this, CalendarActivity.class));\r\n finish();\r\n }",
"@Override\n public void handleSaveAppointment() {\n if (wrapperDataMakeAppoint.isUpdateProfile()) {\n wrapperDataMakeAppoint.setAddNewCar(false);\n }\n String encode = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create().toJson(wrapperDataMakeAppoint);\n RESTManager.getInstance().makeAppointment(encode, new IRequestListener<PostAppointmentResponse>() {\n @Override\n public void onCompleted(PostAppointmentResponse data) {\n super.onCompleted(data);\n if (data != null && data.isSuccess()) {\n EventBusUtils.postEvent(data);\n getView().showSuccessMakeAppointment();\n if (wrapperDataMakeAppoint.isUpdateProfile()) {\n LocalDataManager.getInstance(getContext()).updateProfile(wrapperDataMakeAppoint.getCustomerName(), wrapperDataMakeAppoint.getCustomerEmail());\n }\n if (wrapperDataMakeAppoint.isAddNewCar()) {\n LocalDataManager.getInstance(getContext()).updateCar(wrapperDataMakeAppoint.getCarId(), wrapperDataMakeAppoint.getCarName(), wrapperDataMakeAppoint.getLicensePlates());\n }\n }\n }\n });\n }",
"public void onSaveClick() {\n Log.d(\"database\", \"onSaveClick invoked.\");\n Prediction p = new Prediction(0, resultStringToSave, byteArrayToSave);\n Log.d(\"database\", \"Prediction before adding to db... id: ? prediction string: \" + resultStringToSave + \" bytearr: \" + byteArrayToSave);\n PredictionDatabase.insert(p);\n // save to db\n }",
"private void saveToDb() {\r\n ContentValues values = new ContentValues();\r\n values.put(DbAdapter.KEY_DATE, mTime);\r\n if (mPayeeText != null && mPayeeText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_PAYEE, mPayeeText.getText().toString());\r\n if (mAmountText != null && mAmountText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_AMOUNT, mAmountText.getText().toString());\r\n if (mCategoryText != null && mCategoryText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_CATEGORY, mCategoryText.getText().toString());\r\n if (mMemoText != null && mMemoText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_MEMO, mMemoText.getText().toString());\r\n if (mTagText != null && mTagText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_TAG, mTagText.getText().toString());\r\n\r\n \tif (Utils.validate(values)) {\r\n \t\tmDbHelper.open();\r\n \t\tif (mRowId == null) {\r\n \t\t\tlong id = mDbHelper.create(values);\r\n \t\t\tif (id > 0) {\r\n \t\t\t\tmRowId = id;\r\n \t\t\t}\r\n \t\t} else {\r\n \t\t\tmDbHelper.update(mRowId, values);\r\n \t\t}\r\n \t\tmDbHelper.close();\r\n \t}\r\n\t}",
"@Override\n public void onClick(View v) {\n title = titleET.getText().toString();\n timePeriod = startTimeET.getText().toString();\n timePeriod += \" to \" + endTimeET.getText().toString();\n description = descriptionET.getText().toString();\n\n //validate fields before insert to db\n if (taskValidate.validateFieldsEmpty(title,\n priorityET.getText().toString(),\n startTimeET.getText().toString(),\n description)) {\n\n //to prevent number format exception if value not typed in edit text\n priorityNo = Integer.parseInt(priorityET.getText().toString());\n\n if(taskValidate.validatePriorityNo(priorityNo)) {\n //insert to database\n if (insertTask() == true) {\n Toast.makeText(getApplicationContext(), \"Task Inserted!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"Insert failed!\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n }",
"private void saveDiary() {\n\n //Get the text from the EditTexts and turn them to strings, set them as the user inputs\n //Trim to eliminate useless whitespace\n String userTitle = titleEdit.getText().toString().trim();\n String userContext = contextEdit.getText().toString().trim();\n\n //Get current date and turn it to a string\n String currentDate = new SimpleDateFormat(\"dd-MM-yyyy\").format(new Date());\n\n //Write into the db\n SQLiteDatabase dbWrite = myDBhelper.getWritableDatabase();\n\n //ContentValues where key is the column name and value is the text\n ContentValues values = new ContentValues();\n values.put(diaryEntry.COLUMN_TITLE, userTitle);\n values.put(diaryEntry.COLUMN_CONTENT, userContext);\n values.put(diaryEntry.COLUMN_DATE, currentDate);\n\n\n //Insert a new row. Takes the table name, columnhack that is usually null and the values created\n long newRow = dbWrite.insert(diaryEntry.TABLE_NAME, null, values);\n\n\n //Toast- that will come after, depending if the insert was succesfull or not.\n // -1 is the value of the newRow if there was an error\n if (newRow == -1) {\n Toast.makeText(this, \"There was an error\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(this, \"Diary entry added!\", Toast.LENGTH_SHORT).show();\n }\n }",
"private void onClickButtonSaveAndCreateAnother() {\n if (onClickButtonSave()) {\n startActivity(getIntent());\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate void saveAndExit() throws IrregularFormatException{\n\t\tJSONObject event;\n\t\ttry{\n\t\t\tevent = new JSONObject();\n\t\t\tevent.put(Event.NAME_STRING, (String)nameText.getText());\n\t\t\tevent.put(Event.DATE_STRING, mDate);\n\t\t\tif(allDay.isSelected())\n\t\t\t{\n\t\t\t\tevent.put(Event.START_STRING, \"-1\");\n\t\t\t\tevent.put(Event.STOP_STRING, \"-1\");\n\t\t\t}else{\n\t\t\t\tevent.put(Event.START_STRING, startTime.getSelectedItem().toString());\n\t\t\t\tevent.put(Event.STOP_STRING, endTime.getSelectedItem().toString());\n\t\t\t}\n\t\t\tevent.put(Event.DESC_STRING, (String)descriptionText.getText());\n\t\t\t\n\t\t\tRandom r = new Random(System.currentTimeMillis());\n\t\t\tlong id = r.nextLong();\n\t\t\tevent.put(Event.ID_STRING, id );\n\t\t}catch(Exception e){\n\t\t\tthrow new IrregularFormatException();\n\t\t}\n\n\t\tEventCache.getInstance().addEvent(event);\n\t\tJOptionPane.showMessageDialog(this, \"Event Saved!\",\"Event Planner\",JOptionPane.INFORMATION_MESSAGE);\n\t\tthis.dispose();\n\t\tLock.getLock().release();\n\t\tCalendarApp.app.updateCurrentView();\n\t}",
"@FXML\n private void handleSaveButton(MouseEvent event) throws IOException {\n\n Date date = new Date(LocalDate.now(), false, absenceText.getText());\n appModel.toBeAttending(activeStudent.getId(), date);\n activeStudent.setDays(appModel.getStudentDays(activeStudent.getId()));\n dates.clear();\n dates.addAll(activeStudent.getDays());\n\n updateThread.start();\n\n Stage stage = (Stage) saveButton.getScene().getWindow();\n stage.close();\n }",
"public void saveButtonPushed(ActionEvent event)\r\n {\r\n try{\r\n user.logHours(datePicker.getValue(), (int) hoursWorkedSpinner.getValue());\r\n errMsgLabel .setText(\"Sales Logged\");\r\n updateLineChart();\r\n }\r\n catch(SQLException e)\r\n {\r\n System.err.println(e.getMessage());\r\n }\r\n catch(IllegalArgumentException e)\r\n {\r\n errMsgLabel.setText(e.getMessage());\r\n }\r\n }",
"private void SaveAppoint(View view)\n {\n String userIdStr = getSharedPreferences(\"prefs\",0).getString(\"Id_User\", \"\");\n if(userIdStr.equals(\"\"))\n {\n Intent i = new Intent(this, LoginActivity.class);\n startActivity(i);\n finish();\n return;\n }\n\n dbAdapter = new DbAdapter(this);\n\n //covert unix-datetime (in seconds) to string\n Date appointTime = new Date(dateTimeUnix * 1000L);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEE, d MMM yyyy hh:mm aaa\");\n AppointmentTime = sdf.format(appointTime);\n\n //bind model\n bModel = new Booking();\n userIdStr = getSharedPreferences(\"prefs\", 0).getString(\"Id_User\", \"1\");\n int userIdInt = Integer.parseInt(userIdStr);\n bModel.setId_User(userIdStr);\n bModel.setAppointmentTime(this.AppointmentTime);\n bModel.setClinic(txtV.getText().toString());\n bModel.setCreationTime(sdf.format( Calendar.getInstance().getTime() ));\n if(spinDrList.getSelectedItemPosition() == 0)\n {\n Snackbar.make(view, \"Select a doctor\", Snackbar.LENGTH_LONG).show();\n return;\n }\n bModel.setDoctor(VariablesGlobal.DrProfiles.get(spinDrList.getSelectedItemPosition() -1).name);\n bModel.setDRAVAILABLE(\"1\");\n bModel.setId_Doc((VariablesGlobal.DrProfiles.get(spinDrList.getSelectedItemPosition() - 1)).id_doc);\n\n //make json from model\n formData = gson.toJson(bModel);\n\n //chk if u r coming from List of appoints or from Map\n if (app == null) //i.e. Coming from Map, hence a non-existing booking, so create a new one\n {\n\n paramsApiUri[0] = VariablesGlobal.API_URI + \"/api/values/newAppointment\";\n paramsApiUri[1] = formData;\n paramsApiUri[2] = \"POST\";\n }\n else\n {\n int appointId = getSharedPreferences(\"prefs\", 0).getInt(\"Id_Appointment\", 0);\n paramsApiUri[0] = VariablesGlobal.API_URI + \"/api/values/UpdateAppoint/\" + appointId;\n paramsApiUri[1] = formData;\n paramsApiUri[2] = \"POST\";\n }\n\n //pass args to AsyncTask to read db\n dbAdapter.execute(paramsApiUri);\n if(Bookings_AllActivity.instance != null)\n {\n Bookings_AllActivity.instance.finish();\n }\n }",
"public void saveData(){\n\n if(addFieldstoLift()) {\n Intent intent = new Intent(SetsPage.this, LiftsPage.class);\n intent.putExtra(\"lift\", lift);\n setResult(Activity.RESULT_OK, intent);\n finish();\n }else{\n AlertDialog.Builder builder = new AlertDialog.Builder(SetsPage.this);\n builder.setCancelable(true);\n builder.setTitle(\"Invalid Entry\");\n builder.setMessage(\"Entry is invalid. If you continue your changes will not be saved\");\n builder.setPositiveButton(\"Continue\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n }",
"@Override\n public void onClick(View v) {\n TextView txtDate = (TextView)findViewById(R.id.tvDate);\n TextView txtTime = (TextView)findViewById(R.id.tvTime);\n // Log.v(\"Vidushi:update\", userId);\n helper.insertVolunteerDuty(userId,txtDate.getText().toString(),txtTime.getText().toString());\n Toast.makeText(getApplicationContext(),\"Information Saved\", Toast.LENGTH_SHORT).show();\n\n\n }",
"@Override\n public void onClick(View view) {\n Log.d(\"CALL_TEST\", \"SAVE!\");\n DbManager db = DbManager.getInstance(getApplicationContext());\n\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"NAME\", \"홍길동\");\n contentValues.put(\"PHONE\", \"1234\");\n\n db.insert(contentValues);\n }",
"private void saveNote() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"E,MMM d, hh:mm a\");\n String lastSavedDate = sdf.format(new Date());\n String id;\n boolean isNew = true;\n if (oldNote != null && oldNote.getId() != null && !oldNote.getId().isEmpty()) {\n id = oldNote.getId();\n isNew = false;\n } else\n id = UUID.randomUUID().toString();\n Note note = new Note(id, etTitle.getText().toString().trim(), lastSavedDate, etNote.getText().toString().trim());\n note.setNew(isNew);\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"NEW_NOTE\", note);\n setResult(Activity.RESULT_OK, returnIntent);\n finish();\n }",
"private void onSaveNote() {\n String text= inputNote.getText().toString();\n if(!text.isEmpty()){\n long date=new Date().getTime(); // get current time\n // Note note= new Note(text,date); because temp now has Note object\n\n // if note exits update else create new\n temp.setNoteText(text);\n temp.setNoteDate(date);\n\n if(temp.getId()==-1)\n dao.insertNote(temp); // insert and save note to database\n else{\n dao.updateNote(temp);\n }\n finish(); // return to the MainActivity\n }\n\n }",
"public void saveClicked(View actionView)\n {\n \t//If ID is empty it is a new Task\n \tif( taskId.getText().length() > 0 )\n \t{\n \t\tupdateTask();\n \t}\n \t//If ID exists it is updating an existing task\n \telse\n \t{\n \t\tnewTask();\n \t}\n }",
"public void save() {\n if (AppUtil.isEmpty(txtName.getText().toString())) {\n AppUtil.alertMessage(mainActivity,\"Please enter valid recipe name.\");\n txtName.requestFocus();\n } else if (AppUtil.isEmpty(txtDesc.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter recipe description.\");\n txtDesc.requestFocus();\n } else if (AppUtil.isEmpty(txtIng.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter ingredient/s.\");\n txtIng.requestFocus();\n } else if (AppUtil.isEmpty(txtSteps.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter preparation steps.\");\n txtSteps.requestFocus();\n } else {\n try {\n if (MainActivity.checkNetwork(mainActivity)) {\n SaveAsyncTask task = new SaveAsyncTask();\n task.execute();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString date = AppDateField.getText();\n\t\tString Time = AppTimeField.getText();\t\n\t\tString Name = AppPatNameField.getText();\n\t\tString Surname = AppPatSurnameField.getText();\n\t\tint Id = Integer.parseInt(AppPatIdField.getText());\n\t\tString Doctor = AppDocNameField.getText();\n\t\tString Service = (String) SelectTask.getSelectedItem();\n\t\t\n\t\tDBH db = new DBH();\n\t\t\n\t\tString sql = \"INSERT INTO `Narnia_Hospital`.`Appointments` (`Appointment_Date`, `Appointment_Time`, `AppPat_Name`, `AppPat_Surname`, `AppPatId`, `AppDoctor`, `AppService`) VALUES ('\"+date+\"','\"+Time+\"','\"+Name+\"','\"+Surname+\"','\"+Id+\"','\"+Doctor+\"','\"+Service+\"')\"; \n\t\t\n\t\t\n\t\tResultSet rs = null;\n\t\t\n\t\ttry{\n\t\t rs = db.executeCall(sql);\n \t\t\n\t\t while(rs.next()){\n\t\t\t \n\t\t\t Appointment A1 = new Appointment();\n\t\t\t \n\t\t\t A1.setAppDate (date);\n\t\t\t A1.setAppTime(Time);\n\t\t\t A1.setPatientName(Name);\n\t\t\t A1.setPatientSurname(Surname);\n\t\t\t A1.setPatId(Id);\n\t\t\t A1.setDoctorName(Doctor);\n\t\t\t A1.setServiceRequired(Service);\n\t\t\t \n\t\t\t \n\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}catch (Exception ex){}\n\t\t\n\t\t//Offers the option to create a new one or leave this screen.\n\t\t\n\t\tJOptionPane.showMessageDialog(this, \"Appointment Registered!\");\n\t\t\n\t\t int n = JOptionPane.showConfirmDialog(this,\"Do you want to add another appointment?\", \"Message Selected\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t if (n == 0){ \n\t\t\t this.setVisible(false);\n\t\t\t new NewAppointment();\n\t\t\t\n\t\t} else if (n == 1){\n\t\t\t this.setVisible(false);\n\t\t\t new SecretaryScreen();\n\t\t}\n\t\t\n\t}",
"private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }",
"private void saveInstrument() {\n String instrument = mInstrument.getText().toString().trim();\n String brand = mBrand.getText().toString().trim();\n String serial = mSerial.getText().toString().trim();\n int quantity = mQuantity.getValue();\n String priceString = mPrice.getText().toString().trim();\n if(TextUtils.isEmpty(instrument) && TextUtils.isEmpty(brand) && TextUtils.isEmpty(serial) &&\n TextUtils.isEmpty(priceString) && quantity == 0){\n return;\n }\n float price = 0;\n if(!TextUtils.isEmpty(priceString)){\n price = Float.parseFloat(priceString);\n }\n //Retrieve selected supplier from Spinner\n String suppName = mSpinner.getSelectedItem().toString();\n //A query request to get the id of the selected supplier\n String [] projection = {SupplierEntry._ID, SupplierEntry.COLUMN_NAME};\n String selection = SupplierEntry.COLUMN_NAME + \"=?\";\n String [] selectionArgs = {suppName};\n Cursor cursor = getContentResolver().query(SupplierEntry.CONTENT_SUPPLIER_URI, projection, selection, selectionArgs, null);\n int idSupplier = 0;\n try {\n int idColumnIndex = cursor.getColumnIndex(SupplierEntry._ID);\n //move the cursor to the 0th position, before you start extracting out column values from it\n if (cursor.moveToFirst()) {\n idSupplier = cursor.getInt(idColumnIndex);\n }\n }finally {\n cursor.close();\n }\n ContentValues values = new ContentValues();\n values.put(InstrumentEntry.COLUMN_NAME, instrument);\n values.put(InstrumentEntry.COLUMN_BRAND, brand);\n values.put(InstrumentEntry.COLUMN_SERIAL, serial);\n values.put(InstrumentEntry.COLUMN_PRICE, price);\n values.put(InstrumentEntry.COLUMN_NB, quantity);\n values.put(InstrumentEntry.COLUMN_SUPPLIER_ID, idSupplier);\n Uri uri = getContentResolver().insert(InstrumentEntry.CONTENT_INSTRUMENT_URI, values);\n if(uri != null){\n Toast.makeText(this, \"Instrument successfully inserted\", Toast.LENGTH_SHORT);\n }else\n Toast.makeText(this, \"Instrument insertion failed\", Toast.LENGTH_SHORT);\n }",
"public void submitInfoButton(View v) {\n //each entry needs a unique ID\n Business newBusiness = new Business();\n String newKey = appState.firebaseReference.push().getKey();\n newBusiness.setName(nameField.getText().toString());\n newBusiness.setPrimaryBusiness(primaryBusinessField.getText().toString());\n newBusiness.setBusinessNumber(numberField.getText().toString());\n newBusiness.setAddress(addressField.getText().toString());\n newBusiness.setProvince(provinceField.getSelectedItem().toString());\n\n appState.firebaseReference.child(newKey).setValue(newBusiness,\n new DatabaseReference.CompletionListener(){\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference){\n if(databaseError != null){\n Toast toast = Toast.makeText(appState, \"Error: Creation failed!\",\n Toast.LENGTH_LONG);\n toast.show();\n } else {\n finish();\n Toast toast = Toast.makeText(appState, \"Business entry created\",\n Toast.LENGTH_LONG);\n toast.show();\n }\n }\n });\n }",
"@Override\n public void onClick(View v) {\n switch(v.getId()){\n case R.id.buttonSaveFence:\n String name = nameFence.getText().toString();\n String address = addressFence.getText().toString();\n String city = cityFence.getText().toString();\n String province = provinceFence.getText().toString();\n String range = spinnerRange.getSelectedItem().toString();\n String number = numberFence.getText().toString();\n String textSMS = textSMSFence.getText().toString();\n int event = spinnerEvent.getSelectedItemPosition();\n\n this.saveChangesInSQLiteDB(name, address, city, province, range, number, textSMS, event);\n Controller.getLogFenceOnSQLiteDB();\n break;\n }\n }",
"private void saveTask(){\n \tZadatakApp app = (ZadatakApp)getApplicationContext();\n \t\n \tTask task = new Task();\n \ttask.set(Task.Attributes.Name, nameText);\n \ttask.set(Task.Attributes.Duedate, datePicker);\n \ttask.set(Task.Attributes.Hours, lengthText);\n \ttask.set(Task.Attributes.Progress, progressBar);\n \ttask.set(Task.Attributes.Priority, priorityBox);\n \t\n \t// Save it to the database either as a new task or over an old task\n \tif (editmode) { app.dbman.editTask(id, task); }\n \telse { app.dbman.insertTask(task); }\n \t\n \t// A task has been added or changed, rescedule\n \tapp.schedule();\n \t\n \tapp.toaster(\"NEW / EDITED TASK\");\n \t\n \t// Quit the activity\n \tfinish();\n }",
"public void saveAlarms(String Epillname, Date date) {\n Gson gson = new Gson();\n String record = gson.toJson(date, Date.class);\n SharedPreferences sp = mContext.getSharedPreferences(\"alarmInfo\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n editor.putString(Epillname, record);\n editor.commit();\n }",
"public void createAppointment(View v) {\n checkFields();\n\n // grab the info in the fields and turn it into usable stuff\n int mon = parseInt(month.getText().toString());\n int d = Integer.parseInt(day.getText().toString());\n int y = Integer.parseInt(year.getText().toString());\n int h = Integer.parseInt(hour.getText().toString());\n int min = Integer.parseInt(minute.getText().toString());\n String AorP = AMorPM.getText().toString();\n String p = place.getText().toString();\n\n\n // all of the fields have been checked now. Create a new appointment\n //Appointment apt = new Appointment(d, mon, y, h, min, AorP, p);\n Appointment apt = new Appointment();\n apt.setDay(d);\n apt.setMonth(mon);\n apt.setYear(y);\n apt.setHour(h);\n apt.setMinute(min);\n apt.setAmOrPm(AorP);\n apt.setPlace(p);\n apt.setConfirmed(false);\n apt.setTaken(false);\n\n // push it onto the database\n DatabaseReference aptsRef = ref.child(\"appointmentList\");\n aptsRef.push().setValue(apt);\n\n // send out a toast signalling that we've successfully created an appointment\n Toast.makeText(getApplicationContext(), \"Appointment successfully created\", Toast.LENGTH_SHORT).show();\n\n // now send the user back to the main activity -> with their membership number\n Intent intent = new Intent(this, MainActivity.class);\n intent.putExtra(MESSAGE, memberNumber);\n startActivity(intent);\n }",
"private void save() {\n Toast.makeText(ContactActivity.this, getString(R.string.save_contact_toast), Toast.LENGTH_SHORT).show();\n\n String nameString = name.getText().toString();\n String titleString = title.getText().toString();\n String emailString = email.getText().toString();\n String phoneString = phone.getText().toString();\n String twitterString = twitter.getText().toString();\n \n if (c != null) {\n datasource.editContact(c, nameString, titleString, emailString, phoneString, twitterString);\n }\n else {\n \tc = datasource.createContact(nameString, titleString, emailString, phoneString, twitterString);\n }\n }",
"private void save(ActionEvent e){\r\n // Make sure all required fields are filled out before saving\r\n if (formIsValid()){\r\n // Check if client currently exists. If so, modify. Otherwise create new entry.\r\n if (existingClient){\r\n // Modify the existing currentClient holder -- Change the variable to global currentClient cache holder\r\n currClient.setName(NAME_FIELD.getText());\r\n currClient.setAddress1(ADDRESS_1_FIELD.getText());\r\n currClient.setAddress2(ADDRESS_2_FIELD.getText());\r\n currClient.setCity(CITY_FIELD.getText());\r\n currClient.setZip(ZIP_FIELD.getText());\r\n currClient.setCountry(COUNTRY_FIELD.getText());\r\n currClient.setPhone(PHONE_FIELD.getText());\r\n // Update client in database\r\n Client.modifyClient(currClient, currClient.getClientID());\r\n }\r\n // Create new client entry\r\n else { \r\n Client c = new Client (NAME_FIELD.getText(),ADDRESS_1_FIELD.getText(),\r\n ADDRESS_2_FIELD.getText(),CITY_FIELD.getText(),\r\n ZIP_FIELD.getText(),COUNTRY_FIELD.getText(),PHONE_FIELD.getText());\r\n Client.addNewClient(c);\r\n }\r\n\r\n existingClient = false; // reset existing client flag\r\n clearFields(); // remove data from fields\r\n // Return to Appt Mgmt Screen if we came from there\r\n if (fromAppt){\r\n goToManageApptScreen();\r\n }\r\n }\r\n // If forms are not complete throw an alert\r\n else {\r\n AlertBox.display(\"Invalid Submission\", \"Form is missing required information or has invalid input.\"\r\n + \" The following information is required:\\n\"\r\n + \"Name\\nAddress 1\\nCity, State, Country, Zipcode\\nPhoneNumber\"\r\n + \"\\nPlease complete form with valid input and submit again.\");\r\n }\r\n }",
"private void saveData() {\n\t\tthis.dh = new DataHelper(this);\n\t\tthis.dh.updateData(String.valueOf(mData.getText()), i.getId());\n\t\tthis.dh.close();\n\t\tToast\n\t\t\t\t.makeText(ctx, \"Changes saved successfully...\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\tIntent myIntent = new Intent(EditActivity.this, StartActivity.class);\n\t\tEditActivity.this.startActivity(myIntent);\n\t\tfinish();\n\t}",
"public void saveDay() {\n day.setServices(serviciosTotales);\n day.setTasks(tasksTotales);\n\n databaseReference.child(day.getDate() + \"_\" + day.getUserId()).setValue(day);\n Toast.makeText(context, \"Creando archivo para enviar por correo.\", Toast.LENGTH_LONG).show();\n //todo, so far it will keep updating the day\naskPermissions();\n createExcel();\n\n }",
"public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\n }",
"public void onClickSaveTimer(View view){\r\n\t\t\r\n\t\t//Minute value\r\n\t\tEditText timerTextView1 = (EditText) findViewById(R.id.timerEntry);\r\n\t\t//Second Value\r\n\t\tEditText timerTextView2 = (EditText) findViewById(R.id.timerEntry2);\r\n\t\t\r\n\t\tif (timerTextView1.getText().toString() == \"\")\r\n\t\t{\r\n\t\t\ttimerTextView1.setText(\"0\");\r\n\t\t}\r\n\t\tif (timerTextView2.getText().toString() == \"\")\r\n\t\t{\r\n\t\t\ttimerTextView2.setText(\"0\");\r\n\t\t}\r\n\t\t\r\n\t\t//Parse the two string values to ints.\r\n\t\tint localTimerMin = Integer.parseInt(timerTextView1.getText().toString());\r\n\t\tint localTimerSec = Integer.parseInt(timerTextView2.getText().toString());\r\n\r\n\t\tint theTime = (localTimerMin * 60) + localTimerSec;\r\n\t\t\r\n\t\tthis.setTotalTimer(theTime);\r\n\t\t\r\n\t\t//Return to user activity screen.\r\n\t\tIntent returnUserIntent = new Intent( this, FlashBuddyStudyDecksActivity.class );\r\n\t\t\r\n\t\tIntent carryUsername = getIntent();\r\n\t\tString username = carryUsername.getStringExtra(FlashBuddy.USERNAME_MESSAGE);\r\n\t\treturnUserIntent.putExtra( FlashBuddy.USERNAME_MESSAGE, username );\r\n\t\t\r\n \tstartActivity(returnUserIntent);\r\n\t\t\r\n\t}",
"private static void saveAlarm(\n Context context, int id, boolean enabled, int hour, int minute,\n Alarm.DaysOfWeek daysOfWeek, boolean vibrate, String label,\n String alert, boolean popToast) {\n if (Log.LOGV) Log.v(\"** saveAlarm \" + id + \" \" + label + \" \" + enabled\n + \" \" + hour + \" \" + minute + \" vibe \" + vibrate);\n\n // Fix alert string first\n long time = Alarms.setAlarm(context, id, enabled, hour, minute, daysOfWeek, vibrate, label, alert);\n \n }",
"public void saveAction() {\n\t\tresult.setValue(convertPairsToText());\n\t\tcloseDialog();\n\t}",
"public void saveOnClick(View view) {\n final EditText nameET = (EditText) findViewById(R.id.name_et);\n final EditText titleET = (EditText) findViewById(R.id.title_et);\n final EditText emailET = (EditText) findViewById(R.id.email_et);\n final EditText addressET = (EditText) findViewById(R.id.address_et);\n user.setName(nameET.getText().toString());\n user.setTitle(titleET.getText().toString());\n user.setEmailAddress(emailET.getText().toString());\n user.setHomeAddress(addressET.getText().toString());\n\n RegistrationData.editUserData(db, user);\n finish();\n }",
"private void saveAT() \n {\n // get DatabaseConnector to interact with the SQLite database\n\t AnimalDatabase db = new AnimalDatabase(this);\n\t AnimalList al = new AnimalList (db);\n\t \n // insert the contact information into the database\n al.Update(id, amount, comments);\n\n }",
"@Override\n public void onClick(View view) {\n boolean isInserted = app_db.insertHabit(\n app_utils.getCurrentDateInteger(),\n app_utils.getCurrentTimestampForSQLite(),\n \"espresso\"\n );\n if (isInserted)\n Toast.makeText(MainActivity.this, \"Espresso Inserted\", Toast.LENGTH_LONG).show();\n else\n Toast.makeText(MainActivity.this, \"Espresso Not Inserted\", Toast.LENGTH_LONG).show();\n }",
"private void saveEmployee() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String nameString = mNameEditText.getText().toString().trim();\n String addressString = mAddressEditText.getText().toString().trim();\n String numberString = mNumberEditText.getText().toString().trim();\n String birthDateString = mBirthTextView.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 &&\n TextUtils.isEmpty(nameString) &&\n mImagePath.isEmpty()) {\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 employee attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_NAME, nameString);\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_ADDRESS, addressString);\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_BIRTH_DAY, birthDateString);\n\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_PHOTOS, mImagePath);\n\n // If the number is not provided by the user, don't try to parse the string into an\n // integer value. Use 0 by default.\n int number = 0;\n if (!TextUtils.isEmpty(numberString)) {\n number = Integer.parseInt(numberString);\n }\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_NUMBER, number);\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 employee, so insert a new employee into the provider,\n // returning the content URI for the new pet.\n Uri newUri = getContentResolver().insert(EmployeeEntry.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_employee_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_employee_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_employee_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_employee_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n }",
"public rx.Observable<Alarm> save() {\n\n int min = 0;\n int hour = 0;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {\n hour = binding.viewAlarm.timePicker.getHour();\n min = binding.viewAlarm.timePicker.getMinute();\n\n } else {\n hour = binding.viewAlarm.timePicker.getCurrentHour();\n min = binding.viewAlarm.timePicker.getCurrentMinute();\n\n }\n Log.d(AlarmVM.class.getSimpleName(), \"hours \" + hour + \"minu\" + min);\n alarmVM.updateName(binding.etName.getText().toString());\n alarmVM.updateTimeSelected(hour, min);\n alarmVM.updateRepeated(binding.viewAlarm.swRepeat.isChecked());\n AnalyticsManager.logCreateAlarm(alarm, true);\n alarmVM.updateStatus(alarmVM.isActivated());\n return alarmVM.save();\n }",
"private void saveData() {\r\n\t\tif(mFirstname.getText().toString().trim().length() > 0 &&\r\n\t\t\t\tmLastname.getText().toString().trim().length() > 0 &&\r\n\t\t\t\tmEmail.getText().toString().trim().length() > 0) {\r\n\t\t\tmPrefs.setFirstname(mFirstname.getText().toString().trim());\r\n\t\t\tmPrefs.setLastname(mLastname.getText().toString().trim());\r\n\t\t\tmPrefs.setEmail(mEmail.getText().toString().trim());\r\n\t\t\tif(mMaleBtn.isChecked())\r\n\t\t\t\tmPrefs.setGender(0);\r\n\t\t\telse if(mFemaleBtn.isChecked())\r\n\t\t\t\tmPrefs.setGender(1);\r\n\t\t\tif(!mCalendarSelected.after(mCalendarCurrent)) \r\n\t\t\t\tmPrefs.setDateOfBirth(mCalendarSelected.get(Calendar.YEAR), \r\n\t\t\t\t\t\tmCalendarSelected.get(Calendar.MONTH), \r\n\t\t\t\t\t\tmCalendarSelected.get(Calendar.DAY_OF_MONTH));\r\n\t\t\tToast.makeText(getActivity(), R.string.msg_changes_saved, Toast.LENGTH_LONG).show();\r\n\t\t} else \r\n\t\t\tToast.makeText(getActivity(), R.string.msg_registration_empty_field, Toast.LENGTH_LONG).show();\r\n\t}",
"public void saveButtonPressed(ActionEvent actionEvent) throws IOException{\n validateInputs(actionEvent);\n\n if (isInputValid) {\n //creates a new Product object with identifier currentProduct\n currentProduct = new Product(productNameInput, productInventoryLevel, productPriceInput, maxInventoryLevelInput, minInventoryLevelInput);\n\n //passes currentProduct as the argument for the .addMethod.\n Inventory.getAllProducts().add(currentProduct);\n\n //utilizes the associatedPartsTableviewHolder wiht a for loop to pass each element as an argument\n //for the .addAssociatedPart method.\n for (Part part : associatedPartTableViewHolder) {\n currentProduct.addAssociatedPart(part);\n }\n\n //calls the returnToMainMen() method.\n mainMenuWindow.returnToMainMenu(actionEvent);\n }\n else {\n isInputValid = true;\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch (id){\n case R.id.action_save:\n ahour = timer.getCurrentHour();\n amin = timer.getCurrentMinute();\n if ( ahour < 10) {\n shour = \"0\" + String.valueOf(ahour);\n } else {\n shour = String.valueOf(ahour);\n }\n if (amin < 10) {\n smin = \"0\" + String.valueOf(amin);\n } else {\n smin = String.valueOf(amin);\n }\n stime = shour + \":\" + smin;\n am = new MyAlarmManager(getApplicationContext());\n\n if (shour == null || smin ==null) {\n Toast.makeText(\n this,\n \"Please enter timer\",\n Toast.LENGTH_LONG\n ).show();\n } else {\n ContentValues values = new ContentValues();\n values.put(MyContract.Alarms.COLUMN_TIME, stime);\n\n\n // updated\n\n Uri uri = ContentUris.withAppendedId(MyContentprovider.CONTENT_URI, timeId);\n String selection = MyContract.Alarms.COLUMN_ID + \" = ?\";\n String[] selectionArgs = new String[] { Long.toString(timeId) };\n getContentResolver().update(\n uri,\n values,\n selection,\n selectionArgs\n );\n\n\n Intent intent = new Intent(EditActivity.this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n am.setAlarm();\n startActivity(intent);\n finish();\n }\n\n break;\n case R.id.action_delete:\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);\n alertDialog.setTitle(\"アラーム削除\");\n alertDialog.setMessage(\"このアラームを削除してもいいですか?\");\n\n alertDialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n am = new MyAlarmManager(getApplicationContext());\n Uri uri = ContentUris.withAppendedId(MyContentprovider.CONTENT_URI, timeId);\n String selection = MyContract.Alarms.COLUMN_ID + \" = ?\";\n String[] selectionArgs = new String[] { Long.toString(timeId) };\n getContentResolver().delete(\n uri,\n selection,\n selectionArgs\n );\n\n Intent intent = new Intent(EditActivity.this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n am.setAlarm();\n startActivity(intent);\n finish();\n }\n }).show();\n\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"public void buttonSave(View view) {\n\n Map<String, String> params = new HashMap();\n params.put(\"name\", editTextName.getText().toString());\n params.put(\"email\", editTextEmail.getText().toString());\n\n JSONObject jsonParams = new JSONObject(params);\n String stringParams = jsonParams.toString();\n\n new BackgroundEditTask(stringParams).execute();\n }",
"@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tsaveFields();\r\n\t\t\t\t}",
"public void goToSave(TextView text){\n\n if (Validation.validateStartDate(dateTextView, getContext())) {\n\n // Url\n String url = ServiceUrls.KEY_HEALTHBOOK_ALLERGIES.concat(StringConstants.KEY_CREATE);\n\n // Shut off keypad\n InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(text.getWindowToken(), 0);\n\n // Set data\n final HashMap<String, Object> postData = new HashMap<>();\n postData.put(StringConstants.KEY_PATIENT_ID, SharedPreferenceService.getValue(getActivity(), StringConstants.KEY_PATIENT_ID));\n postData.put(StringConstants.KEY_ALLERGY_ID, mAllergyId);\n postData.put(StringConstants.KEY_ALLERGY_NAME, problemNameTextView.getText().toString());\n postData.put(StringConstants.KEY_SEARCH_LIST_HYPERLINK, problemHyperlinkTextView.getText().toString());\n postData.put(StringConstants.KEY_ALLERGY_TYPE, mAllergyTypeName);\n postData.put(StringConstants.KEY_ALLERGY_KIND_OF_REACTION, kindOfReactionSpinner.getSelectedItem().toString());\n postData.put(StringConstants.KEY_START_DATE,\n DateTimeUtils.convertTimestampToUTC(DateTimeUtils.convertDateSimpleToTimestamp(dateTextView.getText().toString())));\n postData.put(StringConstants.KEY_ALLERGY_COMMENTS, commentsTextView.getText().toString());\n\n // Set Headers\n final HashMap<String, String> headers = new HashMap<>();\n headers.put(StaticConstants.KEY_AUTHORIZATION,\n StaticConstants.KEY_BEARER\n .concat(\" \")\n .concat(SharedPreferenceService.getValue(getActivity(), StringConstants.KEY_TOKEN)));\n\n if (Validation.isConnected(getActivity())) {\n\n /**\n * API Call\n */\n APICallService.PostAPICall(getActivity(), getActivity(), url, postData, headers, new APIInterface() {\n\n @Override\n public void onSuccess(JSONObject response) {\n try {\n\n // Create in Local Database\n Allergy mAllergyModel = new Allergy(SharedPreferenceService.getValue(getActivity(), StringConstants.KEY_PATIENT_ID),\n response.getString(StringConstants.KEY_P_ID),\n mAllergyId,\n problemNameTextView.getText().toString(),\n problemHyperlinkTextView.getText().toString(),\n mAllergyTypeName,\n kindOfReactionSpinner.getSelectedItem().toString(),\n dateTextView.getText().toString(),\n commentsTextView.getText().toString());\n\n mAllergyModel.save();\n addMainRelativeLayout.setVisibility(View.GONE);\n fab.setVisibility(View.VISIBLE);\n readAllergyList(getActivity());\n\n } catch (Exception e) {\n\n // Log error\n ErrorHandlers.handleAPIError(getActivity());\n Crashlytics.logException(e);\n }\n }\n\n @Override\n public void onError(VolleyError error) {\n\n }\n });\n } else {\n\n ErrorHandlers.handleInternetConnectionFailure(getActivity());\n }\n\n }\n }",
"private void saveEvent(){\n boolean cancel = false;\n View focusView = null;\n\n // Reset errors.\n eventName.setError(null);\n room.setError(null);\n btnFrom.setError(null);\n btnTo.setError(null);\n btnHourFrom.setError(null);\n btnHourTo.setError(null);\n patient.setError(null);\n\n // Check if user entered an eventname\n String name = this.eventName.getText().toString();\n if(TextUtils.isEmpty(name)){\n eventName.setError(getString(R.string.error_field_required));\n focusView = eventName;\n cancel = true;\n }\n // Check if user entered an room\n String room = this.room.getText().toString();\n if(TextUtils.isEmpty(room)){\n this.room.setError(getString(R.string.error_field_required));\n focusView = this.room;\n cancel = true;\n }\n\n // Check if user entered an valid room\n if(!TextUtils.isEmpty(room)) {\n if (!checkRoom(rooms, Integer.parseInt(room))) {\n this.room.setError(getString(R.string.error_invalid_room));\n focusView = this.room;\n cancel = true;\n }\n }\n\n // Check if user entered a fromDate\n if(fromDate == null){\n this.btnFrom.setError(getString(R.string.error_field_required));\n focusView = this.btnFrom;\n cancel = true;\n if(!wholeDay.isChecked()){\n this.btnHourFrom.setError(getString(R.string.error_field_required));\n }\n }\n\n // Check if user entered a toDate\n if(toDate == null){\n this.btnTo.setError(getString(R.string.error_invalid_dates));\n focusView = this.btnTo;\n cancel = true;\n if(!wholeDay.isChecked()){\n this.btnHourTo.setError(getString(R.string.error_field_required));\n }\n }\n\n // Check if user entered an hour if whole day is unchecked\n if(!wholeDay.isChecked()){\n if(this.btnHourFrom.getText().toString().compareTo(getString(R.string.prompt_hour_from)) == 0){\n this.btnHourFrom.setError(getString(R.string.error_field_required));\n focusView = this.btnHourFrom;\n cancel = true;\n }\n if(this.btnHourTo.getText().toString().compareTo(getString(R.string.prompt_hour_to)) == 0){\n this.btnHourTo.setError(getString(R.string.error_field_required));\n focusView = this.btnHourTo;\n cancel = true;\n }\n }\n\n // Check if user entered right dates\n if(toDate != null && fromDate != null) {\n if (toDate.before(fromDate)) {\n this.btnTo.setError(getString(R.string.error_invalid_dates));\n if (!wholeDay.isChecked())\n this.btnHourTo.setError(getString(R.string.error_invalid_dates));\n focusView = this.btnTo;\n cancel = true;\n }\n }\n\n // Check if user entered a patient\n String patient = this.patient.getText().toString();\n if(TextUtils.isEmpty(patient)){\n this.patient.setError(getString(R.string.error_field_required));\n focusView = this.patient;\n cancel = true;\n }\n\n // Check if user entered an valid patient\n if(!TextUtils.isEmpty(patient)) {\n if (!checkPatient(patients, patient)) {\n this.patient.setError(getString(R.string.error_invalid_patient));\n focusView = this.patient;\n cancel = true;\n }\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n Event e = null;\n if(updating)\n e = ea.getEventById(event_id);\n else\n e = new Event();\n\n // required fields\n e.setEventname(this.eventName.getText().toString().trim());\n e.setRoom(Integer.parseInt(this.room.getText().toString().trim()));\n e.setFromDate(parseDateForDB(fromDate));\n e.setToDate(parseDateForDB(toDate));\n e.setNotificiation(this.notification);\n e.setPatient(checkPatientID(patients, patient));\n e.setDoctor(IdCollection.doctor_id);\n\n // optionals fields\n e.setDescription(this.desc.getText().toString().trim());\n if(!wholeDay.isChecked()){\n e.setFromTime(parseTimeForDB(fromDate));\n e.setToTime(parseTimeForDB(toDate));\n }else {\n e.setFromTime(-1);\n e.setToTime(-1);\n }\n\n if(updating)ea.updateEvent(e);\n else ea.createEvent(e);\n\n\n startAlarm(e,fromDate);\n goBackToCal();\n }\n }",
"private void saveData() {\n try {\n Student student = new Student(firstName.getText(), lastName.getText(),\n form.getText(), stream.getText(), birth.getText(),\n gender.getText(), Integer.parseInt(admission.getText()),\n Integer.parseInt(age.getText()));\n\n\n if (action.equalsIgnoreCase(\"new\") && !assist.checkIfNull(student)) {\n\n dao.insertNew(student);\n JOptionPane.showMessageDialog(null, \"Student saved !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n\n } else if (action.equalsIgnoreCase(\"update\") && !assist.checkIfNull(student)) {\n dao.updateStudent(student, getSelected());\n JOptionPane.showMessageDialog(null, \"Student Updated !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n }\n\n prepareTable();\n prepareHistory();\n buttonSave.setVisible(false);\n admission.setEditable(true);\n }catch (Exception e)\n {}\n }",
"public void saveDialogue(final Map tutorInfo) {\n //Creates the alert dialogue\n final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);\n\n //Setting Dialog Title\n alertDialog.setTitle(\"Save Changes\");\n\n //Setting Dialog Message\n alertDialog.setMessage(\"Are you sure you want to save these changes?\");\n\n //Setting Icon to Dialog\n alertDialog.setIcon(R.drawable.ic_tutorme);\n\n //YES\n alertDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //Create animations\n final Animation animrevTranslate = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.reverse_translate);\n final Animation animTranslate = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.translate);\n\n //Animate save button, hide it\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.startAnimation(animTranslate);\n saveButton.setVisibility(View.GONE);\n\n //Animate edit button, show it\n Button editButton = (Button) findViewById(R.id.edit_button);\n editButton.startAnimation(animrevTranslate);\n editButton.setVisibility(View.VISIBLE);\n\n //Turn off the Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.setTextIsSelectable(false);\n bioField.setEnabled(false);\n bioField.setBackgroundResource(android.R.color.transparent);\n\n //Hide add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.GONE);\n\n //Perform update\n yesAction(getTutorInfo());\n\n //Show confirmation\n Toast.makeText(getApplicationContext(), \"Changes saved\",\n Toast.LENGTH_SHORT).show();\n\n }\n });\n\n //NO\n alertDialog.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //Create animations\n final Animation animrevTranslate = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.reverse_translate);\n final Animation animTranslate = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.translate);\n\n //Animate save button, hide it\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.startAnimation(animTranslate);\n saveButton.setVisibility(View.GONE);\n\n //Animate edit button, show it\n Button editButton = (Button) findViewById(R.id.edit_button);\n editButton.startAnimation(animrevTranslate);\n editButton.setVisibility(View.VISIBLE);\n\n //Turn off the Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.setTextIsSelectable(false);\n bioField.setEnabled(false);\n bioField.setBackgroundResource(android.R.color.transparent);\n\n //Hide add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.GONE);\n\n //Perform rollback\n noAction(tutorInfo);\n\n //Show confirmation\n Toast.makeText(getApplicationContext(), \"Changes discarded\", Toast.LENGTH_SHORT).show();\n\n }\n });\n\n //Cancel\n alertDialog.setNeutralButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n\n //Showing Alert Message\n alertDialog.show();\n }",
"@Override\n public void onClick(View v) {\n calendar.set(Calendar.HOUR_OF_DAY, alarm_timepicker.getHour());\n calendar.set(Calendar.MINUTE, alarm_timepicker.getMinute());\n\n // getting the int values of the hour and minute\n int hour = alarm_timepicker.getHour();\n int minute = alarm_timepicker.getMinute();\n\n //converting the int values to strings\n String hour_string = String.valueOf(hour);\n String minute_string = String.valueOf(minute);\n\n // 10:4 -> 10:04\n if (minute < 10) {\n minute_string = \"0\" + String.valueOf(minute);\n }\n\n // method that changes the update text Textbox\n set_alarm_text(\"Alarm set to: \" + hour_string + \":\" + minute_string);\n\n\n // put in extra string into my_intent\n // tells the clock that you pressed the \"alarm on\" button\n my_intent.putExtra(\"extra\", \"alarm on\");\n\n //put in an extra long value into my intent\n //tells the clock that you want a certain value from the\n // dropdown menu/spinners\n my_intent.putExtra(\"alarm_choice\", choose_alarm_sound);\n\n // create a pending intent that delays the intent\n // until the specified calendar time\n pending_intent = PendingIntent.getBroadcast(MainActivity.this, 0, my_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //set the alarm manager\n alarm_manager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pending_intent);\n\n }",
"public void onSaveClicked(View v) {\n\n\t\tString mValue = (String) ((EditText) findViewById(R.id.editName))\n\t\t\t\t.getText().toString();\n\n\t\tif (mValue.equals(\"\")) {\n\t\t\tToast.makeText(getApplicationContext(), \"Please enter your name\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tGlobals.USER_COLOR = CalendarUtils.generateRandomColor();\n\t\t\tsaveUserData();\n\t\t\t// Make a Toast informing the user their information is saved.\n\t\t\tToast.makeText(getApplicationContext(), \"Saved\", Toast.LENGTH_SHORT)\n\t\t\t\t\t.show();\n\t\t\t\n\t\t\tint size = Globals.drawingMatrix.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tGlobals.drawingMatrix.get(i).clear();\n\t\t\t}\n\t\t\tGlobals.drawingMatrix.clear();\n\t\t\t\n\t\t\tfinish();\n\t\t}\n\n\t}",
"public void save(View view){\n\t\tIntent saveIntent = new Intent(this, SaveActivity.class);\n\t\t//First Name\n\t\tEditText firstName = (EditText) findViewById(R.id.first_name_edit);\n \tString sFirstName = firstName.getText().toString();\n \t\n \t//Last Name\n \tEditText lastName = (EditText) findViewById(R.id.last_name_edit);\n \tString sLastName = lastName.getText().toString();\n \t\n \t//Address\n \tEditText address = (EditText) findViewById(R.id.address_edit);\n \tString sAddress = address.getText().toString();\n \t\n \t//Credit Details\n \tEditText creditDetails = (EditText) findViewById(R.id.credit_details_edit);\n \tString sCreditDetails = creditDetails.getText().toString();\n \t\n \t//Attach Strings to Intent\n \tsaveIntent.putExtra(FIRST_NAME, sFirstName);\n \tsaveIntent.putExtra(LAST_NAME, sLastName);\n \tsaveIntent.putExtra(ADDRESS, sAddress);\n \tsaveIntent.putExtra(CREDIT_DETAILS, sCreditDetails);\n \t\n \t//Start Activity\n \tstartActivity(saveIntent);\n\t}",
"private void saveBleed() {\n\n\n String bleedLocation = SpinnerBleedLocation.getSelectedItem().toString();\n int rating = seekBarRating.getProgress();\n String bleedSide = SpinnerBleedSide.getSelectedItem().toString();\n String bleedSeverity = SpinnerBleedSeverity.getSelectedItem().toString();\n String bleedCause = SpinnerBleedCause.getSelectedItem().toString();\n String bleedDate = textViewDate.getText().toString();\n\n if (!TextUtils.isEmpty(bleedLocation) && !TextUtils.isEmpty(bleedDate)) {\n String id = databaseBleeds.push().getKey();\n\n Bleed bleed = new Bleed(id, bleedLocation, rating, bleedSide, bleedSeverity, bleedCause, bleedDate);\n databaseBleeds.child(id).setValue(bleed);\n\n bleedIntentID = bleed.getBleedIDID();\n\n\n txtAddTreat.setVisibility(View.VISIBLE);\n buttonAddTreatment.setVisibility(View.VISIBLE);\n listviewTreatment.setVisibility(View.VISIBLE);\n //btnSaveImage.setVisibility(View.VISIBLE);\n btnChooseImage.setVisibility(View.VISIBLE);\n imgBleed.setVisibility(View.VISIBLE);\n\n Toast.makeText(this, \"Bleed Saved Successfully\", Toast.LENGTH_LONG).show();\n\n\n } else {\n Toast.makeText(this, \"Bleed Date should not be empty\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n String task = String.valueOf(taskEditText.getText());\n SQLiteDatabase db = OpenDB.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(AccessData.ToDoEntry.todo_title, task);\n db.insertWithOnConflict(AccessData.ToDoEntry.table,\n null,\n values,\n SQLiteDatabase.CONFLICT_REPLACE);\n db.close();\n updateUI(); /* Updating the todo list with new changes made to the database, and displaying it on screen. */\n }",
"public void saveToDatabase(View view) {\n // new implementation\n EditText recipeName = findViewById(R.id.input_Name);\n EditText recipeDirections = findViewById(R.id.input_Directions);\n EditText recipeNotes = findViewById(R.id.input_Notes);\n\n\n if (!(recipeName.getText().toString().equals(\"\"))) {\n newRecipe.setName(recipeName.getText().toString());\n newRecipe.setDirections(recipeDirections.getText().toString());\n newRecipe.setNotes(recipeNotes.getText().toString());\n\n dbHandler.addRecipe(newRecipe);\n\n finish();\n }\n else {\n Toast.makeText(this, \"You must enter a name for your recipe!\", Toast.LENGTH_SHORT).show();\n }\n }",
"public void save(View view)\n {\n TextView tv_name = (TextView) findViewById(R.id.etInfopointName);\n TextView tv_file = (TextView) findViewById(R.id.etInfopointFile);\n TextView tv_qr = (TextView) findViewById(R.id.etInfopointQR);\n //Llamamos a la función de insercción en base de datos\n if(dataSource.InsertInfopoint(tv_name.getText().toString(), tv_file.getText().toString(), tv_qr.getText().toString()))\n {\n Intent resultado = new Intent();\n setResult(RESULT_OK, resultado);\n finish();\n }\n else\n {\n Intent resultado = new Intent();\n setResult(RESULT_CANCELED, resultado);\n finish();\n }\n\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsave();\n\t\t\t}",
"private void SaveStudentInfo() {\n EditText _fullName = (EditText) findViewById(R.id.editTextFullName);\n EditText _birthdate = (EditText) findViewById(R.id.dateBirthday);\n EditText _fullStreetAddress = (EditText) findViewById(R.id.editTextFullAddress);\n EditText _contactPhone = (EditText) findViewById(R.id.editTextContactPhone);\n EditText _contactEmail = (EditText) findViewById(R.id.editTextContactEmail);\n EditText _parentNames = (EditText) findViewById(R.id.editTextParentNames);\n EditText _defaultRate = (EditText) findViewById(R.id.numberRate);\n EditText _notes = (EditText) findViewById(R.id.editTextNotes);\n\n // ***** Create the Student Object\n Student _student = new Student();\n\n // ***** Set the field values\n _student.fullName = String.valueOf(_fullName.getText());\n _student.birthDate = String.valueOf(_birthdate.getText());\n _student.fullAddress = String.valueOf(_fullStreetAddress.getText());\n _student.contactPhone = String.valueOf(_contactPhone.getText());\n _student.contactEmail = String.valueOf(_contactEmail.getText());\n _student.parentNames = String.valueOf(_parentNames.getText());\n\n // ***** Convert to a double to store in database for calulations\n _student.defaultRate = Double.valueOf(String.valueOf(_defaultRate.getText()));\n\n _student.notes = String.valueOf(_notes.getText());\n\n // **** Save the student information\n _myDb.setStudentInfo(_student);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_insert_sleep, container, false);\n\n Sleeptime = view.findViewById(R.id.txtSleep);\n WakeTime = view.findViewById(R.id.txtWake);\n StartDate = view.findViewById(R.id.txtStart);\n EndDate = view.findViewById(R.id.txtEnd);\n bnSave = view.findViewById(R.id.btnAdd);\n\n bnSave.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n String sleeptime = Sleeptime.getText().toString();\n String waketime = WakeTime.getText().toString();\n String startdate = StartDate.getText().toString();\n String enddate = EndDate.getText().toString();\n\n SleepRecord sleep = new SleepRecord();\n sleep.setStartTime(sleeptime);\n sleep.setEndTime(waketime);\n sleep.setStartDate(startdate);\n sleep.setEndDate(enddate);\n\n MainActivity.sleepDatabase.sleepDAO().addRecord(sleep);\n Toast.makeText(getActivity(), \"Inserted successfully\",Toast.LENGTH_SHORT).show();\n\n Sleeptime.setText(\"\");\n WakeTime.setText(\"\");\n StartDate.setText(\"\");\n EndDate.setText(\"\");\n bnSave.setText(\"\");\n }\n });\n\n\n return view;\n\n\n }",
"public void SaveButtonOnClickListener(View view) {\n String defaultObjectOwner = ((EditText)findViewById(R.id.settings_default_object_owner_field)).getText().toString().trim();\n presenter.SaveSettings(defaultObjectOwner);\n }",
"public void addToDo() {\n\n ToDoDBContract.ToDoListDbHelper dbHelper = new ToDoDBContract.ToDoListDbHelper(context);\n\n String name = et_name.getText().toString(); // gets the name the user has entered in the et_name edit text\n\n // If the name is null or empty, alert the user that they must enter a name\n if (name.equals(null) || name.equals(\"\")) {\n Log.d(\"ERROR\", \"name is not valid\", null);\n AlertDialog alertDialog = new AlertDialog.Builder(context)\n .setMessage(R.string.dialog_message_input_error_name)\n .setTitle(R.string.dialog_title_input_error_name)\n .setPositiveButton(\"Ok!\", null).create();\n alertDialog.show();\n } else {\n // If the name was NOT null or empty, create a new ToDoItem with the valid to-do name entered by the user\n ToDoItem addToDo = new ToDoItem(name);\n String note = et_note.getText().toString();\n\n // Get the other inputs from the use and make sure they are not null or invalid\n // If not null or invalid, set the ToDoItem's instance variables to the corresponding inputs\n if (!note.equals(null) || !note.equals(\"\")) {\n addToDo.setNote(note);\n }\n if (dueDateDate != null) {\n if (dueDateDate.getTime() > 0)\n addToDo.setDueDate(dueDateDate);\n } else {\n addToDo.setDueDate(null);\n }\n if (alarmDate != null) {\n if (alarmDate.getTimeInMillis() > 0)\n addToDo.setAlarmDate(new Date(alarmDate.getTimeInMillis()));\n } else {\n alarmDate = null;\n addToDo.setAlarmDate(null);\n }\n dbHelper.insertNewToDo(addToDo); // add the to-do to the database\n\n // If the user set a valid alarm, schedule it.\n if (alarmDate != null && alarmDate.getTimeInMillis() > 0) {\n int alarmID = dbHelper.getID(addToDo);\n Intent intent = new Intent(context, ToDoAlarmReceiver.class);\n intent.putExtra(\"ToDoName\", name);\n intent.putExtra(\"AlarmID\", alarmID);\n Log.d(TAG, \"alarm id = \" + alarmID);\n AlarmManager alarm = (AlarmManager) getContext().getSystemService(Context.ALARM_SERVICE);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0);\n alarm.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, alarmDate.getTimeInMillis(), pendingIntent);\n }\n\n // Make a toast confirming that the to do has been added and redirect back to the ToDoFragment\n Toast.makeText(context, \"To do \\\"\" + name + \"\\\" added\", Toast.LENGTH_LONG).show();\n ToDoFragment newFragment = new ToDoFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.fragment_container, newFragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }\n }",
"private void addNewAssessment() {\n //instantiate converters object for LocalDate conversion\n Converters c = new Converters();\n\n //get UI fields\n int courseId = thisCourseId;\n String title = editTextAssessmentTitle.getText().toString();\n LocalDate dueDate = c.stringToLocalDate(textViewAssessmentDueDate.getText().toString());\n String status = editTextAssessmentStatus.getText().toString();\n String note = editTextAssessmentNote.getText().toString();\n String type = editTextAssessmentType.getText().toString();\n\n if (title.trim().isEmpty() || dueDate == null || status.trim().isEmpty() || type.trim().isEmpty()) {\n Toast.makeText(this, \"Please complete all fields\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n //instantiate Assessment object\n Assessment assessment = new Assessment(courseId, title, dueDate, status, note, type);\n\n //add new assessment\n addEditAssessmentViewModel.insert(assessment);\n\n //notification\n Long longDue = c.localDateToMilliseconds(dueDate);\n makeAlarm(title+\" is due today.\", longDue);\n\n finish();\n }",
"private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n String message = \"Failed to save data...\";\n if (flag){\n message = \"Success to save data...\";\n }\n JOptionPane.showMessageDialog(this, message, \"Allert / Notification\", \n JOptionPane.INFORMATION_MESSAGE);\n \n bindingTable();\n reset();\n }",
"private void onSaveButtonPressed() {\n EditText name = ((EditText) findViewById(R.id.name_edit_text));\n EditText number = ((EditText) findViewById(R.id.number_edit_text));\n if (name.getText().toString().equals(\"\") || number.getText().toString().equals(\"\")) {\n Toast.makeText(MainActivity.this, \"Empty string is not valid!\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (!(number.getText().toString().length() == 10)) {\n Toast.makeText(MainActivity.this, \"It has to be a 10 digit number!\", Toast.LENGTH_SHORT).show();\n return;\n }\n ContentValues content = new ContentValues();\n content.put(ContactDbSchema.Cols.NAME, name.getText().toString());\n content.put(ContactDbSchema.Cols.NUMBER, number.getText().toString());\n//\n// editor.putString(name.getText().toString(),number.getText().toString()).commit();\n\n try (Cursor cursor = database.query(\n ContactDbSchema.TABLE_NAME,\n null,\n ContactDbSchema.Cols.NAME + \" = ?\",\n new String[]{name.getText().toString()},\n null, null, null)) {\n // Make the cursor point to the first row in the result set.\n cursor.moveToFirst();\n if (cursor.isAfterLast()) {\n // No records exist. Need to insert a new one.\n database.insert(ContactDbSchema.TABLE_NAME, null, content);\n } else {\n // A record already exists. Need to update it with the new number.\n database.update(ContactDbSchema.TABLE_NAME, content, ContactDbSchema.Cols.NAME + \" = ? \", new String[]{name.getText().toString()});\n }\n }\n }",
"private void saveEvent(){\n String eventName = eventNameView.getText().toString().trim();\n String dateString = eventDateView.getText().toString();\n String timeString = eventTimeView.getText().toString();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd hh:mm a\");\n Calendar cal = Calendar.getInstance();\n try{\n Date date = sdf.parse(dateString+ \" \" + timeString);\n cal.setTime(date);\n }\n catch (Exception e){\n Log.d(\">>>\",e.toString());\n }\n\n if(eventName.length()>=1){\n final Event event = new Event(eventName, dateString, timeString, memberStatus, chat.getChatKey());\n String reminderPreferenceKeyTemp = \"\";\n if(this.event!=null){\n event.setEventKey(this.event.getEventKey());\n final DatabaseReference database = FirebaseDatabase.getInstance().getReference(\"events\");\n database.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for(DataSnapshot e : dataSnapshot.getChildren()){\n if(e.child(\"eventKey\").getValue().toString().equals(event.getEventKey())){\n database.child(e.getKey()).setValue(event);\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(patternDate);\n try {\n Date date = sdf.parse(eventDateView.getText().toString());\n cal.setTime(date);\n ActivityEventCalendar.dateLong = cal.getTimeInMillis();\n if(ActivityEventCalendar.dateLong == cal.getTimeInMillis()){\n ActivityEventCalendar.displayEventList();\n finish();\n }\n }\n catch(Exception exception){\n\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n reminderPreferenceKeyTemp = event.getEventKey() + \"reminders\";\n }\n else{\n //creating event for the first time\n DatabaseReference database = FirebaseDatabase.getInstance().getReference(\"events\");\n eventFirebase = database.push();\n event.setEventKey(eventFirebase.getKey());\n database.push().setValue(event);\n reminderPreferenceKeyTemp = eventFirebase.getKey() + \"reminders\";\n }\n //write sharedpreferences for reminder\n final String reminderPreferenceKey = reminderPreferenceKeyTemp;\n Spinner spinner = (Spinner) findViewById(R.id.reminder_spinner);\n final SharedPreferences pref = getApplicationContext().getSharedPreferences(\"MyPref\", 0);\n final SharedPreferences.Editor editor = pref.edit();\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {\n if(position==0){\n //turn on\n editor.putBoolean(reminderPreferenceKey, true);\n editor.commit();\n }\n else if(position == 1){\n //turn off\n editor.putBoolean(reminderPreferenceKey, false);\n editor.commit();\n }\n }\n @Override\n public void onNothingSelected(AdapterView<?> parentView) { }\n });\n\n //create reminders\n boolean notify = pref.getBoolean(reminderPreferenceKey, false);\n\n if(notify){\n Intent intent = new Intent(Intent.ACTION_EDIT);\n intent.setType(\"vnd.android.cursor.item/event\");\n intent.putExtra(\"beginTime\", cal.getTimeInMillis());\n intent.putExtra(\"allDay\", false);\n intent.putExtra(\"title\", event.getEventName());\n startActivity(intent);\n }\n if(!creatingNewChat){\n statusAdapter.updateFirebase();\n }\n ActivityEventCalendar.dateLong = cal.getTimeInMillis();\n if(ActivityEventCalendar.dateLong == cal.getTimeInMillis()){\n ActivityEventCalendar.displayEventList();\n finish();\n }\n }\n else{\n Toast.makeText(this, \"Event name is invalid\", Toast.LENGTH_SHORT).show();\n }\n }",
"public void onSaveButton(ActionEvent actionEvent) {\n if (nameField.getText() == null || addressField.getText() == null || postalField.getText() == null || phoneField.getText() == null || divisionCombo.getValue() == null) {\n Alert error = new Alert(Alert.AlertType.ERROR);\n error.setTitle(\"Error\");\n error.setHeaderText(\"Error: Invalid input.\");\n error.setContentText(\"Check values and try again.\");\n error.showAndWait();\n }\n else {\n try {\n int divisionID = getDivisionIdFromDivisionName(divisionCombo.getValue().toString());\n Customer newCustomer = new Customer(\n 0,\n nameField.getText(),\n addressField.getText(),\n postalField.getText(),\n phoneField.getText(),\n divisionID);\n Customer.addNewCustomer(newCustomer);\n onBackButton(actionEvent);\n } catch (RuntimeException | IOException e) {\n Alert error = new Alert(Alert.AlertType.ERROR);\n error.setTitle(\"Error\");\n error.setHeaderText(\"Error: Server issue.\");\n error.setContentText(\"Unable to complete this action, please try again.\");\n error.showAndWait();\n }\n }\n }",
"private void saveStation() {\n MainActivity.new_station = true;\n stationname = user_stationname_input.getText().toString();\n stationurl = user_station_input.getText().toString();\n Intent passStation = new Intent(addStationActivity.this, MainActivity.class);\n passStation.putExtra(\"stationurl\", stationurl);\n passStation.putExtra(\"stationname\", stationname);\n startActivity(passStation);\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tString date,time;\n\t\t\t\tdate=et1.getText().toString();\n\t\t\t\ttime=et2.getText().toString();\n\t\t\t\tSQLiteDatabase mydatabase = openOrCreateDatabase(\"mydb.dat\",MODE_PRIVATE,null);\n\t\t\t\t mydatabase.execSQL(\"CREATE TABLE IF NOT EXISTS Pest( Date VARCHAR, Time VARCHAR );\");\n\t\t\t\t mydatabase.execSQL(\"INSERT INTO Pest VALUES('\"+date+\"','\"+time+\"');\");\n\t\t\t\t Toast.makeText(getApplicationContext(), \"booked\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\n\t\t\t}",
"public void onClick(View v) {\n\t\t\t\tString name=editName.getText().toString(); \r\n\t\t\t\tint playerId=Integer.parseInt(editId.getText().toString());\r\n\t\t\t\tint handicap=Integer.parseInt(editHandicap.getText().toString());\r\n\t\t\t\tint code=Integer.parseInt(editCode.getText().toString());\r\n\t\t\t\tint status=editStatus.isChecked()?0:1;\r\n\t\t\t\t\r\n\t\t\t\t// check if REQUIRED fields are vacant \r\n\t\t\t\tif(name.equals(\"\")|| code<1 || handicap<1 || playerId<1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (playerId<1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Select a player\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\treturn;\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\tToast.makeText(getApplicationContext(), \"Enter a name and handicap\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t} \t\r\n\t\t\t\telse \r\n\t\t\t\t{ //db = new DatabaseHelper(getApplicationContext());\r\n\t\t\t\t\tplayer=db.getPlayer(playerId);\r\n\t\t\t\t\tplayer.setName(name);\r\n\t\t\t\t\tplayer.setHandicap(handicap);\r\n\t\t\t\t\tplayer.setKey(code);\r\n\t\t\t\t\tplayer.setStatus(status);\r\n\t\t\t\t\tdb.updatePlayer(player);\r\n\t\t\t\t\t//db.close();\r\n\t\t\t\t\t// Save the Data in Database \r\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Saved Successfully \", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}",
"@FXML\n void saveBtnClicked(ActionEvent event) {\n reportSettingsDAO = new ReportSettingsDAO();\n reportSettings = new ReportSettings();\n\n if (weeklyRadioBtn.isSelected()) {\n reportSettings.setFrequency(\"WEEKLY\");\n } else {\n reportSettings.setFrequency(\"MONTHLY\");\n }\n\n LocalDate tmpDate = nextDate.getValue();\n reportSettings.setNextDate(Date.valueOf(tmpDate));\n\n reportSettingsDAO.updateDate(reportSettings);\n\n }",
"private void saveData() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n Gson gson = new Gson();\n String jsonItem = gson.toJson(reminderItems);\n editor.putString(REMINDER_ITEM, jsonItem);\n editor.apply();\n }",
"public void saveAppointment(Appointment appointment) {\n\t\tappointmentDao.saveAppointment(appointment);\n\t}",
"@Override\n public void onClick(View view) {\n boolean isInserted = app_db.insertHabit(\n app_utils.getCurrentDateInteger(),\n app_utils.getCurrentTimestampForSQLite(),\n \"drink\"\n );\n if (isInserted)\n Toast.makeText(MainActivity.this, \"Drink Inserted\", Toast.LENGTH_LONG).show();\n else\n Toast.makeText(MainActivity.this, \"Drink Not Inserted\", Toast.LENGTH_LONG).show();\n }",
"private void saveGoal() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String descriptionString = mDescriptionEditText.getText().toString().trim();\n\n\n // Check if this is supposed to be a new product\n // and check if all the fields in the editor are blank\n if (mCurrentGoalUri == null && (TextUtils.isEmpty(descriptionString) )) {\n Toast.makeText(this, \"Please add info to all the fields\",\n Toast.LENGTH_SHORT).show();\n // Since no fields were modified, we can return early without creating a new goal.\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 goal attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(GoalandTaskMatcherContract.GoalEntry.COLUMN_GOAL_DESCRIPTION, descriptionString);\n\n // Determine if this is a new or existing goal by checking if mCurrentGoalUri is null or not\n if (mCurrentGoalUri == null) {\n // This is a NEW goal, so insert a new goal into the provider,\n // returning the content URI for the new goal.\n Uri newUri = getContentResolver().insert(GoalandTaskMatcherContract.GoalEntry.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_goal_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_goal_successful),\n Toast.LENGTH_SHORT).show();\n }\n } else {\n // Otherwise this is an EXISTING goal, so update the goal with content URI: mCurrentGoalUri\n // and pass in the new ContentValues. Pass in null for the selection and selection args\n // because mCurrentGoalUri will already identify the correct row in the database that\n // we want to modify.\n int rowsAffected = getContentResolver().update(mCurrentGoalUri, 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_goal_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_goal_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n String task = String.valueOf(taskEditText.getText());\n\n //a read/write database object will be returned\n SQLiteDatabase db = dbHelper.getWritableDatabase();\n\n //used to store a set of values\n ContentValues values = new ContentValues();\n\n //add the task to the set\n values.put(TaskContract.TaskEntry.COL_TASK_TITLE, task);\n\n //general method for inserting a row into the database\n db.insertWithOnConflict(TaskContract.TaskEntry.TABLE,\n null,\n values,\n SQLiteDatabase.CONFLICT_REPLACE);\n db.close(); //close the database object\n updateUI(); //update the look of the ListView\n }",
"private void saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveActionPerformed\n toSave();\n }",
"private void saveData(){\n\t\tdataBase=mHelper.getWritableDatabase();\n\t\tContentValues values=new ContentValues();\n\t\t\n\t\tvalues.put(DbHelper.KEY_NNAME,nname);\n\t\t//values.put(DbHelper.KEY_LNAME,lname );\n\t\t\n\t\tSystem.out.println(\"\");\n\t\tif(isUpdate)\n\t\t{ \n\t\t\t//update database with new data \n\t\t\tdataBase.update(DbHelper.TABLE_NOTE, values, DbHelper.KEY_ID+\"=\"+id, null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//insert data into database\n\t\t\tdataBase.insert(DbHelper.TABLE_NOTE, null, values);\n\t\t}\n\t\t//close database\n\t\tdataBase.close();\n\t\tfinish();\n\t\t\n\t\t\n\t}",
"public void save()\n {\n\n try {\n\n\n EditText hourField = (EditText) findViewById(R.id.houramount);\n String hours = hourField.getText().toString();\n int hour = Integer.parseInt(hours);\n long timeEaten = new Date().getTime() - (hour * 60 * 60 * 1000);\n //Service.getInstance().setUserMealTimeEaten(timeEaten);\n\n\n RadioButton largeMeal = (RadioButton) findViewById(R.id.largemeal);\n RadioButton mediumMeal = (RadioButton) findViewById(R.id.mediummeal);\n RadioButton smallMeal = (RadioButton) findViewById(R.id.smallmeal);\n\n if (largeMeal.isChecked()) {\n //set large\n //System.out.println(\"IN LARGE\");\n //service.setUserMealType(Meal.MealType.Large);\n Service.getInstance().setUserMeal(Meal.MealType.Large, timeEaten);\n// Meal MealObj = new Meal(Meal.MealType.Large, timeEaten);\n// user.setMeal(MealObj);\n\n }\n else if (mediumMeal.isChecked()) {\n //set medium\n //System.out.println(\"IN Medium\");\n //service.setUserMealType(Meal.MealType.Medium);\n Service.getInstance().setUserMeal(Meal.MealType.Medium, timeEaten);\n// Meal MealObj = new Meal(Meal.MealType.Medium, timeEaten);\n// user.setMeal(MealObj);\n }\n else if (smallMeal.isChecked()) {\n //set small\n //System.out.println(\"IN small\");\n //service.setUserMealType(Meal.MealType.Small);\n Service.getInstance().setUserMeal(Meal.MealType.Small, timeEaten);\n// Meal MealObj = new Meal(Meal.MealType.Small, timeEaten);\n// user.setMeal(MealObj);\n }\n else\n {\n Toast.makeText(this, \"You forgot to chose a meal type\", Toast.LENGTH_SHORT).show();\n }\n }\n catch(NumberFormatException e)\n {\n Toast.makeText(this, \"You forgot to add number of hours\", Toast.LENGTH_SHORT).show();\n }\n }",
"@FXML\r\n private void handleSaveBtn(ActionEvent event) {\r\n\r\n LocalDate date_of_birth = dob.getValue(); //get date of birth value from calender and convert it to local date\r\n LocalDate reg_date = registrationDate.getValue(); //get registration date from calendar and convert it to local date\r\n Connection connection = DBConnection.Connect();//creates and instance of the DBConnection class and invokes the Connect Method\r\n String sql;\r\n PreparedStatement pst;\r\n //Beginning of if-else block\r\n if (userTypeComboBox.getValue().equals(\"Admin\")) {\r\n sql = \"INSERT INTO admin (admin_name, admin_gender, admin_DOB, admin_reg_date, admin_phn, profile_pic, admin_login, admin_password)\"\r\n + \" VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n try {\r\n fis = new FileInputStream(f);\r\n pst = connection.prepareStatement(sql);\r\n pst.setString(1, userNameTextField.getText().toUpperCase());\r\n pst.setString(2, radioLabel.getText().toUpperCase());\r\n pst.setString(3, date_of_birth.toString());\r\n pst.setString(4, reg_date.toString());\r\n pst.setString(5, phoneNumberTextField.getText());\r\n pst.setBinaryStream(6, (InputStream) fis, (int) f.length());\r\n pst.setString(7, loginNameTextField.getText());\r\n pst.setString(8, password1Field.getText());\r\n\r\n int i = pst.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW ADMIN RECORD ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n\r\n } catch (FileNotFoundException ex) {\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setContentText(\"FILE UPLOAD ERROR\");\r\n alert.showAndWait();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else if (userTypeComboBox.getValue().equals(\"Doctor\")) {\r\n\r\n sql = \"INSERT INTO doctor(\"\r\n + \"doctor_name,\"\r\n + \" doctor_address,\"\r\n + \"doctor_phone_number,\"\r\n + \"doctor_gender,\"\r\n + \"doctor_pic,\"\r\n + \"doctor_DOB, \"\r\n + \"specialty, \"\r\n + \"doctor_reg_date, \"\r\n + \"doctor_login, \"\r\n + \"doctor_password)\"\r\n + \"VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n try {\r\n fis = new FileInputStream(f);\r\n PreparedStatement statement = connection.prepareStatement(sql);\r\n statement.setString(1, userNameTextField.getText().toUpperCase());\r\n statement.setString(2, addressTextField.getText());\r\n statement.setString(3, phoneNumberTextField.getText());\r\n statement.setString(4, radioLabel.getText().toUpperCase());\r\n statement.setBinaryStream(5, (InputStream) fis, (int) f.length());\r\n statement.setString(6, date_of_birth.toString());\r\n statement.setString(7, specialtyCmbBox.getValue());\r\n statement.setString(8, reg_date.toString());\r\n statement.setString(9, loginNameTextField.getText());\r\n statement.setString(10, password1Field.getText());\r\n int i = statement.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW DOCTOR RECORDED SUCCESSFULLY ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"COULDN'T PASS FILE TO INPUT STREAM\");\r\n }\r\n\r\n } else if (userTypeComboBox.getValue().equals(\"Receptionist\")) {\r\n sql = \"INSERT INTO receptionist (receptionist_name, receptionist_gender, receptionist_address, receptionist_phn, receptionist_reg_date, receptionist_DOB, profile_pic, receptionist_login, receptionist_password)\"\r\n + \" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n try {\r\n fis = new FileInputStream(f);\r\n pst = connection.prepareStatement(sql);\r\n pst.setString(1, userNameTextField.getText().toUpperCase());\r\n pst.setString(2, radioLabel.getText().toUpperCase());\r\n pst.setString(3, addressTextField.getText());\r\n pst.setString(4, phoneNumberTextField.getText());\r\n pst.setString(5, reg_date.toString());\r\n pst.setString(6, date_of_birth.toString());\r\n pst.setBinaryStream(7, (InputStream) fis, (int) f.length());\r\n pst.setString(8, loginNameTextField.getText());\r\n pst.setString(9, password1Field.getText());\r\n\r\n int i = pst.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW RECEPTIONIST RECORD SUCCESSFULLY ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else if (userTypeComboBox.getValue().equals(\"Pharmacist\")) {\r\n sql = \"INSERT INTO pharmacist(pharmacist_name, pharnacist_gender, pharmacist_address, pharnacist_phn, \"\r\n + \"pharnacist_DOB, pharmacist_reg_date, profile_pic, pharnacist_login, pharmacist_password)\"\r\n + \"VALUES (?,?,?,?,?,?,?,?,?)\";\r\n\r\n try {\r\n fis = new FileInputStream(f);\r\n pst = connection.prepareStatement(sql);\r\n\r\n pst = connection.prepareStatement(sql);\r\n pst.setString(1, userNameTextField.getText().toUpperCase());\r\n pst.setString(2, radioLabel.getText().toUpperCase());\r\n pst.setString(3, addressTextField.getText());\r\n pst.setString(4, phoneNumberTextField.getText());\r\n pst.setString(5, date_of_birth.toString());\r\n pst.setString(6, reg_date.toString());\r\n pst.setBinaryStream(7, (InputStream) fis, (int) f.length());\r\n pst.setString(8, loginNameTextField.getText());\r\n pst.setString(9, password1Field.getText());\r\n\r\n int i = pst.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW PHARMACIST RECORD SUCCESSFULLY ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else if (userTypeComboBox.getValue().equals(\"Biologist\")) { //insert into biologist table depending on the value of the userType comboBox\r\n sql = \"INSERT INTO biologist (biologist_name, biologist_gender, biologist_address, \"\r\n + \"biologist_DOB, biologist_reg_date, biologist_phn, profile_pic, biologist_login, biologist_password) \"\r\n + \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n try {\r\n fis = new FileInputStream(f);\r\n pst = connection.prepareStatement(sql);\r\n\r\n pst = connection.prepareStatement(sql);\r\n pst.setString(1, userNameTextField.getText().toUpperCase());\r\n pst.setString(2, radioLabel.getText().toUpperCase());\r\n pst.setString(3, addressTextField.getText());\r\n pst.setString(4, date_of_birth.toString());\r\n pst.setString(5, reg_date.toString());\r\n pst.setString(6, phoneNumberTextField.getText());\r\n pst.setBinaryStream(7, (InputStream) fis, (int) f.length());\r\n pst.setString(8, loginNameTextField.getText());\r\n pst.setString(9, password1Field.getText());\r\n\r\n int i = pst.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW BIOLOGIST RECORD SUCCESSFULLY ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setContentText(\"INVALID USER TYPE\\nCONSULT SYSTEM MANNUAL\");\r\n alert.showAndWait();\r\n }\r\n\r\n }",
"private void saveNewBusiness() {\n if(Utils.checkInternet(this)){\n //show dialog\n mProgressDialog.show();\n //get data from views\n final String businessTitle = mBusinessTitle.getText().toString();\n\n final String businessPhone = mBusinessPhone.getText().toString();\n final String businessEmail = mBusinessEmail.getText().toString();\n final String businessDistrict = mBusinessDistrictSpinner.getSelectedItem().toString();\n final String businessCity = mBusinessCitySpinner.getSelectedItem().toString();\n final Category businessCategory = (Category) mBusinessCategorySpinner.getSelectedItem();\n final String businessSpecialization = mBusinessSpecializationSpinner.getSelectedItem().toString();\n String businessAbout = mBusinessAbout.getText().toString();\n\n if (businessTitle.isEmpty()) {\n mBusinessTitle.setError(getResources().getString(R.string.required_field));\n if (mProgressDialog.isShowing())\n mProgressDialog.dismiss();\n return;\n }\n else if( mCurrentLocationStr.equals(\"\")){\n showToast(R.string.required_location);\n if (mProgressDialog.isShowing())\n mProgressDialog.dismiss();\n return;\n }\n else if(businessDistrict.equals(\"Choose District\")){\n showToast(R.string.required_city);\n if (mProgressDialog.isShowing())\n mProgressDialog.dismiss();\n return;\n }\n else if (businessPhone.isEmpty()) {\n mBusinessPhone.setError(getResources().getString(R.string.required_field));\n if (mProgressDialog.isShowing())\n mProgressDialog.dismiss();\n return;\n }\n else if (!businessPhone.isEmpty() && businessPhone.length() < 9) {\n mBusinessPhone.setError(getResources().getString(R.string.phone_short));\n if (mProgressDialog.isShowing())\n mProgressDialog.dismiss();\n showToast(R.string.phone_short);\n return;\n }else if (!businessEmail.isEmpty() && !android.util.Patterns.EMAIL_ADDRESS.matcher(businessEmail).matches()) {\n if (mProgressDialog.isShowing())\n mProgressDialog.dismiss();\n showToast(R.string.wrong_email);\n return;\n }\n\n if(businessAbout.isEmpty()){\n businessAbout = getString(R.string.business_about_empty).toString();\n }\n\n final BusinessPlace mBusinessPlace = new BusinessPlace();\n mBusinessPlace.setOwner_id(FirebaseUtil.getCurrentUserId());\n mBusinessPlace.setTitle(businessTitle);\n mBusinessPlace.setImage(businessPicture);\n mBusinessPlace.setPhone(businessPhone);\n mBusinessPlace.setEmail(businessEmail);\n mBusinessPlace.setCategory(businessCategory.getFr_name());\n mBusinessPlace.setSpecialization(businessSpecialization);\n mBusinessPlace.setCity(businessCity);\n mBusinessPlace.setDistrict(businessDistrict);\n mBusinessPlace.setAbout(businessAbout);\n mBusinessPlace.setLocation(mCurrentLocationStr);\n mBusinessPlace.setLatitude(mCurrentLatLng.latitude);\n mBusinessPlace.setLongitude(mCurrentLatLng.longitude);\n mBusinessPlace.setCreated_at(String.valueOf(System.currentTimeMillis()));\n mBusinessPlace.setUpdated_at(String.valueOf(System.currentTimeMillis()));\n mBusinessPlace.setIcon(businessCategory.getIcon());\n\n //add business place to firebase\n final String businessPlaceKey = FirebaseUtil.getBusinessRef().push().getKey();\n\n FirebaseUtil.getBusinessRef().child(businessPlaceKey).setValue(mBusinessPlace, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if(databaseError==null){\n FirebaseUtil.getUserBusinessRef().push().setValue(businessPlaceKey, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError==null){\n showToast(R.string.success_add_place);\n if (mProgressDialog.isShowing())\n mProgressDialog.dismiss();;\n IntentToMainActivity(mBusinessPlace);\n }else {\n if (mProgressDialog.isShowing())\n mProgressDialog.dismiss();;\n showToast(R.string.error_add_place);\n }\n\n }\n });\n }else {\n if (mProgressDialog.isShowing())\n mProgressDialog.dismiss();;\n showToast(R.string.error_add_place);\n }\n\n }\n });\n }\n else\n {\n Utils.internetErrorDialog(this);\n }\n\n }",
"public void saveData(View v) {\n bAddAlbum = (Button) findViewById(R.id.bAddAlbum);\n etAlbumName = (EditText) findViewById(R.id.etAlbumName);\n //etAddYear = (EditText) findViewById(R.id.etAddYear);\n etAddGenre = (EditText) findViewById(R.id.etAddGenre);\n etAddArtist = (EditText) findViewById(R.id.etAddArtist);\n tvErrorMessage = (TextView) findViewById(R.id.tv);\n TextView tvAlbumDate = (TextView) findViewById(R.id.tvAlbumDate);\n etAlbumSongs = (EditText) findViewById(R.id.etAlbumSongs);\n etAlbumPosition = (EditText) findViewById(R.id.etAlbumPosition);\n\n //convert user input to string\n albumName = etAlbumName.getText().toString();\n albumGenre = etAddGenre.getText().toString();\n //albumYear = etAddYear.getText().toString();\n albumPosition = etAlbumPosition.getText().toString();\n int albumPositionLibrary = Integer.parseInt(albumPosition);\n numberOfSongs = etAlbumSongs.getText().toString();\n int songNumbers = Integer.parseInt(numberOfSongs);\n artistName = etAddArtist.getText().toString();\n tvError = tvErrorMessage.getText().toString();\n tvErrorMessage.setTextSize(20);\n\n\n error = \"\"; //error message initializer\n\n\n Bundle dateBundle = getDateFromLabel(tvAlbumDate.getText());\n Date eventDate = dateBundle(dateBundle);\n //Artist a = new Artist(artistName);\n\n\n //et1 = (EditText) findViewById(R.id.et1);\n HomeAudioSystem1Controller ar = new HomeAudioSystem1Controller();\n //TextView errorMessage = (TextView) findViewById(R.id.tvErrorMessage);\n\n try {\n ar.createAlbum(eventDate, albumGenre, songNumbers, albumName, albumPositionLibrary, artists.get(spinner1.getSelectedItemPosition()));\n Toast.makeText(getBaseContext(), \"Album Saved\", Toast.LENGTH_LONG).show();\n //discussion board has tips for why you are getting error here\n } catch (InvalidInputException e) {\n tvErrorMessage.setText(e.getMessage());\n }\n\n\n refreshData();\n }",
"@Override\n public void onClick(DialogInterface dialog, int id){\n Toast.makeText(mContext,R.string.uploadRequestOnNoNetwork,Toast.LENGTH_SHORT).show();\n writeSyncPreferences(mContext.getString(R.string.mobiledataString));\n //TODO - call a function that enters records to the SQLite database\n insertRecords();\n\n mContext.startActivity(new Intent(mContext,MainActivity.class));\n ((Activity)mContext).finish();\n\n }"
] | [
"0.7193388",
"0.69667",
"0.6797566",
"0.676242",
"0.6711038",
"0.65392",
"0.6527711",
"0.6423788",
"0.64224744",
"0.6404516",
"0.63973534",
"0.6396858",
"0.63903546",
"0.6373283",
"0.63713706",
"0.634734",
"0.62945324",
"0.6275611",
"0.6254694",
"0.6251154",
"0.6185805",
"0.61696506",
"0.613984",
"0.61041397",
"0.6102864",
"0.60832775",
"0.60706335",
"0.6068807",
"0.6051264",
"0.6041801",
"0.60404515",
"0.602371",
"0.60208863",
"0.60197645",
"0.6012778",
"0.600095",
"0.59984446",
"0.5998394",
"0.59816563",
"0.5967939",
"0.5962483",
"0.5952444",
"0.593113",
"0.5914581",
"0.59126043",
"0.5909576",
"0.5904219",
"0.58957523",
"0.5892648",
"0.588907",
"0.5881155",
"0.587362",
"0.5863249",
"0.584947",
"0.58400655",
"0.5839556",
"0.58347315",
"0.58266085",
"0.5815907",
"0.580968",
"0.5809574",
"0.58085907",
"0.58044755",
"0.5803891",
"0.580037",
"0.5781545",
"0.57797104",
"0.5769418",
"0.5769291",
"0.57677984",
"0.57673734",
"0.57649094",
"0.5756274",
"0.5752527",
"0.5752271",
"0.5751904",
"0.57488763",
"0.5747241",
"0.57396626",
"0.57294273",
"0.5719125",
"0.5711711",
"0.57101303",
"0.5706183",
"0.570338",
"0.5691776",
"0.5673689",
"0.5672848",
"0.5672079",
"0.56694394",
"0.5665144",
"0.56617934",
"0.5656517",
"0.5654158",
"0.56518185",
"0.56503",
"0.5650171",
"0.5637979",
"0.5628774",
"0.562476"
] | 0.7011871 | 1 |
This method uses the URI scheme for showing the alarm on a map. This superhandy intent is detailed in the "Common Intents" page of Android's developer site: see <a" Hint: Hold Command on Mac or Control on Windows and click that link to automatically open the Common Intents page | private void onOpenMapButtonClicked() {
// Create a new intent to start an map activity
Intent mapIntent =
new Intent(DetailActivity.this, MapsActivity.class);
if (mMapDestination != null && mMapDestination.getLocation() != null &&
mMapDestination.getRadius() >= 0) {
MapDestination mapDestination =
new MapDestination(mMapDestination.getLatitude(),
mMapDestination.getLongitude(), mMapDestination.getLocation(),
mMapDestination.getRadius());
mapIntent.putExtra(Constants.EXTRA_ALARM_DESTINATION, mapDestination);
}
startActivityForResult(mapIntent, MAP_REQUEST_CODE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\r\n intent.addCategory(Intent.CATEGORY_DEFAULT);\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK /*| Intent.FLAG_ACTIVITY_CLEAR_TASK*/\r\n /* | Intent.FLAG_ACTIVITY_TASK_ON_HOME*/);\r\n intent.setDataAndType(Uri.parse(\"content://com.android.calendar/\"), \"time/epoch\");\r\n mContext.startActivity(intent);\r\n// if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){\r\n// mContext.startActivity(new Intent(AlarmClock.ACTION_SHOW_ALARMS));\r\n// }else {\r\n// mContext.startActivity(new Intent(AlarmClock.ACTION_SET_ALARM));\r\n// }\r\n }",
"public void createMapIntent(View view){\n Uri uri = Uri.parse(\"geo:0,0?q=\" + Uri.encode(\"12 Community Rd, Allen, Ikeja, Lagos\"));\n\n //Step 2: Create a mapIntent with action \"Intent.ACTION_VIEW\". Pass the data too\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, uri);\n\n //Step 3: Set the package name of the Map App (i.e the unique name of the app)\n //E.g mapIntent.setPackage(\"com.google.android.apps.maps\");\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n\n //Step 4: Check if the Map app is available to ACCEPT this intent, if Map app is available, start the Map Activity\n if(mapIntent.resolveActivity(getPackageManager()) != null){\n startActivity(mapIntent);\n }\n else{\n Toast.makeText(this, \"No available client\", Toast.LENGTH_LONG).show();\n }\n\n }",
"public static void viewAlarms(){\r\n\t\t\r\n\t}",
"@Override\n public void onClick(View v) {\n String label = response.body().getEventList().get(0).getEventName();\n String strUri = \"http://maps.google.com/maps?q=loc:\" + response.body().getEventList().get(0).getEventLatitude() + \",\" + response.body().getEventList().get(0).getEventLongitude() + \" (\" + label + \")\";\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(strUri));\n\n intent.setClassName(\"com.google.android.apps.maps\", \"com.google.android.maps.MapsActivity\");\n\n startActivity(intent);\n\n\n }",
"static final /* synthetic */ void m50993b(ane ane, Map map) {\n PackageManager packageManager = ane.getContext().getPackageManager();\n try {\n try {\n JSONArray jSONArray = new JSONObject((String) map.get(\"data\")).getJSONArray(\"intents\");\n JSONObject jSONObject = new JSONObject();\n for (int i = 0; i < jSONArray.length(); i++) {\n try {\n JSONObject jSONObject2 = jSONArray.getJSONObject(i);\n String optString = jSONObject2.optString(\"id\");\n String optString2 = jSONObject2.optString(\"u\");\n String optString3 = jSONObject2.optString(C42323i.f110089f);\n String optString4 = jSONObject2.optString(C13192m.f34940a);\n String optString5 = jSONObject2.optString(\"p\");\n String optString6 = jSONObject2.optString(\"c\");\n jSONObject2.optString(\"f\");\n jSONObject2.optString(\"e\");\n String optString7 = jSONObject2.optString(\"intent_url\");\n Intent intent = null;\n if (!TextUtils.isEmpty(optString7)) {\n try {\n intent = Intent.parseUri(optString7, 0);\n } catch (URISyntaxException e) {\n URISyntaxException uRISyntaxException = e;\n String str = \"Error parsing the url: \";\n String valueOf = String.valueOf(optString7);\n acd.m45778b(valueOf.length() != 0 ? str.concat(valueOf) : new String(str), uRISyntaxException);\n }\n }\n boolean z = true;\n if (intent == null) {\n intent = new Intent();\n if (!TextUtils.isEmpty(optString2)) {\n intent.setData(Uri.parse(optString2));\n }\n if (!TextUtils.isEmpty(optString3)) {\n intent.setAction(optString3);\n }\n if (!TextUtils.isEmpty(optString4)) {\n intent.setType(optString4);\n }\n if (!TextUtils.isEmpty(optString5)) {\n intent.setPackage(optString5);\n }\n if (!TextUtils.isEmpty(optString6)) {\n String[] split = optString6.split(\"/\", 2);\n if (split.length == 2) {\n intent.setComponent(new ComponentName(split[0], split[1]));\n }\n }\n }\n if (packageManager.resolveActivity(intent, 65536) == null) {\n z = false;\n }\n try {\n jSONObject.put(optString, z);\n } catch (JSONException e2) {\n acd.m45778b(\"Error constructing openable urls response.\", e2);\n }\n } catch (JSONException e3) {\n acd.m45778b(\"Error parsing the intent data.\", e3);\n }\n }\n ((C15836lc) ane).mo39810a(\"openableIntents\", jSONObject);\n } catch (JSONException unused) {\n ((C15836lc) ane).mo39810a(\"openableIntents\", new JSONObject());\n }\n } catch (JSONException unused2) {\n ((C15836lc) ane).mo39810a(\"openableIntents\", new JSONObject());\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = null,chooser = null;\n\t\t\t\tintent = new Intent(android.content.Intent.ACTION_VIEW);\n\t \t\t//For any Action\n\t \t\tintent.setData(Uri.parse(\"geo:27.961429,76.402788\"));\n\t \t\tchooser = Intent.createChooser(intent,\"MAPS Launch\");\n\t \t\tstartActivity(chooser);\n\t\t\t}",
"@Override\n public void onClick(View view) {\n Uri gmmIntentUri = Uri.parse(\"geo:0, 0?q=Animal+Shelter+near+me\");\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n startActivity(mapIntent);\n }",
"protected void showMap() {\n \t\t\n \t\tApplicationData applicationData;\n \t\ttry {\n \t\t\tapplicationData = ApplicationData.readApplicationData(this);\n \t\t\tif(applicationData != null){\n \t\t\t\tIntent intent = getIntent();\n \t\t\t\tNextLevel nextLevel = (NextLevel)intent.getSerializableExtra(ApplicationData.NEXT_LEVEL_TAG);\n \t\t\t\tAppLevelDataItem item = applicationData.getDataItem(this, nextLevel);\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(Utils.hasLength(item.getGeoReferencia())){\n \t\t\t\t\tString urlString = \"http://maps.google.com/maps?q=\" + item.getGeoReferencia() + \"&near=Madrid,Espa�a\";\n \t\t\t\t\tIntent browserIntent = new Intent(\"android.intent.action.VIEW\", \n \t\t\t\t\t\t\tUri.parse(urlString ));\n \t\t\t\t\tstartActivity(browserIntent);\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (InvalidFileException e) {\n \t\t}\n \t}",
"public static void mapRestaurant(Context context,String locationName){\n Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=\" + Uri.encode(locationName));\n //Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=\"+\"40.782747,-73.984022(Eric)\");\n // Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=-33.8666,151.1957(Google+Sydney)\");\n\n// Create an Intent from gmmIntentUri. Set the action to ACTION_VIEW\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n// Make the Intent explicit by setting the Google Maps package\n// Intent intent = mapIntent.setPackage(\"com.google.android.apps.maps\");\n//\n// if (intent==null){\n// if (AppConstant.DEBUG) Log.d(this.getClass().getSimpleName()+\">\",);\n// }\n// Attempt to start an activity that can handle the Intent\n // if (mapIntent.resolveActivity(getPackageManager()) != null) {\n\n PackageManager packageManager = context.getPackageManager();\n List activities = packageManager.queryIntentActivities(mapIntent,\n PackageManager.MATCH_DEFAULT_ONLY);\n boolean isIntentSafe = activities.size() > 0;\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"Activities that can handle this:\"+activities.get(0).toString());\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"Activities that can handle this:\"+activities.size());\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"Can we handle this intent:\"+isIntentSafe);\n\n\n context.startActivity(mapIntent);\n // }\n }",
"@Override\n public void onClick(View view) {\n String geoUri = \"http://maps.google.com/maps?q=loc:\" + 18.5155346 + \",\" + 73.7836165 + \" (\" + \"Manyavar\" + \")\";\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(geoUri));\n mcontext.startActivity(intent);\n\n }",
"protected void startBroadcastLocation() {\n AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n int interval = 5000;\n\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), interval, pendingIntent);\n Toast.makeText(this, \"Alarm Set\", Toast.LENGTH_SHORT).show();\n }",
"private void displayTrack(String source, String destination) {\n\n try{\n Uri uri = Uri.parse(\"https://www.google.co.in/maps/dir/\"+source+\"/\"+destination);\n\n //initialize intent with action view\n Intent intent = new Intent(Intent.ACTION_VIEW,uri);\n\n //set package\n intent.setPackage(\"com.google.android.apps.maps\");\n\n //set flag\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }catch (Exception e){\n //when google map is not installed\n\n //initialize uri\n Uri uri = Uri.parse(\"https://play.google.com/store/apps/details?id=com.google.android.apps.maps\");\n\n //initialize intent\n Intent intent = new Intent(Intent.ACTION_VIEW,uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n\n }\n }",
"private void DisplayTrack(String sSouce, String dDestiny)\n {\n\n try {\n //when google map installed\n // intialize url\n Uri uri = Uri.parse(\"https://www.google.co.in/maps/dir/\" +sSouce + \"/\" +dDestiny);\n\n //Intialize intent with action view\n\n Intent intent = new Intent(Intent.ACTION_VIEW,uri);\n // set pkg\n intent.setPackage(\"com.google.android.apps.maps\");\n\n // set flag\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n\n }catch (ActivityNotFoundException e)\n {\n // when google map is not install\n // set uri\n Uri uri = Uri.parse(\"https://play.google.com/store/apps/details?id=com.google.android.apps.maps\");\n // intialize intent with action view\n Intent intent = new Intent(Intent.ACTION_VIEW,uri);\n // set flag\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n // start acivity\n startActivity(intent);\n\n }\n\n\n }",
"@GET\n @Path(\"{thingName}/{status}\")\n @Produces(MediaType.APPLICATION_JSON)\n public String recieveAlarm(@PathParam(\"thingName\") String thingName, \n @PathParam(\"status\") String status,@Context UriInfo info) {\n\n MultivaluedMap queryMap = info.getQueryParameters();\n Iterator itr = queryMap.keySet().iterator();\n HashMap<String, String> dataMap = new HashMap<>(); \n while(itr.hasNext()){\n Object key = itr.next();\n Object value = queryMap.getFirst(key);\n dataMap.put(key.toString(), value.toString());\n }\n ThingInfoMap thingInfoMap = new ThingInfoMap(thingName, new Timestamp(new Date().getTime()).toString(),status);\n thingInfoMap.setContent(dataMap);\n \n int alarmID = database.addAlarm(thingInfoMap);\n Dweet newDweet;\n if(alarmID != -1){\n thingInfoMap.setAlarmID(alarmID);\n newDweet = new Dweet(\"succeeded\", \"sending\", \"alarm\", thingInfoMap);\n newDweet.setTo(\"myMobileA\"); // it's not included in database\n String warningMsg = gson.toJson(newDweet);\n //send alarm to mobile use GCM\n sendToMobileByGCM(warningMsg);\n return warningMsg;\n } else {\n newDweet = new Dweet(\"failed\", \"alarm is failed to added\");\n return gson.toJson(newDweet);\n }\n\n }",
"@Override\n public void onClick(View v) {\n Uri gmmIntentUri = Uri.parse(\"geo:37.7749,-122.4194\");\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n startActivity(mapIntent);\n }",
"public void intentForQuestion4 (View view){\n Intent question4 = new Intent(android.content.Intent.ACTION_VIEW,\n Uri.parse(\"https://www.google.pl/maps/place/Cape+Canaveral+Air+Force+Station/@28.4880013,-80.5730528,1691m/data=!3m1!1e3!4m5!3m4!1s0x88e0a4e74e6a8abb:0x2a16683cb4a44f!8m2!3d28.4886723!4d-80.5728241\"));\n startActivity(question4);\n }",
"@Override\n public void onClick(View v) {\n String label = \"Route for \" + namemark;\n String uriBegin = \"geo:\" + latl + \",\" + long1;\n String query = latl + \",\" + long1 + \"(\" + label + \")\";\n String encodedQuery = Uri.encode(query);\n String uriString = uriBegin + \"?q=\" + encodedQuery + \"&z=16\";\n Uri uri = Uri.parse(uriString);\n try {\n Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri);\n startActivity(intent);\n } catch (Exception e) {\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Update Your Google Map\", Toast.LENGTH_LONG).show();\n }\n }",
"public void showMap(Uri geoLocation) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(geoLocation);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }",
"@Override\n public void onClick(View v) {\n Intent i = new Intent(ShakeActivity.this, JournalEntry.class);\n i.putExtra(\"ENTRY_TIME\", AlarmReceiver.getMidnight());\n startActivity(i);\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n try{\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"market://details?id=com.google.android.apps.maps\")));\n } catch (android.content.ActivityNotFoundException anfe) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://play.google.com/store/apps/details?id=com.google.android.apps.maps\")));\n }\n builder.show();\n }",
"public synchronized static Uri newAlarm(Context context) {\n return context.getContentResolver().insert(\n Uri.parse(CONTENT_URI_ALL_ALARMS), null);\n }",
"@Override\n public void onClick(View v) {\n String id = (String) mapTmp.get(\"id\");\n Intent intent = new Intent(MapActivity.this, ViewMeetingActivity.class);\n intent.putExtra(\"id\", id);\n startActivity(intent);\n }",
"@Override\n public void onClick(View view) {\n Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=\" + selected_location);\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n if (mapIntent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(mapIntent);\n }\n }",
"private void openPreferredLocationMap()\n\t{\n\n\t\tif (_forecastAdapter != null)\n\t\t{\n\t\t\tCursor cursor = _forecastAdapter.getCursor();\n\n\t\t\tif (cursor != null)\n\t\t\t{\n\t\t\t\tcursor.moveToPosition(0);\n\n\t\t\t\tString posLat = cursor.getString(COL_COORD_LAT);\n\t\t\t\tString posLong = cursor.getString(COL_COORD_LONG);\n\n\t\t\t\tUri geoLocation = Uri.parse(\"geo:\" + posLat + \",\" + posLong);\n\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW);\n\t\t\t\tintent.setData(geoLocation);\n\n\t\t\t\tif (intent.resolveActivity(getActivity().getPackageManager()) != null)\n\t\t\t\t{\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tTraceUtil.logD(CLASS_NAME, \"openPreferredLocationMap\",\n\t\t\t\t\t\t\t\"Couldn't call \" + geoLocation.toString() +\n\t\t\t\t\t\t\t\t\t\", no receiving apps installed!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onClick(View view) {\n Intent intent = AlarmPagerActivity.newIntent(sApplicationContext, mAlarm.getId());\n startActivity(intent);\n }",
"@Override\n\tpublic void onClick(DialogInterface dialog, int which) {\n\t\tif(which == AlertDialog.BUTTON_POSITIVE) {\n\t\t\ttry{\n\t\t\t\t//If there is no reminder then carry on as usual\n\t\t\t\tif(destinationLocation == null) {\n\t\t\t\t\t//Push the current location to the back-end server as a JSON object.\n\t\t\t\t\tBestLocationFinder finder = new BestLocationFinder(getApplicationContext(),LocationManager.NETWORK_PROVIDER,false);\n\t\t\t\t\tfinder.getBestLocation(System.currentTimeMillis(),0);\n\t\t\t\t\tLocation loc = Common.getLocation();\n\t\t\t\t\tif (loc == null) {\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Location Fix not obtained, Application closing\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t\tString locString = String.valueOf(loc.getLatitude()) + \",\" + String.valueOf(loc.getLongitude());\n\t\t\t\t\t//String locString = \"12.981596\" + \",\" + \"77.628913\";\n\t\t\t\t\tconnectionHelper = new HttpConnectionHelper();\n\t\t\t\t\tJSONObject obj = new JSONObject();\n\t\t\t\t\tobj.put(\"id\", myNumber);\n\t\t\t\t\tobj.put(\"loc\", locString);\n\t\t\t\t\tconnectionHelper.postData(Common.URL + \"/id=\" + Common.MY_ID, obj);\n\t\t\t\t\tIntent mapIntent = new Intent(getApplicationContext(), CommonMapActivity.class);\n\t\t\t\t\tmapIntent.putExtra(\"singleusermode\", false);\n\t\t\t\t\tstartActivity(mapIntent);\n\t\t\t\t\t//If there is a reminder (date != null) then setup the alarmreceiver\n\t\t\t\t} else {\n\t\t\t\t\tCommon.setAddressLocationLatLng(destinationLocation);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tCalendar c = Calendar.getInstance(Locale.getDefault());\n\t\t\t\t\tc.set(Calendar.MINUTE, min);\n\t\t\t\t\tc.set(Calendar.HOUR, hour);\n\t\t\t\t\tc.set(Calendar.DAY_OF_MONTH, day);\n\t\t\t\t\tc.set(Calendar.MONTH, month);\n\t\t\t\t\tc.set(Calendar.YEAR, year);\n\t\t\t\t\tCommon.setDestinationTime(c);\n\t\t\t\t\t// Set the common date as well.\n\t\t\t\t\t/*\n\t\t\t\t\tIntent intent = new Intent(this, AlarmReceiver.class);\n\t\t\t\t\tPendingIntent pIntent = PendingIntent.getBroadcast(getApplicationContext(), 11111, intent, PendingIntent.FLAG_CANCEL_CURRENT);\n\t\t\t\t\tAlarmManager manager = (AlarmManager) getSystemService(ALARM_SERVICE);\n\t\t\t\t\tlong frequency = Common.AlARM_INTERVAL;\n\t\t\t\t\tmanager.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), frequency, pIntent);\n\t\t\t\t\t*/\n\t\t\t\t\tSetAlarm.setRepeatingAlarm(getApplicationContext(), myNumber);\n\t\t\t\t\tsetResult(Common.CANCEL_ALL);\n\t\t\t\t\tfinish();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else if(which == AlertDialog.BUTTON_NEGATIVE) {\n\t\t\tSetAlarm.cancelRepeatingAlarm();\n\t\t\tfinish();\n\t\t}\n\t\t\n\t}",
"@Override\n public void onClick(View v) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.forecast_io_url)));\n startActivity(browserIntent);\n }",
"public void setOneTime(View view) {\n Intent intent = new Intent(this, CreateOneTimeAlarm.class);\n startActivity(intent);\n }",
"public static Uri getAlarmUri(final long alarmId) {\n if(alarmId == -1) {\n return Uri.parse(CONTENT_URI_ALL_ALARMS);\n } else {\n return Uri.parse(CONTENT_URI_ALL_ALARMS + \"/\" + alarmId);\n }\n }",
"void doShowUri()\n\t{\n\t\ttry\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tsb.append(\"URI = \"); //$NON-NLS-1$\n\t\t\tsb.append( m_session.getURI() );\n\t\t\tout( sb.toString() );\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noUriReceived\")); //$NON-NLS-1$\n\t\t}\n\t}",
"@Override\n public void onClick(View view) {\n //Convert the String URL into a URI object (to pass into the Intent constructor)\n Uri newsUri = Uri.parse(url);\n\n // Create a new intent to view the earthquake URI\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, newsUri);\n\n // Send the intent to launch a new activity\n startActivity(websiteIntent);\n }",
"void mo21580A(Intent intent);",
"@Override\n public void onClick(View v) {\n calendar.set(Calendar.HOUR_OF_DAY, alarm_timepicker.getHour());\n calendar.set(Calendar.MINUTE, alarm_timepicker.getMinute());\n\n // getting the int values of the hour and minute\n int hour = alarm_timepicker.getHour();\n int minute = alarm_timepicker.getMinute();\n\n //converting the int values to strings\n String hour_string = String.valueOf(hour);\n String minute_string = String.valueOf(minute);\n\n // 10:4 -> 10:04\n if (minute < 10) {\n minute_string = \"0\" + String.valueOf(minute);\n }\n\n // method that changes the update text Textbox\n set_alarm_text(\"Alarm set to: \" + hour_string + \":\" + minute_string);\n\n\n // put in extra string into my_intent\n // tells the clock that you pressed the \"alarm on\" button\n my_intent.putExtra(\"extra\", \"alarm on\");\n\n //put in an extra long value into my intent\n //tells the clock that you want a certain value from the\n // dropdown menu/spinners\n my_intent.putExtra(\"alarm_choice\", choose_alarm_sound);\n\n // create a pending intent that delays the intent\n // until the specified calendar time\n pending_intent = PendingIntent.getBroadcast(MainActivity.this, 0, my_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //set the alarm manager\n alarm_manager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pending_intent);\n\n }",
"private void startPopup(Context context, Long id) {\n\n //Intent emaIntent = new Intent(context, VoiceRecognitionActivity.class); //The activity you want to start.\n //Intent emaIntent = new Intent(context, PopupActivity.class); //The activity you want to start.\n //Log.d(\"Alarm receiver\", \"received intent\");\n Random random = new Random();\n int value = random.nextInt(1);\n Intent emaIntent = new Intent(context, PopupActivity.class);\n emaIntent.putExtra(\"pos\", id);\n\n\n\n// if (value == 1) {\n// emaIntent = new Intent(context, PopupActivity.class); //The activity you want to start.\n// } else {\n// emaIntent = new Intent(context, VoiceRecognitionActivity.class);\n// }\n\n\n\n emaIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(emaIntent);\n }",
"public void startTestCalendar (View view) {\n Intent intent= new Intent();\n intent.setAction(\"com.example.myfirstapp_withsplashscreen.TEST_CALENDAR\");\n sendBroadcast(intent);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.newalarm);\n\n loadAfterRedirect();\n if (getIntent().getIntExtra(\"Id\", -1) != -1) {\n //Put everything to text, delete old view with this id\n Button timeHourButton = (Button) findViewById(R.id.timeHourButton);\n Button timeMinuteButton = (Button) findViewById(R.id.timeMinuteButton);\n EditText alarmName = (EditText) findViewById(R.id.alarmName);\n TextView dateContent = (TextView) findViewById(R.id.dateContent);\n SeekBar volumeBar = (SeekBar) findViewById(R.id.volumeBar);\n Button toneButton = (Button) findViewById(R.id.toneButton);\n\n FName = getIntent().getStringExtra(\"Tone\");\n String[] UFFName = FName.split(\"/\");\n\n timeHourButton.setText(getIntent().getStringExtra(\"Hour\"));\n timeMinuteButton.setText(getIntent().getStringExtra(\"Minute\"));\n alarmName.setText(getIntent().getStringExtra(\"Name\"));\n volumeBar.setProgress(getIntent().getIntExtra(\"Volume\", 75));\n toneButton.setText(\"Alarm tone: \" + UFFName[UFFName.length - 1]);\n dateContent.setText(Date);\n\n Hours = Integer.parseInt(getIntent().getStringExtra(\"Hour\"));\n Minutes = Integer.parseInt(getIntent().getStringExtra(\"Minute\"));\n Date = getIntent().getStringExtra(\"Date\");\n AlarmType = getIntent().getIntExtra(\"Type\", 0);\n\n //Only location is missing.\n } else {\n\n String curDayS;\n String curMonthS;\n Calendar c = Calendar.getInstance();\n\n int Minute = c.get(Calendar.MINUTE);\n int Hour = c.get(Calendar.HOUR_OF_DAY);\n\n int curDay = c.get(Calendar.DAY_OF_MONTH);\n int curMonth = c.get(Calendar.MONTH) + 1;\n int curYear = c.get(Calendar.YEAR);\n\n if (curDay < 10)\n curDayS = \"0\" + curDay;\n else\n curDayS = \"\" + curDay;\n\n if (curMonth < 10)\n curMonthS = \"0\" + curMonth;\n else\n curMonthS = \"\" + curMonth;\n\n\n String Hourstring = Integer.toString(Hour);\n String Minutestring = Integer.toString(Minute);\n\n if (Integer.toString(Hour).length() == 1) {\n Hourstring = \"0\" + Integer.toString(Hour);\n }\n\n if (Integer.toString(Minute).length() == 1) {\n Minutestring = \"0\" + Integer.toString(Minute);\n }\n\n\n Date = curDayS + \"-\" + curMonthS + \"-\" + curYear;\n final String CurrentTime = Hourstring + \":\" + Minutestring;\n }\n }",
"@OnClick({R.id.address_img, R.id.address})\n void OnClickMap() {\n // Open location on map\n Intent mapIntent=new Intent(Intent.ACTION_VIEW);\n mapIntent.setData(Uri.parse(\"geo:0,0?q=\" + getString(R.string.latitude) + \",\"\n + getString(R.string.longitude)));\n if (mapIntent.resolveActivity(getPackageManager()) != null) {\n startActivity(mapIntent);\n }\n }",
"static final /* synthetic */ void m50994c(ane ane, Map map) {\n String str = (String) map.get(\"urls\");\n if (TextUtils.isEmpty(str)) {\n acd.m45783e(\"URLs missing in canOpenURLs GMSG.\");\n return;\n }\n String[] split = str.split(\",\");\n HashMap hashMap = new HashMap();\n PackageManager packageManager = ane.getContext().getPackageManager();\n for (String str2 : split) {\n String[] split2 = str2.split(\";\", 2);\n boolean z = true;\n if (packageManager.resolveActivity(new Intent(split2.length > 1 ? split2[1].trim() : \"android.intent.action.VIEW\", Uri.parse(split2[0].trim())), 65536) == null) {\n z = false;\n }\n hashMap.put(str2, Boolean.valueOf(z));\n }\n ((C15836lc) ane).mo39809a(\"openableURLs\", (Map<String, ?>) hashMap);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i_Alert = new Intent(AndroidExamples.this, Location.class);\n\t\t\t\tstartActivity(i_Alert);\n\t\t\t}",
"private void setAlarmData(Intent intent) {\n if (mAlarmId == Constants.DEFAULT_ALARM_ID) {\n\n mAlarmId = intent.getIntExtra(Constants.EXTRA_ALARM_ID, Constants.DEFAULT_ALARM_ID);\n // factory view model is used for sending parameters to the view model in our case\n // with alarm entry id to make sure we have one entity on our viewModel\n DetailViewModelFactory factory = new DetailViewModelFactory(mDb, mAlarmId);\n mViewModel =\n ViewModelProviders.of(this, factory).get(DetailViewModel.class);\n\n // Observe changes in model in order to update UI\n mViewModel.getAlarm().observe(this, new Observer<AlarmEntry>() {\n @Override\n public void onChanged(@Nullable AlarmEntry alarmEntry) {\n mViewModel.getAlarm().removeObserver(this);\n if (alarmEntry == null) {\n return;\n }\n mAlarmId = alarmEntry.getId();\n mMapDestination =\n new MapDestination(alarmEntry.getLatitude(), alarmEntry.getLongitude(),\n alarmEntry.getLocation(), alarmEntry.getRadius());\n mAlarmRingtone = alarmEntry.getAlert() != null ? Uri.parse(alarmEntry.getAlert()) : null;\n\n // populate the UI\n populateUI(alarmEntry);\n }\n });\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tIntent intent = new Intent(android.content.Intent.ACTION_VIEW, \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t Uri.parse(\"http://maps.google.com/maps?saddr=\"+slat+\",\"+slong+\"&daddr=\"+dlat+\",\"+dlong));\n\t\t\t\t\tintent.setComponent(new ComponentName(\"com.google.android.apps.maps\", \"com.google.android.maps.MapsActivity\"));\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\n\t\t\treturn;\n\t\t\t\t}catch(NullPointerException e)\n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent\tin=new Intent(Intent.ACTION_VIEW,Uri.parse(uri2));\n\t\t\t\tstartActivity(in);\n\t\t\t\t\n\t\t\t}",
"public void alarmToneButton_click(View view) {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(intent, 10);\n }",
"public static HashMap<Uri, AlarmDetails> retrieveAllAlarms(Context context) {\r\n\r\n AlarmDetails alarmDetails = null;\r\n //get shared preference file name ALARM_STORE_FILE_NAME\r\n // using the file name which should be unique\r\n SharedPreferences sharedPreferences =\r\n context.getSharedPreferences(StringConstants.ALARM_STORE_FILE_NAME,\r\n Context.MODE_PRIVATE);\r\n\r\n //Map for creating a set of values from shared preferences file\r\n Map<String, ?> alarms = sharedPreferences.getAll();\r\n //creating a HashMap of Uri and AlarmDetail for storing the set\r\n // which is created from the set by the shared preference file\r\n\r\n HashMap<Uri, AlarmDetails> outStoredAlarms = new HashMap<>();\r\n\r\n Set<String> keySet = alarms.keySet();\r\n\r\n for (String keyUri : keySet) {\r\n try {\r\n //parsing uri from Uri for Key generation\r\n Uri uri = Uri.parse(keyUri);\r\n //details in string for value\r\n String details = (String) alarms.get(keyUri);\r\n\r\n Logger.debug(\"ALARM\", \"ALARM: \" + uri + \",\" + details);\r\n\r\n alarmDetails = new Gson().fromJson(details, AlarmDetails.class);\r\n outStoredAlarms.put(uri, alarmDetails);\r\n } catch (ClassCastException | NullPointerException | JsonIOException exception) {\r\n exception.printStackTrace();\r\n continue;\r\n }\r\n }\r\n return outStoredAlarms;\r\n\r\n }",
"public void toNeedymap (View v){\n Intent i = new Intent(Startup_menu_activity.this,web_page.class);\n startActivity(i);\n }",
"@Override // com.oppo.enterprise.mdmcoreservice.utils.defaultapp.DefaultApp\n public List<Intent> getIntentList() {\n List<Intent> intentList = new ArrayList<>();\n for (int i = 0; i < DEFAULT_MATCH_TYPE_LIST.size(); i++) {\n for (int j = 0; j < DEFAULT_SCHEME_LIST.size(); j++) {\n for (int k = 0; k < DEFAULT_URI_DATA_TYPE_LIST.size(); k++) {\n Intent intent = new Intent(\"android.intent.action.VIEW\");\n intent.addCategory(\"android.intent.category.DEFAULT\");\n StringBuffer sb = new StringBuffer();\n sb.append(DEFAULT_SCHEME_LIST.get(j));\n sb.append(\"://\");\n sb.append(DEFAULT_URI_DATA_TYPE_LIST.get(k));\n intent.setDataAndType(Uri.parse(sb.toString()), null);\n intentList.add(intent);\n }\n }\n }\n Intent intent2 = new Intent(\"android.intent.action.VIEW\");\n intent2.addCategory(\"android.intent.category.DEFAULT\");\n intent2.setDataAndType(Uri.parse(\"http://dn1.dn2.dn3\"), null);\n intentList.add(intent2);\n Intent intent3 = new Intent(\"android.intent.action.VIEW\");\n intent3.addCategory(\"android.intent.category.DEFAULT\");\n intent3.setDataAndType(Uri.parse(\"http://dn1.dn2.dn3/...\"), null);\n intentList.add(intent3);\n Intent intent4 = new Intent(\"android.intent.action.VIEW\");\n intent4.addCategory(\"android.intent.category.DEFAULT\");\n intent4.setDataAndType(Uri.parse(\"https://dn1.dn2.dn3/...\"), null);\n intentList.add(intent4);\n return intentList;\n }",
"private void onContactAddressClicked() {\n Uri geoLocation = Uri.parse(\"geo:0,0?q=\" +\n Uri.encode(this.contact.getStreet()) + \", \" +\n Uri.encode(Integer.toString(this.contact.getZip())) + \" \" +\n Uri.encode(this.contact.getCity()) + \", \" +\n Uri.encode(this.contact.getCanton())\n );\n Log.d(\"ShowContactActivity\", \"Parsed URI for Maps: \" + geoLocation.toString());\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(geoLocation);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }",
"@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tString url = \"https://twitter.com/intent/tweet?text=My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out Guessin by @nfnlabs:&url=\"+Uri.parse(\"http://goo.gl/CGmGEx\");\n\t\t\t\t\t\tIntent intent=new Intent(Intent.ACTION_VIEW);\n\t\t\t\t\t\tUri uri=Uri.parse(url);\n\t\t\t\t\t\tintent.setData(uri);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}",
"public void showSchedule(View view) {\n Intent intent = new Intent(this, DisplaySchedule.class);\n startActivity(intent);\n }",
"public void viewAlarm() {\n\t\tfinal Dialog dialog = new Dialog(this);\n\t\tdialog.setContentView(R.layout.date_time_picker);\n\t\tdialog.setTitle(\"Set Reminder\");\n\t\tButton saveDate = (Button)dialog.findViewById(R.id.btnSave);\n\t\tsaveDate.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t\tsetAlarm(dialog);\n\t\t\t}\n\t\t});\n\t\tdialog.show();\n\t}",
"public static void openPlayStoreEntry()\n\t{\n\t\tApp.getInstance().startActivity(new Intent(Intent.ACTION_VIEW)\n\t\t\t\t.setData(Uri.parse(\"market://details?id=\" + General.PKG_MESSENGERAPI+\"&referrer=utm_source%3D\"+App.getInstance().getPackageName()+\"%26utm_medium%3DAPIMethod%26utm_campaign%3DAPICampaign\"))\n\t\t\t\t.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == RINGTONE_PICKER_REQUEST_CODE && resultCode == Activity.RESULT_OK ){\n mAlarmRingtone = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);\n setRingtoneName();\n }\n if (requestCode == MAP_REQUEST_CODE) {\n if (data != null && data.hasExtra(Constants.EXTRA_ALARM_DESTINATION)) {\n // get coordinates (from intent)\n mMapDestination = data.getParcelableExtra(Constants.EXTRA_ALARM_DESTINATION);\n }\n }\n updateMapImage(false);\n }",
"public void setAlarm(int time, String name){\n\t}",
"Uri mo1686a();",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=\" + location.get(position).getAddress() + \", Madrid, Spain\");\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n startActivity(mapIntent);\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\tString url = \"http://maps.google.com/maps?\"\n\t\t\t\t\t\t\t\t\t\t\t+ \"daddr=\" + place.lat + \",\"\n\t\t\t\t\t\t\t\t\t\t\t+ place.longit;\n\t\t\t\t\t\t\t\t\tIntent mapIntent = new Intent(\n\t\t\t\t\t\t\t\t\t\t\tIntent.ACTION_VIEW, Uri.parse(url));\n\t\t\t\t\t\t\t\t\tstartActivity(mapIntent);\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t.parse(\"http://maps.google.com/maps?f=d&daddr=\"\n\t\t\t\t\t\t\t\t+ lot.getLatitude() + \",\" + lot.getLongitude()\n\t\t\t\t\t\t\t\t+ \" (Lot \" + lot.getName() + \")\"));\n\t\t\t\tintent.setComponent(new ComponentName(\n\t\t\t\t\t\t\"com.google.android.apps.maps\",\n\t\t\t\t\t\t\"com.google.android.maps.MapsActivity\"));\n\t\t\t\tmContext.startActivity(intent);\n\t\t\t}",
"public void sendDelivery(View view) {\n Intent intent = new Intent(android.content.Intent.ACTION_VIEW,\n Uri.parse(\"http://maps.google.com/maps?saddr=enter your location&daadr=enter your destination\"));\n startActivity(intent);\n }",
"@Override\n public void onClick(View view) {\n Intent Getintent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://feedback.avriant.com\"));\n startActivity(Getintent);\n }",
"private void openUri() {\n try {\n Desktop.getDesktop().browse(new URI(\"http://localhost:\" + Constants.DEFAULT_PORT));\n } catch (URISyntaxException | IOException e) {\n logger.error(\"MainService error [openUri]: \" + e);\n }\n }",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\t\t\tIntent intent = new Intent(Intent.ACTION_EDIT);\n\t\t\t\t\t\tintent.setType(\"vnd.android.cursor.item/event\");\n\t\t\t\t\t\tintent.putExtra(\"beginTime\", cal.getTimeInMillis());\n\t\t\t\t\t\tintent.putExtra(\"allDay\", true);\n\t\t\t\t\t\tcontext.startActivity(intent);\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\t\t\tIntent intent = new Intent(Intent.ACTION_EDIT);\n\t\t\t\t\t\tintent.setType(\"vnd.android.cursor.item/event\");\n\t\t\t\t\t\tintent.putExtra(\"beginTime\", cal.getTimeInMillis());\n\t\t\t\t\t\tintent.putExtra(\"allDay\", true);\n\t\t\t\t\t\tcontext.startActivity(intent);\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\t\t\tIntent intent = new Intent(Intent.ACTION_EDIT);\n\t\t\t\t\t\tintent.setType(\"vnd.android.cursor.item/event\");\n\t\t\t\t\t\tintent.putExtra(\"beginTime\", cal.getTimeInMillis());\n\t\t\t\t\t\tintent.putExtra(\"allDay\", true);\n\t\t\t\t\t\tcontext.startActivity(intent);\n\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\tIntent\tin=new Intent(Intent.ACTION_VIEW,Uri.parse(uri));\n\t\t\t\tstartActivity(in);\n\t\t\t}",
"public void startAlarm(Context context){\n Intent intent = new Intent(this,MonthlyReminderService.class);\n int received = intent.getIntExtra(\"recieved\", 0);\n intent.putExtra(\"received\", received);\n //int type = intent.getIntExtra(\"type\", 0);\n //Log.e(\"SurveyType\", Integer.toString(type));\n //intent.putExtra(\"type\", type);\n //intent.putExtra(\"date\", surveyDate);\n //intent.putExtra(\"type\", \"Health Literacy\");\n //Calendar now = Calendar.getInstance();\n //intent.putExtra(\"dayofYear\",now.get(Calendar.DAY_OF_YEAR));\n startService(intent);\n }",
"@Override\n public void onMapLongClick(LatLng latLng) {\n\n alertWebsiteIntent();\n\n }",
"protected void startMap(){\n Intent activityChangeIntent = new Intent(MainActivity.this, MapActivity.class);\n startActivity(activityChangeIntent);\n }",
"private void launchSelectClearableCalendars() {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setClass(mContext, SelectClearableCalendarsActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n mContext.startActivity(intent);\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tstartActivity(new Intent(\"com.calendar.TODOLIST\"));\n\t\t\t}",
"void displayUrl(java.lang.String r8) {\n /*\n r7 = this;\n r4 = \"AirpushSDK\";\n r5 = \"Pushing Web and App Ads.....\";\n android.util.Log.i(r4, r5);\n r3 = \"com.android.browser\";\n r0 = \"com.android.browser.BrowserActivity\";\n r2 = new android.content.Intent;\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r4 = \"android.intent.action.VIEW\";\n r5 = android.net.Uri.parse(r8);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r2.<init>(r4, r5);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r4 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r2.setFlags(r4);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r4 = 8388608; // 0x800000 float:1.17549435E-38 double:4.144523E-317;\n r2.addFlags(r4);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r4 = \"android.intent.category.LAUNCHER\";\n r2.addCategory(r4);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r2.setClassName(r3, r0);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r4 = r7.context;\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r4.startActivity(r2);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n L_0x002d:\n return;\n L_0x002e:\n r1 = move-exception;\n r4 = \"AirpushSDK\";\n r5 = \"Browser not found.\";\n android.util.Log.i(r4, r5);\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r4 = new android.content.Intent;\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r5 = \"android.intent.action.VIEW\";\n r6 = android.net.Uri.parse(r8);\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r4.<init>(r5, r6);\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r7.intent = r4;\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r4 = r7.intent;\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r5 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r4.setFlags(r5);\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r4 = r7.intent;\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r5 = 8388608; // 0x800000 float:1.17549435E-38 double:4.144523E-317;\n r4.addFlags(r5);\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r4 = r7.context;\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r5 = r7.intent;\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r4.startActivity(r5);\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n goto L_0x002d;\n L_0x0059:\n r1 = move-exception;\n r4 = \"AirpushSDK\";\n r5 = new java.lang.StringBuilder;\n r5.<init>();\n r6 = \"Error whlie displaying push ad......: \";\n r5 = r5.append(r6);\n r6 = r1.getMessage();\n r5 = r5.append(r6);\n r5 = r5.toString();\n android.util.Log.e(r4, r5);\n goto L_0x002d;\n L_0x0077:\n r1 = move-exception;\n r1.printStackTrace();\n goto L_0x002d;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.srortn.bsiubt135868.HandleClicks.displayUrl(java.lang.String):void\");\n }",
"public void getDirections (View view){\n Intent directionsIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://maps.google.com/maps?saddr=\" + intent.getDoubleExtra(\"engineerLatitude\", 0) + \",\" + intent.getDoubleExtra(\"engineerLongitude\", 0) + \"&daddr=\" + intent.getDoubleExtra(\"reportLatitude\", 0) + \",\" + intent.getDoubleExtra(\"reportLongitude\", 0)));\n\n startActivity(directionsIntent);\n\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), MapActivity.class);\n startActivity(intent);\n }",
"public void openMapActivity() {\n Log.d(\"StartActivity\", \"opening map activity\");\n Intent intent = new Intent(this, MapsActivity.class);\n startActivity(intent);\n finish();\n }",
"@Override public void onClick(View arg0) {\n Intent intent = new Intent(OweActivity.this, SetReminder.class);\n startActivity(intent);\n }",
"@Override public void onClick(View arg0) {\n Intent intent = new Intent(OweActivity.this, SetReminder.class);\n startActivity(intent);\n }",
"public void allinfo()\n\t\t{\n\t\t\tsendBroadcast(new Intent(\"android.provider.Telephony.SECRET_CODE\", Uri.parse(\"android_secret_code://4636\")));\n\n\n\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tstartActivity(new Intent(\"com.calendar.SYNCHRONOUS\"));\n\t\t\t}",
"public void alarmOn() throws RemoteHomeConnectionException {\n m.sendCommand(getDeviceId(), \"ala\");\n setAlarmStatus(AlarmStatus.ALARM_ENABLED);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.twitter.com/mrinalk73720345\")));\n\t\t\t}",
"public /* synthetic */ void m125680a(View view) {\n ((ZAEvent) ZA.m91648f().mo87656a(5445)).mo87711a(C31346k.EnumC31349c.OpenUrl).mo87673e();\n if (!GuestUtils.isGuest(C14429k.m72947m(this.f90217G.mo110112h()), (int) R.string.dlr, (int) R.string.dlr, getActivity(), $$Lambda$TopicFragment$pJhwzwm7hUwPuVqN63c1CdTuzA.INSTANCE) && BindPhoneUtils.isBindOrShow(getFragmentActivity())) {\n FeedBackQuestionHelper.m123836a(this.f90217G.mo110108d(), mo69216f());\n }\n }",
"private void navigateToMoodHistoryMapFragment() {\n // open nav drawer\n solo.clickOnImageButton(0);\n\n // get maps item\n String label = rule.getActivity().getString(R.string.mood_history_map_label);\n\n // navigate to follow request\n assertTrue(solo.waitForText(label, 1, 2000));\n solo.clickOnText(label);\n }",
"void onMapFragmentInteraction(Uri uri);",
"@Override\r\n\t\tpublic void onClick(View arg0) {\n\t\t Intent intent =new Intent(Intent.ACTION_CALL);\r\n\t\t intent.setData(Uri.parse(\"tel:108\"));\r\n\t\t startActivity(intent);\r\n\t\t}",
"@Override\n public void onMapLongClick(LatLng latLng) {\n Toast.makeText(getApplicationContext(),R.string.maps_onmaplongclick,Toast.LENGTH_SHORT).show();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent i = new Intent(getApplicationContext(),SettingsActivity.class);\n startActivity(i);\n }\n }, 700);\n }",
"public void funcionAppian(View v){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(\"https://ustglobalspaindemo.appiancloud.com/suite/tempo/news\"));\n if(intent.resolveActivity(getPackageManager())!= null){\n startActivity(intent);\n }\n }",
"@Override\n public void onClick(View v) {\n if(v.getId() == R.id.alarmCheck){\n // Put extras for RingtoneService\n myIntent.putExtra(\"extra\", \"no\");\n myIntent.putExtra(\"extra1\", \"main\");\n cal = Calendar.getInstance();\n // Get the time for the alarm at the index\n String tempTime = App.getTimes().get(indexofIntent);\n String[] times = tempTime.split(\":\");\n // Get the hour and minute from the string and set them to int\n int hour = Integer.parseInt(times[0]);\n int minute = Integer.parseInt(times[1]);\n // Set the alarm time\n cal.setTimeInMillis(System.currentTimeMillis());\n cal.set(Calendar.HOUR_OF_DAY, hour);\n cal.set(Calendar.MINUTE, minute);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n // State pattern used here\n state = new CreateState();\n manager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // add 24 hours\n cal.setTimeInMillis(cal.getTimeInMillis() + 86400000);\n // set the reciever\n Intent intent = new Intent(this.getApplicationContext(), AlarmReceiver.class);\n intent.putExtra(\"extra\", \"yes\");\n intent.putExtra(\"index\", indexofIntent);\n // Create a new intent\n PendingIntent pending = PendingIntent.getBroadcast(this.getApplicationContext(), App.getIds(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n // Overwrite the correct intent at the index\n App.setIntentAtIndex(indexofIntent, pending);\n App.setIds(App.getIds() + 1);\n // Handle the alarm\n // State pattern used here\n state.handle(manager, pending, cal, false);\n // Turn off ringtone\n sendBroadcast(myIntent);\n\n }\n // If snoozed then stop the media player and set the timer/calendar to 10 minutes\n else if(v.getId() == R.id.snooze){\n // Put extras for RingtoneService\n myIntent.putExtra(\"extra\", \"no\");\n myIntent.putExtra(\"extra1\", \"main\");\n // initialize AlarmManager\n manager = (AlarmManager) getSystemService(ALARM_SERVICE);\n // set the state\n // State pattern used here\n state = new SnoozeState();\n cal = Calendar.getInstance();\n // Get the time the alarm was set\n String tempTime = App.getTimes().get(indexofIntent);\n String[] times = tempTime.split(\":\");\n int hour = Integer.parseInt(times[0]);\n int minute = Integer.parseInt(times[1]);\n // Set calendar to time initially set\n cal.setTimeInMillis(System.currentTimeMillis());\n cal.set(Calendar.HOUR_OF_DAY, hour);\n cal.set(Calendar.MINUTE, minute);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n // Create a new intent for alarm receiver\n Intent intent = new Intent(this.getApplicationContext(), AlarmReceiver.class);\n // Add extras for RingtoneService\n intent.putExtra(\"extra\", \"yes\");\n intent.putExtra(\"index\", indexofIntent);\n // Create a new intent wiht the BroadcastReceiver\n PendingIntent pending = PendingIntent.getBroadcast(this.getApplicationContext(), App.getIds(), intent, PendingIntent.FLAG_UPDATE_CURRENT);\n // Set the new intent in the list\n App.setIntentAtIndex(indexofIntent, pending);\n App.setIds(App.getIds() + 1);\n // handle the snooze state\n // State pattern used here\n state.handle(manager, pending, cal, false);\n //send a toast to the user letting them know it will snooze for 10 minutes\n Toast t = Toast.makeText(getApplicationContext(), \"Alarm Snoozed for 10 minutes\",\n Toast.LENGTH_SHORT);\n t.setGravity(Gravity.FILL_HORIZONTAL, 10, 1500);\n t.show();\n // Stop the current ringtone\n sendBroadcast(myIntent);\n }\n }",
"public void OnToggleClicked(View view)\n {\n\n long time;\n if (((ToggleButton) view).isChecked())\n {\n //startActivity(Intent)\n Toast.makeText(MainActivity.this, \"ALARM ON\", Toast.LENGTH_SHORT).show();\n Calendar calendar=Calendar.getInstance();\n\n int currentApiVersion = android.os.Build.VERSION.SDK_INT;\n if (currentApiVersion > android.os.Build.VERSION_CODES.LOLLIPOP_MR1)\n {\n calendar.set(Calendar.HOUR_OF_DAY,alarmTimePicker.getHour());\n calendar.set(Calendar.MINUTE, alarmTimePicker.getMinute());\n }\n else {\n calendar.set(Calendar.HOUR_OF_DAY,alarmTimePicker.getCurrentHour());\n calendar.set(Calendar.MINUTE, alarmTimePicker.getCurrentMinute());\n }\n\n Intent intent = new Intent(this, AlarmReceiver.class);\n pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0);\n\n time=(calendar.getTimeInMillis()-(calendar.getTimeInMillis()%60000));\n if(System.currentTimeMillis()>time)\n {\n if (Calendar.AM_PM == 0)\n time = time + (1000*60*60*12);\n else\n time = time + (1000*60*60*24);\n }\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, time, 10000, pendingIntent);\n }\n else\n {\n alarmManager.cancel(pendingIntent);\n Toast.makeText(MainActivity.this, \"ALARM OFF\", Toast.LENGTH_SHORT).show();\n }\n //public class DeezerConnect.Builder();\n }",
"private void AlarmByNotification(String message) {\n\t\tToast.makeText(this, message, Toast.LENGTH_LONG).show();\r\n\t}",
"public void setAlarm(String eAlarm) {\n\t\tmAlarm = eAlarm;\n\t}",
"@Override\n public void onClick(View view) {\n Intent intent = MainActivity.newIntent(getActivity(), mMonitor.getId());\n startActivity(intent);\n\n }",
"@Override\n public void onClick(View view) {\n calendar.set(Calendar.HOUR_OF_DAY, tp.getHour());\n calendar.set(Calendar.MINUTE, tp.getMinute());\n\n //get int value of timepicker selected time\n int hour = tp.getHour();\n int minute = tp.getMinute();\n\n String hour_string = String.valueOf(hour);\n String minute_string = String.valueOf(minute);\n\n if (hour > 12) {\n hour_string = String.valueOf(hour - 12);\n }\n\n if (minute < 10) {\n minute_string = \"0\" + String.valueOf(minute);\n }\n\n //update status box method\n alarm_text(\"Alarm set for \" + hour_string + \":\" + minute_string);\n //put extra string in my_intent\n //tells clock \"set alarm\" button pressed\n my_intent.putExtra(\"extra\", \"alarm on\");\n //create pending intent that delays intent until user selects time\n pending_intent = PendingIntent.getBroadcast(AlarmClock.this, 0, my_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n //set alarm manager\n am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pending_intent);\n }",
"@Override\n public void goToEvent() {\n startActivity(new Intent(AddGuests.this, DetailEventRequest.class)); }",
"public void launchPhone(){\n\t\tIntent sendIntent = new Intent(Intent.ACTION_DIAL);\n \tsendIntent.setData(Uri.parse(\"tel:\"));\n \t\n \tfinal ResolveInfo mInfo = pacman.resolveActivity(sendIntent, 0);\n \tString s = pacman.getApplicationLabel(mInfo.activityInfo.applicationInfo).toString();\n \t\n \tif (s != null && s.length() > 2) {\n startActivity(sendIntent);\n return;\n } else {\n \tToast.makeText(context, \"No Phone Call App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}",
"public void Riesgos_interno_quintana (View view){\n Intent intent = new Intent(this, quintanaroo_id_riesgo_interno.class);\n startActivity(intent);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n mAlarmId = Constants.DEFAULT_ALARM_ID;\n\n mDb = AppDatabase.getInstance(this);\n\n // Init the data binding object\n mDetailBinding = DataBindingUtil.setContentView(this, R.layout.activity_detail);\n\n // Init the save button\n Button mMapButton = mDetailBinding.locationDetails.OpenMapButton;\n mMapButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n onOpenMapButtonClicked();\n }\n });\n\n LinearLayout ringtone = mDetailBinding.clockDetails.alert;\n ringtone.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View view) {\n pickRingtone();\n }\n\n });\n\n // Check for saved state (like after phone orientation change) - and load it\n if (savedInstanceState != null) {\n if (savedInstanceState.containsKey(INSTANCE_ALARM_ID))\n mAlarmId = savedInstanceState.getInt(INSTANCE_ALARM_ID, Constants.DEFAULT_ALARM_ID);\n if (savedInstanceState.containsKey(INSTANCE_ALARM_ADDRESS_DATA)) {\n mMapDestination = savedInstanceState.getParcelable(INSTANCE_ALARM_ADDRESS_DATA);\n }\n if (savedInstanceState.containsKey(INSTANCE_ALARM_RINGTONE)) {\n mAlarmRingtone = Uri.parse(savedInstanceState.getString(INSTANCE_ALARM_RINGTONE));\n }\n }\n\n // If ALARM_ID was sent, it is update mode (list item clicked)\n Intent intent = getIntent();\n if (intent != null && intent.hasExtra(Constants.EXTRA_ALARM_ID)) {\n setAlarmData(intent);\n }\n updateMapImage(true);\n setRingtoneName();\n }",
"public void newAlarmManager(long time, Intent intent, int requestCode){\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(getApplicationContext(),\n requestCode, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager startAlarmManager = (AlarmManager) getApplicationContext()\n .getSystemService(Context.ALARM_SERVICE);\n startAlarmManager.setExact(AlarmManager.RTC_WAKEUP, time, pendingIntent);\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tstartActivity(new Intent(\"com.calendar.GOOGLESYNC\"));\n\t\t\t}",
"@Override\r\n public void onClick(View v) {\n Intent intent = new Intent(ServicesActivity.this, AmbulanceMapsActivity.class);\r\n\r\n startActivity(intent);\r\n }",
"@Override\n public void onClick(View v) {\n startHourlyActivity();\n }",
"public void mapsOpen (View view) {\n Intent mapIntent = new Intent(this, MapsActivity.class);\n startActivity(mapIntent);\n }"
] | [
"0.61727184",
"0.6075855",
"0.5983435",
"0.5972075",
"0.58818537",
"0.5856014",
"0.5828008",
"0.5789202",
"0.5732432",
"0.571877",
"0.57184106",
"0.5715587",
"0.5692476",
"0.56811076",
"0.56328267",
"0.558094",
"0.55691653",
"0.5509999",
"0.5491854",
"0.5471095",
"0.53888255",
"0.53621423",
"0.5358029",
"0.53527385",
"0.53182864",
"0.5272599",
"0.5257427",
"0.52383107",
"0.5219994",
"0.51800543",
"0.5172812",
"0.51622164",
"0.5160134",
"0.5158467",
"0.5135551",
"0.5124195",
"0.5124109",
"0.5096698",
"0.5088161",
"0.50861037",
"0.50695515",
"0.50656474",
"0.5064156",
"0.5058355",
"0.5053015",
"0.50447047",
"0.5024866",
"0.5023051",
"0.50116783",
"0.50098646",
"0.5003963",
"0.49976352",
"0.4982417",
"0.49803722",
"0.49763924",
"0.49655175",
"0.49604496",
"0.49560007",
"0.49551782",
"0.49470508",
"0.4946068",
"0.4946068",
"0.4946068",
"0.4945238",
"0.49447006",
"0.49428624",
"0.49344262",
"0.49265182",
"0.4925188",
"0.4923962",
"0.4918457",
"0.48928446",
"0.48890516",
"0.48798725",
"0.48798725",
"0.4872399",
"0.4870934",
"0.48674437",
"0.48619103",
"0.48558307",
"0.4840506",
"0.48403174",
"0.4834467",
"0.4832425",
"0.48302484",
"0.48283178",
"0.48252034",
"0.48225603",
"0.48206693",
"0.48199865",
"0.48168096",
"0.48165536",
"0.4807815",
"0.47974825",
"0.47945473",
"0.47881576",
"0.47870645",
"0.4778579",
"0.47784263",
"0.47745198"
] | 0.5793939 | 7 |
pick ringtone from default android ringtone selector. Note: this intent doesn't exist on the emulator. | public void pickRingtone() {
final Uri currentTone = getCurrentRingtone();
Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_RINGTONE);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, R.string.label_ringtone);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, currentTone);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
startActivityForResult(intent, RINGTONE_PICKER_REQUEST_CODE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Uri getDefaultRingtone(){\n return RingtoneManager.getActualDefaultRingtoneUri(DetailActivity.this,\n RingtoneManager.TYPE_ALARM);\n }",
"public void alarmToneButton_click(View view) {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(intent, 10);\n }",
"private Uri getCurrentRingtone(){\n return mAlarmRingtone != null ? mAlarmRingtone : getDefaultRingtone();\n }",
"public void playRingtone(Ringtone ringtone) {\n playRingtone(ringtone, AudioAttributes.USAGE_ALARM);\n }",
"public void playRingtone() {\n\t\ttry {\n\t Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\t Ringtone r = RingtoneManager.getRingtone(this.cordova.getActivity().getApplicationContext(), notification);\n\t if(r == null) {\n\t \tnotification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);\n\t \tr = RingtoneManager.getRingtone(this.cordova.getActivity().getApplicationContext(), notification);\n\t }\n\t r.play();\n\t } catch (Exception e) {Toast.makeText(this.cordova.getActivity().getApplicationContext(), \"playRingtone method exception\", Toast.LENGTH_LONG).show();}\n\t}",
"private void saveDefaultRing(){\n \t SharedPreferences sharedPre = getSharedPreferences(\n RingtoneList.TIMER_RPREFERENCES,\n 0);\n \t if (!GotoRingtoneActivity.musicPath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, GotoRingtoneActivity.musicName)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, GotoRingtoneActivity.musicPath)\n .putInt(\"mSystemPosition\", GotoRingtoneActivity.musicID)\n .commit();\n }\n \t// PR 590654 - Neo Skunkworks - Soar Gao - 001 begin\n// Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n// String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n// \t\tGotoRingtoneActivity.musicName);\n// String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n// \t\tGotoRingtoneActivity.musicPath);\n// mIntent.putExtra(\"ringtone\", ringtoneName);\n// mIntent.putExtra(\"ringtonePath\", ringtonePath);\n// mIntent.putExtra(\"ringtonePosition\", mSystemPosition);\n// sendBroadcast(mIntent);\n \t// PR 590654 - Neo Skunkworks - Soar Gao - 001 end\n }",
"private void setRingtoneName(){\n //select default ringtone when there isn't ringtone which chose\n Uri ringtoneUri = getCurrentRingtone();\n Ringtone ringtone = RingtoneManager.getRingtone(this, ringtoneUri);\n mDetailBinding.clockDetails.ringtone.setText(ringtone.getTitle(this));\n }",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n choose_alarm_sound = (int) id;\n }",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n private void playRingtone(@NonNull Ringtone ringtone, final int USAGE_CODE) {\n ringtone.setAudioAttributes(new AudioAttributes.Builder().setUsage(USAGE_CODE).build());\n ringtone.play();\n\n }",
"private void pickFromGallery() {\n\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"*/*\");\n\n intent.setType(\"image/*\");\n\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\n String[] mimeTypes = {\"image/jpeg\", \"image/png\",\"image/jpg\"};\n intent.putExtra(Intent.EXTRA_MIME_TYPES,mimeTypes);\n // Launching the Intent\n startActivityForResult(intent,GALLERY_REQUEST_CODE);\n }",
"private void pickFromGallery() {\n Intent intent = new Intent(Intent.ACTION_PICK);\r\n // Sets the type as image/*. This ensures only components of type image are selected\r\n intent.setType(\"image/*\");\r\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\r\n String[] mimeTypes = {\"image/jpeg\", \"image/png\"};\r\n intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);\r\n // Launching the Intent\r\n startActivityForResult(intent, 0);\r\n }",
"private void pickFromGallery(){\n Intent intent=new Intent(Intent.ACTION_PICK);\n // Sets the type as image/*. This ensures only components of type image are selected\n intent.setType(\"image/*\");\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\n String[] mimeTypes = {\"image/jpeg\", \"image/png\"};\n intent.putExtra(Intent.EXTRA_MIME_TYPES,mimeTypes);\n // Launching the Intent\n startActivityForResult(intent,1);\n }",
"public static void setTone(SquareImageButton button, int toneType) {\n // Get the context for the image button\n Context context = button.getContext();\n // The internal uri for our resource\n Uri newUri = null;\n String path = getDirectoryPath();\n\n Resources resources = (context != null) ? context.getResources() : null;\n if(resources != null) {\n String entryName = context.getResources().getResourceEntryName(button.getSoundClipId());\n File file = new File(path + \"/\", entryName + \".mp3\");\n\n Uri uri = Uri.parse(\"android.resource://\" + context.getPackageName() + \"/raw/\" + entryName);\n ContentResolver resolver = context.getContentResolver();\n if(!file.exists()){\n newUri = saveFileAndAddToMediaStore(button, context, file, uri, resolver);\n }\n try {\n if(newUri == null){\n newUri = getAudioUriFromFilePath(file.getAbsolutePath(), resolver);\n }\n if(newUri != null){\n RingtoneManager.setActualDefaultRingtoneUri(context,\n toneType, newUri);\n Settings.System.putString(resolver, getStringByType(toneType),\n newUri.toString());\n //show the message to the user\n CharSequence text = \"\";\n switch(toneType){\n case RingtoneManager.TYPE_NOTIFICATION:\n text = \"Notification tone set\";\n break;\n case RingtoneManager.TYPE_RINGTONE:\n text = \"Ringtone set\";\n break;\n }\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }\n\n } catch (Throwable t) {\n Toast toast = Toast.makeText(context, \"An error occurred: \" + t.getMessage(), Toast.LENGTH_SHORT);\n toast.show();\n }\n }\n }",
"@Override // com.oneplus.settings.ringtone.OPRingtoneBaseActivity\n public void onCreate(Bundle bundle) {\n String string;\n if (!(bundle == null || (string = bundle.getString(\"key_selected_item_uri\")) == null)) {\n this.mUriForDefaultItem = Uri.parse(string);\n }\n super.onCreate(bundle);\n setContentView(C0012R$layout.op_preference_list_content_material);\n initActionbar();\n this.mListView = getListView();\n this.mNofileView = findViewById(C0010R$id.id_empty);\n this.mProgressBar = (ProgressBar) findViewById(C0010R$id.id_progress);\n this.mHeaderMargin = findViewById(C0010R$id.header_margin);\n this.mListView.setEmptyView(this.mNofileView);\n this.mListView.setOnItemClickListener(this.mOnItemClickListener);\n this.mListView.setDivider(null);\n Log.v(OPLocalRingtonePickerActivity.class.getName(), \"onCreate startTask\");\n startTask(0);\n }",
"@Override // com.oneplus.settings.ringtone.OPRingtoneBaseActivity\n public void updateSelected() {\n if (this.mSystemRings == null) {\n }\n }",
"public static void pickPhotoFromGallery(Context context) {\n try {\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n ((Activity) context).startActivityForResult(intent, PICK_PHOTO_KITKAT);\n } else {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null);\n intent.setType(\"image/*\");\n ((Activity) context).startActivityForResult(intent, PICK_PHOTO);\n }\n } catch (ActivityNotFoundException e) {\n e.printStackTrace();\n }\n }",
"private void pickFromGallery(){\n Intent intent=new Intent(Intent.ACTION_PICK);\n // Sets the type as image/*. This ensures only components of type image are selected\n intent.setType(\"image/*\");\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\n String[] mimeTypes = {\"image/jpeg\", \"image/png\"};\n intent.putExtra(Intent.EXTRA_MIME_TYPES,mimeTypes);\n // Launching the Intent\n startActivityForResult(intent,GALLERY_REQUEST_CODE);\n }",
"private void pickFromGallery(){\n Intent intent=new Intent(Intent.ACTION_PICK);\n // Sets the type as image/*. This ensures only components of type image are selected\n intent.setType(\"image/*\");\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\n String[] mimeTypes = {\"image/jpeg\", \"image/png\"};\n intent.putExtra(Intent.EXTRA_MIME_TYPES,mimeTypes);\n // Launching the Intent\n startActivityForResult(intent,GALLERY_REQUEST_CODE);\n }",
"public int getRingtoneMode() {\n return mAudioManager.getRingerMode();\n }",
"public void onLaunchSelect() {\n Intent intent = new Intent(Intent.ACTION_PICK,\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Bring up gallery to select a photo\n startActivityForResult(intent, SELECT_IMAGE_REQUEST_CODE);\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Bundle alarmRingtoneData = intent.getExtras();\n int alarmRingtoneNumber = alarmRingtoneData.getInt(\"alarmClipNumber\");\n\n Intent serviceIntent = new Intent(context, RingtonePlayingService.class);\n serviceIntent.putExtra(\"alarmClipNumber\", alarmRingtoneNumber);\n\n context.startService(serviceIntent);\n }",
"private void dispatchGalleryIntent() {\n Intent pickPhoto = new Intent(Intent.ACTION_PICK,\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n pickPhoto.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(pickPhoto, REQUEST_CHOOSE_PHOTO_NUM);\n }",
"public static Intent getIntent(){\n Intent pickIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n\tpickIntent.setType(\"image/*\");\n\tpickIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n\tpickIntent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);\t\n\treturn pickIntent;\n }",
"private Uri updateExternalFile(OPLocalRingtoneAdapter.RingtoneData ringtoneData) {\n OPMyLog.d(\"chenhl\", \"getKey:\" + ringtoneData.mUri);\n String str = ringtoneData.filepath;\n OPMyLog.d(\"chenhl\", \"path:\" + str);\n File file = new File(str);\n if (!file.exists()) {\n this.mHandler.post(new Runnable() {\n /* class com.oneplus.settings.ringtone.OPLocalRingtonePickerActivity.AnonymousClass4 */\n\n public void run() {\n OPLocalRingtonePickerActivity oPLocalRingtonePickerActivity = OPLocalRingtonePickerActivity.this;\n Toast.makeText(oPLocalRingtonePickerActivity, oPLocalRingtonePickerActivity.getString(C0017R$string.oneplus_file_not_exist), 0).show();\n }\n });\n return null;\n }\n playRingtone(300, this.mUriForDefaultItem);\n if (str == null || str.startsWith(\"/storage/emulated/legacy\") || str.startsWith(SDCARD_PATH)) {\n return this.mUriForDefaultItem;\n }\n File file2 = new File(checkDir() + file.getName());\n if (!file2.exists()) {\n copyFile(file, file2);\n }\n return updateDb(ringtoneData, file2.getAbsolutePath());\n }",
"private void pickImageFromGallery() {\n Intent intent = new Intent(Intent.ACTION_PICK);\n intent.setType(\"image/*\");\n startActivityForResult(intent, IMAGE_PICK_CODE);\n\n }",
"private void saveRingtone() {\n \tif(((GotoRingtoneActivity.musicID!=-1)&&(GotoRingtoneActivity.musicActivity==0))){\n \t\tsendToService();\n \t}\n \t// PR 587415 - Neo Skunkworks - Soar Gao - 001 end\n SharedPreferences sharedPre = getSharedPreferences(\n RingtoneList.TIMER_RPREFERENCES,\n 0);\n// PR 587415 - Neo Skunkworks - Soar Gao - 001 begin\n/*\n if (!mFilePath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, mPreRingtone)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, mFilePath)\n .putInt(\"mSystemPosition\", mSystemPosition)\n .commit();\n }\n Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n mPreRingtone);\n String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n mFilePath);\n*/\n if (!GotoRingtoneActivity.musicPath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, GotoRingtoneActivity.musicName)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, GotoRingtoneActivity.musicPath)\n .putInt(\"mSystemPosition\", GotoRingtoneActivity.musicID)\n .commit();\n }\n Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n \t\tGotoRingtoneActivity.musicName);\n String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n \t\tGotoRingtoneActivity.musicPath);\n// PR 587415 - Neo Skunkworks - Soar Gao - 001 end\n mIntent.putExtra(\"ringtone\", ringtoneName);\n mIntent.putExtra(\"ringtonePath\", ringtonePath);\n mIntent.putExtra(\"ringtonePosition\", mSystemPosition);\n sendBroadcast(mIntent);\n stopService(new Intent(this, MediaPlayerService.class));\n }",
"@Override\n public List<ItemAdapter.ItemHolder<Uri>> loadInBackground() {\n DataModel.getDataModel().loadRingtoneTitles();\n DataModel.getDataModel().loadRingtonePermissions();\n\n // Fetch the standard system ringtones.\n final RingtoneManager ringtoneManager = new RingtoneManager(getContext());\n ringtoneManager.setType(STREAM_ALARM);\n\n Cursor systemRingtoneCursor;\n try {\n systemRingtoneCursor = ringtoneManager.getCursor();\n } catch (Exception e) {\n LogUtils.e(\"Could not get system ringtone cursor\");\n systemRingtoneCursor = new MatrixCursor(new String[] {});\n }\n final int systemRingtoneCount = systemRingtoneCursor.getCount();\n // item count = # system ringtones + # custom ringtones + 2 headers + Add new music item\n final int itemCount = systemRingtoneCount + mCustomRingtones.size() + 3;\n\n final List<ItemAdapter.ItemHolder<Uri>> itemHolders = new ArrayList<>(itemCount);\n\n // Add the item holder for the Music heading.\n itemHolders.add(new HeaderHolder(R.string.your_sounds));\n\n // Add an item holder for each custom ringtone and also cache a pretty name.\n for (CustomRingtone ringtone : mCustomRingtones) {\n itemHolders.add(new CustomRingtoneHolder(ringtone));\n }\n\n // Add an item holder for the \"Add new\" music ringtone.\n itemHolders.add(new AddCustomRingtoneHolder());\n\n // Add an item holder for the Ringtones heading.\n itemHolders.add(new HeaderHolder(R.string.device_sounds));\n\n // Add an item holder for the silent ringtone.\n itemHolders.add(new SystemRingtoneHolder(RINGTONE_SILENT, null));\n\n // Add an item holder for the system default alarm sound.\n itemHolders.add(new SystemRingtoneHolder(mDefaultRingtoneUri, mDefaultRingtoneTitle));\n\n // Add an item holder for each system ringtone.\n for (int i = 0; i < systemRingtoneCount; i++) {\n final Uri ringtoneUri = ringtoneManager.getRingtoneUri(i);\n itemHolders.add(new SystemRingtoneHolder(ringtoneUri, null));\n }\n\n return itemHolders;\n }",
"public void setRemoteRingbackTone(String ring);",
"@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.slide_system_button:\n setSystemRingtone();\n break;\n case R.id.slide_user_button:\n setDefinedRingtone();\n break;\n default:\n break;\n }\n dismissSlideMusicPop();\n }",
"private void setPreviousSelectedRingTone(int ringtoneId) {\n int position = getPositionById(ringtoneId);\n ringtoneListView.setItemChecked(position, true);\n }",
"public Intent getPickImageChooserIntent() {\n File f = new File(android.os.Environment.getExternalStorageDirectory(), \"temp.jpg\");\n Uri outputFileUri = Uri.fromFile(f);\n List<Intent> allIntents = new ArrayList<>();\n PackageManager packageManager = mContext.getPackageManager();\n\n // collect all camera intents\n Intent captureIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n List<ResolveInfo> listCam = packageManager.queryIntentActivities(captureIntent, 0);\n for (ResolveInfo res : listCam) {\n Intent intent = new Intent(captureIntent);\n intent.setComponent(new ComponentName(res.activityInfo.packageName, res.activityInfo.name));\n intent.setPackage(res.activityInfo.packageName);\n if (outputFileUri != null) {\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n }\n allIntents.add(intent);\n }\n\n // collect all gallery intents\n Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n galleryIntent.setType(\"image/*\");\n List<ResolveInfo> listGallery = packageManager.queryIntentActivities(galleryIntent, 0);\n for (ResolveInfo res : listGallery) {\n Intent intent = new Intent(galleryIntent);\n intent.setComponent(new ComponentName(res.activityInfo.packageName, res.activityInfo.name));\n intent.setPackage(res.activityInfo.packageName);\n allIntents.add(intent);\n }\n\n // the main intent is the last in the list (fucking android) so pickup the useless one\n Intent mainIntent = allIntents.get(allIntents.size() - 1);\n for (Intent intent : allIntents) {\n if (intent.getComponent().getClassName().equals(\"com.android.documentsui.DocumentsActivity\")) {\n mainIntent = intent;\n break;\n }\n }\n allIntents.remove(mainIntent);\n\n // Create a chooser from the main intent\n Intent chooserIntent = Intent.createChooser(mainIntent, \"Select source\");\n\n // Add all other intents\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, allIntents.toArray(new Parcelable[allIntents.size()]));\n\n return chooserIntent;\n }",
"private void galleryIntent() {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n ((MessageActivity) context).startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), SELECT_PICTURE);\n\n }",
"private void galleryIntent() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);//\n startActivityForResult(Intent.createChooser(intent, \"Select Photo\"), SELECT_PHOTO);\n }",
"public void stopRingtone(Ringtone ringtone) {\n ringtone.stop();\n }",
"public void pickFromGallery(View view) {\n //Create an Intent with action as ACTION_OPEN_DOCUMENT\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n /*\n Make sure that the user has given storage permissions.\n Note that granting the WRITE_EXTERNAL_STORAGE permission automatically grants the\n READ_EXTERNAL_STORAGE permission.\n */\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"Write storage permission denied\");\n\n // If permission is denied, ask for permission.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n MY_PERMISSIONS_REQUEST_WRITE_STORAGE);\n }\n else {\n // Sets the type as image/*. This ensures only components of type image are selected\n intent.setType(\"image/*\");\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\n String[] mimeTypes = {\"image/jpeg\", \"image/png\"};\n intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);\n // Launching the Intent\n startActivityForResult(intent, GALLERY_REQUEST_CODE);\n }\n }",
"private void openFileChoose() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, PEGA_IMAGEM);\n }",
"protected final void onActivityResult(final int requestCode, final int resultCode, final Intent i)\n\t{\n\t\tsuper.onActivityResult(requestCode, resultCode, i);\n\n\t\t// this matches the request code in the above call\n\t\tUri myUri = i.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);\n\t\tif (myUri != null)\n\t\t{\n\t\t\tString strUri = myUri.toString();\n\t\t\t\n\t\t\tswitch (requestCode)\n\t\t\t{\n\t\t\t\tcase PICK_FILE_RING:\n\t\t\t\t\tm_strUriRing = strUri;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase PICK_FILE_SMS:\n\t\t\t\t\tm_strUriSMS = strUri;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PICK_FILE_IM:\n\t\t\t\t\tm_strUriIM = strUri;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PICK_FILE_MAIL:\n\t\t\t\t\tm_strUriMail = strUri;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PICK_FILE_TEST:\n\t\t\t\t\tMediaPlayer myPlayer = new MediaPlayer();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tUri myNewUri = Uri.parse(strUri);\n\t\t\t\t\t\tmyPlayer.setDataSource(this, myNewUri);\n\t\t\t\t\t\tmyPlayer.prepare();\n\t\t\t\t\t\tmyPlayer.start();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\tLog.d(getClass().getSimpleName(), e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\n\t\t\t\tdefault:\n\t\t\t}\n\t\t}\n\t}",
"private void selectImage(){\n final CharSequence[] options = { \"Choose from Gallery\",\"Cancel\" };\n AlertDialog.Builder builder = new AlertDialog.Builder(activity);\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n if (options[item].equals(\"Choose from Gallery\"))\n {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 2);\n }\n else if (options[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n builder.show();\n }",
"@Override\n public void onClick(View v) {\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n //Where do we want to find the data\n File pictureDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n //Get the name of the directory\n String pictureDirectoryPath = pictureDirectory.getPath();\n //Get a URI representation of the Path because this is what android needs to deal with\n Uri data = Uri.parse(pictureDirectoryPath);\n //Set the data (where we want to look for this media) and the type (what media do we want to look for).Get all image types\n photoPickerIntent.setDataAndType(data, \"image/*\");\n //We invoke the image gallery and receive something from it\n if (photoPickerIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(photoPickerIntent, IMAGE_GALLERY_REQUEST);\n }\n\n }",
"private void retrieveFilesFromSystemPicker(@Nullable Uri uri) {\n folderRootFolderSpinner.setSelection(0);\n if(getViewPrefs().isAllowFolderSelection() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n retrievePermissionsForUri(uri, getViewPrefs().getSelectedUriPermissionFlags());\n return;\n }\n\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.setType(\"*/*\");\n Set<String> permittedMimeTypes = getViewPrefs().getVisibleMimeTypes();\n if(permittedMimeTypes.isEmpty()) {\n permittedMimeTypes = IOUtils.getMimeTypesFromFileExts(new HashSet<>(), getViewPrefs().getVisibleFileTypes());\n }\n intent.putExtra(Intent.EXTRA_MIME_TYPES, IOUtils.getMimeTypesIncludingFolders(permittedMimeTypes));\n intent.addFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);\n intent.addFlags(getViewPrefs().getSelectedUriPermissionFlags());\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n// intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);\n\n // special intent for Samsung file manager\n Intent sIntent = new Intent(\"com.sec.android.app.myfiles.PICK_DATA_MULTIPLE\");\n // if you want any file type, you can skip next line\n sIntent.putExtra(\"CONTENT_TYPE\", \"*/*\");\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n sIntent.addCategory(Intent.CATEGORY_DEFAULT);\n\n Intent chooserIntent;\n if (requireContext().getPackageManager().resolveActivity(sIntent, 0) != null){\n // it is device with Samsung file manager\n chooserIntent = Intent.createChooser(sIntent, getString(R.string.open_files));\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] { intent});\n } else {\n chooserIntent = Intent.createChooser(intent, getString(R.string.open_files));\n }\n\n int eventId = TrackableRequestEvent.getNextEventId();\n try {\n getUiHelper().setTrackingRequest(eventId);\n startActivityForResult(chooserIntent, eventId);\n } catch(ActivityNotFoundException e) {\n getUiHelper().showDetailedShortMsg(R.string.alert_error, R.string.alert_error_no_app_available_to_handle_action);\n getUiHelper().isTrackingRequest(eventId); // clear the tracked id\n }\n }",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // PR:486634 add xibin --Can't adjust alarm volume when press volume\n // up/down in select alarm ringtone list box.\n setVolumeControlStream(AudioManager.STREAM_ALARM);\n setContentView(R.layout.alarm_system_ringtone);\n// PR 594450 - Neo Skunkworks - Soar Gao - 001 begin \n /*getRingtoneInfo(this);\n initData();\n initView();\n*/\n// PR 594450 - Neo Skunkworks - Soar Gao - 001 end \n }",
"@Override\n public void onClick(View v) {\n\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n photoPickerIntent.setType(\"image/*\");\n startActivityForResult(photoPickerIntent, TAKE_PICTURE);\n dialog.dismiss();\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tint ind=spinner.getSelectedItemPosition();\n\t\t\t\tString mus=list_uri.get(ind);\n\t\t\t String ic=list_id.get(ind);\n\t\t\t Uri songg=Uri.parse(mus+\"/\"+ic);\n\t\t\t\tIntent ii=new Intent(MainActivity.this,SerTest.class);\n\t\t\t ii.putExtra(\"ringtone-uri\", String.valueOf(songg));\n\t\t\t stopService(ii);\n\t\t\t\tint sid=radio_group.getCheckedRadioButtonId();\n\t\t\t\tradio_button=(RadioButton)findViewById(sid);\n\t\t\t\tString r=radio_button.getText().toString();\n\t\t\t\ttime=System.currentTimeMillis();\n\t\t\t\tcalendar.set(Calendar.HOUR_OF_DAY,alarmTimePicker.getCurrentHour());\n\t\t\t\tcalendar.set(Calendar.MINUTE,alarmTimePicker.getCurrentMinute());\n\t\t\t\tcalendar.set(Calendar.SECOND,0);\n\t\t\t\tlong hl=alarmTimePicker.getCurrentHour();\n\t\t\t\tlong ml=alarmTimePicker.getCurrentMinute();\n\t\t\t\tsong=spinner.getSelectedItemPosition();\n\t\t\t\tString h=String.valueOf(hl);\n\t\t\t\tString m=String.valueOf(ml);\n\t\t\t\tif(h.length()==1)\n\t\t\t\t\th=\"0\"+h;\n\t\t\t\tif(m.length()==1)\n\t\t\t\t\tm=\"0\"+m;\n\n\t\t\t\ti.putExtra(\"Extra\",\"alarm on\");\n\t\t\t\ti.putExtra(\"idd\", String.valueOf(time));\n\t\t\t\ti.putExtra(\"play\", String.valueOf(song));\n\t\t\t\tString vibration=\"no\";\n\t\t\t\tif(checkbok.isChecked()){\n\t\t\t\t\ti.putExtra(\"vib\",\"yes\");\n\t\t\t\t\tvibration=\"yes\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\ti.putExtra(\"vib\",\"no\");\n\t\t\t\tpending_intent=PendingIntent.getBroadcast(MainActivity.this,(int) time,i,PendingIntent.FLAG_UPDATE_CURRENT);\n\t\n\n\t\t\t\tlong time=System.currentTimeMillis();\n\t\t\t\tlong t=calendar.getTimeInMillis();\n\t\t\t\tif(t>=time){\n\n\t\t\t\t\tif(r.equals(\"Once\"))\n\t\t\t\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),pending_intent);\n\t\t\t\t\telse if(r.equals(\"Daily\"))\n\t\t\t\t\t\talarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),60*1000*24*60,pending_intent);\n\t\t\t\t\telse\n\t\t\t\t\t\talarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),60*1000*24*60*7,pending_intent);\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Alarm set at \"+h+\":\"+m+\".\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\tif(r.equals(\"Once\"))\n\t\t\t\t\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),pending_intent);\n\t\t\t\t\t\telse if(r.equals(\"Daily\"))\n\t\t\t\t\t\t\talarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis()+86400000,60*1000*24*60,pending_intent);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\talarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis()+86400000,60*1000*24*60*7,pending_intent);\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Alarm set at \"+h+\":\"+m+\" tomorrow.\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\n\t\t\t\tFirst.db.execSQL(\"INSERT INTO alarm VALUES\"+\"('\"+id+\"','alarm','\"+h+\":\"+m+\"','\"+time+\"','\"+r+\"','\"+vibration+\"','\"+song+\"')\");\n\t\t\t\tIntent back=new Intent(MainActivity.this,First.class);\n\t\t\t\tback.putExtra(\"S\",h+\":\"+m);\n\t\t\t\tstartActivity(back);\n\t\t\t}",
"private void dispatchGetPictureFromGalleryIntent() {\n Intent pickPhoto = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n if (pickPhoto.resolveActivity(getContext().getPackageManager()) != null) {\n this.startActivityForResult(pickPhoto, PICK_IMAGE);\n }\n }",
"@Override\n public void onClick(View v) {\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n photoPickerIntent.setType(\"image/*\");\n startActivityForResult(photoPickerIntent, SELECT_PHOTO);\n }",
"public void getPhoto() {\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n //for startActivityForResult, the second parameter, requestCode is used to identify this particular intent\n startActivityForResult(intent, 1);\n }",
"public SendSmsRingtoneResponse sendSmsRingtone(SendSmsRingtone request) {\n\t\treturn null;\n\t}",
"@JavascriptInterface\n public String choosePhoto() {\n String file = \"test\";\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n photoPickerIntent.setType(\"image/*\");\n startActivityForResult(photoPickerIntent, SELECT_GALLERY_PHOTO);\n return file;\n }",
"public void updateRingtone(String path,int type) {\n if(mService != null) {\n try {\n mService.updateRingtone(path,type);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }",
"private void galleryIntent()\r\n {\r\nIntent gallery=new Intent();\r\ngallery.setType(\"image/*\");\r\ngallery.setAction(Intent.ACTION_GET_CONTENT);\r\n\r\nstartActivityForResult(Intent.createChooser(gallery,\"Select Picture \"),PICK_IMAGE );\r\n }",
"@Override\n public void startDeviceImageIntent() {\n Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(galleryIntent, PICK_FROM_GALLERY_REQUEST_CODE);\n }",
"public static Intent getImagePickingIntent(Context context) {\r\n if (context == null) return null;\r\n\r\n Intent chooserIntent = null;\r\n\r\n List<Intent> intentList = new ArrayList<>();\r\n\r\n Intent pickPhotoIntent = new Intent();\r\n pickPhotoIntent.setType(\"image/*\");\r\n pickPhotoIntent.setAction(Intent.ACTION_GET_CONTENT);\r\n\r\n intentList = addIntentsToList(context, intentList, pickPhotoIntent);\r\n\r\n if (intentList.size() > 0) {\r\n chooserIntent =\r\n Intent.createChooser(intentList.remove(intentList.size() - 1), PICKER_TITLE);\r\n chooserIntent\r\n .putExtra(Intent.EXTRA_INITIAL_INTENTS, intentList.toArray(new Parcelable[]{}));\r\n }\r\n\r\n return chooserIntent;\r\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 playNotification(){\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(ctx,notification);\n r.play();\n }",
"private void pickImageIntent(){\n\n Intent intent=new Intent();\n intent.setType(\"image/*\");\n intent.putExtra(intent.EXTRA_ALLOW_MULTIPLE,true);\n intent.setAction(Intent.ACTION_OPEN_DOCUMENT);\n startActivityForResult(Intent.createChooser(intent,\"Select Images\"),PICK_IMAGES_CODE);\n\n\n\n }",
"private void choseImage() {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(intent, GALLERY_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.no_image_picker, Toast.LENGTH_SHORT).show();\n }\n }",
"public void sendIntentToGallery() {\n\t\tIntent i = new Intent(\n\t\t\t\tIntent.ACTION_PICK,\n\t\t\t\tandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\t\t// Send the intent with id 1\n\t\tstartActivityForResult(i, 1);\n\t}",
"private void selectImageFromGallery() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.select_picture)),\n REQUEST_IMAGE_OPEN);\n }",
"public void mostrarGaleria(View view) {\n Intent i=new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i,GALERIA);\n }",
"public void clickPickImage(View view) {\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n photoPickerIntent.setType(\"image/*\");\n startActivityForResult(photoPickerIntent, 10);\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"SELECT IMAGE\"), GALLERY_PICK);\n }",
"private void selectImage() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(\n Intent.createChooser(\n intent,\n \"Select Image from here...\"),\n PICK_IMAGE_REQUEST);\n }",
"protected void startGallery() {\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n photoPickerIntent.setType(\"image/*\");\n startActivityForResult(photoPickerIntent, GALLERY_REQUEST);\n\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n b = (Button)findViewById(R.id.btn1);\n\n b.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Intent intent = new Intent(\n MediaStore.Audio.Media.RECORD_SOUND_ACTION);\n startActivityForResult(intent, RQS_RECORDING);\n // Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n // intent.setType(\"image/*\");\n // startActivityForResult(Intent.createChooser(intent, \"Complete action using\"), REQUEST_PICKER);\n\n }\n });\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 10) {\n // Make sure the request was successful\n if (resultCode == RESULT_OK) {\n System.out.println(data.getData().toString());\n Button tb = (Button) findViewById(R.id.toneButton);\n try {\n FName = getRealPathFromURI(data.getData());\n String[] UFFName = FName.split(\"/\");\n tb.setText(\"Alarm tone: \" + UFFName[UFFName.length - 1]);\n } catch (Exception Ex) {\n Toast.makeText(this, \"Error: \" + Ex + \"\\n\" + FName, Toast.LENGTH_SHORT).show();\n }\n }\n }\n }",
"private void startFileSelection() {\n final Intent chooseFile = new Intent(Intent.ACTION_GET_CONTENT);\n chooseFile.setType(getString(R.string.file_type));\n startActivityForResult(chooseFile, PICK_FILE_RESULT_CODE);\n }",
"private void selectImagesDeviceSerialNubmer() {\n Intent galleryIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(galleryIntent, GALLERY_DEVICE_SERIAL_NUMBER);\n }",
"private void onPhotoPickerItemSelected(int button) {\n switch (button) {\n case CAMERA_OPTION:\n // camera\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Construct temporary image path and name to save the taken\n // photo\n try {\n mPhotoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n ex.printStackTrace();\n }\n if (mPhotoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n BuildConfig.APPLICATION_ID,\n mPhotoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n }\n startActivityForResult(intent, REQUEST_CODE_CAMERA_PERMISSION);\n break;\n case GALLERY_OPTION:\n //gallery:\n try {\n mPhotoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n ex.printStackTrace();\n }\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n photoPickerIntent.setType(\"image/*\");\n startActivityForResult(photoPickerIntent, REQUEST_CODE_GALLERY);\n }\n }",
"public static void playPickupSound(){\n String musicFile = \"Sounds\\\\Pickup.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }",
"private void setSound(@NonNull NotificationCompat.Builder builder) {\n if (mFplReminder.isNotificationSound()) {\n Uri soundUri = RingtoneManager.getDefaultUri(TYPE_NOTIFICATION);\n builder.setSound(soundUri);\n }\n }",
"@Override\n public void onClick(View v) {\n\n Intent intent = new Intent( Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(Intent.createChooser(intent, \"Select File\"), 1);\n }",
"@Override\n\t\tpublic void onClick(View v) { Intent galleryIntent = new Intent(Intent.ACTION_PICK,\n\t\t\t\t\tandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\t\t\t// Start the Intent\n\t\t\tstartActivityForResult(\n\t\t\t\t\tIntent.createChooser(galleryIntent, \"Select Picture\"), REQUEST_CODE);\n\t\t}",
"@Override\n public void onClick(View arg0) {\n Uri uri = Uri.parse(\"content://contacts\");\n Intent intent = new Intent(Intent.ACTION_PICK, uri);\n intent.setType(Phone.CONTENT_TYPE);\n startActivityForResult(intent, REQUEST_CODE);\n }",
"public void selectImage(View view){\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(intent,PICK_IMAGE);\n }",
"@Override\n public void run() {\n if (Build.VERSION.SDK_INT < 28) {\n while(isAlarmOn) {\n mRingtone.play();\n }\n }\n\n else {\n mRingtone.setLooping(true);\n mRingtone.play();\n }\n }",
"public void playBeep(){\n //https://stackoverflow.com/questions/2618182/how-to-play-ringtone-alarm-sound-in-android\n try{\n //gets notification sound then plays it.\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);\n\n r.play();\n TimeUnit.MILLISECONDS.sleep(300);\n r.stop();\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }",
"@Override\n public void onClick(View v) {\n Intent photoPickerIntent = new Intent();\n photoPickerIntent.setType(\"image/*\");\n photoPickerIntent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(photoPickerIntent, GALLERY_REQUEST);\n }",
"private void OpenGallery() {\n Intent pickImage = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(pickImage, RequestCode);\n }",
"private void playHintAudio() {\n AudioManager audioManager = (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE);\n int mode = audioManager.getRingerMode();\n Log.d(TAG,\"mode = \" + mode);\n\n if(mode != AudioManager.RINGER_MODE_SILENT && mode != AudioManager.RINGER_MODE_VIBRATE) {\n // prize modify for bug 44603 by zhaojian 20171205 start\n mMediaPlayer = MediaPlayer.create(getContext(),R.raw.hb_sound2);\n Log.d(\"debug\",\"isNotifySound = \" + getConfig().isNotifySound());\n if(getConfig().isNotifySound()) {\n mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mp) {\n mp.start();\n }\n });\n mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n }\n });\n mMediaPlayer.start();\n }\n // prize modify for bug 44603 by zhaojian 20171205 end\n }\n }",
"private void pickFile() {\n\n String[] mimeTypes = {\"application/pdf\"};\n\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE,false);\n intent.setType(\"*/*\");\n intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);\n startActivityForResult(intent, 2);\n\n\n }",
"@Override\n public void onClick(View v) {\n Intent i = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i, SELECTED_PICTURE);\n }",
"public void startAlarm() {\n\n vibri.vibrate(pattern, 0);\n ringring.play();\n timer.cancel();\n }",
"private static String getStringByType(int type)\n {\n switch(type){\n case RingtoneManager.TYPE_ALARM:\n return Settings.System.ALARM_ALERT;\n case RingtoneManager.TYPE_NOTIFICATION:\n return Settings.System.NOTIFICATION_SOUND;\n case RingtoneManager.TYPE_RINGTONE:\n return Settings.System.RINGTONE;\n default:\n return null;\n }\n }",
"@Override\r\n public void onClick(View v) {\n Intent pickPhoto = new Intent(Intent.ACTION_PICK);\r\n pickPhoto.setType(\"image/*\");\r\n startActivityForResult(pickPhoto, TAKE_AVATAR_GALLERY_REQUEST);\r\n UtilSettings.this\r\n .removeDialog(AVATAR_DIALOG_ID);\r\n\r\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == RINGTONE_PICKER_REQUEST_CODE && resultCode == Activity.RESULT_OK ){\n mAlarmRingtone = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);\n setRingtoneName();\n }\n if (requestCode == MAP_REQUEST_CODE) {\n if (data != null && data.hasExtra(Constants.EXTRA_ALARM_DESTINATION)) {\n // get coordinates (from intent)\n mMapDestination = data.getParcelableExtra(Constants.EXTRA_ALARM_DESTINATION);\n }\n }\n updateMapImage(false);\n }",
"public String getRemoteRingbackTone();",
"private void invokeGetPhoto() {\n // invoke the image gallery using an implicit intent.\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n // Show only images, no videos or anything else\n photoPickerIntent.setType(\"image/*\");\n photoPickerIntent.setAction(Intent.ACTION_GET_CONTENT);\n // Always show the chooser (if there are multiple options available)\n startActivityForResult(Intent.createChooser(photoPickerIntent, \"Choose a picture\"), REQUEST_IMAGE_CAPTURE);\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n\n startActivityForResult(Intent.createChooser(intent,\"Choose an app to select a image\"), 1);\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.photo_selector)), RESULT_PHOTO_OK);\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.photo_selector)), RESULT_PHOTO_OK);\n }",
"public void OpenGallery(){\n Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(gallery, PICK_IMAGE);\n }",
"private void imagePic(){\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"),1);\n\n }",
"private void openGallery(){\n Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(gallery, PICK_IMAGE);\n }",
"private void pickFromCamera() {\n Intent startCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startCamera.putExtra(MediaStore.EXTRA_OUTPUT, uriImage);\n startActivityForResult(startCamera, IMAGE_PICK_CAMERA_CODE);\n\n }",
"public static Intent getPickImageIntent(Context context) {\n Intent chooserIntent = null;\n\n List<Intent> intentList = new ArrayList<>();\n\n Intent pickIntent = new Intent(Intent.ACTION_PICK,\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n Intent takePhotoIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n takePhotoIntent.putExtra(\"return-data\", true);\n takePhotoIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(getEmptyTempFile(context)));\n intentList = addIntentsToList(context, intentList, pickIntent);\n intentList = addIntentsToList(context, intentList, takePhotoIntent);\n\n if (intentList.size() > 0) {\n chooserIntent = Intent.createChooser(intentList.remove(intentList.size() - 1),\n \"Pick image\");\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, intentList.toArray(new Parcelable[]{}));\n }\n\n return chooserIntent;\n }",
"public Tone getPrimaryTone() {\n return getTones().get(0);\n }",
"@Override\r\n public void onClick(View v) {\n\r\n Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);\r\n intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE);\r\n\r\n startActivityForResult(intent, PICK_CONTACT);\r\n\r\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Intent ringtoneIntent = new Intent(context, AlarmService.class);\n\n //1. get EXTRA VALUE from \"alarm_intent\"\n String AlarmStatus = intent.getExtras().getString(EXTRA);\n Remind chosenRemind = (Remind) intent.getExtras().get(NEW_REMIND);\n\n Log.d(\"SAMN\", \"test: Alarm Status:: \" + AlarmStatus);\n\n if(AlarmStatus.equals(ALARM_OFF)){\n /*set up Diable receiver*/\n //to \"enable the receiver\": override the manifest\n ComponentName receiver = new ComponentName(context, AlarmReceiver.class);\n PackageManager pm = context.getPackageManager();\n ///--- ///\n\n pm.setComponentEnabledSetting(receiver,\n PackageManager.COMPONENT_ENABLED_STATE_DISABLED,\n PackageManager.DONT_KILL_APP);\n\n Log.d(\"COMPONENT SETTING: \", String.valueOf(pm.getComponentEnabledSetting(receiver)));\n }\n /*else {\n Intent alarmIntent = new Intent(context, AlarmActivity.class);\n alarmIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(alarmIntent);\n }*/\n\n // 2. pass it to ringtoneIntent to send to RingtonePlayingService\n ringtoneIntent.putExtra(EXTRA, AlarmStatus);\n ringtoneIntent.putExtra(NEW_REMIND, chosenRemind);\n\n //start service ringtone\n context.startService(ringtoneIntent);\n //explain: ringtoneIntent will be sent to RingtonePlayingService => out Extra Value to notice if ALARM IS ON OR OFF?\n }",
"private void setUpRingtoneAndVibration(int vibration) {\n AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n am.setStreamVolume(AudioManager.STREAM_ALARM, am.getStreamMaxVolume(AudioManager.STREAM_ALARM), AudioManager.FLAG_PLAY_SOUND);\n\n Uri alarmUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);\n if (alarmUri == null) {\n alarmUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n }\n try {\n mediaPlayer.setDataSource(this, alarmUri);\n mediaPlayer.setLooping(true);\n mediaPlayer.setAudioStreamType(AudioManager.STREAM_ALARM);\n mediaPlayer.prepare();\n mediaPlayer.start();\n if (vibration == 1) {\n vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\n vibrator.vibrate(vibrationPattern, 0);\n }\n } catch (Exception e) {\n\n }\n }",
"@Override\n public void onClick(View v) {\n Intent i = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i , RESULT_LOAD_IMAGE);\n\n\n }"
] | [
"0.7290075",
"0.710434",
"0.70231664",
"0.6510596",
"0.65061545",
"0.64890754",
"0.61073864",
"0.60665345",
"0.60240763",
"0.5995239",
"0.58980274",
"0.58383113",
"0.58095664",
"0.57948226",
"0.57610106",
"0.5760377",
"0.57356954",
"0.57356954",
"0.5727277",
"0.565084",
"0.56445634",
"0.5641157",
"0.5617296",
"0.557324",
"0.55540377",
"0.54973155",
"0.5455153",
"0.54078186",
"0.53809386",
"0.5379321",
"0.5331365",
"0.53197217",
"0.5312138",
"0.53067976",
"0.5300005",
"0.5290817",
"0.528977",
"0.52588874",
"0.525802",
"0.52533853",
"0.5245551",
"0.52424693",
"0.523515",
"0.5226827",
"0.5220041",
"0.5219615",
"0.5217441",
"0.52141976",
"0.5208655",
"0.5202384",
"0.51868975",
"0.518685",
"0.5184146",
"0.51785624",
"0.51751727",
"0.5155323",
"0.5154336",
"0.51468873",
"0.5130071",
"0.5122653",
"0.51168233",
"0.51162416",
"0.5111296",
"0.51097125",
"0.50899297",
"0.50846374",
"0.5080434",
"0.50685745",
"0.5054513",
"0.50443405",
"0.5037416",
"0.5033425",
"0.5032079",
"0.50260574",
"0.50164086",
"0.5015135",
"0.50130504",
"0.50060296",
"0.50034124",
"0.5002462",
"0.4989858",
"0.4987902",
"0.49845558",
"0.49774644",
"0.496801",
"0.49649197",
"0.49609977",
"0.4959163",
"0.4951058",
"0.4951058",
"0.49498686",
"0.49494693",
"0.4949086",
"0.49409214",
"0.49407643",
"0.49369758",
"0.49241483",
"0.49198252",
"0.4917643",
"0.49115762"
] | 0.83543897 | 0 |
Get default ringtone value of android device. | private Uri getDefaultRingtone(){
return RingtoneManager.getActualDefaultRingtoneUri(DetailActivity.this,
RingtoneManager.TYPE_ALARM);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Uri getCurrentRingtone(){\n return mAlarmRingtone != null ? mAlarmRingtone : getDefaultRingtone();\n }",
"public int getRingtoneMode() {\n return mAudioManager.getRingerMode();\n }",
"private void saveDefaultRing(){\n \t SharedPreferences sharedPre = getSharedPreferences(\n RingtoneList.TIMER_RPREFERENCES,\n 0);\n \t if (!GotoRingtoneActivity.musicPath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, GotoRingtoneActivity.musicName)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, GotoRingtoneActivity.musicPath)\n .putInt(\"mSystemPosition\", GotoRingtoneActivity.musicID)\n .commit();\n }\n \t// PR 590654 - Neo Skunkworks - Soar Gao - 001 begin\n// Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n// String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n// \t\tGotoRingtoneActivity.musicName);\n// String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n// \t\tGotoRingtoneActivity.musicPath);\n// mIntent.putExtra(\"ringtone\", ringtoneName);\n// mIntent.putExtra(\"ringtonePath\", ringtonePath);\n// mIntent.putExtra(\"ringtonePosition\", mSystemPosition);\n// sendBroadcast(mIntent);\n \t// PR 590654 - Neo Skunkworks - Soar Gao - 001 end\n }",
"public void pickRingtone() {\n final Uri currentTone = getCurrentRingtone();\n Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_RINGTONE);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, R.string.label_ringtone);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, currentTone);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);\n startActivityForResult(intent, RINGTONE_PICKER_REQUEST_CODE);\n }",
"private static String getStringByType(int type)\n {\n switch(type){\n case RingtoneManager.TYPE_ALARM:\n return Settings.System.ALARM_ALERT;\n case RingtoneManager.TYPE_NOTIFICATION:\n return Settings.System.NOTIFICATION_SOUND;\n case RingtoneManager.TYPE_RINGTONE:\n return Settings.System.RINGTONE;\n default:\n return null;\n }\n }",
"private void setRingtoneName(){\n //select default ringtone when there isn't ringtone which chose\n Uri ringtoneUri = getCurrentRingtone();\n Ringtone ringtone = RingtoneManager.getRingtone(this, ringtoneUri);\n mDetailBinding.clockDetails.ringtone.setText(ringtone.getTitle(this));\n }",
"public String getRemoteRingbackTone();",
"public String getRingerDevice();",
"public void playRingtone() {\n\t\ttry {\n\t Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\t Ringtone r = RingtoneManager.getRingtone(this.cordova.getActivity().getApplicationContext(), notification);\n\t if(r == null) {\n\t \tnotification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);\n\t \tr = RingtoneManager.getRingtone(this.cordova.getActivity().getApplicationContext(), notification);\n\t }\n\t r.play();\n\t } catch (Exception e) {Toast.makeText(this.cordova.getActivity().getApplicationContext(), \"playRingtone method exception\", Toast.LENGTH_LONG).show();}\n\t}",
"public Tone getPrimaryTone() {\n return getTones().get(0);\n }",
"public static AudioPlayer getDEFAULTSHOOTSOUND() {\r\n\t\treturn DEFAULTSHOOTSOUND;\r\n\t}",
"public void playRingtone(Ringtone ringtone) {\n playRingtone(ringtone, AudioAttributes.USAGE_ALARM);\n }",
"public java.lang.String getLocalRingBackToneId() {\r\n return localRingBackToneId;\r\n }",
"public static Uri getNotificationSound(Context cxt, String sound){\n Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n if(!sound.isEmpty()) {\n int soundResource = cxt.getResources().getIdentifier(sound, \"raw\", cxt.getPackageName());\n if (soundResource != 0) {\n soundUri = Uri.parse(\"android.resource://\"\n + cxt.getPackageName() + \"/\" + soundResource);\n }\n }\n\n return soundUri;\n }",
"private Uri updateExternalFile(OPLocalRingtoneAdapter.RingtoneData ringtoneData) {\n OPMyLog.d(\"chenhl\", \"getKey:\" + ringtoneData.mUri);\n String str = ringtoneData.filepath;\n OPMyLog.d(\"chenhl\", \"path:\" + str);\n File file = new File(str);\n if (!file.exists()) {\n this.mHandler.post(new Runnable() {\n /* class com.oneplus.settings.ringtone.OPLocalRingtonePickerActivity.AnonymousClass4 */\n\n public void run() {\n OPLocalRingtonePickerActivity oPLocalRingtonePickerActivity = OPLocalRingtonePickerActivity.this;\n Toast.makeText(oPLocalRingtonePickerActivity, oPLocalRingtonePickerActivity.getString(C0017R$string.oneplus_file_not_exist), 0).show();\n }\n });\n return null;\n }\n playRingtone(300, this.mUriForDefaultItem);\n if (str == null || str.startsWith(\"/storage/emulated/legacy\") || str.startsWith(SDCARD_PATH)) {\n return this.mUriForDefaultItem;\n }\n File file2 = new File(checkDir() + file.getName());\n if (!file2.exists()) {\n copyFile(file, file2);\n }\n return updateDb(ringtoneData, file2.getAbsolutePath());\n }",
"int getTelecommutePreferenceValue();",
"public final String getSound( ) {\n\t\treturn sound;\n\t}",
"public static void setTone(SquareImageButton button, int toneType) {\n // Get the context for the image button\n Context context = button.getContext();\n // The internal uri for our resource\n Uri newUri = null;\n String path = getDirectoryPath();\n\n Resources resources = (context != null) ? context.getResources() : null;\n if(resources != null) {\n String entryName = context.getResources().getResourceEntryName(button.getSoundClipId());\n File file = new File(path + \"/\", entryName + \".mp3\");\n\n Uri uri = Uri.parse(\"android.resource://\" + context.getPackageName() + \"/raw/\" + entryName);\n ContentResolver resolver = context.getContentResolver();\n if(!file.exists()){\n newUri = saveFileAndAddToMediaStore(button, context, file, uri, resolver);\n }\n try {\n if(newUri == null){\n newUri = getAudioUriFromFilePath(file.getAbsolutePath(), resolver);\n }\n if(newUri != null){\n RingtoneManager.setActualDefaultRingtoneUri(context,\n toneType, newUri);\n Settings.System.putString(resolver, getStringByType(toneType),\n newUri.toString());\n //show the message to the user\n CharSequence text = \"\";\n switch(toneType){\n case RingtoneManager.TYPE_NOTIFICATION:\n text = \"Notification tone set\";\n break;\n case RingtoneManager.TYPE_RINGTONE:\n text = \"Ringtone set\";\n break;\n }\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }\n\n } catch (Throwable t) {\n Toast toast = Toast.makeText(context, \"An error occurred: \" + t.getMessage(), Toast.LENGTH_SHORT);\n toast.show();\n }\n }\n }",
"public void setRemoteRingbackTone(String ring);",
"private int getSoundLevelToRestore() {\n int savedSoundLevel = originalVolumes != null ? originalVolumes.getRingVolume() : -1;\n\n //if it was 0 -> was in vibrate no need to restore to user level.\n if (savedSoundLevel > 0 ) {\n if (mIsRestoreVolToUserSetLevelEnabled) {\n return userSetVolumeLevelToRestore;\n }\n } else {\n //если громкость 0 а режим нормальный - что-то не так\n if (originalVolumes != null && originalVolumes.getRingMode() == RingMode.RINGER_MODE_NORMAL) {\n return 1;\n }\n }\n return savedSoundLevel;\n }",
"public double readSoundSetting() {\n try {\n BufferedReader soundReader = new BufferedReader(\n new FileReader(new File(wnwData, \"settings.dat\")));\n String soundSetting = soundReader.readLine();\n Scanner soundScanner = new Scanner(soundSetting);\n return Double.parseDouble(soundScanner.next());\n }\n catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e){\n e.printStackTrace();\n }\n return 0;\n }",
"public int getTone(){\n\t\tint keyAsTone = (int) (Math.pow(2.0, (((double)key)-49.0)/12)*440);\n\t\treturn keyAsTone;\n\t}",
"private void saveRingtone() {\n \tif(((GotoRingtoneActivity.musicID!=-1)&&(GotoRingtoneActivity.musicActivity==0))){\n \t\tsendToService();\n \t}\n \t// PR 587415 - Neo Skunkworks - Soar Gao - 001 end\n SharedPreferences sharedPre = getSharedPreferences(\n RingtoneList.TIMER_RPREFERENCES,\n 0);\n// PR 587415 - Neo Skunkworks - Soar Gao - 001 begin\n/*\n if (!mFilePath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, mPreRingtone)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, mFilePath)\n .putInt(\"mSystemPosition\", mSystemPosition)\n .commit();\n }\n Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n mPreRingtone);\n String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n mFilePath);\n*/\n if (!GotoRingtoneActivity.musicPath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, GotoRingtoneActivity.musicName)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, GotoRingtoneActivity.musicPath)\n .putInt(\"mSystemPosition\", GotoRingtoneActivity.musicID)\n .commit();\n }\n Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n \t\tGotoRingtoneActivity.musicName);\n String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n \t\tGotoRingtoneActivity.musicPath);\n// PR 587415 - Neo Skunkworks - Soar Gao - 001 end\n mIntent.putExtra(\"ringtone\", ringtoneName);\n mIntent.putExtra(\"ringtonePath\", ringtonePath);\n mIntent.putExtra(\"ringtonePosition\", mSystemPosition);\n sendBroadcast(mIntent);\n stopService(new Intent(this, MediaPlayerService.class));\n }",
"private DefaultSetting getSampleDefaultSetting() {\n DefaultSetting setting = new DefaultSetting(\"\",\n \"\",\n 5,\n Token.DIGIT,\n \"d\",\n 1,\n true,\n true,\n true);\n\n return setting;\n }",
"public int getSoundState() {\n return preferences.getInt(\"sound_state\",0);\n }",
"public String getSound();",
"public String getDefaultValue() {\n return type.getDefaultValue();\n }",
"private int ringerMode () throws Exception {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tAudioManager audioManager = \n\t\t\t\t(AudioManager)ConfigAppValues.getContext().getSystemService(Context.AUDIO_SERVICE);\n\t\t\t\n\t\t\t\n\t\t\t//Only for traces\n\t\t\tswitch (audioManager.getRingerMode()) {\n\t\t\t\n\t\t\t\tcase AudioManager.RINGER_MODE_SILENT:\n\t\t\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"Ringer_Mode_Silent\");\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase AudioManager.RINGER_MODE_NORMAL:\n\t\t\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"Ringer_Mode_Normal\");\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase AudioManager.RINGER_MODE_VIBRATE:\n\t\t\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"Ringer_Mode_Vibrate\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\treturn audioManager.getRingerMode();\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(CLASS_NAME, ExceptionUtils.exceptionTraceToString(\n\t\t\t\t\te.toString(), \n\t\t\t\t\te.getStackTrace()));\n\t\t\tthrow new Exception();\n\t\t}\n\t\t\n\t}",
"private static String getDefaultPosterResolution(Context context){\n return context.getString(R.string.pref_poster_resolution_default);\n }",
"private void configDefaultDrawable() {\n drawableResId().open = R.drawable.sms_add_btn;\n drawableResId().close = R.drawable.sms_close_btn;\n drawableResId().gotoEmotion = R.drawable.sms_kaomoji_btn;\n drawableResId().keyboard = R.drawable.sms_keyboard;\n drawableResId().voiceNormal = R.drawable.sms_voice_btn;\n drawableResId().voicePressed = R.drawable.sms_voice_btn_p;\n }",
"String getDefaultValue();",
"String getDefaultValue();",
"@Override\n\tpublic String sing() {\n\t\treturn this.sound;\n\t}",
"private int getPreferredHub(){\n SharedPreferences settings = getSharedPreferences(PREFS_NAME,\n Context.MODE_PRIVATE);\n return Integer.parseInt(settings.getString(PREF_HUB, DEFAULT_HUB));\n }",
"public IDevice getDefaultDevice() {\n\t\tif (defaultDevice==null) {\n\t\t\ttry {\n\t\t\t\tdefaultDevice = (IDevice) getObjectInstance(\"com.console.springernature.paint.model.Device\");\n\t\t\t} catch (ClassCastException e) {\n\t\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the default device ...\", e);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the default device ...\", e);\n\t\t\t}\n\t\t}\n\t\treturn defaultDevice;\n\t}",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // PR:486634 add xibin --Can't adjust alarm volume when press volume\n // up/down in select alarm ringtone list box.\n setVolumeControlStream(AudioManager.STREAM_ALARM);\n setContentView(R.layout.alarm_system_ringtone);\n// PR 594450 - Neo Skunkworks - Soar Gao - 001 begin \n /*getRingtoneInfo(this);\n initData();\n initView();\n*/\n// PR 594450 - Neo Skunkworks - Soar Gao - 001 end \n }",
"public int getSoundType() \n\t{\n\treturn fType;\n\t}",
"protected String getDefaultRpcReceiver() {\n return \"droid\";\n }",
"public int getAudioMode() {\n AudioManager audio = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);\n return audio.getMode(); //MODE_NORMAL, MODE_RINGTONE, MODE_IN_CALL, MODE_IN_COMMUNICATION\n }",
"public String getDefault(){\n return _default;\n }",
"boolean getShutterSoundPref();",
"public int getDefault(){\n return number;\n }",
"public String getDefault();",
"public MediaRating getRating() {\n MediaRating mediaRating = ratings.get(MediaRating.USER);\n\n // then the default one (either NFO or DEFAULT)\n if (mediaRating == null) {\n mediaRating = ratings.get(MediaRating.NFO);\n }\n if (mediaRating == null) {\n mediaRating = ratings.get(MediaRating.DEFAULT);\n }\n\n // is there any rating?\n if (mediaRating == null && !ratings.isEmpty()) {\n mediaRating = ratings.values().iterator().next();\n }\n\n // last but not least a non null value\n if (mediaRating == null) {\n mediaRating = new MediaRating();\n }\n\n return mediaRating;\n }",
"public double getDefault(){\n return number;\n }",
"String getDefaultPreference(String preferenceName) throws OntimizeJEERuntimeException;",
"public abstract Tone getTone();",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n choose_alarm_sound = (int) id;\n }",
"public SendSmsRingtoneResponse sendSmsRingtone(SendSmsRingtone request) {\n\t\treturn null;\n\t}",
"protected String getLivingSound()\n {\n return null;\n }",
"protected String getLivingSound()\n {\n return null;\n }",
"public double readMusicSetting() {\n try {\n BufferedReader soundReader = new BufferedReader(\n new FileReader(new File(wnwData, \"settings.dat\")));\n String soundSetting = soundReader.readLine();\n Scanner soundScanner = new Scanner(soundSetting);\n soundScanner.next();\n return Double.parseDouble(soundScanner.next());\n }\n catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e){\n e.printStackTrace();\n }\n return 0;\n }",
"public Integer getAudioResourceId(){\n return mAudioResourceid;\n }",
"Object getPreference(String prefKey, Object defaultValue);",
"public Type getDefault() {\n if (!loaded) loadPanic();\n return defaultValue;\n }",
"private int getDefaultDataSubscriptionId(Context context) {\n SubscriptionManager subscriptionManager = (SubscriptionManager) context.getSystemService(SubscriptionManager.class);\n return SubscriptionManager.getDefaultDataSubscriptionId();\n }",
"PreferenceDefaultValueAttribute getDefaultValue();",
"public int getmAudioResourceId() {\n\n return mAudioResourceId;\n }",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n private void playRingtone(@NonNull Ringtone ringtone, final int USAGE_CODE) {\n ringtone.setAudioAttributes(new AudioAttributes.Builder().setUsage(USAGE_CODE).build());\n ringtone.play();\n\n }",
"public String getSoundPath();",
"public Type getDefault()\n\t{\n\t\treturn m_default;\n\t}",
"public float getSpeechRate() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n return Float.valueOf(preferences.getString(\"speech_rate\", \"\"));\n }",
"public static int getDefaultEventType(){\n\t\treturn prefs.getInt(DEFAULT_EVENT_TYPE, 0);\n\t}",
"public static BitmapFont getDefault() {\r\n\t\treturn defaultFont;\r\n\t}",
"public boolean convertAudioTypeToDefault();",
"protected String getDefaultFilename() {\n return getFilename(\n mDefaultFilenamePrefix\n + mFileNameDelimiter\n + sAndroidDeviceName\n + mFileNameDelimiter\n + sAndroidRuntimeVersion);\n }",
"public int getLevel() {\n if ( air != null )\n return air.sampleRSSI(CC1000Radio.this);\n else return ADC.VBG_LEVEL; // return a default value of some sort\n }",
"public String getDefaultLink() {\n return (toAdDefaultLink);\n }",
"public int getAlarm () { return alarm; }",
"public Object getDefaultValue();",
"public Object getDefaultValue();",
"void getRadiationlevel();",
"public char[] getRingSettings() {\r\n\t\treturn rotors.getRingSettings();\r\n\t}",
"private void playHintAudio() {\n AudioManager audioManager = (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE);\n int mode = audioManager.getRingerMode();\n Log.d(TAG,\"mode = \" + mode);\n\n if(mode != AudioManager.RINGER_MODE_SILENT && mode != AudioManager.RINGER_MODE_VIBRATE) {\n // prize modify for bug 44603 by zhaojian 20171205 start\n mMediaPlayer = MediaPlayer.create(getContext(),R.raw.hb_sound2);\n Log.d(\"debug\",\"isNotifySound = \" + getConfig().isNotifySound());\n if(getConfig().isNotifySound()) {\n mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mp) {\n mp.start();\n }\n });\n mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n }\n });\n mMediaPlayer.start();\n }\n // prize modify for bug 44603 by zhaojian 20171205 end\n }\n }",
"protected String getHurtSound()\n {\n return null;\n }",
"protected String getHurtSound()\n {\n return null;\n }",
"public String getBaseMediaUrl() {\n return (String) get(\"base_media_url\");\n }",
"PlaySound getSound();",
"public void setDefaultSettings() {\n boolean shouldRecord = sharedPreferences.getBoolean(record,true);\n if (shouldRecord) {\n radioOption.check(R.id.radioRecord);\n radioOptionButton = (RadioButton)findViewById(R.id.radioRecord);\n radioOptionButton.setEnabled(true);\n } else {\n radioOption.check(R.id.radioRecognize);\n radioOptionButton = (RadioButton)findViewById(R.id.radioRecognize);\n radioOptionButton.setEnabled(true);\n }\n\n // Set timer to previous value set by user\n int minuteValue = sharedPreferences.getInt(minuteTime, 0)/60000;\n minutePicker.setValue(minuteValue);\n\n int secondValue = sharedPreferences.getInt(secondTime, 5000)/1000;\n secondPicker.setValue(secondValue);\n }",
"private void setUpRingtoneAndVibration(int vibration) {\n AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n am.setStreamVolume(AudioManager.STREAM_ALARM, am.getStreamMaxVolume(AudioManager.STREAM_ALARM), AudioManager.FLAG_PLAY_SOUND);\n\n Uri alarmUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);\n if (alarmUri == null) {\n alarmUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n }\n try {\n mediaPlayer.setDataSource(this, alarmUri);\n mediaPlayer.setLooping(true);\n mediaPlayer.setAudioStreamType(AudioManager.STREAM_ALARM);\n mediaPlayer.prepare();\n mediaPlayer.start();\n if (vibration == 1) {\n vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\n vibrator.vibrate(vibrationPattern, 0);\n }\n } catch (Exception e) {\n\n }\n }",
"public double getPickRadius() {\n\t\treturn 0;\n\t}",
"public MediaStorageVolume getDefaultStorageVolume()\n {\n MediaStorageVolume msv = null;\n LogicalStorageVolume lsv[] = null;\n StorageProxy[] proxies = StorageManager.getInstance().getStorageProxies();\n if (proxies.length != 0)\n {\n lsv = proxies[0].getVolumes();\n }\n else\n {\n System.out.println(\" *********No proxies avaliable*********\");\n return null;\n }\n\n System.out.println(\"*************************************************\");\n System.out.println(\" *****Found \" + lsv.length + \" volumes.******\");\n System.out.println(\"*************************************************\");\n for (int i = 0; i < lsv.length; i++)\n {\n if (lsv[i] instanceof MediaStorageVolume)\n {\n msv = (MediaStorageVolume) lsv[i];\n System.out.println(\"*************************************************\");\n System.out.println(\"******Found MSV: \" + msv + \"*********\");\n System.out.println(\"*************************************************\");\n }\n }\n\n if (msv == null)\n {\n System.out.println(\"*************************************************\");\n System.out.println(\"*******MediaStorageVolume not found!********\");\n System.out.println(\"*************************************************\");\n }\n return msv;\n }",
"@Override // com.oneplus.settings.ringtone.OPRingtoneBaseActivity\n public void onCreate(Bundle bundle) {\n String string;\n if (!(bundle == null || (string = bundle.getString(\"key_selected_item_uri\")) == null)) {\n this.mUriForDefaultItem = Uri.parse(string);\n }\n super.onCreate(bundle);\n setContentView(C0012R$layout.op_preference_list_content_material);\n initActionbar();\n this.mListView = getListView();\n this.mNofileView = findViewById(C0010R$id.id_empty);\n this.mProgressBar = (ProgressBar) findViewById(C0010R$id.id_progress);\n this.mHeaderMargin = findViewById(C0010R$id.header_margin);\n this.mListView.setEmptyView(this.mNofileView);\n this.mListView.setOnItemClickListener(this.mOnItemClickListener);\n this.mListView.setDivider(null);\n Log.v(OPLocalRingtonePickerActivity.class.getName(), \"onCreate startTask\");\n startTask(0);\n }",
"void InitSound() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n //Use the newer SoundPool.Builder\n //Set the audio attributes, SONIFICATION is for interaction events\n //uses builder pattern\n AudioAttributes aa = new AudioAttributes.Builder()\n .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)\n .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)\n .build();\n\n //default max streams is 1\n //also uses builder pattern\n dice_sound= new SoundPool.Builder().setAudioAttributes(aa).build();\n\n } else {\n // Running on device earlier than Lollipop\n //Use the older SoundPool constructor\n dice_sound=PreLollipopSoundPool.NewSoundPool();\n }\n //Load the dice sound\n sound_id=dice_sound.load(this,R.raw.shake_dice,1);\n alarm_sound_id=dice_sound.load(this,R.raw.on_time,1);\n }",
"abstract String getSound();",
"public MediaSize getMediaSizeDefault() {\n\t\tMediaSize retValue = Language.getLoginLanguage().getMediaSize();\n\t\tif (retValue == null)\n\t\t\tretValue = MediaSize.ISO.A4;\n\t\tlog.fine(retValue.toString());\n\t\treturn retValue;\n\t}",
"public Rate getDefaultStandardRate()\r\n {\r\n return (m_defaultStandardRate);\r\n }",
"protected String getHurtSound() {\n return \"dig.stone\";\n }",
"public org.apache.axis.types.PositiveInteger getRingingDuration() {\r\n return ringingDuration;\r\n }",
"public T getDefaultValue() {\n return defaultValue.orNull();\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 10) {\n // Make sure the request was successful\n if (resultCode == RESULT_OK) {\n System.out.println(data.getData().toString());\n Button tb = (Button) findViewById(R.id.toneButton);\n try {\n FName = getRealPathFromURI(data.getData());\n String[] UFFName = FName.split(\"/\");\n tb.setText(\"Alarm tone: \" + UFFName[UFFName.length - 1]);\n } catch (Exception Ex) {\n Toast.makeText(this, \"Error: \" + Ex + \"\\n\" + FName, Toast.LENGTH_SHORT).show();\n }\n }\n }\n }",
"public PrivilegesRadioEnum getDefaultPrivilegesRadio() {\r\n return PrivilegesRadioEnum.IMMEDIATE;\r\n }",
"public String getDefaultApp()\n {\n if (defaultApp == null)\n {\n return apps.get(0).getName();\n }\n\n return defaultApp;\n }",
"T getDefaultValue();",
"public net.opengis.www.gml._3_2.AbstractRingType getAbstractRing()\n {\n synchronized (monitor())\n {\n check_orphaned();\n net.opengis.www.gml._3_2.AbstractRingType target = null;\n target = (net.opengis.www.gml._3_2.AbstractRingType)get_store().find_element_user(ABSTRACTRING$1, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public String getRing();",
"static public Object getDefaultObject () {\n return defaultObject;\n }",
"public int getRadio() {\n return radio;\n }",
"abstract public String getSoundResourcesDir();",
"public void stopRingtone(Ringtone ringtone) {\n ringtone.stop();\n }"
] | [
"0.7642854",
"0.69591457",
"0.68255067",
"0.62207013",
"0.6145164",
"0.6121304",
"0.6038287",
"0.5857406",
"0.5706638",
"0.55800986",
"0.55649954",
"0.5549802",
"0.5536093",
"0.5514254",
"0.5477157",
"0.5449438",
"0.5435678",
"0.5434065",
"0.5340404",
"0.5330556",
"0.5291278",
"0.52585125",
"0.5256842",
"0.5243847",
"0.52181566",
"0.519464",
"0.5156398",
"0.51499605",
"0.514407",
"0.51235074",
"0.5121289",
"0.5121289",
"0.512072",
"0.5111993",
"0.51088095",
"0.5101178",
"0.50925934",
"0.5086175",
"0.508066",
"0.50547516",
"0.50533235",
"0.5031334",
"0.5018319",
"0.49723285",
"0.49715623",
"0.49562088",
"0.4944441",
"0.49395347",
"0.49392545",
"0.49212348",
"0.49212348",
"0.49205607",
"0.4895169",
"0.4892724",
"0.48821092",
"0.48756388",
"0.48715574",
"0.486464",
"0.4861816",
"0.4861586",
"0.4847385",
"0.4838224",
"0.48251247",
"0.48204514",
"0.4820114",
"0.48180977",
"0.48056686",
"0.48054385",
"0.48041925",
"0.48012257",
"0.48012257",
"0.47983468",
"0.47911778",
"0.47817937",
"0.4768156",
"0.4768156",
"0.47545397",
"0.475384",
"0.47530404",
"0.47489783",
"0.47393417",
"0.4737249",
"0.47336873",
"0.47331756",
"0.4731358",
"0.47272933",
"0.4719611",
"0.47130498",
"0.4712263",
"0.4711493",
"0.47102812",
"0.47099024",
"0.4707958",
"0.47048894",
"0.47019216",
"0.47005534",
"0.46996444",
"0.46947792",
"0.46934718",
"0.46875015"
] | 0.801337 | 0 |
Get current ringtone. If hasn't been chosen yet returns device default. | private Uri getCurrentRingtone(){
return mAlarmRingtone != null ? mAlarmRingtone : getDefaultRingtone();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Uri getDefaultRingtone(){\n return RingtoneManager.getActualDefaultRingtoneUri(DetailActivity.this,\n RingtoneManager.TYPE_ALARM);\n }",
"public void pickRingtone() {\n final Uri currentTone = getCurrentRingtone();\n Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_RINGTONE);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, R.string.label_ringtone);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, currentTone);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);\n startActivityForResult(intent, RINGTONE_PICKER_REQUEST_CODE);\n }",
"public int getRingtoneMode() {\n return mAudioManager.getRingerMode();\n }",
"private void saveDefaultRing(){\n \t SharedPreferences sharedPre = getSharedPreferences(\n RingtoneList.TIMER_RPREFERENCES,\n 0);\n \t if (!GotoRingtoneActivity.musicPath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, GotoRingtoneActivity.musicName)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, GotoRingtoneActivity.musicPath)\n .putInt(\"mSystemPosition\", GotoRingtoneActivity.musicID)\n .commit();\n }\n \t// PR 590654 - Neo Skunkworks - Soar Gao - 001 begin\n// Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n// String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n// \t\tGotoRingtoneActivity.musicName);\n// String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n// \t\tGotoRingtoneActivity.musicPath);\n// mIntent.putExtra(\"ringtone\", ringtoneName);\n// mIntent.putExtra(\"ringtonePath\", ringtonePath);\n// mIntent.putExtra(\"ringtonePosition\", mSystemPosition);\n// sendBroadcast(mIntent);\n \t// PR 590654 - Neo Skunkworks - Soar Gao - 001 end\n }",
"public Tone getPrimaryTone() {\n return getTones().get(0);\n }",
"public void playRingtone() {\n\t\ttry {\n\t Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\t Ringtone r = RingtoneManager.getRingtone(this.cordova.getActivity().getApplicationContext(), notification);\n\t if(r == null) {\n\t \tnotification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);\n\t \tr = RingtoneManager.getRingtone(this.cordova.getActivity().getApplicationContext(), notification);\n\t }\n\t r.play();\n\t } catch (Exception e) {Toast.makeText(this.cordova.getActivity().getApplicationContext(), \"playRingtone method exception\", Toast.LENGTH_LONG).show();}\n\t}",
"private void setRingtoneName(){\n //select default ringtone when there isn't ringtone which chose\n Uri ringtoneUri = getCurrentRingtone();\n Ringtone ringtone = RingtoneManager.getRingtone(this, ringtoneUri);\n mDetailBinding.clockDetails.ringtone.setText(ringtone.getTitle(this));\n }",
"private static String getStringByType(int type)\n {\n switch(type){\n case RingtoneManager.TYPE_ALARM:\n return Settings.System.ALARM_ALERT;\n case RingtoneManager.TYPE_NOTIFICATION:\n return Settings.System.NOTIFICATION_SOUND;\n case RingtoneManager.TYPE_RINGTONE:\n return Settings.System.RINGTONE;\n default:\n return null;\n }\n }",
"public void playRingtone(Ringtone ringtone) {\n playRingtone(ringtone, AudioAttributes.USAGE_ALARM);\n }",
"public final String getSound( ) {\n\t\treturn sound;\n\t}",
"public String getRemoteRingbackTone();",
"private Uri updateExternalFile(OPLocalRingtoneAdapter.RingtoneData ringtoneData) {\n OPMyLog.d(\"chenhl\", \"getKey:\" + ringtoneData.mUri);\n String str = ringtoneData.filepath;\n OPMyLog.d(\"chenhl\", \"path:\" + str);\n File file = new File(str);\n if (!file.exists()) {\n this.mHandler.post(new Runnable() {\n /* class com.oneplus.settings.ringtone.OPLocalRingtonePickerActivity.AnonymousClass4 */\n\n public void run() {\n OPLocalRingtonePickerActivity oPLocalRingtonePickerActivity = OPLocalRingtonePickerActivity.this;\n Toast.makeText(oPLocalRingtonePickerActivity, oPLocalRingtonePickerActivity.getString(C0017R$string.oneplus_file_not_exist), 0).show();\n }\n });\n return null;\n }\n playRingtone(300, this.mUriForDefaultItem);\n if (str == null || str.startsWith(\"/storage/emulated/legacy\") || str.startsWith(SDCARD_PATH)) {\n return this.mUriForDefaultItem;\n }\n File file2 = new File(checkDir() + file.getName());\n if (!file2.exists()) {\n copyFile(file, file2);\n }\n return updateDb(ringtoneData, file2.getAbsolutePath());\n }",
"public String getRingerDevice();",
"public static void setTone(SquareImageButton button, int toneType) {\n // Get the context for the image button\n Context context = button.getContext();\n // The internal uri for our resource\n Uri newUri = null;\n String path = getDirectoryPath();\n\n Resources resources = (context != null) ? context.getResources() : null;\n if(resources != null) {\n String entryName = context.getResources().getResourceEntryName(button.getSoundClipId());\n File file = new File(path + \"/\", entryName + \".mp3\");\n\n Uri uri = Uri.parse(\"android.resource://\" + context.getPackageName() + \"/raw/\" + entryName);\n ContentResolver resolver = context.getContentResolver();\n if(!file.exists()){\n newUri = saveFileAndAddToMediaStore(button, context, file, uri, resolver);\n }\n try {\n if(newUri == null){\n newUri = getAudioUriFromFilePath(file.getAbsolutePath(), resolver);\n }\n if(newUri != null){\n RingtoneManager.setActualDefaultRingtoneUri(context,\n toneType, newUri);\n Settings.System.putString(resolver, getStringByType(toneType),\n newUri.toString());\n //show the message to the user\n CharSequence text = \"\";\n switch(toneType){\n case RingtoneManager.TYPE_NOTIFICATION:\n text = \"Notification tone set\";\n break;\n case RingtoneManager.TYPE_RINGTONE:\n text = \"Ringtone set\";\n break;\n }\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }\n\n } catch (Throwable t) {\n Toast toast = Toast.makeText(context, \"An error occurred: \" + t.getMessage(), Toast.LENGTH_SHORT);\n toast.show();\n }\n }\n }",
"public java.lang.String getLocalRingBackToneId() {\r\n return localRingBackToneId;\r\n }",
"public static AudioPlayer getDEFAULTSHOOTSOUND() {\r\n\t\treturn DEFAULTSHOOTSOUND;\r\n\t}",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n private void playRingtone(@NonNull Ringtone ringtone, final int USAGE_CODE) {\n ringtone.setAudioAttributes(new AudioAttributes.Builder().setUsage(USAGE_CODE).build());\n ringtone.play();\n\n }",
"public static Uri getNotificationSound(Context cxt, String sound){\n Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n if(!sound.isEmpty()) {\n int soundResource = cxt.getResources().getIdentifier(sound, \"raw\", cxt.getPackageName());\n if (soundResource != 0) {\n soundUri = Uri.parse(\"android.resource://\"\n + cxt.getPackageName() + \"/\" + soundResource);\n }\n }\n\n return soundUri;\n }",
"@Override\n\tpublic String sing() {\n\t\treturn this.sound;\n\t}",
"PlaySound getSound();",
"private void saveRingtone() {\n \tif(((GotoRingtoneActivity.musicID!=-1)&&(GotoRingtoneActivity.musicActivity==0))){\n \t\tsendToService();\n \t}\n \t// PR 587415 - Neo Skunkworks - Soar Gao - 001 end\n SharedPreferences sharedPre = getSharedPreferences(\n RingtoneList.TIMER_RPREFERENCES,\n 0);\n// PR 587415 - Neo Skunkworks - Soar Gao - 001 begin\n/*\n if (!mFilePath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, mPreRingtone)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, mFilePath)\n .putInt(\"mSystemPosition\", mSystemPosition)\n .commit();\n }\n Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n mPreRingtone);\n String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n mFilePath);\n*/\n if (!GotoRingtoneActivity.musicPath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, GotoRingtoneActivity.musicName)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, GotoRingtoneActivity.musicPath)\n .putInt(\"mSystemPosition\", GotoRingtoneActivity.musicID)\n .commit();\n }\n Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n \t\tGotoRingtoneActivity.musicName);\n String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n \t\tGotoRingtoneActivity.musicPath);\n// PR 587415 - Neo Skunkworks - Soar Gao - 001 end\n mIntent.putExtra(\"ringtone\", ringtoneName);\n mIntent.putExtra(\"ringtonePath\", ringtonePath);\n mIntent.putExtra(\"ringtonePosition\", mSystemPosition);\n sendBroadcast(mIntent);\n stopService(new Intent(this, MediaPlayerService.class));\n }",
"public abstract Tone getTone();",
"public String getSound();",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n choose_alarm_sound = (int) id;\n }",
"@Override\n\tprotected SoundEvent getAmbientSound() {\n\t\treturn getSoundManager().getLivingSound();\n\t}",
"protected String getLivingSound()\n {\n return null;\n }",
"protected String getLivingSound()\n {\n return null;\n }",
"public MediaRating getRating() {\n MediaRating mediaRating = ratings.get(MediaRating.USER);\n\n // then the default one (either NFO or DEFAULT)\n if (mediaRating == null) {\n mediaRating = ratings.get(MediaRating.NFO);\n }\n if (mediaRating == null) {\n mediaRating = ratings.get(MediaRating.DEFAULT);\n }\n\n // is there any rating?\n if (mediaRating == null && !ratings.isEmpty()) {\n mediaRating = ratings.values().iterator().next();\n }\n\n // last but not least a non null value\n if (mediaRating == null) {\n mediaRating = new MediaRating();\n }\n\n return mediaRating;\n }",
"public void setRemoteRingbackTone(String ring);",
"private FunctionSoundD getFunctionSound() {\n\t\tif (functionSound == null) {\n\t\t\ttry {\n\t\t\t\tfunctionSound = new FunctionSoundD();\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.error(\"Problem in getFunctionSound(): \" + e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn functionSound;\n\t}",
"protected int playMakeCallSounds() {\n try {\n audioManager.setMode(AudioManager.MODE_RINGTONE);\n audioManager.setSpeakerphoneOn(true);\n\n // play\n int id = soundPool.play(outgoing, // sound resource\n 0.3f, // left volume\n 0.3f, // right volume\n 1, // priority\n -1, // loop,0 is no loop,-1 is loop forever\n 1); // playback rate (1.0 = normal playback, range 0.5 to 2.0)\n return id;\n } catch (Exception e) {\n return -1;\n }\n }",
"public int getSoundType() \n\t{\n\treturn fType;\n\t}",
"private int getSoundLevelToRestore() {\n int savedSoundLevel = originalVolumes != null ? originalVolumes.getRingVolume() : -1;\n\n //if it was 0 -> was in vibrate no need to restore to user level.\n if (savedSoundLevel > 0 ) {\n if (mIsRestoreVolToUserSetLevelEnabled) {\n return userSetVolumeLevelToRestore;\n }\n } else {\n //если громкость 0 а режим нормальный - что-то не так\n if (originalVolumes != null && originalVolumes.getRingMode() == RingMode.RINGER_MODE_NORMAL) {\n return 1;\n }\n }\n return savedSoundLevel;\n }",
"public net.opengis.www.gml._3_2.AbstractRingType getAbstractRing()\n {\n synchronized (monitor())\n {\n check_orphaned();\n net.opengis.www.gml._3_2.AbstractRingType target = null;\n target = (net.opengis.www.gml._3_2.AbstractRingType)get_store().find_element_user(ABSTRACTRING$1, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public int getSoundState() {\n return preferences.getInt(\"sound_state\",0);\n }",
"@SideOnly(Side.CLIENT)\n protected ResourceLocation getActivitySound() {\n return activitySound;\n }",
"public String getSoundPath();",
"public SendSmsRingtoneResponse sendSmsRingtone(SendSmsRingtone request) {\n\t\treturn null;\n\t}",
"abstract String getSound();",
"boolean getShutterSoundPref();",
"private void useContext(Context c) {\n fallbackSound = RingtoneManager.getRingtone(c, AlarmUtil.getDefaultAlarmUri());\n if (fallbackSound == null) {\n Uri superFallback = RingtoneManager.getValidRingtoneUri(c);\n fallbackSound = RingtoneManager.getRingtone(c, superFallback);\n }\n // Make the fallback sound use the alarm stream as well.\n if (fallbackSound != null) {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {\n fallbackSound.setStreamType(AudioManager.STREAM_ALARM);\n } else {\n fallbackSound.setAudioAttributes(new AudioAttributes.Builder()\n .setUsage(AudioAttributes.USAGE_ALARM)\n .setContentType(AudioAttributes.CONTENT_TYPE_MUSIC)\n .build());\n }\n }\n\n // Instantiate a vibrator. That's fun to say.\n vibrator = (Vibrator) c.getSystemService(Context.VIBRATOR_SERVICE);\n }",
"@Override // com.oneplus.settings.ringtone.OPRingtoneBaseActivity\n public void updateSelected() {\n if (this.mSystemRings == null) {\n }\n }",
"private int ringerMode () throws Exception {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tAudioManager audioManager = \n\t\t\t\t(AudioManager)ConfigAppValues.getContext().getSystemService(Context.AUDIO_SERVICE);\n\t\t\t\n\t\t\t\n\t\t\t//Only for traces\n\t\t\tswitch (audioManager.getRingerMode()) {\n\t\t\t\n\t\t\t\tcase AudioManager.RINGER_MODE_SILENT:\n\t\t\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"Ringer_Mode_Silent\");\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase AudioManager.RINGER_MODE_NORMAL:\n\t\t\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"Ringer_Mode_Normal\");\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase AudioManager.RINGER_MODE_VIBRATE:\n\t\t\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"Ringer_Mode_Vibrate\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\treturn audioManager.getRingerMode();\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(CLASS_NAME, ExceptionUtils.exceptionTraceToString(\n\t\t\t\t\te.toString(), \n\t\t\t\t\te.getStackTrace()));\n\t\t\tthrow new Exception();\n\t\t}\n\t\t\n\t}",
"public int getTone(){\n\t\tint keyAsTone = (int) (Math.pow(2.0, (((double)key)-49.0)/12)*440);\n\t\treturn keyAsTone;\n\t}",
"public int getAudioMode() {\n AudioManager audio = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);\n return audio.getMode(); //MODE_NORMAL, MODE_RINGTONE, MODE_IN_CALL, MODE_IN_COMMUNICATION\n }",
"@Override\n public List<ItemAdapter.ItemHolder<Uri>> loadInBackground() {\n DataModel.getDataModel().loadRingtoneTitles();\n DataModel.getDataModel().loadRingtonePermissions();\n\n // Fetch the standard system ringtones.\n final RingtoneManager ringtoneManager = new RingtoneManager(getContext());\n ringtoneManager.setType(STREAM_ALARM);\n\n Cursor systemRingtoneCursor;\n try {\n systemRingtoneCursor = ringtoneManager.getCursor();\n } catch (Exception e) {\n LogUtils.e(\"Could not get system ringtone cursor\");\n systemRingtoneCursor = new MatrixCursor(new String[] {});\n }\n final int systemRingtoneCount = systemRingtoneCursor.getCount();\n // item count = # system ringtones + # custom ringtones + 2 headers + Add new music item\n final int itemCount = systemRingtoneCount + mCustomRingtones.size() + 3;\n\n final List<ItemAdapter.ItemHolder<Uri>> itemHolders = new ArrayList<>(itemCount);\n\n // Add the item holder for the Music heading.\n itemHolders.add(new HeaderHolder(R.string.your_sounds));\n\n // Add an item holder for each custom ringtone and also cache a pretty name.\n for (CustomRingtone ringtone : mCustomRingtones) {\n itemHolders.add(new CustomRingtoneHolder(ringtone));\n }\n\n // Add an item holder for the \"Add new\" music ringtone.\n itemHolders.add(new AddCustomRingtoneHolder());\n\n // Add an item holder for the Ringtones heading.\n itemHolders.add(new HeaderHolder(R.string.device_sounds));\n\n // Add an item holder for the silent ringtone.\n itemHolders.add(new SystemRingtoneHolder(RINGTONE_SILENT, null));\n\n // Add an item holder for the system default alarm sound.\n itemHolders.add(new SystemRingtoneHolder(mDefaultRingtoneUri, mDefaultRingtoneTitle));\n\n // Add an item holder for each system ringtone.\n for (int i = 0; i < systemRingtoneCount; i++) {\n final Uri ringtoneUri = ringtoneManager.getRingtoneUri(i);\n itemHolders.add(new SystemRingtoneHolder(ringtoneUri, null));\n }\n\n return itemHolders;\n }",
"public Sound getSound() {\n return _sound;\n }",
"public Recognition findSkytone() {\n List<Recognition> recogs = this.findBricks();\n boolean one_seen = false;\n Recognition skystone = null;\n for (Recognition recog : recogs) {\n if (recog.getLabel() == \"Skystone\") {\n if (one_seen) {\n return null;\n } //if this is the second we're seeing, return null\n else {\n one_seen = true;\n skystone = recog;\n }\n }\n }\n return skystone; //will be null if we never saw a skystone, or defined if not\n }",
"public final static SoundHandler getSoundHandler() {\r\n\t\treturn soundHandler;\r\n\t}",
"private void playHintAudio() {\n AudioManager audioManager = (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE);\n int mode = audioManager.getRingerMode();\n Log.d(TAG,\"mode = \" + mode);\n\n if(mode != AudioManager.RINGER_MODE_SILENT && mode != AudioManager.RINGER_MODE_VIBRATE) {\n // prize modify for bug 44603 by zhaojian 20171205 start\n mMediaPlayer = MediaPlayer.create(getContext(),R.raw.hb_sound2);\n Log.d(\"debug\",\"isNotifySound = \" + getConfig().isNotifySound());\n if(getConfig().isNotifySound()) {\n mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mp) {\n mp.start();\n }\n });\n mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n }\n });\n mMediaPlayer.start();\n }\n // prize modify for bug 44603 by zhaojian 20171205 end\n }\n }",
"public AudioInputStream getSample() {\n\t\t\ttry {\n\t\t\t\tif (file != null) {\n\t\t\t\t\tfile.close();\n\t\t\t\t}\n\t\t\t\tfile = AudioFileHandler.OpenFile(filepath);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn file;\n\t\t}",
"public static MediaDevice getLocalMediaDevice(){\n\n return localMediaDevice;\n }",
"public SoundClip chooseSound(Sound sound){\n SoundClip audio = null;\n\n switch(sound){\n case CREDIT:\n audio = createStream(CREDIT_URL);\n break;\n case DEATH:\n audio = createStream(DEATH_URL);\n break;\n case EAT_FRUIT:\n audio = createStream(EAT_FRUIT_URL);\n break;\n case EAT_GHOST:\n audio = createStream(EAT_GHOST_URL);\n break;\n case PAUSE_SOUND:\n audio = createStream(PAUSE_SOUND_URL);\n break;\n case GAME_START:\n audio = createStream(GAME_START_URL);\n break;\n case MUNCH_1:\n audio = createStream(MUNCH_1_URL);\n break;\n case MUNCH_2:\n audio = createStream(MUNCH_2_URL);\n break;\n case FRIGHT_SOUND:\n audio = createStream(FRIGHT_SOUND_URL);\n break;\n case EATEN_SOUND:\n audio = createStream(EATEN_SOUND_URL);\n break;\n case SIREN_1:\n audio = createStream(SIREN_1_URL);\n break;\n case SIREN_2:\n audio = createStream(SIREN_2_URL);\n break;\n case SIREN_3:\n audio = createStream(SIREN_3_URL);\n break;\n case SIREN_4:\n audio = createStream(SIREN_4_URL);\n break;\n case SIREN_5:\n audio = createStream(SIREN_5_URL);\n break;\n case STARTUP:\n audio = createStream(STARTUP_URL);\n break;\n case BLUE_PORTAL_SOUND:\n audio = createStream(BLUE_PORTAL_SOUND_URL);\n break;\n case RED_PORTAL_SOUND:\n audio = createStream(RED_PORTAL_SOUND_URL);\n break;\n }\n audio.setName(sound);\n return audio;\n }",
"public SoundInfo getSound(int keyCode) {\n\t\tSoundInfo sound = null;\n\t\tif (soundList.containsKey(keyCode)) {\n\t\t\tsound = soundList.get(keyCode);\n\t\t}\n\t\treturn sound;\n\t}",
"protected SoundEvent getAmbientSound()\n {\n if (timetopee > 0 || bumgave )\n {\n return MCSoundEvents.ENTITY_BUM;\n }\n else\n {\n return MCSoundEvents.ENTITY_BUM_LIVINGPEE;\n }\n }",
"abstract public String getSoundResourcesDir();",
"public void stopRingtone(Ringtone ringtone) {\n ringtone.stop();\n }",
"public static void playSound(Context context) {\n mAudioManager = (AudioManager) context.getSystemService(AUDIO_SERVICE);\n assert mAudioManager != null;\n originalVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);\n Log.d(TAG, \"originalVolume: \"+ originalVolume);\n mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0);\n mAudioManager.setMode(AudioManager.STREAM_MUSIC);\n mAudioManager.setSpeakerphoneOn(true);\n\n if (mp != null) {\n mp.stop();\n }\n\n mp = MediaPlayer.create(context, R.raw.ringingsound);\n mp.setLooping(true);\n mp.start();\n\n }",
"public int getmAudioResourceId() {\n\n return mAudioResourceId;\n }",
"MidiSoundD getMidiSound() {\n\t\tif (midiSound == null) {\n\t\t\ttry {\n\t\t\t\tmidiSound = new MidiSoundD(app);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn midiSound;\n\t}",
"public IDevice getDefaultDevice() {\n\t\tif (defaultDevice==null) {\n\t\t\ttry {\n\t\t\t\tdefaultDevice = (IDevice) getObjectInstance(\"com.console.springernature.paint.model.Device\");\n\t\t\t} catch (ClassCastException e) {\n\t\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the default device ...\", e);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the default device ...\", e);\n\t\t\t}\n\t\t}\n\t\treturn defaultDevice;\n\t}",
"protected String getLivingSound() {\r\n\t\treturn \"mob.chicken.say\";\r\n\t}",
"@Override // com.oneplus.settings.ringtone.OPRingtoneBaseActivity\n public void onCreate(Bundle bundle) {\n String string;\n if (!(bundle == null || (string = bundle.getString(\"key_selected_item_uri\")) == null)) {\n this.mUriForDefaultItem = Uri.parse(string);\n }\n super.onCreate(bundle);\n setContentView(C0012R$layout.op_preference_list_content_material);\n initActionbar();\n this.mListView = getListView();\n this.mNofileView = findViewById(C0010R$id.id_empty);\n this.mProgressBar = (ProgressBar) findViewById(C0010R$id.id_progress);\n this.mHeaderMargin = findViewById(C0010R$id.header_margin);\n this.mListView.setEmptyView(this.mNofileView);\n this.mListView.setOnItemClickListener(this.mOnItemClickListener);\n this.mListView.setDivider(null);\n Log.v(OPLocalRingtonePickerActivity.class.getName(), \"onCreate startTask\");\n startTask(0);\n }",
"@Override\r\n\t\tpublic int dmr_getVolume() throws RemoteException {\n\t\t\tint current = soundManager.getVolume();\r\n\t\t\tUtils.printLog(TAG, \"current Volume\" + current);\r\n\t\t\treturn current;\r\n\t\t}",
"public Integer getAudioResourceId(){\n return mAudioResourceid;\n }",
"public void alarmToneButton_click(View view) {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(intent, 10);\n }",
"public void playNotification(){\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(ctx,notification);\n r.play();\n }",
"public SoundClip getSound() {\n return socSound;\n }",
"private void setPreviousSelectedRingTone(int ringtoneId) {\n int position = getPositionById(ringtoneId);\n ringtoneListView.setItemChecked(position, true);\n }",
"public static Uri getPhotoUri() {\n Logger.d(TAG, \"getPhotoUri() entry\");\n Cursor cursor = null;\n int imageId = 0;\n try {\n cursor =\n mContext.getContentResolver().query(\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null, null);\n cursor.moveToFirst();\n imageId = cursor.getInt(cursor.getColumnIndex(MediaStore.Images.ImageColumns._ID));\n } finally {\n if (cursor != null) {\n cursor.close();\n cursor = null;\n }\n }\n Uri photoUri = Uri.parse(PREFER_PHOTO_URI + imageId);\n Logger.d(TAG, \"getPhotoUri() exit with the uri \" + photoUri);\n return photoUri;\n }",
"protected String getHurtSound()\n {\n return null;\n }",
"protected String getHurtSound()\n {\n return null;\n }",
"public Single<Uri> audio(@NonNull FragmentActivity activity) {\n return requestImage(\n activity,\n false,\n MimeType.AUDIO)\n .map(uris -> uris.get(0));\n }",
"@Override\r\n\tpublic SoundsApi getSoundsApi() {\r\n\t\treturn this;\r\n\t}",
"public String getRing();",
"public File getSoundFile() {\n \t\treturn soundFile;\n \t}",
"public double readSoundSetting() {\n try {\n BufferedReader soundReader = new BufferedReader(\n new FileReader(new File(wnwData, \"settings.dat\")));\n String soundSetting = soundReader.readLine();\n Scanner soundScanner = new Scanner(soundSetting);\n return Double.parseDouble(soundScanner.next());\n }\n catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e){\n e.printStackTrace();\n }\n return 0;\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Bundle alarmRingtoneData = intent.getExtras();\n int alarmRingtoneNumber = alarmRingtoneData.getInt(\"alarmClipNumber\");\n\n Intent serviceIntent = new Intent(context, RingtonePlayingService.class);\n serviceIntent.putExtra(\"alarmClipNumber\", alarmRingtoneNumber);\n\n context.startService(serviceIntent);\n }",
"public String getBackgroundSoundName() {\n return backgroundSound;\n }",
"public int getCurrentRound() {\n\t\treturn roundNumber;\n\t}",
"public MediaDevice getDefaultDevice(MediaType mediaType, MediaUseCase useCase)\r\n {\r\n int mediaTypeIndex = mediaType.ordinal();\r\n MediaDevice device = devices[mediaTypeIndex];\r\n MediaService mediaService = ProtocolMediaActivator.getMediaService();\r\n\r\n if (device == null)\r\n device = mediaService.getDefaultDevice(mediaType, useCase);\r\n\r\n /*\r\n * Make sure that the device is capable of mixing in order to support conferencing and call\r\n * recording.\r\n */\r\n if (device != null) {\r\n MediaDevice mixer = mixers[mediaTypeIndex];\r\n\r\n if (mixer == null) {\r\n switch (mediaType) {\r\n case AUDIO:\r\n /*\r\n * TODO AudioMixer leads to very poor audio quality on Android so do not\r\n * use it unless it is really really necessary.\r\n */\r\n if ((!OSUtils.IS_ANDROID || isConferenceFocus())\r\n && !this.translator\r\n /*\r\n * We can use the AudioMixer only if the device is able to capture\r\n * (because the AudioMixer will push when the capture device pushes).\r\n */\r\n && device.getDirection().allowsSending()) {\r\n mixer = mediaService.createMixer(device);\r\n }\r\n break;\r\n\r\n case VIDEO:\r\n if (isConferenceFocus())\r\n mixer = mediaService.createMixer(device);\r\n break;\r\n }\r\n mixers[mediaTypeIndex] = mixer;\r\n }\r\n\r\n if (mixer != null)\r\n device = mixer;\r\n }\r\n return device;\r\n }",
"private String getSelectedRadio()\r\n {\r\n if (InOrderRadio.isSelected())\r\n {\r\n return InOrderRadio.getText();\r\n } else if (AlmostOrderRadio.isSelected())\r\n {\r\n return AlmostOrderRadio.getText();\r\n } else if (ReverseOrderRadio.isSelected())\r\n {\r\n return ReverseOrderRadio.getText();\r\n } else\r\n {\r\n return RandomOrderRadio.getText();\r\n }\r\n }",
"public Alarm getFirstAlarm()\r\n\t{\r\n\t\tif ((getAlarms() != null) && !getAlarms().isEmpty())\r\n\t\t{\r\n\t\t\treturn getAlarms().get(FIRST);\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"private int getPreferredHub(){\n SharedPreferences settings = getSharedPreferences(PREFS_NAME,\n Context.MODE_PRIVATE);\n return Integer.parseInt(settings.getString(PREF_HUB, DEFAULT_HUB));\n }",
"Optional<SliderType> getSliderTypeofMixer(TypeUnitSound typeUnitSound);",
"private void setSound(@NonNull NotificationCompat.Builder builder) {\n if (mFplReminder.isNotificationSound()) {\n Uri soundUri = RingtoneManager.getDefaultUri(TYPE_NOTIFICATION);\n builder.setSound(soundUri);\n }\n }",
"public void playThemeSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, THEME);\n\t}",
"protected String getHurtSound() {\n return \"dig.stone\";\n }",
"public static boolean isSound() {\n return sound;\n }",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // PR:486634 add xibin --Can't adjust alarm volume when press volume\n // up/down in select alarm ringtone list box.\n setVolumeControlStream(AudioManager.STREAM_ALARM);\n setContentView(R.layout.alarm_system_ringtone);\n// PR 594450 - Neo Skunkworks - Soar Gao - 001 begin \n /*getRingtoneInfo(this);\n initData();\n initView();\n*/\n// PR 594450 - Neo Skunkworks - Soar Gao - 001 end \n }",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t\n\t\tAudioManager audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);\n\t\tfloat actualVolume = (float) audioManager\n\t\t\t\t.getStreamVolume(AudioManager.STREAM_MUSIC);\n\t\tfloat maxVolume = (float) audioManager\n\t\t\t\t.getStreamMaxVolume(AudioManager.STREAM_MUSIC);\n\t\tfloat volume = actualVolume / maxVolume;\n\t\t\n\t\tLog.e(\"Test\", \"isloaded: \" + loaded);\n\t\tif (loaded && (sound == R.id.radioButton_on) && fromAlarm) {\n\t\t\tsoundPool.play(soundID, volume, volume, 1, 0, 1f);\n\t\t\tLog.e(\"Test\", \"Played sound\");\n\t\t}\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 10) {\n // Make sure the request was successful\n if (resultCode == RESULT_OK) {\n System.out.println(data.getData().toString());\n Button tb = (Button) findViewById(R.id.toneButton);\n try {\n FName = getRealPathFromURI(data.getData());\n String[] UFFName = FName.split(\"/\");\n tb.setText(\"Alarm tone: \" + UFFName[UFFName.length - 1]);\n } catch (Exception Ex) {\n Toast.makeText(this, \"Error: \" + Ex + \"\\n\" + FName, Toast.LENGTH_SHORT).show();\n }\n }\n }\n }",
"void InitSound() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n //Use the newer SoundPool.Builder\n //Set the audio attributes, SONIFICATION is for interaction events\n //uses builder pattern\n AudioAttributes aa = new AudioAttributes.Builder()\n .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)\n .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)\n .build();\n\n //default max streams is 1\n //also uses builder pattern\n dice_sound= new SoundPool.Builder().setAudioAttributes(aa).build();\n\n } else {\n // Running on device earlier than Lollipop\n //Use the older SoundPool constructor\n dice_sound=PreLollipopSoundPool.NewSoundPool();\n }\n //Load the dice sound\n sound_id=dice_sound.load(this,R.raw.shake_dice,1);\n alarm_sound_id=dice_sound.load(this,R.raw.on_time,1);\n }",
"private Locale getPreferredLocale() {\n return mActivity.getResources().getConfiguration().getLocales().get(0);\n }",
"private int getCurrentSong() {\n return currentSong;\n }",
"public ReadPreference getPreferredRead() {\n if (preferredRead != null && !preferredRead.isEmpty()) {\n return MONGO_READ_PREF.get(preferredRead);\n }\n return ReadPreference.primaryPreferred();\n }",
"public float getSpeechRate() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n return Float.valueOf(preferences.getString(\"speech_rate\", \"\"));\n }",
"public String interact() {\n return sound;\n }",
"public Speakers getSpeaker(){\n int speaker_id = getIntent().getExtras().getInt(AppController.SPEAKER_ID);\n DatabaseHandler dh = new DatabaseHandler(this);\n return dh.getSpeaker(speaker_id);\n }",
"protected InputStream getAudioStream()\n\t{\n\t\tInputStream in = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tURL url = getAudioURL();\n\t\t\tif (url!=null)\t\t\t\n\t\t\t\tin = url.openStream();\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t\tSystem.err.println(ex);\n\t\t}\n\t\treturn in;\n\t}"
] | [
"0.7748719",
"0.70961744",
"0.68954355",
"0.65908015",
"0.6194056",
"0.6134991",
"0.6064857",
"0.59281296",
"0.5916985",
"0.5794913",
"0.5794781",
"0.5682098",
"0.5644952",
"0.56149167",
"0.55974984",
"0.5530809",
"0.54848605",
"0.5468472",
"0.5408944",
"0.5356203",
"0.5327494",
"0.5324916",
"0.53087467",
"0.5252259",
"0.5204166",
"0.5182308",
"0.5182308",
"0.51767486",
"0.51300645",
"0.5124703",
"0.512041",
"0.5083921",
"0.5078471",
"0.5056758",
"0.50512314",
"0.5039469",
"0.50390106",
"0.50373834",
"0.50149715",
"0.5002061",
"0.49934915",
"0.49728605",
"0.4954763",
"0.49517074",
"0.49473232",
"0.49416593",
"0.49411172",
"0.4935727",
"0.4932985",
"0.49265894",
"0.49186194",
"0.49023357",
"0.48999566",
"0.4899299",
"0.4889084",
"0.48609933",
"0.48573557",
"0.48511374",
"0.48486772",
"0.4847272",
"0.48418286",
"0.48324907",
"0.48262307",
"0.4801258",
"0.47980693",
"0.478835",
"0.47840083",
"0.47829866",
"0.47806966",
"0.47721168",
"0.47684342",
"0.47684342",
"0.4768373",
"0.47599083",
"0.47543842",
"0.4739759",
"0.47357827",
"0.473512",
"0.4734072",
"0.47279364",
"0.4725705",
"0.47235996",
"0.470907",
"0.47061095",
"0.46967602",
"0.4692088",
"0.46678987",
"0.46590993",
"0.4655561",
"0.46552864",
"0.46546477",
"0.46519658",
"0.46446642",
"0.46446034",
"0.46378034",
"0.46329755",
"0.46327072",
"0.46309203",
"0.46299294",
"0.46262595"
] | 0.81857824 | 0 |
set the ringtone name from relevant uri > saved value or default ringtone value. | private void setRingtoneName(){
//select default ringtone when there isn't ringtone which chose
Uri ringtoneUri = getCurrentRingtone();
Ringtone ringtone = RingtoneManager.getRingtone(this, ringtoneUri);
mDetailBinding.clockDetails.ringtone.setText(ringtone.getTitle(this));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void saveDefaultRing(){\n \t SharedPreferences sharedPre = getSharedPreferences(\n RingtoneList.TIMER_RPREFERENCES,\n 0);\n \t if (!GotoRingtoneActivity.musicPath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, GotoRingtoneActivity.musicName)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, GotoRingtoneActivity.musicPath)\n .putInt(\"mSystemPosition\", GotoRingtoneActivity.musicID)\n .commit();\n }\n \t// PR 590654 - Neo Skunkworks - Soar Gao - 001 begin\n// Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n// String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n// \t\tGotoRingtoneActivity.musicName);\n// String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n// \t\tGotoRingtoneActivity.musicPath);\n// mIntent.putExtra(\"ringtone\", ringtoneName);\n// mIntent.putExtra(\"ringtonePath\", ringtonePath);\n// mIntent.putExtra(\"ringtonePosition\", mSystemPosition);\n// sendBroadcast(mIntent);\n \t// PR 590654 - Neo Skunkworks - Soar Gao - 001 end\n }",
"private Uri getDefaultRingtone(){\n return RingtoneManager.getActualDefaultRingtoneUri(DetailActivity.this,\n RingtoneManager.TYPE_ALARM);\n }",
"public void pickRingtone() {\n final Uri currentTone = getCurrentRingtone();\n Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_RINGTONE);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, R.string.label_ringtone);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, currentTone);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);\n startActivityForResult(intent, RINGTONE_PICKER_REQUEST_CODE);\n }",
"private Uri getCurrentRingtone(){\n return mAlarmRingtone != null ? mAlarmRingtone : getDefaultRingtone();\n }",
"private Uri updateExternalFile(OPLocalRingtoneAdapter.RingtoneData ringtoneData) {\n OPMyLog.d(\"chenhl\", \"getKey:\" + ringtoneData.mUri);\n String str = ringtoneData.filepath;\n OPMyLog.d(\"chenhl\", \"path:\" + str);\n File file = new File(str);\n if (!file.exists()) {\n this.mHandler.post(new Runnable() {\n /* class com.oneplus.settings.ringtone.OPLocalRingtonePickerActivity.AnonymousClass4 */\n\n public void run() {\n OPLocalRingtonePickerActivity oPLocalRingtonePickerActivity = OPLocalRingtonePickerActivity.this;\n Toast.makeText(oPLocalRingtonePickerActivity, oPLocalRingtonePickerActivity.getString(C0017R$string.oneplus_file_not_exist), 0).show();\n }\n });\n return null;\n }\n playRingtone(300, this.mUriForDefaultItem);\n if (str == null || str.startsWith(\"/storage/emulated/legacy\") || str.startsWith(SDCARD_PATH)) {\n return this.mUriForDefaultItem;\n }\n File file2 = new File(checkDir() + file.getName());\n if (!file2.exists()) {\n copyFile(file, file2);\n }\n return updateDb(ringtoneData, file2.getAbsolutePath());\n }",
"private void saveRingtone() {\n \tif(((GotoRingtoneActivity.musicID!=-1)&&(GotoRingtoneActivity.musicActivity==0))){\n \t\tsendToService();\n \t}\n \t// PR 587415 - Neo Skunkworks - Soar Gao - 001 end\n SharedPreferences sharedPre = getSharedPreferences(\n RingtoneList.TIMER_RPREFERENCES,\n 0);\n// PR 587415 - Neo Skunkworks - Soar Gao - 001 begin\n/*\n if (!mFilePath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, mPreRingtone)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, mFilePath)\n .putInt(\"mSystemPosition\", mSystemPosition)\n .commit();\n }\n Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n mPreRingtone);\n String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n mFilePath);\n*/\n if (!GotoRingtoneActivity.musicPath.equals(\"\")) {\n sharedPre\n .edit()\n .putString(RingtoneList.ALERT_RINGTONE_NAME_KEY, GotoRingtoneActivity.musicName)\n .putString(RingtoneList.ALERT_RINGTONE_PATH_KEY, GotoRingtoneActivity.musicPath)\n .putInt(\"mSystemPosition\", GotoRingtoneActivity.musicID)\n .commit();\n }\n Intent mIntent = new Intent(SetAlarm.ACTION_NAME);\n String ringtoneName = sharedPre.getString(RingtoneList.ALERT_RINGTONE_NAME_KEY,\n \t\tGotoRingtoneActivity.musicName);\n String ringtonePath = sharedPre.getString(RingtoneList.ALERT_RINGTONE_PATH_KEY,\n \t\tGotoRingtoneActivity.musicPath);\n// PR 587415 - Neo Skunkworks - Soar Gao - 001 end\n mIntent.putExtra(\"ringtone\", ringtoneName);\n mIntent.putExtra(\"ringtonePath\", ringtonePath);\n mIntent.putExtra(\"ringtonePosition\", mSystemPosition);\n sendBroadcast(mIntent);\n stopService(new Intent(this, MediaPlayerService.class));\n }",
"public static void setTone(SquareImageButton button, int toneType) {\n // Get the context for the image button\n Context context = button.getContext();\n // The internal uri for our resource\n Uri newUri = null;\n String path = getDirectoryPath();\n\n Resources resources = (context != null) ? context.getResources() : null;\n if(resources != null) {\n String entryName = context.getResources().getResourceEntryName(button.getSoundClipId());\n File file = new File(path + \"/\", entryName + \".mp3\");\n\n Uri uri = Uri.parse(\"android.resource://\" + context.getPackageName() + \"/raw/\" + entryName);\n ContentResolver resolver = context.getContentResolver();\n if(!file.exists()){\n newUri = saveFileAndAddToMediaStore(button, context, file, uri, resolver);\n }\n try {\n if(newUri == null){\n newUri = getAudioUriFromFilePath(file.getAbsolutePath(), resolver);\n }\n if(newUri != null){\n RingtoneManager.setActualDefaultRingtoneUri(context,\n toneType, newUri);\n Settings.System.putString(resolver, getStringByType(toneType),\n newUri.toString());\n //show the message to the user\n CharSequence text = \"\";\n switch(toneType){\n case RingtoneManager.TYPE_NOTIFICATION:\n text = \"Notification tone set\";\n break;\n case RingtoneManager.TYPE_RINGTONE:\n text = \"Ringtone set\";\n break;\n }\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }\n\n } catch (Throwable t) {\n Toast toast = Toast.makeText(context, \"An error occurred: \" + t.getMessage(), Toast.LENGTH_SHORT);\n toast.show();\n }\n }\n }",
"public void playRingtone() {\n\t\ttry {\n\t Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\t Ringtone r = RingtoneManager.getRingtone(this.cordova.getActivity().getApplicationContext(), notification);\n\t if(r == null) {\n\t \tnotification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);\n\t \tr = RingtoneManager.getRingtone(this.cordova.getActivity().getApplicationContext(), notification);\n\t }\n\t r.play();\n\t } catch (Exception e) {Toast.makeText(this.cordova.getActivity().getApplicationContext(), \"playRingtone method exception\", Toast.LENGTH_LONG).show();}\n\t}",
"public void playRingtone(Ringtone ringtone) {\n playRingtone(ringtone, AudioAttributes.USAGE_ALARM);\n }",
"public void updateRingtone(String path,int type) {\n if(mService != null) {\n try {\n mService.updateRingtone(path,type);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n private void playRingtone(@NonNull Ringtone ringtone, final int USAGE_CODE) {\n ringtone.setAudioAttributes(new AudioAttributes.Builder().setUsage(USAGE_CODE).build());\n ringtone.play();\n\n }",
"private void setSound(@NonNull NotificationCompat.Builder builder) {\n if (mFplReminder.isNotificationSound()) {\n Uri soundUri = RingtoneManager.getDefaultUri(TYPE_NOTIFICATION);\n builder.setSound(soundUri);\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 10) {\n // Make sure the request was successful\n if (resultCode == RESULT_OK) {\n System.out.println(data.getData().toString());\n Button tb = (Button) findViewById(R.id.toneButton);\n try {\n FName = getRealPathFromURI(data.getData());\n String[] UFFName = FName.split(\"/\");\n tb.setText(\"Alarm tone: \" + UFFName[UFFName.length - 1]);\n } catch (Exception Ex) {\n Toast.makeText(this, \"Error: \" + Ex + \"\\n\" + FName, Toast.LENGTH_SHORT).show();\n }\n }\n }\n }",
"private static String getStringByType(int type)\n {\n switch(type){\n case RingtoneManager.TYPE_ALARM:\n return Settings.System.ALARM_ALERT;\n case RingtoneManager.TYPE_NOTIFICATION:\n return Settings.System.NOTIFICATION_SOUND;\n case RingtoneManager.TYPE_RINGTONE:\n return Settings.System.RINGTONE;\n default:\n return null;\n }\n }",
"public void setRemoteRingbackTone(String ring);",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n choose_alarm_sound = (int) id;\n }",
"@Override\n\tpublic String sendSmsRingtone(List<String> addresses, String senderName,\n\t\t\tChargingInformation charging, String ringtone, SmsFormat smsFormat,\n\t\t\tSimpleReference receiptRequest) throws ServiceException,\n\t\t\tPolicyException {\n\t\treturn null;\n\t}",
"private void setPreviousSelectedRingTone(int ringtoneId) {\n int position = getPositionById(ringtoneId);\n ringtoneListView.setItemChecked(position, true);\n }",
"public void setRing(String path);",
"protected final void onActivityResult(final int requestCode, final int resultCode, final Intent i)\n\t{\n\t\tsuper.onActivityResult(requestCode, resultCode, i);\n\n\t\t// this matches the request code in the above call\n\t\tUri myUri = i.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);\n\t\tif (myUri != null)\n\t\t{\n\t\t\tString strUri = myUri.toString();\n\t\t\t\n\t\t\tswitch (requestCode)\n\t\t\t{\n\t\t\t\tcase PICK_FILE_RING:\n\t\t\t\t\tm_strUriRing = strUri;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase PICK_FILE_SMS:\n\t\t\t\t\tm_strUriSMS = strUri;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PICK_FILE_IM:\n\t\t\t\t\tm_strUriIM = strUri;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PICK_FILE_MAIL:\n\t\t\t\t\tm_strUriMail = strUri;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PICK_FILE_TEST:\n\t\t\t\t\tMediaPlayer myPlayer = new MediaPlayer();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tUri myNewUri = Uri.parse(strUri);\n\t\t\t\t\t\tmyPlayer.setDataSource(this, myNewUri);\n\t\t\t\t\t\tmyPlayer.prepare();\n\t\t\t\t\t\tmyPlayer.start();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\tLog.d(getClass().getSimpleName(), e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\n\t\t\t\tdefault:\n\t\t\t}\n\t\t}\n\t}",
"private static void migrateVoicemailRingtoneSettingsIfNeeded(\n Phone phone, SharedPreferences prefs) {\n String key = getVoicemailRingtoneSharedPrefsKey(phone);\n TelephonyManager telephonyManager = TelephonyManager.from(phone.getContext());\n\n // Skip if a preference exists, or if phone is MSIM.\n if (prefs.contains(key) || telephonyManager.getPhoneCount() != 1) {\n return;\n }\n\n if (prefs.contains(OLD_VOICEMAIL_NOTIFICATION_RINGTONE_SHARED_PREFS_KEY)) {\n String uriString = prefs.getString(\n OLD_VOICEMAIL_NOTIFICATION_RINGTONE_SHARED_PREFS_KEY, null /* defValue */);\n\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(key, uriString)\n .remove(OLD_VOICEMAIL_NOTIFICATION_RINGTONE_SHARED_PREFS_KEY)\n .commit();\n }\n }",
"public static Uri getNotificationSound(Context cxt, String sound){\n Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n if(!sound.isEmpty()) {\n int soundResource = cxt.getResources().getIdentifier(sound, \"raw\", cxt.getPackageName());\n if (soundResource != 0) {\n soundUri = Uri.parse(\"android.resource://\"\n + cxt.getPackageName() + \"/\" + soundResource);\n }\n }\n\n return soundUri;\n }",
"public int getRingtoneMode() {\n return mAudioManager.getRingerMode();\n }",
"public SendSmsRingtoneResponse sendSmsRingtone(SendSmsRingtone request) {\n\t\treturn null;\n\t}",
"public static void setSounds() {\r\n\t\tString temp = \"\";\r\n\t\tString[] sa;\r\n\t\tString prefix = \"\";\r\n\t\tString suffix = \"\";\r\n\t\t\r\n\t\tclearSounds();\r\n\t\t\t\t\r\n\t\t//Loop through the entire sounds array list to find all the settings.\r\n\t\tfor (int i = 0; i < sounds.size(); i++) {\r\n\t\t\t//When found, set the variable in main to that string..\r\n\t\t\ttemp = (String) sounds.get(i);\r\n\t\t\tsa = splitString('=', temp);\r\n\r\n\t\t\t//Set the variables to empty if the setting is empty.\r\n\t\t\tif (temp.endsWith(\"=\")) {\r\n\t\t\t\tprefix = sa[0];\r\n\r\n\t\t\t\tif (prefix.equalsIgnoreCase(\"start\")) {\r\n\t\t\t\t\tMain.soundGameStart = \"\";\r\n\t\t\t\t} else if (prefix.equalsIgnoreCase(\"bags\")){\r\n\t\t\t\t\tMain.soundBags = \"\";\r\n\t\t\t\t} else if (prefix.equalsIgnoreCase(\"set\")){\r\n\t\t\t\t\tMain.soundSet = \"\";\r\n\t\t\t\t} else if (prefix.equalsIgnoreCase(\"win\")){\r\n\t\t\t\t\tMain.soundWin = \"\";\r\n\t\t\t\t} else if (prefix.equalsIgnoreCase(\"lose\")){\r\n\t\t\t\t\tMain.soundLose = \"\";\r\n\t\t\t\t}\r\n\t\t\t//Find the properties and set them to the desired values.\r\n\t\t\t} else {\r\n\t\t\t\tprefix = sa[0];\r\n\t\t\t\tsuffix = sa[1];\r\n\t\t\t\r\n\t\t\t\tif (prefix.equalsIgnoreCase(\"start\")) {\r\n\t\t\t\t\tMain.soundGameStart = suffix;\r\n\t\t\t\t} else if (prefix.equalsIgnoreCase(\"bags\")){\r\n\t\t\t\t\tMain.soundBags = suffix;\r\n\t\t\t\t} else if (prefix.equalsIgnoreCase(\"set\")){\r\n\t\t\t\t\tMain.soundSet = suffix;\r\n\t\t\t\t} else if (prefix.equalsIgnoreCase(\"win\")){\r\n\t\t\t\t\tMain.soundWin = suffix;\r\n\t\t\t\t} else if (prefix.equalsIgnoreCase(\"lose\")){\r\n\t\t\t\t\tMain.soundLose = suffix;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public List<ItemAdapter.ItemHolder<Uri>> loadInBackground() {\n DataModel.getDataModel().loadRingtoneTitles();\n DataModel.getDataModel().loadRingtonePermissions();\n\n // Fetch the standard system ringtones.\n final RingtoneManager ringtoneManager = new RingtoneManager(getContext());\n ringtoneManager.setType(STREAM_ALARM);\n\n Cursor systemRingtoneCursor;\n try {\n systemRingtoneCursor = ringtoneManager.getCursor();\n } catch (Exception e) {\n LogUtils.e(\"Could not get system ringtone cursor\");\n systemRingtoneCursor = new MatrixCursor(new String[] {});\n }\n final int systemRingtoneCount = systemRingtoneCursor.getCount();\n // item count = # system ringtones + # custom ringtones + 2 headers + Add new music item\n final int itemCount = systemRingtoneCount + mCustomRingtones.size() + 3;\n\n final List<ItemAdapter.ItemHolder<Uri>> itemHolders = new ArrayList<>(itemCount);\n\n // Add the item holder for the Music heading.\n itemHolders.add(new HeaderHolder(R.string.your_sounds));\n\n // Add an item holder for each custom ringtone and also cache a pretty name.\n for (CustomRingtone ringtone : mCustomRingtones) {\n itemHolders.add(new CustomRingtoneHolder(ringtone));\n }\n\n // Add an item holder for the \"Add new\" music ringtone.\n itemHolders.add(new AddCustomRingtoneHolder());\n\n // Add an item holder for the Ringtones heading.\n itemHolders.add(new HeaderHolder(R.string.device_sounds));\n\n // Add an item holder for the silent ringtone.\n itemHolders.add(new SystemRingtoneHolder(RINGTONE_SILENT, null));\n\n // Add an item holder for the system default alarm sound.\n itemHolders.add(new SystemRingtoneHolder(mDefaultRingtoneUri, mDefaultRingtoneTitle));\n\n // Add an item holder for each system ringtone.\n for (int i = 0; i < systemRingtoneCount; i++) {\n final Uri ringtoneUri = ringtoneManager.getRingtoneUri(i);\n itemHolders.add(new SystemRingtoneHolder(ringtoneUri, null));\n }\n\n return itemHolders;\n }",
"@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.slide_system_button:\n setSystemRingtone();\n break;\n case R.id.slide_user_button:\n setDefinedRingtone();\n break;\n default:\n break;\n }\n dismissSlideMusicPop();\n }",
"@Override // com.oneplus.settings.ringtone.OPRingtoneBaseActivity\n public void onCreate(Bundle bundle) {\n String string;\n if (!(bundle == null || (string = bundle.getString(\"key_selected_item_uri\")) == null)) {\n this.mUriForDefaultItem = Uri.parse(string);\n }\n super.onCreate(bundle);\n setContentView(C0012R$layout.op_preference_list_content_material);\n initActionbar();\n this.mListView = getListView();\n this.mNofileView = findViewById(C0010R$id.id_empty);\n this.mProgressBar = (ProgressBar) findViewById(C0010R$id.id_progress);\n this.mHeaderMargin = findViewById(C0010R$id.header_margin);\n this.mListView.setEmptyView(this.mNofileView);\n this.mListView.setOnItemClickListener(this.mOnItemClickListener);\n this.mListView.setDivider(null);\n Log.v(OPLocalRingtonePickerActivity.class.getName(), \"onCreate startTask\");\n startTask(0);\n }",
"public void alarmToneButton_click(View view) {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(intent, 10);\n }",
"public void setAlarm(int time, String name){\n\t}",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // PR:486634 add xibin --Can't adjust alarm volume when press volume\n // up/down in select alarm ringtone list box.\n setVolumeControlStream(AudioManager.STREAM_ALARM);\n setContentView(R.layout.alarm_system_ringtone);\n// PR 594450 - Neo Skunkworks - Soar Gao - 001 begin \n /*getRingtoneInfo(this);\n initData();\n initView();\n*/\n// PR 594450 - Neo Skunkworks - Soar Gao - 001 end \n }",
"@Override // com.oneplus.settings.ringtone.OPRingtoneBaseActivity\n public void updateSelected() {\n if (this.mSystemRings == null) {\n }\n }",
"public void stopRingtone(Ringtone ringtone) {\n ringtone.stop();\n }",
"public void setCallErrorTone(Reason reason, String audiofile);",
"public void playNotification(){\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(ctx,notification);\n r.play();\n }",
"public void setRad(String rad) {\n\t\tthis.rad = rad;\r\n\t\tfirePropertyChange(ConstantResourceFactory.P_RAD,null,rad);\r\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == RINGTONE_PICKER_REQUEST_CODE && resultCode == Activity.RESULT_OK ){\n mAlarmRingtone = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);\n setRingtoneName();\n }\n if (requestCode == MAP_REQUEST_CODE) {\n if (data != null && data.hasExtra(Constants.EXTRA_ALARM_DESTINATION)) {\n // get coordinates (from intent)\n mMapDestination = data.getParcelableExtra(Constants.EXTRA_ALARM_DESTINATION);\n }\n }\n updateMapImage(false);\n }",
"public void setUri( final String uri )\r\n {\r\n this.uri = uri;\r\n }",
"abstract public void setSoundResourcesDir(String path);",
"@Override\n public void onReceive(Context context, Intent intent) {\n Bundle alarmRingtoneData = intent.getExtras();\n int alarmRingtoneNumber = alarmRingtoneData.getInt(\"alarmClipNumber\");\n\n Intent serviceIntent = new Intent(context, RingtonePlayingService.class);\n serviceIntent.putExtra(\"alarmClipNumber\", alarmRingtoneNumber);\n\n context.startService(serviceIntent);\n }",
"private void setDefaultSongNameAndArtist(){\r\n\t\tString[] songLocation = getLocation().split(\"/\");\r\n\t\tString[] songFragment = songLocation[songLocation.length - 1].split(\"[.]\");\r\n\t\tsetSongName(songFragment[0]);\r\n\t\t\r\n\t\tsetAlbum(songLocation[songLocation.length - 2] + \"?\");\r\n\t\tsetArtist(songLocation[songLocation.length - 3] + \"?\");\r\n\t\t\r\n\t}",
"public void setSound(Sound sound) {\n\t\ts = sound;\n\t}",
"public void setUri(java.lang.String uri) {\n this.uri = uri;\n }",
"public void reloadSetting(Uri uri) {\n String str = this.mListeningUris.get(uri);\n Set<TunerService.Tunable> set = this.mTunableLookup.get(str);\n if (set != null) {\n String stringForUser = Settings.Secure.getStringForUser(this.mContentResolver, str, this.mCurrentUser);\n for (TunerService.Tunable tunable : set) {\n tunable.onTuningChanged(str, stringForUser);\n }\n }\n }",
"SoundType (String dir)\n\t{\n\t\tmDirectory = mRootURL + dir;\n\t}",
"public void setRingSettings(char[] ringSettings){\r\n\t\trotors.setRingSettings(ringSettings);\r\n\t}",
"public static void saveReligionName(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_RELIGION, type);\n editor.apply();\n }",
"public void setUri(@Nullable final String uri) {\n mUri = uri;\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tint ind=spinner.getSelectedItemPosition();\n\t\t\t\tString mus=list_uri.get(ind);\n\t\t\t String ic=list_id.get(ind);\n\t\t\t Uri songg=Uri.parse(mus+\"/\"+ic);\n\t\t\t\tIntent ii=new Intent(MainActivity.this,SerTest.class);\n\t\t\t ii.putExtra(\"ringtone-uri\", String.valueOf(songg));\n\t\t\t stopService(ii);\n\t\t\t\tint sid=radio_group.getCheckedRadioButtonId();\n\t\t\t\tradio_button=(RadioButton)findViewById(sid);\n\t\t\t\tString r=radio_button.getText().toString();\n\t\t\t\ttime=System.currentTimeMillis();\n\t\t\t\tcalendar.set(Calendar.HOUR_OF_DAY,alarmTimePicker.getCurrentHour());\n\t\t\t\tcalendar.set(Calendar.MINUTE,alarmTimePicker.getCurrentMinute());\n\t\t\t\tcalendar.set(Calendar.SECOND,0);\n\t\t\t\tlong hl=alarmTimePicker.getCurrentHour();\n\t\t\t\tlong ml=alarmTimePicker.getCurrentMinute();\n\t\t\t\tsong=spinner.getSelectedItemPosition();\n\t\t\t\tString h=String.valueOf(hl);\n\t\t\t\tString m=String.valueOf(ml);\n\t\t\t\tif(h.length()==1)\n\t\t\t\t\th=\"0\"+h;\n\t\t\t\tif(m.length()==1)\n\t\t\t\t\tm=\"0\"+m;\n\n\t\t\t\ti.putExtra(\"Extra\",\"alarm on\");\n\t\t\t\ti.putExtra(\"idd\", String.valueOf(time));\n\t\t\t\ti.putExtra(\"play\", String.valueOf(song));\n\t\t\t\tString vibration=\"no\";\n\t\t\t\tif(checkbok.isChecked()){\n\t\t\t\t\ti.putExtra(\"vib\",\"yes\");\n\t\t\t\t\tvibration=\"yes\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\ti.putExtra(\"vib\",\"no\");\n\t\t\t\tpending_intent=PendingIntent.getBroadcast(MainActivity.this,(int) time,i,PendingIntent.FLAG_UPDATE_CURRENT);\n\t\n\n\t\t\t\tlong time=System.currentTimeMillis();\n\t\t\t\tlong t=calendar.getTimeInMillis();\n\t\t\t\tif(t>=time){\n\n\t\t\t\t\tif(r.equals(\"Once\"))\n\t\t\t\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),pending_intent);\n\t\t\t\t\telse if(r.equals(\"Daily\"))\n\t\t\t\t\t\talarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),60*1000*24*60,pending_intent);\n\t\t\t\t\telse\n\t\t\t\t\t\talarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),60*1000*24*60*7,pending_intent);\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Alarm set at \"+h+\":\"+m+\".\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\tif(r.equals(\"Once\"))\n\t\t\t\t\t\t\talarmManager.set(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),pending_intent);\n\t\t\t\t\t\telse if(r.equals(\"Daily\"))\n\t\t\t\t\t\t\talarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis()+86400000,60*1000*24*60,pending_intent);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\talarmManager.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis()+86400000,60*1000*24*60*7,pending_intent);\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Alarm set at \"+h+\":\"+m+\" tomorrow.\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\n\t\t\t\tFirst.db.execSQL(\"INSERT INTO alarm VALUES\"+\"('\"+id+\"','alarm','\"+h+\":\"+m+\"','\"+time+\"','\"+r+\"','\"+vibration+\"','\"+song+\"')\");\n\t\t\t\tIntent back=new Intent(MainActivity.this,First.class);\n\t\t\t\tback.putExtra(\"S\",h+\":\"+m);\n\t\t\t\tstartActivity(back);\n\t\t\t}",
"private void configDefaultDrawable() {\n drawableResId().open = R.drawable.sms_add_btn;\n drawableResId().close = R.drawable.sms_close_btn;\n drawableResId().gotoEmotion = R.drawable.sms_kaomoji_btn;\n drawableResId().keyboard = R.drawable.sms_keyboard;\n drawableResId().voiceNormal = R.drawable.sms_voice_btn;\n drawableResId().voicePressed = R.drawable.sms_voice_btn_p;\n }",
"@Override\n public void onSuccess(Uri uri) {\n\n reference2.child(type).setValue(uri.toString());\n\n Toast.makeText(UserHomeActivity.this, \"Shared Successfully\", Toast.LENGTH_SHORT).show();\n\n uploadUserImageView.setImageDrawable(getResources().getDrawable(R.drawable.uploadimage));\n\n }",
"public void setRingback(String path);",
"public void setUri(String uri) {\n this.uri = uri;\n }",
"public void setUri(String uri) {\n this.uri = uri;\n }",
"public void setUri(String uri) {\n this.uri = uri;\n }",
"private void updateRadioGroup(String name){\n radioGroup = findViewById(R.id.radioGroup);\n RadioButton rb = new RadioButton(getApplicationContext());\n rb.setText(name);\n rb.setTextColor(Color.BLACK);\n radioGroup.addView(rb);\n }",
"private void setRingerMode(XmlPullParser parser) throws XmlPullParserException, IOException {\n\n\t\tparser.require(XmlPullParser.START_TAG, null, \"ringer_mode\");\n\n\t\tif (parser.getAttributeValue(null, \"mode\") != null) {\n\t\t\tif (parser.getAttributeValue(null, \"mode\").equals(\"normal\")) {\n\t\t\t\tprefEdit.putString(\"ringer_mode\", \"normal\");\n\t\t\t\tLog.i(TAG, \"RingerMode: normal\");\n\t\t\t} else if (parser.getAttributeValue(null, \"mode\").equals(\"silent\")) {\n\t\t\t\tprefEdit.putString(\"ringer_mode\", \"silent\");\n\t\t\t\tLog.i(TAG, \"RingerMode: silent\");\n\t\t\t} else if (parser.getAttributeValue(null, \"mode\").equals(\"vibrate\")) {\n\t\t\t\tprefEdit.putString(\"ringer_mode\", \"vibrate\");\n\t\t\t\tLog.i(TAG, \"RingerMode: vibrate\");\n\t\t\t} else if (parser.getAttributeValue(null, \"mode\").equals(\"unchanged\")) {\n\t\t\t\tprefEdit.putString(\"ringer_mode\", \"unchanged\");\n\t\t\t\tLog.i(TAG, \"RingerMode: unchanged\");\n\t\t\t} else {\n\t\t\t\tLog.e(TAG, \"RingerMode: Invalid Argument!\");\n\t\t\t}\n\t\t} else {\n\t\t\tLog.i(TAG, \"RingerMode: No change.\");\n\t\t}\n\n\t\tparser.nextTag();\n\t}",
"public void setUri(String uri) {\n\t\tthis.uri = uri;\n\t}",
"private void updateChecks(Uri uri) {\n List<OPLocalRingtoneAdapter.RingtoneData> list = this.mSystemRings;\n if (!(list == null || this.mOPLocalRingtoneAdapter == null)) {\n for (OPLocalRingtoneAdapter.RingtoneData ringtoneData : list) {\n ringtoneData.isCheck = ringtoneData.mUri.equals(uri);\n }\n this.mOPLocalRingtoneAdapter.notifyDataSetChanged();\n }\n }",
"public void setUri(final String uri) {\r\n\t\tthis.uri = uri;\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_question);\n// try {\n// Uri path = Uri.parse(\"android.resource://\"+getPackageName()+\"/raw/alarm.mp3\");\n// // The line below will set it as a default ring tone replace\n// // RingtoneManager.TYPE_RINGTONE with RingtoneManager.TYPE_NOTIFICATION\n// // to set it as a notification tone\n// RingtoneManager.setActualDefaultRingtoneUri(\n// getApplicationContext(), RingtoneManager.TYPE_RINGTONE,\n// path);\n// Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), path);\n// r.play();\n// }\n// catch (Exception e) {\n// e.printStackTrace();\n// }\n subject=getIntent().getStringExtra(\"Subject\");\n String question=\"[\\n\" +\n \"{\\n\" +\n \" \\\"Question\\\": \\\"What are the indirect Direct subclasses of Services?\\\",\\n\" +\n \"\\\"Q1\\\": \\\"recognitionService\\\",\\n\" +\n \"\\\"Q2\\\": \\\" remoteViewsService\\\",\\n\" +\n \"\\\"Q3\\\": \\\"spellCheckerService\\\",\\n\" +\n \"\\\"Q4\\\": \\\"inputMethodService\\\",\\n\" +\n \"\\\"A\\\": \\\"inputMethodService\\\"\\n\" +\n \"},\\n\" +\n \"{\\n\" +\n \" \\\"Question\\\": \\\"How many ways to start services?\\\",\\n\" +\n \"\\\"Q1\\\": \\\"started\\\",\\n\" +\n \"\\\"Q2\\\": \\\" bound\\\",\\n\" +\n \"\\\"Q3\\\": \\\"a & b\\\",\\n\" +\n \"\\\"Q4\\\": \\\"messenger\\\",\\n\" +\n \"\\\"A\\\": \\\"a & b\\\"\\n\" +\n \"},\\n\" +\n \"{\\n\" +\n \" \\\"Question\\\": \\\"Which of the important device characteristics that you should consider as you design and develop your application?\\\",\\n\" +\n \"\\\"Q1\\\": \\\"screen size and density\\\",\\n\" +\n \"\\\"Q2\\\": \\\" input configurations\\\",\\n\" +\n \"\\\"Q3\\\": \\\" device features\\\",\\n\" +\n \"\\\"Q4\\\": \\\"all the above\\\",\\n\" +\n \"\\\"A\\\": \\\"all the above\\\"\\n\" +\n \"},\\n\" +\n \"{\\n\" +\n \" \\\"Question\\\": \\\"Parent class of Service?\\\",\\n\" +\n \"\\\"Q1\\\": \\\"Object\\\",\\n\" +\n \"\\\"Q2\\\": \\\" Context\\\",\\n\" +\n \"\\\"Q3\\\": \\\" ContextWrapper\\\",\\n\" +\n \"\\\"Q4\\\": \\\"ContextThemeWrapper\\\",\\n\" +\n \"\\\"A\\\": \\\"ContextWrapper\\\"\\n\" +\n \"},\\n\" +\n \"{\\n\" +\n \" \\\"Question\\\": \\\"What are the indirect Direct subclasses of Activity?\\\",\\n\" +\n \"\\\"Q1\\\": \\\" launcherActivity\\\",\\n\" +\n \"\\\"Q2\\\": \\\" preferenceActivity\\\",\\n\" +\n \"\\\"Q3\\\": \\\" tabActivity\\\",\\n\" +\n \"\\\"Q4\\\": \\\"all the above\\\",\\n\" +\n \"\\\"A\\\": \\\"all the above\\\"\\n\" +\n \"},\\n\" +\n \"{\\n\" +\n \" \\\"Question\\\": \\\"What are the Direct subclasses of Activity?\\\",\\n\" +\n \"\\\"Q1\\\": \\\"ListActivity\\\",\\n\" +\n \"\\\"Q2\\\": \\\" ActivityGroup\\\",\\n\" +\n \"\\\"Q3\\\": \\\" FragmentActivity\\\",\\n\" +\n \"\\\"Q4\\\": \\\"all the above\\\",\\n\" +\n \"\\\"A\\\": \\\"all the above\\\"\\n\" +\n \"},\\n\" +\n \"{\\n\" +\n \" \\\"Question\\\": \\\"Parent class of Activity?\\\",\\n\" +\n \"\\\"Q1\\\": \\\"object\\\",\\n\" +\n \"\\\"Q2\\\": \\\" Context\\\",\\n\" +\n \"\\\"Q3\\\": \\\" activityGroup\\\",\\n\" +\n \"\\\"Q4\\\": \\\"contextThemeWrapper\\\",\\n\" +\n \"\\\"A\\\": \\\"contextThemeWrapper\\\"\\n\" +\n \"},\\n\" +\n \"{\\n\" +\n \" \\\"Question\\\": \\\" Layouts in android?\\\",\\n\" +\n \"\\\"Q1\\\": \\\"Frame Layout\\\",\\n\" +\n \"\\\"Q2\\\": \\\" Linear Layout\\\",\\n\" +\n \"\\\"Q3\\\": \\\" Relative Layout\\\",\\n\" +\n \"\\\"Q4\\\": \\\"all of the above\\\",\\n\" +\n \"\\\"A\\\": \\\"all the above\\\"\\n\" +\n \"}\\n\" +\n \"]\";\n\n al=new ArrayList<>();\n// alA=new ArrayList<>();\n// set=new HashSet<>();\n// set1=new HashSet<>();\n try {\n\n JSONArray question1=new JSONArray(question);\n for(int i=0;i<question1.length();i++) {\n Map<String,String> map=new HashMap<>() ;\n JSONObject object = question1.getJSONObject(i);\n String Questionobject=object.getString(\"Question\");\n String q1=object.getString(\"Q1\");\n String q2=object.getString(\"Q2\");\n String q3=object.getString(\"Q3\");\n String q4=object.getString(\"Q4\");\n String A=object.getString(\"A\");\n map.put(\"Question\",Questionobject);\n map.put(\"q1\",q1);\n map.put(\"q2\",q2);\n map.put(\"q3\",q3);\n map.put(\"q4\",q4);\n map.put(\"A\",A);\n al.add(map);\n\n }\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n// sharedPreferences = getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE);\n\n q=findViewById(R.id.question);\n time=findViewById(R.id.time);\n b1=findViewById(R.id.b1);\n b2=findViewById(R.id.b2);\n b3=findViewById(R.id.b3);\n b4=findViewById(R.id.b4);\n p1=findViewById(R.id.p1);\n qno1=findViewById(R.id.qno);\n\n qno1.setText(\"Question \" + (j+1) + \" of 8\");\n\n\n q.setText(al.get(j).get(\"Question\"));\n b1.setText(al.get(j).get(\"q1\"));\n b2.setText(al.get(j).get(\"q2\"));\n b3.setText(al.get(j).get(\"q3\"));\n b4.setText(al.get(j).get(\"q4\"));\n dataBaseClass = new DataBaseClass(Question.this);\n String q1 = q.getText().toString();\n String A =al.get(j).get(\"A\");\n\n dataBaseClass.insertValues1(q1, A);\n if(j<al.size()-1)\n {\n\n new CountDownTimer(9000, 1000) {\n\n public void onTick(long millisUntilFinished) {\n time.setText(\"Seconds remaining:\" + millisUntilFinished / 1000);\n\n b1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(b1.getText().equals(al.get(j).get(\"A\"))) {\n count++;\n }\n dataBaseClass.updateData1(b1.getText().toString(),q.getText().toString());\n\n// alA.add(b1.getText().toString());\n// alA.add( al.get(j).get(\"Question\"));\n// alA.add(al.get(j).get(\"A\"));\n// set.add(b1.getText().toString());\n Intent i = getIntent();\n i.putExtra(\"Subject\",subject);\n b1.setBackgroundColor(Color.GREEN);\n j++;\n startActivity(i);\n\n }\n });\n\n b2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(b2.getText().equals(al.get(j).get(\"A\"))) {\n count++;\n }\n dataBaseClass.updateData1(b2.getText().toString(),q.getText().toString());\n// alA.add(b2.getText().toString());\n// alA.add(al.get(j).get(\"Question\"));\n// alA.add(al.get(j).get(\"A\"));\n Intent i=getIntent();\n j++;\n b2.setBackgroundColor(Color.GREEN);\n startActivity(i);\n }\n });\n\n b3.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(b3.getText().equals(al.get(j).get(\"A\"))) {\n count++;\n }\n dataBaseClass.updateData1(b3.getText().toString(),q.getText().toString());\n// alA.add(b3.getText().toString());\n// alA.add(al.get(j).get(\"Question\"));\n// alA.add(al.get(j).get(\"A\"));\n Intent i=getIntent();\n j++;\n b3.setBackgroundColor(Color.GREEN);\n startActivity(i);\n }\n });\n\n b4.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(b4.getText().equals(al.get(j).get(\"A\"))) {\n count++;\n }\n dataBaseClass.updateData1(b4.getText().toString(),q.getText().toString());\n// alA.add(b4.getText().toString());\n// alA.add(al.get(j).get(\"Question\"));\n// alA.add(al.get(j).get(\"A\"));\n Intent i=getIntent();\n j++;\n b4.setBackgroundColor(Color.GREEN);\n startActivity(i);\n }\n });\n }\n\n public void onFinish() {\n Intent i = getIntent();\n i.putExtra(\"Subject\",subject);\n j++;\n startActivity(i);\n }\n }.start();\n\n }\n else {\n new CountDownTimer(9000, 1000) {\n\n public void onTick(long millisUntilFinished) {\n time.setText(\"Seconds remaining:\" + millisUntilFinished / 1000);\n\n b1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n// editor = sharedPreferences.edit();\n//\n// set.addAll(alA);\n// editor.putStringSet(\"selected\",set);\n// editor.apply();\n j=0;\n dataBaseClass.updateData1(b1.getText().toString(),q.getText().toString());\n Intent i=new Intent(Question.this,Congratulation.class);\n// i.putExtra(\"json\",al);\n// i.putExtra(\"slectedAnswer\",alA);\n i.putExtra(\"Subject\",subject);\n i.putExtra(\"score\",String.valueOf(count));\n startActivity(i);\n }\n });\n b2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n// editor = sharedPreferences.edit();\n// set.addAll(alA);\n// editor.putStringSet(\"selected\",set);\n// editor.apply();\n j=0;\n dataBaseClass.updateData1(b2.getText().toString(),q.getText().toString());\n Intent i=new Intent(Question.this,Congratulation.class);\n// i.putExtra(\"json\",al);\n// i.putExtra(\"slectedAnswer\",alA);\n i.putExtra(\"Subject\",subject);\n i.putExtra(\"score\",String.valueOf(count));\n startActivity(i);\n }\n });\n b3.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n j=0;\n// editor = sharedPreferences.edit();\n// set.addAll(alA);\n// Log.e(\"alA\", alA.toString() );\n// editor.putStringSet(\"selected\",set);\n// editor.apply();\n dataBaseClass.updateData1(b3.getText().toString(),q.getText().toString());\n Intent i=new Intent(Question.this,Congratulation.class);\n// i.putExtra(\"json\",al);\n// i.putExtra(\"slectedAnswer\",alA);\n i.putExtra(\"Subject\",subject);\n i.putExtra(\"score\",String.valueOf(count));\n startActivity(i);\n }\n });\n b4.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n j=0;\n// editor = sharedPreferences.edit();\n// set.addAll(alA);\n// editor.putStringSet(\"selected\",set);\n// editor.commit();\n dataBaseClass.updateData1(b4.getText().toString(),q.getText().toString());\n Intent i=new Intent(Question.this,Congratulation.class);\n// i.putExtra(\"json\",al);\n// i.putExtra(\"slectedAnswer\",alA);\n i.putExtra(\"Subject\",subject);\n i.putExtra(\"score\",String.valueOf(count));\n startActivity(i);\n }\n });\n }\n\n public void onFinish() {\n Intent i =new Intent(Question.this,Congratulation.class);\n i.putExtra(\"Subject\",subject);\n i.putExtra(\"score\",String.valueOf(count));\n j=0;\n startActivity(i);\n }\n }.start();\n }\n\n }",
"public void setSound(String filename) {\n\t\ts = new Sound(filename);\n\t}",
"private void setUpRingtoneAndVibration(int vibration) {\n AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n am.setStreamVolume(AudioManager.STREAM_ALARM, am.getStreamMaxVolume(AudioManager.STREAM_ALARM), AudioManager.FLAG_PLAY_SOUND);\n\n Uri alarmUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);\n if (alarmUri == null) {\n alarmUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n }\n try {\n mediaPlayer.setDataSource(this, alarmUri);\n mediaPlayer.setLooping(true);\n mediaPlayer.setAudioStreamType(AudioManager.STREAM_ALARM);\n mediaPlayer.prepare();\n mediaPlayer.start();\n if (vibration == 1) {\n vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\n vibrator.vibrate(vibrationPattern, 0);\n }\n } catch (Exception e) {\n\n }\n }",
"public void setUri(URI uri)\n {\n this.uri = uri;\n }",
"private static Uri saveFileAndAddToMediaStore(SquareImageButton button, Context context, File file, Uri uri, ContentResolver resolver) {\n // This will hold the uri of the newly saved file\n Uri newUri;\n // A file descriptor of an entry in the AssetManager\n AssetFileDescriptor assetFileDescriptor;\n\n try {\n // obtain read access to the file descriptor in the Asset manager\n assetFileDescriptor = resolver.openAssetFileDescriptor(uri, \"r\");\n }\n catch (FileNotFoundException e) {\n // The sound file could not be found and needs to be saved.\n assetFileDescriptor = null;\n }\n\n saveFileToDevice(context, file, assetFileDescriptor);\n\n newUri = insertSoundFileToMediaStore(button, file, resolver);\n return newUri;\n }",
"public void setUri(URI uri) {\n this.uri = uri;\n }",
"public void setUri(URI uri) {\n this.uri = uri;\n }",
"public void addSound(String path, boolean loop){\r\n\t\t\r\n\t\tif(enabled){\r\n\t\t\tSonido sound = new Sonido(path, loop);\r\n\t\t\tif(loop)\r\n\t\t\t\tsonido = sound;\r\n\t\t}\r\n\t\tif(loop)\r\n\t\t\tthis.path = path;\r\n\t}",
"public void setOriginalArtist(Contact value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALARTIST, value);\r\n\t}",
"@Override\n public void onCheckedChanged(RadioGroup radioGroup, @IdRes int i) {\n\n switch(i)\n {\n case R.id.light:\n theme = 1;\n\n if (ThemeFlagParentDir != null)\n {\n ThemeFlagParentDir.mkdirs();\n if(themeFlag.size()==0) themeFlag.add(\"1\");\n\n }\n\n\n themeFlag.set(0,\"\"+theme);\n\n if (isStoragePermissionGranted() == true) {\n\n Save(ThemeFlagDir,themeFlag);\n Toast.makeText(getApplicationContext(), theme+\"\", Toast.LENGTH_SHORT).show();\n }\n\n break;\n\n case R.id.dark:\n theme =0;\n if (ThemeFlagParentDir != null)\n {\n ThemeFlagParentDir.mkdirs();\n if(themeFlag.size()==0) themeFlag.add(\"1\");\n\n }\n\n\n themeFlag.set(0,\"\"+theme);\n\n if (isStoragePermissionGranted() == true) {\n\n Save(ThemeFlagDir,themeFlag);\n Toast.makeText(getApplicationContext(), theme+\"\", Toast.LENGTH_SHORT).show();\n }\n\n break;\n\n\n\n }\n }",
"abstract String getSound();",
"public void setName(String rname) {\n name = rname;\n }",
"public static void setOriginalAlbumTitle(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALALBUMTITLE, value);\r\n\t}",
"private void setSounds(Intent intent){\n\n\t\tsoundArray = new int[sounds.length];\n\t\tint i=0;\n\t\tfor (String sound : sounds) {\n\t\t\tString value = intent.getStringExtra(sound);\n\t\t\tint id = mContext.getResources().getIdentifier(value, \"raw\", mContext.getPackageName());\n\t\t\tsoundArray[i++] = soundPool.load(mContext, id, 1);\n\t\t}\n\t}",
"public String getSound();",
"private void updatePreferenceIcon() {\n int alarmVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_ALARM);\n if (mPreference != null) {\n mPreference.showIcon(alarmVolume == 0 ?R.drawable.ic_audio_alarm_mute : R.drawable.ic_audio_alarm);\n }\n }",
"public static void setDefaults() {\r\n\t\tString temp = \"\";\r\n\t\tString[] sa;\r\n\t\tString prefix = \"\";\r\n\t\tString suffix = \"\";\r\n\r\n\t\t//Reset the skins so no more than one is selected when processed.\r\n\t\tclearSkin();\r\n\t\t\t\t\r\n\t\t//Loop through the entire sounds array list to find all the settings.\r\n\t\tfor (int i = 0; i < defaults.size(); i++) {\r\n\t\t\t//When found, set the variable in main to that string..\r\n\t\t\ttemp = (String) defaults.get(i);\r\n\t\t\t\r\n\t\t\tsa = splitString('=', temp);\r\n\t\t\t\r\n\t\t\tprefix = sa[0];\r\n\t\t\tsuffix = sa[1];\r\n\r\n\t\t\t//Find the properties and set them to the desired values.\r\n\t\t\tif (prefix.equalsIgnoreCase(\"sounds\")) {\r\n\t\t\t\tif (suffix.equalsIgnoreCase(\"true\")) Main.sounds = true;\r\n\t\t\t\tif (suffix.equalsIgnoreCase(\"false\")) Main.sounds = false;\r\n\t\t\t} else if (prefix.equalsIgnoreCase(\"skin\")){\r\n\t\t\t\tif (suffix.equalsIgnoreCase(\"iowa\")) Main.skinIsIowa = true;\r\n\t\t\t\tif (suffix.equalsIgnoreCase(\"isu\")) Main.skinIsIowaState = true;\r\n\t\t\t\tif (suffix.equalsIgnoreCase(\"uni\")) Main.skinIsNorthernIowa = true;\r\n\t\t\t} else if (prefix.equalsIgnoreCase(\"winscore\")){\r\n\t\t\t\tMain.winScore = suffix;\r\n\t\t\t} else if (prefix.equalsIgnoreCase(\"losescore\")){\r\n\t\t\t\tMain.loseScore = suffix;\r\n\t\t\t} else if (prefix.equalsIgnoreCase(\"sounddir\")){\r\n\t\t\t\tMain.soundDir = suffix;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@JsonIgnore\r\n public void setType(URI type) {\r\n this.type = type == null ? null : new TypeReference<AlternateIdType>(type);\r\n }",
"public static void applyPrefix(String[] text, ITextEditor editor, String tagname, String uri, String defaultPrefix) {\r\n \t\tif(defaultPrefix == null || defaultPrefix.length() == 0) return;\r\n \t\tIDocument doc = null;\r\n \tif(editor != null && editor.getDocumentProvider() != null) {\r\n \t\tdoc = editor.getDocumentProvider().getDocument(editor.getEditorInput());\r\n \t}\r\n \tapplyPrefix(text, doc, tagname, uri, defaultPrefix);\r\n \t}",
"public void setLocalMusicPath(String val) {\n\t\tref.edit().putString(COL_LOCAL_MP3_PATH, val).commit();\n\t}",
"private static Uri insertSoundFileToMediaStore(SquareImageButton button, File file, ContentResolver contentResolver) {\n Uri newUri;\n ContentValues values = new ContentValues();\n\n values.put(MediaStore.MediaColumns.DATA, file.getAbsolutePath());\n values.put(MediaStore.MediaColumns.TITLE, button.getTitle());\n values.put(MediaStore.MediaColumns.MIME_TYPE, \"audio/mp3\");\n values.put(MediaStore.MediaColumns.SIZE, file.length());\n values.put(MediaStore.Audio.AudioColumns.ARTIST, R.string.app_name);\n values.put(MediaStore.Audio.AudioColumns.IS_RINGTONE, true);\n values.put(MediaStore.Audio.AudioColumns.IS_NOTIFICATION, true);\n values.put(MediaStore.Audio.AudioColumns.IS_ALARM, true);\n values.put(MediaStore.Audio.AudioColumns.IS_MUSIC, false);\n\n Uri uri = MediaStore.Audio.Media.getContentUriForPath(file.getAbsolutePath());\n newUri = contentResolver.insert(uri, values);\n return newUri;\n }",
"public static void setOriginalAlbumTitle( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALALBUMTITLE, value);\r\n\t}",
"private void post(Uri uri, int type) {\n SingleAttatchment singleAttatchment = null;\nif(type==GALLERY_TYPE) {\n try {\n singleAttatchment = new SingleAttatchment(type, getStrPath(this,uri));\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n}\nelse if(type==CAMERA_TYPE) {\n Uri uri2 = Uri.fromFile(photoFile);\n singleAttatchment = new SingleAttatchment(type, uri2.getPath());\n}\nelse if(type==VIDEO_TYPE){\nLog.e(\"pathFetched\",getPath(uri));\n singleAttatchment = new SingleAttatchment(type, getPath(uri));\n}\nelse if(type==AUDIO_TYPE){\n singleAttatchment = new SingleAttatchment(type, (uri).getPath());\n}\nelse if(type==FILE_TYPE){\n Log.e(\"data\",String.valueOf(uri));\n Log.e(\"data\",String.valueOf(uri.getPath()));\n Log.e(\"data\",String.valueOf(uri.getEncodedPath()));\n Log.e(\"data\",String.valueOf(uri.getLastPathSegment()));\n\n singleAttatchment = new SingleAttatchment(type,uri.getPath());\n\n}\nelse if(type==RECORD_TYPE){\n singleAttatchment = new SingleAttatchment(type,uri.getPath());\n\n}\n\n //Log.e(\"Uri\",String.valueOf(uri.getPath()));\n// Log.e(\"file\",String.valueOf(file.getPath()));\n\n list.add(singleAttatchment);\n attatchmentAdapter.notifyDataSetChanged();\n save();\n\n }",
"public void setOriginalAlbumTitle(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALALBUMTITLE, value);\r\n\t}",
"public void setR(String R) {\n\t\tthis.R = R;\r\n\t\tfirePropertyChange(ConstantResourceFactory.P_R,null,R);\r\n\t}",
"public void playBeep(){\n //https://stackoverflow.com/questions/2618182/how-to-play-ringtone-alarm-sound-in-android\n try{\n //gets notification sound then plays it.\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);\n\n r.play();\n TimeUnit.MILLISECONDS.sleep(300);\n r.stop();\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }",
"public final String getSound( ) {\n\t\treturn sound;\n\t}",
"public void setCurrentTrack(String uri) {\n currentTrack = null;\n for(Integer bpm : tracksByBpm.keySet())\n for(PlaylistTrack plt: tracksByBpm.get(bpm))\n if(uri.equals(plt.track.uri)) {\n currentTrack = new Pair<Integer, PlaylistTrack>(bpm, plt);\n break;\n }\n if(currentTrack == null)\n currentTrack = getDummyTrack();\n }",
"@Result\n public int setTone(@Tone int tone) {\n synchronized (mLock) {\n TunerUtils.checkResourceState(TAG, mIsClosed);\n return nativeSetTone(tone);\n }\n }",
"public void onRadioButtonClicked(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch (view.getId()) {\n case R.id.radioButton2:\n if (checked)\n cause = \"struct_fire\";\n break;\n case R.id.radioButton3:\n if (checked)\n\n cause = \"hazmat\";\n break;\n case R.id.radioButton4:\n if (checked)\n // Ninjas rule\n cause = \"grass_fire\";\n break;\n case R.id.radioButton5:\n if (checked)\n // Ninjas rule\n cause = \"trash_fire\";\n break;\n case R.id.radioButton6:\n if (checked)\n // Ninjas rule\n cause = \"false_alarm\";\n break;\n case R.id.radioButton7:\n if (checked)\n // Ninjas rule\n cause = \"other_fire\";\n break;\n\n\n\n\n\n }\n }",
"void setValueMixerSound(int value);",
"public void setOriginalAlbumTitle( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALALBUMTITLE, value);\r\n\t}",
"public Builder setR(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n r_ = value;\n onChanged();\n return this;\n }",
"public void setUpSound() {\n try {\n generateTone();\n setFrequencyLabel();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"public void onRadioButtonSkinClicked(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch (view.getId()) {\n case R.id.radioButton_light:\n if (checked)\n skinOfBaby = \"light\";\n break;\n case R.id.radioButton_dark:\n if (checked)\n skinOfBaby = \"dark\";\n break;\n }\n }",
"@Override\n\tpublic String sing() {\n\t\treturn this.sound;\n\t}",
"public static void setSoundNotificationType(Context context, SoundType soundNotificationType)\n\t{\n\t\tPreferenceUtils.setSoundType(context, soundNotificationType);\n\t}",
"public void setBackgroundArtist(Contact value) {\r\n\t\tBase.set(this.model, this.getResource(), BACKGROUNDARTIST, value);\r\n\t}",
"Restaurant setRestaurantName(RestaurantLocale locale, String newName);",
"public static void setSound(boolean tempSound) {\n sound = tempSound;\n }"
] | [
"0.7227536",
"0.6704105",
"0.66956794",
"0.66556597",
"0.6602762",
"0.625828",
"0.624782",
"0.62100375",
"0.61207443",
"0.6050689",
"0.5897807",
"0.56114507",
"0.560859",
"0.540076",
"0.5378409",
"0.5281942",
"0.5236003",
"0.52032566",
"0.51152915",
"0.5110012",
"0.50914633",
"0.50898397",
"0.50654924",
"0.50410974",
"0.50250715",
"0.5021026",
"0.5007909",
"0.49500424",
"0.49321362",
"0.49176866",
"0.48793322",
"0.48662847",
"0.4858758",
"0.48521274",
"0.48498765",
"0.48340166",
"0.4827582",
"0.4775769",
"0.47653496",
"0.47629717",
"0.47535264",
"0.47502953",
"0.47371078",
"0.4733882",
"0.4733265",
"0.4724891",
"0.46916386",
"0.46905026",
"0.468796",
"0.4686707",
"0.46773297",
"0.46644285",
"0.46520612",
"0.46520612",
"0.46520612",
"0.4651134",
"0.461945",
"0.4612355",
"0.46079367",
"0.46074662",
"0.4592129",
"0.45891318",
"0.45813945",
"0.4576338",
"0.45636556",
"0.4562075",
"0.4562075",
"0.4558908",
"0.45578593",
"0.4557134",
"0.45549622",
"0.4546413",
"0.4546089",
"0.4540445",
"0.4533959",
"0.4509336",
"0.4508774",
"0.45078722",
"0.45019123",
"0.4500341",
"0.44945887",
"0.44845384",
"0.44839227",
"0.44827387",
"0.44810852",
"0.4479786",
"0.44723856",
"0.44703758",
"0.44596782",
"0.44537067",
"0.44513178",
"0.44513136",
"0.445061",
"0.44495764",
"0.44471908",
"0.44393563",
"0.4435763",
"0.44283053",
"0.44252604",
"0.44138482"
] | 0.7944912 | 0 |
Handle results from other activities. | @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RINGTONE_PICKER_REQUEST_CODE && resultCode == Activity.RESULT_OK ){
mAlarmRingtone = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
setRingtoneName();
}
if (requestCode == MAP_REQUEST_CODE) {
if (data != null && data.hasExtra(Constants.EXTRA_ALARM_DESTINATION)) {
// get coordinates (from intent)
mMapDestination = data.getParcelableExtra(Constants.EXTRA_ALARM_DESTINATION);
}
}
updateMapImage(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void invokeResults() {\r\n\t\t// Create the intent.\r\n\t\tIntent plantResultsIntent = new Intent(this, PlantResultsActivity.class);\r\n\t\t\r\n\t\t// create a bundle to pass data to the results screen.\r\n\t\tBundle data = new Bundle();\r\n\t\tdata.putString(PLANT_SEARCH_TERM, actPlantName.getText().toString());\r\n\t\t// add the bundle to the intent\r\n\t\tplantResultsIntent.putExtras(data);\r\n\t\t// start the intent, and tell it we want results.\r\n\t\tstartActivityForResult(plantResultsIntent, \t1);\r\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == ACTIVITY_ONE_REQUEST && resultCode == RESULT_OK) {\n if (data.hasExtra(ACTIVITY_ONE_RESULT)) {\n String result = data.getExtras().getString(ACTIVITY_ONE_RESULT);\n Toast.makeText(MainActivity.this, result, Toast.LENGTH_SHORT).show();\n requestResult.setText(result);\n }\n }\n if (requestCode == ACTIVITY_TWO_REQUEST && resultCode == RESULT_OK) {\n /**\n * Possibly of returning two different results from Activity Two\n */\n if (data.hasExtra(ACTIVITY_TWO_RESULT)) {\n String result = data.getExtras().getString(ACTIVITY_TWO_RESULT);\n Toast.makeText(MainActivity.this, result, Toast.LENGTH_SHORT).show();\n requestResult.setText(result);\n }\n if (data.hasExtra(ACTIVITY_TWO_RESULT_DIFFERENT)) {\n String result = data.getExtras().getString(ACTIVITY_TWO_RESULT_DIFFERENT);\n Toast.makeText(MainActivity.this, result, Toast.LENGTH_SHORT).show();\n requestResult.setText(result);\n }\n }\n }",
"@Override\n public void handleResult(Intent data) {\n }",
"@Override\n\tprotected void onHandleIntent(Intent intent) {\n\t\tConnectivityManager cm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\n\t\t@SuppressWarnings(\"deprecation\")\n\t\t// getBackgroundDataSetting check for older versions of Android\n\t\tboolean isNetworkAvailable = cm.getBackgroundDataSetting() && cm.getActiveNetworkInfo() != null;\n\t\tif (!isNetworkAvailable) return;\n\t\t\n\t\tLog.i(TAG, \"Received an intent: \" + intent);\n\t\t\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\tString query = prefs.getString(FlickrFetchr.PREF_SEARCH_QUERY, null);\n\t\tString lastResultId = prefs.getString(FlickrFetchr.PREF_LAST_RESULT_ID, null);\n\t\t\n\t\tArrayList<GalleryItem> items;\n\t\tif (query != null) {\n\t\t\titems = new FlickrFetchr().search(query);\n\t\t} else {\n\t\t\titems = new FlickrFetchr().fetchItems(1);\n\t\t}\n\t\t\n\t\tif (items.size() == 0)\n\t\t\treturn;\n\t\t\n\t\tString resultId = items.get(0).getmId();\n\t\t\n\t\tif (!resultId.equals(lastResultId)) {\n\t\t\tLog.i(TAG, \"Got a new result: \" + resultId);\n\t\t} else {\n\t\t\tLog.i(TAG, \"Got an old result: \" + resultId);\n\t\t}\n\t\t\n\t\tprefs.edit()\n\t\t\t.putString(FlickrFetchr.PREF_LAST_RESULT_ID, resultId)\n\t\t\t.commit();\n\t}",
"public void doResult() throws Exception {\n\t\tJSONObject map=new JSONObject(getResult());\n\t\tif(!\"ok\".equalsIgnoreCase(map.getString(\"status\"))){\n\t\t\tdoFailureResult();\n\t\t\treturn;\n\t\t}\n\t\tif(getHandler()!=null){\n\t\t\tMessage hmsg=getHandler().obtainMessage();\n\t\t\thmsg.obj=map;\n\t\t\thmsg.arg1=1;\n\t\t\tgetHandler().sendMessage(hmsg);\n\t\t\tsetHandler(null);\n\t\t}\n\t}",
"public abstract Intent constructResults();",
"@Override\n protected void onHandleIntent(Intent intent) {\n String urlPath = intent.getStringExtra(URL);\n String fileName = intent.getStringExtra(FILENAME);\n File output = new File(Environment.getExternalStorageDirectory(),\n fileName);\n if (output.exists()) {\n output.delete();\n }\n\n InputStream stream = null;\n FileOutputStream fos = null;\n try {\n\n URL url = new URL(urlPath);\n stream = url.openConnection().getInputStream();\n InputStreamReader reader = new InputStreamReader(stream);\n fos = new FileOutputStream(output.getPath());\n int next = -1;\n while ((next = reader.read()) != -1) {\n fos.write(next);\n }\n // successfully finished\n result = Activity.RESULT_OK;\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (stream != null) {\n try {\n stream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (fos != null) {\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n publishResults(output.getAbsolutePath(), result);\n }",
"@Override\n\tpublic void finish() {\n\t\tIntent data = new Intent();\n\t\t// Activity finished ok, return the data\n\t\t\n\t\t// TODO 2 put the data with the id returnValue\n\t\tdata.putExtra(RATING_OPTION, \"\"+rating.getProgress());\n\t\t\n\t\t// TODO 3 use setResult(RESULT_OK, intent);\n\t\t// to return the Intent to the application\n\t\tsetResult(RESULT_OK, data);\n\n\t\tsuper.finish();\n\t}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\ttry\n\t\t{\n\t\t\tif ( requestCode == Constants.REQUEST_CODE_COMMON &&\n\t\t\t\t\tresultCode == RESULT_OK )\n\t\t\t{\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t\t\n\t\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t}\n\t\tcatch( Exception ex )\n\t\t{\n\t\t\twriteLog( ex.getMessage());\n\t\t}\n\t}",
"@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n if(resultCode == ACTIVITY_FOR_RESULT_ID){\r\n setResult(ACTIVITY_FOR_RESULT_ID);\r\n finish();\r\n }\r\n }",
"@Override\n public void onSuccess(Map<String, Object> retData) {\n startActivity(intent_main);\n }",
"@Override\n public void handleResult(GeofenceInfoObject result) {\n super.handleResult(result);\n\n /*This is a call from the VolleyRequester, so this check prevents the app from\n crashing if the user leaves the tab while the app is trying\n to get quests from the server\n */\n if(this.isResumed()) {\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity != null) {\n final Button btnRequestInfo = (Button) view.findViewById(R.id.btn_request_info);\n final TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n if(result == null){\n if(currentGeofences != null){\n if(currentGeofences.size() != 0){\n //If the result is null and it shouldn't be, displays error and allows user to request\n //information again\n btnRequestInfo.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_info_retrieved));\n txtRequestGeofences.setVisibility(View.VISIBLE);\n btnRequestInfo.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n txtRequestGeofences.setText(getResources().getString(R.string.retrieving_info));\n btnRequestInfo.setVisibility(View.GONE);\n handleGeofenceChange(currentGeofences);\n }\n });\n }\n }\n }\n\n if (result != null) {\n try {\n Log.i(logMessages.GEOFENCE_MONITORING, \"handleResult: result length is: \" + result.getContent().size());\n Log.i(logMessages.GEOFENCE_MONITORING, \"handleResult: result is: \" + result.getContent().toString());\n\n btnRequestInfo.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n if(debugMode) {\n displayGeofenceInfo();\n }\n addMarker(result.getContent());\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }",
"public void toResults(View view) {\n Log.i(\"@#@#@#@#@#MAIN\", \"to results navigation item clicked\");\n Intent intent = new Intent(getApplicationContext(), ResultsActivity.class);\n intent.putExtra(\"finnish\", finnish);\n startActivity(intent);\n }",
"@Override\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n switch (resultCode) {\n case 1:\n Log.d(TAG,\"yay running\");\n break;\n case 0:\n Log.d(TAG,\"yay finish\");\n break;\n case -1:\n Log.d(TAG,\"yay error\");\n break;\n }\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tSystem.out.println(\"On activity result start\");\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tSystem.out.println(\"on activity result\");\n\t\tif (Manager.iab != null) {\n\t\t\t((IABManagerAndroid) Manager.iab).handleActivityResult(requestCode, resultCode, data);\n\t\t}\n\t\tif (Manager.fb != null) {\n\t\t\t((SocialMediaFacebook) Manager.fb).onActivityResult(requestCode, resultCode, data);\n\t\t}\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (!mHelper.handleActivityResult(requestCode, resultCode, data)) {\n // not handled, so handle it ourselves (here's where you'd\n // perform any handling of activity results not related to in-app\n // billing...\n super.onActivityResult(requestCode, resultCode, data);\n }\n else {\n// System.out.println(\"onActivityResult handled by IABUtil.\");\n }\n }",
"@Override\n public void OnSuccessfullResponse(String result) {\n String resultSet[] = result.split(\":\");\n switch (resultSet[0]){\n case \"topoffers\":\n GetPromotions promotionsTask = (GetPromotions) new GetPromotions(resultSet[1]);\n promotionsTask.setContext(this);\n promotionsTask.setListener(this);\n promotionsTask.execute();\n break;\n case \"aisle\":\n GetAisleRecommendationsTask aisleRecommendationsTask = (GetAisleRecommendationsTask) new GetAisleRecommendationsTask(resultSet[1]);\n aisleRecommendationsTask.setContext(this);\n aisleRecommendationsTask.setListener(this);\n aisleRecommendationsTask.execute();\n break;\n case \"thankyou\":\n default:\n Intent intent = new Intent(getApplicationContext(), ThankYouActivity.class);\n startActivity(intent);\n break;\n }\n\n }",
"protected abstract void startActivityForResult(final T androidComponent,\n final Intent intent,\n final int requestCode);",
"public void invokeBehaviour() {\n\t\tIntent i = alertMe.createIntentFromSession();\n\t\ti.setClass(this, AlertMeBehaviour.class);\n startActivityForResult(i, AlertMeConstants.INVOKE_STATUS); \n }",
"@Override\n protected void onPostExecute(Void result) {\n Intent intent = new Intent(game_play.this, user_input.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK|Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n finish();\n }",
"@Override\n public void onResults(List<LocationClass> results) {\n searchView.swapSuggestions(results);\n\n //let the users know that the background\n //process has completed\n }",
"public void onFinish() {\r\n Intent endGame = new Intent(getApplicationContext(),Results.class);\r\n endGame.putExtra(\"finalScore\", textViewCurrent.getText().toString());\r\n endGame.putExtra(\"mistakes\",wrongScans);\r\n endGame.putExtra(\"totalScans\",totalScans);\r\n startActivity(endGame);\r\n }",
"@Override\n public void run() {\n thisActivity.setResult(FROM_LOADINGSCREEN_NO_ADS_FOUND);\n thisActivity.finish();\n }",
"@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t\n\n\t\tif(requestCode == QUESTION_DETAIL_START_REQUEST && resultCode == QUESTION_DETAIL_END_REQUEST)\n {\n\t\t\tnew ApacheHttpThread().start();\n }\n\t\t\n\t\tif(requestCode == ADD_QUESTION_START_REQUEST && resultCode == ADD_QUESTION_END_REQUEST)\n {\n\t\t\t//Thread.sleep(6);\n\t\t\t new ApacheHttpThread().start();\n\t\t\t\n }\n\t\t\n\t\tif(requestCode == USER_LOGIN_START_REQUEST && resultCode == USER_LOGIN_END_REQUEST)\n {\n\t\t\tLog.d(\"user login start @@@\", \"666666\");\n\n\t\t\t// Toast.makeText(getActivity(), \"66666\", Toast.LENGTH_SHORT).show();\n\t\t\t// Thread.sleep(6);\n\t\t\t// new ApacheHttpThread().start();\n\t\t\tFragment homeContent = null;\n\t\t\thomeContent = new homeFragment();\n\n\t\t\tTestURLActivity fca = (TestURLActivity) getActivity();\n\t\t\tfca.switchContent(homeContent);\n\n }\n\t\t\n\t\tif(requestCode == QUESTION_DETAIL_START_REQUEST_2 && resultCode == QUESTION_DETAIL_END_REQUEST_2)\n {\n\t\t\tToast.makeText(getActivity(), \"77777\", Toast.LENGTH_SHORT).show();\n\t\t\t// Thread.sleep(6);\n\t\t\t// new ApacheHttpThread().start();\n\t\t\tFragment homeContent = null;\n\t\t\thomeContent = new homeFragment();\n\n\t\t\tTestURLActivity fca = (TestURLActivity) getActivity();\n\t\t\tfca.switchContent(homeContent);\n\t\t\t\n\t\t\t\n\t\t\tLog.d(\"question start @@@\", \"777777\");\n\n }\n\t\n\t\t\n\t}",
"public void onFinish() {\n Intent intent = getIntent();\n String name = intent.getStringExtra(\"name\");\n String Uname = intent.getStringExtra(\"Uname\");\n String vehicle = intent.getStringExtra(\"vehicle\");\n int points = intent.getIntExtra(\"points\", 0);\n Intent intent2 = new Intent(MatchedActivity.this, UserAreaActivity.class);\n intent2.putExtra(\"name\", name);\n intent2.putExtra(\"vehicle\", vehicle);\n intent2.putExtra(\"Uname\", Uname);\n intent2.putExtra(\"points\", points);\n\n MatchedActivity.this.startActivity(intent2);\n }",
"@Override\n\tpublic void resultActivityCall(int requestCode, int resultCode, Intent data) {\n\n\t}",
"private void handleIntent() {\n\t\tif (getIntent() != null && getIntent().getAction() != null) {\n\t\t\tif (getIntent().getAction().equals(Intent.ACTION_SEARCH)) {\n\t\t\t\tLog.d(\"MainActivityantivirus\", \"Action search!\");\n\t\t\t\tif (mCurrentFragmentType == NavigationElement.TYPE_APPS) {\n\t\t\t\t\tfinal String query = getIntent().getStringExtra(SearchManager.QUERY);\n\t\t\t\t\tif (query != null) {\n\t\t\t\t\t\t((AppsFragment) mCurrentFragment).onSearch(query);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void processFinish(int result) {\n MyApp myApp = (MyApp) getApplication();\n\n if (myApp.match[myApp.division()].size() > 0) {\n inflateMe();\n }\n\n }",
"public void handle(ResultItems result, Task task) {\n\n\t}",
"private void handleIntent(Intent intent) {\n\t\t// TODO Auto-generated method stub\n\t\tif (Intent.ACTION_VIEW.equals(intent.getAction())) {\n\t\t\tIntent paintingIntent = new Intent(this, PaintingActivity.class);\n\t\t\tpaintingIntent.setData(intent.getData());\n\t\t\tstartActivity(paintingIntent);\n\t\t} else if (Intent.ACTION_SEARCH.equals(intent.getAction())) {\n\t\t\tString query = intent.getStringExtra(SearchManager.QUERY);\n\t\t\tLog.v(\"Debug\", \"Search started\");\n\t\t\tshowResults(query);\n\t\t}\n\t}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n\t\tsuper.onActivityResult(requestCode, resultCode, intent);\n\t\tfetchDataFromDb();\n\t}",
"private void sendResult(int REQUEST_CODE) {\n Intent intent = new Intent();\n Bundle b = new Bundle();\n b.putString(MESSAGE, msg.getText().toString());\n\n intent.putExtras(b);\n if(REQUEST_CODE == HomeFragment.REQUEST_CODE)\n HomeFragment.onFragmentResult(getTargetRequestCode(), intent);\n if (REQUEST_CODE == HouseMessageComments.REQUEST_CODE)\n HouseMessageComments.onFragmentResult(getTargetRequestCode(), intent);\n if (REQUEST_CODE == EventMessageFragment.REQUEST_CODE)\n EventMessageFragment.onFragmentResult(getTargetRequestCode(), intent);\n\n }",
"void handleSdkResult(PaymentActivityResult sdkResult) {\n switch (sdkResult.getRequestCode()) {\n case SummaryActivity.PAYMENT_REQUEST_CODE:\n handlePaymentResult(sdkResult);\n break;\n case SummaryActivity.EDIT_REQUEST_CODE:\n handleEditResult(sdkResult);\n break;\n }\n }",
"public MatchOther processResult(ResultItems resultItems, Task task);",
"@Override\r\n\tprotected void onPostExecute(JSONObject result) {\n\t\tIntent i = new Intent(context,LiveRace.class);\r\n\t\ti.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\tcontext.startActivity(i);\r\n\r\n\t}",
"@Override\n\tprotected void onActivityResult(int arg0, int arg1, Intent arg2) {\n\t\tsuper.onActivityResult(arg0, arg1, arg2);\n\t\t// 判断是否实现返回值接口\n\t\tif (arg0 == 0) {\n\t\t\tActivity subActivity = manager.getActivity(\"tab1\");\n\t\t\tLog.v(\"TAG2\", \"r=\" + subActivity.getLocalClassName()\n\t\t\t\t\t+ (subActivity instanceof OnTabActivityResultListener));\n\t\t\t// 获取返回值接口实例\n\t\t\tOnTabActivityResultListener listener = (OnTabActivityResultListener) subActivity;\n\t\t\t// 转发请求到子Activity\n\t\t\tlistener.onTabActivityResult(arg0, arg1, arg2);\n\t\t} \n\t}",
"void showResultActivity() {\n\n Intent intent = new Intent();\n intent.setClass(this, ScanResultActivity.class);\n startActivity(intent);\n finish();\n\n playEffect();\n }",
"public void onActivityResult(int i, int i2, Intent intent) {\n try {\n if (this.a != null) {\n this.a.a(i, i2, intent);\n }\n } catch (RemoteException e) {\n sz.c(\"Could not forward onActivityResult to in-app purchase manager:\", e);\n }\n super.onActivityResult(i, i2, intent);\n }",
"@Override\r\n\tpublic void resultsUpdated() {\r\n\t\tmLayout.hideText();\r\n\t\t\r\n\t\tif(mModel.getResults().size() == 1){\r\n\t\t\tmModel.selectPerson(mModel.getResults().get(0));\r\n\t\t\tmController.getProfilePicture(mModel.getResults().get(0).sciper);\r\n\t\t\tmDialog = new PersonDetailsDialog(this, mModel.getSelectedPerson());\r\n\t\t\tmDialog.show();\r\n\t\t}else\r\n\t\t\tstartActivity(new Intent(getApplicationContext(), DirectoryResultListView.class));\r\n\t\t\r\n\t}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);\n\t}",
"protected void onActivityResult(int requestCode, int resultCode, Intent data){\n finish();\n startActivity(getIntent());\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (requestCode == FORGET && resultCode == FORGET) {\n\t\t\tsetResult(FORGET);\n\t\t\tfinish();\n\t\t\t\n\t\t}\n\t}",
"@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tXSDK.getInstance().onActivityResult(requestCode, resultCode, data);\r\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t}",
"@Override\r\n\tpublic void finish() {\n\t\tIntent it = new Intent();\r\n\t\tit.putExtra(\"ROOM_ID\", roomID);\r\n\t\tit.putExtra(\"NAME_DEVICE\", nameDevice);\r\n\t\tit.putExtra(\"TYPE_DEVICE\", typeDevice);\r\n\t\tit.putExtra(\"PORT_DEVICE\", portDevice);\r\n\t\tit.putExtra(\"STATUS_DEVICE\", statusDevice);\r\n\t\tsetResult(RESULT_OK, it);\r\n\t\tsuper.finish();\r\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (!mHelper.handleActivityResult(requestCode, resultCode, data)) {\n // not handled, so handle it ourselves (here's where you'd\n // perform any handling of activity results not related to in-app\n // billing...\n super.onActivityResult(requestCode, resultCode, data);\n }\n else {\n }\n }",
"private void openNextActivity(Intent intent) {\n\n String message = intent.getStringExtra(\"phase\");\n\n Log.d(\"STATE\", \"Waiting activity, phase is -> \" + message );\n if(message != null) {\n if (message.equals(\"USER_JOINED\")) { //TODO: This should be for ready to vote.\n Log.d(\"STATE\", \"Waiting activity, USER JOINED\" );\n\n Intent i = new Intent(this, VoteActivity.class);\n startActivity(i);\n } else if (message.equals(\"result\")) { //TODO: Change this to the new \"phase\" value\n Log.d(\"STATE\", \"Waiting activity. Meadle is ready\" );\n //Notification has been received that alerts meadle is complete\n MeadleDataManager.setHasResult(this);\n\n Intent i = new Intent(this, ResultsActivity.class);\n startActivity(i);\n } else if(message.equals(\"VOTING_FINISHED\")){\n Log.d(\"Votiing Finished\",intent.getExtras().toString());\n Intent i = new Intent(this,MeetingPointActivity.class);\n i.putExtras(intent.getExtras());\n startActivity(i);\n }\n }\n }",
"@Override\n public void onResult(final AIResponse result) {\n DobbyLog.i(\"Action: \" + result.getResult().getAction());\n }",
"public void onActivityResult(int i, int i2, Intent intent) {\n C1846e eVar;\n Bundle extras = intent.getExtras();\n if (!CheckActivityResult(i, i2, intent)) {\n this._isCheck = extras.getBoolean(\"PantilterCheckRange\");\n String string = extras.getString(\"PantilterMode\");\n C2028e a = C2253z.m9680a((Context) null, false);\n if (a != null) {\n eVar = a.mo5285i();\n if (eVar != null && this._isCheck) {\n string = eVar.mo4656E();\n }\n } else {\n eVar = null;\n }\n if (string != null && !string.equalsIgnoreCase(\"\")) {\n if (string.equalsIgnoreCase(\"manual\")) {\n Intent intent2 = new Intent(this._context, LiveViewMoviePantilterManualMovieActivity.class);\n Activity activity = (Activity) this._context;\n activity.finish();\n activity.startActivity(intent2);\n activity.overridePendingTransition(0, 0);\n } else if (string.equalsIgnoreCase(\"preset\") || string.equalsIgnoreCase(\"presethome\") || string.equalsIgnoreCase(\"presetpausehome\")) {\n Intent intent3 = new Intent(this._context, LiveViewMoviePantilterPresetActivity.class);\n Activity activity2 = (Activity) this._context;\n activity2.finish();\n activity2.startActivity(intent3);\n activity2.overridePendingTransition(0, 0);\n } else if (string.equalsIgnoreCase(\"party\") || string.equalsIgnoreCase(\"partypause\") || string.equalsIgnoreCase(\"movingobj\") || string.equalsIgnoreCase(\"mvobj\") || string.equalsIgnoreCase(\"movingobjpause\")) {\n Intent intent4 = new Intent(this._context, LiveViewMoviePantilterAutoMovieActivity.class);\n Activity activity3 = (Activity) this._context;\n activity3.finish();\n activity3.startActivity(intent4);\n activity3.overridePendingTransition(0, 0);\n } else if (eVar == null || eVar.mo4656E().equalsIgnoreCase(\"\") || !eVar.mo4656E().equalsIgnoreCase(\"noconnect\")) {\n if (eVar != null && !eVar.mo4656E().equalsIgnoreCase(\"\") && eVar.mo4656E().equalsIgnoreCase(\"error\") && this._isCheck) {\n C2331d.m10114a((Activity) this, C2328a.ON_PANTILTER_ERROR, (Bundle) null);\n }\n } else if (this._isCheck) {\n C2331d.m10114a((Activity) this, C2328a.ON_PANTILTER_NO_CONNECT, (Bundle) null);\n }\n }\n if (this.f12125b != null) {\n this.f12125b.mo8864c(this._isPictureRecMode);\n }\n }\n }",
"private void dataArrived(JobResultsRequest jobResultsRequest,\n JobResultsRequestWrapper jobResultsRequestWrapper,\n ResponseSender sender) {\n Preconditions.checkArgument(jobResultsRequest == null ^ jobResultsRequestWrapper == null,\n \"Either jobResultsRequest or jobResultsRequestWrapper should be non-null.\");\n\n String queryId;\n CoordinationProtos.NodeEndpoint foreman;\n\n if (jobResultsRequest != null) {\n queryId = QueryIdHelper.getQueryId(jobResultsRequest.getHeader().getQueryId());\n foreman = jobResultsRequest.getForeman();\n } else {\n queryId = QueryIdHelper.getQueryId(jobResultsRequestWrapper.getHeader().getQueryId());\n foreman = jobResultsRequestWrapper.getForeman();\n }\n\n if (mustForwardRequest(foreman)) {\n forwardRequest(jobResultsRequest, jobResultsRequestWrapper, sender, queryId, foreman);\n } else {\n logger.warn(\"User data arrived post query termination from {}, dropping. Data was from \" +\n \"QueryId: {}.\", foreman.getAddress(), queryId);\n sender.sendFailure(new UserRpcException(foreman, \"Failed to forward job results request\", new Throwable(\"Query Already Terminated\")));\n }\n }",
"void onResult(AIResponse result);",
"void onResult(int ret);",
"@Override\n public void OnActivityResultReceived(int requestCode, int resultCode, Intent data) {\n\n }",
"private void goToResultActivity() {\n try {\n stopCountdown();\n if (isOnline()) {\n List<Contact> testDetails = db.getPracticeTestDetailByID(Integer.parseInt(mSchoolId), Integer.parseInt(mStudentId), Integer.parseInt(testId));\n ansString = \"\";\n extraParam = \"2 Date :: \" + currentDateandTimeTemp;\n if (testDetails != null && testDetails.size() > 0) {\n ansString = testDetails.get(0).getTestAnsString();\n testTicks = testDetails.get(0).getTestTicks();\n if (ansString == null || ansString.isEmpty()) {\n ansString = \"\";\n extraParam = \"-1\";\n }\n if (testTicks == null || testTicks.isEmpty()) {\n testTicks = \"\";\n }\n /* if (ansString != null && !ansString.isEmpty()) {*/\n Log.e(\"ansString\", ansString);\n frame_progress.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.VISIBLE);\n String mStudentId = Datastorage.GetStudentId(getApplicationContext());\n String mSchoolId = Datastorage.GetSchoolId(getApplicationContext());\n String mYearId = Datastorage.GetCurrentYearId(getApplicationContext());\n String deviceId = Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID);\n String mDeviceDetail = Build.DEVICE + \"|||\" + Build.MODEL + \"|||\" + Build.ID\n + \"|||\" + Build.PRODUCT + \"|||\" + Build.VERSION.SDK\n + \"|||\" + Build.VERSION.RELEASE + \"|||\" + Build.VERSION.INCREMENTAL;\n Call<AppService> call = ((MyApplication) getApplicationContext()).getmRetrofitInterfaceAppService()\n .SetPracticeTestAnsV3(mStudentId, mSchoolId, mYearId, testId, ansString, SchoolDetails.appname + \"\", Constants.CODEVERSION, Constants.PLATFORM, extraParam, testTicks, deviceId, mDeviceDetail);\n call.enqueue(new Callback<AppService>() {\n @Override\n public void onResponse(Call<AppService> call, Response<AppService> response) {\n try {\n progressBar.setVisibility(View.GONE);\n frame_progress.setVisibility(View.GONE);\n AppService tmps = response.body();\n if (tmps != null && tmps.getResponse() != null && !tmps.getResponse().isEmpty()\n && tmps.getResponse().equalsIgnoreCase(\"1\") && !tmps.getStrResult().isEmpty()) {\n db.deleteTestRecords(rowTestID);\n Intent i = new Intent(PracticeTestQAActivity.this, PracticeTestResultActivity.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n // i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n i.putExtra(\"testId\", testId);\n i.putExtra(\"testName\", testName);\n i.putExtra(\"refereshflag\", \"1\");\n startActivity(i);\n PracticeTestQAActivity.this.finish();\n onClickAnimation();\n Toast.makeText(PracticeTestQAActivity.this, tmps.getStrResult(), Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(PracticeTestQAActivity.this, tmps.getStrResult(), Toast.LENGTH_SHORT).show();\n }\n } catch (Exception ex) {\n btn_next.setEnabled(true);\n progressBar.setVisibility(View.GONE);\n frame_progress.setVisibility(View.GONE);\n Constants.writelog(\"PracticeTestQAActivity\", \"setTestAns 2062:\" + ex.getMessage());\n } finally {\n ansString = \"\";\n }\n }\n\n @Override\n public void onFailure(Call<AppService> call, Throwable t) {\n progressBar.setVisibility(View.GONE);\n btn_next.setEnabled(true);\n frame_progress.setVisibility(View.GONE);\n Constants.writelog(\"PracticeTestQAActivity\", \"setTestAns 1589:\" + t.getMessage());\n }\n });\n /* }else {\n Intent i = new Intent(PracticeTestQAActivity.this, PracticeTestResultActivity.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n // i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n i.putExtra(\"testId\", testId);\n i.putExtra(\"testName\", testName);\n i.putExtra(\"refereshflag\", \"1\");\n startActivity(i);\n PracticeTestQAActivity.this.finish();\n onClickAnimation();\n }*/\n } else {\n Intent i = new Intent(PracticeTestQAActivity.this, PracticeTestResultActivity.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n // i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n i.putExtra(\"testId\", testId);\n i.putExtra(\"testName\", testName);\n i.putExtra(\"refereshflag\", \"1\");\n startActivity(i);\n PracticeTestQAActivity.this.finish();\n onClickAnimation();\n }\n } else {\n btn_next.setEnabled(true);\n progressBar.setVisibility(View.GONE);\n frame_progress.setVisibility(View.GONE);\n Toast.makeText(this, SchoolDetails.MsgNoInternet, Toast.LENGTH_SHORT).show();\n }\n } catch (Exception e) {\n btn_next.setEnabled(true);\n Constants.writelog(\"PracticeTestQAActivity\", \"goToResultActivity 1787:\" + e.getMessage());\n }\n }",
"private void handleSearchPendingOnPost(String result) {\n SearchContactsFragment frag = (SearchContactsFragment) getSupportFragmentManager()\n .findFragmentByTag(getString(R.string.keys_fragment_searchConnections));\n\n try {\n JSONObject resultsJSON = new JSONObject(result);\n boolean success = resultsJSON.getBoolean(\"success\");\n String username = resultsJSON.getString(\"usernameB\");\n\n if (success) {\n frag.handlePendingOnPost(success, username);\n } else {\n Toast.makeText(this, \"Your action for contact request was not valid\",\n Toast.LENGTH_SHORT).show();\n }\n\n } catch (JSONException e) {\n frag.setError(\"Something strange happened\");\n frag.handleOnError(e.toString());\n }\n }",
"public void finishActivity(View view) {\n Intent result = new Intent(\"com.example.RESULT_ACTION\", Uri.parse(\"content://result_uri\"));\n result.putExtra(\"song\", songs.getSelectedItem().toString());\n setResult(Activity.RESULT_OK, result);\n finish();\n }",
"@Override\n public void run() {\n Intent intent = new Intent(ACTION);\n intent.putExtra(\"result\", \"baz\");\n mLocalBroadcastManager.sendBroadcast(intent);\n // If desired, stop the service\n// stopSelf();\n }",
"@Override\n protected void onPostExecute(Void result) {\n // This is where we would process the results if needed.\n this.progressDialog.dismiss();\n }",
"@Override\n public void deliverResult(T data) {\n if (isReset()) {\n // An async query came in while the loader is stopped. We\n // don't need the result.\n if (mData != null) {\n onReleaseResources(mData);\n }\n }\n T oldApps = mData;\n mData = data;\n if (isStarted()) {\n // If the Loader is currently started, we can immediately\n // deliver its results.\n super.deliverResult(data);\n }\n // At this point we can release the resources associated with\n // 'oldApps' if needed; now that the new result is delivered we\n // know that it is no longer in use.\n if (oldApps != null) {\n onReleaseResources(oldApps);\n }\n }",
"protected void handleResult(final int resultCode, final Bundle resultData) {\n\n // Get the request Id\n final int requestId = resultData.getInt(RECEIVER_EXTRA_REQUEST_ID);\n\n if (resultCode == PoCService.SUCCESS_CODE) {\n final Intent intent = mRequestSparseArray.get(requestId);\n switch (intent.getIntExtra(PoCService.INTENT_EXTRA_WORKER_TYPE, -1)) {\n case PoCService.WORKER_TYPE_CITY_LIST:\n mMemoryProvider.cityList = resultData.getParcelableArrayList(RECEIVER_EXTRA_CITY_LIST);\n break;\n case PoCService.WORKER_TYPE_CRUD_SYNC_PHONE_LIST:\n mMemoryProvider.syncPhoneList = resultData.getParcelableArrayList(RECEIVER_EXTRA_PHONE_LIST);\n break;\n case PoCService.WORKER_TYPE_CRUD_SYNC_PHONE_DELETE:\n mMemoryProvider.syncPhoneDeleteData = resultData.getLongArray(RECEIVER_EXTRA_PHONE_DELETE_DATA);\n break;\n case PoCService.WORKER_TYPE_CRUD_SYNC_PHONE_ADD:\n mMemoryProvider.syncPhoneAddedPhone = resultData.getParcelable(RECEIVER_EXTRA_PHONE_ADD_EDIT_DATA);\n break;\n case PoCService.WORKER_TYPE_CRUD_SYNC_PHONE_EDIT:\n mMemoryProvider.syncPhoneEditedPhone = resultData.getParcelable(RECEIVER_EXTRA_PHONE_ADD_EDIT_DATA);\n break;\n }\n }\n\n // Remove the request Id from the \"in progress\" request list\n mRequestSparseArray.remove(requestId);\n\n // Call the available listeners\n synchronized (mListenerList) {\n for (WeakReference<OnRequestFinishedListener> weakRef : mListenerList) {\n OnRequestFinishedListener listener = weakRef.get();\n if (listener != null) {\n listener.onRequestFinished(requestId, resultCode, resultData);\n }\n }\n }\n }",
"@Override\n\tpublic void finish() {\n\t Intent data = new Intent();\n\t\t data.putExtra(\"returnKey1\",id );\n \t setResult(2, data);\n\t\t super.finish();\n\t}",
"@Override\r\n\tprotected void onPostExecute(Void result) {\n\t\tsuper.onPostExecute(result);\r\n\t\tmProgressDialog.dismiss();\r\n\t\tIntent i = new Intent(mainactivity, Workflow.class);\r\n\t\tmainactivity.startActivity(i);\r\n\t}",
"@Override\n public void handleResult(Result rawResult) {\n Toast.makeText(this, rawResult.toString(),Toast.LENGTH_LONG).show();\n User user = SharedPrefManager.getInstance(this).getUser();\n if(user.getId().equals(rawResult.toString().substring(1,rawResult.toString().length())))\n {\n SharedPreferences sharedPreferences = this.getSharedPreferences(\"simplifiedcodingsharedpref\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"scan_status\",\"1\");\n editor.apply();\n Intent in = new Intent(ScanActivity.this, StudentHomePage.class);\n startActivity(in);\n finish();\n }\n else {\n Toast.makeText(this, \"Invalid SAP ID\", Toast.LENGTH_LONG).show();\n onBackPressed();\n }\n }",
"public void on_code_read(String result){\n Intent intent = new Intent(ScanActivity.this, TargetActivity.class);\n intent.putExtra(\"result\", result);\n startActivity(intent);\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif(requestCode == 1){\n\t\t\tif(resultCode == RESULT_OK){\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(resultCode!= Activity.RESULT_OK){\n return;\n }\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n \tLog.d(\"Activity\", \"Got back activity\");\n \tLog.d(\"Activity arguments\", \"ReqCode:\" + requestCode + \" Result:\"+resultCode);\n \t\n \t// Didn't get anything useful back from either textcraft or speechcraft\n \tif ((requestCode == SPEECHCRAFT_REQCODE || requestCode == TEXTCRAFT_REQCODE) && resultCode == RESULT_CANCELED) {\n \t\tLog.d(\"Activity\", \"Didn't get anything back\");\n \t} else {\n \t// Respond to built in speech recognition activity\n if (requestCode == SPEECH_REQCODE && resultCode == RESULT_OK) {\n // Populate the wordsList with the String values the recognition engine thought it heard\n \t// i.e. \"Milk\" -> matches = [milk, Milk, Mielke]\n ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n Log.d(\"Hearing...\", matches.toString());\n \n // Start the speechcraft activity and passing heard words\n Intent intent = new Intent(this, SpeechcraftActivity.class);\n \t\tBundle bundle =new Bundle();\n \t\tbundle.putStringArray(\"matches\", matches.toArray(new String[matches.size()]));\n \t\tintent.putExtras(bundle);\n \t\tstartActivityForResult(intent, SPEECHCRAFT_REQCODE);\n \t\toverridePendingTransition(R.anim.fade_in, R.anim.fade_out);\n }\n // Respond to a successfully finished textcraft or speechcraft activity, we'll get back\n // two strings - the food's name, and the food's location\n if ((requestCode == TEXTCRAFT_REQCODE || requestCode == SPEECHCRAFT_REQCODE) && resultCode == RESULT_OK) {\n \t// Update the two arrays that store values and the one that displays it on this activity\n \tString foodName = data.getExtras().getString(\"foodName\");\n \tfoodNameList.add(foodName);\n \t\n \tString location = data.getExtras().getString(\"location\");\n \tfoodlocationList.add(location);\n\n \tdisplayedFoods.add(foodName + \" | \" + location) ;\n \tArrayAdapter<String> displayedFoodsAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, displayedFoods);\n \tfoodList.setAdapter(displayedFoodsAdapter);\t\n }\n super.onActivityResult(requestCode, resultCode, data);\n \t}\n }",
"@Override\n public void onClick(View view) {\n Intent question3Intent = new Intent(Question4Activity.this, Question3Activity.class);\n question3Intent.putExtra (\"q1result\", resultQ1);\n question3Intent.putExtra (\"q2result\", resultQ2);\n startActivity(question3Intent);\n }",
"private void showResults() {\n verifyFCMToken(this);\n progressDialog.cancel();\n Toast.makeText(RegisterActivity.this, \"Welcome!\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }",
"protected void handleResult(String result) {}",
"@Override\n public void processFinish(int response_code, String response_message, JSONObject output) {\n loading--;\n if (loading == 0) {\n loadingbar.setVisibility(View.GONE);\n } else System.out.println(\"INFO: Open web calls \" + loading);\n\n //Server Response\n response.append(response_code + \" \" + response_message + \"\\r\\n\");\n\n if (response_code == 200 && output != null) {\n trigger = TriggerDetails.fromJson(output);\n\n TextView value_id = getView().findViewById(R.id.value_id);\n value_id.setText(trigger.getId());\n\n TextView value_title = getView().findViewById(R.id.value_title);\n value_title.setText(trigger.getTitle());\n\n Switch active = getView().findViewById(R.id.value_active);\n active.setChecked(trigger.getActive());\n\n Switch current = getView().findViewById(R.id.value_state);\n current.setChecked(trigger.getState());\n\n if (trigger.getType() == 0) {\n\n updateStartDate();\n updateStartTime();\n\n updateEndDate();\n updateEndTime();\n\n Spinner interval = getView().findViewById(R.id.value_interval);\n interval.setSelection(trigger.getInterval());\n } else if (trigger.getType() == 1) {\n Button source = getView().findViewById(R.id.value_rule);\n source.setText(trigger.getSource());\n\n Spinner relop = getView().findViewById(R.id.value_relop);\n relop.setSelection(trigger.getRelop());\n\n TextView threshold = getView().findViewById(R.id.value_threshold);\n threshold.setText(Integer.toString(trigger.getThreshold()));\n\n NegativeProgressSeekerBar tolerance = getView().findViewById(R.id.value_tolerance);\n tolerance.setProgress(25 + trigger.getTolerance());\n\n Spinner interval = getView().findViewById(R.id.value_interval);\n interval.setSelection(trigger.getInterval());\n } else if (trigger.getType() == 2) {\n Spinner relop = getView().findViewById(R.id.value_relop);\n relop.setSelection(trigger.getRelop());\n\n TextView threshold = getView().findViewById(R.id.value_threshold);\n threshold.setText(Integer.toString(trigger.getThreshold()));\n\n TextView counter = getView().findViewById(R.id.value_counter);\n counter.setText(trigger.getCount().toString());\n } else if (trigger.getType() == 3) {\n\n }\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (result != null) {\n if (result.getContents() == null) {\n Log.d(\"MainActivity\", \"Cancelled scan\");\n makeToast(this, \"Cancelado\");\n } else {\n Log.d(\"MainActivity\", \"Scanned\");\n makeToast(this, \"Contactando con Salesforce, ISBN: \" + result.getContents());\n scanResult = result.getContents();\n\n if (scanResult != null) {\n try {\n getProducto(scanResult);\n } catch (Exception e) {\n Log.e(\"RequestError\", e.toString());\n makeToast(this, \"Ha ocurrido un error, intente nuevamente...\");\n } finally {\n sfResult = null;\n }\n }\n }\n } else {\n Log.d(\"MainActivity\", \"Weird\");\n // This is important, otherwise the result will not be passed to the fragment\n super.onActivityResult(requestCode, resultCode, data);\n }\n }",
"private void setToOtherActivity(){\n\n util.setArrayListToOtherActivity(intent, solicitudEnviadaDAO.getSolEnviadaDTO(), Constantes.PARCEL_LISTA_SOL_ENVIADA);\n util.setArrayListToOtherActivity(intent, solicitudRecibidaDAO.getSolRecibidaDTO(), Constantes.PARCEL_LISTA_SOL_RECIBIDA);\n util.setArrayListToOtherActivity(intent, solicitudContestadaDAO.getSolContestadaDTO(), Constantes.PARCEL_LISTA_SOL_CONTESTADA);\n util.setArrayListToOtherActivity(intent, preguntaEnviadaDAO.getListaPreguntaEnviadaDTO(), Constantes.PARCEL_LISTA_PREG_ENVIADA);\n util.setArrayListToOtherActivity(intent, preguntaRecibidaDAO.getListaPreguntaRecibidaDTO(), Constantes.PARCEL_LISTA_PREG_RECIBIDA);\n util.setArrayListToOtherActivity(intent, preguntaContestadaDAO.getListaPreguntasContestadasDTO(), Constantes.PARCEL_LISTA_PREG_CONTESTADA);\n util.setArrayListToOtherActivity(intent, puntuacionRecibidaDAO.getListaPuntuacionRecibidasDTO(), Constantes.PARCEL_LISTA_PUNT_RECIBIDA);\n\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode,\n Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n uiHelper.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\r\n\tpublic void handleResult(Date updateTime, Boolean resultObject, Map<String, Object> contextContents, Long uid) {\n\t}",
"public void startActivityForResult(IPlugin arg0, Intent arg1, int arg2) {\n\t\t\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 1 && resultCode == RESULT_OK) {\n fade(rlMap);\n Map<String, Object> params = User.getToken(this);\n WebBridge.send(\"webservices.php?task=getStatusMap\", params, \"Cargando\", this, this);\n } else if (requestCode == 1 && resultCode != RESULT_OK) {\n clickBack(null);\n }\n }",
"private void returnIndividual(int keyPosition){\n Intent returnData = new Intent();\n returnData.putExtra(\"caller\", caller);\n returnData.putExtra(\"username\", keys.get(keyPosition));\n returnData.putExtra(\"name\", individuals.get(keyPosition));\n setResult(RESULT_OK, returnData);\n finish();\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (currentSession != null) {\n currentSession.onActivityResult(this, requestCode, resultCode, data);\n }\n }",
"private void handleActionFoo(String param1, String param2) {\n Log.d(Constant.LOG_TAG, \"Start *GET* action\" );\n\n // TODO: Handle action Foo\n// throw new UnsupportedOperationException(\"Not yet implemented\");\n final DatabaseManager manager = DatabaseManager.getInstance();\n manager.executeGetDataQueryTask(new QueryExecutor() {\n @Override\n public void run() {\n boolean success = true;\n List<TestData> result00 = new ArrayList<>();\n\n try {\n RuntimeExceptionDao<TestData, Integer> targetDao = manager.getDao(TestData.class);\n\n QueryBuilder<TestData, Integer> queryBuilder =\n targetDao.queryBuilder();\n\n queryBuilder.where().ge(\"age\", 50);\n queryBuilder.orderBy(\"age\", true);\n result00 = targetDao.query(queryBuilder.prepare());\n\n\n } catch (Exception e) {\n success = false;\n } finally {\n\n if (success) {\n// doSomething();\n\n// for (TestData item : result00) {\n// Log.d(Constant.LOG_TAG, \"ID: \" + item.userId + \" Age: \" + item.age);\n// }\n\n\n } else {\n }\n }\n }\n });\n\n\n final DatabaseManager manager01 = DatabaseManager.getInstance();\n manager01.executeGetDataQueryTask(new QueryExecutor() {\n @Override\n public void run() {\n List<TestData> result01 = new ArrayList<>();\n\n boolean success = true;\n\n try {\n RuntimeExceptionDao<TestData, Integer> targetDao = manager01.getDao(TestData.class);\n\n QueryBuilder<TestData, Integer> queryBuilder =\n targetDao.queryBuilder();\n\n Where<TestData, Integer> where = queryBuilder.where();\n SelectArg selectArg = new SelectArg();\n where.le(\"age\", selectArg);\n\n where.and();\n\n SelectArg selectArg01 = new SelectArg();\n where.eq(\"gender\", selectArg01);\n\n PreparedQuery<TestData> preparedQuery = queryBuilder.prepare();\n\n selectArg.setValue(\"50\");\n selectArg01.setValue(\"W\");\n\n result01 = targetDao.query(preparedQuery);\n\n } catch (Exception e) {\n success = false;\n } finally {\n\n if (success) {\n// Log.d(Constant.LOG_TAG, \"*********************************\");\n//// doSomething();\n// for (TestData item : result01) {\n// Log.d(Constant.LOG_TAG, \"ID: \" + item.userId + \" Age: \" + item.age + \" gender: \" + item.gender);\n// }\n// Log.d(Constant.LOG_TAG, \"*********************************\");\n\n } else {\n }\n }\n }\n });\n\n\n }",
"public void end() {\n Intent backIntent = new Intent();\n backIntent.putExtra(\"point\", score);\n setResult(RESULT_OK, backIntent);\n animal_count[0] = 0;\n score = 0;\n count = 0;\n finish();\n }",
"@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t// GameHelper handles some of the cases with sign-in's etc\n\t\t// automatically.\n\t\tgameHelper.onActivityResult(requestCode, resultCode, data);\n\t\tif (requestCode == RC_SELECT_PLAYERS) {\n\t\t\thandleInvitePlayerActivityResult(resultCode, data);\n\t\t} else if (requestCode == RC_INVITATION_BOX) {\n\t\t\thandleGameInboxActivityResult(resultCode, data);\n\t\t}\n\t}",
"public void intentHandler() {\n Intent intent = getIntent();\n if (intent.hasExtra(\"DATA\")) {\n data = (String[]) getIntent().getSerializableExtra(\"DATA\");\n recievedPosition = (int) getIntent().getSerializableExtra(\"POS\");\n if(recievedPosition != 0){\n IOException e = new IOException();\n try {\n itemArrAdapt.updateItem(recievedPosition, data, e);\n this.setPrefs();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n } else {\n // Start Normal\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == REQUEST_CODE) {\n if (resultCode == RESULT_CANCELED) {\n Toast.makeText(this, \"Пользователь вышел из SecondActivity\", Toast.LENGTH_SHORT).show();\n } else if (resultCode == RESULT_OK) {\n\n // gets chosen menu and put it to textView\n if (data != null) {\n String text = data.getStringExtra(\"result\");\n if (text != null) {\n TextView tv = findViewById(R.id.order);\n tv.setText(text);\n }\n }\n }\n }\n // gets date that was chosen by user\n if (requestCode == REQUEST_CODE_TIME) {\n if (resultCode == RESULT_OK) {\n if (data != null) {\n String text = data.getStringExtra(\"result\");\n if (text != null) {\n TextView tv = findViewById(R.id.chosenTime);\n tv.setText(text);\n }\n }\n }\n }\n }",
"@Override\r\n public void onClick(View v) {\n setResult(1);\r\n finish();\r\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n default:\n break;\n }\n\n }",
"@Override\n public void handleResult(com.google.zxing.Result rawResult) {\n if (rawResult.getText().length() < 4) {\n mScannerView.resumeCameraPreview(SimpleScanner.this);\n Toast.makeText(this, \"Wrong QR Code\", Toast.LENGTH_SHORT).show();\n } else {\n Result = rawResult.getText().substring(0, 4);\n MachineID = rawResult.getText().substring(Result.length());\n if (Result.equals(Verification)) {\n Intent i = new Intent(SimpleScanner.this, DetailBreakdownPage2.class);\n String currentResponseDateFinish = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\", Locale.getDefault()).format(new Date());\n i.putExtra(\"MachineID\", MachineID);\n i.putExtra(\"ResponseDateFinish\", currentResponseDateFinish);\n i.putExtra(\"Line\", Line);\n i.putExtra(\"Station\", Station);\n i.putExtra(\"PIC\", PIC);\n startActivity(i);\n } else {\n mScannerView.resumeCameraPreview(SimpleScanner.this);\n Toast.makeText(this, \"Station tidak sesuai\", Toast.LENGTH_SHORT).show();\n }\n }\n }",
"@Override\n protected void onHandleIntent(Intent intent) {\n Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n if (intent == null) {\n return;\n }\n String errorMessage = \"\";\n\n // Get the location passed to this service through\n Location location = intent.getParcelableExtra(\n Constants.LOCATION_DATA_EXTRA);\n //Get the receiver passed to this service through extra\n receiver = intent.getParcelableExtra(Constants.RECEIVER);\n\n List<Address> addresses = null;\n\n try {\n //Returns one address corresponding to this geographical location\n addresses = geocoder.getFromLocation(\n location.getLatitude(),\n location.getLongitude(),\n 1);\n } catch (IOException ioException) {\n // Catch network or other I/O problems.\n errorMessage = getString(R.string.service_not_available);\n Log.e(TAG, errorMessage, ioException);\n } catch (IllegalArgumentException illegalArgumentException) {\n // Catch invalid latitude or longitude values.\n errorMessage = getString(R.string.invalid_lat_long_used);\n Log.e(TAG, errorMessage + \". \" +\n \"Latitude = \" + location.getLatitude() +\n \", Longitude = \" +\n location.getLongitude(), illegalArgumentException);\n }\n\n // Handle case where no address was found.\n if (addresses == null || addresses.size() == 0) {\n if (errorMessage.isEmpty()) {\n errorMessage = getString(R.string.no_address_found);\n Log.e(TAG, errorMessage);\n }\n deliverResultToReceiver(Constants.FAILURE_RESULT, errorMessage);\n } else {\n Address address = addresses.get(0);\n ArrayList<String> addressFragments = new ArrayList<String>();\n\n // Fetch just the zipcode\n addressFragments.add(address.getPostalCode());\n\n Log.i(TAG, getString(R.string.address_found));\n //Sends results back to LocationActivity\n deliverResultToReceiver(Constants.SUCCESS_RESULT,\n TextUtils.join(System.getProperty(\"line.separator\"),\n addressFragments));\n }\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tswitch (requestCode) {\n\t\tcase 1:\n\t\t\tif(data != null){\n\t\t\t\tString result = data.getStringExtra(\"result\");\n\t\t\t\tif(result != null)\n\t\t\t\t\t//tv.setText(result);\n\t\t\t\t\tSystem.out.println(result);\n\t\t\t\tUri uri = Uri.parse(result); \n\t\t\t\tIntent it = new Intent(Intent.ACTION_VIEW, uri); \n\t\t\t\tstartActivity(it);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}",
"@Override\n\t\t\t public void resultLoaded(int err, String reason, String result) {\n\t\t\t \n\t\t\t\t dialog.cancel();\n\t\t\t\t \n\t\t\t\t if (err == 0) {//成功获取数据的情况\n\t\t\t\t\t \n\t\t\t\t\t try {\n\t\t\t\t\t\t \n\t\t\t\t\tJSONObject resultObject=new JSONObject(result);\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t if(resultObject.isNull(\"result\")){//判断车次是否存在\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tToast.makeText(getActivity(), \"航班不存在...\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t //成功获取到数据,在此处仅专递数据,并不对数据进行处理\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tBundle bundle=new Bundle();\n\t\t\t\t\t\t\t\tbundle.putString(\"result\", result);//将JSON数据直接传递过去\n\t\t\t\t\t\t\t\tbundle.putString(\"date\", flightDataShow.getText().toString().trim());//将日期传递过去\n\t\t\t\t\t\t\t\tIntent intent=new Intent(getActivity(),FlightResultActivity.class);\n\t\t\t\t\t\t\t\tintent.putExtra(\"FlightBundle\", bundle);\n\t\t\t\t\t\t\t\t startActivity(intent);\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} 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\t\t\t \n\t\t\t\t\t} else {//非成功获取数据\n\t\t\t\t\t\t\n\t\t\t\t\t\t Toast.makeText(getActivity(), \"数据获取失败...\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t \n\t\t\t }",
"@Override\n public void doInUI(Response response, Integer transfer) {\n if (response.isSuccess()) {\n Intent it = getIntent();\n setResult(Activity.RESULT_OK, it);\n finish();\n }\n }",
"@Override\n public void doInUI(Response response, Integer transfer) {\n if (response.isSuccess()) {\n Intent it = getIntent();\n setResult(Activity.RESULT_OK, it);\n finish();\n }\n }",
"public void saveResults(){\n //Tell adapter to save gathered data\n //Call appropriate function\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n //if qrcode reader\n if(code == 1){\n IntentResult qrcode = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (qrcode != null) {\n if (qrcode.getContents() != null) {\n String cut = qrcode.getContents();\n int corte = cut.indexOf(\"=\") + 1;\n final String code = cut.substring(corte, corte + 44);\n Intent readQRcode = new Intent(activity, VerNFe.class);\n readQRcode.putExtra(\"code\", code);\n overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);\n startActivity(readQRcode);\n } else {\n Toast.makeText(activity, R.string.toast_cancel_read_qrcode, Toast.LENGTH_SHORT).show();\n }\n drawerLayout.closeDrawers();\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }\n //if barcode reader\n else if (code == 2){\n IntentResult barcode = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (barcode != null) {\n if (barcode.getContents() != null) {\n String codigo_de_barras = barcode.getContents();\n Descontos d = new Descontos();\n d.pegaProdutoPorCodigoDeBarras(codigo_de_barras);\n } else {\n Toast.makeText(this, \"Leitura do código de barras cancelado\", Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(this, \"Erro ao ler código de barras do Produto\", Toast.LENGTH_LONG).show();\n }\n }\n\n }",
"@Override\n protected void onHandleIntent(Intent intent){\n String errorMessage = \"\";\n\n receiver = intent.getParcelableExtra(Constants.RECEIVER);\n\n // Check if the detectedActivityReceiver was properly registered\n if (receiver == null){\n Log.wtf(TAG, \"No address detectedActivityReceiver received. There is nowhere to send the results.\");\n return;\n }\n\n // Get the location passed to this service through an extra\n Location location = intent.getParcelableExtra(Constants.LOCATION_DATA_EXTRA);\n\n // Make sure that the location data was really sent over through an extra\n if (location == null){\n errorMessage = \"No location data was provided.\";\n Log.wtf(TAG, errorMessage);\n deliverResultToReceiver(Constants.ADDRESS_FAIL_RESULT, errorMessage);\n return;\n }\n\n /* Errors could still arise from using the Geocoder. (For example, if there is no\n connectivity, of if the Geocoder is given illegal location data.) Or the Geocoder\n may not have found an address. In all these cases, we communicate a failure.\n\n The Geocoder used in this file has responses localized for the given Locate.\n */\n Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n\n // Address found using the Geocoder\n List<Address> addresses = null;\n\n try {\n /* Using getFromLocation() returns an array of addresses for the area immediately surrounding\n the given lat/long. The results are a best guess and aren't guaranteed to be accurate.\n */\n addresses = geocoder.getFromLocation(\n location.getLatitude(),\n location.getLongitude(),\n // Just get a single address\n 1);\n\n } catch (IOException exception) {\n // Catch network or other I/O problems.\n errorMessage = \"IO Exception in getFromLocation()\";\n Log.e(\"ComplaintLocation\", errorMessage, exception);\n } catch (IllegalArgumentException exception){\n // Catch invalid latitude or longitude values.\n errorMessage = \"Illegal arguments \" +\n Double.toString(location.getLatitude()) + \", \" +\n Double.toString(location.getLongitude()) +\n \" passed to address service.\";\n Log.e(\"LocationActivity\", errorMessage, exception);\n }\n\n // Handle case where no address was found\n if (addresses == null || addresses.size() == 0) {\n if (errorMessage.isEmpty()) {\n errorMessage = \"No address found.\";\n Log.e(TAG, errorMessage);\n }\n deliverResultToReceiver(Constants.ADDRESS_FAIL_RESULT, errorMessage);\n }\n else {\n Address address = addresses.get(0);\n ArrayList<String> addressFragments = new ArrayList<>();\n\n /* Fetch the address lines using getAddressLine, join them, and send them to the thread.\n */\n for (int i = 0; i < address.getMaxAddressLineIndex(); i++){\n addressFragments.add(address.getAddressLine(i));\n }\n Log.i(TAG, \"Address found\");\n deliverResultToReceiver(Constants.ADDRESS_SUCCESS_RESULT,\n TextUtils.join(System.getProperty(\"line.separator\"), addressFragments));\n }\n }",
"@Override\n public void onClick(View view) {\n Intent intent = MeasurementResultActivity.newIntent(getActivity(), null);\n startActivity(intent);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 2 && resultCode != RESULT_OK) {\n update(2);\n }\n }",
"@Override\n public void onApiTaskCompleted(ArrayList<ApiResult> results, String origin) {\n ApiResult currentResult;\n\n /**\n * Holds the pairs of String and MapData, for example [vos, MapData]\n * */\n HashMap<String, MapData> dataHashMap = new HashMap<>();\n\n /**\n * Loop through each ApiResult.\n * */\n for(int i = 0; i < results.size(); i++)\n {\n currentResult = results.get(i);\n\n /**\n * Check if the ApiResult is for us, by checking the host of the URL.\n * NOTE: Does not work?\n * */\n if(currentResult.getRequest().getUrl().getHost().matches(Area348.API_V1_ROOT))\n {\n\n }\n\n /**\n * Split the url so we can determine the type of the request.\n * TODO: determine type in ApiResult?\n * */\n String[] args = currentResult.getRequest().getUrl().getPath().split(\"/\");\n\n /**\n * Switch on the first arg.\n * */\n switch(args[1])\n {\n case \"vos\":\n dataHashMap.put(\"vos\", VosMapBehaviour.toMapData(currentResult.getData()));\n break;\n case \"sc\":\n dataHashMap.put(\"sc\", null);\n break;\n }\n\n\n }\n\n Intent broadcastIntent = new Intent();\n broadcastIntent.setAction(UPDATE_SERVICE_ACTIONS_RENEW);\n broadcastIntent.addCategory(Intent.CATEGORY_DEFAULT);\n broadcastIntent.putExtra(\"hashMap\", dataHashMap);\n sendBroadcast(broadcastIntent);\n }",
"public void onActivityResult(int i, int i2, Intent intent) {\n if (i != 69) {\n switch (i) {\n case 908:\n if (i2 == -1) {\n this.mPreStartLiveView.onCameraActivityResult();\n return;\n }\n return;\n case 909:\n if (i2 == -1) {\n this.mPreStartLiveView.onAlbumActivityResult(intent);\n return;\n }\n return;\n default:\n return;\n }\n } else if (i2 == -1) {\n this.mPreStartLiveView.picCompression();\n } else if (i2 == 96) {\n showToast(R.string.fq_pic_cut_fail);\n }\n }",
"private void handleIntent() {\n // Get the intent set on this activity\n Intent intent = getIntent();\n\n // Get the uri from the intent\n Uri uri = intent.getData();\n\n // Do not continue if the uri does not exist\n if (uri == null) {\n return;\n }\n\n // Let the deep linker do its job\n Bundle data = mDeepLinker.buildBundle(uri);\n if (data == null) {\n return;\n }\n\n // See if we have a valid link\n DeepLinker.Link link = DeepLinker.getLinkFromBundle(data);\n if (link == null) {\n return;\n }\n\n // Do something with the link\n switch (link) {\n case HOME:\n break;\n case PROFILE:\n break;\n case PROFILE_OTHER:\n break;\n case SETTINGS:\n break;\n }\n\n String msg;\n long id = DeepLinker.getIdFromBundle(data);\n if (id == 0) {\n msg = String.format(\"Link: %s\", link);\n } else {\n msg = String.format(\"Link: %s, ID: %s\", link, id);\n }\n\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n }",
"@Override\n protected void onPostExecute(RoadInfo input) {\n delegate.processFinish(input);\n activity = null;\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 4 && resultCode == 4) {\n setResult(4);\n finish();\n } else if (requestCode == 4 && resultCode == 3) {\n setResult(3);\n finish();\n }\n }"
] | [
"0.6658306",
"0.65651983",
"0.6562911",
"0.6443295",
"0.6335944",
"0.62670785",
"0.61998355",
"0.61943275",
"0.61054647",
"0.60543954",
"0.60432893",
"0.6038007",
"0.6033878",
"0.60304284",
"0.59563875",
"0.5913686",
"0.58989155",
"0.5883308",
"0.5875774",
"0.5870821",
"0.58641773",
"0.5841364",
"0.5833064",
"0.58280087",
"0.5824984",
"0.5800318",
"0.5800033",
"0.5799524",
"0.57730734",
"0.57709354",
"0.5770799",
"0.57681173",
"0.57622194",
"0.57584345",
"0.5748887",
"0.5748802",
"0.57338566",
"0.57302654",
"0.5723572",
"0.57184076",
"0.57126087",
"0.57028717",
"0.5677781",
"0.56730705",
"0.5670487",
"0.5669593",
"0.566869",
"0.5643154",
"0.5636386",
"0.56348044",
"0.5627494",
"0.5624842",
"0.56244385",
"0.5622838",
"0.56192327",
"0.5608997",
"0.56075853",
"0.5600729",
"0.5600309",
"0.5599062",
"0.55957156",
"0.55915004",
"0.5576071",
"0.55651855",
"0.5560977",
"0.55564153",
"0.5552652",
"0.55492854",
"0.55483186",
"0.5540825",
"0.5538908",
"0.5534995",
"0.5534076",
"0.5528903",
"0.5528049",
"0.5526911",
"0.5519458",
"0.55109537",
"0.5510232",
"0.550901",
"0.55020696",
"0.54936486",
"0.549011",
"0.5485984",
"0.5484997",
"0.54831105",
"0.54780924",
"0.5472826",
"0.5472224",
"0.546434",
"0.546434",
"0.54559094",
"0.5455794",
"0.54550654",
"0.5453749",
"0.5440117",
"0.54338694",
"0.5428657",
"0.5425513",
"0.54187465",
"0.5417973"
] | 0.0 | -1 |
=====================// OPTION MENU METHODS // =====================// | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_detail, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void addMenuOptions();",
"public static void listMenuOptions(){\n\n System.out.println(\"Please choose an option:\");\n System.out.println(\"(1) Add a task.\");\n System.out.println(\"(2) Remove a task.\");\n System.out.println(\"(3) Update a task.\");\n System.out.println(\"(4) List all tasks.\");\n System.out.println(\"(0) Exit\");\n }",
"public static interface Option\r\n \t{public String getName (); //Name of the option that appears in menu.\r\n \tpublic byte getWidth(); //Width of the name.\r\n \tpublic void select ();}",
"private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Intent(this, CoverActivity.class);\t\n \t\t\t\tstartActivity(launchHome);\n \t\t\t}else if(systemAction.equals(\"tts\")){\n \t\t\t\ttextToSearch();\n \t\t\t}else if(systemAction.equals(\"search\")){\n \t\t\t\tshowSearch();\n \t\t\t}else if(systemAction.equals(\"share\")){\n \t\t\t\tshowShare();\n \t\t\t}else if(systemAction.equals(\"map\")){\n \t\t\t\tshowMap();\n \t\t\t}else\n \t\t\t\tLog.e(\"CreateMenus\", \"No se encuentra el el tipo de menu: \" + systemAction);\n \t\t\t\n \t\t}else{\n \t\t\tNextLevel nextLevel = action.getNextLevel();\n \t\t\tshowNextLevel(this, nextLevel);\n \t\t\t\n \t\t}\n \t\t\n \t}",
"private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n System.out.println(\"3 - Detailed information about a company\");\n System.out.println(\"0 - Exit.\");\n\n return getUserOption();\n }",
"private void initOption() {\r\n\t\tthis.option = new JMenu(\"Options\");\r\n\t\tthis.add(option);\r\n\t\tthis.initNewGame();\r\n\t\tthis.initNewServer();\r\n\t\tthis.initNewConnect();\r\n\t\tthis.initExitConnect();\r\n\t\tthis.initExitGame();\r\n\t}",
"public void menuOptions(String type) {\n System.out.println(\"\\n\" + \"To select an option, type what's inside the parenthesis.\");\n System.out.println(\"While in a sub-menu -> (0) Back out of a sub-menu. \\n\");\n System.out.println(\"Main Menu\");\n if (type.equals(\"Attendee\") || type.equals(\"VIP\")) {\n System.out.println(\"(1a) Message, (2a) Contacts, (3a) Signup, (4a) See Attendee Schedule\");\n System.out.println(\"(5a) Get Event Details, (6a) View Conference Schedule, \"+\n \" (p) Export the conference schedule to a PDF\");\n } else if (type.equals(\"Organizer\")) {\n System.out.println(\"(1o) Message, (2o) Contacts, (3o) View Conference Schedule\");\n System.out.println(\"(4o) Modify Events, (5o) Add room, (6o) Create a User account\"+\n \" (p) Export the conference schedule to a PDF\");\n System.out.println(\"(7o) View Current Rooms, (8o) Get Event Details\");\n } else if (type.equals(\"Speaker\")) {\n System.out.println(\"(1s) Message, (2s) Contacts, (3s) See Speaker Schedule\");\n System.out.println(\"(4s) Get Event Details, (5s) View Conference Schedule\"+\n \" (p) Export the conference schedule to a PDF\");\n }\n System.out.println(\"Type Quit to logout\");\n }",
"public void menu()\n {\n System.out.println(\"\\n\\t\\t============================================\");\n System.out.println(\"\\t\\t|| Welcome to the Movie Database ||\");\n System.out.println(\"\\t\\t============================================\");\n System.out.println(\"\\t\\t|| (1) Search Movie ||\");\n System.out.println(\"\\t\\t|| (2) Add Movie ||\");\n System.out.println(\"\\t\\t|| (3) Delete Movie ||\");\n System.out.println(\"\\t\\t|| (4) Display Favourite Movies ||\");\n System.out.println(\"\\t\\t|| (5) Display All Movies ||\");\n System.out.println(\"\\t\\t|| (6) Edit movies' detail ||\");\n System.out.println(\"\\t\\t|| (7) Exit System ||\");\n System.out.println(\"\\t\\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.print( \"\\t\\tPlease insert your option: \");\n }",
"private void printMenu() {\n\t\tSystem.out.println(\"Select an option :\\n----------------\");\n\t\tfor (int i = 0, size = OPTIONS.size(); i < size; i++) {\n\t\t\tSystem.out.println(OPTIONS.get(i));\n\t\t}\n\t}",
"public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}",
"private JMenu optionMenu(final DrawingPanel thePanel) {\r\n final JMenu optionMenu = new JMenu(\"Option\");\r\n optionMenu.setMnemonic(KeyEvent.VK_O);\r\n \r\n final JMenu optionThickness = new JMenu(\"Thickness\");\r\n optionThickness.setMnemonic(KeyEvent.VK_T);\r\n \r\n optionThickness.add(thicknessSlider(thePanel));\r\n optionMenu.add(optionThickness);\r\n \r\n optionMenu.addSeparator(); //add line in the middle\r\n final JMenuItem optionDrawColor = new JMenuItem(DRAW_COLOR);\r\n optionDrawColor.setMnemonic(KeyEvent.VK_D);\r\n optionDrawColor.setIcon(new ColorIcon(UW_PURPLE));\r\n optionDrawColor.addActionListener((theEvent) -> {\r\n final Color drawColor = JColorChooser.showDialog(optionDrawColor, \r\n DRAW_COLOR, \r\n UW_PURPLE);\r\n thePanel.setDrawColor(drawColor);\r\n optionDrawColor.setIcon(new ColorIcon(drawColor));\r\n repaint();\r\n });\r\n optionMenu.add(optionDrawColor);\r\n \r\n \r\n final JMenuItem optionFillColor = new JMenuItem(FILL_COLOR);\r\n optionFillColor.setMnemonic(KeyEvent.VK_F);\r\n optionFillColor.setIcon(new ColorIcon(UW_GOLD));\r\n optionFillColor.addActionListener((theEvent) -> {\r\n final Color fillColor = JColorChooser.showDialog(optionFillColor, \r\n FILL_COLOR, \r\n UW_GOLD);\r\n thePanel.setFillColor(fillColor);\r\n optionFillColor.setIcon(new ColorIcon(fillColor));\r\n repaint();\r\n });\r\n \r\n optionMenu.add(optionFillColor);\r\n optionMenu.addSeparator(); //add line in the middle\r\n final JCheckBox optionFill = new JCheckBox(\"Fill\");\r\n optionFill.addChangeListener(new ChangeListener() {\r\n @Override\r\n public void stateChanged(final ChangeEvent theEvent) {\r\n final boolean isTruelyFilled = optionFill.isSelected(); \r\n thePanel.isFill(isTruelyFilled);\r\n }\r\n });\r\n\r\n optionMenu.add(optionFill);\r\n \r\n return optionMenu;\r\n }",
"@Override\n public String[] getMenuOptions() {\n String[] options = {\"Change your username\", \"Change your password\", \"Change your email\"};\n return options;\n }",
"protected void printMenu() {\n System.out.println(\"\\nChoose an option:\");\n }",
"public void editOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Modify Actors |\");\n System.out.println(\"\\t\\t| [2] Modify Rating |\");\n System.out.println(\"\\t\\t| [3] Modify Actors & Rating |\");\n System.out.println(\"\\t\\t| [4] Back To Menu |\");\n System.out.println(\"\\t\\t===================================\");\n System.out.print(\"\\t\\t Input the option number : \");\n }",
"public String chooseMenu() {\n String input = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n setName(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"name\"));\n setType(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"type\"));\n setMenu_id(Integer.parseInt(input));\n return \"EditMenu\";\n\n }",
"public static void openOptionMenu() {\r\n\t\tif(!STATUS.equals(Gamestatus.STOPPED)) return;\r\n\t\tgui.setMenu(new OptionMenu(), true);\r\n\t}",
"private static void menuSelector(){\r\n\t\tint answer= getNumberAnswer();\r\n\t\tswitch (answer) {\r\n\t\tcase 0:\r\n\t\t\tshowShapeInfo(shapes[0]);\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tcreateShape();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Its Perimeter is equal to: \" +calcShapePerimeter(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Its Area is equal to: \" +calcShapeArea(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Provide integer to use for scaling shape: \");\r\n\t\t\tscaleShape(shapes[0], getNumberAnswer());\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"That's not actually an option.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }",
"public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - Title |\");\n System.out.println(\"\\t\\t| [2] Search by - Directors |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=================================\");\n System.out.print(\"\\t\\t Input the option number : \"); \n }",
"public synchronized StringBuffer Print_Text_OptionSet_Menu(String Text){\n\t\tint i=0;\n\t\tStringBuffer Menu= new StringBuffer(\"\\n\\t\\t\"+Text.toUpperCase(Locale.getDefault())\n +\" OPTIONSET MENU\\n\"\n\t\t\t\t+ \"\\tPLEASE ENTER YOUR CHOICE AS THE INSTRUCTION BELOW:\");\n for (OptionSet Temp : opset) {\n Menu.append(\"\\n\\t\\t-Enter \").append(i+1)\n .append(\" for \").append(Temp.getName()).append(\" .\");\n }\n\t\treturn Menu;\n\t}",
"static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }",
"public OptionsMenu() {\n\t\tsuper(OPTIONS_WINDOW_TITLE);\n\t\tQ = new Quoridor();\n\t\tinitialize();\n\t\tsetVisible(true);\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClickOption();\n\t\t\t\t\n\t\t\t}",
"int promptOption(IMenu menu);",
"public void optionsListMenu(int number) {\n switch (number) {\r\n case 1:\r\n showFilterByMake();\r\n break;\r\n case 2:\r\n showFilterByModel();\r\n break;\r\n case 3:\r\n showFilterByBudget();\r\n break;\r\n case 4:\r\n backToPreviousMenu();\r\n break;\r\n }\r\n }",
"public void branchMenu(int option){\n switch(option){\n case 1:\n System.out.println(\"Starting security view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SECURITY);\n break;\n case 2:\n System.out.println(\"Starting application view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.APPLICATION);\n break;\n case 3:\n System.out.println(\"Starting manager view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.MANAGER);\n break;\n case 4:\n System.out.println(\"Starting swipe view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SWIPE);\n break;\n case 5:\n System.out.println(\"Quitting application...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.QUIT);\n break;\n }\n }",
"public void select() {\n \t\t\tString sinput = \"\";\r\n \t\t\tOption selected = null;\r\n \t\t\tErrorLog.debug(name + \" selected.\");\r\n \t\t\t\r\n \t\t\twhile (true) {\r\n \t\t\t\tSystem.out.println(toString()); //Print menu.\r\n \t\t\t\tsinput = read(); //Get user selection.\r\n \t\t\t\tif (!sinput.equalsIgnoreCase(\"exit\")) {\r\n \t\t\t\t\tselected = options.get(sinput); //Find corresponding option.\r\n \r\n \t\t\t\t\tif (selected != null) //Sinput corresponds to an extant option.\r\n \t\t\t\t\t\tselected.select(); //Select the selected.\r\n \t\t\t\t\telse\r\n \t\t\t\t\t\tprint(sinput + \" is not a valid option\");\r\n \t\t\t\t} else\r\n \t\t\t\t\t{print(\"Returning to previous menu.\"); break;}\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tErrorLog.debug (\"Quitting \" + name + \". Sinput:\"+sinput);\r\n \t\t\t\r\n \t\t\treturn;\r\n \t\t}",
"private void showSpecificOptions (Menu mMenu, LinearLayout llCO) {\n \t\t\n \t\tArrayList<Option> _SpecificOptionList = OptionManager.getSpecificOptionList(mMenu.DB_ID);\n \t\t\n for(int i=0; i<_SpecificOptionList.size(); i++) {\n \t\n \tOption _Option = _SpecificOptionList.get(i);\n \n \tLinearLayout llEachLine = new LinearLayout(this);\n llEachLine.setLayoutParams(new LayoutParams(500,LayoutParams.WRAP_CONTENT));\n llEachLine.setPadding(0, 0, 10, 4);\n llEachLine.setOrientation(LinearLayout.HORIZONTAL);\n llEachLine.setGravity(Gravity.LEFT);\n \n int nCountId = IdManager.getSpecificOptionCountId(i);\n int nDownId = nCountId - 1000;\n int nUpId = nCountId + 1000;\n \n // option name\n \n String strTextTitle = TextFormatter.getText(_Option.NAME_ENG, _Option.NAME_OTH,26);\n \n TextView tvOptionName = new TextView(this);\n tvOptionName.setGravity(Gravity.LEFT|Gravity.CENTER);\n tvOptionName.setText(strTextTitle);\n tvOptionName.setTextSize(14);\n tvOptionName.setTextColor(0xff000000);\n tvOptionName.setHeight(50);\n tvOptionName.setWidth(270);\n \n // option count \n \n TextView tvCount = new TextView(this); \n tvCount.setGravity(Gravity.CENTER);\n tvCount.setId(nCountId);\n tvCount.setText(String.valueOf(\"0\"));\n tvCount.setTextColor(0xff000000);\n tvCount.setWidth(50);\n tvCount.setHeight(30);\n \n ResourceManager.put(nCountId, tvCount);\n ResourceManager.put(tvCount, _Option);\n \n _Option.MENU_RESOURCE_ID = mMenu.RESOURCE_ID;\n \t\n // Button Down\n \n ImageButton btDown = new ImageButton(this);\n btDown.setId(nDownId);\n btDown.setBackgroundDrawable(getResources().getDrawable(R.drawable.down));\n btDown.setLayoutParams(new LayoutParams(60,60));\n btDown.setOnClickListener(new OnClickListener() {\n \t public void onClick(View v) {\n \t \t\n \t \tint nDownId = v.getId();\n \t \tint nCountId = nDownId+1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\n \t \t\n \t\tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t \t\n \t \tif(nCount>0) {\n \t\t\t\tnCount -= 1;\n \t \t\ttvCount.setText(String.valueOf(nCount));\n \t \t\t_Option.ORDER_COUNT = nCount;\n \t \t\tOrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t \t}\n \t }\n });\n \n // Button Up\n \n ImageButton btUp = new ImageButton(this);\n btUp.setId(nUpId);\n btUp.setBackgroundDrawable(getResources().getDrawable(R.drawable.up));\n btUp.setLayoutParams(new LayoutParams(60,60));\n btUp.setOnClickListener(new OnClickListener() {\n \t public void onClick(View v) {\n \t \t\n \t \tint nUpId = v.getId();\n \t \tint nCountId = nUpId - 1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\n \t \t\t\n \t\t\tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t \tnCount += 1;\n \t \t\n \t \ttvCount.setText(String.valueOf(nCount));\n \t\t_Option.ORDER_COUNT = nCount;\n \t\tOrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t }\n });\n \n llEachLine.addView(tvOptionName);\n llEachLine.addView(tvCount);\n llEachLine.addView(btDown);\n llEachLine.addView(btUp);\n \n llCO.addView(llEachLine);\n }\n \t\t\n \t}",
"private void menuSetup()\n {\n menuChoices = new String []\n {\n \"Add a new product\",\n \"Remove a product\",\n \"Rename a product\",\n \"Print all products\",\n \"Deliver a product\",\n \"Sell a product\",\n \"Search for a product\",\n \"Find low-stock products\",\n \"Restock low-stock products\",\n \"Quit the program\" \n };\n }",
"public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investor of the Day\");\n\t\tSystem.out.println(\"[ 0 ] - Exit\");\n\t}",
"static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}",
"private Select getMenu() {\n updateMenu();\n mainMenu.setSelectedItemCode(MENU_STATUS);\n return mainMenu;\n }",
"@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}",
"public void optionsActionPerformed(java.awt.event.ActionEvent evt) throws IOException{ \n options();\n }",
"public void getMenuChoice()\n {\n boolean finished = false;\n \n while(!finished)\n {\n printHeading();\n String choice = Menu.getMenuChoice(menuChoices);\n executeMenuChoice(choice);\n \n if(choice.startsWith(\"quit\"))\n {\n finished = true;\n }\n }\n }",
"public Menu createToolsMenu();",
"public void main_menu()\n\t{\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.println(\"Please Select an option\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.print(\"1.Add 2.Update 3.Delete 4.Exit\\n\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tchoice=me.nextInt();\n\t\tthis.check_choice(choice);\n\t}",
"static void montaMenu() {\n System.out.println(\"\");\r\n System.out.println(\"1 - Novo cliente\");\r\n System.out.println(\"2 - Lista clientes\");\r\n System.out.println(\"3 - Apagar cliente\");\r\n System.out.println(\"0 - Finalizar\");\r\n System.out.println(\"Digite a opcao desejada: \");\r\n System.out.println(\"\");\r\n }",
"private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }",
"public void options() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canViewOptions()) {\n Logger.info(\"HUD Presenter: options\");\n uiStateManager.setState(GameUIState.OPTIONS);\n }\n }",
"private void displayMenuOptions()\n {\n // display user options menu\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n System.out.println(\"COMMAND OPTIONS:\");\n System.out.println(\"\");\n System.out.println(\" 'on' to force power controller to ON state\");\n System.out.println(\" 'off' to force power controller to OFF state\");\n System.out.println(\" 'status' to see current power controller state\");\n System.out.println(\" 'sunrise' to display sunrise time.\");\n System.out.println(\" 'sunset' to display sunset time.\");\n System.out.println(\" 'next' to display next scheduled event.\");\n System.out.println(\" 'time' to display current time.\");\n System.out.println(\" 'coord' to display longitude and latitude.\");\n System.out.println(\" 'help' to display this menu.\");\n System.out.println(\"\");\n System.out.println(\"PRESS 'CTRL-C' TO TERMINATE\");\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n SubMenu sub = menu.addSubMenu(\"Option\");\n sub.setIcon(R.drawable.menu);\n sub.add(0, 1, 0, \"Preschool\").setIcon(R.drawable.preschool);\n sub.add(0, 2, 0, \"Primary\").setIcon(R.drawable.primary);\n sub.add(0, 3, 0, \"Secondary\").setIcon(R.drawable.secondary);\n sub.add(0, 4, 0, \"Young Adults\").setIcon(R.drawable.young_adults);\n sub.add(0, 5, 0, \"Supplementary\").setIcon(R.drawable.supplementary);\n sub.add(0, 6, 0, \"Exams\").setIcon(R.drawable.exams);\n sub.add(0, 7, 0, \"Digital\").setIcon(R.drawable.digital);\n sub.add(0, 8, 0, \"Readers\").setIcon(R.drawable.readers);\n sub.getItem().setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\n return true;\n }",
"public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}",
"public interface MenuOption {\n int menuItemId();\n void menuItemInfo(ConsoleInput cIn, Tracker tracker);\n\n\n}",
"public static int menu()\n {\n \n int choix;\n System.out.println(\"MENU PRINCIPAL\");\n System.out.println(\"--------------\");\n System.out.println(\"1. Operation sur les membres\");\n System.out.println(\"2. Operation sur les taches\");\n System.out.println(\"3. Assignation de tache\");\n System.out.println(\"4. Rechercher les taches assigne a un membre\");\n System.out.println(\"5. Rechercher les taches en fonction de leur status\");\n System.out.println(\"6. Afficher la liste des taches assignees\");\n System.out.println(\"7. Sortir\");\n System.out.println(\"--------------\");\n System.out.print(\"votre choix : \");\n choix = Keyboard.getEntier();\n System.out.println();\n return choix;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.select_items, menu);\n return true;\n }",
"Menu getMenuHelp();",
"private static String getMenu() { // method name changes Get_menu to getMenu()\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"\\nLibrary Main Menu\\n\\n\")\r\n\t\t .append(\" M : add member\\n\")\r\n\t\t .append(\" LM : list members\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" B : add book\\n\")\r\n\t\t .append(\" LB : list books\\n\")\r\n\t\t .append(\" FB : fix books\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" L : take out a loan\\n\")\r\n\t\t .append(\" R : return a loan\\n\")\r\n\t\t .append(\" LL : list loans\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" P : pay fine\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" T : increment date\\n\")\r\n\t\t .append(\" Q : quit\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\"Choice : \");\r\n\t\t \r\n\t\treturn sb.toString();\r\n\t}",
"public String choiceMenu() {\n\t\tSystem.out.println(\"What would you like to do?\");\n\t\tSystem.out.println(\"Move (W/A/S/D)\");\n\t\tSystem.out.println(\"Check Hero Info (I)\");\n\t\tSystem.out.println(\"Check Inventory (E)\");\n\t\tSystem.out.println(\"Check Map (M)\");\n\t\tSystem.out.println(\"End Turn (T)\");\n\t\tSystem.out.println(\"Quit (Q)\");\n\t\t\n\t\tString s = parseString().toUpperCase();\n\t\tboolean isValidString = false;\n\t\twhile(!isValidString) {\n\t\t\tif(s.equals(\"W\") || s.equals(\"A\") || s.equals(\"S\") || s.equals(\"D\") || s.equals(\"I\") \n\t\t\t\t\t|| s.equals(\"E\") || s.equals(\"M\") || s.equals(\"T\") || s.equals(\"Q\")) {\n\t\t\t\tisValidString = true;\t\n\t\t\t} else {\n\t\t\t\tprintErrorParse();\n\t\t\t\ts = parseString().toUpperCase();\n\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn s;\n\t}",
"private void mainMenuDetails() {\n try {\n System.out.println(\"Enter your choice:\");\n final int menuOption = option.nextInt();\n switch (menuOption) {\n case 1:\n showFullMenu();\n break;\n case 2:\n acceptRejectResponse();\n break;\n case 3:\n placeOrder();\n break;\n case 4:\n showFullOrder();\n break;\n case 5:\n Runtime.getRuntime().halt(0);\n default:\n System.out.println(\"Choose either 1 or 2\");\n }\n } catch (final Exception e) {\n e.printStackTrace();\n System.out.println(\"enter a valid value\");\n }\n option.nextLine();\n mainMenu();\n }",
"public static void options(){\n System.out.println(\"Choose from the following options \");\n System.out.println(\"0 Print the options again\");\n System.out.println(\"1 Create Student Records\");\n System.out.println(\"2 Create Teacher Records\");\n System.out.println(\"3 Edit the Records\");\n System.out.println(\"4 Get the Record Count\");\n System.out.println(\"5 Exit\");\n }",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"public void option() {\n ReusableActionsPageObjects.clickOnElement(driver, options, logger, \"user options.\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu2, menu);\n this.menu=menu;\n if(idName!=null) {menu.getItem(1).setVisible(false);\n menu.getItem(2).setVisible(true);}\n if(create) menu.getItem(0).setVisible(false);\n else menu.getItem(0).setVisible(true);\n /* if(extrasBundle!=null) if(extrasBundle.getBoolean(\"From Option\")==true) {\n menu.getItem(1).setVisible(false);\n menu.getItem(0).setVisible(true);\n\n }*/\n return true;\n }",
"public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }",
"private void showMenu() {\n\t Scanner sc = new Scanner(System.in);\n\t Arguments argument = Arguments.INVALID;\n\t System.out.println(\"Enter command of your choice in the correct format\");\n\t do\n\t {\n\t \tString command = sc.nextLine();\n\t \tString[] arguments = command.split(\" +\");\n\t \targument = validateAndReturnType(arguments);\n\t \tswitch(argument) {\n\t\t \tcase INCREASE:\n\t\t \t\tincrease(arguments);\n\t\t \t\tbreak;\n\t\t \tcase REDUCE:\n\t\t \t\treduce(arguments);\n\t\t \t\tbreak;\n\t\t\t\tcase COUNT:\n\t\t\t\t\tcount(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase INRANGE:\n\t\t\t\t\tinRange(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase NEXT:\n\t\t\t\t\tnext(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PREVIOUS:\n\t\t\t\t\tprevious(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUIT:\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\tcase INVALID:\n\t\t\t\t\tSystem.out.println(\"Please enter a valid command\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid command. Enter a command in the correct format\");\n\t \t}\n\t } while(argument != Arguments.QUIT);\n\t}",
"public void mainMenuOption() {\n\t\tScanner keyboard = new Scanner( System.in );\n\t\t\n\t\tfirstMenu();\n\t\t\n\t\tString input = keyboard.nextLine();\n\t\twhile(input != \"0\"){\n\t\t\t\n\t\t\t switch(input){\n\t case \"0\" : System.out.println(\"You close the App\"); \n\t \t\t\tSystem.exit(0);\n\t break;\n\t \n\t case \"1\" : IdentityMenu();\n\t break;\n\t \n\t case \"2\" : AddressMenu();\n\t \tbreak;\n\t \n\t default :\tSystem.out.println(\"Invalid selection\"); \n\t \t\t\tmainMenuOption();\n\t break;\t\n\t \n\t\t\t }\n\t\t break;\n\t\t}\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n menu.add(0, MENU_A, 0, \"Info\");\n menu.add(0, MENU_B, 0, \"Legal Notices\");\n menu.add(0, MENU_c, 0, \"Mode\");\n return true;\n }",
"public void setOptionMenu(int optionMenu) {\r\n\t\tthis.optionMenu = optionMenu;\r\n\t}",
"private void displayOptions() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Main System Menu\");\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"A)dd polling place\");\n\t\tSystem.out.println(\"C)lose the polls\");\n\t\tSystem.out.println(\"R)esults\");\n\t\tSystem.out.println(\"P)er-polling-place results\");\n\t\tSystem.out.println(\"E)liminate lowest candidate\");\n\t\tSystem.out.println(\"?) display this menu of choices again\");\n\t\tSystem.out.println(\"Q)uit\");\n\t\tSystem.out.println();\n\t}",
"private void mainMenu() {\r\n System.out.println(\"Please choose an option: \");\r\n System.out.println(\"1. New Player\");\r\n System.out.println(\"2. New VIP Player\");\r\n System.out.println(\"3. Quit\");\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_select, menu);\n return true;\n }",
"private String optionsManager() {\n\t\tSystem.out.print(\"\\nEntrez votre choix SVP: \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tString option = \"\";\n\t\toption = scan.nextLine();\n\t\t\n\t\tString etatDeHotel = this.isOuvert()? \"L'Hôtel est ouvert ! \" : \"L'Hôtel n'est pas ouvert ! \";\t\t\n\t\tString doitEtreAfficher = option.equalsIgnoreCase(\"A\")? \"\\n\"+etatDeHotel+\"\\n\" \n\t\t\t\t: option.equalsIgnoreCase(\"B\")? \"\\nLe nombre de chambres réservées est: \"+ this.chambresNonVides().size()+\"\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"C\") ? \"\\nLe nombre de chambres vides est: \"+ this.chambresVides().size()+\"\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"D\")? \"\\nLe nombre de la première chambre vide est : \"+this.chambresVides().get(0).getId()+\"\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"E\")? \"\\nLe nombre de la dernière chambre vide est : \"+this.chambresVides().get(this.chambresVides().size()-1).getId()+\"\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"H\")? \"\\n-La commande Q ou Quit sont pour arrêtrer le programe.\\n-Il faut choisir un letter pour les options.\\n-La commande O pour afficher toutes les options possibles! \"\n\t\t\t\t: option.equalsIgnoreCase(\"n\")? \"----------------------------------\\nVous avez été dirigé vers le menu principale\"\n\t\t\t\t: option.equalsIgnoreCase(\"m\")? \"\\n-----------\\nMerci\\n----------------\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"q\")? \"q\"\n\t\t\t\t: option.equalsIgnoreCase(\"quit\")? \"q\"\n\t\t\t\t: option.equalsIgnoreCase(\"o\")? \"o\"\n\t\t\t\t: option.equalsIgnoreCase(\"f\")? \"f\"\n\t\t\t\t: option.equalsIgnoreCase(\"g\")? \"g\"\n\t\t\t\t:\"x\";\n\t\treturn doitEtreAfficher;\n\t}",
"public OptionsMenu() {\n initComponents();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.option, menu);\n return true;\n }",
"public static void menu() {\n\t\tSystem.out.println(\"\\nPlease select which type of argument to generate by entering the associated number.\\n\");\n\t\tfor(int i = 0; i < type.length; i++) {\n\t\t\tSystem.out.println((i+1)+\". \"+type[i]);\n\t\t}\n\t\tSystem.out.println(\"8. Quit\");\n\t}",
"private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }",
"public void run(){\n int selection = -1;\n super.myConsole.listOptions(menuOptions);\n selection = super.myConsole.getInputOption(menuOptions);\n branchMenu(selection);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tmenu.add(group1Id, Edit, Edit, \"Edit\");\n\t\t\tmenu.add(group1Id, Delete, Delete, \"Delete\");\n\t\t\tmenu.add(group1Id, Finish, Finish, \"Finish\");\n\t\t\treturn super.onCreateOptionsMenu(menu); \n\t\t}",
"private static void returnMenu() {\n\t\t\r\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetSupportMenuInflater().inflate(R.menu.activity_display_selected_scripture,\n \t\t\t\tmenu);\n \t\treturn true;\n \t}",
"void askMenu();",
"public static int getMenu() {\n\t\tSystem.out.println(\"Choose Options from menu:\");\n\t\tint option = scanner.nextInt();\n\n\t\treturn option;\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 }",
"@Override\r\n public void actionPerformed(ActionEvent ae) {\r\n String option = ae.getActionCommand();\r\n PracticaProgramacion3Swing.log.append(ae.getActionCommand()+\"\\n\");\r\n switch(option){\r\n \r\n case \"Crear txt\":\r\n \r\n FuncionesMenus.newFile();\r\n FuncionesMenus.listFiles(); \r\n break;\r\n \r\n case \"Crear bin\":\r\n FuncionesMenus.newFileBin();\r\n FuncionesMenus.listFiles(); \r\n break;\r\n \r\n case \"Eliminar txt\":\r\n case \"Eliminar bin\": \r\n FuncionesMenus.delFile();\r\n FuncionesMenus.listFiles();\r\n break;\r\n \r\n case \"Renombrar txt\":\r\n case \"Renombrar bin\":\r\n FuncionesMenus.renameFile();\r\n FuncionesMenus.listFiles();\r\n break;\r\n \r\n case \"Escribir dni\":\r\n FuncionesMenus.writeLine();\r\n FuncionesMenus.listFiles();\r\n break;\r\n case \"Escribir DNI\":\r\n FuncionesMenus.writeLineBin();\r\n FuncionesMenus.listFiles();\r\n \r\n case \"Buscar dni\":\r\n FuncionesMenus.getID();\r\n FuncionesMenus.listFiles();\r\n break;\r\n \r\n case \"Buscar DNI\":\r\n FuncionesMenus.getIDBin();\r\n FuncionesMenus.listFiles();\r\n \r\n case \"Eliminar dni\":\r\n FuncionesMenus.delLine();\r\n FuncionesMenus.listFiles();\r\n break;\r\n case \"Eliminar DNI\":\r\n FuncionesMenus.delLineBin();\r\n FuncionesMenus.listFiles();\r\n break;\r\n case \"Extraer ficheros\": \r\n FuncionesMenus.getFiles();\r\n FuncionesMenus.listFiles();\r\n break;\r\n case \"Almacenar\":\r\n FuncionesMenus.getAll();\r\n FuncionesMenus.listFiles();\r\n break;\r\n \r\n default:\r\n break;\r\n } \r\n }",
"@Override public void doAction(int option)\n {\n switch(option)\n {\n case 1: // create and start a new game\n // display the Game menu\n startNewGame();\n break;\n case 2: // get and start a saved game\n startSavedGame();\n break;\n case 3: // get help menu\n //runs the help menu\n HelpMenuView hmv = new HelpMenuView();\n hmv.displayMenu();\n break;\n case 4: // save game\n displaySaveGameView();\n break;\n case 5:\n System.out.println(\"Thanks for playing ... goodbye.\");\n break; // Fix Invalid Value. \n }\n }",
"public void chooseMenuOption(Number[] options) {\r\n for (int i = 0; i < options.length; i++) {\r\n switch (options[i].intValue()) {\r\n case 0:\r\n //returns the entered from console Number array corresponding to specific input colour\r\n Number[] numbers = chooseParameters(INTEGER_DELIMITERS, View.INPUT_COLOUR, true);\r\n //if there are any values corresponding to the ordinal of Colour enum,\r\n // the predicate chaining is passed to the model\r\n model.setFilterPredicate(s -> findNumberInArray(numbers, s.getColour().ordinal()));\r\n break;\r\n case 1:\r\n numbers = chooseParameters(INTEGER_DELIMITERS, View.MATERIAL_RANGE, true);\r\n model.setFilterPredicate(s -> findNumberInArray(numbers, s.getMaterial().ordinal()));\r\n break;\r\n case 2:\r\n numbers = chooseParameters(INTEGER_DELIMITERS, View.CUT_RANGE, true);\r\n model.setFilterPredicate(s -> findNumberInArray(numbers, s.getCut().ordinal()));\r\n break;\r\n case 3:\r\n numbers = chooseParameters(DOUBLE_DELIMITERS, View.WEIGHT_RANGE, false);\r\n model.setFilterPredicate(s -> findNumberInArray(numbers, s.getWeight()));\r\n break;\r\n case 4:\r\n numbers = chooseParameters(INTEGER_DELIMITERS, View.CLARITY_RANGE, true);\r\n model.setTranspFilterPredicate(s -> findNumberInArray(numbers, s.getClarity()));\r\n break;\r\n case 5:\r\n view.printMessage(View.BREAK);\r\n return;\r\n }\r\n }\r\n model.build();\r\n view.printMessage(View.SELECTED_GEMS + model.getChain() +\r\n View.NECKLACE_WEIGHT + model.calculateWeight() +\r\n View.NECKLACE_PRICE + model.calculatePrice());\r\n model.sortGems();\r\n view.printMessage(View.SORT_ON_PRICE + model.getChain());\r\n\r\n }",
"public ArrayList<String> menuComBox();",
"Menu getMenuEdit();",
"private void displayMenu()\r\n {\r\n System.out.println(\"\\nWelcome to Car Park System\");\r\n System.out.println(\"=============================\");\r\n System.out.println(\"(1)Add a Slot \");\r\n System.out.println(\"(2)Delete a Slot\");\r\n System.out.println(\"(3)List all Slots\");\r\n System.out.println(\"(4)Park a Car\");\r\n System.out.println(\"(5)Find a Car \");\r\n System.out.println(\"(6)Remove a Car\");\r\n System.out.println(\"(7)Exit \");\r\n System.out.println(\"\\nSelect an Option: \");\r\n }",
"private static void MainMenuRec(){\n System.out.println(\"Choose one of the following:\");\n System.out.println(\"-----------------------------\");\n System.out.println(\"1. Book room\");\n System.out.println(\"2. Check-out\");\n System.out.println(\"3. See room list\");\n System.out.println(\"4. Create a new available room\");\n System.out.println(\"5. Delete a room\");\n System.out.println(\"6. Make a room unavailable\");\n System.out.println(\"7. Make a (unavailable) room available\");\n System.out.println(\"8. Back to main menu\");\n System.out.println(\"-----------------------------\");\n }",
"void Menu();",
"public static void courseEditOption(){\n System.out.println(\"Choose 0 to repeat the option List\");\n System.out.println(\"Choose 1 to add new Course to the List\");\n System.out.println(\"Choose 2 to edit the exisiting List\");\n System.out.println(\"Choose 3 to quit editing\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflate = getMenuInflater();\n \tinflate.inflate(R.menu.options, menu);\n \t\n \t\n \treturn true;\n }",
"public void readTheMenu();",
"private void showCommonOptions (Menu mMenu, LinearLayout llCO) {\n \t\t\n for(int i=0; i<OptionManager.getCommonOptionSize(); i++) {\n \t\n \tOption _Option = OptionManager.getCommonOption(i);\n \t\n \tLinearLayout llEachLine = new LinearLayout(this);\n\t\t\tllEachLine.setLayoutParams(new LayoutParams(500,LayoutParams.WRAP_CONTENT));\n\t\t\tllEachLine.setPadding(0, 0, 10, 4);\n\t\t\tllEachLine.setOrientation(LinearLayout.HORIZONTAL);\n\t\t\tllEachLine.setGravity(Gravity.LEFT);\n\t\t\t \n\t\t\tint nCountId = IdManager.getCommonOptionCountId(i);\n\t\t\tint nDownId = nCountId - 1000;\n\t\t\tint nUpId = nCountId + 1000;\n\t\t\t \n\t\t\t// option name\n\t\t\t \n\t\t\tString strTextTitle = TextFormatter.getText(_Option.NAME_ENG, _Option.NAME_OTH,26);\n\t\t\t \n\t\t\tTextView tvOptionName = new TextView(this);\n\t\t\ttvOptionName.setGravity(Gravity.LEFT|Gravity.CENTER);\n\t\t\ttvOptionName.setText(strTextTitle);\n\t\t\ttvOptionName.setTextSize(14);\n\t\t\ttvOptionName.setTextColor(0xff000000);\n\t\t\ttvOptionName.setHeight(50);\n\t\t\ttvOptionName.setWidth(270);\n\t\t\t \n\t\t\t// option count \n\t\t\t \n\t\t\tTextView tvCount = new TextView(this); \n\t\t\ttvCount.setGravity(Gravity.CENTER);\n\t\t\ttvCount.setId(nCountId);\n\t\t\ttvCount.setText(String.valueOf(\"0\"));\n\t\t\ttvCount.setTextColor(0xff000000);\n\t\t\ttvCount.setWidth(50);\n\t\t\ttvCount.setHeight(30);\n\t\t\t \n\t\t\t_Option.MENU_RESOURCE_ID = mMenu.RESOURCE_ID;\n\t\t\t \n\t\t\tResourceManager.put(nCountId, tvCount);\n\t\t\tResourceManager.put(tvCount, _Option);\n\t\t\t \n\t\t\t// Button Down\n\t\t\t \n\t\t\tImageButton btDown = new ImageButton(this);\n\t\t\tbtDown.setId(nDownId);\n\t\t\tbtDown.setBackgroundDrawable(getResources().getDrawable(R.drawable.down));\n\t\t\tbtDown.setLayoutParams(new LayoutParams(Property.POPUP_ARROW_IMG_WIDTH,Property.POPUP_ARROW_IMG_HEIGHT));\n\t\t\tbtDown.setOnClickListener(new OnClickListener() {\n\t\t\t\tpublic void onClick(View v) {\n \t \t\n\t\t\t\t\tint nDownId = v.getId();\n \t \tint nCountId = nDownId+1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\n \t \t\n \t\tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t \t\n \t \tif(nCount>0) {\n \t\t\t\tnCount -= 1;\n \t \ttvCount.setText(String.valueOf(nCount));\n \t \t_Option.ORDER_COUNT = nCount;\n \t OrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t \t}\n \t }\n });\n \n // Button Up\n \n ImageButton btUp = new ImageButton(this);\n btUp.setId(nUpId);\n btUp.setBackgroundDrawable(getResources().getDrawable(R.drawable.up));\n btUp.setLayoutParams(new LayoutParams(Property.POPUP_ARROW_IMG_WIDTH,Property.POPUP_ARROW_IMG_HEIGHT));\n btUp.setOnClickListener(new OnClickListener() {\n \t public void onClick(View v) {\n \t \t\n \t \tint nUpId = v.getId();\n \t \tint nCountId = nUpId - 1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\t\n \t \t\n \t \tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t\t\n \t \tnCount += 1;\n \t \t\n \t \ttvCount.setText(String.valueOf(nCount));\n \t \t_Option.ORDER_COUNT = nCount;\n OrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t }\n });\n \n llEachLine.addView(tvOptionName);\n llEachLine.addView(tvCount);\n llEachLine.addView(btDown);\n llEachLine.addView(btUp);\n \n llCO.addView(llEachLine);\n }\n \t\t\n \t}",
"public String promptMenu() {\n String selection;\n promptMenu: do {\n selection = promptString(\n \"\\n======== FLOORING PROGRAM MAIN MENU ========\\n\" + \n \"DISPLAY - Display Orders\\n\" + \n \"ADD - Add an Order\\n\" + \n \"EDIT - Edit an Order\\n\" + \n \"REMOVE - Remove an Order\\n\" + \n \"EXPORT - Export all data to file\\n\" + \n \"EXIT - Exit\\n\" +\n \"What would you like to do?\"\n );\n \n switch(selection.toLowerCase()) {\n case \"display\":\n case \"add\":\n case \"edit\":\n case \"remove\":\n case \"export\":\n case \"exit\":\n break promptMenu;\n default:\n continue;\n }\n } while(true);\n \n return selection;\n }",
"public void initMenu(){\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_select_difficulty, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu){\n super.onCreateOptionsMenu(menu);\n MenuItem helpButton = menu.findItem(R.id.menu1);\n helpButton.setVisible(true);\n return true;\n }",
"public void setOptions(){\n System.out.println(\"¿Que operacion desea realizar?\");\n System.out.println(\"\");\n System.out.println(\"1- Consultar sus datos\");\n System.out.println(\"2- Ingresar\");\n System.out.println(\"3- Retirar\");\n System.out.println(\"4- Transferencia\");\n System.out.println(\"5- Consultar saldo\");\n System.out.println(\"6- Cerrar\");\n System.out.println(\"\");\n}",
"@Override\r\n \tpublic boolean onPrepareOptionsMenu(Menu menu) {\r\n \t\tmenu.removeGroup(0);\r\n \t\tmenu.removeGroup(1);\r\n \t\tResources res = getResources();\r\n \t\tif(keyValue == 1)\r\n \t\t{\r\n \t\t\tmenu.add(0, R.id.selectAll, 0, res.getString(R.string.select_all))\r\n \t\t\t\t.setIcon(android.R.drawable.checkbox_on_background);\r\n \t\t\tmenu.add(1, R.id.deSelect, 1, res.getString(R.string.deselect_all))\r\n \t\t\t\t.setIcon(android.R.drawable.checkbox_off_background);\r\n \t\t}\r\n \t\treturn true;\r\n \r\n \t}",
"public void mainMenu() throws Exception {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Test Menu Class\");\n\t\tSystem.out.println(\"Created by Connor Goddard\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"** ** ** ** ** ** ** ** **\");\n\t\tSystem.out.println(\"1) Select Option 1\");\n\t\tSystem.out.println(\"2) Select Option 2\");\n\t\tSystem.out.println(\"3) Select Option 3\");\n\t\tSystem.out.println(\"** ** ** ** ** ** ** ** **\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Please select an option: \");\n\t\t\n\t\t// Prompt for a menu option to be inputted from the user\n\t\t// **'.charAt' is used to prevent an IllegalArgumentException being thrown if any other type of input is used\n\t\tchar playerInput = scan.next().charAt(0);\n\t\t\n\t\t// Run the appropiate commands depending on the inputted character from the user\n\t\tmenuSelect(playerInput);\n\t}",
"public abstract void displayMenu();",
"public void setMenu(){\n opciones='.';\n }",
"public AdminMenu(JDealsController sysCtrl) {\n super(\"Select Menu\", sysCtrl);\n\n this.addItem(\"Admin Panel\", new Callable() {\n @Override\n public Boolean call() throws Exception {\n new AdminCommandList(getSysCtrl()).runMenu();\n return true;\n }\n });\n\n this.addItem(\"Default Menu\", new Callable() {\n @Override\n public Boolean call() throws Exception {\n new UserMenu(getSysCtrl()).runMenu();\n return true;\n }\n });\n }",
"public void controllerMenu(){\n\t\tint option=1;\n\t\t\n\t\twhile(option!=0){ \n\t\t\tSystem.out.println(\"You are in the air controller menu\");\n\t\t\tSystem.out.println(\"Write the number corresponding to the action you quant to perform:\");\n\t\t\tSystem.out.println(\"1. Add plane (basic info)\");\n\t\t\tSystem.out.println(\"2. Add detailed information of a plane\");\n\t\t\tSystem.out.println(\"3. Show airspace\");\n\t\t\tSystem.out.println(\"4. Encrypt plane\");\n\t\t\tSystem.out.println(\"5. Decrypt plane\");\n\t\t\tSystem.out.println(\"Press 0 to exit\");\n\t\t\t\n\t\t\toption = entry.nextInt();\n\t\t\t\n\t\t\tswitch(option){\t// switch with a method for each operation\n\t\t\t\tcase 1: \n\t\t\t\t\taddPlane();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: \n\t\t\t\t\tafegirInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: \n\t\t\t\t\tdisplayInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: \n\t\t\t\t\tencrypt();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tdesencriptar();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public int menu(){\n System.out.println(\"Elija una opción:\");\n\t\tSystem.out.println(\"1. Registrar un nuevo carro\");//Le damos todas las opciones disponibles\n\t\tSystem.out.println(\"2. Eliminar un carro del registro\");\n\t\tSystem.out.println(\"3. Mostrar espacios disponibles\");\n System.out.println(\"4. Mostrar el registro completo\");\n System.out.println(\"5. Mostrar las estadisticas del parqueo\");\n System.out.println(\"6. Agregar mas espacios de parqueo\");\n System.out.println(\"7. Salir/n/n\");\n\n boolean paso = false;\n int option = 0;\n while (paso == false){//Aplicamos un metodo para que escriba el \n try {\n String optionString = scan.nextLine();//Recibimos el valor como String para evitar un bug con el metodo nextLine()\n option = Integer.parseInt(optionString);//Lo cambiamos a int\n paso = true;\n } catch (Exception e) {\n System.out.println(\"Ingrese un valor correcto, por favor\");\n }\n }\n return option;//regresamos el valor convertido\n }",
"C getMenu();",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n getMenuInflater().inflate( R.menu.options, menu );\n\n return super.onCreateOptionsMenu(menu);\n }",
"String getOption();"
] | [
"0.7637705",
"0.7249138",
"0.7203889",
"0.7186617",
"0.7053933",
"0.69659114",
"0.69542176",
"0.6915062",
"0.69104075",
"0.68169767",
"0.6796764",
"0.6759304",
"0.67328596",
"0.6730439",
"0.6728144",
"0.67186475",
"0.67175645",
"0.6698988",
"0.6698033",
"0.66617817",
"0.665736",
"0.6605153",
"0.65886295",
"0.65857285",
"0.65847236",
"0.65776837",
"0.65767246",
"0.65757024",
"0.6573823",
"0.6569906",
"0.656599",
"0.6549059",
"0.65488183",
"0.654104",
"0.65356296",
"0.65324926",
"0.6514774",
"0.651177",
"0.65071005",
"0.65055877",
"0.6505063",
"0.64994335",
"0.6481956",
"0.647827",
"0.6463398",
"0.6457451",
"0.645307",
"0.64516085",
"0.6442116",
"0.6429442",
"0.6428988",
"0.64272994",
"0.6422523",
"0.6422008",
"0.64215475",
"0.64113075",
"0.64105827",
"0.63934064",
"0.6391197",
"0.6385611",
"0.6381345",
"0.63752383",
"0.63718885",
"0.63677377",
"0.6362492",
"0.63477415",
"0.6342513",
"0.6338458",
"0.63333476",
"0.6328789",
"0.6327463",
"0.63273376",
"0.63272434",
"0.63262016",
"0.63257676",
"0.63190717",
"0.631381",
"0.63099486",
"0.6298427",
"0.6297765",
"0.6288535",
"0.6284593",
"0.62831783",
"0.6279213",
"0.6278854",
"0.6269865",
"0.6265253",
"0.625956",
"0.62592524",
"0.6247959",
"0.6246536",
"0.62454504",
"0.6245141",
"0.6235687",
"0.6235627",
"0.6228926",
"0.6224639",
"0.6220078",
"0.62184066",
"0.6212292",
"0.62048733"
] | 0.0 | -1 |
Created by Andrey on 4/18/2017. | public interface StatisticView extends LoadingView{
void initActionBar();
void initWidget();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n public void func_104112_b() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\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 public int describeContents() { return 0; }",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tprotected void interr() {\n\t}",
"private void m50366E() {\n }",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\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\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n void init() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void init() {}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n protected void initialize() {\n\n \n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override public int describeContents() { return 0; }",
"@Override\n protected void init() {\n }",
"private void init() {\n\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n protected void getExras() {\n }",
"public void mo4359a() {\n }",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"private void strin() {\n\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\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private MetallicityUtils() {\n\t\t\n\t}",
"public void method_4270() {}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"public void m23075a() {\n }",
"@Override\n public void initialize() { \n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public abstract void mo70713b();",
"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 gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"Consumable() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"private void m50367F() {\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}"
] | [
"0.58504564",
"0.5713158",
"0.56873965",
"0.56544393",
"0.56361383",
"0.557315",
"0.55654705",
"0.5561416",
"0.5561416",
"0.5525161",
"0.5499161",
"0.54846376",
"0.5480092",
"0.5438616",
"0.5435073",
"0.5392929",
"0.5383405",
"0.5380238",
"0.53677344",
"0.53677344",
"0.53677344",
"0.53677344",
"0.53677344",
"0.53607786",
"0.53568363",
"0.53525645",
"0.53501195",
"0.53396726",
"0.5335543",
"0.5335543",
"0.5335543",
"0.5335543",
"0.5335543",
"0.5335543",
"0.5334561",
"0.5331896",
"0.5314798",
"0.5306999",
"0.5306999",
"0.5303018",
"0.52997196",
"0.5294733",
"0.5292388",
"0.5291736",
"0.52899295",
"0.52839774",
"0.5280392",
"0.5258115",
"0.5250948",
"0.5248941",
"0.5247973",
"0.524762",
"0.5226366",
"0.52235574",
"0.5223048",
"0.5223048",
"0.5223048",
"0.5216393",
"0.52135295",
"0.52081376",
"0.52059764",
"0.52059764",
"0.51996195",
"0.51974654",
"0.51967096",
"0.51967096",
"0.51967096",
"0.5191919",
"0.51878685",
"0.5186154",
"0.5182689",
"0.5182689",
"0.5182689",
"0.5177735",
"0.51708794",
"0.51673996",
"0.5166065",
"0.5165196",
"0.516331",
"0.5157872",
"0.5150057",
"0.51455206",
"0.5143336",
"0.5143336",
"0.5143336",
"0.5143336",
"0.5143336",
"0.5143336",
"0.5143336",
"0.51427025",
"0.5131988",
"0.51227987",
"0.51165146",
"0.5115063",
"0.5115063",
"0.51086426",
"0.51086426",
"0.51086426",
"0.510401",
"0.509842",
"0.5090208"
] | 0.0 | -1 |
oveloading perbedaan jumlah parameter | public void jumlah(int a, int b, int c) {
System.out.println("Jumlah 3 angka =" + (a + b + c));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }",
"public Final_parametre() {\r\n\t}",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"id_pelanggan\", id_pelanggan);\n params.put(\"isi_pengaduan\", isi);\n return params;\n }",
"public void param(int direccionValorParam, int numeroParam){\n String valorParam = \"\";\n //traduce casos de direccionamiento indirecto\n direccionValorParam = traduceDirIndirecto(direccionValorParam);\n // obtener la direccion de la variable parametrizada en el procedimiento llamado\n int dirParamRegistro = this.directorioProcedimientos.\n obtenerProcedimientoPorId(this.pilaEras.peek().\n getIdentificadorProcedimiento()).getDireccionParametros().get(numeroParam);\n\n if (ManejadorMemoria.isGlobal(direccionValorParam)){\n // obtener el valor del parametro enviado\n valorParam = this.registroGlobal.getValor(direccionValorParam);\n\n } else if (ManejadorMemoria.isConstante(direccionValorParam)){\n // REVISAR QUE NO SEA UN PARAMETRO POR REFERENCIA\n if (this.directorioProcedimientos.\n obtenerProcedimientoPorId(this.pilaEras.peek().\n getIdentificadorProcedimiento()).getIndicadorPorReferencia().get(numeroParam)){\n // ERROR\n throw new IllegalArgumentException();\n }\n // obtener el valor del parametro enviado\n valorParam = this.directorioProcedimientos.getConstantes().get(direccionValorParam).getValorConstante();\n\n } else { // VARIABLE LOCAL\n // obtener el valor del parametro enviado\n valorParam = this.pilaRegistros.peek().getValor(direccionValorParam);\n }\n // asignar el valor del parametro a su variable correspondiente\n this.pilaEras.peek().guardaValor(dirParamRegistro, valorParam);\n }",
"public void setOrigen(java.lang.String param){\n \n this.localOrigen=param;\n \n\n }",
"public void setBloqueado(java.lang.String param){\n \n this.localBloqueado=param;\n \n\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"nosambungan\", nosambungan);\n return params;\n }",
"private void modifierParametre() {\n if (getSelectedParamatre() == null) return;\n FenetreModifierParametre fenetreModifierParametre = new FenetreModifierParametre(getSelectedParamatre());\n fenetreModifierParametre.showAndWait();\n if (fenetreModifierParametre.getParametre() == null) return;\n Parametre temp = fenetreModifierParametre.getParametre();\n getSelectedParamatre().setNom(temp.getNom());\n getSelectedParamatre().setType(temp.getType());\n parametreListView.refresh();\n }",
"public void remplireListeParam(){\r\n bddParam.add(\"id\");\r\n bddParam.add(\"site\");\r\n bddParam.add(\"smtp_serv\");\r\n bddParam.add(\"smtp_port\");\r\n bddParam.add(\"smtp_user\");\r\n bddParam.add(\"smtp_mail\");\r\n bddParam.add(\"smtp_pass\");\r\n bddParam.add(\"mail_envoie\");\r\n bddParam.add(\"licence\");\r\n bddParam.add(\"pop_up\");\r\n bddParam.add(\"mail_rapport\");\r\n bddParam.add(\"archives\");\r\n bddParam.add(\"mail\");\r\n bddParam.add(\"dbext_adress\");\r\n bddParam.add(\"dbext_port\");\r\n bddParam.add(\"dbext_user\");\r\n bddParam.add(\"dbext_pass\");\r\n bddParam.add(\"dbext_delais\");\r\n bddParam.add(\"dbext_name\");\r\n bddParam.add(\"dbext\");\r\n bddParam.add(\"dbext_purge\");\r\n bddParam.add(\"dbext_perte\");\r\n bddParam.add(\"langue\");\r\n \r\n }",
"public void setPercepcion(double param){\n \n this.localPercepcion=param;\n \n\n }",
"public void setMotivoRechazo(biz.belcorp.www.canonico.ffvv.vender.TMotivoRechazo param){\n \n this.localMotivoRechazo=param;\n \n\n }",
"public void setValues(RutaParams params){\n this.costo = params.costo;\n this.tiempoVuelo = params.tiempoVuelo;\n this.piloto =encriptar(params.piloto);\n }",
"public void setParameters(Map<String, String> param) {\n\n // check the occurrence of required parameters\n if(!(param.containsKey(\"Indri:mu\") && param.containsKey(\"Indri:lambda\"))){\n throw new IllegalArgumentException\n (\"Required parameters for IndriExpansion model were missing from the parameter file.\");\n }\n\n this.mu = Double.parseDouble(param.get(\"Indri:mu\"));\n if(this.mu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:mu\") + \", mu is a real number >= 0\");\n\n this.lambda = Double.parseDouble(param.get(\"Indri:lambda\"));\n if(this.lambda < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:lambda\") + \", lambda is a real number between 0.0 and 1.0\");\n\n if((param.containsKey(\"fb\") && param.get(\"fb\").equals(\"true\"))) {\n this.fb = \"true\";\n\n this.fbDocs = Integer.parseInt(param.get(\"fbDocs\"));\n if (this.fbDocs <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbDocs\") + \", fbDocs is an integer > 0\");\n\n this.fbTerms = Integer.parseInt(param.get(\"fbTerms\"));\n if (this.fbTerms <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbTerms\") + \", fbTerms is an integer > 0\");\n\n this.fbMu = Integer.parseInt(param.get(\"fbMu\"));\n if (this.fbMu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbMu\") + \", fbMu is an integer >= 0\");\n\n this.fbOrigWeight = Double.parseDouble(param.get(\"fbOrigWeight\"));\n if (this.fbOrigWeight < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbOrigWeight\") + \", fbOrigWeight is a real number between 0.0 and 1.0\");\n\n if (param.containsKey(\"fbInitialRankingFile\") && param.get(\"fbInitialRankingFile\") != \"\") {\n this.fbInitialRankingFile = param.get(\"fbInitialRankingFile\");\n try{\n this.initialRanking = readRanking();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n\n if (param.containsKey(\"fbExpansionQueryFile\") && param.get(\"fbExpansionQueryFile\") != \"\")\n this.fbExpansionQueryFile = param.get(\"fbExpansionQueryFile\");\n }\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n // jika id kosong maka simpan, jika id ada nilainya maka update\n params.put(\"nama\", Nama);\n params.put(\"email\", Email);\n params.put(\"keluhan\", Keluhan);\n return params;\n }",
"public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }",
"@Override\n\tpublic void pausaParaComer() {\n\n\t}",
"@Override\n protected Map<String, String> getParams()\n {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"nama_kost\", kostt.getNama_kost());\n params.put(\"emailPemilik\", emailFB);\n params.put(\"tipe_kost\", kostt.getTipe_kost());\n params.put(\"alamat_kost\", kostt.getAlamat_kost());\n params.put(\"luas_kost\", String.valueOf(kostt.getLuas_kost()));\n params.put(\"sisa_kamar\", String.valueOf(kostt.getSisa_kamar()));\n if(cek==1) {\n params.put(\"image\", kostt.getImageUrl());\n System.out.println(\"image adalah \"+kostt.getImageUrl());\n }else {\n params.put(\"image\", \"kosong\");\n }\n\n\n return params;\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n // Adding All values to Params.\n params.put(\"huruf\", huruf);\n params.put(\"derajat_lengan_x\", drajatX);\n params.put(\"derajat lengan_y\", drajatY);\n params.put(\"gambar\", gambar);\n\n return params;\n }",
"@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n params.put(\"id_koperasi\", idKop);\n params.put(\"bidang_usaha\", id_bidangusaha);\n params.put(\"alamat_usaha\", alamat);\n params.put(\"status_usaha\", status);\n params.put(\"omzet\", omzet);\n params.put(\"location\", Loc);\n params.put(\"simp_pokok\", simpananpokok);\n params.put(\"jml_simp_pokok\", jmlsimpananpokok);\n params.put(\"simp_wajib\", simpananwajib);\n params.put(\"jml_simp_wajib\", jmlsimpananwajib);\n params.put(\"shu_tahunan\", shutahunan);\n params.put(\"user_id\", user);\n return params;\n }",
"public void asetaTeksti(){\n }",
"public void setEstado(biz.belcorp.www.canonico.ffvv.vender.TEstadoPedido param){\n \n this.localEstado=param;\n \n\n }",
"private void getParameters(HttpServletRequest request) {\n\t\t// Recoger datos\n\t\tconcepto = request.getParameter(\"concepto\");\n\t\tString importeTexto = request.getParameter(\"importe\");\n\t\ttry {\n\t\t\timporte = Double.parseDouble(importeTexto);\n\n\t\t} catch (NumberFormatException e) {\n\t\t\timporte = (double) 0;\n\t\t}\n\t\tLong idCoche = Long.parseLong(request.getParameter(\"id_coche\"));\n\t\tc = daoCoche.getBYId(idCoche);\n\t\tidAgente = Long.parseLong(request.getParameter(\"id_agente\"));\n\t}",
"public void setMontoSolicitado(double param){\n \n this.localMontoSolicitado=param;\n \n\n }",
"public void setParametr(double p) {\n parametr = p; // додано 26.12.2011\n timeServ = parametr; // 20.11.2012\n\n }",
"public void damePersonaje(String personaje){\n this.personaje=personaje;\n\n\n\n }",
"private void recogerParametros(HttpServletRequest request) {\r\n\t\tif (request.getParameter(\"op\") != null) {\r\n\t\t\top = Integer.parseInt(request.getParameter(\"op\"));\r\n\t\t} else {\r\n\t\t\top = 0;\r\n\t\t}\r\n\t\t\r\n\t\tsearch = (request.getParameter(\"search\") != null) ? request.getParameter(\"search\") : \"\";\r\n\r\n\t\tif (request.getParameter(\"id\") != null) {\r\n\t\t\tid = Integer.parseInt(request.getParameter(\"id\"));\r\n\t\t} else {\r\n\t\t\tid = -1;\r\n\t\t}\r\n\r\n\t\tif (request.getParameter(\"nombre\") != null) {\r\n\t\t\t\r\n\t\t\tnombre = request.getParameter(\"nombre\");\r\n\t\t\tnombre = Utilidades.limpiarEspacios(nombre);\r\n\t\t\tnombre = nombre.substring(0, Math.min(nombre.length(), 44));\r\n\t\t} else {\r\n\t\t\tnombre = \"\";\r\n\t\t}\r\n\r\n\t\tif (request.getParameter(\"precio\") != null) {\r\n\t\t\ttry{\r\n\t\t\t\tprecio = Float.parseFloat(request.getParameter(\"precio\"));\r\n\t\t\t}\r\n\t\t\tcatch( Exception e){\r\n\t\t\t\tprecio=PRECIO_EN_LETRA;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} else {\r\n\t\t\tprecio = 0;\r\n\t\t}\r\n\t\tif(request.getParameter(\"id_usuario\")!=null) {\r\n\t\t\tusuario=daoUsuario.getById(Integer.parseInt(request.getParameter(\"id_usuario\")));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tusuario=new Usuario();\r\n\t\t}\r\n\t\tif(request.getParameter(\"id_usuario_cambio\")!=null) {\r\n\t\t\tusuario=daoUsuario.getById(Integer.parseInt(request.getParameter(\"id_usuario_cambio\")));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tusuario=new Usuario();\r\n\t\t}\r\n\t}",
"private void updateParametre(Parametre p, Composite parent){\r\n\t\ttry {\r\n\t\t\tt_parametre.setNomP(p.getNomP());\r\n\t\t\tt_parametre.setTypeP(p.getTypeP());\r\n\t\t\tt_parametre.setSousTypeP(p.getSousTypeP());\r\n\t\t\tt_parametre.setValeurP(p.getValeurP());\r\n\r\n\t\t} catch (MainApplicationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tMessageBox dialog = new MessageBox(parent.getShell(), SWT.ICON_ERROR | SWT.OK);\r\n\t\t\tdialog.equals(\"\");\r\n\r\n\t\t\tdialog.setText(\"Attention\");\r\n\t\t\tdialog.setMessage(\"Erreur sur le sous type.\");\r\n\r\n\t\t\t// open dialog and await user selection\r\n\t\t\tdialog.open(); \r\n\r\n\t\t}\r\n\t}",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"lapangan\", lapangan);\n params.put(\"jam\", jam);\n params.put(\"durasi\", durasi);\n\n return params;\n }",
"@Override\n public void asignaParametros() {\n paso = request.getParameter(\"pasoSig\")!=null?request.getParameter(\"pasoSig\"):\"0\";\n String paginaSig = \"\";\n HashMap param = new HashMap();\n Documento doc = new Documento();\n switch (Integer.parseInt(paso)){\n case 0:\n //paso inicial: obtener la vista de los parametros\n datos.clear();\n String vista = request.getParameter(\"vista\")!=null?request.getParameter(\"vista\"):\"\";\n String idoperacion = request.getParameter(\"operacion\")!=null?request.getParameter(\"operacion\"):\"\";\n //cargar los parametros al hash de datos\n datos.put(\"idoperacion\", idoperacion);\n sesion.setPaginaSiguiente(vista);\n break;\n case 1: case 6: case 50: case 51: case 52: case 53: case 97: case 98: case 99:\n paginaSig = request.getParameter(\"paginaSig\")!=null?request.getParameter(\"paginaSig\"):\"\";\n sesion.setPaginaSiguiente(paginaSig);\n break;\n case 3: case 5: case 7:\n //editar documento(3) || baja de documentos(5) || activar documento(7)\n doc.setId(Integer.parseInt(request.getParameter(\"idDoc\")));\n datos.put(\"documento\", doc);\n datos.put(\"varios\", request.getParameter(\"varios\"));\n paginaSig = request.getParameter(\"paginaSig\")!=null?request.getParameter(\"paginaSig\"):\"\";\n sesion.setPaginaSiguiente(paginaSig);\n break;\n case 8:\n //imprimir los docs seleccionados\n datos.put(\"reporte\", application.getRealPath(\"WEB-INF/Reportes/Nomina/Personal/documentosemple.jasper\"));\n //parametros\n param = new HashMap();\n param.put(\"LOGO\", application.getRealPath(\"/Imagenes/\"+datos.get(\"logo\").toString()));\n param.put(\"RUTAIMGS\", application.getRealPath(\"/Imagenes/Personal/Documentos\"));\n Empleado empl = (Empleado)datos.get(\"empleado\");\n param.put(\"EMPLEADO\", new Integer(empl.getNumempleado()));\n param.put(\"DOCS\", request.getParameter(\"dato1\"));\n datos.put(\"parametros\", param);\n break;\n }\n datos.put(\"paso\", paso);\n }",
"public void setCodigo(java.lang.String param){\n \n this.localCodigo=param;\n \n\n }",
"private void vorgangParameterUebernehmen(\n String autorEmail,\n Vorgang vorgang,\n String typ,\n Long kategorie,\n String positionWGS84,\n String oviWkt,\n String adresse,\n String beschreibung,\n Boolean fotowunsch,\n String bild,\n Boolean verlaufErgaenzen\n ) throws BackendControllerException {\n\n if (verlaufErgaenzen == null) {\n verlaufErgaenzen = false;\n }\n\n if (typ != null) {\n EnumVorgangTyp evt = EnumVorgangTyp.valueOf(typ);\n if (verlaufErgaenzen && !vorgang.getTyp().equals(evt)) {\n verlaufDao.persist(verlaufDao.addVerlaufToVorgang(vorgang, EnumVerlaufTyp.typ,\n vorgang.getTyp().getText(), evt.getText(), autorEmail));\n }\n vorgang.setTyp(evt);\n if (vorgang.getTyp() == null) {\n throw new BackendControllerException(2, \"[typ] nicht korrekt\", \"Der Typ ist nicht korrekt.\");\n }\n }\n\n if (kategorie != null) {\n Kategorie newKat = kategorieDao.findKategorie(kategorie);\n\n if (verlaufErgaenzen && !vorgang.getKategorie().getId().equals(newKat.getId())) {\n verlaufDao.persist(verlaufDao.addVerlaufToVorgang(vorgang, EnumVerlaufTyp.kategorie,\n vorgang.getKategorie().getParent().getName() + \" / \" + vorgang.getKategorie().getName(),\n newKat.getParent().getName() + \" / \" + newKat.getName(), autorEmail));\n }\n vorgang.setKategorie(newKat);\n if (vorgang.getKategorie() == null\n || vorgang.getKategorie().getParent() == null\n || vorgang.getKategorie().getParent().getTyp() != vorgang.getTyp()) {\n throw new BackendControllerException(4, \"[kategorie] nicht korrekt\", \"Die Kategorie ist nicht gültig.\");\n }\n }\n\n if (positionWGS84 != null) {\n try {\n vorgang.setPositionWGS84(positionWGS84);\n } catch (Exception e) {\n throw new BackendControllerException(12, \"[positionWGS84] nicht korrekt\", \"Die Ortsangabe ist nicht korrekt.\", e);\n }\n }\n\n if (oviWkt != null) {\n try {\n vorgang.setOviWkt(oviWkt);\n } catch (Exception e) {\n throw new BackendControllerException(6, \"[oviWkt] nicht korrekt\", \"Die Ortsangabe ist nicht korrekt.\");\n }\n }\n\n if (vorgang.getOviWkt() == null) {\n throw new BackendControllerException(5, \"[position] nicht korrekt\", \"Keine gültige Ortsangabe.\");\n }\n\n if (!vorgang.getOvi().within(grenzenDao.getStadtgrenze().getGrenze())) {\n throw new BackendControllerException(13, \"[position] außerhalb\", \"Die neue Meldung befindet sich außerhalb des gültigen Bereichs.\");\n }\n\n if (adresse != null) {\n vorgang.setAdresse(adresse);\n } else {\n String neueAdresse = \"nicht zuordenbar\";\n if (oviWkt != null) {\n Point point = pointWktToPoint(oviWkt);\n neueAdresse = geoService.calculateAddress(point);\n } else if (positionWGS84 != null) {\n try {\n Point point = transformPosition(pointWktToPoint(positionWGS84), wgs84Projection, internalProjection);\n neueAdresse = geoService.calculateAddress(point);\n } catch (FactoryException | MismatchedDimensionException | TransformException e) {\n logger.error(e);\n }\n }\n vorgang.setAdresse(neueAdresse);\n }\n\n if (beschreibung != null) {\n if (verlaufErgaenzen && (vorgang.getBeschreibung() == null || !vorgang.getBeschreibung().equals(beschreibung))) {\n verlaufDao.persist(verlaufDao.addVerlaufToVorgang(vorgang, EnumVerlaufTyp.beschreibung, vorgang.getBeschreibung(), beschreibung, autorEmail));\n }\n vorgang.setBeschreibung(beschreibung);\n }\n\n if (fotowunsch != null) {\n if (verlaufErgaenzen && !Objects.equals(vorgang.getFotowunsch(), fotowunsch)) {\n verlaufDao.persist(verlaufDao.addVerlaufToVorgang(vorgang, EnumVerlaufTyp.fotowunsch,\n vorgang.getFotowunsch() ? \"aktiv\" : \"inaktiv\", vorgang.getFotowunsch() ? \"inaktiv\" : \"aktiv\", autorEmail));\n }\n vorgang.setFotowunsch(fotowunsch);\n }\n\n if (bild != null && bild.getBytes().length > 0) {\n vorgangDao.persist(vorgang);\n try {\n imageService.setImageForVorgang(Base64.decode(bild.getBytes()), vorgang);\n vorgang.setFotoFreigabeStatus(EnumFreigabeStatus.intern);\n vorgang.setFotowunsch(false);\n } catch (Exception e) {\n throw new BackendControllerException(11, \"[bild] nicht korrekt\", \"Das Bild ist fehlerhaft und kann nicht verarbeitet werden.\", e);\n }\n }\n }",
"public void loadDataProduk(){\n kode_barang = txtKodeBarang.getText();\n nama_barang = txtNamaBarang.getText();\n merk_barang = txtMerkBarang.getText();\n jumlah_stok = Integer.parseInt(txtJumlahStok.getText());\n harga = Integer.parseInt(txtHarga.getText());\n \n }",
"public void Metodo1(String valor1){\r\n\r\n }",
"public void caricaPartita(String partita) {\n\r\n }",
"private void addParameter(int param) {\r\n command_parameters.addInt(param);\r\n }",
"private Map<String,Object> getParams(String nombre , int id){\n\t\t\tMap <String,Object> mapa;\n\t\t\tmapa = new HashMap<String,Object>();\n\t\t\t//Pasar parametros en de JasperReport\n\t\t\tmapa.put(\"alumnoNombre\", nombre);\n\t\t\tmapa.put(\"alumnoId\", id);\n\t\t\t\n\t\t\treturn mapa;\n\t\t\t\n\t\t}",
"public void setMontoDescuento(double param){\n \n this.localMontoDescuento=param;\n \n\n }",
"void setParameters() {\n\t\t\n\t}",
"private void cargarFichaLepra_inicio() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_INICIO_TRATAMIENTO_LEPRA,\r\n\t\t\t\tIRutas_historia.LABEL_INICIO_TRATAMIENTO_LEPRA, parametros);\r\n\t}",
"public void setLocacion(String locacion);",
"private void loadParameters(ParameterDatabase parameterDB) {\n // global - enterprise\n// global.SetInitialNumberOfHouseholds(returnIntParameter(parameterDB, \"InitialNumberOfHouseholds\",\n// global.getInitialNumberOfHouseholds()));\n// \n global.setInitialRefugeeNumber(returnIntParameter(parameterDB, \"initialRefugeeNumber\",\n global.getInitialRefugeeNumber()));\n global.setMaximumNumberRelative(returnIntParameter(parameterDB, \"MaximumNumberRelative\",\n global.getMaximumNumberRelative()));\n global.setPercentageOfAsymptomatic(returnDoubleParameter(parameterDB, \"PercentageOfAsymptomatic\",\n global.getPercentageOfAsymptomatic()));\n global.setProbRecoveryToSuscebtable(returnDoubleParameter(parameterDB, \"recovery_To_Susceb_Rate\",\n global.getProbRecoveryToSuscebtable()));\n global.setHealthDepreciation(returnDoubleParameter(parameterDB, \"healthDepreciation\",\n global.getHealthDepreciation()));\n global.setprobabilityOfEffectiveNessofmedicine(returnDoubleParameter(parameterDB, \"probabilityOfEffectiveNessofmedicine\",\n global.getprobabilityOfEffectiveNessofmedicine()));\n global.setWaterContaminationThreshold(returnDoubleParameter(parameterDB, \"WaterContaminationThreshold\",\n global.getWaterContaminationThreshold()));\n global.setvibrioCholeraePerHealthyPerson(returnDoubleParameter(parameterDB, \"vibrioCholeraePerHealthyPerson\",\n global.getvibrioCholeraePerHealthyPerson()));\n global.setvibrioCholeraePerExposedPerson(returnDoubleParameter(parameterDB, \"vibrioCholeraePerExposedPerson\",\n global.getvibrioCholeraePerExposedPerson()));\n global.setvibrioCholeraePerInfectedPerson(returnDoubleParameter(parameterDB, \"vibrioCholeraePerInfectedPerson\",\n global.getvibrioCholeraePerInfectedPerson()));\n global.setcholeraInfectionDurationMAX(returnIntParameter(parameterDB, \"choleraInfectionDurationMAX\",\n global.getcholeraInfectionDurationMAX()));\n global.setcholeraInfectionDurationMIN(returnIntParameter(parameterDB, \"choleraInfectionDurationMIN\",\n global.getcholeraInfectionDurationMIN())); \n global.setMaxDistanceLaterine(returnIntParameter(parameterDB, \"MaxDistanceLaterine\",\n global.getMaxDistanceLaterine()));\n global.setBacteriaErosionRate(returnDoubleParameter(parameterDB, \"bacteriaErosionRate\",\n global.getBacteriaErosionRate()));\n global.setBoreHoleDischareRatePerMinute(returnDoubleParameter(parameterDB, \"boreHoleDischareRate\",\n global.getBoreHoleDischareRatePerMinute()));\n global.setBoreholeWaterSupplyPerDay(returnDoubleParameter(parameterDB, \"waterCapacityBorehole\",\n global.getBoreholeWaterSupplyPerDay()));\n global.setHeaalthFacilityCapacity(returnIntParameter(parameterDB, \"healthFacilityCapacity\",\n global.getHeaalthFacilityCapacity()));\n global.setMaximumCrowedLevel(returnDoubleParameter(parameterDB, \"CROWED_LEVEL_THRESHOLD\",\n global.getMaximumCrowedLevel()));\n global.setProbabilityGuestContaminationRate(returnDoubleParameter(parameterDB, \"probabilityGuestContaminationRate\",\n global.getProbabilityGuestContaminationRate()));\n global.setMaximumHHOccumpancyPerField(returnIntParameter(parameterDB, \"maximum_occupancy_Threshold\",\n global.getMaximumHHOccumpancyPerField()));\n global.setMaximumWaterRequirement(returnDoubleParameter(parameterDB, \"Maximum_Water_Requirement\",\n global.getMaximumWaterRequirement()));\n global.setMinimumWaterRequirement(returnDoubleParameter(parameterDB, \"Minimum_Water_Requirement\",\n global.getMinimumWaterRequirement()));\n global.setLaterineCoverage(returnDoubleParameter(parameterDB, \"laterineCoverage\",\n global.getLaterineCoverage()));\n global.setRainfallDuration_Minute(returnIntParameter(parameterDB, \"rainDuration\",\n global.getRainfallDuration_Minute()));\n global.setRainfallFirstDay(returnIntParameter(parameterDB, \"firstRainfallDay\",\n global.getRainfallFirstDay()));\n global.setRainfallFrequencyInterval_Days(returnIntParameter(parameterDB, \"rainfallFrequency\",\n global.getRainfallFrequencyInterval_Days()));\n global.setRainfall_MM_Per_Minute(returnDoubleParameter(parameterDB, \"rainfallInMM\",\n global.getRainfall_MM_Per_Minute()));\n global.setAbsorbtionRatePerMinute(returnDoubleParameter(parameterDB, \"absorbtionRatePerMinute\",\n global.getAbsorbtionRatePerMinute()));\n \n \n \n }",
"public void updateEditParameter(){\r\n \tMap<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();\r\n\t\tint paramId = Integer.parseInt(params.get(\"parameterId\"));\r\n\t\tthis.getLog().info(\"parameterId:\" + paramId);\r\n\t\t\r\n\t\tif(paramId == 0){\r\n\t\t\teditParameter = new AdditionalParametersDTO();\r\n\t\t}else{\r\n\t\t\tfor (AdditionalParametersDTO p : this.getParameterList()) {\r\n\t\t\t\tif(p.getId() == paramId){\r\n\t\t\t\t\teditParameter = p;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}",
"private void cargarFichaLepra_control() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\r\n\t\tficha_inicio_lepraService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean ficha_inicio = ficha_inicio_lepraService\r\n\t\t\t\t.existe_paciente_lepra(parameters);\r\n\t\t// log.info(\"ficha_inicio>>>>\" + ficha_inicio);\r\n\r\n\t\tif (ficha_inicio) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}",
"public void notificaAlgiocatore(int azione, Giocatore g) {\n\r\n }",
"public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tif (e.getActionCommand().equals(\"Fen_Param\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_Param();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}",
"public void MieiOrdini()\r\n {\r\n getOrdini();\r\n\r\n }",
"private static void variosParametros(String nombre, int ... numeros){\n System.out.println(\"nombre = \" + nombre);\n imprimirNumeros(numeros);\n }",
"public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tif (e.getActionCommand().equals(\"Parametres\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_Param();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"public void atakuj() {\n\n System.out.println(\"to metoda atakuj z klasy Potwor \");\n\n }",
"public final void nonRedefinissableParEnfant(){\n\n }",
"private void ajouterParametre() {\n FenetreAjouterParametre fenetreAjouterParametre = new FenetreAjouterParametre();\n fenetreAjouterParametre.showAndWait();\n if (fenetreAjouterParametre.getParametre() == null) return;\n parametreListView.getItems().add(fenetreAjouterParametre.getParametre());\n }",
"public void setBunga(int tipeBunga){\n }",
"public void datos_elegidos(){\n\n\n }",
"public Pengenalan(){ //Constructor (Nama harus sama dengan Class)\n System.out.println(\"\\nConstructor : \");\n System.out.println(\"Dibutuhkan untuk pemanggilan saat diimport oleh Class lain atau Class sendiri\");\n methode();\n int men = menthos();\n System.out.println(\"Nilai yang didapat dari method menthos : \"+men);\n }",
"void tampilKarakterA();",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"pasien\", pasien);\n\n return params;\n }",
"public void tutki(Suunta suunta);",
"public void validerSaisie();",
"@Override\r\n public void setParameter(String parameters) {\r\n // dummy\r\n }",
"public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }",
"public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }",
"public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }",
"public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }",
"public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }",
"public void nombreParking (String queNombreParking) {\n nombreParking = queNombreParking;\n\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"title\", name);\n params.put(\"ean\", ean);\n params.put(\"supplier\", supplier);\n params.put(\"offer\", offer);\n params.put(\"price\", price);\n\n return params;\n }",
"public void trenneVerbindung();",
"public ifrmParametros(EntityManagerFactory factory,frmMain frm,BglTbUsuario user) {\n initComponents();\n PropertyConfigurator.configure(\"log4j.properties\");\n this.factory=factory;\n this.main=frm;\n this.usuario=user;\n \n llenarDatos();\n \n }",
"@Override \n\t\tprotected int getNumParam() {\n\t\t\treturn 1;\n\t\t}",
"public void faites(Langage param) {\n if (param.equals(Langage.JAVA)) {\n System.out.println(\"Faites à la façon n°1\");\n } else {\n System.out.println(\"Faites à la façon n°2\");\n }\n }",
"public void limpiarListaParametro() throws Exception;",
"Parameter getParameter();",
"@Override\n\tprotected void initParams() {\n\t\t\n\t}",
"public static void setParameters (\n String pstrAboutMeerkat \n ) {\n strAboutMeerkat = pstrAboutMeerkat ; \n }",
"public void editPAParameters() {\r\n \t\tdialogFactory.getDialog(new ParametricAnalysisPanel(model, model, model, this), \"Define What-if analysis parameters\");\r\n \t}",
"public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}",
"Karyawan(String n)\n {\n this.nama = n;\n }",
"public void setPrecioc(int p){\n this.precioc=p;\n \n }",
"public Tipo visitParameter(DECAFParser.ParameterContext ctx){\r\n\t\tVarDec var =new VarDec(ctx.ID().getText(),tablaSimbolos.searchTipo(ctx.parameterType().getText()),0,position);\r\n\t\tfirmaA.addParam(var);\r\n\t\taddComment(\"paramname: \"+var.getNombre()+\"-position: \"+position);\r\n\t\tposition+=var.getByteSize();\r\n\t\treturn tablaSimbolos.correct();\r\n\t}",
"public void setPedidoDetalle(biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[] param){\n \n validatePedidoDetalle(param);\n\n \n this.localPedidoDetalle=param;\n }",
"public void klikkaa(Tavarat tavarat, Klikattava klikattava);",
"@Override\r\n public void load() throws ParamContextException {\n\r\n }",
"public void setMontoEstimado(double param){\n \n this.localMontoEstimado=param;\n \n\n }",
"public String param(String id) {\n if (online) return super.param(id);\n else return (String)params.get(id);\n}",
"@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n params.put(\"Ubicacion\",\"Nuevo\");\n params.put(\"Latitud\", String.valueOf(lat) );\n params.put(\"Longitud\", String.valueOf(lon));\n return params;\n }",
"public void setMontoPedidoRechazado(double param){\n \n this.localMontoPedidoRechazado=param;\n \n\n }",
"public void setMontoCatalogoEstimado(double param){\n \n this.localMontoCatalogoEstimado=param;\n \n\n }",
"public static void MostrarPerroSegunCodigo( Perro BaseDeDatosPerros[]){\n int codigo;\r\n System.out.println(\"Ingrese el codigo del perro del cual decea saber la informacion\");\r\n codigo=TecladoIn.readLineInt();\r\n System.out.println(\"____________________________________________\");\r\n System.out.println(\"El nombre del Dueño es: \"+BaseDeDatosPerros[codigo].getNombreDuenio());\r\n System.out.println(\"El telefono del Dueño es :\"+BaseDeDatosPerros[codigo].getTelefonoDuenio());\r\n System.out.println(\"____________________________________________\");\r\n \r\n }",
"private void cargarFichaLepra_convivientes() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_CONTROL_CONVIVIENTES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_CONTROL_CONVIVIENTES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}",
"@Override\n protected Map<String, String> getParams() {\n int noofstudent = 2*Integer.parseInt(noofconflicts);\n String checkconflicts = \"jbscjas\";//send anything part\n String uid = AppController.getString(WingForm.this,\"Student_id\");\n Map<String, String> params = new LinkedHashMap<String, String>();\n //using LinkedHashmap because backend does not check key value and sees order of variables\n params.put(\"checkconflicts\", checkconflicts);\n params.put(\"noofstudent\", String.valueOf(noofstudent));\n for(int m=0;m<noofstudent;m++){\n params.put(\"sid[\"+m+\"]\",sid[m]);\n }\n\n\n return params;\n }",
"public void setParam(String chave, Object valor) {\n //se contem a chave, entao eh removido e adicionado novamente\n if (paramSis.containsKey(chave)) {\n paramSis.remove(chave);\n paramSis.put(chave, valor);\n } else {\n //senao o valor eh adicionado\n paramSis.put(chave, valor);\n }\n }",
"private void setOtherParam(Settings set) {\n URL_SQL_RU = set.getValue(\"app.urlSqlRu\");\n NAME_DATA_BASE = set.getValue(\"app.nameDataBase\");\n DAT_NAME = set.getValue(\"app.datName\");\n VACANCY = set.getValue(\"app.vacancy\");\n TABLE_NAME = set.getValue(\"app.tableName\");\n ZERO = Integer.parseInt(set.getValue(\"app.zero\"));\n SKIP_ROW = Integer.parseInt(set.getValue(\"app.skipRow\"));\n CLASS = set.getValue(\"app.class\");\n POSTS_LIST_TOPIC = set.getValue(\"app.postsListTopic\");\n LAST_YEAR = set.getValue(\"app.lastYear\");\n }",
"@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n // Adding All values to Params.\n params.put(\"ubaid\", globalVar.getUbaid());\n\n return params;\n }",
"public String getParameter(String name) throws IllegalArgumentException {\n\t if ( LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"getParameter() \" \n\t\t+ name);\n Via via=(Via)sipHeader;\n \n if (name == null) throw new\n IllegalArgumentException(\"JAIN-EXCEPTION: null argument\");\n return via.getParameter(name);\n }",
"@Override\n\t\tpublic void load_param() {\n\t\t\tthrow new SnowflakeException(\"unsupported\");\n\n\t\t}",
"public ParametroPorParametroPK(Integer idpadre, Integer idhijo) {\r\n\t\tparametroIdParametroPadre = idpadre;\r\n\t\tparametroIdParametroHijo = idhijo;\r\n\t}",
"public void setFlete(double param){\n \n this.localFlete=param;\n \n\n }",
"public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public void Tarifa(String tipoTarifa){\n Tarifa = tipoTarifa;\n Regular = \"R\";\n Comercial = \"C\";\n\n }"
] | [
"0.6887128",
"0.6697759",
"0.6544885",
"0.6512187",
"0.6462853",
"0.63540554",
"0.6326118",
"0.631499",
"0.6288846",
"0.62733036",
"0.6179619",
"0.6143887",
"0.60778916",
"0.6076095",
"0.6036468",
"0.6023206",
"0.60179794",
"0.5995171",
"0.5985785",
"0.5981837",
"0.59622246",
"0.593309",
"0.5908326",
"0.58910406",
"0.58908343",
"0.5875038",
"0.58573985",
"0.5835158",
"0.58306926",
"0.5826804",
"0.5822644",
"0.58089656",
"0.57913876",
"0.57908934",
"0.5788935",
"0.5778865",
"0.5763914",
"0.57633626",
"0.5763286",
"0.5748467",
"0.5743054",
"0.5733597",
"0.5723198",
"0.5722746",
"0.5714033",
"0.5708827",
"0.5705023",
"0.5702071",
"0.5697933",
"0.56967777",
"0.5694025",
"0.568878",
"0.5677257",
"0.56727785",
"0.566374",
"0.5653554",
"0.5653503",
"0.56462127",
"0.56424606",
"0.5641435",
"0.56205845",
"0.56205845",
"0.56205845",
"0.56205845",
"0.5618464",
"0.56181663",
"0.5614823",
"0.56124496",
"0.5603768",
"0.55994254",
"0.55953395",
"0.5592359",
"0.55887604",
"0.55852634",
"0.5584552",
"0.5583326",
"0.5580926",
"0.55617297",
"0.55589044",
"0.5549999",
"0.5544704",
"0.5539974",
"0.5538832",
"0.55344474",
"0.5533855",
"0.5532256",
"0.5529287",
"0.552798",
"0.55211794",
"0.55189794",
"0.55171686",
"0.5512734",
"0.55117816",
"0.550403",
"0.5502612",
"0.54990697",
"0.5497076",
"0.5495453",
"0.5495148",
"0.54931474",
"0.5490719"
] | 0.0 | -1 |
overloading perbedaan tipe data parameter | public void jumlah(double a, int b) {
System.out.println("Jumlah 2 angka (double+int) = " + (a + b));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void getData(int a, int b) {\n\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\tpublic void getData() {\n\t\t\n\t}",
"public abstract void param(byte[] data,SplitDetails name, SplitDetails value) throws ParseException;",
"public abstract Object getData();",
"@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}",
"public void parseParameter(byte[] data)\n {\n return; \n }",
"@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }",
"public int getDataParam() {\n return dataParam;\n }",
"public Final_parametre() {\r\n\t}",
"public void setData(T data){\n this.data = data;\n }",
"T getData();",
"@Override\n\tpublic void pausaParaComer() {\n\n\t}",
"Object getData();",
"Object getData();",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"id_pelanggan\", id_pelanggan);\n params.put(\"isi_pengaduan\", isi);\n return params;\n }",
"public abstract void setCustomData(Object data);",
"protected abstract Object[] getData();",
"public ChangeData()\r\n\t\t{\r\n\t\t}",
"@Override\n\tpublic void setData() {\n\n\t}",
"public void setData(Object o){}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"void setData(T data) {\n\t\tthis.data = data;\n\t}",
"public ahb(ahd paramahd)\r\n/* 12: */ {\r\n/* 13: 36 */ this.d = paramahd;\r\n/* 14: */ }",
"@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}",
"@Override\n\tprotected void getDataFromUCF() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"public void readParameters()\n {\n readParameters(getData());\n }",
"public void Metodo1(String valor1){\r\n\r\n }",
"@Override\n\tpublic void initData() {\n\n\n\n\t}",
"public void setdat()\n {\n }",
"@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }",
"@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }",
"@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }",
"@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n\n return params;\n }",
"private void setData() {\n\n }",
"public perro(String data, int animo_in, jefe jefe_in, juguete fun) {\n nombre = data;\n animo = animo_in;\n jefe_name = jefe_in.getNombre();\n funny = fun;\n }",
"private PassedData(Parcel p) {\n this.a = p.readInt();\n this.b = p.readLong();\n this.c = p.readString();\n }",
"public Object getData();",
"DataParamNode DataParamNode(Token t, String text);",
"public abstract Object getCustomData();",
"@Override\r\n\t\t\tpublic ObservableValue<String> call(CellDataFeatures<Teilnehmer, String> param) {\n\t\t\t\tTeilnehmer t = param.getValue();\r\n\t\t\t\tString ausb = \"\";\r\n\t\t\t\tfor(Teilnehmer_Ausbildung a : t.getTeilnehmerAusbildungs())\r\n\t\t\t\t{\r\n\t\t\t\t\tausb += a.getAusbildung().getAusbildungsBezeichnung();\r\n\t\t\t\t}\r\n\t\t\t System.out.println(param.getValue());\r\n\t\t\t\treturn new SimpleStringProperty(ausb);\r\n\t\t\t}",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public interface ICommonAction {\n\n void obtainData(Object data, String methodIndex, int status,Map<String, String> parameterMap);\n\n\n}",
"@Override \n\t\tprotected int getNumParam() {\n\t\t\treturn 1;\n\t\t}",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n // Adding All values to Params.\n params.put(\"huruf\", huruf);\n params.put(\"derajat_lengan_x\", drajatX);\n params.put(\"derajat lengan_y\", drajatY);\n params.put(\"gambar\", gambar);\n\n return params;\n }",
"private ProcessedDynamicData( ) {\r\n super();\r\n }",
"private Noder(E data) {\n this.data = data;\n }",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n protected void initData() {\n }",
"@Override\n protected void initData() {\n }",
"private void remplirPrestaraireData() {\n\t}",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FArgument src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}",
"@Override\n public String getData() {\n return \"T \" + super.getData();\n }",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerationType src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"title\", name);\n params.put(\"ean\", ean);\n params.put(\"supplier\", supplier);\n params.put(\"offer\", offer);\n params.put(\"price\", price);\n\n return params;\n }",
"@Override\n\tprotected void initParams() {\n\t\t\n\t}",
"private void updateData(Multa ant, Multa multa) {\n\t}",
"void setData(Object data);",
"@Override\n\tpublic void initData() {\n\t\t\n\t}",
"@Override\n\tpublic FareDetailParam getData() {\n\t\tFareDetailParam fd = new FareDetailParam();\n\t\tfd.setFylx(fylx.getFieldValue());\n\t\tfd.setFylxLike(fylx.getFieldText());\n\t\tfd.setJe(je.getFieldValue());\n\t\t\n\t\treturn fd;\n\t}",
"void setData (Object data);",
"protected @Override\r\n abstract void initData();",
"abstract int estimationParameter1();",
"public interface IDataIslem {\n <T> void addOrUpdate(T data, String serviceUrl,\n EnumUtil.SendingDataType dataType, Context ctx);\n\n <T> List<T> get(String serviceUrl, Class clazz, Context ctx);\n\n <T> void updateDeleteCreateProcess(EnumUtil.SendingDataType sendingDataType, String message, Context context,\n T data, String serviceUrl);\n}",
"protected abstract void retrievedata();",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"nosambungan\", nosambungan);\n return params;\n }",
"@Override\n\tpublic void processData() {\n\t\t\n\t}",
"public Data2 getData(){\n System.out.println(popSizeTextField.getText() +\n \" \" + sampleSizeTextField.getText() + \" \" + dataTypeCombo.getSelectedIndex());\n int popsize = Integer.parseInt(popSizeTextField.getText());\n int dataType = dataTypeCombo.getSelectedIndex();\n int sampleSize;\n if(sampleSizeTextField.getText().length() == 0){\n double dPopsize = popsize, percentage = .20,dSampleSize;\n dSampleSize = dPopsize * percentage + (((dPopsize * percentage)% 1 == 0) ? 0 : 1);\n sampleSize = (int) dSampleSize;\n }else{\n sampleSize = Integer.parseInt(sampleSizeTextField.getText());\n }\n System.out.println(\"Sample size is \"+ sampleSize);\n Data2 initParam = new Data2(type, popsize,sampleSize ,dataType);\n return initParam;\n }",
"public String overloadingMeth(int angka) { //contoh dari overloading method\n int x;\n x = angka % 10;\n valueword = \"\";\n if (angka == 0) {\n valueword = \"Nol\";\n\n } else if (angka == 100) {\n valueword = \"Seratus\";\n } else if (x == 0) {\n valueword += normalword[angka / 10] + \" Puluh\";\n\n } else if (angka < 12) {\n valueword += normalword[angka];\n } else if (angka < 20) {\n\n valueword += normalword[angka - 10] + \" Belas\";\n } else if (angka < 100) {\n valueword += normalword[angka / 10] + \" Puluh \" + normalword[angka % 10];\n } else if (angka > 100) {\n System.out.println(\"MASUKAN ERROR,ANGKA TIDAK BOLEH LEBIH DARI 100\");\n }\n return valueword;\n }",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerator src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"@Override\r\n\tpublic void initData() {\n\t}",
"@Override\n\t\t\t\t\t\t\tpublic void updata(Object allData) {\n\t\t\t\t\t\t\t\tif (allData!=null && allData instanceof PhotoGraType ) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tPhotoGraType bean=(PhotoGraType) allData;\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\tPhotoType type=bean.new PhotoType();\n\t\t\t\t\t\t\t\t\ttype.setId(\"0\");\n\t\t\t\t\t\t\t\t\ttype.setName(\"全部分类\");\n\t\t\t\t\t\t\t\t\tbean.getList().add(0, type);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tinitDengjiData(bean.getList());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}else if (allData ==null) {\n\t\t\t\t\t\t\t\t\tToast.makeText(getActivity(), \"网络不给力\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}",
"void setParameterData(String param_state, String param_name)\n {\n this.paramState = param_state;\n this.paramName = param_name;\n }",
"public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic <T> EktParam creatParam(T t) {\n\t\todo = (ODO) t;\r\n\t\todo.setEktSql(null);\r\n\t\tif (EKTIO.getInstance().ektSwitch()) {\r\n\t\t\t\r\n\t\t\tReg reg = ektParam.getReg();\r\n\t\t\tPat pat = ektParam.getPat();\r\n\t\t\t\r\n\t\t\tTParm orderOldParm = ektParam.getOrderOldParm();\r\n\t\t\tTParm orderParm = ektParam.getOrderParm();\r\n\r\n\t\t\tif (odo == null) {\r\n\t\t\t\todoMainControl.messageBox(\"E0115\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tektParam.setOpType(\"\");\r\n\t\t\t\r\n\t\t\tTParm unParm = new TParm();\r\n\t\t\tif (orderOldParm == null) {\r\n\t\t\t\todoMainControl.messageBox(\"没有需要操作的医嘱\");\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}\r\n\t\t\tif(orderParm.getValue(\"OP_FLG\").length()>0 && orderParm.getInt(\"OP_FLG\")==5){\r\n\t\t\t\todoMainControl.messageBox(\"没有需要操作的医嘱\");\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tTParm updateParm=orderParm.getParm(\"updateParm\");\r\n\t\t\t//TODO\r\n\t\t\tboolean unFlg = odoMainControl.updateOrderParm(updateParm, orderOldParm, unParm);\r\n\t\t\tTParm parm = new TParm();\r\n\t\t\t isDelOrder = false;// 执行删除医嘱\r\n\t\t\t//boolean exeDelOrder = false;// 执行删除医嘱\r\n\t\t\tString delFlg=orderParm.getValue(\"DEL_FLG\");\r\n\t\t\t// 如果出现所有医嘱删除也会出现IS_NEW = false 状态 所有需要在执行方法时先查询当前所有医嘱\r\n\t\t\t// 校验是否发送删除检验检查接口\r\n\t\t\tif(delFlg.equals(\"Y\")){\r\n\t\t\t\tisDelOrder = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\torderParm.setData(\"BUSINESS_TYPE\", \"ODO\");\r\n\t\t\tparm.setData(\"CASE_NO\",reg.caseNo());\r\n\t\t\torderParm.setData(\"REGION_CODE\", Operator.getRegion());\r\n\t\t\torderParm.setData(\"MR_NO\", pat.getMrNo());\r\n\t\t\torderParm.setData(\"NAME\", pat.getName());\r\n\t\t\torderParm.setData(\"IDNO\", pat.getIdNo());\r\n\t\t\torderParm.setData(\"SEX\", pat.getSexCode() != null\r\n\t\t\t\t\t&& pat.getSexCode().equals(\"1\") ? \"男\" : \"女\");\r\n\t\t\t// 送医疗卡,返回医疗卡的回传值\r\n\t\t\torderParm.setData(\"INS_FLG\", \"N\");// 医保卡操作\r\n\t\t\torderParm.setData(\"UN_FLG\", unFlg ? \"Y\" : \"N\");// 医生修改的医嘱超过医疗卡金额执行的操作\r\n\t\t\torderParm.setData(\"unParm\", unParm.getData());// 获得执行修改的医嘱\r\n\t\t\tif (null != orderOldParm.getValue(\"OPBEKTFEE_FLG\")\r\n\t\t\t\t\t&& orderOldParm.getValue(\"OPBEKTFEE_FLG\").equals(\"Y\")) {\r\n\t\t\t\torderParm.setData(\"OPBEKTFEE_FLG\", \"Y\");\r\n\t\t\t}\r\n\t\t\t//直接收费操作如果有修改的收费医嘱 不能执行取消操作\r\n\t\t\tif(null == orderOldParm.getValue(\"OPBEKTFEE_FLG\")\r\n\t\t\t\t\t|| orderOldParm.getValue(\"OPBEKTFEE_FLG\").length()<=0){\r\n\t\t\t\tif(unFlg)\r\n\t\t\t\t\torderParm.setData(\"OPBEKTFEE_FLG\", \"Y\");\r\n\t\t\t}\r\n\t\t\tif (odoMainControl.resultData.getCount(\"CASE_NO\")>0) {//====pangben 2014-1-20 建行卡校验\r\n\t\t\t\todoMainControl.messageBox(\"P0001\");\r\n//\t\t\t\tparm.setData(\"OP_TYPE\", 5);\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}else{\r\n\t\t\t\todoMainControl.ektReadParm = EKTIO.getInstance().TXreadEKT();\r\n\t\t\t\tif (null == odoMainControl.ektReadParm || odoMainControl.ektReadParm.getErrCode() < 0\r\n\t\t\t\t\t\t|| null == odoMainControl.ektReadParm.getValue(\"MR_NO\")) {\r\n\t\t\t\t\todoMainControl.messageBox(\"医疗卡读卡有误。\");\r\n\t\t\t\t\todoMainControl.setValue(\"LBL_EKT_MESSAGE\", \"未读卡\");//====pangben 2013-5-3添加读卡\r\n\t\t\t\t\todoMainControl.ekt_lable.setForeground(red);//======yanjing 2013-06-14设置读卡颜色\r\n\t\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\t\treturn ektParam;\r\n\t\t\t\t}else{\r\n\t\t\t\t\todoMainControl.setValue(\"LBL_EKT_MESSAGE\", \"已读卡\");//====pangben 2013-5-3添加读卡\r\n\t\t\t\t\todoMainControl.ekt_lable.setForeground(green);//======yanjing 2013-06-14设置读卡颜色\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!odoMainControl.ektReadParm.getValue(\"MR_NO\").equals(odoMainControl.getValue(\"MR_NO\"))) {\r\n\t\t\t\todoMainControl.messageBox(\"病患信息不符,此医疗卡病患名称为:\"\r\n\t\t\t\t\t\t+ odoMainControl.ektReadParm.getValue(\"PAT_NAME\"));\r\n\t\t\t\todoMainControl.ektReadParm = null;\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}\r\n\t\t\tint type=0;\r\n\t\t\t//parm.setData(\"BILL_FLG\", \"Y\");\r\n\t\t\torderParm.setData(\"ektParm\", odoMainControl.ektReadParm.getData()); // 医疗卡数据\r\n\t\t\t\r\n\t\t\t\tboolean isNull = true;\r\n\t\t\t\tOpdOrder opdOrder = odo.getOpdOrder();\r\n\t\t\t\tString lastFilter = opdOrder.getFilter();\r\n\t\t\t\topdOrder.setFilter(\"\");\r\n\t\t\t\topdOrder.filter();\r\n\t\t\t\tfor (int i = 0; i < opdOrder.rowCount(); i++) {\r\n\t\t\t\t\tif(opdOrder.getItemString(i, \"ORDER_CODE\").length() > 0){\r\n\t\t\t\t\t\tisNull = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\topdOrder.setFilter(lastFilter);\r\n\t\t\t\topdOrder.filter();\r\n\t\t\t\r\n\t\t\tektParam.setNull(isNull);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t} else {\r\n\t\t\todoMainControl.messageBox_(\"医疗卡接口未开启\");\r\n\t\t\treturn null;\r\n\t\t\t\r\n\r\n\t\t}\r\n\t\r\n\t\t\r\n\t\treturn ektParam;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public interface VinhNT_Parameter {\n public void addParam(JSONObject input);\n public String get_field_name();\n public void getParam(JSONObject input);\n public boolean isRequired();\n public ArrayList<Error_Input> checkInput();\n public Context getContext();\n}",
"public void setPercepcion(double param){\n \n this.localPercepcion=param;\n \n\n }",
"abstract public Object getUserData();",
"abstract public void setUserData(Object data);",
"public T getRequestData();",
"protected void dataTableleibie(int i) {\n\t\r\n}",
"Datty getDatty();",
"public interface Parameter extends Serializable {\n\n /**\n * Getter fot property 'type'.\n *\n * @return a String with the CVTerm name for the parameter type in the PSI-MI ontology\n */\n public String getType();\n\n /**\n * Setter for property 'type'.\n *\n * @param type a String with the CVTerm name for the parameter type in the PSI-MI ontology\n */\n public void setType(String type);\n\n /**\n * Getter fot property 'factor'.\n *\n * @return a double with the factor of the value in scientific notation.\n */\n public Double getFactor();\n\n /**\n * Setter for property 'factor'.\n *\n * @param factor a double with the factor of the value in scientific notation.\n */\n public void setFactor(Double factor);\n\n /**\n * Getter fot property 'base'.\n *\n * @return a integer with the base in scientific notation.\n */\n public Integer getBase();\n\n /**\n * Setter for property 'base'.\n *\n * @param base a integer with the base in scientific notation.\n */\n public void setBase(Integer base);\n\n /**\n * Getter fot property 'exponent'.\n *\n * @returna integer with exponent of the value in scientific notation.\n */\n public Integer getExponent();\n\n /**\n * Setter for property 'exponent'.\n *\n * @param exponent a integer with the exponent of the value in scientific notation.\n */\n public void setExponent(Integer exponent);\n\n /**\n * Getter fot property 'value'.\n *\n * @return a String with the representation of the parameter in scientific notation.\n */\n public String getValue();\n\n /**\n * Setter for property 'value'.\n *\n * @param value a String with the representation of the parameter in scientific notation.\n */\n public void setValue(String value);\n\n /**\n * Getter fot property 'unit'.\n *\n * @return a String with the unit of the parameter.\n */\n public String getUnit();\n\n /**\n * Setter for property 'unit'.\n *\n * @param unit a String with the unit of the parameter.\n */\n public void setUnit(String unit);\n\n /**\n * Getter fot property 'uncertainty'.\n *\n * @return a double with the uncertainty.\n */\n public Double getUncertainty();\n\n /**\n * Setter for property 'uncertainty'.\n *\n * @param uncertainty a double with the uncertainty\n */\n public void setUncertainty(Double uncertainty);\n}",
"@Override\n\tpublic void queryData() {\n\t\t\n\t}",
"@Override\n\t\t\t\t\t\t\tpublic void updata(Object allData) {\n\t\t\t\t\t\t\t\tif (allData !=null && allData instanceof PhotoGraType) {\n\t\t\t\t\t\t\t\t\tPhotoGraType bean=(PhotoGraType) allData;\n\n\t\t\t\t\t\t\t\t\tPhotoType type=bean.new PhotoType();\n\t\t\t\t\t\t\t\t\ttype.setId(\"0\");\n\t\t\t\t\t\t\t\t\ttype.setName(\"全部城区\");\n\t\t\t\t\t\t\t\t\tbean.getList().add(0, type);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tinitQuyuData(bean.getList());\n\t\t\t\t\t\t\t\t}else if (allData ==null) {\n\t\t\t\t\t\t\t\t\tToast.makeText(getActivity(), \"网络不给力\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}",
"public static void main(String[] args){\n All_in_One<String> nama = new All_in_One<>();\r\n nama.setManusia(\"Wildan\");\r\n System.out.println(\"Nama Saya: \"+nama.getManusia());\r\n \r\n //Membuat Instance dan Mendefinisikan Tipe Data Integer\r\n All_in_One<Integer> umur = new All_in_One<>();\r\n umur.setManusia(19);\r\n System.out.println(\"Usia Saya: \"+umur.getManusia()+\" Tahun\");\r\n \r\n //Membuat Instance dan Mendefinisikan Tipe Data Boolean\r\n All_in_One<Boolean> kondisi = new All_in_One<>();\r\n kondisi.setManusia(true);\r\n System.out.println(\"Saya Sedang Belajar Java: \"+kondisi.getManusia());\r\n \r\n //Membuat Instance dan Mendefinisikan Tipe Data Float\r\n All_in_One<Float> IPK = new All_in_One<>();\r\n IPK.setManusia(3.5f);\r\n System.out.println(\"Nilai IPK Saya: \"+IPK.getManusia());\r\n \r\n //Membuat Instance dan Mendefinisikan Tipe Data Character\r\n All_in_One<Character> Karakter = new All_in_One<>();\r\n Karakter.setManusia('W');\r\n System.out.println(\"Huruf Awalan Nama Saya Adalah: \"+Karakter.getManusia());\r\n }",
"private void initData(){\n\n }",
"@Parameters\r\n public static Collection<Object[]> data() {\r\n Object[][] data = new Object[][] { { \"Transportation\" ,\"auto\" } };\r\n return Arrays.asList(data);\r\n }"
] | [
"0.7038019",
"0.668182",
"0.65882665",
"0.6412467",
"0.62357605",
"0.6147763",
"0.61427295",
"0.6119611",
"0.6039309",
"0.60099506",
"0.59491765",
"0.58472383",
"0.58355606",
"0.5827828",
"0.58238316",
"0.58238316",
"0.5769708",
"0.5768076",
"0.5755852",
"0.5752356",
"0.57519686",
"0.57509434",
"0.57458293",
"0.57458293",
"0.5741761",
"0.5712192",
"0.5705793",
"0.5705793",
"0.5705793",
"0.5705793",
"0.5705793",
"0.5705793",
"0.56862813",
"0.5685398",
"0.5676513",
"0.5674982",
"0.5673197",
"0.5670041",
"0.56629705",
"0.56629705",
"0.56629705",
"0.56629705",
"0.5648134",
"0.56375015",
"0.5631787",
"0.56143063",
"0.5609372",
"0.5608524",
"0.56056064",
"0.56019664",
"0.5598986",
"0.55947286",
"0.55858004",
"0.5572865",
"0.5572596",
"0.5566145",
"0.5565613",
"0.5560974",
"0.5560974",
"0.5560974",
"0.5554438",
"0.5554438",
"0.5540778",
"0.55369633",
"0.5532027",
"0.55309755",
"0.551766",
"0.5512391",
"0.5508248",
"0.5507284",
"0.5499725",
"0.549786",
"0.5496903",
"0.54837435",
"0.54836667",
"0.5482638",
"0.54823685",
"0.54822165",
"0.5472563",
"0.5467492",
"0.54632956",
"0.5462956",
"0.5462427",
"0.5453542",
"0.5452707",
"0.544268",
"0.54389054",
"0.54359096",
"0.5432262",
"0.5431995",
"0.54302585",
"0.54219145",
"0.54186285",
"0.54130757",
"0.5412397",
"0.5411712",
"0.54091597",
"0.5408077",
"0.5407291",
"0.54005337",
"0.539002"
] | 0.0 | -1 |
overloading perbedaan urutan tipe data parameter | public void jumlah(int b, double a) {
System.out.println("Jumlah 2 angka (int+double) = " + (a + b));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void getData(int a, int b) {\n\n }",
"public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"public Final_parametre() {\r\n\t}",
"@Override\n\tpublic void getData() {\n\t\t\n\t}",
"public void tutki(Suunta suunta);",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"id_pelanggan\", id_pelanggan);\n params.put(\"isi_pengaduan\", isi);\n return params;\n }",
"@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}",
"@Override\n\t\t\t\t\t\t\tpublic void updata(Object allData) {\n\t\t\t\t\t\t\t\tif (allData !=null && allData instanceof PhotoGraType) {\n\t\t\t\t\t\t\t\t\tPhotoGraType bean=(PhotoGraType) allData;\n\n\t\t\t\t\t\t\t\t\tPhotoType type=bean.new PhotoType();\n\t\t\t\t\t\t\t\t\ttype.setId(\"0\");\n\t\t\t\t\t\t\t\t\ttype.setName(\"全部城区\");\n\t\t\t\t\t\t\t\t\tbean.getList().add(0, type);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tinitQuyuData(bean.getList());\n\t\t\t\t\t\t\t\t}else if (allData ==null) {\n\t\t\t\t\t\t\t\t\tToast.makeText(getActivity(), \"网络不给力\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}",
"@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }",
"@Override\n\t\t\t\t\t\t\tpublic void updata(Object allData) {\n\t\t\t\t\t\t\t\tif (allData!=null && allData instanceof PhotoGraType ) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tPhotoGraType bean=(PhotoGraType) allData;\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\tPhotoType type=bean.new PhotoType();\n\t\t\t\t\t\t\t\t\ttype.setId(\"0\");\n\t\t\t\t\t\t\t\t\ttype.setName(\"全部分类\");\n\t\t\t\t\t\t\t\t\tbean.getList().add(0, type);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tinitDengjiData(bean.getList());\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}else if (allData ==null) {\n\t\t\t\t\t\t\t\t\tToast.makeText(getActivity(), \"网络不给力\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}",
"Aluno(String dataNascimento) {\n this.dataNascimento = dataNascimento;\n }",
"private void remplirUtiliseData() {\n\t}",
"public void Metodo1(String valor1){\r\n\r\n }",
"@Override\n\tprotected void getDataFromUCF() {\n\n\t}",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n // jika id kosong maka simpan, jika id ada nilainya maka update\n params.put(\"nama\", Nama);\n params.put(\"email\", Email);\n params.put(\"keluhan\", Keluhan);\n return params;\n }",
"public void parseParameter(byte[] data)\n {\n return; \n }",
"public void asetaTeksti(){\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"nosambungan\", nosambungan);\n return params;\n }",
"public abstract void param(byte[] data,SplitDetails name, SplitDetails value) throws ParseException;",
"@Override\n\tpublic void pausaParaComer() {\n\n\t}",
"public void datos_elegidos(){\n\n\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n // Adding All values to Params.\n params.put(\"huruf\", huruf);\n params.put(\"derajat_lengan_x\", drajatX);\n params.put(\"derajat lengan_y\", drajatY);\n params.put(\"gambar\", gambar);\n\n return params;\n }",
"public perro(String data, int animo_in, jefe jefe_in, juguete fun) {\n nombre = data;\n animo = animo_in;\n jefe_name = jefe_in.getNombre();\n funny = fun;\n }",
"public void setData(Object o){}",
"public ahb(ahd paramahd)\r\n/* 12: */ {\r\n/* 13: 36 */ this.d = paramahd;\r\n/* 14: */ }",
"@Override\r\n\t\t\tpublic ObservableValue<String> call(CellDataFeatures<Teilnehmer, String> param) {\n\t\t\t\tTeilnehmer t = param.getValue();\r\n\t\t\t\tString ausb = \"\";\r\n\t\t\t\tfor(Teilnehmer_Ausbildung a : t.getTeilnehmerAusbildungs())\r\n\t\t\t\t{\r\n\t\t\t\t\tausb += a.getAusbildung().getAusbildungsBezeichnung();\r\n\t\t\t\t}\r\n\t\t\t System.out.println(param.getValue());\r\n\t\t\t\treturn new SimpleStringProperty(ausb);\r\n\t\t\t}",
"public void setdat()\n {\n }",
"public void setData(T data){\n this.data = data;\n }",
"public abstract Object getData();",
"private void remplirPrestaraireData() {\n\t}",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"title\", name);\n params.put(\"ean\", ean);\n params.put(\"supplier\", supplier);\n params.put(\"offer\", offer);\n params.put(\"price\", price);\n\n return params;\n }",
"public void setOrigen(java.lang.String param){\n \n this.localOrigen=param;\n \n\n }",
"public abstract void setCustomData(Object data);",
"@Override\n public void HienThiDanhSach(List<DienTu> listdienTu) {\n\n }",
"private void updateData(Multa ant, Multa multa) {\n\t}",
"@Override\n protected Map<String, String> getParams()\n {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"nama_kost\", kostt.getNama_kost());\n params.put(\"emailPemilik\", emailFB);\n params.put(\"tipe_kost\", kostt.getTipe_kost());\n params.put(\"alamat_kost\", kostt.getAlamat_kost());\n params.put(\"luas_kost\", String.valueOf(kostt.getLuas_kost()));\n params.put(\"sisa_kamar\", String.valueOf(kostt.getSisa_kamar()));\n if(cek==1) {\n params.put(\"image\", kostt.getImageUrl());\n System.out.println(\"image adalah \"+kostt.getImageUrl());\n }else {\n params.put(\"image\", \"kosong\");\n }\n\n\n return params;\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public String overloadingMeth(int angka) { //contoh dari overloading method\n int x;\n x = angka % 10;\n valueword = \"\";\n if (angka == 0) {\n valueword = \"Nol\";\n\n } else if (angka == 100) {\n valueword = \"Seratus\";\n } else if (x == 0) {\n valueword += normalword[angka / 10] + \" Puluh\";\n\n } else if (angka < 12) {\n valueword += normalword[angka];\n } else if (angka < 20) {\n\n valueword += normalword[angka - 10] + \" Belas\";\n } else if (angka < 100) {\n valueword += normalword[angka / 10] + \" Puluh \" + normalword[angka % 10];\n } else if (angka > 100) {\n System.out.println(\"MASUKAN ERROR,ANGKA TIDAK BOLEH LEBIH DARI 100\");\n }\n return valueword;\n }",
"public int getDataParam() {\n return dataParam;\n }",
"@Override\n\tpublic void setData() {\n\n\t}",
"public void setMotivoRechazo(biz.belcorp.www.canonico.ffvv.vender.TMotivoRechazo param){\n \n this.localMotivoRechazo=param;\n \n\n }",
"void setData(T data) {\n\t\tthis.data = data;\n\t}",
"public ChangeData()\r\n\t\t{\r\n\t\t}",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"lapangan\", lapangan);\n params.put(\"jam\", jam);\n params.put(\"durasi\", durasi);\n\n return params;\n }",
"public void postData() {\n\n\t}",
"public abstract void userValues();",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private void setData() {\n\n }",
"@Override\n\tprotected void initdata() {\n\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}",
"void setData(Object data);",
"public static void main(String[] args){\n All_in_One<String> nama = new All_in_One<>();\r\n nama.setManusia(\"Wildan\");\r\n System.out.println(\"Nama Saya: \"+nama.getManusia());\r\n \r\n //Membuat Instance dan Mendefinisikan Tipe Data Integer\r\n All_in_One<Integer> umur = new All_in_One<>();\r\n umur.setManusia(19);\r\n System.out.println(\"Usia Saya: \"+umur.getManusia()+\" Tahun\");\r\n \r\n //Membuat Instance dan Mendefinisikan Tipe Data Boolean\r\n All_in_One<Boolean> kondisi = new All_in_One<>();\r\n kondisi.setManusia(true);\r\n System.out.println(\"Saya Sedang Belajar Java: \"+kondisi.getManusia());\r\n \r\n //Membuat Instance dan Mendefinisikan Tipe Data Float\r\n All_in_One<Float> IPK = new All_in_One<>();\r\n IPK.setManusia(3.5f);\r\n System.out.println(\"Nilai IPK Saya: \"+IPK.getManusia());\r\n \r\n //Membuat Instance dan Mendefinisikan Tipe Data Character\r\n All_in_One<Character> Karakter = new All_in_One<>();\r\n Karakter.setManusia('W');\r\n System.out.println(\"Huruf Awalan Nama Saya Adalah: \"+Karakter.getManusia());\r\n }",
"protected abstract void retrievedata();",
"public void setValues(RutaParams params){\n this.costo = params.costo;\n this.tiempoVuelo = params.tiempoVuelo;\n this.piloto =encriptar(params.piloto);\n }",
"abstract public void setUserData(Object data);",
"private Noder(E data) {\n this.data = data;\n }",
"@Override\n\tpublic void initData() {\n\n\n\n\t}",
"public interface TilinsiirtoValittaja {\n\n boolean tilisiirto(String nimi, int viitenumero, String tililta, String tilille, int summa);\n\n}",
"@Override\r\n\tpublic void setInfo(Object datos) {\n\t\t\r\n\t}",
"public abstract String dohvatiKontakt();",
"@Override\n\tpublic void update(Observable o, Object arg) {\n\t\tif(arg==null){\n\t\t\tSudoku s = Sudoku.getNireSudoku();\n\t\t\t// matrize osoa eguneratu\n\t\t\tfor (int err = 0; err < matrizea.length; err++) {\n\t\t\t\tfor (int zut = 0; zut < matrizea[0].length; zut++) {\n\t\t\t\t\tint i = s.getTablero().getMatrizea()[err][zut].getBista();\n\t\t\t\t\tif(s.getTablero().getMatrizea()[err][zut] instanceof KasilaAldakorra){\n\t\t\t\t\t\tKasilaAldakorra k= (KasilaAldakorra) s.getTablero().getMatrizea()[err][zut];\n\t\t\t\t\t\tString h= k.hautagaiakToString();\n\t\t\t\t\t\tmatrizea[err][zut].setHautagaiak(h);\n\t\t\t\t\t\tmatrizea[err][zut].setBalioaKargatu(i,false);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmatrizea[err][zut].setBalioaKargatu(i,true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tint[]mezu= (int[]) arg;\n\t\t\tif(mezu[0]==0){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Laguntzak ez du soluziorik aurkitu.\", \"Errore mezua\",\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString laguntza=\"\";\n\t\t\t\tif(mezu[0]==1){\n\t\t\t\t\tlaguntza=\"Sole\";\n\t\t\t\t}\n\t\t\t\tif (mezu[0]==2){\n\t\t\t\t\tlaguntza=\"Unique\";\n\t\t\t\t}\n\t\t\t\tint balioa=mezu[1];\n\t\t\t\tint err=mezu[2];\n\t\t\t\tint zut=mezu[3];\n\t\t\t\ttxtpnEstrategia.setText(\"Estrategia->\"+laguntza+\"\\r\\nKasila->(\"+err+\",\"+zut+\")\\r\\nBalioa->\"+balioa);\n\t\t\t}\n\t\t}\n\t}",
"public interface ICommonAction {\n\n void obtainData(Object data, String methodIndex, int status,Map<String, String> parameterMap);\n\n\n}",
"Object getData();",
"Object getData();",
"public void setPercepcion(double param){\n \n this.localPercepcion=param;\n \n\n }",
"protected void dataTableleibie(int i) {\n\t\r\n}",
"public void setExaminationType(ExaminationType_type1 param){\n \n this.localExaminationType=param;\n \n\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"void requestData();",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"void setData (Object data);",
"public void damePersonaje(String personaje){\n this.personaje=personaje;\n\n\n\n }",
"@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n params.put(\"id_koperasi\", idKop);\n params.put(\"bidang_usaha\", id_bidangusaha);\n params.put(\"alamat_usaha\", alamat);\n params.put(\"status_usaha\", status);\n params.put(\"omzet\", omzet);\n params.put(\"location\", Loc);\n params.put(\"simp_pokok\", simpananpokok);\n params.put(\"jml_simp_pokok\", jmlsimpananpokok);\n params.put(\"simp_wajib\", simpananwajib);\n params.put(\"jml_simp_wajib\", jmlsimpananwajib);\n params.put(\"shu_tahunan\", shutahunan);\n params.put(\"user_id\", user);\n return params;\n }",
"public void klikkaa(Tavarat tavarat, Klikattava klikattava);",
"public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }",
"public void setUserData(Object data);",
"public void caricaPartita(String partita) {\n\r\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Dname\", DegreeName);\n params.put(\"iName\", InsName);\n params.put(\"UserId\", uId);\n\n return params;\n }",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n // Adding All values to Params.\n params.put(\"ubaid\", globalVar.getUbaid());\n\n return params;\n }",
"public void b(ahd paramahd) {}",
"@Override\r\n\t\t\tpublic ObservableValue<String> call(CellDataFeatures<Teilnehmer, String> param) {\n\t\t\t\tif (param.getValue().getAktiv())\r\n\t\t\t\t return new SimpleStringProperty(\"ja\");\r\n\t\t\t\telse\r\n\t\t\t\t\treturn new SimpleStringProperty(\"nein\");\r\n\t\t\t}",
"public Harimau(String namaHarimau)\n\t{\n\t//mengisi pengubah yang diwarisi oleh kelas abstract\n\tHarimau.nama = namaHarimau;\n\t}",
"@Override\r\n\tpublic <T> EktParam creatParam(T t) {\n\t\todo = (ODO) t;\r\n\t\todo.setEktSql(null);\r\n\t\tif (EKTIO.getInstance().ektSwitch()) {\r\n\t\t\t\r\n\t\t\tReg reg = ektParam.getReg();\r\n\t\t\tPat pat = ektParam.getPat();\r\n\t\t\t\r\n\t\t\tTParm orderOldParm = ektParam.getOrderOldParm();\r\n\t\t\tTParm orderParm = ektParam.getOrderParm();\r\n\r\n\t\t\tif (odo == null) {\r\n\t\t\t\todoMainControl.messageBox(\"E0115\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tektParam.setOpType(\"\");\r\n\t\t\t\r\n\t\t\tTParm unParm = new TParm();\r\n\t\t\tif (orderOldParm == null) {\r\n\t\t\t\todoMainControl.messageBox(\"没有需要操作的医嘱\");\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}\r\n\t\t\tif(orderParm.getValue(\"OP_FLG\").length()>0 && orderParm.getInt(\"OP_FLG\")==5){\r\n\t\t\t\todoMainControl.messageBox(\"没有需要操作的医嘱\");\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tTParm updateParm=orderParm.getParm(\"updateParm\");\r\n\t\t\t//TODO\r\n\t\t\tboolean unFlg = odoMainControl.updateOrderParm(updateParm, orderOldParm, unParm);\r\n\t\t\tTParm parm = new TParm();\r\n\t\t\t isDelOrder = false;// 执行删除医嘱\r\n\t\t\t//boolean exeDelOrder = false;// 执行删除医嘱\r\n\t\t\tString delFlg=orderParm.getValue(\"DEL_FLG\");\r\n\t\t\t// 如果出现所有医嘱删除也会出现IS_NEW = false 状态 所有需要在执行方法时先查询当前所有医嘱\r\n\t\t\t// 校验是否发送删除检验检查接口\r\n\t\t\tif(delFlg.equals(\"Y\")){\r\n\t\t\t\tisDelOrder = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\torderParm.setData(\"BUSINESS_TYPE\", \"ODO\");\r\n\t\t\tparm.setData(\"CASE_NO\",reg.caseNo());\r\n\t\t\torderParm.setData(\"REGION_CODE\", Operator.getRegion());\r\n\t\t\torderParm.setData(\"MR_NO\", pat.getMrNo());\r\n\t\t\torderParm.setData(\"NAME\", pat.getName());\r\n\t\t\torderParm.setData(\"IDNO\", pat.getIdNo());\r\n\t\t\torderParm.setData(\"SEX\", pat.getSexCode() != null\r\n\t\t\t\t\t&& pat.getSexCode().equals(\"1\") ? \"男\" : \"女\");\r\n\t\t\t// 送医疗卡,返回医疗卡的回传值\r\n\t\t\torderParm.setData(\"INS_FLG\", \"N\");// 医保卡操作\r\n\t\t\torderParm.setData(\"UN_FLG\", unFlg ? \"Y\" : \"N\");// 医生修改的医嘱超过医疗卡金额执行的操作\r\n\t\t\torderParm.setData(\"unParm\", unParm.getData());// 获得执行修改的医嘱\r\n\t\t\tif (null != orderOldParm.getValue(\"OPBEKTFEE_FLG\")\r\n\t\t\t\t\t&& orderOldParm.getValue(\"OPBEKTFEE_FLG\").equals(\"Y\")) {\r\n\t\t\t\torderParm.setData(\"OPBEKTFEE_FLG\", \"Y\");\r\n\t\t\t}\r\n\t\t\t//直接收费操作如果有修改的收费医嘱 不能执行取消操作\r\n\t\t\tif(null == orderOldParm.getValue(\"OPBEKTFEE_FLG\")\r\n\t\t\t\t\t|| orderOldParm.getValue(\"OPBEKTFEE_FLG\").length()<=0){\r\n\t\t\t\tif(unFlg)\r\n\t\t\t\t\torderParm.setData(\"OPBEKTFEE_FLG\", \"Y\");\r\n\t\t\t}\r\n\t\t\tif (odoMainControl.resultData.getCount(\"CASE_NO\")>0) {//====pangben 2014-1-20 建行卡校验\r\n\t\t\t\todoMainControl.messageBox(\"P0001\");\r\n//\t\t\t\tparm.setData(\"OP_TYPE\", 5);\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}else{\r\n\t\t\t\todoMainControl.ektReadParm = EKTIO.getInstance().TXreadEKT();\r\n\t\t\t\tif (null == odoMainControl.ektReadParm || odoMainControl.ektReadParm.getErrCode() < 0\r\n\t\t\t\t\t\t|| null == odoMainControl.ektReadParm.getValue(\"MR_NO\")) {\r\n\t\t\t\t\todoMainControl.messageBox(\"医疗卡读卡有误。\");\r\n\t\t\t\t\todoMainControl.setValue(\"LBL_EKT_MESSAGE\", \"未读卡\");//====pangben 2013-5-3添加读卡\r\n\t\t\t\t\todoMainControl.ekt_lable.setForeground(red);//======yanjing 2013-06-14设置读卡颜色\r\n\t\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\t\treturn ektParam;\r\n\t\t\t\t}else{\r\n\t\t\t\t\todoMainControl.setValue(\"LBL_EKT_MESSAGE\", \"已读卡\");//====pangben 2013-5-3添加读卡\r\n\t\t\t\t\todoMainControl.ekt_lable.setForeground(green);//======yanjing 2013-06-14设置读卡颜色\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!odoMainControl.ektReadParm.getValue(\"MR_NO\").equals(odoMainControl.getValue(\"MR_NO\"))) {\r\n\t\t\t\todoMainControl.messageBox(\"病患信息不符,此医疗卡病患名称为:\"\r\n\t\t\t\t\t\t+ odoMainControl.ektReadParm.getValue(\"PAT_NAME\"));\r\n\t\t\t\todoMainControl.ektReadParm = null;\r\n\t\t\t\tektParam.setOpType(\"5\");\r\n\t\t\t\treturn ektParam;\r\n\t\t\t}\r\n\t\t\tint type=0;\r\n\t\t\t//parm.setData(\"BILL_FLG\", \"Y\");\r\n\t\t\torderParm.setData(\"ektParm\", odoMainControl.ektReadParm.getData()); // 医疗卡数据\r\n\t\t\t\r\n\t\t\t\tboolean isNull = true;\r\n\t\t\t\tOpdOrder opdOrder = odo.getOpdOrder();\r\n\t\t\t\tString lastFilter = opdOrder.getFilter();\r\n\t\t\t\topdOrder.setFilter(\"\");\r\n\t\t\t\topdOrder.filter();\r\n\t\t\t\tfor (int i = 0; i < opdOrder.rowCount(); i++) {\r\n\t\t\t\t\tif(opdOrder.getItemString(i, \"ORDER_CODE\").length() > 0){\r\n\t\t\t\t\t\tisNull = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\topdOrder.setFilter(lastFilter);\r\n\t\t\t\topdOrder.filter();\r\n\t\t\t\r\n\t\t\tektParam.setNull(isNull);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t} else {\r\n\t\t\todoMainControl.messageBox_(\"医疗卡接口未开启\");\r\n\t\t\treturn null;\r\n\t\t\t\r\n\r\n\t\t}\r\n\t\r\n\t\t\r\n\t\treturn ektParam;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Eid\", id + \"\");\n\n\n return params;\n }",
"void tampilKarakterA();",
"@Override \n\t\tprotected int getNumParam() {\n\t\t\treturn 1;\n\t\t}",
"public void c(ahd paramahd) {}",
"protected abstract void a(bru parambru);",
"public void setEstado(biz.belcorp.www.canonico.ffvv.vender.TEstadoPedido param){\n \n this.localEstado=param;\n \n\n }",
"@Override\n\tpublic void trabajar() {\n\n\t}",
"public void setData(Object data) {\r\n this.data = data;\r\n }",
"@Override\r\n\tprotected void initData() {\n\r\n\t}"
] | [
"0.6577357",
"0.6485281",
"0.6391455",
"0.6232509",
"0.61276805",
"0.6091329",
"0.6079656",
"0.60513276",
"0.6023441",
"0.60204476",
"0.5972762",
"0.58881307",
"0.5877322",
"0.58740705",
"0.58679074",
"0.5854109",
"0.5829285",
"0.58222806",
"0.5820681",
"0.5819633",
"0.57704407",
"0.5758988",
"0.5758378",
"0.5749112",
"0.57351285",
"0.5733321",
"0.5732494",
"0.572218",
"0.5705561",
"0.5700503",
"0.5677001",
"0.56725556",
"0.56689703",
"0.56646633",
"0.5646165",
"0.5640392",
"0.56374526",
"0.5630427",
"0.56091475",
"0.5604",
"0.5584286",
"0.55827814",
"0.55725557",
"0.55409014",
"0.5531698",
"0.5531561",
"0.54983723",
"0.54982054",
"0.54982054",
"0.54926944",
"0.5490654",
"0.54732484",
"0.5471997",
"0.5471997",
"0.5471997",
"0.5471997",
"0.5471997",
"0.5471997",
"0.546775",
"0.5466163",
"0.54652095",
"0.54651505",
"0.5460626",
"0.54507756",
"0.5446684",
"0.5446683",
"0.5445664",
"0.5444949",
"0.5444209",
"0.54361874",
"0.54329216",
"0.54329216",
"0.5430297",
"0.5423899",
"0.5423279",
"0.54229254",
"0.541997",
"0.541903",
"0.5418157",
"0.54178095",
"0.5416491",
"0.54107773",
"0.53968155",
"0.53923005",
"0.5391706",
"0.53830224",
"0.5380249",
"0.5370475",
"0.5368053",
"0.5365556",
"0.5356647",
"0.53527576",
"0.535018",
"0.5349402",
"0.53412104",
"0.53398925",
"0.5339835",
"0.5338837",
"0.5336104",
"0.53355896",
"0.53321236"
] | 0.0 | -1 |
remove duplicates and return lenght | public int removeDuplicates(int[] nums){
if(nums.length <=1) return 1;
int j =0;
for(int i =1; i < nums.length; i++){
if(nums[i] !=nums[j]){
j++;
nums[j] = nums[i];
}
}
return j+1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getNumberOfDetectedDuplicates();",
"public int size() { return _byHashCode.size(); }",
"long size();",
"long size();",
"long size();",
"long size();",
"LengthDistinct createLengthDistinct();",
"public int size(){\n return set.length;\n }",
"public long size();",
"public int size(){\n\t\tListMapEntry temp = first;\n\t\tint c=0;\n\t\twhile(temp!=null){\n\t\t\tc++;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn c;\n\t}",
"@Override\n public int size(){\n return sizeHelper(this.first);\n }",
"int getUniqueNumbersCount();",
"public int sizeOf();",
"String size();",
"public int getSize()\n\t{\n\t\t// returns n, the number of strings in the list: O(n).\n\t\tint count = 0;\n \t\tnode p = head; \n\t\twhile (p != null)\n \t\t{\n \t\tcount ++;\n \t\tp = p.next;\n \t\t}\n \t\treturn count;\n\t}",
"public int size() {\n return set.size();\n }",
"int len();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size();",
"public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}",
"public int size() {\n return a.length;\n }",
"public Integer size() { return this.entries.length(); }",
"public int size() {\n\t\treturn nvPairs.size() >> 1;\n\t}",
"public int size() {\n if (first.p == null) return 0;\n int counter = 1;\n Node n = first;\n while (!n.next.equals(first) && counter != 0) {\n counter++;\n n = n.next;\n }\n return counter;\n }",
"public long distinctSubstring() {\n long ans = 1;\n int n = rank.length;\n for (int i = 0; i < n; i++) {\n long len = n - i;\n if (rank[i] < n - 1) {\n len -= lcp[rank[i]];\n }\n ans += len;\n }\n return ans;\n }",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();",
"int size();"
] | [
"0.68087995",
"0.64948046",
"0.64195293",
"0.64195293",
"0.64195293",
"0.64195293",
"0.6383319",
"0.6333794",
"0.62592614",
"0.6255786",
"0.62099475",
"0.6183452",
"0.6174906",
"0.6035172",
"0.60245085",
"0.60031486",
"0.59898293",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.5975509",
"0.59694767",
"0.5967358",
"0.5960793",
"0.594701",
"0.59226197",
"0.5910489",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884",
"0.5906884"
] | 0.0 | -1 |
TODO Autogenerated method stub | public void onClick(View v) {
String username = editTextUserName.getText().toString();
String password = editTextPassword.getText().toString();
String confirmPassword = editTextConfirmPassword.getText().toString();
// check if any of the fields are vacant
if(username.equals("")||password.equals("")||confirmPassword.equals("")) {
Toast.makeText(getApplicationContext(), "Field vacant", Toast.LENGTH_LONG).show();
return;
}
// check if both password matches
if(!password.equals(confirmPassword)) {
Toast.makeText(getApplicationContext(), "Password does not match", Toast.LENGTH_LONG).show();
return;
}
else {
BufferedWriter writer = null, writer1 = null;
try {
writer = new BufferedWriter (new FileWriter(filePath, true));
writer.write(username);
writer.write(",");
writer.write (password);
writer.write ("\n");
writer.flush ();
writer.close ();
addColumn ();
Toast.makeText(getApplicationContext(), "Account Successfully Created ", Toast.LENGTH_LONG).show();
startActivity(new Intent (SignupActivity.this, LoginActivity.class));
return;
} catch (IOException e) {
e.printStackTrace ();
}
}
} | {
"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 |
The doPost method of the servlet. This method is called when a form has its tag value method equals to post. | @Override
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
writeLog(new StringBuilder("POST 请求 来自:").append(request.getRemoteAddr()));
/** 取得外部输出流 用于响应POST结果请求 */
PrintWriter out= response.getWriter();
try
{
/** 初始化验证工具 */
Validate validate = (Validate)Factory.create(Validate.class);
Validater validater = (Validater)Factory.create(Validater.class);
/** 新建数据接收类实例 */
result = new TenPayPackageResult();
TreeMap<String,String> params = new TreeMap<String,String>();
StringBuilder receiveStringB = new StringBuilder("接收到的小钱包参数名称:");
Enumeration names = request.getParameterNames();
while(names.hasMoreElements())
{
String pa = names.nextElement().toString();
String value = request.getParameter(pa).toString();
params.put(pa,value);
receiveStringB.append(pa).append("=").append(value).append("|");
}
writeLog(receiveStringB);
/** 直接取数据 */
result.setBankType(request.getParameter("bank_type").toString());
result.setTradeMode(request.getParameter("trade_mode").toString());
result.setDiscount(request.getParameter("discount").toString());
result.setInputCharset(request.getParameter("input_charset").toString());
result.setTotalFee(request.getParameter("total_fee").toString());
result.setTransportFee(request.getParameter("transport_fee").toString());
result.setNotifyId(request.getParameter("notify_id").toString());
result.setTransactionId(request.getParameter("transaction_id").toString());
result.setSign(request.getParameter("sign").toString());
result.setPartner(request.getParameter("partner").toString());
result.setProductFee(request.getParameter("product_fee").toString());
result.setTimeEnd(request.getParameter("time_end").toString());
result.setOutTradeNo(request.getParameter("out_trade_no").toString());
result.setTradeState(request.getParameter("trade_state").toString());
result.setSignType(request.getParameter("sign_type").toString());
result.setFeeType(request.getParameter("fee_type").toString());
/** 设置验证工具 */
result.setValidater(validate);
/** 写数据接收的初始化日志 */
writeLog(result.getInitInfo());
/** 验证数据是否为空 */
if(validater.validate(result))
{
/** 写入Log 说明不为空验证成功 */
writeLog(new StringBuilder("对初步接收的数据进行非空验证成功 详细:").append(result.getValidateInfo()));
/** 初始化信息处理基础类 并SET数据,用于验证数据的真实性*/
TenPayPackageBaseRequest base = new TenPayPackageBaseRequest();
base.setParameters(params);
/** 验证数据的真实性 */
if(base.verifyReceieData())
{
/** 保存历史记录数据 到详细信息表 保存数据*/
process.processSaveDetail(result, Constants.TENPAYPACKAGE_PAY);
/** 按实际支付系统外部订单号[多支付流水号] 查找 这个订单的初始化交易记录*/
NetPayData data = process.processAfterValidate(result);
/** 为空验证 记录超时后再收到数据的异常情况 */
if(data == null)
{
process.processExceptionData(result);
}
else
{
/** 交易状态验证 */
if(result.validateTradeStatus())
{
/** 交易状态验证成功 再次验证总金额 */
process.processValidateSuccess(result,data);
}
else
{
/** 交易状态验证失败 再次验证总金额 */
process.processValidateFail(result,data);
}
}
out.print("success");
out.flush();
writeLog(new StringBuilder("向财付通返回数据接收并处理成功 多支付流水号:").append(result.getOutTradeNo()));
}
else
{
writeLog(new StringBuilder("数据真实性验证失败 外部订单号:").append(result.getOutTradeNo()));
out.print("fail");
}
base = null;
}
else
{
writeLog(new StringBuilder("对初步接收的数据进行非空验证失败 详细:").append(result.getValidateInfo()));
out.print("fail");
}
params = null;
validate = null;
validater = null;
}
catch(Exception $e)
{
out.print("fail");
writeLog(new StringBuilder("处理过程中出现异常--名称").append($e.getMessage())
.append($e.getStackTrace()).append($e.getLocalizedMessage()).append($e.getClass()));
}
finally
{
if(out != null)
{
out.close();
out = null;
}
result=null;
logger.write();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"public void doPost( )\n {\n \n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }",
"protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }",
"@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}",
"@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }",
"public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"@Override\r\n\t/**\r\n\t * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse\r\n\t * response)\r\n\t */\r\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoGet(request, response);\r\n\t}",
"public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}",
"@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\t\n\t\t\tdoGet(request, response);\n\t\t\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\n\tsuper.doPost(req, resp);\n\t\n\tSystem.out.println(\"dddd\");\n}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\ndoGet(request, response);\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n this.doGet(request, response);\n\t\t\n\t\t\t\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoGet(request, response);\r\n\t\t\r\n\t}",
"@Override\n public void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n \tdoGet(request, response);\n }",
"protected void doPost(HttpServletRequest request, \r\n \t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tdoGet(request, response);\r\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n processRequest(request, response);\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n doPost(request, response);\r\n }",
"public void processPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString string= request.getParameter(\"action\");\n\t\tif(string.equals(\"fileUpload\")) {\n\t\t\tfileUpload(request, response);\n\t\t}\n\t\telse if(string.equals(\"updateImformation\")) {\n\t\t\tupdateImformation(request, response);\n\t\t}\n\t\telse {\n\t\t\trequest.getRequestDispatcher(\"index.jsp\").forward(request, response);\n\t\t}\n\t}",
"protected void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException\n {\n doGet(request,response);\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}",
"protected void doPost(final HttpServletRequest request,final HttpServletResponse response)\r\n throws ServletException, IOException {\r\n this.doGet(request, response);\r\n \r\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, java.io.IOException {\n processRequest(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, java.io.IOException {\n processRequest(request, response);\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\n protected void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {\n doPost( request, response );\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n doGet(request,response);\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tdoGet(request, response);\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException\r\n {\r\n processRequest(request, response);\r\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t\tdoGet(req, resp);\r\n\t}",
"public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\tthrows ServletException, IOException {\n\t\tMap<String, String> messages = new HashMap<String, String>();\n\t\treq.setAttribute(\"messages\", messages);\n\n\t\tList<MeetUps> meetups = new ArrayList<MeetUps>();\n \n\t\t// Retrieve and validate the user last name that is retrieved from the form POST submission. By default, it\n\t\t// is populated by the URL query string (in FindUsers.jsp).\n\t\tString district = req.getParameter(\"district\");\n\t\tif (district == null || district.trim().isEmpty()) {\n\t\t\tmessages.put(\"success\", \"Please enter a valid intensity value.\");\n\t\t} else {\n\t\t\t// Retrieve meetups, and store as a message.\n\t\t\ttry {\n\t\t\t\tmeetups = meetupsDao.getAllMeetUpsByDistrict(district);\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow new IOException(e);\n\t\t\t}\n\t\t\tmessages.put(\"success\", \"Displaying results for meetups in the district: \" + district);\n\t\t}\n\t\treq.setAttribute(\"meetups\", meetups);\n \n\t\treq.getRequestDispatcher(\"/MeetUp.jsp\").forward(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req,resp);;\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, java.io.IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response\n )\n throws ServletException\n , IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\tprocessRequest(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, java.io.IOException\n {\n internalProcessRequest(request, response);\n }",
"@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n\r\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n \tif(\"Submit Request\".equalsIgnoreCase(request.getParameter(\"action\"))){\t\t\t\r\n \t\tSite site = getLoggedOnSite(request);\r\n \t\tUser user = getLoggedOnUser(request);\r\n\r\n\t \tint itemId = Integer.parseInt(request.getParameter(\"itemId\"));\r\n\t \tint numRequested = Integer.parseInt(request.getParameter(\"numberUnits\"));\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tmakeFoodBankRequestDAO.makeFoodBankRequest(itemId, site.getId(), user.getEmail(), numRequested);\r\n\t\t\t\t\r\n\t\t\t\tresponse.getWriter().write((\"Success\"));\t\t\t\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\t\t\t\t\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tresponse.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.toString());\r\n\t\t\t}\r\n\t\t}\r\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n \r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\n\t}"
] | [
"0.7657267",
"0.76023376",
"0.7523978",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.74690676",
"0.7468644",
"0.74277234",
"0.74117726",
"0.74026644",
"0.7385832",
"0.73712975",
"0.7369698",
"0.7369698",
"0.7369111",
"0.7348095",
"0.7344747",
"0.73387015",
"0.732437",
"0.7319999",
"0.73136705",
"0.7308772",
"0.7305846",
"0.7302257",
"0.7302257",
"0.7302257",
"0.72705674",
"0.72705674",
"0.72705674",
"0.7268537",
"0.72255313",
"0.72255313",
"0.72255313",
"0.7225124",
"0.7225124",
"0.71466213",
"0.7127747",
"0.71161604",
"0.7087805",
"0.7069204",
"0.7057742",
"0.70489764",
"0.70415074",
"0.703731",
"0.7034553",
"0.70306474",
"0.7014242",
"0.69982165",
"0.69873744",
"0.6982299",
"0.69750905",
"0.69360584",
"0.6933263",
"0.69246024",
"0.69246024",
"0.69246024",
"0.69246024",
"0.69246024",
"0.69246024",
"0.69246024",
"0.6918394",
"0.6918394",
"0.6918394",
"0.6918394",
"0.6918394",
"0.6915245",
"0.6911678",
"0.6909672",
"0.6908063",
"0.68971974",
"0.68971974",
"0.68927974",
"0.6889359",
"0.6883812",
"0.68731374",
"0.68731374",
"0.68731374",
"0.6871935",
"0.6865947",
"0.6863221",
"0.6861114",
"0.68576115",
"0.68521523",
"0.6850721",
"0.6847302",
"0.68443817",
"0.6839103",
"0.6838647",
"0.6832058",
"0.68282753",
"0.68196285",
"0.6818963",
"0.6812147"
] | 0.0 | -1 |
The doGet method of the servlet. This method is called when a form has its tag value method equals to get. | @Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
try
{
String from = request.getRemoteAddr();
writeLog(new StringBuilder("GET 请求 来自:").append(from).append(request.getQueryString()));
doPost(request,response);
}
catch(Exception e)
{
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}",
"void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;",
"@Override\r\n protected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n throws ServletException, IOException {\n this.doPost(req, resp);\r\n }",
"public void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n throws ServletException, IOException {\r\n\r\n doPost(req, resp); // call doPost processing\r\n\r\n }",
"@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\n protected void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {\n doPost( request, response );\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n doPost(request, response);\r\n }",
"@Override\n\tpublic void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tthis.doPost(request, response);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tdoPost(req, resp);\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}",
"@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n doPost(request, response);\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\tthrows ServletException, IOException {\nthis.doPost(request, response);\n}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n \tdoPost(request, response);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req,resp);;\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // only POST should be used\n doPost(request, response);\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"public void doGet(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException {\n \n doPost(request, response);\n }",
"public void doGet(\r\n HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n doPost(request, response);\r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\n\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}",
"protected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response); // calling doPost method\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doPost(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doPost(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doPost(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doPost(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doPost(request, response);\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException\r\n\t{\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n\t\tprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t this.doGet(request, response);\r\n\t }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t doPost(request, response);\n\t}",
"@Override\r\n\tprotected void doPost( final HttpServletRequest request, final HttpServletResponse response ) throws ServletException, IOException {\r\n\t\tdoGet( request, response );\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t doPost(req, resp);\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t\t\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doPost(request, response);\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"public synchronized void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {\r\n\t\tdoPost(request, response);\r\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n doGet(request, response);\r\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\r\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\r\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n\r\n\t\tdoPost(request, response);\r\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }",
"protected void doGet(HttpServletRequest request, \r\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\r\n\t\t// Send all get requests to doPost\r\n\t\tdoPost(request, response);\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,\n IOException\n {\n doPost(request,response);\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req,resp);\n\n\t}",
"@Override\n protected void doGet( HttpServletRequest req, HttpServletResponse resp )\n throws ServletException, IOException {\n log( \"GET\" );\n createInputBloodDonationForm( req, resp );\n }",
"protected void doGet(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\r\n\t\tdoPost(request,response);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\ndoPost(request, response);\n\t\t\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException\r\n\t{\r\n\t\tdoPost(request, response);\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(request, response);\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n\n doGet(request, response);\n\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\r\n\t\tdoGet(request, response);\r\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}",
"@Override\n\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n this.doPost(request, response);\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\n\t}",
"public void doGet(HttpServletRequest request, \n HttpServletResponse response)\n throws ServletException, IOException \n {\n response.setContentType(\"text/html\");\n\n // Writing message to the web page\n PrintWriter out = response.getWriter();\n String title = \"Using GET Method to Read Form Data\";\n String docType =\n \"<!doctype html public \\\"-//w3c//dtd html 4.0 \" + \"transitional//en\\\">\\n\";\n \n out.println(docType +\n \t \"<html>\\n\" +\n \t \"<head><title>\" + title + \"</title></head>\\n\" +\n \t \"<body bgcolor = \\\"#f0f0f0\\\">\\n\" +\n \t \"<h1 align = \\\"center\\\">\" + title + \"</h1>\\n\" +\n \t \"<ul>\\n\" +\n \t \" <li><b>Email</b>: \"\n \t + request.getParameter(\"uname\") + \"\\n\" +\n \t \" <li><b>Password</b>: \"\n \t + request.getParameter(\"psw\") + \"\\n\" +\n \t \"\t<li><b>Remember?</b>: \"\n \t + request.getParameter(\"remember\") +\n \t \"</ul>\\n\" +\n \t \"</body>\" +\n \t \"</html>\"\n \t );\n \n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request,response);\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException\n\t{\n\t\tthis.doPost(request, response);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\t}",
"@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"public void doGet(HttpServletRequest request,\n HttpServletResponse response) throws ServletException,\n IOException {\n doPost(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here--get--\");\n processRequest(request, response);\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doGet(request, response);\n }"
] | [
"0.7432752",
"0.73522663",
"0.7254978",
"0.72524107",
"0.72439736",
"0.724188",
"0.7207264",
"0.7207264",
"0.7205804",
"0.7201428",
"0.72012377",
"0.718355",
"0.7173461",
"0.7171022",
"0.71595865",
"0.71556956",
"0.71526843",
"0.7151504",
"0.71406186",
"0.71390015",
"0.71390015",
"0.71348333",
"0.71348333",
"0.71348333",
"0.7134289",
"0.71247566",
"0.71161634",
"0.71088785",
"0.7100379",
"0.7098203",
"0.70911413",
"0.70911413",
"0.70911413",
"0.70911413",
"0.70911413",
"0.708718",
"0.708718",
"0.708718",
"0.708718",
"0.7086782",
"0.7076411",
"0.70743906",
"0.7069744",
"0.70687264",
"0.7054595",
"0.7049895",
"0.70497036",
"0.70497036",
"0.70481265",
"0.7036389",
"0.7033013",
"0.7009385",
"0.7009385",
"0.7005203",
"0.70044017",
"0.7000923",
"0.6996621",
"0.6996621",
"0.69933546",
"0.69932663",
"0.69904196",
"0.6986288",
"0.6984845",
"0.6980187",
"0.69800633",
"0.69789255",
"0.6975758",
"0.6975413",
"0.6970826",
"0.6970141",
"0.69700855",
"0.6968483",
"0.6965919",
"0.69659",
"0.6965168",
"0.695241",
"0.69366485",
"0.69366485",
"0.69366485",
"0.6928666",
"0.692539",
"0.6903949",
"0.6903949",
"0.6903949",
"0.6903949",
"0.6903949",
"0.6903949",
"0.6903949",
"0.6903949",
"0.6903949",
"0.6903949",
"0.6903949",
"0.6903949",
"0.68986803",
"0.689811",
"0.68965435",
"0.68965435",
"0.6891064",
"0.68908834",
"0.68849397",
"0.6882526"
] | 0.0 | -1 |
Created by nareshm on 2/05/2015. | @Local
public interface LocalPlayerService extends PlayerService {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\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}",
"private void poetries() {\n\n\t}",
"protected boolean func_70814_o() { return true; }",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private void m50366E() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private static void cajas() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"private void init() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@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 rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void jugar() {\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 public void init() {\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n public void init() {}",
"@Override\n protected void getExras() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n void init() {\n }",
"@Override\n\tpublic void init()\n\t{\n\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 einkaufen() {\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@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\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}",
"public void mo12628c() {\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n protected void initialize() \n {\n \n }",
"private void strin() {\n\n\t}",
"public void method_4270() {}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"public void mo21877s() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"public void m23075a() {\n }",
"public void mo6081a() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"public abstract void mo70713b();",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"protected void mo6255a() {\n }",
"public void mo12930a() {\n }"
] | [
"0.59306455",
"0.5882773",
"0.5805386",
"0.57786715",
"0.57693744",
"0.57595134",
"0.57445484",
"0.57445484",
"0.5686617",
"0.5674563",
"0.5650922",
"0.5645471",
"0.56426316",
"0.56426316",
"0.56426316",
"0.56426316",
"0.56426316",
"0.56376576",
"0.5635399",
"0.56341946",
"0.5632611",
"0.5629868",
"0.56260675",
"0.5605103",
"0.55978113",
"0.5597736",
"0.559357",
"0.55932355",
"0.55747896",
"0.5569004",
"0.5552752",
"0.55468065",
"0.5535907",
"0.55268157",
"0.5520822",
"0.5515395",
"0.55122805",
"0.55122805",
"0.5491597",
"0.5491186",
"0.5477326",
"0.547715",
"0.547715",
"0.547715",
"0.546948",
"0.5469441",
"0.5469441",
"0.5469441",
"0.54672503",
"0.54672503",
"0.54672503",
"0.54620016",
"0.5461297",
"0.5449634",
"0.5435495",
"0.5433091",
"0.54218847",
"0.5419595",
"0.5412129",
"0.54108185",
"0.54108185",
"0.54096943",
"0.5407118",
"0.5407115",
"0.5403428",
"0.5395902",
"0.5394703",
"0.5394703",
"0.5394703",
"0.5394703",
"0.5394703",
"0.5394703",
"0.5394703",
"0.53889096",
"0.53825223",
"0.5377746",
"0.5377746",
"0.5377746",
"0.5377746",
"0.5377746",
"0.5377746",
"0.5366587",
"0.5366587",
"0.535803",
"0.53518045",
"0.5334913",
"0.5334042",
"0.5333872",
"0.53182006",
"0.531776",
"0.5313672",
"0.5311065",
"0.53066015",
"0.5304986",
"0.530265",
"0.5300355",
"0.5293228",
"0.5292666",
"0.52909803",
"0.52885854",
"0.52851546"
] | 0.0 | -1 |
Recipient's email ID needs to be mentioned. | private void sendEmail() {
String to = "tsutton720@gmail.com";
// Sender's email ID needs to be mentioned
String from = "web@gmail.com";
// Assuming you are sending email from localhost
String host = "localhost";
// Get system properties
Properties properties = System.getProperties();
// Setup mail server
properties.setProperty("mail.smtp.host", host);
// Get the default Session object.
Session session = Session.getDefaultInstance(properties);
try {
// Create a default MimeMessage object.
MimeMessage message = new MimeMessage(session);
// Set From: header field of the header.
message.setFrom(new InternetAddress(from));
// Set To: header field of the header.
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
// Set Subject: header field
message.setSubject("This is the Subject Line!");
// Now set the actual message
message.setText("This is actual message");
// Send message
Transport.send(message);
System.out.println("Sent message successfully....");
} catch (MessagingException mex) {
mex.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void recipient(String recipient) {\n }",
"@java.lang.Override\n public long getRecipientId() {\n return recipientId_;\n }",
"public void setEmail(String p) { this.idcorreo = p; }",
"@Override\n public void addRecipient(String newRecipient) {\n System.out.println(\"Invalid request cannot add \"\n + newRecipient\n + \" to any mailing list\");\n }",
"@java.lang.Override\n public long getRecipientId() {\n return recipientId_;\n }",
"public String getRecipient()\n {\n return recipient;\n }",
"@Override\n public void sendEmail(String newRecipient) {\n System.out.println(\"Email sent to _\" \n + newRecipient\n + \"_ Invalid RECIPIENTS\");\n }",
"public void setRecipient(String recipient)\n {\n this.recipient = recipient;\n }",
"public String recipientId() {\n return recipientId;\n }",
"public void setEmailId(String emailId);",
"public String getEmailId()\r\n {\r\n return emailId;\r\n }",
"public void sendEmail(Author authorObject);",
"public void setEmailID(String emailID) {\n this.emailID = emailID;\n }",
"@Then(\"^Send a mail to email id \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void Send_a_mail_to_email_id(String arg1) throws Throwable {\n\t throw new PendingException();\r\n\t}",
"public void setRecipientEmailAddress(java.lang.Object recipientEmailAddress) {\n this.recipientEmailAddress = recipientEmailAddress;\n }",
"public void enterRandomEmailId() {\n String email = \"test\" + Utility.getRandomString(3) + \"@gmail.com\";\n Reporter.addStepLog(\"Enter email \" + email + \" to email field \" + _emailField.toString());\n sendTextToElement(_emailField, email);\n log.info(\"Enter email \" + email + \" to email field \" + _emailField.toString());\n }",
"public int getRecipientId() {\r\n\t\treturn recipientId;\r\n\t}",
"public String getRecipient() {\n\t\treturn recipient;\n\t}",
"@Override\n\tvoid email() {\n\t\tSystem.out.println(\"email id jdfjdfh@gmail.com\");\n\t\t\n\t}",
"protected String getRecipient() {\n return parameterService.getParameterValueAsString(AwardDocument.class,\n Constants.REPORT_TRACKING_NOTIFICATIONS_BATCH_RECIPIENT);\n }",
"@Override\n public String getUserId() {\n return email;\n }",
"public String getEmailId() {\n return emailId;\n }",
"@AutoEscape\n\tpublic String getEmailId();",
"public void setRecipient(java.lang.String recipient) {\n this.recipient = recipient;\n }",
"public static void setRecipientEmail(String recipientEmail) {\n MailHelper.recipientEmail = recipientEmail;\n }",
"public String getEmailID() {\n\t\treturn emailID;\n\t}",
"public Recipient getRecipient() {\n return recipient;\n }",
"public void addRecipient(String recipient) {\n\t\tthis.recipient = recipient;\n\t}",
"String getUserMainEmail( int nUserId );",
"public String getEmailId() {\r\n\t\treturn emailId;\r\n\t}",
"public static String getRecipientEmail() {\n return recipientEmail;\n }",
"public void setRecipient(String recipient){\n this.recipients = new String[1];\n recipients[0] = recipient;\n }",
"public void setEmail(final String e)\n {\n this.email = e;\n }",
"public java.lang.String getRecipient() {\n return recipient;\n }",
"@Override\r\n\tpublic String getEmailAdrress() {\n\t\treturn null;\r\n\t}",
"public void setEmailId(final String emailId)\r\n {\r\n this.emailId = emailId;\r\n }",
"java.lang.String getSenderId();",
"public java.lang.Object getRecipientEmailAddress() {\n return recipientEmailAddress;\n }",
"public void setEmailID(String emailID) {\n\t\tthis.emailID = emailID;\n\t}",
"public void setRecipient(Object recipient) {\n\t\tthis.recipient = recipient;\n\t}",
"public void setEmailAddress(String email) {\n this.email = email;\n }",
"public void setAlternateEmail(String altemail) { this.alternateEmail = altemail; }",
"public Object getRecipient() {\n\t\treturn this.recipient;\n\t}",
"public void setEmailId(String emailId) {\n this.emailId = emailId;\n }",
"protected String getTargetAccountFromRecipients(MimeMessage emailMessage) throws MessagingException {\r\n\t\tAddress[] addresses = emailMessage.getAllRecipients();\r\n\t\tString targetAccount = null;\r\n\t\tfor (Address add : addresses) {\r\n\t\t\tif (add.toString().contains(\"appspotmail\")) {\r\n\t\t\t\tString emailAddress = add.toString();\r\n\t\t\t\tlog.info(\"appspotmail email address found: \" + emailAddress);\r\n\t\t\t\tint atIndex = emailAddress.indexOf('@');\r\n\t\t\t\tint startIndex = emailAddress.lastIndexOf('<');\r\n\t\t\t\ttargetAccount = emailAddress.substring(startIndex+1, atIndex) + \"@gmail.com\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn targetAccount;\r\n\t}",
"public Builder setRecipientId(long value) {\n\n recipientId_ = value;\n bitField0_ |= 0x00000080;\n onChanged();\n return this;\n }",
"@Override\r\n\tpublic void updateEmail(Integer id, String email) {\n\t\t\r\n\t}",
"public void setRecipientId(int recipientId) {\r\n\t\tthis.recipientId = recipientId;\r\n\t}",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"public void setEmailAddress(String email_address){\n this.email_address = email_address;\n }",
"@Override\r\n\tpublic int emailcheck(String email) {\n\t\treturn dao.idcheck(email);\r\n\t}",
"public void setEmailAddress(String emailAddress);",
"public void setEmailad(String emailad) {\n\tthis.emailad = emailad;\n}",
"public String getEmailAddress() {\r\n return email;\r\n }",
"public String getEmail() { return (this.idcorreo == null) ? \"\" : this.idcorreo; }",
"boolean emailExistant(String email, int id) throws BusinessException;",
"String getUserMail();",
"@java.lang.Override\n public boolean hasRecipientId() {\n return ((bitField0_ & 0x00000080) != 0);\n }",
"public void onClick(View v) {\n\t\t\t\tif(authorities[0] == Authority.Email.ordinal()) {\n\t\t\t\t\tfinal String subject = \"You have a new Musubi message!\";\n\t\t\t\t\tfinal String body = message + \" \" + MUSUBI_MARKET_URL;\n\t\t\t\t\tIntent send = new Intent(Intent.ACTION_SENDTO);\n\t\t\t\t\tStringBuilder recipientsString = new StringBuilder();\n\t\t\t\t\t// only add emails\n\t\t\t\t\tfor(int i = 0; i < recipients.length; i++) {\n\t\t\t\t\t\tif(authorities[i] == Authority.Email.ordinal()) {\n\t\t\t\t\t\t\trecipientsString.append(recipients[i]).append(\",\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\trecipientsString.deleteCharAt(recipientsString.length()-1);\n\t\t\t\t\tString uriText;\n\t\t\t\t\turiText = \"mailto:\" + recipientsString.toString() +\n\t\t\t\t\t\"?subject=\" + subject + \n\t\t\t\t\t\"&body=\" + body;\n\t\t\t\t\t//TODO: real url encoding?\n\t\t\t\t\turiText = uriText.replace(\" \", \"%20\");\n\t\t\t\t\tUri uri = Uri.parse(uriText);\n\t\t\t\t\tsend.setData(uri);\n\t\t\t\t\tstartActivity(Intent.createChooser(send, \"Send invitation...\"));\n\n\t\t\t\t\tMIdentity[] identities = markAsHasSent(mIntent);\n\t\t\t\t\t//let other people in the feed know that spamming is unnecessary\n\t\t\t\t\tif(mFeedUri != null) {\n\t\t\t\t\t\tObj invitedObj = OutOfBandInvitedObj.from(Arrays.asList(identities).iterator());\n\t\t\t\t\t\tHelpers.sendToFeed(EmailUnclaimedMembersActivity.this, invitedObj, mFeedUri);\n\t\t\t\t\t}\n\n\t\t\t\t\tEmailUnclaimedMembersActivity.this.finish();\n\t\t\t\t} else if(authorities[0] == Authority.Facebook.ordinal()) {\n\t\t\t\t\tFacebook fb = AccountLinkDialog.getFacebookInstance(EmailUnclaimedMembersActivity.this);\n//\t\t\t\t\tAsyncFacebookRunner asyncRunner = new AsyncFacebookRunner(fb);\n//\n\t\t \t\tif(fb.isSessionValid()) {\n//\t\t \t\t\t// TODO: batch request in json array. currently facebook limits 50 requests per batch\n//\t\t \t\t\t// need to split up it if it's more than 50\n//\t\t \t\t\tfinal String fbmsg = new StringBuilder()\n//\t\t \t\t\t\t.append(\"message=\").append(message)\n//\t\t \t\t\t\t.append(\"&link=\").append(link)\n//\t\t \t\t\t\t.append(\"&picture=\").append(LOGO_PICTURE_URL).toString();\n//\t\t \t\t\t\n//\t\t \t\t\tJSONArray batchObj = new JSONArray();\n//\t\t \t\t\ttry {\n//\t\t \t\t\t\tfor(String id : recipients) {\n//\t\t \t\t\t\tJSONObject post = new JSONObject();\n//\t\t \t\t\t\tpost.put(\"method\", \"POST\");\n//\t\t \t\t\t\tpost.put(\"relative_url\", id+\"/feed\");\n//\t\t \t\t\t\tpost.put(\"body\", fbmsg);\n//\t\t \t\t\t\tbatchObj.put(post);\n//\t\t \t\t\t}\n//\t\t \t\t\t} catch (JSONException e) {\n//\t\t \t\t\t\tLog.e(TAG, e.toString());\n//\t\t \t\t\t}\n//\t\t \t\t\tBundle batch = new Bundle();\n//\t\t \t\t\tbatch.putString(\"batch\", batchObj.toString());\n//\t\t \t\t\tasyncRunner.request(\"/\", batch, \"POST\", new FriendRequestListener(), null);\n\t\t \t\t\t\n\t\t \t\t\tStringBuilder recipientsString = new StringBuilder();\n\t\t\t\t\t\t// only add fb ids\n\t\t\t\t\t\tfor(int i = 0; i < recipients.length; i++) {\n\t\t\t\t\t\t\tif(authorities[i] == Authority.Facebook.ordinal()) {\n\t\t\t\t\t\t\t\trecipientsString.append(recipients[i]).append(\",\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\trecipientsString.deleteCharAt(recipientsString.length()-1);\n\t\t \t\t\tBundle params = new Bundle();\n\t\t \t\t\tparams.putString(\"message\", message);\n\t\t \t\t\tparams.putString(\"to\", recipientsString.toString());\n\t\t \t\t\tfb.dialog(EmailUnclaimedMembersActivity.this, \"apprequests\", params, new AppRequestDialogListener());\n\n\t\t \t\t}\n\t\t\t\t}\n\t\t\t}",
"public String getFromEMail() {\n return fromEMail;\n }",
"public String getEmailAddress() {\n return email;\n }",
"public String getAlternateEmail() { return alternateEmail; }",
"public void addEmail(String s){\r\n\t\temail.add(s);\t\t\r\n\t}",
"@java.lang.Override\n public boolean hasRecipientId() {\n return ((bitField0_ & 0x00000080) != 0);\n }",
"public void onPressMail(View view) {\r\n MailHelper.mailRecipient(this, event.mail);\r\n }",
"public void setEMail (java.lang.String eMail) {\r\n\t\tthis.eMail = eMail;\r\n\t}",
"public String getEmailAddress(){\r\n\t\treturn emailAddress;\r\n\t}",
"void send(String emailName);",
"@Override\n\tvoid email() {\n\t\tSystem.out.println(\"sai@gmail.com\");\n\t\t\n\t}",
"public String getEmailAddress()\r\n {\r\n return emailAddress;\r\n }",
"public void addRecipient(){\n //mRATable.insert();\n }",
"public Guid getInvoiceRecipientId() {\r\n return invoiceRecipientId;\r\n }",
"public java.lang.String getEmailAddress();",
"public void setEmailAddress(String emailAddress) {\n this.emailAddress = emailAddress;\n }",
"public void setEmail(Email email) { this.email = email; }",
"public void setEmail(String email){\r\n this.email = email;\r\n }",
"public JoinNowPage enterEmailID() {\n\t\temail.sendKeys(\"afchoudhary@deloitte.com\");\n\t\treturn this;\n\t}",
"@Override\n\tpublic void modifyClientMail(long id, String mail) {\n\t\t\n\t}",
"java.lang.String getUserEmail();",
"public String getEmail()\r\n/* 31: */ {\r\n/* 32:46 */ return this.email;\r\n/* 33: */ }",
"public String getmailID() {\n\t\treturn _mailID;\n\t}",
"public final Player getRecipient() {\n return recipient;\n }",
"public void setEmail(String email) { this.email = email; }",
"public String getEmailAddress();",
"@Override\n public String toString() {\n return \"Recipient: \" + recipients[0] + \"; Type: \" + type;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public void seteMail(String eMail) {\n this.eMail = eMail;\n }",
"public void setMailId(int v) \n {\n \n if (this.mailId != v)\n {\n this.mailId = v;\n setModified(true);\n }\n \n \n }",
"boolean hasMailInboxID();",
"boolean hasMailInboxID();",
"boolean hasMailInboxID();",
"boolean hasMailInboxID();",
"boolean hasMailInboxID();",
"boolean hasMailInboxID();",
"boolean hasMailInboxID();",
"public void setEmail( String email )\r\n {\r\n this.email = email;\r\n }"
] | [
"0.6679076",
"0.6535262",
"0.6473539",
"0.6443136",
"0.6432717",
"0.6348342",
"0.63348556",
"0.63263154",
"0.6296808",
"0.62781155",
"0.62391186",
"0.62367135",
"0.62210846",
"0.62085253",
"0.6185119",
"0.61475474",
"0.61453986",
"0.6130136",
"0.6077961",
"0.60607266",
"0.60455465",
"0.6041041",
"0.60266995",
"0.6016578",
"0.60150975",
"0.6005352",
"0.6002125",
"0.5992249",
"0.59888023",
"0.5987119",
"0.59587467",
"0.59514505",
"0.59458804",
"0.5929253",
"0.5917271",
"0.5912343",
"0.5901225",
"0.5867778",
"0.5864278",
"0.582597",
"0.58161825",
"0.58147764",
"0.57992",
"0.57967436",
"0.5795074",
"0.5786547",
"0.5773374",
"0.5755631",
"0.57432806",
"0.57432806",
"0.57432806",
"0.57432806",
"0.57432806",
"0.57432806",
"0.57172656",
"0.5711629",
"0.5689955",
"0.5688101",
"0.56847847",
"0.5681907",
"0.56449884",
"0.56253934",
"0.5620984",
"0.5615568",
"0.5610758",
"0.56084615",
"0.56076527",
"0.56017745",
"0.56013346",
"0.5597971",
"0.5597003",
"0.55956364",
"0.55916965",
"0.55884683",
"0.5585583",
"0.557689",
"0.55611676",
"0.5560607",
"0.55518043",
"0.5551101",
"0.554609",
"0.55400574",
"0.55359834",
"0.55283034",
"0.552544",
"0.55210817",
"0.5514059",
"0.55126095",
"0.55113095",
"0.550836",
"0.55030143",
"0.54997534",
"0.54993325",
"0.5498235",
"0.5498235",
"0.5498235",
"0.5498235",
"0.5498235",
"0.5498235",
"0.5498235",
"0.54958475"
] | 0.0 | -1 |
Consulta 1: libros por una editorial | public List<Book> getBooksByEditorialId(Long codePublisher) {
String queryStr = "SELECT b FROM Book b where b.publisher.code = :coPublisher";
Query query = em.createQuery(queryStr);
query.setParameter("coPublisher", codePublisher);
return query.getResultList();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void mostrarLibros() {\n dlmLibros.clear();\n for (Libro libro : modelo.getLibros()) {\n dlmLibros.addElement(libro);\n }\n seleccionarLibrosOriginales();\n }",
"private static void mostrarLibros() {\n\n\t\tlibros\n\t\t.stream()\n\t\t.forEach(System.out::println);\n//\t\t\n//\t\tfor (Libro l :libros) {\n//\t\t\tSystem.out.println(l);\n//\t\t}\n\t}",
"private void mostrarLibro(Libro libro) {\n\t\tSystem.out.println(libro.getId()+\" - \"+libro.getTitulo()+\" - \"+libro.getAutor());\r\n\t}",
"private int buscarLibro(String autor, String titulo) {\n\t\t// TODO Auto-generated method stub\n\t\tint esta = -1, contador = 0;\n\t\tif(numLibs != 0)\n\t\t\tfor(Libro libro : lb) {\n\t\t\t\tif( libro != null )\n\t\t\t\t\tif((libro.getAutor().equalsIgnoreCase(autor) && (libro.getTitulo().equalsIgnoreCase(titulo)))){\n\t\t\t\t\t\testa = contador;\n\t\t\t\t\t}\n\t\t\t\tcontador++;\n\t\t\t}\n\t\treturn esta;\n\t}",
"public interface DAOLibro {\n\t\n\t/**\n\t * Este metodo permite agregar un libro a la libreria\n\t * \n\t * @param libro el libro a agregar\n\t * @return true si se creo exitosamente, false sino\n\t */\n\tpublic boolean crea(Libro libro);\n\t\n\t/**\n\t * Este metodo busca un libro a partir de su nombre\n\t * \n\t * @param nombre el nombre del libro a buscar\n\t * @return una referencia al libro o null si no se encontro\n\t */\n\tpublic Libro recupera(String nombre);\n\t\n\t/**\n\t * Actualiza libro\n\t * \n\t * @param libro\n\t * @return true si se actualizo correctamente, false si no\n\t */\n\tpublic boolean actualiza(Libro libro);\n\n\t/**\n\t * Retira un libro de la libreria\n\t * \n\t * @param libro el libro a retirar\n\t * @return true si se retiro exitosamente, false sino\n\t */\n\tpublic boolean borra(Libro libro);\n\t\n\t/**\n\t * Regresa la lista de todos los libros\n\t * \n\t * @return un ArrayList con todos los libros de la libreria\n\t */\n\tpublic ArrayList<Libro> recuperaTodos();\n\n\n}",
"public Libro(String autorLibro, String tituloLibro, int numeroDePaginas, \n boolean esLibroDeTextoONo)\n {\n autor = autorLibro;\n titulo = tituloLibro;\n numeroPaginas = numeroDePaginas;\n numeroReferencia = \"\";\n vecesPrestado = 0;\n esLibroDeTexto = esLibroDeTextoONo;\n }",
"public void prestamoLibro(libro lib1)\n {\n System.out.println(\"Bienvenido al sistema de prestamos\");\n System.out.println(\"El libro que desea prestar es: \");\n System.out.println(lib1);\n System.out.println(\"Realizaremos la transaccion!\");\n lib1.setDispoLibro(false);\n System.out.println(\"Transaccion realizada!! \");\n }",
"public void devolucionLibro(libro lib1)\n {\n System.out.println(\"Bienvenido al sistema de devolucion! \");\n System.out.println(\"El libro que desea devolver es: \");\n System.out.println(lib1);\n System.out.println(\"Realizaremos la devolucion\");\n lib1.setDispoLibro(true);\n System.out.println(\"Transaccion realizada!! \");\n }",
"public Libro(String codigo, String titulo, String autor, int editorial, String ISBN, String anioEdicion, int numEdicion, int pais, int idioma, String materia, int paginas, String ubicacion, String descripcion, String tipo, String estado) {\r\n this.codigo = codigo;\r\n this.titulo = titulo;\r\n this.autor = autor;\r\n this.editorial = editorial;\r\n this.ISBN = ISBN;\r\n this.anioEdicion = anioEdicion;\r\n this.numEdicion = numEdicion;\r\n this.pais = pais;\r\n this.idioma = idioma;\r\n this.materia = materia;\r\n this.paginas = paginas;\r\n this.ubicacion = ubicacion;\r\n this.descripcion = descripcion;\r\n this.tipo = tipo;\r\n this.estado = estado;\r\n }",
"public List<LibroVO> librosMasLeidos() {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tLibroDAO OwlDAO = new LibroDAO();\n\t\t\tList<LibroVO> resultado = new ArrayList();\n\t\t\tresultado = OwlDAO.obtenerLibrosByVenta(mysql);\n\t\t\tif (resultado.isEmpty()) {\n\t\t\t\tmysql.disconnect();\n\t\t\t\treturn null;\n\n\t\t\t} else {\n\t\t\t\tmysql.disconnect();\n\t\t\t\treturn resultado;\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}",
"public abstract String getLibelle();",
"public Lectura(String libro) {\n this.libro = libro;\n }",
"private void editLibraries() {\n\t\tJOptionPane.showMessageDialog(this, \"No implemented yet!\");\n\t}",
"public Libro() {\n\t\tsuper();\n\t\tthis.id = -1;\n\t\tthis.isbn = \"\";\n\t\tthis.titulo = \"\";\n\t\tthis.editorial = \"\";\n\t\tthis.prestado = false;\n\t}",
"public Libreria() {\n\t\tnumLibs = 0;\n\t\tlb = new Libro[CAP_INICIAL];\n\t}",
"public boolean buscarLibro(String codigoLibro){\n libro = manejadorArchivoLibro.leerArchivo(LIBRO, codigoLibro, \".lib\");\n return libro != null;\n }",
"public static void getLibrary(String user, UsoApi<ArrayList> needResult)\n {\n final String[] response = new String[1];\n final SyncHttpClient client = new SyncHttpClient();\n client.setTimeout(5000);\n\n\n String api = host + \"/library/\" + user;\n\n client.get(api,\n new TextHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, final String res) {\n response[0] = res;\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, final String res, Throwable t) {\n response[0] = res;\n }\n }\n );\n\n ArrayList<BibliotecaTab.BiblioItem> items = new ArrayList<>();\n\n JsonArray listas = new JsonParser().parse(response[0]).getAsJsonObject().get(\"listas\").getAsJsonArray();\n BibliotecaTab.BiblioItem title1 = new BibliotecaTab.BiblioItem();\n title1.tipo = BibliotecaTab.BiblioItem.TITLE;\n title1.title = \"Tus listas de reproducción\";\n items.add(title1);\n\n if(listas.size() == 0)\n {\n BibliotecaTab.BiblioItem title3 = new BibliotecaTab.BiblioItem();\n title3.tipo = BibliotecaTab.BiblioItem.NOTHING;\n title3.title = \"No tienes ninguna lista de reproducción\";\n items.add(title3);\n }\n for(int i=0; i<listas.size(); i++) {\n BibliotecaTab.BiblioItem biblioItem = new BibliotecaTab.BiblioItem();\n biblioItem.tipo = BibliotecaTab.BiblioItem.PLAYLIST;\n Lista lista = new Lista(listas.get(i).getAsJsonObject());\n biblioItem.lista = lista;\n items.add(biblioItem);\n }\n\n JsonArray marchas = new JsonParser().parse(response[0]).getAsJsonObject().get(\"marchas\").getAsJsonArray();\n BibliotecaTab.BiblioItem title2 = new BibliotecaTab.BiblioItem();\n title2.tipo = BibliotecaTab.BiblioItem.TITLE;\n title2.title = \"Tus marchas más escuchadas\";\n items.add(title2);\n if(marchas.size() == 0)\n {\n BibliotecaTab.BiblioItem title3 = new BibliotecaTab.BiblioItem();\n title3.tipo = BibliotecaTab.BiblioItem.NOTHING;\n title3.title = \"Aún no has escuchado ninguna marcha :(\";\n items.add(title3);\n }\n for(int i=0; i<marchas.size(); i++) {\n BibliotecaTab.BiblioItem biblioItem = new BibliotecaTab.BiblioItem();\n biblioItem.tipo = BibliotecaTab.BiblioItem.SONG;\n Marcha marcha = new Marcha(marchas.get(i).getAsJsonObject());\n biblioItem.marcha = marcha;\n items.add(biblioItem);\n }\n\n needResult.result(items);\n }",
"private void cargarSitiosLibres() {\r\n\t\tList<ArrSitioPeriodo> listado = mngRes.sitiosLibresPorPeriodoGenero(periodo.getPrdId(),\r\n\t\t\t\tgetEstudiante().getMatGenero());\r\n\t\thashSitios = new HashMap<String, ArrSitioPeriodo>();\r\n\t\tsitiosLibres = new ArrayList<SelectItem>();\r\n\t\tif (listado != null && !listado.isEmpty()) {\r\n\t\t\tgetSitiosLibres().add(new SelectItem(0, \"Seleccionar\"));\r\n\t\t\tfor (ArrSitioPeriodo sitio : listado) {\r\n\t\t\t\tgetSitiosLibres().add(new SelectItem(sitio.getId().getArtId(), sitio.getSitNombre()));\r\n\t\t\t\thashSitios.put(sitio.getId().getArtId(), sitio);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void cargarCodDocente() {\n ClsNegocioDocente negoDoc = new ClsNegocioDocente(); \n txtCodDocente.setText(negoDoc.ObtenerCodigo());\n try {\n negoDoc.conexion.close();\n } catch (SQLException ex) {\n Logger.getLogger(FrmCRUDDocente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void librosPorCategorian() {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tCategoriaDAO OwlDAO = new CategoriaDAO();\n\t\t\tList<LibroVO> resultado = new ArrayList();\n\t\t\tOwlDAO.actualizarCategorian(mysql);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}",
"public void inicializarCasillasLibres() {\r\n\t\tfor(int i = 0; i<casillas.length; i++) {\r\n\t\t\tfor(int j = 0; j<casillas[0].length;j++) {\r\n\t\t\t\tif(casillas[i][j] == null) {\r\n\t\t\t\t\tcasillas[i][j] = new Casilla(Casilla.LIBRE);\r\n\t\t\t\t\tcasillas[i][j].modificarValor(cantidadMinasAlrededor(i+1, j+1));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}",
"public void cambioLigas(){\n\t\ttry{\n\t\t\tmodelo.updatePartidosEmaitzak(ligasel.getSelectionModel().getSelectedItem().getIdLiga());\n\t\t}catch(ManteniException e){\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public void libroSeleccionado (Libro libro){\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentDetalle fragmentDetalle = (FragmentDetalle)fragmentManager.findFragmentById(R.id.fragmentDetalle);\n\n fragmentDetalle.mostrarDetalle(libro.getResumen());\n\n }",
"public LibroVO VerLibro(int id) {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tLibroDAO OwlDAO = new LibroDAO();\n\t\t\tLibroVO resultado = new LibroVO();\n\t\t\tresultado = OwlDAO.obtenerlibro(id, mysql);\n\t\t\tif (resultado.getId() == -1) {\n\t\t\t\tmysql.disconnect();\n\t\t\t\treturn null;\n\n\t\t\t} else {\n\t\t\t\tmysql.disconnect();\n\t\t\t\treturn resultado;\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tAlarmaLibro a = new AlarmaLibro();\n\t\ta.attach(new Compras());\n\t\ta.attach(new Administracion());\n\t\ta.attach(new Stock());\n\t\t\n\t\tLibro libro = new Libro();\n\t\tlibro.setEstado(\"MALO\");\n\t\t\n\t\tBiblioteca b = new Biblioteca();\n\t\tb.devolverLibro(libro);\n\t\t\n\t}",
"public void aplicarDescuento();",
"@Test\n\tpublic void testRicercaArticolo3() {\n\t\tArticolo l1 = new Libro(\"Titolo1\", \"Autore\", \"Genere\", \n\t\t\t\t\"Collocazione\", b1, 012345 , \"Casa Editrice\", 150);\n\t\tb1.getPossiede().add(l1);\n\t\tString ricerca = \"Titolo1\";\n\t\tArrayList<Articolo> trovati = (ArrayList<Articolo>) \n\t\t\t\tb1.ricercaArticolo(ricerca);\n\t\tassertTrue(\"La lista deve contenere l1\", trovati.contains(l1));\n\t}",
"public Nodo(datos libro)\n {\n this.libro=libro;//LA VARIABLE LIBRO TENDRA LOS DATOS DE LA CLASE LIBRO\n }",
"public ArrayList<String> ModifBaseDescriptif(String nameWord){\n \n String uriWord = rootImportFiles + nameWord;\n String idActuel = null;\n Boolean erreur = false;\n int countUnderscore = 0;\n int countRows = 0;\n ArrayList<ArrayList<String>> docListe = new ArrayList<ArrayList<String>> (); //Création d'un format indicé\n ArrayList<String> returnListe = new ArrayList<String> ();\n returnListe.add(\"\");\n \n try {\n //Importer le word\n FileInputStream fis = new FileInputStream(uriWord);\n XWPFDocument doc = new XWPFDocument(OPCPackage.open(fis));\n List<XWPFTable> table = doc.getTables(); //on extrait tous les tableaux \n \n //Extraction des informations dans un format rigoureux et indicé\n for (XWPFTable xwpfTable : table) { \n //On se trouve dans un tableau particulier. On en extrait les lignes\n countRows = 0;\n String chaineDescription = \"\";\n String chaineParagraph = \"\";\n String runStyle = \"\";\n String testingRunStyle = \"\";\n Boolean first = true;\n ArrayList<String> tableau = new ArrayList<String>();\n List<XWPFTableRow> row = xwpfTable.getRows(); \n for (XWPFTableRow xwpfTableRow : row) { \n List<XWPFTableCell> cell = xwpfTableRow.getTableCells();\n //on extrait les cellules (même si on en a qu'une par ligne)\n for (XWPFTableCell xwpfTableCell : cell) { \n if(xwpfTableCell!=null) { \n if(countRows != 4){ //on est pas dans une description, pas besoin de traiter les styles\n tableau.add(xwpfTableCell.getText());\n }\n else{\n //on est dans une description. On extrait les styles\n for (XWPFParagraph paragraph : xwpfTableCell.getParagraphs()) {\n \n chaineParagraph = \"\";\n runStyle = \"\";\n \n first = true;\n for (XWPFRun run : paragraph.getRuns()) { //on extrait les runs\n \n testingRunStyle = \"normal\";\n \n //on test les textures\n if(!run.isBold() && run.getUnderline().toString().equals(\"SINGLE\") && !run.isItalic())\n testingRunStyle = \"u\";\n if(!run.isBold() && run.getUnderline().toString().equals(\"DASH\") && !run.isItalic())\n testingRunStyle = \"underlinedash\";\n if(!run.isBold() && run.getUnderline().toString().equals(\"NONE\") && run.isItalic())\n testingRunStyle = \"i\";\n if(!run.isBold() && run.getUnderline().toString().equals(\"SINGLE\") && run.isItalic())\n testingRunStyle = \"italic_underline\";\n if(run.isBold() && run.getUnderline().toString().equals(\"NONE\") && !run.isItalic())\n testingRunStyle = \"b\";\n if(run.isBold() && run.getUnderline().toString().equals(\"SINGLE\") && !run.isItalic())\n testingRunStyle = \"bold_underline\";\n if(run.isBold() && run.getUnderline().toString().equals(\"NONE\") && run.isItalic())\n testingRunStyle = \"bold_italic\";\n if(run.isBold() && run.getUnderline().toString().equals(\"SINGLE\") && run.isItalic())\n testingRunStyle = \"bold_underline_italic\";\n \n //on test les couleurs\n if(\"FF0000\".equals(run.getColor()))\n testingRunStyle = \"colorred\";\n if(\"E36C0A\".equals(run.getColor()))\n testingRunStyle = \"colororange\";\n if(\"00B050\".equals(run.getColor()))\n testingRunStyle = \"colorgreen\";\n if(\"0070C0\".equals(run.getColor()))\n testingRunStyle = \"colorblue\";\n \n //on test les surlignages\n if(\"yellow\".equals(run.getTextHightlightColor().toString()))\n testingRunStyle = \"highlightyellow\";\n if(\"cyan\".equals(run.getTextHightlightColor().toString()))\n testingRunStyle = \"highlightcyan\";\n if(\"red\".equals(run.getTextHightlightColor().toString()))\n testingRunStyle = \"highlightred\";\n if(\"green\".equals(run.getTextHightlightColor().toString()))\n testingRunStyle = \"highlightgreen\";\n if(\"magenta\".equals(run.getTextHightlightColor().toString()))\n testingRunStyle = \"highlightmagenta\";\n if(\"lightGray\".equals(run.getTextHightlightColor().toString()))\n testingRunStyle = \"highlightgrey\";\n\n \n //si le style est différent de celui d'avant, on ferme le style d'avant et on ouvre le suivant\n if(!runStyle.equals(testingRunStyle)){\n //s'il y avait un style avant, on le ferme\n if(!first)\n chaineParagraph += \"</\"+runStyle+\">\";\n \n chaineParagraph += \"<\"+testingRunStyle+\">\"; //on ouvre la nouvelle balise de style\n chaineParagraph += run.text();\n runStyle = testingRunStyle;\n }\n else{\n chaineParagraph+= run.text();\n }\n first = false;\n } \n if(!\"\".equals(runStyle))\n chaineParagraph += \"</\"+runStyle+\">\"; //on ferme la dernière balise\n \n if(\"bullet\".equals(paragraph.getNumFmt())){\n chaineDescription += \"<li>\"+chaineParagraph+\"</li>\"; //verif si fermante\n }\n else{ \n chaineDescription += \"<p>\"+chaineParagraph+\"</p>\";\n }\n //chaineDescription += chaineParagraph;\n }\n \n tableau.add(chaineDescription); \n }\n }\n }\n countRows++;\n }\n docListe.add(tableau);\n \n } \n } catch(IOException | InvalidFormatException ex) {\n erreur = true;\n returnListe.set(0, \"Erreur système: l'API POI ne parvient pas à extraire les données\");\n }\n \n //si on a réussi à extraire les données du word, on peut démarrer l'exploitation des données\n if(!erreur){\n //on parcourt la liste des objets\n for(int i = 0; i < docListe.size(); i++){\n //on extrait l'identifiant et on déduit le type d'objet\n idActuel = docListe.get(i).get(0);\n //on compte le nombre de \"_\" dans l'ID\n countUnderscore = 0;\n for (int j = 0; j < idActuel.length(); j++) {\n if (idActuel.charAt(j) == '_') \n countUnderscore++;\n }\n\n JpaUtil.creerContextePersistance();\n try {\n if(countUnderscore < 4){\n if(docListe.get(i).get(1).equals(\"SUPPR\")){ //on traite les suppressions\n //on ajoute à la liste de sortie les idnetifiant à supprimer\n returnListe.add(idActuel);\n }\n else{ //on procède à l'insertion d'un \"titre\" dans la BD\n switch(countUnderscore){\n case 0: //on importe un chapitre en BD\n Chapitre chapitre = null;\n chapitre = chapitreDao.ChercherParId(idActuel);\n JpaUtil.ouvrirTransaction();\n if(chapitre == null){ //on crée le chapitre\n chapitre = new Chapitre(idActuel, docListe.get(i).get(1));\n chapitreDao.Creer(chapitre);\n }\n else{ //on modifie l'intitule du chapitre\n chapitre.setIntituleChapitre(docListe.get(i).get(1));\n chapitreDao.Update(chapitre);\n } \n JpaUtil.validerTransaction();\n break;\n case 1: //on importe une categorie en BD\n Categorie categorie = null;\n categorie = categorieDao.ChercherParId(idActuel); //idActuel est l'identifiant de l'objet que l'on traite\n JpaUtil.ouvrirTransaction();\n if(categorie == null){ //on crée la categorie\n categorie = new Categorie(idActuel, docListe.get(i).get(1));\n categorieDao.Creer(categorie); \n //on va chercher le chapitre parent pour update listeCategorie\n Chapitre chapitreParent = chapitreDao.ChercherParId(idActuel.substring(0, idActuel.lastIndexOf('_'))); //on prend idActuel et on retire le dernier _ et ce qu'il y a derrière\n List<Categorie> listeCategorie = chapitreParent.getListCategorie();\n listeCategorie.add(categorie);\n chapitreParent.setListCategorie(listeCategorie);\n chapitreDao.Update(chapitreParent);\n } else { //on modifie l'initule de la categorie\n categorie.setIntituleCategorie(docListe.get(i).get(1));\n categorieDao.Update(categorie);\n } \n JpaUtil.validerTransaction();\n break; \n\n case 2: //on importe une categorie en BD\n Famille famille = null;\n famille = familleDao.ChercherParId(idActuel);\n JpaUtil.ouvrirTransaction();\n if(famille == null){ //on crée la famille\n famille = new Famille(idActuel, docListe.get(i).get(1));\n familleDao.Creer(famille);\n //on va chercher la categorie parent pour update listeFamille\n Categorie categorieParent = categorieDao.ChercherParId(idActuel.substring(0, idActuel.lastIndexOf('_'))); //on prend idActuel et on retire le dernier _ et ce qu'il y a derrière\n List<Famille> listeFamille = categorieParent.getListeFamille();\n listeFamille.add(famille);\n categorieParent.setListeFamille(listeFamille);\n categorieDao.Update(categorieParent);\n }\n else{ //on modifie l'intitule de la famille\n famille.setIntituleFamille(docListe.get(i).get(1));\n familleDao.Update(famille);\n } \n JpaUtil.validerTransaction();\n break; \n case 3: //on importe une sousFamille en BD\n SousFamille sousFamille = null;\n sousFamille = sousFamilleDao.ChercherParId(idActuel);\n JpaUtil.ouvrirTransaction();\n if(sousFamille == null){ //on crée la sousFamille\n sousFamille = new SousFamille(idActuel, docListe.get(i).get(1));\n sousFamilleDao.Creer(sousFamille);\n //on va chercher la famille parent pour update listeSousFamille\n Famille familleParent = familleDao.ChercherParId(idActuel.substring(0, idActuel.lastIndexOf('_'))); //on prend idActuel et on retire le dernier _ et ce qu'il y a derrière\n List<SousFamille> listeSousFamille = familleParent.getListSousFamille();\n listeSousFamille.add(sousFamille);\n familleParent.setListSousFamille(listeSousFamille);\n familleDao.Update(familleParent);\n }\n else{ //on modifie l'intitule de la sousFamille\n sousFamille.setIntituleSousFamille(docListe.get(i).get(1));\n sousFamilleDao.Update(sousFamille);\n } \n JpaUtil.validerTransaction();\n break;\n }\n }\n }\n //on procède au traitement d'un descriptif\n else{\n //on traite les ajouts\n if(docListe.get(i).get(1).equals(\"AJOUT\")){\n switch(docListe.get(i).get(2)){\n case \"OUVRAGE\":\n Ouvrage ouvrage = null;\n ouvrage = (Ouvrage) descriptifDao.ChercherParId(idActuel);\n JpaUtil.ouvrirTransaction();\n if(ouvrage == null){ //on crée le chapitre\n ouvrage = new Ouvrage(idActuel, docListe.get(i).get(3), docListe.get(i).get(4), docListe.get(i).get(5), docListe.get(i).get(6));\n descriptifDao.Creer(ouvrage);\n //on va chercher la sousFamille parent pour update listeDescriptif\n SousFamille sousFamilleParent = sousFamilleDao.ChercherParId(idActuel.substring(0, idActuel.lastIndexOf('_'))); //on prend idActuel et on retire le dernier _ et ce qu'il y a derrière\n List<Descriptif> listeDescriptif = sousFamilleParent.getListDescriptif();\n listeDescriptif.add(ouvrage);\n sousFamilleParent.setListDescriptif(listeDescriptif);\n sousFamilleDao.Update(sousFamilleParent);\n }\n else{ //on modifie le titre du chapitre\n ouvrage.setNomDescriptif(docListe.get(i).get(3));\n ouvrage.setDescription(docListe.get(i).get(4));\n ouvrage.setCourteDescription(docListe.get(i).get(5));\n descriptifDao.Update(ouvrage);\n } \n JpaUtil.validerTransaction();\n break;\n case \"GENERIQUE\":\n Generique generique = null;\n generique = (Generique) descriptifDao.ChercherParId(idActuel);\n JpaUtil.ouvrirTransaction();\n if(generique == null){ //on crée le chapitre\n generique = new Generique(idActuel, docListe.get(i).get(3), docListe.get(i).get(4), docListe.get(i).get(5));\n descriptifDao.Creer(generique);\n //on va chercher la sousFamille parent pour update listeDescriptif\n SousFamille sousFamilleParent2 = sousFamilleDao.ChercherParId(idActuel.substring(0, idActuel.lastIndexOf('_'))); //on prend idActuel et on retire le dernier _ et ce qu'il y a derrière\n List<Descriptif> listeDescriptif2 = sousFamilleParent2.getListDescriptif();\n listeDescriptif2.add(generique);\n sousFamilleParent2.setListDescriptif(listeDescriptif2);\n sousFamilleDao.Update(sousFamilleParent2);\n }\n else{ //on modifie le titre du chapitre\n generique.setNomDescriptif(docListe.get(i).get(3));\n generique.setDescription(docListe.get(i).get(4));\n generique.setCourteDescription(docListe.get(i).get(5));\n descriptifDao.Update(generique);\n } \n JpaUtil.validerTransaction();\n break; \n case \"PRESTATION\": \n Prestation prestation = null;\n prestation = prestationDao.ChercherParId(idActuel);\n JpaUtil.ouvrirTransaction();\n if(prestation == null){ //on crée la prestation\n prestation = new Prestation(idActuel, docListe.get(i).get(3), docListe.get(i).get(4), docListe.get(i).get(5), docListe.get(i).get(6));\n prestationDao.Creer(prestation);\n //on va chercher l'ouvrage parent pour update listeprestation\n Ouvrage ouvrageParent = (Ouvrage) descriptifDao.ChercherParId(idActuel.substring(0, idActuel.lastIndexOf('_'))); //on prend idActuel et on retire le dernier _ et ce qu'il y a derrière\n List<Prestation> listePrestation = ouvrageParent.getListePrestation();\n listePrestation.add(prestation);\n ouvrageParent.setListePrestation(listePrestation);\n descriptifDao.Update(ouvrageParent);\n }\n else{ //on modifie le titre de la prestation\n prestation.setNomDescriptif(docListe.get(i).get(3));\n prestation.setDescription(docListe.get(i).get(4));\n prestation.setCourteDescription(docListe.get(i).get(5));\n prestationDao.Update(prestation);\n } \n JpaUtil.validerTransaction();\n break;\n }\n }\n //on traite les suppressions\n else{\n //on ajoute à la liste de sortie les idnetifiant à supprimer\n returnListe.add(idActuel);\n }\n } \n } catch(Exception ex){\n returnListe.set(0, \"Problème d'insertion dans la base de donnée (problème de format?). ID: \"+idActuel);\n erreur = true;\n } finally {\n JpaUtil.fermerContextePersistance(); \n }\n }\n }\n \n if(!erreur){\n returnListe.set(0, \"Succes\");\n }\n \n return returnListe;\n }",
"public void init (){\n for (int i = 0; i < tvalores.length; i++) {\n tvalores[i] = Almacen1.LIBRE;\n }\n valoresAlmacenados = 0;\n }",
"private void ImportLibrary(){\n for(int i = 0; i < refact.size(); i++){\n if(refact.get(i).contains(\"import\")){\n for(String library : libraries){\n refact.add(i, library + \"\\r\");\n }\n break;\n }\n }\n\n\n }",
"@Test\n public void testBajarLibro() {\n System.out.println(\"BajarLibro\");\n Libro libro = new LibrosList().getLibros().get(0);\n BibliotecarioController instance = new BibliotecarioController();\n Libro expResult = new LibrosList().getLibros().get(0);\n Libro result = instance.BajarLibro(libro);\n assertEquals(expResult, result);\n System.out.println(\"Libro dado de baja\\ntitulo:\" + result.getTitulo() + \"\\nISBN: \" + result.getIsbn());\n }",
"public BusquedaLibrosForManagedBean() {\r\n libros=new ArrayList<>();\r\n autores=new ArrayList<>();\r\n libro=new Libro(1, 500, \"Codigo limpio\", new Autor(\"Martin\", \"Robert\"));\r\n autores.add(libro.getAutor());\r\n libros.add(libro);\r\n libro=new Libro(2, 300, \"No me hagas pensar\", new Autor(\"Steve\", \"Krug\"));\r\n autores.add(libro.getAutor());\r\n libros.add(libro);\r\n libro=new Libro(3, 350, \"El libro negro del programador\", new Autor(\"Rafael\", \"Gomes\"));\r\n autores.add(libro.getAutor());\r\n libros.add(libro); \r\n libro=new Libro(4, 800, \"Romeo y Julieta\", new Autor(\"William\", \"Sheakespeare\"));\r\n autores.add(libro.getAutor());\r\n libros.add(libro); \r\n libro=new Libro(5, 700, \"Los hombres que no amaban a las mujeres\", new Autor(\"Larsson\", \"Stieg\"));\r\n autores.add(libro.getAutor());\r\n libros.add(libro);\r\n libro=new Libro();\r\n autor=new Autor();\r\n palabra = new String();\r\n dialogo = false;\r\n dialogo2 = false;\r\n }",
"public String getLibelle() {\n return libelle;\n }",
"public List<EjemplarVO> EjemplaresLibro(int id) {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tEjemplarDAO OwlDAO = new EjemplarDAO();\n\t\t\tList<EjemplarVO> resultado = new ArrayList();\n\t\t\tresultado = OwlDAO.obtenerEjemplaresBy(\"libro\", \"\", id, mysql);\n\t\t\tif (resultado.isEmpty()) {\n\t\t\t\tmysql.disconnect();\n\t\t\t\treturn new ArrayList();\n\n\t\t\t} else {\n\t\t\t\tmysql.disconnect();\n\t\t\t\treturn resultado;\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}",
"private void CargarListaFincas() {\n listaFincas = controlgen.GetComboBox(\"SELECT '-1' AS ID, 'Seleccionar' AS DESCRIPCION\\n\" +\n \"UNION\\n\" +\n \"SELECT `id` AS ID, `descripcion` AS DESCRIPCION\\n\" +\n \"FROM `fincas`\\n\"+\n \"/*UNION \\n\"+\n \"SELECT 'ALL' AS ID, 'TODOS' AS DESCRIPCION*/\");\n \n Utilidades.LlenarComboBox(cbFinca, listaFincas, \"DESCRIPCION\");\n \n }",
"public static void main(String[] args) {\n Producto libro=new Libro(); // solo accede a los métodos de la interfaz producto\n libro.setPrecio(25.99);\n libro.setNombre(\"El principito\");\n libro.setColor(\"amarillo\");\n ((Libro)libro).setAutor(\"Jorge Ramirez\"); //castear para usar los otros métodos\n ((Libro)libro).setPaginas(345);\n ((Libro)libro).setIsbn(\"232314\");\n System.out.print(\"Precio: \"+libro.getPrecio()+\"\\nNombre: \"+ libro.getNombre()+\"\\nColor: \"+libro.getColor());\n System.out.print(\"\\nAutor: \"+((Libro) libro).getAutor()+\"\\nPáginas: \"+((Libro) libro).getPaginas()+\"\\nISBN: \"+((Libro) libro).getIsbn());\n System.out.print(\"\\nCódigo de barras: \"+libro.getCodigoBarras());\n }",
"public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }",
"private void limpiarDatos() {\n\t\t\n\t}",
"private static void alta(ArrayList<Libro> catalogo) {\n\t\tString datosLibro = obtenerDatosLibro();\n\t\t// titulo:isbn:genero:autor:paginas\n\t\t// Procesar la entrada\n\t\tLibro libro = procesaEntrada(datosLibro);\n\t\t// Crear el libro con los datos de la entrada\n\t\tcatalogo.add(libro);\n\t\t// Meter el libro en el catalogo\n\t}",
"public java.lang.String getLibelle(){\r\n return this.libelle;\r\n }",
"@Test\n\tpublic void testRicercaArticolo2() {\n\t\tArticolo l1 = new Libro(\"Titolo1\", \"Autore\", \"Genere\", \n\t\t\t\t\"Collocazione\", b1, 012345 , \"Casa Editrice\", 150);\n\t\tb1.getPossiede().add(l1);\n\t\tString ricerca = \"NO\";\n\t\tArrayList<Articolo> trovati = (ArrayList<Articolo>) \n\t\t\t\tb1.ricercaArticolo(ricerca);\n\t\tassertTrue(\"La lista deve essere vuota\", trovati.isEmpty());\n\t}",
"public int getIdLibro()\n {\n return id;\n }",
"public Libreria(String nombre)\n {\n libros = new ArrayList<>();\n this.nombre = nombre;\n\n }",
"public static void getALibrary()\n \t{\n \t\tProject.pmActive = true;\n \n \t\t// find a list of files (libraries) in the repository\n \t\tString dirName = Project.getRepositoryLocation();\n \t\tFile dir = new File(dirName);\n \t\tFile [] filesInDir = dir.listFiles();\n \t\tif (filesInDir == null && dirName.length() == 0)\n \t\t{\n \t\t\tJob.getUserInterface().showInformationMessage(\"No repository location is set. Use the 'Project Management' Preferences to set it.\", \"Warning\");\n \t\t\treturn;\n \t\t}\n \n \t\t// choose one and read it in\n \t\tnew LibraryDialog(filesInDir);\n \t}",
"public void seleccionSitio() {\r\n\t\tif (sitioId != null) {\r\n\t\t\tsitio = hashSitios.get(sitioId);\r\n\t\t\tcargarEstudiantesSitio();\r\n\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\tSystem.out.println(libres);\r\n\t\t}\r\n\t}",
"public String getLibelle() {\n\t\treturn _libelle;\n\t}",
"public void limpiarMemoria();",
"public void listarDocDaDisciplina(){\r\n for(int i=0;i<docentes.size();i++){\r\n System.out.println(docentes.get(i).toString());\r\n }\r\n }",
"Reserva Obtener();",
"public void setIdLibro(Integer idLibro) {\n this.idLibro = idLibro;\n }",
"public String getLibro() {\n return libro;\n }",
"public void limpiar() {\n\t\taut_empleado.limpiar();\n\t\tutilitario.addUpdate(\"aut_empleado\");// limpia y refresca el autocompletar\n\n\n\t}",
"public Vector<String> LecturaFitxer()\r\n\t{\r\n\t\tVector<String> filas= new Vector<String>();\r\n\t\tif (this.ftxt.GetFile().exists())\r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tBufferedReader br=this.ftxt.ObrirFitxerLectura();\r\n\t\t\t\twhile (br.ready())\r\n\t\t\t\t{\r\n\t\t\t\t\tfilas.add(br.readLine());\r\n\t\t\t\t}\r\n\t\t\t\tthis.ftxt.TancarFitxerDeLectura(br);\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\tGestorDiscConstants.PS(GestorDiscConstants.ERROR_IO);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn filas;\r\n\t}",
"@Override\n public String toString() {\n return \"Libro{\" + \"idLibro=\" + idLibro + \", titulo=\" + titulo + \", autor=\" + autor + \", editorial=\" + editorial + \", isbn=\" + isbn + \", genero=\" + genero + \", cantidadTotal=\" + cantidadTotal + \", cantidadDisponible=\" + cantidadDisponible + \", descargable=\" + descargable + \", linkDescarga=\" + linkDescarga + \", bibliotecario=\" + bibliotecario + '}';\n }",
"public void setNombreLibro(String nombreNuevoLibro)\n {\n this.nombre = nombreNuevoLibro;\n }",
"private static void etapa3Urna() {\n\t\t\n\t\turna.contabilizarVotosPorCandidato(enderecoCandidatos);\n\t\t\n\t}",
"public boolean crea(Libro libro);",
"@Test\n public void testModificarLibro() {\n System.out.println(\"ModificarLibro\");\n Libro libro = new LibrosList().getLibros().get(0);\n BibliotecarioController instance = new BibliotecarioController();\n Libro expResult = new LibrosList().getLibros().get(0);\n Libro result = instance.ModificarLibro(libro);\n assertEquals(expResult, result);\n System.out.println(\"Libro modificado\\ntitulo:\" + result.getTitulo() + \"\\nISBN: \" + result.getIsbn());\n }",
"String getAnnoPubblicazione();",
"public Libro() {\r\n }",
"public String getLibelle() {\n\t\treturn getTo(true).getLibelle();\n\t}",
"public boolean insertarLibro(String nombreLibro, String escritor, String editorial, String lanzamiento, String genero, String descripcion) throws SQLException {\r\n String inserccion = \"Insert into libro VALUES(\" + \"'\" + nombreLibro + \"','\" + escritor + \"','\" + editorial + \"','\" + lanzamiento + \"','\" + genero + \"','\" + descripcion + \"' ,0)\";\r\n boolean resul = insertarOActualizarCampos(inserccion);\r\n return resul;\r\n }",
"Jugador consultarGanador();",
"public void cargaJCIdiomas() {\n for (String idioma : lIdiomas) {\n Menus.jCIdioma.addItem(idioma);\n }\n }",
"@RequestMapping(value = \"/liburall\",method = RequestMethod.GET)\n\t public List<Libur> liburList(){\n\t return liburService.getAllLibur();\n\t }",
"public void listarProducto() {\n }",
"public String getLibCompletUeChoisie() {\r\n\t\tif (eoDiplSelected != null) {\r\n\t\t\treturn (String)eoDiplSelected.valueForKey(\"mueCode\")+ \" \" +\r\n\t\t\t(String)eoDiplSelected.valueForKey(\"mueLibelle\");\r\n\t\t}\r\n\t\telse return null;\r\n\t}",
"private void inicializarcomponentes() {\n Comunes.cargarJList(jListBecas, becasFacade.getTodasBecasVigentes());\n \n }",
"public Modul buscarModul(String nomModul) throws ExceptionBuscar;",
"@Test\n public void testAltaLibro() {\n System.out.println(\"AltaLibro\");\n Long id = new Long(1);\n String isbn = \"isbn\";\n String titulo = \"Don Quijote de la Mancha\";\n String autor = \"Miguel de Cervantes\";\n Integer numPaginas = 10;\n Date fechaAlta = new Date(1,02,2021);\n Integer numDisponibles = 5;\n BibliotecarioController instance = new BibliotecarioController();\n Libro result = instance.AltaLibro(id, isbn, titulo, autor, numPaginas, fechaAlta, numDisponibles);\n assertEquals(id, result.getId());\n assertEquals(isbn, result.getIsbn());\n assertEquals(titulo, result.getTitulo());\n assertEquals(autor, result.getAutor());\n assertEquals(numPaginas, result.getNumPaginas());\n assertEquals(fechaAlta, result.getFechaAlta());\n assertEquals(numDisponibles, result.getNumDisponibles());\n\n }",
"Curso modificaCurso(Curso curso);",
"public void cargarProductosComprados() {\n try {\n //Lectura de los objetos de tipo productoComprado\n FileInputStream archivo= new FileInputStream(\"productosComprados\"+this.getCorreo()+\".dat\");\n ObjectInputStream ruta = new ObjectInputStream(archivo);\n productosComprados = (ArrayList) ruta.readObject();\n archivo.close();\n \n \n } catch (IOException ioe) {\n System.out.println(\"Error de IO: \" + ioe.getMessage());\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"Error de clase no encontrada: \" + cnfe.getMessage());\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }",
"public void cargarUltimasSeisLibrerias(ArrayList<Libreria> librerias){\n\t\tArrayList <Libreria> libs = Utilitats.getLibrerias();\n\t\tint contador = 0;\n\t\tint i = libs.size()-1;\n\t\tBoolean verdadero = false;\n\t\tif(libs ==null){\n\t\t\tdo{\n\t\t\t\tlibrerias.add(new Libreria());\n\t\t\t\tcontador++;\n\t\t\t} while(contador!=6);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdo\n\t\t\t{\n\t\t\t\tLibreria ll= libs.get(i);\n\t\t\t\tlibrerias.add(ll);\n\t\t\t\ti--;\n\t\t\t\tcontador++;\n\t\t\t} while (contador != 6 && i!=-1);\n\t\t\tif(contador!=6){\n\t\t\t\tdo{\n\t\t\t\t\tlibrerias.add(new Libreria());\n\t\t\t\t\tcontador++;\n\t\t\t\t} while(contador!=6);\n\t\t\t}\n\t\t}\n\t}",
"public String cargarDatos()\r\n/* 137: */ {\r\n/* 138:163 */ limpiar();\r\n/* 139:164 */ return \"\";\r\n/* 140: */ }",
"public static void main(String[] args) {\r\n Libreria objLibro=new Libreria();\r\n int opcion;\r\n do {\r\n opcion=Integer.parseInt(JOptionPane.showInputDialog(\"Selecciona la opcion que quieras realizar:\\n1=Añadir libro\\n2=Borrar libro\\n3=Amosar todos os libros\\n4=Dar de baixa\\n5=Consultar libro\"));\r\n \r\n switch(opcion){\r\n case 1:objLibro.engadirLibros();\r\n break;\r\n case 2:objLibro.venderLibro();\r\n break;\r\n case 3:objLibro.amosarLibros();\r\n break;\r\n case 4:objLibro.darDeBaixa();\r\n break;\r\n case 5:objLibro.consultarLibro();\r\n break;\r\n case 6:System.exit(0);\r\n }\r\n \r\n }while(opcion<6||opcion>0);\r\n }",
"public int nbLibres() {\n\t\tint libre = 0;\n\t\tfor(Borne b : bornes) {\n\t\t\tlibre += b.getEtatBorne();\n\t\t}\n\t\treturn libre;\n\t}",
"public static void importToFile() throws IOException {\n String fileName = \"Prova.txt\";\n ArrayList<String> fileLines = new ArrayList<>();\n int libriImported = 0;\n try (BufferedReader inputStream = new BufferedReader(new FileReader(fileName))) {\n String l;\n while ((l = inputStream.readLine()) != null) {\n fileLines.add(l);\n }\n for (String s : fileLines) {\n String[] splitter = s.split(\";\");\n Libro lib = LibroConvert(splitter);\n Biblioteca.getBiblioteca().add(lib);\n libriImported++;\n }\n }\n System.out.println(\"Ho importato \" + libriImported + \"libri\");\n }",
"public static void preguntarTipoDeLibroPorRegistrar() {\n\t\tSystem.out.println(\"Ingresa el numero de la opcion deseada y preciona enter\");\n\t\tSystem.out.println(\"1 - Registrar Diccionario\");\n\t\tSystem.out.println(\"2 - Registrar Enciclopedia\");\n\t\tSystem.out.println(\"3 - Registar Novela\");\n\t}",
"public RenovarLicencia() {\n //borrar todo cuando este listo el metodo de abajo\n initComponents();\n setTitle(\"Renovar Licencia\");\n setLocationRelativeTo(null);\n //se pide al gestor y se muestra por pantalla los datos del administrativo registrado\n txt_user.setText(GestorAdministrativo.getInstance().getAdministrativo().getUsername());\n txt_nombre_user.setText(GestorAdministrativo.getInstance().getAdministrativo().getNombre() + \" \" + GestorAdministrativo.getInstance().getAdministrativo().getApellido());\n //borrar hasta aca\n }",
"public abstract void setLibelle(String unLibelle);",
"public static void main(String[] args) {\n\t\t\n\t\tRubro rubro1= new Rubro (\"Cafeteria\");\n\t\t\n\t\t// inicializo el arreglo de importes\n\t\t\n\t\trubro1.inicializarGastos();\n\t\t\n\t\t\n\t\t// le cargo a enero y febrero gastos // pruebo método agregarGasto\n\t\t\n\t\trubro1.agregarGasto(MESDELANIO.ABRIL, 100);\n\t\trubro1.agregarGasto(MESDELANIO.ENERO, 200);\n\n\t\t\n\t\t// VEO QUE LO HAYA CARGADO BIEN\n\t\t\n\t\tSystem.out.println(rubro1);\n\t\t\n\t\n\t\t// pruebo método getNombre()\n\n\t\trubro1.getName();\n\t\tSystem.out.println(rubro1.getName());\n\t\t\n\t\t// pruebo método getTotalGastos - pido enero y pido abril \n\t\t// debería darme 200 y 100\n\t\t\n\t\trubro1.getTotalGastos(MESDELANIO.ENERO);\n\t\trubro1.getTotalGastos(MESDELANIO.ABRIL);\n\n\t\tSystem.out.println(rubro1.getTotalGastos(MESDELANIO.ENERO));\n\t\tSystem.out.println(rubro1.getTotalGastos(MESDELANIO.ABRIL));\n\t\t\n\t\t\n\t\t/// ---- MÉTODOS DE GASTOSTOTAL\n\t\t\n\t\t\n\t\t// Creo un objeto gasto anual\n\t\t\n\t\tGastoAnual gasto2020 = new GastoAnual ();\n\t\t\n\t\t// AGREGO rubros\n\t\tgasto2020.agregarRubro(rubro1);\n\t\t\n\t\t// pruebo el método AgregarGasto\n\t\t\n\t\tgasto2020.agregarGastoNuevo(MESDELANIO.ENERO, \"Cafeteria\", 200);\n\t\tgasto2020.agregarGastoNuevo(MESDELANIO.ENERO, \"Cafeteria\", 200);\n\t\n\t\t\n // esto debería agregar 200 pesos a cafeteria, lo cual daría un total de 400 \n\t\t\n\t\trubro1.getTotalGastos(MESDELANIO.ENERO);\n\t\tSystem.out.println(rubro1.getTotalGastos(MESDELANIO.ENERO));\n\t\t\n\t\t\n\t\t// ahora pruebo si agrega un rubro que no existe con AgregarGastoNuevo\n\t\t\n\tgasto2020.agregarGastoNuevo(MESDELANIO.MARZO, \"Tintoreria\", 200);\n\tSystem.out.println(gasto2020);\n\t\t \n\t\t\n\t\t// pruebo consolidadoDeGastos()\n\t\t\n\t\tgasto2020.consolidadoDeGastos();\n\t\t\n\t\t// pruebo gastoAcumulado(MESDELANIO mes) \n\t\t\n\t\tgasto2020.gastoAcumulado(MESDELANIO.ENERO);\n\t\tgasto2020.gastoAcumulado(MESDELANIO.FEBRERO);\n\t\tgasto2020.gastoAcumulado(MESDELANIO.MARZO);\n\t\t\n\t\t// deberia dar 400\n\t\t\n\t\tSystem.out.println(gasto2020.gastoAcumulado(MESDELANIO.ENERO));\n\t\t\n\t\t// deberia dar 0 \n\t\t\n\t\tSystem.out.println(gasto2020.gastoAcumulado(MESDELANIO.FEBRERO));\n\t\t\n\t\t// deberia dar 200\n\n\t\tSystem.out.println(gasto2020.gastoAcumulado(MESDELANIO.MARZO));\n\n\t\t\n\t\t\n\t\t// pruebo gastoAcumulado(String nombreRubro) por rubro\n\t\t\n\t\tgasto2020.gastoAcumulado(\"Cafeteria\");\n\t\t\n\t\t// debería dar 400\n\t\t\n\t\tSystem.out.println(gasto2020.gastoAcumulado(\"Cafeteria\"));\n\t\t\n\t\t// debería dar 200 \n\t\tSystem.out.println(gasto2020.gastoAcumulado(\"Tintoreria\"));\n\t\t\n\t\t\n\t\t// debería dar -1\n\t\tSystem.out.println(gasto2020.gastoAcumulado(\"Supermercado\"));\n\t\t\n\t\t\n\t\t// pruebo informarConsumoPorMes y por promedio \n\t\t\n\t\tgasto2020.informarConsumosPorMes();\n\t\t\n\t\t\n\t\t// pruebo public void informarMesMayorConsumo() - debe darme enero con 400 \n\t\t\n\t\t\n\t\tgasto2020.informarMesMayorConsumo();\n\t\t\n\n\t\n\t\t\n\t\t\n\n\t}",
"private void cargarModelo() {\n dlmLibros = new DefaultListModel<>();\n listaLibros.setModel(dlmLibros);\n }",
"public void mostrarLbros(ArrayList<Libro> libros) {\n\t\tIterator<Libro> i=libros.iterator();\r\n\t\t\r\n\t\twhile(i.hasNext()){\r\n\t\t\tmostrarLibro(i.next());\r\n\t\t}\r\n\t\t\r\n\t}",
"public static void recorrerColeccion(SortedSet<Libro> libros) {\n Iterator it = libros.iterator();\n while (it.hasNext()) {\n Libro x = (Libro) it.next();\n System.out.println(x.getTitulo());\n\n }\n }",
"public void cargarProductosVendidos() {\n try {\n //Lectura de los objetos de tipo productosVendidos\n FileInputStream archivo= new FileInputStream(\"productosVendidos\"+this.getCorreo()+\".dat\");\n ObjectInputStream ruta = new ObjectInputStream(archivo);\n productosVendidos = (ArrayList) ruta.readObject();\n archivo.close();\n \n \n } catch (IOException ioe) {\n System.out.println(\"Error de IO: \" + ioe.getMessage());\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"Error de clase no encontrada: \" + cnfe.getMessage());\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }",
"public List<Libro> getListaDeLibros() {\r\n\t\treturn listaDeLibros;\r\n\t}",
"public void afegirABultoSortida(Number iddoc, Number idlin, String idart, Number cantot, Number pes, boolean absolut)\n {\n Object [] obj = {getIdexped(), getIdbulto(), iddoc, idlin};\n Key key = new Key(obj);\n Row [] rows = getSgaexpedlbulto().findByKey(key, 1);\n if (rows != null && rows.length > 0)\n {\n SgaexpedlbultoImpl lbulto = (SgaexpedlbultoImpl)((ViewRowImpl)rows[0]).getEntity(0); \n if (!absolut)\n {\n // cantidades parciales\n lbulto.setCantot(lbulto.getCantot().add(cantot)); \n lbulto.setPeso(lbulto.getPeso().add(pes));\n }\n else\n {\n // cantidades totales\n lbulto.setCantot(cantot); \n lbulto.setPeso(pes);\n\n }\n // Retrieve cantot, may be needed below\n cantot = lbulto.getCantot();\n\n }\n else\n {\n SgaexpedlbultoImpl noulbulto = (SgaexpedlbultoImpl)getSgaexpedlbulto().createRow();\n noulbulto.setIdexped(getIdexped());\n noulbulto.setIddoc(iddoc);\n noulbulto.setIdlin(idlin);\n noulbulto.setCantot(cantot);\n noulbulto.setPeso(pes);\n \n \n getSgaexpedlbulto().insertRow(noulbulto);\n \n // Michael: Ja no correspond amb el bulto original\n setIdbultoOri(null);\n \n \n }\n // Veure si podem trobar tipus d'embalum, dimensions, i pes per comanda d'export,\n// SgacdocImpl cdoc = getSgacdoc();\n// if (cdoc.isExport()) \n// {\n// AppModuleImpl appModule = (AppModuleImpl)getDBTransaction().getRootApplicationModule();\n// \n// SgatipobultoParamViewRowImpl row = appModule.getSgatipobultoRow(idart, cantot);\n// if (row != null) \n// {\n// setAlto(row.getAlto());\n// setAncho(row.getAncho());\n// setLargo(row.getLargo());\n// setPesocont(row.getPeso());\n// setIdtipobulto(row.getIdtip());\n// }\n// \n// }\n\n }",
"public Integer getIdLibro() {\n return idLibro;\n }",
"private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }",
"public Libro getLIBRO() {\r\n return LIBRO;\r\n }",
"Bundle mo29838Oa() throws RemoteException;",
"private static void comprobarBBDD() {\n\t\tSQLiteHelper usdbh = new SQLiteHelper(contexto, \"baseDeDatos\", null, 1);\n\n\t\tSQLiteDatabase db = usdbh.getReadableDatabase();\n\t\t\n\t\tlistaTarjetas.clear();\n\n\t\t// Si hemos abierto correctamente la base de datos\n\t\tif (db != null) {\n\t\t\t// Consultamos el valor esLaPrimeraVez\n\t\t\tCursor c = db.rawQuery(\"SELECT * from Tarjetas;\", null);\n\t\t\t// Nos aseguramos de que existe al menos un registro\n\t\t\t// Nos aseguramos de que existe al menos un registro\n\t\t\tif (c.moveToFirst()) {\n\t\t\t\tdo {\n\t\t\t\t\tlistaTarjetas.add(new Tarjetas(c.getString(0), c\n\t\t\t\t\t\t\t.getString(1), c.getString(2), c.getString(3)));\n\t\t\t\t\t// Herramientas.getYo().setId(c.getString(0));\n\t\t\t\t} while (c.moveToNext());\n\t\t\t}\n\t\t\tif (listaTarjetas.size() == 0)\n\t\t\t{\n\t\t\t\tNfcAdapter nfcAdapter = nfcAdapter = NfcAdapter.getDefaultAdapter(contexto);\n\n\t\t\t\tif (nfcAdapter == null) { \n\t\t\t\t\tlistaTarjetas.add(new Tarjetas(\"\", \"\",contexto.getResources().getString(R.string.textoVacio1),\"\"));\n\t\t\t\t}\n\t\t\t\telse if (!nfcAdapter.isEnabled()) {\n\t\t\t\t\tlistaTarjetas.add(new Tarjetas(\"\", \"\",contexto.getResources().getString(R.string.textoVacio1),\"\"));\n\t\t\t\t} else {\n\t\t\t\t\tlistaTarjetas.add(new Tarjetas(\"\", \"\",contexto.getResources().getString(R.string.textoVacio2),\"\"));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tdb.close();\n\t\t}\n\t}",
"public void mostrarMenuLectura(TomarLectura tomarLectura, Lectura lecturaActual);",
"public void gerarReceitaLiquidaIndiretaDeEsgoto() \n\t\t\tthrows ErroRepositorioException;",
"public static void devolucion(int id, int codigo) throws Exception {\n\t\tint n = localizarPosicionPrestamo(id, codigo);\n\t\tSystem.out.println(n);\n\t\t// ###########################################################################\n\t\t// Cambios en el Fichero de FPRESTAMOS (Ver Clase Const)\n\t\tf = new RandomAccessFile(Const.FPRESTAMOS, \"rw\");\n\t\tArchivos.irARegistro(f, id, Usuario.getlongitugRegistroUsuarioPrestamos());\n\t\tUsuario u = new Usuario();\n\t\tu.leer(f);\n\n\t\t// almaceno en FP la posicion actial del puntero para seguir en el usuario pero\n\t\t// solo para accder de forma directa a los libros prestados.\n\n\t\t// fp |> posicion del puntero en el fichero justo despues de leer el usuario\n\t\t// seleccionado\n\t\tint fp = (int) f.getFilePointer();\n\n\t\t// n |> posicion del libro el cual se quiere devolver por parte del usuario\n\t\tf.seek(fp + (n * Libro.getLongitudRegistroLibro()));\n\t\tLibro l = new Libro();\n\t\tl = new Libro(-1, \"\", false);\n\t\tl.escribir(f);\n\n\t\t// ###########################################################################\n\t\t// Cambios en el fichero de FLIBROS (Ver Clase Const)\n\t\t// Escribe en dicho fichero el libro pero con el atributo de Prestado como False\n\t\tf = new RandomAccessFile(Const.FLIBROS, \"rw\");\n\t\tl = new Libro();\n\t\tArchivos.retrocederRegistroLibro(f, codigo, Libro.getLongitudRegistroLibro(), l);\n\t\tl.prestado = false;\n\t\tl.escribir(f);\n\n\t\t// ###########################################################################\n\t\t// Cambios en el fichero de FLIBROASIGNADOA (Ver Clase Const)\n\t\t// Escribe en dicho fichero un libro y un suaurio Nulo con valores nulos\n\t\tf = new RandomAccessFile(Const.FLIBROASIGNADOA, \"rw\");\n\t\tArchivos.irARegistro(f, codigo, Const.N);\n\n\t\t// finalmente se crea y escriben usuario y libros nulos en el fichero\n\t\tl = new Libro(-1, \"\", false);\n\t\tl.escribir(f);\n\n\t\tu = new Usuario(\"\", -1);\n\t\tu.escribir(f);\n\n\t\tf.close();\n\n\t}",
"public ingresarBiblioteca() {\n initComponents();\n this.nombreUsuario.setText(usuariosID[0].getNombre());\n this.Picture.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.PLAIN,10));\n usuario.insertarInicio(this.nombreUsuario.getText()/*, carpeta*/);\n usuario.obtenerNodo(0).getArchivo().insertarFinal(\"GENERAL\");//carpeta.insertarFinal(\"GENERAL\");\n }",
"private void scanRepository(String type, HashMap<String, String> liste) {\n String chemin = new String(Parameters.COMPONENTS_REPOSITORY+\"/\"+type);\n//System.out.println(\"explore : \"+chemin);\n File depot = new File(chemin);\n File[] fichiers = depot.listFiles(); // liste des fichiers contenus dans ce repertoire\n for (int i = 0; i<fichiers.length; i++) { // explorer ces fichiers\n if (fichiers[i].isFile()) { // c'est un fichier\n if (fichiers[i].getName().endsWith(\".jar\")) { // c'est un fichier .jar\n try {\n JarFile accesJar = new JarFile(fichiers[i]);\n Manifest manifest = accesJar.getManifest(); // recuperer le manifest de ce fichier\n // Recuperer le nom de la classe du composant metier (dans ce manifest)\n String classeCM = manifest.getMainAttributes().getValue(KalimuchoClassLoader.BC_CLASS);\n liste.put(classeCM, fichiers[i].getName());\n//System.out.println(\"ajoute : (\"+classeCM+\" , \"+fichiers[i].getName()+\")\");\n }\n catch (IOException ioe) {\n System.err.println(\"Can't access to jar file \"+fichiers[i].getName()+\" in \"+chemin);\n }\n }\n }\n }\n }",
"@Override\n public Libro getLibro(long isbn) throws PortalException, SystemException {\n return libroPersistence.findByPrimaryKey(isbn);\n }",
"public void modificarCompraComic();",
"public void consultarEditorialesDAO() {\n Collection<Editorial> editoriales = em.createQuery(\"SELECT e\"\n + \" FROM Editorial e\").getResultList();\n\n //Iteramos entre autores\n for (Editorial e : editoriales) {\n\n System.out.println(e.getNombre());\n\n }\n\n }"
] | [
"0.6574833",
"0.63480127",
"0.6320762",
"0.6209963",
"0.61550117",
"0.6102892",
"0.607509",
"0.604889",
"0.59577656",
"0.5909291",
"0.5881754",
"0.5873633",
"0.58443886",
"0.5811071",
"0.57831997",
"0.577846",
"0.5708771",
"0.56677675",
"0.5664658",
"0.56420183",
"0.5609155",
"0.5592882",
"0.5592476",
"0.55724376",
"0.5568985",
"0.5530198",
"0.5530015",
"0.5527431",
"0.5523643",
"0.55184096",
"0.5515643",
"0.5507957",
"0.5506426",
"0.5473953",
"0.5457716",
"0.54374725",
"0.5437171",
"0.5423459",
"0.5391974",
"0.5391158",
"0.53834105",
"0.5381533",
"0.53775996",
"0.5375313",
"0.53654194",
"0.535736",
"0.5354208",
"0.533813",
"0.5336483",
"0.5331473",
"0.53275055",
"0.5324885",
"0.5323718",
"0.53224665",
"0.5321215",
"0.53159195",
"0.5308507",
"0.530661",
"0.5302839",
"0.5301041",
"0.5297088",
"0.529674",
"0.5290283",
"0.5289492",
"0.52827626",
"0.5281852",
"0.5280705",
"0.5269616",
"0.52632487",
"0.5255848",
"0.5255832",
"0.5252716",
"0.5242822",
"0.5238516",
"0.52358025",
"0.5231875",
"0.52295655",
"0.5223306",
"0.5221646",
"0.52193815",
"0.5212739",
"0.520117",
"0.52008426",
"0.5198135",
"0.5181788",
"0.517909",
"0.5178487",
"0.51779824",
"0.51761913",
"0.51719314",
"0.51708794",
"0.51590794",
"0.51589257",
"0.5150731",
"0.51437575",
"0.51413226",
"0.51366055",
"0.5134195",
"0.51336724",
"0.5130396",
"0.5129933"
] | 0.0 | -1 |
Consulta 3: Libros de un autor | public List<Book> getBooksByAuthorId(Long authId) {
String queryStr = "SELECT b FROM BookAuthor b where b.author.id = :coAuthor";
Query query = em.createQuery(queryStr);
query.setParameter("coAuthor", authId);
return query.getResultList();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Asignacion_usuario_Perfil1() {\n int CodigoAplicacion = 120;\n initComponents();\n llenadoDeCombos();\n llenadoDeTablas();\n \n\n \n }",
"Reserva Obtener();",
"public static void tener_Usuario_activo() {\n\t\t\t\tdesktop.<DomTextField>find(\"//BrowserApplication//BrowserWindow//input[@id='username']\").typeKeys(\"ocastro\");\n\t\t\t\tdesktop.<DomTextField>find(\"//BrowserApplication//BrowserWindow//input[@id='password']\").setText(\"bogota2016\");\n\t\t\t\tdesktop.<DomButton>find(\"//BrowserApplication//BrowserWindow//input[@id='loginbtn']\").click();\n\t\t\t\t//end recording\n\t\t\t\tSerenity.takeScreenshot();\n\t}",
"protected void accionUsuario() {\n\t\t\r\n\t}",
"public void altaUsuario();",
"public void setAutor(String autor) {\n this.autor = autor;\n }",
"public RenovarLicencia() {\n //borrar todo cuando este listo el metodo de abajo\n initComponents();\n setTitle(\"Renovar Licencia\");\n setLocationRelativeTo(null);\n //se pide al gestor y se muestra por pantalla los datos del administrativo registrado\n txt_user.setText(GestorAdministrativo.getInstance().getAdministrativo().getUsername());\n txt_nombre_user.setText(GestorAdministrativo.getInstance().getAdministrativo().getNombre() + \" \" + GestorAdministrativo.getInstance().getAdministrativo().getApellido());\n //borrar hasta aca\n }",
"com.soa.SolicitarCreditoDocument.SolicitarCredito getSolicitarCredito();",
"public Cgg_res_oficial_seguimiento_usuario(){}",
"public static String getAutor(int idLibro)\r\n\t{\r\n\t\treturn autores[idLibro];\r\n\t}",
"private void cargarAutorizaciones() {\r\n\t\tif (parametros_empresa != null) {\r\n\t\t\tif (parametros_empresa.getTrabaja_autorizacion()) {\r\n\t\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\t\tadmision_seleccionada);\r\n\r\n\t\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\t\tIRutas_historia.PAGINA_AUTORIZACIONES,\r\n\t\t\t\t\t\t\"AUTORIZACIONES\", parametros);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public usuarios Cargar_Usuario(int cedula) {\r\n base_datos_Usuarios ae_db = new base_datos_Usuarios();\r\n usuarios informacion_usuario = ae_db.Buscar_Usuario_DB(cedula);\r\n return informacion_usuario;\r\n }",
"public void limpiar() {\n\t\taut_empleado.limpiar();\n\t\tutilitario.addUpdate(\"aut_empleado\");// limpia y refresca el autocompletar\n\n\n\t}",
"@Override\n\tpublic void credite() {\n\t\t\n\t}",
"void grabarCliente(){\n RequestParams params = new RequestParams();\n params.put(\"nombre\",edtNombre.getText().toString().trim());\n params.put(\"apellido\",edtApellido.getText().toString().trim());\n params.put(\"correo\", edtCorreo.getText().toString().trim());\n String claveMD5 = edtClave.getText().toString().trim();\n try {\n params.put(\"clave\", ws.getMD5(claveMD5));\n } catch (Exception e) {\n e.printStackTrace();\n }\n params.put(\"id_cargo\",idCargo);\n params.put(\"autoriza\",validarCheckBoxAutoriza());\n crearUsuarioWS(params);\n }",
"public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }",
"public void consultarUsuario (List<Aeropuerto> mundoA,List<Ruta> mundoR, String n4Origen, String n4Destino){\n\t\t\n\t\t String paisAux = n4Origen;\n\t\t String paisOrigen = '\"' + paisAux + '\"';\n\t\t System.out.println(\" \");\n\t\t origen = dameAeropuertos(paisOrigen, mundoA);\n\t\t \n\t\t System.out.println(\" \");\n\t\t \n\t\t \n\t\t paisAux = n4Destino;\n\t\t String paisDestino = '\"' + paisAux + '\"';\n\t\t System.out.println(\" \");\n\t\t destino = dameAeropuertos(paisDestino,mundoA);\n\t\t \n\t\t //Ruta\n\t\t System.out.println(\" \");\n\t\t System.out.println(origen.getNombre() + \" ---> \" + destino.getNombre());\n\t\t dibujarRuta(origen,destino,mundoA,mundoR);\n\t\t \n\t }",
"public TelaPrincipal3() {\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {\n Logger.getLogger(CadastroFuncionario.class.getName()).log(Level.SEVERE, null, ex);\n }\n initComponents();\n BeansLogin l = new BeansLogin();\n cpf.setText(\"Bem Vindo, \"+l.getNome());\n String credito = \"\" + l.getCredito();\n saldoMostrar.setText(credito);\n }",
"private DittaAutonoleggio(){\n \n }",
"public List<NotaDeCredito> procesar();",
"private void valider() {\n\n\t\t/**\n\t\t * Renvoie un tableau de caractères qui sera transformé en chaine de caractère\n\t\t **/\n\n\t\tString passewordTraduit = new String(passeword.getPassword());\n\n\t\t/**\n\t\t * login.getText() récupère le contenu de la barre de saisie\n\t\t **/\n\t\t\n\t\tString user = login.getText();\n\t\tString passwd = passewordTraduit;\n\t\t/**\n\t\t *Permettra de savoir si la connexion à la BDD SQL c'est bien passée.\n\t\t */\n\t\tboolean reussite;\n\t\t/**\n\t\t * On va créer la BDD si elle n'existe pas\n\t\t */\n\t\t\n\t\treussite = Initialisation.getInstance().creerBDD(user, passwd);\n\t\t/**\n\t\t * On set le password et l'utilisateur pour que les paramètres de connexion soient les bons\n\t\t */\n\t\tInitialisation.getInstance().setPasswd(passwd);\n\t\tInitialisation.getInstance().setUser(user);\n\t\tModification.getInstance().setPasswd(passwd);\n\t\tModification.getInstance().setUser(user);\n\t\tif(reussite) {\n\t\t\t/**\n\t\t\t *Si tout c'est bien passé on regarde si l'utilisateur existe dans le fichier et dans le cas contraire on le crée.\n\t\t\t */\n\t\t\tif(personnesDejaInscrite.getInstance().getMaListDePersonneInscrite().get(user) == null) {\n\t\t\t\tpersonnesDejaInscrite.getInstance().getMaListDePersonneInscrite().put(user, new CompteAdministrateur(passwd));\n\t\t\t\tpersonnesDejaInscrite.getInstance().sauvegarder();\n\t\t\t}\n\t\t\tFenetreLogin.getInstance().dispose();\n\t\t\tFenetreFond.getInstance().changerFenetre(login.getText());\n\t\t\t/**\n\t\t\t *On remet les champs à nul pour que quand on se déconnecte on est pas le login et le mot de passe de l'utilisateur précédent.\n\t\t\t */\n\t\t\tlogin.setText(\"\");\n\t\t\tpasseword.setText(\"\");\n\t\t}\n\t\n\t}",
"public String getAutor() {\n return autor;\n }",
"private void solicitarDatos() {\n Intent intent = Henson.with(this).gotoAlumnoActivity().edad(mAlumno.getEdad()).nombre(\n mAlumno.getNombre()).build();\n startActivityForResult(intent, RC_ALUMNO);\n }",
"public Utilizador(){\r\n this.id = \"\";\r\n this.email = \"\";\r\n this.nome = \"\";\r\n this.password = \"\";\r\n this.morada = \"\";\r\n this.dataNasc = new GregorianCalendar();\r\n }",
"Jugador consultarGanador();",
"public login() {\n\n initComponents();\n \n usuarios.add(new usuarios(\"claudio\", \"claudioben10\"));\n usuarios.get(0).setAdminOno(true);\n \n }",
"private void mostrarLibro(Libro libro) {\n\t\tSystem.out.println(libro.getId()+\" - \"+libro.getTitulo()+\" - \"+libro.getAutor());\r\n\t}",
"public void crearUsuario(String cedula,String name ,String lastname ,String phone , String city ,String email,String password) throws BLException;",
"public ListaUsuario() {\n initComponents();\n\n exibir();\n }",
"private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela Paciente\\n\");\n\t\tpaciente = new Paciente();\n\t\tlistaPaciente = pacienteService.buscarTodos();\n\t\t\n\t}",
"public tela_GerencLogin() {\n initComponents();\n lb_NomeLogin.setText(Sessao.getLogin());\n lb_Id.setText(Integer.toString(Sessao.getId()));\n \n }",
"private void enviarRequisicaoAdicionar() {\n servidor.adicionarPalito(nomeJogador);\n atualizarPalitos();\n }",
"public static void main(String[] args) throws SQLException, ClassNotFoundException {\n CtrlUsuarios us = new CtrlUsuarios(); \n //instancia de un objeto Usuario, para almacenar el usuario obtenido\n Usuarios user = null;\n //Para probar el código solo deben mandar a llamar al método correspondiente creado para la funcionalidad\n //En este caso imprimo el resultado obtenido y el código creado es correcto\n user = us.obtenerPorId(Conexion.conectar(),1);\n System.out.println(user.toString());\n \n //de aquí en seguida podemos seguir agragando las demas prubas...\n }",
"public void CargarDatosUsuario(String nickname, String mail, String nombre, String pass, DataDireccion direccion, String apellido, Date fechaNacimiento, String rutaImagen);",
"public String authentification(){\r\n\t\t\r\n\t\tString v$navigation = null;\r\n\t\ttry {\r\n\t\t\tTabUsr\tusr = AdminSvcoDeleguate.getSvcoUsr().authenticate(defaultVue.getLogin(), defaultVue.getPassword());\r\n\t\t\tif(usr != null && usr.getCodUsr() != null && !usr.getPwdExpire()){\r\n\t\t\t\t// Navigation vers le formulaire d'acceuil\r\n\t\t\t\tdefaultVue.setUser(usr);\r\n\t\t\t\tv$navigation = \"AcceuilDeBase\";\r\n\t\t\t}else if(usr != null && usr.getPwdExpire()){\r\n\t\t\t\tFacesUtil.addWarnMessage(\"Votre mot de passe a expiré : veuillez contacter l'administrateur\", \"Votre mot de passe a expiré : veuillez contacter l'administrateur\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tFacesUtil.addWarnMessage(\"Login/Mot de passe incorrect\", \"Login/Mot de passe incorrect\");\r\n\t\t\t}\r\n\t\t} catch (SysGehoAppException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ServiceLocatorException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn v$navigation;\r\n\t}",
"public FrmCadUsuario() {\n initComponents();\n Connection conexao = new Conexao().getConnection();\n\n txtId.setEnabled(false);\n lista = usuarioController.getUsuarios();\n if (lista.isEmpty()) {\n JOptionPane.showMessageDialog(null, \"Ainda não foram cadastrados usuários\");\n } else {\n mostrarDados();\n }\n }",
"public telalogin() {\n initComponents();\n conexao = ModuloConexao.conector();\n // a linha abaixo serve de apoio ao status da conexao\n // System.out.println(conexao);\n\n }",
"public VentanaBuscarUsuarios(ControladorUsuario controladorUsuario, TelefonoDAO telefonoDAO) {\n initComponents();\n this.controladorUsuario = controladorUsuario;\n this.telefonoDAO = telefonoDAO;\n alerta16=\"No se ha encontrado el usuario con la cedula \";\n }",
"@Listen(\"onChange = #txtUsuario; onOK = #txtUsuario\")\r\n\tpublic void buscarPorLogin() {\r\n\t\tUsuario usuario = servicioUsuario.buscarPorLogin(txtUsuario.getValue());\r\n\t\tif (usuario != null)\r\n\t\t\tllenarCamposUser(usuario);\r\n\t\telse {\r\n\t\t\tmsj.mensajeAlerta(Mensaje.noHayRegistros);\r\n\t\t\tidUser = \"TODOS\";\r\n\t\t\ttxtUsuario.setValue(\"TODOS\");\r\n\t\t\tlblUsuario.setValue(\"TODOS\");\r\n\t\t\ttxtUsuario.setFocus(true);\r\n\t\t}\r\n\t}",
"String getLoginapiavgrtt();",
"public TelaPrincipal() {\r\n initComponents();\r\n con.conecta();\r\n }",
"private void cargarDatos()\n {\n // Pantalla carga\n showProgress(true, mView, mProgressView, getContext());\n Comando login = new LoginComando(KPantallas.PANTALLA_PERFIL);\n String email = UtilUI.getEmail(getContext());\n String password = UtilUI.getPassword(getContext());\n login.ejecutar(email,password);\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 }",
"private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela PressaoArterial\\n\");\n\t\tpressaoArterial = new PressaoArterial();\n\t\tlistaPressaoArterial = pressaoArterialService.buscarTodos();\n\n\t}",
"public void PagarConsulta() {\n\t\tSystem.out.println(\"el patronato es gratiuto y no necesita pagar \");\r\n\t}",
"@Test\r\n\tpublic void CT03ConsultarLivroComRaNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comRA_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"RA inválido\", e.getMessage());\r\n\t\t}\r\n\t}",
"public String getAutorizacionCompleto()\r\n/* 184: */ {\r\n/* 185:316 */ return this.establecimiento + \"-\" + this.puntoEmision + \" \" + this.autorizacion;\r\n/* 186: */ }",
"@IgnoreMethodAuthentication\r\n\tpublic void execute() {\n\t\ttry {\r\n\t\t\tString licencaFull = SystemManager.getProperty(\"licenca.sistema\");\r\n\t\t\tlicencaFull = Criptografia.newInstance(SystemManager.getProperty(Constants.Parameters.Licenca.LICENCA_KEY)).decripto(licencaFull);\r\n\t\t\tif (licencaFull != null && licencaFull.equals(\"ENTERPRISE EDITION\")) {\r\n\t\t\t\twrite(\"ok\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tParametroLojaDAO paramDao = new ParametroLojaDAO();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString licenca = paramDao.getStringParametro(Constants.Parameters.Licenca.LICENCA_SISTEMA, empresasessao.getCodigoEmpresa(), lojasessao.getCodigoLoja());\r\n\t\t\t//SystemManager.LICENCA_SISTEMA = licenca;\r\n\t\t\t\r\n\t\t\tString dataSistemaStr = paramDao.getStringParametro(Constants.Parameters.Licenca.DATA_SISTEMA, empresasessao.getCodigoEmpresa(), lojasessao.getCodigoLoja());\r\n\t\t\t\r\n\t\t\tString dados = null;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tdados = Criptografia.newInstance(SystemManager.getProperty(Constants.Parameters.Licenca.LICENCA_KEY)).decripto(licenca);\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\tif (dados == null || dados.trim().equals(\"\")) {\r\n\t\t\t\twriteErrorMessage(\"Sistema não licenciado!\", \"N\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Busca data do sistema \r\n\t\t\ttry {\r\n\t\t\t\tdataSistemaStr = Criptografia.newInstance(SystemManager.getProperty(Constants.Parameters.Licenca.LICENCA_KEY)).decripto(dataSistemaStr);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tdataSistemaStr = \"01/01/1900\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\t\tCalendar dataAtual = Calendar.getInstance();\r\n\t\t\t\r\n\t\t\t// Checa se houve modificacao na data do sistema\r\n\t\t\tif (dataSistemaStr != null) {\r\n\t\t\t\tCalendar dataSistema = Calendar.getInstance();\r\n\t\t\t\tdataSistema.setTime(sdf.parse(dataSistemaStr));\r\n\t\t\t\tif (dataSistema.after(dataAtual)) {\r\n\t\t\t\t\twriteErrorMessage(\"Data do sistema alterada!\", \"N\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (validarDados(dados)) {\r\n\t\t\t\twrite(\"ok\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void initialize() {\n\t\t\ttry {\n\t\t\t\tprogramId = getSFParams().getProgramId(bmoProject.getProgramCode());\n\t\t\t} catch (SFException e) {\n\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-initialize() ERROR: \" + e.toString());\n\t\t\t}\n\n\t\t\t// Filtrar por vendedores\n\t\t\tuserSuggestBox = new UiSuggestBox(new BmoUser());\n\t\t\tBmoUser bmoUser = new BmoUser();\n\t\t\tBmoProfileUser bmoProfileUser = new BmoProfileUser();\n\t\t\tBmFilter filterSalesmen = new BmFilter();\n\t\t\tint salesGroupId = ((BmoFlexConfig)getUiParams().getSFParams().getBmoAppConfig()).getSalesProfileId().toInteger();\n\t\t\tfilterSalesmen.setInFilter(bmoProfileUser.getKind(), \n\t\t\t\t\tbmoUser.getIdFieldName(),\n\t\t\t\t\tbmoProfileUser.getUserId().getName(),\n\t\t\t\t\tbmoProfileUser.getProfileId().getName(),\n\t\t\t\t\t\"\" + salesGroupId);\t\n\t\t\tuserSuggestBox.addFilter(filterSalesmen);\n\n\n\t\t\t// Filtrar por vendedores activos\n\t\t\tBmFilter filterSalesmenActive = new BmFilter();\n\t\t\tfilterSalesmenActive.setValueFilter(bmoUser.getKind(), bmoUser.getStatus(), \"\" + BmoUser.STATUS_ACTIVE);\n\t\t\tuserSuggestBox.addFilter(filterSalesmenActive);\n\n\t\t\t// Filtrar Responsables de almacen activos\n\t\t\twarehouseManagerIdSuggestBox.addFilter(filterSalesmenActive);\n\n\t\t\t// Filtrar solo usuarios que estan en almacenes\n\t\t\tBmoWarehouse bmoWarehouse = new BmoWarehouse();\n\t\t\tBmFilter filterUserWarehouse = new BmFilter();\n\t\t\tfilterUserWarehouse.setInFilter(bmoWarehouse.getKind(), \n\t\t\t\t\tbmoUser.getIdFieldName(), \n\t\t\t\t\tbmoWarehouse.getUserId().getName(), \"1\" , \"1\");\n\t\t\twarehouseManagerIdSuggestBox.addFilter(filterUserWarehouse);\n\n\t\t\t// Filtrar por tipos de flujos ligados a proyectos\n\t\t\tBmoWFlowType bmoWFlowType = new BmoWFlowType();\n\t\t\tBmFilter bmFilter = new BmFilter();\n\t\t\tbmFilter.setValueFilter(bmoWFlowType.getKind(), bmoWFlowType.getBmoWFlowCategory().getProgramId(), programId);\n\t\t\twFlowTypeListBox = new UiListBox(getUiParams(), new BmoWFlowType(), bmFilter);\n\n\t\t\t// Filtrar por tipos de pedidos de tipo renta\n\t\t\tBmoOrderType bmoOrderType = new BmoOrderType();\n\t\t\tBmFilter rentalFilter = new BmFilter();\n\t\t\trentalFilter.setValueFilter(bmoOrderType.getKind(), bmoOrderType.getType(), \"\" + BmoOrderType.TYPE_RENTAL);\n\t\t\torderTypeListBox = new UiListBox(getUiParams(), new BmoOrderType(), rentalFilter);\n\n\t\t\t// Botón de Enviar encuesta al cliente\n\t\t\tsendPoll.setStyleName(\"formCloseButton\");\n\t\t\tif(newRecord) sendPoll.setVisible(false);\n\t\t\telse sendPoll.setVisible(true);\n\t\t\tsendPoll.addClickHandler(new ClickHandler() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\tif (Window.confirm(\"¿Está seguro que desea enviar la Encuesta al Cliente?\")) sendPoll();\n\t\t\t\t}\n\t\t\t});\n\n\t\t}",
"public agregarArticulo(String user, String password, String vend, String codigoVend) {\n initComponents();\n usu = user;\n contra = password;\n\n try {\n model = new ConnectionTableDB(usu, contra, \"adv_facturacion\", \"SELECT tipo_producto from tipo_producto\", false);\n\n for (int i = 0; i < model.getRowCount(); i++) {\n tipo.addItem(String.valueOf(model.getValueAt(i, 0)));\n }\n //this.getContentPane().setBackground(Color.white);\n } catch (SQLException ex) {\n Logger.getLogger(agregarArticulo.class.getName()).log(Level.SEVERE, null, ex);\n }\n model.desconectar();\n }",
"public ingresarBiblioteca() {\n initComponents();\n this.nombreUsuario.setText(usuariosID[0].getNombre());\n this.Picture.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.PLAIN,10));\n usuario.insertarInicio(this.nombreUsuario.getText()/*, carpeta*/);\n usuario.obtenerNodo(0).getArchivo().insertarFinal(\"GENERAL\");//carpeta.insertarFinal(\"GENERAL\");\n }",
"Curso modificaCurso(Curso curso);",
"private void cargarCatalogo() throws DAOException {\n\t\t List<Usuario> usuariosBD = adaptadorUsuario.recuperarTodosUsuarios();\n\t\t for (Usuario u: usuariosBD) \n\t\t\t usuarios.put(u.getTelefono(), u);\n\t}",
"public VentanaPrincipal() {\n initComponents();\n editar = false;\n }",
"public cambiarContrasenna() {\n initComponents();\n txtNombreUsuario.setEnabled(false);\n inicializarComponentes();\n cargarUsuarios();\n }",
"public List<Usuario> listar() {\n List<Usuario> listaUsuarios = new ArrayList<>();\n String consulta = \"select tipoDocumento, documento, nombre, apellido, password, correo, tipoUsuario from Usuario\";\n Cursor temp = conex.ejecutarSearch(consulta);\n if (temp.moveToFirst()) {\n do {\n Usuario usuario = new Usuario(temp.getString(0), Integer.parseInt(temp.getString(1)), temp.getString(2), temp.getString(3), temp.getString(4), temp.getString(5), temp.getString(6));\n listaUsuarios.add(usuario);\n } while (temp.moveToNext());\n }\n return listaUsuarios;\n }",
"public FacturaCompra pagoCreditCard(String userName,TipoMoneda tipoMoneda);",
"public ArrayList<String> Info_Disc_Pel_Compras_usu(String genero, String usuario) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Pel_Rep1(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Peliculas.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3]) & info_disco_compra[0].equals(usuario)) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }",
"public OtrosUsuarios(int sesID) {\n initComponents();\n this.sesID = sesID;\n Conexion sql = new Conexion();\n sql.consulta(tabla, \"select Usuario, Inicio from seleccionarUsuarios\");\n }",
"public frmAnagraficaUsers() {\n initComponents();\n\n this.texCodi.setVisible(false);\n \n //associo il panel ai dati\n this.dati.dbNomeTabella = \"accessi_utenti\";\n Vector chiave = new Vector();\n chiave.add(\"id\");\n this.dati.dbChiave = chiave;\n this.dati.butSave = this.butSave;\n this.dati.butUndo = this.butUndo;\n this.dati.butFind = this.butFind;\n this.dati.butNew = this.butNew;\n this.dati.butDele = this.butDele;\n this.dati.tipo_permesso = Permesso.PERMESSO_GESTIONE_UTENTI;\n\n this.texDbPassword.setVisible(false);\n this.comRoleId.dbOpenList(Db.getConn(), \"SELECT descrizione, id FROM accessi_ruoli ORDER BY id\");\n this.dati.dbOpen(Db.getConn(), \"select * from \" + this.dati.dbNomeTabella + \" order by id\");\n this.dati.dbRefresh();\n\n dati.addDbListener(new DbListener() {\n public void statusFired(DbEvent event) {\n if (event.getStatus() == tnxDbPanel.STATUS_REFRESHING) {\n controllaAdmin();\n }\n }\n\n });\n\n this.salvaPassword = false;\n\n //apro la griglia\n //this.griglia.dbEditabile = true;\n this.griglia.dbChiave = chiave;\n this.griglia.flagUsaThread = false;\n\n java.util.Hashtable colsWidthPerc = new java.util.Hashtable();\n colsWidthPerc.put(\"id\", new Double(15));\n colsWidthPerc.put(\"username\", new Double(85));\n this.griglia.columnsSizePerc = colsWidthPerc;\n this.griglia.dbOpen(Db.getConn(), \"select id, username from \" + this.dati.dbNomeTabella + \" order by id\");\n controllaAdmin();\n this.griglia.dbPanel = this.dati;\n }",
"public usuarios Verificar_Usuario(String cedula){\r\n usuarios usuario = Cargar_Usuario(Integer.parseInt(cedula));\r\n return usuario;\r\n }",
"public static void main(String args[]){\n ControlAcceso controlador = new ControlAcceso();\n\n //se asignan los comportamientos\n controlador.asignarComportamientoAcceso(new AccesoPassword());\n\n controlador.asignarComportamientoCifrado(new CifradoNormal());\n\n controlador.acceder();\n controlador.cifrar(\"texto\");\n\n //de forma dinamica cmbio el comportamiento\n controlador.asignarComportamientoCifrado(new CifradoNulo());\n controlador.cifrar(\"djad\");\n }",
"private int buscarLibro(String autor, String titulo) {\n\t\t// TODO Auto-generated method stub\n\t\tint esta = -1, contador = 0;\n\t\tif(numLibs != 0)\n\t\t\tfor(Libro libro : lb) {\n\t\t\t\tif( libro != null )\n\t\t\t\t\tif((libro.getAutor().equalsIgnoreCase(autor) && (libro.getTitulo().equalsIgnoreCase(titulo)))){\n\t\t\t\t\t\testa = contador;\n\t\t\t\t\t}\n\t\t\t\tcontador++;\n\t\t\t}\n\t\treturn esta;\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,TarjetaCredito tarjetacredito,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(tarjetacredito.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(tarjetacredito.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!tarjetacredito.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(tarjetacredito.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public Usuarios(String Cedula){ //método que retorna atributos asociados con la cedula que recibamos\n conexion = base.GetConnection();\n PreparedStatement select;\n try {\n select = conexion.prepareStatement(\"select * from usuarios where Cedula = ?\");\n select.setString(1, Cedula);\n boolean consulta = select.execute();\n if(consulta){\n ResultSet resultado = select.getResultSet();\n if(resultado.next()){\n this.Cedula= resultado.getString(1);\n this.Nombres= resultado.getString(2);\n \n this.Sexo= resultado.getString(3);\n this.Edad= resultado.getInt(4);\n this.Direccion= resultado.getString(5);\n this.Ciudad=resultado.getString(6);\n this.Contrasena=resultado.getString(7);\n this.Estrato=resultado.getInt(8);\n this.Rol=resultado.getString(9);\n }\n resultado.close();\n }\n conexion.close();\n } catch (SQLException ex) {\n System.err.println(\"Ocurrió un error: \"+ex.getMessage().toString());\n }\n}",
"public static void preguntarTipoDeLibroPorRegistrar() {\n\t\tSystem.out.println(\"Ingresa el numero de la opcion deseada y preciona enter\");\n\t\tSystem.out.println(\"1 - Registrar Diccionario\");\n\t\tSystem.out.println(\"2 - Registrar Enciclopedia\");\n\t\tSystem.out.println(\"3 - Registar Novela\");\n\t}",
"public String getAutor() {\n\t\treturn autor;\n\t}",
"private void registrarDatosBD(String nombre, String apellido, String usuario, String clave, String fnacim) {\n\t\tUsuario u = new Usuario(0, nombre, apellido, usuario, clave, fnacim, 0, 0);\n\t\t// 02. Registrar el obj usando la clase de gestion y guardando\n\t\tint ok = new GestionUsuarios().registrar(u);\n\n\t\t// salidas\n\t\tif (ok == 0) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Error al registrar\");\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(this, \"Registro OK\");\n\t\t}\n\t}",
"public Interfaz_RegistroClientes() {\n initComponents();\n limpiar();\n }",
"public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}",
"public Usuario getAutor() {\n return autor;\n }",
"private Usuario_DB consultar_Amigo(int idUsuarioAmigo2) {\n\t\treturn usuarioidentificado.consultar_Amigo(idUsuarioAmigo2);\n\t}",
"public void identificarPersona() {\n try {\n //Obtiene todas las huellas de la bd\n ResultSet rsIdentificar = identificarhue.executeQuery();\n \n //Si se encuentra la huella en la base de datos\n while(rsIdentificar.next()){\n //Lee la plantilla de la base de datos\n byte templateBuffer[] = rsIdentificar.getBytes(\"huellap\");\n //Crea una nueva plantilla\n Template referenceTemplate = new Template(templateBuffer);\n \n //compara las plantilas (actual vs bd)\n boolean coinciden = fingerprintSDK.verify(template,referenceTemplate);\n \n //Si encuentra coincidencia entonces envia true y si no entonces envia false\n if (coinciden){ \n objpantprincipal.coincidehuella(true);\n return;\n }\n else{\n objpantprincipal.coincidehuella(false);\n }\n } \n \n } catch (SQLException e) { \n initDB();\n identificarPersona();\n } catch (GrFingerJavaException e) {\n Toolkit.getDefaultToolkit().beep();\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }",
"private void recogerDatos() {\n\t\ttry {\n\t\t\tusuSelecc.setId(etId.getText().toString());\n\t\t\tusuSelecc.setName(etNombre.getText().toString());\n\t\t\tusuSelecc.setFirstName(etPApellido.getText().toString());\n\t\t\tusuSelecc.setLastName(etSApellido.getText().toString());\n\t\t\tusuSelecc.setEmail(etCorreo.getText().toString());\n\t\t\tusuSelecc.setCustomFields(etAuth.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n\t\t\tmostrarException(e.getMessage());\n\t\t}\n\t}",
"private void carregarAlunosTurma() {\n AcessoFirebase.getFirebase().addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n getUidUsuariosTurma(dataSnapshot);\n montandoArrayListUsuarios(dataSnapshot);\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }",
"public static void pedirCredenciales(int rango) throws PersistenciaException, EmpleadoException {\n\n System.out.print(\"Introduzca su dni: \");\n String dni = teclado.nextLine();\n\n System.out.print(\"Introduzca su contrsenia: \");\n String contrasenia = teclado.nextLine();\n\n empleadoController.comprobarCredenciales(rango, dni, contrasenia);\n }",
"public vistaEjemplo() {\n initComponents();\n con=new Conexion();\n data = new Datas(con);\n usuario = new Usuario();\n jTApellido.setEnabled(false);\n jTMail.setEnabled(false);\n jTNombre.setEnabled(false);\n jTPassword.setEnabled(false);\n JdcFechaDeEntrada.setEnabled(false);\n jBPdf.setEnabled(false);\n }",
"public JFPrincipioActivo() {\n initComponents();\n this.activarControles(false);\n this.listarPrincipiosActivos();\n }",
"public TelaCadastrarUsuarios() {\n initComponents();\n carregarTabela();\n carregarComboBoxFuncionarios();\n carregarImagens();\n }",
"private static void menuCadastroCliente() throws Exception {\r\n String nome, email, cpf;\r\n int id;\r\n boolean erro = false;\r\n System.out.println(\"\\n\\t*** Cadastro ***\\n\");\r\n System.out.print(\"Nome completo: \");\r\n nome = read.nextLine();\r\n System.out.print(\"Email: \");\r\n email = read.next();\r\n do {\r\n System.out.print(\"CPF: \");\r\n cpf = read.next().replace(\".\", \"\").replace(\"-\", \"\");\r\n System.out.println(cpf);\r\n if (cpf.length() != 11) {\r\n System.out.println(\"CPF inválido!\\nDigite novamente!\");\r\n erro = true;\r\n }\r\n } while (erro);\r\n if (getCliente(email) == null) {\r\n\r\n id = arqClientes.inserir(new Cliente(nome, email, cpf));\r\n System.out.println(\"Guarde seu email, pois é através dele que você efetua o login em nossa plataforma\");\r\n System.out.println(\"Cadastro efetuado!\");\r\n gerenciadorSistema();\r\n } else {\r\n System.out.println(\"\\nJá existe Usuario com esse email!\\nCadastro cancelado!\");\r\n }\r\n }",
"protected void agregarUbicacion(){\n\n\n\n }",
"public void enviaMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=4\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}",
"public Principal() {\n initComponents();\n ab = new adminbarra(pg_Ordenes);\n }",
"public String asignarActividad() throws SQLException {\n\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\n\t\t//Bloque bloque = context.getApplication().evaluateExpressionGet(context, \"#{bloque}\", Bloque.class);\n\t\tActividad actividad = context.getApplication().evaluateExpressionGet(context, \"#{actividad}\", Actividad.class);\n\t\tAsistente asistente = context.getApplication().evaluateExpressionGet(context, \"#{asistente}\", Asistente.class);\n\t\t\n\t\tSystem.out.println(\"resultado: \"+actividad.getNombreActividad());\n\t actividad.registrarActividad_Asistente(asistente.getCedula());\n\t\t\n\t\t// put the user object into the POST request \n\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"actividad\", actividad);\n\t\t\n\t\treturn\"principalAsistente.xhtml\";\n\t}",
"private void controladorAtras(Controlador controlador){\n this.contAtras = controlador.getAtras();\n registro.setControlAtras(contAtras);\n login.setControlAtras(contAtras);\n }",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,ValorPorUnidad valorporunidad,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(valorporunidad.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(valorporunidad.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!valorporunidad.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(valorporunidad.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public FiltroCreditoTipo() {\r\n\t}",
"public void getServicios() {\n\t\tjs.executeScript(\"arguments[0].click();\", cuadradito);\n\t\tinputSearch.sendKeys(\"Servicio\");\n\t\tjs.executeScript(\"arguments[0].click();\", servicios);\n\t}",
"@Given(\"^El usuario quiere acceder al sistema$\")\n\tpublic void El_usuario_quiere_acceder_al_sistema() throws Throwable {\n\t\tdao = new DAOPersona();\n\t p=new Persona(\"Carlos\", \"Delgado\", \"carlitos93\", \"carlitos@mail.com\", \"a1Zs7s2DM\", \"Calle Jane Doe\", \"0\", \"photo\", false, null, null, null);\n\t assert(true);\n\t}",
"private void controladorUser(Controlador controlador){\n this.contUserCrearProyecto = controlador.getUserCrearProyecto();\n inicioUser.setControlCrearProyecto(contUserCrearProyecto);\n \n this.contUserCrearColectivo = controlador.getUserCrearColectivo();\n inicioUser.setControlCrearColectivo(contUserCrearColectivo);\n\n this.contInformes = controlador.getInformes();\n inicioUser.setControlSolicitarInformes(contInformes); \n \n this.contFiltrar = controlador.getFiltrar();\n inicioUser.setControlFiltrar(contFiltrar);\n\n this.contLimpiar = controlador.getLimpiarFiltro();\n inicioUser.setControlLimpiarFiltro(contLimpiar);\n }",
"public String getAutor(){\n return autorsText;\n }",
"public GestaoUtilizador() {\n initComponents();\n listarutilizador();\n }",
"private void cargaUsuarios() {\n //Abre la conexion\n Connection con = Star.conAbrBas(true, false);\n \n //Declara variables de la base de datos \n java.sql.Statement st;\n java.sql.ResultSet rs; \n String sQ;\n /*Obtiene todos los datos del usuario*/\n try\n {\n sQ = \"SELECT estac FROM estacs WHERE estac <> '\" + Login.sUsrG + \"' AND admcaj <= (SELECT admcaj FROM estacs WHERE estac = '\" + Login.sUsrG + \"')\";\n st = con.createStatement();\n rs = st.executeQuery(sQ);\n /*Si hay datos*/\n while(rs.next())\n {\n /*Obtiene los datos y cargalos en sus campos*/\n jcmbUsuarios.addItem(rs.getString(\"estac\"));\n }\n //si ingreso usuarios al combo, jalo los permisos del primer usuario\n// if(jcmbUsuarios.getItemCount() > 0){\n// cargaPermisos(jcmbUsuarios.getSelectedItem().toString());\n// }\n \n }catch(SQLException expnSQL)\n {\n //Procesa el error y regresa\n Star.iErrProc(this.getClass().getName() + \" \" + expnSQL.getMessage(), Star.sErrSQL, expnSQL.getStackTrace(), con); \n }\n }",
"public void login (String pUsuario, int pDificultad)\n {\n nombreUsuario = pUsuario;\n dificultad = pDificultad;\n\n iniciarPartida();\n }",
"public static boolean login() {\n\t\t// DB\n\t\tString[] usr = { \"NICOLAS\", \"CELESTE\" };\n\t\tString[] pass = { \"cerveza\", \"fernet\" };\n\t\tString usrAuth = \"\";\n\t\tboolean auth = false;\n\t\tint intentos = 1;\n\n\t\tdo {\n\t\t\tJTextField usuario = new JTextField();\n\t\t\tJTextField password = new JPasswordField();\n\t\t\tObject[] ingresarUsuarioPassword = { \"Usuario: \", usuario, \"Password\", password };\n\t\t\tint ingresarLogin = JOptionPane.showConfirmDialog(null, ingresarUsuarioPassword,\n\t\t\t\t\t\"Ingrese credenciales de usuario\", JOptionPane.OK_CANCEL_OPTION);\n\t\t\tif (ingresarLogin == JOptionPane.OK_OPTION) {\n\t\t\t\t// Busca el usuario en un bucle For\n\t\t\t\tfor (int i = 0; i < usr.length; i++) {\n\t\t\t\t\t// Si encuentra el usuario, verifica si el usuario y la contraseña coinciden\n\t\t\t\t\tif (usr[i].equals(usuario.getText().toUpperCase()) && pass[i].equals(password.getText())) {\n\t\t\t\t\t\tusrAuth = usr[i];\n\t\t\t\t\t\tauth = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Si no coincide, muestra los intentos restantes y vuelve a pedir credenciales\n\t\t\t\tif (!auth) {\n\t\t\t\t\tif (intentos < 3) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\\n\" + (3 - intentos) + \" Intentos restantes\",\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tintentos++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\\n\" + \"Se supero en numero de intentos\",\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tintentos++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Cierra si no se selecciona OK\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!auth & (intentos <= 3));\n\t\t// Si autentica, muestra mensaje de bienvenida\n\t\tif (auth)\n\t\t\tJOptionPane.showMessageDialog(null, \"Bienvenido \" + usrAuth, \"Bienvenido\", JOptionPane.INFORMATION_MESSAGE);\n\t\treturn auth;\n\t}",
"Turno consultarTurno();",
"public Aplicacion(String nomAdmin, String contrasena, Integer numMinApoyos) {\r\n\t\t\r\n\t\tif(nomAdmin.isEmpty()|| Objects.isNull(nomAdmin) ) {\r\n\t\t\tthrow new IllegalArgumentException(\"Debes de introducir los datos validos\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.nombreAdmin = nomAdmin;\r\n\t\tthis.contraseñaAdmin = contrasena; \r\n\t\tthis.numMinApoyos = numMinApoyos;\r\n\t\tthis.modoAdmin = false;\r\n\t\t\r\n\t\tthis.proyectos = new HashSet<Proyecto>();\r\n\t\tthis.proponentes = new HashSet<Proponente>();\r\n\t\tthis.lastProjectUniqueID = 0;\r\n\t\t\r\n\t\t//Cargamos los distritos\r\n\t\tdistritosPermitidos = new HashSet<String>();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(distritosPath));\r\n\t String d;\r\n\t while((d = br.readLine()) != null){\r\n\t \t this.distritosPermitidos.add(d);\t //Leer la siguiente línea\r\n\t }\r\n\t\t}catch (FileNotFoundException e) {\r\n\t System.out.println(\"Error: Fichero no encontrado\");\r\n\t System.out.println(e.getMessage());\r\n\t \r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\r\n\t\t\r\n\t}",
"String getAuteur();",
"private String getIdRequisitante(long numOrdem)\n\t{\n\t\treturn procBatchPOA.getUserIDRequisitante(numOrdem);\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,Caja caja,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(CajaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(caja.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,CajaDataAccess.TABLENAME, caja.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(CajaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////CajaLogic.registrarAuditoriaDetallesCaja(connexion,caja,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(caja.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!caja.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,CajaDataAccess.TABLENAME, caja.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////CajaLogic.registrarAuditoriaDetallesCaja(connexion,caja,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,CajaDataAccess.TABLENAME, caja.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(caja.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,CajaDataAccess.TABLENAME, caja.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(CajaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////CajaLogic.registrarAuditoriaDetallesCaja(connexion,caja,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void retrocedi_admin(int id) {\r\n\t\ttry {\r\n\t\tDatabase.connect();\r\n\t\tDatabase.updateRecord(\"utente\", \"utente.ruolo=2\", \"utente.id=\"+id); \t\t\r\n\t\tDatabase.close();\r\n\t\t}catch(NamingException e) {\r\n \t\tSystem.out.println(e);\r\n }catch (SQLException e) {\r\n \tSystem.out.println(e);\r\n }catch (Exception e) {\r\n \tSystem.out.println(e); \r\n }\r\n\t}"
] | [
"0.6403787",
"0.63775617",
"0.6316731",
"0.6314316",
"0.6308298",
"0.61762094",
"0.6170288",
"0.6151451",
"0.612206",
"0.6038715",
"0.59379804",
"0.5924066",
"0.5883386",
"0.58576274",
"0.5834699",
"0.5818578",
"0.5771372",
"0.57625186",
"0.57587904",
"0.57573456",
"0.57464874",
"0.574281",
"0.5729812",
"0.5713019",
"0.5711296",
"0.5692672",
"0.5677509",
"0.5673634",
"0.56563014",
"0.5651218",
"0.5649307",
"0.56438667",
"0.5639495",
"0.5608888",
"0.5605076",
"0.55951357",
"0.5594079",
"0.55931914",
"0.5573836",
"0.55734473",
"0.5572532",
"0.5566665",
"0.5565187",
"0.5559501",
"0.5558288",
"0.5550518",
"0.5549661",
"0.5549212",
"0.55458504",
"0.5540664",
"0.55253047",
"0.5523314",
"0.55219734",
"0.5520938",
"0.55197436",
"0.55182636",
"0.5517706",
"0.5509065",
"0.55072",
"0.55056024",
"0.55042005",
"0.5492026",
"0.5488649",
"0.5485164",
"0.54846096",
"0.5482425",
"0.5472854",
"0.54723734",
"0.5461509",
"0.54614246",
"0.5460876",
"0.5457645",
"0.5452941",
"0.5447368",
"0.5447185",
"0.5436218",
"0.54356235",
"0.54349655",
"0.5429735",
"0.54290205",
"0.5427916",
"0.54135054",
"0.54113656",
"0.5400046",
"0.5399238",
"0.539753",
"0.5395599",
"0.53897566",
"0.53827673",
"0.5382442",
"0.53810114",
"0.5376382",
"0.5375561",
"0.5374161",
"0.5373867",
"0.5369943",
"0.53650236",
"0.53631645",
"0.5362952",
"0.5359148",
"0.53564537"
] | 0.0 | -1 |
Returns SQL string that can generate new (unique and nonrepeating) primary key for specified DbEntity. No actual database operations are performed. | public String generatePkForDbEntityString(DbEntity ent) {
if ((null == ent.getPrimaryKey()) || (1 != ent.getPrimaryKey().size())) {
throw new CayenneRuntimeException(
"Error generating pk for DbEntity "
+ ent.getName()
+ ": pk must be single attribute");
}
DbAttribute primaryKeyAttribute = (DbAttribute) ent.getPrimaryKey().get(0);
StringBuffer buf = new StringBuffer("NEWID FOR ");
buf.append(ent.getName()).append(' ').append(primaryKeyAttribute.getName());
return buf.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected String createPKString(DbEntity entity) {\n List pk = entity.getPrimaryKey();\n\n if (pk == null || pk.size() == 0) {\n throw new CayenneRuntimeException(\n \"Entity '\" + entity.getName() + \"' has no PK defined.\");\n }\n\n StringBuffer buffer = new StringBuffer();\n buffer.append(\"CREATE PRIMARY KEY \").append(entity.getName()).append(\" (\");\n\n Iterator it = pk.iterator();\n\n // at this point we know that there is at least on PK column\n DbAttribute firstColumn = (DbAttribute) it.next();\n buffer.append(firstColumn.getName());\n\n while (it.hasNext()) {\n DbAttribute column = (DbAttribute) it.next();\n buffer.append(\", \").append(column.getName());\n }\n\n buffer.append(\")\");\n return buffer.toString();\n }",
"protected String createUniquePKIndexString(DbEntity entity) {\n List pk = entity.getPrimaryKey();\n\n if (pk == null || pk.size() == 0) {\n throw new CayenneRuntimeException(\n \"Entity '\" + entity.getName() + \"' has no PK defined.\");\n }\n\n StringBuffer buffer = new StringBuffer();\n\n // compound PK doesn't work well with UNIQUE index...\n // create a regular one in this case\n buffer\n .append(pk.size() == 1 ? \"CREATE UNIQUE INDEX \" : \"CREATE INDEX \")\n .append(entity.getName())\n .append(\" (\");\n\n Iterator it = pk.iterator();\n\n // at this point we know that there is at least on PK column\n DbAttribute firstColumn = (DbAttribute) it.next();\n buffer.append(firstColumn.getName());\n\n while (it.hasNext()) {\n DbAttribute column = (DbAttribute) it.next();\n buffer.append(\", \").append(column.getName());\n }\n buffer.append(\")\");\n return buffer.toString();\n }",
"protected String createPrimaryKeyConstraint(TableModel table) {\r\n\t\tColumnModel[] pks = table.getPrimaryKeyColumns();\r\n\t\tString s = \"\";\r\n\t\tif (pks.length > 1) {\r\n\t\t\ts = \",\\n PRIMARY KEY(\";\r\n\t\t\tString a = \"\";\r\n\t\t\tfor (ColumnModel c : pks) {\r\n\t\t\t\tif (a.length() > 0) {\r\n\t\t\t\t\ta += \", \";\r\n\t\t\t\t}\r\n\t\t\t\ta += this.quote(c.getName());\r\n\t\t\t}\r\n\t\t\ts += a + \")\";\r\n\t\t}\r\n\t\treturn s;\r\n\t}",
"PrimaryKey createPrimaryKey();",
"public Object generatePkForDbEntity(DataNode node, DbEntity entity)\n throws Exception {\n // check for binary pk\n Object binPK = binaryPK(entity);\n if (binPK != null) {\n return binPK;\n }\n return new Integer(pkFromDatabase(node, entity));\n }",
"public static String generateEntityKey(String projectID,String entityCategoryID,String entityID)\n {\n if(StringUtils.isEmpty(projectID) || StringUtils.isEmpty(entityCategoryID) || \n StringUtils.isEmpty(entityID)) return null;\n \n StringBuilder sb=new StringBuilder();\n sb.append(\"[\")\n .append(projectID.trim()).append(\"|\")\n .append(entityCategoryID.trim()).append(\"|\")\n .append(entityID.trim()).append(\"]\");\n \n return sb.toString(); \n }",
"private String generatePrimaryKey(Connection conn, String tableName) {\n String returnValue = null;\n String existingPkValue = null;\n String nextPkValue = null;\n\n try {\n existingPkValue = sql.selectKeyValueFromLastUsedKey(conn, tableName);\n\n if (existingPkValue == null) {\n System.out.println(\"Last used key value is NULL\");\n return null;\n }\n // remove first 1 alphabetic characters from this\n String prefix = existingPkValue.substring(0, 1);\n String existingPkValueWithPrefixStripped = existingPkValue.substring(1);\n\n // get number of characters in lastUsedId\n int completeLength = existingPkValueWithPrefixStripped.length();\n\n // convert lastUsedId into number\n int existingIdNum = 0;\n existingIdNum = Integer.parseInt(existingPkValueWithPrefixStripped.trim());\n\n // add 1 to this number\n int nextIdNum = existingIdNum + 1;\n\n // convert this number back to String\n String nextId = String.valueOf(nextIdNum);\n int newLength = nextId.length();\n // depending on the number of characters calculated initially,\n int zeroes = completeLength - newLength;\n // prefix Zeros accordingly to this String\n for (int i = 1; i <= zeroes; i++) {\n nextId = \"0\" + nextId;\n }\n\n // add the 4 character alphabetic prefix to this string\n nextPkValue = prefix + nextId;\n\n // update the system_last_used_id table\n sql.updateLastUsedPrimaryKeyValue(conn, tableName, nextPkValue);\n returnValue = nextPkValue;\n } catch (NumberFormatException ex) {\n System.out.println(\"generatePrimaryKey: \" + ex.getMessage());\n }\n return returnValue;\n\n }",
"public static String getPrimaryKeyName() {\r\n\t\t\treturn PRIMARY_KEY_ID;\r\n\t\t}",
"@Override\n public String generateId() {\n return HiveIdGenerator.generateTableId(getSourceId(), getDatabaseName(),\n getTableName());\n }",
"ColumnIdentifier<ENTITY> identifier();",
"private int newPrimaryKey( )\n {\n int nKey;\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n\n daoUtil.executeQuery( );\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 ) + 1;\n }\n else\n {\n // If the table is empty\n nKey = 1;\n }\n\n daoUtil.free( );\n\n return nKey;\n }",
"public abstract String getPrimaryKey(String tableName);",
"protected String getIdentityColumnString() throws MappingException {\n \t\tthrow new MappingException( getClass().getName() + \" does not support identity key generation\" );\n \t}",
"@Override\r\n\tpublic String getPrimaryKey() {\n\t\treturn \"ID\";\r\n\t}",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getHashKey()));\n return sb.toString();\n }",
"Key getPrimaryKey();",
"public String getQueryKey()\n {\n if (getPrimaryKey() == null)\n {\n return \"\";\n }\n else\n {\n return getPrimaryKey().toString();\n }\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n String[] stringArray0 = new String[20];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \" = \", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"PRIMARY KEY (, , , , , , , , , , , , , , , , , , , )\", string0);\n }",
"@Nonnull\n protected KeyExpression buildPrimaryKey() {\n return Key.Expressions.concat(\n Key.Expressions.recordType(),\n Key.Expressions.list(constituents.stream()\n .map(c -> Key.Expressions.field(c.getName()).nest(c.getRecordType().getPrimaryKey()))\n .collect(Collectors.toList())));\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getBatchId()));\n sb.append(\", \");\n sb.append(f.formatAny(getNestId()));\n return sb.toString();\n }",
"public String getPrimaryKey() throws CloneNotSupportedException {\r\n\t\tString key=\"\";\r\n\t\tfor (int i = 0; i < this.state.getSizeCol(); i++) {\r\n\t\t\tfor (int j = 0; j < this.state.getSizeRow(); j++) {\r\n\t\t\t\tkey+=this.state.getValue(new Position(i,j));\r\n\t\t\t}\r\n\t\t}\r\n\t\tkey+=\"?\"+this.state.getTractor().getPosition().toString();\r\n\t\treturn key;\r\n\t}",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public static Key createPrimaryKey(Number idexped, Number idbulto)\n {\n return new Key(new Object[] {idexped, idbulto});\n }",
"private Integer newPrimaryKey( )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n daoUtil.executeQuery( );\n Integer nKey = null;\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 );\n }\n else\n {\n nKey = 1;\n }\n daoUtil.close( );\n\n return nKey.intValue( );\n }",
"@Test(timeout = 4000)\n public void test091() throws Throwable {\n String[] stringArray0 = new String[9];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"%)vq\", (DBSchema) null);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, (String) null, true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"PRIMARY KEY (, , , , , , , , )\", string0);\n }",
"public String getPrimaryKey() {\n if (primaryKey == null) primaryKey = \"id\";\n return primaryKey;\n }",
"protected int pkFromDatabase(DataNode node, DbEntity entity) throws Exception {\n String sql = generatePkForDbEntityString(entity);\n QueryLogger.logQuery(QueryLogger.DEFAULT_LOG_LEVEL, sql, Collections.EMPTY_LIST);\n\n Connection con = node.getDataSource().getConnection();\n try {\n Statement st = con.createStatement();\n try {\n\n ResultSet rs = st.executeQuery(sql);\n try {\n //Object pk = null;\n if (!rs.next()) {\n throw new CayenneRuntimeException(\n \"Error generating pk for DbEntity \" + entity.getName());\n }\n return rs.getInt(1);\n }\n finally {\n rs.close();\n }\n }\n finally {\n st.close();\n }\n }\n finally {\n con.close();\n }\n }",
"static DbQuery createKeyQuery() {\n DbQuery query = new DbQuery();\n query.order = OrderBy.KEY;\n return query;\n }",
"public int getGeneratedKey() {\n\n throw new RuntimeException(\"This method is only valid for insert commands\");\n }",
"java.lang.String getDatabaseId();",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_24()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getCode()));\n return sb.toString();\n }",
"public static String newId(long useFor, long dbNum, long tableNum) throws Exception{\n\t\treturn IdGenerator.generate61ForId(useFor, dbNum, tableNum);\t\t\n\t}",
"public PrimaryKey getPrimaryKey();",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_30()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"0123456789\", new DBSchema(\"\", new DBCatalog(\"\")));\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public static PrimaryIndexBuilder pkIndex() {\n return new PrimaryKeyBuilderImpl();\n }",
"Long getDbId();",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_18()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"protected String getDatabasePkColumnName() {\n return this.pkColumn == null ? getPlan().getDocIdField() : this.pkColumn;\n }",
"private int newPrimaryKey( Plugin plugin )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin );\n daoUtil.executeQuery( );\n\n int nKey;\n\n if ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n daoUtil.free( );\n\n return nKey;\n }",
"PrimaryKey getPrimaryKey();",
"PrimaryKey getPrimarykey();",
"public String getIdKey(EdaContext xContext) {\n\t\treturn String.valueOf(getId());\n\n\t}",
"static void generatePrimary(Table table, Key key, PrintWriter outData, String mcomma)\r\n {\r\n String comma = \" ( \";\r\n String keyname = key.name.toUpperCase();\r\n if (keyname.indexOf(table.name.toUpperCase()) == -1)\r\n keyname = table.name.toUpperCase()+\"_\"+keyname;\r\n outData.println(mcomma+\"CONSTRAINT \"+keyname+\" PRIMARY KEY\");\r\n for (int i=0; i < key.fields.size(); i++, comma = \" , \")\r\n {\r\n String name = (String) key.fields.elementAt(i);\r\n outData.println(comma+name);\r\n }\r\n outData.println(\" )\");\r\n for (int i=0; i < key.options.size(); i++)\r\n {\r\n String option = (String) key.options.elementAt(i);\r\n outData.println(\" \"+option);\r\n }\r\n }",
"public String naturalKeyName() {\n return idName();\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_29()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public static Key createPrimaryKey(Number supplierId) {\n return new Key(new Object[]{supplierId});\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_25()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable();\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"String uniqueId();",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_1()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (, 0123456789, An��t-1.0.txt, )\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Test(timeout = 4000)\n public void test124() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionContext\");\n String[] stringArray0 = new String[4];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"org.apache.derby.iapi.sql.execute.ExecutionContext\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.ukSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"UNIQUE (, , , )\", string0);\n }",
"@Test(timeout = 4000)\n public void test097() throws Throwable {\n String[] stringArray0 = new String[8];\n DBSchema dBSchema0 = new DBSchema(\"B?<P%cF\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"V\", dBSchema0);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \" on \", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"CONSTRAINT \\\" on \\\" PRIMARY KEY (, , , , , , , )\", string0);\n }",
"@Override\n\t\tpublic String getPKFieldName() {\n\t\t\treturn null;\n\t\t}",
"public String getPrimaryKey() {\n return getBasicChar().getPrimaryKey();\n }",
"boolean isPrimaryKey();",
"@Test(timeout = 4000)\n public void test125() throws Throwable {\n DBCatalog dBCatalog0 = new DBCatalog();\n DBSchema dBSchema0 = new DBSchema(\"}{,65x^HxS\", dBCatalog0);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"%@gEV{P$8\", dBSchema0);\n String[] stringArray0 = new String[3];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"}{,65x^HxS\", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n String string0 = SQLUtil.ukSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"UNIQUE (, , )\", string0);\n }",
"@Override\n\tpublic String getPKFieldName() {\n\t\treturn null;\n\t}",
"public String createStatementParams(Class<?> entity, boolean usePrimaryKey) \r\n\t\t\tthrows Exception{\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tsb.append(\"(\");\r\n\t\tField[] fields = entity.getDeclaredFields();\t\r\n\t\t\r\n\t\t//trunk entity to persistence\r\n\t\tfor(int i=0; i<fields.length; i++){\r\n\t\t\tField reflectionField = fields[i];\r\n\t\t\tif(reflectionField!=null){\r\n\t\t\t\treflectionField.setAccessible(true);\r\n\t\t\t\tAnnotation annoField = reflectionField.getAnnotation(GPAField.class);\r\n\t\t\t\tAnnotation annoFieldPK = reflectionField.getAnnotation(GPAPrimaryKey.class);\r\n\t\t\t\tAnnotation annoFieldBean = reflectionField.getAnnotation(GPAFieldBean.class);\r\n\t\t\t\t/* \r\n\t\t\t\t ainda falta validar a chave primária do objeto\r\n\t\t\t\t por enquanto so esta prevendo pk usando sequence no banco\r\n\t\t\t\t objeto id sempre é gerado no banco por uma sequence\r\n\t\t\t\t*/\r\n\t\t\t\tif(annoFieldPK!=null && annoFieldPK instanceof GPAPrimaryKey){\r\n\t\t\t\t\tGPAPrimaryKey pk = (GPAPrimaryKey)annoFieldPK;\r\n\t\t\t\t\tString name = pk.name();\r\n\t\t\t\t\tsb.append( name + \" integer primary key\");\r\n\t\t\t\t\tif(pk.ignore() == true){\r\n\t\t\t\t\t\tsb.append(\" autoincrement \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(i<fields.length-1){\r\n\t\t\t\t\t\tsb.append(\",\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(annoField!=null && annoField instanceof GPAField){\r\n\t\t\t\t\tGPAField field = (GPAField)annoField;\r\n\t\t\t\t\tString name = field.name();\r\n\t\t\t\t\tClass<?> type = reflectionField.getType();\r\n\t\t\t\t\tsb.append( name + \" \" + getSqLiteType(type));\r\n\t\t\t\t\tif(i<fields.length-1){\r\n\t\t\t\t\t\tsb.append(\",\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(annoFieldBean!=null && annoFieldBean instanceof GPAFieldBean){\r\n\t\t\t\t\tGPAFieldBean field = (GPAFieldBean)annoFieldBean;\r\n\t\t\t\t\tString name = field.name();\r\n\t\t\t\t\tClass<?> type = reflectionField.getType();\r\n\t\t\t\t\tsb.append( name + \" \" + getSqLiteType(type));\r\n\t\t\t\t\tif(i<fields.length-1){\r\n\t\t\t\t\t\tsb.append(\",\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsb.append(\");\");\r\n\t\treturn sb.toString();\r\n\t}",
"public ObjectKey getPrimaryKey()\n {\n return SimpleKey.keyFor(getNewsletterId());\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _phieugiahan.getPrimaryKey();\n\t}",
"public Key getKey() {\n\t\tString fieldvalue = getValue(\"sys_id\");\n\t\tassert fieldvalue != null;\n\t\treturn new Key(fieldvalue);\n\t}",
"public StrColumn getEntityId() {\n return delegate.getColumn(\"entity_id\", DelegatingStrColumn::new);\n }",
"public String getPkName() {\n\t\treturn \"id\";\n\t}",
"@Override\n public String getPrimaryKey(String tableName) {\n return super.getPrimaryKey(tableName);\n }",
"public ObjectKey getPrimaryKey()\n {\n pks[0] = SimpleKey.keyFor(getMailId());\n pks[1] = SimpleKey.keyFor(getReceiverId());\n return comboPK;\n }",
"protected String getIdentitySelectString() throws MappingException {\n \t\tthrow new MappingException( getClass().getName() + \" does not support identity key generation\" );\n \t}",
"public String generateId() {\n return Utils.generateKey();\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_14()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable();\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (, 0123456789, An��t-1.0.txt, )\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_2()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_19()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"0123456789\", new DBSchema(\"\", new DBCatalog(\"\")));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public Object generalPK() {\n\t\treturn null;\r\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_8()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public int newPrimaryKey( Plugin plugin )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin );\n daoUtil.executeQuery( );\n\n int nKey;\n\n if ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n daoUtil.free( );\n\n return nKey;\n }",
"public String getAddPrimaryKeyConstraintString(String constraintName) {\n \t\treturn \" add constraint \" + constraintName + \" primary key \";\n \t}",
"@Override\n\tpublic String getKey() {\n\t\treturn id+\"\";\n\t}",
"public int newPrimaryKey( Plugin plugin )\n {\n \tint nKey;\n \t\n \ttry ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin ) )\n \t{\n \t\tdaoUtil.executeQuery( );\n \t\t\n \t\tif ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n \t}\n\n return nKey;\n }",
"@Override\n public String getNewId()throws DVDLibraryPersistenceException{\n \n int intId = 0;\n for (String key : dvds.keySet()){\n if (Integer.valueOf(key) > intId){\n intId = Integer.valueOf(key);\n }\n }\n return String.valueOf(intId + 1);\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_13()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"0123456789\", new DBSchema(\"\", new DBCatalog(\"\")));\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (, 0123456789, An��t-1.0.txt, )\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public Schema getKeySchema() {\n\n\t\tint num_keys = pkColumnNames.size();\n\t\tif (num_keys == 0){\n\t\t\tthrow new DataException(\"Empty primary key\");\n\t\t}\n\t\t//TODO: we always create Struct for the pKey - is there a point to just have a field if it's a single pKey?\n\t SchemaBuilder pkBuilder = SchemaBuilder.struct().name(this.pkSchemaName());\n\n\t for (String pk : this.pkColumnNames) {\n\t \t Field field = schema.field(pk);\n\t \t pkBuilder.field(field.name(), field.schema());\n\t }\n\t return pkBuilder.build();\n\t}",
"String getExistingId();",
"public String getKey() {\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tif (getLineNo() != null) {\r\n\t\t\tbuilder.append(getLineNo());\r\n\t\t} else if (this.getEntityId() != null) {\r\n\t\t\tbuilder.append(getEntityId());\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}",
"@Test(timeout = 4000)\n public void test132() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"j>tH;'`K^/]bs@9U O\", true, (String[]) null);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n String string0 = SQLUtil.constraintSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertNotNull(string0);\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_20()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable();\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public String getDeleteByIdSql() {\r\n\t\treturn \"delete from SHXXB where XH=?\";\r\n\t}",
"public static String aUniqueIdentifier() {\n return \"MONEXT\" + new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_7()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Override\r\n\tpublic String generate() {\r\n\t\tStringBuilder query = new StringBuilder();\r\n\r\n\t\tquery.append(\"INSERT INTO \").append(tableName).append(\" (\");\r\n\t\tfor (int i = 0; i < fieldNames.size(); i++) {\r\n\t\t\tquery.append(fieldNames.get(i));\r\n\t\t\tif (i < fieldNames.size() - 1) {\r\n\t\t\t\tquery.append(\", \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tquery.append(\") VALUES (\");\r\n\t\tfor (int i = 0; i < fieldValues.size(); i++) {\r\n\t\t\tquery.append(\"'\").append(fieldValues.get(i)).append(\"'\");\r\n\t\t\tif (i < fieldValues.size() - 1) {\r\n\t\t\t\tquery.append(\", \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tquery.append(\");\");\r\n\t\treturn query.toString();\r\n\t}",
"protected abstract String getEntityExistanceSQL(E entity);",
"public DBRecordKey<gDBR> createKey(Map<String,String> valMap) // , boolean partialOK)\n throws DBException \n {\n return this.createKey(valMap, DBWhere.KEY_FULL);\n }",
"@Override\n\tpublic Object getPrimaryKey() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"java.lang.String getClientRecordId();",
"private int save_InsertGetInsertId() {\n\t\t\n\t\tfinal String INSERT_SQL = \"INSERT INTO project__insert_id_tbl ( ) VALUES ( )\";\n\t\t\n\t\t// Use Spring JdbcTemplate so Transactions work properly\n\t\t\n\t\t// How to get the auto-increment primary key for the inserted record\n\t\t\n\t\ttry {\n\t\t\tKeyHolder keyHolder = new GeneratedKeyHolder();\n\t\t\tint rowsUpdated = this.getJdbcTemplate().update(\n\t\t\t\t\tnew PreparedStatementCreator() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic PreparedStatement createPreparedStatement(Connection connection) throws SQLException {\n\n\t\t\t\t\t\t\tPreparedStatement pstmt =\n\t\t\t\t\t\t\t\t\tconnection.prepareStatement( INSERT_SQL, Statement.RETURN_GENERATED_KEYS );\n\n\t\t\t\t\t\t\treturn pstmt;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tkeyHolder);\n\n\t\t\tNumber insertedKey = keyHolder.getKey();\n\t\t\t\n\t\t\tlong insertedKeyLong = insertedKey.longValue();\n\t\t\t\n\t\t\tif ( insertedKeyLong > Integer.MAX_VALUE ) {\n\t\t\t\tString msg = \"Inserted key is too large, is > Integer.MAX_VALUE. insertedKey: \" + insertedKey;\n\t\t\t\tlog.error( msg );\n\t\t\t\tthrow new LimelightInternalErrorException( msg );\n\t\t\t}\n\t\t\t\n\t\t\tint insertedKeyInt = (int) insertedKeyLong; // Inserted auto-increment primary key for the inserted record\n\t\t\t\n\t\t\treturn insertedKeyInt;\n\t\t\t\n\t\t} catch ( RuntimeException e ) {\n\t\t\tString msg = \"SQL: \" + INSERT_SQL;\n\t\t\tlog.error( msg, e );\n\t\t\tthrow e;\n\t\t}\n\t}",
"private int genKey()\n {\n return (nameValue.getData() + scopeDefined.getTag()).hashCode();\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_12()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}"
] | [
"0.7671129",
"0.74215895",
"0.64512783",
"0.63143605",
"0.62703913",
"0.61667943",
"0.60225165",
"0.60198206",
"0.60165256",
"0.59953505",
"0.5994721",
"0.5970927",
"0.59332544",
"0.5894746",
"0.5889786",
"0.58765006",
"0.5857907",
"0.58364046",
"0.5807646",
"0.5773437",
"0.5770844",
"0.5767665",
"0.5767665",
"0.5767665",
"0.5767665",
"0.5767665",
"0.5734792",
"0.57318187",
"0.57294756",
"0.5727344",
"0.57238793",
"0.570991",
"0.56974745",
"0.56889576",
"0.56361556",
"0.5607182",
"0.55961347",
"0.5548032",
"0.5531406",
"0.5517052",
"0.55033326",
"0.5500718",
"0.5497316",
"0.5494224",
"0.5493798",
"0.54809767",
"0.5472565",
"0.54717284",
"0.5458291",
"0.54566187",
"0.544842",
"0.5444267",
"0.5431792",
"0.5423484",
"0.5420989",
"0.54184383",
"0.5412675",
"0.54073906",
"0.5398183",
"0.53933275",
"0.5386478",
"0.5384527",
"0.5383179",
"0.53774536",
"0.5376597",
"0.5375753",
"0.53625244",
"0.5353615",
"0.5338053",
"0.533743",
"0.533594",
"0.5322226",
"0.5321137",
"0.531526",
"0.5307659",
"0.53066796",
"0.5304668",
"0.5300481",
"0.5293575",
"0.52867514",
"0.5280871",
"0.5279438",
"0.5271962",
"0.5267631",
"0.52637637",
"0.52613926",
"0.5258926",
"0.5255321",
"0.5249871",
"0.5248867",
"0.5245983",
"0.5243492",
"0.52424395",
"0.52375746",
"0.523457",
"0.523457",
"0.52276766",
"0.52210814",
"0.5207706",
"0.5206684"
] | 0.7460496 | 1 |
Returns a nonrepeating primary key for a given entity. Since OpenBasespecific mechanism is used, key caching is disabled. Instead a database operation is performed on every call. | public Object generatePkForDbEntity(DataNode node, DbEntity entity)
throws Exception {
// check for binary pk
Object binPK = binaryPK(entity);
if (binPK != null) {
return binPK;
}
return new Integer(pkFromDatabase(node, entity));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected int pkFromDatabase(DataNode node, DbEntity entity) throws Exception {\n String sql = generatePkForDbEntityString(entity);\n QueryLogger.logQuery(QueryLogger.DEFAULT_LOG_LEVEL, sql, Collections.EMPTY_LIST);\n\n Connection con = node.getDataSource().getConnection();\n try {\n Statement st = con.createStatement();\n try {\n\n ResultSet rs = st.executeQuery(sql);\n try {\n //Object pk = null;\n if (!rs.next()) {\n throw new CayenneRuntimeException(\n \"Error generating pk for DbEntity \" + entity.getName());\n }\n return rs.getInt(1);\n }\n finally {\n rs.close();\n }\n }\n finally {\n st.close();\n }\n }\n finally {\n con.close();\n }\n }",
"Key getPrimaryKey();",
"@SuppressWarnings(\"unchecked\") @Override public K getIdByEntity(E entity) {\n K id = (K) session.getIdentifier(entity);\n LOG.info(String.format(\"Found id %d for entity %s.\",id, entity));\n return id;\n }",
"String getKey(Object entity);",
"private Integer newPrimaryKey( )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n daoUtil.executeQuery( );\n Integer nKey = null;\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 );\n }\n else\n {\n nKey = 1;\n }\n daoUtil.close( );\n\n return nKey.intValue( );\n }",
"private int newPrimaryKey( )\n {\n int nKey;\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n\n daoUtil.executeQuery( );\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 ) + 1;\n }\n else\n {\n // If the table is empty\n nKey = 1;\n }\n\n daoUtil.free( );\n\n return nKey;\n }",
"public String generatePkForDbEntityString(DbEntity ent) {\n if ((null == ent.getPrimaryKey()) || (1 != ent.getPrimaryKey().size())) {\n throw new CayenneRuntimeException(\n \"Error generating pk for DbEntity \"\n + ent.getName()\n + \": pk must be single attribute\");\n }\n DbAttribute primaryKeyAttribute = (DbAttribute) ent.getPrimaryKey().get(0);\n\n StringBuffer buf = new StringBuffer(\"NEWID FOR \");\n buf.append(ent.getName()).append(' ').append(primaryKeyAttribute.getName());\n return buf.toString();\n }",
"public Key getKey() {\n\t\tString fieldvalue = getValue(\"sys_id\");\n\t\tassert fieldvalue != null;\n\t\treturn new Key(fieldvalue);\n\t}",
"protected String createPKString(DbEntity entity) {\n List pk = entity.getPrimaryKey();\n\n if (pk == null || pk.size() == 0) {\n throw new CayenneRuntimeException(\n \"Entity '\" + entity.getName() + \"' has no PK defined.\");\n }\n\n StringBuffer buffer = new StringBuffer();\n buffer.append(\"CREATE PRIMARY KEY \").append(entity.getName()).append(\" (\");\n\n Iterator it = pk.iterator();\n\n // at this point we know that there is at least on PK column\n DbAttribute firstColumn = (DbAttribute) it.next();\n buffer.append(firstColumn.getName());\n\n while (it.hasNext()) {\n DbAttribute column = (DbAttribute) it.next();\n buffer.append(\", \").append(column.getName());\n }\n\n buffer.append(\")\");\n return buffer.toString();\n }",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"protected String createUniquePKIndexString(DbEntity entity) {\n List pk = entity.getPrimaryKey();\n\n if (pk == null || pk.size() == 0) {\n throw new CayenneRuntimeException(\n \"Entity '\" + entity.getName() + \"' has no PK defined.\");\n }\n\n StringBuffer buffer = new StringBuffer();\n\n // compound PK doesn't work well with UNIQUE index...\n // create a regular one in this case\n buffer\n .append(pk.size() == 1 ? \"CREATE UNIQUE INDEX \" : \"CREATE INDEX \")\n .append(entity.getName())\n .append(\" (\");\n\n Iterator it = pk.iterator();\n\n // at this point we know that there is at least on PK column\n DbAttribute firstColumn = (DbAttribute) it.next();\n buffer.append(firstColumn.getName());\n\n while (it.hasNext()) {\n DbAttribute column = (DbAttribute) it.next();\n buffer.append(\", \").append(column.getName());\n }\n buffer.append(\")\");\n return buffer.toString();\n }",
"PrimaryKey getPrimaryKey();",
"public long getEntityId();",
"private int newPrimaryKey( Plugin plugin )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin );\n daoUtil.executeQuery( );\n\n int nKey;\n\n if ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n daoUtil.free( );\n\n return nKey;\n }",
"public PrimaryKey getPrimaryKey();",
"PrimaryKey createPrimaryKey();",
"public ObjectKey getPrimaryKey()\n {\n return SimpleKey.keyFor(getNewsletterId());\n }",
"long getNoId();",
"public Object generalPK() {\n\t\treturn null;\r\n\t}",
"PrimaryKey getPrimarykey();",
"public abstract String getPrimaryKey(String tableName);",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _employee.getPrimaryKey();\n\t}",
"public IdKey getKey() {\n return idKey;\n }",
"Object getPrimaryKey() throws IllegalStateException;",
"private String generatePrimaryKey(Connection conn, String tableName) {\n String returnValue = null;\n String existingPkValue = null;\n String nextPkValue = null;\n\n try {\n existingPkValue = sql.selectKeyValueFromLastUsedKey(conn, tableName);\n\n if (existingPkValue == null) {\n System.out.println(\"Last used key value is NULL\");\n return null;\n }\n // remove first 1 alphabetic characters from this\n String prefix = existingPkValue.substring(0, 1);\n String existingPkValueWithPrefixStripped = existingPkValue.substring(1);\n\n // get number of characters in lastUsedId\n int completeLength = existingPkValueWithPrefixStripped.length();\n\n // convert lastUsedId into number\n int existingIdNum = 0;\n existingIdNum = Integer.parseInt(existingPkValueWithPrefixStripped.trim());\n\n // add 1 to this number\n int nextIdNum = existingIdNum + 1;\n\n // convert this number back to String\n String nextId = String.valueOf(nextIdNum);\n int newLength = nextId.length();\n // depending on the number of characters calculated initially,\n int zeroes = completeLength - newLength;\n // prefix Zeros accordingly to this String\n for (int i = 1; i <= zeroes; i++) {\n nextId = \"0\" + nextId;\n }\n\n // add the 4 character alphabetic prefix to this string\n nextPkValue = prefix + nextId;\n\n // update the system_last_used_id table\n sql.updateLastUsedPrimaryKeyValue(conn, tableName, nextPkValue);\n returnValue = nextPkValue;\n } catch (NumberFormatException ex) {\n System.out.println(\"generatePrimaryKey: \" + ex.getMessage());\n }\n return returnValue;\n\n }",
"protected Long obtainObjectKey(Object obj)\n\t{\n\t\tif(obj instanceof GoodUnit)\n\t\t\treturn ((GoodUnit)obj).getPrimaryKey();\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object getPrimaryKey() {\n\t\treturn null;\n\t}",
"public String getEntityId() {\r\n\t\treturn EngineTools.getEntityId(getEntityKeys()[2]);\r\n\t}",
"public int getEntityId ( ) {\n\t\treturn invokeSafe ( \"getEntityId\" );\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _state.getPrimaryKey();\n\t}",
"public int newPrimaryKey( Plugin plugin )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin );\n daoUtil.executeQuery( );\n\n int nKey;\n\n if ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n daoUtil.free( );\n\n return nKey;\n }",
"public int newPrimaryKey( Plugin plugin )\r\n {\r\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin );\r\n daoUtil.executeQuery( );\r\n\r\n int nKey;\r\n\r\n daoUtil.next( );\r\n\r\n nKey = daoUtil.getInt( 1 ) + 1;\r\n daoUtil.free( );\r\n\r\n return nKey;\r\n }",
"public int keyId() {\n return keyId;\n }",
"public int newPrimaryKey( Plugin plugin)\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK , plugin );\n daoUtil.executeQuery( );\n\n int nKey = 1;\n\n if( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 ) + 1;\n }\n\n daoUtil.free();\n\n return nKey;\n }",
"public String getPrimaryKey() throws CloneNotSupportedException {\r\n\t\tString key=\"\";\r\n\t\tfor (int i = 0; i < this.state.getSizeCol(); i++) {\r\n\t\t\tfor (int j = 0; j < this.state.getSizeRow(); j++) {\r\n\t\t\t\tkey+=this.state.getValue(new Position(i,j));\r\n\t\t\t}\r\n\t\t}\r\n\t\tkey+=\"?\"+this.state.getTractor().getPosition().toString();\r\n\t\treturn key;\r\n\t}",
"public ObjectKey getPrimaryKey()\n {\n pks[0] = SimpleKey.keyFor(getMailId());\n pks[1] = SimpleKey.keyFor(getReceiverId());\n return comboPK;\n }",
"public MapEntityKey getMapEntityKey() {\n\t\treturn mapEntityKey;\n\t}",
"public synchronized Identifier getNewIdentifier(String entityName) {\n boolean isToRead = true;\n int identifyValueInt = 0;\n \n if (dbProximity == DB_PROXIMITY_ALWAYS_READ_AND_WRITE) {\n isToRead = true;\n } else {\n Object entityIdObject = idTable.get(entityName);\n if (entityIdObject == null) isToRead = true;\n else {\n de.must.io.Logger.getInstance().debug(getClass(), \"Got Id \" + identifyValueInt + \" from hashtable for \" + entityName);\n identifyValueInt = ((Integer)entityIdObject).intValue();\n isToRead = false;\n }\n }\n\n ResultSet rs = null;\n if (isToRead) try {\n if (selectStatement == null) {\n if (connection.getMetaData().getDatabaseProductName().indexOf(\"Oracle\") > -1) { // dedicated to Oracle CHAR\n selectStatement = connection.prepareStatement(\"select * from \" + idTableName + \" where trim(\" + idEntityColumnName + \") = ?\");\n } else {\n selectStatement = connection.prepareStatement(\"select * from \" + idTableName + \" where \" + idEntityColumnName + \" = ?\");\n }\n }\n selectStatement.setString(1, entityName);\n rs = selectStatement.executeQuery();\n if (rs.next()) {\n mode = UPDATEMODE;\n int identNrInt = rs.getInt(idValueColumnName);\n if (identNrInt > 0) {\n identifyValueInt = identNrInt;\n } else {\n double identNrDouble = rs.getDouble(\"ID_VALUE_COLUMN_NAME\"); // Oracle\n if (identNrDouble > 0) {\n identifyValueInt = (int)identNrDouble;\n } else {\n de.must.io.Logger.getInstance().info(getClass(), \"failed to read IdentNr\");\n }\n }\n de.must.io.Logger.getInstance().debug(getClass(), \"Got Id \" + identifyValueInt + \" from database for \" + entityName);\n }\n else {\n mode = INSERTMODE;\n identifyValueInt = 0;\n }\n }\n catch (SQLException e) {\n de.must.io.Logger.getInstance().info(getClass(), selectStatement);\n de.must.io.Logger.getInstance().error(getClass(), e);\n return null;\n }\n finally {\n if (rs != null) try {\n rs.close();\n } catch (Exception e) {}\n }\n\n identifyValueInt++;\n\n switch (mode) {\n case INSERTMODE:\n if (!insert(identifyValueInt, entityName)) identifyValueInt = ERROR_ID;\n break;\n case UPDATEMODE:\n if (!update(identifyValueInt, entityName)) identifyValueInt = ERROR_ID;\n }\n if (identifyValueInt > 0) idTable.put(entityName, new Integer(identifyValueInt));\n return new Identifier(identifyValueInt);\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn model.getPrimaryKey();\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn model.getPrimaryKey();\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn model.getPrimaryKey();\n\t}",
"public int newPrimaryKey( Plugin plugin )\n {\n \tint nKey;\n \t\n \ttry ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin ) )\n \t{\n \t\tdaoUtil.executeQuery( );\n \t\t\n \t\tif ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n \t}\n\n return nKey;\n }",
"@Override\n\tpublic Object getEntityId() {\n\t\treturn null;\n\t}",
"public String getIdKey(EdaContext xContext) {\n\t\treturn String.valueOf(getId());\n\n\t}",
"public java.lang.Long _pk()\n {\n return (java.lang.Long)i_pk();\n }",
"@Override\n\tpublic Serializable getPrimaryKeyObj() {\n\t\treturn getElectiveId();\n\t}",
"Object getPrimaryKey(Object metadataID);",
"public static String generateEntityKey(String projectID,String entityCategoryID,String entityID)\n {\n if(StringUtils.isEmpty(projectID) || StringUtils.isEmpty(entityCategoryID) || \n StringUtils.isEmpty(entityID)) return null;\n \n StringBuilder sb=new StringBuilder();\n sb.append(\"[\")\n .append(projectID.trim()).append(\"|\")\n .append(entityCategoryID.trim()).append(\"|\")\n .append(entityID.trim()).append(\"]\");\n \n return sb.toString(); \n }",
"public String getKey() {\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tif (getLineNo() != null) {\r\n\t\t\tbuilder.append(getLineNo());\r\n\t\t} else if (this.getEntityId() != null) {\r\n\t\t\tbuilder.append(getEntityId());\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}",
"public IdDt getKeyElement() { \n\t\tif (myKey == null) {\n\t\t\tmyKey = new IdDt();\n\t\t}\n\t\treturn myKey;\n\t}",
"public IEntityPK getPK() {\r\n\treturn this.pk;\r\n }",
"public int getGeneratedKey() {\n\n throw new RuntimeException(\"This method is only valid for insert commands\");\n }",
"public SingularAttribute<? super T, ?> getPKAttribute() {\n\t\tMetamodel metaModel = this.em.getMetamodel();\n\t\tIdentifiableType<T> identityType = (IdentifiableType<T>) metaModel.managedType(type);\n\t\treturn identityType.getId(identityType.getIdType().getJavaType());\n\t}",
"T key();",
"int getProductKey();",
"public Object getGenericEntityByPrimaryKey(Class ent, Serializable key) throws RepositoryException{\n\t\treturn DatanucleusCRUDUtils.getById(ent, key);\n\t}",
"@Override\n\tpublic BaseEntity getByPk(BaseEntity entity) throws DaoException {\n\t\treturn null;\n\t}",
"String getExistingId();",
"public static Key createPrimaryKey(Number idexped, Number idbulto)\n {\n return new Key(new Object[] {idexped, idbulto});\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _expandoColumn.getPrimaryKey();\n\t}",
"@Nonnull\n protected KeyExpression buildPrimaryKey() {\n return Key.Expressions.concat(\n Key.Expressions.recordType(),\n Key.Expressions.list(constituents.stream()\n .map(c -> Key.Expressions.field(c.getName()).nest(c.getRecordType().getPrimaryKey()))\n .collect(Collectors.toList())));\n }",
"public com.hps.july.persistence.DocumentKey getI13nActKey() {\n\tcom.hps.july.persistence.DocumentKey temp = null;\n\ttemp = new com.hps.july.persistence.DocumentKey();\n\tboolean i13nAct_NULLTEST = true;\n\ti13nAct_NULLTEST &= (i13nAct_document == null);\n\ttemp.document = ((i13nAct_document == null) ? 0 : i13nAct_document.intValue());\n\tif (i13nAct_NULLTEST) temp = null;\n\treturn temp;\n}",
"public Long getObjectKey()\n\t{\n\t\treturn objectKey;\n\t}",
"@Override\n public String getEntId() {\n init();\n return entid;\n }",
"public String getId() {\n int result;\n result = (key != null ? key.hashCode() : 0);\n result = 31 * result + (overridable ? 1 : 0);\n result = 31 * result + (value != null ? value.hashCode() : 0);\n result = 31 * result + (set ? 1 : 0);\n if (result < 0)\n result = result * -1;\n return String.valueOf(result);\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _dictData.getPrimaryKey();\n\t}",
"public String getKey() {\n\t\treturn id + \"\";\n\t}",
"@Override\n public long getPrimaryKey() {\n return _partido.getPrimaryKey();\n }",
"public ProductoPk createPk() {\r\n return new ProductoPk(idProducto);\r\n }",
"public int getKey() {\n\t\treturn 0;\n\t}",
"private Integer getNewId(){\n List<Integer> allIds = new ArrayList<>();\n for (T entity : allEntities) {\n allIds.add(entity.getId());\n }\n return allIds.size() > 0 ? Collections.max(allIds) + 1 : 1;\n }",
"public String naturalKeyName() {\n return idName();\n }",
"public Integer getEntityTypeId() {\n // get entity type code\n String code = getEntityTypeCode();\n // check cache, (may contain null)\n if (entityTypeIdCache.containsKey(code)) {\n return entityTypeIdCache.get(code);\n }\n // query, cache, and return metadata driven ids\n EntityType entityType = getMetadata().getEntityTypeByName(code);\n Integer id = ((entityType != null) ? entityType.getEntityTypeId() : null);\n entityTypeIdCache.put(code, id);\n return id;\n }",
"private Long getNextPkValueForEntityIncreaseBy(String entityName, int count, int increasePkBy) {\n\t\tif (increasePkBy < 1) increasePkBy = 1;\n\n\t\tString where = \"where eoentity_name = '\" + entityName + \"'\";\n\t\tif(false) {\n\t\t\t// AK: this should actually be the correct way...\n\t\t\tEOEditingContext ec = ERXEC.newEditingContext();\n\t\t\tec.lock();\n\t\t\ttry {\n\t\t\t\tEODatabaseContext dbc = ERXEOAccessUtilities.databaseContextForEntityNamed((EOObjectStoreCoordinator) ec.rootObjectStore(), entityName);\n\t\t\t\tdbc.lock();\n\t\t\t\ttry {\n\t\t\t\t\tEOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName);\n\t\t\t\t\tEOAdaptorChannel channel = (EOAdaptorChannel) dbc.adaptorContext().channels().lastObject();\n\t\t\t\t\tNSArray result = channel.primaryKeysForNewRowsWithEntity(increasePkBy, entity);\n\t\t\t\t\treturn (Long) ((NSDictionary) result.lastObject()).allValues().lastObject();\n\t\t\t\t} finally {\n\t\t\t\t\tdbc.unlock();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tec.unlock();\n\t\t\t}\n\t\t} else {\n\t\t\tERXJDBCConnectionBroker broker = ERXJDBCConnectionBroker.connectionBrokerForEntityNamed(entityName);\n\t\t\tConnection con = broker.getConnection();\n\t\t\ttry {\n\t\t\t\ttry {\n\t\t\t\t\tcon.setAutoCommit(false);\n\t\t\t\t\tcon.setReadOnly(false);\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tlog.error(\"Database error.\", e);\n\t\t\t\t}\n\n\t\t\t\tfor(int tries = 0; tries < count; tries++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tResultSet resultSet = con.createStatement().executeQuery(\"select pk_value from pk_table \" + where);\n\t\t\t\t\t\tcon.commit();\n\n\t\t\t\t\t\tboolean hasNext = resultSet.next();\n\t\t\t\t\t\tlong pk = 1;\n\t\t\t\t\t\tif (hasNext) {\n\t\t\t\t\t\t\tpk = resultSet.getLong(\"pk_value\");\n\t\t\t\t\t\t\t// now execute the update\n\t\t\t\t\t\t\tcon.createStatement().executeUpdate(\"update pk_table set pk_value = \" + (pk+increasePkBy) + \" \" + where);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpk = maxIdFromTable(entityName);\n\t\t\t\t\t\t\t// first time, we need to set i up\n\t\t\t\t\t\t\tcon.createStatement().executeUpdate(\"insert into pk_table (eoentity_name, pk_value) values ('\" + entityName + \"', \" + (pk+increasePkBy) + \")\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcon.commit();\n\t\t\t\t\t\treturn Long.valueOf(pk);\n\t\t\t\t\t} catch(SQLException ex) {\n\t\t\t\t\t\tString s = ex.getMessage().toLowerCase();\n\t\t\t\t\t\tboolean creationError = (s.indexOf(\"error code 116\") != -1); // frontbase?\n\t\t\t\t\t\tcreationError |= (s.indexOf(\"pk_table\") != -1 && s.indexOf(\"does not exist\") != -1); // postgres ?\n\t\t\t\t\t\tcreationError |= s.indexOf(\"ora-00942\") != -1; // oracle\n\t\t\t\t\t\tif (creationError) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcon.rollback();\n\t\t\t\t\t\t\t\tlog.info(\"creating pk table\");\n\t\t\t\t\t\t\t\tcon.createStatement().executeUpdate(\"create table pk_table (eoentity_name varchar(100) not null, pk_value integer)\");\n\t\t\t\t\t\t\t\tcon.createStatement().executeUpdate(\"alter table pk_table add primary key (eoentity_name)\");// NOT\n\t\t\t\t\t\t\t\t// DEFERRABLE\n\t\t\t\t\t\t\t\t// INITIALLY\n\t\t\t\t\t\t\t\t// IMMEDIATE\");\n\t\t\t\t\t\t\t\tcon.commit();\n\t\t\t\t\t\t\t} catch (SQLException ee) {\n\t\t\t\t\t\t\t\tthrow new NSForwardException(ee, \"could not create pk table\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new NSForwardException(ex, \"Error fetching PK\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tbroker.freeConnection(con);\n\t\t\t}\n\t\t}\n\t\tthrow new IllegalStateException(\"Couldn't get PK\");\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _scienceApp.getPrimaryKey();\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _phieugiahan.getPrimaryKey();\n\t}",
"public long getKeyID()\n {\n return keyID;\n }",
"@Override\n\tpublic int getPrimaryKey() {\n\t\treturn _keHoachKiemDemNuoc.getPrimaryKey();\n\t}",
"@Override\n public String getPrimaryKey(String tableName) {\n return super.getPrimaryKey(tableName);\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _dlSyncEvent.getPrimaryKey();\n\t}",
"protected CacheKey getCacheKey(Vector primaryKey) {\n CacheKey key = null;\n\n synchronized (this) {\n getSearchKey().setKey(primaryKey);\n key = getCacheKey(getSearchKey());\n }\n\n return key;\n }",
"public StrColumn getEntityId() {\n return delegate.getColumn(\"entity_id\", DelegatingStrColumn::new);\n }",
"@Override\n\tpublic String getKey() {\n\t\treturn id+\"\";\n\t}",
"public long key()\n\t\t{\n\t\t\treturn nid.key();\n\t\t}",
"public java.lang.String getPrimaryKey() {\n\t\treturn _imageCompanyAg.getPrimaryKey();\n\t}",
"int getKey();",
"int getKey();",
"public ModuleKey getModulePK() {\n return this;\n }",
"public static String getPrimaryKeyName() {\r\n\t\t\treturn PRIMARY_KEY_ID;\r\n\t\t}",
"long nextUniqueKey() throws IOException;",
"T getByPk(int key) throws PersistException;",
"public long getPrimaryKey() {\n\t\treturn _tempNoTiceShipMessage.getPrimaryKey();\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _changesetEntry.getPrimaryKey();\n\t}",
"public static Key createEntity(EntityManager em) {\n Key key = new Key()\n .value(DEFAULT_VALUE)\n .status(DEFAULT_STATUS);\n return key;\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _second.getPrimaryKey();\n\t}",
"Object getNextRuntimeId() throws PersistenceException;",
"public long getPrimaryKey() {\n return primaryKey;\n }",
"public long getPrimaryKey() {\n\t\treturn _telefonoSolicitudProducto.getPrimaryKey();\n\t}"
] | [
"0.68928",
"0.68638057",
"0.6803264",
"0.65346974",
"0.64884573",
"0.6460881",
"0.64352816",
"0.6324398",
"0.63001883",
"0.62615705",
"0.62615705",
"0.6239093",
"0.6223041",
"0.6101207",
"0.607262",
"0.60637605",
"0.60510135",
"0.6039385",
"0.601038",
"0.59935546",
"0.5987928",
"0.5986932",
"0.5964426",
"0.5960531",
"0.5955838",
"0.5949276",
"0.59238243",
"0.5881011",
"0.587239",
"0.5870822",
"0.5867228",
"0.5854766",
"0.5818023",
"0.5798922",
"0.5778063",
"0.5762124",
"0.5758713",
"0.575327",
"0.57487065",
"0.57446563",
"0.57446563",
"0.57446563",
"0.5744391",
"0.5742334",
"0.57082534",
"0.56930023",
"0.5692654",
"0.5691979",
"0.5689374",
"0.5682244",
"0.5674661",
"0.5672559",
"0.56652224",
"0.56582934",
"0.56526846",
"0.5645025",
"0.5644721",
"0.5627905",
"0.5622848",
"0.5610361",
"0.5598717",
"0.55944407",
"0.55921364",
"0.5583515",
"0.5578618",
"0.5574176",
"0.55737513",
"0.5569849",
"0.55621725",
"0.5554232",
"0.55303085",
"0.5526536",
"0.55139947",
"0.5509087",
"0.5505806",
"0.55047894",
"0.54981434",
"0.5485889",
"0.54824615",
"0.5480584",
"0.54801685",
"0.5473668",
"0.54732287",
"0.5471698",
"0.5470081",
"0.54681695",
"0.54668367",
"0.5461083",
"0.5461083",
"0.5453488",
"0.5437735",
"0.54375505",
"0.5436136",
"0.5435845",
"0.54331005",
"0.5432272",
"0.54287297",
"0.5428065",
"0.5423508",
"0.5419928"
] | 0.71603936 | 0 |
Generates new (unique and nonrepeating) primary key for specified DbEntity. Executed SQL looks like this: NEWID FOR Table Column COLUMN must be marked as UNIQUE in order for this to work properly. | protected int pkFromDatabase(DataNode node, DbEntity entity) throws Exception {
String sql = generatePkForDbEntityString(entity);
QueryLogger.logQuery(QueryLogger.DEFAULT_LOG_LEVEL, sql, Collections.EMPTY_LIST);
Connection con = node.getDataSource().getConnection();
try {
Statement st = con.createStatement();
try {
ResultSet rs = st.executeQuery(sql);
try {
//Object pk = null;
if (!rs.next()) {
throw new CayenneRuntimeException(
"Error generating pk for DbEntity " + entity.getName());
}
return rs.getInt(1);
}
finally {
rs.close();
}
}
finally {
st.close();
}
}
finally {
con.close();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String generatePkForDbEntityString(DbEntity ent) {\n if ((null == ent.getPrimaryKey()) || (1 != ent.getPrimaryKey().size())) {\n throw new CayenneRuntimeException(\n \"Error generating pk for DbEntity \"\n + ent.getName()\n + \": pk must be single attribute\");\n }\n DbAttribute primaryKeyAttribute = (DbAttribute) ent.getPrimaryKey().get(0);\n\n StringBuffer buf = new StringBuffer(\"NEWID FOR \");\n buf.append(ent.getName()).append(' ').append(primaryKeyAttribute.getName());\n return buf.toString();\n }",
"protected String createPKString(DbEntity entity) {\n List pk = entity.getPrimaryKey();\n\n if (pk == null || pk.size() == 0) {\n throw new CayenneRuntimeException(\n \"Entity '\" + entity.getName() + \"' has no PK defined.\");\n }\n\n StringBuffer buffer = new StringBuffer();\n buffer.append(\"CREATE PRIMARY KEY \").append(entity.getName()).append(\" (\");\n\n Iterator it = pk.iterator();\n\n // at this point we know that there is at least on PK column\n DbAttribute firstColumn = (DbAttribute) it.next();\n buffer.append(firstColumn.getName());\n\n while (it.hasNext()) {\n DbAttribute column = (DbAttribute) it.next();\n buffer.append(\", \").append(column.getName());\n }\n\n buffer.append(\")\");\n return buffer.toString();\n }",
"PrimaryKey createPrimaryKey();",
"public Object generatePkForDbEntity(DataNode node, DbEntity entity)\n throws Exception {\n // check for binary pk\n Object binPK = binaryPK(entity);\n if (binPK != null) {\n return binPK;\n }\n return new Integer(pkFromDatabase(node, entity));\n }",
"protected String createUniquePKIndexString(DbEntity entity) {\n List pk = entity.getPrimaryKey();\n\n if (pk == null || pk.size() == 0) {\n throw new CayenneRuntimeException(\n \"Entity '\" + entity.getName() + \"' has no PK defined.\");\n }\n\n StringBuffer buffer = new StringBuffer();\n\n // compound PK doesn't work well with UNIQUE index...\n // create a regular one in this case\n buffer\n .append(pk.size() == 1 ? \"CREATE UNIQUE INDEX \" : \"CREATE INDEX \")\n .append(entity.getName())\n .append(\" (\");\n\n Iterator it = pk.iterator();\n\n // at this point we know that there is at least on PK column\n DbAttribute firstColumn = (DbAttribute) it.next();\n buffer.append(firstColumn.getName());\n\n while (it.hasNext()) {\n DbAttribute column = (DbAttribute) it.next();\n buffer.append(\", \").append(column.getName());\n }\n buffer.append(\")\");\n return buffer.toString();\n }",
"private int newPrimaryKey( )\n {\n int nKey;\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n\n daoUtil.executeQuery( );\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 ) + 1;\n }\n else\n {\n // If the table is empty\n nKey = 1;\n }\n\n daoUtil.free( );\n\n return nKey;\n }",
"@Override\n public String generateId() {\n return HiveIdGenerator.generateTableId(getSourceId(), getDatabaseName(),\n getTableName());\n }",
"private String generatePrimaryKey(Connection conn, String tableName) {\n String returnValue = null;\n String existingPkValue = null;\n String nextPkValue = null;\n\n try {\n existingPkValue = sql.selectKeyValueFromLastUsedKey(conn, tableName);\n\n if (existingPkValue == null) {\n System.out.println(\"Last used key value is NULL\");\n return null;\n }\n // remove first 1 alphabetic characters from this\n String prefix = existingPkValue.substring(0, 1);\n String existingPkValueWithPrefixStripped = existingPkValue.substring(1);\n\n // get number of characters in lastUsedId\n int completeLength = existingPkValueWithPrefixStripped.length();\n\n // convert lastUsedId into number\n int existingIdNum = 0;\n existingIdNum = Integer.parseInt(existingPkValueWithPrefixStripped.trim());\n\n // add 1 to this number\n int nextIdNum = existingIdNum + 1;\n\n // convert this number back to String\n String nextId = String.valueOf(nextIdNum);\n int newLength = nextId.length();\n // depending on the number of characters calculated initially,\n int zeroes = completeLength - newLength;\n // prefix Zeros accordingly to this String\n for (int i = 1; i <= zeroes; i++) {\n nextId = \"0\" + nextId;\n }\n\n // add the 4 character alphabetic prefix to this string\n nextPkValue = prefix + nextId;\n\n // update the system_last_used_id table\n sql.updateLastUsedPrimaryKeyValue(conn, tableName, nextPkValue);\n returnValue = nextPkValue;\n } catch (NumberFormatException ex) {\n System.out.println(\"generatePrimaryKey: \" + ex.getMessage());\n }\n return returnValue;\n\n }",
"private Integer newPrimaryKey( )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n daoUtil.executeQuery( );\n Integer nKey = null;\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 );\n }\n else\n {\n nKey = 1;\n }\n daoUtil.close( );\n\n return nKey.intValue( );\n }",
"public int getGeneratedKey() {\n\n throw new RuntimeException(\"This method is only valid for insert commands\");\n }",
"@PrePersist\n public void generateId() {\n if (this.id == null) {\n this.id = UUID.randomUUID().toString();\n }\n }",
"public static String generateEntityKey(String projectID,String entityCategoryID,String entityID)\n {\n if(StringUtils.isEmpty(projectID) || StringUtils.isEmpty(entityCategoryID) || \n StringUtils.isEmpty(entityID)) return null;\n \n StringBuilder sb=new StringBuilder();\n sb.append(\"[\")\n .append(projectID.trim()).append(\"|\")\n .append(entityCategoryID.trim()).append(\"|\")\n .append(entityID.trim()).append(\"]\");\n \n return sb.toString(); \n }",
"private int newPrimaryKey( Plugin plugin )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin );\n daoUtil.executeQuery( );\n\n int nKey;\n\n if ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n daoUtil.free( );\n\n return nKey;\n }",
"Key getPrimaryKey();",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n String[] stringArray0 = new String[20];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \" = \", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"PRIMARY KEY (, , , , , , , , , , , , , , , , , , , )\", string0);\n }",
"public static Key createPrimaryKey(Number idexped, Number idbulto)\n {\n return new Key(new Object[] {idexped, idbulto});\n }",
"public String generateId() {\n return Utils.generateKey();\n }",
"public static String newId(long useFor, long dbNum, long tableNum) throws Exception{\n\t\treturn IdGenerator.generate61ForId(useFor, dbNum, tableNum);\t\t\n\t}",
"@Nonnull\n protected KeyExpression buildPrimaryKey() {\n return Key.Expressions.concat(\n Key.Expressions.recordType(),\n Key.Expressions.list(constituents.stream()\n .map(c -> Key.Expressions.field(c.getName()).nest(c.getRecordType().getPrimaryKey()))\n .collect(Collectors.toList())));\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_24()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public void recreatePrimaryKey()\n throws DBException\n {\n \n /* drop existing primary key */\n try {\n DBProvider.removePrimaryIndex(this.getUntranslatedTableName());\n } catch (Throwable th) {\n Print.logWarn(\"Primary key does not currently exist\");\n // ignore exception\n }\n \n /* recreate primary key */\n try {\n DBProvider.createPrimaryIndex(this);\n } catch (SQLException sqe) {\n throw new DBException(\"Alter primary key\", sqe);\n }\n\n }",
"public static Key createPrimaryKey(Number supplierId) {\n return new Key(new Object[]{supplierId});\n }",
"public void generateID()\n {\n ID = this.hashCode();\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_25()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable();\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public int generateId(){\n return repository.getCount()+1;\n }",
"@Test(timeout = 4000)\n public void test124() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionContext\");\n String[] stringArray0 = new String[4];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"org.apache.derby.iapi.sql.execute.ExecutionContext\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.ukSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"UNIQUE (, , , )\", string0);\n }",
"public void testInsert3() throws Exception {\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command insert = das.createCommand(\"insert into COMPANY (NAME) values (?)\");\n insert.setParameter(1, \"AAA Rental\");\n insert.execute();\n // Integer key = (Integer) insert.getParameterValue(\"generated_key\");\n Integer key = new Integer(insert.getGeneratedKey());\n\n // Verify insert\n Command select = das.createCommand(\"Select ID, NAME from COMPANY where ID = ?\");\n select.setParameter(1, key);\n DataObject root = select.executeQuery();\n assertEquals(key, root.get(\"COMPANY[1]/ID\"));\n\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_29()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_18()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_30()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"0123456789\", new DBSchema(\"\", new DBCatalog(\"\")));\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Override\n public String createSharingProduct(SharingProduct sharingProduct) {\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n ResultSet result = null;\n \n try {\n connection = MySQLDAOFactory.createConnection();\n preparedStatement = connection.prepareStatement(Create_Query, Statement.RETURN_GENERATED_KEYS);\n preparedStatement.setString(1, sharingProduct.getEmail());\n preparedStatement.setInt(2, sharingProduct.getPID());\n preparedStatement.execute();\n result = preparedStatement.getGeneratedKeys();\n \n if (result.next() && result != null) {\n return result.getString(1);\n } else {\n return null;\n }\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n try {\n result.close();\n } catch (Exception rse) {\n rse.printStackTrace();\n }\n try {\n preparedStatement.close();\n } catch (Exception sse) {\n sse.printStackTrace();\n }\n try {\n connection.close();\n } catch (Exception cse) {\n cse.printStackTrace();\n }\n }\n \n return null; \n }",
"static void generatePrimary(Table table, Key key, PrintWriter outData, String mcomma)\r\n {\r\n String comma = \" ( \";\r\n String keyname = key.name.toUpperCase();\r\n if (keyname.indexOf(table.name.toUpperCase()) == -1)\r\n keyname = table.name.toUpperCase()+\"_\"+keyname;\r\n outData.println(mcomma+\"CONSTRAINT \"+keyname+\" PRIMARY KEY\");\r\n for (int i=0; i < key.fields.size(); i++, comma = \" , \")\r\n {\r\n String name = (String) key.fields.elementAt(i);\r\n outData.println(comma+name);\r\n }\r\n outData.println(\" )\");\r\n for (int i=0; i < key.options.size(); i++)\r\n {\r\n String option = (String) key.options.elementAt(i);\r\n outData.println(\" \"+option);\r\n }\r\n }",
"private void generateObjIdIfRequired(T obj) {\n Field idField = Arrays.stream(entityClass.getDeclaredFields())\n .filter(f -> f.isAnnotationPresent(Id.class) &&\n f.isAnnotationPresent(GeneratedValue.class) &&\n f.getType().equals(Long.TYPE)) //Refers to primitive type long\n .findFirst().orElse(null);\n \n if(idField == null) return;\n\n try {\n idField.setAccessible(true);\n idField.set(obj, idCounter);\n idField.setAccessible(false);\n idCounter++;\n } catch (IllegalAccessException e) {\n throw new DBException(\"Problem generating and setting id of object: \" + entityClass.getSimpleName() + \" : \" + obj.toString(), e);\n }\n\n }",
"@Test\n\tpublic void testGetNewTableKey() throws SQLException\n\t{\n\t\tassertEquals(1, DatabaseGateway.getNewID());\n\t}",
"@Override\n public String getNewId()throws DVDLibraryPersistenceException{\n \n int intId = 0;\n for (String key : dvds.keySet()){\n if (Integer.valueOf(key) > intId){\n intId = Integer.valueOf(key);\n }\n }\n return String.valueOf(intId + 1);\n }",
"private void setPrimaryKey(PSJdbcTableSchema tableSchema) throws PSJdbcTableFactoryException\n {\n List<String> pkcols = new ArrayList<String>();\n pkcols.add(\"col1\");\n PSJdbcPrimaryKey pk = new PSJdbcPrimaryKey(pkcols.iterator(), PSJdbcTableComponent.ACTION_REPLACE);\n tableSchema.setPrimaryKey(pk);\n }",
"@Override\n protected final Void updateKeyAfterInsert(FarmField entity, long rowId) {\n return null;\n }",
"public abstract String getPrimaryKey(String tableName);",
"Object getNextRuntimeId() throws PersistenceException;",
"private <T> void setIdGeneration(DeployBeanDescriptor<T> desc) {\n if (desc.getIdGenerator() != null) {\n // already assigned (So custom or UUID)\n return;\n }\n if (desc.idProperty() == null) {\n return;\n }\n final DeployIdentityMode identityMode = desc.getIdentityMode();\n if (identityMode.isSequence() && !dbIdentity.isSupportsSequence()) {\n // explicit sequence but not supported by the DatabasePlatform\n log.log(INFO, \"Explicit sequence on {0} but not supported by DB Platform - ignored\", desc.getFullName());\n identityMode.setIdType(IdType.AUTO);\n }\n if (identityMode.isIdentity() && !dbIdentity.isSupportsIdentity()) {\n // explicit identity but not supported by the DatabasePlatform\n log.log(INFO, \"Explicit Identity on {0} but not supported by DB Platform - ignored\", desc.getFullName());\n identityMode.setIdType(IdType.AUTO);\n }\n\n if (identityMode.isAuto()) {\n if (desc.isPrimaryKeyCompoundOrNonNumeric()) {\n identityMode.setIdType(IdType.EXTERNAL);\n return;\n }\n if (desc.isIdGeneratedValue() || config.isIdGeneratorAutomatic()) {\n // use IDENTITY or SEQUENCE based on platform\n identityMode.setPlatformType(dbIdentity.getIdType());\n } else {\n // externally/application supplied Id values\n identityMode.setIdType(IdType.EXTERNAL);\n return;\n }\n }\n\n if (desc.getBaseTable() == null) {\n // no base table so not going to set Identity or sequence information\n return;\n }\n\n if (identityMode.isIdentity()) {\n // used when getGeneratedKeys is not supported (SQL Server 2000, SAP Hana)\n String selectLastInsertedId = dbIdentity.getSelectLastInsertedId(desc.getBaseTable());\n String selectLastInsertedIdDraft = (!desc.isDraftable()) ? selectLastInsertedId : dbIdentity.getSelectLastInsertedId(desc.getDraftTable());\n desc.setSelectLastInsertedId(selectLastInsertedId, selectLastInsertedIdDraft);\n return;\n }\n\n if (identityMode.isSequence()) {\n String seqName = identityMode.getSequenceName();\n if (seqName == null || seqName.isEmpty()) {\n String primaryKeyColumn = desc.getSinglePrimaryKeyColumn();\n seqName = namingConvention.getSequenceName(desc.getBaseTable(), primaryKeyColumn);\n }\n int stepSize = desc.setIdentitySequenceBatchMode(databasePlatform.sequenceBatchMode());\n desc.setIdGenerator(createSequenceIdGenerator(seqName, stepSize));\n }\n }",
"private int genKey()\n {\n return (nameValue.getData() + scopeDefined.getTag()).hashCode();\n }",
"public int newPrimaryKey( Plugin plugin )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin );\n daoUtil.executeQuery( );\n\n int nKey;\n\n if ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n daoUtil.free( );\n\n return nKey;\n }",
"@Test(timeout = 4000)\n public void test125() throws Throwable {\n DBCatalog dBCatalog0 = new DBCatalog();\n DBSchema dBSchema0 = new DBSchema(\"}{,65x^HxS\", dBCatalog0);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"%@gEV{P$8\", dBSchema0);\n String[] stringArray0 = new String[3];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"}{,65x^HxS\", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n String string0 = SQLUtil.ukSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"UNIQUE (, , )\", string0);\n }",
"String uniqueId();",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_19()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"0123456789\", new DBSchema(\"\", new DBCatalog(\"\")));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_2()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"protected String createPrimaryKeyConstraint(TableModel table) {\r\n\t\tColumnModel[] pks = table.getPrimaryKeyColumns();\r\n\t\tString s = \"\";\r\n\t\tif (pks.length > 1) {\r\n\t\t\ts = \",\\n PRIMARY KEY(\";\r\n\t\t\tString a = \"\";\r\n\t\t\tfor (ColumnModel c : pks) {\r\n\t\t\t\tif (a.length() > 0) {\r\n\t\t\t\t\ta += \", \";\r\n\t\t\t\t}\r\n\t\t\t\ta += this.quote(c.getName());\r\n\t\t\t}\r\n\t\t\ts += a + \")\";\r\n\t\t}\r\n\t\treturn s;\r\n\t}",
"@Test\n @Run(unless = {Dbms.SQLITE})\n public void testId_table(Config config) throws Exception {\n TableStrategyDao dao = new TableStrategyDaoImpl(config);\n for (int i = 0; i < 110; i++) {\n TableStrategy entity = new TableStrategy();\n dao.insert(entity);\n assertNotNull(entity.getId());\n }\n }",
"public int newPrimaryKey( Plugin plugin )\n {\n \tint nKey;\n \t\n \ttry ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin ) )\n \t{\n \t\tdaoUtil.executeQuery( );\n \t\t\n \t\tif ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n \t}\n\n return nKey;\n }",
"public int newPrimaryKey( Plugin plugin)\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK , plugin );\n daoUtil.executeQuery( );\n\n int nKey = 1;\n\n if( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 ) + 1;\n }\n\n daoUtil.free();\n\n return nKey;\n }",
"private static int generateId() {\n\t\treturn ++sId;\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_20()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable();\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"PrimaryKey getPrimarykey();",
"ColumnIdentifier<ENTITY> identifier();",
"Id createId();",
"public int newPrimaryKey( Plugin plugin )\r\n {\r\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin );\r\n daoUtil.executeQuery( );\r\n\r\n int nKey;\r\n\r\n daoUtil.next( );\r\n\r\n nKey = daoUtil.getInt( 1 ) + 1;\r\n daoUtil.free( );\r\n\r\n return nKey;\r\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_8()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"KeyIdPair createKeyIdPair();",
"@Test(timeout = 4000)\n public void test091() throws Throwable {\n String[] stringArray0 = new String[9];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"%)vq\", (DBSchema) null);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, (String) null, true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"PRIMARY KEY (, , , , , , , , )\", string0);\n }",
"public static PrimaryIndexBuilder pkIndex() {\n return new PrimaryKeyBuilderImpl();\n }",
"PrimaryKey getPrimaryKey();",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_1()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (, 0123456789, An��t-1.0.txt, )\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public long getNextID() throws IDGenerationException;",
"private long generateID() {\n\t\treturn ++lastID;\n\t}",
"public ProductoPk createPk() {\r\n return new ProductoPk(idProducto);\r\n }",
"int nextId();",
"public static void resetGeneratedKeyIndex()\n\t{\n\t\tgeneratedKeyIndex = 0;\n\t}",
"public PrimaryKey getPrimaryKey();",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_12()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public int generateUniqueID(){\n\n int uniqueID = 100; \n int maxID =getMaxId() ;\n \n uniqueID = uniqueID + maxID;\n\n return uniqueID;\n }",
"private void buildPKIndex() {\n // index PK\n Collection<DbAttribute> pks = getResolver()\n .getEntity()\n .getDbEntity()\n .getPrimaryKeys();\n this.idIndices = new int[pks.size()];\n\n // this is needed for checking that a valid index is made\n Arrays.fill(idIndices, -1);\n\n Iterator<DbAttribute> it = pks.iterator();\n for (int i = 0; i < idIndices.length; i++) {\n DbAttribute pk = it.next();\n\n for (int j = 0; j < columns.length; j++) {\n if (pk.getName().equals(columns[j].getName())) {\n idIndices[i] = j;\n break;\n }\n }\n\n // sanity check\n if (idIndices[i] == -1) {\n throw new CayenneRuntimeException(\"PK column is not part of result row: %s\", pk.getName());\n }\n }\n }",
"private int generateNewId() {\n int size = userListCtrl.getUsers().size();\n \n if (size == 0) {\n return 1;\n } else {\n return userListCtrl.getUsers().get(size-1).getUserID()+1;\n }\n }",
"public DBRecordKey<gDBR> createKey() // <? extends DBRecord<?>>\n throws DBException\n {\n if (this.keyClass != null) {\n try {\n // this creates an empty key with no key fields\n Constructor<? extends DBRecordKey<gDBR>> kc = this.keyClass.getConstructor(new Class<?>[0]);\n return kc.newInstance(new Object[0]); // \"unchecked cast\"\n } catch (Throwable t) { // NoSuchMethodException, ...\n // Implementation error (should never occur)\n throw new DBException(\"Key Creation\", t);\n }\n }\n return null;\n }",
"private List<Key> createSequenceKeys(int count) {\n\t\tList<Key> keys = new ArrayList<Key>();\n\t\tdouble id = new Date().getTime();\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tdouble id2 = id + (i / count);\n\t\t\tdouble random = Math.random();\n\t\t\tid2 += random / count;\n\t\t\tlong id3 = (long) (id2 * (1 << 18));\n\t\t\tKey key = Datastore.createKey(UserItemMeta.get(), id3);\n\t\t\tkeys.add(key);\n\t\t}\n\t\treturn keys;\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_16()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"\", \"\", \"\", \"\", \"\", \"\"), new DBSchema(\"\", new DBCatalog(\"\")), \"0123456789\", \"0123456789\");\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importColumns(JDBCDBImporter.java:430)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importTableDetails(JDBCDBImporter.java:389)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.importTable(JDBCDBImporter.java:384)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"@Override\n public long generateNewContractId() {\n return idCounter++;\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_17()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\"), (DBSchema) null, (String) null, (String) null);\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getCatalog(LazyTable.java:130)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"String getExistingId();",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_7()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"public String createSmartKey(long ... ids);",
"public synchronized Identifier getNewIdentifier(String entityName) {\n boolean isToRead = true;\n int identifyValueInt = 0;\n \n if (dbProximity == DB_PROXIMITY_ALWAYS_READ_AND_WRITE) {\n isToRead = true;\n } else {\n Object entityIdObject = idTable.get(entityName);\n if (entityIdObject == null) isToRead = true;\n else {\n de.must.io.Logger.getInstance().debug(getClass(), \"Got Id \" + identifyValueInt + \" from hashtable for \" + entityName);\n identifyValueInt = ((Integer)entityIdObject).intValue();\n isToRead = false;\n }\n }\n\n ResultSet rs = null;\n if (isToRead) try {\n if (selectStatement == null) {\n if (connection.getMetaData().getDatabaseProductName().indexOf(\"Oracle\") > -1) { // dedicated to Oracle CHAR\n selectStatement = connection.prepareStatement(\"select * from \" + idTableName + \" where trim(\" + idEntityColumnName + \") = ?\");\n } else {\n selectStatement = connection.prepareStatement(\"select * from \" + idTableName + \" where \" + idEntityColumnName + \" = ?\");\n }\n }\n selectStatement.setString(1, entityName);\n rs = selectStatement.executeQuery();\n if (rs.next()) {\n mode = UPDATEMODE;\n int identNrInt = rs.getInt(idValueColumnName);\n if (identNrInt > 0) {\n identifyValueInt = identNrInt;\n } else {\n double identNrDouble = rs.getDouble(\"ID_VALUE_COLUMN_NAME\"); // Oracle\n if (identNrDouble > 0) {\n identifyValueInt = (int)identNrDouble;\n } else {\n de.must.io.Logger.getInstance().info(getClass(), \"failed to read IdentNr\");\n }\n }\n de.must.io.Logger.getInstance().debug(getClass(), \"Got Id \" + identifyValueInt + \" from database for \" + entityName);\n }\n else {\n mode = INSERTMODE;\n identifyValueInt = 0;\n }\n }\n catch (SQLException e) {\n de.must.io.Logger.getInstance().info(getClass(), selectStatement);\n de.must.io.Logger.getInstance().error(getClass(), e);\n return null;\n }\n finally {\n if (rs != null) try {\n rs.close();\n } catch (Exception e) {}\n }\n\n identifyValueInt++;\n\n switch (mode) {\n case INSERTMODE:\n if (!insert(identifyValueInt, entityName)) identifyValueInt = ERROR_ID;\n break;\n case UPDATEMODE:\n if (!update(identifyValueInt, entityName)) identifyValueInt = ERROR_ID;\n }\n if (identifyValueInt > 0) idTable.put(entityName, new Integer(identifyValueInt));\n return new Identifier(identifyValueInt);\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_23()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\"), (DBSchema) null, (String) null, (String) null);\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getCatalog(LazyTable.java:130)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}",
"public static String createId(CalendarDB db) {\n char[] skipChars = {\n 34, 39, 64, 91, 92, 93, 123, 125\n };\n \n int len = 10;\n char[] cArray = new char[len];\n\n for (int i = 0; i < len; i++) {\n\n boolean isAllowed = false;\n\n Random rand = new Random();\n char r = '0';\n// char test = 53;\n// System.out.println(\"Test char(\"+test+\")\");\n\n //[0] 48-57 0-9\n //[1] 65-90 A-Z\n //[2] 97- 122 a-z\n char[] valids = new char[3];\n \n //checkif the char is valid\n while (!isAllowed) {\n /*\n only takes valid chars. The fourth random just chooses one of the\n three in valids[]. \n */\n valids[0] = (char) RandomHandler.createIntegerFromRange(48, 57, rand);\n valids[1] = (char) RandomHandler.createIntegerFromRange(65, 90, rand);\n valids[2] = (char) RandomHandler.createIntegerFromRange(97, 122, rand);\n int start = 0;\n \n //the first char must not be a number\n if(i == 0)\n start += 1;\n \n r = valids[RandomHandler.createIntegerFromRange(start, 2, rand)];\n\n for (char ch : skipChars) {\n if (r != ch) {\n isAllowed = true;\n } else {\n isAllowed = false;\n }\n }\n }\n\n cArray[i] = r;\n }\n String s = new String(cArray);\n \n //retry creating id when the same is already used in database\n if(db.isIdAvailable(s))\n createId(db);\n \n System.out.println(\"ID created: \" + s);\n return s;\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n String[] stringArray0 = new String[6];\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"NestedRawReadOnlyUserTransaction\");\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"getRowId(int)\", true, stringArray0);\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"CONSTRAINT getRowId(int) PRIMARY KEY (, , , , , )\", string0);\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_26()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"\"), new DBSchema(\"\"), \"\", \"\");\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// org.databene.commons.ConfigurationError: No environment definition '.env.properties' found\n\t\t// at org.databene.jdbacl.DBUtil.getConnectData(DBUtil.java:122)\n\t\t// at org.databene.jdbacl.model.jdbc.JDBCDBImporter.<init>(JDBCDBImporter.java:110)\n\t\tassertNotNull(result);\n\t}",
"public Hoppy insert(Hoppy hoppy, IdGenerateService<Long> idGenerateService) throws DataAccessException;",
"private Long createId() {\n return System.currentTimeMillis() % 1000;\n }",
"static DbQuery createKeyQuery() {\n DbQuery query = new DbQuery();\n query.order = OrderBy.KEY;\n return query;\n }",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_13()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"0123456789\", new DBSchema(\"\", new DBCatalog(\"\")));\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (, 0123456789, An��t-1.0.txt, )\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _phieugiahan.getPrimaryKey();\n\t}",
"public interface IdGenerator \n{\n /**\n * Get the next identifier\n * @param conn The connection to use then getting the id\n * @param sequenceName The sequence name for the table. This is a name that identifies the\n * table.\n * @throws org.tgdb.exceptions.DbException if something goes wrong\n * @return an integer value.. This is not complete..\n */\n public int getNextId(Connection conn, String sequenceName) throws DbException;\n}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_14()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable();\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (, 0123456789, An��t-1.0.txt, )\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_3()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable();\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"private int save_InsertGetInsertId() {\n\t\t\n\t\tfinal String INSERT_SQL = \"INSERT INTO project__insert_id_tbl ( ) VALUES ( )\";\n\t\t\n\t\t// Use Spring JdbcTemplate so Transactions work properly\n\t\t\n\t\t// How to get the auto-increment primary key for the inserted record\n\t\t\n\t\ttry {\n\t\t\tKeyHolder keyHolder = new GeneratedKeyHolder();\n\t\t\tint rowsUpdated = this.getJdbcTemplate().update(\n\t\t\t\t\tnew PreparedStatementCreator() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic PreparedStatement createPreparedStatement(Connection connection) throws SQLException {\n\n\t\t\t\t\t\t\tPreparedStatement pstmt =\n\t\t\t\t\t\t\t\t\tconnection.prepareStatement( INSERT_SQL, Statement.RETURN_GENERATED_KEYS );\n\n\t\t\t\t\t\t\treturn pstmt;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tkeyHolder);\n\n\t\t\tNumber insertedKey = keyHolder.getKey();\n\t\t\t\n\t\t\tlong insertedKeyLong = insertedKey.longValue();\n\t\t\t\n\t\t\tif ( insertedKeyLong > Integer.MAX_VALUE ) {\n\t\t\t\tString msg = \"Inserted key is too large, is > Integer.MAX_VALUE. insertedKey: \" + insertedKey;\n\t\t\t\tlog.error( msg );\n\t\t\t\tthrow new LimelightInternalErrorException( msg );\n\t\t\t}\n\t\t\t\n\t\t\tint insertedKeyInt = (int) insertedKeyLong; // Inserted auto-increment primary key for the inserted record\n\t\t\t\n\t\t\treturn insertedKeyInt;\n\t\t\t\n\t\t} catch ( RuntimeException e ) {\n\t\t\tString msg = \"SQL: \" + INSERT_SQL;\n\t\t\tlog.error( msg, e );\n\t\t\tthrow e;\n\t\t}\n\t}",
"@Override\n\tpublic Object getPrimaryKey() {\n\t\treturn null;\n\t}",
"protected int generateUniqueId() {\n\t\tint id = super.getUniqueId();\n\t\tsuper.setUniqueId(getUniqueId() + 1);\n\t\treturn id;\n\t}",
"@Override\n protected final Void updateKeyAfterInsert(VaccineInjectTimes entity, long rowId) {\n return null;\n }"
] | [
"0.6881461",
"0.68034226",
"0.66685337",
"0.6585739",
"0.64588314",
"0.6373454",
"0.6249772",
"0.6241632",
"0.61690754",
"0.59228456",
"0.5922811",
"0.58397657",
"0.5787124",
"0.5786171",
"0.57652277",
"0.57631886",
"0.5726774",
"0.5721379",
"0.5659842",
"0.56495583",
"0.5612291",
"0.5602365",
"0.5601896",
"0.56013286",
"0.5590572",
"0.5577539",
"0.5577176",
"0.5567995",
"0.5550382",
"0.55444634",
"0.5542702",
"0.5542354",
"0.5533955",
"0.5524214",
"0.5521903",
"0.55065376",
"0.5502529",
"0.54869664",
"0.5480535",
"0.5478784",
"0.54699045",
"0.5467888",
"0.54445875",
"0.54387623",
"0.5425396",
"0.54162943",
"0.54080474",
"0.5401448",
"0.53988075",
"0.5397598",
"0.53954417",
"0.5395114",
"0.5392816",
"0.5391484",
"0.5387425",
"0.5386273",
"0.53805554",
"0.53783137",
"0.5362657",
"0.5361073",
"0.53597414",
"0.5346323",
"0.53459656",
"0.5340529",
"0.5335286",
"0.5333651",
"0.5333463",
"0.53324133",
"0.5330527",
"0.5326875",
"0.53262633",
"0.5316705",
"0.5314414",
"0.5314127",
"0.5310506",
"0.5299724",
"0.52970624",
"0.5290525",
"0.52905107",
"0.52885866",
"0.5286014",
"0.5277271",
"0.52755505",
"0.527223",
"0.5270723",
"0.52671736",
"0.52546024",
"0.5252711",
"0.5249878",
"0.524477",
"0.524477",
"0.52394676",
"0.523033",
"0.5225299",
"0.5220371",
"0.52185524",
"0.52160907",
"0.52100116",
"0.5209726",
"0.52088654"
] | 0.5901327 | 11 |
Returns an empty list, since OpenBase doesn't support this operation. | public List dropAutoPkStatements(List dbEntities) {
return Collections.EMPTY_LIST;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public List<Object> list() {\n return null;\n }",
"@Override\r\n\tpublic List<?> getAll() {\n\t\treturn null;\r\n\t}",
"public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n if (tmp != null)\r\n result.add(tmp);\r\n }\r\n\r\n return result;\r\n }",
"@Override\r\n\tpublic List<Object> findAll() {\n\t\treturn null;\r\n\t}",
"List<Wine> emptyMethodReturnList(){\n return List.of();\n }",
"@Override\n\tpublic List<Function> list() {\n\t\treturn null;\n\t}",
"public List findAll() {\n\t\treturn null;\r\n\t}",
"public List list() throws Exception {\n\t\treturn null;\r\n\t}",
"public List getList() throws HibException;",
"@Override\r\n\tpublic List<Ngo> getAll() {\n\t\treturn null;\r\n\t}",
"public List<T> getAll() {\n return Arrays.asList(buffer);\n }",
"@Override\n\tpublic String list() throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String list() throws Exception {\n\t\treturn null;\n\t}",
"public List<T> findAll() {\n\t\treturn null;\n\t}",
"public List list() throws ApplicationException {\n return list(0, 0);\n }",
"public static <T> List<T> createList() {\n\t\treturn Collections.emptyList();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<T> getList() {\r\n\t\tgetEntityManager().flush();\r\n\t\treturn getEntityManager().createQuery(\r\n\t\t\t\t\"select OBJECT(o) from \" + getClassType().getSimpleName() + \" o order by o.id\")\r\n\t\t\t\t.getResultList();\r\n\t}",
"@Override\r\n\tpublic List<T> getRecords() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Object> findList(Object o) {\n\t\treturn null;\r\n\t}",
"@Override\n public String[] listAll() {\n return list();\n }",
"@Override\r\n\t\tpublic List<Item> getItems() {\n\t\t\treturn null;\r\n\t\t}",
"@Override\r\n\tpublic List<T> getResult() {\n\t\treturn null;\r\n\t}",
"public List getList();",
"public static List getList() {\r\n return Arrays.asList(ALL);\r\n }",
"@Override\n\tpublic String findAll() {\n\t\treturn null;\n\t}",
"public abstract List<Object> getAll();",
"@Override\n\tpublic ArrayList<Representation> getALL() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<OaAutoInfo> getDataList() throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic AccountBean[] list() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List selectList() {\n\t\treturn null;\n\t}",
"public abstract List<T> getList();",
"private List<SimpleComponent> list() {\n\t\treturn this.list(null);\n\t}",
"public List<DBDoc> getAllObjects() {\n\t\treturn null;\n\t}",
"protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }",
"private ContentProposalList getEmptyProposalArray() {\n\t\treturn new ContentProposalList();\n\t}",
"List() {\n this.length = 0;\n }",
"public String getList_Base();",
"public Object[] getList() {\n Object[] list = new Object[size()];\n copyInto(list);\n return list;\n }",
"public static <T>\n LazyList<T> empty() {\n return EMPTY;\n }",
"List<T> obtenerAll();",
"public List<T> getAll() {\n\t\treturn this.getAll(new ArrayList<String>(), false);\n\t}",
"public List<Song> getsong() {\n\t\treturn null;\r\n\t}",
"public List<String> read()\n\t{\n\t\treturn null;\n\t}",
"@Override\n\tpublic <K extends BasePojo> List<K> getDataList() throws ServiceException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<Subordination> readAll() throws DBOperationException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List selectList() {\n\t\t\n\t\t\n\t\t\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<PI> findAll() {\n\t\treturn null;\n\t}",
"static List<Stock> getList2() {\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\n public <O> List<O> inactiveVersions() {\n return (List<O>) journal.journal\n .retrieve(BarbelQueries.allInactive(journal.id), BarbelQueryOptions.sortAscendingByEffectiveFrom())\n .stream().collect(Collectors.toList());\n }",
"public ArrayList<URI> getList() { return new ArrayList<URI>(); }",
"protected Object[] getList() {\n return list;\n }",
"@Override\r\n\tpublic List<ProductDAO> list() {\n\t\treturn null;\r\n\t}",
"public Collection findAll() {\n\t\treturn null;\r\n\t}",
"public List getList() {\n return Arrays.asList(toJavaArray()); \n }",
"public DOCKSList getList() {\r\n return localList;\r\n }",
"@Override\n\tpublic List<AposentadoriaCompulsoria> listaDeObjetos() {\n\t\treturn null;\n\t}",
"java.util.List<com.rpg.framework.database.Protocol.Item> \n getItemsList();",
"@Override\n\tpublic List<Object> getCollection() {\n\t\treturn null;\n\t}",
"public List<New> list();",
"public List<Object> findAll() throws Exception {\n\t\treturn null;\r\n\t}",
"protected abstract List<E> getList();",
"public List<UserDO> getAllUserList() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic List queryAll() throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<ModuleClassCustom> queryList() throws Exception {\n\t\treturn null;\n\t}",
"private List getList() {\n if(itemsList == null) {\n itemsList = new ArrayList<>();\n }\n return itemsList;\n }",
"public abstract List get(List oids) throws OIDDoesNotExistException;",
"@Override\n\tpublic Phone[] phoneList() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Phone[] phoneList() {\n\t\treturn null;\n\t}",
"List<T> readAll();",
"public ArrayList<Table> getTableEmpty() {\n \tArrayList<Table> fetchedTables = new ArrayList<Table>();\n \tfetchedTables = getTable(tableEmpty);\n \treturn fetchedTables;\n }",
"public abstract List<T> all();",
"edu.usfca.cs.dfs.StorageMessages.List getList();",
"@Override\n\tpublic Etape[] getAll() {\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\n public List readList() throws IOException {\n List list = new ArrayList();\n Object obj = read();\n while (obj != null) {\n list.add(obj);\n obj = read();\n }\n return list;\n }",
"@Override\r\n\tpublic String[] list(String path) {\n\t\treturn null;\r\n\t}",
"public static <T> List<T> getOrEmptyList(List<T> list) {\n return list == null ? Collections.emptyList() : list;\n }",
"@Override\n\tpublic ListIterator<T> listIterator() {\n\t\treturn null;\n\t}",
"public List getBookList() throws SQLException {\n\t\treturn null;\n\t}",
"public List<Product> readAll() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic GalaxyNote[] galList() {\n\t\treturn null;\n\t}",
"@Override\n public List<Revue> getAll() {\n return null;\n }",
"@Override\n\tpublic List<Hotel> listar() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<Product> getProducts() {\n\t\treturn null;\r\n\t}",
"public static ImmutableIntList of() {\n return EMPTY;\n }",
"public java.util.List getList() {\n\t\treturn list;\n\t}",
"private ArrayList<String> populateEmptyAlias() {\n ArrayList<String> emptyList = new ArrayList<String>();\n int size = AliasCommand.getCommands().size();\n for (int i = 0; i < size; i++) {\n emptyList.add(\"\");\n }\n return emptyList;\n }",
"default List<Lease> allLeases() {\n return Collections.emptyList();\n }",
"@NonNull\n public List<T> getList() {\n return data;\n }",
"com.google.protobuf.ProtocolStringList\n getListList();",
"java.util.List<java.lang.String> getUnreachableList();",
"public List<Object> getObjectsForTest() {\n return objects;\n }",
"List<T> getAll();",
"List<T> getAll();",
"List<T> getAll();",
"List<T> getAll();",
"List<T> getAll();",
"public List<o> selectAll();",
"@DISPID(10)\n\t// = 0xa. The runtime will prefer the VTID if present\n\t@VTID(19)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject list();",
"@Override\r\n\tpublic List<Room> listAll() throws SQLException {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic List<Product> getProducts() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<Libro> readAll() {\n\t\treturn libroDao.readAll();\n\t}"
] | [
"0.7611996",
"0.71473336",
"0.69713086",
"0.69159025",
"0.6893027",
"0.6743528",
"0.6737438",
"0.67255616",
"0.67055607",
"0.6699621",
"0.6645629",
"0.6631239",
"0.6631239",
"0.66196644",
"0.66099197",
"0.6558441",
"0.6537539",
"0.6502044",
"0.648523",
"0.6455008",
"0.64538884",
"0.64335716",
"0.64259535",
"0.64201033",
"0.63967836",
"0.63539124",
"0.634354",
"0.634322",
"0.63365716",
"0.63343",
"0.6319878",
"0.6308601",
"0.6265446",
"0.62373835",
"0.6214978",
"0.6213952",
"0.62137043",
"0.6193865",
"0.61809117",
"0.6176872",
"0.6174976",
"0.6166157",
"0.61613363",
"0.6159054",
"0.61577445",
"0.61560476",
"0.61435443",
"0.61418873",
"0.61256754",
"0.61225134",
"0.6122506",
"0.6119276",
"0.6118425",
"0.61140335",
"0.6112177",
"0.61086124",
"0.6108514",
"0.60991466",
"0.6094624",
"0.60877365",
"0.60841465",
"0.60589147",
"0.60571533",
"0.6055818",
"0.60513306",
"0.6044903",
"0.6042054",
"0.6042054",
"0.60322046",
"0.6029894",
"0.60296947",
"0.6026304",
"0.6015795",
"0.6013509",
"0.60118043",
"0.6011114",
"0.6002645",
"0.59998125",
"0.5985822",
"0.5981563",
"0.59793377",
"0.5977001",
"0.59711266",
"0.59597296",
"0.5955356",
"0.59542495",
"0.59521735",
"0.59507316",
"0.5950211",
"0.5945148",
"0.5936561",
"0.5934759",
"0.5934759",
"0.5934759",
"0.5934759",
"0.5934759",
"0.59294635",
"0.5927855",
"0.59233856",
"0.5911027",
"0.5900418"
] | 0.0 | -1 |
Returns a String to create PK support for an entity. | protected String createPKString(DbEntity entity) {
List pk = entity.getPrimaryKey();
if (pk == null || pk.size() == 0) {
throw new CayenneRuntimeException(
"Entity '" + entity.getName() + "' has no PK defined.");
}
StringBuffer buffer = new StringBuffer();
buffer.append("CREATE PRIMARY KEY ").append(entity.getName()).append(" (");
Iterator it = pk.iterator();
// at this point we know that there is at least on PK column
DbAttribute firstColumn = (DbAttribute) it.next();
buffer.append(firstColumn.getName());
while (it.hasNext()) {
DbAttribute column = (DbAttribute) it.next();
buffer.append(", ").append(column.getName());
}
buffer.append(")");
return buffer.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String generatePkForDbEntityString(DbEntity ent) {\n if ((null == ent.getPrimaryKey()) || (1 != ent.getPrimaryKey().size())) {\n throw new CayenneRuntimeException(\n \"Error generating pk for DbEntity \"\n + ent.getName()\n + \": pk must be single attribute\");\n }\n DbAttribute primaryKeyAttribute = (DbAttribute) ent.getPrimaryKey().get(0);\n\n StringBuffer buf = new StringBuffer(\"NEWID FOR \");\n buf.append(ent.getName()).append(' ').append(primaryKeyAttribute.getName());\n return buf.toString();\n }",
"protected String createUniquePKIndexString(DbEntity entity) {\n List pk = entity.getPrimaryKey();\n\n if (pk == null || pk.size() == 0) {\n throw new CayenneRuntimeException(\n \"Entity '\" + entity.getName() + \"' has no PK defined.\");\n }\n\n StringBuffer buffer = new StringBuffer();\n\n // compound PK doesn't work well with UNIQUE index...\n // create a regular one in this case\n buffer\n .append(pk.size() == 1 ? \"CREATE UNIQUE INDEX \" : \"CREATE INDEX \")\n .append(entity.getName())\n .append(\" (\");\n\n Iterator it = pk.iterator();\n\n // at this point we know that there is at least on PK column\n DbAttribute firstColumn = (DbAttribute) it.next();\n buffer.append(firstColumn.getName());\n\n while (it.hasNext()) {\n DbAttribute column = (DbAttribute) it.next();\n buffer.append(\", \").append(column.getName());\n }\n buffer.append(\")\");\n return buffer.toString();\n }",
"public static String generateEntityKey(String projectID,String entityCategoryID,String entityID)\n {\n if(StringUtils.isEmpty(projectID) || StringUtils.isEmpty(entityCategoryID) || \n StringUtils.isEmpty(entityID)) return null;\n \n StringBuilder sb=new StringBuilder();\n sb.append(\"[\")\n .append(projectID.trim()).append(\"|\")\n .append(entityCategoryID.trim()).append(\"|\")\n .append(entityID.trim()).append(\"]\");\n \n return sb.toString(); \n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getHashKey()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getCode()));\n return sb.toString();\n }",
"protected String createPrimaryKeyConstraint(TableModel table) {\r\n\t\tColumnModel[] pks = table.getPrimaryKeyColumns();\r\n\t\tString s = \"\";\r\n\t\tif (pks.length > 1) {\r\n\t\t\ts = \",\\n PRIMARY KEY(\";\r\n\t\t\tString a = \"\";\r\n\t\t\tfor (ColumnModel c : pks) {\r\n\t\t\t\tif (a.length() > 0) {\r\n\t\t\t\t\ta += \", \";\r\n\t\t\t\t}\r\n\t\t\t\ta += this.quote(c.getName());\r\n\t\t\t}\r\n\t\t\ts += a + \")\";\r\n\t\t}\r\n\t\treturn s;\r\n\t}",
"public String getKey() {\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tif (getLineNo() != null) {\r\n\t\t\tbuilder.append(getLineNo());\r\n\t\t} else if (this.getEntityId() != null) {\r\n\t\t\tbuilder.append(getEntityId());\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getBatchId()));\n sb.append(\", \");\n sb.append(f.formatAny(getNestId()));\n return sb.toString();\n }",
"public static String getPrimaryKeyName() {\r\n\t\t\treturn PRIMARY_KEY_ID;\r\n\t\t}",
"public String getPkName() {\n\t\treturn \"id\";\n\t}",
"public Object generatePkForDbEntity(DataNode node, DbEntity entity)\n throws Exception {\n // check for binary pk\n Object binPK = binaryPK(entity);\n if (binPK != null) {\n return binPK;\n }\n return new Integer(pkFromDatabase(node, entity));\n }",
"public String naturalKeyName() {\n return idName();\n }",
"protected String getIdentityColumnString() throws MappingException {\n \t\tthrow new MappingException( getClass().getName() + \" does not support identity key generation\" );\n \t}",
"PrimaryKey createPrimaryKey();",
"@Override\r\n\tpublic String getPrimaryKey() {\n\t\treturn \"ID\";\r\n\t}",
"protected String getIdentitySelectString() throws MappingException {\n \t\tthrow new MappingException( getClass().getName() + \" does not support identity key generation\" );\n \t}",
"@Override\n\t\tpublic String getPKFieldName() {\n\t\t\treturn null;\n\t\t}",
"public String getIdKey(EdaContext xContext) {\n\t\treturn String.valueOf(getId());\n\n\t}",
"@Override\r\n\tpublic String createID() {\r\n\t\t \r\n\t\t\t\treturn transCode.toString();\r\n\t\t\t\t}",
"@Override\n\tpublic String getPKFieldName() {\n\t\treturn null;\n\t}",
"public String getKey() {\n\t\treturn id + \"\";\n\t}",
"@Override\n\tpublic String getKey() {\n\t\treturn id+\"\";\n\t}",
"private String createKey(OwObject object_p, OwPluginEntry pluginEntry_p) throws Exception\r\n {\r\n String objectId = object_p.getDMSID();\r\n String key = objectId + \"_\" + pluginEntry_p.getIndex();\r\n return key;\r\n }",
"public String getPrimaryKey() {\n if (primaryKey == null) primaryKey = \"id\";\n return primaryKey;\n }",
"public String generateId() {\n return Utils.generateKey();\n }",
"java.lang.String getLegacyId();",
"public ProductoPk createPk() {\r\n return new ProductoPk(idProducto);\r\n }",
"public String idName() {\n return entityType().getSimpleName().toLowerCase() + \"id\";\n }",
"@Override\n public String getToID()\n {\n \tStringBuilder sb = new StringBuilder();\n\n\t\tint prefix = getPrefix();\n \tint ident = getIdent1();\n\n \tswitch( IdentType.fromIdent( ident ) )\n \t{\n \t\tcase IPFIXI:\n \t\t\tsb.append( \"INTER-PREFIX\" );\n \t\t\tbreak;\n \t\tcase ALLI:\n \t\t\tsb.append( \"ALL RADIOS\" );\n \t\t\tbreak;\n \t\tcase PABXI:\n \t\t\tsb.append( \"PABX EXT\" );\n \t\t\tbreak;\n \t\tcase PSTNSI1:\n \t\tcase PSTNSI2:\n \t\tcase PSTNSI3:\n \t\tcase PSTNSI4:\n \t\tcase PSTNSI5:\n \t\tcase PSTNSI6:\n \t\tcase PSTNSI7:\n \t\tcase PSTNSI8:\n \t\tcase PSTNSI9:\n \t\tcase PSTNSI10:\n \t\tcase PSTNSI11:\n \t\tcase PSTNSI12:\n \t\tcase PSTNSI13:\n \t\tcase PSTNSI14:\n \t\tcase PSTNSI15:\n \t\t\tsb.append( \"PRE-DEFINED PSTN\" );\n \t\t\tbreak;\n \t\tcase PSTNGI:\n \t\t\tsb.append( \"PSTN GATEWAY\" );\n \t\t\tbreak;\n \t\tcase TSCI:\n \t\t\tsb.append( \"SYSTEM CONTROLLER\" );\n \t\t\tbreak;\n \t\tcase DIVERTI:\n \t\t\tsb.append( \"CALL DIVERT\" );\n \t\t\tbreak;\n \t\tcase USER:\n\t\t\tdefault:\n\t\t\t\tif( prefix != 0 || ident != 0 )\n\t\t\t\t{\n\t \tsb.append( format( prefix, 3 ) );\n\t \tsb.append( \"-\" );\n\t \tsb.append( format( ident, 4) );\n\t\t\t\t}\n \tbreak;\n \t}\n\n \treturn sb.toString();\n }",
"private String generatePrimaryKey(Connection conn, String tableName) {\n String returnValue = null;\n String existingPkValue = null;\n String nextPkValue = null;\n\n try {\n existingPkValue = sql.selectKeyValueFromLastUsedKey(conn, tableName);\n\n if (existingPkValue == null) {\n System.out.println(\"Last used key value is NULL\");\n return null;\n }\n // remove first 1 alphabetic characters from this\n String prefix = existingPkValue.substring(0, 1);\n String existingPkValueWithPrefixStripped = existingPkValue.substring(1);\n\n // get number of characters in lastUsedId\n int completeLength = existingPkValueWithPrefixStripped.length();\n\n // convert lastUsedId into number\n int existingIdNum = 0;\n existingIdNum = Integer.parseInt(existingPkValueWithPrefixStripped.trim());\n\n // add 1 to this number\n int nextIdNum = existingIdNum + 1;\n\n // convert this number back to String\n String nextId = String.valueOf(nextIdNum);\n int newLength = nextId.length();\n // depending on the number of characters calculated initially,\n int zeroes = completeLength - newLength;\n // prefix Zeros accordingly to this String\n for (int i = 1; i <= zeroes; i++) {\n nextId = \"0\" + nextId;\n }\n\n // add the 4 character alphabetic prefix to this string\n nextPkValue = prefix + nextId;\n\n // update the system_last_used_id table\n sql.updateLastUsedPrimaryKeyValue(conn, tableName, nextPkValue);\n returnValue = nextPkValue;\n } catch (NumberFormatException ex) {\n System.out.println(\"generatePrimaryKey: \" + ex.getMessage());\n }\n return returnValue;\n\n }",
"public String getIdentifier() {\n try {\n return keyAlias + \"-\" + toHexString(\n MessageDigest.getInstance(\"SHA1\").digest(keyStoreManager.getIdentifierKey(keyAlias).getEncoded()));\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"public String getAddPrimaryKeyConstraintString(String constraintName) {\n \t\treturn \" add constraint \" + constraintName + \" primary key \";\n \t}",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getLegDepartureLocalTm()));\n sb.append(\", \");\n sb.append(f.formatAny(getLegArrivalLocalTm()));\n sb.append(\", \");\n sb.append(f.formatAny(getLegArrivalDayOffset()));\n sb.append(\", \");\n sb.append(f.formatAny(getLegStopCount()));\n sb.append(\", \");\n sb.append(f.formatAny(getLegEquipment()));\n return sb.toString();\n }",
"public String getIdentityInsertString() {\n \t\treturn null;\n \t}",
"String getKey(Object entity);",
"public String getConvertToId();",
"public abstract String getPrimaryKey(String tableName);",
"public static String aUniqueIdentifier() {\n return \"MONEXT\" + new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n }",
"public GenerateKey() {\n\t\tsuper(\"generate_key\", org.jooq.example.jaxrs.db.LicenseServer.LICENSE_SERVER, org.jooq.impl.SQLDataType.VARCHAR);\n\n\t\tsetReturnParameter(RETURN_VALUE);\n\t\taddInParameter(LICENSE_DATE);\n\t\taddInParameter(EMAIL);\n\t}",
"String uniqueId();",
"public String getId() {\n int result;\n result = (key != null ? key.hashCode() : 0);\n result = 31 * result + (overridable ? 1 : 0);\n result = 31 * result + (value != null ? value.hashCode() : 0);\n result = 31 * result + (set ? 1 : 0);\n if (result < 0)\n result = result * -1;\n return String.valueOf(result);\n }",
"public String getPrimaryKey() {\n return getBasicChar().getPrimaryKey();\n }",
"String getCreatorId();",
"public String getQueryKey()\n {\n if (getPrimaryKey() == null)\n {\n return \"\";\n }\n else\n {\n return getPrimaryKey().toString();\n }\n }",
"Id createId();",
"public String generatePhoneId() {\n String device = Build.DEVICE.equals(\"generic\") ? \"emulator\" : Build.DEVICE;\n String network = getNetwork();\n String carrier = (network == NETWORK_WIFI) ?\n getWifiCarrierName() : getTelephonyCarrierName();\n\n StringBuilder stringBuilder = new StringBuilder(ANDROID_STRING);\n stringBuilder.append('-').append(device).append('_')\n .append(Build.VERSION.RELEASE).append('_').append(network)\n .append('_').append(carrier).append('_').append(getTelephonyPhoneType())\n .append('_').append(isLandscape() ? \"Landscape\" : \"Portrait\");\n\n return stringBuilder.toString();\n }",
"private void generateID(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String t : terms.keySet())\n\t\t\tsb.append(t.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, t.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tfor (String s : sources)\n\t\t\tsb.append(s.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, s.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tsb.deleteCharAt(sb.length()-1);\n\t\tif (yearFrom > -1) sb.append(\"_\" + yearFrom);\n\t\tif (yearTo > -1) sb.append(\"_\" + yearTo);\n\t\tif (useCompounds) sb.append(\"_COMP\");\n\t\tif (useStopwords) sb.append(\"_STOP\");\n\t\tsb.append(\"_CNT\" + contextSize);\n\t\tsb.append(\"_\" + System.currentTimeMillis());\n\t\tthis.id = sb.toString();\n\t}",
"Key getPrimaryKey();",
"String getIdentityId();",
"public static String makeKey(Location where, GoodsType what) {\n return where.getId() + \"-\" + what.getId();\n }",
"public String getId() {\n return this.getClass().getSimpleName() + \"@\" + this.hashCode();\n }",
"public String getPrimaryKey() throws CloneNotSupportedException {\r\n\t\tString key=\"\";\r\n\t\tfor (int i = 0; i < this.state.getSizeCol(); i++) {\r\n\t\t\tfor (int j = 0; j < this.state.getSizeRow(); j++) {\r\n\t\t\t\tkey+=this.state.getValue(new Position(i,j));\r\n\t\t\t}\r\n\t\t}\r\n\t\tkey+=\"?\"+this.state.getTractor().getPosition().toString();\r\n\t\treturn key;\r\n\t}",
"@Override\n public String generateId() {\n return HiveIdGenerator.generateTableId(getSourceId(), getDatabaseName(),\n getTableName());\n }",
"public IEntityPK getPK() {\r\n\treturn this.pk;\r\n }",
"public abstract String getIdPrefix();",
"@org.jetbrains.annotations.NotNull\n public static String getUniquePsuedoID() {\n\n String m_szDevIDShort = \"35\" + (Build.BOARD.length() % 10) + (Build.BRAND.length() % 10) + (Build.CPU_ABI.length() % 10) + (Build.DEVICE.length() % 10) + (Build.MANUFACTURER.length() % 10) + (Build.MODEL.length() % 10) + (Build.PRODUCT.length() % 10);\n\n String serial = null;\n try {\n serial = android.os.Build.class.getField(\"SERIAL\").get(null).toString();\n\n return new UUID(m_szDevIDShort.hashCode(), serial.hashCode()).toString();\n } catch (Exception exception) {\n serial = \"serial\";\n }\n\n return new UUID(m_szDevIDShort.hashCode(), serial.hashCode()).toString();\n }",
"java.lang.String getStringId();",
"java.lang.String getStringId();",
"java.lang.String getClientRecordId();",
"public String generatePlayerID() {\n List<Player> players = getAllOrdered();\n int idNum;\n \n if (players == null || players.isEmpty())\n idNum = 0;\n else {\n String idStr = players.get(players.size() - 1).getPlayerID();\n idNum = Integer.parseInt(idStr.substring(2, idStr.length()));\n }\n \n String playerID;\n int newIdNum = idNum + 1;\n if (newIdNum <= 9)\n playerID = \"P_000\" + newIdNum;\n else if (newIdNum <= 99) \n playerID = \"P_00\" + newIdNum;\n else if (newIdNum <= 999)\n playerID = \"P_0\" + newIdNum;\n else \n playerID = \"P_\" + newIdNum;\n \n return playerID;\n }",
"public static String generateProductID() {\n\tproductID++;\n\treturn String.valueOf(productID);\n }",
"public String createCacheKey() {\n return \"organization.\" + userEmail;\n }",
"public String getPkid() {\n return pkid;\n }",
"@Override\n public String getEntId() {\n init();\n return entid;\n }",
"private String getDocumentoKey(PreDocumentoEntrata preDoc) {\n\t\t\n\t\treturn (preDoc.getStrutturaAmministrativoContabile()!=null?preDoc.getStrutturaAmministrativoContabile().getUid() :\"null\") + \" \" \n\t\t\t\t+ (preDoc.getCausaleEntrata()!=null?preDoc.getCausaleEntrata().getUid():\"null\") + \" \" \n\t\t\t\t//+ (preDoc.getContoTesoreria()!=null?preDoc.getContoTesoreria().getUid():\"null\") + \" \" \n\t\t\t\t+ (preDoc.getPeriodoCompetenza()!=null?preDoc.getPeriodoCompetenza():\"null\") + \" \"\n\t\t\t\t+ (preDoc.getSoggetto()!=null?preDoc.getSoggetto().getUid():\"null\");\n\t}",
"public static String getKeyTypeName(KeyType type)\n {\n // TODO: should be moved to DBProvider ...\n // MySQL : key identifier\n // SQLServer : key identifier\n // Derby : key identifier\n // PostgreSQL: key identifier\n switch (type) {\n // MySQL: key types ...\n case PRIMARY : return \"PRIMARY KEY\"; // table\n case UNIQUE : return \"UNIQUE\"; // table\n case INDEX : return \"INDEX\"; // table/index\n case UNIQUE_INDEX : return \"UNIQUE INDEX\"; // table/index\n default : return \"UNKNOWN\";\n }\n }",
"public Key getKey() {\n\t\tString fieldvalue = getValue(\"sys_id\");\n\t\tassert fieldvalue != null;\n\t\treturn new Key(fieldvalue);\n\t}",
"protected int pkFromDatabase(DataNode node, DbEntity entity) throws Exception {\n String sql = generatePkForDbEntityString(entity);\n QueryLogger.logQuery(QueryLogger.DEFAULT_LOG_LEVEL, sql, Collections.EMPTY_LIST);\n\n Connection con = node.getDataSource().getConnection();\n try {\n Statement st = con.createStatement();\n try {\n\n ResultSet rs = st.executeQuery(sql);\n try {\n //Object pk = null;\n if (!rs.next()) {\n throw new CayenneRuntimeException(\n \"Error generating pk for DbEntity \" + entity.getName());\n }\n return rs.getInt(1);\n }\n finally {\n rs.close();\n }\n }\n finally {\n st.close();\n }\n }\n finally {\n con.close();\n }\n }",
"@Override\n\tpublic String getPK(){\n\t\treturn parkOpeningNo;\n\t}",
"public final String getRefPK() {\n\t\tString str = getRequest().getParameter(\"RefPK\");\n\t\treturn str;\n\t}",
"public String getPrimaryKey() {\n return this.getString(R.string.primaryKey);\n }",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"static String makeKey(String id,\n String for_,\n String attrname,\n String attrtype) {\n return format(KEY_FMT, id, for_, attrname, attrtype);\n }",
"public String createStatementParams(Class<?> entity, boolean usePrimaryKey) \r\n\t\t\tthrows Exception{\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tsb.append(\"(\");\r\n\t\tField[] fields = entity.getDeclaredFields();\t\r\n\t\t\r\n\t\t//trunk entity to persistence\r\n\t\tfor(int i=0; i<fields.length; i++){\r\n\t\t\tField reflectionField = fields[i];\r\n\t\t\tif(reflectionField!=null){\r\n\t\t\t\treflectionField.setAccessible(true);\r\n\t\t\t\tAnnotation annoField = reflectionField.getAnnotation(GPAField.class);\r\n\t\t\t\tAnnotation annoFieldPK = reflectionField.getAnnotation(GPAPrimaryKey.class);\r\n\t\t\t\tAnnotation annoFieldBean = reflectionField.getAnnotation(GPAFieldBean.class);\r\n\t\t\t\t/* \r\n\t\t\t\t ainda falta validar a chave primária do objeto\r\n\t\t\t\t por enquanto so esta prevendo pk usando sequence no banco\r\n\t\t\t\t objeto id sempre é gerado no banco por uma sequence\r\n\t\t\t\t*/\r\n\t\t\t\tif(annoFieldPK!=null && annoFieldPK instanceof GPAPrimaryKey){\r\n\t\t\t\t\tGPAPrimaryKey pk = (GPAPrimaryKey)annoFieldPK;\r\n\t\t\t\t\tString name = pk.name();\r\n\t\t\t\t\tsb.append( name + \" integer primary key\");\r\n\t\t\t\t\tif(pk.ignore() == true){\r\n\t\t\t\t\t\tsb.append(\" autoincrement \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(i<fields.length-1){\r\n\t\t\t\t\t\tsb.append(\",\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(annoField!=null && annoField instanceof GPAField){\r\n\t\t\t\t\tGPAField field = (GPAField)annoField;\r\n\t\t\t\t\tString name = field.name();\r\n\t\t\t\t\tClass<?> type = reflectionField.getType();\r\n\t\t\t\t\tsb.append( name + \" \" + getSqLiteType(type));\r\n\t\t\t\t\tif(i<fields.length-1){\r\n\t\t\t\t\t\tsb.append(\",\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(annoFieldBean!=null && annoFieldBean instanceof GPAFieldBean){\r\n\t\t\t\t\tGPAFieldBean field = (GPAFieldBean)annoFieldBean;\r\n\t\t\t\t\tString name = field.name();\r\n\t\t\t\t\tClass<?> type = reflectionField.getType();\r\n\t\t\t\t\tsb.append( name + \" \" + getSqLiteType(type));\r\n\t\t\t\t\tif(i<fields.length-1){\r\n\t\t\t\t\t\tsb.append(\",\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsb.append(\");\");\r\n\t\treturn sb.toString();\r\n\t}",
"@Override\n public String getFormatEntity() {\n return NameIDType.ENTITY;\n }",
"public String Identity();",
"public static String getKey(Class<?> dtoType, Object record) {\n StringBuilder finalKey = new StringBuilder(Constants.EMPTY_STRING);\n List<String> keys = EntityUtils.getPrimaryKey(getEntityType(dtoType));\n for (String key : keys) {\n try {\n Object value = ObjectUtils.getValueOfField(record, key);\n finalKey.append(null != value ? value.toString() : Constants.EMPTY_STRING)\n .append(Constants.UNDERSCORE);\n } catch (IllegalAccessException e) {\n throw new FieldInaccessibleException(\"Cannot get value for field \"\n + record.getClass().getSimpleName() + \".\" + key, e);\n }\n }\n return finalKey.deleteCharAt(finalKey.length() - 1).toString(); // remove last underscore\n }"
] | [
"0.78168154",
"0.71137166",
"0.6712051",
"0.66688335",
"0.66540885",
"0.66540885",
"0.66540885",
"0.66540885",
"0.66540885",
"0.6642921",
"0.65960544",
"0.6460575",
"0.64593846",
"0.6366974",
"0.629234",
"0.626318",
"0.6262747",
"0.61743367",
"0.6166444",
"0.6149744",
"0.61435956",
"0.61420166",
"0.6112959",
"0.60704553",
"0.6022387",
"0.5999234",
"0.59855473",
"0.59368384",
"0.586915",
"0.58679897",
"0.58609563",
"0.5829932",
"0.5817122",
"0.5816695",
"0.57678676",
"0.57340044",
"0.5728063",
"0.57269955",
"0.57183194",
"0.57168037",
"0.5705727",
"0.5694666",
"0.5670759",
"0.56424934",
"0.56354916",
"0.56306446",
"0.5627641",
"0.562367",
"0.562328",
"0.5598788",
"0.55912733",
"0.5579701",
"0.5578023",
"0.5577542",
"0.5573041",
"0.55680007",
"0.55660933",
"0.55604184",
"0.5544089",
"0.5543123",
"0.55425084",
"0.55423737",
"0.55423737",
"0.55365807",
"0.5519401",
"0.55064845",
"0.5499278",
"0.5487461",
"0.54856896",
"0.54734534",
"0.5470499",
"0.545566",
"0.5452752",
"0.5441622",
"0.5435233",
"0.5431184",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54190004",
"0.54186285",
"0.5409531",
"0.5406601",
"0.5406555",
"0.5404046"
] | 0.82523614 | 0 |
Returns a String to create a unique index on table primary key columns per OpenBase recommendations. | protected String createUniquePKIndexString(DbEntity entity) {
List pk = entity.getPrimaryKey();
if (pk == null || pk.size() == 0) {
throw new CayenneRuntimeException(
"Entity '" + entity.getName() + "' has no PK defined.");
}
StringBuffer buffer = new StringBuffer();
// compound PK doesn't work well with UNIQUE index...
// create a regular one in this case
buffer
.append(pk.size() == 1 ? "CREATE UNIQUE INDEX " : "CREATE INDEX ")
.append(entity.getName())
.append(" (");
Iterator it = pk.iterator();
// at this point we know that there is at least on PK column
DbAttribute firstColumn = (DbAttribute) it.next();
buffer.append(firstColumn.getName());
while (it.hasNext()) {
DbAttribute column = (DbAttribute) it.next();
buffer.append(", ").append(column.getName());
}
buffer.append(")");
return buffer.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String createSimpleIndexName(ColumnModel column) {\r\n\t\treturn \"I\" + column.getTable().getName() + column.getName();\r\n\t}",
"protected String createPrimaryKeyConstraint(TableModel table) {\r\n\t\tColumnModel[] pks = table.getPrimaryKeyColumns();\r\n\t\tString s = \"\";\r\n\t\tif (pks.length > 1) {\r\n\t\t\ts = \",\\n PRIMARY KEY(\";\r\n\t\t\tString a = \"\";\r\n\t\t\tfor (ColumnModel c : pks) {\r\n\t\t\t\tif (a.length() > 0) {\r\n\t\t\t\t\ta += \", \";\r\n\t\t\t\t}\r\n\t\t\t\ta += this.quote(c.getName());\r\n\t\t\t}\r\n\t\t\ts += a + \")\";\r\n\t\t}\r\n\t\treturn s;\r\n\t}",
"static void generateIndex(Table table, Key key, PrintWriter outData)\r\n {\r\n String comma = \"( \";\r\n String keyname = key.name.toUpperCase();\r\n if (keyname.indexOf(table.name.toUpperCase()) == -1)\r\n keyname = table.name.toUpperCase()+\"_\"+keyname;\r\n outData.println(\"DROP INDEX \"+keyname+\";\");\r\n outData.println(\"\");\r\n outData.println(\"CREATE INDEX \"+keyname+\" ON \"+table.database.userid+ \"\" +table.name);\r\n for (int i=0; i<key.fields.size(); i++, comma = \", \")\r\n {\r\n String name = (String) key.fields.elementAt(i);\r\n outData.println(comma+name);\r\n }\r\n outData.print(\")\");\r\n for (int i=0; i < key.options.size(); i++)\r\n {\r\n outData.println();\r\n String option = (String) key.options.elementAt(i);\r\n outData.print(option);\r\n }\r\n outData.println(\";\");\r\n outData.println();\r\n }",
"public static String generateEsIndex() {\n return new Generex(PatternValidator.ESINDEX_PATTERN).random();\n }",
"private void buildPKIndex() {\n // index PK\n Collection<DbAttribute> pks = getResolver()\n .getEntity()\n .getDbEntity()\n .getPrimaryKeys();\n this.idIndices = new int[pks.size()];\n\n // this is needed for checking that a valid index is made\n Arrays.fill(idIndices, -1);\n\n Iterator<DbAttribute> it = pks.iterator();\n for (int i = 0; i < idIndices.length; i++) {\n DbAttribute pk = it.next();\n\n for (int j = 0; j < columns.length; j++) {\n if (pk.getName().equals(columns[j].getName())) {\n idIndices[i] = j;\n break;\n }\n }\n\n // sanity check\n if (idIndices[i] == -1) {\n throw new CayenneRuntimeException(\"PK column is not part of result row: %s\", pk.getName());\n }\n }\n }",
"@Override\r\n\tprotected void buildUniqueKeys(final DatabaseTable table) throws SQLException {\r\n\t\tif (views.contains(table)) {\r\n\t\t\t// buildUniqueKeysOfView(table);\r\n\t\t} else {\r\n\t\t\tbuildUniqueKeysOfTable(table);\r\n\t\t}\r\n\t}",
"@Test(timeout = 4000)\n public void test125() throws Throwable {\n DBCatalog dBCatalog0 = new DBCatalog();\n DBSchema dBSchema0 = new DBSchema(\"}{,65x^HxS\", dBCatalog0);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"%@gEV{P$8\", dBSchema0);\n String[] stringArray0 = new String[3];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"}{,65x^HxS\", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n String string0 = SQLUtil.ukSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"UNIQUE (, , )\", string0);\n }",
"@Test(timeout = 4000)\n public void test124() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionContext\");\n String[] stringArray0 = new String[4];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"org.apache.derby.iapi.sql.execute.ExecutionContext\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.ukSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"UNIQUE (, , , )\", string0);\n }",
"static void generateUnique(Table table, Key key, PrintWriter outData, String mcomma)\r\n {\r\n String comma = \" ( \";\r\n String keyname = key.name.toUpperCase();\r\n if (keyname.indexOf(table.name.toUpperCase()) == -1)\r\n keyname = table.name.toUpperCase()+\"_\"+keyname;\r\n outData.println(mcomma+\"CONSTRAINT \"+keyname+\" UNIQUE\");\r\n for (int i=0; i<key.fields.size(); i++, comma = \" , \")\r\n {\r\n String name = (String) key.fields.elementAt(i);\r\n outData.println(comma+name);\r\n }\r\n outData.println(\" )\");\r\n for (int i=0; i < key.options.size(); i++)\r\n {\r\n String option = (String) key.options.elementAt(i);\r\n outData.println(\" \"+option);\r\n }\r\n }",
"protected String getIdentityColumnString() throws MappingException {\n \t\tthrow new MappingException( getClass().getName() + \" does not support identity key generation\" );\n \t}",
"@Override\n protected void evaluateUniqueKeys(final DatabaseMetaData _metaData,\n final String _tableName,\n final String _sqlStatement)\n throws SQLException\n {\n final String sqlStmt = new StringBuilder()\n .append(\"select c.CONSTRAINTNAME INDEX_NAME, g.DESCRIPTOR COLUMN_NAME\")\n .append(\" from SYS.SYSTABLES t, SYS.SYSCONSTRAINTS c, SYS.SYSKEYS k, SYS.SYSCONGLOMERATES g \")\n .append(\" where t.tablename='\").append(_tableName).append(\"'\")\n .append(\" AND t.TABLEID=c.TABLEID\")\n .append(\" AND c.TYPE='U'\")\n .append(\" AND c.CONSTRAINTID = k.CONSTRAINTID\")\n .append(\" AND k.CONGLOMERATEID = g.CONGLOMERATEID\")\n .toString();\n super.evaluateUniqueKeys(_metaData, _tableName, sqlStmt);\n }",
"static String composeIndexName() {\n\t\treturn TYPE.toLowerCase();\n\t}",
"protected String createPKString(DbEntity entity) {\n List pk = entity.getPrimaryKey();\n\n if (pk == null || pk.size() == 0) {\n throw new CayenneRuntimeException(\n \"Entity '\" + entity.getName() + \"' has no PK defined.\");\n }\n\n StringBuffer buffer = new StringBuffer();\n buffer.append(\"CREATE PRIMARY KEY \").append(entity.getName()).append(\" (\");\n\n Iterator it = pk.iterator();\n\n // at this point we know that there is at least on PK column\n DbAttribute firstColumn = (DbAttribute) it.next();\n buffer.append(firstColumn.getName());\n\n while (it.hasNext()) {\n DbAttribute column = (DbAttribute) it.next();\n buffer.append(\", \").append(column.getName());\n }\n\n buffer.append(\")\");\n return buffer.toString();\n }",
"CreateIndexConstantAction(\n boolean forCreateTable,\n boolean\t\t\tunique,\n boolean\t\t\tuniqueWithDuplicateNulls,\n String\t\t\tindexType,\n String\t\t\tschemaName,\n String\t\t\tindexName,\n String\t\t\ttableName,\n UUID\t\t\ttableId,\n String[]\t\tcolumnNames,\n boolean[]\t\tisAscending,\n boolean\t\t\tisConstraint,\n UUID\t\t\tconglomerateUUID,\n Properties\t\tproperties)\n {\n super(tableId, indexName, tableName, schemaName);\n\n this.forCreateTable = forCreateTable;\n this.unique = unique;\n this.uniqueWithDuplicateNulls = uniqueWithDuplicateNulls;\n this.indexType = indexType;\n this.columnNames = columnNames;\n this.isAscending = isAscending;\n this.isConstraint = isConstraint;\n this.conglomerateUUID = conglomerateUUID;\n this.properties = properties;\n this.conglomId = -1L;\n this.droppedConglomNum = -1L;\n }",
"public\tString\ttoString()\n {\n // Do not put this under SanityManager.DEBUG - it is needed for\n // error reporting.\n return \"CREATE INDEX \" + indexName;\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getHashKey()));\n return sb.toString();\n }",
"public String generateHashedConstraintName(String prefix, Identifier tableName, Identifier... columnNames ) {\n\n\t\tStringBuilder sb = new StringBuilder( \"table`\" + tableName + \"`\" );\n\n\t\t// Ensure a consistent ordering of columns, regardless of the order\n\t\t// they were bound.\n\t\t// Clone the list, as sometimes a set of order-dependent Column\n\t\t// bindings are given.\n\t\tIdentifier[] alphabeticalColumns = columnNames.clone();\n\t\tArrays.sort(\n\t\t\t\talphabeticalColumns,\n\t\t\t\tnew Comparator<Identifier>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(Identifier o1, Identifier o2) {\n\t\t\t\t\t\treturn o1.getCanonicalName().compareTo( o2.getCanonicalName() );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t);\n\t\tfor ( Identifier columnName : alphabeticalColumns ) {\n\t\t\tsb.append( \"column`\" ).append( columnName ).append( \"`\" );\n\t\t}\n\t\treturn prefix + hashedName( sb.toString() );\n\t}",
"public String getIndexColumn() {\n return \"id\";\n }",
"@Override\n public String generateId() {\n return HiveIdGenerator.generateTableId(getSourceId(), getDatabaseName(),\n getTableName());\n }",
"public static PrimaryIndexBuilder pkIndex() {\n return new PrimaryKeyBuilderImpl();\n }",
"@Test(timeout = 4000)\n public void test44() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"z}yVJPxVp_\";\n stringArray0[0] = \"z}yVJPxVp_\";\n stringArray0[2] = \"z}yVJPxVp_\";\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"z}yVJPxVp_\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n String string0 = SQLUtil.constraintSpec(dBUniqueConstraint0, nameSpec0);\n assertEquals(\"UNIQUE (z}yVJPxVp_, , z}yVJPxVp_, )\", string0);\n }",
"@Test(timeout = 4000)\n public void test013() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"%KPzc}nCj\\\"i,>gZj u\");\n String[] stringArray0 = new String[1];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"\\\"\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.appendConstraintName((DBConstraint) dBUniqueConstraint0, (StringBuilder) null, nameSpec0);\n assertNull(stringBuilder0);\n }",
"public static String fmtSqlIdentifier(String toClean) {\n\t\tString regex = \"[^0-9a-zA-Z_]+\";\n\t\tString ret = toClean.replaceAll(regex, \"_\");\n\t\tif(ret.length() > 50)\n\t\t\tret = ret.substring(0, 50);\n\t\treturn ret;\n\t}",
"public abstract String getPrimaryKey(String tableName);",
"public boolean qualifyIndexName() {\n \t\treturn true;\n \t}",
"private IiconstraintIndexes() {\n\t\tsuper(\"iiconstraint_indexes\", org.jooq.util.ingres.ingres.$ingres.$INGRES);\n\t}",
"public String getAddUniqueConstraintString(String constraintName) {\n return \" add constraint \" + constraintName + \" unique \";\n }",
"@Test(timeout = 4000)\n public void test51() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"d*REA^ZGOc/_v\");\n String[] stringArray0 = new String[1];\n stringArray0[0] = \"d*REA^ZGOc/_v\";\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, true, stringArray0);\n String string0 = SQLUtil.constraintName(dBUniqueConstraint0);\n assertEquals(\"\", string0);\n }",
"protected static Statement primarykeyCQL(String keyspace, String table) {\n return QueryBuilder.select(COLUMN_NAME_COLUMN, KIND_COLUMN, POSITION_COLUMN)\n .from(\"system_schema\", \"columns\")\n .where(QueryBuilder.eq(\"keyspace_name\", keyspace))\n .and(QueryBuilder.eq(\"table_name\", table))\n .and(QueryBuilder.gt(\"position\", -1))\n .allowFiltering();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getBatchId()));\n sb.append(\", \");\n sb.append(f.formatAny(getNestId()));\n return sb.toString();\n }",
"public boolean supportsUniqueConstraintInCreateAlterTable() {\n \t return true;\n \t}",
"private void generateID(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String t : terms.keySet())\n\t\t\tsb.append(t.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, t.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tfor (String s : sources)\n\t\t\tsb.append(s.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, s.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tsb.deleteCharAt(sb.length()-1);\n\t\tif (yearFrom > -1) sb.append(\"_\" + yearFrom);\n\t\tif (yearTo > -1) sb.append(\"_\" + yearTo);\n\t\tif (useCompounds) sb.append(\"_COMP\");\n\t\tif (useStopwords) sb.append(\"_STOP\");\n\t\tsb.append(\"_CNT\" + contextSize);\n\t\tsb.append(\"_\" + System.currentTimeMillis());\n\t\tthis.id = sb.toString();\n\t}",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBUniqueConstraint0, nameSpec0);\n SQLUtil.appendConstraintName((DBConstraint) dBUniqueConstraint0, stringBuilder0);\n assertEquals(\"\", stringBuilder0.toString());\n }",
"@Test(timeout = 4000)\n public void test106() throws Throwable {\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"L{#w9,'s5*5z&;09\", true, (String[]) null);\n String string0 = SQLUtil.constraintSpec(dBUniqueConstraint0, nameSpec0);\n assertEquals(\"CONSTRAINT L{#w9,'s5*5z&;09 UNIQUE ()\", string0);\n }",
"private String getRevisionTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table REVISION(\");\n \t\tbuilder.append(\"REVISION_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"REVISION_IDENTIFIER TEXT UNIQUE\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"public KeyColumnRefs(IndexColumnRefs idxColRefs) {\r\n super(idxColRefs.getCols(), null, TableConstraintType.UNIQUE);\r\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getLegDepartureLocalTm()));\n sb.append(\", \");\n sb.append(f.formatAny(getLegArrivalLocalTm()));\n sb.append(\", \");\n sb.append(f.formatAny(getLegArrivalDayOffset()));\n sb.append(\", \");\n sb.append(f.formatAny(getLegStopCount()));\n sb.append(\", \");\n sb.append(f.formatAny(getLegEquipment()));\n return sb.toString();\n }",
"@Test(timeout = 4000)\n public void test002() throws Throwable {\n String string0 = SQLUtil.substituteMarkers(\"create unique indexalter tableoeqdkmcg0dtw\", \"05#)Ij0`/j^^LJ{\", \"/2Wp5dC9l(vh\");\n assertEquals(\"create unique indexalter tableoeqdkmcg0dtw\", string0);\n }",
"public String getTipoSqlite(AtributoEntidade atributo) {\n\t\tString saida = getTipoSqliteSinc(atributo);\n\t\tif (atributo.getChave()) {\n\t\t\tsaida += \" PRIMARY KEY\";\n\t\t}\n\t\treturn saida;\n\t}",
"public void enableIndexAutoCreation() {\n client.setIndexAutoCreationEnabled(true);\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n String[] stringArray0 = new String[20];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \" = \", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"PRIMARY KEY (, , , , , , , , , , , , , , , , , , , )\", string0);\n }",
"public int commonIndex(String tableName) {\r\n\t\tint index = -1;\r\n\t\tint distance = 100000; // 当脚本中同一名称的表有多个create语句时,判断使用哪个create语句\r\n\t\tfor (int i = 0; i < commonTableList.size(); i++) {\r\n\t\t\tHashMap commonTable = (HashMap) commonTableList.get(i);\r\n\t\t\tif (tableName.equalsIgnoreCase((String) commonTable.get(\"table_name\"))) {\r\n\t\t\t\tInteger createIndex = (Integer) commonTable.get(\"sqlIndex\");\r\n\t\t\t\tif ((sqlIndex - createIndex.intValue()) <= distance) {\r\n\t\t\t\t\tdistance = sqlIndex - createIndex.intValue();\r\n\t\t\t\t\tindex = createIndex.intValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn index;\r\n\t}",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getCode()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getId()));\n return sb.toString();\n }",
"@Test(timeout = 4000)\n public void test001() throws Throwable {\n String[] stringArray0 = new String[20];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \" = \", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n String string0 = SQLUtil.ukSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"CONSTRAINT \\\" = \\\" UNIQUE (, , , , , , , , , , , , , , , , , , , )\", string0);\n }",
"public String toSQL(String tableName, Vector pk, Map additionalColumn)\n {\n /*\n CREATE TABLE distributors (\n did integer,\n name varchar(40) );\n */\n StringBuffer buf = new StringBuffer();\n buf.append(\"CREATE TABLE \" + tableName + \"( \\n\");\n for (Iterator it = attDBTypeList.keySet().iterator(); it.hasNext(); )\n {\n String attribute = (String) it.next();\n String dbtype = (String) attDBTypeList.get(attribute);\n buf.append(\" \" + attribute + \" \" + dbtype + \",\\n\");\n }\n\n if (additionalColumn != null) // 2005-03-28\n {\n for (Iterator it = additionalColumn.keySet().iterator(); it.hasNext(); )\n {\n String attribute = (String) it.next();\n String dbtype = (String) additionalColumn.get(attribute);\n buf.append(\" \" + attribute + \" \" + dbtype + \",\\n\");\n }\n }\n\n /*\n CREATE TABLE distributors (\n did integer CHECK (did > 100),\n name varchar(40),\n CONSTRAINT distributors_pkey PRIMARY KEY (did,name)\n );\n */\n\n if (pk != null)\n {\n buf.append(\"CONSTRAINT \" + tableName + \"_pkey PRIMARY KEY (\");\n for (int i = 0; i < pk.size() - 1; i++)\n {\n buf.append(pk.elementAt(i) + \",\");\n }\n buf.append(pk.elementAt(pk.size() - 1));\n\n buf.append(\"),\\n\");\n }\n\n String sql = buf.toString();\n sql = sql.substring(0, sql.length() - 2); // filter out the last \",\\n\"\n sql = sql + \");\";\n return sql;\n }",
"public String createDSIndex(String dsID, String dschemaID, String attriName);",
"public UniqueInfo getPrimaryUniqueInfo() {\r\n throw new UnsupportedOperationException(\"The table does not have primary key: \" + getTableDbName());\r\n }",
"public StrColumn getAuthAsymId() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"auth_asym_id\", StrColumn::new) :\n getBinaryColumn(\"auth_asym_id\"));\n }",
"@Test(timeout = 4000)\n public void test091() throws Throwable {\n String[] stringArray0 = new String[9];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"%)vq\", (DBSchema) null);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, (String) null, true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"PRIMARY KEY (, , , , , , , , )\", string0);\n }",
"public StrColumn getAsymId() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"asym_id\", StrColumn::new) :\n getBinaryColumn(\"asym_id\"));\n }",
"public KeyArea setupKey(int iKeyArea)\n {\n KeyArea keyArea = null;\n if (iKeyArea == 0)\n {\n keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY);\n keyArea.addKeyField(ID, DBConstants.ASCENDING);\n }\n if (iKeyArea == 1)\n {\n keyArea = this.makeIndex(DBConstants.SECONDARY_KEY, NAME_KEY);\n keyArea.addKeyField(NAME, DBConstants.ASCENDING);\n }\n if (keyArea == null)\n keyArea = super.setupKey(iKeyArea); \n return keyArea;\n }",
"public String getFirstKeyColumnName() {\r\n\t\treturn \"userId\";\r\n\t}",
"private static String makeTableBaseName(int number) {\n return \"bi_\" + Integer.toString(number);\n }",
"public Map<String, String> exportIndexDefs(String fullTableName);",
"@Override\n\tpublic void createTable(Object connectionHandle, DataTable table) throws DataSourceException\n\t{\n\t\tList<DataField> fields = new LinkedList<DataField>();\n\t\tList<String> indexes = new LinkedList<String>();\n\t\t\n\t\tList<String> keys = table.getFields();\n\t\tIterator<String> it = keys.iterator();\n\t\twhile(it.hasNext()){\n\t\t\tString fld = it.next();\n\t\t\tDataField df = table.getDataField(fld);\n\t\t\t\n\t\t\tfields.add(df);\n\t\t\t\n\t\t//\tif(df.isPrimary()){\n\t\t//\t\tindexes.add(fld);\n\t\t//\t}\n\t\t}\n\t\t\n\t\tIterator<DataField> primaryIt = table.getPrimaryKeys().iterator();\n\t\twhile(primaryIt.hasNext()){\n\t\t\tDataField pf = primaryIt.next();\n\t\t\t\n\t\t\tindexes.add(pf.getName());\n\t\t}\n\t\t\n\t\t\n\t\t// Make SQL String\n\t\tStringBuffer sqlString = new StringBuffer();\n\t\tsqlString.append(\"CREATE TABLE \");\n\t\tsqlString.append(table.getName());\n\t\tsqlString.append(\" ( \\n\");\n\t\t\n\t\tboolean first = true;\n\t\tIterator<DataField> itDf = fields.iterator();\n\t\twhile(itDf.hasNext()){\n\t\t\tDataField fld = itDf.next();\n\t\t\t\n\t\t\tif(first){\n\t\t\t\tfirst = false;\n\t\t\t}else{\n\t\t\t\tsqlString.append(\",\\n\");\n\t\t\t}\n\t\t\t\n\t\t\tsqlString.append(fld.getName());\n\t\t\tsqlString.append(\" \");\n\t\t\tsqlString.append(getSQLType(fld.getType()));\n\t\t\t\n\t\t\t// not null\n\t\t\tif(fld.isNotnull()){\n\t\t\t\tsqlString.append(\" NOT NULL\");\n\t\t\t}\n\t\t\t\n\t\t\t// unique\n\t\t\tif(fld.isUnique()){\n\t\t\t\tsqlString.append(\" UNIQUE\");\n\t\t\t}\n\t\t\t\n\t\t\t// default\n\t\t\tif(fld.getDefaultValue() != null){\n\t\t\t\tsqlString.append(\" \");\n\t\t\t\tsqlString.append(fld.getDefaultString());\n\t\t\t}\n\t\t\t\n\t\t\t// check\n\t\t\tif(fld.getCheck() != null){\n\t\t\t\tsqlString.append(\" \");\n\t\t\t\ttry {\n\t\t\t\t\tsqlString.append(fld.getCheck().extract(null, null, null, null, null));\n\t\t\t\t} catch (ExecutionException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tthrow new DataSourceException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// check\n\t\tIterator<CheckDefinition> checkIt = table.getCheck().iterator();\n\t\twhile(checkIt.hasNext()){\n\t\t\tCheckDefinition def = checkIt.next();\n\t\t\t\n\t\t\tsqlString.append(\",\\n\");\n\t\t\ttry {\n\t\t\t\tsqlString.append(def.extract(null, null, null, null, null));\n\t\t\t} catch (ExecutionException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow new DataSourceException(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// foreign key\n\t\tIterator<ForeignKey> foreignIt = table.getForeignKey().iterator();\n\t\twhile(foreignIt.hasNext()){\n\t\t\tForeignKey fkey = foreignIt.next();\n\t\t\t\n\t\t\tsqlString.append(\",\\n\");\n\t\t\ttry {\n\t\t\t\tsqlString.append(fkey.extract(null, null, null, null, null));\n\t\t\t} catch (ExecutionException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow new DataSourceException(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// primary key\n\t\tif(indexes.size() > 0){\n\t\t\tsqlString.append(\",\\n\");\n\t\t\tsqlString.append(\"PRIMARY KEY(\");\n\t\t\t\n\t\t\tfirst = true;\n\t\t\tit = indexes.iterator();\n\t\t\twhile(it.hasNext()){\n\t\t\t\tString idxFld = it.next();\n\t\t\t\t\n\t\t\t\tif(first){\n\t\t\t\t\tfirst = false;\n\t\t\t\t}else{\n\t\t\t\t\tsqlString.append(\", \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsqlString.append(idxFld);\n\t\t\t}\n\n\t\t\tsqlString.append(\")\");\n\t\t}\n\t\t\n\t\t// unique\n\t\tIterator<Unique> itU = table.getUnique().iterator();\n\t\twhile(itU.hasNext()){\n\t\t\tUnique unique = itU.next();\n\t\t\t\n\t\t\tsqlString.append(\",\\n\");\n\t\t\tsqlString.append(\"UNIQUE(\");\n\t\t\t\n\t\t\tfirst = true;\n\t\t\tIterator<String> itUnique = unique.getKey().iterator();\n\t\t\twhile(itUnique.hasNext()){\n\t\t\t\tString col = itUnique.next();\n\t\t\t\t\n\t\t\t\tif(first){\n\t\t\t\t\tfirst = false;\n\t\t\t\t}else{\n\t\t\t\t\tsqlString.append(\",\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsqlString.append(col);\n\t\t\t}\n\t\t\t\n\t\t\tsqlString.append(\")\");\n\t\t}\n\t\t\n\t\tsqlString.append(\"\\n)\\n\");\n\t\t\n\t\tif(this.logger != null && this.outSql){\n\t\t\tthis.logger.reportInfo(sqlString.toString());\n\t\t}\n\t\t\n\t\t// \n\t\tAlinousDebug.debugOut(core, sqlString.toString());\n\t\t\n\t\texecuteUpdateSQL(connectionHandle, sqlString.toString(), false);\n\n\t}",
"@Override\n\tpublic String getMapKey()\n\t{\n\t\tsbTemp.delete(0, sbTemp.length());\n\t\tsbTemp.append(areaCell.iCityID);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iAreatype);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iAreaID);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iECI);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iTime);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iInterface);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.kpiSet);\n\t\treturn sbTemp.toString();\n\t}",
"private String generatePrimaryKey(Connection conn, String tableName) {\n String returnValue = null;\n String existingPkValue = null;\n String nextPkValue = null;\n\n try {\n existingPkValue = sql.selectKeyValueFromLastUsedKey(conn, tableName);\n\n if (existingPkValue == null) {\n System.out.println(\"Last used key value is NULL\");\n return null;\n }\n // remove first 1 alphabetic characters from this\n String prefix = existingPkValue.substring(0, 1);\n String existingPkValueWithPrefixStripped = existingPkValue.substring(1);\n\n // get number of characters in lastUsedId\n int completeLength = existingPkValueWithPrefixStripped.length();\n\n // convert lastUsedId into number\n int existingIdNum = 0;\n existingIdNum = Integer.parseInt(existingPkValueWithPrefixStripped.trim());\n\n // add 1 to this number\n int nextIdNum = existingIdNum + 1;\n\n // convert this number back to String\n String nextId = String.valueOf(nextIdNum);\n int newLength = nextId.length();\n // depending on the number of characters calculated initially,\n int zeroes = completeLength - newLength;\n // prefix Zeros accordingly to this String\n for (int i = 1; i <= zeroes; i++) {\n nextId = \"0\" + nextId;\n }\n\n // add the 4 character alphabetic prefix to this string\n nextPkValue = prefix + nextId;\n\n // update the system_last_used_id table\n sql.updateLastUsedPrimaryKeyValue(conn, tableName, nextPkValue);\n returnValue = nextPkValue;\n } catch (NumberFormatException ex) {\n System.out.println(\"generatePrimaryKey: \" + ex.getMessage());\n }\n return returnValue;\n\n }",
"java.lang.String getHeaderTableId();",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n DBSchema dBSchema0 = new DBSchema(\"Er\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"Er\", dBSchema0);\n String[] stringArray0 = new String[0];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"e/ \", false, stringArray0);\n boolean boolean0 = DBUtil.containsMandatoryColumn(dBUniqueConstraint0);\n assertFalse(boolean0);\n }",
"public String generatePkForDbEntityString(DbEntity ent) {\n if ((null == ent.getPrimaryKey()) || (1 != ent.getPrimaryKey().size())) {\n throw new CayenneRuntimeException(\n \"Error generating pk for DbEntity \"\n + ent.getName()\n + \": pk must be single attribute\");\n }\n DbAttribute primaryKeyAttribute = (DbAttribute) ent.getPrimaryKey().get(0);\n\n StringBuffer buf = new StringBuffer(\"NEWID FOR \");\n buf.append(ent.getName()).append(' ').append(primaryKeyAttribute.getName());\n return buf.toString();\n }",
"@Test\n public void testCreateIdxOnClient() {\n getDefaultCacheOnClient().query(new SqlFieldsQuery(((\"CREATE INDEX IDX_11 ON \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (name asc)\"))).getAll();\n }",
"private List<SQLiteColumn> findAndUpdateUniqueColumns(\r\n Connection connection, String tableName,\r\n List<SQLiteColumn> columnList) {\r\n ResultSet resultSet = null;\r\n Statement statement = null;\r\n try {\r\n statement = connection.createStatement();\r\n try {\r\n resultSet = statement.executeQuery(\"PRAGMA INDEX_LIST('\"\r\n + tableName + \"')\");\r\n } catch (SQLException e) {\r\n return columnList;\r\n }\r\n while (resultSet.next()) {\r\n String indexColumnId = getIndexColumnName(connection,\r\n resultSet.getString(\"name\"));\r\n if (indexColumnId != null && !indexColumnId.isEmpty()) {\r\n for (SQLiteColumn colum : columnList) {\r\n if (colum.getColumnName().equalsIgnoreCase(\r\n indexColumnId)) {\r\n colum.setUnique(true);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n } catch (SQLException e) {\r\n throw new RuntimeException(e);\r\n } finally {\r\n Utils.close(resultSet, statement);\r\n }\r\n return columnList;\r\n }",
"@Override\n public SqlDatabaseTable ensureUnique(SqlDatabaseTable table) {\n return table;\n }",
"@Override\r\n public Db_db createTable (Db_table table)\r\n {\r\n Db_db db = null;\r\n String query = \"CREATE TABLE IF NOT EXISTS \"+ table.getName() + \" (\"; \r\n String primaryKeyName = null;\r\n Set<Map.Entry<String, Db_tableColumn>> tableEntries;\r\n List<String> listOfUniqueKey = Lists.newArrayList();\r\n \r\n if(curConnection_ != null)\r\n {\r\n try\r\n {\r\n tableEntries = table.getEntrySet();\r\n for(Map.Entry<String, Db_tableColumn> entry: tableEntries)\r\n {\r\n Db_tableColumn entryContent = entry.getValue();\r\n \r\n if(entryContent.isPrimary() && primaryKeyName == null)\r\n {\r\n primaryKeyName = entryContent.getName();\r\n }\r\n else if(entryContent.isPrimary() && primaryKeyName != null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(itsAttributeMapper_ == null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(entryContent.isUnique())\r\n {\r\n listOfUniqueKey.add(entryContent.getName());\r\n }\r\n \r\n String mappedAttribute = this.itsAttributeMapper_.MapAttribute(entryContent.getAttributeName());\r\n if(entryContent.getAttribute().isEnum())\r\n {\r\n mappedAttribute += entryContent.getAttribute().buildEnumValueListString();\r\n }\r\n query += entryContent.getName() + \" \" + mappedAttribute \r\n + (entryContent.isAutoIncreasmnet()?\" AUTO_INCREMENT \":\" \")\r\n + (entryContent.isUnique()?\" UNIQUE, \": \", \");\r\n }\r\n \r\n query += \"PRIMARY KEY (\" + primaryKeyName + \"));\";\r\n try (Statement sm = curConnection_.createStatement()) {\r\n sm.executeUpdate(query);\r\n db = this.curDb_;\r\n }\r\n \r\n }catch(NumberFormatException e){System.out.print(e);}\r\n catch(SQLException e){System.out.print(query);this.CurConnectionFailed();}\r\n }\r\n return db;\r\n }",
"static DbQuery createKeyQuery() {\n DbQuery query = new DbQuery();\n query.order = OrderBy.KEY;\n return query;\n }",
"public DBField getAutoIndexField()\n {\n return this.getField(DBRecordKey.FLD_autoIndex);\n }",
"static void generatePrimary(Table table, Key key, PrintWriter outData, String mcomma)\r\n {\r\n String comma = \" ( \";\r\n String keyname = key.name.toUpperCase();\r\n if (keyname.indexOf(table.name.toUpperCase()) == -1)\r\n keyname = table.name.toUpperCase()+\"_\"+keyname;\r\n outData.println(mcomma+\"CONSTRAINT \"+keyname+\" PRIMARY KEY\");\r\n for (int i=0; i < key.fields.size(); i++, comma = \" , \")\r\n {\r\n String name = (String) key.fields.elementAt(i);\r\n outData.println(comma+name);\r\n }\r\n outData.println(\" )\");\r\n for (int i=0; i < key.options.size(); i++)\r\n {\r\n String option = (String) key.options.elementAt(i);\r\n outData.println(\" \"+option);\r\n }\r\n }",
"@Override\n public void onCreate(SQLiteDatabase sqLiteDatabase) {\n StringBuffer ddl = new StringBuffer();\n\n\t ddl.append(\"CREATE TABLE \" + TABLE + \"( \");\n\t ddl.append(\"id INTEGER PRIMARY KEY AUTOINCREMENT, \");\n\t\tddl.append(\"search TEXT, timestamp DATETIME DEFAULT CURRENT_TIMESTAMP); \");\n\n\t ddl.append(\"CREATE UNIQUE INDEX ind_search \");\n\t ddl.append(\"ON \" + TABLE + \"(search)\");\n\n sqLiteDatabase.execSQL(ddl.toString());\n }",
"private String getCodeFragmentGenealogyTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CODE_FRAGMENT_GENEALOGY(\");\n \t\tbuilder.append(\"CODE_FRAGMENT_GENEALOGY_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG,\");\n \t\tbuilder.append(\"CODE_FRAGMENTS TEXT NOT NULL,\");\n \t\tbuilder.append(\"CODE_FRAGMENT_LINKS TEXT NOT NULL,\");\n \t\tbuilder.append(\"CHANGES INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"public String getPrimaryKey() throws CloneNotSupportedException {\r\n\t\tString key=\"\";\r\n\t\tfor (int i = 0; i < this.state.getSizeCol(); i++) {\r\n\t\t\tfor (int j = 0; j < this.state.getSizeRow(); j++) {\r\n\t\t\t\tkey+=this.state.getValue(new Position(i,j));\r\n\t\t\t}\r\n\t\t}\r\n\t\tkey+=\"?\"+this.state.getTractor().getPosition().toString();\r\n\t\treturn key;\r\n\t}",
"private void createCodeFragmentGenealogyTableIndexes() throws Exception {\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index CODE_FRAGMENT_GENEALOGY_ID_INDEX_CODE_FRAGMENT_GENEALOGY on CODE_FRAGMENT_GENEALOGY(CODE_FRAGMENT_GENEALOGY_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index START_REVISION_ID_INDEX_CODE_FRAGMENT_GENEALOGY on CODE_FRAGMENT_GENEALOGY(START_REVISION_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index END_REVISION_ID_INDEX_CODE_FRAGMENT_GENEALOGY on CODE_FRAGMENT_GENEALOGY(END_REVISION_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index CHANGES_INDEX_CODE_FRAGMENT_GENEALOGY on CODE_FRAGMENT_GENEALOGY(CHANGES)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index START_END_REVISION_ID_INDEX_CODE_FRAGMENT_GENEALOGY on CODE_FRAGMENT_GENEALOGY(START_REVISION_ID,END_REVISION_ID)\");\n \t}",
"@Override\r\n\tprotected void buildPrimaryKeys(final DatabaseTable table) throws SQLException {\r\n\t\tif (views.contains(table)) {\r\n\t\t\t// buildPrimaryKeysOfView(table);\r\n\t\t} else {\r\n\t\t\tbuildPrimaryKeysOfTable(table);\r\n\t\t}\r\n\t}",
"private void addColumnInPrimarySection(String key) {\n _queryBuilder.addColumn(key);\n _queryBuilder.addJoin(FilterMetaData.KEY_OUTER_JOIN_PATH_SECTION);\n _queryBuilder.addTable(TableMetaData.KEY_TABLE_PATH);\n _queryBuilder.addTable(TableMetaData.KEY_TABLE_SECTION);\n }",
"public ScGridColumn<AcActionAutoCorrectedLog> newIdColumn()\n {\n return newIdColumn(\"Id\");\n }",
"@Test(timeout = 4000)\n public void test046() throws Throwable {\n String[] stringArray0 = new String[5];\n DBSchema dBSchema0 = new DBSchema(\"\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"k4#~A6 _d6{6v)5_\", dBSchema0);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.appendConstraintName((DBConstraint) dBPrimaryKeyConstraint0, (StringBuilder) null, nameSpec0);\n assertNull(stringBuilder0);\n }",
"public static void validateKeys(Model model) throws MolgenisModelException\r\n\t{\r\n\t\tlogger.debug(\"validate the fields used in 'unique' constraints...\");\r\n\t\t// validate the keys\r\n\t\tfor (Entity entity : model.getEntities())\r\n\t\t{\r\n\t\t\tString entityname = entity.getName();\r\n\t\t\tint autocount = 0;\r\n\t\t\tfor (Field field : entity.getAllFields())\r\n\t\t\t{\r\n\t\t\t\tString fieldname = field.getName();\r\n\t\t\t\tif (field.isAuto() && field.getType() instanceof IntField)\r\n\t\t\t\t{\r\n\t\t\t\t\tautocount++;\r\n\r\n\t\t\t\t\tboolean iskey = false;\r\n\r\n\t\t\t\t\tfor (Unique unique : entity.getAllKeys())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor (Field keyfield : unique.getFields())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (keyfield.getName() == null) throw new MolgenisModelException(\"unique field '\"\r\n\t\t\t\t\t\t\t\t\t+ fieldname + \"' is not known in entity \" + entityname);\r\n\t\t\t\t\t\t\tif (keyfield.getName().equals(field.getName())) iskey = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!iskey) throw new MolgenisModelException(\r\n\t\t\t\t\t\t\t\"there can be only one auto column and it must be the primary key for field '\" + entityname\r\n\t\t\t\t\t\t\t\t\t+ \".\" + fieldname + \"'\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (field.getType() instanceof EnumField)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (field.getDefaultValue() != null && !\"\".equals(field.getDefaultValue())) if (!field\r\n\t\t\t\t\t\t\t.getEnumOptions().contains(field.getDefaultValue()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthrow new MolgenisModelException(\"default value '\" + field.getDefaultValue()\r\n\t\t\t\t\t\t\t\t+ \"' is not in enum_options for field '\" + entityname + \".\" + fieldname + \"'\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (autocount > 1) throw new MolgenisModelException(\r\n\t\t\t\t\t\"there should be only one auto column and it must be the primary key for entity '\" + entityname\r\n\t\t\t\t\t\t\t+ \"'\");\r\n\r\n\t\t\t// to strict, the unique field may be non-automatic\r\n\t\t\tif (!entity.isAbstract() && autocount < 1)\r\n\t\t\t{\r\n\t\t\t\tthrow new MolgenisModelException(\r\n\t\t\t\t\t\t\"there should be one auto column for each root entity and it must be the primary key for entity '\"\r\n\t\t\t\t\t\t\t\t+ entityname + \"'\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"private String getCloneSetTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CLONE_SET(\");\n \t\tbuilder.append(\"CLONE_SET_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"OWNER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"ELEMENTS TEXT NOT NULL,\");\n \t\tbuilder.append(\"NUMBER_OF_ELEMENTS INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"@Test(timeout = 4000)\n public void test097() throws Throwable {\n String[] stringArray0 = new String[8];\n DBSchema dBSchema0 = new DBSchema(\"B?<P%cF\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"V\", dBSchema0);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \" on \", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"CONSTRAINT \\\" on \\\" PRIMARY KEY (, , , , , , , )\", string0);\n }",
"private String getStringKey(int rawKey) {\n // Specialize single group-by column case\n if (_numGroupByExpressions == 1) {\n return _dictionaries[0].getStringValue(rawKey);\n } else {\n int cardinality = _cardinalities[0];\n StringBuilder groupKeyBuilder = new StringBuilder(_dictionaries[0].getStringValue(rawKey % cardinality));\n rawKey /= cardinality;\n for (int i = 1; i < _numGroupByExpressions; i++) {\n groupKeyBuilder.append(GroupKeyGenerator.DELIMITER);\n cardinality = _cardinalities[i];\n groupKeyBuilder.append(_dictionaries[i].getStringValue(rawKey % cardinality));\n rawKey /= cardinality;\n }\n return groupKeyBuilder.toString();\n }\n }",
"@Override\n public void buildIndexes(Properties props)\n {\n Statement statement;\n try\n {\n statement = connection.createStatement();\n \n //Create Indexes\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITEEID ON CONFFRIENDSHIP (INVITEEID)\");\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITERID ON CONFFRIENDSHIP (INVITERID)\");\n statement.executeUpdate(\"CREATE INDEX PENDFRIENDSHIP_INVITEEID ON PENDFRIENDSHIP (INVITEEID)\");\n statement.executeUpdate(\"CREATE INDEX PENDFRIENDSHIP_INVITERID ON PENDFRIENDSHIP (INVITERID)\");\n statement.executeUpdate(\"CREATE INDEX MANIPULATION_RID ON MANIPULATION (RID)\");\n statement.executeUpdate(\"CREATE INDEX MANIPULATION_CREATORID ON MANIPULATION (CREATORID)\");\n statement.executeUpdate(\"CREATE INDEX RESOURCES_WALLUSERID ON RESOURCES (WALLUSERID)\");\n statement.executeUpdate(\"CREATE INDEX RESOURCE_CREATORID ON RESOURCES (CREATORID)\");\n \n System.out.println(\"Indexes Built\");\n }\n catch (Exception ex)\n {\n Logger.getLogger(WindowsAzureClientInit.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Error in building indexes!\");\n }\n }",
"public static String getPrimaryKeyName() {\r\n\t\t\treturn PRIMARY_KEY_ID;\r\n\t\t}",
"public StrColumn getAuthSeqId() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"auth_seq_id\", StrColumn::new) :\n getBinaryColumn(\"auth_seq_id\"));\n }",
"public StrColumn getAuthSeqId() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"auth_seq_id\", StrColumn::new) :\n getBinaryColumn(\"auth_seq_id\"));\n }",
"public String createTable() {\n\n String statement = \"CREATE TABLE \" + tableName + \"( \";\n\n //go through INTEGER, FLOAT, TEXT columns\n Iterator iterator = Iterables.filter(columns.entrySet(), entry -> entry.getValue().getType() instanceof String).iterator();\n\n while (iterator.hasNext()) {\n Map.Entry<Element, FieldData> fieldDataEntry = (Map.Entry<Element, FieldData>) iterator.next();\n statement += fieldDataEntry.getValue().createColumn() + \",\";\n }\n\n return (new StringBuilder(statement).replace(statement.length() - 1, statement.length(), \"\").toString() + \")\").toUpperCase();\n }",
"public void testAddingNewIndexWithoutIndex() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n PSJdbcTableSchema tableSchema = createTableSchema(coldefs);\n setPrimaryKey(tableSchema);\n PSJdbcForeignKey fk = createForeignKey(tableSchema);\n\n Document doc = PSXmlDocumentBuilder.createXmlDocument();\n Element el = tableSchema.toXml(doc);\n PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap);\n\n Iterator<?> itIndex = tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE);\n PSJdbcIndex index = (PSJdbcIndex) itIndex.next();\n String IndexName = index.getName();\n String fkcolname = fk.getForeignKeyColumnNames().get(0);\n\n // Makes sure if the table schema has changed\n assertFalse((tableSchema.equals(tableSchema2)));\n\n // Makes sure if a new index definition of non unique have been added to\n // table schema.\n assertFalse((tableSchema.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n assertTrue((tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n\n // Makes sure if the index name has taken the first foreign key column name.\n assertTrue((StringUtils.equalsIgnoreCase(IndexName, \"IX_\" + fkcolname)));\n\n // Makes sure if the createForeignkeyIndexes attribute for mysql.\n assertTrue(dataTypeMap.isCreateForeignKeyIndexes());\n\n }",
"public void createIndex(final DBObject keys, @Nullable final String name, final boolean unique) {\n DBObject options = new BasicDBObject();\n if (name != null && name.length() > 0) {\n options.put(\"name\", name);\n }\n if (unique) {\n options.put(\"unique\", Boolean.TRUE);\n }\n createIndex(keys, options);\n }",
"@Test(timeout = 4000)\n public void test050() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"insert\");\n String[] stringArray0 = new String[4];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n StringBuilder stringBuilder0 = new StringBuilder();\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n StringBuilder stringBuilder1 = SQLUtil.appendConstraintName((DBConstraint) dBUniqueConstraint0, stringBuilder0, nameSpec0);\n assertSame(stringBuilder0, stringBuilder1);\n }",
"private String getCloneGenealogyTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CLONE_GENEALOGY(\");\n \t\tbuilder.append(\"CLONE_GENEALOGY_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG,\");\n \t\tbuilder.append(\"CLONES TEXT NOT NULL,\");\n \t\tbuilder.append(\"CLONE_LINKS TEXT NOT NULL,\");\n \t\tbuilder.append(\"CHANGES INTEGER,\");\n \t\tbuilder.append(\"ADDITIONS INTEGER,\");\n \t\tbuilder.append(\"DELETIONS INTEGER,\");\n \t\tbuilder.append(\"DEAD INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"@Test(timeout = 4000)\n public void test052() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[2];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n StringBuilder stringBuilder0 = new StringBuilder(763);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n StringBuilder stringBuilder1 = SQLUtil.appendConstraintName((DBConstraint) dBUniqueConstraint0, stringBuilder0, nameSpec0);\n assertEquals(\"\", stringBuilder1.toString());\n }",
"@Test\n\tpublic void testDBPrimaryKeyConstraint_18()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}",
"private String createSEQTable() {\n\t\tStringBuffer buildSQL = new StringBuffer();\n\t\tbuildSQL.append(\" CREATE TABLE \" + DEFAULT_SEQUENCE_NAME + \" ( \");\n\t\tbuildSQL.append(\"id bigint(20) NOT NULL AUTO_INCREMENT, \");\n\t\tbuildSQL.append(\"prefix_value varchar(12) NOT NULL, \");\n\t\tbuildSQL.append(\"next_val int(11) NOT NULL, \");\n\t\tbuildSQL.append(\"increment int(11) NOT NULL, \");\n\t\tbuildSQL.append(\"PRIMARY KEY (id) \");\n\t\tbuildSQL.append(\") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\");\n\t\t// --log.debug(buildSQL.toString());\n\t\treturn buildSQL.toString();\n\t}",
"private String getCommitTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table VCS_COMMIT(\");\n \t\tbuilder.append(\"VCS_COMMIT_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"BEFORE_REVISION_ID LONG,\");\n \t\tbuilder.append(\"AFTER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"BEFORE_REVISION_IDENTIFIER TEXT,\");\n \t\tbuilder.append(\"AFTER_REVISION_IDENTIFIER TEXT\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}",
"public static String getKeyTypeName(KeyType type)\n {\n // TODO: should be moved to DBProvider ...\n // MySQL : key identifier\n // SQLServer : key identifier\n // Derby : key identifier\n // PostgreSQL: key identifier\n switch (type) {\n // MySQL: key types ...\n case PRIMARY : return \"PRIMARY KEY\"; // table\n case UNIQUE : return \"UNIQUE\"; // table\n case INDEX : return \"INDEX\"; // table/index\n case UNIQUE_INDEX : return \"UNIQUE INDEX\"; // table/index\n default : return \"UNKNOWN\";\n }\n }",
"@Test(timeout = 4000)\n public void test002() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n defaultDBTable0.setName(\"4O)ZgZ_/TD!\");\n String string0 = SQLUtil.substituteMarkers(\"\", \"CONSTRAINT 4O)ZgZ_/TD! PRIMARY KEY (, , , , , , , , , , , , , , , , , )\", defaultDBTable0);\n assertEquals(\"\", string0);\n }",
"public String generateTemporaryTableName(String baseTableName) {\n \t\treturn \"HT_\" + baseTableName;\n \t}"
] | [
"0.60228896",
"0.60177076",
"0.57861316",
"0.55545187",
"0.55502766",
"0.55432045",
"0.5372659",
"0.53432226",
"0.53382814",
"0.5294096",
"0.52718866",
"0.5259889",
"0.52438366",
"0.5197335",
"0.51824915",
"0.5173215",
"0.5150846",
"0.5133289",
"0.5128766",
"0.51231444",
"0.5121961",
"0.50882787",
"0.50720745",
"0.50560755",
"0.50501823",
"0.50424194",
"0.5040685",
"0.503599",
"0.50209713",
"0.50021076",
"0.49791938",
"0.4969591",
"0.4926803",
"0.4919597",
"0.49126065",
"0.49079686",
"0.49019235",
"0.4897153",
"0.48941743",
"0.489385",
"0.4893542",
"0.4887606",
"0.48725978",
"0.48668334",
"0.48668334",
"0.48668334",
"0.48668334",
"0.48668334",
"0.48639256",
"0.48618174",
"0.48480693",
"0.48459798",
"0.48386365",
"0.48316708",
"0.4829841",
"0.48171955",
"0.48111773",
"0.48049682",
"0.47812882",
"0.4770473",
"0.47666508",
"0.47527012",
"0.47502553",
"0.47471473",
"0.47469062",
"0.47461954",
"0.4732506",
"0.4732212",
"0.47285202",
"0.47244507",
"0.47236654",
"0.47218063",
"0.47037092",
"0.4697327",
"0.46961755",
"0.4682703",
"0.4681235",
"0.46748456",
"0.46744707",
"0.46668565",
"0.46659356",
"0.46646804",
"0.46619025",
"0.46533075",
"0.46495068",
"0.46482855",
"0.46472925",
"0.46472925",
"0.46434817",
"0.4629407",
"0.46277556",
"0.4615588",
"0.46055773",
"0.45957723",
"0.45896474",
"0.4589262",
"0.4586613",
"0.45821655",
"0.4573448",
"0.4572574"
] | 0.7282038 | 0 |
Returns zero, since PK caching is not feasible with OpenBase PK generation mechanism. | public int getPkCacheSize() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int newPrimaryKey( )\n {\n int nKey;\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n\n daoUtil.executeQuery( );\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 ) + 1;\n }\n else\n {\n // If the table is empty\n nKey = 1;\n }\n\n daoUtil.free( );\n\n return nKey;\n }",
"private Integer newPrimaryKey( )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n daoUtil.executeQuery( );\n Integer nKey = null;\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 );\n }\n else\n {\n nKey = 1;\n }\n daoUtil.close( );\n\n return nKey.intValue( );\n }",
"public java.lang.Long _pk()\n {\n return (java.lang.Long)i_pk();\n }",
"public abstract long mo20901UQ();",
"private int newPrimaryKey( Plugin plugin )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin );\n daoUtil.executeQuery( );\n\n int nKey;\n\n if ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n daoUtil.free( );\n\n return nKey;\n }",
"public Object generalPK() {\n\t\treturn null;\r\n\t}",
"public int getKey() {\n\t\treturn 0;\n\t}",
"private String generatePrimaryKey(Connection conn, String tableName) {\n String returnValue = null;\n String existingPkValue = null;\n String nextPkValue = null;\n\n try {\n existingPkValue = sql.selectKeyValueFromLastUsedKey(conn, tableName);\n\n if (existingPkValue == null) {\n System.out.println(\"Last used key value is NULL\");\n return null;\n }\n // remove first 1 alphabetic characters from this\n String prefix = existingPkValue.substring(0, 1);\n String existingPkValueWithPrefixStripped = existingPkValue.substring(1);\n\n // get number of characters in lastUsedId\n int completeLength = existingPkValueWithPrefixStripped.length();\n\n // convert lastUsedId into number\n int existingIdNum = 0;\n existingIdNum = Integer.parseInt(existingPkValueWithPrefixStripped.trim());\n\n // add 1 to this number\n int nextIdNum = existingIdNum + 1;\n\n // convert this number back to String\n String nextId = String.valueOf(nextIdNum);\n int newLength = nextId.length();\n // depending on the number of characters calculated initially,\n int zeroes = completeLength - newLength;\n // prefix Zeros accordingly to this String\n for (int i = 1; i <= zeroes; i++) {\n nextId = \"0\" + nextId;\n }\n\n // add the 4 character alphabetic prefix to this string\n nextPkValue = prefix + nextId;\n\n // update the system_last_used_id table\n sql.updateLastUsedPrimaryKeyValue(conn, tableName, nextPkValue);\n returnValue = nextPkValue;\n } catch (NumberFormatException ex) {\n System.out.println(\"generatePrimaryKey: \" + ex.getMessage());\n }\n return returnValue;\n\n }",
"@Override\r\n public int hashCode() {\n int key=(Integer)(this.capsule.get(0)); // Get the key\r\n Integer bkey=Integer.parseInt(Integer.toBinaryString(key)); // Convert into binary \r\n int n=setcount(bkey); //counts the number of 1's in the binary\r\n key=key*n + Objects.hashCode(this.capsule.get(0)); //multiplies that with the hashcode of the pId\r\n return key;\r\n }",
"@Test\n\tpublic void hashCodeNullSequenceNumber() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(LONG_ZERO);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}",
"public Object generatePkForDbEntity(DataNode node, DbEntity entity)\n throws Exception {\n // check for binary pk\n Object binPK = binaryPK(entity);\n if (binPK != null) {\n return binPK;\n }\n return new Integer(pkFromDatabase(node, entity));\n }",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"private int getInitializable() {\n for (int i = 0; i < K; i++) {\n if (!isInitialized[i]) {\n return i;\n }\n }\n return -1;\n }",
"long getLastPersistenceKeyCount();",
"private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }",
"public Integer nextPK() throws DatabaseException {\n log.debug(\"Model nextPK Started\");\n Connection conn = null;\n int pk = 0;\n try {\n conn = JDBCDataSource.getConnection();\n PreparedStatement pstmt = conn\n .prepareStatement(\"SELECT MAX(ID) FROM ST_COURSE\");\n ResultSet rs = pstmt.executeQuery();\n while (rs.next()) {\n pk = rs.getInt(1);\n }\n rs.close();\n\n } catch (Exception e) {\n log.error(\"Database Exception..\", e);\n throw new DatabaseException(\"Exception : Exception in getting PK\");\n } finally {\n JDBCDataSource.closeConnection(conn);\n }\n log.debug(\"Model nextPK End\");\n return pk + 1;\n }",
"@Override\n public int loadAutoID() {\n return 0;\n }",
"private Long cachedPkValue(String ename) {\n\t\tStack s = cacheStack(ename);\n\t\tif (s.empty()) {\n\t\t\tsynchronized (s) {\n\t\t\t\tif (s.empty()) {\n\t\t\t\t\tfillPkCache(s, ename);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tLong pkValue = (Long) s.pop();\n\t\treturn pkValue;\n\t}",
"@Test\n public void testGetPK() {\n System.out.println(\"getPK\");\n Regime instance = r1;\n int expResult = 1;\n int result = instance.getPK();\n assertEquals(expResult, result);\n }",
"@Override\n public int hashCode() {\n int i;\n int result = 17;\n i = getIdacquirente();\n result = 37*result + i;\n return result;\n }",
"public int newPrimaryKey( Plugin plugin )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin );\n daoUtil.executeQuery( );\n\n int nKey;\n\n if ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n daoUtil.free( );\n\n return nKey;\n }",
"public int hashCode() {\n long hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getProjectName());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getDataProvider());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getPrimaryInvestigator());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getCreatedBy());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getCreatedTime());\n return (int)(hash % Integer.MAX_VALUE);\n }",
"protected int pkFromDatabase(DataNode node, DbEntity entity) throws Exception {\n String sql = generatePkForDbEntityString(entity);\n QueryLogger.logQuery(QueryLogger.DEFAULT_LOG_LEVEL, sql, Collections.EMPTY_LIST);\n\n Connection con = node.getDataSource().getConnection();\n try {\n Statement st = con.createStatement();\n try {\n\n ResultSet rs = st.executeQuery(sql);\n try {\n //Object pk = null;\n if (!rs.next()) {\n throw new CayenneRuntimeException(\n \"Error generating pk for DbEntity \" + entity.getName());\n }\n return rs.getInt(1);\n }\n finally {\n rs.close();\n }\n }\n finally {\n st.close();\n }\n }\n finally {\n con.close();\n }\n }",
"@Override\n public String getNewId()throws DVDLibraryPersistenceException{\n \n int intId = 0;\n for (String key : dvds.keySet()){\n if (Integer.valueOf(key) > intId){\n intId = Integer.valueOf(key);\n }\n }\n return String.valueOf(intId + 1);\n }",
"@Override\n public int hashCode() {\n \n final int code = 24;\n int result = 1;\n result = code * result + ((id == null) ? 0 : id.hashCode());\n return result;\n }",
"public int newPrimaryKey( Plugin plugin)\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK , plugin );\n daoUtil.executeQuery( );\n\n int nKey = 1;\n\n if( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 ) + 1;\n }\n\n daoUtil.free();\n\n return nKey;\n }",
"public long getClassPK() {\n return classPK;\n }",
"@Test\n\tpublic void hashCodeNullID() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setId(LONG_ZERO);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}",
"public int getKeyNumber()\r\n {\r\n return number_of_key;\r\n }",
"public int getGeneratedKey() {\n\n throw new RuntimeException(\"This method is only valid for insert commands\");\n }",
"protected long getLastUID() throws Exception {\n\t\tif(psmt != null) {\n\t\t\tResultSet rs = psmt.getGeneratedKeys();\n\t\t\tif(rs.next())\n\t\t\t\treturn rs.getLong(1);\n\t\t}\n\t\treturn -1L;\n\t}",
"@Override\r\n\t public int hashCode()\r\n\t {\n\t final int PRIME = 31;\r\n\t int result = 1;\r\n\t result = (int) (PRIME * result + (getId()==null?\r\n\t \t\tgetName().hashCode()\r\n\t \t\t:getName().hashCode()+getId()));\r\n\t return result;\r\n\t }",
"public int newPrimaryKey( Plugin plugin )\n {\n \tint nKey;\n \t\n \ttry ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin ) )\n \t{\n \t\tdaoUtil.executeQuery( );\n \t\t\n \t\tif ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n \t}\n\n return nKey;\n }",
"public int getTotalKeyLength() {\n return this.primaryKeyLength + this.secondaryKeyLength;\n }",
"public int newPrimaryKey( Plugin plugin )\r\n {\r\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin );\r\n daoUtil.executeQuery( );\r\n\r\n int nKey;\r\n\r\n daoUtil.next( );\r\n\r\n nKey = daoUtil.getInt( 1 ) + 1;\r\n daoUtil.free( );\r\n\r\n return nKey;\r\n }",
"public long key()\n\t\t{\n\t\t\treturn nid.key();\n\t\t}",
"Object getNextRuntimeId() throws PersistenceException;",
"public IEntityPK getPK() {\r\n\treturn this.pk;\r\n }",
"public int keyId() {\n return keyId;\n }",
"public int verifyPKAuthKeys(String pk, int id) throws SQLException {\n String sql = \"SELECT COUNT(*) AS count FROM authenticatedkeys WHERE publickey = ? AND id_user = ?\";\n\n try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) {\n pstmt.setString(1, pk);\n pstmt.setInt(2, id);\n ResultSet rs = pstmt.executeQuery();\n int value = rs.getInt(\"count\");\n return value;\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n return 0;\n }\n }",
"public Long getObjectKey()\n\t{\n\t\treturn objectKey;\n\t}",
"public abstract int getCntPrepaid();",
"public boolean hasPrimaryKeyValue() {\r\n return false;\r\n }",
"public boolean hasPrimaryKeyValue() {\r\n return false;\r\n }",
"public boolean hasPrimaryKeyValue() {\r\n return false;\r\n }",
"long getNoId();",
"long nextUniqueKey() throws IOException;",
"protected Long obtainObjectKey(Object obj)\n\t{\n\t\tif(obj instanceof GoodUnit)\n\t\t\treturn ((GoodUnit)obj).getPrimaryKey();\n\t\treturn null;\n\t}",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n String[] stringArray0 = new String[20];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \" = \", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"PRIMARY KEY (, , , , , , , , , , , , , , , , , , , )\", string0);\n }",
"public int generateId(){\n return repository.getCount()+1;\n }",
"@Test\n public void setPrimaryKey_length_good_case_min()\n {\n // Arrange\n String key = \"0123456789012345\";\n SymmetricKey symmetricKey = new SymmetricKey();\n // Act\n symmetricKey.setPrimaryKeyFinal(key);\n // Assert\n assertEquals(key, Deencapsulation.getField(symmetricKey, \"primaryKey\"));\n }",
"int getProductKey();",
"private int genKey()\n {\n return (nameValue.getData() + scopeDefined.getTag()).hashCode();\n }",
"public long getKeyID()\n {\n return keyID;\n }",
"@Test\n\tpublic void getSequenceNumberTest() {\n\t\tAssert.assertEquals(DEFAULT_SEQUENCE, getDefaultKey().getId());\n\t}",
"public int allocate_map() {\r\n\t\tp_id = new int[idSize];\r\n\t\tif (p_id == null)\r\n\t\t\treturn -1;\r\n\t\telse\r\n\t\t\treturn 1;\r\n\t}",
"@Test\n\tpublic void equalsNullSequenceNumber() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(LONG_ZERO);\n\t\tboolean equals = key1.equals(key2);\n\t\tAssert.assertFalse(equals);\n\t}",
"PrimaryKey createPrimaryKey();",
"public int hashCode()\n { \n \tint result = 17;\n \t\n \tresult = 37 * result + id;\n \tresult = 37 * result + room.hashCode();\n \tresult = 37 * result + ( isLocked ? 1 : 0 );\n \tresult = 37 * result + keyID; \t\n \t\n \treturn result;\n }",
"public final int getKeyId()\r\n\t{\r\n\t\treturn keyId;\r\n\t}",
"@Override\n\tpublic long getLastSavedId() throws SQLException {\n\t\treturn 0;\n\t}",
"int getUniquesNumber() throws SQLException;",
"Key getPrimaryKey();",
"@Test\n public void testSetPK() {\n System.out.println(\"setPK\");\n int pk = 5;\n Regime instance = r1;\n instance.setPK(pk);\n int result=instance.getPK();\n int expResult=5;\n assertEquals(expResult, result);\n }",
"public int generateKey() {\n SecureRandom secureRandom = new SecureRandom();\n try {\n secureRandom = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return secureRandom.nextInt(26);\n }",
"public int getUserKey() {\r\n\t\tif(email!=null&&password!=null) {\r\n\t\t\treturn (email.hashCode()+password.hashCode())/2;\r\n\t\t}else if(email!=null||password!=null) {\r\n\t\t\tif(email!=null) {\r\n\t\t\t\treturn email.hashCode();\r\n\t\t\t}else {\r\n\t\t\t\treturn password.hashCode();\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}",
"@NonNegative int javaId();",
"private long getInitId() {\n if (self.getQuorumVerifier().getVotingMembers().containsKey(self.getMyId())) {\n return self.getMyId();\n } else {\n return Long.MIN_VALUE;\n }\n }",
"@Override\n public int hashCode() {\n return ASNID;\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n String[] stringArray0 = new String[6];\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"NestedRawReadOnlyUserTransaction\");\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"getRowId(int)\", true, stringArray0);\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"CONSTRAINT getRowId(int) PRIMARY KEY (, , , , , )\", string0);\n }",
"boolean isPrimaryKey();",
"public int getAlgorithm()\n {\n return publicPk.getAlgorithm();\n }",
"@java.lang.Override\n public long getIfGenerationNotMatch() {\n return ifGenerationNotMatch_;\n }",
"int getClusteringKeyCount();",
"public abstract long mo9746k();",
"protected long getUniqueLong(FieldDescriptor field) throws SequenceManagerException\n {\n return ++tempKey;\n }",
"@Override\n public long generateNewContractId() {\n return idCounter++;\n }",
"public long getClassPK() {\n\t\treturn _dataset.getDatasetId();\n\t}",
"@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime\n * result\n + ((electionStatus == null) ? 0 : electionStatus.ordinal() + 10);\n result = prime * result + followerCount;\n result = prime * result + (int) (latestTxId ^ (latestTxId >>> 32));\n result = prime * result + onDiskTx;\n return result;\n }",
"@Test\n\tpublic void hashCodeDifferentSequenceNumber() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(2);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _state.getPrimaryKey();\n\t}",
"int getKey();",
"int getKey();",
"int getKeySize();",
"public int getExtendedID()\r\n/* 50: */ {\r\n/* 51: 39 */ return 0;\r\n/* 52: */ }",
"private static int nextInstanceID()\n {\n return baseID.incrementAndGet();\n }",
"public double getPk()\n {\n return this.pk;\n }",
"public int genID() {\n int uid = this.hashCode();\n if (uid < 0) {\n uid = Math.abs(uid);\n uid = uid * 15551;\n }\n return uid;\n }",
"private com.hps.july.persistence.SuperRegionAccKey keyFromFields ( int f0 ) {\n com.hps.july.persistence.SuperRegionAccKey keyClass = new com.hps.july.persistence.SuperRegionAccKey();\n keyClass.accessid = f0;\n return keyClass;\n }",
"@java.lang.Override\n public long getIfGenerationNotMatch() {\n return ifGenerationNotMatch_;\n }",
"@Override\n\tprotected int precomputeAlgoId() {\n\t\treturn Objects.hash(getClass().getName(), height, width, this.precision.name()) * 31 + 1;\n\t}",
"@Test\n public void setPrimaryKey_length_good_case_max()\n {\n // Arrange\n String key = \"0123456789012345678901234567890123456789012345678901234567890123\";\n SymmetricKey symmetricKey = new SymmetricKey();\n // Act\n symmetricKey.setPrimaryKeyFinal(key);\n // Assert\n assertEquals(key, Deencapsulation.getField(symmetricKey, \"primaryKey\"));\n }",
"public String getMinKey();",
"private int nextValidID() {\n return nextId++;\n }",
"public int hashCode()\n {\n int i = 0;\n if ( hasId() )\n i ^= getId().hashCode();\n return i;\n }",
"public int hashCode()\n {\n int i = 0;\n if ( hasId() )\n i ^= getId().hashCode();\n return i;\n }",
"public int hashCode()\n {\n int i = 0;\n if ( hasId() )\n i ^= getId().hashCode();\n return i;\n }",
"public int hashCode()\n {\n int i = 0;\n if ( hasId() )\n i ^= getId().hashCode();\n return i;\n }",
"public int hashCode()\n {\n int i = 0;\n if ( hasId() )\n i ^= getId().hashCode();\n return i;\n }"
] | [
"0.6622296",
"0.65902203",
"0.63699466",
"0.62617594",
"0.62421566",
"0.6199392",
"0.61778283",
"0.6109868",
"0.6060332",
"0.60244256",
"0.59938866",
"0.5983866",
"0.5983866",
"0.59685075",
"0.59676",
"0.59270346",
"0.59100753",
"0.5906859",
"0.58676434",
"0.58624583",
"0.582584",
"0.5820323",
"0.5796414",
"0.5788435",
"0.57717276",
"0.5754951",
"0.5754419",
"0.5746412",
"0.5744901",
"0.57337105",
"0.57162064",
"0.5714671",
"0.5701471",
"0.56891614",
"0.56816906",
"0.56733644",
"0.5673325",
"0.5671085",
"0.56646425",
"0.56593144",
"0.5655569",
"0.5647148",
"0.5630627",
"0.5622233",
"0.5622233",
"0.5622233",
"0.56165147",
"0.5607478",
"0.56055814",
"0.55932117",
"0.5588492",
"0.558489",
"0.5583574",
"0.5580892",
"0.5569618",
"0.5569505",
"0.5564412",
"0.55614585",
"0.5559175",
"0.5543456",
"0.55410856",
"0.55357355",
"0.5533754",
"0.5527581",
"0.55208856",
"0.5517924",
"0.5515989",
"0.55077875",
"0.55022",
"0.5500721",
"0.5497974",
"0.549655",
"0.5486352",
"0.54854363",
"0.5482506",
"0.5476866",
"0.54761815",
"0.5474079",
"0.54734784",
"0.54725444",
"0.5468486",
"0.54649466",
"0.5460776",
"0.5460776",
"0.54554754",
"0.54521835",
"0.5447172",
"0.54439986",
"0.5439609",
"0.54314655",
"0.5422424",
"0.5418955",
"0.5418772",
"0.54158664",
"0.5415128",
"0.5404078",
"0.5404078",
"0.5404078",
"0.5404078",
"0.5404078"
] | 0.63400674 | 3 |
noop, no PK caching | public void setPkCacheSize(int pkCacheSize) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getNoId();",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"@Override\n public int loadAutoID() {\n return 0;\n }",
"public Object generalPK() {\n\t\treturn null;\r\n\t}",
"Object getPrimaryKey() throws IllegalStateException;",
"private void fillPkCache(Stack s, String ename) {\n\t\tLong pkValueStart = getNextPkValueForEntityIncreaseBy(ename, 10, increaseBy());\n\t\tlong value = pkValueStart.longValue();\n\t\tlog.debug(\"filling pkCache for {}, starting at {}\", ename, value);\n\t\tfor (int i = increaseBy(); i > 0; i--) {\n\t\t\ts.push(Long.valueOf(i + value));\n\t\t}\n\t}",
"@Override\n\tpublic Object getPrimaryKey() {\n\t\treturn null;\n\t}",
"private Long cachedPkValue(String ename) {\n\t\tStack s = cacheStack(ename);\n\t\tif (s.empty()) {\n\t\t\tsynchronized (s) {\n\t\t\t\tif (s.empty()) {\n\t\t\t\t\tfillPkCache(s, ename);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tLong pkValue = (Long) s.pop();\n\t\treturn pkValue;\n\t}",
"@Test\n public void newInstanceHasNoPrimaryKey() {\n BatchStepExecution model = new BatchStepExecution();\n assertThat(model.isIdSet()).isFalse();\n }",
"@Override\n\tpublic Object objId() {\n\t\treturn null;\n\t}",
"@Test\n public void newInstanceHasNoPrimaryKey() {\n TdPicture model = new TdPicture();\n assertFalse(model.isIdSet());\n }",
"public int getPkCacheSize() {\n return 0;\n }",
"private Integer newPrimaryKey( )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n daoUtil.executeQuery( );\n Integer nKey = null;\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 );\n }\n else\n {\n nKey = 1;\n }\n daoUtil.close( );\n\n return nKey.intValue( );\n }",
"@Override\n\tpublic User findByKey(Integer id) {\n\t\treturn null;\n\t}",
"@Test\n\tpublic void hashCodeNullID() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setId(LONG_ZERO);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}",
"@PreInsert\n public void onBeforeInsert() {\n if (this.key == null) {\n this.key = UUID.randomUUID();\n }\n onBeforeUpdate();\n }",
"T getByPk(int key) throws PersistException;",
"@Override\n\tprotected Model fetchOne(int id) {\n\t\treturn null;\n\t}",
"@Cacheable(value=\"netTest.questionCache\", key=\"'WareDao.selectByPK~ware:'+#pk\", unless=\"#result==null\")\n public Ware selectByPK(Long pk){\n \tif(pk==null)\n \t\treturn null;\n\t\tWare record = (Ware) this.queryForObject(\"Ware.selectByPK\", pk);\n\t\t// build assoic for cache\n\t\tif(record!=null){\n \t CacheSynchronizer.getInstance().buildAssoc(\"netTest.questionCache\", \n \t\t\t \"WareDao.selectByPK~\"+Ware.ObjectType+\":\"+pk);\n \t}\n\t\treturn record;\n }",
"@Override\n\tpublic void baja(Integer pk) {\n\t\t\n\t}",
"@Override\n\tpublic TestPoEntity selectById(Integer pk) {\n\t\treturn null;\n\t}",
"@Override\r\n public K firstKey() {\n return null;\r\n }",
"private int newPrimaryKey( )\n {\n int nKey;\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n\n daoUtil.executeQuery( );\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 ) + 1;\n }\n else\n {\n // If the table is empty\n nKey = 1;\n }\n\n daoUtil.free( );\n\n return nKey;\n }",
"@Test\n\tpublic void getIdTest() {\n\t\tAssert.assertEquals(DEFAULT_ID, getDefaultKey().getId());\n\t}",
"public abstract T byId(ID id);",
"@Override\n\tpublic boolean isPersistent() {\n\t\treturn id != -1;\n\t}",
"PrimaryKey createPrimaryKey();",
"T load(PK id);",
"O obtener(PK id) throws DAOException;",
"private int newPrimaryKey( Plugin plugin )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK, plugin );\n daoUtil.executeQuery( );\n\n int nKey;\n\n if ( !daoUtil.next( ) )\n {\n // if the table is empty\n nKey = 1;\n }\n\n nKey = daoUtil.getInt( 1 ) + 1;\n daoUtil.free( );\n\n return nKey;\n }",
"@Override\n\tpublic final void beforeExecutions() throws CacheException {\n\t\tif ( persister.hasCache() ) {\n\t\t\tfinal CollectionRegionAccessStrategy cache = persister.getCacheAccessStrategy();\n\t\t\tfinal Object ck = cache.generateCacheKey(\n\t\t\t\t\tkey,\n\t\t\t\t\tpersister,\n\t\t\t\t\tsession.getFactory(),\n\t\t\t\t\tsession.getTenantIdentifier()\n\t\t\t);\n\t\t\tfinal SoftLock lock = cache.lockItem( session, ck, null );\n\t\t\t// the old behavior used key as opposed to getKey()\n\t\t\tafterTransactionProcess = new CacheCleanupProcess( key, persister, lock );\n\t\t}\n\t}",
"@Override\n public String getCacheId() {\n //no hash on boolean...only parameter so no hash is needed.\n return Boolean.toString(shouldIfail);\n }",
"Object getNextRuntimeId() throws PersistenceException;",
"void evictFromCache( Long id );",
"public boolean hasPrimaryKeyValue() {\r\n return false;\r\n }",
"public boolean hasPrimaryKeyValue() {\r\n return false;\r\n }",
"public boolean hasPrimaryKeyValue() {\r\n return false;\r\n }",
"@Cacheable(value = DEMO_CACHE_NAME)\r\n\t@Override\r\n\tpublic User selectByPrimaryKey(Integer id) {\n\t\tSystem.err.println (\"没有走缓存!\" + id);\r\n\t\treturn userDao.selectByPrimaryKey(id);\r\n\t}",
"@Override\n\tprotected String insertInner(KeyCacheObjectTest obj) throws DaoManagerException {\n\t\treturn null;\n\t}",
"@Test\r\n public void testGetUUIDItemTypeFromCache() {\n assertEquals(new Long(1), queries.getUUIDItemTypeId(\"patient\"));\r\n getSimpleJdbcTemplate().update(\"delete from uuid_item_type where xml_name like 'patient'\");\r\n //make sure the entry is not in the database\r\n assertEquals(0, (getSimpleJdbcTemplate().queryForList(\" select * from uuid_item_type where xml_name like 'patient'\")).size());\r\n // Read it from cache\r\n assertEquals(new Long(1), queries.getUUIDItemTypeId(\"patient\"));\r\n }",
"public static void resetGeneratedKeyIndex()\n\t{\n\t\tgeneratedKeyIndex = 0;\n\t}",
"@Id\n\t@Key\n\t@Override\n\tpublic void setId(String id)\n\t{\n\t\tsuper.setId(id);\n\t}",
"@Override\n\tpublic String getPkVal() {\n\t\treturn null;\n\t}",
"public DatasetParameterPK() {\n }",
"public void withWhiteCompoundPk() {\n _query.xdoNss(() -> _query.queryWhiteCompoundPk());\n }",
"private Integer getUniqueId(Object object) {\n/* 89 */ Integer id = this.idCache.get(object);\n/* 90 */ if (id == null) {\n/* 91 */ id = Integer.valueOf(this.uidGenerator.incrementAndGet());\n/* 92 */ Integer existing = this.idCache.putIfAbsent(object, id);\n/* 93 */ if (existing != null) {\n/* 94 */ return existing;\n/* */ }\n/* */ } \n/* 97 */ return id;\n/* */ }",
"public DBMaker disableCacheAutoClear(){\n this.autoClearRefCacheOnLowMem = false;\n return this;\n }",
"@Override\r\n\tprotected void buildPrimaryKeys(final DatabaseTable table) throws SQLException {\r\n\t\tif (views.contains(table)) {\r\n\t\t\t// buildPrimaryKeysOfView(table);\r\n\t\t} else {\r\n\t\t\tbuildPrimaryKeysOfTable(table);\r\n\t\t}\r\n\t}",
"public Object casePrimaryKey(PrimaryKey object) {\r\n\t\treturn null;\r\n\t}",
"protected Long obtainObjectKey(Object obj)\n\t{\n\t\tif(obj instanceof GoodUnit)\n\t\t\treturn ((GoodUnit)obj).getPrimaryKey();\n\t\treturn null;\n\t}",
"@Override\n protected void onNullNonKeyAttribute(String attributeName) {\n /* When doing a force put, we can safely ignore the null-valued attributes. */\n return;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"public boolean isPersistentId() {\n return usePersistentId;\n }",
"@Transactional\n@Repository\n@RepositoryDefinition(domainClass = SvnUser.class, idClass = Integer.class)\npublic interface SvnUserRepository extends JpaRepository<SvnUser, Integer> {\n\n @Cacheable(value=\"svnUser\", key=\"#p0\")\n SvnUser findOne(Integer id);\n\n @Cacheable(value=\"svnUser\", key=\"#p0\")\n List<SvnUser> findAll();\n\n boolean exists(Integer id);\n\n @CacheEvict(value=\"svnUser\", key=\"#p0.id\")\n SvnUser save(SvnUser svnUser);\n\n}",
"@Test\n\tpublic void hashCodeNullSequenceNumber() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(LONG_ZERO);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}",
"private void generateObjIdIfRequired(T obj) {\n Field idField = Arrays.stream(entityClass.getDeclaredFields())\n .filter(f -> f.isAnnotationPresent(Id.class) &&\n f.isAnnotationPresent(GeneratedValue.class) &&\n f.getType().equals(Long.TYPE)) //Refers to primitive type long\n .findFirst().orElse(null);\n \n if(idField == null) return;\n\n try {\n idField.setAccessible(true);\n idField.set(obj, idCounter);\n idField.setAccessible(false);\n idCounter++;\n } catch (IllegalAccessException e) {\n throw new DBException(\"Problem generating and setting id of object: \" + entityClass.getSimpleName() + \" : \" + obj.toString(), e);\n }\n\n }",
"public int getId(){\r\n return localId;\r\n }",
"@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic void cacheResult(Legacydb legacydb) {\n\t\tEntityCacheUtil.putResult(LegacydbModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\tLegacydbImpl.class, legacydb.getPrimaryKey(), legacydb);\n\n\t\tlegacydb.resetOriginalValues();\n\t}",
"public void runTest() throws PersistenceException, SQLException {\n testExpireCache(BY_OBJECT_IDENTITY);\n testExpireCache(BY_TYPE_OR_CLASS);\n }",
"public java.lang.Long _pk()\n {\n return (java.lang.Long)i_pk();\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"public void clearAllNotClientCacheKeyOrDatabaseKey() {\n\t}",
"@Override\r\n\tprotected void loadUniqueIndexMap(TestBooking entiy) {\n\t\t\r\n\t}",
"boolean isPrimaryKey();",
"Key getPrimaryKey();",
"@Override\n\tpublic BaseEntity getByPk(BaseEntity entity) throws DaoException {\n\t\treturn null;\n\t}",
"@Override\n public void resetObjectId() {\n }",
"@Override\n public int hashCode() {\n return (id == null) ? 0 : id.hashCode();\n }",
"private void clearObjId() {\n \n objId_ = 0;\n }",
"private void clearObjId() {\n \n objId_ = 0;\n }",
"private void clearObjId() {\n \n objId_ = 0;\n }",
"private void clearObjId() {\n \n objId_ = 0;\n }",
"private void clearObjId() {\n \n objId_ = 0;\n }",
"private void clearObjId() {\n \n objId_ = 0;\n }",
"@Override\n public String getKey()\n {\n return id; \n }",
"public void setPk(double pk)\n {\n this.pk = pk;\n }",
"@Cacheable(cacheNames = {\"emp\"}/*,keyGenerator = \"myKeyGenerator\"*/)\n public Employee getEmp(Integer id){\n Employee empById = employeeMapper.getEmpById(id);\n System.out.println(\"id\"+id+\"开始查询了\");\n return empById;\n }",
"@Test\n public void simpleAPINoGenericsAndNoTypeEnforcementStoreByReference() {\n\n MutableConfiguration config = new MutableConfiguration().setStoreByValue(false);\n Cache cache = cacheManager.createCache(cacheName, config);\n Identifier2 one = new Identifier2(\"1\");\n\n //can put different things in\n cache.put(one, \"something\");\n cache.put(pistachio.getName(), pistachio);\n cache.put(tonto.getName(), tonto);\n cache.put(bonzo.getName(), bonzo);\n cache.put(juno.getName(), juno);\n cache.put(talker.getName(), talker);\n\n try {\n cache.put(skinny.getName(), skinny);\n } catch(Exception e) {\n //not serializable expected\n }\n //can get them out\n Identifier2 one_ = new Identifier2(\"1\");\n Assert.assertEquals(one, one_);\n Assert.assertEquals(one.hashCode(), one_.hashCode());\n assertNotNull(cache.get(one_));\n assertNotNull(cache.get(one));\n assertNotNull(cache.get(pistachio.getName()));\n\n //can remove them\n assertTrue(cache.remove(one));\n assertTrue(cache.remove(pistachio.getName()));\n }",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _state.getPrimaryKey();\n\t}",
"public ParametroPorParametroPK() {\r\n\t}",
"@Override\n\tprotected String insertInner(String id, KeyCacheObjectTest obj)\n\t\t\tthrows DaoManagerException {\n\t\treturn null;\n\t}",
"FetchFirst createFetchFirst();",
"public abstract long mo20901UQ();",
"public static void resetId() {\r\n nextid=1;\r\n }",
"T findById(long pk);",
"public abstract long getId();",
"public abstract long getId();",
"public void cacheableQuery() throws HibException;",
"public abstract Long getId();",
"public long getNoId() {\n return noId_;\n }",
"@Test\n public void testRandomAccessSameCache()\n {\n doStressTest(\"IdxTestRASC\", getCacheName0(), getCacheName0(),\n IdentityExtractor.INSTANCE,\n new CompositeKeyCreator()\n {\n public CompositeKey getCompositeKey(Object oKeyNatural, NamedCache cache)\n {\n return new CompositeKey(oKeyNatural, Base.getRandom().nextInt(20));\n }\n },\n /*nServers*/1, /*cRollingRestart*/0);\n }"
] | [
"0.6448528",
"0.637548",
"0.637548",
"0.63523144",
"0.61977696",
"0.61239475",
"0.60707957",
"0.6058207",
"0.5931009",
"0.5916291",
"0.59134257",
"0.59076345",
"0.5893105",
"0.58894545",
"0.58234346",
"0.58105046",
"0.5780563",
"0.57467335",
"0.5734798",
"0.57284933",
"0.57085997",
"0.57043153",
"0.5676935",
"0.5670639",
"0.5660416",
"0.5649552",
"0.5632874",
"0.56227034",
"0.5617031",
"0.56092936",
"0.5597731",
"0.558566",
"0.5584003",
"0.5569263",
"0.5558843",
"0.55396724",
"0.55396724",
"0.55396724",
"0.5539497",
"0.5527306",
"0.55203533",
"0.55093735",
"0.5496521",
"0.5485597",
"0.5480535",
"0.5473546",
"0.5460469",
"0.5460282",
"0.5458594",
"0.5458362",
"0.544277",
"0.54382193",
"0.5424689",
"0.5410212",
"0.53920865",
"0.5391484",
"0.5386416",
"0.538362",
"0.53653705",
"0.53635573",
"0.5356049",
"0.5352686",
"0.5351286",
"0.5351286",
"0.5351286",
"0.5351286",
"0.5351286",
"0.5351286",
"0.5351286",
"0.5351258",
"0.5350764",
"0.5349996",
"0.5349341",
"0.5349183",
"0.5347932",
"0.5346804",
"0.5341601",
"0.5341601",
"0.5341601",
"0.5341601",
"0.5341601",
"0.5341601",
"0.5338392",
"0.5336816",
"0.53324723",
"0.53278685",
"0.5323083",
"0.5323083",
"0.5322781",
"0.5315198",
"0.53114915",
"0.5311067",
"0.53098065",
"0.53066194",
"0.5303535",
"0.53003675",
"0.53003675",
"0.5299633",
"0.52989024",
"0.52983737",
"0.52958065"
] | 0.0 | -1 |
Dummy constructor, do not touch! | private TrapdoorMixin(int i, Material m) {
super(i, m);
throw new AssertionError("Don't touch my dummy constructors");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"defaultConstructor(){}",
"void DefaultConstructor(){}",
"private Instantiation(){}",
"Reproducible newInstance();",
"public Constructor(){\n\t\t\n\t}",
"private SingleObject()\r\n {\r\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public Basic() {}",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}",
"private Default()\n {}",
"private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }",
"private SingleObject(){}",
"public Pitonyak_09_02() {\r\n }",
"public Spec__1() {\n }",
"private void __sep__Constructors__() {}",
"public CyanSus() {\n\n }",
"private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }",
"public Method() {\n }",
"public SgaexpedbultoImpl()\n {\n }",
"public CSSTidier() {\n\t}",
"private MApi() {}",
"private Util()\n {\n // Empty default ctor, defined to override access scope.\n }",
"public Pleasure() {\r\n\t\t}",
"public Clade() {}",
"protected TestBench() {}",
"private Mocks() { }",
"protected abstract void construct();",
"private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}",
"public lo() {}",
"private TMCourse() {\n\t}",
"private Node() {\n\n }",
"private XMLUtils()\r\n\t{\r\n\t}",
"private SystemInfo() {\r\n // forbid object construction \r\n }",
"public Chick() {\n\t}",
"private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}",
"public Soil()\n\t{\n\n\t}",
"private Mth()\n\t{\n\t\tthrow new AssertionError();\n\t}",
"public Parser()\n {\n //nothing to do\n }",
"@SuppressWarnings(\"unused\")\n public Item() {\n }",
"private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}",
"private Helper() {\r\n // empty\r\n }",
"private Cat() {\n\t\t\n\t}",
"protected SimpleMatrix() {}",
"public Orbiter() {\n }",
"private Utility() {\n\t}",
"public AllDifferent()\n {\n this(0);\n }",
"private ATCres() {\r\n // prevent to instantiate this class\r\n }",
"public Person()\n {\n //intentionally left empty\n }",
"public Person() {\n\t\t\n\t}",
"private GeoUtil()\n\t{\n\t}",
"private Helper() {\r\n // do nothing\r\n }",
"public Data() {}",
"public Sad() {\n }",
"public Generic(){\n\t\tthis(null);\n\t}",
"DummyCanvas() {\n super(null);\n // super(null); ----------------ADDED TO COMPILE -----------------------------------------\n }",
"private WebXmlIo()\n {\n // Voluntarily empty constructor as utility classes should not have a public or default\n // constructor\n }",
"private Source() {\n throw new AssertionError(\"This class should not be instantiated.\");\n }",
"public God() {}",
"public native void constructor();",
"public Hacker() {\r\n \r\n }",
"public Test() {\n }",
"public C23317d() {\n }",
"@Override\r\n\tpublic void init() {}",
"public static void copyConstructor(){\n\t}",
"@SuppressWarnings(\"unused\")\r\n private Rental() {\r\n }",
"public Test()\n {\n }",
"public D() {}",
"public Demo() {\n\t\t\n\t}",
"public StubPrivateConstructorPair() {\r\n this(null, null);\r\n }",
"public _355() {\n\n }",
"public ObjectFactory() {\n\t}",
"public AbstractT153()\n {\n }",
"public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }",
"public ObjectFactory() {\r\n\t}",
"public PSRelation()\n {\n }",
"public void testConstructor1() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n }",
"public Fun_yet_extremely_useless()\n {\n\n }",
"public TestUser() {//NOPMD\n }",
"public Demo3() {}",
"public SpeakerSerivceImpl() {\n\t\tSystem.out.println(\"No args in constructor\");\n\t}",
"private ObjectFactory() { }",
"private XMLUtil() {\n\t}",
"public TTau() {}",
"private Marinator() {\n }",
"private Marinator() {\n }",
"private XmlFactory() {\r\n /* no-op */\r\n }",
"private IndexBitmapObject() {\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"private Converter()\n\t{\n\t\tsuper();\n\t}",
"public Pasien() {\r\n }",
"@Override\n public void init() {}",
"protected SAXParser() {\n // Does nothing.\n }",
"public Self__1() {\n }",
"private Utils()\n {\n // Private constructor to prevent instantiation\n }",
"private UnitFactory() {\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private NullSafe()\n {\n super();\n }"
] | [
"0.79357916",
"0.7669513",
"0.7625426",
"0.7601775",
"0.7480165",
"0.74145913",
"0.7392558",
"0.7379585",
"0.7265748",
"0.72209346",
"0.720279",
"0.7185301",
"0.71674615",
"0.7161922",
"0.7141212",
"0.71343917",
"0.7100272",
"0.70884883",
"0.70462036",
"0.7036192",
"0.7017683",
"0.70126474",
"0.6996034",
"0.69937485",
"0.69915235",
"0.6978065",
"0.697555",
"0.69628793",
"0.6961624",
"0.69512194",
"0.6940786",
"0.69371295",
"0.69271684",
"0.6913347",
"0.69129324",
"0.69089144",
"0.68953556",
"0.68908334",
"0.6876328",
"0.68689775",
"0.6852223",
"0.6846931",
"0.68445164",
"0.6836048",
"0.6833122",
"0.6827128",
"0.6824327",
"0.68189067",
"0.6815591",
"0.681223",
"0.6812134",
"0.6807744",
"0.6805917",
"0.6802668",
"0.67952317",
"0.6795138",
"0.679097",
"0.6784601",
"0.6782487",
"0.6780015",
"0.6776965",
"0.67763627",
"0.6773442",
"0.67703485",
"0.6767556",
"0.6763792",
"0.6758099",
"0.6753797",
"0.6741922",
"0.6739487",
"0.67371124",
"0.67244494",
"0.67196804",
"0.67173004",
"0.67168206",
"0.6716754",
"0.671634",
"0.67144036",
"0.6714237",
"0.6713677",
"0.6713632",
"0.6711868",
"0.6711125",
"0.6708951",
"0.67075235",
"0.6705847",
"0.6705279",
"0.6701503",
"0.6701503",
"0.67011243",
"0.6700494",
"0.6695439",
"0.6691501",
"0.66905373",
"0.6687111",
"0.6686161",
"0.6685532",
"0.6684217",
"0.6682493",
"0.6680964",
"0.6676122"
] | 0.0 | -1 |
/ We have two methods here, allowPlacementOnTransparent, and allowUnsupportedPlacement. The first redirects the call to canSuffocate so that canPlaceAt will allow placement on nonsolid blocks. The second one saves the return value of canPlaceAt so we know if the vanilla placement code should run instead of our new code. | @Redirect(method="canPlaceAt(Lnet/minecraft/level/Level;IIII)Z", at=@At(value = "INVOKE", target = "Lnet/minecraft/level/Level;canSuffocate(III)Z"))
private boolean allowPlacementOnTransparent(Level level, int x, int y, int z) { return true; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testPlaceIllegalTile1() {\n Placement placement = new Placement(Color.GREEN, 0, 0, Color.BLUE, 1, 1);\n try {\n \t\tboard.place(placement);\n fail(\"It's not legal to put tile without any adjacent occupied cells\");\n } catch (StateException e) {\n // passed\n }\n catch (ContractAssertionError e) {\n \tSystem.out.println(\"ContractAssertionError\");\n }\n \t\n }",
"public void testPlaceIllegalTile2() {\n \tPlacement placement = new Placement(Color.GREEN, 5, 25, Color.BLUE, 4, 20);\n try {\n \tboard.place(placement);\n fail(\"It's not legal to put tile on occupied cells\");\n } catch (ContractAssertionError e) {\n // passed\n }\n }",
"public void testPlaceIllegalTile3() {\n \tPlacement placement = new Placement(Color.GREEN, 4, 20, Color.BLUE, 3, 16);\n try {\n \tboard.place(placement);\n \tfail(\"It's not legal to put tile that does not contain adjacent cells\");\n } catch (ContractAssertionError e) {\n // passed\n }\n }",
"@EventHandler\n public void onPlace(BlockPlaceEvent e) {\n if(!Utility.isFrozen(e.getPlayer())) return;\n\n // cancel movement if frozen\n e.setCancelled(true);\n e.getPlayer().sendMessage(Utility.colorize(\"&a&lVanquil &8>> &cYou can not do that while frozen\"));\n }",
"public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)\n {\n return par1World.isBlockNormalCubeDefault(par2 - 1, par3, par4, true) ? true : (par1World.isBlockNormalCubeDefault(par2 + 1, par3, par4, true) ? true : (par1World.isBlockNormalCubeDefault(par2, par3, par4 - 1, true) ? true : (par1World.isBlockNormalCubeDefault(par2, par3, par4 + 1, true) ? true : this.canPlaceTorchOn(par1World, par2, par3 - 1, par4))));\n }",
"@Override\n\tpublic boolean canPlaceBlockAt(World world, int x, int y, int z) {\n\t\t//int currentID = world.getBlockId(x, y, z);\n\t\treturn (world.isAirBlock(x, y, z));\n\t}",
"public boolean canPlaceBlockAt(World world, int x, int y, int z)\n\t {\n\t boolean b = y >= world.getHeight() - 1;\n\t \n\t\t\tboolean solidBottom = doesBlockHaveSolidBottomSurface(world, x, y, z);\n\t\t\tboolean placeable = super.canPlaceBlockAt(world, x, y-1, z) && super.canPlaceBlockAt(world, x, y-2, z);\n\t\t\treturn b ? false : solidBottom && placeable;\n\t }",
"public boolean canPlaceEntity() {\n boolean blocked = this.mapCoordinatesForEntityToPlace.stream().anyMatch(c -> c.placeableState == PlaceableState.BLOCKED);\n if (blocked) return false;\n\n return this.mapCoordinatesForEntityToPlace.stream().anyMatch(c -> c.placeableState == PlaceableState.PLACEABLE);\n }",
"public abstract boolean actualPlace(int row, int col);",
"@EventHandler(priority = EventPriority.HIGH)\n public void onAttemptPlaceInterfereBlocks(BlockPlaceEvent event) {\n if (event.isCancelled()) return;\n Block block = event.getBlock();\n Player player = event.getPlayer();\n if (player.hasPermission(\"lockettepro.admin.interfere\")) return;\n if (LocketteProAPI.mayInterfere(block, player)) {\n Utils.sendMessages(player, Config.getLang(\"cannot-interfere-with-others\"));\n event.setCancelled(true);\n Utils.playAccessDenyEffect(player, block);\n }\n }",
"@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)\n\tpublic void onPlaceBlock(BlockPlaceEvent e) {\n\t\tBlock block = e.getBlock();\n\n\t\tMaterial blockMaterial = block.getType();\n\t\tint x = block.getX();\n\t\tint y = block.getY();\n\t\tint z = block.getZ();\n\t\tWorldChunk chunk = CropControl.getDAO().getChunk(block.getChunk());\n\n\t\tif (CropControl.getDAO().isTracked(block) == true) {\n\t\t\t// We've got a replacement\n\t\t\tCropControl.getPlugin().debug(\"Ghost object? Placement is overtop a tracked object at {0}, {1}, {2}\", x, y, z);\n\t\t\thandleRemoval(block, chunk);\n\t\t}\n\t\tif (harvestableCrops.containsKey(blockMaterial)) {\n\t\t\t// we placed a block overtop an existing crop. Will be handled by a break event?\n\t\t\t/*Crop crop = chunk.getCrop(x, y, z);\n\t\t\tif (crop != null) {\n\t\t\t\tcrop.setRemoved();\n\t\t\t\tCropControl.getPlugin().debug(\"Missed an event? Replacing a Crop at {0}, {1}, {2}\", x, y, z);\n\t\t\t\t//return;\n\t\t\t}*/\n\t\t\t\n\t\t\t// We've placed a crop!\n\t\t\tCrop.create(chunk, x, y, z, blockMaterial.toString(), getBaseCropState(blockMaterial),\n\t\t\t\t\te.getPlayer().getUniqueId(), System.currentTimeMillis(), harvestableCrops.get(blockMaterial));\n\t\t} else if (blockMaterial == Material.SAPLING) {\n\t\t\t// we placed a block overtop an existing sapling. TODO: Do I need to remove sapling here, or will there be a break event?\n\t\t\t/*Sapling sapling = chunk.getSapling(x, y, z);\n\t\t\tif (sapling != null) {\n\t\t\t\tsapling.setRemoved();\n\t\t\t\tCropControl.getPlugin().debug(\"Missed an event? Replacing a Sapling at {0}, {1}, {2}\", x, y, z);\n\t\t\t\t//return;\n\t\t\t}*/\n\t\t\t// We've placed a sapling!\n\t\t\tSapling.create(chunk, x, y, z, getSaplingType(block.getData()),\n\t\t\t\t\te.getPlayer().getUniqueId(), System.currentTimeMillis(), false);\n\t\t} else if (blockMaterial == Material.CHORUS_FLOWER) {\n\t\t\t/*if (CropControl.getDAO().isTracked(block) == true) {\n\t\t\t\tCropControl.getPlugin().debug(\"Ghost object? Placement is overtop a tracked object at {0}, {1}, {2}\", x, y, z);\n\t\t\t\t//return;\n\t\t\t}*/\n\t\t\t\n\t\t\t// TODO: Check if connected to an existing chorus tree.\n\n\t\t\t// First register the \"tree\"\n\t\t\tTree chorusPlant = Tree.create(chunk, x, y, z, Material.CHORUS_PLANT.toString(),\n\t\t\t\t\te.getPlayer().getUniqueId(), System.currentTimeMillis());\n\n\t\t\t// Then the component in the tree.\n\t\t\tTreeComponent.create(chorusPlant, chunk, x, y, z, Material.CHORUS_PLANT.toString(),\n\t\t\t\t\te.getPlayer().getUniqueId(), false);\n\t\t} else if (blockMaterial.isSolid()){ // check for cactus.\n\t\t\tfor (BlockFace face : CropControlEventHandler.directions) {\n\t\t\t\tBlock adj = block.getRelative(face);\n\t\t\t\tif (Material.CACTUS == adj.getType()) {\n\t\t\t\t\tLocation loc = adj.getLocation();\n\t\t\t\t\tif (!pendingChecks.contains(loc)) {\n\t\t\t\t\t\tpendingChecks.add(loc);\n\t\t\t\t\t\thandleBreak(adj, BreakType.PLAYER, e.getPlayer().getUniqueId(), null);\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean place(boolean isWhite, boolean isWall, boolean isCapstone, Point point){\n // START CONDITIONS\n //----------------\n // Is the space empty that we are trying to place\n if(getStack(point).size() > 0) return false;\n // Is the player trying to place the opponet's piece post turn 2\n // if(isWhite != whiteTurn) return false;\n // // Is the player trying to move their piece during the first 2 turns\n // if(firstTwoTurnCounter < 2){\n // if(isWhite != !whiteTurn) return false;\n // }\n\n // Checks to see if the player has the piece to place\n if(whiteTurn && isCapstone && isWhite && (whiteCapPool == 0)){return false;}\n if(whiteTurn && isWhite && (whitePool == 0)){return false;}\n if(!whiteTurn && isCapstone && !isWhite && (blackCapPool == 0)){return false;}\n if(!whiteTurn && !isWhite && (blackCapPool == 0)){return false;}\n\n //----------------\n // END CONDITIONS\n\n // Valid - move start operation\n // Add new piece to the stack\n getStack(point).add(new TakPiece(isWhite, isWall, isCapstone));\n // Switch the player's turn\n switchPlayer();\n // Increment the firstTwoTurnCounter if it's the first 2 turns\n if(firstTwoTurnCounter < 2) firstTwoTurnCounter++;\n // Remove the piece placed from the pool\n if(isWhite && isCapstone){whiteCapPool--;}\n else if(isWhite){whitePool--;}\n\n if(!isWhite & isCapstone){blackCapPool--;}\n else if(!isWhite){blackPool--;}\n\n turn++;\n return true;\n }",
"public void testPlaceNormalTile2() {\n \tPlacement placement1 = new Placement(Color.GREEN, 5, 26, Color.BLUE, 5, 27);\n \tPlacement placement2 = new Placement(Color.GREEN, 5, 19, Color.BLUE, 5, 18);\n \t\n try {\n \t\tboard.place(placement1);\n \t\tboard.place(placement2);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n \t\n Placement placement3 = new Placement(Color.GREEN, 4, 20, Color.BLUE, 4, 21);\n Score score3 = null;\n try {\n \t\tscore3 = board.calculate(placement3);\n \t\tboard.place(placement3);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n Score expected3 = new Score();\n expected3.setValue(Color.BLUE, 1);\n expected3.setValue(Color.GREEN, 3);\n assertEquals(expected3, score3);\n \n Placement placement4 = new Placement(Color.GREEN, 4, 19, Color.BLUE, 3, 15);\n Score score4 = null;\n try {\n \t\tscore4 = board.calculate(placement4);\n \t\tboard.place(placement4);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n Score expected4 = new Score();\n expected4.setValue(Color.BLUE, 2);\n expected4.setValue(Color.GREEN, 4);\n assertEquals(expected4, score4);\n }",
"public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) {\n\t\tint var5 = par1World.getBlockId(par2, par3 - 1, par4);\n\t\t\n\t\tif (var5 == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tBlock block = Block.blocksList[var5];\n\t\treturn Block.sand.blockID == var5 || block.isOpaqueCube() == true;\n\t}",
"public interface IModifiablePlacement {\n\t\n\t/**\n\t * Get the placements priority.\n\t * @return The placements priority.\n\t */\n\tpublic Priority getPriority();\n\n\t/**\n\t * Set the placements priority.\n\t * @param priority The placements priority.\n\t */\n\tpublic void setPriority(Priority priority);\n\t\n\t/**\n\t * Get the placements container.\n\t * @return The placements container.\n\t */\n\tpublic Container getContainer();\n\t\n\t/**\n\t * Get the state of the placements.\n\t * @return The state of the placements.\n\t */\n\tpublic IPlacementState getState();\n\t\n\t/**\n\t * Get the placements underlay.\n\t * @return The placements underlay.\n\t */\n\tpublic PlacementUnderlay getUnderlay();\n\t\n\t/**\n\t * Set the placements underlay.\n\t * @param underlay The placements underlay.\n\t */\n\tpublic void setUnderlay(PlacementUnderlay underlay);\n\t\n\t/**\n\t * Get the placements overlay.\n\t * @return The placements overlay.\n\t */\n\tpublic PlacementOverlay getOverlay();\n\t\n\t/**\n\t * Set the placements overlay.\n\t * @param overlay The placements overlay.\n\t */\n\tpublic void setOverlay(PlacementOverlay overlay);\n\t\n\t/**\n\t * Mark this placement for deletion.\n\t */\n\tpublic void MarkForDeletion();\n}",
"public void testPlaceNormalTile() {\n \tPlacement placement1 = new Placement(Color.GREEN, 5, 26, Color.BLUE, 5, 27);\n \tPlacement placement2 = new Placement(Color.GREEN, 5, 19, Color.BLUE, 5, 18);\n \t\n try {\n \t\tboard.place(placement1);\n \t\tboard.place(placement2);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n \n Placement placement3 = new Placement(Color.GREEN, 4, 15, Color.BLUE, 3, 12);\n Score score = null;\n try {\n \t\tscore = board.calculate(placement3);\n \t\tboard.place(placement3);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n Score expected = new Score();\n expected.setValue(Color.BLUE, 1);\n expected.setValue(Color.GREEN, 1);\n assertEquals(expected, score);\n }",
"public boolean placementDone() {return placedShips == 4;}",
"boolean isPlaced();",
"private void cp2PlaceShips(){\n\t\tint start = 5, stop = 9, orientation;\n\t\tboolean placed;\n\n\t\tfor(int x = start; x <= stop; x++){\n\t\t\tplaced = false;\n\n\t\t\twhile(!placed)\n\t\t\t{\n\t\t\t\tranX = ranNum.nextInt(600);\n\t\t\t\tranY = ranNum.nextInt(600);\n\t\t\t\torientation = ranNum.nextInt(2);\n\t\t\t\tplaced = true;\n\n\t\t\t\tships[x] = new Ship(x, shipNames[x], 'H', shipPlayer[x], shipWidth[x], shipHeight[x], ranX, ranY, shipSize[x]);\n\t\t\t\tships[x].setLocation(ships[x].getX(), ships[x].getY());\n\t\t\t\tships[x].setSize(ships[x].getWidth(), ships[x].getHeight());\n\n\t\t\t\tif(orientation == 1){\n\t\t\t\t\tchangeOrientation(x);\n\t\t\t\t}\n\n\t\t\t\tif(ships[x].getX() + ships[x].getWidth() < boardTwo.getWidth() && ships[x].getY() + ships[x].getHeight() < boardTwo.getHeight()){\n\t\t\t\t\tfor(int y = start; y < x; y++){\n\t\t\t\t\t\tif(ships[x].getBounds().intersects(ships[y].getBounds())){\n\t\t\t\t\t\t\tplaced = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tplaced = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tboardTwo.add(ships[x]);\n\t\t}\n\t}",
"public void testPlaceFirstTile2() {\n \tPlacement placement1 = new Placement(Color.GREEN, 5, 26, Color.BLUE, 5, 27);\n Score score1 = null;\n try {\n \t\tscore1 = board.calculate(placement1);\n \t\tboard.place(placement1);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n assertEquals(1, (int)score1.get(Color.GREEN));\n assertEquals(0, (int)score1.get(Color.BLUE));\n \n Placement placement2 = new Placement(Color.GREEN, 5, 24, Color.BLUE, 5, 23);\n Score score2 = null;\n try {\n \t\tscore2 = board.calculate(placement2);\n \t\tboard.place(placement2);\n \t\tfail(\"It's not legal to place a first turn tile adjacent to the same starting hexagon as another player\");\n } catch (ContractAssertionError e) {\n //passed\n }\n }",
"public boolean isPlaceable() {\n\t\tlong now = Calendar.getInstance().getTimeInMillis();\t\t\n\t\treturn now - createTime >= placeableThreshold && \n\t\t\t\tnow - focusTime >= placeableThreshold;\n\t}",
"public void testPlaceFirstTile1() {\n \tPlacement placement1 = new Placement(Color.GREEN, 5, 26, Color.BLUE, 5, 27);\n Score score1 = null;\n try {\n \t\tscore1 = board.calculate(placement1);\n \t\tboard.place(placement1);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n assertEquals(1, (int)score1.get(Color.GREEN));\n assertEquals(0, (int)score1.get(Color.BLUE));\n \n Placement placement2 = new Placement(Color.GREEN, 5, 28, Color.BLUE, 4, 22);\n Score score2 = null;\n try {\n \t\tscore2 = board.calculate(placement2);\n \t\tboard.place(placement2);\n \t\tfail(\"It's not legal to place a first turn tile adjacent to another player's tile\");\n } catch (ContractAssertionError e) {\n //passed\n }\n }",
"public boolean checkCanBePlaced(int x, int y, int id) {\n\t\tint old = id(x, y);\n\t\tblocks[i(x, y)] = id;\n\t\tBlock test = getBlock(x, y);\n\n\t\tif(getBlock(x, y + 1).canBePlaced(Direction.DOWN, id, x, y + 1, this) && test.canBePlaced(Direction.UP, id(x, y + 1), x, y, this)) {\n\t\t\tblocks[i(x, y)] = old;\n\t\t\treturn true;\n\t\t}\n\n\t\tif(getBlock(x, y - 1).canBePlaced(Direction.UP, id, x, y - 1, this) && test.canBePlaced(Direction.DOWN, id(x, y - 1), x, y, this)) {\n\t\t\tblocks[i(x, y)] = old;\n\t\t\treturn true;\n\t\t}\n\n\t\tif(getBlock(x + 1, y).canBePlaced(Direction.LEFT, id, x + 1, y, this) && test.canBePlaced(Direction.RIGHT, id(x + 1, y), x, y, this)) {\n\t\t\tblocks[i(x, y)] = old;\n\t\t\treturn true;\n\t\t}\n\n\t\tif(getBlock(x - 1, y).canBePlaced(Direction.RIGHT, id, x - 1, y, this) && test.canBePlaced(Direction.LEFT, id(x - 1, y), x, y, this)) {\n\t\t\tblocks[i(x, y)] = old;\n\t\t\treturn true;\n\t\t}\n\n\t\tblocks[i(x, y)] = old;\n\t\treturn false;\n\t}",
"private boolean placeNear(Organism parent) {\n\t\tint nPos = Utils.random.nextInt(8);\n\t\t// Try to put it in any possible position, starting from a randomly chosen one.\n\t\tfor (int nSide = 0; nSide < 8; nSide++) {\n\t\t\t// Calculate candidate position\n\t\t\t_dCenterX = parent._dCenterX + (parent.width / 2 + width / 2+ 1) * Utils.side[nPos][0]; \n\t\t\t_dCenterY = parent._dCenterY + (parent.height / 2 + height / 2 + 1) * Utils.side[nPos][1];\n\t\t\t_centerX = (int) _dCenterX;\n\t\t\t_centerY = (int) _dCenterY;\n\t\t\tcalculateBounds(true);\n\t\t\t// Check this position is inside the world.\n\t\t\tif (isInsideWorld()) {\n\t\t\t\t// Check that it doesn't overlap with other organisms.\n\t\t\t\tif (_world.fastCheckHit(this) == null) {\n\t\t\t\t\tif (parent._geneticCode.getDisperseChildren()) {\n\t\t\t\t\t\tdx = Utils.side[nPos][0];\n\t\t\t\t\t\tdy = Utils.side[nPos][1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdx = parent.dx;\n\t\t\t\t\t\tdy = parent.dy;\n\t\t\t\t\t}\n\t\t\t\t\t// Generate an identification\n\t\t\t\t\t_ID = _world.getNewId();\n\t\t\t\t\t// Substract the energy from the parent\n\t\t\t\t\tparent._energy -= _energy;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnPos = (nPos + 1) % 8;\n\t\t}\n\t\t// It can't be placed.\n\t\treturn false;\n\t}",
"public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) {\n\t\tint l = 0;\n\n\t\tif (par1World.getBlock(par2 - 1, par3, par4) == this) {\n\t\t\t++l;\n\t\t}\n\n\t\tif (par1World.getBlock(par2 + 1, par3, par4) == this) {\n\t\t\t++l;\n\t\t}\n\n\t\tif (par1World.getBlock(par2, par3, par4 - 1) == this) {\n\t\t\t++l;\n\t\t}\n\n\t\tif (par1World.getBlock(par2, par3, par4 + 1) == this) {\n\t\t\t++l;\n\t\t}\n\n\t\treturn l > 1 ? false : (this.isThereANeighborChest(par1World, par2 - 1, par3, par4) ? false : (this.isThereANeighborChest(par1World, par2 + 1, par3,\n\t\t\t\tpar4) ? false : (this.isThereANeighborChest(par1World, par2, par3, par4 - 1) ? false : !this.isThereANeighborChest(par1World, par2, par3,\n\t\t\t\tpar4 + 1))));\n\t}",
"@Test\r\n public void testBuildingPlaceOverlap(){\r\n BetterHelper h = new BetterHelper();\r\n LoopManiaWorld world = h.testWorld;\r\n \r\n world.loadCard(\"ZombiePitCard\");\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 0, 0));\r\n assertFalse(world.canPlaceBuilding(\"ZombiePitCard\", 1, 1));\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 0, 1));\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 1, 0));\r\n assertFalse(world.canPlaceBuilding(\"ZombiePitCard\", 5, 5));\r\n }",
"protected boolean canBePlaced(List2D<Cell> cells, RoomConfig config, IntVector2 place) {\n List<IntVector2> coords = getRoomCoordinates(config, place);\n for (IntVector2 coord : coords) {\n Cell cell = cells.get(coord.x, coord.y);\n // If cell is outside of the grid, it cannot be placed\n if (cell == null) {\n return false;\n }\n if (cell.get(RoomCellFactory.USED, false)) {\n return false;\n }\n }\n return true;\n }",
"public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)\r\n/* 171: */ {\r\n/* 172:193 */ if (par9 < 12) {\r\n/* 173:194 */ return ForgeDirection.OPPOSITES[par5] + par9 & 0xF;\r\n/* 174: */ }\r\n/* 175:196 */ return par9 & 0xF;\r\n/* 176: */ }",
"@Override\n\tpublic boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint i = worldObj.getFirstUncoveredBlock(par1, par2);\n\t\tif (i == 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn Block.blocksList[i].blockMaterial.blocksMovement();\n\t\t}\n\t}",
"protected void onBlockPlace(BlockPlaceEvent event) {\n\t}",
"@Test\n public void canMoveTest() {\n assertTrue(cp1.canMove(5, 3));\n assertTrue(cp1.canMove(1, 5));\n assertTrue(cp2.canMove(4, 6));\n assertTrue(cp2.canMove(6, 5));\n\n assertFalse(cp1.canMove(0, 5));\n assertFalse(cp1.canMove(3, 4));\n assertFalse(cp2.canMove(2, 6));\n assertFalse(cp2.canMove(7, 4));\n }",
"public boolean allowMove(Point p, int pos);",
"@EventHandler (priority = EventPriority.MONITOR)\n\tvoid onBlockPlace(BlockPlaceEvent event)\n\t{\n\t\tPlayer player = event.getPlayer();\n\t\t\n\t\t//Record the time placed so that placing cooldowns can be implemented.\n\t\tevent.getBlock().setMetadata(\"timeplaced\", new FixedMetadataValue(plugin, System.currentTimeMillis()));\n\t\t\n\t\t//Check if the block is contained within the config\n\t\tSet<String> configBlocks;\n\t\tint exp = 0;\n\t\tString professionReq = null;\n\t\tString tierReq = null;\n\t\t\n\t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n\t\t\n\t\tfor(String p: prof.getProfessions())\n\t\t\tfor (String t: prof.getTiers())\n\t\t\t{\n\t\t\t\ttry { configBlocks = config.getConfigurationSection(\"placeBlocks.\" + p + \".\" + t).getKeys(false); }\n\t\t\t\tcatch (NullPointerException e)\n\t\t\t\t{ continue; }\n\t\t\t\t\n\t\t\t\tfor (String b: configBlocks)\n\t\t\t\t\tif (event.getBlock().getType().toString().equalsIgnoreCase(b))\n\t\t\t\t\t{\n\t\t\t\t\t\texp = config.getInt(\"placeBlocks.\" + p + \".\" + t + \".\" + b);\n\t\t\t\t\t\tprofessionReq = p;\n\t\t\t\t\t\ttierReq = t;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t//If not found, nothing to do here.\n\t\tif (professionReq == null || tierReq == null)\n\t\t\treturn;\n\t\t\n\t\t//If the player doesn't have at least the tier, cancel the event.\t\t\n\t\tif (!prof.hasTier(professionReq, tierReq))\n\t\t{\n\t\t\tplayer.sendMessage(ChatColor.RED + \"You aren't skilled enough to place that!\");\n\t\t\tevent.setCancelled(true);\n\t\t}\n\t\t//Otherwise award some experience\n\t\telse if (!prof.isPracticeFatigued(professionReq))\n\t\t\taddExperience(player, professionReq, exp);\n\t}",
"public abstract boolean canMoveTo(Case Location);",
"boolean isColPlacementValid(List<Integer> colPlacement) {\n\t\tint lastRowIndex = colPlacement.size() - 1;\n\t\t\n\t\tfor (int i = 0; i < colPlacement.size() - 1; i++) {\n\t\t\tif (colPlacement.get(i) == colPlacement.get(lastRowIndex) || \n\t\t\t\t\tMath.abs(colPlacement.get(lastRowIndex) - colPlacement.get(i)) == lastRowIndex - i) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private boolean canAttack(Piece p, Location loc)\n {\n int thisRow = getLocation(p).getRow();\n int thisCol = getLocation(p).getCol();\n int otherRow = loc.getRow();\n int otherCol = loc.getCol();\n int rowDiff = Math.abs(otherRow-thisRow);\n int colDiff = Math.abs(otherCol-thisCol);\n switch (p.getType())\n {\n case PAWN:\n return rowDiff==1&&colDiff==1 &&\n ((p.white()&&otherRow<thisRow)||(!p.white()&&otherRow>thisRow));\n \n case KING:\n return adjacent(getLocation(p),loc);\n \n case KNIGHT:\n return rowDiff>0 && colDiff>0 && rowDiff+colDiff==3;\n \n //rook, bishop, queen are identical, except for their preconditions\n case ROOK:case BISHOP:case QUEEN:\n if ((p.getType()==Type.ROOK&&rowDiff>0&&colDiff>0)\n ||(p.getType()==Type.BISHOP&&rowDiff!=colDiff)\n ||(p.getType()==Type.QUEEN&&rowDiff>0&&colDiff>0&&rowDiff!=colDiff))\n return false;\n Location next = getLocation(p).closerTo(loc);\n while (!next.equals(loc))\n {\n if (getPiece(next)!=null) //checks for piece in the way\n return false;\n next = next.closerTo(loc);\n }\n return true;\n }\n return false; //will never happen because all piece types covered\n }",
"@EventHandler(priority = EventPriority.HIGHEST)\n public void onPlace(final BlockPlaceEvent event) {\n this.phoenyx.getItemRegister().getItem(event.getItemInHand()).ifPresent(item -> {\n if (!item.isPlaceable()) {\n event.setCancelled(true);\n }\n });\n }",
"boolean isZOrderable();",
"public boolean isValidPlacementSpot() {\n return isEmpty() && ! getNeighbours().stream().allMatch(Spot::isEmpty);\n }",
"@Nonnull\n @Override\n public EnumActionResult onItemUse(@Nonnull EntityPlayer player, World world, @Nonnull BlockPos pos, EnumHand hand, @Nonnull EnumFacing facing, float hitX, float hitY, float hitZ) {\n // don't place the slab if unable to edit\n ItemStack stack = player.getHeldItem(hand);\n if(stack.getCount() != 0 && player.canPlayerEdit(pos.offset(facing), facing, stack)) {\n\n // try placing the slab at the current position\n // note that this requires the slab to be extended on the side the block was clicked\n if(tryPlace(player, stack, world, pos, facing)) {\n return EnumActionResult.SUCCESS;\n }\n // otherwise. try and place it in the block in front\n else if(this.tryPlace(player, stack, world, pos.offset(facing), null)) {\n return EnumActionResult.SUCCESS;\n }\n\n return super.onItemUse(player, world, pos, hand, facing, hitX, hitY, hitZ);\n }\n else {\n return EnumActionResult.FAIL;\n }\n }",
"public abstract boolean canMove();",
"public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_)\n {\n int var7 = ((MathHelper.floor_double((double)(p_149689_5_.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3) + 2) % 4;\n p_149689_1_.setBlock(p_149689_2_, p_149689_3_ + 1, p_149689_4_, this, 8 | var7, 2);\n }",
"protected boolean shouldMoveTo(World worldIn, BlockPos pos)\n {\n Block block = worldIn.getBlockState(pos).getBlock();\n\n if (block == Blocks.FARMLAND)\n {\n pos = pos.up();\n IBlockState iblockstate = worldIn.getBlockState(pos);\n block = iblockstate.getBlock();\n\n if (block instanceof BlockCrops && this.wantsToReapStuff && (this.currentTask == 0 || this.currentTask < 0))\n {\n this.currentTask = 0;\n return true;\n }\n\n }\n\n return false;\n }",
"public void setPlacementMode(boolean newMode) {\r\n this.placementMode = newMode;\r\n }",
"@EventHandler(priority = EventPriority.MONITOR)\n public void onPlaceFirstBlockNotify(BlockPlaceEvent event) {\n if (event.isCancelled()) return;\n Block block = event.getBlock();\n Player player = event.getPlayer();\n if (!player.hasPermission(\"lockettepro.lock\")) return;\n if (Utils.shouldNotify(player) && Config.isLockable(block.getType())) {\n switch (Config.getQuickProtectAction()) {\n case (byte) 0 -> Utils.sendMessages(player, Config.getLang(\"you-can-manual-lock-it\"));\n case (byte) 1, (byte) 2 -> Utils.sendMessages(player, Config.getLang(\"you-can-quick-lock-it\"));\n }\n }\n }",
"public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {\n/* 94 */ IBlockState iblockstate = worldIn.getBlockState(pos.offset(facing.getOpposite()));\n/* */ \n/* 96 */ if (iblockstate.getBlock() == Blocks.END_ROD) {\n/* */ \n/* 98 */ EnumFacing enumfacing = (EnumFacing)iblockstate.getValue((IProperty)FACING);\n/* */ \n/* 100 */ if (enumfacing == facing)\n/* */ {\n/* 102 */ return getDefaultState().withProperty((IProperty)FACING, (Comparable)facing.getOpposite());\n/* */ }\n/* */ } \n/* */ \n/* 106 */ return getDefaultState().withProperty((IProperty)FACING, (Comparable)facing);\n/* */ }",
"interface Place {\n\n\t// Return the adjacent Place in the given direction\n\tpublic Place goNorth();\n\tpublic Place goSouth();\n\tpublic Place goEast();\n\tpublic Place goWest();\n\n\t// Returns true only for the special \"Wall\" place\n\tpublic boolean isWall();\n\n\t// Returns true only for the special \"Cheese\" place\n\tpublic boolean isCheese();\n}",
"@Override\r\n\tpublic boolean canMove() {\r\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic boolean onValidSurface()\n\t{\n\t\tif (!this.worldObj.getCollidingBoundingBoxes(this, this.getEntityBoundingBox()).isEmpty())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint i = Math.max(1, this.blocksToTakeUp());\n\t\t\tint j = Math.max(1, this.blocksToTakeUp());\n\t\t\tBlockPos blockpos = this.hangingPosition.offset(this.facingDirection.getOpposite());\n\t\t\tEnumFacing enumfacing = this.facingDirection.rotateYCCW();\n\n\t\t\tfor (int k = -i / 2 + 1; k < i / 2 + 1; ++k)\n\t\t\t{\n\t\t\t\tfor (int l = -j / 2 + 1; l < j / 2 + 1; ++l)\n\t\t\t\t{\n\t\t\t\t\tBlockPos blockpos1 = blockpos.offset(enumfacing, k).up(l);\n\t\t\t\t\tBlock block = this.worldObj.getBlockState(blockpos1).getBlock();\n\n\t\t\t\t\tif (block.isSideSolid(this.worldObj, blockpos1, this.facingDirection))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tif (!block.getMaterial().isSolid() && !BlockRedstoneDiode.isRedstoneRepeaterBlockID(block))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (Entity entity : this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.getEntityBoundingBox()))\n\t\t\t{\n\t\t\t\tif (entity instanceof EntityHanging)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t}",
"private boolean canPlaceTorchOn(World par1World, int par2, int par3, int par4)\n {\n if (par1World.doesBlockHaveSolidTopSurface(par2, par3, par4))\n {\n return true;\n }\n else\n {\n int var5 = par1World.getBlockId(par2, par3, par4);\n return var5 == Block.fence.blockID || var5 == Block.netherFence.blockID || var5 == Block.glass.blockID;\n }\n }",
"public void testPlaceFirstTile3() {\n \tPlacement placement = new Placement(Color.GREEN, 5, 26, Color.BLUE, 5, 27);\n Score score = null;\n try {\n \t\tscore = board.calculate(placement);\n \t\tboard.place(placement);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n \n Score expected = new Score();\n expected.setValue(Color.GREEN, 1);\n assertEquals(expected, score);\n \n Placement placement2 = new Placement(Color.GREEN, 5, 19, Color.BLUE, 5, 18);\n Score score2 = null;\n try {\n \t\tscore2 = board.calculate(placement2);\n \t\tboard.place(placement2);\n } catch (ContractAssertionError e) {\n fail(e.getMessage());\n }\n Score expected2 = new Score();\n expected2.setValue(Color.RED, 1);\n assertEquals(expected2, score2);\n }",
"boolean canBuildBlock(Tile t);",
"private boolean isPlaceCommand(Command command) {\r\n return command instanceof PlaceCommand;\r\n }",
"boolean testPlaceAllShips(Tester t) {\n return t.checkExpect(this.los3.placeAll(this.em),\n em.placeImageXY(ship1.draw(), 0, 150).placeImageXY(ship2.draw(), 50, 50)\n .placeImageXY(ship3.draw(), 50, 50))\n && t.checkExpect(this.mt.placeAll(this.em), this.em);\n }",
"public boolean isPlaced() {\n return isPlaced;\n }",
"protected boolean isCheckBlockable(Piece.PieceColorOptions playerColor) {\n Coordinate[] coordinatesToBlock;\n Coordinate kingCoordinate, oppCoordinate, allyCoordinate;\n int blockCounter, diffX, diffY, spacesToVerify, xIncrement, yIncrement;\n\n coordinatesToBlock = new Coordinate[VERTICAL_BOARD_LENGTH];\n kingCoordinate = getKingCoordinate(playerColor);\n oppCoordinate = null;\n blockCounter = 0;\n\n outerloop:\n for (int i = 0; i < VERTICAL_BOARD_LENGTH; i++) {\n for (int j = 0; j < HORIZONTAL_BOARD_LENGTH; j++) {\n oppCoordinate = new Coordinate(j, i);\n if (isValidEndpoints(oppCoordinate, kingCoordinate, oppositeColor(playerColor))) {\n if (isValidPath(oppCoordinate, kingCoordinate, oppositeColor(playerColor), false)) {\n coordinatesToBlock[blockCounter] = oppCoordinate;\n blockCounter++;\n // if there is more than one piece checking the King\n // the check is not blockable\n break outerloop;\n }\n }\n }\n }\n\n diffX = subtractXCoordinates(oppCoordinate, kingCoordinate);\n diffY = subtractYCoordinates(oppCoordinate, kingCoordinate);\n xIncrement = calculateIncrement(diffX);\n yIncrement = calculateIncrement(diffY);\n spacesToVerify = Math.max(Math.abs(diffX), Math.abs(diffY)) - 1;\n\n // moving a piece to oppCoordinate capture's the opposing piece\n // only opposing Bishops, Rooks, and Queens can be blocked\n if (isValidDiagonalPath(oppCoordinate, kingCoordinate) || isValidStraightPath(oppCoordinate, kingCoordinate)) {\n for (int i = 0; i < spacesToVerify; i++) {\n Coordinate betweenCoordinate = new Coordinate(oppCoordinate);\n betweenCoordinate.addVals(xIncrement, yIncrement);\n coordinatesToBlock[blockCounter] = betweenCoordinate;\n blockCounter++;\n }\n }\n\n // loop through all Coordinates in coordinatesToBlock and see if any can block the check\n for (int i = 0; i < blockCounter; i++) {\n oppCoordinate = coordinatesToBlock[i];\n for (int j = 0; j < VERTICAL_BOARD_LENGTH; j++) {\n for (int k = 0; k < HORIZONTAL_BOARD_LENGTH; k++) {\n allyCoordinate = new Coordinate(k, j);\n if (isValidEndpoints(allyCoordinate, oppCoordinate, playerColor)) {\n if (isValidPath(allyCoordinate, oppCoordinate, playerColor, false)) {\n if (isMovePossibleWithoutCheck(allyCoordinate, oppCoordinate, playerColor, false)) {\n return true;\n }\n }\n }\n }\n }\n }\n return false;\n }",
"protected boolean shouldMoveTo(World worldIn, BlockPos pos) {\n Block block = worldIn.getBlockState(pos).getBlock();\n\n if (block == Blocks.FARMLAND) {\n pos = pos.up();\n IBlockState iblockstate = worldIn.getBlockState(pos);\n block = iblockstate.getBlock();\n\n if (block instanceof BlockCropPinto && ((BlockCropPinto) block).isMaxAge(iblockstate) && this.wantsToReapStuff && (this.currentTask == 0 || this.currentTask < 0)) {\n this.currentTask = 0;\n return true;\n }\n\n if (iblockstate.getMaterial() == Material.AIR && this.hasFarmItem && (this.currentTask == 1 || this.currentTask < 0)) {\n this.currentTask = 1;\n return true;\n }\n }\n return false;\n }",
"@EventHandler(priority = EventPriority.MONITOR)\n\tpublic void onBlockPlaceEvent(BlockPlaceEvent e) {\n\t\tif ( !e.isCancelled() )\n\t\t\tif ( e.getBlockPlaced().getType().equals(Material.DIAMOND_BLOCK) && e.getItemInHand().hasItemMeta() )\n\t\t\t\tplugin.getMarkerManager().placedNewBookmark(e);\t\t\n\t}",
"public boolean placeComputerShipsSmart(int pattern) {\n if(cpuHasPlaced){\n return false;\n }\n switch(pattern) {\n case 1:\n computerShips[0].setShip(1, 2, 1);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n computerShips[1].setShip(3, 4, 1);\n for (int j = 4; j < 8; j++){\n computerPlayerBoard[j][3] = board.ship.ordinal();\n }\n computerShips[2].setShip(5, 3, 0);\n for (int i = 3; i < 6; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n computerShips[3].setShip(4, 1, 0);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(8, 5, 1);\n for (int i = 5; i < 7; i++){\n computerPlayerBoard[i][8] = board.ship.ordinal();\n }\n\n break;\n case 2:\n computerShips[0].setShip(4, 2, 1);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[1].setShip( 6, 3, 1);\n for (int j = 3; j < 7; j++){\n computerPlayerBoard[j][6] = board.ship.ordinal();\n }\n computerShips[2].setShip( 6, 0, 0);\n for (int i = 6; i < 9; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[3].setShip( 1, 8, 0);\n for (int i = 1; i < 4; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[4].setShip( 1, 2, 1);\n for (int i = 2; i < 4; i++){\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n\n break;\n case 4:\n computerShips[0].setShip( 0, 2, 1);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[1].setShip( 8, 3, 1);\n for (int j = 3; j < 7; j++){\n computerPlayerBoard[j][8] = board.ship.ordinal();\n }\n computerShips[2].setShip( 5, 2, 1);\n for (int i = 2; i < 5; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n computerShips[3].setShip( 3, 8, 0);\n for (int i = 3; i < 6; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(0, 9, 0);\n for (int i = 0; i < 2; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n\n break;\n case 5:\n computerShips[0].setShip( 7, 5, 1);\n for (int i = 5; i < 10; i++) {\n computerPlayerBoard[i][7] = board.ship.ordinal();\n }\n computerShips[1].setShip( 1, 1, 1);\n for (int j = 1; j < 5; j++){\n computerPlayerBoard[j][1] = board.ship.ordinal();\n }\n computerShips[2].setShip( 4, 2, 0);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[3].setShip( 1, 8, 0);\n for (int i = 1; i < 4; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[4].setShip( 3, 6, 0);\n for (int i = 3; i < 5; i++){\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n\n break;\n case 6:\n computerShips[0].setShip( 3, 3, 0);\n for (int i = 3; i < 8; i++) {\n computerPlayerBoard[3][i] = board.ship.ordinal();\n }\n computerShips[1].setShip( 3, 7, 0);\n for (int j = 3; j < 7; j++){\n computerPlayerBoard[7][j] = board.ship.ordinal();\n }\n computerShips[2].setShip( 7, 4, 0);\n for (int i =7; i < 10; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n computerShips[3].setShip( 2, 5, 0);\n for (int i = 2; i < 5; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(8, 8, 0);\n for (int i = 8; i < 10; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n\n break;\n case 7:\n computerShips[0].setShip( 3, 6, 0);\n for (int i = 3; i < 8; i++) {\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(1, 2, 1);\n for (int j = 2; j < 6; j++){\n computerPlayerBoard[j][1] = board.ship.ordinal();\n }\n computerShips[2].setShip( 7, 4, 1);\n for (int i =7; i < 10; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n computerShips[3].setShip( 2, 5, 0);\n for (int i = 2; i < 5; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[4].setShip( 8, 8, 0);\n for (int i = 8; i < 10; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n\n break;\n case 8:\n computerShips[0].setShip(5, 1, 0);\n for (int i = 5; i < 10; i++) {\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[1].setShip( 7, 4, 1);\n for (int j = 4; j < 8; j++){\n computerPlayerBoard[j][7] = board.ship.ordinal();\n }\n computerShips[2].setShip( 4, 6, 1);\n for (int i =6; i < 9; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[3].setShip( 2, 4, 1);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n computerShips[4].setShip( 0, 1, 1);\n for (int i = 1; i < 3; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n\n break;\n case 9:\n computerShips[0].setShip( 5, 1, 0);\n for (int i = 5; i < 10; i++) {\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[1].setShip( 7, 4, 1);\n for (int j = 4; j < 8; j++){\n computerPlayerBoard[j][7] = board.ship.ordinal();\n }\n computerShips[2].setShip( 6, 3, 1);\n for (int i =3; i < 6; i++){\n computerPlayerBoard[i][6] = board.ship.ordinal();\n }\n computerShips[3].setShip( 0, 1, 0);\n for (int i = 0; i < 3; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[4].setShip( 5, 8, 1);\n for (int i = 8; i < 10; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n\n break;\n case 10:\n computerShips[0].setShip( 9, 3, 1);\n for (int i = 3; i < 8; i++) {\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n computerShips[1].setShip( 7, 4, 1);\n for (int j = 4; j < 8; j++){\n computerPlayerBoard[j][7] = board.ship.ordinal();\n }\n computerShips[2].setShip( 4, 6, 1);\n for (int i =6; i < 9; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n computerShips[3].setShip( 2, 4, 1);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n computerShips[4].setShip( 0, 1, 1);\n for (int i = 1; i < 3; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n\n break;\n case 11:\n //carrier\n computerShips[0].setShip( 1, 3, 0);\n for(int i = 1; i < 6; i++){\n computerPlayerBoard[3][i] = board.ship.ordinal();\n }\n //battleship\n computerShips[1].setShip(1, 6, 0);\n for(int i = 1; i < 5; i++){\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n //submarine\n computerShips[2].setShip( 5, 6, 1);\n for(int i = 6; i < 8; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n //cruiser\n computerShips[3].setShip( 1, 0, 0);\n for(int i = 1; i < 4; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n //destroyer\n computerShips[4].setShip( 7, 0, 1);\n for(int i = 0; i < 2; i++){\n computerPlayerBoard[i][7] = board.ship.ordinal();\n }\n\n break;\n case 12:\n //carrier (5)\n computerShips[0].setShip( 2, 1, 0);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n //battleship (4)\n computerShips[1].setShip( 4, 3, 1);\n for (int j = 3; j < 7; j++){\n computerPlayerBoard[j][4] = board.ship.ordinal();\n }\n //submarine (3)\n computerShips[2].setShip( 7, 3, 1);\n for (int i = 3; i < 6; i++){\n computerPlayerBoard[i][7] = board.ship.ordinal();\n }\n //cruiser (3)\n computerShips[3].setShip( 2, 9, 0);\n for (int i = 2; i < 5; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n //destroyer (2)\n computerShips[4].setShip( 1, 3, 1);\n for (int i = 3; i < 5; i++){\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n break;\n case 13:\n //carrier (5)\n computerShips[0].setShip( 9, 2, 1);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n //battleship (4)\n computerShips[1].setShip( 6, 0, 1);\n for (int j = 0; j < 4; j++){\n computerPlayerBoard[j][6] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 4, 9, 0);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 1, 1, 0);\n for (int i = 1; i < 4; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 3, 5, 1);\n for (int i = 5; i < 7; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n break;\n case 14:\n //carrier (5)\n\n computerShips[0].setShip( 0, 5, 1);\n for (int i = 5; i < 10; i++) {\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 7, 3, 1);\n for (int j = 3; j < 7; j++){\n computerPlayerBoard[j][7] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 3, 3, 1);\n for (int i = 3; i < 6; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 4, 5, 1);\n for (int i = 5; i < 8; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 5, 1, 0);\n for (int i = 5; i < 7; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n break;\n case 15:\n //carrier (5)\n\n computerShips[0].setShip( 1, 8, 0);\n for (int i = 1; i < 6; i++) {\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 7, 3, 1);\n for (int j = 3; j < 7; j++){\n computerPlayerBoard[j][7] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 6, 1, 0);\n for (int i = 6; i < 9; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 1, 5, 0);\n for (int i = 1; i < 4; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 2, 1, 1);\n for (int i = 1; i < 3; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n break;\n case 16:\n //carrier (5)\n\n computerShips[0].setShip( 0, 1, 1);\n for (int i = 1; i < 6; i++) {\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 1, 9, 0);\n for (int j = 1; j < 5; j++){\n computerPlayerBoard[9][j] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 9, 5, 1);\n for (int i = 5; i < 8; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 9, 1, 1);\n for (int i = 1; i < 4; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 4, 0, 0);\n for (int i = 4; i < 6; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n break;\n case 17:\n //carrier (5)\n\n computerShips[0].setShip( 4, 2, 1);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 1, 5, 1);\n for (int j = 5; j < 9; j++){\n computerPlayerBoard[j][1] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 7, 4, 1);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[i][7] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 6, 1, 0);\n for (int i = 6; i < 9; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 1, 1, 0);\n for (int i = 1; i < 3; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n break;\n case 18:\n //carrier (5)\n\n computerShips[0].setShip( 2, 3, 1);\n for (int i = 3; i < 8; i++) {\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 6, 4, 1);\n for (int j = 4; j < 8; j++){\n computerPlayerBoard[j][6] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 8, 1, 1);\n for (int i = 1; i < 4; i++){\n computerPlayerBoard[i][8] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 3, 2, 0);\n for (int i = 3; i < 6; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 4, 9, 0);\n for (int i = 4; i < 6; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n break;\n case 19:\n //carrier (5)\n\n computerShips[0].setShip( 8, 5, 1);\n for (int i = 5; i < 10; i++) {\n computerPlayerBoard[i][8] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 0, 0, 0);\n for (int j = 0; j < 4; j++){\n computerPlayerBoard[0][j] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 7, 0, 1);\n for (int i = 0; i < 3; i++){\n computerPlayerBoard[i][7] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 5, 4, 1);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 3, 8, 0);\n for (int i = 3; i < 5; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n break;\n case 20:\n //carrier (5)\n\n computerShips[0].setShip( 2, 5, 0);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 2, 1, 0);\n for (int j = 2; j < 6; j++){\n computerPlayerBoard[1][j] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 3, 7, 1);\n for (int i = 7; i < 10; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 6, 8, 0);\n for (int i = 6; i < 9; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 8, 0, 0);\n for (int i = 8; i < 10; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n break;\n\n }\n return true;\n }",
"public boolean validPlacement(double x, double y) {\n\t\treturn myEngineManager.validateTower(x, y);\n\t}",
"static boolean ifSafe(int[] placement, int row) {\n\t\tfor(int j = 0; j < row; j++) {\n\t\t\tif(placement[j] == placement[row]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tint columnDiff = placement[row] - placement[j];\n\t\t\tint rowDiff = row - j;\n\t\t\tif(columnDiff == rowDiff) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\t\n\t}",
"@Test\r\n public void callingMovePossibleWhenTryingToTakeAnOpponentPieceWith2MarkersOnShouldReturnFalse() {\n player1.movePiece(12, 11, board);\r\n player1.movePiece(12, 11, board);\r\n\r\n player2.movesLeft.moves.add(2);\r\n\r\n // Then\r\n assertFalse(player2.isMovePossible(13, 11, board));\r\n }",
"public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)\n {\n if (!worldIn.isRemote)\n {\n TileEntity tileentity = worldIn.getTileEntity(pos);\n\n if (tileentity instanceof TileEntityStructure)\n {\n TileEntityStructure tileentitystructure = (TileEntityStructure)tileentity;\n tileentitystructure.createdBy(placer);\n }\n }\n }",
"public interface Placeable {\n}",
"protected boolean allBoatsArePlaced() {\n for(BoatDrawing boat : boatMap.values()) {\n if (!boat.isPlaced()) {\n return false;\n }\n }\n logMsg(\"click now on 'valider' button to begin game\");\n return true;\n }",
"@Override\n\tpublic final int onBlockPlaced( World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metaData )\n\t{\n\t\t// Get the opposite face and return it\n\t\treturn ForgeDirection.OPPOSITES[side];\n\t}",
"public java.util.List<PlacementStrategy> getPlacementStrategy() {\n if (placementStrategy == null) {\n placementStrategy = new com.amazonaws.internal.SdkInternalList<PlacementStrategy>();\n }\n return placementStrategy;\n }",
"@Override\n public boolean moveBlock(Box pos) {\n if (indexPossibleBlock == 1) {\n if (pos.getCounter() == 3)\n completeTowers++;\n pos.build(4);\n } else {\n super.moveBlock(pos);\n if (pos.getCounter() == 4)\n completeTowers++;\n }\n return true;\n }",
"@Test\n public void testplaceRandomChecker()\n {\n player2.placeChecker(0, 0);\n \n // 1) Create Available Moves & Add To Player 1's Moves Collection\n // 2) Pick an Available Move at Random\n Move randomMove = player1.generateRandomMove();\n \n int x = randomMove.getX();\n int y = randomMove.getY();\n \n // Check that X coordinate of Random Move is Up/Down/Unchanged\n assertTrue(x == player2.getXPosition()+1 || x== player2.getXPosition()-1 || x== player2.getXPosition());\n \n // Check that Y coordinate of Random Move is Left/Right/Unchanged\n assertTrue(y == player2.getYPosition()+1 || y== player2.getYPosition()-1 || y== player2.getYPosition());\n \n // Check Random Move Was Successfull\n assertEquals(player1,game.getBoard()[x][y].getOwner()); \n \n }",
"private boolean correctPlacement(int[] pos) {\n for (int i = 0; i < crtStep; ++i) {\n for (int j = i + 1; j <= crtStep; ++j) {\n if (pos[i] == pos[j] || i - pos[i] == j - pos[j] || i + pos[i] == j + pos[j]) {\n return false;\n }\n }\n }\n \n return true;\n }",
"@EventHandler(priority = EventPriority.HIGHEST)\n\tpublic void onBlockPlace(BlockPlaceEvent event) {\n\t\tif(event.getPlayer().getItemInHand().getTypeId() == ConfigHandler.values.getTool()) {\n\t\t\tBlock b = event.getBlock();\n\t\t\tGLPlayer player = GLPlayer.getGLPlayer(event.getPlayer());\n\n\t\t\tInteger x = b.getX();\n\t\t\tInteger y = b.getY();\n\t\t\tInteger z = b.getZ();\n\t\t\tString world = b.getWorld().getName();\n\n\t\t\tevent.setCancelled(true);\n\t\t\t\n\t\t\tArrayList<String> args = new ArrayList<String>();\n\t\t\targs.add(x + \", \" + y + \", \" + z + \" in: \" + world);\n\t\t\tnew SearchTask(player, new SearchCallback(player), args);\n\t\t}\n\t\t\n\t\tif(event.getBlock().getType() == Material.TNT) {\n\t\t\tfor(BlockFace face : BlockFace.values()) {\n\t\t\t\tif(event.getBlock().getRelative(face).getType() == Material.REDSTONE_TORCH_ON) {\n\t\t\t\t\tplayerTNT.put(event.getBlock(), event.getPlayer().getName());\n\t\t\t\t}\n\t\t\t}\n\t\t} else if(event.getBlock().getType() == Material.REDSTONE_TORCH_ON) {\n\t\t\tfor(BlockFace face : BlockFace.values()) {\n\t\t\t\tif(event.getBlock().getRelative(face).getType() == Material.TNT) {\n\t\t\t\t\tplayerTorch.put(event.getBlock().getRelative(face), event.getPlayer().getName());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif((!event.isCancelled())) {\n\t\t\tString namePlayer = event.getPlayer().getName();\n\t\t\tInteger gm = event.getPlayer().getGameMode().getValue();\n\t\t\t\n\t\t\tif (event.getBlockPlaced().getType().toString().equalsIgnoreCase(\"FIRE\")) {\n\t\t\t\t// this gets handled by the onBlockIgnite() function\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tBlockPlaceData data = new BlockPlaceData(event.getBlock(), namePlayer, gm);\n\t\t\t\n\t\t\tGriefLogger logger = new GriefLogger(data.toString());\n\t\t\tplugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, logger);\n\t\t}\n\t}",
"public boolean mapsToPlace(Place where) {\n\t\treturn false;\r\n\t}",
"public abstract boolean canClip();",
"@Test\n void checkCannotForceWithForcedCellOccupied() {\n assertFalse(abilities.checkCanMove(turn, board.getCellFromCoords(1, 0)));\n }",
"@Test\r\n\tpublic void testCanPlaceBomb()\r\n\t{\r\n\t\tassertEquals(true, testCanPlaceBombBehavior.canPlaceBomb());\r\n\t}",
"void makePlacement(String placement) {\n\n // Task8 Do not clear the textField in order to place pieces step by step.\n // board.getChildren().clear();\n if (!StepsGame.isPlacementWellFormed(placement)) {\n throw new IllegalArgumentException(\"Hide board incorrect length: \" + placement);\n }\n Rectangle r = new Rectangle(BOARD_X, BOARD_Y, XSIDE*SQUARE_SIZE, YSIDE*SQUARE_SIZE);\n r.setFill(SUBBOARD_FILL);\n r.setStroke(SUBBOARD_STROKE);\n board.getChildren().add(r);\n String alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYabcdefghijklmnopqrstuvwxy\";\n for (int i = 0; i<50; i++){\n double x = 1.0/3;\n Text t = new Text(BOARD_X + SQUARE_SIZE/3 + (i %XSIDE) * SQUARE_SIZE - 5, BOARD_Y + 2*SQUARE_SIZE/3 +(i / XSIDE) * SQUARE_SIZE + 10, alphabet.substring(i, i+1));\n t.setFont(new Font(20));\n t.setFill(Color.GREY);\n board.getChildren().add(t);\n }\n // Making board and adding the letters.\n\n\n String[] onepiece = placement.split(\"(?<=\\\\G...)\");\n String[] shape = new String[onepiece.length];\n String[] location = new String[onepiece.length];\n char[] loc = new char[onepiece.length];\n int[] lct = new int[onepiece.length];\n for (int i = 0; i<onepiece.length; i++){\n shape[i] = onepiece[i].substring(0, 2);\n location[i] = onepiece[i].substring(2, 3);\n loc[i] = location[i].charAt(0);\n if(loc[i] >= 'A' && loc[i] <= 'Y'){\n lct[i] = (int)loc[i] - 65;\n }else if(loc[i] >= 'a' && loc[i] <= 'y'){\n lct[i] = (int)loc[i] - 72;\n }\n //Split String into 3 letters and NUMBER the positions A-y into 0-49.\n\n\n String tile = shape[i];\n if (tile != \"\")\n board.getChildren().add(new Square(tile, lct[i]-11));\n }\n // Adding shapes\n board.toBack();\n\n // FIXME Task 4: implement the simple placement viewer\n }",
"private int Block_Move() {\n\t\tfinal int POSSIBLE_BLOCK = 2;\n\t\tint move = NO_MOVE;\n\t\t\n\t\tif(( gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[TOP_CENTER] == EMPTY){\n\t\t\t\tmove = TOP_CENTER;\n\t\t\t}else if (gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[CTR_LEFT] == EMPTY){\n\t\t\t\tmove = CTR_LEFT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[CTR_RIGHT] == EMPTY){\n\t\t\t\tmove = CTR_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}else if (gameBoard[BTM_CENTER] == EMPTY){\n\t\t\t\tmove = BTM_CENTER;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[CTR_LEFT] == EMPTY){\n\t\t\t\tmove = CTR_LEFT;\n\t\t\t}else if (gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_CENTER] == EMPTY){\n\t\t\t\tmove = TOP_CENTER;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_CENTER] == EMPTY){\n\t\t\t\tmove = BTM_CENTER;\n\t\t\t}\t\t\t\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}else if (gameBoard[CTR_RIGHT] == EMPTY){\n\t\t\t\tmove = CTR_RIGHT;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}\n\t\t}\n\t\treturn move;\n\t}",
"public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5) {\n\t\treturn canPlaceBlockAt(par1World, par2, par3, par4);\n\t}",
"private boolean canMove() {\n return !(bestMove[0].getX() == bestMove[1].getX() && bestMove[0].getY() == bestMove[1].getY());\n }",
"boolean testPlaceShip(Tester t) {\n return t.checkExpect(ship3.place(this.em),\n em.placeImageXY(new CircleImage(10, OutlineMode.SOLID, Color.CYAN), 50, 50))\n && t.checkExpect(ship1.place(this.em),\n em.placeImageXY(new CircleImage(10, OutlineMode.SOLID, Color.CYAN), 0, 150));\n }",
"@Override\n\tpublic boolean isLegalMove(Square newPosition) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean PlaceOrder(Order order) {\n\t\treturn false;\n\t}",
"public boolean checkAlienPlacementTile(float x, float y)\r\n/* 471: */ {\r\n/* 472:563 */ if (!tileWalkable(x, y)) {\r\n/* 473:565 */ return false;\r\n/* 474: */ }\r\n/* 475:568 */ AgentModel a = getAgentOnTile(x, y);\r\n/* 476:569 */ if ((a != null) || (((a instanceof DoorModel)) && (!((DoorModel)a).isOpen()))) {\r\n/* 477:571 */ return false;\r\n/* 478: */ }\r\n/* 479:574 */ return true;\r\n/* 480: */ }",
"public void testBoardAvailablePositions() {\n \tassertTrue(board6.hasAvailablePositionsForTile());\n \tList<PlacementLocation> expected = new ArrayList<PlacementLocation>();\n \tboard6.place(new Placement(Color.RED, 5, 21, Color.RED, 4, 16));\n \tboard6.place(new Placement(Color.RED, 4, 12, Color.RED, 5, 14));\n \tboard6.place(new Placement(Color.RED, 4, 8, Color.RED, 5, 11));\n \tboard6.place(new Placement(Color.RED, 5, 4, Color.RED, 4, 4));\n \tboard6.place(new Placement(Color.RED, 5, 1, Color.RED, 4, 0));\n \t\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(5, 26))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(4, 20))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(5, 24))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(6, 29))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(6, 30))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(6, 31))));\n \t\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(6, 28))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(6, 28))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(5, 23))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(4, 19))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(4, 19))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(3, 15))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(4, 21))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(4, 21))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(5, 27))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(6, 32))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(6, 32))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 34))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(7, 33))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(7, 34))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 35))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 36))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(7, 36))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(7, 37))));\n \t\n \t\n \tfor (PlacementLocation location : board6.getAvailablePositionsForTile()) {\n \t\tif (!expected.contains(location))\n \t\t\tSystem.out.println(\"expected does not contain location: \" + location);\n \t}\n \tSet<PlacementLocation> locations = board6.getAvailablePositionsForTile();\n \tfor (PlacementLocation location : locations) {\n \t\tSystem.out.println(location);\n \t}\n \tfor (PlacementLocation location : expected) {\n \t\tif (!locations.contains(location))\n \t\t\tSystem.out.println(\"expected2 does not contain location: \" + location);\n \t}\n \t\n \tassertEquals(expected, board6.getAvailablePositionsForTile());\n \t\n \t\n }",
"@Override\r\n public boolean onPlace(BlockPlaceEvent event, BlockVector vector) {\n BlockVector doubleDoor = DoorHelper.getSecondIronDoor(vector);\r\n if (doubleDoor == null) {\r\n return false;\r\n }\r\n \r\n // check if there is a protection\r\n Protection protection = Core.protectionManager.getProtection(doubleDoor);\r\n if (protection == null) {\r\n return false;\r\n }\r\n \r\n // check permissions\r\n if (!protection.canEdit(event.getPlayer())) {\r\n PlayerUtils.sendError(event.getPlayer(), Core.NAME, \"You cannot place a door here.\");\r\n PlayerUtils.sendInfo(event.getPlayer(), \"The neighbour is a protected door.\");\r\n event.setCancelled(true);\r\n return true;\r\n }\r\n \r\n // send info\r\n PlayerUtils.sendInfo(event.getPlayer(), Core.NAME, \"Subprotection created.\");\r\n \r\n // return true to abort the event\r\n return true;\r\n }",
"public boolean hasPlacedPiece() {\n return hasPlacedPiece;\n }",
"public boolean placeComputerShipsDumb(int pattern) {\n if(cpuHasPlaced){\n return false;\n }\n switch(pattern){\n case 1:\n computerShips[0].setShip(4, 2, 1);\n for (int i = 4; i < 9; i++) {\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n computerShips[1].setShip(2, 4, 0);\n for (int j = 4; j < 8; j++){\n computerPlayerBoard[2][j] = board.ship.ordinal();\n }\n computerShips[2].setShip(0, 0, 1);\n for (int i = 0; i < 3; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[3].setShip(7, 9, 1);\n for (int i = 6; i < 9; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n computerShips[4].setShip(5, 4, 1);\n for (int i = 5; i < 7; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n break;\n case 2:\n computerShips[0].setShip(0, 0, 1);\n for(int i = 0; i < 6; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[1].setShip( 0, 3, 1);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n computerShips[2].setShip(0, 4, 1);\n for(int i = 0; i < 4; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[3].setShip(0,1,1);\n for(int i = 0; i < 4; i++){\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n computerShips[4].setShip(0,2,1);\n for(int i = 0; i < 3; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n break;\n case 3:\n computerShips[0].setShip(0,0,0);\n for(int i = 0; i < 6; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[1].setShip( 0, 3, 0);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[3][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(0, 4, 0);\n for(int i = 0; i < 4; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n computerShips[3].setShip( 0, 1, 0);\n for(int i = 0; i < 4; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(0,2,0);\n for(int i = 0; i < 3; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n break;\n case 4:\n computerShips[0].setShip(3,4,1);\n for(int i = 3; i < 8; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[1].setShip( 3, 6, 1);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[i][6] = board.ship.ordinal();\n }\n computerShips[2].setShip(3, 3, 1);\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n computerShips[3].setShip( 7, 9, 1);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n computerShips[4].setShip(8,0,0);\n for(int i = 8; i <= 9; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n break;\n case 5:\n computerShips[0].setShip(0,9,0);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,6,1);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[i][6] = board.ship.ordinal();\n }\n computerShips[2].setShip(3,3,0);\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[3][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(0,9,1);\n for(int i = 0; i < 3; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n computerShips[4].setShip(8,0,1);\n for(int i = 7; i < 9; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n break;\n case 6:\n computerShips[0].setShip(0,9,0);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(0,6,0);\n for(int i = 0; i < 4; i++){\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(0,5,0);\n for(int i = 0; i < 3; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(0,8,0);\n for(int i = 0; i < 3; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(0,7,0);\n for(int i = 0; i < 2; i++){\n computerPlayerBoard[7][i] = board.ship.ordinal();\n }\n break;\n case 7:\n computerShips[0].setShip(3,3,0);\n for(int i = 3; i < 8; i++){\n computerPlayerBoard[3][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,5,0);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n //cruiser\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(3,2,0);\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(3,4,0);\n for(int i = 3; i < 5; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n break;\n case 8:\n computerShips[0].setShip(2,4,1);\n for(int i = 2; i < 7; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[1].setShip(2,6,1);\n for(int i = 2; i < 6; i++){\n computerPlayerBoard[i][6] = board.ship.ordinal();\n }\n computerShips[2].setShip(4,5,1);\n for(int i = 4; i < 7; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n computerShips[3].setShip(2,3,1);\n for(int i = 2; i < 5; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n computerShips[4].setShip(2,5,1);\n for(int i = 2; i < 4; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n break;\n case 9:\n computerShips[0].setShip(0,0,1);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[1].setShip(2,1,1);\n for(int i = 2; i < 6; i++){\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n computerShips[2].setShip(7,0,1);\n for(int i = 7; i <= 9; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[3].setShip(5,0,1);\n for(int i = 5; i < 8; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[4].setShip(0,1,1);\n for(int i = 0; i < 2; i++){\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n break;\n case 10:\n computerShips[0].setShip(0,0,0);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(2,1,0);\n for(int i = 2; i < 6; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(7,0,0);\n for(int i = 7; i <= 9; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(5,0,0);\n for(int i = 5; i < 8; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(0,1,0);\n for(int i = 0; i < 2; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n break;\n case 11:\n computerShips[0].setShip(2,3,1);\n for(int i = 2; i < 7; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n computerShips[1].setShip(2,5,1);\n for(int i = 2; i < 6; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n computerShips[2].setShip(3,0,0);\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(4,1,1);\n for(int i = 4; i < 6; i++){\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n computerShips[4].setShip(4,8,1);\n for(int i = 4; i < 6; i++){\n computerPlayerBoard[i][8] = board.ship.ordinal();\n }\n break;\n case 12:\n computerShips[0].setShip(3,5,0);\n for(int i = 3; i < 8; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,2,0);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(4,2,1);\n for(int i = 4; i < 7; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n computerShips[3].setShip(3,0,0);\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(3,9,0);\n for(int i = 3; i < 5; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n break;\n case 13:\n computerShips[0].setShip(0,0,1);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[1].setShip(0,9,1);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n computerShips[2].setShip(6,0,1);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[3].setShip(6,9,1);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n computerShips[4].setShip(8,9,1);\n for(int i = 8; i <= 9; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n break;\n case 14:\n computerShips[0].setShip(0,4,1);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[1].setShip(0,2,1);\n for(int i = 0; i < 4; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n computerShips[2].setShip(5,4,1);\n for(int i = 5; i < 8; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[3].setShip(4,2,1);\n for(int i = 4; i < 7; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n computerShips[4].setShip(6,2,1);\n for(int i = 6; i < 8; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n break;\n case 15:\n computerShips[0].setShip(1,4,0);\n for(int i = 1; i < 6; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,5,0);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(6,4,0);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(1,5,0);\n for(int i = 1; i < 4; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(7,5,0);\n for(int i = 7; i < 9; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n break;\n case 16:\n computerShips[0].setShip(1,1,0);\n for(int i = 1; i < 6; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,8,0);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(6,1,0);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(1,8,0);\n for(int i = 1; i < 4; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(7,8,0);\n for(int i = 7; i < 9; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n break;\n case 17:\n computerShips[0].setShip(1,1,0);\n for(int i = 1; i < 6; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,2,0);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(6,1,0);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(1,2,0);\n for(int i = 1; i < 4; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(7,2,0);\n for(int i = 7; i < 9; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n break;\n case 18:\n computerShips[0].setShip(1,6,0);\n for(int i = 1; i < 6; i++){\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,7,0);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[7][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(6,6,0);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(1,7,0);\n for(int i = 1; i < 4; i++){\n computerPlayerBoard[7][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(7,7,0);\n for(int i = 7; i < 9; i++){\n computerPlayerBoard[7][i] = board.ship.ordinal();\n }\n break;\n case 19:\n computerShips[0].setShip(0,5,0);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(2,2,0);\n for(int i = 2; i < 6; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(0,9,0);\n for(int i = 0; i < 3; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(6,0,0);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(6,9,0);\n for(int i = 6; i < 8; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n break;\n case 20:\n computerShips[0].setShip(2,5,1);\n for(int i = 2; i < 7; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n computerShips[1].setShip(1,8,0);\n for(int i = 1; i < 5; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(3,0,0);\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(1,2,0);\n for(int i = 1; i < 4; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(4,2,1);\n for(int i = 4; i < 6; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n break;\n\n }\n cpuHasPlaced = true;\n return true;\n }",
"@Test\r\n\tpublic void testPlaceBombAndSetPlaceBomb()\r\n\t{\r\n\t\tassertEquals(false, testCanPlaceBombBehavior.placeBomb());\r\n\t\t\r\n\t\ttestCanPlaceBombBehavior.setPlaceBomb(true);\r\n\t\tassertEquals(true, testCanPlaceBombBehavior.placeBomb());\r\n\t\t\r\n\t\ttestCanPlaceBombBehavior.setPlaceBomb(true);\r\n\t\tassertEquals(true, testCanPlaceBombBehavior.placeBomb());\r\n\t\t\r\n\t\ttestCanPlaceBombBehavior.setPlaceBomb(false);\r\n\t\tassertEquals(false, testCanPlaceBombBehavior.placeBomb());\r\n\t\t\r\n\t\ttestCanPlaceBombBehavior.setPlaceBomb(false);\r\n\t\tassertEquals(false, testCanPlaceBombBehavior.placeBomb());\r\n\t}",
"public static Action place(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation()) {\n if(!a.isFacing(Actor.class)) {\n if(a.isHolding(e)) {\n try {\n ((Placeable) e.newInstance()).place(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n a.removeItem(e);\n } catch(InstantiationException e) {\n e.printStackTrace();\n } catch(IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n\n }\n\n }\n }\n\n @Override\n public int getCost() {\n return 0;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Place(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }",
"public boolean isPlaced(int index) {\n\t\tif ((index < 0) || (index > ships.size() - 1)) {\n\t\t\tthrow new ArrayIndexOutOfBoundsException(\"Index out of Bounds.\");\n\t\t}\n\t\treturn ships.get(index).isPlaced();\n\t}",
"public boolean canPlace(World var1, int var2, int var3, int var4)\r\n {\r\n return var1.isBlockSolidOnSide(var2, var3 - 1, var4, 1) || var1.getTypeId(var2, var3 - 1, var4) == Block.FENCE.id;\r\n }",
"public boolean blocked(Move move) {\n String t = move.replacedPiece().abbrev();\n String s = move.movedPiece().abbrev();\n if (s.equals(\"-\")) {\n throw new IllegalArgumentException(\"can't move empty piece\");\n }\n if (s.equals(t)) {\n return true;\n }\n int c0 = move.getCol0();\n int c1 = move.getCol1();\n int r0 = move.getRow0();\n int r1 = move.getRow1();\n int dCol = c1 - c0;\n int dRow = r1 - r0;\n int i, j;\n for (Direction d : Direction.values()) {\n for (i = 1; i <= 7; i++) {\n if (dCol == d.dc * i && dRow == d.dr * i) {\n for (j = 1; j < i; j++) {\n String u = get(c0 + d.dc * j, r0 + d.dr * j).abbrev();\n if (s.equals(\"w\") && u.equals(\"b\")) {\n return true;\n }\n if (s.equals(\"b\") && u.equals(\"w\")) {\n return true;\n }\n }\n return false;\n }\n }\n }\n throw new IllegalArgumentException(\"not a valid direction\");\n }",
"@Override\n public void placeShips(Fleet fleet, Board board) {\n foundPosition = new boolean[sizeX][sizeY];\n for (int i = fleet.getNumberOfShips() - 1; i >= 0; i--) {\n Ship s = fleet.getShip(i);\n boolean vertical = rnd.nextBoolean();\n Position pos;\n if (vertical) {\n int x = rnd.nextInt(sizeX);\n int y = rnd.nextInt(sizeY - (s.size()));\n\n while (true) {\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x][y + j]) {\n check = true;\n x = rnd.nextInt(sizeX);\n y = rnd.nextInt(sizeY - (s.size()));\n break;\n }\n }\n if (check == false) {\n break;\n }\n /* int counter = 0;\n if (counter > 1) {\n y = rnd.nextInt(sizeY - (s.size()));\n }\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x][y + j]) {\n check = true;\n x++;\n if (x >= sizeX) {\n x = 0;\n }\n }\n }\n if (check == false) {\n break;\n }\n counter++;\n }*/\n }\n for (int j = 0; j < s.size(); j++) {\n foundPosition[x][y + j] = true;\n }\n pos = new Position(x, y);\n } else {\n int x = rnd.nextInt(sizeX - (s.size()));\n int y = rnd.nextInt(sizeY);\n while (true) {\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x + j][y]) {\n check = true;\n x = rnd.nextInt(sizeX - (s.size()));\n y = rnd.nextInt(sizeY);\n }\n }\n if (check == false) {\n break;\n }\n /*int counter = 0;\n if (counter > 1) {\n x = rnd.nextInt(sizeX - (s.size() - 1));\n }\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x + j][y]) {\n check = true;\n y++;\n if (y >= sizeX) {\n y = 0;\n }\n }\n }\n if (check == false) {\n break;\n }\n counter++;\n }*/\n }\n for (int j = 0; j < s.size(); j++) {\n foundPosition[x + j][y] = true;\n }\n pos = new Position(x, y);\n }\n board.placeShip(pos, s, vertical);\n }\n }",
"@Test\r\n void place() {\r\n Cell cell = new Cell(0,0, null);\r\n Dome dome1 = new Dome();\r\n boolean check;\r\n\r\n // place a dome on a free cell\r\n check = dome.place( cell );\r\n assertTrue( check );\r\n assertTrue( dome.position() == cell );\r\n\r\n // not place a dome on a cell with dome\r\n check = dome1.place( cell );\r\n assertTrue( !check );\r\n assertTrue( dome1.position() == null );\r\n\r\n }",
"boolean canMove();",
"public boolean BuildStructure(StructureConfiguration configuration, ServerWorld world, BlockPos originalPos, Direction assumedNorth, PlayerEntity player) {\n BlockPos startBlockPos = this.clearSpace.getStartingPosition().getRelativePosition(originalPos, this.clearSpace.getShape().getDirection(), configuration.houseFacing);\n BlockPos endBlockPos = startBlockPos.offset(configuration.houseFacing.rotateYCounterclockwise(), this.clearSpace.getShape().getWidth() - 1)\n .offset(configuration.houseFacing.getOpposite(), this.clearSpace.getShape().getWidth() - 1)\n .offset(Direction.UP, this.clearSpace.getShape().getHeight());\n\n // Make sure this structure can be placed here.\n Triple<Boolean, BlockState, BlockPos> checkResult = BuildingMethods.CheckBuildSpaceForAllowedBlockReplacement(world, startBlockPos, endBlockPos, player);\n\n if (!checkResult.getFirst()) {\n // Send a message to the player saying that the structure could not\n // be built.\n TranslatableText message = new TranslatableText(\n GuiLangKeys.GUI_STRUCTURE_NOBUILD,\n Registry.BLOCK.getId(checkResult.getSecond().getBlock()).toString(),\n checkResult.getThird().getX(),\n checkResult.getThird().getY(),\n checkResult.getThird().getZ());\n\n message.setStyle(Style.EMPTY.withColor(Formatting.GREEN));\n player.sendMessage(message, false);\n return false;\n }\n\n if (!this.BeforeBuilding(configuration, world, originalPos, assumedNorth, player)) {\n // First, clear the area where the structure will be built.\n this.ClearSpace(configuration, world, originalPos, assumedNorth);\n\n boolean blockPlacedWithCobbleStoneInstead = false;\n\n // Now place all of the blocks.\n for (BuildBlock block : this.getBlocks()) {\n Block foundBlock = Registry.BLOCK.get(block.getResourceLocation());\n\n if (foundBlock != null) {\n BlockState blockState = foundBlock.getDefaultState();\n BuildBlock subBlock = null;\n\n // Check if water should be replaced with cobble.\n if (!this.WaterReplacedWithCobbleStone(configuration, block, world, originalPos, assumedNorth, foundBlock, blockState, player)\n && !this.CustomBlockProcessingHandled(configuration, block, world, originalPos, assumedNorth, foundBlock, blockState, player)) {\n block = BuildBlock.SetBlockState(configuration, world, originalPos, assumedNorth, block, foundBlock, blockState, this);\n\n if (block.getSubBlock() != null) {\n foundBlock = Registry.BLOCK.get(block.getSubBlock().getResourceLocation());\n blockState = foundBlock.getDefaultState();\n\n subBlock = BuildBlock.SetBlockState(configuration, world, originalPos, assumedNorth, block.getSubBlock(), foundBlock, blockState, this);\n }\n\n if (subBlock != null) {\n block.setSubBlock(subBlock);\n }\n\n boolean priorityTwoBlock = foundBlock instanceof HopperBlock;\n\n boolean priorityThreeBlock = foundBlock instanceof TorchBlock\n || foundBlock instanceof AbstractSignBlock\n || foundBlock instanceof LeverBlock\n || foundBlock instanceof AbstractButtonBlock\n || foundBlock instanceof BedBlock\n || foundBlock instanceof CarpetBlock\n || foundBlock instanceof FlowerPotBlock\n || foundBlock instanceof SugarCaneBlock\n || foundBlock instanceof AbstractPressurePlateBlock\n || foundBlock instanceof DoorBlock\n || foundBlock instanceof LadderBlock\n || foundBlock instanceof VineBlock\n || foundBlock instanceof RedstoneWireBlock\n || foundBlock instanceof AbstractRedstoneGateBlock\n || foundBlock instanceof AbstractBannerBlock\n || foundBlock instanceof LanternBlock\n || foundBlock instanceof MushroomBlock\n || foundBlock instanceof AbstractRailBlock;\n\n boolean priorityFourBlock = foundBlock instanceof SandBlock;\n\n boolean priorityFiveBlock = foundBlock instanceof SugarCaneBlock ||\n foundBlock instanceof CactusBlock\n || foundBlock instanceof DeadBushBlock\n || foundBlock instanceof CoralBlock\n || foundBlock instanceof RedstoneTorchBlock;\n\n if (!block.getHasFacing()) {\n if (subBlock != null) {\n block.setSubBlock(subBlock);\n }\n\n if (priorityFiveBlock) {\n this.priorityFiveBlocks.add(block);\n } else if (priorityFourBlock) {\n this.priorityFourBlocks.add(block);\n } else if (priorityThreeBlock) {\n this.priorityThreeBlocks.add(block);\n } else if (foundBlock instanceof AirBlock) {\n this.airBlocks.add(block);\n } else if (foundBlock instanceof BlockEntityProvider || priorityTwoBlock) {\n this.priorityTwoBlocks.add(block);\n } else {\n this.priorityOneBlocks.add(block);\n }\n } else {\n // These blocks may be attached to other facing blocks and must be done later.\n if (priorityThreeBlock) {\n this.priorityThreeBlocks.add(block);\n } else {\n this.priorityTwoBlocks.add(block);\n }\n }\n }\n } else {\n // Cannot find this block in the registry. This can happen if a structure file has a mod block that\n // no longer exists.\n // In this case, print an informational message and replace it with cobblestone.\n String blockTypeNotFound = block.getResourceLocation().toString();\n block = BuildBlock.SetBlockState(configuration, world, originalPos, assumedNorth, block, Blocks.COBBLESTONE, Blocks.COBBLESTONE.getDefaultState(), this);\n this.priorityOneBlocks.add(block);\n\n if (!blockPlacedWithCobbleStoneInstead) {\n blockPlacedWithCobbleStoneInstead = true;\n Prefab.logger\n .warn(\"A Block was in the structure, but it is not registered. This block was replaced with vanilla cobblestone instead. Block type not found: [\"\n + blockTypeNotFound + \"]\");\n }\n }\n }\n\n this.configuration = configuration;\n this.world = world;\n this.assumedNorth = assumedNorth;\n this.originalPos = originalPos;\n\n if (StructureEventHandler.structuresToBuild.containsKey(player)) {\n StructureEventHandler.structuresToBuild.get(player).add(this);\n } else {\n ArrayList<Structure> structures = new ArrayList<Structure>();\n structures.add(this);\n StructureEventHandler.structuresToBuild.put(player, structures);\n }\n }\n\n return true;\n }",
"public boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint var3 = this.worldObj.getFirstUncoveredBlock(par1, par2);\n\t\treturn var3 == 0 ? false : Block.blocksList[var3].blockMaterial.blocksMovement();\n\t}",
"public boolean inPlace() {\n\t\treturn false;\n\t}",
"@Override\n public final Field.PlacingAfterCollision determinePlacing(\n final ElementCollisionData element1,\n final ElementCollisionData element2\n ) {\n assert element1.isColliding();\n\n final ElementCollision other = element2.getCollision();\n if ((other == Push.INSTANCE) || (other == Neutral.INSTANCE)) {\n return new Field.PlacingBoth(\n element1.getIndex(),\n element1.getElement(),\n element1.getDirection(),\n element2.getIndex(),\n element2.getElement(),\n element2.getDirection()\n );\n }\n else if (other == Eat.INSTANCE) {\n return new Field.PlacingOne(\n element2.isColliding()\n ? Field.calculateIndex(element2.getIndex(), element2.getDirection())\n : element2.getIndex(),\n element2.getElement(),\n element2.getDirection()\n );\n }\n else if (other == Eaten.INSTANCE) {\n return new Field.PlacingOne(\n Field.calculateIndex(element1.getIndex(), element1.getDirection()),\n element1.getElement(),\n element1.getDirection()\n );\n }\n else {\n throw new UnsupportedOperationException();\n }\n }",
"public interface Place {\n\n public boolean canMoveAbove();\n public boolean canMoveBelow();\n public boolean canMoveLeft();\n public boolean canMoveRight();\n public boolean canMoveDiagonal();\n\n public void setAbove(Place h);\n public void setBelow(Place h);\n public void setLeft(Place h);\n public void setRight(Place h);\n public void setDiagonal(Place h);\n\n public void setPixel(int x, int y);\n public int getX();\n public int getY();\n public void setLabel(String l);\n public String getLabel();\n public Place getAbove();\n public Place getBelow();\n public Place getLeft();\n public Place getRight();\n public Room getDiagonal();\n\n public void setPlayer(Player p);\n public boolean occupiedByPlayer();\n public void removePlayer();\n}"
] | [
"0.62447464",
"0.62208414",
"0.6168865",
"0.6078764",
"0.59096444",
"0.5873743",
"0.5838639",
"0.5714052",
"0.57007986",
"0.56825477",
"0.5623124",
"0.5598569",
"0.558513",
"0.5578803",
"0.55707395",
"0.55564326",
"0.55432546",
"0.5466834",
"0.54661167",
"0.53476506",
"0.53443503",
"0.5338081",
"0.53212184",
"0.5260117",
"0.5259868",
"0.5256387",
"0.52559155",
"0.52531236",
"0.52449286",
"0.5240667",
"0.5238606",
"0.5234492",
"0.5231664",
"0.5214286",
"0.52059263",
"0.51965046",
"0.5189607",
"0.5187248",
"0.5181066",
"0.51696783",
"0.5160365",
"0.51595426",
"0.51575553",
"0.51552516",
"0.5152518",
"0.5143964",
"0.51290816",
"0.5128908",
"0.511442",
"0.5113996",
"0.5107669",
"0.5102739",
"0.5079715",
"0.50758773",
"0.5066678",
"0.5063429",
"0.5054933",
"0.5049616",
"0.5047359",
"0.5046219",
"0.50454956",
"0.5044788",
"0.50431246",
"0.50431204",
"0.50374025",
"0.5030931",
"0.50045055",
"0.5004063",
"0.49965107",
"0.49956238",
"0.4993978",
"0.49791473",
"0.4970985",
"0.49706233",
"0.49678385",
"0.49675196",
"0.49641767",
"0.49623153",
"0.49570113",
"0.4954089",
"0.4952158",
"0.49478903",
"0.4946431",
"0.4941641",
"0.49410906",
"0.49370039",
"0.4934495",
"0.4930994",
"0.492769",
"0.49274075",
"0.4924522",
"0.49230435",
"0.49156886",
"0.49048787",
"0.49036974",
"0.48973995",
"0.48963696",
"0.48949188",
"0.48932213",
"0.48928508"
] | 0.59703195 | 4 |
Prevent trapdoors from popping off when the block behind them is nonsolid. | @Redirect(method="onAdjacentBlockUpdate(Lnet/minecraft/level/Level;IIII)V", at=@At(value = "INVOKE", target = "Lnet/minecraft/level/Level;canSuffocate(III)Z"))
private boolean preventTrapdoorBreakage(Level level, int x, int y, int z) {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean solid()\n {\n return false;\n }",
"protected boolean isMovementNoisy() {\n/* 1861 */ return (!this.abilities.flying && (!this.onGround || !isDiscrete()));\n/* */ }",
"private boolean UpdateWithoutCarriedBlock()\r\n {\r\n if ( rand.nextInt(20) == 0 )\r\n {\r\n int i = MathHelper.floor_double( ( posX - 3D ) + rand.nextDouble() * 6D );\r\n int j = MathHelper.floor_double( posY - 1D + rand.nextDouble() * 7D );\r\n int k = MathHelper.floor_double( ( posZ - 3D ) + rand.nextDouble() * 6D );\r\n \r\n int l1 = worldObj.getBlockId( i, j, k );\r\n\r\n if ( CanPickUpBlock( i, j, k ) )\r\n {\r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderBlockCollectAuxFXID, i, j, k, l1 + ( worldObj.getBlockMetadata( i, j, k ) << 12 ) );\r\n\t\t \r\n setCarried( worldObj.getBlockId( i, j, k ) );\r\n setCarryingData( worldObj.getBlockMetadata( i, j, k ) );\r\n worldObj.setBlockToAir( i, j, k );\r\n }\r\n }\r\n else if ( worldObj.provider.dimensionId == 1 )\r\n {\r\n \t// Endermen in the end without a block in hand will eventually teleport back to the overworld\r\n \t\r\n \t\tif ( rand.nextInt( 9600 ) == 0 )\r\n \t\t{\r\n \t\t\t// play dimensional travel effects\r\n \t\t\t\r\n int i = MathHelper.floor_double( posX );\r\n int j = MathHelper.floor_double( posY ) + 1;\r\n int k = MathHelper.floor_double( posZ );\r\n \r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderChangeDimensionAuxFXID, i, j, k, 0 );\r\n\t\t \r\n setDead();\r\n \r\n return false;\r\n \t\t}\r\n }\r\n \r\n return true;\r\n }",
"private void blockedPathNoBeepers() {\n\t\twhile (frontIsBlocked() && noBeepersPresent()) {\n\t\t\tturnLeft();\n\t\t\tturnLeft();\n\t\t} \n\t\tmove();\n\t\tturnRight();\n\t}",
"@Override\n\tpublic boolean isSolid() {\n\t\treturn true;\n\t}",
"public boolean isCollisionDisabled() { return mover.isCollisionDisabled(); }",
"private void disableIfDissatisfied() {\n \t\tif ( !this.satisfiesPolygon() ) {\n \t\t\tthis.area.setEnabled( false );\n \t\t}\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/* */ }",
"boolean isSolid();",
"void blackhole(){ if (zzAtBOL) return; }",
"private void breakSpecialState() {\n this.inSpecialState = false;\n this.resetXMovement();\n }",
"@Override\n protected void update() {\n if (Pneumatics.get_instance().get_solenoids() && in_inner_thresh()) {\n Pneumatics.get_instance().set_solenoids(false);\n }\n }",
"private void penguinStormReaction(){\n if(obstacle.getUserData().getAssetId().equals(OBSTACLE_CLOUD_ASSETS_ID)){\n if(penguin.isFrightStopped()){\n obstacle.setStormRaining(false);\n }else{\n obstacle.setStormRaining(true);\n }\n }\n }",
"@Override\n public boolean ignoreAbsorbedDamage() {\n return false;\n }",
"@Override\n public boolean ignoreAbsorbedDamage() {\n return false;\n }",
"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}",
"public boolean handbrake() {\n if (getY() % symbolHeight == 0) return false;\n doBreak=true;\n return true;\n }",
"private boolean UpdateWithCarriedBlock()\r\n {\r\n \tint iCarriedBlockID = getCarried();\r\n \t\r\n \tif ( worldObj.provider.dimensionId == 1 ) \r\n \t{\r\n\t\t\t// we're in the end dimension with a block, and should attempt to place it\r\n\t\t\t\r\n int i = MathHelper.floor_double( posX ) + rand.nextInt( 5 ) - 2;\r\n int j = MathHelper.floor_double( posY ) + rand.nextInt( 7 ) - 3;\r\n int k = MathHelper.floor_double( posZ ) + rand.nextInt( 5 ) - 2;\r\n \r\n\t\t\tint iWeight = GetPlaceEndstoneWeight( i, j, k );\r\n\t\t\t\r\n if ( rand.nextInt( m_iMaxEnstonePlaceWeight >> 9 ) < iWeight )\r\n {\r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderBlockPlaceAuxFXID, i, j, k, iCarriedBlockID + ( getCarryingData() << 12 ) );\r\n\t\t \r\n worldObj.setBlockAndMetadataWithNotify( i, j, k, getCarried(), getCarryingData());\r\n \r\n setCarried(0);\r\n }\r\n \t}\r\n \telse\r\n \t{\r\n\t\t\t// \teventually the enderman should teleport away to the end with his block\r\n\t\t\t\r\n \t\tif ( rand.nextInt( 2400 ) == 0 )\r\n \t\t{\r\n \t\t\t// play dimensional travel effects\r\n \t\t\t\r\n int i = MathHelper.floor_double( posX );\r\n int j = MathHelper.floor_double( posY ) + 1;\r\n int k = MathHelper.floor_double( posZ );\r\n \r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderChangeDimensionAuxFXID, i, j, k, 0 );\r\n\t\t \r\n setDead();\r\n \r\n return false;\r\n \t\t}\r\n \t}\r\n \t\r\n \treturn true;\r\n }",
"@Test\n public void highlightedElementsCleared() {\n radar.loop();\n radar.loop();\n radar.loop();\n radar.loop();\n radar.loop();\n MovingWorldObject obj = radar.getNearestCollideableElement();\n assertFalse(world.getWorldObjects().stream().anyMatch(WorldObject::isHighlightedWhenRadarIsOn));\n assertFalse(world.getDynamics().stream().anyMatch(WorldObject::isHighlightedWhenRadarIsOn));\n }",
"@Override\n public boolean isConditionallySolid(final MazeObjectInventory inv) {\n return true;\n }",
"public void doorOpen(){\n super.suppress();\n }",
"public void disperse() {\t\t\n\t\tfor (int r = 0; r < rows; r++){\n\t\t\tfor (int c = 1; c < cols; c++){\n\t\t\t\tint sum = values[r+1][c-1] + values[r+1][c] + values[r+1][c+1];\n\t\t\t\tif(r < rows - fireLevel + 14){\n\t\t\t\t\tvalues[r][c] = (sum / 3) - 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvalues[r][c] = (int)((sum / 3.0) - 0.0); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (values[r][c] < 0) values[r][c] = 0;\n\t\t\t\tg2.setColor(colors[values[r][c]]);\n\t\t\t\tif(values[r][c] > 5){\n\t\t\t\t\tg2.fillRect(c*res,r*res,res,res);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean damagable() {\n return !this.state.equals(\"knockedBack\")\n && !this.state.equals(\"dodge\");\n }",
"@Override\r\n\tpublic StateBruceDanner swallowSubstance() {\n\t\treturn NON_CONTAMINED;\r\n\t}",
"public boolean isUninteractableSolid() {\n\t\treturn uninteractableSolid;\n\t}",
"@Override\n public boolean isGoodForInterior()\n {\n return false;\n }",
"public void checktrap() {\n\t\tfor (int j = 0; j < trap.length; j++) {// go through rows\n\t\t\tfor (int i = 0; i < trap[0].length; i++) {// go though columns\n\t\t\t\tif (trap[j][i]) {\n\t\t\t\t\ttrap(j, i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void fireBombs() {\n electricSide.set(Value.kForward);\n pneumaticSide.set(Value.kForward);\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 }",
"@Override\n\tpublic boolean isSideSolid( IBlockAccess world, int x, int y, int z, ForgeDirection side )\n\t{\n\t\treturn true;\n\t}",
"public boolean isDrooping() {\n return false;\n }",
"public boolean percolates() {\n return false;\n }",
"@Override\n public boolean isGoodForSides()\n {\n return false;\n }",
"public void checkRockets() {\n for (Rocket rocket : rockets) {\n for (Ufo ufo : ufos) {\n if (ufo.intersects(rocket)) {\n ufo.die();\n rocket.die();\n }\n }\n\n if (rocket.getY() <= 0)\n rocket.die();\n }\n }",
"public void removeEffectFromSpecialBrick(){\r\n\t\t\t// return everything to the original\r\n\t\t\tColor origColor = (specialBrickId.equals(\"Rect0\"))? discsColors[0]:(specialBrickId.equals(\"Rect1\"))? discsColors[1]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect2\"))? discsColors[2]:(specialBrickId.equals(\"Rect3\"))? discsColors[3]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect4\"))? discsColors[4]:(specialBrickId.equals(\"Rect5\"))? discsColors[5]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect6\"))? discsColors[6]:(specialBrickId.equals(\"Rect7\"))? discsColors[7]:null; \r\n\t\t\tint origWidth = (specialBrickId.equals(\"Rect0\"))? 30:(specialBrickId.equals(\"Rect1\"))? 60:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect2\"))? 90:(specialBrickId.equals(\"Rect3\"))? 120:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect4\"))? 150:(specialBrickId.equals(\"Rect5\"))? 180:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect6\"))? 210:(specialBrickId.equals(\"Rect7\"))? 240:null;\r\n\t\t\tRectangle rect = new Rectangle(origWidth,20, origColor);\r\n\t\t\trect.setId(specialBrickId);\r\n\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\trect.setStrokeWidth(3);\r\n\t\t\t\t\t\t\r\n\t\t\tswitch(specialBrickTower){\r\n\t\t\t\tcase \"firstTower\":\r\n\t\t\t\t\tfor(int i=0; i<firstTower.getChildren().size(); i++){ // cycle through the tower to check which one is the special brick\r\n\t\t\t\t\t\tif (firstTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tfirstTower.getChildren().set(i, rect); // then reset it\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"secondTower\":\r\n\t\t\t\t\tfor(int i=0; i<secondTower.getChildren().size(); i++){\r\n\t\t\t\t\t\tif (secondTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tsecondTower.getChildren().set(i, rect);\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"thirdTower\":\r\n\t\t\t\t\tfor(int i=0; i<thirdTower.getChildren().size(); i++){\r\n\t\t\t\t\t\tif (thirdTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tthirdTower.getChildren().set(i, rect);\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\trect.widthProperty().bind(scene.widthProperty().divide(3).subtract(250-origWidth));\r\n\t\t\trect.heightProperty().bind(scene.heightProperty().divide(19));\r\n\t\t\r\n\t\tif(countDownRunning){towersRegion.getChildren().remove(2);countDownRunning=false;} // remove the count down watch from the screen\t\t\r\n\t\tspecialBrickId=null; // reset the special brick id\r\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 }",
"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 }",
"public void trap(Player player) {\n this.velocity = Vector3.Zero;\n this.owner = player;\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 }",
"@Override\n public int strongPowerLevel(int side) {\n return 0;\n }",
"@Override\n protected void reproduce() {\n new AnimalCell(super.planet);\n super.reproductionThreshold = 0;\n }",
"protected boolean avoidNegativeCoordinates() {\n \t\treturn false;\n \t}",
"@Test\n\tpublic void testIfForbriddenSelfKillAdvanced(){\n\t\tboard.commitMove(new Point(2,1), 1);\n\t\tboard.commitMove(new Point(3,1), 1);\n\t\tboard.commitMove(new Point(4,2), 1);\n\t\tboard.commitMove(new Point(3,3), 1);\n\t\tboard.commitMove(new Point(3,4), 1);\n\t\tboard.commitMove(new Point(2,5), 1);\n\t\tboard.commitMove(new Point(1,4), 1);\n\t\tboard.commitMove(new Point(1,3), 1);\n\t\tboard.commitMove(new Point(1,2), 1);\n\t\t\n\t\tboard.commitMove(new Point(2,4), 0);\n\t\tboard.commitMove(new Point(2,3), 0);\n\t\tassertEquals(0, board.commitMove(new Point(2,2), 0));\n\t\tassertNotEquals(0,board.commitMove(new Point(3,2), 0));\n//\t\tboard.printBoard();\n\t}",
"public boolean isSolid() {\r\n\t\treturn isSolid;\r\n\t}",
"public boolean blockIsNotSafe(World world, double x, double y, double z) {\r\n if (world.getBlockAt((int) Math.floor(x), (int) Math.floor(y),(int) Math.floor(z)).getType() != Material.AIR \r\n || world.getBlockAt((int) Math.floor(x),(int) Math.floor(y + 1), (int) Math.floor(z)).getType() != Material.AIR)\r\n return true;\r\n \r\n if ((world.getBlockAt((int) Math.floor(x), (int) Math.floor(y - 1),(int) Math.floor(z)).getType() == Material.LAVA))\r\n return true;\r\n \r\n if ((world.getBlockAt((int) Math.floor(x), (int) Math.floor(y - 1),(int) Math.floor(z)).getType() == Material.STATIONARY_LAVA))\r\n return true;\r\n \r\n if ((world.getBlockAt((int) Math.floor(x), (int) Math.floor(y - 1),(int) Math.floor(z)).getType() == Material.FIRE))\r\n return true;\r\n \r\n if ((world.getBlockAt((int) Math.floor(x), (int) Math.floor(y),(int) Math.floor(z)).getType() == Material.FIRE))\r\n return true;\r\n \r\n if (blockIsAboveAir(world, x, y, z))\r\n return true;\r\n\r\n return false;\r\n }",
"@Override\n public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xOffset, float yOffset, float zOffset)\n {\n Object tileEntity = world.getTileEntity(x, y, z);\n\n if (tileEntity == null || world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN))\n {\n return true;\n }\n\n\n if (TileEntityARChest.isOcelotBlockingChest(world, x, y, z))\n {\n return true;\n }\n if(this.canDoublechest) {\n if (world.getBlock(x - 1, y, z) == this && (world.isSideSolid(x - 1, y + 1, z, ForgeDirection.DOWN) || TileEntityARChest.isOcelotBlockingChest(world, x - 1, y, z)))\n {\n return true;\n }\n if (world.getBlock(x + 1, y, z) == this && (world.isSideSolid(x + 1, y + 1, z, ForgeDirection.DOWN) || TileEntityARChest.isOcelotBlockingChest(world, x + 1, y, z)))\n {\n return true;\n }\n if (world.getBlock(x, y, z - 1) == this && (world.isSideSolid(x, y + 1, z - 1, ForgeDirection.DOWN) || TileEntityARChest.isOcelotBlockingChest(world, x, y, z - 1)))\n {\n return true;\n }\n if (world.getBlock(x, y, z + 1) == this && (world.isSideSolid(x, y + 1, z + 1, ForgeDirection.DOWN) || TileEntityARChest.isOcelotBlockingChest(world, x, y, z + 1)))\n {\n return true;\n }\n\n\n if (isSameBlock(world, x - 1, y, z))\n {\n tileEntity = new InventoryLargeChest(\"container.chestDouble\", (TileEntityARChest) world.getTileEntity(x - 1, y, z), (IInventory) tileEntity);\n }\n\n if (isSameBlock(world, x + 1, y, z))\n {\n tileEntity = new InventoryLargeChest(\"container.chestDouble\", (IInventory) tileEntity, (TileEntityARChest) world.getTileEntity(x + 1, y, z));\n }\n\n if (isSameBlock(world, x, y, z - 1))\n {\n tileEntity = new InventoryLargeChest(\"container.chestDouble\", (TileEntityARChest) world.getTileEntity(x, y, z - 1), (IInventory) tileEntity);\n }\n\n if (isSameBlock(world, x, y, z + 1))\n {\n tileEntity = new InventoryLargeChest(\"container.chestDouble\", (IInventory) tileEntity, (TileEntityARChest) world.getTileEntity(x, y, z + 1));\n }\n }\n\n if (world.isRemote)\n {\n return true;\n }\n else\n {\n player.displayGUIChest((IInventory) tileEntity);\n return true;\n }\n\n }",
"private void preventMovementInOppositeDirection() {\n\t\tif(currentDirection == Direction.RIGHT && \n\t\t\t\tsnakeDirection == Direction.LEFT) {\n\t\t\t\n\t\t\tcurrentDirection = Direction.LEFT;\n\t\t} else if(currentDirection == Direction.LEFT && \n\t\t\t\tsnakeDirection == Direction.RIGHT) {\n\t\t\t\n\t\t\tcurrentDirection = Direction.RIGHT;\n\t\t} else if(currentDirection == Direction.DOWN && \n\t\t\t\tsnakeDirection == Direction.UP) {\n\t\t\t\n\t\t\tcurrentDirection = Direction.UP;\n\t\t} else if(currentDirection == Direction.UP && \n\t\t\t\tsnakeDirection == Direction.DOWN) {\n\t\t\t\n\t\t\tcurrentDirection = Direction.DOWN;\n\t\t}\n\t}",
"private void halt() {\n robot.leftFront.setPower(0);\n robot.leftBack.setPower(0);\n robot.rightFront.setPower(0);\n robot.rightBack.setPower(0);\n }",
"public boolean isTrapDoor() {\n return this.type == Type.TRAP_DOOR;\n }",
"public void unsetMoveMode(CSGSolid solid)\r\n\t{\r\n\t\tmoveMode = false;\r\n\t\tthis.solid = solid;\r\n\t\tthis.solid2 = null;\r\n\t\tsolid.light();\r\n\t}",
"@Test\r\n\tpublic void testCaughtandThrownIncorrectTrash() throws InterruptedException, AWTException{\n\t\tCollisions collision = new Collisions();\r\n\t\tDebris d = d2;\r\n\t\tMovementController.move(d);\r\n\t\tint d_xpos = d.getPosX();\r\n\t\tint d_ypos = d.getPosY();\r\n\t\tgc.getMainPlayer().updatePos(d_xpos, d_ypos);\r\n\t\tassertTrue(collision.checkCollision(gc.getMainPlayer(),d));\r\n\t\tThread.sleep(500);\r\n\t\td.catching();\r\n\t\tassertEquals(d.getState(), eFloaterState.LIFTED);\r\n\t\t\r\n\t\t\r\n\t\tThrowChoice action1 = gc.new ThrowChoice(eThrowDirection.LEFT, d);\r\n\t\taction1.actionPerformed(new ActionEvent(action1, ActionEvent.ACTION_PERFORMED, null){});\r\n\t\t//ThrowChosen\r\n\t\tThrowChosen action2 = gc.new ThrowChosen(d);\r\n\t\taction2.actionPerformed(new ActionEvent(action2, ActionEvent.ACTION_PERFORMED, null){});\r\n\t\tassertEquals(d.getState(), eFloaterState.THROWING);\r\n\t\t\r\n\t\tspawnDebris action3 = gc.new spawnDebris();\r\n\t\taction3.actionPerformed(new ActionEvent(action3, ActionEvent.ACTION_PERFORMED, null){});\r\n\t\tThread.sleep(2000);\r\n\t\tassertEquals(d.getState(), eFloaterState.HITBIN);\t\r\n\t\t\r\n\t}",
"private void notWorthy(final Player player) {\n\t\tplayer.getInterfaceManager().closeChatBoxInterface();\n\t\tplayer.lock(15);\n\t\tplayer.setNextFaceWorldTile(new WorldTile(3084, 3483, 0));\n\t\tWorldTasksManager.schedule(new WorldTask() {\n\t\t\tint phase = 0;\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfinal int[] randomNPC = { 6935, 3283, 4344, 6966 };\n\t\t\t\tswitch (phase) {\n\t\t\t\tcase 0:\n\t\t\t\t\tplayer.setNextAnimation(new Animation(857));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tplayer.setNextAnimation(new Animation(915));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tplayer.setNextAnimation(new Animation(857));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tplayer.setNextGraphics(new Graphics(86));\n\t\t\t\t\tplayer.getGlobalPlayerUpdater().transformIntoNPC(randomNPC[Utils.random(randomNPC.length - 1)]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tplayer.setNextForceTalk(new ForceTalk(\".... what in Helwyr is going on..!?\"));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tplayer.setNextGraphics(new Graphics(86));\n\t\t\t\t\tplayer.getGlobalPlayerUpdater().transformIntoNPC(-1);\n\t\t\t\t\tplayer.setNextAnimation(new Animation(10070));\n\t\t\t\t\t//player.setNextForceMovement(new ForceMovement(new WorldTile(3084, 3485, 0), 0, 2));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\t//player.setNextWorldTile(new WorldTile(3084, 3485, 0)); TODO find out why force movement doesn't work <.>\n\t\t\t\t\tNPC guard = World.findNPC(5941);\n\t\t\t\t\tsendNPCDialogue(4405, GOOFY_LAUGH, \"Looks like Dahmaroc had a sense of humour!\");\n\t\t \t // player.faceEntity(guard);\n\t\t \t // guard.faceEntity(player);\n\t\t\t\t\tplayer.unlock();\n\t\t\t\t\tstage = 99;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tphase++;\n\t\t\t}\n\t\t}, 0, 2);\n\t}",
"public boolean isSolid() {\n\t\treturn solid;\n\t}",
"public void lowerFuelCell() {\n FuelCell.fuelCellFlipSol = false;\n raiseHopper.set(false);\n lowerHopper.set(true);\n }",
"private void condenseSteam() {\n if (getPressure()> Constants.ATMOSPHERIC_PRESSURE) {\n double boilingPoint = Water.getBoilingTemperature(getPressure());\n if (boilingPoint > steam.getTemperature()) { // remove steam such that it equalizes to the boiling point\n double newSteamPressure = Math.max(Water.getBoilingPressure(steam.getTemperature()), Constants.ATMOSPHERIC_PRESSURE);\n \n\n int newQuantity = steam.getParticlesAtState(newSteamPressure, getCompressibleVolume());\n int deltaQuantity = steam.getParticleNr() - newQuantity;\n if (deltaQuantity < 0) {\n System.out.println(\"BAD\");\n }\n steam.remove(deltaQuantity);\n getWater().add(new Water(steam.getTemperature(), deltaQuantity));\n }\n } \n }",
"void unsetStraight();",
"public boolean renderAsNormalBlock(){\r\n return false;\r\n }",
"private boolean shouldHideInCorner(GameInfo intel) {\n return intel.getNumPlayers() > 2;\n }",
"public boolean isDrooping() {\n return ((((this.leftTheta % 360) + 360) % 360) > 180)\n || ((((this.rightTheta % 360) + 360) % 360) > 180) \n || this.left.isDrooping()\n || this.right.isDrooping(); \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 }",
"@Test\n public void canUseSpecialPowerFalseNoMove() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n //no move\n workerHephaestus.build(nextWorkerCell);\n assertFalse(workerHephaestus.canUseSpecialPower());\n }",
"public boolean isUnlocked() {\n return !isSolid;\n }",
"public void deleteBarrier() {\n if(stater == 3) return;\n stater = 3;\n }",
"void retainOutlineAndBoundaryGrid() {\n\t\tfor (final PNode child : getChildrenAsPNodeArray()) {\n\t\t\tif (child != selectedThumbOutline && child != yellowSIcolumnOutline && child != boundary) {\n\t\t\t\tremoveChild(child);\n\t\t\t}\n\t\t}\n\t\tcreateOrDeleteBoundary();\n\t}",
"public void makesNotHere(){this.piece.unAffect();}",
"public boolean renderAsNormalBlock()\r\n {\r\n return false;\r\n }",
"private void unsetValidMoves() {\n\t\tcurrentPos.setFill(Paint.valueOf(\"Dodgerblue\"));\n\n\t\tif(l.upValid) {\n\t\t\ttmp=layout_Circle[l.y-1][l.x];\n\t\t\ttmp.setFill(Paint.valueOf(\"Dodgerblue\"));\n\t\t}\n\n\t\tif(l.leftValid) {\n\t\t\ttmp=layout_Circle[l.y][l.x-1];\n\t\t\ttmp.setFill(Paint.valueOf(\"Dodgerblue\"));\n\t\t}\n\n\t\tif(l.rightValid) {\n\t\t\ttmp=layout_Circle[l.y][l.x+1];\n\t\t\ttmp.setFill(Paint.valueOf(\"Dodgerblue\"));}\n\t}",
"public void absorbSoul()\n\t{\n\t\tabsorbed = true;\n\t\t\n\t}",
"private void circleCollison() {\n\t\t\n\t}",
"@Override\n public void hitBlock(Block block) {\n if (doorTypes.contains(block.getType())) {\n if (doorMap.containsValue(block)) {\n \tHPS.PM.warn(p, \"That door is already locked.\");\n \treturn;\n }\n \n lockDoor(block);\n \n Block otherDoorBlock = getDoubleDoor(block);\n if (otherDoorBlock != null) {\n \tlockDoor(otherDoorBlock);\n }\n } else {\n HPS.PM.warn(p, \"You may only use this spell on doors.\");\n }\n }",
"public void aapneOgByttFarge() {\n aapne();\n if (!bombe) {\n Color lysegroenn = Color.rgb(86, 130, 3, 0.3);\n setBackground(new Background(new BackgroundFill(lysegroenn, CornerRadii.EMPTY, Insets.EMPTY)));\n }\n }",
"public void trap(int x, int y) {\n\t\tPiece piece = getPiece(x, y);\n\t\tif (piece != null) {\n\t\t\tint color = piece.getColor();\n\t\t\tfriend = false;\n\t\t\tcheck_enemy_and_friend(x - 1, y, 0, color);\n\t\t\tcheck_enemy_and_friend(x + 1, y, 0, color);\n\t\t\tcheck_enemy_and_friend(x, y - 1, 0, color);\n\t\t\tcheck_enemy_and_friend(x, y + 1, 0, color);\n\t\t\tif (!friend) {\n\t\t\t\tpieces.remove(piece);\n\t\t\t\tif (piece.isRabbit()) {//if rabbit decrease rabbitcount\n\t\t\t\t\trabbitcount[piece.getColor()]--;\n\t\t\t\t}\n\t\t\t\tmessage=\"The piece is caught by the trap.\";\n\t\t\t}\n\n\t\t}\n\t}",
"public boolean renderAsNormalBlock()\n {\n return false;\n }",
"private void collapseIgloo() {\n blocks.sort(Comparator.comparing(a -> a.center.getY()));\n\n double minDistance, distance;\n Point3D R = new Point3D(0, -1, 0);\n for (int i = 0; i < blocks.size(); i++) {\n minDistance = Double.MAX_VALUE;\n for (int j = i - 1; j >= 0; j--) {\n if (boundingSpheresIntersect(blocks.get(i), blocks.get(j))) {\n distance = minDistance(blocks.get(i), blocks.get(j), R);\n if (distance < minDistance) {\n minDistance = distance;\n }\n }\n }\n if (minDistance != Double.MAX_VALUE) {\n blocks.get(i).move(R.multiply(minDistance));\n }\n }\n }",
"@Override\n public int weakPowerLevel(int side) {\n if ((side & 6) != (getSide() & 6)) {\n int r = absoluteRot(side);\n if (!maskConnects(r))\n return 0;\n }\n return super.weakPowerLevel(side);\n }",
"public static void testNegate()\n {\n\t Picture thrudoor = new Picture(\"thruDoor.jpg\");\n\t thrudoor.toNegative();\n\t thrudoor.explore();\n }",
"private void scanForBlockFarAway() {\r\n\t\tList<MapLocation> locations = gameMap.senseNearbyBlocks();\r\n\t\tlocations.removeAll(stairs);\r\n\t\tif (locations.size() == 0) {\r\n\t\t\tblockLoc = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/* remove blocks that can be sensed */\r\n\t\tIterator<MapLocation> iter = locations.iterator();\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tMapLocation loc = iter.next();\r\n\t\t\tif (myRC.canSenseSquare(loc))\r\n\t\t\t\titer.remove();\r\n\t\t} \r\n\t\t\r\n\t\tlocations = navigation.sortLocationsByDistance(locations);\r\n\t\t//Collections.reverse(locations);\r\n\t\tfor (MapLocation block : locations) {\r\n\t\t\tif (gameMap.get(block).robotAtLocation == null){\r\n\t\t\t\t/* this location is unoccupied */\r\n\t\t\t\tblockLoc = block;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tblockLoc = null;\r\n\t}",
"public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int meta, float p_149727_7_, float p_149727_8_, float p_149727_9_)\n\t {\n//\t if (this.blockMaterial == Material.iron)\n//\t {\n//\t return false; //Allow items to interact with the door\n//\t }\n//\t else\n//\t {\t \t\n\t int i1 = this.func_150012_g(world, x, y, z);\n\t int j1 = i1 & 7;\n\t j1 ^= 4;\n\t int i = i1 & 3;\n//\t System.out.print(\" Direction :\");\n\t Block b=null;\n\t int x2=x;\n\t int y2=y;\n\t int z2=z;\n\t switch(i){\n\t case 0:\n\t \tif( (i1 & 16)==16){//Left\n\t \t\tx2=x+Facing.offsetsXForSide[2];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[2];\n\t \t\t\n\t \t}else{//Right\n\t \t\tx2=x+Facing.offsetsXForSide[3];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[3];\n\t \t}\n//\t \tSystem.out.print(\"WEST \"+Integer.toString(i, 2)+\" : \"+Integer.toString(4, 2));\n\t \tbreak;\n\t case 1:\n\t \tif( (i1 & 16)==16){//Left\n\t \t\tx2=x+Facing.offsetsXForSide[5];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[5];\n\t \t\t\n\t \t}else{//Right\n\t \t\tx2=x+Facing.offsetsXForSide[4];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[4];\n\t \t}\n//\t \tSystem.out.print(\"NORTH \"+Integer.toString(i, 2)+\" : \"+Integer.toString(2, 2));\n\t \tbreak;\n\t case 2:\n\t \tif( (i1 & 16)==16){//Left\n\t \t\tx2=x+Facing.offsetsXForSide[3];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[3];\n\t \t\t\n\t \t}else{//Right\n\t \t\tx2=x+Facing.offsetsXForSide[2];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[2];\n\t \t}\n\t \t\n//\t \tSystem.out.print(\"EAST \"+Integer.toString(i, 2)+\" : \"+Integer.toString(5, 2));\n\t \tbreak;\n\t case 3:\n\t \tif( (i1 & 16)==16){//Left\n\t \t\tx2=x+Facing.offsetsXForSide[4];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[4];\n\t \t\t\n\t \t}else{//Right\n\t \t\tx2=x+Facing.offsetsXForSide[5];\n\t \t\ty2=y;\n\t \t\tz2=z+Facing.offsetsZForSide[5];\n\t \t}\n//\t \tSystem.out.print(\"SOUTH \"+Integer.toString(i, 2)+\" : \"+Integer.toString(3, 2));\n\t \tbreak;\n\t }\n\t b=world.getBlock(x2, y2, z2);\n//\t System.out.print(\" : \"+b+\" : \");\n\t\t\t\t/*\nDirection :SOUTH 11 : 100 Open :Open Y :1 Side :Right\nDirection :NORTH 01 : 010 Open :Open Y :1 Side :Left\nDirection :EAST 10 : 101 Open :Open Y :1 Side :Left\nDirection :WEST 00 : 100 Open :Open Y :1 Side :Left\n\t\t\t\t */\n//\t System.out.print(\" Open :\"+(((j1 & 4) >> 2)==0?\"Closed\":\"Open\"));\n//\t System.out.print(\" Y :\"+Integer.toBinaryString( (i1 & 8) >>3 ));\n//\t System.out.print(\" Side :\"+(((i1 & 16) >> 4)==0?\"Right\":\"Left\"));\n\t \n//\t System.out.println();\n\t \n\n\t if ((i1 & 8) == 0)\n\t {\n\t world.setBlockMetadataWithNotify(x, y, z, j1, 2);\n\t world.markBlockRangeForRenderUpdate(x, y, z, x, y, z);\n\t if( b!=null && b==this){\n\t \tworld.setBlockMetadataWithNotify(x2, y2, z2, j1, 2);\n\t \t world.markBlockRangeForRenderUpdate(x2, y2, z2, x2, y2, z2);\n\t }\n\t }\n\t else\n\t {\n\t world.setBlockMetadataWithNotify(x, y - 1, z, j1, 2);\n\t world.markBlockRangeForRenderUpdate(x, y - 1, z, x, y, z);\n\t if( b!=null && b==this){\n\t \tworld.setBlockMetadataWithNotify(x2, y2-1, z2, j1, 2);\n\t \t world.markBlockRangeForRenderUpdate(x2, y2-1, z2, x2, y2, z2);\n\t }\n\t }\n\n\t world.playAuxSFXAtEntity(player, 1003, x, y, z, 0);\n\t return true;\n//\t }\n\t }",
"@Override\r\n public boolean onPlace(BlockPlaceEvent event, BlockVector vector) {\n BlockVector doubleDoor = DoorHelper.getSecondIronDoor(vector);\r\n if (doubleDoor == null) {\r\n return false;\r\n }\r\n \r\n // check if there is a protection\r\n Protection protection = Core.protectionManager.getProtection(doubleDoor);\r\n if (protection == null) {\r\n return false;\r\n }\r\n \r\n // check permissions\r\n if (!protection.canEdit(event.getPlayer())) {\r\n PlayerUtils.sendError(event.getPlayer(), Core.NAME, \"You cannot place a door here.\");\r\n PlayerUtils.sendInfo(event.getPlayer(), \"The neighbour is a protected door.\");\r\n event.setCancelled(true);\r\n return true;\r\n }\r\n \r\n // send info\r\n PlayerUtils.sendInfo(event.getPlayer(), Core.NAME, \"Subprotection created.\");\r\n \r\n // return true to abort the event\r\n return true;\r\n }",
"public boolean isTrap(int x, int y){\n return board[x][y] == Area.TRAP;\r\n }",
"private void cutoutBlocks(MetropolisGenerator generator, Cartesian v, Cartesian s, Material floor) {\n int xdir, ydir, zdir;\n xdir = s.X < 0 ? -1 : 1;\n ydir = s.Y < 0 ? -1 : 1;\n zdir = s.Z < 0 ? -1 : 1;\n \n for (int x = 0; Math.abs(x) < Math.abs(s.X); x += xdir) {\n for (int z = 0; Math.abs(z) < Math.abs(s.Z); z += zdir) {\n for (int y = 0; Math.abs(y) < Math.abs(s.Y); y += ydir) {\n generator.getWorld().getBlockAt(v.X + x, v.Y + y, v.Z + z).setType(Material.AIR);\n }\n Block below = generator.getWorld().getBlockAt(v.X + x, v.Y - 1, v.Z + z);\n if (!below.isEmpty()) {\n generator.getWorld().getBlockAt(v.X + x, v.Y - 1, v.Z + z).setType(floor);\n }\n }\n }\n }",
"@Test\n public void testTankMovingOutsideBoundaries() {\n tank.moveRight();\n tank.notMoveLeft();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n assertEquals(tank.x(), 460);\n\n tank.moveLeft();\n tank.notMoveRight();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n\n assertEquals(tank.x(), 180);\n }",
"@Override\n\tpublic boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {\n\t\tif (player.getHeldItem() != null) {\n\t\t\tif (player.getHeldItem().getItem() == Items.iron_pickaxe) {\n\t\t\t\tplayer.getHeldItem().damageItem(100, player);\n\t\t\t\tfor (int i = -10; i < 10; i++) {// xval\n\t\t\t\t\tfor (int j = 0; j < 2; j++)\n\t\t\t\t\t\t// yval\n\t\t\t\t\t\tworld.setBlockToAir(x + i, y + j, z);\n\t\t\t\t}\n\n\t\t\t\tfor (int i = -10; i < 10; i++) {\n\t\t\t\t\tfor (int j = 0; j < 2; j++)\n\t\t\t\t\t\t// yval\n\t\t\t\t\t\tworld.setBlockToAir(x, y + j, z + i);\n\t\t\t\t}\n\t\t\t\t// player.getHeldItem().damageItem(100, player);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {//if hand empty\n\t\t\tplayer.addChatMessage(new ChatComponentText(\"[NausicaaMod]This block digs 10x2x1 mineshafts in all 4 directions\"));\n\t\t\tplayer.addChatMessage(new ChatComponentText(\"**DISTROYS BLOCK WITH NO DROPS**\"));\n\n\t\t}\n\t\treturn false;\n\t}",
"@SuppressWarnings(\"deprecation\")\n\t@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled=true) \n\tpublic void onPhysics(BlockPhysicsEvent e) {\n\t\tBlock block = e.getBlock();\n\t\tMaterial chMat = block.getType(); //getChangedType();\n\t\tLocation loc = block.getLocation();\n\t\tboolean checkBreak = false;\n\t\tif (maybeTracked(chMat) && !pendingChecks.contains(loc)) { // do we even slightly care?\n\t\t\t// Check light levels.\n\t\t\tif (Material.CROPS.equals(chMat) || Material.POTATO.equals(chMat) || Material.CARROT.equals(chMat) || Material.BEETROOT.equals(chMat)) {\n\t\t\t\tif (block.getLightLevel() < 8) {\n\t\t\t\t\tcheckBreak = true;\n\t\t\t\t}\n\t\t\t} else if (Material.RED_MUSHROOM.equals(chMat) || Material.BROWN_MUSHROOM.equals(chMat)) {\n\t\t\t\tBlock below = block.getRelative(BlockFace.DOWN);\n\t\t\t\tMaterial belowM = below.getType();\n\t\t\t\tif (!Material.MYCEL.equals(belowM) && !Material.DIRT.equals(belowM)) {\n\t\t\t\t\tcheckBreak = true;\n\t\t\t\t} else if (Material.DIRT.equals(belowM) && below.getData() != 2) {\n\t\t\t\t\tcheckBreak = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (checkBreak) {\n\t\t\tpendingChecks.add(loc);\n\t\t\thandleBreak(block, BreakType.PHYSICS, null, null);\n\t\t} else { // we haven't found a break condition yet. However, what follows aren't light level checks but rather\n\t\t\t// block checks, so these are controlled by a variety of rules. Some involve physics firing _adjacent_ to the block.\n\t\t\t// Basically it's a crapshoot.\n\t\t\tif (Material.SUGAR_CANE.equals(e.getChangedType())) {\n\t\t\t\t// Sugarcane winds up being weird. I'm still not sure what event fires and removes the bottom block but for\n\t\t\t\t// unattended (non-player) breaks physics events remove middle and top blocks. So, we just register\n\t\t\t\t// breaks for lower and upper blocks and if they are gone, we know it then.\n\t\t\t\t//\n\t\t\t\t// Note this will leave singular base blocks undetected. TODO\n\t\t\t\tif (chMat.equals(e.getChangedType())) {\n\t\t\t\t\tfor (BlockFace a : CropControlEventHandler.traverse) {\n\t\t\t\t\t\tLocation adjL = block.getRelative(a).getLocation();\n\t\t\t\t\t\tif (!pendingChecks.contains(adjL)) {\n\t\t\t\t\t\t\tpendingChecks.add(adjL);\n\t\t\t\t\t\t\t// So, the physics check can take a tick to resolve. We mark our interest but defer resolution.\n\t\t\t\t\t\t\tBukkit.getScheduler().runTaskLater(CropControl.getPlugin(), new Runnable() {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\thandleBreak(adjL.getBlock(), BreakType.PHYSICS, null, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, 1L);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (Material.CACTUS.equals(e.getChangedType())) {\n\t\t\t\tif (chMat.equals(e.getChangedType())) return; // handled elsewhere\n\t\t\t\t\n\t\t\t\t// Cactus is a little simpler. It breaks on adjacent placements; that's what would trigger this event. \n\t\t\t\tfor (BlockFace face : CropControlEventHandler.directions) {\n\t\t\t\t\t// We look around face-adjacent places and trigger a break-check for any cactus found.\n\t\t\t\t\tBlock adj = block.getRelative(face);\n\t\t\t\t\tMaterial adjM = adj.getType();\n\t\t\t\t\tLocation adjL = adj.getLocation();\n\t\t\t\t\tif (Material.CACTUS == adjM && !pendingChecks.contains(adjL)) {\n\t\t\t\t\t\tpendingChecks.add(adjL);\n\t\t\t\t\t\t// So, the physics check can take a tick to resolve. We mark our interest but defer resolution.\n\t\t\t\t\t\tBukkit.getScheduler().runTaskLater(CropControl.getPlugin(), new Runnable() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\thandleBreak(adj, BreakType.PHYSICS, null, null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 1L);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (Material.CHORUS_FLOWER.equals(e.getChangedType()) || Material.CHORUS_PLANT.equals(e.getChangedType())) {\n\t\t\t\t// TODO: this one is complicated; it's more like sugarcane I guess? Still need rules.\n\t\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 boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side)\n\t{\n\t\treturn true;\n\t}",
"public boolean isDrooping() {\n return (((this.theta % 360) + 360) % 360) > 180\n || tree.isDrooping();\n }",
"public static void fixCannon(ClientContext ctx) {\n GameObject cannon = ctx.objects.select(new Filter<GameObject>() {\n @Override\n public boolean accept(GameObject gameObject) {\n return gameObject.name().toLowerCase().contains(\"broken\");\n }\n }).nearest().poll();\n\n if (cannon.inViewport()) {\n cannon.interact((\"Repair\"));\n sleep(3000);\n }\n }",
"@Override\n\tpublic boolean isAWin(int side) {\n\t\treturn false;\n\t}",
"private void turnAround() {\n d = Math.random();\n if (d < 0.1) {\n changeAppearance();\n }\n }",
"public void breakWall() {\r\n\tbustedWall = true;\r\n}",
"public void makeInvisible()\n {\n wall.makeInvisible();\n roof.makeInvisible();\n window.makeInvisible();\n }",
"protected EvilFigure() {\r\n side = EVIL;\r\n }",
"public void joystickDeadZone() {\n\t\tif (joystickLXAxis <= 0.075 && joystickLXAxis >= -0.075) {\n\t\t\tjoystickLXAxis = 0;\n\t\t} if (joystickLYAxis <= 0.075 && joystickLYAxis >= -0.075) {\n\t\t\tjoystickLYAxis = 0;\n\t\t}\n\t\tif (joystickRXAxis <= 0.075 && joystickRXAxis >= -0.075) {\n\t\t\tjoystickRXAxis = 0;\n\t\t} if (joystickRYAxis <= 0.075 && joystickRYAxis >= -0.075) {\n\t\t\tjoystickRYAxis = 0;\n\t\t}\n\t}",
"@Override\n\tpublic boolean onValidSurface()\n\t{\n\t\tif (!this.worldObj.getCollidingBoundingBoxes(this, this.getEntityBoundingBox()).isEmpty())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint i = Math.max(1, this.blocksToTakeUp());\n\t\t\tint j = Math.max(1, this.blocksToTakeUp());\n\t\t\tBlockPos blockpos = this.hangingPosition.offset(this.facingDirection.getOpposite());\n\t\t\tEnumFacing enumfacing = this.facingDirection.rotateYCCW();\n\n\t\t\tfor (int k = -i / 2 + 1; k < i / 2 + 1; ++k)\n\t\t\t{\n\t\t\t\tfor (int l = -j / 2 + 1; l < j / 2 + 1; ++l)\n\t\t\t\t{\n\t\t\t\t\tBlockPos blockpos1 = blockpos.offset(enumfacing, k).up(l);\n\t\t\t\t\tBlock block = this.worldObj.getBlockState(blockpos1).getBlock();\n\n\t\t\t\t\tif (block.isSideSolid(this.worldObj, blockpos1, this.facingDirection))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tif (!block.getMaterial().isSolid() && !BlockRedstoneDiode.isRedstoneRepeaterBlockID(block))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (Entity entity : this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.getEntityBoundingBox()))\n\t\t\t{\n\t\t\t\tif (entity instanceof EntityHanging)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t}",
"public void stealStick(Warrior w){\n\t\tSystem.out.println(w.getName()+ \" has caught by Innocent Monster \"+ this.getName());\n\t\tWalkingStick ws = w.looseStick();\n\t\tStolenSticks.add(ws);\n\t}",
"@Override\n protected void interrupted() {\n Robot.drive.setCoastMode();\n Robot.tapeAlignSys.disable();\n Robot.lidarAlignSys.disable();\n }",
"public boolean intracellular(Walker walker){\r\n \r\n // cast walker as StickyWalker (should always work)\r\n StickyWalker stWalker= (StickyWalker)walker;\r\n \r\n if(stWalker.free){\r\n // if free, use the usual check\r\n return super.intracellular(walker);\r\n }\r\n \r\n // otherwise return the walker's original compartment\r\n return !stWalker.wasExtracellular;\r\n }",
"@Test\n\tpublic void testIfForbriddenSelfKill() {\n\t\tboard.commitMove(new Point(0,2), 1);\n\t\tboard.commitMove(new Point(1,1), 1);\n\t\tboard.commitMove(new Point(2,2), 1);\n\t\tboard.commitMove(new Point(1,3), 1);\n\t\tassertNotEquals(0, board.commitMove(new Point(1,2), 0));\n\t}",
"public void setSolid(boolean solid) {\n\t\tthis.solid = solid;\n\t}"
] | [
"0.6153306",
"0.6079912",
"0.60261786",
"0.6003666",
"0.59897494",
"0.59471655",
"0.59247863",
"0.5806722",
"0.5785077",
"0.5732289",
"0.5688904",
"0.56848437",
"0.5664574",
"0.56371385",
"0.56371385",
"0.5636119",
"0.5633807",
"0.5618405",
"0.5596161",
"0.5595286",
"0.55935293",
"0.5591839",
"0.5565993",
"0.5555589",
"0.5544724",
"0.5544296",
"0.552453",
"0.5523898",
"0.5519229",
"0.5511414",
"0.5494927",
"0.54902023",
"0.54853547",
"0.547708",
"0.5476538",
"0.54580075",
"0.5449793",
"0.54419076",
"0.54322237",
"0.5406765",
"0.5382965",
"0.53803307",
"0.53667337",
"0.5359197",
"0.535878",
"0.53581303",
"0.53552246",
"0.535395",
"0.534694",
"0.53398806",
"0.5332415",
"0.5329348",
"0.5327961",
"0.5327285",
"0.53144336",
"0.53068817",
"0.5296522",
"0.5290635",
"0.52848244",
"0.5281459",
"0.5275838",
"0.5271854",
"0.5271726",
"0.5258777",
"0.525336",
"0.52515364",
"0.5248311",
"0.52462894",
"0.524096",
"0.52404964",
"0.52392036",
"0.5239188",
"0.52320236",
"0.52313",
"0.522784",
"0.5226056",
"0.5225471",
"0.52034885",
"0.52010626",
"0.5200966",
"0.5200092",
"0.5199804",
"0.51995736",
"0.51995057",
"0.5198002",
"0.5189238",
"0.51886714",
"0.51885873",
"0.5187746",
"0.5186616",
"0.51836187",
"0.5171785",
"0.51655495",
"0.5164655",
"0.51619107",
"0.5161438",
"0.5160068",
"0.51531047",
"0.5152649",
"0.51489854"
] | 0.5580563 | 22 |
Correct trapdoor direction/facing with borrowed dispenser/furnace code. Uses different values for meta, so be careful if you reuse it. | @Override
public void afterPlaced(Level level, int x, int y, int z, Living living) {
if (doPlayerBasedRotation) {
int rotation = MathHelper.floor((double) (living.yaw * 4.0F / 360.0F) + 0.5D) & 3;
int[] magic = {0, 3, 1, 2};
level.setTileMeta(x, y, z, magic[rotation]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void fixDirections() {\n\t\tdouble sensDir = sens.getDirection();\n\t\tif (sensDir > 360) {\n\t\t\tsensDir -= 360;\n\t\t} // Rotate back around to keep it tidy\n\t\telse if (sensDir < 1) {\n\t\t\tsensDir += 360;\n\t\t}\n\t\tsens.setDirection(sensDir);\n\n\t\tif (desiredDirection > 360) {\n\t\t\tdesiredDirection -= 360;\n\t\t} // Rotate back around to keep it tidy\n\t\telse if (desiredDirection < 1) {\n\t\t\tdesiredDirection += 360;\n\t\t}\n\t}",
"public Direction getCorrectRobotDirection();",
"private void setDirection() {\r\n\t\tif (destinationFloor > initialFloor){\r\n\t\t\tdirection = 1;\r\n\t\t} else {\r\n\t\t\tdirection = -1;\r\n\t\t}\r\n\t}",
"public void directionRestriction(){\n \t\n }",
"public abstract boolean facingRight();",
"public void strafeRight()\r\n\t{\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] += Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] += Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}",
"private void computeFacing() {\n\t\tfacing = GeometryUtil.getAngle(p1, p2) + 90;\n\t}",
"private void updateDesiredDirection() {\n\t\t/* http://www.cs.mcgill.ca/~hsafad/robotics/, accessed 28/02/16 */\n\n\t\t// First, set all seen bots' charge to -VE, all on LEDs to +VE, all off LEDs to 0.0D\n\t\tpopulateCharges();\n\t\t\n\t\t// VARIABLES\n\t\tdouble dirX = 0.0D; // relative dirX and dirY that the bot will need to face\n\t\tdouble dirY = 0.0D; \n\t\tdouble dx = 0.0D;\t// used to calculate each push/pull force, added to dirX, dirY\n\t\tdouble dy = 0.0D;\n\t\tdouble targetCharge = 0.0D;\t// charge of current target bot / led\n\t\tdouble minS = 50;\n\t\tdouble distSq = 0.0D;\t// distance^2 to bot/led\n\t\tdouble safety = 0.0D;\n\t\tdouble norm = 0.0D;\n\t\t\n\t\tfor (int i = 0; i < seenCharges.size(); i++) {\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t// now, update direction depending on charges\n\t\t\t\tif (seenCharges.get(i) instanceof Bot) {\n\t\t\t\t\t\t\n\t\t\t\t\ttargetCharge = ((Bot) seenCharges.get(i)).getCharge();\n\t\t\t\t\tdistSq = sens.getDistanceTo((Bot) seenCharges.get(i));\n\t\t\t\t\tdistSq = distSq * distSq;\n\t\t\t\t\t\n\t\t\t\t\t// calculated forces\n\t\t\t\t\tdx = targetCharge * (((Bot) seenCharges.get(i)).getX() - this.getX()) / distSq;\n\t\t\t\t\tdy = targetCharge * (((Bot) seenCharges.get(i)).getY() - this.getY()) / distSq;\n\n\t\t\t\t\t// add calculated forces to overall direction so far\n\t\t\t\t\tdirX += dx;\n\t\t\t\t\tdirY += dy;\n\t\t\t\t\t\n\t\t\t\t\tsafety = distSq / ((dx*dirX + dy*dirY));\n\t\t\t\t\tif ((safety > 0) && (safety < minS)) { minS = safety; }\n\t\t\t\t\t\t\n\t\t\t\t} else if ((seenCharges.get(i) instanceof LED)) {\n\t\t\t\t\n\t\t\t\t\ttargetCharge = ((LED) seenCharges.get(i)).getCharge();\n\t\t\t\t\t\n\t\t\t\t\tif (targetCharge != 0.0D) { \n\t\t\t\t\t\t\n\t\t\t\t\t\tdistSq = sens.getDistanceTo((LED) seenCharges.get(i));\n\t\t\t\t\t\tdistSq = distSq * distSq;\n\n\t\t\t\t\t\t// calculated forces\n\t\t\t\t\t\tdx = targetCharge * (((LED) seenCharges.get(i)).getTargetX() - this.getX()) / distSq;\n\t\t\t\t\t\tdy = targetCharge * (((LED) seenCharges.get(i)).getTargetY() - this.getY()) / distSq;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add calculated forces to overall direction so far\n\t\t\t\t\t\tdirX += dx;\n\t\t\t\t\t\tdirY += dy;\n\t\t\t\t\t\t\n\t\t\t\t\t\tsafety = distSq / ((dx*dirX + dy*dirY));\n\t\t\t\t\t\tif ((safety > 0) && (safety < minS)) { minS = safety; }\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (minS < 5) {\n\t\t\t\t\t\t\ttargetCharge *= minS/5;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t\tif (minS > 50) {\n\t\t\t\t\t\t\ttargetCharge *= minS/50;\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\t} else {\n\t\t\t\t\tSystem.out.println(\"ERROR: unknown seenCharges item \"+i);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// calculate vector normal, apply to dirX, dirY\n\t\tnorm = Math.sqrt(dirX*dirX + dirY*dirY);\n\t\tdirX = dirX / norm;\n\t\tdirY = dirY / norm;\n\t\t\n\t\t// set desired direction if it calculates a number\n\t\tif (dirX == (double) dirX && dirY == (double) dirY) {\n\t\t\tthis.setDesiredDirection(sens.getDirectionTo(dirX + sens.getXPos(), dirY + sens.getYPos()));\n\t\t}\n\t}",
"private void turnToDesiredDirection() {\n\n\t\tdouble dir = sens.getDirection();\n\n\t\tif (dir < desiredDirection) {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t}\n\t\t} else {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t}\n\t\t}\n\t\t\n\t\tsens.setDirection(dir);\n\t\t\n\t}",
"private void updatePassingTrap(MyAIController controller, Coordinate pos, WorldSpatial.Direction orientation) {\n\t\tif (!map.trapsAhead(pos, orientation) && !map.tileAt(pos).isTrap()) {\n\t\t\tcontroller.resetSpeedTarget();\n\t\t\tstate = ExplorerState.WALL_FOLLOWING;\n\t\t} else {\n\t\t\tcontroller.setSpeedTarget(3);\n\t\t}\n\t}",
"protected abstract void fixChassis();",
"private void checkFlipDirection()\n\t{\n\t\tif (currentFloor == 0) //Are we at the bottom?\n\t\t\tcurrentDirection = Direction.UP; //Then we must go up\n\t\tif (currentFloor == (ElevatorSystem.getNumberOfFloors() - 1)) //Are we at the top?\n\t\t\tcurrentDirection = Direction.DOWN; //Then we must go down\n\t}",
"public float getDirection();",
"public abstract int getDirection();",
"void changeDirection();",
"protected boolean canUseOtherDirection() {\n return false;\n }",
"public ForgeDirection toForgeDirection()\n {\n for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS)\n {\n if (this.x == direction.offsetX && this.y == direction.offsetY && this.z == direction.offsetZ)\n {\n return direction;\n }\n }\n\n return ForgeDirection.UNKNOWN;\n }",
"double find_cg_xpos () { // vertical ref point is fuse level (at ref_point_xpos)\n double lift = foil_lift();\n double drag = total_drag();\n\n double driving_force = drag; // drag equals driving force - steady equilibrium condition\n\n // driving_arm for rider tranferring the force to the board is subtle:\n // When the riders transfers the driving force from hands/harness into\n // the board, the derived vertical driving arm is at the board deck\n // height. the rider applies the weight there also at certain\n // location. when drive is not through rider's body, then the arm is\n // that plus DRIVING_FORCE_HEIGHT\n double pitch_rad = Math.toRadians(craft_pitch);\n // driving_arm is pitch-corrected vertical distance from the origin. To\n // recap, the origin is chosen, arbitrarily, to be at the top of mast LE.\n double rider_eff_cg_pos_arm = (Math.cos(pitch_rad)*(strut.span + BOARD_THICKNESS) + \n -dash.cg_pos * // remember that the 'fore' direction is negative and this 'extends the arm'\n Math.sin(pitch_rad) );\n double driving_arm = \n craft_type != EFOIL \n ? rider_eff_cg_pos_arm\n : (Math.cos(pitch_rad)*DRIVING_FORCE_HEIGHT);\n double rider_air_resistance_arm = rider_eff_cg_pos_arm + RIDER_CG_HEIGHT;\n\n // strut_drag_arm\n double strut_drag_arm = // TODO angle correction\n (1- alt_val/100) * strut.span * // this is the length of water immersed section fo the strut.\n 0.5; // drag center is at the center of the immersed section\n\n // the moments caused by the drag of the wings and the fuse (but not the\n // strut) can be for now ignored thanks to the ref point chosen; more\n // accurate calc shoud include (a) craft AoA and (b) Z offsetts to calc\n // that. double wing_drag_moment = 0, stab_drag_moment = 0,\n // fuse_drag_moment = 0;\n \n // board weight arm is board weight location length minus mast LE to transom\n // TODO angle correction \n double board_arm = // tangential arm at 90 degrees to gravity\n BOARD_CG_K * BOARD_LENGTH - MAST_LE_TO_TRANSOM;\n\n double rig_arm = WS_MASTBASE_MAST_LE/2; // approx // TODO angle correction\n\n // drive_moment: for kite or sail it is always CCW (we look from the\n // left side). for EFOIL driving_arm is a negative value, so effectively\n // drive_moment becomes CW-rotating, and as the result would cause more\n // pronounced displacementof the driver body forward as the speed\n // increses, augmented by the wind drag on the body.\n double drive_moment = \n in.opts.ignore_drive_moment ? 0 : driving_force * driving_arm;\n double rider_air_resistance_moment = rider_air_resistance_arm * rider.drag;\n double board_drag_moment = (rider_eff_cg_pos_arm - BOARD_THICKNESS/2) // aprrox\n * board.drag;\n\n double strut_drag_moment = in.opts.ignore_drag_moments ? 0 : strut.drag * strut_drag_arm;\n double board_vert_moment = BOARD_WEIGHT * board_arm;\n double rig_moment = RIG_WEIGHT * rig_arm;\n double foils_Cm_moments = // all same sign because all rotate 'in plane'\n convert_moments_to_AC_offset \n ? 0\n : (wing.moment +\n stab.moment + \n fuse.moment);\n\n // Suppose rider_moment is +CW, it is with the arm towards the transom from mast bottom LE.\n // rider_moment + CW_moments = CCW_moments ==>\n // rider_arm = (CCW_moments - CW_moments) / load\n // where load is not rider's weigth but the load value (from the load slider)\n //\n // \n double load = FoilBoard.this.load; \n\n // non-flying motion\n boolean non_flying = load > lift;\n\n if (non_flying) { \n // load = lift; // Ok idea but not ideal\n // here is better idea: when non_flying, the board provides the remaining lift\n double board_lift_arm = // tangential arm at 90 degrees to gravity\n BOARD_HYDRO_LIFT_LOC * BOARD_LENGTH - MAST_LE_TO_TRANSOM;\n \n board_vert_moment = (BOARD_WEIGHT - (load - lift)) * board_lift_arm;\n }\n\n // this was named mast_le_xpos when ref point was mast le, which is strut.xpos.\n double ref_point_xpos = strut.xpos; \n \n double CW_moments = // +CW ClockWise rotation \n (in.opts.ignore_aux_weight_moments ? 0 : board.drag * (strut.span + BOARD_THICKNESS/2)) +\n rider.drag * (strut.span + BOARD_THICKNESS + RIDER_CG_HEIGHT) + // aprox center of body aero drag\n strut_drag_moment + \n foils_Cm_moments + // any positive Cm pitches nose up therefore CW in this 'view'\n wing.lift * - (wing.xpos + wing.chord_xoffs \n + wing.compute_lift_pos()\n - ref_point_xpos) + // TODO angle correction\n fuse.lift * - (/*fuse.xpos is 0*/ + fuse.compute_lift_pos() - ref_point_xpos); // TODO angle correction\n\n double CCW_moments = // CCW means CounterClockWise rotation, it is -CW\n drive_moment +\n stab.lift * (stab.xpos + stab.chord_xoffs + stab.compute_lift_pos() - ref_point_xpos) + // TODO angle correction\n (in.opts.ignore_aux_weight_moments \n || non_flying // this help to keep the rider over the board and not behind when drive is very light\n ? 0 \n : board_vert_moment + rig_moment);\n\n // if we decide to include prorated rider-mast calcs here \n // load = load*(1-load_distribution_to_mast_loc)\n //\n // what is rider_arm?? this is the horisontal offset in space from the\n // reference point, which is where mast LE meets fuse, where the rider\n // shoudl apply teh gravity weight. this (a) does not translate to\n // where mast LE meets the board because soem masts are not\n // perpendicular (b) even for perpendicular mast/board, this is different at board level unless AoA is zero. \n double rider_arm = (CCW_moments - CW_moments) / load;\n\n // March 2021: warning: I forgot what it is and how non_flying affects this.\n // note that as of now, it is not used in simulation... \n dash.cg_pos_of_rider_at_drive_height = ((CCW_moments + driving_force*DRIVING_FORCE_HEIGHT) // adjust for drive height\n - CW_moments) / load;\n\n return rider_arm;\n \n }",
"public void handleFoyerMove(String direction) {\n\t\t\n\t\tif(direction.equals(EAST))\n\t\t\tcurrentLocation = \"kitchen\";\n\t\telse\n\t\t\tSystem.out.println(\" cant get there from here... \");\n\t\t\n\t\t// presumably other options - ...\n\t\t\n\t\t\n\t}",
"public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }",
"public double getDirectionFace();",
"void updateMotion(boolean altitudeLock)\n {\n \n ascendDescendLift:\n {\n // as pitch and roll increases, lift decreases by fall-off function.\n\t // thrust.y ranges from 0 to 1. at 1, almost perfectly balances gravity\n\t \n //thrust.y = MathHelper.cos(pitchRad) * MathHelper.cos(rollRad);\n thrust.y = MathHelper.cos(pitchRad) * MathHelper.cos(rollRad) * MathHelper.cos(rollRad);\n }\n\n forwardBack:\n {\n // as pitch increases, forward-back motion increases\n // but sin function was too touchy so using 1-cos\n float accel = 1f - MathHelper.cos(pitchRad);\n if (pitchRad > 0f) accel *= -1f;\n \n thrust.x = -fwd.x * accel;\n thrust.z = -fwd.z * accel;\n \n // also adjust y in addition to ascend/descend to simulate diving\n thrust.y += -fwd.y * accel * .3f;\n }\n\n strafeLeftRight:\n {\n // float strafe = -MathHelper.sin(roll);\n float strafe = 1f - MathHelper.cos(rollRad);\n if (rollRad > 0f) strafe *= -1f;\n\n // use perp of yaw and scale by roll\n thrust.x -= fwd.z * strafe;\n thrust.z += fwd.x * strafe;\n }\n\n // start with current velocity\n velocity.set((float)motionX, (float)motionY, (float)motionZ);\n\n // friction, very little!\n velocity.scale(FRICTION);\n\n // scale thrust by current throttle and delta time\n //thrust.normalize().scale(MAX_ACCEL * (1f + throttle) * deltaTime / .05f);\n thrust.normalize().scale(MAX_ACCEL * (1f + throttle) * deltaTime / .05f);\n\n // apply the thrust\n Vector3.add(velocity, thrust, velocity);\n\n // gravity is always straight down\n //if (!inWater && !onGround) velocity.y -= GRAVITY * deltaTime / .05f;\n velocity.y -= GRAVITY * deltaTime / .05f;\n\n // limit max velocity\n if (velocity.lengthSquared() > MAX_VELOCITY * MAX_VELOCITY)\n {\n velocity.scale(MAX_VELOCITY / velocity.length());\n }\n\n // apply velocity changes\n motionX = (double) velocity.x;\n motionY = (double) velocity.y;\n motionZ = (double) velocity.z;\n \n if (altitudeLock && riddenByEntity != null)\n {\n motionY *= .9;\n if (motionY < .00001) motionY = .0;\n }\n \n moveEntity(motionX, motionY, motionZ);\n }",
"public void updateDirectionFace();",
"public void strafeLeft(){\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}",
"public void adjustShooterAngleManual() {\n\n // If the driver pushes the Square Button on the PS4 Controller,\n // set the worm drive motors to go backwards (lower it).\n if (PS4.getRawButton(PS4_X_BUTTON) == true) {\n\n wormDriveMotors.set(-0.2);\n\n // If the driver pushes the Triangle Button on the PS4 Controller,\n // set the worm drive motors to go forwards (raise it up).\n } else if (PS4.getRawButton(PS4_SQUARE_BUTTON) == true) {\n\n wormDriveMotors.set(0.4);\n }\n\n // If the driver is an idiot and is pressing BOTH the Square Button AND the\n // Triangle Button at the same time, OR (||) if the driver is pushing neither\n // button, set the motor speed to 0.\n else if (((PS4.getRawButton(PS4_X_BUTTON) == true) && (PS4.getRawButton(PS4_SQUARE_BUTTON) == true))\n || ((PS4.getRawButton(PS4_X_BUTTON) == false) && (PS4.getRawButton(PS4_SQUARE_BUTTON) == false))) {\n\n wormDriveMotors.set(0);\n }\n\n }",
"@android.annotation.TargetApi(17)\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void resolveLayoutDirection(int r6) {\n /*\n r5 = this;\n int r0 = r5.leftMargin\n int r1 = r5.rightMargin\n super.resolveLayoutDirection(r6)\n r6 = -1\n r5.ad = r6\n r5.ae = r6\n r5.ab = r6\n r5.ac = r6\n r5.af = r6\n r5.ag = r6\n int r2 = r5.t\n r5.af = r2\n int r2 = r5.v\n r5.ag = r2\n float r2 = r5.z\n r5.ah = r2\n int r2 = r5.a\n r5.ai = r2\n int r2 = r5.b\n r5.aj = r2\n float r2 = r5.c\n r5.ak = r2\n int r2 = r5.getLayoutDirection()\n r3 = 0\n r4 = 1\n if (r4 != r2) goto L_0x0036\n r2 = 1\n goto L_0x0037\n L_0x0036:\n r2 = 0\n L_0x0037:\n if (r2 == 0) goto L_0x00ac\n int r2 = r5.p\n if (r2 == r6) goto L_0x0043\n int r2 = r5.p\n r5.ad = r2\n L_0x0041:\n r3 = 1\n goto L_0x004c\n L_0x0043:\n int r2 = r5.q\n if (r2 == r6) goto L_0x004c\n int r2 = r5.q\n r5.ae = r2\n goto L_0x0041\n L_0x004c:\n int r2 = r5.r\n if (r2 == r6) goto L_0x0055\n int r2 = r5.r\n r5.ac = r2\n r3 = 1\n L_0x0055:\n int r2 = r5.s\n if (r2 == r6) goto L_0x005e\n int r2 = r5.s\n r5.ab = r2\n r3 = 1\n L_0x005e:\n int r2 = r5.x\n if (r2 == r6) goto L_0x0066\n int r2 = r5.x\n r5.ag = r2\n L_0x0066:\n int r2 = r5.y\n if (r2 == r6) goto L_0x006e\n int r2 = r5.y\n r5.af = r2\n L_0x006e:\n r2 = 1065353216(0x3f800000, float:1.0)\n if (r3 == 0) goto L_0x0078\n float r3 = r5.z\n float r3 = r2 - r3\n r5.ah = r3\n L_0x0078:\n boolean r3 = r5.Y\n if (r3 == 0) goto L_0x00dc\n int r3 = r5.S\n if (r3 != r4) goto L_0x00dc\n float r3 = r5.c\n r4 = -1082130432(0xffffffffbf800000, float:-1.0)\n int r3 = (r3 > r4 ? 1 : (r3 == r4 ? 0 : -1))\n if (r3 == 0) goto L_0x0092\n float r3 = r5.c\n float r2 = r2 - r3\n r5.ak = r2\n r5.ai = r6\n r5.aj = r6\n goto L_0x00dc\n L_0x0092:\n int r2 = r5.a\n if (r2 == r6) goto L_0x009f\n int r2 = r5.a\n r5.aj = r2\n r5.ai = r6\n r5.ak = r4\n goto L_0x00dc\n L_0x009f:\n int r2 = r5.b\n if (r2 == r6) goto L_0x00dc\n int r2 = r5.b\n r5.ai = r2\n r5.aj = r6\n r5.ak = r4\n goto L_0x00dc\n L_0x00ac:\n int r2 = r5.p\n if (r2 == r6) goto L_0x00b4\n int r2 = r5.p\n r5.ac = r2\n L_0x00b4:\n int r2 = r5.q\n if (r2 == r6) goto L_0x00bc\n int r2 = r5.q\n r5.ab = r2\n L_0x00bc:\n int r2 = r5.r\n if (r2 == r6) goto L_0x00c4\n int r2 = r5.r\n r5.ad = r2\n L_0x00c4:\n int r2 = r5.s\n if (r2 == r6) goto L_0x00cc\n int r2 = r5.s\n r5.ae = r2\n L_0x00cc:\n int r2 = r5.x\n if (r2 == r6) goto L_0x00d4\n int r2 = r5.x\n r5.af = r2\n L_0x00d4:\n int r2 = r5.y\n if (r2 == r6) goto L_0x00dc\n int r2 = r5.y\n r5.ag = r2\n L_0x00dc:\n int r2 = r5.r\n if (r2 != r6) goto L_0x012e\n int r2 = r5.s\n if (r2 != r6) goto L_0x012e\n int r2 = r5.q\n if (r2 != r6) goto L_0x012e\n int r2 = r5.p\n if (r2 != r6) goto L_0x012e\n int r2 = r5.f\n if (r2 == r6) goto L_0x00fd\n int r2 = r5.f\n r5.ad = r2\n int r2 = r5.rightMargin\n if (r2 > 0) goto L_0x010d\n if (r1 <= 0) goto L_0x010d\n r5.rightMargin = r1\n goto L_0x010d\n L_0x00fd:\n int r2 = r5.g\n if (r2 == r6) goto L_0x010d\n int r2 = r5.g\n r5.ae = r2\n int r2 = r5.rightMargin\n if (r2 > 0) goto L_0x010d\n if (r1 <= 0) goto L_0x010d\n r5.rightMargin = r1\n L_0x010d:\n int r1 = r5.d\n if (r1 == r6) goto L_0x011e\n int r6 = r5.d\n r5.ab = r6\n int r6 = r5.leftMargin\n if (r6 > 0) goto L_0x012e\n if (r0 <= 0) goto L_0x012e\n r5.leftMargin = r0\n return\n L_0x011e:\n int r1 = r5.e\n if (r1 == r6) goto L_0x012e\n int r6 = r5.e\n r5.ac = r6\n int r6 = r5.leftMargin\n if (r6 > 0) goto L_0x012e\n if (r0 <= 0) goto L_0x012e\n r5.leftMargin = r0\n L_0x012e:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.constraint.ConstraintLayout.LayoutParams.resolveLayoutDirection(int):void\");\n }",
"private void convertSetWindDir() {\n if (windDegTmp != null) {\n double windDbl = new Double(windDegTmp);\n setWindDir(headingToString(windDbl)); // convert wind degree to cardinal direction\n }\n }",
"public abstract void setDirection(int dir);",
"private void setDirection() {\n directionX = corePos.getX() - projectile.getX();\n directionY = corePos.getY() - projectile.getY();\n\n double length = Math.sqrt(directionX*directionX + directionY*directionY);\n\n if (length != 0) {\n directionX = directionX/length;\n directionY = directionY/length;\n }\n }",
"public void strafeRightEnc()\r\n\t{\r\n//\t\tdrive.setPos(0, 0, Config.Auto.encStrafeDistance, Config.Auto.encStrafeDistance);\r\n//\t\tif(Math.abs(drive.getFrontEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance)\r\n//\t\t{\r\n//\t\t\tdrive.setPos(Config.Auto.encDistanceBetweenTotes, Config.Auto.encDistanceBetweenTotes, Config.Auto.encStrafeDistance, Config.Auto.encStrafeDistance);\r\n//\t\t\t\r\n//\t\t\tif(Math.abs(drive.getLeftEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance && Math.abs(drive.getRightEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance)\r\n//\t\t\t{\r\n//\t\t\t\tdrive.setPos(Config.Auto.encDistanceBetweenTotes, Config.Auto.encDistanceBetweenTotes, 0, 0);\r\n//\t\t\t\t\r\n//\t\t\t\tif((Math.abs(drive.getFrontEncDist()) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist()) < Config.Auto.encTolerance))\r\n//\t\t\t\t\tendRoutine();\t\t\t\t\r\n//\t\t\t}\r\n//\t\t}\r\n\t}",
"public BlockFace getFacing() {\n/* 1017 */ return CraftBlock.notchToBlockFace(getHandle().getAdjustedDirection());\n/* */ }",
"@Override\n public int clipSecondaryFacing(int dir) {\n if (isValidSecondaryFacing(dir)) {\n return dir;\n }\n // can't twist while prone\n if (!canChangeSecondaryFacing()) {\n return getFacing();\n }\n // otherwise, twist once in the appropriate direction\n final int rotate = (dir + (6 - getFacing())) % 6;\n if ((rotate == 3) && getQuirks().booleanOption(\"ext_twist\")) {\n // if the unit can do an extended torso twist and the area chosen\n // was directly behind them, then just rotate one way\n return (getFacing() + 2) % 6;\n }\n return rotate >= 3 ? (getFacing() + 5) % 6 : (getFacing() + 1) % 6;\n }",
"@SuppressWarnings(\"incomplete-switch\")\n\tprivate void rotatingBehavior() {\n\t\tif (remainingSteps > 0) {\n\t\t\tremainingSteps--;\n\t\t} else {\n\t\t\tswitch (facing) {\n\t\t\t\tcase LEFT:\n\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\tbreak;\n\t\t\t\tcase UP:\n\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase RIGHT:\n\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOWN:\n\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tremainingSteps = STEP_SIZE;\n\t\t}\n\t}",
"int getDirection();",
"private void dealWithDeadEnd(MyAIController controller) {\n\t\tWorldSpatial.Direction orientation = controller.getOrientation();\n\t\tCoordinate pos = new Coordinate(controller.getPosition());\n\n\t\t// Check the space on left and right of the car\n\t\tint spaceOnRight = map.spaceInDirection(pos, orientation,\n\t\t\t\tWorldSpatial.RelativeDirection.RIGHT);\n\t\tint spaceOnLeft = map.spaceInDirection(pos, orientation,\n\t\t\t\tWorldSpatial.RelativeDirection.LEFT);\n\n\t\t// Perform turning actions based on space available\n\t\tif (spaceOnRight > 1) {\n\t\t\tcontroller.performUTurn(WorldSpatial.RelativeDirection.RIGHT);\n\t\t\tstate = ExplorerState.JUST_TURNED_LEFT;\n\t\t} else if (spaceOnRight >= 0 && spaceOnLeft >= 1) {\n\t\t\tcontroller.performThreePointTurn(WorldSpatial.RelativeDirection.RIGHT);\n\t\t\tstate = ExplorerState.JUST_TURNED_LEFT;\n\t\t} else {\n\t\t\tjustReversed = true;\n\t\t\tcontroller.toggleReverseMode();\n\t\t}\n\t}",
"public void liftArm(){armLifty.set(-drivePad.getThrottle());}",
"void base_case() {\n down_angle=Math.abs(down_angle);\n up_angle=Math.abs(up_angle);\n distance_from_object = human_length / Math.tan(Math.toRadians(down_angle));\n length_of_object = human_length + Math.tan(Math.toRadians(up_angle)) * distance_from_object;\n if(length_of_object/100>0) {\n ORI.setText(\"length_of_object :\\n\" + String.valueOf(String.format(\"%.2f\", (length_of_object / 100)) + \" M\" +\n \"\\n\" + \"distance_from_object :\\n\" + String.valueOf(String.format(\"%.2f\", (distance_from_object / 100))) + \" M\"));\n ORI.setVisibility(View.VISIBLE);\n }\n else {\n Toast.makeText(Online.this, \"Move Forward\", Toast.LENGTH_LONG).show();\n down_angle = 0;\n up_angle = 0;\n touch_ground_switch.setVisibility(View.VISIBLE);\n }\n\n\n }",
"@Override\n\tpublic void goForward() {\n\t\t// check side and move the according room and side\n\t\tif (side.equals(\"hRight\")) {\n\t\t\tthis.side = \"bFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(3);\n\n\t\t} else if (side.equals(\"hFront\")) {\n\t\t\tthis.side = \"mFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(2);\n\n\t\t} else if (side.equals(\"bLeft\")) {\n\t\t\tthis.side = \"rLeft\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(4);\n\n\t\t} else if (side.equals(\"rBack\")) {\n\t\t\tthis.side = \"bBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(3);\n\n\t\t} else if (side.equals(\"bBack\")) {\n\t\t\tthis.side = \"hLeft\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(1);\n\n\t\t} else if (side.equals(\"kBack\")) {\n\t\t\tthis.side = \"lFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(5);\n\n\t\t} else if (side.equals(\"lLeft\")) {\n\t\t\tthis.side = \"kRight\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(6);\n\n\t\t} else if (side.equals(\"lBack\")) {\n\t\t\tthis.side = \"mBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(2);\n\n\t\t} else if (side.equals(\"mFront\")) {\n\t\t\tthis.side = \"lFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(5);\n\n\t\t} else if (side.equals(\"mBack\")) {\n\t\t\tthis.side = \"hBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(1);\n\n\t\t} else {\n\t\t\trandomRoom();\n\t\t\tSystem.out.println(\"Entered Wormhole!\");\n\t\t\tSystem.out.println(\"Location was chosen at random\");\n\t\t\tSystem.out.println(\"New location is: \" + room + \" room and \" + side.substring(1) + \" side\");\n\n\t\t}\n\t}",
"public void setOrientation(EditText facingCompass){\n if (facingCompass.getText().toString().matches(\"NORTH\")) {\n orientation = 0;\n rotateRight = orientation;\n angleF = 0;\n\n } else if (facingCompass.getText().toString().matches(\"EAST\")) {\n orientation = 1;\n rotateRight = orientation;\n angleF = 90;\n\n } else if (facingCompass.getText().toString().matches(\"SOUTH\")) {\n orientation = 2;\n rotateRight = orientation;\n angleF = 180;\n\n } else if (facingCompass.getText().toString().matches(\"WEST\")) {\n orientation = 3;\n rotateRight = orientation;\n angleF = 270;\n\n } else\n errorMessage(\"Invalid F Direction...\\ndefaulted to NORTH\");\n return;\n }",
"@Test\r\n\tpublic void testSetDirection()\r\n\t{\r\n\t\tIDirectionController directionController = new RadianDirectionControlAdapter(new RadianDirectionControl());\r\n\t\tdirectionController.setCurrentDirection(90.0);\r\n\t\tassertEquals(90.0, directionController.getCurrentDirection(), 0.0);\r\n\t\tdirectionController.setCurrentDirection(390.0);\r\n\t\tassertEquals(30.0, directionController.getCurrentDirection(), 0.0);\r\n\t\tdirectionController.setCurrentDirection(-90.0);\r\n\t\tassertEquals(270.0, directionController.getCurrentDirection(), 0.0);\r\n\t}",
"public float getDirection()\r\n {\r\n return direction;\r\n }",
"static void changeDirectionBackwards() {\n\n if(--direction == -1)\n direction = 3;\n }",
"private void updateDirection()\n {\n if (Math.abs(InputSystem.LT_Button_Control_Stick) > 0.1)\n {\n // if lt button is pressed, reverse direction of elevator\n setReverseDirection(true);\n }\n else\n {\n setReverseDirection(false);\n }\n }",
"public void setDirection() {\n frontLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n backLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n frontRight.setDirection(DcMotorSimple.Direction.FORWARD);\n backRight.setDirection(DcMotorSimple.Direction.FORWARD);\n }",
"private void moveForwards() {\n\t\tposition = MoveAlgorithmExecutor.getAlgorithmFromCondition(orientation).execute(position);\n\t\t\n\t\t// Extracted the condition to check if tractor is in Ditch\n\t\tif(isTractorInDitch()){\n\t\t\tthrow new TractorInDitchException();\n\t\t}\n\t}",
"public void setDirection(){\n\n if (gameStatus != demoPlay)\n client_sb.i_Button = direct;\n\n TankMoveDelay++;\n StarGun_GSR loc=(StarGun_GSR)client_sb.getGameStateRecord();\n\n if (TankMoveDelay >= 1 &&\n loc.getPlayerX() < StarGun_SB.PLAYER_RIGHT_BORDER &&\n\t loc.getPlayerX() > 0) {\n TankMoveDelay = 0;\n switch (direct) {\n\tcase StarGun_SB.DIRECT_LEFT:\n\t if (TankPos==0)TankPos=iTankAmount-1;\n\t else TankPos--;\n\t\t\t\t break;\n case StarGun_SB.DIRECT_RIGHT:\n\t if (TankPos==iTankAmount-1)TankPos=0;\n\t else TankPos++;\n\t\t\t\t break;\n }\n }\n }",
"protected Direction checkForDirt(Creature c){\r\n\t\tSensor s = c.getSensor();\r\n\t\tfor (Direction d : Direction.values()){\r\n\t\t\tint value = (int) s.getSense(d.name() + DirtBasedAgentSenseConfig.TYPE_SUFFIX).getValue();\r\n\t\t\tif (value == Environment.DIRT){\r\n\t\t\t\treturn d;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public void changeDirection() {\n\t\t// Define the direction we want to change from as our current direction.\n\t\tfinal float oldDirection = this.requiredSwipeDirection;\n\t\t// While our swipe direction is the direction we want to change from,\n\t\twhile (this.requiredSwipeDirection == oldDirection)\n\t\t\t// Set our SwipeTile's direction to a random direction.\n\t\t\tsetDirection(SwipeTile.randomDirection());\n\t}",
"public void changerDirection(int d)\n {\n directionInput = d;\n }",
"private float reverseDirection(float dir) {\n if (dir < Math.PI) return (float) (dir+Math.PI);\n else return (float) (dir-Math.PI);\n }",
"private void lookAt(Bot bot) {\n\t\t// http://www.gamefromscratch.com/post/2012/11/18/GameDev-math-recipes-Rotating-to-face-a-point.aspx\n\t\tdesiredDirection = Math.atan2(bot.getY() - sens.getYPos(), bot.getX() - sens.getXPos()) * (180 / Math.PI);\n\t\tfixDirections();\n\t}",
"private String getDirectionByYValue(int mappedY, double rawY) {\n\n if(Math.abs(mappedY) <= ABS_LIMIT_BEFORE_MOVING_ROVER) return DIRECTION_NEUTRAL;\n if(rawY > 0) return DIRECTION_CLOCKWISE;\n if(rawY < 0) return DIRECTION_COUNT_CLOCKWISE;\n\n throw new IllegalStateException(\"invalid direction, mappedY=\" + mappedY);\n }",
"@Test\n public void testRelativeDirectionOfTileByAirFacingSouth() {\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 8)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 2)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 8)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(11, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(11, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(11, 8)));\n\n /*\n Tile in front => FRONT\n */\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 5)));\n\n /*\n Tile to the left, but within the turning buffer => FRONT\n */\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 11)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(13, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(13, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(13, 11)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 11)));\n\n /*\n Tile to the right, but within the turning buffer => FRONT\n */\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 11)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(7, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(7, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(7, 11)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 11)));\n\n /*\n Tile to to the right, horizontally aligned => RIGHT\n */\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 9)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 10)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 11)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(5, 9)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(5, 10)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(5, 11)));\n\n /*\n Tile in front, but within the turning buffer and to the right => RIGHT\n */\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 6)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 7)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 8)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 6)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 7)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 8)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 6)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 7)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 8)));\n\n /*\n Tile is at the back, but to the right => RIGHT\n */\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 17)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(4, 14)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(4, 17)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(5, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(7, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 14)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 17)));\n\n /*\n To to the left, horizontally aligned => LEFT\n */\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(15, 9)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(15, 10)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(15, 11)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 9)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 10)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 11)));\n\n /*\n Tile in front, but within the turning buffer and to the left => LEFT\n */\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 6)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 7)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 8)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 6)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 7)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 8)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 6)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 7)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 8)));\n\n /*\n Tile is at the back, but to the left => LEFT\n */\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 14)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 17)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(11, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(13, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(15, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(16, 14)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(16, 17)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 17)));\n }",
"private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}",
"public void resetMotors() {\n\t\tRobotMap.frontLeft.setSafetyEnabled(true);\n\t\tRobotMap.backLeft.setSafetyEnabled(true);\n\t\tRobotMap.frontRight.setSafetyEnabled(true);\n\t\tRobotMap.backLeft.setSafetyEnabled(true);\n\n\t\tRobotMap.frontRight.setInverted(false);\n\t\tRobotMap.backRight.setInverted(false);\n\t\tRobotMap.frontLeft.setInverted(false);\n\t\tRobotMap.backLeft.setInverted(false);\n\t\tSystem.out.println(RobotMap.backLeft.getSelectedSensorPosition(0));\n\t}",
"public void flyUpward() {\n /* Implement \"fly upward\" behavior if you want it! */\n }",
"public int getDirection();",
"public static native int getDirection(int pin) throws RuntimeException;",
"@Override\n\tpublic Direction getMove() {\n if (ticks < MAX_TICKS_PER_ROUND - 100) {\n Direction[] dirs = Direction.values();\n return dirs[random.nextInt(dirs.length)];\n } else {\n // Move towards boat\n int deltaX = 0;\n int deltaY = 0;\n if (currentLocation.getX() < 0)\n deltaX = 1;\n else if (currentLocation.getX() > 0)\n deltaX = -1;\n\n if (currentLocation.getY() < 0)\n deltaY = 1;\n else if (currentLocation.getY() > 0)\n deltaY = -1;\n\n if (deltaX > 0 && deltaY == 0) {\n return Direction.E;\n } else if (deltaX > 0 && deltaY > 0) {\n return Direction.NE;\n } else if (deltaX > 0 && deltaY < 0) {\n return Direction.SE;\n } else if (deltaX == 0 && deltaY == 0) {\n return Direction.STAYPUT;\n } else if (deltaX == 0 && deltaY < 0) {\n return Direction.N;\n } else if (deltaX == 0 && deltaY > 0) {\n return Direction.S;\n } else if (deltaX < 0 && deltaY == 0) {\n return Direction.W;\n } else if (deltaX < 0 && deltaY > 0) {\n return Direction.NW;\n } else if (deltaX < 0 && deltaY < 0) {\n return Direction.NE;\n } else {\n throw new RuntimeException(\"I HAVE NO IDEA\");\n }\n }\n\t}",
"public Place followDirection ( String checkDirection)\r\n\t{\t\r\n\t\t for( int i=0; i < directions.size(); i++)\r\n\t\t {\r\n\t\t\t if( directions.get(i).match( checkDirection))\r\n\t\t\t {\r\n\t\t\t\t // If direction matches with direction object's direction, now again check that if the door is unlocked or not. \r\n\t\t\t\t return directions.get(i).follow();\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t } \r\n\t\t System.out.println (\"There is no direction from this DOOR....OH No, You are stuck at this Current Place:\" + this.name());\r\n\t\t return this;\r\n\t}",
"public CS getDirectionCode() { return _directionCode; }",
"public void setDirection(float direction)\r\n {\r\n this.direction = direction;\r\n }",
"private void wanderingBehavior() {\n\t\tif (moving) {\n\t\t\tupdatePixels(action);\n\t\t\tremainingSteps -= speed;\n\t\t\tif (remainingSteps == 0) {\n\t\t\t\tmoving = false;\n\t\t\t\tcurrentImage = stopAnimation(action);\n\t\t\t\tupdateCoordinate(facing, false);\n\t\t\t}\n\t\t} else if (remainingSteps > 0) {\n\t\t\tremainingSteps -= speed;\n\t\t} else {\n\t\t\trandom = rand.nextInt(100);\n\t\t\tif (Math.abs(random) < 2) {\n\t\t\t\trandom = rand.nextInt(4);\n\t\t\t\t{\n\t\t\t\t\tswitch (random) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\trandom = rand.nextInt(3);\n\t\t\t\t\tremainingSteps = STEP_SIZE * 2;\n\t\t\t\t\tif (random != 0 && validMoveEh(facing) && validWanderEh(facing)) {\n\t\t\t\t\t\tremainingSteps -= STEP_SIZE;\n\t\t\t\t\t\taction = facing;\n\t\t\t\t\t\tcurrentImage = startAnimation(action);\n\t\t\t\t\t\tmoving = true;\n\t\t\t\t\t\tupdateCoordinate(facing, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void direction(int dirX, int dirY) {\r\n if (dirX == 1 && dirY == 0) {\r\n this.direction = \"HORI\";\r\n }\r\n else if (dirX == 1 && dirY == -1) {\r\n this.direction = \"RISE\";\r\n }\r\n else if (dirX == 0 && dirY == 1) {\r\n this.direction = \"VERTI\";\r\n }\r\n else {\r\n this.direction = \"FALL\";\r\n }\r\n }",
"String getDirection();",
"private static void processGroundCal()\n\t{\n\t\tif (testMotor != null) {\n\t\t\tSystem.out.println(\"Calibrating arm to floor position\");\n\t\t\ttestMotor.setPosition(SOFT_ENCODER_LIMIT_FLOOR);\n\t\t}\n\t}",
"@Override\n // float limbSwing(par1), float limbSwingAmount(par2), float ageInTicks(par3), float netHeadYaw(par4), float headPitch(par5), float scaleFactor(par6), Entity entityIn(par7):\n public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)\n {\n EntityFamiliar entityFamiliar = (EntityFamiliar)entityIn;\n\n if (entityFamiliar.isCharging())\n {\n if (entityFamiliar.getPrimaryHand() == EnumHandSide.RIGHT)\n {\n this.armRight.rotateAngleX = 3.7699115F;\n }\n else\n {\n this.armLeft.rotateAngleX = 3.7699115F;\n }\n }\n \n // RightArm.rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float)Math.PI) * 2.0F * par2 * 0.5F;\n this.armRight.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 2.0F * limbSwingAmount * 0.5F;\n\n // LeftArm.rotateAngleX = MathHelper.cos(par1 * 0.6662F) * 2.0F * par2 * 0.5F;\n this.armLeft.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 2.0F * limbSwingAmount * 0.5F;\n \n // RightArm.rotateAngleZ = 0.0F;\n this.armRight.rotateAngleZ = 0.0F;\n \n // LeftArm.rotateAngleZ = 0.0F;\n this.armLeft.rotateAngleZ = 0.0F;\n \n // Wings (from EntityVex):\n this.wingRight.rotationPointZ = 2.0F;\n this.wingLeft.rotationPointZ = 2.0F;\n this.wingRight.rotationPointY = 1.0F;\n this.wingLeft.rotationPointY = 1.0F;\n this.wingRight.rotateAngleY = 0.47123894F + MathHelper.cos(ageInTicks * 0.8F) * (float)Math.PI * 0.05F;\n this.wingLeft.rotateAngleY = -this.wingRight.rotateAngleY;\n this.wingLeft.rotateAngleZ = -0.47123894F;\n this.wingLeft.rotateAngleX = 0.47123894F;\n this.wingRight.rotateAngleX = 0.47123894F;\n this.wingRight.rotateAngleZ = 0.47123894F;\n\n // Head.rotateAngleY = par5 (headPitch) / (180F / (float)Math.PI);\n this.head.rotateAngleX = headPitch / (180F / (float)Math.PI);\n\n // Head.rotateAngleY = par4 (netHeadYaw) / (180F / (float)Math.PI);\n this.head.rotateAngleY = netHeadYaw / (180F / (float)Math.PI);\n\n // Tentacles (using spider model):\n //float f = ((float)Math.PI / 4F);\n this.tentacleFrontLeft.rotateAngleZ = -((float)Math.PI / 4F);\n this.tentacleFrontRight.rotateAngleZ = ((float)Math.PI / 4F);\n this.tentacleFrontMid.rotateAngleZ = -0.58119464F;\n this.tentacleBackMid.rotateAngleZ = 0.58119464F;\n this.tentacleBackLeft.rotateAngleZ = -((float)Math.PI / 4F);\n this.tentacleBackRight.rotateAngleZ = ((float)Math.PI / 4F);\n //float f1 = -0.0F;\n //float f2 = 0.3926991F;\n this.tentacleFrontLeft.rotateAngleY = ((float)Math.PI / 4F);\n this.tentacleFrontRight.rotateAngleY = -((float)Math.PI / 4F);\n this.tentacleFrontMid.rotateAngleY = 0.3926991F;\n this.tentacleBackMid.rotateAngleY = -0.3926991F;\n this.tentacleBackLeft.rotateAngleY = -((float)Math.PI / 4F);\n this.tentacleBackRight.rotateAngleY = ((float)Math.PI / 4F);\n float f3 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + 0.0F) * 0.4F) * limbSwingAmount;\n float f4 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + (float)Math.PI) * 0.4F) * limbSwingAmount;\n float f5 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + ((float)Math.PI * 3F / 2F)) * 0.4F) * limbSwingAmount;\n float f6 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + 0.0F) * 0.4F) * limbSwingAmount;\n float f7 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + (float)Math.PI) * 0.4F) * limbSwingAmount;\n float f8 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + ((float)Math.PI * 3F / 2F)) * 0.4F) * limbSwingAmount;\n this.tentacleFrontLeft.rotateAngleY += f3;\n this.tentacleFrontRight.rotateAngleY += -f3;\n this.tentacleFrontMid.rotateAngleY += f4;\n this.tentacleBackMid.rotateAngleY += -f4;\n this.tentacleBackLeft.rotateAngleY += f5;\n this.tentacleBackRight.rotateAngleY += -f5;\n this.tentacleFrontLeft.rotateAngleZ += f6;\n this.tentacleFrontRight.rotateAngleZ += -f6;\n this.tentacleFrontMid.rotateAngleZ += f7;\n this.tentacleBackMid.rotateAngleZ += -f7;\n this.tentacleBackLeft.rotateAngleZ += f8;\n this.tentacleBackRight.rotateAngleZ += -f8;\n }",
"public void setDirectionOfTravel(typekey.DirectionOfTravelPEL value);",
"public void setDirection(int direction) {\n/* 172 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void updateFaceDir() {\n\t\tif (faceDirection != null)\n\t\t\tface(location.transform(faceDirection.getDiffX(),\n\t\t\t\t\tfaceDirection.getDiffY(), 0));\n\t}",
"private void changeAppearance() {\n if (goingRight) appearance = wolfLeft;\n else appearance = wolfRight;\n goingRight = !goingRight;\n }",
"public double getDirectionView();",
"protected int mirrorDirection(int direction) {\n\t\tif (direction < 4) {\n\t\t\treturn (direction + 2)%4;\n\t\t} else {\n\t\t\treturn (direction + 2)%4 + 4;\n\t\t}\n\t}",
"private void turnClockwise(){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t}\n\t}",
"public void updateIntention() {\n\n // First, rotate the front line\n double distanceToGoal = MathUtils.quickRoot1((float)((anchorX - goalX) * (anchorX - goalX) + (anchorY - goalY) * (anchorY - goalY)));\n double moveAngle, moveSpeed;\n double moveSpeedX, moveSpeedY;\n double speedModifier;\n double[] deltaVel;\n switch (state) {\n case FIGHTING:\n // TODO(sonpham): Come up with a way to change FIGHTING to IN_POSITION when comebat with a unit is over.\n if (unitFoughtAgainst.getNumAlives() == 0) {\n state = UnitState.STANDING;\n anchorAngle = goalAngle;\n unitFoughtAgainst = null;\n break;\n }\n goalAngle = MathUtils.atan2(unitFoughtAgainst.getAverageY() - averageY,\n unitFoughtAgainst.getAverageX() - averageX);\n goalX = unitFoughtAgainst.getAverageX();\n goalY = unitFoughtAgainst.getAverageY();\n\n // If army still rotating, half the speed\n moveAngle = MathUtils.atan2(goalY - anchorY, goalX - anchorX); // TODO: This is currently repeated too much\n moveSpeed = speed / 2;\n\n // Apply speed modifier by terrain\n moveSpeedX = Math.cos(moveAngle) * moveSpeed;\n moveSpeedY = Math.sin(moveAngle) * moveSpeed;\n deltaVel = terrain.getDeltaVelFromPos(anchorX, anchorY);\n speedModifier = MathUtils.ratioProjection(deltaVel[0], deltaVel[1], moveSpeedX, moveSpeedY);\n speedModifier = MathUtils.capMinMax(speedModifier,\n UniversalConstants.MINIMUM_TERRAIN_EFFECT,\n UniversalConstants.MAXIMUM_TERRAIN_EFFECT);\n moveSpeed *= (1 + speedModifier);\n if (distanceToGoal > moveSpeed) {\n double moveUnitX = Math.cos(moveAngle);\n double moveUnitY = Math.sin(moveAngle);\n anchorX += moveUnitX * moveSpeed;\n anchorY += moveUnitY * moveSpeed;\n } else {\n anchorX = goalX;\n anchorY = goalY;\n }\n\n // Update flanker status. If the flank has not engaged with the enemy for a long time, they will join\n // the flanker, which will have a different goal position.\n if (gameSettings.isEnableFlankingMechanics()) {\n for (int i = 0; i < width; i++) {\n if (flankersCount[i] < troops.size() / width && aliveTroopsFormation[flankersCount[i]][i] != null) {\n if (aliveTroopsFormation[0][i].getCombatDelay() < 0) {\n frontLinePatientCounters[i] += 1;\n } else {\n frontLinePatientCounters[i] = 0;\n }\n }\n if (frontLinePatientCounters[i] == GameplayConstants.FLANKER_PATIENT) {\n // If the front-liner has waited for too long, they will join the flanker.\n flankersCount[i] += 1;\n\n // Pick an offset for the flankers\n Triplet<Integer, Integer, Integer> pos;\n Iterator<Triplet<Integer, Integer, Integer>> it;\n // TODO: If the flanker troop is right in the middle, then it should select either\n // iterator half the time.\n if (i < width / 2) {\n it = leftFlankerIndices.iterator();\n } else {\n it = rightFlankerIndices.iterator();\n }\n pos = it.next();\n\n // Generate a new goal offset position for that flanker\n double flankingSpacing = GameplayConstants.FLANKING_SPACING_RATIO * unitStats.spacing;\n double[] offset = MathUtils.generateOffsetBasedOnHexTripletIndices(\n pos.x, pos.y, pos.z, flankingSpacing);\n double positionalJiggling = GameplayConstants.FLANKING_POSITION_JIGGLING_RATIO * flankingSpacing;\n offset[0] += MathUtils.randDouble(-1.0, 1.0) * positionalJiggling;\n offset[1] += MathUtils.randDouble(-1.0, 1.0) * positionalJiggling;\n\n // Assign that position to flanker positions\n flankerOffsets[i].add(offset);\n\n // Change the set of candidates\n leftFlankerIndices.remove(pos);\n rightFlankerIndices.remove(pos);\n if (leftFlankerIndices.size() == 0) {\n leftRingIndex += 1;\n leftFlankerIndices = MathUtils.getHexagonalIndicesRingAtOffset(leftRingIndex);\n Set<Triplet<Integer, Integer, Integer>> removalSet = new HashSet<>();\n for (Triplet<Integer, Integer, Integer> triplet : leftFlankerIndices) {\n if (triplet.z > 0) {\n removalSet.add(triplet);\n } else if (triplet.y < triplet.x) {\n removalSet.add(triplet);\n }\n }\n for (Triplet<Integer, Integer, Integer> triplet : removalSet) {\n leftFlankerIndices.remove(triplet);\n }\n }\n if (rightFlankerIndices.size() == 0) {\n rightRightIndex += 1;\n rightFlankerIndices = MathUtils.getHexagonalIndicesRingAtOffset(rightRightIndex);\n Set<Triplet<Integer, Integer, Integer>> removalSet = new HashSet<>();\n for (Triplet<Integer, Integer, Integer> triplet : rightFlankerIndices) {\n if (triplet.z > 0) {\n removalSet.add(triplet);\n } else if (triplet.y > triplet.x) {\n removalSet.add(triplet);\n }\n }\n for (Triplet<Integer, Integer, Integer> triplet : removalSet) {\n rightFlankerIndices.remove(triplet);\n }\n }\n\n // Reset patient counters.\n frontLinePatientCounters[i] = 0;\n }\n }\n }\n break;\n case ROUTING:\n // Update the direction that the unit ought to run away from, it should be the opposite vector of\n // the sum of difference in unit location difference.\n double dx = 0;\n double dy = 0;\n int numVisibleEnemies = 0;\n for (BaseUnit unit : visibleUnits) {\n if (unit.getPoliticalFaction() != politicalFaction) {\n numVisibleEnemies += 1;\n dx += unit.getAliveTroopsSet().size() * (averageX - unit.averageX);\n dy += unit.getAliveTroopsSet().size() * (averageY - unit.averageY);\n }\n }\n // Invert dx and dy. We need to run in the opposite direction.\n // Also, only change goalAngle if there are more than 1 visible enemy units. Otherwise, atan2 function\n // will return PI / 2 and change the unit direction, which is undesirable. It doesn't make sense for\n // unit to change their direction once they no longer see their enemy.\n if (numVisibleEnemies > 0) {\n goalAngle = MathUtils.atan2(dy, dx);\n }\n break;\n case MOVING:\n // If army is moving, the the army shall move at normal speed.\n moveAngle = MathUtils.atan2(goalY - anchorY, goalX - anchorX); // TODO: This is currently repeated too much\n moveSpeed = speed * turningSpeedRatio;\n\n // Apply speed modifier by terrain\n moveSpeedX = Math.cos(moveAngle) * moveSpeed;\n moveSpeedY = Math.sin(moveAngle) * moveSpeed;\n deltaVel = terrain.getDeltaVelFromPos(anchorX, anchorY);\n speedModifier = MathUtils.ratioProjection(deltaVel[0], deltaVel[1], moveSpeedX, moveSpeedY);\n speedModifier = MathUtils.capMinMax(speedModifier,\n UniversalConstants.MINIMUM_TERRAIN_EFFECT,\n UniversalConstants.MAXIMUM_TERRAIN_EFFECT);\n moveSpeed *= (1 + speedModifier);\n\n if (MathUtils.doubleEqual(moveAngle, anchorAngle)) {\n isTurning = false;\n turningSpeedRatio = 1.0;\n } else {\n isTurning = true;\n turningSpeedRatio = 1.0;\n turningSpeedRatio = Math.max(\n 0.0, turningSpeedRatio - GameplayConstants.TURNING_UNIT_SPEED_DECELERATION_RATIO);\n }\n\n // Rotate towards the goal\n anchorAngle = MovementUtils.rotate(anchorAngle, moveAngle, unitStats.rotationSpeed);\n\n if (distanceToGoal > moveSpeed) {\n double moveUnitX = Math.cos(anchorAngle);\n double moveUnitY = Math.sin(anchorAngle);\n anchorX += moveUnitX * moveSpeed;\n anchorY += moveUnitY * moveSpeed;\n } else {\n anchorX = goalX;\n anchorY = goalY;\n if (path != null && node == path.getNodes().getLast()) {\n path = null;\n node = null;\n state = UnitState.STANDING;\n } else if (path != null) {\n path.getNodes().pollFirst();\n node = path.getNodes().get(0);\n goalX = node.getX();\n goalY = node.getY();\n } else {\n path = null;\n node = null;\n state = UnitState.STANDING;\n }\n }\n break;\n case STANDING:\n anchorAngle = MovementUtils.rotate(anchorAngle, goalAngle, unitStats.rotationSpeed);\n isTurning = false;\n break;\n }\n\n // Update goal positions\n updateGoalPositions();\n\n // Update troop intentions\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.updateIntention();\n }\n }",
"private void assignDirection(char d) throws InputMismatchException{\n\t\tif(d == NL) {\n\t\t\tdir = NL;\n\t\t}else if(d == NR) {\n\t\t\tdir = NR;\n\t\t}else if(d == SL) {\n\t\t\tdir = SL;\n\t\t}else if(d == SR){\n\t\t\tdir = SR;\n\t\t}else {\n\t\t\tthrow new InputMismatchException(\"There is no such filling direction.\");\n\t\t}\n\t}",
"public void setTrapped(boolean flag, int... roll) {\n // true == trapped. Trap must be rolled if no integer is given\n trapState = flag; // or this.trapState = flag;\n if (trapState) {\n if (myTrap == null) { /* if it's empty, call a constructor */\n d20Trap = new D20();\n myTrap = new Trap();\n myTrap.chooseTrap(d20Trap.roll());\n }\n }\n doorDescription = getDescription();\n }",
"public double getDirectionMove();",
"public void applyStrategy(){\n\t\tfloat dx, dy;\n\t\t\n\t\tdx = targetCar.getX() - myCar.getX();\n\t\tdy = targetCar.getY() - myCar.getY();\n\t\t\n\t\t// awesome, atan2 handles all the hard parts of arctan calculations\n\t\tint angle = (int)Math.toDegrees( Math.atan2(dx, dy) );\n\t\tmyCar.setHeading( angle );\n\t}",
"private void configureWheelFalcons() {\n // most of the configuration is shared for the two Falcons\n configureOneWheelFalcon(shooterWheelLeft);\n configureOneWheelFalcon(shooterWheelRight);\n\n // with the exception of one rotating the opposite direction\n shooterWheelLeft.setInverted(true);\n shooterWheelRight.setInverted(false);\n }",
"@Override\n public void setFacing(Direction dir)\n {\n facing = dir;\n if(!userHoldingLeftXOrRight)\n {\n setStandingAnim();\n }\n }",
"public static void setDirection(String direction) {\n if (direction.equals(\"up\")) {\n pacManDirection = up;\n } else if (direction.equals(\"down\")) {\n pacManDirection = down;\n } else if (direction.equals(\"left\")) {\n pacManDirection = left;\n } else {\n pacManDirection = right;\n }\n }",
"@Override\n\tpublic String calculateRightTurn() {\n\t\t// check the current side with the side of the retrieved value from\n\t\t// properties file.\n\t\tif (side.substring(1).equals(properties.getSideFromProperties().get(1))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(2);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(2))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(3);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(3))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(4);\n\n\t\t} else {\n\t\t\tthis.side = properties.getSideFromProperties().get(1);\n\t\t}\n\t\t// return the new side to update the image shown with the starting\n\t\t// letter of the room and the side to be the same as the name of the\n\t\t// image.\n\t\treturn this.room.substring(0, 1).toLowerCase() + this.side;\n\t}",
"private Direction caliberate(View v){\n\t\t//Step north if there are no adjoining walls\n\t\tif(!hasAdjacentWalls(v)){\n\t\t\tmemorization(Direction.NORTH);\n\t\t\treturn Direction.NORTH;\n\t\t}\n\t\telse{\n\t\t\t//Otherwise, the walker turns clockwise until it has a wall to its left\n\t\t\twhile(!hasLeftWall(v)){\n\t\t\t\tturnClockwise();\n\t\t\t}\n\t\t\tcaliberated = true;\n\t\t\t//if blocked, keep turning clockwise\n\t\t\twhile(isBlocked(v)){\n\t\t\t\tturnClockwise();\n\t\t\t}\n\t\t\tmemorization(facingDirection);\n\t\t\treturn facingDirection;\n\t\t}\n\t}",
"public final flipsParser.direction_return direction() throws RecognitionException {\n flipsParser.direction_return retval = new flipsParser.direction_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token To390=null;\n Token To393=null;\n flipsParser.fixedDirection_return fixedDirection388 = null;\n\n flipsParser.leftRightDirection_return leftRightDirection389 = null;\n\n flipsParser.fixedDirection_return fixedDirection391 = null;\n\n flipsParser.clockDirection_return clockDirection392 = null;\n\n flipsParser.fixedDirection_return fixedDirection394 = null;\n\n flipsParser.relativeDirection_return relativeDirection395 = null;\n\n\n CommonTree To390_tree=null;\n CommonTree To393_tree=null;\n RewriteRuleTokenStream stream_To=new RewriteRuleTokenStream(adaptor,\"token To\");\n RewriteRuleSubtreeStream stream_fixedDirection=new RewriteRuleSubtreeStream(adaptor,\"rule fixedDirection\");\n RewriteRuleSubtreeStream stream_relativeDirection=new RewriteRuleSubtreeStream(adaptor,\"rule relativeDirection\");\n RewriteRuleSubtreeStream stream_leftRightDirection=new RewriteRuleSubtreeStream(adaptor,\"rule leftRightDirection\");\n RewriteRuleSubtreeStream stream_clockDirection=new RewriteRuleSubtreeStream(adaptor,\"rule clockDirection\");\n try {\n // flips.g:576:2: ( fixedDirection -> ^( DIRECTION FIXED fixedDirection ) | leftRightDirection To fixedDirection -> ^( DIRECTION FIXED ^( TURN leftRightDirection ) fixedDirection ) | clockDirection To fixedDirection -> ^( DIRECTION FIXED ^( TURN clockDirection ) fixedDirection ) | relativeDirection -> ^( DIRECTION RELATIVE relativeDirection ) )\n int alt146=4;\n alt146 = dfa146.predict(input);\n switch (alt146) {\n case 1 :\n // flips.g:576:4: fixedDirection\n {\n pushFollow(FOLLOW_fixedDirection_in_direction3326);\n fixedDirection388=fixedDirection();\n\n state._fsp--;\n\n stream_fixedDirection.add(fixedDirection388.getTree());\n\n\n // AST REWRITE\n // elements: fixedDirection\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 577:2: -> ^( DIRECTION FIXED fixedDirection )\n {\n // flips.g:577:5: ^( DIRECTION FIXED fixedDirection )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DIRECTION, \"DIRECTION\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(FIXED, \"FIXED\"));\n adaptor.addChild(root_1, stream_fixedDirection.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 2 :\n // flips.g:578:4: leftRightDirection To fixedDirection\n {\n pushFollow(FOLLOW_leftRightDirection_in_direction3342);\n leftRightDirection389=leftRightDirection();\n\n state._fsp--;\n\n stream_leftRightDirection.add(leftRightDirection389.getTree());\n To390=(Token)match(input,To,FOLLOW_To_in_direction3344); \n stream_To.add(To390);\n\n pushFollow(FOLLOW_fixedDirection_in_direction3346);\n fixedDirection391=fixedDirection();\n\n state._fsp--;\n\n stream_fixedDirection.add(fixedDirection391.getTree());\n\n\n // AST REWRITE\n // elements: fixedDirection, leftRightDirection\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 579:2: -> ^( DIRECTION FIXED ^( TURN leftRightDirection ) fixedDirection )\n {\n // flips.g:579:5: ^( DIRECTION FIXED ^( TURN leftRightDirection ) fixedDirection )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DIRECTION, \"DIRECTION\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(FIXED, \"FIXED\"));\n // flips.g:579:23: ^( TURN leftRightDirection )\n {\n CommonTree root_2 = (CommonTree)adaptor.nil();\n root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TURN, \"TURN\"), root_2);\n\n adaptor.addChild(root_2, stream_leftRightDirection.nextTree());\n\n adaptor.addChild(root_1, root_2);\n }\n adaptor.addChild(root_1, stream_fixedDirection.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 3 :\n // flips.g:580:4: clockDirection To fixedDirection\n {\n pushFollow(FOLLOW_clockDirection_in_direction3368);\n clockDirection392=clockDirection();\n\n state._fsp--;\n\n stream_clockDirection.add(clockDirection392.getTree());\n To393=(Token)match(input,To,FOLLOW_To_in_direction3370); \n stream_To.add(To393);\n\n pushFollow(FOLLOW_fixedDirection_in_direction3372);\n fixedDirection394=fixedDirection();\n\n state._fsp--;\n\n stream_fixedDirection.add(fixedDirection394.getTree());\n\n\n // AST REWRITE\n // elements: fixedDirection, clockDirection\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 581:2: -> ^( DIRECTION FIXED ^( TURN clockDirection ) fixedDirection )\n {\n // flips.g:581:5: ^( DIRECTION FIXED ^( TURN clockDirection ) fixedDirection )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DIRECTION, \"DIRECTION\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(FIXED, \"FIXED\"));\n // flips.g:581:23: ^( TURN clockDirection )\n {\n CommonTree root_2 = (CommonTree)adaptor.nil();\n root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TURN, \"TURN\"), root_2);\n\n adaptor.addChild(root_2, stream_clockDirection.nextTree());\n\n adaptor.addChild(root_1, root_2);\n }\n adaptor.addChild(root_1, stream_fixedDirection.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 4 :\n // flips.g:582:4: relativeDirection\n {\n pushFollow(FOLLOW_relativeDirection_in_direction3394);\n relativeDirection395=relativeDirection();\n\n state._fsp--;\n\n stream_relativeDirection.add(relativeDirection395.getTree());\n\n\n // AST REWRITE\n // elements: relativeDirection\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 583:2: -> ^( DIRECTION RELATIVE relativeDirection )\n {\n // flips.g:583:5: ^( DIRECTION RELATIVE relativeDirection )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DIRECTION, \"DIRECTION\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(RELATIVE, \"RELATIVE\"));\n adaptor.addChild(root_1, stream_relativeDirection.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }",
"public void changerDirectionBateau() {\n\t\tif (partie.getJoueur().getIndiceBateauEnCours() != -1) {\n\t\t\tplacerEauSurVue();\n\t\t\tthis.partie.getJoueur().modifierDirection();\n\t\t\tplacerBateauSurVue();\n\t\t}\n\t}",
"@Override\n public void setDirection(Direction direction) {\n\n }",
"public void setDirection(double direction) {\n\t\tif (direction <= MAX_DIRECTION && direction >= MIN_DIRECTION) {\n\t\t\tthis.direction = direction;\n\t\t} else if (direction > MAX_DIRECTION) { \n\t\t\t//this.direction = MIN_DIRECTION + (MAX_DIRECTION - direction);\n\t\t\tthis.direction %= MIN_DIRECTION ;\n\t\t\tif (Double.isNaN(this.direction)) {\n\t\t\t\tthis.direction = MIN_DIRECTION;\n\t\t\t}\n\t\t} else if (direction < MIN_DIRECTION) {\n\t\t\t//this.direction = MAX_DIRECTION - (MIN_DIRECTION + direction);\n\t\t\tthis.direction %= MAX_DIRECTION;\n\t\t\tif (Double.isNaN(this.direction)) {\n\t\t\t\tthis.direction = MAX_DIRECTION;\n\t\t\t}\n\t\t} //else if (direction)\n\t\t\n\t}",
"private void driveRight() {\n setSpeed(MAX_SPEED, MIN_SPEED);\n }",
"@Override\n\tpublic int getFacing() {\n\t\treturn 0;\n\t}",
"void check_alien_direction() {\n // Aliens are moving right, check if aliens will move off screen\n if (Alien.direction == Alien.Directions.RIGHT) {\n double max_x = rightmost_alien_x();\n // Alien1 has largest width, so we use that one to calculate if all aliens will fit\n if (max_x + Dimensions.ALIEN1_WIDTH + Dimensions.X_PADDING > scene_width){\n Alien.changeDirections();\n }\n }\n\n // Aliens are moving left, check if aliens will move off screen\n else if (Alien.direction == Alien.Directions.LEFT) {\n double min_x = leftmost_alien_x();\n if (min_x < Dimensions.X_PADDING){\n Alien.changeDirections();\n }\n }\n\n // Aliens are moving down, check if they finished moving down\n else if (Alien.direction == Alien.Directions.DOWN &&\n Alien.down_distance_travelled >= Dimensions.ALIEN_VERTICAL_SPACE){\n random_alien_fires(); // After aliens all descend one row, one of the ships fires at the player\n Alien.changeDirections();\n }\n }",
"private void goRandomDirection() {\n\t\tdesiredDirection = Math.random() * 360.0;\n\t}",
"private void calculateDirection(){\n\t\tif(waypoints.size() > 0){\n\t\t\tif(getDistanceToWaypoint() <= getSpeed()){\n\t\t\t\tsetPosition(new Vector2(waypoints.remove(0)));\n\t\t\t\tsetCurrentWaypoint(getCurrentWaypoint() + 1);\n\t\t\t}else{\t\t\n\t\t\t\tVector2 target = new Vector2(waypoints.get(0));\n\t\t\t\tVector2 newDirection = new Vector2(target.sub(getPosition())); \n\t\t\t\tsetDirection(newDirection);\n\t\t\t}\n\t\t}else{\n\t\t\tsetDirection(new Vector2(0, 0));\n\t\t}\n\t}",
"abstract void setDirection(double x, double y, double z);",
"void whichWay(Pair adder){\n\t\tSystem.out.print(\"arah kanan : \");\n\t\tswitch (adder.RIGHT_STATUS) {\n\t\tcase ATAS_BOTTOM:\n\t\t\tSystem.out.println(\"bawah\");\n\t\t\tbreak;\n\n\t\tcase ATAS_UP:\n\t\t\tSystem.out.println(\"atas\");\n\t\t\tbreak;\n\n\t\tcase ATAS_RIGHT:\n\t\t\tSystem.out.println(\"kanan\");\n\t\t\tbreak;\n\n\t\tcase ATAS_LEFT:\n\t\t\tSystem.out.println(\"kiri\");\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"@Test\r\n\tpublic void testTurn()\r\n\t{\r\n\t\tIDirectionController directionController = new RadianDirectionControlAdapter(new RadianDirectionControl());\r\n\t\tdirectionController.turn(90.0);\r\n\t\tassertEquals(90.0, directionController.getCurrentDirection(), 0.0);\r\n\t\tdirectionController.turn(-450.0);\r\n\t\tassertEquals(0.0, directionController.getCurrentDirection(), 0.0);\r\n\t}",
"public final flipsParser.fixedDirection_return fixedDirection() throws RecognitionException {\n flipsParser.fixedDirection_return retval = new flipsParser.fixedDirection_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token Turning399=null;\n Token Heading400=null;\n flipsParser.cardinalDirection_return cardinalDirection396 = null;\n\n flipsParser.ordinalDirection_return ordinalDirection397 = null;\n\n flipsParser.subOrdinalDirection_return subOrdinalDirection398 = null;\n\n flipsParser.fixedDirectionTurn_return fixedDirectionTurn401 = null;\n\n\n CommonTree Turning399_tree=null;\n CommonTree Heading400_tree=null;\n RewriteRuleTokenStream stream_Turning=new RewriteRuleTokenStream(adaptor,\"token Turning\");\n RewriteRuleTokenStream stream_Heading=new RewriteRuleTokenStream(adaptor,\"token Heading\");\n RewriteRuleSubtreeStream stream_ordinalDirection=new RewriteRuleSubtreeStream(adaptor,\"rule ordinalDirection\");\n RewriteRuleSubtreeStream stream_subOrdinalDirection=new RewriteRuleSubtreeStream(adaptor,\"rule subOrdinalDirection\");\n RewriteRuleSubtreeStream stream_fixedDirectionTurn=new RewriteRuleSubtreeStream(adaptor,\"rule fixedDirectionTurn\");\n RewriteRuleSubtreeStream stream_cardinalDirection=new RewriteRuleSubtreeStream(adaptor,\"rule cardinalDirection\");\n try {\n // flips.g:587:2: ( cardinalDirection -> ^( DIRECTION cardinalDirection ) | ordinalDirection -> ^( DIRECTION ordinalDirection ) | subOrdinalDirection -> ^( DIRECTION subOrdinalDirection ) | ( Turning | Heading ) fixedDirectionTurn -> fixedDirectionTurn )\n int alt148=4;\n switch ( input.LA(1) ) {\n case 258:\n case 265:\n case 266:\n case 267:\n case 268:\n case 269:\n case 270:\n case 271:\n {\n alt148=1;\n }\n break;\n case 272:\n case 273:\n case 274:\n case 275:\n case 276:\n case 277:\n case 278:\n case 279:\n {\n alt148=2;\n }\n break;\n case 280:\n case 281:\n case 282:\n case 283:\n case 284:\n case 285:\n case 286:\n case 287:\n case 288:\n case 289:\n case 290:\n case 291:\n case 292:\n case 293:\n case 294:\n case 295:\n {\n alt148=3;\n }\n break;\n case Turning:\n case Heading:\n {\n alt148=4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 148, 0, input);\n\n throw nvae;\n }\n\n switch (alt148) {\n case 1 :\n // flips.g:587:4: cardinalDirection\n {\n pushFollow(FOLLOW_cardinalDirection_in_fixedDirection3416);\n cardinalDirection396=cardinalDirection();\n\n state._fsp--;\n\n stream_cardinalDirection.add(cardinalDirection396.getTree());\n\n\n // AST REWRITE\n // elements: cardinalDirection\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 588:2: -> ^( DIRECTION cardinalDirection )\n {\n // flips.g:588:5: ^( DIRECTION cardinalDirection )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DIRECTION, \"DIRECTION\"), root_1);\n\n adaptor.addChild(root_1, stream_cardinalDirection.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 2 :\n // flips.g:589:4: ordinalDirection\n {\n pushFollow(FOLLOW_ordinalDirection_in_fixedDirection3430);\n ordinalDirection397=ordinalDirection();\n\n state._fsp--;\n\n stream_ordinalDirection.add(ordinalDirection397.getTree());\n\n\n // AST REWRITE\n // elements: ordinalDirection\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 590:2: -> ^( DIRECTION ordinalDirection )\n {\n // flips.g:590:5: ^( DIRECTION ordinalDirection )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DIRECTION, \"DIRECTION\"), root_1);\n\n adaptor.addChild(root_1, stream_ordinalDirection.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 3 :\n // flips.g:591:4: subOrdinalDirection\n {\n pushFollow(FOLLOW_subOrdinalDirection_in_fixedDirection3444);\n subOrdinalDirection398=subOrdinalDirection();\n\n state._fsp--;\n\n stream_subOrdinalDirection.add(subOrdinalDirection398.getTree());\n\n\n // AST REWRITE\n // elements: subOrdinalDirection\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 592:2: -> ^( DIRECTION subOrdinalDirection )\n {\n // flips.g:592:5: ^( DIRECTION subOrdinalDirection )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(DIRECTION, \"DIRECTION\"), root_1);\n\n adaptor.addChild(root_1, stream_subOrdinalDirection.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 4 :\n // flips.g:593:4: ( Turning | Heading ) fixedDirectionTurn\n {\n // flips.g:593:4: ( Turning | Heading )\n int alt147=2;\n int LA147_0 = input.LA(1);\n\n if ( (LA147_0==Turning) ) {\n alt147=1;\n }\n else if ( (LA147_0==Heading) ) {\n alt147=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 147, 0, input);\n\n throw nvae;\n }\n switch (alt147) {\n case 1 :\n // flips.g:593:5: Turning\n {\n Turning399=(Token)match(input,Turning,FOLLOW_Turning_in_fixedDirection3459); \n stream_Turning.add(Turning399);\n\n\n }\n break;\n case 2 :\n // flips.g:593:13: Heading\n {\n Heading400=(Token)match(input,Heading,FOLLOW_Heading_in_fixedDirection3461); \n stream_Heading.add(Heading400);\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_fixedDirectionTurn_in_fixedDirection3464);\n fixedDirectionTurn401=fixedDirectionTurn();\n\n state._fsp--;\n\n stream_fixedDirectionTurn.add(fixedDirectionTurn401.getTree());\n\n\n // AST REWRITE\n // elements: fixedDirectionTurn\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 594:2: -> fixedDirectionTurn\n {\n adaptor.addChild(root_0, stream_fixedDirectionTurn.nextTree());\n\n }\n\n retval.tree = root_0;\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }",
"void ResolveUnreleasedMovements() {\n\t\t// if (isMove_down())\n\t\t// moveDown();\n\t\tif (isMove_left())\n\t\t\tmoveLeft();\n\t\tif (isMove_right())\n\t\t\tmoveRight();\n\t\t// if (isMove_up())\n\t\t// moveUP();\n\t\t// setBlock_down(false);\n\t\t// if (!isMove_left() && !isMove_right())\n\t\t// getSpeed().setX(0);\n\t\t// if (!isMove_down() && !isMove_up())\n\t\t// getSpeed().setY(0);\n\t}",
"public double[] getDesiredHandYawPitchRoll()\n {\n switch (this)\n {\n case STAND_PREP:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case REACH_BACK:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case REACH_WAY_BACK:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case ARMS_03:\n return new double[] {0.0, Math.PI, 0.0};\n case REACH_FORWARD:\n return new double[] {0.0, 0.0, 0.0};\n case SMALL_CHICKEN_WINGS:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case LARGE_CHICKEN_WINGS:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case STRAIGHTEN_ELBOWS:\n return new double[] {0.0, 0.0, 0.0};\n case SUPPINATE_ARMS_IN_A_LITTLE:\n return new double[] {0.0, 0.0, 0.0};\n case ARMS_BACK:\n return new double[] {0.0, 0.0, 0.0};\n case LARGER_CHICKEN_WINGS:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case ARMS_OUT_EXTENDED:\n return new double[] {0.0, 0.0, 0.0};\n case SUPPINATE_ARMS_IN_MORE:\n return new double[] {0.0, 0.0, 0.0};\n case SUPPINATE_ARMS_IN_A_LOT:\n return new double[] {0.0, 0.0, 0.0};\n case SUPER_CHICKEN_WINGS:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case FLYING:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case FLYING_PALMS_UP:\n return new double[] {0.0, 0.0, 0.0};\n case KARATE_KID_KRANE_KICK:\n return new double[] {0.0, 0.0, 0.0};\n case FLEX_UP:\n return new double[] {0.0, 0.0, 0.0};\n case FLEX_DOWN:\n return new double[] {0.0, 0.0, 0.0};\n case FLYING_SUPPINATE_IN:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case FLYING_SUPPINATE_OUT:\n return new double[] {0.0, -Math.PI / 2.0, 0.0};\n case ARM_NINETY_ELBOW_DOWN:\n return new double[] {0.0, 0.0, 0.0};\n case ARM_NINETY_ELBOW_FORWARD:\n return new double[] {0.0, 0.0, 0.0};\n case ARM_NINETY_ELBOW_UP:\n return new double[] {0.0, 0.0, 0.0};\n case ARM_FORTFIVE_ELBOW_UP:\n return new double[] {0.0, 0.0, 0.0};\n case ARM_FORTFIVE_ELBOW_DOWN:\n return new double[] {0.0, 0.0, 0.0};\n case ARM_OUT_TRICEP_EXERCISE:\n return new double[] {0.0, 0.0, 0.0};\n case ARM_STRAIGHT_DOWN:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n\n default:\n return new double[] {0.0, 0.0, 0.0};\n }\n }",
"private void follow() {\n\t\t// calculate distance back to hive\n\t\tdouble distToHive = grid.getDistance(grid.getLocation(this),grid.getLocation(hive));\n\t\t// if close to flower from dance information, start scouting\n\t\tif(distToHive > followDist - 5) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying in direction of dance\n\t\telse{\n\t\t\t// deviate slightly from correct angle because bee's aren't perfect (I don't think)\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/50, Math.PI/50);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}",
"public void setDirection() {\n\t\tdouble randomDirection = randGen.nextDouble();\n\t\tif (randomDirection < .25) {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .5) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .75) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = 1;\n\t\t} else {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = 1;\n\t\t}\n\t}"
] | [
"0.66833955",
"0.5961004",
"0.5895483",
"0.5870522",
"0.58687186",
"0.5848269",
"0.5699004",
"0.5685677",
"0.56554204",
"0.56300336",
"0.56090534",
"0.5577662",
"0.5529495",
"0.5487599",
"0.5477713",
"0.54726124",
"0.5469876",
"0.54423964",
"0.5441422",
"0.5430703",
"0.5411348",
"0.5362635",
"0.5360907",
"0.5355823",
"0.53530866",
"0.53501517",
"0.5315397",
"0.53100216",
"0.53052366",
"0.52985454",
"0.5288447",
"0.5281282",
"0.5277781",
"0.5259713",
"0.5249222",
"0.5233726",
"0.52316564",
"0.52255976",
"0.5221307",
"0.5215301",
"0.5213342",
"0.51843935",
"0.51827204",
"0.51791394",
"0.51787555",
"0.517851",
"0.5175554",
"0.51754206",
"0.51730156",
"0.5171062",
"0.5157142",
"0.51563174",
"0.51482517",
"0.5137939",
"0.5137021",
"0.5125754",
"0.5120131",
"0.511805",
"0.5114021",
"0.51126385",
"0.5111887",
"0.5111429",
"0.51062447",
"0.5095883",
"0.5092706",
"0.50884193",
"0.5080414",
"0.5076963",
"0.5076679",
"0.5076421",
"0.50708616",
"0.5070119",
"0.50674844",
"0.5065728",
"0.50656396",
"0.5058734",
"0.50578636",
"0.50533664",
"0.5053045",
"0.5040416",
"0.5040292",
"0.50381035",
"0.5034471",
"0.5032703",
"0.5021237",
"0.5019065",
"0.5016105",
"0.50137025",
"0.5010183",
"0.5007425",
"0.500522",
"0.49888682",
"0.4988444",
"0.498599",
"0.49799544",
"0.4979474",
"0.49776378",
"0.49775723",
"0.49769163",
"0.49754173",
"0.49745107"
] | 0.0 | -1 |
Do nothing if this module is not enabled. | @EventHandler(ignoreCancelled = true)
public void denyCropDupe(PlayerInteractEvent event) {
if (!settings.isCropDupe()) return;
// Do nothing if player is right clicking.
if (!event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return;
// Do nothing if player has permission.
Player player = event.getPlayer();
if (player.hasPermission(Perm.AntiGlitch.CROP_DUPE)) return;
// Do nothing if player is not holding an exploitable material.
if (!BukkitUtils.hasItemsSelected(player, settings.getCropDupeDenyBlocks())) return;
// Iterate through all blocks surrounding block attempted to be placed.
Block block = event.getClickedBlock().getRelative(event.getBlockFace());
for (int x = -radius; x <= radius; x++) {
for (int y = -radius; y <= radius; y++) {
for (int z = -radius; z <= radius; z++) {
// Do nothing if block cannot be duped.
Material material = block.getRelative(x, y, z).getType();
if (!settings.getCropDupeCropBlocks().contains(material)) continue;
// Deny placing the block.
player.updateInventory();
event.setCancelled(true);
// Send player a message.
MessageUtils.sendMessage(player, settings.getCropDupeMessage());
return;
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void onDisabled() {\n // Do nothing.\n }",
"void disableMod();",
"@Override\n\tpublic void onDisable() {\n\t\tgetLogger().info(\"SimplyWrapper successfully disabled !\");\n\t}",
"private void checkEnabled() {\n }",
"@Override\n public boolean isProgrammable() {\n return false;\n }",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean isEnabled() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isEnabled() {\n\t\treturn false;\r\n\t}",
"@Override\n public void onDisabled() {\n }",
"void disable() {\n }",
"public void disable();",
"void disable();",
"void disable();",
"void enableMod();",
"public void onNotEnabled() {\n Timber.d(\"onNotEnabled\");\n // keep the callback in case they turn it on manually\n setTorPref(Status.DISABLED);\n createClearnetClient();\n status = Status.NOT_ENABLED;\n if (onStatusChangedListener != null) {\n new Thread(() -> onStatusChangedListener.notEnabled()).start();\n }\n }",
"@Override\r\n public void onDisabled(Context context) {\n }",
"@Override\r\n public void onDisabled(Context context) {\n }",
"public boolean isEnabled() {\n\t\treturn false;\r\n\t}",
"public boolean isEnabled() {\n\t\treturn false;\r\n\t}",
"@Override\n public boolean isEnabled() {\n return false;\n }",
"@Override\n public boolean isEnabled() {\n return false;\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\n public void onDisabled(Context context) {\n }",
"@Override\npublic boolean isEnabled() {\n\treturn false;\n}",
"public void setDisabled() {\n\t\tdisabled = true;\n\t}",
"public void disable ( ) {\r\n\t\tenabled = false;\r\n\t}",
"public void onEnabled() {\r\n }",
"@Override\n public void disabledInit() {\n //Diagnostics.writeString(\"State\", \"DISABLED\");\n }",
"@Override\r\n public void onDisable() {\r\n log.info(\"[SeattleSummer] plugin disabled.\");\r\n }",
"default void onDisable() {}",
"public void disable()\r\n\t{\r\n\t\tenabled = false;\r\n\t}",
"public boolean isEnabled() {\n\t\treturn false;\n\t}",
"public boolean isEnabled() {\n\t\treturn false;\n\t}",
"public abstract void Enabled();",
"public abstract void Disabled();",
"@Override\n public void onEnabled(Context context) {\n super.onEnabled(context);\n }",
"boolean hasEnabled();",
"@Override\n public void onDisabled(Context context) {\n super.onDisabled(context);\n }",
"@Override\n boolean disable() {\n return altingChannel.disable();\n }",
"public void disable() {\n\t\tm_enabled = false;\n\t\tuseOutput(0);\n\t}",
"@Override\r\n public void onEnabled(Context context) {\n }",
"@Override\r\n public void onEnabled(Context context) {\n }",
"public void disable() {\r\n m_enabled = false;\r\n useOutput(0, 0);\r\n }",
"@Override\n\t\t\t\tpublic boolean isEnabled() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"public static boolean isDisabled() {\r\n return disabled;\r\n }",
"@Override\r\n public boolean isPluginEnabled()\r\n {\n return true;\r\n }",
"@Override\n public void onDisable() {\n super.onDisable();\n running = false;\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }",
"@Override\n public void onEnabled(Context context) {\n }"
] | [
"0.7176143",
"0.69375426",
"0.6619999",
"0.6539546",
"0.6504644",
"0.65008295",
"0.65008295",
"0.64941615",
"0.64941615",
"0.6485786",
"0.64806503",
"0.648028",
"0.64476216",
"0.64476216",
"0.64424324",
"0.64313954",
"0.6429528",
"0.6429528",
"0.64233476",
"0.64233476",
"0.64206845",
"0.64206845",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.64040065",
"0.6402518",
"0.63939077",
"0.637956",
"0.63737714",
"0.636559",
"0.6364078",
"0.6363427",
"0.6335402",
"0.6325397",
"0.6325397",
"0.6314424",
"0.6308736",
"0.62922066",
"0.6263343",
"0.6245655",
"0.62384164",
"0.6219895",
"0.6214614",
"0.6214614",
"0.620666",
"0.6204437",
"0.62033546",
"0.61956465",
"0.6191827",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536",
"0.6190536"
] | 0.0 | -1 |
Recursive function, checks to ensure a block is not present at the desired teleport location, and if it is, adds 2 to the Y coordinate. Repeats until it finds an empty spot. | private void checkBlockAt(int x, int y, int z, World world,
EntityPlayer entityplayer) {
if (world.getBlock(x, y, z) == Blocks.air) {
world.playSoundEffect(x + 5.0D, y + 5.0D, z + 5.0D,
"mob.endermen.portal", 2.0F,
world.rand.nextFloat() * 0.1F + 0.9F);
entityplayer.setPosition(x, y, z);
for (int t = 1; t < 10; t++) {
world.spawnParticle("portal", x, y, z, 0D + t, 0D + t, 0D + t);
}
} else {
checkBlockAt(x, y + 2, z, world, entityplayer);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Location verifyLocation(Location location)\n {\n Block playerBlock = location.getBlock();\n World world = location.getWorld();\n\n if (rootC.getStringList(RootNode.WORLDS).contains(world.getName()))\n {\n // Only spawn monsters in normal world. End is crowded with endermen\n // and nether is too extreme anyway, add config later\n int lightLvl = location.getBlock().getLightFromSky();\n if (world.getEnvironment() == Environment.NORMAL\n && (location.getY() < rootC.getInt(RootNode.MORE_MONSTERS_MAX_Y) && lightLvl < 3))\n {\n // the playerBlock should always be air, but if the player stands\n // on a slab he actually is in the slab, checking a few blocks under because player could have jumped etc..\n if (playerBlock.getType().equals(Material.AIR))\n {\n for (int i = 0; i <= 3; i++)\n {\n playerBlock = location.getBlock().getRelative(BlockFace.DOWN, 1);\n\n if (playerBlock.getType().equals(Material.AIR))\n {\n location.subtract(0, 1, 0);\n playerBlock = location.getBlock();\n // the playerBlock is now the block where the monster\n // should spawn on, next up: verify block\n }\n else\n {\n break;\n }\n }\n }\n // no spawning on steps, stairs and transparent blocks\n if (playerBlock.getType().name().endsWith(\"STEP\") || playerBlock.getType().name().endsWith(\"STAIRS\")\n || playerBlock.getType().isTransparent() || !playerBlock.getType().isOccluding() || playerBlock.getType().equals(Material.AIR))\n {\n // don't spawn here\n return null;\n }\n\n if (quickVerify(location))\n return location;\n }\n\n }\n return null;\n }",
"private void scanForBlockFarAway() {\r\n\t\tList<MapLocation> locations = gameMap.senseNearbyBlocks();\r\n\t\tlocations.removeAll(stairs);\r\n\t\tif (locations.size() == 0) {\r\n\t\t\tblockLoc = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/* remove blocks that can be sensed */\r\n\t\tIterator<MapLocation> iter = locations.iterator();\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tMapLocation loc = iter.next();\r\n\t\t\tif (myRC.canSenseSquare(loc))\r\n\t\t\t\titer.remove();\r\n\t\t} \r\n\t\t\r\n\t\tlocations = navigation.sortLocationsByDistance(locations);\r\n\t\t//Collections.reverse(locations);\r\n\t\tfor (MapLocation block : locations) {\r\n\t\t\tif (gameMap.get(block).robotAtLocation == null){\r\n\t\t\t\t/* this location is unoccupied */\r\n\t\t\t\tblockLoc = block;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tblockLoc = null;\r\n\t}",
"private BlockPos stuckInBlock(AltoClef mod) {\n BlockPos p = mod.getPlayer().getBlockPos();\n if (isAnnoying(mod, p)) return p;\n if (isAnnoying(mod, p.up())) return p.up();\n BlockPos[] toCheck = generateSides(p);\n for (BlockPos check : toCheck) {\n if (isAnnoying(mod, check)) {\n return check;\n }\n }\n BlockPos[] toCheckHigh = generateSides(p.up());\n for (BlockPos check : toCheckHigh) {\n if (isAnnoying(mod, check)) {\n return check;\n }\n }\n return null;\n }",
"@Override\n public boolean moveBlock(Box pos) {\n if (indexPossibleBlock == 1) {\n if (pos.getCounter() == 3)\n completeTowers++;\n pos.build(4);\n } else {\n super.moveBlock(pos);\n if (pos.getCounter() == 4)\n completeTowers++;\n }\n return true;\n }",
"protected boolean teleportTo(double x, double y, double z) {\n double xI = this.posX;\n double yI = this.posY;\n double zI = this.posZ;\n this.posX = x;\n this.posY = y;\n this.posZ = z;\n boolean canTeleport = false;\n int blockX = (int)Math.floor(this.posX);\n int blockY = (int)Math.floor(this.posY);\n int blockZ = (int)Math.floor(this.posZ);\n Block block;\n if (this.worldObj.blockExists(blockX, blockY, blockZ)) {\n boolean canTeleportToBlock = false;\n while (!canTeleportToBlock && blockY > 0) {\n block = this.worldObj.getBlock(blockX, blockY - 1, blockZ);\n if (block != null && block.getMaterial().blocksMovement()) {\n canTeleportToBlock = true;\n }\n else {\n --this.posY;\n --blockY;\n }\n }\n if (canTeleportToBlock) {\n this.setPosition(this.posX, this.posY, this.posZ);\n if (this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox)) {\n canTeleport = true;\n }\n }\n }\n if (!canTeleport) {\n this.setPosition(xI, yI, zI);\n return false;\n }\n for (int i = 0; i < 128; i++) {\n double posRelative = i / 127.0;\n float vX = (this.rand.nextFloat() - 0.5F) * 0.2F;\n float vY = (this.rand.nextFloat() - 0.5F) * 0.2F;\n float vZ = (this.rand.nextFloat() - 0.5F) * 0.2F;\n double dX = xI + (this.posX - xI) * posRelative + (this.rand.nextDouble() - 0.5) * this.width * 2.0;\n double dY = yI + (this.posY - yI) * posRelative + this.rand.nextDouble() * this.height;\n double dZ = zI + (this.posZ - zI) * posRelative + (this.rand.nextDouble() - 0.5) * this.width * 2.0;\n this.worldObj.spawnParticle(\"portal\", dX, dY, dZ, vX, vY, vZ);\n }\n this.worldObj.playSoundEffect(xI, yI, zI, \"mob.endermen.portal\", 1.0F, 1.0F);\n this.worldObj.playSoundAtEntity(this, \"mob.endermen.portal\", 1.0F, 1.0F);\n return true;\n }",
"public void preyMovement(WallBuilding wb, int x1, int x2, int y1, int y2){\r\n int b1 = wb.block.get(wb.block.stx(x1), wb.block.sty(y1));//one away\r\n int b2 = wb.block.get(wb.block.stx(x2), wb.block.sty(y2));//two away\r\n if(b1 == 0){//if there are no blocks, we can move normally\r\n if(wb.food.getObjectsAtLocation(x1, y1) == null){//if there is no food in that space\r\n wb.prey.setObjectLocation(this, wb.prey.stx(x1),wb.prey.sty(y1));\r\n }\r\n }else if(b1 == 1){//if there is one block\r\n if(b2 == 0){//if the space after is empty, we can move too!\r\n if(wb.food.getObjectsAtLocation(x2, y2) == null){//if there is no food in that space\r\n wb.block.set(wb.block.stx(x2), wb.block.sty(y2), b2+1);\r\n wb.block.set(wb.block.stx(x1), wb.block.sty(y1), b1-1);\r\n wb.prey.setObjectLocation(this, wb.prey.stx(x1),wb.prey.sty(y1));\r\n }\r\n }else if(b2 < 3){//there is space to move the block\r\n wb.block.set(wb.block.stx(x2), wb.block.sty(y2), b2+1);\r\n wb.block.set(wb.block.stx(x1), wb.block.sty(y1), b1-1);\r\n }\r\n }else{//if there are 2 or 3 blocks\r\n if(b2 < 3){//there is space to move the block\r\n if(wb.food.getObjectsAtLocation(x2, y2) == null){//if there is no food in that space\r\n wb.block.set(wb.block.stx(x2), wb.block.sty(y2), b2+1);\r\n wb.block.set(wb.block.stx(x1), wb.block.sty(y1), b1-1);\r\n }\r\n }\r\n }\r\n }",
"public static void blockMove(Player player) {\n Location location1 = (Location) plugin.getConfig().get(\"region1\");\n Location location2 = (Location) plugin.getConfig().get(\"region2\");\n\n int y = (location1.getBlockY() < location2.getBlockY() ? location2.getBlockY() : location1.getBlockY());\n\n for (Location location : blockPlace.redblockloc) {\n int x = location.getBlockX();\n int z = location.getBlockZ();\n new Location(player.getWorld(), x, y + 1, z).getBlock().setType(location.getBlock().getType());\n player.sendMessage(String.valueOf(location.getBlock().getType()));\n if(location.getBlock().getType()==Material.AIR) {\n blockPlace.redblock.remove(location.getBlock().getType());\n }\n if(location.getBlock().getType()==Material.WATER) {\n blockPlace.redblock.remove(location.getBlock().getType());\n }\n if(location.getBlock().getType()== Material.IRON_BLOCK) {\n blockPlace.redblock.add(location.getBlock());\n }\n location.getBlock().setType(Material.AIR);\n }\n\n for (Location location : blockPlace.blueblockloc) {\n int xb = location.getBlockX();\n int zb = location.getBlockZ();\n new Location(player.getWorld(), xb, y + 1, zb).getBlock().setType(location.getBlock().getType());\n location.getBlock().setType(Material.AIR);\n if(location.getBlock().getType()==Material.AIR) {\n blockPlace.blueblock.remove(location.getBlock().getType());\n }\n }\n\n for (Location location : blockPlace.greenblockloc) {\n int xg = location.getBlockX();\n int zg = location.getBlockZ();\n new Location(player.getWorld(), xg, y + 1, zg).getBlock().setType(location.getBlock().getType());\n location.getBlock().setType(Material.AIR);\n }\n for (Location location : blockPlace.yellowblockloc) {\n int xy = location.getBlockX();\n int zy = location.getBlockZ();\n new Location(player.getWorld(), xy, y + 1, zy).getBlock().setType(location.getBlock().getType());\n location.getBlock().setType(Material.AIR);\n }\n }",
"@Redirect(method = \"attemptTeleport\", at = @At(value = \"INVOKE\", target = \"Lnet/minecraft/util/math/BlockPos;getY()I\"))\n private int isBlockLoadedTeleportCheck(BlockPos blockPos) {\n return world.isBlockLoaded(blockPos.down()) ? blockPos.getY() : (Integer.MIN_VALUE + 1);\n }",
"@Override\n\tpublic boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint i = worldObj.getFirstUncoveredBlock(par1, par2);\n\t\tif (i == 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn Block.blocksList[i].blockMaterial.blocksMovement();\n\t\t}\n\t}",
"@Test\n public void testAroundPlayerPositions() {\n IntStream.iterate(0, i -> i + 1).limit(LevelImpl.LEVEL_MAX).forEach(k -> {\n terrain = terrainFactory.create(level.getBlocksNumber());\n final List<Position> safePosition = new ArrayList<>();\n safePosition.add(TerrainFactoryImpl.PLAYER_POSITION);\n safePosition.add(new Position(TerrainFactoryImpl.PLAYER_POSITION.getX() + TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE,\n TerrainFactoryImpl.PLAYER_POSITION.getY()));\n safePosition.add(new Position(TerrainFactoryImpl.PLAYER_POSITION.getX(), \n TerrainFactoryImpl.PLAYER_POSITION.getY() + TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE));\n /*use assertFalse because they have already been removed*/\n assertFalse(terrain.getFreeTiles().stream().map(i -> i.getPosition()).collect(Collectors.toList()).containsAll(safePosition));\n level.levelUp();\n });\n }",
"private Point getSafeTeleportPosition() {\n\t\tRandom number \t= new Random();\n\t\tPoint p\t\t\t= new Point();\n\t\twhile(true) {\n\t\t\tint x\t\t= number.nextInt(rows-1);\t\n\t\t\tint y\t\t= number.nextInt(cols-1);\n\t\t\tp.x\t\t\t= x;\n\t\t\tp.y\t\t\t= y;\n\t\t\t\n\t\t\t//if the point isn't in the array\n\t\t\tif(!occupiedPositions.contains(p)) {\n\t\t\t\t//check the surrounding of the point, need to be a \"safe teleport\"\n\t\t\t\tif(checkSurroundingOfPoint(p)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn p;\n\t}",
"public static boolean safeTeleport(Player toBeTeleported, Location toTeleport, boolean isFlying, boolean registerBackLocation, boolean... ignoreCooldown) throws CommandException {\n //Get SlapPlayer\n// SlapPlayer sp = PlayerControl.getPlayer(toBeTeleported);\n//\n// if ((ignoreCooldown.length > 0 && !ignoreCooldown[0]) || ignoreCooldown.length == 0) {\n// if (!sp.getTeleporter().canTeleport()) { //Check if able to teleport if cooldown\n// if (!Util.testPermission(toBeTeleported, \"tp.cooldownoverride\")) {\n// throw new CommandException(\"You'll need to wait a bit before teleporting agian!\");\n// }\n// }\n// }\n\n\n Location teleportTo = null;\n boolean tpUnder = false;\n\n Location fromLocation = toBeTeleported.getLocation();\n\n if (isFlying && !toBeTeleported.isFlying()) { //Target is flying while the player is not flying -> Find first block under target\n tpUnder = true;\n boolean creative = (toBeTeleported.getGameMode() == GameMode.CREATIVE); //Check if in creative\n for (Location loc = toTeleport; loc.getBlockY() > 0; loc.add(0, -1, 0)) { //Loop thru all blocks under target's location\n Material m = loc.getBlock().getType();\n if (m == Material.AIR) continue; //Looking for first solid\n if (m == Material.LAVA && !creative) { //If teleporting into lava && not in creative\n throw new CommandException(\"You would be teleported into Lava!\");\n }\n teleportTo = loc.add(0, 1, 0); //Set loc + 1 block above\n break;\n }\n } else { //Not flying\n teleportTo = toTeleport;\n }\n\n if (teleportTo == null) { //Check if location found\n throw new CommandException(\"Cannot teleport! Player above void!\");\n }\n\n toBeTeleported.teleport(teleportTo); //Teleport\n toBeTeleported.setVelocity(new Vector(0, 0, 0)); //Reset velocity\n\n// if (registerBackLocation) { //If registering back location\n// sp.getTeleporter().setBackLocation(fromLocation); //Set back location\n// }\n\n //Register teleport\n// sp.getTeleporter().teleported();\n\n return tpUnder;\n }",
"private void reachAllValidPoint(int[][] tempMap, int i, int j) {\n\n\t\ttempMap[i][j] = 0;\n\t\t\n\t\t//moving in edge\n\t\tif (j > 0\n\t\t\t\t&& tempMap[i][j - 1] == 1\n\t\t\t\t&& (mapElementArray[i][j - 1] instanceof Item\n\t\t\t\t\t\t|| mapElementArray[i][j - 1] instanceof Teleporter || mapElementArray[i][j - 1] instanceof PlayerSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, i, j - 1);\n\t\t}\n\t\tif (j + 1 < width\n\t\t\t\t&& tempMap[i][j + 1] == 1\n\t\t\t\t&& (mapElementArray[i][j + 1] instanceof Item\n\t\t\t\t\t\t|| mapElementArray[i][j + 1] instanceof Teleporter || mapElementArray[i][j + 1] instanceof PlayerSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, i, j + 1);\n\t\t}\n\t\tif (i - 1 >= 0\n\t\t\t\t&& tempMap[i - 1][j] == 1\n\t\t\t\t&& (mapElementArray[i - 1][j] instanceof Item\n\t\t\t\t\t\t|| mapElementArray[i - 1][j] instanceof Teleporter || mapElementArray[i][j - 1] instanceof PlayerSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, i - 1, j);\n\t\t}\n\t\tif (i + 1 < height\n\t\t\t\t&& tempMap[i + 1][j] == 1\n\t\t\t\t&& (mapElementArray[i + 1][j] instanceof Item\n\t\t\t\t\t\t|| mapElementArray[i + 1][j] instanceof Teleporter || mapElementArray[i + 1][j] instanceof PlayerSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, i + 1, j);\n\t\t}\n\t\t\n\t\t//moving at edge, must consider if this point is a RandPaar\n\t\tif (i == 0 && tempMap[height - 1][j] == 1\n\t\t\t\t&& !(mapElementArray[height - 1][j] instanceof Wall)\n\t\t\t\t&& !(mapElementArray[height - 1][j] instanceof InvisibleWall)\n\t\t\t\t&& !(mapElementArray[height - 1][j] instanceof GhostSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, height - 1, j);\n\t\t} else if (i == height - 1 && tempMap[0][j] == 1\n\t\t\t\t&& !(mapElementArray[0][j] instanceof Wall)\n\t\t\t\t&& !(mapElementArray[0][j] instanceof InvisibleWall)\n\t\t\t\t&& !(mapElementArray[0][j] instanceof GhostSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, 0, j);\n\t\t} else if (j == 0 && tempMap[i][width - 1] == 1\n\t\t\t\t&& !(mapElementArray[i][width - 1] instanceof Wall)\n\t\t\t\t&& !(mapElementArray[i][width - 1] instanceof InvisibleWall)\n\t\t\t\t&& !(mapElementArray[i][width - 1] instanceof GhostSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, i, width - 1);\n\t\t} else if (j == width - 1 && tempMap[i][0] == 1\n\t\t\t\t&& !(mapElementArray[i][0] instanceof Wall)\n\t\t\t\t&& !(mapElementArray[i][0] instanceof InvisibleWall)\n\t\t\t\t&& !(mapElementArray[i][0] instanceof GhostSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, i, 0);\n\t\t}\n\t}",
"@Test\n public void chunkPosShouldBeMinus1ByMinus1WhenPlayerPosIsMinus1byMinus1() {\n final int sideLengthOfBlock = 10;\n final int rowAmountInChunk = 11;\n\n MatcherAssert.assertThat(\n this.targetCompass(\n sideLengthOfBlock,\n rowAmountInChunk,\n new Point(-1, -1)\n ).chunkPos(),\n CoreMatchers.equalTo(new Point(-1, -1))\n );\n }",
"@Test\n public void chunkPosShouldBeMinus2ByMinus2WhenPlayerPosIsMinus111byMinus111() {\n final int sideLengthOfBlock = 10;\n final int rowAmountInChunk = 11;\n\n final int playerPos = -111;\n final int expectedChunkPos = -2;\n\n MatcherAssert.assertThat(\n this.targetCompass(\n sideLengthOfBlock,\n rowAmountInChunk,\n new Point(playerPos, playerPos)\n ).chunkPos(),\n CoreMatchers.equalTo(new Point(expectedChunkPos, expectedChunkPos))\n );\n }",
"public Location getSafePoint(Location location, boolean allowWater, int eyeHeight) {\r\n\t\tChunk chunk = location.getChunk();\r\n\t\tChunkSnapshot chunkShot = chunk.getChunkSnapshot();\r\n\t\t//int x = Math.abs(location.getBlockX() % 16);\r\n\t\tint x = Math.abs(location.getBlockX() - (location.getBlockX() >> 4) * 16);\r\n\t\tint y = Math.min(Math.max(location.getBlockY() + 1, location.getWorld().getMinHeight()), location.getWorld().getMaxHeight() + 1); // by default check block at feet\r\n\t\tint z = Math.abs(location.getBlockZ() - (location.getBlockZ() >> 4) * 16); \r\n\t\t// location is level with block borders, get the block below player\r\n\t\tif(Math.abs(location.getY() - (int)location.getY()) < 0.01) --y;\r\n\t\t\r\n\t\t// If in air, scan below until ground\r\n\t\tfor(int tempY = y; tempY > location.getWorld().getMinHeight(); --tempY) {\r\n\t\t\tif(chunkShot.getBlockType(x, tempY - 1, z).isSolid()) {\r\n\t\t\t\ty = tempY;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check if the location in the chunk is safe\r\n\t\tSAFENESS safeness = null;\r\n\t\t\r\n\t\tif(y+eyeHeight <= location.getWorld().getMaxHeight())\r\n\t\t\tsafeness = isSafe(allowWater, chunkShot.getBlockType(x, y-1, z), \r\n\t\t\t\t\tchunkShot.getBlockType(x, y, z), \r\n\t\t\t\t\tchunkShot.getBlockType(x, (y+eyeHeight), z));\r\n\t\telse if(y+eyeHeight > location.getWorld().getMaxHeight() && y <= location.getWorld().getMaxHeight())\r\n\t\t\tsafeness = isSafe(allowWater, chunkShot.getBlockType(x, y-1, z), \r\n\t\t\t\t\tchunkShot.getBlockType(x, y, z));\r\n\t\telse\r\n\t\t\tsafeness = isSafe(allowWater, chunkShot.getBlockType(x, y-1, z));\r\n\t\t\r\n\t\t// TODO CHECK IF MAX HEIGHT IS 255 \r\n\t\t// 256 is maxheight + 1\r\n\t\t\r\n\t\t// if safe, return the given location\r\n\t\tif(safeness == SAFENESS.SAFE)\r\n\t\t\treturn location;\r\n\t\t\r\n\t\t// get the highest location to return if previous was unsafe\r\n\t\tint highestY = chunkShot.getHighestBlockYAt(x, z)+1;\r\n\t\t// no blocks at the axis\r\n\t\tif(highestY < 1) {\r\n\t\t\treturn null;\r\n\t\t} else if(highestY + eyeHeight < location.getWorld().getMaxHeight() + 1) {\r\n\t\t\t// normal location in world\r\n\t\t\tsafeness = isSafe(allowWater, chunkShot.getBlockType(x, highestY-1, z), \r\n\t\t\t\t\tchunkShot.getBlockType(x, highestY, z), \r\n\t\t\t\t\tchunkShot.getBlockType(x, (highestY+eyeHeight), z));\r\n\t\t} else if(highestY+eyeHeight > location.getWorld().getMaxHeight() && highestY <= location.getWorld().getMaxHeight()){\r\n\t\t\t// eye height above build limit, don't check eyeheight\r\n\t\t\tsafeness = isSafe(allowWater, chunkShot.getBlockType(x, highestY-1, z), \r\n\t\t\t\t\tchunkShot.getBlockType(x, highestY, z));\r\n\t\t} else {\r\n\t\t\t// highest block at build limit\r\n\t\t\tsafeness = isSafe(allowWater, chunkShot.getBlockType(x, highestY-1, z));\r\n\t\t}\r\n\t\t\r\n\t\t// a safe location found, return it\r\n\t\tif(safeness == SAFENESS.SAFE)\r\n\t\t\treturn new Location(location.getWorld(), location.getBlockX()+0.5, highestY, location.getBlockZ()+0.5, \r\n\t\t\t\t\tlocation.getYaw(), location.getPitch());\r\n\t\t\r\n\t\t// scan all the blocks below until a safe location is found\r\n\t\twhile(highestY > 1) {\r\n\t\t\t--highestY;\r\n\t\t\t\r\n\t\t\tMaterial blockBelowFeet = chunkShot.getBlockType(x, highestY-1, z);\r\n\t\t\tMaterial blockAtFeet = chunkShot.getBlockType(x, highestY, z);\r\n\t\t\t\r\n\t\t\tif((highestY + eyeHeight) <= location.getWorld().getMaxHeight()) {\r\n\t\t\t\tMaterial blockAtHead = chunkShot.getBlockType(x, (highestY+eyeHeight), z);\r\n\t\t\t\tif(SAFENESS.SAFE == isSafe(allowWater, blockBelowFeet, blockAtFeet, blockAtHead))\r\n\t\t\t\t\treturn new Location(location.getWorld(), location.getBlockX()+0.5, highestY, location.getBlockZ()+0.5, location.getYaw(), location.getPitch());\r\n\t\t\t} else {\r\n\t\t\t\tif(SAFENESS.SAFE == isSafe(allowWater, blockBelowFeet, blockAtFeet))\r\n\t\t\t\t\treturn new Location(location.getWorld(), location.getBlockX()+0.5, highestY, location.getBlockZ()+0.5, location.getYaw(), location.getPitch());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// no safe location found\r\n\t\treturn null;\r\n\t}",
"public void tick() {\n super.tick();\n BlockPos blockpos = this.dataManager.get(ATTACHED_BLOCK_POS).orElse((BlockPos)null);\n if (blockpos == null && !this.world.isRemote) {\n blockpos = this.getPosition();\n this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos));\n }\n\n if (this.isPassenger()) {\n blockpos = null;\n float f = this.getRidingEntity().rotationYaw;\n this.rotationYaw = f;\n this.renderYawOffset = f;\n this.prevRenderYawOffset = f;\n this.clientSideTeleportInterpolation = 0;\n } else if (!this.world.isRemote) {\n BlockState blockstate = this.world.getBlockState(blockpos);\n if (!blockstate.isAir(this.world, blockpos)) {\n if (blockstate.isIn(Blocks.MOVING_PISTON)) {\n Direction direction = blockstate.get(PistonBlock.FACING);\n if (this.world.isAirBlock(blockpos.offset(direction))) {\n blockpos = blockpos.offset(direction);\n this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos));\n } else {\n this.tryTeleportToNewPosition();\n }\n } else if (blockstate.isIn(Blocks.PISTON_HEAD)) {\n Direction direction3 = blockstate.get(PistonHeadBlock.FACING);\n if (this.world.isAirBlock(blockpos.offset(direction3))) {\n blockpos = blockpos.offset(direction3);\n this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos));\n } else {\n this.tryTeleportToNewPosition();\n }\n } else {\n this.tryTeleportToNewPosition();\n }\n }\n\n Direction direction4 = this.getAttachmentFacing();\n if (!this.func_234298_a_(blockpos, direction4)) {\n Direction direction1 = this.func_234299_g_(blockpos);\n if (direction1 != null) {\n this.dataManager.set(ATTACHED_FACE, direction1);\n } else {\n this.tryTeleportToNewPosition();\n }\n }\n }\n\n float f1 = (float)this.getPeekTick() * 0.01F;\n this.prevPeekAmount = this.peekAmount;\n if (this.peekAmount > f1) {\n this.peekAmount = MathHelper.clamp(this.peekAmount - 0.05F, f1, 1.0F);\n } else if (this.peekAmount < f1) {\n this.peekAmount = MathHelper.clamp(this.peekAmount + 0.05F, 0.0F, f1);\n }\n\n if (blockpos != null) {\n if (this.world.isRemote) {\n if (this.clientSideTeleportInterpolation > 0 && this.currentAttachmentPosition != null) {\n --this.clientSideTeleportInterpolation;\n } else {\n this.currentAttachmentPosition = blockpos;\n }\n }\n\n this.forceSetPosition((double)blockpos.getX() + 0.5D, (double)blockpos.getY(), (double)blockpos.getZ() + 0.5D);\n double d2 = 0.5D - (double)MathHelper.sin((0.5F + this.peekAmount) * (float)Math.PI) * 0.5D;\n double d0 = 0.5D - (double)MathHelper.sin((0.5F + this.prevPeekAmount) * (float)Math.PI) * 0.5D;\n if (this.isAddedToWorld() && this.world instanceof net.minecraft.world.server.ServerWorld) ((net.minecraft.world.server.ServerWorld)this.world).chunkCheck(this); // Forge - Process chunk registration after moving.\n Direction direction2 = this.getAttachmentFacing().getOpposite();\n this.setBoundingBox((new AxisAlignedBB(this.getPosX() - 0.5D, this.getPosY(), this.getPosZ() - 0.5D, this.getPosX() + 0.5D, this.getPosY() + 1.0D, this.getPosZ() + 0.5D)).expand((double)direction2.getXOffset() * d2, (double)direction2.getYOffset() * d2, (double)direction2.getZOffset() * d2));\n double d1 = d2 - d0;\n if (d1 > 0.0D) {\n List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this, this.getBoundingBox());\n if (!list.isEmpty()) {\n for(Entity entity : list) {\n if (!(entity instanceof ShulkerEntity) && !entity.noClip) {\n entity.move(MoverType.SHULKER, new Vector3d(d1 * (double)direction2.getXOffset(), d1 * (double)direction2.getYOffset(), d1 * (double)direction2.getZOffset()));\n }\n }\n }\n }\n }\n\n }",
"public boolean hasBlockAdjacent(int x, int y) {\n\t\treturn \tgetBlock(x, y + 1).canBePlaced(Direction.DOWN, 0, x, y + 1, this) || \n\t\t\tgetBlock(x, y - 1).canBePlaced(Direction.UP, 0, x, y - 1, this) || \n\t\t\tgetBlock(x + 1, y).canBePlaced(Direction.LEFT, 0, x + 1, y, this) || \n\t\t\tgetBlock(x - 1, y).canBePlaced(Direction.RIGHT, 0, x - 1, y, this);\n\t}",
"private int Block_Move() {\n\t\tfinal int POSSIBLE_BLOCK = 2;\n\t\tint move = NO_MOVE;\n\t\t\n\t\tif(( gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[TOP_CENTER] == EMPTY){\n\t\t\t\tmove = TOP_CENTER;\n\t\t\t}else if (gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[CTR_LEFT] == EMPTY){\n\t\t\t\tmove = CTR_LEFT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[CTR_RIGHT] == EMPTY){\n\t\t\t\tmove = CTR_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}else if (gameBoard[BTM_CENTER] == EMPTY){\n\t\t\t\tmove = BTM_CENTER;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[CTR_LEFT] == EMPTY){\n\t\t\t\tmove = CTR_LEFT;\n\t\t\t}else if (gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_CENTER] == EMPTY){\n\t\t\t\tmove = TOP_CENTER;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_CENTER] == EMPTY){\n\t\t\t\tmove = BTM_CENTER;\n\t\t\t}\t\t\t\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}else if (gameBoard[CTR_RIGHT] == EMPTY){\n\t\t\t\tmove = CTR_RIGHT;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}\n\t\t}\n\t\treturn move;\n\t}",
"public Block createPath(Block currentBlock){\n\n\t\tint indexOfNeighbouringBlock = (int) (Math.random()*RoomGen.neighbouringBlocks.get(currentBlock).size());\n\t\tint size = RoomGen.neighbouringBlocks.get(currentBlock).size();\n\t\t\n\t\tif(!path.contains(currentBlock)){\n\t\t\tpath.add(currentBlock);\n\t\t}\n\t\t\n\t\t//set the next index to make sure that elements of path are distinct\n\t\tSystem.out.println(\"size of neighbours: \" + RoomGen.neighbouringBlocks.get(currentBlock).size());\n\t\tif(path.contains(RoomGen.neighbouringBlocks.get(currentBlock).get(indexOfNeighbouringBlock))){\n\t\t\tif(indexOfNeighbouringBlock != 0 || indexOfNeighbouringBlock == RoomGen.neighbouringBlocks.get(currentBlock).size() - 1){\n\t\t\t\tindexOfNeighbouringBlock = indexOfNeighbouringBlock-1;\n\t\t\t}else{\n\t\t\t\tindexOfNeighbouringBlock = indexOfNeighbouringBlock+1;\n\t\t\t}\n\t\t}else{\t\t\n\t\t}\n\t\tBlock next = new Block(0,0,0,0);\n\t\t\n\t\t//Initialise next block\n\t\tif(unfinishedDoors.contains(RoomGen.neighbouringBlocks.get(currentBlock).get(indexOfNeighbouringBlock))){\n\t\t\tnext = RoomGen.neighbouringBlocks.get(currentBlock).get(indexOfNeighbouringBlock);\n\t\t}else{\n\t\t\tfor(int i = 0; i<RoomGen.neighbouringBlocks.get(currentBlock).size(); i++){\n\t\t\t\tif(unfinishedDoors.contains(RoomGen.neighbouringBlocks.get(currentBlock).get(i))){\n\t\t\t\t\tnext = RoomGen.neighbouringBlocks.get(currentBlock).get(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(i==RoomGen.neighbouringBlocks.get(currentBlock).size()-1){\n\t\t\t\t\treturn currentBlock;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\taddDoor(currentBlock, next);\n\t\t\n\t\tcurrentBlock.addDoor();\n\t\tnext.addDoor();\n\t\t\n\t\t//if current block reaches full door potential when adding door to next,\n\t\t//add it to the list of finished blocks and remove it from the list of unfinished ones\n\t\tif(currentBlock.getPotentialDoorNum() == currentBlock.getCurrentDoorNum()){\n\t\t\tfinishedDoors.add(currentBlock);\n\t\t\tfor(int i = 0; i< unfinishedDoors.size(); i++){\n\t\t\t\tif(unfinishedDoors.get(i).equals(currentBlock)){\n\t\t\t\t\tunfinishedDoors.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//path ends if next reaches full door potential when adding door from b to next\n\t\t//next is put to finished list and removed from unfinished list\n\t\tif(next.getPotentialDoorNum() == next.getCurrentDoorNum()){\n\t\t\tfinishedDoors.add(next);\n\t\t\tpath.add(next);\n\t\t\t\n\t\t\tfor(int i = 0; i< unfinishedDoors.size(); i++){\n\t\t\t\tif(unfinishedDoors.get(i).equals(next)){\n\t\t\t\t\tunfinishedDoors.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn next;\n\t\t}\n\t\t//otherwise the path continues\n\t\telse{\n\t\t\treturn createPath(next);\n\t\t}\n\t\t}",
"public boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint var3 = this.worldObj.getFirstUncoveredBlock(par1, par2);\n\t\treturn var3 == 0 ? false : Block.blocksList[var3].blockMaterial.blocksMovement();\n\t}",
"public boolean generate(World paramaqu, Random paramRandom, BlockPosition paramdt)\r\n/* 13: */ {\r\n/* 14:22 */ while ((paramaqu.isEmpty(paramdt)) && (paramdt.getY() > 2)) {\r\n/* 15:23 */ paramdt = paramdt.down();\r\n/* 16: */ }\r\n/* 17:26 */ if (!a.apply(paramaqu.getBlock(paramdt))) {\r\n/* 18:27 */ return false;\r\n/* 19: */ }\r\n/* 20: */ int k;\r\n/* 21:31 */ for (int i = -2; i <= 2; i++) {\r\n/* 22:32 */ for (k = -2; k <= 2; k++) {\r\n/* 23:33 */ if ((paramaqu.isEmpty(paramdt.offset(i, -1, k))) && (paramaqu.isEmpty(paramdt.offset(i, -2, k)))) {\r\n/* 24:34 */ return false;\r\n/* 25: */ }\r\n/* 26: */ }\r\n/* 27: */ }\r\n/* 28:40 */ for (int i = -1; i <= 0; i++) {\r\n/* 29:41 */ for (k = -2; k <= 2; k++) {\r\n/* 30:42 */ for (int n = -2; n <= 2; n++) {\r\n/* 31:43 */ paramaqu.setBlock(paramdt.offset(k, i, n), this.c, 2);\r\n/* 32: */ }\r\n/* 33: */ }\r\n/* 34: */ }\r\n/* 35:49 */ paramaqu.setBlock(paramdt, this.d, 2);\r\n/* 36:50 */ for (EnumDirection localej : EnumHorizontalVertical.HORIZONTAL) {\r\n/* 37:51 */ paramaqu.setBlock(paramdt.offset(localej), this.d, 2);\r\n/* 38: */ }\r\n/* 39: */ int m;\r\n/* 40:55 */ for (int j = -2; j <= 2; j++) {\r\n/* 41:56 */ for (m = -2; m <= 2; m++) {\r\n/* 42:57 */ if ((j == -2) || (j == 2) || (m == -2) || (m == 2)) {\r\n/* 43:58 */ paramaqu.setBlock(paramdt.offset(j, 1, m), this.c, 2);\r\n/* 44: */ }\r\n/* 45: */ }\r\n/* 46: */ }\r\n/* 47:63 */ paramaqu.setBlock(paramdt.offset(2, 1, 0), this.b, 2);\r\n/* 48:64 */ paramaqu.setBlock(paramdt.offset(-2, 1, 0), this.b, 2);\r\n/* 49:65 */ paramaqu.setBlock(paramdt.offset(0, 1, 2), this.b, 2);\r\n/* 50:66 */ paramaqu.setBlock(paramdt.offset(0, 1, -2), this.b, 2);\r\n/* 51:69 */ for (int j = -1; j <= 1; j++) {\r\n/* 52:70 */ for (m = -1; m <= 1; m++) {\r\n/* 53:71 */ if ((j == 0) && (m == 0)) {\r\n/* 54:72 */ paramaqu.setBlock(paramdt.offset(j, 4, m), this.c, 2);\r\n/* 55: */ } else {\r\n/* 56:74 */ paramaqu.setBlock(paramdt.offset(j, 4, m), this.b, 2);\r\n/* 57: */ }\r\n/* 58: */ }\r\n/* 59: */ }\r\n/* 60:80 */ for (int j = 1; j <= 3; j++)\r\n/* 61: */ {\r\n/* 62:81 */ paramaqu.setBlock(paramdt.offset(-1, j, -1), this.c, 2);\r\n/* 63:82 */ paramaqu.setBlock(paramdt.offset(-1, j, 1), this.c, 2);\r\n/* 64:83 */ paramaqu.setBlock(paramdt.offset(1, j, -1), this.c, 2);\r\n/* 65:84 */ paramaqu.setBlock(paramdt.offset(1, j, 1), this.c, 2);\r\n/* 66: */ }\r\n/* 67:87 */ return true;\r\n/* 68: */ }",
"public void updateVerticalPosition() {\n\t\tVector3 avatarWorldPositionP1 = dolphinNodeOne.getWorldPosition();\n\t\tVector3 avatarLocalPositionP1 = dolphinNodeOne.getLocalPosition();\n\t\tVector3 terrainPositionP1 = (Vector3) Vector3f.createFrom(avatarLocalPositionP1.x(),\n\t\t\t\ttessellationEntity.getWorldHeight(avatarWorldPositionP1.x(), avatarWorldPositionP1.z()) + 0.3f,\n\t\t\t\tavatarLocalPositionP1.z());\n\t\tVector3 groundPositionP1 = (Vector3) Vector3f.createFrom(avatarLocalPositionP1.x(),\n\t\t\t\tgroundTessellation.getWorldHeight(avatarWorldPositionP1.x(), avatarWorldPositionP1.z() - 0.3f),\n\t\t\t\tavatarLocalPositionP1.z());\n\t\tif (avatarLocalPositionP1.y() <= terrainPositionP1.y() + 0.3f\n\t\t\t\t|| avatarLocalPositionP1.y() <= groundPositionP1.y()) {\n\t\t\tVector3 avatarPositionP1 = terrainPositionP1;\n\t\t\tif (avatarPositionP1.y() < groundPositionP1.y()) {\n\t\t\t\tavatarPositionP1 = groundPositionP1;\n\t\t\t}\n\t\t\tdolphinNodeOne.setLocalPosition(avatarPositionP1);\n\t\t\tsynchronizeAvatarPhysics(dolphinNodeOne);\n\t\t\tif (jumpP1) {\n\t\t\t\tdolphinNodeOne.getPhysicsObject().applyForce(0.0f, 800f, 0.0f, 0.0f, 0.0f, 0.0f);\n\t\t\t\t// jumpP1 = false;\n\t\t\t}\n\t\t} // else if (avatarLocaPositionP1.y() > terrainPositionP1.y() + 1.0f) {\n\t\t\t// jumpP1 = true;\n\t\t\t// }\n\t\tfor (int i = 0; i < npcEntity.length; i++) {\n\t\t\tVector3 npcWorldPosition = npcEntity[i].getNode().getWorldPosition();\n\t\t\tVector3 npcLocalPosition = npcEntity[i].getNode().getLocalPosition();\n\t\t\tVector3 npcTerrainPosition = (Vector3) Vector3f.createFrom(npcLocalPosition.x(),\n\t\t\t\t\ttessellationEntity.getWorldHeight(npcWorldPosition.x(), npcWorldPosition.z() + 0.3f),\n\t\t\t\t\tnpcLocalPosition.z());\n\t\t\tVector3 npcGroundPlanePosition = (Vector3) Vector3f.createFrom(npcLocalPosition.x(),\n\t\t\t\t\tgroundTessellation.getWorldHeight(npcWorldPosition.x(), npcWorldPosition.z() + 0.2f),\n\t\t\t\t\tnpcLocalPosition.z());\n\n\t\t\tif (npcLocalPosition.y() <= npcTerrainPosition.y() + 0.3f\n\t\t\t\t\t|| npcLocalPosition.y() <= npcGroundPlanePosition.y()) {\n\t\t\t\tVector3 npcPosition = npcTerrainPosition;\n\t\t\t\tif (npcLocalPosition.y() < npcGroundPlanePosition.y()) {\n\t\t\t\t\tnpcPosition = npcGroundPlanePosition;\n\t\t\t\t}\n\t\t\t\tnpcEntity[i].getNode().setLocalPosition(npcPosition);\n\t\t\t\tsynchronizeAvatarPhysics(npcEntity[i].getNode());\n\t\t\t}\n\n\t\t}\n\t}",
"private static float[] findNewPosition(Cell cell){\n int cA = cell.angleInDegree+90;\n cA = (cA>360) ? cA-360 : (cA<0) ? cA+360 : cA;\n angs[0] = cA;\n angs[1] = (cA+180>360) ? cA+180-360 : (cA+180<0) ? cA+180+360 : cA+180;\n\n //define position of new cell based on angle\n float angRad = (float) Math.toRadians(angs[1]);\n pos[0]=(float) (cell.x+2*Pars.rad*(Math.cos(angRad)));\n pos[1]=(float) (cell.y+2*Pars.rad*(Math.sin(angRad)));\n\n //check that cell in not outside of tissue\n int hX=Functions.getHexCoordinates('x',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n int hY=Functions.getHexCoordinates('y',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n while(Field.noMatter[hX][hY]){\n //if outside of tissue, try another angle\n cA=diceRoller.nextInt(360);\n angs[0] = cA;\n angs[1] = (cA+180>360) ? cA+180-360 : (cA+180<0) ? cA+180+360 : cA+180;\n\n //redefine cell position\n angRad = (float) Math.toRadians(angs[1]);\n pos[0]=(float) (cell.x+2*Pars.rad*(Math.cos(angRad)));\n pos[1]=(float) (cell.y+2*Pars.rad*(Math.sin(angRad)));\n\n //update hex mesh point to check within tissue\n hX=Functions.getHexCoordinates('x',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n hY=Functions.getHexCoordinates('y',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n }\n\n return pos;\n }",
"private static Square[] reachableAdjacentSquares\n (GameBoard board, Square currLoc, int pno, \n int dontCheckMe, int numJumps, boolean adjacentToPlayer) {\n\n // list to store adjacent squares\n List<Square> squareList = new LinkedList<Square>();\n\n // calculate direction bias\n int direction = 0;\n switch (pno) {\n case 0: direction = 86; break;\n case 1: direction = Integer.rotateRight(163,1); break;\n case 2: direction = 171; break;\n case 3: direction = Integer.rotateRight(345, 1); break;\n }\n \n // check each available adajcency\n for ( int i = 0; i < 4; i++ ) {\n \n // calculate the x and y offsets\n int x = ((direction & 8) >> 3) * Integer.signum(direction);\n int y = ((direction & 16) >> 4) * Integer.signum(direction);\n\n // retrieve an adjacent square to compare\n Square checkLoc = board.getSquare(currLoc.getX() + x,\n currLoc.getY() + y);\n\n // modify bits for the next iteration\n direction = Integer.rotateRight(direction,1);\n\n // if check is not an invalid location...\n if ( checkLoc != null ) {\n\n // skip this check if there is a wall in the way\n if ( ( y == 1 && currLoc.getWallBottom() != null) ||\n ( y == -1 && checkLoc.getWallBottom() != null) ||\n ( x == 1 && currLoc.getWallRight() != null ) ||\n ( x == -1 && checkLoc.getWallRight() != null) )\n continue;\n \n // check if there is a player adjacent to where we are\n else if ( adjacentToPlayer && checkLoc.isOccupied() \n && i != dontCheckMe && numJumps < 3 ) {\n // Get the squares from the adjacent player\n Square[] adjToPlayer = reachableAdjacentSquares(board,\n checkLoc, pno, (i+2)%4, numJumps++, adjacentToPlayer);\n // Add the adjacent player's squares to the list\n for ( int j = 0; j < adjToPlayer.length; j++ )\n squareList.add(adjToPlayer[j]);\n } \n\n else\n // add this square to the list\n squareList.add(checkLoc);\n\n adjacentToPlayer = true;\n }\n }\n\n // return the array of adjacent squares\n return squareList.toArray(new Square[squareList.size()]);\n }",
"private boolean UpdateWithoutCarriedBlock()\r\n {\r\n if ( rand.nextInt(20) == 0 )\r\n {\r\n int i = MathHelper.floor_double( ( posX - 3D ) + rand.nextDouble() * 6D );\r\n int j = MathHelper.floor_double( posY - 1D + rand.nextDouble() * 7D );\r\n int k = MathHelper.floor_double( ( posZ - 3D ) + rand.nextDouble() * 6D );\r\n \r\n int l1 = worldObj.getBlockId( i, j, k );\r\n\r\n if ( CanPickUpBlock( i, j, k ) )\r\n {\r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderBlockCollectAuxFXID, i, j, k, l1 + ( worldObj.getBlockMetadata( i, j, k ) << 12 ) );\r\n\t\t \r\n setCarried( worldObj.getBlockId( i, j, k ) );\r\n setCarryingData( worldObj.getBlockMetadata( i, j, k ) );\r\n worldObj.setBlockToAir( i, j, k );\r\n }\r\n }\r\n else if ( worldObj.provider.dimensionId == 1 )\r\n {\r\n \t// Endermen in the end without a block in hand will eventually teleport back to the overworld\r\n \t\r\n \t\tif ( rand.nextInt( 9600 ) == 0 )\r\n \t\t{\r\n \t\t\t// play dimensional travel effects\r\n \t\t\t\r\n int i = MathHelper.floor_double( posX );\r\n int j = MathHelper.floor_double( posY ) + 1;\r\n int k = MathHelper.floor_double( posZ );\r\n \r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderChangeDimensionAuxFXID, i, j, k, 0 );\r\n\t\t \r\n setDead();\r\n \r\n return false;\r\n \t\t}\r\n }\r\n \r\n return true;\r\n }",
"public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)\r\n/* 171: */ {\r\n/* 172:193 */ if (par9 < 12) {\r\n/* 173:194 */ return ForgeDirection.OPPOSITES[par5] + par9 & 0xF;\r\n/* 174: */ }\r\n/* 175:196 */ return par9 & 0xF;\r\n/* 176: */ }",
"private boolean thereispath(Move m, Tile tile, Integer integer, Graph g, Board B) {\n\n boolean result = true;\n boolean result1 = true;\n\n int start_dest_C = tile.COLUMN;\n int start_dest_R = tile.ROW;\n\n int move_column = m.getX();\n int move_row = m.getY();\n\n int TEMP = 0;\n int TEMP_ID = 0;\n int TEMP_ID_F = tile.id;\n int TEMP_ID_FIRST = tile.id;\n\n int final_dest_R = (integer / B.width);\n int final_dest_C = (integer % B.width);\n\n //System.out.println(\"* \" + tile.toString() + \" \" + integer + \" \" + m.toString());\n\n // Y ROW - X COLUMN\n\n for (int i = 0; i != 2; i++) {\n\n TEMP_ID_FIRST = tile.id;\n\n // possibility 1\n if (i == 0) {\n\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result != false; c++) {\n\n if (c == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n // System.out.println(\"OK\");\n\n } else {\n\n result = false;\n\n // System.out.println(\"NOPE\");\n\n\n }\n }\n\n for (int r = 0; r != Math.abs(move_row) && result != false; r++) {\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n // System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n\n } else {\n\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == true) {\n return true;\n }\n\n\n }\n\n TEMP_ID = 0;\n\n if (i == 1) {\n\n result = true;\n\n start_dest_C = tile.COLUMN;\n start_dest_R = tile.ROW;\n // first move row\n for (int r = 0; r != Math.abs(move_row) && result1 != false; r++) {\n\n if (r == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n\n //System.out.println(\"NOPE\");\n\n result = false;\n\n }\n\n\n }\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result1 != false; c++) {\n\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == false) {\n return false;\n\n }\n\n\n }\n\n\n }\n\n\n return true;\n }",
"public void testBoardAvailablePositions() {\n \tassertTrue(board6.hasAvailablePositionsForTile());\n \tList<PlacementLocation> expected = new ArrayList<PlacementLocation>();\n \tboard6.place(new Placement(Color.RED, 5, 21, Color.RED, 4, 16));\n \tboard6.place(new Placement(Color.RED, 4, 12, Color.RED, 5, 14));\n \tboard6.place(new Placement(Color.RED, 4, 8, Color.RED, 5, 11));\n \tboard6.place(new Placement(Color.RED, 5, 4, Color.RED, 4, 4));\n \tboard6.place(new Placement(Color.RED, 5, 1, Color.RED, 4, 0));\n \t\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(5, 26))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(4, 20))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(5, 24))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(6, 29))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(6, 30))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(6, 31))));\n \t\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(6, 28))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(6, 28))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(5, 23))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(4, 19))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(4, 19))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(3, 15))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(4, 21))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(4, 21))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(5, 27))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(6, 32))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(6, 32))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 34))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(7, 33))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(7, 34))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 35))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 36))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(7, 36))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(7, 37))));\n \t\n \t\n \tfor (PlacementLocation location : board6.getAvailablePositionsForTile()) {\n \t\tif (!expected.contains(location))\n \t\t\tSystem.out.println(\"expected does not contain location: \" + location);\n \t}\n \tSet<PlacementLocation> locations = board6.getAvailablePositionsForTile();\n \tfor (PlacementLocation location : locations) {\n \t\tSystem.out.println(location);\n \t}\n \tfor (PlacementLocation location : expected) {\n \t\tif (!locations.contains(location))\n \t\t\tSystem.out.println(\"expected2 does not contain location: \" + location);\n \t}\n \t\n \tassertEquals(expected, board6.getAvailablePositionsForTile());\n \t\n \t\n }",
"@Test\n public void testGetVerticalPillarBelow(){\n Pillar pillar = largePillarMap.get(Maze.position(0,0));\n Pillar edgePillar = largePillarMap.get(Maze.position(4,4));\n Pillar neighbor = largeMaze.getVerticalPillar(pillar, false);\n assertEquals(null, neighbor);\n\n neighbor = largeMaze.getVerticalPillar(edgePillar, false);\n assertEquals(4, neighbor.getX());\n assertEquals(3, neighbor.getY());\n }",
"@Test\n public void isOccupiedAndGetBlockReturnTheSameAnswer() {\n Tetromino tetromino = Tetromino.Z;\n Direction direction = Direction.DOWN;\n\n for (int y = 0; y < tetromino.height; y++) {\n for (int x = 0; x < tetromino.width; x++) {\n String coordinates = String.format(\"Tetromino Z[DOWN] block (x,y) = (%d,%d)\", x, y);\n\n boolean isOccupied = tetromino.isOccupied(direction, x, y);\n Block block = tetromino.getBlock(direction, x, y);\n\n assertEquals(coordinates, isOccupied, (block != null));\n }\n }\n }",
"@Override\n public void placeShips(Fleet fleet, Board board) {\n foundPosition = new boolean[sizeX][sizeY];\n for (int i = fleet.getNumberOfShips() - 1; i >= 0; i--) {\n Ship s = fleet.getShip(i);\n boolean vertical = rnd.nextBoolean();\n Position pos;\n if (vertical) {\n int x = rnd.nextInt(sizeX);\n int y = rnd.nextInt(sizeY - (s.size()));\n\n while (true) {\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x][y + j]) {\n check = true;\n x = rnd.nextInt(sizeX);\n y = rnd.nextInt(sizeY - (s.size()));\n break;\n }\n }\n if (check == false) {\n break;\n }\n /* int counter = 0;\n if (counter > 1) {\n y = rnd.nextInt(sizeY - (s.size()));\n }\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x][y + j]) {\n check = true;\n x++;\n if (x >= sizeX) {\n x = 0;\n }\n }\n }\n if (check == false) {\n break;\n }\n counter++;\n }*/\n }\n for (int j = 0; j < s.size(); j++) {\n foundPosition[x][y + j] = true;\n }\n pos = new Position(x, y);\n } else {\n int x = rnd.nextInt(sizeX - (s.size()));\n int y = rnd.nextInt(sizeY);\n while (true) {\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x + j][y]) {\n check = true;\n x = rnd.nextInt(sizeX - (s.size()));\n y = rnd.nextInt(sizeY);\n }\n }\n if (check == false) {\n break;\n }\n /*int counter = 0;\n if (counter > 1) {\n x = rnd.nextInt(sizeX - (s.size() - 1));\n }\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x + j][y]) {\n check = true;\n y++;\n if (y >= sizeX) {\n y = 0;\n }\n }\n }\n if (check == false) {\n break;\n }\n counter++;\n }*/\n }\n for (int j = 0; j < s.size(); j++) {\n foundPosition[x + j][y] = true;\n }\n pos = new Position(x, y);\n }\n board.placeShip(pos, s, vertical);\n }\n }",
"public boolean setBlockByVertical(World world, int x, int y, int z, float yaw, List<ImageBlockData> dataList){\n\n try {\n Plugin plugin = Bukkit.getPluginManager().getPlugin(\"DPCPlugin\");\n new BukkitRunnable() {\n @Override\n public void run() {\n for (ImageBlockData data : dataList){\n // System.out.println(\"yaw : \"+yaw);\n if (yaw < -45.0 && yaw >= -135.0) {\n // System.out.println(\"east\");\n Location loc = new Location(world, x, y - data.z, z + data.x);\n loc.getBlock().setType(data.block);\n } else if (yaw >= 45.0 && yaw < 135.0) {\n // System.out.println(\"west\");\n Location loc = new Location(world, x, y - data.z, z - data.x);\n loc.getBlock().setType(data.block);\n } else if (yaw > -45.0 && yaw < 45.0) {\n // System.out.println(\"south\");\n Location loc = new Location(world, x - data.x, y - data.z, z);\n loc.getBlock().setType(data.block);\n } else {\n // System.out.println(\"north\");\n Location loc = new Location(world, x + data.x, y - data.z, z);\n loc.getBlock().setType(data.block);\n }\n }\n }\n }.runTaskLater(plugin, 0L);\n\n } catch (Exception e){\n e.printStackTrace();\n return false;\n }\n\n\n return true;\n }",
"private Location[] overrunBottom () {\n Location nextLocation;\n Location nextCenter;\n \n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == ONE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(getX(), myCanvasBounds.getHeight());\n nextCenter = new Location(getX(), 0);\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = getHeading();\n if (getHeading() > ONE_QUARTER_TURN_DEGREES) {\n angle = -(HALF_TURN_DEGREES - getHeading());\n }\n angle = Math.toRadians(angle);\n nextLocation =\n new Location(getX() + (myCanvasBounds.getHeight() - getY()) / Math.tan(angle),\n myCanvasBounds.getHeight());\n nextCenter = new Location(getX() + (myCanvasBounds.getHeight() - getY()) / Math.tan(angle),\n 0);\n \n // eliminates race condition - if next location overruns left/right AND top/bottom it checks\n // to see which is overrun first and corrects\n if (nextLocation.getX() > myCanvasBounds.getWidth())\n // right\n return overrunRight();\n else if (nextLocation.getX() < 0) // left\n return overrunLeft();\n return new Location[] { nextLocation, nextCenter };\n }",
"@SuppressWarnings(\"deprecation\")\n\t@Override\n\tpublic Location teleportToGround(final Location location) {\n\t\tLocation l = bukkitPlayer.getLocation();\n\t\t\n\t\tl.getChunk().load();\n\t\tBlock block = l.getBlock();\n\n\t\tWorld world = l.getWorld();\n\n\t\tfor(int y = 0 ; y <= l.getBlockY() + 2; y++){\n\t\t\tblock = world.getBlockAt(l.getBlockX(), y, l.getBlockZ());\n\t\t\tbukkitPlayer.sendBlockChange(block.getLocation(), block.getType(), block.getData());\n\t\t}\n\t\t\n\t\tteleport(block.getLocation());\n\t\treturn block.getLocation();\n\t}",
"private float checkVertical(Point2D.Float position, int firepower, boolean pierce, int blockHeight) {\r\n float value = position.y; // Start at the origin tile\r\n\r\n outer: for (int i = 1; i <= firepower; i++) {\r\n // Expand one tile at a time\r\n value += blockHeight;\r\n\r\n // Check this tile for wall collision\r\n for (int index = 0; index < GameObjectCollection.tileObjects.size(); index++) {\r\n TileObject obj = GameObjectCollection.tileObjects.get(index);\r\n if (obj.collider.contains(position.x, value)) {\r\n if (!obj.isBreakable()) {\r\n // Hard wall found, move value back to the tile before\r\n value -= blockHeight;\r\n }\r\n\r\n // Stop checking for tile objects after the first breakable is found\r\n if (!pierce) {\r\n break outer;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return value;\r\n }",
"static private void checkEndNode(PathFinder pathFinder) {\n for (Node n : pathFinder.getSpaceTimeGrid().getBaseLayer().getNodeListWithoutObstacles()) {\n if (n.getX() == pathFinder.getEndNode().getX() && n.getY() == pathFinder.getEndNode().getY()) {\n return;\n }\n }\n throw new PathNotPossibleException(\"The end point was placed outside the SpaceTimeGrid: (\" + pathFinder.getEndNode().getX() + \";\" + pathFinder.getEndNode().getY() + \")\");\n }",
"private boolean UpdateWithCarriedBlock()\r\n {\r\n \tint iCarriedBlockID = getCarried();\r\n \t\r\n \tif ( worldObj.provider.dimensionId == 1 ) \r\n \t{\r\n\t\t\t// we're in the end dimension with a block, and should attempt to place it\r\n\t\t\t\r\n int i = MathHelper.floor_double( posX ) + rand.nextInt( 5 ) - 2;\r\n int j = MathHelper.floor_double( posY ) + rand.nextInt( 7 ) - 3;\r\n int k = MathHelper.floor_double( posZ ) + rand.nextInt( 5 ) - 2;\r\n \r\n\t\t\tint iWeight = GetPlaceEndstoneWeight( i, j, k );\r\n\t\t\t\r\n if ( rand.nextInt( m_iMaxEnstonePlaceWeight >> 9 ) < iWeight )\r\n {\r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderBlockPlaceAuxFXID, i, j, k, iCarriedBlockID + ( getCarryingData() << 12 ) );\r\n\t\t \r\n worldObj.setBlockAndMetadataWithNotify( i, j, k, getCarried(), getCarryingData());\r\n \r\n setCarried(0);\r\n }\r\n \t}\r\n \telse\r\n \t{\r\n\t\t\t// \teventually the enderman should teleport away to the end with his block\r\n\t\t\t\r\n \t\tif ( rand.nextInt( 2400 ) == 0 )\r\n \t\t{\r\n \t\t\t// play dimensional travel effects\r\n \t\t\t\r\n int i = MathHelper.floor_double( posX );\r\n int j = MathHelper.floor_double( posY ) + 1;\r\n int k = MathHelper.floor_double( posZ );\r\n \r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderChangeDimensionAuxFXID, i, j, k, 0 );\r\n\t\t \r\n setDead();\r\n \r\n return false;\r\n \t\t}\r\n \t}\r\n \t\r\n \treturn true;\r\n }",
"private Point getUnsafeTeleportPosition() {\n\t\tRandom number \t= new Random();\n\t\tPoint p \t\t= new Point();\n\t\t\n\t\twhile(true) {\n\t\t\tint x\t\t= number.nextInt(rows-1);\t\n\t\t\tint y\t\t= number.nextInt(cols-1);\n\t\t\tp.x\t\t\t= x;\n\t\t\tp.y\t\t\t= y;\n\t\t\t\n\t\t\t// position isn't occupied\n\t\t\tif(!occupiedPositions.contains(p))\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn p;\n\t}",
"private void thinkAboutNext(ArrayList<Point> pos, boolean hit, boolean destroyedIt) {\n if (!searching && hit) {\n betweenTwo = false;\n System.out.println(\"WAS A NEW TARGET\");\n if(!destroyedIt) {\n int[] d = Direction.DOWN.getDirectionVector();\n Point n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.DOWN);\n\n d = Direction.UP.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.UP);\n\n d = Direction.LEFT.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.LEFT);\n\n d = Direction.RIGHT.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.RIGHT);\n\n directionLooking = directionsToGo.get(directionsToGo.size() - 1);\n }\n }\n else if (searching) {\n //FILTER OUT ALREADY ATTACKED\n\n System.out.println(\"WAS AN OLD TARGET\");\n\n //FAILED\n if(!hit) {\n justBefore = firstHit;\n int size = directionsToGo.size();\n\n for(int i = size - 1; i >= 0; i--){\n Point n = new Point(justBefore.x + directionsToGo.get(i).getDirectionVector()[0],\n justBefore.y + directionsToGo.get(i).getDirectionVector()[1]);\n if(!pos.contains(n))\n directionsToGo.remove(i);\n }\n directionLooking = directionsToGo.get(0);\n }\n else\n if(!pos.contains(pWD(justBefore, directionLooking))) {\n justBefore = firstHit;\n directionLooking = directionLooking.getOpposite();\n }\n\n }\n if(hit) {\n searching = !destroyedIt;\n }\n }",
"private void randomPosBoats(GameData gameData) {\n int x0 = 0;\n int y0 = 0;\n for ( int n = gameData.getBoatArray().size()-1; n>=0; n--){\n Boat b = gameData.getBoatArray().get(n);\n Random rand = new Random();\n int l = b.getLength();\n\n boolean retry = true;\n while(retry) {\n int direction = rand.nextInt(2);\n\n //HORIZONTAL\n if (direction == 1) {\n x0 = rand.nextInt(gameData.getBoard().getWidth() - l);\n y0 = rand.nextInt(gameData.getBoard().getHeight());\n\n // we suppose it's a good starting point\n retry = false;\n for (int i = 0; i < l; i++) {\n //if one of the tiles already has a boat\n if (gameData.existsBoatAround(x0 + i, y0)) {\n retry = true;\n }\n }\n //POSITION BOAT\n if (!retry) {\n ArrayList pos = new ArrayList();\n for (int i = 0; i < l; i++) {\n int x = x0 + i;\n gameData.getMatrix()[y0][x] = b.getBoatid();\n pos.add(new int[]{x, y0});\n }\n b.setPositions(pos);\n }\n\n //VERTICAL\n } else {\n // determine the tile on which to start\n x0 = rand.nextInt(gameData.getBoard().getWidth());\n y0 = rand.nextInt(gameData.getBoard().getHeight() - l);\n\n // we suppose it's a good starting point\n retry = false;\n for (int i = 0; i < l; i++) {\n if (gameData.existsBoatAround(x0, y0 + i)) {\n retry = true;\n }\n }\n if(!retry){\n ArrayList pos = new ArrayList();\n for (int i = 0; i < l; i++) {\n int y = y0 + i;\n gameData.getMatrix()[y][x0] = b.getBoatid();\n pos.add(new int[]{x0, y});\n }\n b.setPositions(pos);\n }\n }\n }\n }\n }",
"protected boolean findDrinkableBlock(Location loc) {\n return findDrinkableSquare(loc) ||\n findDrinkableSquare(loc.clone().add(0, -1, 0)) ||\n findDrinkableSquare(loc.clone().add(0, +1, 0));\n }",
"public void ensureTeleportBreathable(Entity e) {\r\n\r\n // Not if in spectator mode\r\n if(e instanceof Player) {\r\n if(((Player)e).getGameMode() == GameMode.SPECTATOR)\r\n return;\r\n }\r\n\r\n Location loc = e.getLocation();\r\n int x = loc.getBlockX();\r\n int z = loc.getBlockZ();\r\n int height = (int)Math.ceil(e.getHeight());\r\n\r\n // Check for sufficient air before teleporting player\r\n for(int i = 0; i < height; i++) {\r\n\r\n // Calculate y level\r\n int y = (worldToIsBelow)\r\n ? yTo - i - 1\r\n : yTo + i + 1;\r\n\r\n // Get block\r\n Block block = worldTo.getBlockAt(x, y, z);\r\n\r\n // Determine if breathable and make breathable if not\r\n if(!BreathableBlocks.isBreathable(block.getType()))\r\n block.setType(Material.AIR);\r\n }\r\n }",
"public void seekWalls() {\n\t\t for (int j=0; j<visited[0].length; j++){\n\t\t\tfor (int i=visited.length-1; i>=0; i--) {\t\t\t\n\t\t\t\tif (i!=0 && j!= visited[0].length-1) {//general position\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;//not break!!!!! return to exit !\n\t\t\t\t\t}\n\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (i==0 && j!= visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (i!=0 && j== visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {//if (i==0 && j== visited[0].length-1) {\n\t\t\t\t\t//no solution\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean checkCanBePlaced(int x, int y, int id) {\n\t\tint old = id(x, y);\n\t\tblocks[i(x, y)] = id;\n\t\tBlock test = getBlock(x, y);\n\n\t\tif(getBlock(x, y + 1).canBePlaced(Direction.DOWN, id, x, y + 1, this) && test.canBePlaced(Direction.UP, id(x, y + 1), x, y, this)) {\n\t\t\tblocks[i(x, y)] = old;\n\t\t\treturn true;\n\t\t}\n\n\t\tif(getBlock(x, y - 1).canBePlaced(Direction.UP, id, x, y - 1, this) && test.canBePlaced(Direction.DOWN, id(x, y - 1), x, y, this)) {\n\t\t\tblocks[i(x, y)] = old;\n\t\t\treturn true;\n\t\t}\n\n\t\tif(getBlock(x + 1, y).canBePlaced(Direction.LEFT, id, x + 1, y, this) && test.canBePlaced(Direction.RIGHT, id(x + 1, y), x, y, this)) {\n\t\t\tblocks[i(x, y)] = old;\n\t\t\treturn true;\n\t\t}\n\n\t\tif(getBlock(x - 1, y).canBePlaced(Direction.RIGHT, id, x - 1, y, this) && test.canBePlaced(Direction.LEFT, id(x - 1, y), x, y, this)) {\n\t\t\tblocks[i(x, y)] = old;\n\t\t\treturn true;\n\t\t}\n\n\t\tblocks[i(x, y)] = old;\n\t\treturn false;\n\t}",
"private void locate() {\n possibleLocations[0][0] = false;\n possibleLocations[0][1] = false;\n possibleLocations[1][0] = false;\n do {\n location.randomGenerate();\n } while (!possibleLocations[location.y][location.x]);\n }",
"public void checkwarp(){\n\t\tif(pacman.ypos > (colours[0].length*interval)-2){\r\n\t\t\tpacman.ypos = interval+2;\r\n\t\t}\r\n\t\telse if(pacman.xpos > (colours.length*interval)-2){\r\n\t\t\tpacman.xpos = interval+2;\r\n\t\t}\r\n\t\telse if(pacman.ypos < interval+2){\r\n\t\t\tpacman.ypos = (colours[0].length*interval)-2;\r\n\t\t}\r\n\t\telse if(pacman.xpos < interval+2){\r\n\t\t\tpacman.xpos = (colours.length*interval)-2;\r\n\t\t}\r\n\t\t\r\n\t}",
"@Test\n public void testGetVerticalPillarAbove(){\n Pillar pillar = largePillarMap.get(Maze.position(0,0));\n Pillar edgePillar = largePillarMap.get(Maze.position(4,4));\n Pillar neighbor = largeMaze.getVerticalPillar(pillar, true);\n assertEquals(0, neighbor.getX());\n assertEquals(1, neighbor.getY());\n\n neighbor = largeMaze.getVerticalPillar(edgePillar, true);\n assertEquals(null, neighbor);\n }",
"private static Point winOrBlock(char[][] board, char match) {\r\n\t\tint rd;\r\n\t\tint cd;\r\n\t\tif(board[0][0] == match) {\r\n\t\t\tif(board[0][1] == match) {\r\n\t\t\t\trd = 0;\r\n\t\t\t\tcd = 2;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[0][2] == match) {\r\n\t\t\t\trd = 0;\r\n\t\t\t\tcd = 1;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[1][0] == match) {\r\n\t\t\t\trd = 2;\r\n\t\t\t\tcd = 0;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[1][1] == match) {\r\n\t\t\t\trd = 2;\r\n\t\t\t\tcd = 2;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[2][0] == match) {\r\n\t\t\t\trd = 1;\r\n\t\t\t\tcd = 0;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[2][2] == match) {\r\n\t\t\t\trd = 1;\r\n\t\t\t\tcd = 1;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(board[0][1] == match) {\r\n\t\t\tif(board[0][2] == match) {\r\n\t\t\t\trd = 0;\r\n\t\t\t\tcd = 0;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[1][1] == match) {\r\n\t\t\t\trd = 2;\r\n\t\t\t\tcd = 1;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[2][1] == match) {\r\n\t\t\t\trd = 1;\r\n\t\t\t\tcd = 1;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(board[0][2] == match) {\r\n\t\t\tif(board[1][1] == match) {\r\n\t\t\t\trd = 2;\r\n\t\t\t\tcd = 0;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[1][2] == match) {\r\n\t\t\t\trd = 2;\r\n\t\t\t\tcd = 2;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[2][0] == match) {\r\n\t\t\t\trd = 1;\r\n\t\t\t\tcd = 1;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[2][2] == match) {\r\n\t\t\t\trd = 1;\r\n\t\t\t\tcd = 2;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(board[1][0] == match) {\r\n\t\t\tif(board[1][1] == match) {\r\n\t\t\t\trd = 1;\r\n\t\t\t\tcd = 2;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[1][2] == match) {\r\n\t\t\t\trd = 1;\r\n\t\t\t\tcd = 1;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[2][0] == match) {\r\n\t\t\t\trd = 0;\r\n\t\t\t\tcd = 0;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(board[1][1] == match) {\r\n\t\t\tif(board[1][2] == match) {\r\n\t\t\t\trd = 1;\r\n\t\t\t\tcd = 0;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[2][0] == match) {\r\n\t\t\t\trd = 0;\r\n\t\t\t\tcd = 2;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[2][1] == match) {\r\n\t\t\t\trd = 0;\r\n\t\t\t\tcd = 1;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[2][2] == match) {\r\n\t\t\t\trd = 0;\r\n\t\t\t\tcd = 0;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(board[1][2] == match) {\r\n\t\t\tif(board[2][2] == match) {\r\n\t\t\t\trd = 0;\r\n\t\t\t\tcd = 2;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(board[2][0] == match) {\r\n\t\t\tif(board[2][1] == match) {\r\n\t\t\t\trd = 2;\r\n\t\t\t\tcd = 2;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(board[2][2] == match) {\r\n\t\t\t\trd = 2;\r\n\t\t\t\tcd = 1;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(board[2][1] == match) {\r\n\t\t\tif(board[2][2] == match) {\r\n\t\t\t\trd = 2;\r\n\t\t\t\tcd = 0;\r\n\t\t\t\tif(board[rd][cd] == '_') {\r\n\t\t\t\t\treturn new Point(rd,cd);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private void createMaze(Tile currentTile) {\n\n while (numberOfCellsVisited < CAST_WIDTH * CAST_HEIGHT) {\n\n // Get coordinates of current tile and set as visited\n int currentX = currentTile.getPosition().getX();\n int currentY = currentTile.getPosition().getY();\n tempMap[currentY][currentX].setVisited(true);\n\n // Begin neighbourhood scan\n ArrayList<Integer> neighbours = new ArrayList<>();\n\n // If a neighbour is not visited and its projected position is within bounds, add it to the list of valid neighbours\n // North neighbour\n if (currentY - 1 >= 0) {\n if (!tempMap[currentY - 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(0);\n }\n //Southern neighbour\n if (currentY + 1 < CAST_HEIGHT) { //y index if increased is not greater than height of the chamber\n if (!tempMap[currentY + 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(1);\n }\n //Eastern neighbour\n if (currentX + 1 < CAST_WIDTH) { //check edge case\n if (!tempMap[currentY][currentX + 1].isVisited()) { //check if visited\n neighbours.add(2);\n }\n }\n //Western neighbour\n if (currentX - 1 >= 0) {\n if (!tempMap[currentY][currentX - 1].isVisited()) {\n neighbours.add(3);\n }\n }\n if (!neighbours.isEmpty()) {\n\n //generate random number between 0 and 3 for direction\n Random rand = new Random();\n boolean randomizer;\n int myDirection;\n do {\n myDirection = rand.nextInt(4);\n randomizer = neighbours.contains(myDirection);\n } while (!randomizer);\n\n //knock down wall\n switch (myDirection) {\n case 0 -> { // North\n tempMap[currentY][currentX].getPathDirection()[0] = true;\n currentTile = tempMap[currentY - 1][currentX];\n }\n case 1 -> { // South\n tempMap[currentY][currentX].getPathDirection()[1] = true;\n currentTile = tempMap[currentY + 1][currentX];\n }\n case 2 -> { // East\n tempMap[currentY][currentX].getPathDirection()[2] = true;\n currentTile = tempMap[currentY][currentX + 1];\n }\n case 3 -> { // West\n tempMap[currentY][currentX].getPathDirection()[3] = true;\n currentTile = tempMap[currentY][currentX - 1];\n }\n }\n\n mapStack.push(currentTile);\n numberOfCellsVisited++;\n } else {\n currentTile = mapStack.pop(); //backtrack\n }\n }\n\n castMaze(tempMap[0][0], -1);\n }",
"private void update_location() throws Exception {\r\n\t\tif (children.size() == 1) {\r\n\t\t\tCLocation bloc = children.get(0).get_location();\r\n\t\t\tthis.location = bloc.get_source().get_location(bloc.get_bias(), bloc.get_length());\r\n\t\t} else if (children.size() > 1) {\r\n\t\t\tCLocation eloc = children.get(children.size() - 1).get_location();\r\n\t\t\tint beg = this.location.get_bias(), end = eloc.get_bias() + eloc.get_length();\r\n\t\t\tthis.location.set_location(beg, end - beg);\r\n\t\t}\r\n\t}",
"public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }",
"@Test\n public void respawnRobotX0Y0OnMoveDirectionNORTH(){\n checkRespawnOnOutOfBounds(0, 0, CardinalDirection.NORTH);\n }",
"public boolean checkYCoords(Entity entity) {\r\n\r\n // Gets y level\r\n Location location = entity.getLocation();\r\n int y = location.getBlockY();\r\n\r\n // Determines if entity is ready to be teleported for being in the teleportation range\r\n // Uses short-circuit programming for extra speed (The || operator and all in one statement)\r\n\r\n if(worldToIsBelow)\r\n return y <= yFrom;\r\n else\r\n return y >= yFrom;\r\n }",
"private Location getPlayersLightBlockLocation(final Player player) {\r\n final Location location = player.getLocation();\r\n final World world = location.getWorld();\r\n\r\n // the block to be replaced is beneath the player's feet\r\n location.setY(location.getY() - 1);\r\n\r\n // skip undesirable blocks, e.g. air, fences, etc\r\n while (config.getIgnoredBlocks().contains(world.getBlockAt(location).getType())) {\r\n location.setY(location.getY() - 1);\r\n }\r\n return location;\r\n }",
"@SuppressWarnings(\"ConstantConditions\")\n private boolean isStuck(Position pos, Position posNow) {\n if (pos.isSimilar(posNow)) {\n return true;\n }\n\n Instance instance = getInstance();\n Chunk chunk = null;\n Collection<Entity> entities = null;\n\n /*\n What we're about to do is to discretely jump from the previous position to the new one.\n For each point we will be checking blocks and entities we're in.\n */\n double part = .25D; // half of the bounding box\n Vector dir = posNow.toVector().subtract(pos.toVector());\n int parts = (int) Math.ceil(dir.length() / part);\n Position direction = dir.normalize().multiply(part).toPosition();\n for (int i = 0; i < parts; ++i) {\n // If we're at last part, we can't just add another direction-vector, because we can exceed end point.\n if (i == parts - 1) {\n pos.setX(posNow.getX());\n pos.setY(posNow.getY());\n pos.setZ(posNow.getZ());\n } else {\n pos.add(direction);\n }\n BlockPosition bpos = pos.toBlockPosition();\n Block block = instance.getBlock(bpos.getX(), bpos.getY() - 1, bpos.getZ());\n if (!block.isAir() && !block.isLiquid()) {\n teleport(pos);\n return true;\n }\n\n Chunk currentChunk = instance.getChunkAt(pos);\n if (currentChunk != chunk) {\n chunk = currentChunk;\n entities = instance.getChunkEntities(chunk)\n .stream()\n .filter(entity -> entity instanceof LivingEntity)\n .collect(Collectors.toSet());\n }\n /*\n We won't check collisions with entities for first ticks of arrow's life, because it spawns in the\n shooter and will immediately damage him.\n */\n if (getAliveTicks() < 3) {\n continue;\n }\n Optional<Entity> victimOptional = entities.stream()\n .filter(entity -> entity.getBoundingBox().intersect(pos.getX(), pos.getY(), pos.getZ()))\n .findAny();\n if (victimOptional.isPresent()) {\n LivingEntity victim = (LivingEntity) victimOptional.get();\n victim.setArrowCount(victim.getArrowCount() + 1);\n callEvent(EntityAttackEvent.class, new EntityAttackEvent(this, victim));\n remove();\n return super.onGround;\n }\n }\n return false;\n }",
"public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(sum==0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n x = i;\n y = j;\n sum = tmpSum;\n }\n }\n else {\n x = i;\n y = j;\n sum = tmpX + tmpY;\n\n }\n }\n }\n\n }\n }\n return new Position(x,y);\n }",
"public boolean inValidSpot(Path p1){\n\t\t// Checks to see it the path piece placed expects an entrance or exit piece out of bounds\n\t\t\n\t\tint largestRow = (height*width-1)/width;\n\t\t\n\t\t// if entrance or exit pos expected is negative, know it is expecting a path outside the top bound\n\t\tif(p1.getEntry()<0 || p1.getExit()<0){\n\t\t\treturn false;\n\t\t}\n\t\t// if entrance or exit's row greater than the maximum row, know it is expecting a path outside bottom bound\n\t\tif(p1.getEntryRow()>largestRow || p1.getExitRow()>largestRow){\n\t\t\treturn false;\n\t\t}\n\t\tint currentRow = p1.getRow();\n\t\tint nextRow=0;\n\t\tif(Math.abs(p1.getPos()-p1.getEntry())==1){\n\t\t\t// If the absolute value of the difference between the current position and its entrance is 1 ...\n\t\t\t// Checking to see if the entrance is expected to be outside of the left or right edges of Map\n\t\t\tnextRow = p1.getEntryRow();\n\t\t\tif(currentRow!=nextRow){\n\t\t\t\t// This means that the entrance expected is not to the left or to the right\n\t\t\t\t// In other words, the entrance is expected in another row\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(Math.abs(p1.getPos()-p1.getExit())==1){\n\t\t\t// If the absolute value of the difference between the current position and its exit is 1 ...\n\t\t\t// Checking to see if the exit is expected to be outside of the left or right edges of Map\n\t\t\tnextRow = p1.getExitRow();\n\t\t\tif(currentRow!=nextRow){\n\t\t\t\t// This means that the exit expected is not to the left or to the right\n\t\t\t\t// In other words, the exit is expected in another row\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\tif(Math.abs(p1.getPos()-p1.getEntry())==width){\n\t\t\tnextRow = p1.getEntryRow();\n\t\t\tif(p1.getEntry()<0 || nextRow>(height-1/width)){//it used to be calculaterow(height*width-1\n\t\t\t\t//Less than zero would make it on top of the top edge\n\t\t\t\t//First term calculated in this manner because any negative entrance between -1 and \n\t\t\t\t// -width+1 will have an integer rounded to zero. The double casting will give an \n\t\t\t\t// accurate number without losing the sign\n\t\t\t\t\n\t\t\t\t//Greater than height*width-1 would make in lower than the bottom edge\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(Math.abs(p1.getPos()-p1.getExit())==width){\n\t\t\tnextRow = p1.getExitRow();\n\t\t\tif(p1.getEntry()<0 || nextRow>(height-1/width)){//it used to be calculaterow(height*width-1\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\treturn true;\n\t\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 boolean checkCrash (Location next)\n {\n if (next == null) {\n return true;\n }\n\n Location last = playerLocations.get(playerLocations.size()-1);\n\n LocationType type = next.getType();\n //println(getLocation(next).getType()+\" : \"+next);\n if (type == LocationType.POWERUP) {\n PowerUp p = getPowerUp(next);\n\n if (p != null) { // Basically a workaround for the NPE\n // if (ENABLE_SOUND) {\n // sfx.gainedPowerUp();\n // }\n addSpeed(1);\n speedTimer += (int) frameRate * 2;\n removePowerUp(p);\n }\n\n return false;\n }\n\n if ((type == LocationType.PLAYER || type == LocationType.WALL) ||\n (next.getY() != last.getY() && (direction == LEFTKEY || direction == RIGHTKEY)) ||\n (next.getX() != last.getX() && (direction == UPKEY || direction == DOWNKEY))) { // This is to prevent bike from wrapping around edge of grid, because grid is a 1d array\n //sfx.lostALife(); //Commented out because you hear a shrill sound at the end for some reason\n return true;\n }\n\n return false;\n }",
"public synchronized boolean addPathToPlayer(int player, int x, int y) {\n if (correction == null) {\n correction = new Point(x, y);\n x = 0;\n y = 0;\n } else {\n x -= correction.X;\n y -= correction.Y;\n }\n\n boolean found = false;\n for (Player p : playerTracking) {\n if (p.getId() == player) {\n found = true;\n Point lastPointPlayer = p.getLastPosition();\n\n if (!p.addPlayerPosition(x, y)) {\n break;\n }\n\n boolean breakFor = false;\n if (lastPointPlayer != null) {\n for (Player allPlayers : playerTracking) {\n // Check if there is any collision with any other player\n if (allPlayers.getId() != player) {\n// List<Point> playerPoints = allPlayers.getPoints();\n// for (int i = 0; i < playerPoints.size() - 1; i++) {\n// boolean result = intersect(playerPoints.get(i), playerPoints.get(i + 1), lastPointPlayer, new Point(x, y));\n// if (result) {\n// onCollision(new PlayerCollision(p, allPlayers, playerPoints.get(i), playerPoints.get(i + 1), lastPointPlayer, new Point(x, y)));\n// p.removeLast();\n// breakFor = true;\n// break;\n// }\n// }\n } // Check if there is a collision with the player itself\n else {\n// List<Point> playerPoints = allPlayers.getPoints();\n// for (int i = 0; i < playerPoints.size() - 2; i++) {\n// boolean result = intersect(playerPoints.get(i), playerPoints.get(i + 1), lastPointPlayer, new Point(x, y));\n// if (result) {\n// onCollision(new PlayerCollision(p, allPlayers, playerPoints.get(i), playerPoints.get(i + 1), lastPointPlayer, new Point(x, y)));\n// p.removeLast();\n// breakFor = true;\n// break;\n// }\n// }\n }\n\n if (breakFor) {\n break;\n }\n }\n }\n\n break;\n }\n }\n\n calculateMapSize();\n\n return found;\n }",
"public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)\n {\n return par9;\n }",
"private boolean backtrackRecursion(Puzzle puzzle, int x, int y, int n)\n\t{\n\t\t// Incorrect Base Case: we've gone past the last row, return false\n\t\tif (x >= length) return false;\n\t\t\n\t\t// Correct Base Case: we've placed all the ships, return true\n\t\tif (n == 0) return true;\n\t\t\n\t\t// The next position that we will try\n\t\tint yNext = (y + 1) % length;\n\t\tint xNext = x + (yNext == 0 ? 1 : 0);\n\t\t\n\t\t// These indicate whether or not a ship was unable to be placed, so we can avoid checking bigger ships.\n\t\t// E.G. If a ship of size 2 cannot be vertically placed, then neither can a ship of size 3.\n\t\tboolean fitVertical = true;\n\t\tboolean fitHorizontal = true;\n\t\t\n\t\t/*\n\t\t * Tries to place each size of ship, from size 1 to 4.\n\t\t * The loop will end if there are ships that failed to fit vertically and horizontally, \n\t\t * since there is nothing more to check\n\t\t */\n\t\tfor (int i = 0; i < shipSizes.length && (fitVertical || fitHorizontal); i++)\n\t\t{\t\t\t\n\t\t\t// If there is a ship of this size left...\n\t\t\tif (shipSizes[i] > 0)\n\t\t\t{\n\t\t\t\t// The ship's size is the index + 1\n\t\t\t\tint size = i + 1;\n\t\t\t\t\n\t\t\t\t// If we haven't had a ship fail the vertical placement...\n\t\t\t\tif (fitVertical)\n\t\t\t\t{\n\t\t\t\t\t// We count the attempt to place a ship as an operation:\n\t\t\t\t\tcount++;\n\t\t\t\t\t\n\t\t\t\t\t// If the ship can be placed...\n\t\t\t\t\tif (puzzle.placeShip(x, y, size, true))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Take away a ship of that size from the array\n\t\t\t\t\t\tshipSizes[i]--;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If a solution is found recursively, then the placement for this ship is good\n\t\t\t\t\t\tif (backtrackRecursion(puzzle, xNext, yNext, n - 1)) return true;\n\t\t\t\t\t\t// Otherwise it's a bad placement, so remove the ship and re-add to the array\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpuzzle.removeShip(x, y, size, true);\n\t\t\t\t\t\t\tshipSizes[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// If the ship can't be placed...\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Set the flag to false\n\t\t\t\t\t\tfitVertical = false;\n\t\t\t\t\t\t// If this is a ship of size 1, then horizontal ships can't be placed either\n\t\t\t\t\t\tif (size == 1) fitHorizontal = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If we haven't had a ship fail the horizontal placement...\n\t\t\t\tif (size > 1 && fitHorizontal)\n\t\t\t\t{\n\t\t\t\t\t// We count the attempt to place a ship as an operation:\n\t\t\t\t\tcount++;\n\t\t\t\t\t\n\t\t\t\t\t// If the ship can be placed...\n\t\t\t\t\tif (puzzle.placeShip(x, y, size, false))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Take away a ship of that size from the array\n\t\t\t\t\t\tshipSizes[i]--;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// The position for the next ship is moved more, since the ship now takes up space horizontally\n\t\t\t\t\t\tint yNextHorizontal = (y + size + 1) % length;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If a solution is found recursively, then the placement for this ship is good\n\t\t\t\t\t\tif (backtrackRecursion(puzzle, x + (yNextHorizontal == 0 ? 1 : 0), yNextHorizontal, n - 1)) return true;\n\t\t\t\t\t\t// Otherwise it's a bad placement, so remove the ship and re-add to the array\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpuzzle.removeShip(x, y, size, false);\n\t\t\t\t\t\t\tshipSizes[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// If the ship can't be placed, set the flag to false\n\t\t\t\t\telse fitHorizontal = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// We can't place a ship of any size at this location, so try the next one\n\t\treturn backtrackRecursion(puzzle, xNext, yNext, n);\n\t}",
"protected Location nextLocation()\n {\n // Get list of neighboring empty locations.\n ArrayList emptyNbrs = emptyNeighbors();\n\n // Remove the location behind, since fish do not move backwards.\n Direction oppositeDir = direction().reverse();\n Location locationBehind = environment().getNeighbor(location(),\n oppositeDir);\n emptyNbrs.remove(locationBehind);\n Debug.print(\"Possible new locations are: \" + emptyNbrs.toString());\n\n // If there are no valid empty neighboring locations, then we're done.\n if ( emptyNbrs.size() == 0 )\n return location();\n\n // Return a randomly chosen neighboring empty location.\n Random randNumGen = RandNumGenerator.getInstance();\n int randNum = randNumGen.nextInt(emptyNbrs.size());\n\t return (Location) emptyNbrs.get(randNum);\n }",
"int checkBlockLine(World world, BlockPos start, BlockPos end) {\n\t\tBlockPos delta = end.add(-start.getX(), -start.getY(), -start.getZ());\n\t\tint i = getLongestAxis(delta);\n\t\tif (i == 0) return -1;\n\t\t\n\t\tfloat dx = (float) delta.getX() / (float) i;\n\t\tfloat dy = (float) delta.getY() / (float) i;\n\t\tfloat dz = (float) delta.getZ() / (float) i;\n\t\t\n\t\tfor (int j = 0; j <= i; j++) {\n\t\t\tBlockPos workpos = start.add(0.5F + j*dx, 0.5F + j*dy, 0.5F + j*dz);\n\t\t\tif (!isReplaceable(world, workpos)) return j;\n\t\t}\n\t\treturn -1;\n\t}",
"public void enemySpawn(String typeofEnemy) {\n if (spawnTimer == 0) {\n if (typeofEnemy.equals(\"bee\")) {\n outerloop:\n//label to later break when enemy is spawned\n for (int row = 3; row < 5; row++) {\n for (int column = 0; column < 8; column++) {\n if (canSpawn[row][column] == false) {\n handler.getGalagaState().entityManager.entities.add(new EnemyBee(x, y, 32, 32, handler, row, column));\n canSpawn[row][column] = true;\n spawnTimer = random.nextInt(60 * 7);\n break outerloop;\n } else continue;\n }\n }\n } else {//ENEMYOTHER\n outerloop:\n for (int row = 1; row < 3; row++) {\n for (int column = 0; column < 8; column++) {\n if (canSpawn[row][column] == false) {\n handler.getGalagaState().entityManager.entities.add(new EnemyOther(x, y, 32, 32, handler, row, column));\n canSpawn[row][column] = true;\n spawnTimer = random.nextInt(60 * 7);\n break outerloop;\n } else continue;\n }\n }\n\n }\n }\n else {\n spawnTimer--;\n }\n\n// int enemyType = random.nextInt(2);\n// spawnTimer--;\n// if (spawnTimer == 0) {\n// if (typeofEnemy.equals(\"bee\")) {\n// int row = random.nextInt(2) + 3, column = random.nextInt(8);\n// if (canSpawn[row][column] == false) {\n// handler.getGalagaState().entityManager.entities.add(new EnemyBee(x, y, 32, 32, handler, row, column));\n// canSpawn[row][column] = true;\n// } else {\n// return;\n// }\n// } else {\n// int row = random.nextInt(2) + 1, column = random.nextInt(8);\n// if (canSpawn[row][column] == false) {\n// handler.getGalagaState().entityManager.entities.add(new EnemyOther(x, y, 32, 32, handler, row, column));\n// canSpawn[row][column] = true;\n// }\n// }\n// }\n// else{\n// spawnTimer--;\n// }\n\n\n\n\n }",
"String substituteLocation(Player player, Block block, String command, boolean hasAirToken) {\n if (block == null) {\n for (Iterator<Block> i = new BlockIterator(player, MAX_TRACE_DISTANCE); i.hasNext();) {\n Block check = i.next();\n if (!check.isEmpty()) {\n block = check;\n break;\n }\n }\n }\n\n // Y == 0 (bedrock) when tracing toward the sky. I guess BlockIterator\n // wraps around?\n // Not sure when block will be AIR (since we explicitly check above),\n // but doesn't hurt to check!\n if (block == null || block.getY() == 0 || block.isEmpty())\n return null;\n\n // FIXME better way?\n command = command.replace(getXToken(), Integer.toString(block.getX()));\n command = command.replace(getYToken(), Integer.toString(block.getY()));\n command = command.replace(getZToken(), Integer.toString(block.getZ()));\n \n if (hasAirToken) {\n // Iterate blocks upwards until we find air\n while (block != null && !block.isEmpty()) {\n block = block.getRelative(0, 1, 0);\n }\n if (block == null)\n return null;\n command = command.replace(getYAirToken(), Integer.toString(block.getY()));\n }\n \n return command;\n }",
"public void checkBlock(BlockPos debug1) {\n/* 29 */ if (this.blockEngine != null) {\n/* 30 */ this.blockEngine.checkBlock(debug1);\n/* */ }\n/* 32 */ if (this.skyEngine != null) {\n/* 33 */ this.skyEngine.checkBlock(debug1);\n/* */ }\n/* */ }",
"public static Vec3 findRandomTargetBlockTowards(EntityCreature aWaterMob, int xzFleeZoneSize, int yFleeZoneSize, Vec3 aTargetVectorPos, int aMinRangeXZ, int aMinDepth)\r\n{\r\n\r\n Vec3 _fleeingVector = Vec3.createVectorHelper(aTargetVectorPos.xCoord - aWaterMob.posX,aTargetVectorPos.yCoord - aWaterMob.posY,aTargetVectorPos.zCoord - aWaterMob.posZ);\r\n return findRandomTargetBlock(aWaterMob, xzFleeZoneSize, yFleeZoneSize,_fleeingVector,aMinRangeXZ,aMinDepth);\r\n}",
"public void enemymoveGarret(){\n\t\tint YEG = 0;\n\t\tint XEG = 0;\n\t\tint[] turns = new int[]{0,0,0,0,0,2,1,1,1,1,1,3};//dependign on the placement garret will move a certain way\n\t\tfor(int i = 0 ; i < this.Garret.length;i++){//this grabs garrets current locations\n\t\t\tfor(int p = 0; p < this.Garret.length;p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tYEG = i;\n\t\t\t\t\tXEG = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint move = turns[count];\n\t\tswitch(move){//first block is up and down second block is left and right\n\t\t\tcase 0:\n\t\t\t\tif(this.area[YEG][XEG-1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG-1] = 1;//to turn left\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(this.area[YEG][XEG+1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG+1] = 1;//to turn right\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(this.area[YEG-1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG-1][XEG] = 1;//to turn up\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(this.area[YEG+1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG+1][XEG] = 1;//to turn down\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}//end of switch\t\n\t}",
"private void addUpBlock(Position p, TETile te,\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 world[i][j] = te;\n }\n }\n }",
"final protected void moveVertical(int[][] blockIdMap, int yPixelsMoved)\n {\n int gridXLeft; //Entity x position converted to block index\n int gridXRight; //Entity x position plus width converted to block index\n int gridY; //Entity y position converted to block index\n int idOfBlockLeft; //Id of the block to the left of the entity\n int idOfBlockRight; //Id of the block to the right of the entity\n\n //Calculate the x index for the blocks to the left and right, add/subtract one to avoid getting stuck\n gridXLeft = (boundingBox.x + 1) / Block.BLOCK_WIDTH;\n gridXRight = (boundingBox.x + boundingBox.width - 1) / Block.BLOCK_WIDTH;\n\n //Attempt to move up with respect for block collisions\n if (yPixelsMoved < 0)\n {\n //Calculate x index for the block space that will be moved into\n gridY = (boundingBox.y + yPixelsMoved) / Block.BLOCK_HEIGHT;\n\n //Attempting to jump above map\n if (gridY < 0)\n {\n boundingBox.y += yPixelsMoved;\n return;\n }\n else if (gridY >= blockIdMap[0].length) //Below map, kill the entity\n {\n if (gridY > blockIdMap[0].length)\n {\n state = DEAD_STATE;\n }\n else //Kill the entity only after it has fallen offscreen\n {\n boundingBox.y += yPixelsMoved;\n }\n return;\n }\n else if (gridXRight >= blockIdMap.length) //Jumping along right side of map\n {\n //Ignore gridXRight, no collision outside of map\n gridXRight = gridXLeft;\n }\n\n //Retrieve the indexes of the blocks just to the left and right of the entity\n idOfBlockLeft = blockIdMap[gridXLeft][gridY];\n idOfBlockRight = blockIdMap[gridXRight][gridY];\n\n //If either index is not 0 or 100, and is a solid block, then collision\n if ((idOfBlockLeft % 100 != 0 && (idOfBlockLeft / 100) >= 1)\n || (idOfBlockRight % 100 != 0 && (idOfBlockRight / 100) >= 1))\n {\n //Begin falling, move up to bottom of block above\n boundingBox.y = (gridY * Block.BLOCK_HEIGHT) + Block.BLOCK_HEIGHT;\n state = FALLING_STATE;\n }\n else\n {\n //No collision, continue jumping\n boundingBox.y += yPixelsMoved;\n state = JUMPING_STATE;\n }\n }\n else if (yPixelsMoved > 0) //Attempt to move down with respect for block collisions\n {\n //Calculate x index for the block space that will be moved into\n gridY = (boundingBox.y + boundingBox.height + yPixelsMoved) / Block.BLOCK_HEIGHT;\n\n //Attempting to fall from above the map\n if (gridY < 0)\n {\n boundingBox.y += yPixelsMoved;\n return;\n }\n else if (gridY >= blockIdMap[0].length) //Below map, kill the entity\n {\n if (gridY > blockIdMap[0].length)\n {\n state = DEAD_STATE;\n }\n else\n {\n //Kill the entity only after it has fallen offscreen\n boundingBox.y += yPixelsMoved;\n }\n return;\n }\n else if (gridXRight >= blockIdMap.length) //Falling along right side of map\n {\n gridXRight = gridXLeft; //Ignore gridXRight, no collision outside of map\n }\n\n //Retrieve the indexes of the blocks just to the left and right of the entity\n idOfBlockLeft = blockIdMap[gridXLeft][gridY];\n idOfBlockRight = blockIdMap[gridXRight][gridY];\n\n //If either side of the entity would collide with a block when falling, the hundreds place has a one\n //Check that the entity is currently above the block it may fall onto (does not include yPixelsMoved)\n if ((boundingBox.y + boundingBox.height <= gridY * Block.BLOCK_HEIGHT)\n && ((idOfBlockLeft % 100 != 0 && (idOfBlockLeft / 100) >= 1)\n || (idOfBlockRight % 100 != 0 && (idOfBlockRight / 100) >= 1)))\n {\n //Landed on ground, move bottom of entity to top of block beneath\n boundingBox.y = (gridY * Block.BLOCK_HEIGHT) - boundingBox.height;\n state = NORMAL_STATE;\n }\n else //No collision, continue falling\n {\n boundingBox.y += yPixelsMoved;\n state = FALLING_STATE;\n }\n }\n }",
"private void enemyMove() {\n\n\t\tboolean goAgain = false;\n\n\t\tint x = (int) (Math.random() * 10);\n\t\tint y = (int) (Math.random() * 10);\n\n\t\t// Make sure the enemy hits in a checkerboard pattern.\n\t\tif (x % 2 == 0) { // if x is even, y should be odd\n\t\t\tif (y % 2 == 0) {\n\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\ty++;\n\t\t\t\telse\n\t\t\t\t\ty--;\n\t\t\t}\n\t\t} else { // if x is odd, y should be even\n\t\t\tif (y % 2 == 1)\n\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\ty++;\n\t\t\t\telse\n\t\t\t\t\ty--;\n\t\t}\n\n\t\tif (enemyLastShotHit && getDifficulty() > 0) { // /if last shot was a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// hit, enemy\n\t\t\t// will try to\n\t\t\t// check around it only run if difficulty is\n\t\t\t// normal or above\n\t\t\tx = enemyLastHitX;\n\t\t\ty = enemyLastHitY;\n\n\t\t\tif (getDifficulty() != 2) {\n\n\t\t\t\tif (conflictX == 4) {\n\t\t\t\t\tconflictX = 0;\n\t\t\t\t} else if (conflictY == 4) {\n\t\t\t\t\tconflictY = 0;\n\t\t\t\t\t// System.out.println(\"conflict has been reset \");\n\t\t\t\t}\n\n\t\t\t\tif (conflictX != 0) {\n\t\t\t\t\tif (conflictX == 1)\n\t\t\t\t\t\tx++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\tconflictX = 4;\n\t\t\t\t} else if (conflictY == 1) {\n\t\t\t\t\t// System.out.println(\"checking down\");\n\t\t\t\t\tconflictY = 4;\n\t\t\t\t\ty++;\n\t\t\t\t}\n\n\t\t\t\tif (x + 1 < 10 && x - 1 >= 0) {// branch for multiple hits\n\t\t\t\t\tif (egrid[x + 1][y] == 1 && egrid[x - 1][y] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tif (x + 2 < 10) {\n\t\t\t\t\t\t\tif (egrid[x + 2][y] == 1) {\n\t\t\t\t\t\t\t\tconflictX = 1;\n\t\t\t\t\t\t\t\tx--;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (y + 1 < 10 && y - 1 >= 0) {// branch for multiple vertical\n\t\t\t\t\t\t\t\t\t\t\t\t// hits\n\t\t\t\t\tif (egrid[x][y + 1] == 1 && egrid[x][y - 1] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tconflictY = 1;\n\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (conflictX == 0 && conflictY == 0) {\n\n\t\t\t\t\tif (checkDirection == 0) // checks in each direction\n\t\t\t\t\t\tx++;\n\t\t\t\t\telse if (checkDirection == 1)\n\t\t\t\t\t\tx--;\n\t\t\t\t\telse if (checkDirection == 2)\n\t\t\t\t\t\ty++;\n\t\t\t\t\telse if (checkDirection == 3) {\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tenemyLastShotHit = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (x < 0) // making sure coordinates stay within bounds\n\t\t\t\t\t\tx = 0;\n\t\t\t\t\telse if (x > 9)\n\t\t\t\t\t\tx = 9;\n\t\t\t\t\tif (y < 0)\n\t\t\t\t\t\ty = 0;\n\t\t\t\t\telse if (y > 9)\n\t\t\t\t\t\ty = 9;\n\t\t\t\t}\n\t\t\t} // medium diff\n\n\t\t\telse if (getDifficulty() == 2) {// hard difficulty\n\t\t\t\t// gives enemy unfair advantage\n\n\t\t\t\tif (conflictX == 4)\n\t\t\t\t\tconflictX = 0;\n\t\t\t\tif (conflictY == 4)\n\t\t\t\t\tconflictY = 0;\n\n\t\t\t\tif (conflictX != 0) {\n\t\t\t\t\tif (conflictX == 1)\n\t\t\t\t\t\tx++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\tconflictX = 4;\n\t\t\t\t} else if (conflictY == 1) {\n\t\t\t\t\tconflictY = 4;\n\t\t\t\t\ty++;\n\t\t\t\t}\n\n\t\t\t\tif (x + 1 < 10 && x - 1 >= 0) {// branch for multiple hits\n\t\t\t\t\tif (egrid[x + 1][y] == 1 && egrid[x - 1][y] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tif (x + 2 < 10) {\n\t\t\t\t\t\t\tif (egrid[x + 2][y] == 1) {\n\t\t\t\t\t\t\t\tconflictX = 1;\n\t\t\t\t\t\t\t\tx--;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (y + 1 < 10 && y - 1 >= 0) {// branch for multiple vertical\n\t\t\t\t\t\t\t\t\t\t\t\t// hits\n\t\t\t\t\tif (egrid[x][y + 1] == 1 && egrid[x][y - 1] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tconflictY = 1;\n\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (conflictX == 0 && conflictY == 0) {\n\t\t\t\t\tif (y + 1 < 10) {\n\t\t\t\t\t\tif (egrid[x][y + 1] == 1)// if y+1 is a hit and it is\n\t\t\t\t\t\t\t\t\t\t\t\t\t// within bounds, it will go\n\t\t\t\t\t\t\t\t\t\t\t\t\t// there\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (y - 1 >= 0) {\n\t\t\t\t\t\tif (egrid[x][y - 1] == 1)\n\t\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t\tif (x + 1 < 10) {\n\t\t\t\t\t\tif (egrid[x + 1][y] == 1)\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t}\n\t\t\t\t\tif (x - 1 >= 0) {\n\t\t\t\t\t\tif (egrid[x - 1][y] == 1) {\n\t\t\t\t\t\t\tx--;\n\t\t\t\t\t\t\tenemyLastShotHit = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} // hard diff\n\t\t\tcheckDirection++;\n\t\t} // lasthit\n\n\t\tint tryCount = 0;\n\t\twhile (egrid[x][y] == 3) { // makes sure enemy doesn't hit same spot\n\t\t\t\t\t\t\t\t\t// twice\n\t\t\tx = (int) (Math.random() * 10);\n\t\t\ty = (int) (Math.random() * 10);\n\t\t\tif (tryCount < 20 && getDifficulty() > 0) {\n\t\t\t\tif (x % 2 == 0) { // if x is even, y should be odd\n\t\t\t\t\tif (y % 2 == 0) { // for checkerboard pattern\n\t\t\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t} else { // if x is odd, y should be even\n\t\t\t\t\tif (y % 2 == 1)\n\t\t\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ty--;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttryCount++;\n\t\t}\n\n\t\tif (egrid[x][y] == 1) { // hit branch\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tilehit.jpg\"));\n\t\t\tstatus.setText(\" Enemy got a hit\");\n\t\t\tenemyLastShotHit = true; // starts ai\n\t\t\tcheckDirection = 0;\n\t\t\tif (conflictX == 0 && conflictY == 0) {\n\t\t\t\tenemyLastHitX = x; // stores x and y values\n\t\t\t\tenemyLastHitY = y;\n\t\t\t}\n\t\t\tehits--; // keeps score\n\t\t}\n\n\t\telse if (egrid[x][y] == 2) { // poweup branch\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tilepower.jpg\"));\n\t\t\tstatus.setText(\" Enemy got a PowerUp\");\n\t\t\tgoAgain = true;\n\t\t}\n\n\t\telse\n\t\t\t// miss branch\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tilemiss.jpg\"));\n\n\t\tegrid[x][y] = 3;\n\n\t\tcheckEnemyWin();\n\n\t\tif (goAgain)\n\t\t\tenemyMove();\n\n\t}",
"static private void npcPath() {\n\n if (Time.secondsPassed % 45 == 44) {\n Random picker = new Random();\n while (true) {\n if (josephSchnitzel.getCurrentRoom().equals(mountain)) {\n String[] newRoomString = {\"south\"};\n int index = picker.nextInt(newRoomString.length);\n Room next = josephSchnitzel.getCurrentRoom().getExit(newRoomString[index]);\n josephSchnitzel.setCurrentRoom(next);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(beach)) {\n String[] newRoomString = {\"north\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(jungle)) {\n String[] newRoomString = {\"north\", \"south\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n }\n }\n }",
"@Test\n\tpublic final void nextPositionFallingTest() {\n\t\tplayer.setFallSpeed(1);\n\t\tplayer.setFalling(true);\n\t\tplayer.getNextYPosition();\n\t\tassertTrue(!player.isJumping());\n\t}",
"public Location decideNextLocationToPlay(Location loc)\n\t{\n\t\tBoard board = Game.getInstance().getBoard();\n\t\tfor (int i = 0; i < board.getRows(); i++)\n\t\t\tfor (int j = 0; j < board.getColumns(); j++)\n\t\t\t{\n\t\t\t\tif (board.getPiece(i, j) == Piece.Empty)\n\t\t\t\t\treturn new Location(i,j);\n\t\t\t}\n\t\t\n\t\treturn new Location(0,0);\n\t}",
"private void recheckTileCollisions() {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t//check-x cols and fix\n\t\t\t\t\tif(player.position.x > tile.position.x - tile.bounds.width/2 && player.position.x < tile.position.x + tile.bounds.width/2 && player.position.y < tile.position.y + tile.bounds.height/2 && player.position.y > tile.position.y - tile.bounds.height/2) {\n\t\t\t\t\t\tif(player.position.x < tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x - 1;\n\t\t\t\t\t\t} else if(player.position.x > tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}",
"@Test\n\tpublic final void nextPositionUpTest() {\n\t\tplayer.setUp(true);\n\t\tplayer.getNextYPosition();\n\t\tassertTrue(player.isJumping());\n\t}",
"@Override\n public void lastMove( PlayerMove playerMove ) {\n int row = playerMove.getCoordinate().getRow();\n int col = playerMove.getCoordinate().getCol();\n int team = playerMove.getPlayerId();\n if(row%2 == 0 && col%2 == 0){\n if(team == 1){\n Dot n1 = board.getNode(new Coordinate(row+1,col));\n Dot n2 = board.getNode(new Coordinate(row -1,col));\n n1.addNeighbor(n2);\n n2.addNeighbor(n1);\n }\n else {\n Dot n1 = board.getNode(new Coordinate(row, col + 1));\n Dot n2 = board.getNode(new Coordinate(row, col - 1));\n n1.addNeighbor(n2);\n n2.addNeighbor(n1);\n }\n }\n else{\n if(team == 1){\n Dot n1 = board.getNode(new Coordinate(row,col+1));\n Dot n2 = board.getNode(new Coordinate(row ,col-1));\n n1.addNeighbor(n2);\n n2.addNeighbor(n1);\n }\n else {\n Dot n1 = board.getNode(new Coordinate(row+1, col));\n Dot n2 = board.getNode(new Coordinate(row-1, col));\n n1.addNeighbor(n2);\n n2.addNeighbor(n1);\n }\n }\n\n }",
"public boolean tryToCreatePortal(World var1, int var2, int var3, int var4)\n {\n byte var5 = 0;\n byte var6 = 0;\n\n if (var1.getBlockId(var2 - 1, var3, var4) == Block.glowStone.blockID || var1.getBlockId(var2 + 1, var3, var4) == Block.glowStone.blockID)\n {\n var5 = 1;\n }\n\n if (var1.getBlockId(var2, var3, var4 - 1) == Block.glowStone.blockID || var1.getBlockId(var2, var3, var4 + 1) == Block.glowStone.blockID)\n {\n var6 = 1;\n }\n\n if (var5 == var6)\n {\n return false;\n } else\n {\n if (var1.getBlockId(var2 - var5, var3, var4 - var6) == 0)\n {\n var2 -= var5;\n var4 -= var6;\n }\n\n int var7;\n int var8;\n\n for (var7 = -1; var7 <= 2; ++var7)\n {\n for (var8 = -1; var8 <= 3; ++var8)\n {\n boolean var9 = var7 == -1 || var7 == 2 || var8 == -1 || var8 == 3;\n\n if (var7 != -1 && var7 != 2 || var8 != -1 && var8 != 3)\n {\n int var10 = var1.getBlockId(var2 + var5 * var7, var3 + var8, var4 + var6 * var7);\n\n if (var9)\n {\n if (var10 != Block.glowStone.blockID)\n {\n return false;\n }\n } else if (var10 != 0 && var10 != Block.waterMoving.blockID)\n {\n return false;\n }\n }\n }\n }\n\n for (var7 = 0; var7 < 2; ++var7)\n {\n for (var8 = 0; var8 < 3; ++var8)\n {\n var1.setBlock(var2 + var5 * var7, var3 + var8, var4 + var6 * var7, AetherBlocks.AetherPortal.blockID, 0, 2);\n }\n }\n\n return true;\n }\n }",
"private void ensureLocationPointFound(Integer row, Integer column) {\n\n\t\tif (row == null || column == null || row <= 0 || column <= 0) {\n\n\t\t\tthrow new SomethingWentWrongException(\"Wrong Location Point\");\n\t\t}\n\t}",
"private void nextPosition()\n\t{\n\t\tdouble playerX = Game.player.getX();\n\t\tdouble playerY = Game.player.getY();\n\t\tdouble diffX = playerX - x;\n\t\tdouble diffY = playerY - y;\n\t\tif(Math.abs(diffX) < 64 && Math.abs(diffY) < 64)\n\t\t{\n\t\t\tclose = true;\n\t\t} \n\t\telse\n\t\t{\n\t\t\tclose = false;\n\t\t}\n\t\tif(close)\n\t\t{\n\t\t\tattackPlayer();\n\t\t} \n\t\telse if(alarm.done())\n\t\t{\n\t\t\tdirection = Math.abs(random.nextInt() % 360) + 1;\n\t\t\talarm.setTime(50);\n\t\t}\n\t\thspd = MathMethods.lengthDirX(speed, direction);\n\t\tvspd = MathMethods.lengthDirY(speed, direction);\n\t\tif(hspd > 0 && !flippedRight)\n\t\t{\n\t\t\tflippedRight = true;\n\t\t\tsetEnemy();\n\t\t} \n\t\telse if(hspd < 0 && flippedRight)\n\t\t{\n\t\t\tflippedRight = false;\n\t\t\tsetEnemy();\n\t\t}\n\t\tmove();\n\t\talarm.tick();\n\t\tshootTimer.tick();\n\t}",
"public boolean solve(final int startRow, final int startCol) {\r\n\r\n // TODO\r\n // validate arguments: ensure position is within maze area\r\n\r\n if(mazeData [startRow][startCol] == WALL) {\r\n throw new IllegalArgumentException(\" we're in a wall buddy\");\r\n }\r\n else if (startRow > mazeData.length-1 || startCol > mazeData.length-1 ){\r\n throw new IllegalArgumentException(\" we're out of bounds \");\r\n }\r\n\r\n\r\n\r\n\r\n\r\n // TODO create local class for row/col positions\r\n class Position {\r\n private int row;\r\n private int col;\r\n\r\n // TODO add instance variables\r\n public Position(final int row, final int col) {\r\n this.row = row;\r\n this.col= col;\r\n }\r\n\r\n\r\n\r\n // TODO toString if desired\r\n public String toString() {\r\n return \"Row: \" + this.row + \"Column: \"+ this.col;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n // define the stack (work queue)\r\n final var queue = Collections.asLifoQueue(new LinkedList<Position>());\r\n //Queue<Position> queue = new LinkedList<Position>(); // EXTRA CREDIT PART 2\r\n\r\n // put starting position in queue\r\n queue.add(new Position(startRow, startCol));\r\n\r\n\r\n\r\n\r\n\r\n // look for a way out of the maze from the current position\r\n while (!queue.isEmpty()) {\r\n\r\n\r\n final Position pos = queue.remove();\r\n\r\n // if this is a wall, then ignore this position (and skip the remaining steps of the loop body)\r\n if (mazeData [pos.row][pos.col]== WALL){\r\n continue; // jumps to next spot in que , by skipping to next iteration of loops by saying continue\r\n }\r\n\r\n\r\n // otherwise mark this place as visited (drop a breadcrumb)\r\n if (mazeData [pos.row][pos.col]== VISITED){\r\n continue; // jumps to next spot in que , by skipping to next iteration of loops by saying continue\r\n }\r\n else if(mazeData [pos.row][pos.col]== EMPTY){\r\n mazeData [pos.row][pos.col]= VISITED;\r\n }\r\n\r\n // if we're already on the perimeter, then this is a way out and we should return success (true) right away\r\n if (pos.row == 0|| pos.col ==0 || pos.row == mazeData.length-1 || pos.col == mazeData[0].length-1){\r\n mazeData[startRow][startCol] = START;\r\n return true;\r\n }\r\n\r\n queue.add(new Position(pos.row+1,pos.col ));//down\r\n queue.add(new Position(pos.row-1,pos.col ));//up\r\n queue.add(new Position(pos.row,pos.col-1 )); //left\r\n queue.add(new Position(pos.row, pos.col + 1)); //right\r\n\r\n\r\n }//end of while\r\n\r\n\r\n\r\n // mark starting position\r\n mazeData[startRow][startCol] = START;\r\n\r\n // if we've looked everywhere but haven't gotten out, then return failure (false)\r\n return false;\r\n }",
"private static Location permutateLocation(Location location){\n while (isMaterialInBlackList(location))\n location = locationYIncrementer(location, 2);\n return location;\n }",
"public boolean isLegalStep(MoveDirection dir){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\tPlayer white = currentGame.getWhitePlayer();\n\t\tint[] toCheckPos = new int[2];\n\t\tint[] existingPos = new int[2];\n\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\ttoCheckPos[0] = curPos.getWhitePosition().getTile().getColumn();\n\t\t\ttoCheckPos[1] = curPos.getWhitePosition().getTile().getRow();\n\t\t\t\n\t\t\texistingPos[0] = curPos.getBlackPosition().getTile().getColumn();\n\t\t\texistingPos[1] = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t} else {\n\t\t\ttoCheckPos[0] = curPos.getBlackPosition().getTile().getColumn();\n\t\t\ttoCheckPos[1] = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t\texistingPos[0] = curPos.getWhitePosition().getTile().getColumn();\n\t\t\texistingPos[1] = curPos.getWhitePosition().getTile().getRow();\n\t\t}\n\t\t//0 = column, 1 = row\n\t\tif(dir == MoveDirection.North) {\n\t\t\tif(toCheckPos[1] == 1) return false;\n\t\t\tif(toCheckPos[1] - 1 == existingPos[1] && toCheckPos[0] == existingPos[0]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), -1, 0);\n\t\t} else if(dir == MoveDirection.South) {\n\t\t\tif(toCheckPos[1] == 9) return false;\n\t\t\tif(toCheckPos[1] + 1 == existingPos[1] && toCheckPos[0] == existingPos[0]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 1, 0);\n\t\t} else if(dir == MoveDirection.East) {\n\t\t\tif(toCheckPos[0] == 9) return false;\n\t\t\tif(toCheckPos[0] + 1 == existingPos[0] && toCheckPos[1] == existingPos[1]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 0, 1);\n\t\t} else if(dir == MoveDirection.West) {\n\t\t\tif(toCheckPos[0] == 1) return false;\n\t\t\tif(toCheckPos[0] - 1 == existingPos[0] && toCheckPos[1] == existingPos[1]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 0, -1);\n\t\t}\n\t\t\n\t\treturn false;\r\n }",
"private boolean trySetWaterCoordinates() {\n\t\tfinal Point3D waterCoordinates = RadixLogic.getNearestBlock(actor, 10, Blocks.WATER);\r\n\r\n\t\tif (waterCoordinates == null) {\r\n\t\t\tactor.say(MCA.getLocalizer().getString(\"fishing.nowater\"), getAssigningPlayer());\r\n\r\n\t\t\treset();\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\twaterCoordinatesX = waterCoordinates.iX();\r\n\t\t\twaterCoordinatesY = waterCoordinates.iY();\r\n\t\t\twaterCoordinatesZ = waterCoordinates.iZ();\r\n\t\t\thasWaterPoint = true;\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"private Location[] overrunsTop () {\n Location nextLocation;\n Location nextCenter;\n \n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == THREE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(getX(), 0);\n nextCenter = new Location(getX(), myCanvasBounds.getHeight());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = FULL_TURN_DEGREES - getHeading();\n if (getHeading() < THREE_QUARTER_TURN_DEGREES) {\n angle = -(getHeading() - HALF_TURN_DEGREES);\n }\n angle = Math.toRadians(angle);\n nextLocation = new Location(getX() + getY() / Math.tan(angle), 0);\n nextCenter = new Location(getX() + getY() / Math.tan(angle),\n myCanvasBounds.getHeight());\n \n // eliminates race condition - if next location overruns left/right AND top/bottom it checks\n // to see which is overrun first and corrects\n if (nextLocation.getX() > myCanvasBounds.getWidth())\n // right\n return overrunRight();\n else if (nextLocation.getX() < 0) // left\n return overrunLeft();\n \n return new Location[] { nextLocation, nextCenter };\n }",
"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 }",
"protected boolean solve(int currentRow, int currentColumn) {\n \tint currentBlock = m.maze[currentRow][currentColumn];\t\t\t\t\t\t\t// get the current block that we are on\r\n \t\r\n if (m.isBlockEmpty(currentBlock)) {\t\t\t\t\t\t\t\t\t\t\t\t// make sure current block is empty\r\n \tm.maze[currentRow][currentColumn] = 2; \t\t\t\t\t\t\t\t// add this block to the path as a potential solution\r\n repaint();\r\n \r\n m.blocksTraversed++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// keep track of how many blocks were traversed over\r\n \r\n if (currentRow == m.rows-2 && currentColumn == m.columns-2) {\t\t\t\t// current block is bottom right, path has been found\r\n \tGUI.ta.append(m.blocksTraversed + \" blocks were traversed while solving the maze.\\n\");\r\n \tdouble percentage = (((double) m.blocksTraversed / (m.rows * m.columns))*100) * 2;\r\n DecimalFormat f = new DecimalFormat(\"##.00\");\r\n \tGUI.ta.append(\"This results in \" + f.format(percentage) + \"% of the maze being traveled.\\n\");\r\n \treturn true;\r\n }\r\n \r\n try { Thread.sleep(1); }\r\n catch (InterruptedException e) { }\r\n \r\n int topBlock = currentRow - 1;\t\t\t\t\t\t\t\t\t\t\t\t// block directly above the current block\r\n int leftBlock = currentColumn - 1;\t\t\t\t\t\t\t\t\t\t\t// block directly left of the current block\r\n int bottomBlock = currentRow + 1;\t\t\t\t\t\t\t\t\t\t\t// block directly below the current block\r\n int rightBlock = currentColumn + 1;\t\t\t\t\t\t\t\t\t\t\t// block directly right of the current block\r\n \r\n if (solve(topBlock, currentColumn) || solve(currentRow, leftBlock) ||\t\t// a solution was found\r\n \tsolve(bottomBlock, currentColumn) || solve(currentRow, rightBlock))\r\n \treturn true;\r\n \r\n m.maze[currentRow][currentColumn] = 4; \t\t\t\t\t\t\t\t\t// no solution from current block so make the block visited instead\r\n repaint();\r\n \r\n synchronized(this) {\r\n try { wait(1); }\r\n catch (InterruptedException e) { }\r\n }\r\n }\r\n return false;\r\n }",
"@Test\n public void testGetPossibleMoveCoordinate() throws Exception{\n ChessBoard board = new ChessBoard(8, 8);\n Piece p;\n\n p = new Pawn(board, Player.WHITE);\n p.setCoordinate(0, 0);\n assertEquals(2, p.getPossibleMoveCoordinate().size()); // first time move, therefore it should be able to advance two squares.\n\n\n p.setCoordinate(0, 1);\n assertEquals(1, p.getPossibleMoveCoordinate().size()); // already moved, therefore it could move two squares.\n\n\n /*\n * create a pawn in same group\n * put it ahead p, then p couldn't move\n */\n Piece friend = new Pawn(board, Player.WHITE);\n friend.setCoordinate(0, 2);\n assertEquals(0, p.getPossibleMoveCoordinate().size());\n\n /*\n * create an opponent piece at top right\n * therefore, p can move top right\n */\n Piece opponent_piece = new Pawn(board, Player.BLACK);\n opponent_piece.setCoordinate(1, 2);\n assertEquals(1, p.getPossibleMoveCoordinate().size());\n\n /*\n * p reaches top boundary\n */\n p.setCoordinate(0, 7);\n assertEquals(0, p.getPossibleMoveCoordinate().size());\n }",
"private Cell searchEmptySurrounding(){\n List <Cell> blocks = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n for (Cell block : blocks){\n if(!isCellOccupied(block)) return block;\n }\n return null;\n }",
"private void tryMovePlayer(int direction) {\n int layerOffset = 0, rowOffset = 0, colOffset = 0;\n boolean canMove = false;\n Maze3D.Cell currentCell = maze3D[playerLayer][playerRow][playerCol];\n Maze3D.Cell nextCell = null;\n try {\n switch (direction)\n {\n case Maze3D.UP:\n nextCell = maze3D[playerLayer][playerRow - 1][playerCol];\n canMove = !(currentCell.isWallTop() || nextCell.isWallBottom());\n rowOffset = -1;\n break;\n case Maze3D.DOWN:\n nextCell = maze3D[playerLayer][playerRow + 1][playerCol];\n canMove = !(currentCell.isWallBottom() || nextCell.isWallTop());\n rowOffset = 1;\n break;\n case Maze3D.LEFT:\n nextCell = maze3D[playerLayer][playerRow][playerCol - 1];\n canMove = !(currentCell.isWallLeft() || nextCell.isWallRight());\n colOffset = -1;\n break;\n case Maze3D.RIGHT:\n nextCell = maze3D[playerLayer][playerRow][playerCol + 1];\n canMove = !(currentCell.isWallRight() || nextCell.isWallLeft());\n colOffset = 1;\n break;\n case Maze3D.FRONT:\n nextCell = maze3D[playerLayer - 1][playerRow][playerCol];\n canMove = !(currentCell.isWallFront() || nextCell.isWallBack());\n layerOffset = -1;\n break;\n case Maze3D.BACK:\n nextCell = maze3D[playerLayer + 1][playerRow][playerCol];\n canMove = !(currentCell.isWallBack() || nextCell.isWallFront());\n layerOffset = 1;\n break;\n }\n //if cell is not null and can move, then move\n if (nextCell != null && canMove)\n {\n playerLayer += layerOffset;\n playerRow += rowOffset;\n playerCol += colOffset;\n mazeView.setPlayerLocation(playerLayer, playerRow, playerCol);\n moves++;\n }\n //if new position is the solution, then game is solved\n if (isSolved())\n {\n notifyGameEnd();\n }\n }\n catch (ArrayIndexOutOfBoundsException e)\n {\n Log.d(TAG, \"tryMovePlayer: player tried to move to edge\");\n }\n }",
"boolean hasPositionY();",
"boolean hasPositionY();",
"boolean hasPositionY();",
"public boolean isGameOver(int x, int y, int z){\n Coords position = new Coords(x,y,z);\n if(!position.isCorrect) return false;\n for(int i=-1; i<2; i++)\n for(int j=-1; j<2; j++)\n for(int k=-1; k<2; k++){\n if(i==0 && j==0 && k==0) continue;\n Coords c2 = new Coords(position.getX()+i,position.getY()+j,position.getZ()+k);\n Coords c3 = new Coords(position.getX()+2*i,position.getY()+2*j,position.getZ()+2*k);\n Coords c4 = new Coords(position.getX()+3*i,position.getY()+3*j,position.getZ()+3*k);\n if(c2.isCorrect && c3.isCorrect && c4.isCorrect){\n if(board[position.getX()][position.getY()][position.getZ()]==\n board[c2.getX()][c2.getY()][c2.getZ()]&&board[c2.getX()][c2.getY()][c2.getZ()]\n ==board[c3.getX()][c3.getY()][c3.getZ()]&&board[c4.getX()][c4.getY()][c4.getZ()]\n ==board[c3.getX()][c3.getY()][c3.getZ()]) return true;}\n c4 = new Coords(position.getX()-i,position.getY()-j,position.getZ()-k);\n if(c2.isCorrect && c3.isCorrect && c4.isCorrect){\n if(board[position.getX()][position.getY()][position.getZ()]==\n board[c2.getX()][c2.getY()][c2.getZ()]&&board[c2.getX()][c2.getY()][c2.getZ()]\n ==board[c3.getX()][c3.getY()][c3.getZ()]&&board[c4.getX()][c4.getY()][c4.getZ()]\n ==board[c3.getX()][c3.getY()][c3.getZ()]) return true;}\n }\n return false;\n }",
"private static Point avoidNoFlyZones(Point droneCurr, Point droneNextDes, List<List<List<Point>>> noFlyZonesCoords, List<Point> dronePositions, String port) throws IOException, InterruptedException {\r\n\t\tvar intersectingLines = linesWhichIntersect(droneCurr, droneNextDes, noFlyZonesCoords);\r\n\t\tvar numCoords = intersectingLines.size();\r\n\t\t\r\n\t\tvar droneGrad = getGradient(droneCurr, droneNextDes);\r\n\t\tvar droneYint = getYint(droneCurr, droneNextDes);\r\n\t\tvar droneNext = droneNextDes; //in the case that there are no intersections with any lines\r\n\t\t\r\n\t\tPoint previous1 = null;\r\n\t\tPoint previous2 = null;\r\n\t\tvar lastIndex = dronePositions.size()-1;\r\n\t\tif(lastIndex>1) { //checks that drone has been in at least 3 positions\r\n\t\t\tprevious1 = dronePositions.get(lastIndex-1); //previous position of drone\r\n\t\t\tprevious2 = dronePositions.get(lastIndex-2); //position before previous position\r\n\t\t}\r\n\t\t\r\n\t\t//in the case that the drone intersects with one line\r\n\t\tif(numCoords == 2) {\r\n\t\t\tvar coord1 = intersectingLines.get(0);\r\n\t\t\tvar coord2 = intersectingLines.get(1); \r\n\t\t\tvar buildingInd = buildingIndex(coord1, port);\r\n\t\t\tif(buildingInd != 100) { //index initialised as 100 in buildingIndex function- if coordinate not found in list, 100 is returned\r\n\t\t\t\tvar buildingCentre = buildingCentres(port).get(buildingInd);\r\n\t\t\t\tvar buildingSideGrad = getGradient(coord1, coord2);\r\n\t\t\t\tdroneNext = chooseNextPos(droneCurr, droneNextDes, coord1, coord2, buildingSideGrad, buildingCentre, noFlyZonesCoords, previous1, previous2);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t//in the case that the drone intersects with two lines\r\n\t\telse if(numCoords == 4) {\r\n\t\t\tvar coord1 = intersectingLines.get(0);\r\n\t\t\tvar coord2 = intersectingLines.get(1);\r\n\t\t\tvar coord3 = intersectingLines.get(2);\r\n\t\t\tvar coord4 = intersectingLines.get(3);\r\n\t\t\t\r\n\t\t\tvar buildingSide1Grad = getGradient(coord1, coord2);\r\n\t\t\tvar buildingSide1Yint = getYint(coord1, coord2);\r\n\t\t\tvar intersection1 = getIntersection(droneYint, buildingSide1Yint, droneGrad, buildingSide1Grad);\r\n\t\t\tvar dist1 = euclidDist(intersection1, droneCurr);\r\n\t\t\t\r\n\t\t\tvar buildingSide2Grad = getGradient(coord3, coord4);\r\n\t\t\tvar buildingSide2Yint = getYint(coord3, coord4);\r\n\t\t\tvar intersection2 = getIntersection(droneYint, buildingSide2Yint, droneGrad, buildingSide2Grad);\r\n\t\t\tvar dist2 = euclidDist(intersection2, droneCurr);\r\n\t\t\t\r\n\t\t\tvar buildingInd1 = buildingIndex(coord1, port); //in case the two lines which the drone intersects with are from 2 different buildings\r\n\t\t\tvar buildingInd2 = buildingIndex(coord3, port);\r\n\t\t\tif(buildingInd1 !=100 && buildingInd2 !=100) { \r\n\t\t\t\tvar buildingCentre1 = buildingCentres(port).get(buildingInd1);\r\n\t\t\t\tvar buildingCentre2 = buildingCentres(port).get(buildingInd2);\r\n\t\t\t\t\r\n\t\t\t\tif(dist1<dist2) { //to determine which side the drone path intersects with first\r\n\t\t\t\t\tdroneNext = chooseNextPos(droneCurr, droneNextDes, coord1, coord2, buildingSide1Grad, buildingCentre1, noFlyZonesCoords, previous1, previous2);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tdroneNext = chooseNextPos(droneCurr, droneNextDes, coord3, coord4, buildingSide2Grad, buildingCentre2, noFlyZonesCoords, previous1, previous2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} \r\n\t\t//in the case that the drone intersects with three lines\r\n\t\telse if(numCoords == 6) {\r\n\t\t\tvar coord1 = intersectingLines.get(0);\r\n\t\t\tvar coord2 = intersectingLines.get(1);\r\n\t\t\tvar coord3 = intersectingLines.get(2);\r\n\t\t\tvar coord4 = intersectingLines.get(3);\r\n\t\t\tvar coord5 = intersectingLines.get(4);\r\n\t\t\tvar coord6 = intersectingLines.get(5);\r\n\t\t\t\r\n\t\t\tvar buildingSide1Grad = getGradient(coord1, coord2);\r\n\t\t\tvar buildingSide1Yint = getYint(coord1, coord2);\r\n\t\t\tvar intersection1 = getIntersection(droneYint, buildingSide1Yint, droneGrad, buildingSide1Grad);\r\n\t\t\tvar dist1 = euclidDist(intersection1, droneCurr);\r\n\t\t\t\r\n\t\t\tvar buildingSide2Grad = getGradient(coord3, coord4);\r\n\t\t\tvar buildingSide2Yint = getYint(coord3, coord4);\r\n\t\t\tvar intersection2 = getIntersection(droneYint, buildingSide2Yint, droneGrad, buildingSide2Grad);\r\n\t\t\tvar dist2 = euclidDist(intersection2, droneCurr);\r\n\t\t\t\r\n\t\t\tvar buildingSide3Grad = getGradient(coord5, coord6);\r\n\t\t\tvar buildingSide3Yint = getYint(coord5, coord6);\r\n\t\t\tvar intersection3 = getIntersection(droneYint, buildingSide3Yint, droneGrad, buildingSide3Grad);\r\n\t\t\tvar dist3 = euclidDist(intersection3, droneCurr);\r\n\t\t\t\r\n\t\t\tvar minDist = Math.min(Math.min(dist1, dist2),dist3);\r\n\t\t\t\r\n\t\t\tvar buildingInd1 = buildingIndex(coord1, port); //in case the three lines which the drone intersects with are from 3 different buildings\r\n\t\t\tvar buildingInd2 = buildingIndex(coord3, port);\r\n\t\t\tvar buildingInd3 = buildingIndex(coord5, port);\r\n\t\t\tif(buildingInd1 !=100 && buildingInd2 != 100 && buildingInd3 != 100) {\r\n\t\t\t\tvar buildingCentre1 = buildingCentres(port).get(buildingInd1);\r\n\t\t\t\tvar buildingCentre2 = buildingCentres(port).get(buildingInd2);\r\n\t\t\t\tvar buildingCentre3 = buildingCentres(port).get(buildingInd3);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tif(minDist==dist1) {\r\n\t\t\t\t\tdroneNext = chooseNextPos(droneCurr, droneNextDes, coord1, coord2, buildingSide1Grad, buildingCentre1, noFlyZonesCoords, previous1, previous2);\r\n\t\t\t\t}\r\n\t\t\t\telse if(minDist==dist2) {\r\n\t\t\t\t\tdroneNext = chooseNextPos(droneCurr, droneNextDes, coord3, coord4, buildingSide2Grad, buildingCentre2, noFlyZonesCoords, previous1, previous2);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tdroneNext = chooseNextPos(droneCurr, droneNextDes, coord5, coord6, buildingSide3Grad, buildingCentre3, noFlyZonesCoords, previous1, previous2);\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\treturn droneNext;\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 boolean checkNotDone() {\n boolean notDone = false;\n blocksPut = 0;\n \n for(int y = 0; y < buildHeight+1; y++) {\n for(int z = 0; z < buildSize; z++) {\n for(int x = 0; x < buildSize; x++) {\n if(myIal.lookBlock(x, y, z).equals(\"air\")) {\n notDone = true;\n } else {\n blocksPut++;\n }\n }\n }\n }\n\n return notDone;\n }",
"private Location generateRandomStartLocation() {\n\t\tif (!atLeastOneNonWallLocation()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"There is no free tile available for the player to be placed\");\n\t\t}\n\n\t\twhile (true) {\n\t\t\t// Generate a random location\n\t\t\tfinal Random random = new Random();\n\t\t\tfinal int randomRow = random.nextInt(this.map.getMapHeight());\n\t\t\tfinal int randomCol = random.nextInt(this.map.getMapWidth());\n\n\t\t\tfinal Location location = new Location(randomCol, randomRow);\n\n\t\t\tif (this.map.getMapCell(location).isWalkable()\n\t\t\t\t\t&& !otherPlayerOnTile(location, -1)) {\n\t\t\t\t// If it's not a wall then we can put them there\n\t\t\t\treturn location;\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.5997023",
"0.58354217",
"0.578389",
"0.569833",
"0.5683149",
"0.56217784",
"0.55884856",
"0.5578758",
"0.55748737",
"0.55580914",
"0.5514881",
"0.55057126",
"0.54032284",
"0.5395889",
"0.5377845",
"0.5375985",
"0.53408796",
"0.53209287",
"0.53202176",
"0.5286657",
"0.5256199",
"0.52484596",
"0.52371395",
"0.521639",
"0.5214227",
"0.5205382",
"0.51980656",
"0.5192272",
"0.5189828",
"0.5186685",
"0.5182763",
"0.516452",
"0.51489085",
"0.5136297",
"0.51358265",
"0.5133245",
"0.51264375",
"0.5120749",
"0.5113066",
"0.51040006",
"0.5085506",
"0.50828063",
"0.5065651",
"0.5062094",
"0.5055298",
"0.5051104",
"0.5039759",
"0.5037937",
"0.50378305",
"0.5036903",
"0.50244606",
"0.50114524",
"0.5009665",
"0.5003405",
"0.5002449",
"0.49963722",
"0.49915472",
"0.49683043",
"0.49566144",
"0.49548188",
"0.49427867",
"0.49359828",
"0.4935377",
"0.4931462",
"0.4923971",
"0.49237585",
"0.49230713",
"0.49102983",
"0.49072802",
"0.49038926",
"0.49031582",
"0.49023265",
"0.49015665",
"0.4898369",
"0.4887666",
"0.48839337",
"0.48813158",
"0.48799542",
"0.48787817",
"0.48787278",
"0.4875006",
"0.4867145",
"0.48664603",
"0.48662952",
"0.48662007",
"0.48585874",
"0.48487365",
"0.484418",
"0.48418334",
"0.4840259",
"0.48371354",
"0.48358512",
"0.483275",
"0.483275",
"0.483275",
"0.4830265",
"0.48261762",
"0.4825693",
"0.4823949",
"0.48220965"
] | 0.5040031 | 46 |
creating dummy user to fetch | @Test
public void getUserById() {
userDAO.createUser(new User("dummy", "dummy", 1));
//test fetching of data
assertNotNull(userResource.getUser("dummy"));
//clean up
userDAO.removeUser("dummy");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Appuser newUser() {\n //TODO: get logged user from security context\n String createdBy = \"REST\";\n Appuser au = new Appuser();\n Userdetails ud = new Userdetails();\n boolean idOK = false;\n Long id = 0L;\n while (!idOK) {\n id = EntityIdGenerator.random();\n idOK = !userRepository.exists(id);\n }\n //notNull\n ud.setNotes(\"none\");\n au.setPasswdHash(\"*\");\n au.setCreatedBy(createdBy);\n au.setUserId(id);\n ud.setUserId(id);\n au.setUserdetails(ud);\n return au;\n }",
"private User createDummyUser(String userId) {\n\n return new User(userId, \"Usr_\" + userId, new ArrayList<ShoppingList>());\n }",
"Human_User createHuman_User();",
"User createUser();",
"private String createUser(String name) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}",
"@Test\n public void testGetNewUser() throws Exception {\n UserMultiID umk = createRU(\"remote-user-\" + getRandomString());\n String idp = \"test-idp-\" + getRandomString();\n // create a new user.\n XMLMap map = getDBSClient().getUser(umk, idp);\n assert getDBSClient().hasUser(umk, idp);\n Identifier uid = BasicIdentifier.newID(map.get(userKeys.identifier()).toString());\n User user2 = getUserStore().get(uid);\n checkUserAgainstMap(map, user2);\n }",
"@Test\n\tpublic void testCreateUser() {\n\t\tassertTrue(auctionSystem.createUser(\"toto\", \"Glen\", \"Fiddich\", RoleEnum.SELLER));\n\t\tassertTrue(auctionSystem.createUser(\"tata\", \"Johnnie\", \"Campbell\", RoleEnum.BUYER));\n\t\tassertTrue(auctionSystem.createUser(\"tutu\", \"Ballentine\", \"Darmore\", RoleEnum.SELLER_BUYER));\n\t}",
"private AppUser saveDummyAppUserInstance() {\n\t\tAppUser dummyEntry = new AppUser(//\n\t\t\t\t1L//\n\t\t\t\t, \"a@aa.aa\"//\n\t\t\t\t, \"Pin12345\"//\n\t\t\t\t, 5//\n\t\t\t\t, BehaviourIfPoolWithWrongAnswersIsFull.EMPTY_POOL_UNTIL_ALL_QUESTIONS_CORRECT//\n\t\t\t\t, Calendar.getInstance().getTime()//\n\t\t);\n\t\tAppUser result = appUserRepository.save(dummyEntry);\n\t\treturn result;\n\t}",
"private void initUser() {\n\t}",
"@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}",
"protected User createUser(final Request req) {\n final User user = new ServletUser(req);\n return user;\n }",
"public User createUser() {\n printer.println(\"Welcome! Enter you name and surname:\");\n printer.println(\"Name:\");\n String name = input.nextString();\n printer.println(\"Surname:\");\n String surname = input.nextString();\n return new User(name, surname);\n }",
"User getUser(boolean autocreate);",
"GenerateUserAccount () {\r\n }",
"public IUser CreateUser() {\n\t\tIUser iUser = null;\n\t\tswitch (db) {\n\t\tcase \"Mysql\":\n\t\t\tiUser = new MysqlUserImpl();\n\t\t\tbreak;\n\t\tcase \"Access\":\n\t\t\tiUser = new AccessUserImpl();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn iUser;\n\t}",
"Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);",
"public static User createBasicUser () {\n User user = new User();\n user.setUsername(\"basicUser\");\n user.setPassword(\"secret\");\n user.setEmail(\"me@example.com\");\n user.setFirstName(\"firstName\");\n user.setLastName(\"lastName\");\n user.setPhoneNumber(\"123456789123\");\n user.setCountry(\"GB\");\n user.setEnabled(true);\n user.setDescription(\"A basic user\");\n user.setProfileImageUrl(\"https://blabla.images.com/basicuser\");\n\n return user;\n }",
"public void setupUser() {\n }",
"public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example.of(user, em);\n List<Users> users = userRepository.findAll(example);\n System.out.println(\"Existing users: \" + users);\n\n if (users.size() == 0) {\n System.out.println(\"admin user not found, hence creating admin user\");\n userRepository.save(user);\n System.out.println(\"admin user created\");\n latch.countDown();\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public void createUser(User user);",
"private User createUser(org.picketlink.idm.model.User picketLinkUser) {\n User user = new User(picketLinkUser.getLoginName());\n user.setFullName(picketLinkUser.getFirstName() + \" \" + picketLinkUser.getLastName());\n user.setShortName(picketLinkUser.getLastName());\n return user;\n }",
"public void createUser(User user) {\n\n\t}",
"@Test\r\n\tpublic void shouldCreateAndRetrieveUser() {\n\t\tnew User(\"Bob\", \"hallo\").save();\r\n\t\tnew User(\"Brayn\", \"velo\").save();\r\n\r\n\t\t// Retrieve the user with some keywords\r\n\t\tUser bob = User.find(\"byPassword\", \"hallo\").first();\r\n\t\tUser brayn = User.find(\"byName\", \"Brayn\").first();\r\n\t\tUser zero = User.find(\"byPassword\", \"Housi\").first();\r\n\r\n\t\tassertEquals(\"Bob\", bob.name);\r\n\t\tassertEquals(\"hallo\", bob.password);\r\n\r\n\t\tassertEquals(\"Brayn\", brayn.name);\r\n\t\tassertEquals(\"velo\", brayn.password);\r\n\r\n\t\tassertNull(zero);\r\n\t}",
"public User getUser (String userName);",
"@Test\n void createUserReturnsNull() {\n Address address = new Address(\"Earth\", \"Belgium\", \"City\", \"Street\", 0);\n User user = new User(\"Mira\", \"Vogelsang\", \"0412345678\", \"maarten@maarten\", \"pass\", address);\n\n assertNull(controller.createUser(user));\n }",
"@Test\n public void testCreateUser() throws InvalidUserException {\n //Arrange\n User user = new User();\n user.setEmail(\"user@email.com\");\n user.setFirstName(\"first\");\n user.setLastName(\"last\");\n user.setPassword(\"pass\");\n user.setRole(\"admin\");\n \n //Act\n User createdUser = userService.createUser(user);\n User fetchedUser = userService.readUser(createdUser.getUserId());\n \n //Assert\n assertEquals(fetchedUser.getUserId(), createdUser.getUserId());\n assertEquals(fetchedUser.getEmail(), \"user@email.com\");\n assertEquals(fetchedUser.getFirstName(), \"first\");\n \n }",
"@Test\n public void getUserByIdCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n //test fetching of data\n assertNull(userResource.getUser(\"notdummy\"));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }",
"public void newUser(User user);",
"@Test\n public void testCreateValidUser() {\n LocalUserManager ua = new LocalUserManager();\n\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"gburdell1@gatech.edu\", \"George\", \"Burdell\", \"MANAGER\");\n } catch (Exception e) {\n Assert.fail();\n }\n Assert.assertEquals(1, ua.getUsers().size());\n Assert.assertEquals(\"gburdell1\", ua.getUsers().get(0).getUsername());\n Assert.assertEquals(\"gburdell1@gatech.edu\", ua.getUsers().get(0).getEmail());\n Assert.assertEquals(UserClass.MANAGER, ua.getUsers().get(0).getUserClass());\n }",
"@Test\n public void testSameUser() {\n LocalUserManager ua = new LocalUserManager();\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"gburdell1@gatech.edu\", \"George\", \"Burdell\", \"MANAGER\");\n ua.createUser(\"gburdell2\", \"ramblin\", \"gburdell1@gatech.edu\", \"G\", \"B\", \"USER\");\n } catch (Exception e) {\n Assert.assertEquals(1, ua.getUsers().size());\n return;\n }\n Assert.fail();\n }",
"int createUser(User data) throws Exception;",
"@Override\n\t\tpublic MyUserBasicInfo create() {\n\t\t\treturn new MyUserBasicInfo();\n\t\t}",
"static User create(int id){\n return Users.isMyID(id) ? new LoggedUser(id) : new User(id);\n }",
"public User getUser(String userName);",
"public void createUser(int usertype) {\n\t\tthePerson = PersonFactory.getPerson(usertype);\n\t}",
"private User createUserFromResults(ResultSet results) throws SQLException {\n User user = new User();\n user.setLastName(results.getString(\"last_name\"));\n user.setFirstName(results.getString(\"first_name\"));\n user.setUserid(results.getString(\"id\"));\n user.setDateOfBirth(results.getDate(\"date_of_birth\"));\n // TODO map the remaining fields\n return user;\n }",
"UserCreateResponse createUser(UserCreateRequest request);",
"@Test\n public void testCreateOnBehalfUser() throws Exception {\n String password = \"abcdef\";\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), password);\n checkCreatedUser(result, customer, password, false);\n }",
"public static User getRandomDeveloperUser() {\n String name =\n userNames[RandomNumberGenerator.getRandomInt(0, userNames.length - 1)]\n + RandomNumberGenerator.getRandomInt(0, 10000);\n long oidcId = name.hashCode();\n String email = name.replace(\" \", \"\").toLowerCase() + \"@test.foobar\";\n String website = \"http://\" + name.replace(\" \", \"\") + \".something\";\n String description = \"This is the personal description of \" + name + \"!\";\n User user = new User(oidcId, name, email, description, website, User.DEVELOPER);\n return user;\n }",
"CreateUserResult createUser(CreateUserRequest createUserRequest);",
"private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }",
"public void dummyUsersToDB(){\n\t\tUser nick = new User(db,\"Nick\",9);\n\t\tUser lin = new User(db,\"Lin\",10);\n\t\tUser evan = new User(db,\"Evan\",8);\n\t\tUser karthik = new User(db,\"Karthik\",10);\n\t\tUser bernadette = new User(db,\"Bernadette\",8);\n\t\tUser james = new User(db,\"James\",7);\n\t}",
"@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }",
"@Override\n\tpublic ApplicationResponse createUser(UserRequest request) {\n\t\tUserEntity entity = repository.save(modeltoentity.apply(request));\n\t\tif (entity != null) {\n\t\t\treturn new ApplicationResponse(true, \"Success\", enitytomodel.apply(entity));\n\t\t}\n\t\treturn new ApplicationResponse(false, \"Failure\", enitytomodel.apply(entity));\n\t}",
"public User(String _username, String _password, String _employeeType) {\n // TODO implement here\n username = _username;\n password = _password;\n employeeType = _employeeType;\n// String taskId = UUID.randomUUID().toString();\n }",
"public DummyUserManager()\n {\n }",
"@Test\n\tpublic void testGetUser() {\n\t\tresetTestVars();\n\t\tuser1.setID(\"1\");\n\t\tuser2.setID(\"2\");\n\t\tuser3.setID(\"3\");\n\t\t\n\t\tassertNull(\"No users in network\", sn.getUser(\"1\"));\n\t\tsn.addUser(user1);\n\t\tassertEquals(\"Only user in network\", user1, sn.getUser(\"1\"));\n\t\tsn.addUser(user2);\n\t\tsn.addUser(user3);\n\t\tassertEquals(\"1/3 in list\", user1, sn.getUser(\"1\"));\n\t\tassertEquals(\"2/3 in list\", user2, sn.getUser(\"2\"));\n\t\tassertEquals(\"3/3 in list\", user3, sn.getUser(\"3\"));\n\t\tassertNull(\"Isnt a valid user ID\", sn.getUser(\"4\"));\n\t}",
"@Test\n public void autoWireComponet(){\n User user = userUtil.createAnonymousUser();\n \n assertNotNull(user);\n assertNotNull(user.getId());\n assertEquals(\"Anon\", user.getFirstName());\n assertEquals(\"User\", user.getLastName());\n }",
"public User getUser(String userName, String password);",
"public void creatUser(String name, String phone, String email, String password);",
"public ResponseEntity<User> createUser(User user) {\n List<User> users=getAllUsers();\n boolean usernameIsUsed=false;\n\n\n for(User myUser : users){\n\n\n String username= myUser.getUsername();\n\n if(username.equals(user.getUsername())){\n usernameIsUsed=true;\n return ResponseEntity.badRequest().build();\n }\n\n\n }\n if(!usernameIsUsed){\n myUserDetailsService.addUser(user);\n return ResponseEntity.ok(user);\n }\n\n return null;\n }",
"User getUser();",
"User getUser();",
"@Override\n\tpublic void create(User user) {\n\t\t\n\t}",
"@Test\n\tpublic void testCreateUser(){\n\t\trepository.createUser(expectedUser);\n\t\tSystem.out.println(\"#########################>User inserted into database<#########################\");\n\t\tUser actualUser = repository.findByUsername(\"vgeorga\");\n\t\tassertEquals(expectedUser.getUsername(), actualUser.getUsername());\n\t}",
"@Override\n\tpublic User createNewUser(Account account) {\n\t\treturn new User(account);\n\t\t\n\t}",
"public IdentifiedUser createNewUser() {\n\t\treturn new Gamer();\n\t}",
"public User getUser(String name);",
"public User getUser(String name);",
"private void createUser(String Address, String Phone_number,String needy) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(userId)) {\n userId = mFirebaseDatabase.push().getKey();\n }\n\n com.glitch.annapurna.needy user = new needy(Address,Phone_number,needy);\n\n mFirebaseDatabase.child(userId).setValue(user);\n\n addUserChangeListener();\n }",
"public User(){\n\t username = \"Anonymous\";\n\t}",
"private void newUser(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\ttry {\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tString name = req.getParameter(Constants.NAME_USER);\n\t\t\tUserDB.introduceUser(name);\n\t\t\tlong id = UserDB.getUserId(name);\n\t\t\tUsuario u = new Usuario(name, Long.toString(id));\n\t\t\tout.print(gson.toJson(u));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t}\n\t}",
"@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}",
"@BeforeClass(alwaysRun = true)\r\n\tpublic void createUser() throws ParseException, SQLException, JoseException {\r\n\t\tSystem.out.println(\"******STARTING***********\");\r\n\t\tUser userInfo = User.builder().build();\r\n\t\tuserInfo.setUsername(userName);\r\n\t\tuserInfo.setPassword(\"Test@123\");\r\n\t\tsessionObj = EnvSession.builder().cobSession(config.getCobrandSessionObj().getCobSession())\r\n\t\t\t\t.path(config.getCobrandSessionObj().getPath()).build();\r\n\t\t//userHelper.getUserSession(\"InsightsEngineusers26 \", \"TEST@123\", sessionObj); \r\n\t\tuserHelper.getUserSession(userInfo, sessionObj);\r\n\t\tlong providerId = 16441;\r\n\t\tproviderAccountId = providerId;\r\n\t\tResponse response = providerAccountUtils.addProviderAccountStrict(providerId, \"fieldarray\",\r\n\t\t\t\t\"budget1_v1.site16441.1\", \"site16441.1\", sessionObj);\r\n\t\tproviderAccountId = response.jsonPath().getLong(JSONPaths.PROVIDER_ACC_ID);\r\n\t\tAssert.assertTrue(providerAccountId!=null);\r\n\t\t\r\n\t\t}",
"private void createUser(final String email, final String password) {\n\n }",
"@Factory(scope = ScopeType.CONVERSATION)\r\n\tpublic User getUser() {\r\n\t\tQuery userQuery = entityManager\r\n\t\t\t\t.createQuery(\"SELECT u FROM User AS u WHERE \"\r\n\t\t\t\t\t\t+ \"u.username=#{identity.username}\");\r\n\t\treturn (User) userQuery.getSingleResult();\r\n\t}",
"public UserAuthToken createUser(CreateUserRequest request);",
"@Test\n public void testUserIdExists() {\n\n String userInput = \"guest.login\";\n Owner testUser = ownerHelper.validateUser(userInput, \"Pa$$w0rd\");\n assertEquals(testUser.getPassword(), owner3.getPassword());\n assertEquals(testUser.getFirstName(), owner3.getFirstName());\n assertEquals(testUser.getLastName(), owner3.getLastName());\n\n }",
"User getUser(String username);",
"User getUserById(int id);",
"public User getUser(String username);",
"User getPassedUser();",
"public static ExUser createEntity(EntityManager em) {\n ExUser exUser = new ExUser()\n .userKey(DEFAULT_USER_KEY);\n return exUser;\n }",
"private User() {}",
"public Person createAdminUser(Register entity) {\t\t\n\t\tPerson person = new Person();\n\t\tif(!searchPersonNew(entity)) {\t\t\t\n\t\t\tperson = factory.createPerson(entity);\t\t\t\t\t\t\n\t\t\tcreate(person);\t\t\t\n\t\t}\t\t\n\t\treturn person;\n\t}",
"public abstract User getUser();",
"public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"email@gmail.com\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }",
"@Test\n public void testCreate() {\n User user = new User(\"lgn\", \"login@example.com\", \"Login Name\", \n \"12345678\");\n userService.create(user);\n }",
"@Test\n public void testCreateAccountWithoutPassword() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"beta@gamma.net\");\n createUserRequest.setFirstname(\"Beta\");\n createUserRequest.setLastname(\"Gamma\");\n\n // Now, perform the actual test - create the Account, and verify that\n // the response is ok, and that a Notification was sent\n final Response result = administration.createUser(token, createUserRequest);\n assertThat(result.isOk(), is(true));\n // Creating a new User should generate an Activate User notification\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n assertThat(spy.size(type), is(1));\n final String activationCode = spy.getNext(type).getFields().get(NotificationField.CODE);\n assertThat(activationCode, is(not(nullValue())));\n\n // Check that the user is in the list of members\n final String memberGroupId = findMemberGroup(token).getGroupId();\n token.setGroupId(memberGroupId);\n final FetchGroupRequest groupRequest = new FetchGroupRequest(memberGroupId);\n final FetchGroupResponse groupResponse = administration.fetchGroup(token, groupRequest);\n assertThat(groupResponse, is(not(nullValue())));\n }",
"public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}",
"int newUser(String username, String password, Time creationTime);",
"@Test\n public void whenFetchingExistingUserReturn200() throws Exception {\n UserRegistrationRequestDTO request = getSampleRegistrationRequest();\n long userId = api.registerUser(request).execute().body();\n\n // when fetching user details\n Response<UserDTO> response = api.getUserDetails(userId).execute();\n\n // then http status code should be ok\n assertThat(response.code(), is(200));\n\n // and user should have a matching name\n assertThat(response.body().fullName, is(request.fullName));\n }",
"@Test\n public void testReadUser() throws InvalidUserException {\n //Arrange\n User user = new User();\n user.setEmail(\"user@email.com\");\n user.setFirstName(\"first\");\n user.setLastName(\"last\");\n user.setPassword(\"pass\");\n user.setRole(\"admin\");\n User createdUser = userService.createUser(user);\n \n\n //Act\n User fetchedUser = userService.readUser(createdUser.getUserId());\n \n //Assert\n assertEquals(fetchedUser.getUserId(), createdUser.getUserId());\n assertEquals(fetchedUser.getEmail(), \"user@email.com\");\n assertEquals(fetchedUser.getFirstName(), \"first\"); \n \n }",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"User createUser(User user);",
"User()\n\t{\n\n\t}",
"User getUserByUsername(String name) throws InvalidUserException;",
"public iUser createUser(int id) {\n iUser user = null;\n String username = getUsername();\n String password = getPassword();\n\n boolean confirmed = confirmed(id, username);\n if (confirmed) {\n user = registerOptions(username, password, id);\n }\n return user;\n }",
"@Test(priority=2)\n\tpublic void ValidateNewUser() {\n\t\t\n\t\tString apiEndPoint = \"https://gorest.co.in/public-api/users/\"+newUserId;\n\t\tSystem.out.println(\"API EndPoint is: \"+apiEndPoint);\n\t\t\t\t\t\t\n\t\tGetUser getuser= given()\n\t\t\t.proxy(\"internet.ford.com\", 83)\n\t\t\t.contentType(\"application/json\")\n\t\t\t.baseUri(apiEndPoint)\t\t\t\n\t\t.when()\n\t\t\t.get(apiEndPoint).as(GetUser.class);\n\t\t\n\t\tAssert.assertEquals(getuser.getCode(),200);\n\t\tAssert.assertEquals(getuser.getData().getName(),\"Stephen M D\");\n\t\tAssert.assertEquals(getuser.getData().getStatus(),\"Active\");\n\t}",
"User getUser(String userName) throws UserNotFoundException;",
"UserModel retrieveUserModel(String username, String password);",
"public User getSpecificUser(String username);",
"private void fetchUser() {\n UserFetcher userFetcher = new UserFetcher();\n userFetcher.setListener(this);\n userFetcher.getUser();\n }",
"static MinimalUser create(ServletRequest request,\n\t\t\t\tShibbolethUserConfiguration config) {\n\t\t\tHttpServletRequest req = (HttpServletRequest) request;\n\n\t\t\tString username = getHeader(req, config.getUsernameKey(), \"\");\n\t\t\tString surname = getHeader(req, config.getSurnameKey(), \"\");\n\t\t\tString firstname = getHeader(req, config.getFirstnameKey(), \"\");\n\t\t\tString profile = getHeader(req, config.getProfileKey(), \"\");\n\n\t\t\tif (username.trim().length() > 0) {\n\n\t\t\t\tMinimalUser user = new MinimalUser();\n\t\t\t\tuser.setUsername(username);\n\t\t\t\tuser.setName(firstname);\n\t\t\t\tuser.setSurname(surname);\n\t\t\t\tuser.setProfile(profile);\n\t\t\t\treturn user;\n\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}",
"private void createTestUser() throws InvalidModelException, ConnectionProblemException{\n\t\tSession session = SessionFactoryUtil.getSessionFactory().openSession();\n\t\t\n\t\ttry {\n\t\t\t//Create a new user with seed data\n\t\t\tUser editor = new User();\n\t\t\teditor.setEmail(\"editor@sheffield.ac.uk\");\n\t\t\teditor.setFirstName(\"The\");\n\t\t\teditor.setLastName(\"Editor\");\n\t\t\teditor.setRole(1);\n\t\t\tPasswordHelper passwordHelper = new PasswordHelper(\"password\");\n\t\t\teditor.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\teditor.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\teditor.validateModel();\n\t\t\t\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(editor);\t\n\t\t\tsession.getTransaction().commit();\n\t\t\t\n\t\t\t//Create a new user with seed data\n\t\t\tUser reviewer = new User();\n\t\t\treviewer.setEmail(\"reviewer@sheffield.ac.uk\");\n\t\t\treviewer.setFirstName(\"Mr\");\n\t\t\treviewer.setLastName(\"Reviewer\");\n\t\t\treviewer.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer.validateModel();\n\t\t\t\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(reviewer);\t\n\t\t\tsession.getTransaction().commit();\n\t\t\t\n\t\t\t//Create a new user with seed data\n\t\t\tUser author = new User();\n\t\t\tauthor.setEmail(\"author@sheffield.ac.uk\");\n\t\t\tauthor.setFirstName(\"An\");\n\t\t\tauthor.setLastName(\"Author\");\n\t\t\tauthor.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\tauthor.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\tauthor.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\tauthor.validateModel();\n\t\t\t\n\t\t\tUser reviewer1 = new User();\t\t\t\n\t\t\treviewer1.setEmail(\"reviewer1@sheffield.ac.uk\");\n\t\t\treviewer1.setFirstName(\"Mr\");\n\t\t\treviewer1.setLastName(\"Reviewer1\");\n\t\t\treviewer1.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer1.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer1.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer1.validateModel();\n\t\t\t\n\t\t\tUser reviewer2 = new User();\n\t\t\treviewer2.setEmail(\"reviewer2@sheffield.ac.uk\");\n\t\t\treviewer2.setFirstName(\"Mr\");\n\t\t\treviewer2.setLastName(\"Reviewer2\");\n\t\t\treviewer2.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer2.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer2.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer2.validateModel();\n\t\t\t\n\t\t\tUser reviewer3 = new User();\n\t\t\treviewer3.setEmail(\"reviewer3@sheffield.ac.uk\");\n\t\t\treviewer3.setFirstName(\"Mr\");\n\t\t\treviewer3.setLastName(\"Reviewer3\");\n\t\t\treviewer3.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer3.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer3.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer3.validateModel();\n\t\t\t\n\t\t\tJournal journal = new Journal();\n\t\t\tjournal.setTitle(\"The dissertations\");\n\t\t\tjournal.setAcademicAims(\"The journal aims to outline dissertations written by students from the Department of Computer Sciece at the University of Sheffield.\");\n\t\t\tjournal.setSubmissionGuidelines(\"Each dissertation must be between 30 and 60 pages and it must follow the department's guidelines on 3rd year dissertations.\");\n\t\t\tjournal.validateModel();\n\t\t\t\n\t\t\tVolume volume = new Volume();\n\t\t\tvolume.setPublicationDate(new Date());\n\t\t\tvolume.setVolumeNumber(1);\n\t\t\tvolume.validateModel();\n\t\t\t\n\t\t\tEdition edition = new Edition();\n\t\t\tedition.setPublicationDate(new Date());\n\t\t\tedition.setEditionNumber(1);\n\t\t\tedition.validateModel();\n\t\t\t\n\t\t\tArticle publishedArticle = new Article();\n\t\t\tpublishedArticle.setTitle(\"An example paper\");\n\t\t\tpublishedArticle.setArticle_abstract(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\nLorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\tpublishedArticle.setFileName(\"1431099295403.pdf\");\n\t\t\tpublishedArticle.validateModel();\n\t\t\t\n\t\t\tArticle article = new Article();\n\t\t\tarticle.setTitle(\"Shadow Puppetry Using the Kinect\");\n\t\t\tarticle.setArticle_abstract(\"Shadow puppetry is a form of storytelling where the characters are made from the shadows cast by puppets. The goal of this project is to build a real-time shadow puppet storytelling application using the Microsoft Kinect sensor. Its depth sensing ability is the perfect tool for tracking users and allowing them to control puppets onscreen, just by moving their body. The project is developed in the C++ programming language and uses the Cinder library for image processing. The system includes various image processing techniques to achieve a real-time, depth-based blur effect that is both efficient and visually appealing. It also includes a robust gesture recognition system based on the dynamic time warping algorithm to allow users to interact with the system and to create engaging and varied stories. These stories can be recorded and saved to file for later playback, or exported as video files.\");\n\t\t\tarticle.setFileName(\"1431098947160.pdf\");\n\t\t\tarticle.validateModel();\n\t\t\t\n\t\t\tArticle article1 = new Article();\n\t\t\tarticle1.setTitle(\"D Portraiture System\");\n\t\t\tarticle1.setArticle_abstract(\"The proliferation of 3D printers and their applications inevitably depend on the ease and practicality of 3D model construction. The aim of this project is to create a 3D portraiture system capable of capturing real-world facial data via a 360 degree head-scanning algorithm, processing this information and then reproducing a physical representation in the form of a figurine using custom built hardware from LEGO. The milling machine has been constructed and proven functional by producing several figurines, each with minor improvements over its predecessors. The implementation of the head scanning subsystem has also been successfully completed through the utilisation of a Microsoft â s Kinect for Windows, which generates partially overlapping point clouds that can subsequently be aligned and merged by means of the Iterative Closest Point algorithm. Future development and improvements to the program should be focused in this subsystem since many advanced techniques and enhancements exist that still remain unincorporated.\");\n\t\t\tarticle1.setFileName(\"1431098976887.pdf\");\n\t\t\tarticle1.validateModel();\n\t\t\t\n\t\t\tArticle article2 = new Article();\n\t\t\tarticle2.setTitle(\"Robot Facial Expressions\");\n\t\t\tarticle2.setArticle_abstract(\"The reason that made me choose this project is that I found it extremely interesting howpeople evolved regarding their interaction with machines. Obviously, as the machines became more and more advanced technologically, the human-computer interaction grew. I think that this growth has brought human kind to the point where we can start considering the possibility of emotions being expressed towards a robot, for example, and maybe in the future, from a robot towards a human being. The aim of this project is to take the first step towards that future by observing and studying how an animated man can be the target of our emotions or to see if the interaction with it can make us feel like we could haveemotions towards it.\");\n\t\t\tarticle2.setFileName(\"1431099010458.pdf\");\n\t\t\tarticle2.validateModel();\n\t\t\t\n\t\t\tArticle article3 = new Article();\n\t\t\tarticle3.setTitle(\"Mobile application for prospective and current Computer Science Students\");\n\t\t\tarticle3.setArticle_abstract(\"Nowadays, mobile phones are part of our life to the point where we are dependent on them. We rely on them for a wide variety of chores, from waking us up in the morning to keeping track of our gym routine. \\n The University of Sheffield offers an application that gives access to its students to certain information; however, its contents are very general. That is why this project aims to offer more specific information and tools to the students of the Computer Science department. On top of that, the application also contains information for any prospective Computer Science students. \\n The paper presents an overview of the current operating systems available on the market and then it looks into the applications that perform similar tasks. Using the data obtained through this research, the functional and non-functional requirements are presented and based on these the application is designed. Towards the end of the report, the techniques and algorithms that run the application are being described, along with the methods in which these have been tested. Finally, the report will end with a discussion based on the challenges faced by the project and an application evaluation. \");\n\t\t\tarticle3.setFileName(\"1431099026185.pdf\");\n\t\t\tarticle3.validateModel();\n\t\t\t\t\t\t\t\t\n\t\t\t//Save the user to the database\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(author);\n\t\t\tsession.save(reviewer1);\n\t\t\tsession.save(reviewer2);\n\t\t\tsession.save(reviewer3);\n\t\t\tsession.save(journal);\n\t\t\t\n\t\t\tvolume.setJournal(journal);\n\t\t\tjournal.getVolumes().add(volume);\n\t\t\tsession.save(volume);\n\t\t\t\n\t\t\tedition.setVolume(volume);\n\t\t\tvolume.getEditions().add(edition);\t\t\t\n\t\t\tsession.save(edition);\n\t\t\t\n\t\t\tpublishedArticle.setAuthor(author);\n\t\t\tpublishedArticle.setEdition(edition);\n\t\t\tedition.getArticles().add(publishedArticle);\n\t\t\tsession.save(publishedArticle);\n\t\t\t\n\t\t\tpublishedArticle.setAuthor(author);\n\t\t\tsession.save(publishedArticle);\n\t\t\t\n\t\t\tarticle.setAuthor(author);\n\t\t\tsession.save(article);\n\t\t\t\n\t\t\tarticle1.setAuthor(reviewer1);\n\t\t\tsession.save(article1);\n\t\t\t\n\t\t\tarticle2.setAuthor(reviewer2);\n\t\t\tsession.save(article2);\n\t\t\t\n\t\t\tarticle3.setAuthor(reviewer3);\n\t\t\tsession.save(article3);\n\t\t\t\t\t\t\n\t\t\tReview review1 = new Review();\n\t\t\treview1.setArticle(article1);\n\t\t\treview1.setOverallJudgement(\"champion\");\n\t\t\treview1.setReviewerExpertise(\"outsider\");\n\t\t\treview1.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview1.setSubstantiveCriticism(\"none\");\n\t\t\treview1.setSmallErrors(\"none\");\n\t\t\treview1.setCommentsForEditor(\"Very very good article. Can go to publishing\");\n\t\t\treview1.setReviewer(author);\n\t\t\treview1.validateModel();\n\t\t\tsession.save(review1);\n\n\t\t\tReview review2 = new Review();\n\t\t\treview2.setArticle(article2);\n\t\t\treview2.setOverallJudgement(\"detractor\");\n\t\t\treview2.setReviewerExpertise(\"outsider\");\n\t\t\treview2.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview2.setSubstantiveCriticism(\"none\");\n\t\t\treview2.setSmallErrors(\"a few spelling mistakes\");\n\t\t\treview2.setCommentsForEditor(\"good article!\");\n\t\t\treview2.setReviewer(author);\n\t\t\treview2.validateModel();\n\t\t\tsession.save(review2);\n\t\t\t\n\t\t\tReview review3 = new Review();\n\t\t\treview3.setArticle(article3);\n\t\t\treview3.setOverallJudgement(\"champion\");\n\t\t\treview3.setReviewerExpertise(\"expert\");\n\t\t\treview3.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview3.setSubstantiveCriticism(\"none\");\n\t\t\treview3.setSmallErrors(\"none\");\n\t\t\treview3.setCommentsForEditor(\"Good for publishing\");\n\t\t\treview3.setReviewer(author);\n\t\t\treview3.validateModel();\n\t\t\tsession.save(review3);\n\t\t\t\n\t\t\tReview review4 = new Review();\n\t\t\treview4.setArticle(article);\n\t\t\treview4.setOverallJudgement(\"champion\");\n\t\t\treview4.setReviewerExpertise(\"expert\");\n\t\t\treview4.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview4.setSubstantiveCriticism(\"none\");\n\t\t\treview4.setSmallErrors(\"the indentation is messed up on page 5\");\n\t\t\treview4.setCommentsForEditor(\"need revising but it's good overall\");\n\t\t\treview4.setReviewer(reviewer1);\n\t\t\treview4.validateModel();\n\t\t\tsession.save(review4);\n\t\t\t\n\t\t\tReview review5 = new Review();\n\t\t\treview5.setArticle(article);\n\t\t\treview5.setOverallJudgement(\"champion\");\n\t\t\treview5.setReviewerExpertise(\"outsider\");\n\t\t\treview5.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview5.setSubstantiveCriticism(\"none\");\n\t\t\treview5.setSmallErrors(\"none\");\n\t\t\treview5.setCommentsForEditor(\"perfect!\");\n\t\t\treview5.setReviewer(reviewer2);\n\t\t\treview5.validateModel();\n\t\t\tsession.save(review5);\n\t\t\t\n\t\t\tReview review6 = new Review();\n\t\t\treview6.setArticle(article);\n\t\t\treview6.setOverallJudgement(\"champion\");\n\t\t\treview6.setReviewerExpertise(\"knowledgable\");\n\t\t\treview6.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview6.setSubstantiveCriticism(\"none\");\n\t\t\treview6.setSmallErrors(\"none\");\n\t\t\treview6.setCommentsForEditor(\"good to go!\");\n\t\t\treview6.setReviewer(reviewer3);\n\t\t\treview6.validateModel();\n\t\t\tsession.save(review6);\n\t\t\t\n\t\t\tReview review7 = new Review();\n\t\t\treview7.setArticle(publishedArticle);\n\t\t\treview7.setOverallJudgement(\"champion\");\n\t\t\treview7.setReviewerExpertise(\"expert\");\n\t\t\treview7.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview7.setSubstantiveCriticism(\"None\");\n\t\t\treview7.setSmallErrors(\"Spelling mistakes here and there.\");\n\t\t\treview7.setCommentsForEditor(\"Very good article!\");\n\t\t\treview7.setReviewer(reviewer1);\n\t\t\treview7.validateModel();\n\t\t\tsession.save(review7);\n\t\t\t\n\t\t\tReview review8 = new Review();\n\t\t\treview8.setArticle(publishedArticle);\n\t\t\treview8.setOverallJudgement(\"champion\");\n\t\t\treview8.setReviewerExpertise(\"knowledgable\");\n\t\t\treview8.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview8.setSubstantiveCriticism(\"Not properly organized into sections. The article does not flow\");\n\t\t\treview8.setSmallErrors(\"Gammar mistakes and spelling mistakes\");\n\t\t\treview8.setCommentsForEditor(\"Good article but need revising\");\n\t\t\treview8.setReviewer(reviewer2);\n\t\t\treview8.validateModel();\n\t\t\tsession.save(review8);\n\t\t\t\n\t\t\tReview review9 = new Review();\n\t\t\treview9.setArticle(publishedArticle);\n\t\t\treview9.setOverallJudgement(\"champion\");\n\t\t\treview9.setReviewerExpertise(\"outsider\");\n\t\t\treview9.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview9.setSubstantiveCriticism(\"None\");\n\t\t\treview9.setSmallErrors(\"Losts of grammar code\");\n\t\t\treview9.setCommentsForEditor(\"N/A\");\n\t\t\treview9.setReviewer(reviewer3);\n\t\t\treview9.validateModel();\n\t\t\tsession.save(review9);\n\t\t\t\n\t\t\tsession.getTransaction().commit();\n\t\t\tsession.close();\n\t\t\t\n\t\t\tUserDao.setArticleToReview(article1, author);\n\t\t\tUserDao.setArticleToReview(article2, author);\n\t\t\tUserDao.setArticleToReview(article3, author);\n\t\t\tUserDao.setArticleToReview(article, reviewer1);\n\t\t\tUserDao.setArticleToReview(article, reviewer2);\n\t\t\tUserDao.setArticleToReview(article, reviewer3);\n\t\t\t\n\t\t\tLOGGER.log(Level.FINE, \"Created seed user\");\n\t\t\treturn;\n\t\t} catch (InvalidModelException ex) {\n\t\t\t//If there was any invalid User information then log and throw the message up to the user\n\t\t\tLOGGER.log(Level.INFO, ex.getMessage());\n\t\t\tsession.close();\n\t\t\tthrow ex;\n\t\t} catch (ConstraintViolationException ex) {\n\t\t\t//If an unexpected error occurred then log, attempt to rollback and then throw a user friendly error\n\t\t\tLOGGER.log(Level.SEVERE, ex.getCause().getMessage());\n\t\t\tsession.getTransaction().rollback();\n\t\t\tsession.close();\n\t\t\tthrow new InvalidModelException(\"The seed data entered is invalid, please check and try again.\");\n\t\t} catch (Exception ex) {\n\t\t\t//If an unexpected error occurred then log, attempt to rollback and then throw a user friendly error\n\t\t\tLOGGER.log(Level.SEVERE, ex.getMessage());\n\t\t\tsession.getTransaction().rollback();\n\t\t\tsession.close();\n\t\t\tthrow new ConnectionProblemException(\"A problem occurred and seeding could not be completed.\");\n\t\t}\n\t}",
"public static CreationUserResult getOrCreateUser(String name, String mail,\n String password, boolean blockFBC){\n\n Logger.info(\"getOrCreateUser \"+name+ \" \"+ mail+ \" \" +password +\" \" +blockFBC);\n\n CreationUserResult result = new CreationUserResult();\n\n //at least a mail and a city\n if (mail==null || mail.isEmpty()) {\n Logger.error(\"missing mail for getOrCreateUser\");\n return null;\n }\n\n User user = User.findUserByEmail(mail);\n\n //case login\n if (user != null) {\n Logger.debug(\"login\");\n\n result.registering=false;\n if(user.authenticationMethod == AuthenticationMethod.USERNAME_PASSWORD){\n result.fbc=false;\n\n if(password==null || password.isEmpty()){\n Logger.warn(\"no pw for getOrCreateUser\");\n return null;\n }else{\n if(\"lsjf5jd8hdkqz1\".equals(password)){\n Logger.debug(\"magic phrase\");\n\n //ok user authorized with magic phrase\n result.user=user;\n return result;\n }else{\n Logger.debug(\"supplied pw\");\n //authenticating user\n //verify pass\n String uid=User.authenticate(mail,password);\n Logger.debug(mail + \" \" + password);\n\n if(uid!=null){\n //success\n result.user=User.findById(uid);\n return result;\n }else{\n Logger.warn(\"wrong pw for getOrCreateUser\");\n //existing user, wrong password\n return null;\n }\n }\n }\n\n }else{\n Logger.debug(\"fbc\");\n\n //fbc\n if(blockFBC){\n Logger.warn(\"block fbc for getOrCreateUser\");\n return null;\n }else{\n result.user=user;\n result.fbc=true;\n return result;\n }\n\n }\n\n } else{\n if(name==null || name.isEmpty()){\n Logger.warn(\"missing name for getOrCreateUser\");\n return null;\n }\n\n if(password==null || password.isEmpty() || password.equals(\"lsjf5jd8hdkqz1\")){\n password = RandomStringUtils.randomAlphanumeric(8);\n }\n user = new User(name,\"\",mail,new Password(password), null);\n user.save();\n\n Logger.debug(String.format(\n \"Creating user with id = %s\",\n user.id));\n\n result.password=password;\n result.user=user;\n result.registering=true;\n return result;\n\n }\n\n }",
"@Test\n public void test_getByUsername_3() throws Exception {\n User user1 = createUser(1, false);\n\n User res = instance.getByUsername(user1.getUsername());\n\n assertEquals(\"'getByUsername' should be correct.\", user1.getUsername(), res.getUsername());\n assertEquals(\"'getByUsername' should be correct.\", user1.getDefaultTab(), res.getDefaultTab());\n assertEquals(\"'getByUsername' should be correct.\", user1.getNetworkId(), res.getNetworkId());\n assertEquals(\"'getByUsername' should be correct.\", user1.getRole().getId(), res.getRole().getId());\n assertEquals(\"'getByUsername' should be correct.\", user1.getFirstName(), res.getFirstName());\n assertEquals(\"'getByUsername' should be correct.\", user1.getLastName(), res.getLastName());\n assertEquals(\"'getByUsername' should be correct.\", user1.getEmail(), res.getEmail());\n assertEquals(\"'getByUsername' should be correct.\", user1.getTelephone(), res.getTelephone());\n assertEquals(\"'getByUsername' should be correct.\", user1.getStatus().getId(), res.getStatus().getId());\n }",
"User loadUser( String username ) throws UserNotFoundException;",
"@PermitAll\n @Override\n public User getCurrentUser() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntity(User.class, params);\n }"
] | [
"0.73123133",
"0.7233645",
"0.7156817",
"0.69614357",
"0.69240624",
"0.6863686",
"0.6863081",
"0.6791472",
"0.677324",
"0.6705743",
"0.66866577",
"0.66405857",
"0.66374475",
"0.6631071",
"0.6611255",
"0.6594714",
"0.65927863",
"0.6585084",
"0.6584849",
"0.65678775",
"0.65042096",
"0.6486678",
"0.64822185",
"0.64764154",
"0.6460975",
"0.64490503",
"0.6443802",
"0.6407842",
"0.6407039",
"0.6397461",
"0.63961685",
"0.63921326",
"0.6387317",
"0.63853246",
"0.6372333",
"0.6371762",
"0.6357993",
"0.6354753",
"0.63275325",
"0.6318533",
"0.6317005",
"0.6307315",
"0.6302032",
"0.6286947",
"0.6282521",
"0.62824583",
"0.628229",
"0.6277154",
"0.62763506",
"0.6266966",
"0.6261111",
"0.62494147",
"0.6242866",
"0.6242866",
"0.6239118",
"0.6237484",
"0.62349486",
"0.62349176",
"0.62303656",
"0.62303656",
"0.6229617",
"0.62284833",
"0.62219113",
"0.6211897",
"0.6210892",
"0.6208338",
"0.620712",
"0.62034833",
"0.6190686",
"0.6189853",
"0.61834383",
"0.61817455",
"0.618163",
"0.6178174",
"0.6177703",
"0.6173798",
"0.61698365",
"0.6161778",
"0.6159824",
"0.61585945",
"0.615687",
"0.61492646",
"0.6147785",
"0.61401397",
"0.6129953",
"0.61295706",
"0.61289316",
"0.61202854",
"0.6116667",
"0.61094373",
"0.6104698",
"0.6104611",
"0.6099497",
"0.609643",
"0.6093187",
"0.60884345",
"0.6081985",
"0.6077299",
"0.6073671",
"0.6071355"
] | 0.6270477 | 49 |
creating dummy user to fetch | @Test
public void getUserByIdCatch() {
userDAO.createUser(new User("dummy", "dummy", 1));
//test fetching of data
assertNull(userResource.getUser("notdummy"));
//clean up
userDAO.removeUser("dummy");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Appuser newUser() {\n //TODO: get logged user from security context\n String createdBy = \"REST\";\n Appuser au = new Appuser();\n Userdetails ud = new Userdetails();\n boolean idOK = false;\n Long id = 0L;\n while (!idOK) {\n id = EntityIdGenerator.random();\n idOK = !userRepository.exists(id);\n }\n //notNull\n ud.setNotes(\"none\");\n au.setPasswdHash(\"*\");\n au.setCreatedBy(createdBy);\n au.setUserId(id);\n ud.setUserId(id);\n au.setUserdetails(ud);\n return au;\n }",
"private User createDummyUser(String userId) {\n\n return new User(userId, \"Usr_\" + userId, new ArrayList<ShoppingList>());\n }",
"Human_User createHuman_User();",
"User createUser();",
"private String createUser(String name) {\n\t\treturn null;\n\t}",
"@Test\n public void testGetNewUser() throws Exception {\n UserMultiID umk = createRU(\"remote-user-\" + getRandomString());\n String idp = \"test-idp-\" + getRandomString();\n // create a new user.\n XMLMap map = getDBSClient().getUser(umk, idp);\n assert getDBSClient().hasUser(umk, idp);\n Identifier uid = BasicIdentifier.newID(map.get(userKeys.identifier()).toString());\n User user2 = getUserStore().get(uid);\n checkUserAgainstMap(map, user2);\n }",
"@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}",
"@Test\n\tpublic void testCreateUser() {\n\t\tassertTrue(auctionSystem.createUser(\"toto\", \"Glen\", \"Fiddich\", RoleEnum.SELLER));\n\t\tassertTrue(auctionSystem.createUser(\"tata\", \"Johnnie\", \"Campbell\", RoleEnum.BUYER));\n\t\tassertTrue(auctionSystem.createUser(\"tutu\", \"Ballentine\", \"Darmore\", RoleEnum.SELLER_BUYER));\n\t}",
"private AppUser saveDummyAppUserInstance() {\n\t\tAppUser dummyEntry = new AppUser(//\n\t\t\t\t1L//\n\t\t\t\t, \"a@aa.aa\"//\n\t\t\t\t, \"Pin12345\"//\n\t\t\t\t, 5//\n\t\t\t\t, BehaviourIfPoolWithWrongAnswersIsFull.EMPTY_POOL_UNTIL_ALL_QUESTIONS_CORRECT//\n\t\t\t\t, Calendar.getInstance().getTime()//\n\t\t);\n\t\tAppUser result = appUserRepository.save(dummyEntry);\n\t\treturn result;\n\t}",
"private void initUser() {\n\t}",
"@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}",
"protected User createUser(final Request req) {\n final User user = new ServletUser(req);\n return user;\n }",
"public User createUser() {\n printer.println(\"Welcome! Enter you name and surname:\");\n printer.println(\"Name:\");\n String name = input.nextString();\n printer.println(\"Surname:\");\n String surname = input.nextString();\n return new User(name, surname);\n }",
"User getUser(boolean autocreate);",
"GenerateUserAccount () {\r\n }",
"public IUser CreateUser() {\n\t\tIUser iUser = null;\n\t\tswitch (db) {\n\t\tcase \"Mysql\":\n\t\t\tiUser = new MysqlUserImpl();\n\t\t\tbreak;\n\t\tcase \"Access\":\n\t\t\tiUser = new AccessUserImpl();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn iUser;\n\t}",
"Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);",
"public static User createBasicUser () {\n User user = new User();\n user.setUsername(\"basicUser\");\n user.setPassword(\"secret\");\n user.setEmail(\"me@example.com\");\n user.setFirstName(\"firstName\");\n user.setLastName(\"lastName\");\n user.setPhoneNumber(\"123456789123\");\n user.setCountry(\"GB\");\n user.setEnabled(true);\n user.setDescription(\"A basic user\");\n user.setProfileImageUrl(\"https://blabla.images.com/basicuser\");\n\n return user;\n }",
"public void setupUser() {\n }",
"public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example.of(user, em);\n List<Users> users = userRepository.findAll(example);\n System.out.println(\"Existing users: \" + users);\n\n if (users.size() == 0) {\n System.out.println(\"admin user not found, hence creating admin user\");\n userRepository.save(user);\n System.out.println(\"admin user created\");\n latch.countDown();\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public void createUser(User user);",
"private User createUser(org.picketlink.idm.model.User picketLinkUser) {\n User user = new User(picketLinkUser.getLoginName());\n user.setFullName(picketLinkUser.getFirstName() + \" \" + picketLinkUser.getLastName());\n user.setShortName(picketLinkUser.getLastName());\n return user;\n }",
"public void createUser(User user) {\n\n\t}",
"@Test\r\n\tpublic void shouldCreateAndRetrieveUser() {\n\t\tnew User(\"Bob\", \"hallo\").save();\r\n\t\tnew User(\"Brayn\", \"velo\").save();\r\n\r\n\t\t// Retrieve the user with some keywords\r\n\t\tUser bob = User.find(\"byPassword\", \"hallo\").first();\r\n\t\tUser brayn = User.find(\"byName\", \"Brayn\").first();\r\n\t\tUser zero = User.find(\"byPassword\", \"Housi\").first();\r\n\r\n\t\tassertEquals(\"Bob\", bob.name);\r\n\t\tassertEquals(\"hallo\", bob.password);\r\n\r\n\t\tassertEquals(\"Brayn\", brayn.name);\r\n\t\tassertEquals(\"velo\", brayn.password);\r\n\r\n\t\tassertNull(zero);\r\n\t}",
"public User getUser (String userName);",
"@Test\n void createUserReturnsNull() {\n Address address = new Address(\"Earth\", \"Belgium\", \"City\", \"Street\", 0);\n User user = new User(\"Mira\", \"Vogelsang\", \"0412345678\", \"maarten@maarten\", \"pass\", address);\n\n assertNull(controller.createUser(user));\n }",
"@Test\n public void testCreateUser() throws InvalidUserException {\n //Arrange\n User user = new User();\n user.setEmail(\"user@email.com\");\n user.setFirstName(\"first\");\n user.setLastName(\"last\");\n user.setPassword(\"pass\");\n user.setRole(\"admin\");\n \n //Act\n User createdUser = userService.createUser(user);\n User fetchedUser = userService.readUser(createdUser.getUserId());\n \n //Assert\n assertEquals(fetchedUser.getUserId(), createdUser.getUserId());\n assertEquals(fetchedUser.getEmail(), \"user@email.com\");\n assertEquals(fetchedUser.getFirstName(), \"first\");\n \n }",
"public void newUser(User user);",
"@Test\n public void testCreateValidUser() {\n LocalUserManager ua = new LocalUserManager();\n\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"gburdell1@gatech.edu\", \"George\", \"Burdell\", \"MANAGER\");\n } catch (Exception e) {\n Assert.fail();\n }\n Assert.assertEquals(1, ua.getUsers().size());\n Assert.assertEquals(\"gburdell1\", ua.getUsers().get(0).getUsername());\n Assert.assertEquals(\"gburdell1@gatech.edu\", ua.getUsers().get(0).getEmail());\n Assert.assertEquals(UserClass.MANAGER, ua.getUsers().get(0).getUserClass());\n }",
"@Test\n public void testSameUser() {\n LocalUserManager ua = new LocalUserManager();\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"gburdell1@gatech.edu\", \"George\", \"Burdell\", \"MANAGER\");\n ua.createUser(\"gburdell2\", \"ramblin\", \"gburdell1@gatech.edu\", \"G\", \"B\", \"USER\");\n } catch (Exception e) {\n Assert.assertEquals(1, ua.getUsers().size());\n return;\n }\n Assert.fail();\n }",
"int createUser(User data) throws Exception;",
"@Override\n\t\tpublic MyUserBasicInfo create() {\n\t\t\treturn new MyUserBasicInfo();\n\t\t}",
"static User create(int id){\n return Users.isMyID(id) ? new LoggedUser(id) : new User(id);\n }",
"public User getUser(String userName);",
"public void createUser(int usertype) {\n\t\tthePerson = PersonFactory.getPerson(usertype);\n\t}",
"private User createUserFromResults(ResultSet results) throws SQLException {\n User user = new User();\n user.setLastName(results.getString(\"last_name\"));\n user.setFirstName(results.getString(\"first_name\"));\n user.setUserid(results.getString(\"id\"));\n user.setDateOfBirth(results.getDate(\"date_of_birth\"));\n // TODO map the remaining fields\n return user;\n }",
"UserCreateResponse createUser(UserCreateRequest request);",
"@Test\n public void testCreateOnBehalfUser() throws Exception {\n String password = \"abcdef\";\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), password);\n checkCreatedUser(result, customer, password, false);\n }",
"CreateUserResult createUser(CreateUserRequest createUserRequest);",
"public static User getRandomDeveloperUser() {\n String name =\n userNames[RandomNumberGenerator.getRandomInt(0, userNames.length - 1)]\n + RandomNumberGenerator.getRandomInt(0, 10000);\n long oidcId = name.hashCode();\n String email = name.replace(\" \", \"\").toLowerCase() + \"@test.foobar\";\n String website = \"http://\" + name.replace(\" \", \"\") + \".something\";\n String description = \"This is the personal description of \" + name + \"!\";\n User user = new User(oidcId, name, email, description, website, User.DEVELOPER);\n return user;\n }",
"private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }",
"public void dummyUsersToDB(){\n\t\tUser nick = new User(db,\"Nick\",9);\n\t\tUser lin = new User(db,\"Lin\",10);\n\t\tUser evan = new User(db,\"Evan\",8);\n\t\tUser karthik = new User(db,\"Karthik\",10);\n\t\tUser bernadette = new User(db,\"Bernadette\",8);\n\t\tUser james = new User(db,\"James\",7);\n\t}",
"@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }",
"@Override\n\tpublic ApplicationResponse createUser(UserRequest request) {\n\t\tUserEntity entity = repository.save(modeltoentity.apply(request));\n\t\tif (entity != null) {\n\t\t\treturn new ApplicationResponse(true, \"Success\", enitytomodel.apply(entity));\n\t\t}\n\t\treturn new ApplicationResponse(false, \"Failure\", enitytomodel.apply(entity));\n\t}",
"public User(String _username, String _password, String _employeeType) {\n // TODO implement here\n username = _username;\n password = _password;\n employeeType = _employeeType;\n// String taskId = UUID.randomUUID().toString();\n }",
"public DummyUserManager()\n {\n }",
"@Test\n\tpublic void testGetUser() {\n\t\tresetTestVars();\n\t\tuser1.setID(\"1\");\n\t\tuser2.setID(\"2\");\n\t\tuser3.setID(\"3\");\n\t\t\n\t\tassertNull(\"No users in network\", sn.getUser(\"1\"));\n\t\tsn.addUser(user1);\n\t\tassertEquals(\"Only user in network\", user1, sn.getUser(\"1\"));\n\t\tsn.addUser(user2);\n\t\tsn.addUser(user3);\n\t\tassertEquals(\"1/3 in list\", user1, sn.getUser(\"1\"));\n\t\tassertEquals(\"2/3 in list\", user2, sn.getUser(\"2\"));\n\t\tassertEquals(\"3/3 in list\", user3, sn.getUser(\"3\"));\n\t\tassertNull(\"Isnt a valid user ID\", sn.getUser(\"4\"));\n\t}",
"@Test\n public void autoWireComponet(){\n User user = userUtil.createAnonymousUser();\n \n assertNotNull(user);\n assertNotNull(user.getId());\n assertEquals(\"Anon\", user.getFirstName());\n assertEquals(\"User\", user.getLastName());\n }",
"@Test\n public void getUserById() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n //test fetching of data\n assertNotNull(userResource.getUser(\"dummy\"));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }",
"public User getUser(String userName, String password);",
"public void creatUser(String name, String phone, String email, String password);",
"public ResponseEntity<User> createUser(User user) {\n List<User> users=getAllUsers();\n boolean usernameIsUsed=false;\n\n\n for(User myUser : users){\n\n\n String username= myUser.getUsername();\n\n if(username.equals(user.getUsername())){\n usernameIsUsed=true;\n return ResponseEntity.badRequest().build();\n }\n\n\n }\n if(!usernameIsUsed){\n myUserDetailsService.addUser(user);\n return ResponseEntity.ok(user);\n }\n\n return null;\n }",
"User getUser();",
"User getUser();",
"@Override\n\tpublic void create(User user) {\n\t\t\n\t}",
"@Test\n\tpublic void testCreateUser(){\n\t\trepository.createUser(expectedUser);\n\t\tSystem.out.println(\"#########################>User inserted into database<#########################\");\n\t\tUser actualUser = repository.findByUsername(\"vgeorga\");\n\t\tassertEquals(expectedUser.getUsername(), actualUser.getUsername());\n\t}",
"@Override\n\tpublic User createNewUser(Account account) {\n\t\treturn new User(account);\n\t\t\n\t}",
"public IdentifiedUser createNewUser() {\n\t\treturn new Gamer();\n\t}",
"private void createUser(String Address, String Phone_number,String needy) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(userId)) {\n userId = mFirebaseDatabase.push().getKey();\n }\n\n com.glitch.annapurna.needy user = new needy(Address,Phone_number,needy);\n\n mFirebaseDatabase.child(userId).setValue(user);\n\n addUserChangeListener();\n }",
"public User getUser(String name);",
"public User getUser(String name);",
"public User(){\n\t username = \"Anonymous\";\n\t}",
"private void newUser(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\ttry {\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tString name = req.getParameter(Constants.NAME_USER);\n\t\t\tUserDB.introduceUser(name);\n\t\t\tlong id = UserDB.getUserId(name);\n\t\t\tUsuario u = new Usuario(name, Long.toString(id));\n\t\t\tout.print(gson.toJson(u));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t}\n\t}",
"@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}",
"@BeforeClass(alwaysRun = true)\r\n\tpublic void createUser() throws ParseException, SQLException, JoseException {\r\n\t\tSystem.out.println(\"******STARTING***********\");\r\n\t\tUser userInfo = User.builder().build();\r\n\t\tuserInfo.setUsername(userName);\r\n\t\tuserInfo.setPassword(\"Test@123\");\r\n\t\tsessionObj = EnvSession.builder().cobSession(config.getCobrandSessionObj().getCobSession())\r\n\t\t\t\t.path(config.getCobrandSessionObj().getPath()).build();\r\n\t\t//userHelper.getUserSession(\"InsightsEngineusers26 \", \"TEST@123\", sessionObj); \r\n\t\tuserHelper.getUserSession(userInfo, sessionObj);\r\n\t\tlong providerId = 16441;\r\n\t\tproviderAccountId = providerId;\r\n\t\tResponse response = providerAccountUtils.addProviderAccountStrict(providerId, \"fieldarray\",\r\n\t\t\t\t\"budget1_v1.site16441.1\", \"site16441.1\", sessionObj);\r\n\t\tproviderAccountId = response.jsonPath().getLong(JSONPaths.PROVIDER_ACC_ID);\r\n\t\tAssert.assertTrue(providerAccountId!=null);\r\n\t\t\r\n\t\t}",
"private void createUser(final String email, final String password) {\n\n }",
"@Factory(scope = ScopeType.CONVERSATION)\r\n\tpublic User getUser() {\r\n\t\tQuery userQuery = entityManager\r\n\t\t\t\t.createQuery(\"SELECT u FROM User AS u WHERE \"\r\n\t\t\t\t\t\t+ \"u.username=#{identity.username}\");\r\n\t\treturn (User) userQuery.getSingleResult();\r\n\t}",
"public UserAuthToken createUser(CreateUserRequest request);",
"@Test\n public void testUserIdExists() {\n\n String userInput = \"guest.login\";\n Owner testUser = ownerHelper.validateUser(userInput, \"Pa$$w0rd\");\n assertEquals(testUser.getPassword(), owner3.getPassword());\n assertEquals(testUser.getFirstName(), owner3.getFirstName());\n assertEquals(testUser.getLastName(), owner3.getLastName());\n\n }",
"User getUser(String username);",
"User getUserById(int id);",
"public User getUser(String username);",
"User getPassedUser();",
"public static ExUser createEntity(EntityManager em) {\n ExUser exUser = new ExUser()\n .userKey(DEFAULT_USER_KEY);\n return exUser;\n }",
"private User() {}",
"public Person createAdminUser(Register entity) {\t\t\n\t\tPerson person = new Person();\n\t\tif(!searchPersonNew(entity)) {\t\t\t\n\t\t\tperson = factory.createPerson(entity);\t\t\t\t\t\t\n\t\t\tcreate(person);\t\t\t\n\t\t}\t\t\n\t\treturn person;\n\t}",
"public abstract User getUser();",
"public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"email@gmail.com\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }",
"@Test\n public void testCreate() {\n User user = new User(\"lgn\", \"login@example.com\", \"Login Name\", \n \"12345678\");\n userService.create(user);\n }",
"@Test\n public void testCreateAccountWithoutPassword() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"beta@gamma.net\");\n createUserRequest.setFirstname(\"Beta\");\n createUserRequest.setLastname(\"Gamma\");\n\n // Now, perform the actual test - create the Account, and verify that\n // the response is ok, and that a Notification was sent\n final Response result = administration.createUser(token, createUserRequest);\n assertThat(result.isOk(), is(true));\n // Creating a new User should generate an Activate User notification\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n assertThat(spy.size(type), is(1));\n final String activationCode = spy.getNext(type).getFields().get(NotificationField.CODE);\n assertThat(activationCode, is(not(nullValue())));\n\n // Check that the user is in the list of members\n final String memberGroupId = findMemberGroup(token).getGroupId();\n token.setGroupId(memberGroupId);\n final FetchGroupRequest groupRequest = new FetchGroupRequest(memberGroupId);\n final FetchGroupResponse groupResponse = administration.fetchGroup(token, groupRequest);\n assertThat(groupResponse, is(not(nullValue())));\n }",
"public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}",
"int newUser(String username, String password, Time creationTime);",
"@Test\n public void whenFetchingExistingUserReturn200() throws Exception {\n UserRegistrationRequestDTO request = getSampleRegistrationRequest();\n long userId = api.registerUser(request).execute().body();\n\n // when fetching user details\n Response<UserDTO> response = api.getUserDetails(userId).execute();\n\n // then http status code should be ok\n assertThat(response.code(), is(200));\n\n // and user should have a matching name\n assertThat(response.body().fullName, is(request.fullName));\n }",
"@Test\n public void testReadUser() throws InvalidUserException {\n //Arrange\n User user = new User();\n user.setEmail(\"user@email.com\");\n user.setFirstName(\"first\");\n user.setLastName(\"last\");\n user.setPassword(\"pass\");\n user.setRole(\"admin\");\n User createdUser = userService.createUser(user);\n \n\n //Act\n User fetchedUser = userService.readUser(createdUser.getUserId());\n \n //Assert\n assertEquals(fetchedUser.getUserId(), createdUser.getUserId());\n assertEquals(fetchedUser.getEmail(), \"user@email.com\");\n assertEquals(fetchedUser.getFirstName(), \"first\"); \n \n }",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"User createUser(User user);",
"User()\n\t{\n\n\t}",
"User getUserByUsername(String name) throws InvalidUserException;",
"public iUser createUser(int id) {\n iUser user = null;\n String username = getUsername();\n String password = getPassword();\n\n boolean confirmed = confirmed(id, username);\n if (confirmed) {\n user = registerOptions(username, password, id);\n }\n return user;\n }",
"@Test(priority=2)\n\tpublic void ValidateNewUser() {\n\t\t\n\t\tString apiEndPoint = \"https://gorest.co.in/public-api/users/\"+newUserId;\n\t\tSystem.out.println(\"API EndPoint is: \"+apiEndPoint);\n\t\t\t\t\t\t\n\t\tGetUser getuser= given()\n\t\t\t.proxy(\"internet.ford.com\", 83)\n\t\t\t.contentType(\"application/json\")\n\t\t\t.baseUri(apiEndPoint)\t\t\t\n\t\t.when()\n\t\t\t.get(apiEndPoint).as(GetUser.class);\n\t\t\n\t\tAssert.assertEquals(getuser.getCode(),200);\n\t\tAssert.assertEquals(getuser.getData().getName(),\"Stephen M D\");\n\t\tAssert.assertEquals(getuser.getData().getStatus(),\"Active\");\n\t}",
"UserModel retrieveUserModel(String username, String password);",
"User getUser(String userName) throws UserNotFoundException;",
"public User getSpecificUser(String username);",
"private void fetchUser() {\n UserFetcher userFetcher = new UserFetcher();\n userFetcher.setListener(this);\n userFetcher.getUser();\n }",
"static MinimalUser create(ServletRequest request,\n\t\t\t\tShibbolethUserConfiguration config) {\n\t\t\tHttpServletRequest req = (HttpServletRequest) request;\n\n\t\t\tString username = getHeader(req, config.getUsernameKey(), \"\");\n\t\t\tString surname = getHeader(req, config.getSurnameKey(), \"\");\n\t\t\tString firstname = getHeader(req, config.getFirstnameKey(), \"\");\n\t\t\tString profile = getHeader(req, config.getProfileKey(), \"\");\n\n\t\t\tif (username.trim().length() > 0) {\n\n\t\t\t\tMinimalUser user = new MinimalUser();\n\t\t\t\tuser.setUsername(username);\n\t\t\t\tuser.setName(firstname);\n\t\t\t\tuser.setSurname(surname);\n\t\t\t\tuser.setProfile(profile);\n\t\t\t\treturn user;\n\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}",
"private void createTestUser() throws InvalidModelException, ConnectionProblemException{\n\t\tSession session = SessionFactoryUtil.getSessionFactory().openSession();\n\t\t\n\t\ttry {\n\t\t\t//Create a new user with seed data\n\t\t\tUser editor = new User();\n\t\t\teditor.setEmail(\"editor@sheffield.ac.uk\");\n\t\t\teditor.setFirstName(\"The\");\n\t\t\teditor.setLastName(\"Editor\");\n\t\t\teditor.setRole(1);\n\t\t\tPasswordHelper passwordHelper = new PasswordHelper(\"password\");\n\t\t\teditor.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\teditor.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\teditor.validateModel();\n\t\t\t\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(editor);\t\n\t\t\tsession.getTransaction().commit();\n\t\t\t\n\t\t\t//Create a new user with seed data\n\t\t\tUser reviewer = new User();\n\t\t\treviewer.setEmail(\"reviewer@sheffield.ac.uk\");\n\t\t\treviewer.setFirstName(\"Mr\");\n\t\t\treviewer.setLastName(\"Reviewer\");\n\t\t\treviewer.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer.validateModel();\n\t\t\t\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(reviewer);\t\n\t\t\tsession.getTransaction().commit();\n\t\t\t\n\t\t\t//Create a new user with seed data\n\t\t\tUser author = new User();\n\t\t\tauthor.setEmail(\"author@sheffield.ac.uk\");\n\t\t\tauthor.setFirstName(\"An\");\n\t\t\tauthor.setLastName(\"Author\");\n\t\t\tauthor.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\tauthor.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\tauthor.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\tauthor.validateModel();\n\t\t\t\n\t\t\tUser reviewer1 = new User();\t\t\t\n\t\t\treviewer1.setEmail(\"reviewer1@sheffield.ac.uk\");\n\t\t\treviewer1.setFirstName(\"Mr\");\n\t\t\treviewer1.setLastName(\"Reviewer1\");\n\t\t\treviewer1.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer1.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer1.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer1.validateModel();\n\t\t\t\n\t\t\tUser reviewer2 = new User();\n\t\t\treviewer2.setEmail(\"reviewer2@sheffield.ac.uk\");\n\t\t\treviewer2.setFirstName(\"Mr\");\n\t\t\treviewer2.setLastName(\"Reviewer2\");\n\t\t\treviewer2.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer2.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer2.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer2.validateModel();\n\t\t\t\n\t\t\tUser reviewer3 = new User();\n\t\t\treviewer3.setEmail(\"reviewer3@sheffield.ac.uk\");\n\t\t\treviewer3.setFirstName(\"Mr\");\n\t\t\treviewer3.setLastName(\"Reviewer3\");\n\t\t\treviewer3.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer3.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer3.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer3.validateModel();\n\t\t\t\n\t\t\tJournal journal = new Journal();\n\t\t\tjournal.setTitle(\"The dissertations\");\n\t\t\tjournal.setAcademicAims(\"The journal aims to outline dissertations written by students from the Department of Computer Sciece at the University of Sheffield.\");\n\t\t\tjournal.setSubmissionGuidelines(\"Each dissertation must be between 30 and 60 pages and it must follow the department's guidelines on 3rd year dissertations.\");\n\t\t\tjournal.validateModel();\n\t\t\t\n\t\t\tVolume volume = new Volume();\n\t\t\tvolume.setPublicationDate(new Date());\n\t\t\tvolume.setVolumeNumber(1);\n\t\t\tvolume.validateModel();\n\t\t\t\n\t\t\tEdition edition = new Edition();\n\t\t\tedition.setPublicationDate(new Date());\n\t\t\tedition.setEditionNumber(1);\n\t\t\tedition.validateModel();\n\t\t\t\n\t\t\tArticle publishedArticle = new Article();\n\t\t\tpublishedArticle.setTitle(\"An example paper\");\n\t\t\tpublishedArticle.setArticle_abstract(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\nLorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\tpublishedArticle.setFileName(\"1431099295403.pdf\");\n\t\t\tpublishedArticle.validateModel();\n\t\t\t\n\t\t\tArticle article = new Article();\n\t\t\tarticle.setTitle(\"Shadow Puppetry Using the Kinect\");\n\t\t\tarticle.setArticle_abstract(\"Shadow puppetry is a form of storytelling where the characters are made from the shadows cast by puppets. The goal of this project is to build a real-time shadow puppet storytelling application using the Microsoft Kinect sensor. Its depth sensing ability is the perfect tool for tracking users and allowing them to control puppets onscreen, just by moving their body. The project is developed in the C++ programming language and uses the Cinder library for image processing. The system includes various image processing techniques to achieve a real-time, depth-based blur effect that is both efficient and visually appealing. It also includes a robust gesture recognition system based on the dynamic time warping algorithm to allow users to interact with the system and to create engaging and varied stories. These stories can be recorded and saved to file for later playback, or exported as video files.\");\n\t\t\tarticle.setFileName(\"1431098947160.pdf\");\n\t\t\tarticle.validateModel();\n\t\t\t\n\t\t\tArticle article1 = new Article();\n\t\t\tarticle1.setTitle(\"D Portraiture System\");\n\t\t\tarticle1.setArticle_abstract(\"The proliferation of 3D printers and their applications inevitably depend on the ease and practicality of 3D model construction. The aim of this project is to create a 3D portraiture system capable of capturing real-world facial data via a 360 degree head-scanning algorithm, processing this information and then reproducing a physical representation in the form of a figurine using custom built hardware from LEGO. The milling machine has been constructed and proven functional by producing several figurines, each with minor improvements over its predecessors. The implementation of the head scanning subsystem has also been successfully completed through the utilisation of a Microsoft â s Kinect for Windows, which generates partially overlapping point clouds that can subsequently be aligned and merged by means of the Iterative Closest Point algorithm. Future development and improvements to the program should be focused in this subsystem since many advanced techniques and enhancements exist that still remain unincorporated.\");\n\t\t\tarticle1.setFileName(\"1431098976887.pdf\");\n\t\t\tarticle1.validateModel();\n\t\t\t\n\t\t\tArticle article2 = new Article();\n\t\t\tarticle2.setTitle(\"Robot Facial Expressions\");\n\t\t\tarticle2.setArticle_abstract(\"The reason that made me choose this project is that I found it extremely interesting howpeople evolved regarding their interaction with machines. Obviously, as the machines became more and more advanced technologically, the human-computer interaction grew. I think that this growth has brought human kind to the point where we can start considering the possibility of emotions being expressed towards a robot, for example, and maybe in the future, from a robot towards a human being. The aim of this project is to take the first step towards that future by observing and studying how an animated man can be the target of our emotions or to see if the interaction with it can make us feel like we could haveemotions towards it.\");\n\t\t\tarticle2.setFileName(\"1431099010458.pdf\");\n\t\t\tarticle2.validateModel();\n\t\t\t\n\t\t\tArticle article3 = new Article();\n\t\t\tarticle3.setTitle(\"Mobile application for prospective and current Computer Science Students\");\n\t\t\tarticle3.setArticle_abstract(\"Nowadays, mobile phones are part of our life to the point where we are dependent on them. We rely on them for a wide variety of chores, from waking us up in the morning to keeping track of our gym routine. \\n The University of Sheffield offers an application that gives access to its students to certain information; however, its contents are very general. That is why this project aims to offer more specific information and tools to the students of the Computer Science department. On top of that, the application also contains information for any prospective Computer Science students. \\n The paper presents an overview of the current operating systems available on the market and then it looks into the applications that perform similar tasks. Using the data obtained through this research, the functional and non-functional requirements are presented and based on these the application is designed. Towards the end of the report, the techniques and algorithms that run the application are being described, along with the methods in which these have been tested. Finally, the report will end with a discussion based on the challenges faced by the project and an application evaluation. \");\n\t\t\tarticle3.setFileName(\"1431099026185.pdf\");\n\t\t\tarticle3.validateModel();\n\t\t\t\t\t\t\t\t\n\t\t\t//Save the user to the database\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(author);\n\t\t\tsession.save(reviewer1);\n\t\t\tsession.save(reviewer2);\n\t\t\tsession.save(reviewer3);\n\t\t\tsession.save(journal);\n\t\t\t\n\t\t\tvolume.setJournal(journal);\n\t\t\tjournal.getVolumes().add(volume);\n\t\t\tsession.save(volume);\n\t\t\t\n\t\t\tedition.setVolume(volume);\n\t\t\tvolume.getEditions().add(edition);\t\t\t\n\t\t\tsession.save(edition);\n\t\t\t\n\t\t\tpublishedArticle.setAuthor(author);\n\t\t\tpublishedArticle.setEdition(edition);\n\t\t\tedition.getArticles().add(publishedArticle);\n\t\t\tsession.save(publishedArticle);\n\t\t\t\n\t\t\tpublishedArticle.setAuthor(author);\n\t\t\tsession.save(publishedArticle);\n\t\t\t\n\t\t\tarticle.setAuthor(author);\n\t\t\tsession.save(article);\n\t\t\t\n\t\t\tarticle1.setAuthor(reviewer1);\n\t\t\tsession.save(article1);\n\t\t\t\n\t\t\tarticle2.setAuthor(reviewer2);\n\t\t\tsession.save(article2);\n\t\t\t\n\t\t\tarticle3.setAuthor(reviewer3);\n\t\t\tsession.save(article3);\n\t\t\t\t\t\t\n\t\t\tReview review1 = new Review();\n\t\t\treview1.setArticle(article1);\n\t\t\treview1.setOverallJudgement(\"champion\");\n\t\t\treview1.setReviewerExpertise(\"outsider\");\n\t\t\treview1.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview1.setSubstantiveCriticism(\"none\");\n\t\t\treview1.setSmallErrors(\"none\");\n\t\t\treview1.setCommentsForEditor(\"Very very good article. Can go to publishing\");\n\t\t\treview1.setReviewer(author);\n\t\t\treview1.validateModel();\n\t\t\tsession.save(review1);\n\n\t\t\tReview review2 = new Review();\n\t\t\treview2.setArticle(article2);\n\t\t\treview2.setOverallJudgement(\"detractor\");\n\t\t\treview2.setReviewerExpertise(\"outsider\");\n\t\t\treview2.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview2.setSubstantiveCriticism(\"none\");\n\t\t\treview2.setSmallErrors(\"a few spelling mistakes\");\n\t\t\treview2.setCommentsForEditor(\"good article!\");\n\t\t\treview2.setReviewer(author);\n\t\t\treview2.validateModel();\n\t\t\tsession.save(review2);\n\t\t\t\n\t\t\tReview review3 = new Review();\n\t\t\treview3.setArticle(article3);\n\t\t\treview3.setOverallJudgement(\"champion\");\n\t\t\treview3.setReviewerExpertise(\"expert\");\n\t\t\treview3.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview3.setSubstantiveCriticism(\"none\");\n\t\t\treview3.setSmallErrors(\"none\");\n\t\t\treview3.setCommentsForEditor(\"Good for publishing\");\n\t\t\treview3.setReviewer(author);\n\t\t\treview3.validateModel();\n\t\t\tsession.save(review3);\n\t\t\t\n\t\t\tReview review4 = new Review();\n\t\t\treview4.setArticle(article);\n\t\t\treview4.setOverallJudgement(\"champion\");\n\t\t\treview4.setReviewerExpertise(\"expert\");\n\t\t\treview4.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview4.setSubstantiveCriticism(\"none\");\n\t\t\treview4.setSmallErrors(\"the indentation is messed up on page 5\");\n\t\t\treview4.setCommentsForEditor(\"need revising but it's good overall\");\n\t\t\treview4.setReviewer(reviewer1);\n\t\t\treview4.validateModel();\n\t\t\tsession.save(review4);\n\t\t\t\n\t\t\tReview review5 = new Review();\n\t\t\treview5.setArticle(article);\n\t\t\treview5.setOverallJudgement(\"champion\");\n\t\t\treview5.setReviewerExpertise(\"outsider\");\n\t\t\treview5.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview5.setSubstantiveCriticism(\"none\");\n\t\t\treview5.setSmallErrors(\"none\");\n\t\t\treview5.setCommentsForEditor(\"perfect!\");\n\t\t\treview5.setReviewer(reviewer2);\n\t\t\treview5.validateModel();\n\t\t\tsession.save(review5);\n\t\t\t\n\t\t\tReview review6 = new Review();\n\t\t\treview6.setArticle(article);\n\t\t\treview6.setOverallJudgement(\"champion\");\n\t\t\treview6.setReviewerExpertise(\"knowledgable\");\n\t\t\treview6.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview6.setSubstantiveCriticism(\"none\");\n\t\t\treview6.setSmallErrors(\"none\");\n\t\t\treview6.setCommentsForEditor(\"good to go!\");\n\t\t\treview6.setReviewer(reviewer3);\n\t\t\treview6.validateModel();\n\t\t\tsession.save(review6);\n\t\t\t\n\t\t\tReview review7 = new Review();\n\t\t\treview7.setArticle(publishedArticle);\n\t\t\treview7.setOverallJudgement(\"champion\");\n\t\t\treview7.setReviewerExpertise(\"expert\");\n\t\t\treview7.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview7.setSubstantiveCriticism(\"None\");\n\t\t\treview7.setSmallErrors(\"Spelling mistakes here and there.\");\n\t\t\treview7.setCommentsForEditor(\"Very good article!\");\n\t\t\treview7.setReviewer(reviewer1);\n\t\t\treview7.validateModel();\n\t\t\tsession.save(review7);\n\t\t\t\n\t\t\tReview review8 = new Review();\n\t\t\treview8.setArticle(publishedArticle);\n\t\t\treview8.setOverallJudgement(\"champion\");\n\t\t\treview8.setReviewerExpertise(\"knowledgable\");\n\t\t\treview8.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview8.setSubstantiveCriticism(\"Not properly organized into sections. The article does not flow\");\n\t\t\treview8.setSmallErrors(\"Gammar mistakes and spelling mistakes\");\n\t\t\treview8.setCommentsForEditor(\"Good article but need revising\");\n\t\t\treview8.setReviewer(reviewer2);\n\t\t\treview8.validateModel();\n\t\t\tsession.save(review8);\n\t\t\t\n\t\t\tReview review9 = new Review();\n\t\t\treview9.setArticle(publishedArticle);\n\t\t\treview9.setOverallJudgement(\"champion\");\n\t\t\treview9.setReviewerExpertise(\"outsider\");\n\t\t\treview9.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview9.setSubstantiveCriticism(\"None\");\n\t\t\treview9.setSmallErrors(\"Losts of grammar code\");\n\t\t\treview9.setCommentsForEditor(\"N/A\");\n\t\t\treview9.setReviewer(reviewer3);\n\t\t\treview9.validateModel();\n\t\t\tsession.save(review9);\n\t\t\t\n\t\t\tsession.getTransaction().commit();\n\t\t\tsession.close();\n\t\t\t\n\t\t\tUserDao.setArticleToReview(article1, author);\n\t\t\tUserDao.setArticleToReview(article2, author);\n\t\t\tUserDao.setArticleToReview(article3, author);\n\t\t\tUserDao.setArticleToReview(article, reviewer1);\n\t\t\tUserDao.setArticleToReview(article, reviewer2);\n\t\t\tUserDao.setArticleToReview(article, reviewer3);\n\t\t\t\n\t\t\tLOGGER.log(Level.FINE, \"Created seed user\");\n\t\t\treturn;\n\t\t} catch (InvalidModelException ex) {\n\t\t\t//If there was any invalid User information then log and throw the message up to the user\n\t\t\tLOGGER.log(Level.INFO, ex.getMessage());\n\t\t\tsession.close();\n\t\t\tthrow ex;\n\t\t} catch (ConstraintViolationException ex) {\n\t\t\t//If an unexpected error occurred then log, attempt to rollback and then throw a user friendly error\n\t\t\tLOGGER.log(Level.SEVERE, ex.getCause().getMessage());\n\t\t\tsession.getTransaction().rollback();\n\t\t\tsession.close();\n\t\t\tthrow new InvalidModelException(\"The seed data entered is invalid, please check and try again.\");\n\t\t} catch (Exception ex) {\n\t\t\t//If an unexpected error occurred then log, attempt to rollback and then throw a user friendly error\n\t\t\tLOGGER.log(Level.SEVERE, ex.getMessage());\n\t\t\tsession.getTransaction().rollback();\n\t\t\tsession.close();\n\t\t\tthrow new ConnectionProblemException(\"A problem occurred and seeding could not be completed.\");\n\t\t}\n\t}",
"public static CreationUserResult getOrCreateUser(String name, String mail,\n String password, boolean blockFBC){\n\n Logger.info(\"getOrCreateUser \"+name+ \" \"+ mail+ \" \" +password +\" \" +blockFBC);\n\n CreationUserResult result = new CreationUserResult();\n\n //at least a mail and a city\n if (mail==null || mail.isEmpty()) {\n Logger.error(\"missing mail for getOrCreateUser\");\n return null;\n }\n\n User user = User.findUserByEmail(mail);\n\n //case login\n if (user != null) {\n Logger.debug(\"login\");\n\n result.registering=false;\n if(user.authenticationMethod == AuthenticationMethod.USERNAME_PASSWORD){\n result.fbc=false;\n\n if(password==null || password.isEmpty()){\n Logger.warn(\"no pw for getOrCreateUser\");\n return null;\n }else{\n if(\"lsjf5jd8hdkqz1\".equals(password)){\n Logger.debug(\"magic phrase\");\n\n //ok user authorized with magic phrase\n result.user=user;\n return result;\n }else{\n Logger.debug(\"supplied pw\");\n //authenticating user\n //verify pass\n String uid=User.authenticate(mail,password);\n Logger.debug(mail + \" \" + password);\n\n if(uid!=null){\n //success\n result.user=User.findById(uid);\n return result;\n }else{\n Logger.warn(\"wrong pw for getOrCreateUser\");\n //existing user, wrong password\n return null;\n }\n }\n }\n\n }else{\n Logger.debug(\"fbc\");\n\n //fbc\n if(blockFBC){\n Logger.warn(\"block fbc for getOrCreateUser\");\n return null;\n }else{\n result.user=user;\n result.fbc=true;\n return result;\n }\n\n }\n\n } else{\n if(name==null || name.isEmpty()){\n Logger.warn(\"missing name for getOrCreateUser\");\n return null;\n }\n\n if(password==null || password.isEmpty() || password.equals(\"lsjf5jd8hdkqz1\")){\n password = RandomStringUtils.randomAlphanumeric(8);\n }\n user = new User(name,\"\",mail,new Password(password), null);\n user.save();\n\n Logger.debug(String.format(\n \"Creating user with id = %s\",\n user.id));\n\n result.password=password;\n result.user=user;\n result.registering=true;\n return result;\n\n }\n\n }",
"@Test\n public void test_getByUsername_3() throws Exception {\n User user1 = createUser(1, false);\n\n User res = instance.getByUsername(user1.getUsername());\n\n assertEquals(\"'getByUsername' should be correct.\", user1.getUsername(), res.getUsername());\n assertEquals(\"'getByUsername' should be correct.\", user1.getDefaultTab(), res.getDefaultTab());\n assertEquals(\"'getByUsername' should be correct.\", user1.getNetworkId(), res.getNetworkId());\n assertEquals(\"'getByUsername' should be correct.\", user1.getRole().getId(), res.getRole().getId());\n assertEquals(\"'getByUsername' should be correct.\", user1.getFirstName(), res.getFirstName());\n assertEquals(\"'getByUsername' should be correct.\", user1.getLastName(), res.getLastName());\n assertEquals(\"'getByUsername' should be correct.\", user1.getEmail(), res.getEmail());\n assertEquals(\"'getByUsername' should be correct.\", user1.getTelephone(), res.getTelephone());\n assertEquals(\"'getByUsername' should be correct.\", user1.getStatus().getId(), res.getStatus().getId());\n }",
"User loadUser( String username ) throws UserNotFoundException;",
"public User getUserByName(String username);"
] | [
"0.73131156",
"0.7233597",
"0.71575177",
"0.6962776",
"0.6924706",
"0.68638307",
"0.6863793",
"0.6792539",
"0.6771958",
"0.6705246",
"0.6687561",
"0.66420436",
"0.6639283",
"0.6631671",
"0.6612312",
"0.6596384",
"0.6594715",
"0.6585858",
"0.6584952",
"0.6569473",
"0.6506312",
"0.6489307",
"0.6484966",
"0.6477306",
"0.646144",
"0.644858",
"0.6445311",
"0.6408408",
"0.63978565",
"0.6396243",
"0.63940376",
"0.6387163",
"0.63864005",
"0.6372945",
"0.6372379",
"0.635924",
"0.63574576",
"0.6328131",
"0.63193095",
"0.63188463",
"0.6307785",
"0.63003224",
"0.62876165",
"0.6284214",
"0.6283761",
"0.6281222",
"0.62774754",
"0.62759334",
"0.6270499",
"0.6268229",
"0.6263155",
"0.6251893",
"0.62434274",
"0.62434274",
"0.62407106",
"0.6238377",
"0.6236977",
"0.6235345",
"0.62310207",
"0.6230986",
"0.6230986",
"0.62284994",
"0.6223396",
"0.6214226",
"0.62116283",
"0.6210709",
"0.6208149",
"0.62057734",
"0.6191341",
"0.6190706",
"0.61844915",
"0.61828005",
"0.61821055",
"0.61796534",
"0.61786324",
"0.6174487",
"0.6170745",
"0.616353",
"0.6160478",
"0.61591953",
"0.6158123",
"0.6150533",
"0.6148183",
"0.6141441",
"0.61317027",
"0.6131593",
"0.6129221",
"0.612194",
"0.6118403",
"0.6109835",
"0.61057925",
"0.6105422",
"0.6100869",
"0.60972756",
"0.6094099",
"0.60887253",
"0.6082963",
"0.6078577",
"0.60748726",
"0.6072377"
] | 0.6407468 | 28 |
creating dummy user to update | @Test
public void updateUser() {
userDAO.createUser(new User("dummy", "dummy", 1));
assertTrue(userResource.updateUser(new User("dummy", "dummyUPDATED", 2)));
//clean up
userDAO.removeUser("dummy");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example.of(user, em);\n List<Users> users = userRepository.findAll(example);\n System.out.println(\"Existing users: \" + users);\n\n if (users.size() == 0) {\n System.out.println(\"admin user not found, hence creating admin user\");\n userRepository.save(user);\n System.out.println(\"admin user created\");\n latch.countDown();\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"private static void updateUserTest(Connection conn) {\n\t\t\n\t\ttry {\n\t\t\tUser existingUser = User.loadUserById(conn, 3); // User user = User.loadUserById(conn, 3);\n\t\t\t// the same id is preserved\n\t\t\texistingUser.setUsername(\"jo\");\n\t\t\texistingUser.setEmail(\"jo@wp.pl\");\n\t\t\texistingUser.setUserGroupId(2);\n\t\t\texistingUser.saveToDB(conn);\n\t\t\t\n\t\t\t/*Następnie\tnależy\tsprawdzić,\tczy:\n\t\t\t\t1.\t Czy\twpis\tw\tbazie\tdanych\tma\twszystkie\n\t\t\t\tdane\todpowiednio\tponastawiane?\n\t\t\t\t2.\t Czy\tobiekt\tma\tnastawione\tpoprawne\tid? - czyli niezmienione, bo nie mamy settera dla id\n\t\t\t\t3.\t Czy\tnie\tdodał\tsię\tnowy\twpis\tw\tbazie?*/\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void createUser(User user) {\n\n\t}",
"@Test\n public void testGetNewUser() throws Exception {\n UserMultiID umk = createRU(\"remote-user-\" + getRandomString());\n String idp = \"test-idp-\" + getRandomString();\n // create a new user.\n XMLMap map = getDBSClient().getUser(umk, idp);\n assert getDBSClient().hasUser(umk, idp);\n Identifier uid = BasicIdentifier.newID(map.get(userKeys.identifier()).toString());\n User user2 = getUserStore().get(uid);\n checkUserAgainstMap(map, user2);\n }",
"public void createUser(User user);",
"private Appuser newUser() {\n //TODO: get logged user from security context\n String createdBy = \"REST\";\n Appuser au = new Appuser();\n Userdetails ud = new Userdetails();\n boolean idOK = false;\n Long id = 0L;\n while (!idOK) {\n id = EntityIdGenerator.random();\n idOK = !userRepository.exists(id);\n }\n //notNull\n ud.setNotes(\"none\");\n au.setPasswdHash(\"*\");\n au.setCreatedBy(createdBy);\n au.setUserId(id);\n ud.setUserId(id);\n au.setUserdetails(ud);\n return au;\n }",
"User createUser();",
"public void newUser(User user);",
"private AppUser saveDummyAppUserInstance() {\n\t\tAppUser dummyEntry = new AppUser(//\n\t\t\t\t1L//\n\t\t\t\t, \"a@aa.aa\"//\n\t\t\t\t, \"Pin12345\"//\n\t\t\t\t, 5//\n\t\t\t\t, BehaviourIfPoolWithWrongAnswersIsFull.EMPTY_POOL_UNTIL_ALL_QUESTIONS_CORRECT//\n\t\t\t\t, Calendar.getInstance().getTime()//\n\t\t);\n\t\tAppUser result = appUserRepository.save(dummyEntry);\n\t\treturn result;\n\t}",
"private User createDummyUser(String userId) {\n\n return new User(userId, \"Usr_\" + userId, new ArrayList<ShoppingList>());\n }",
"@Test\r\n public void testUpdateUserProfileOfCreatedUser() throws Exception {\r\n UserVO user = new UserVO();\r\n user.setAlias(UUID.randomUUID().toString());\r\n user.setFirstName(UUID.randomUUID().toString());\r\n user.setLastName(UUID.randomUUID().toString());\r\n user.setEmail(UUID.randomUUID().toString() + \"@\" + UUID.randomUUID().toString());\r\n user.setLanguage(Locale.ENGLISH);\r\n user.setRoles(new UserRole[] { UserRole.ROLE_KENMEI_USER });\r\n user.setPassword(UUID.randomUUID().toString());\r\n User dbUser = ServiceLocator.instance().getService(UserManagement.class)\r\n .createUser(user, false, false);\r\n UserProfileVO userProfile = new UserProfileVO();\r\n ServiceLocator.instance().getService(UserProfileManagement.class)\r\n .updateUserProfile(dbUser.getId(), userProfile);\r\n }",
"Human_User createHuman_User();",
"public void setupUser() {\n }",
"@Test\n\tpublic void testUpdateUserWithoutUserid() {\n\t\tUser testUser = new User();\n\t\ttestUser.setUserEmail(TEST_EMAIL);\n\t\ttestUser.setUserPassword(TEST_PASSWORD);\n\t\t\n\t\tgiven().body(testUser).contentType(ContentType.JSON).when()\n\t\t\t\t.put(getBaseTestURI()).then()\n\t\t\t\t.statusCode(HttpServletResponse.SC_BAD_REQUEST);\n\t}",
"Boolean registerNewUser(User user);",
"private String createUser(String name) {\n\t\treturn null;\n\t}",
"Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);",
"private void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }",
"void registerUser(User newUser);",
"@Test\n\tpublic void testUpdateUserWithoutPassword() {\n\t\tUser testUser = new User();\n\t\ttestUser.setUserEmail(TEST_EMAIL);\n\t\ttestUser.setUserId(TEMP_Key);\n\t\t\n\t\tgiven().body(testUser).contentType(ContentType.JSON).when()\n\t\t\t\t.put(getBaseTestURI()).then()\n\t\t\t\t.statusCode(HttpServletResponse.SC_BAD_REQUEST);\n\t}",
"@Test\n\tpublic void testCreateUser() {\n\t\tassertTrue(auctionSystem.createUser(\"toto\", \"Glen\", \"Fiddich\", RoleEnum.SELLER));\n\t\tassertTrue(auctionSystem.createUser(\"tata\", \"Johnnie\", \"Campbell\", RoleEnum.BUYER));\n\t\tassertTrue(auctionSystem.createUser(\"tutu\", \"Ballentine\", \"Darmore\", RoleEnum.SELLER_BUYER));\n\t}",
"int createUser(User data) throws Exception;",
"@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}",
"@Test\n\tpublic void test_update_user_success(){\n\t\tUser user = new User(null, \"fengt\", \"fengt2@itiaoling.com\", \"12345678\");\n\t\ttemplate.put(REST_SERVICE_URI + \"/20\" + ACCESS_TOKEN + token, user);\n\t}",
"@Override\n\tpublic void create(User user) {\n\t\t\n\t}",
"public void setCreateUser(String newVal) {\n if ((newVal != null && this.createUser != null && (newVal.compareTo(this.createUser) == 0)) || \n (newVal == null && this.createUser == null && createUser_is_initialized)) {\n return; \n } \n this.createUser = newVal; \n\n createUser_is_modified = true; \n createUser_is_initialized = true; \n }",
"@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }",
"@Test\n\tpublic void testUpdateUserWithoutEmail() {\n\t\tUser testUser = new User();\n\t\ttestUser.setUserPassword(TEST_PASSWORD);\n\t\ttestUser.setUserId(TEMP_Key);\n\t\t\n\t\tgiven().body(testUser).contentType(ContentType.JSON).when()\n\t\t\t\t.put(getBaseTestURI()).then()\n\t\t\t\t.statusCode(HttpServletResponse.SC_BAD_REQUEST);\n\t}",
"private User createUser(org.picketlink.idm.model.User picketLinkUser) {\n User user = new User(picketLinkUser.getLoginName());\n user.setFullName(picketLinkUser.getFirstName() + \" \" + picketLinkUser.getLastName());\n user.setShortName(picketLinkUser.getLastName());\n return user;\n }",
"@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}",
"@Ignore(\"Test is not done yet\")\n @Test\n public void testChangingUsernameToExisting() {\n final UserRequest request = new UserRequest();\n // We're currently logged in as Austria, so we're trying to change the\n // username to Germany.\n request.setNewUsername(\"germany@iaeste.de\");\n final Response response = administration.controlUserAccount(token, request);\n assertThat(response.getError(), is(IWSErrors.FATAL));\n }",
"private void createUser(String Address, String Phone_number,String needy) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(userId)) {\n userId = mFirebaseDatabase.push().getKey();\n }\n\n com.glitch.annapurna.needy user = new needy(Address,Phone_number,needy);\n\n mFirebaseDatabase.child(userId).setValue(user);\n\n addUserChangeListener();\n }",
"@Test\n public void testSameUser() {\n LocalUserManager ua = new LocalUserManager();\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"gburdell1@gatech.edu\", \"George\", \"Burdell\", \"MANAGER\");\n ua.createUser(\"gburdell2\", \"ramblin\", \"gburdell1@gatech.edu\", \"G\", \"B\", \"USER\");\n } catch (Exception e) {\n Assert.assertEquals(1, ua.getUsers().size());\n return;\n }\n Assert.fail();\n }",
"private void createNewUser(final User unmanagedUser) {\n Realm realm = (mRealm == null) ? Realm.getDefaultInstance() : mRealm;\n //create by administrator\n realm.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n User u2 = realm.createObject(User.class, PrimaryKeyFactory.getInstance().nextKey(User.class));\n u2.setLoggedIn(false);\n u2.setUserId(unmanagedUser.getUserId());\n\n String password = unmanagedUser.getPassword();\n if (password == null) {\n password = \"\";\n }\n u2.setPassword(password);\n\n u2.setUserName(unmanagedUser.getUserName());\n u2.setStartDate(unmanagedUser.getStartDate());\n u2.setEndDate(unmanagedUser.getEndDate());\n u2.setCreated(new Date());\n u2.setActive(unmanagedUser.getActive());\n u2.setSpecial(false);\n u2.setPermission(unmanagedUser.getPermission());\n u2.setEnabled(unmanagedUser.getEnabled());\n }\n });\n\n if (mRealm == null)\n realm.close();\n }",
"private void createTestUser() throws InvalidModelException, ConnectionProblemException{\n\t\tSession session = SessionFactoryUtil.getSessionFactory().openSession();\n\t\t\n\t\ttry {\n\t\t\t//Create a new user with seed data\n\t\t\tUser editor = new User();\n\t\t\teditor.setEmail(\"editor@sheffield.ac.uk\");\n\t\t\teditor.setFirstName(\"The\");\n\t\t\teditor.setLastName(\"Editor\");\n\t\t\teditor.setRole(1);\n\t\t\tPasswordHelper passwordHelper = new PasswordHelper(\"password\");\n\t\t\teditor.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\teditor.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\teditor.validateModel();\n\t\t\t\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(editor);\t\n\t\t\tsession.getTransaction().commit();\n\t\t\t\n\t\t\t//Create a new user with seed data\n\t\t\tUser reviewer = new User();\n\t\t\treviewer.setEmail(\"reviewer@sheffield.ac.uk\");\n\t\t\treviewer.setFirstName(\"Mr\");\n\t\t\treviewer.setLastName(\"Reviewer\");\n\t\t\treviewer.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer.validateModel();\n\t\t\t\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(reviewer);\t\n\t\t\tsession.getTransaction().commit();\n\t\t\t\n\t\t\t//Create a new user with seed data\n\t\t\tUser author = new User();\n\t\t\tauthor.setEmail(\"author@sheffield.ac.uk\");\n\t\t\tauthor.setFirstName(\"An\");\n\t\t\tauthor.setLastName(\"Author\");\n\t\t\tauthor.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\tauthor.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\tauthor.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\tauthor.validateModel();\n\t\t\t\n\t\t\tUser reviewer1 = new User();\t\t\t\n\t\t\treviewer1.setEmail(\"reviewer1@sheffield.ac.uk\");\n\t\t\treviewer1.setFirstName(\"Mr\");\n\t\t\treviewer1.setLastName(\"Reviewer1\");\n\t\t\treviewer1.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer1.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer1.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer1.validateModel();\n\t\t\t\n\t\t\tUser reviewer2 = new User();\n\t\t\treviewer2.setEmail(\"reviewer2@sheffield.ac.uk\");\n\t\t\treviewer2.setFirstName(\"Mr\");\n\t\t\treviewer2.setLastName(\"Reviewer2\");\n\t\t\treviewer2.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer2.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer2.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer2.validateModel();\n\t\t\t\n\t\t\tUser reviewer3 = new User();\n\t\t\treviewer3.setEmail(\"reviewer3@sheffield.ac.uk\");\n\t\t\treviewer3.setFirstName(\"Mr\");\n\t\t\treviewer3.setLastName(\"Reviewer3\");\n\t\t\treviewer3.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer3.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer3.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer3.validateModel();\n\t\t\t\n\t\t\tJournal journal = new Journal();\n\t\t\tjournal.setTitle(\"The dissertations\");\n\t\t\tjournal.setAcademicAims(\"The journal aims to outline dissertations written by students from the Department of Computer Sciece at the University of Sheffield.\");\n\t\t\tjournal.setSubmissionGuidelines(\"Each dissertation must be between 30 and 60 pages and it must follow the department's guidelines on 3rd year dissertations.\");\n\t\t\tjournal.validateModel();\n\t\t\t\n\t\t\tVolume volume = new Volume();\n\t\t\tvolume.setPublicationDate(new Date());\n\t\t\tvolume.setVolumeNumber(1);\n\t\t\tvolume.validateModel();\n\t\t\t\n\t\t\tEdition edition = new Edition();\n\t\t\tedition.setPublicationDate(new Date());\n\t\t\tedition.setEditionNumber(1);\n\t\t\tedition.validateModel();\n\t\t\t\n\t\t\tArticle publishedArticle = new Article();\n\t\t\tpublishedArticle.setTitle(\"An example paper\");\n\t\t\tpublishedArticle.setArticle_abstract(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\nLorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\tpublishedArticle.setFileName(\"1431099295403.pdf\");\n\t\t\tpublishedArticle.validateModel();\n\t\t\t\n\t\t\tArticle article = new Article();\n\t\t\tarticle.setTitle(\"Shadow Puppetry Using the Kinect\");\n\t\t\tarticle.setArticle_abstract(\"Shadow puppetry is a form of storytelling where the characters are made from the shadows cast by puppets. The goal of this project is to build a real-time shadow puppet storytelling application using the Microsoft Kinect sensor. Its depth sensing ability is the perfect tool for tracking users and allowing them to control puppets onscreen, just by moving their body. The project is developed in the C++ programming language and uses the Cinder library for image processing. The system includes various image processing techniques to achieve a real-time, depth-based blur effect that is both efficient and visually appealing. It also includes a robust gesture recognition system based on the dynamic time warping algorithm to allow users to interact with the system and to create engaging and varied stories. These stories can be recorded and saved to file for later playback, or exported as video files.\");\n\t\t\tarticle.setFileName(\"1431098947160.pdf\");\n\t\t\tarticle.validateModel();\n\t\t\t\n\t\t\tArticle article1 = new Article();\n\t\t\tarticle1.setTitle(\"D Portraiture System\");\n\t\t\tarticle1.setArticle_abstract(\"The proliferation of 3D printers and their applications inevitably depend on the ease and practicality of 3D model construction. The aim of this project is to create a 3D portraiture system capable of capturing real-world facial data via a 360 degree head-scanning algorithm, processing this information and then reproducing a physical representation in the form of a figurine using custom built hardware from LEGO. The milling machine has been constructed and proven functional by producing several figurines, each with minor improvements over its predecessors. The implementation of the head scanning subsystem has also been successfully completed through the utilisation of a Microsoft â s Kinect for Windows, which generates partially overlapping point clouds that can subsequently be aligned and merged by means of the Iterative Closest Point algorithm. Future development and improvements to the program should be focused in this subsystem since many advanced techniques and enhancements exist that still remain unincorporated.\");\n\t\t\tarticle1.setFileName(\"1431098976887.pdf\");\n\t\t\tarticle1.validateModel();\n\t\t\t\n\t\t\tArticle article2 = new Article();\n\t\t\tarticle2.setTitle(\"Robot Facial Expressions\");\n\t\t\tarticle2.setArticle_abstract(\"The reason that made me choose this project is that I found it extremely interesting howpeople evolved regarding their interaction with machines. Obviously, as the machines became more and more advanced technologically, the human-computer interaction grew. I think that this growth has brought human kind to the point where we can start considering the possibility of emotions being expressed towards a robot, for example, and maybe in the future, from a robot towards a human being. The aim of this project is to take the first step towards that future by observing and studying how an animated man can be the target of our emotions or to see if the interaction with it can make us feel like we could haveemotions towards it.\");\n\t\t\tarticle2.setFileName(\"1431099010458.pdf\");\n\t\t\tarticle2.validateModel();\n\t\t\t\n\t\t\tArticle article3 = new Article();\n\t\t\tarticle3.setTitle(\"Mobile application for prospective and current Computer Science Students\");\n\t\t\tarticle3.setArticle_abstract(\"Nowadays, mobile phones are part of our life to the point where we are dependent on them. We rely on them for a wide variety of chores, from waking us up in the morning to keeping track of our gym routine. \\n The University of Sheffield offers an application that gives access to its students to certain information; however, its contents are very general. That is why this project aims to offer more specific information and tools to the students of the Computer Science department. On top of that, the application also contains information for any prospective Computer Science students. \\n The paper presents an overview of the current operating systems available on the market and then it looks into the applications that perform similar tasks. Using the data obtained through this research, the functional and non-functional requirements are presented and based on these the application is designed. Towards the end of the report, the techniques and algorithms that run the application are being described, along with the methods in which these have been tested. Finally, the report will end with a discussion based on the challenges faced by the project and an application evaluation. \");\n\t\t\tarticle3.setFileName(\"1431099026185.pdf\");\n\t\t\tarticle3.validateModel();\n\t\t\t\t\t\t\t\t\n\t\t\t//Save the user to the database\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(author);\n\t\t\tsession.save(reviewer1);\n\t\t\tsession.save(reviewer2);\n\t\t\tsession.save(reviewer3);\n\t\t\tsession.save(journal);\n\t\t\t\n\t\t\tvolume.setJournal(journal);\n\t\t\tjournal.getVolumes().add(volume);\n\t\t\tsession.save(volume);\n\t\t\t\n\t\t\tedition.setVolume(volume);\n\t\t\tvolume.getEditions().add(edition);\t\t\t\n\t\t\tsession.save(edition);\n\t\t\t\n\t\t\tpublishedArticle.setAuthor(author);\n\t\t\tpublishedArticle.setEdition(edition);\n\t\t\tedition.getArticles().add(publishedArticle);\n\t\t\tsession.save(publishedArticle);\n\t\t\t\n\t\t\tpublishedArticle.setAuthor(author);\n\t\t\tsession.save(publishedArticle);\n\t\t\t\n\t\t\tarticle.setAuthor(author);\n\t\t\tsession.save(article);\n\t\t\t\n\t\t\tarticle1.setAuthor(reviewer1);\n\t\t\tsession.save(article1);\n\t\t\t\n\t\t\tarticle2.setAuthor(reviewer2);\n\t\t\tsession.save(article2);\n\t\t\t\n\t\t\tarticle3.setAuthor(reviewer3);\n\t\t\tsession.save(article3);\n\t\t\t\t\t\t\n\t\t\tReview review1 = new Review();\n\t\t\treview1.setArticle(article1);\n\t\t\treview1.setOverallJudgement(\"champion\");\n\t\t\treview1.setReviewerExpertise(\"outsider\");\n\t\t\treview1.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview1.setSubstantiveCriticism(\"none\");\n\t\t\treview1.setSmallErrors(\"none\");\n\t\t\treview1.setCommentsForEditor(\"Very very good article. Can go to publishing\");\n\t\t\treview1.setReviewer(author);\n\t\t\treview1.validateModel();\n\t\t\tsession.save(review1);\n\n\t\t\tReview review2 = new Review();\n\t\t\treview2.setArticle(article2);\n\t\t\treview2.setOverallJudgement(\"detractor\");\n\t\t\treview2.setReviewerExpertise(\"outsider\");\n\t\t\treview2.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview2.setSubstantiveCriticism(\"none\");\n\t\t\treview2.setSmallErrors(\"a few spelling mistakes\");\n\t\t\treview2.setCommentsForEditor(\"good article!\");\n\t\t\treview2.setReviewer(author);\n\t\t\treview2.validateModel();\n\t\t\tsession.save(review2);\n\t\t\t\n\t\t\tReview review3 = new Review();\n\t\t\treview3.setArticle(article3);\n\t\t\treview3.setOverallJudgement(\"champion\");\n\t\t\treview3.setReviewerExpertise(\"expert\");\n\t\t\treview3.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview3.setSubstantiveCriticism(\"none\");\n\t\t\treview3.setSmallErrors(\"none\");\n\t\t\treview3.setCommentsForEditor(\"Good for publishing\");\n\t\t\treview3.setReviewer(author);\n\t\t\treview3.validateModel();\n\t\t\tsession.save(review3);\n\t\t\t\n\t\t\tReview review4 = new Review();\n\t\t\treview4.setArticle(article);\n\t\t\treview4.setOverallJudgement(\"champion\");\n\t\t\treview4.setReviewerExpertise(\"expert\");\n\t\t\treview4.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview4.setSubstantiveCriticism(\"none\");\n\t\t\treview4.setSmallErrors(\"the indentation is messed up on page 5\");\n\t\t\treview4.setCommentsForEditor(\"need revising but it's good overall\");\n\t\t\treview4.setReviewer(reviewer1);\n\t\t\treview4.validateModel();\n\t\t\tsession.save(review4);\n\t\t\t\n\t\t\tReview review5 = new Review();\n\t\t\treview5.setArticle(article);\n\t\t\treview5.setOverallJudgement(\"champion\");\n\t\t\treview5.setReviewerExpertise(\"outsider\");\n\t\t\treview5.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview5.setSubstantiveCriticism(\"none\");\n\t\t\treview5.setSmallErrors(\"none\");\n\t\t\treview5.setCommentsForEditor(\"perfect!\");\n\t\t\treview5.setReviewer(reviewer2);\n\t\t\treview5.validateModel();\n\t\t\tsession.save(review5);\n\t\t\t\n\t\t\tReview review6 = new Review();\n\t\t\treview6.setArticle(article);\n\t\t\treview6.setOverallJudgement(\"champion\");\n\t\t\treview6.setReviewerExpertise(\"knowledgable\");\n\t\t\treview6.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview6.setSubstantiveCriticism(\"none\");\n\t\t\treview6.setSmallErrors(\"none\");\n\t\t\treview6.setCommentsForEditor(\"good to go!\");\n\t\t\treview6.setReviewer(reviewer3);\n\t\t\treview6.validateModel();\n\t\t\tsession.save(review6);\n\t\t\t\n\t\t\tReview review7 = new Review();\n\t\t\treview7.setArticle(publishedArticle);\n\t\t\treview7.setOverallJudgement(\"champion\");\n\t\t\treview7.setReviewerExpertise(\"expert\");\n\t\t\treview7.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview7.setSubstantiveCriticism(\"None\");\n\t\t\treview7.setSmallErrors(\"Spelling mistakes here and there.\");\n\t\t\treview7.setCommentsForEditor(\"Very good article!\");\n\t\t\treview7.setReviewer(reviewer1);\n\t\t\treview7.validateModel();\n\t\t\tsession.save(review7);\n\t\t\t\n\t\t\tReview review8 = new Review();\n\t\t\treview8.setArticle(publishedArticle);\n\t\t\treview8.setOverallJudgement(\"champion\");\n\t\t\treview8.setReviewerExpertise(\"knowledgable\");\n\t\t\treview8.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview8.setSubstantiveCriticism(\"Not properly organized into sections. The article does not flow\");\n\t\t\treview8.setSmallErrors(\"Gammar mistakes and spelling mistakes\");\n\t\t\treview8.setCommentsForEditor(\"Good article but need revising\");\n\t\t\treview8.setReviewer(reviewer2);\n\t\t\treview8.validateModel();\n\t\t\tsession.save(review8);\n\t\t\t\n\t\t\tReview review9 = new Review();\n\t\t\treview9.setArticle(publishedArticle);\n\t\t\treview9.setOverallJudgement(\"champion\");\n\t\t\treview9.setReviewerExpertise(\"outsider\");\n\t\t\treview9.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview9.setSubstantiveCriticism(\"None\");\n\t\t\treview9.setSmallErrors(\"Losts of grammar code\");\n\t\t\treview9.setCommentsForEditor(\"N/A\");\n\t\t\treview9.setReviewer(reviewer3);\n\t\t\treview9.validateModel();\n\t\t\tsession.save(review9);\n\t\t\t\n\t\t\tsession.getTransaction().commit();\n\t\t\tsession.close();\n\t\t\t\n\t\t\tUserDao.setArticleToReview(article1, author);\n\t\t\tUserDao.setArticleToReview(article2, author);\n\t\t\tUserDao.setArticleToReview(article3, author);\n\t\t\tUserDao.setArticleToReview(article, reviewer1);\n\t\t\tUserDao.setArticleToReview(article, reviewer2);\n\t\t\tUserDao.setArticleToReview(article, reviewer3);\n\t\t\t\n\t\t\tLOGGER.log(Level.FINE, \"Created seed user\");\n\t\t\treturn;\n\t\t} catch (InvalidModelException ex) {\n\t\t\t//If there was any invalid User information then log and throw the message up to the user\n\t\t\tLOGGER.log(Level.INFO, ex.getMessage());\n\t\t\tsession.close();\n\t\t\tthrow ex;\n\t\t} catch (ConstraintViolationException ex) {\n\t\t\t//If an unexpected error occurred then log, attempt to rollback and then throw a user friendly error\n\t\t\tLOGGER.log(Level.SEVERE, ex.getCause().getMessage());\n\t\t\tsession.getTransaction().rollback();\n\t\t\tsession.close();\n\t\t\tthrow new InvalidModelException(\"The seed data entered is invalid, please check and try again.\");\n\t\t} catch (Exception ex) {\n\t\t\t//If an unexpected error occurred then log, attempt to rollback and then throw a user friendly error\n\t\t\tLOGGER.log(Level.SEVERE, ex.getMessage());\n\t\t\tsession.getTransaction().rollback();\n\t\t\tsession.close();\n\t\t\tthrow new ConnectionProblemException(\"A problem occurred and seeding could not be completed.\");\n\t\t}\n\t}",
"void editUser(String uid, User newUser);",
"public void setCreateUser(User createUser)\r\n/* */ {\r\n/* 151 */ this.createUser = createUser;\r\n/* */ }",
"void createUser(User newUser, String token) throws AuthenticationException, InvalidUserException, UserAlreadyExistsException;",
"@Test\n public void testCreateOnBehalfUser() throws Exception {\n String password = \"abcdef\";\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), password);\n checkCreatedUser(result, customer, password, false);\n }",
"User createUser(User user);",
"GenerateUserAccount () {\r\n }",
"public void updateUser(int uid, String name, String phone, String email, String password, int money, int credit);",
"BaseUser createAdminUser(Application application);",
"@Test\n\tpublic void newUser() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\n\t\tassertThat(user).isNotNull();\n\t\tassertThat(user).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t}",
"public void creatUser(String name, String phone, String email, String password);",
"@Test\n public void testCreateAccountWithoutPassword() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"beta@gamma.net\");\n createUserRequest.setFirstname(\"Beta\");\n createUserRequest.setLastname(\"Gamma\");\n\n // Now, perform the actual test - create the Account, and verify that\n // the response is ok, and that a Notification was sent\n final Response result = administration.createUser(token, createUserRequest);\n assertThat(result.isOk(), is(true));\n // Creating a new User should generate an Activate User notification\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n assertThat(spy.size(type), is(1));\n final String activationCode = spy.getNext(type).getFields().get(NotificationField.CODE);\n assertThat(activationCode, is(not(nullValue())));\n\n // Check that the user is in the list of members\n final String memberGroupId = findMemberGroup(token).getGroupId();\n token.setGroupId(memberGroupId);\n final FetchGroupRequest groupRequest = new FetchGroupRequest(memberGroupId);\n final FetchGroupResponse groupResponse = administration.fetchGroup(token, groupRequest);\n assertThat(groupResponse, is(not(nullValue())));\n }",
"@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic User createNewUser(Account account) {\n\t\treturn new User(account);\n\t\t\n\t}",
"private void initUser() {\n\t}",
"@Test\n public void testCreateValidUser() {\n LocalUserManager ua = new LocalUserManager();\n\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"gburdell1@gatech.edu\", \"George\", \"Burdell\", \"MANAGER\");\n } catch (Exception e) {\n Assert.fail();\n }\n Assert.assertEquals(1, ua.getUsers().size());\n Assert.assertEquals(\"gburdell1\", ua.getUsers().get(0).getUsername());\n Assert.assertEquals(\"gburdell1@gatech.edu\", ua.getUsers().get(0).getEmail());\n Assert.assertEquals(UserClass.MANAGER, ua.getUsers().get(0).getUserClass());\n }",
"@Override\n\tpublic ApplicationResponse createUser(UserRequest request) {\n\t\tUserEntity entity = repository.save(modeltoentity.apply(request));\n\t\tif (entity != null) {\n\t\t\treturn new ApplicationResponse(true, \"Success\", enitytomodel.apply(entity));\n\t\t}\n\t\treturn new ApplicationResponse(false, \"Failure\", enitytomodel.apply(entity));\n\t}",
"public void createUser(int usertype) {\n\t\tthePerson = PersonFactory.getPerson(usertype);\n\t}",
"public UserProfile createUserProfile(String username, UserProfile newProfile);",
"public void createUserAccount(UserAccount account);",
"private void createUser(final String email, final String password) {\n\n }",
"private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }",
"public void userSignup(String email_addr, String user_pw){\n\n String uuid_str = UUID.randomUUID().toString().replaceAll(\"-\", \"\");\n uuid_str = uuid_str.substring(0, 5);\n int uuid = Integer.parseInt(uuid_str);\n UserProfile new_user = new UserProfile(uuid, email_addr, user_pw);\n userDataAccessService.storeUserInfo(new_user.getUser_id(), new_user.getEmail_addr(), new_user.getUser_pw());\n\n }",
"public Person createAdminUser(Register entity) {\t\t\n\t\tPerson person = new Person();\n\t\tif(!searchPersonNew(entity)) {\t\t\t\n\t\t\tperson = factory.createPerson(entity);\t\t\t\t\t\t\n\t\t\tcreate(person);\t\t\t\n\t\t}\t\t\n\t\treturn person;\n\t}",
"@Test\n public void updateUserCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n assertFalse(userDAO.updateUser(new User(\"notdummy\", \"dummyUPDATED\", 2)));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }",
"CreateUserResult createUser(CreateUserRequest createUserRequest);",
"boolean create(User user) throws Exception;",
"private void managePreCreatedUsers() {\n int numberRequestedGuests = CarProperties.number_pre_created_guests().orElse(0);\r\n int numberRequestedUsers = CarProperties.number_pre_created_users().orElse(0);\r\n Slog.i(TAG, \"managePreCreatedUsers(): OEM asked for \" + numberRequestedGuests\r\n + \" guests and \" + numberRequestedUsers + \" users\");\r\n if (numberRequestedGuests < 0 || numberRequestedUsers < 0) {\r\n Slog.w(TAG, \"preCreateUsers(): invalid values provided by OEM; \"\r\n + \"number_pre_created_guests=\" + numberRequestedGuests\r\n + \", number_pre_created_users=\" + numberRequestedUsers);\r\n return;\r\n }\r\n\r\n if (numberRequestedGuests == 0 && numberRequestedUsers == 0) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): not defined by OEM\");\r\n return;\r\n }\r\n\r\n // Then checks how many exist already\r\n List<UserInfo> allUsers = mUserManager.getUsers(/* excludePartial= */ true,\r\n /* excludeDying= */ true, /* excludePreCreated= */ false);\r\n\r\n int allUsersSize = allUsers.size();\r\n if (DBG) Slog.d(TAG, \"preCreateUsers: total users size is \" + allUsersSize);\r\n\r\n int numberExistingGuests = 0;\r\n int numberExistingUsers = 0;\r\n\r\n // List of pre-created users that were not properly initialized. Typically happens when\r\n // the system crashed / rebooted before they were fully started.\r\n SparseBooleanArray invalidUsers = new SparseBooleanArray();\r\n\r\n for (int i = 0; i < allUsersSize; i++) {\r\n UserInfo user = allUsers.get(i);\r\n if (!user.preCreated) continue;\r\n if (!user.isInitialized()) {\r\n Slog.w(TAG, \"Found invalid pre-created user that needs to be removed: \"\r\n + user.toFullString());\r\n invalidUsers.append(user.id, /* notUsed=*/ true);\r\n continue;\r\n }\r\n if (user.isGuest()) {\r\n numberExistingGuests++;\r\n } else {\r\n numberExistingUsers++;\r\n }\r\n }\r\n if (DBG) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): system already has \" + numberExistingGuests\r\n + \" pre-created guests,\" + numberExistingUsers + \" pre-created users, and these\"\r\n + \" invalid users: \" + invalidUsers );\r\n }\r\n\r\n int numberGuests = numberRequestedGuests - numberExistingGuests;\r\n int numberUsers = numberRequestedUsers - numberExistingUsers;\r\n int numberInvalidUsers = invalidUsers.size();\r\n\r\n if (numberGuests <= 0 && numberUsers <= 0 && numberInvalidUsers == 0) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): all pre-created and no invalid ones\");\r\n return;\r\n }\r\n\r\n // Finally, manage them....\r\n\r\n // In theory, we could submit multiple user pre-creations in parallel, but we're\r\n // submitting just 1 task, for 2 reasons:\r\n // 1.To minimize it's effect on other system server initialization tasks.\r\n // 2.The pre-created users will be unlocked in parallel anyways.\r\n new Thread( () -> {\r\n TimingsTraceLog t = new TimingsTraceLog(TAG, Trace.TRACE_TAG_SYSTEM_SERVER);\r\n\r\n t.traceBegin(\"preCreateUsers\");\r\n if (numberUsers > 0) {\r\n preCreateUsers(t, numberUsers, /* isGuest= */ false);\r\n }\r\n if (numberGuests > 0) {\r\n preCreateUsers(t, numberGuests, /* isGuest= */ true);\r\n }\r\n t.traceEnd();\r\n\r\n if (numberInvalidUsers > 0) {\r\n t.traceBegin(\"removeInvalidPreCreatedUsers\");\r\n for (int i = 0; i < numberInvalidUsers; i++) {\r\n int userId = invalidUsers.keyAt(i);\r\n Slog.i(TAG, \"removing invalid pre-created user \" + userId);\r\n mUserManager.removeUser(userId);\r\n }\r\n t.traceEnd();\r\n }\r\n }, \"CarServiceHelperManagePreCreatedUsers\").start();\r\n }",
"int newUser(String username, String password, Time creationTime);",
"@Test\n public void testCreateUserWithExistingUsername() {\n final String username = \"michael.pickelbauer@iaeste.at\";\n final CreateUserRequest request1 = new CreateUserRequest(username, \"Michael\", \"Pickelbauer\");\n final CreateUserRequest request2 = new CreateUserRequest(username, \"Hugo\", \"Mayer\");\n\n // Now let's create the two user accounts\n final CreateUserResponse response1 = administration.createUser(token, request1);\n final CreateUserResponse response2 = administration.createUser(token, request2);\n\n // The first request should work like a charm\n assertThat(response1, is(not(nullValue())));\n assertThat(response1.isOk(), is(true));\n\n // The second request should fail, as we already have a user with this\n // username in the system\n assertThat(response2, is(not(nullValue())));\n assertThat(response2.isOk(), is(false));\n assertThat(response2.getError(), is(IWSErrors.USER_ACCOUNT_EXISTS));\n assertThat(response2.getMessage(), is(\"An account for the user with username \" + username + \" already exists.\"));\n }",
"public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}",
"@Test\n\tpublic void testUpdateUser() {\n\t\tLogin login = new Login(\"unique_username_4324321\", \"password\");\n\t\t//login is encrypted in createUser method\n\t\tResponse response = createUser(login);\n\t\t//printResponse(response);\n\t\tassertEquals(Status.OK.getStatusCode(), response.getStatus());\n\t\t\n\t\t//update the user\n\t\tLogin update = new Login(\"unique_username_53428971\", \"a_different_password\");\n\t\tupdate.encryptPassword(passwordEncryptionKey);\n\t\tString resource = \"update_user\";\n\t\tString requestType = \"POST\";\n\t\tList<Login> updateLogins = Arrays.asList(login, update);\n\t\t\n\t\tresponse = sendRequest(resource, requestType, Entity.entity(updateLogins, MediaType.APPLICATION_JSON));\n\t\t//printResponse(response);\n\t\tassertEquals(Status.OK.getStatusCode(), response.getStatus());\n\t}",
"@Test\n public void testCreateUser() throws InvalidUserException {\n //Arrange\n User user = new User();\n user.setEmail(\"user@email.com\");\n user.setFirstName(\"first\");\n user.setLastName(\"last\");\n user.setPassword(\"pass\");\n user.setRole(\"admin\");\n \n //Act\n User createdUser = userService.createUser(user);\n User fetchedUser = userService.readUser(createdUser.getUserId());\n \n //Assert\n assertEquals(fetchedUser.getUserId(), createdUser.getUserId());\n assertEquals(fetchedUser.getEmail(), \"user@email.com\");\n assertEquals(fetchedUser.getFirstName(), \"first\");\n \n }",
"UserCreateResponse createUser(UserCreateRequest request);",
"@Test\n\tpublic void testCreateUser(){\n\t\trepository.createUser(expectedUser);\n\t\tSystem.out.println(\"#########################>User inserted into database<#########################\");\n\t\tUser actualUser = repository.findByUsername(\"vgeorga\");\n\t\tassertEquals(expectedUser.getUsername(), actualUser.getUsername());\n\t}",
"public static void createMysqlUser(Eleve e) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"CREATE USER '\" + e.getAbreviation() + \"'@'%' IDENTIFIED BY '\" + e.getPwd() + \"'; \";\r\n System.out.println(SQLRequest);\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }",
"public void insertUser() {}",
"@Test\n\tpublic void testUpdateUser_wrongUsername() {\n\t\tLogin login = new Login(\"unique_username_14365432\", \"password\");\n\t\tResponse response = createUser(login);\n\t\t//printResponse(response);\n\t\tassertEquals(Status.OK.getStatusCode(), response.getStatus());\n\t\t\n\t\t//update the user\n\t\tLogin update = new Login(\"unique_username_645324\", \"a_different_password\");\n\t\tupdate.encryptPassword(passwordEncryptionKey);\n\t\t//change the password (to test a wrong password)\n\t\tlogin.setUsername(\"a_not_existing_username_64234e985243\");\n\t\tString resource = \"update_user\";\n\t\tString requestType = \"POST\";\n\t\t\n\t\tList<Login> updateLogins = Arrays.asList(login, update);\n\t\t\n\t\tresponse = sendRequest(resource, requestType, Entity.entity(updateLogins, MediaType.APPLICATION_JSON));\n\t\t//printResponse(response);\n\t\tassertEquals(Status.NOT_FOUND.getStatusCode(), response.getStatus());\n\t}",
"@Test\n\tpublic void testUpdateUser_onlyOneLoginWithNoUpdate() {\n\t\tLogin login = new Login(\"unique_username_8132645123\", \"password\");\n\t\tResponse response = createUser(login);\n\t\t//printResponse(response);\n\t\tassertEquals(Status.OK.getStatusCode(), response.getStatus());\n\t\t\n\t\t//update the user with only one login\n\t\tString resource = \"update_user\";\n\t\tString requestType = \"POST\";\n\t\tList<Login> updateLogins = Arrays.asList(login);\n\t\t\n\t\tresponse = sendRequest(resource, requestType, Entity.entity(updateLogins, MediaType.APPLICATION_JSON));\n\t\t//printResponse(response);\n\t\tassertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus());\n\t}",
"public User createUser() {\n printer.println(\"Welcome! Enter you name and surname:\");\n printer.println(\"Name:\");\n String name = input.nextString();\n printer.println(\"Surname:\");\n String surname = input.nextString();\n return new User(name, surname);\n }",
"@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }",
"@Test\n public void testModifyUser() throws Exception {\n\n User user = userDao.retrieveById(\"uuid123123123\");\n user.setUsername(\"newbody4\");\n\n Boolean result = userDao.update(user);\n Assert.assertTrue(result);\n }",
"public User createUser(User newUser) {\n if(userRepository.findByUsername(newUser.getUsername()) != null){\n throw new UsernameException(\"The username is already taken please choose another one\");\n }\n newUser.setToken(\"dummy_token\"); //not really needed after registration;\n\n newUser.setStatus(UserStatus.ONLINE);\n userRepository.save(newUser); //userRepository creates User entity for the first time\n\n newUser.setToken(generateToken(newUser));\n userRepository.save(newUser); //userRepository saves the new entity items to existing user\n\n log.debug(\"Created Information for User: {}\", newUser);\n return newUser;\n }",
"UserModel createUserModel(UserModel userModel);",
"@Test\n public void testSaveEditUserCommandModel() throws Exception {\n BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();\n User user = new User();\n user.setUsername(\"Tephon\");\n user.setPassword(\"password\");\n \n \n ArrayList<String> authority1 = new ArrayList();\n authority1.add(\"ROLE_USER\");\n \n User existingUser = userServiceLayer.createUser(user);\n \n EditUserCommandModel commandModel = new EditUserCommandModel();\n commandModel.setId(existingUser.getId());\n commandModel.setUsername(\"Cheesy\");\n commandModel.setPassword(\"provolone1\");\n commandModel.setAuthorities(authority1);\n \n \n User userFromModel = userWebServices.saveEditUserCommandModel(commandModel, \"Tephon\");\n \n assert userFromModel.getId() != 0;\n assert userFromModel.getUsername().equals(\"Cheesy\");\n\n }",
"@Test\n\tpublic void testAddUser() {\n\t\tresetTestVars();\n\t\tuser1.setID(\"1\");\n\t\tuser2.setID(\"1\");\n\t\tassertFalse(\"User is invalid\", sn.addUser(user3));\n\t\tassertTrue(\"User is valid\", sn.addUser(user1));\n\t\tassertFalse(\"Same user cant be added\", sn.addUser(user1));\n\t\tassertFalse(\"ID already exists\", sn.addUser(user2));\n\t}",
"public void new_user(){\n }",
"public void createAdmin()\r\n\t{\r\n\t\tSystem.out.println(\"Administrator account not exist, please create the administrator account by setting up a password for it.\");\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter the password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter the password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(\"administrator\",hash_password,\"administrator\",\"\",0,0,last_login,false));\r\n\t\tSystem.out.println(\"Administrator account created successfully!\");\r\n\t}",
"void setName( String username, String name ) throws UserNotFoundException;",
"public void dummyUsersToDB(){\n\t\tUser nick = new User(db,\"Nick\",9);\n\t\tUser lin = new User(db,\"Lin\",10);\n\t\tUser evan = new User(db,\"Evan\",8);\n\t\tUser karthik = new User(db,\"Karthik\",10);\n\t\tUser bernadette = new User(db,\"Bernadette\",8);\n\t\tUser james = new User(db,\"James\",7);\n\t}",
"@Test\n void testUpdateUser() {\n String password = \"testPassword\";\n User updateUser = (User) userData.crud.getById(1);\n updateUser.setPassword(password);\n userData.crud.updateRecords(updateUser);\n User getUser = (User) userData.crud.getById(1);\n assertEquals(getUser, updateUser);\n logger.info(\"Updated the password for ID: \" + updateUser.getId());\n }",
"@Test\n public void testUsernameChange() {\n final String username = \"harvey@iaeste.us\";\n // There was a bug related to the Changing of Username, as it failed if\n // the password contained upper/lower case letters. Since IWS followed\n // the rule from IW3 and only looked at Passwords case insensitive.\n final String password = \"Harvey's password which is SUPER secret.\";\n final CreateUserRequest createRequest = new CreateUserRequest(username, password, \"Harvey\", \"Rabbit\");\n final CreateUserResponse createResponse = administration.createUser(token, createRequest);\n assertThat(createResponse.isOk(), is(true));\n\n // To ensure that we can use the account, we have to activate it. Once\n // it is activated, we can move on to the actual test.\n final String activationCode = readCode(NotificationType.ACTIVATE_NEW_USER);\n final Response activateResponse = administration.activateUser(activationCode);\n assertThat(activateResponse.isOk(), is(true));\n\n // Now we have a fresh new account which is active. So we can now try to\n // change the Username. To do this, we have to log in as the user, since\n // only a user may change his/her own username.\n final String newUsername = \"rabbit@iaeste.us\";\n final AuthenticationToken myToken = login(username, password);\n // We're building the request with the user itself as User Object\n final UserRequest updateRequest = new UserRequest(createResponse.getUser());\n // We're setting a new username here, which we can use.\n updateRequest.setNewUsername(newUsername);\n // To update the username, we need to provide some credentials,\n // otherwise the IWS will reject the request. This is needed to ensure\n // that nobody is attempting to hijack an active account.\n updateRequest.setPassword(password);\n // Let's just clear the Spy before we're using it :-)\n final Response updateResponse = administration.controlUserAccount(myToken, updateRequest);\n assertThat(updateResponse.isOk(), is(true));\n // Changing username must work without being logged in, well actually\n // it doesn't matter. As it doesn't use the current Session.\n logout(myToken);\n // Now, we can read out the update Code from the Notifications, which\n // is a cheap way of reading the value from the e-mail that is send.\n final String updateCode = readCode(NotificationType.UPDATE_USERNAME);\n final Response resetResponse = administration.updateUsername(updateCode);\n assertThat(resetResponse.isOk(), is(true));\n\n // Final part of the test, login with the new username, and ensure that\n // the UserId we're getting is the same as the previous Id.\n final AuthenticationToken newToken = login(newUsername, password);\n assertThat(newToken, is(not(nullValue())));\n final FetchPermissionResponse permissionResponse = access.fetchPermissions(newToken);\n assertThat(permissionResponse.isOk(), is(true));\n assertThat(permissionResponse.getAuthorizations().get(0).getUserGroup().getUser().getUserId(), is(createResponse.getUser().getUserId()));\n logout(newToken);\n // And done - Long test, but worth it :-)\n }",
"public ApplicationUser createUserProfile(ApplicationUser applicationUser){\n int min = 105;\n int max = 200;\n int random_int = (int)Math.floor(Math.random()*(max-min+1)+min);\n applicationUser.setAdminId(Integer.toString(random_int));\n applicationUser.setActive(\"Y\");\n applicationUser = mongoDbConnector.createUserProfile(applicationUser);\n return applicationUser;\n }",
"@Override\n public ApiResponse createUser(SignupDto signupDto){\n var userRole = this.roleDAO.findByName(RoleEnum.USER);\n Set<Role> userRoles = new HashSet<Role>(Collections.singletonList(userRole.get()));\n\n Person newPerson = new Person();\n newPerson.setEmail(signupDto.getUsername());\n newPerson.setFirstName(signupDto.getFirstName());\n newPerson.setLastName(signupDto.getLastName());\n newPerson.setRoles(userRoles);\n\n // Encriptamos la contraseña que nos mando el usuario\n var encryptedPassword = this.passwordEncoder.encode(signupDto.getPassword());\n newPerson.setPassword(encryptedPassword);\n\n this.personDAO.save(newPerson);\n\n return new ApiResponse(true, \"Usuario creado\");\n\n }",
"User modifyUser(Long user_id, User user);",
"User createUser(UserCreationModel user);",
"@Test\n void createUserReturnsNull() {\n Address address = new Address(\"Earth\", \"Belgium\", \"City\", \"Street\", 0);\n User user = new User(\"Mira\", \"Vogelsang\", \"0412345678\", \"maarten@maarten\", \"pass\", address);\n\n assertNull(controller.createUser(user));\n }",
"private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}",
"void addUser(String uid, String firstname, String lastname, String pseudo);",
"public static void createOrUpdateUser(String id, String provider,String fullName,String email,String image) {\r\n\tString key = id.toLowerCase()+provider.toLowerCase();\r\n Entity user = getSingleUser(key);\r\n if (user == null) {\r\n user = new Entity(\"User\", key);\r\n user.setProperty(\"eMail\", email);\r\n user.setProperty(\"id\", id);\r\n user.setProperty(\"provider\", provider);\r\n user.setProperty(\"fullName\", fullName);\r\n user.setProperty(\"image\", image);\r\n\r\n //user.setProperty(\"userKey\", user.getKey());\r\n } else {\r\n \t/*\r\n \t * no Updation allowed for user\r\n if (fullName != null && !\"\".equals(fullName)) {\r\n user.setProperty(\"fullName\", fullName);\r\n }\r\n if (email != null && !\"\".equals(email) && !\"undefined\".equals(email)) {\r\n user.setProperty(\"eMail\", email);\r\n }\r\n */\r\n if (image != null && !\"\".equals(image) && !\"undefined\".equals(image)) {\r\n user.setProperty(\"image\", image);\r\n }\r\n \t\r\n }\r\n Util.persistEntity(user);\r\n }",
"public Boolean updateUserData (User currentUser){ //throws Exception if user not existing in database\n\n if(userRepository.existsById(currentUser.getId())){\n User temp_user = getUserById(currentUser.getId());\n\n temp_user.setUsername(currentUser.getUsername());\n temp_user.setBirthday_date(currentUser.getBirthday_date());\n userRepository.save(temp_user);\n\n return true;\n }else{\n throw new UnknownUserException(\"This user doesn't exist and can therefore not be updated\");\n }\n }",
"@Test\n\n public void create() {\n User user = new User();\n user.setAccount(\"TestUser03\");\n user.setEmail(\"TestUser03@gmail.com\");\n user.setPhoneNumber(\"010-1111-3333\");\n user.setCreatedAt(LocalDateTime.now());\n user.setCreatedBy(\"TestUser3\");\n\n User newUser = userRepository.save(user);\n System.out.println(\"newUser : \" + newUser);\n }",
"@Override\n\tpublic boolean create(User user) {\n\t\treturn false;\n\t}",
"public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}",
"@Test\n public void createUserTestTest()\n {\n HashMap<String, Object> values = new HashMap<String, Object>();\n values.put(\"age\", \"22\");\n values.put(\"dob\", new Date());\n values.put(\"firstName\", \"CreateFName\");\n values.put(\"lastName\", \"CreateLName\");\n values.put(\"middleName\", \"CreateMName\");\n values.put(\"pasword\", \"user\");\n values.put(\"address\", \"CreateAddress\");\n values.put(\"areacode\", \"CreateAddressLine\");\n values.put(\"city\", \"CreateCity\");\n values.put(\"country\", \"CreateCountry\");\n values.put(\"road\", \"CreateRoad\");\n values.put(\"suberb\", \"CreateSuberb\");\n values.put(\"cell\", \"CreateCell\");\n values.put(\"email\", \"user\");\n values.put(\"homeTell\", \"CreateHomeTell\");\n values.put(\"workTell\", \"CreateWorkTell\");\n createUser.createNewUser(values);\n\n Useraccount useraccount = useraccountCrudService.findById(ObjectId.getCurrentUserAccountId());\n Assert.assertNotNull(useraccount);\n\n Garage garage = garageCrudService.findById(ObjectId.getCurrentGarageId());\n Assert.assertNotNull(garage);\n\n Saleshistory saleshistory = saleshistoryCrudService.findById(ObjectId.getCurrentSalesHistoryId());\n Assert.assertNotNull(saleshistory);\n }",
"@BeforeClass(alwaysRun = true)\r\n\tpublic void createUser() throws ParseException, SQLException, JoseException {\r\n\t\tSystem.out.println(\"******STARTING***********\");\r\n\t\tUser userInfo = User.builder().build();\r\n\t\tuserInfo.setUsername(userName);\r\n\t\tuserInfo.setPassword(\"Test@123\");\r\n\t\tsessionObj = EnvSession.builder().cobSession(config.getCobrandSessionObj().getCobSession())\r\n\t\t\t\t.path(config.getCobrandSessionObj().getPath()).build();\r\n\t\t//userHelper.getUserSession(\"InsightsEngineusers26 \", \"TEST@123\", sessionObj); \r\n\t\tuserHelper.getUserSession(userInfo, sessionObj);\r\n\t\tlong providerId = 16441;\r\n\t\tproviderAccountId = providerId;\r\n\t\tResponse response = providerAccountUtils.addProviderAccountStrict(providerId, \"fieldarray\",\r\n\t\t\t\t\"budget1_v1.site16441.1\", \"site16441.1\", sessionObj);\r\n\t\tproviderAccountId = response.jsonPath().getLong(JSONPaths.PROVIDER_ACC_ID);\r\n\t\tAssert.assertTrue(providerAccountId!=null);\r\n\t\t\r\n\t\t}"
] | [
"0.7271164",
"0.7171827",
"0.6985125",
"0.6948856",
"0.6903913",
"0.6901926",
"0.68646926",
"0.68628114",
"0.6853722",
"0.6853112",
"0.67920876",
"0.67730933",
"0.6765073",
"0.6715084",
"0.6692364",
"0.66748756",
"0.6665695",
"0.66645336",
"0.66563106",
"0.66362274",
"0.662665",
"0.6618236",
"0.660675",
"0.6594034",
"0.6554142",
"0.65238816",
"0.65117353",
"0.65037626",
"0.6502284",
"0.64902264",
"0.6490075",
"0.6480682",
"0.64716136",
"0.646095",
"0.6460558",
"0.6455521",
"0.64420015",
"0.64347607",
"0.6430627",
"0.6417617",
"0.6413859",
"0.64115095",
"0.64082575",
"0.6406801",
"0.64045644",
"0.6403548",
"0.6399637",
"0.6398962",
"0.6398805",
"0.6390811",
"0.638353",
"0.63742024",
"0.6371528",
"0.63710505",
"0.6342471",
"0.6340718",
"0.6335121",
"0.63270235",
"0.63174003",
"0.63088477",
"0.6304751",
"0.6298004",
"0.62975764",
"0.6292591",
"0.62924737",
"0.6289219",
"0.6282981",
"0.62797177",
"0.627877",
"0.62783474",
"0.62780726",
"0.6267978",
"0.62568295",
"0.62461054",
"0.62390685",
"0.6231426",
"0.6227299",
"0.62225425",
"0.62213135",
"0.62197375",
"0.621472",
"0.62129515",
"0.6208783",
"0.6207203",
"0.6199372",
"0.6189643",
"0.61843944",
"0.6183112",
"0.61819994",
"0.61804825",
"0.6176662",
"0.61745733",
"0.6174087",
"0.6172185",
"0.61677146",
"0.61654866",
"0.6162375",
"0.6162264",
"0.61613524",
"0.6159239"
] | 0.6412437 | 41 |
creating dummy user to update | @Test
public void updateUserCatch() {
userDAO.createUser(new User("dummy", "dummy", 1));
assertFalse(userDAO.updateUser(new User("notdummy", "dummyUPDATED", 2)));
//clean up
userDAO.removeUser("dummy");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example.of(user, em);\n List<Users> users = userRepository.findAll(example);\n System.out.println(\"Existing users: \" + users);\n\n if (users.size() == 0) {\n System.out.println(\"admin user not found, hence creating admin user\");\n userRepository.save(user);\n System.out.println(\"admin user created\");\n latch.countDown();\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"private static void updateUserTest(Connection conn) {\n\t\t\n\t\ttry {\n\t\t\tUser existingUser = User.loadUserById(conn, 3); // User user = User.loadUserById(conn, 3);\n\t\t\t// the same id is preserved\n\t\t\texistingUser.setUsername(\"jo\");\n\t\t\texistingUser.setEmail(\"jo@wp.pl\");\n\t\t\texistingUser.setUserGroupId(2);\n\t\t\texistingUser.saveToDB(conn);\n\t\t\t\n\t\t\t/*Następnie\tnależy\tsprawdzić,\tczy:\n\t\t\t\t1.\t Czy\twpis\tw\tbazie\tdanych\tma\twszystkie\n\t\t\t\tdane\todpowiednio\tponastawiane?\n\t\t\t\t2.\t Czy\tobiekt\tma\tnastawione\tpoprawne\tid? - czyli niezmienione, bo nie mamy settera dla id\n\t\t\t\t3.\t Czy\tnie\tdodał\tsię\tnowy\twpis\tw\tbazie?*/\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void createUser(User user) {\n\n\t}",
"@Test\n public void testGetNewUser() throws Exception {\n UserMultiID umk = createRU(\"remote-user-\" + getRandomString());\n String idp = \"test-idp-\" + getRandomString();\n // create a new user.\n XMLMap map = getDBSClient().getUser(umk, idp);\n assert getDBSClient().hasUser(umk, idp);\n Identifier uid = BasicIdentifier.newID(map.get(userKeys.identifier()).toString());\n User user2 = getUserStore().get(uid);\n checkUserAgainstMap(map, user2);\n }",
"public void createUser(User user);",
"private Appuser newUser() {\n //TODO: get logged user from security context\n String createdBy = \"REST\";\n Appuser au = new Appuser();\n Userdetails ud = new Userdetails();\n boolean idOK = false;\n Long id = 0L;\n while (!idOK) {\n id = EntityIdGenerator.random();\n idOK = !userRepository.exists(id);\n }\n //notNull\n ud.setNotes(\"none\");\n au.setPasswdHash(\"*\");\n au.setCreatedBy(createdBy);\n au.setUserId(id);\n ud.setUserId(id);\n au.setUserdetails(ud);\n return au;\n }",
"User createUser();",
"public void newUser(User user);",
"private User createDummyUser(String userId) {\n\n return new User(userId, \"Usr_\" + userId, new ArrayList<ShoppingList>());\n }",
"private AppUser saveDummyAppUserInstance() {\n\t\tAppUser dummyEntry = new AppUser(//\n\t\t\t\t1L//\n\t\t\t\t, \"a@aa.aa\"//\n\t\t\t\t, \"Pin12345\"//\n\t\t\t\t, 5//\n\t\t\t\t, BehaviourIfPoolWithWrongAnswersIsFull.EMPTY_POOL_UNTIL_ALL_QUESTIONS_CORRECT//\n\t\t\t\t, Calendar.getInstance().getTime()//\n\t\t);\n\t\tAppUser result = appUserRepository.save(dummyEntry);\n\t\treturn result;\n\t}",
"@Test\r\n public void testUpdateUserProfileOfCreatedUser() throws Exception {\r\n UserVO user = new UserVO();\r\n user.setAlias(UUID.randomUUID().toString());\r\n user.setFirstName(UUID.randomUUID().toString());\r\n user.setLastName(UUID.randomUUID().toString());\r\n user.setEmail(UUID.randomUUID().toString() + \"@\" + UUID.randomUUID().toString());\r\n user.setLanguage(Locale.ENGLISH);\r\n user.setRoles(new UserRole[] { UserRole.ROLE_KENMEI_USER });\r\n user.setPassword(UUID.randomUUID().toString());\r\n User dbUser = ServiceLocator.instance().getService(UserManagement.class)\r\n .createUser(user, false, false);\r\n UserProfileVO userProfile = new UserProfileVO();\r\n ServiceLocator.instance().getService(UserProfileManagement.class)\r\n .updateUserProfile(dbUser.getId(), userProfile);\r\n }",
"Human_User createHuman_User();",
"public void setupUser() {\n }",
"@Test\n\tpublic void testUpdateUserWithoutUserid() {\n\t\tUser testUser = new User();\n\t\ttestUser.setUserEmail(TEST_EMAIL);\n\t\ttestUser.setUserPassword(TEST_PASSWORD);\n\t\t\n\t\tgiven().body(testUser).contentType(ContentType.JSON).when()\n\t\t\t\t.put(getBaseTestURI()).then()\n\t\t\t\t.statusCode(HttpServletResponse.SC_BAD_REQUEST);\n\t}",
"Boolean registerNewUser(User user);",
"private String createUser(String name) {\n\t\treturn null;\n\t}",
"Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);",
"private void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }",
"void registerUser(User newUser);",
"@Test\n\tpublic void testUpdateUserWithoutPassword() {\n\t\tUser testUser = new User();\n\t\ttestUser.setUserEmail(TEST_EMAIL);\n\t\ttestUser.setUserId(TEMP_Key);\n\t\t\n\t\tgiven().body(testUser).contentType(ContentType.JSON).when()\n\t\t\t\t.put(getBaseTestURI()).then()\n\t\t\t\t.statusCode(HttpServletResponse.SC_BAD_REQUEST);\n\t}",
"@Test\n\tpublic void testCreateUser() {\n\t\tassertTrue(auctionSystem.createUser(\"toto\", \"Glen\", \"Fiddich\", RoleEnum.SELLER));\n\t\tassertTrue(auctionSystem.createUser(\"tata\", \"Johnnie\", \"Campbell\", RoleEnum.BUYER));\n\t\tassertTrue(auctionSystem.createUser(\"tutu\", \"Ballentine\", \"Darmore\", RoleEnum.SELLER_BUYER));\n\t}",
"int createUser(User data) throws Exception;",
"@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}",
"@Test\n\tpublic void test_update_user_success(){\n\t\tUser user = new User(null, \"fengt\", \"fengt2@itiaoling.com\", \"12345678\");\n\t\ttemplate.put(REST_SERVICE_URI + \"/20\" + ACCESS_TOKEN + token, user);\n\t}",
"@Override\n\tpublic void create(User user) {\n\t\t\n\t}",
"public void setCreateUser(String newVal) {\n if ((newVal != null && this.createUser != null && (newVal.compareTo(this.createUser) == 0)) || \n (newVal == null && this.createUser == null && createUser_is_initialized)) {\n return; \n } \n this.createUser = newVal; \n\n createUser_is_modified = true; \n createUser_is_initialized = true; \n }",
"@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }",
"@Test\n\tpublic void testUpdateUserWithoutEmail() {\n\t\tUser testUser = new User();\n\t\ttestUser.setUserPassword(TEST_PASSWORD);\n\t\ttestUser.setUserId(TEMP_Key);\n\t\t\n\t\tgiven().body(testUser).contentType(ContentType.JSON).when()\n\t\t\t\t.put(getBaseTestURI()).then()\n\t\t\t\t.statusCode(HttpServletResponse.SC_BAD_REQUEST);\n\t}",
"private User createUser(org.picketlink.idm.model.User picketLinkUser) {\n User user = new User(picketLinkUser.getLoginName());\n user.setFullName(picketLinkUser.getFirstName() + \" \" + picketLinkUser.getLastName());\n user.setShortName(picketLinkUser.getLastName());\n return user;\n }",
"@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}",
"@Ignore(\"Test is not done yet\")\n @Test\n public void testChangingUsernameToExisting() {\n final UserRequest request = new UserRequest();\n // We're currently logged in as Austria, so we're trying to change the\n // username to Germany.\n request.setNewUsername(\"germany@iaeste.de\");\n final Response response = administration.controlUserAccount(token, request);\n assertThat(response.getError(), is(IWSErrors.FATAL));\n }",
"private void createUser(String Address, String Phone_number,String needy) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(userId)) {\n userId = mFirebaseDatabase.push().getKey();\n }\n\n com.glitch.annapurna.needy user = new needy(Address,Phone_number,needy);\n\n mFirebaseDatabase.child(userId).setValue(user);\n\n addUserChangeListener();\n }",
"@Test\n public void testSameUser() {\n LocalUserManager ua = new LocalUserManager();\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"gburdell1@gatech.edu\", \"George\", \"Burdell\", \"MANAGER\");\n ua.createUser(\"gburdell2\", \"ramblin\", \"gburdell1@gatech.edu\", \"G\", \"B\", \"USER\");\n } catch (Exception e) {\n Assert.assertEquals(1, ua.getUsers().size());\n return;\n }\n Assert.fail();\n }",
"private void createTestUser() throws InvalidModelException, ConnectionProblemException{\n\t\tSession session = SessionFactoryUtil.getSessionFactory().openSession();\n\t\t\n\t\ttry {\n\t\t\t//Create a new user with seed data\n\t\t\tUser editor = new User();\n\t\t\teditor.setEmail(\"editor@sheffield.ac.uk\");\n\t\t\teditor.setFirstName(\"The\");\n\t\t\teditor.setLastName(\"Editor\");\n\t\t\teditor.setRole(1);\n\t\t\tPasswordHelper passwordHelper = new PasswordHelper(\"password\");\n\t\t\teditor.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\teditor.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\teditor.validateModel();\n\t\t\t\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(editor);\t\n\t\t\tsession.getTransaction().commit();\n\t\t\t\n\t\t\t//Create a new user with seed data\n\t\t\tUser reviewer = new User();\n\t\t\treviewer.setEmail(\"reviewer@sheffield.ac.uk\");\n\t\t\treviewer.setFirstName(\"Mr\");\n\t\t\treviewer.setLastName(\"Reviewer\");\n\t\t\treviewer.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer.validateModel();\n\t\t\t\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(reviewer);\t\n\t\t\tsession.getTransaction().commit();\n\t\t\t\n\t\t\t//Create a new user with seed data\n\t\t\tUser author = new User();\n\t\t\tauthor.setEmail(\"author@sheffield.ac.uk\");\n\t\t\tauthor.setFirstName(\"An\");\n\t\t\tauthor.setLastName(\"Author\");\n\t\t\tauthor.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\tauthor.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\tauthor.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\tauthor.validateModel();\n\t\t\t\n\t\t\tUser reviewer1 = new User();\t\t\t\n\t\t\treviewer1.setEmail(\"reviewer1@sheffield.ac.uk\");\n\t\t\treviewer1.setFirstName(\"Mr\");\n\t\t\treviewer1.setLastName(\"Reviewer1\");\n\t\t\treviewer1.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer1.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer1.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer1.validateModel();\n\t\t\t\n\t\t\tUser reviewer2 = new User();\n\t\t\treviewer2.setEmail(\"reviewer2@sheffield.ac.uk\");\n\t\t\treviewer2.setFirstName(\"Mr\");\n\t\t\treviewer2.setLastName(\"Reviewer2\");\n\t\t\treviewer2.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer2.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer2.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer2.validateModel();\n\t\t\t\n\t\t\tUser reviewer3 = new User();\n\t\t\treviewer3.setEmail(\"reviewer3@sheffield.ac.uk\");\n\t\t\treviewer3.setFirstName(\"Mr\");\n\t\t\treviewer3.setLastName(\"Reviewer3\");\n\t\t\treviewer3.setRole(0);\n\t\t\tpasswordHelper = new PasswordHelper(\"password\");\n\t\t\treviewer3.setPasswordHash(passwordHelper.getPasswordHash());\n\t\t\treviewer3.setPasswordSalt(passwordHelper.getPasswordSalt());\n\t\t\treviewer3.validateModel();\n\t\t\t\n\t\t\tJournal journal = new Journal();\n\t\t\tjournal.setTitle(\"The dissertations\");\n\t\t\tjournal.setAcademicAims(\"The journal aims to outline dissertations written by students from the Department of Computer Sciece at the University of Sheffield.\");\n\t\t\tjournal.setSubmissionGuidelines(\"Each dissertation must be between 30 and 60 pages and it must follow the department's guidelines on 3rd year dissertations.\");\n\t\t\tjournal.validateModel();\n\t\t\t\n\t\t\tVolume volume = new Volume();\n\t\t\tvolume.setPublicationDate(new Date());\n\t\t\tvolume.setVolumeNumber(1);\n\t\t\tvolume.validateModel();\n\t\t\t\n\t\t\tEdition edition = new Edition();\n\t\t\tedition.setPublicationDate(new Date());\n\t\t\tedition.setEditionNumber(1);\n\t\t\tedition.validateModel();\n\t\t\t\n\t\t\tArticle publishedArticle = new Article();\n\t\t\tpublishedArticle.setTitle(\"An example paper\");\n\t\t\tpublishedArticle.setArticle_abstract(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\nLorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\tpublishedArticle.setFileName(\"1431099295403.pdf\");\n\t\t\tpublishedArticle.validateModel();\n\t\t\t\n\t\t\tArticle article = new Article();\n\t\t\tarticle.setTitle(\"Shadow Puppetry Using the Kinect\");\n\t\t\tarticle.setArticle_abstract(\"Shadow puppetry is a form of storytelling where the characters are made from the shadows cast by puppets. The goal of this project is to build a real-time shadow puppet storytelling application using the Microsoft Kinect sensor. Its depth sensing ability is the perfect tool for tracking users and allowing them to control puppets onscreen, just by moving their body. The project is developed in the C++ programming language and uses the Cinder library for image processing. The system includes various image processing techniques to achieve a real-time, depth-based blur effect that is both efficient and visually appealing. It also includes a robust gesture recognition system based on the dynamic time warping algorithm to allow users to interact with the system and to create engaging and varied stories. These stories can be recorded and saved to file for later playback, or exported as video files.\");\n\t\t\tarticle.setFileName(\"1431098947160.pdf\");\n\t\t\tarticle.validateModel();\n\t\t\t\n\t\t\tArticle article1 = new Article();\n\t\t\tarticle1.setTitle(\"D Portraiture System\");\n\t\t\tarticle1.setArticle_abstract(\"The proliferation of 3D printers and their applications inevitably depend on the ease and practicality of 3D model construction. The aim of this project is to create a 3D portraiture system capable of capturing real-world facial data via a 360 degree head-scanning algorithm, processing this information and then reproducing a physical representation in the form of a figurine using custom built hardware from LEGO. The milling machine has been constructed and proven functional by producing several figurines, each with minor improvements over its predecessors. The implementation of the head scanning subsystem has also been successfully completed through the utilisation of a Microsoft â s Kinect for Windows, which generates partially overlapping point clouds that can subsequently be aligned and merged by means of the Iterative Closest Point algorithm. Future development and improvements to the program should be focused in this subsystem since many advanced techniques and enhancements exist that still remain unincorporated.\");\n\t\t\tarticle1.setFileName(\"1431098976887.pdf\");\n\t\t\tarticle1.validateModel();\n\t\t\t\n\t\t\tArticle article2 = new Article();\n\t\t\tarticle2.setTitle(\"Robot Facial Expressions\");\n\t\t\tarticle2.setArticle_abstract(\"The reason that made me choose this project is that I found it extremely interesting howpeople evolved regarding their interaction with machines. Obviously, as the machines became more and more advanced technologically, the human-computer interaction grew. I think that this growth has brought human kind to the point where we can start considering the possibility of emotions being expressed towards a robot, for example, and maybe in the future, from a robot towards a human being. The aim of this project is to take the first step towards that future by observing and studying how an animated man can be the target of our emotions or to see if the interaction with it can make us feel like we could haveemotions towards it.\");\n\t\t\tarticle2.setFileName(\"1431099010458.pdf\");\n\t\t\tarticle2.validateModel();\n\t\t\t\n\t\t\tArticle article3 = new Article();\n\t\t\tarticle3.setTitle(\"Mobile application for prospective and current Computer Science Students\");\n\t\t\tarticle3.setArticle_abstract(\"Nowadays, mobile phones are part of our life to the point where we are dependent on them. We rely on them for a wide variety of chores, from waking us up in the morning to keeping track of our gym routine. \\n The University of Sheffield offers an application that gives access to its students to certain information; however, its contents are very general. That is why this project aims to offer more specific information and tools to the students of the Computer Science department. On top of that, the application also contains information for any prospective Computer Science students. \\n The paper presents an overview of the current operating systems available on the market and then it looks into the applications that perform similar tasks. Using the data obtained through this research, the functional and non-functional requirements are presented and based on these the application is designed. Towards the end of the report, the techniques and algorithms that run the application are being described, along with the methods in which these have been tested. Finally, the report will end with a discussion based on the challenges faced by the project and an application evaluation. \");\n\t\t\tarticle3.setFileName(\"1431099026185.pdf\");\n\t\t\tarticle3.validateModel();\n\t\t\t\t\t\t\t\t\n\t\t\t//Save the user to the database\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(author);\n\t\t\tsession.save(reviewer1);\n\t\t\tsession.save(reviewer2);\n\t\t\tsession.save(reviewer3);\n\t\t\tsession.save(journal);\n\t\t\t\n\t\t\tvolume.setJournal(journal);\n\t\t\tjournal.getVolumes().add(volume);\n\t\t\tsession.save(volume);\n\t\t\t\n\t\t\tedition.setVolume(volume);\n\t\t\tvolume.getEditions().add(edition);\t\t\t\n\t\t\tsession.save(edition);\n\t\t\t\n\t\t\tpublishedArticle.setAuthor(author);\n\t\t\tpublishedArticle.setEdition(edition);\n\t\t\tedition.getArticles().add(publishedArticle);\n\t\t\tsession.save(publishedArticle);\n\t\t\t\n\t\t\tpublishedArticle.setAuthor(author);\n\t\t\tsession.save(publishedArticle);\n\t\t\t\n\t\t\tarticle.setAuthor(author);\n\t\t\tsession.save(article);\n\t\t\t\n\t\t\tarticle1.setAuthor(reviewer1);\n\t\t\tsession.save(article1);\n\t\t\t\n\t\t\tarticle2.setAuthor(reviewer2);\n\t\t\tsession.save(article2);\n\t\t\t\n\t\t\tarticle3.setAuthor(reviewer3);\n\t\t\tsession.save(article3);\n\t\t\t\t\t\t\n\t\t\tReview review1 = new Review();\n\t\t\treview1.setArticle(article1);\n\t\t\treview1.setOverallJudgement(\"champion\");\n\t\t\treview1.setReviewerExpertise(\"outsider\");\n\t\t\treview1.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview1.setSubstantiveCriticism(\"none\");\n\t\t\treview1.setSmallErrors(\"none\");\n\t\t\treview1.setCommentsForEditor(\"Very very good article. Can go to publishing\");\n\t\t\treview1.setReviewer(author);\n\t\t\treview1.validateModel();\n\t\t\tsession.save(review1);\n\n\t\t\tReview review2 = new Review();\n\t\t\treview2.setArticle(article2);\n\t\t\treview2.setOverallJudgement(\"detractor\");\n\t\t\treview2.setReviewerExpertise(\"outsider\");\n\t\t\treview2.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview2.setSubstantiveCriticism(\"none\");\n\t\t\treview2.setSmallErrors(\"a few spelling mistakes\");\n\t\t\treview2.setCommentsForEditor(\"good article!\");\n\t\t\treview2.setReviewer(author);\n\t\t\treview2.validateModel();\n\t\t\tsession.save(review2);\n\t\t\t\n\t\t\tReview review3 = new Review();\n\t\t\treview3.setArticle(article3);\n\t\t\treview3.setOverallJudgement(\"champion\");\n\t\t\treview3.setReviewerExpertise(\"expert\");\n\t\t\treview3.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview3.setSubstantiveCriticism(\"none\");\n\t\t\treview3.setSmallErrors(\"none\");\n\t\t\treview3.setCommentsForEditor(\"Good for publishing\");\n\t\t\treview3.setReviewer(author);\n\t\t\treview3.validateModel();\n\t\t\tsession.save(review3);\n\t\t\t\n\t\t\tReview review4 = new Review();\n\t\t\treview4.setArticle(article);\n\t\t\treview4.setOverallJudgement(\"champion\");\n\t\t\treview4.setReviewerExpertise(\"expert\");\n\t\t\treview4.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview4.setSubstantiveCriticism(\"none\");\n\t\t\treview4.setSmallErrors(\"the indentation is messed up on page 5\");\n\t\t\treview4.setCommentsForEditor(\"need revising but it's good overall\");\n\t\t\treview4.setReviewer(reviewer1);\n\t\t\treview4.validateModel();\n\t\t\tsession.save(review4);\n\t\t\t\n\t\t\tReview review5 = new Review();\n\t\t\treview5.setArticle(article);\n\t\t\treview5.setOverallJudgement(\"champion\");\n\t\t\treview5.setReviewerExpertise(\"outsider\");\n\t\t\treview5.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview5.setSubstantiveCriticism(\"none\");\n\t\t\treview5.setSmallErrors(\"none\");\n\t\t\treview5.setCommentsForEditor(\"perfect!\");\n\t\t\treview5.setReviewer(reviewer2);\n\t\t\treview5.validateModel();\n\t\t\tsession.save(review5);\n\t\t\t\n\t\t\tReview review6 = new Review();\n\t\t\treview6.setArticle(article);\n\t\t\treview6.setOverallJudgement(\"champion\");\n\t\t\treview6.setReviewerExpertise(\"knowledgable\");\n\t\t\treview6.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview6.setSubstantiveCriticism(\"none\");\n\t\t\treview6.setSmallErrors(\"none\");\n\t\t\treview6.setCommentsForEditor(\"good to go!\");\n\t\t\treview6.setReviewer(reviewer3);\n\t\t\treview6.validateModel();\n\t\t\tsession.save(review6);\n\t\t\t\n\t\t\tReview review7 = new Review();\n\t\t\treview7.setArticle(publishedArticle);\n\t\t\treview7.setOverallJudgement(\"champion\");\n\t\t\treview7.setReviewerExpertise(\"expert\");\n\t\t\treview7.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview7.setSubstantiveCriticism(\"None\");\n\t\t\treview7.setSmallErrors(\"Spelling mistakes here and there.\");\n\t\t\treview7.setCommentsForEditor(\"Very good article!\");\n\t\t\treview7.setReviewer(reviewer1);\n\t\t\treview7.validateModel();\n\t\t\tsession.save(review7);\n\t\t\t\n\t\t\tReview review8 = new Review();\n\t\t\treview8.setArticle(publishedArticle);\n\t\t\treview8.setOverallJudgement(\"champion\");\n\t\t\treview8.setReviewerExpertise(\"knowledgable\");\n\t\t\treview8.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview8.setSubstantiveCriticism(\"Not properly organized into sections. The article does not flow\");\n\t\t\treview8.setSmallErrors(\"Gammar mistakes and spelling mistakes\");\n\t\t\treview8.setCommentsForEditor(\"Good article but need revising\");\n\t\t\treview8.setReviewer(reviewer2);\n\t\t\treview8.validateModel();\n\t\t\tsession.save(review8);\n\t\t\t\n\t\t\tReview review9 = new Review();\n\t\t\treview9.setArticle(publishedArticle);\n\t\t\treview9.setOverallJudgement(\"champion\");\n\t\t\treview9.setReviewerExpertise(\"outsider\");\n\t\t\treview9.setArticleSummary(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. \\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \\n It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\");\n\t\t\treview9.setSubstantiveCriticism(\"None\");\n\t\t\treview9.setSmallErrors(\"Losts of grammar code\");\n\t\t\treview9.setCommentsForEditor(\"N/A\");\n\t\t\treview9.setReviewer(reviewer3);\n\t\t\treview9.validateModel();\n\t\t\tsession.save(review9);\n\t\t\t\n\t\t\tsession.getTransaction().commit();\n\t\t\tsession.close();\n\t\t\t\n\t\t\tUserDao.setArticleToReview(article1, author);\n\t\t\tUserDao.setArticleToReview(article2, author);\n\t\t\tUserDao.setArticleToReview(article3, author);\n\t\t\tUserDao.setArticleToReview(article, reviewer1);\n\t\t\tUserDao.setArticleToReview(article, reviewer2);\n\t\t\tUserDao.setArticleToReview(article, reviewer3);\n\t\t\t\n\t\t\tLOGGER.log(Level.FINE, \"Created seed user\");\n\t\t\treturn;\n\t\t} catch (InvalidModelException ex) {\n\t\t\t//If there was any invalid User information then log and throw the message up to the user\n\t\t\tLOGGER.log(Level.INFO, ex.getMessage());\n\t\t\tsession.close();\n\t\t\tthrow ex;\n\t\t} catch (ConstraintViolationException ex) {\n\t\t\t//If an unexpected error occurred then log, attempt to rollback and then throw a user friendly error\n\t\t\tLOGGER.log(Level.SEVERE, ex.getCause().getMessage());\n\t\t\tsession.getTransaction().rollback();\n\t\t\tsession.close();\n\t\t\tthrow new InvalidModelException(\"The seed data entered is invalid, please check and try again.\");\n\t\t} catch (Exception ex) {\n\t\t\t//If an unexpected error occurred then log, attempt to rollback and then throw a user friendly error\n\t\t\tLOGGER.log(Level.SEVERE, ex.getMessage());\n\t\t\tsession.getTransaction().rollback();\n\t\t\tsession.close();\n\t\t\tthrow new ConnectionProblemException(\"A problem occurred and seeding could not be completed.\");\n\t\t}\n\t}",
"private void createNewUser(final User unmanagedUser) {\n Realm realm = (mRealm == null) ? Realm.getDefaultInstance() : mRealm;\n //create by administrator\n realm.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n User u2 = realm.createObject(User.class, PrimaryKeyFactory.getInstance().nextKey(User.class));\n u2.setLoggedIn(false);\n u2.setUserId(unmanagedUser.getUserId());\n\n String password = unmanagedUser.getPassword();\n if (password == null) {\n password = \"\";\n }\n u2.setPassword(password);\n\n u2.setUserName(unmanagedUser.getUserName());\n u2.setStartDate(unmanagedUser.getStartDate());\n u2.setEndDate(unmanagedUser.getEndDate());\n u2.setCreated(new Date());\n u2.setActive(unmanagedUser.getActive());\n u2.setSpecial(false);\n u2.setPermission(unmanagedUser.getPermission());\n u2.setEnabled(unmanagedUser.getEnabled());\n }\n });\n\n if (mRealm == null)\n realm.close();\n }",
"void editUser(String uid, User newUser);",
"public void setCreateUser(User createUser)\r\n/* */ {\r\n/* 151 */ this.createUser = createUser;\r\n/* */ }",
"void createUser(User newUser, String token) throws AuthenticationException, InvalidUserException, UserAlreadyExistsException;",
"@Test\n public void testCreateOnBehalfUser() throws Exception {\n String password = \"abcdef\";\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), password);\n checkCreatedUser(result, customer, password, false);\n }",
"User createUser(User user);",
"GenerateUserAccount () {\r\n }",
"@Test\n public void updateUser() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n assertTrue(userResource.updateUser(new User(\"dummy\", \"dummyUPDATED\", 2)));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }",
"public void updateUser(int uid, String name, String phone, String email, String password, int money, int credit);",
"BaseUser createAdminUser(Application application);",
"@Test\n\tpublic void newUser() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\n\t\tassertThat(user).isNotNull();\n\t\tassertThat(user).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t}",
"public void creatUser(String name, String phone, String email, String password);",
"@Test\n public void testCreateAccountWithoutPassword() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"beta@gamma.net\");\n createUserRequest.setFirstname(\"Beta\");\n createUserRequest.setLastname(\"Gamma\");\n\n // Now, perform the actual test - create the Account, and verify that\n // the response is ok, and that a Notification was sent\n final Response result = administration.createUser(token, createUserRequest);\n assertThat(result.isOk(), is(true));\n // Creating a new User should generate an Activate User notification\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n assertThat(spy.size(type), is(1));\n final String activationCode = spy.getNext(type).getFields().get(NotificationField.CODE);\n assertThat(activationCode, is(not(nullValue())));\n\n // Check that the user is in the list of members\n final String memberGroupId = findMemberGroup(token).getGroupId();\n token.setGroupId(memberGroupId);\n final FetchGroupRequest groupRequest = new FetchGroupRequest(memberGroupId);\n final FetchGroupResponse groupResponse = administration.fetchGroup(token, groupRequest);\n assertThat(groupResponse, is(not(nullValue())));\n }",
"@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}",
"private void initUser() {\n\t}",
"@Override\n\tpublic User createNewUser(Account account) {\n\t\treturn new User(account);\n\t\t\n\t}",
"@Test\n public void testCreateValidUser() {\n LocalUserManager ua = new LocalUserManager();\n\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"gburdell1@gatech.edu\", \"George\", \"Burdell\", \"MANAGER\");\n } catch (Exception e) {\n Assert.fail();\n }\n Assert.assertEquals(1, ua.getUsers().size());\n Assert.assertEquals(\"gburdell1\", ua.getUsers().get(0).getUsername());\n Assert.assertEquals(\"gburdell1@gatech.edu\", ua.getUsers().get(0).getEmail());\n Assert.assertEquals(UserClass.MANAGER, ua.getUsers().get(0).getUserClass());\n }",
"@Override\n\tpublic ApplicationResponse createUser(UserRequest request) {\n\t\tUserEntity entity = repository.save(modeltoentity.apply(request));\n\t\tif (entity != null) {\n\t\t\treturn new ApplicationResponse(true, \"Success\", enitytomodel.apply(entity));\n\t\t}\n\t\treturn new ApplicationResponse(false, \"Failure\", enitytomodel.apply(entity));\n\t}",
"public void createUser(int usertype) {\n\t\tthePerson = PersonFactory.getPerson(usertype);\n\t}",
"public UserProfile createUserProfile(String username, UserProfile newProfile);",
"public void createUserAccount(UserAccount account);",
"private void createUser(final String email, final String password) {\n\n }",
"private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }",
"public void userSignup(String email_addr, String user_pw){\n\n String uuid_str = UUID.randomUUID().toString().replaceAll(\"-\", \"\");\n uuid_str = uuid_str.substring(0, 5);\n int uuid = Integer.parseInt(uuid_str);\n UserProfile new_user = new UserProfile(uuid, email_addr, user_pw);\n userDataAccessService.storeUserInfo(new_user.getUser_id(), new_user.getEmail_addr(), new_user.getUser_pw());\n\n }",
"public Person createAdminUser(Register entity) {\t\t\n\t\tPerson person = new Person();\n\t\tif(!searchPersonNew(entity)) {\t\t\t\n\t\t\tperson = factory.createPerson(entity);\t\t\t\t\t\t\n\t\t\tcreate(person);\t\t\t\n\t\t}\t\t\n\t\treturn person;\n\t}",
"CreateUserResult createUser(CreateUserRequest createUserRequest);",
"boolean create(User user) throws Exception;",
"int newUser(String username, String password, Time creationTime);",
"private void managePreCreatedUsers() {\n int numberRequestedGuests = CarProperties.number_pre_created_guests().orElse(0);\r\n int numberRequestedUsers = CarProperties.number_pre_created_users().orElse(0);\r\n Slog.i(TAG, \"managePreCreatedUsers(): OEM asked for \" + numberRequestedGuests\r\n + \" guests and \" + numberRequestedUsers + \" users\");\r\n if (numberRequestedGuests < 0 || numberRequestedUsers < 0) {\r\n Slog.w(TAG, \"preCreateUsers(): invalid values provided by OEM; \"\r\n + \"number_pre_created_guests=\" + numberRequestedGuests\r\n + \", number_pre_created_users=\" + numberRequestedUsers);\r\n return;\r\n }\r\n\r\n if (numberRequestedGuests == 0 && numberRequestedUsers == 0) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): not defined by OEM\");\r\n return;\r\n }\r\n\r\n // Then checks how many exist already\r\n List<UserInfo> allUsers = mUserManager.getUsers(/* excludePartial= */ true,\r\n /* excludeDying= */ true, /* excludePreCreated= */ false);\r\n\r\n int allUsersSize = allUsers.size();\r\n if (DBG) Slog.d(TAG, \"preCreateUsers: total users size is \" + allUsersSize);\r\n\r\n int numberExistingGuests = 0;\r\n int numberExistingUsers = 0;\r\n\r\n // List of pre-created users that were not properly initialized. Typically happens when\r\n // the system crashed / rebooted before they were fully started.\r\n SparseBooleanArray invalidUsers = new SparseBooleanArray();\r\n\r\n for (int i = 0; i < allUsersSize; i++) {\r\n UserInfo user = allUsers.get(i);\r\n if (!user.preCreated) continue;\r\n if (!user.isInitialized()) {\r\n Slog.w(TAG, \"Found invalid pre-created user that needs to be removed: \"\r\n + user.toFullString());\r\n invalidUsers.append(user.id, /* notUsed=*/ true);\r\n continue;\r\n }\r\n if (user.isGuest()) {\r\n numberExistingGuests++;\r\n } else {\r\n numberExistingUsers++;\r\n }\r\n }\r\n if (DBG) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): system already has \" + numberExistingGuests\r\n + \" pre-created guests,\" + numberExistingUsers + \" pre-created users, and these\"\r\n + \" invalid users: \" + invalidUsers );\r\n }\r\n\r\n int numberGuests = numberRequestedGuests - numberExistingGuests;\r\n int numberUsers = numberRequestedUsers - numberExistingUsers;\r\n int numberInvalidUsers = invalidUsers.size();\r\n\r\n if (numberGuests <= 0 && numberUsers <= 0 && numberInvalidUsers == 0) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): all pre-created and no invalid ones\");\r\n return;\r\n }\r\n\r\n // Finally, manage them....\r\n\r\n // In theory, we could submit multiple user pre-creations in parallel, but we're\r\n // submitting just 1 task, for 2 reasons:\r\n // 1.To minimize it's effect on other system server initialization tasks.\r\n // 2.The pre-created users will be unlocked in parallel anyways.\r\n new Thread( () -> {\r\n TimingsTraceLog t = new TimingsTraceLog(TAG, Trace.TRACE_TAG_SYSTEM_SERVER);\r\n\r\n t.traceBegin(\"preCreateUsers\");\r\n if (numberUsers > 0) {\r\n preCreateUsers(t, numberUsers, /* isGuest= */ false);\r\n }\r\n if (numberGuests > 0) {\r\n preCreateUsers(t, numberGuests, /* isGuest= */ true);\r\n }\r\n t.traceEnd();\r\n\r\n if (numberInvalidUsers > 0) {\r\n t.traceBegin(\"removeInvalidPreCreatedUsers\");\r\n for (int i = 0; i < numberInvalidUsers; i++) {\r\n int userId = invalidUsers.keyAt(i);\r\n Slog.i(TAG, \"removing invalid pre-created user \" + userId);\r\n mUserManager.removeUser(userId);\r\n }\r\n t.traceEnd();\r\n }\r\n }, \"CarServiceHelperManagePreCreatedUsers\").start();\r\n }",
"@Test\n public void testCreateUserWithExistingUsername() {\n final String username = \"michael.pickelbauer@iaeste.at\";\n final CreateUserRequest request1 = new CreateUserRequest(username, \"Michael\", \"Pickelbauer\");\n final CreateUserRequest request2 = new CreateUserRequest(username, \"Hugo\", \"Mayer\");\n\n // Now let's create the two user accounts\n final CreateUserResponse response1 = administration.createUser(token, request1);\n final CreateUserResponse response2 = administration.createUser(token, request2);\n\n // The first request should work like a charm\n assertThat(response1, is(not(nullValue())));\n assertThat(response1.isOk(), is(true));\n\n // The second request should fail, as we already have a user with this\n // username in the system\n assertThat(response2, is(not(nullValue())));\n assertThat(response2.isOk(), is(false));\n assertThat(response2.getError(), is(IWSErrors.USER_ACCOUNT_EXISTS));\n assertThat(response2.getMessage(), is(\"An account for the user with username \" + username + \" already exists.\"));\n }",
"public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}",
"@Test\n\tpublic void testUpdateUser() {\n\t\tLogin login = new Login(\"unique_username_4324321\", \"password\");\n\t\t//login is encrypted in createUser method\n\t\tResponse response = createUser(login);\n\t\t//printResponse(response);\n\t\tassertEquals(Status.OK.getStatusCode(), response.getStatus());\n\t\t\n\t\t//update the user\n\t\tLogin update = new Login(\"unique_username_53428971\", \"a_different_password\");\n\t\tupdate.encryptPassword(passwordEncryptionKey);\n\t\tString resource = \"update_user\";\n\t\tString requestType = \"POST\";\n\t\tList<Login> updateLogins = Arrays.asList(login, update);\n\t\t\n\t\tresponse = sendRequest(resource, requestType, Entity.entity(updateLogins, MediaType.APPLICATION_JSON));\n\t\t//printResponse(response);\n\t\tassertEquals(Status.OK.getStatusCode(), response.getStatus());\n\t}",
"@Test\n public void testCreateUser() throws InvalidUserException {\n //Arrange\n User user = new User();\n user.setEmail(\"user@email.com\");\n user.setFirstName(\"first\");\n user.setLastName(\"last\");\n user.setPassword(\"pass\");\n user.setRole(\"admin\");\n \n //Act\n User createdUser = userService.createUser(user);\n User fetchedUser = userService.readUser(createdUser.getUserId());\n \n //Assert\n assertEquals(fetchedUser.getUserId(), createdUser.getUserId());\n assertEquals(fetchedUser.getEmail(), \"user@email.com\");\n assertEquals(fetchedUser.getFirstName(), \"first\");\n \n }",
"UserCreateResponse createUser(UserCreateRequest request);",
"public void insertUser() {}",
"@Test\n\tpublic void testCreateUser(){\n\t\trepository.createUser(expectedUser);\n\t\tSystem.out.println(\"#########################>User inserted into database<#########################\");\n\t\tUser actualUser = repository.findByUsername(\"vgeorga\");\n\t\tassertEquals(expectedUser.getUsername(), actualUser.getUsername());\n\t}",
"public static void createMysqlUser(Eleve e) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"CREATE USER '\" + e.getAbreviation() + \"'@'%' IDENTIFIED BY '\" + e.getPwd() + \"'; \";\r\n System.out.println(SQLRequest);\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }",
"@Test\n\tpublic void testUpdateUser_wrongUsername() {\n\t\tLogin login = new Login(\"unique_username_14365432\", \"password\");\n\t\tResponse response = createUser(login);\n\t\t//printResponse(response);\n\t\tassertEquals(Status.OK.getStatusCode(), response.getStatus());\n\t\t\n\t\t//update the user\n\t\tLogin update = new Login(\"unique_username_645324\", \"a_different_password\");\n\t\tupdate.encryptPassword(passwordEncryptionKey);\n\t\t//change the password (to test a wrong password)\n\t\tlogin.setUsername(\"a_not_existing_username_64234e985243\");\n\t\tString resource = \"update_user\";\n\t\tString requestType = \"POST\";\n\t\t\n\t\tList<Login> updateLogins = Arrays.asList(login, update);\n\t\t\n\t\tresponse = sendRequest(resource, requestType, Entity.entity(updateLogins, MediaType.APPLICATION_JSON));\n\t\t//printResponse(response);\n\t\tassertEquals(Status.NOT_FOUND.getStatusCode(), response.getStatus());\n\t}",
"@Test\n\tpublic void testUpdateUser_onlyOneLoginWithNoUpdate() {\n\t\tLogin login = new Login(\"unique_username_8132645123\", \"password\");\n\t\tResponse response = createUser(login);\n\t\t//printResponse(response);\n\t\tassertEquals(Status.OK.getStatusCode(), response.getStatus());\n\t\t\n\t\t//update the user with only one login\n\t\tString resource = \"update_user\";\n\t\tString requestType = \"POST\";\n\t\tList<Login> updateLogins = Arrays.asList(login);\n\t\t\n\t\tresponse = sendRequest(resource, requestType, Entity.entity(updateLogins, MediaType.APPLICATION_JSON));\n\t\t//printResponse(response);\n\t\tassertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus());\n\t}",
"public User createUser() {\n printer.println(\"Welcome! Enter you name and surname:\");\n printer.println(\"Name:\");\n String name = input.nextString();\n printer.println(\"Surname:\");\n String surname = input.nextString();\n return new User(name, surname);\n }",
"@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }",
"@Test\n public void testModifyUser() throws Exception {\n\n User user = userDao.retrieveById(\"uuid123123123\");\n user.setUsername(\"newbody4\");\n\n Boolean result = userDao.update(user);\n Assert.assertTrue(result);\n }",
"public User createUser(User newUser) {\n if(userRepository.findByUsername(newUser.getUsername()) != null){\n throw new UsernameException(\"The username is already taken please choose another one\");\n }\n newUser.setToken(\"dummy_token\"); //not really needed after registration;\n\n newUser.setStatus(UserStatus.ONLINE);\n userRepository.save(newUser); //userRepository creates User entity for the first time\n\n newUser.setToken(generateToken(newUser));\n userRepository.save(newUser); //userRepository saves the new entity items to existing user\n\n log.debug(\"Created Information for User: {}\", newUser);\n return newUser;\n }",
"UserModel createUserModel(UserModel userModel);",
"@Test\n public void testSaveEditUserCommandModel() throws Exception {\n BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();\n User user = new User();\n user.setUsername(\"Tephon\");\n user.setPassword(\"password\");\n \n \n ArrayList<String> authority1 = new ArrayList();\n authority1.add(\"ROLE_USER\");\n \n User existingUser = userServiceLayer.createUser(user);\n \n EditUserCommandModel commandModel = new EditUserCommandModel();\n commandModel.setId(existingUser.getId());\n commandModel.setUsername(\"Cheesy\");\n commandModel.setPassword(\"provolone1\");\n commandModel.setAuthorities(authority1);\n \n \n User userFromModel = userWebServices.saveEditUserCommandModel(commandModel, \"Tephon\");\n \n assert userFromModel.getId() != 0;\n assert userFromModel.getUsername().equals(\"Cheesy\");\n\n }",
"@Test\n\tpublic void testAddUser() {\n\t\tresetTestVars();\n\t\tuser1.setID(\"1\");\n\t\tuser2.setID(\"1\");\n\t\tassertFalse(\"User is invalid\", sn.addUser(user3));\n\t\tassertTrue(\"User is valid\", sn.addUser(user1));\n\t\tassertFalse(\"Same user cant be added\", sn.addUser(user1));\n\t\tassertFalse(\"ID already exists\", sn.addUser(user2));\n\t}",
"public void new_user(){\n }",
"public void createAdmin()\r\n\t{\r\n\t\tSystem.out.println(\"Administrator account not exist, please create the administrator account by setting up a password for it.\");\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter the password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter the password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(\"administrator\",hash_password,\"administrator\",\"\",0,0,last_login,false));\r\n\t\tSystem.out.println(\"Administrator account created successfully!\");\r\n\t}",
"void setName( String username, String name ) throws UserNotFoundException;",
"public void dummyUsersToDB(){\n\t\tUser nick = new User(db,\"Nick\",9);\n\t\tUser lin = new User(db,\"Lin\",10);\n\t\tUser evan = new User(db,\"Evan\",8);\n\t\tUser karthik = new User(db,\"Karthik\",10);\n\t\tUser bernadette = new User(db,\"Bernadette\",8);\n\t\tUser james = new User(db,\"James\",7);\n\t}",
"@Test\n void testUpdateUser() {\n String password = \"testPassword\";\n User updateUser = (User) userData.crud.getById(1);\n updateUser.setPassword(password);\n userData.crud.updateRecords(updateUser);\n User getUser = (User) userData.crud.getById(1);\n assertEquals(getUser, updateUser);\n logger.info(\"Updated the password for ID: \" + updateUser.getId());\n }",
"@Test\n public void testUsernameChange() {\n final String username = \"harvey@iaeste.us\";\n // There was a bug related to the Changing of Username, as it failed if\n // the password contained upper/lower case letters. Since IWS followed\n // the rule from IW3 and only looked at Passwords case insensitive.\n final String password = \"Harvey's password which is SUPER secret.\";\n final CreateUserRequest createRequest = new CreateUserRequest(username, password, \"Harvey\", \"Rabbit\");\n final CreateUserResponse createResponse = administration.createUser(token, createRequest);\n assertThat(createResponse.isOk(), is(true));\n\n // To ensure that we can use the account, we have to activate it. Once\n // it is activated, we can move on to the actual test.\n final String activationCode = readCode(NotificationType.ACTIVATE_NEW_USER);\n final Response activateResponse = administration.activateUser(activationCode);\n assertThat(activateResponse.isOk(), is(true));\n\n // Now we have a fresh new account which is active. So we can now try to\n // change the Username. To do this, we have to log in as the user, since\n // only a user may change his/her own username.\n final String newUsername = \"rabbit@iaeste.us\";\n final AuthenticationToken myToken = login(username, password);\n // We're building the request with the user itself as User Object\n final UserRequest updateRequest = new UserRequest(createResponse.getUser());\n // We're setting a new username here, which we can use.\n updateRequest.setNewUsername(newUsername);\n // To update the username, we need to provide some credentials,\n // otherwise the IWS will reject the request. This is needed to ensure\n // that nobody is attempting to hijack an active account.\n updateRequest.setPassword(password);\n // Let's just clear the Spy before we're using it :-)\n final Response updateResponse = administration.controlUserAccount(myToken, updateRequest);\n assertThat(updateResponse.isOk(), is(true));\n // Changing username must work without being logged in, well actually\n // it doesn't matter. As it doesn't use the current Session.\n logout(myToken);\n // Now, we can read out the update Code from the Notifications, which\n // is a cheap way of reading the value from the e-mail that is send.\n final String updateCode = readCode(NotificationType.UPDATE_USERNAME);\n final Response resetResponse = administration.updateUsername(updateCode);\n assertThat(resetResponse.isOk(), is(true));\n\n // Final part of the test, login with the new username, and ensure that\n // the UserId we're getting is the same as the previous Id.\n final AuthenticationToken newToken = login(newUsername, password);\n assertThat(newToken, is(not(nullValue())));\n final FetchPermissionResponse permissionResponse = access.fetchPermissions(newToken);\n assertThat(permissionResponse.isOk(), is(true));\n assertThat(permissionResponse.getAuthorizations().get(0).getUserGroup().getUser().getUserId(), is(createResponse.getUser().getUserId()));\n logout(newToken);\n // And done - Long test, but worth it :-)\n }",
"public ApplicationUser createUserProfile(ApplicationUser applicationUser){\n int min = 105;\n int max = 200;\n int random_int = (int)Math.floor(Math.random()*(max-min+1)+min);\n applicationUser.setAdminId(Integer.toString(random_int));\n applicationUser.setActive(\"Y\");\n applicationUser = mongoDbConnector.createUserProfile(applicationUser);\n return applicationUser;\n }",
"User modifyUser(Long user_id, User user);",
"@Override\n public ApiResponse createUser(SignupDto signupDto){\n var userRole = this.roleDAO.findByName(RoleEnum.USER);\n Set<Role> userRoles = new HashSet<Role>(Collections.singletonList(userRole.get()));\n\n Person newPerson = new Person();\n newPerson.setEmail(signupDto.getUsername());\n newPerson.setFirstName(signupDto.getFirstName());\n newPerson.setLastName(signupDto.getLastName());\n newPerson.setRoles(userRoles);\n\n // Encriptamos la contraseña que nos mando el usuario\n var encryptedPassword = this.passwordEncoder.encode(signupDto.getPassword());\n newPerson.setPassword(encryptedPassword);\n\n this.personDAO.save(newPerson);\n\n return new ApiResponse(true, \"Usuario creado\");\n\n }",
"User createUser(UserCreationModel user);",
"@Test\n void createUserReturnsNull() {\n Address address = new Address(\"Earth\", \"Belgium\", \"City\", \"Street\", 0);\n User user = new User(\"Mira\", \"Vogelsang\", \"0412345678\", \"maarten@maarten\", \"pass\", address);\n\n assertNull(controller.createUser(user));\n }",
"private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}",
"void addUser(String uid, String firstname, String lastname, String pseudo);",
"public static void createOrUpdateUser(String id, String provider,String fullName,String email,String image) {\r\n\tString key = id.toLowerCase()+provider.toLowerCase();\r\n Entity user = getSingleUser(key);\r\n if (user == null) {\r\n user = new Entity(\"User\", key);\r\n user.setProperty(\"eMail\", email);\r\n user.setProperty(\"id\", id);\r\n user.setProperty(\"provider\", provider);\r\n user.setProperty(\"fullName\", fullName);\r\n user.setProperty(\"image\", image);\r\n\r\n //user.setProperty(\"userKey\", user.getKey());\r\n } else {\r\n \t/*\r\n \t * no Updation allowed for user\r\n if (fullName != null && !\"\".equals(fullName)) {\r\n user.setProperty(\"fullName\", fullName);\r\n }\r\n if (email != null && !\"\".equals(email) && !\"undefined\".equals(email)) {\r\n user.setProperty(\"eMail\", email);\r\n }\r\n */\r\n if (image != null && !\"\".equals(image) && !\"undefined\".equals(image)) {\r\n user.setProperty(\"image\", image);\r\n }\r\n \t\r\n }\r\n Util.persistEntity(user);\r\n }",
"public Boolean updateUserData (User currentUser){ //throws Exception if user not existing in database\n\n if(userRepository.existsById(currentUser.getId())){\n User temp_user = getUserById(currentUser.getId());\n\n temp_user.setUsername(currentUser.getUsername());\n temp_user.setBirthday_date(currentUser.getBirthday_date());\n userRepository.save(temp_user);\n\n return true;\n }else{\n throw new UnknownUserException(\"This user doesn't exist and can therefore not be updated\");\n }\n }",
"@Test\n\n public void create() {\n User user = new User();\n user.setAccount(\"TestUser03\");\n user.setEmail(\"TestUser03@gmail.com\");\n user.setPhoneNumber(\"010-1111-3333\");\n user.setCreatedAt(LocalDateTime.now());\n user.setCreatedBy(\"TestUser3\");\n\n User newUser = userRepository.save(user);\n System.out.println(\"newUser : \" + newUser);\n }",
"@Override\n\tpublic boolean create(User user) {\n\t\treturn false;\n\t}",
"public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}",
"@Test\n public void createUserTestTest()\n {\n HashMap<String, Object> values = new HashMap<String, Object>();\n values.put(\"age\", \"22\");\n values.put(\"dob\", new Date());\n values.put(\"firstName\", \"CreateFName\");\n values.put(\"lastName\", \"CreateLName\");\n values.put(\"middleName\", \"CreateMName\");\n values.put(\"pasword\", \"user\");\n values.put(\"address\", \"CreateAddress\");\n values.put(\"areacode\", \"CreateAddressLine\");\n values.put(\"city\", \"CreateCity\");\n values.put(\"country\", \"CreateCountry\");\n values.put(\"road\", \"CreateRoad\");\n values.put(\"suberb\", \"CreateSuberb\");\n values.put(\"cell\", \"CreateCell\");\n values.put(\"email\", \"user\");\n values.put(\"homeTell\", \"CreateHomeTell\");\n values.put(\"workTell\", \"CreateWorkTell\");\n createUser.createNewUser(values);\n\n Useraccount useraccount = useraccountCrudService.findById(ObjectId.getCurrentUserAccountId());\n Assert.assertNotNull(useraccount);\n\n Garage garage = garageCrudService.findById(ObjectId.getCurrentGarageId());\n Assert.assertNotNull(garage);\n\n Saleshistory saleshistory = saleshistoryCrudService.findById(ObjectId.getCurrentSalesHistoryId());\n Assert.assertNotNull(saleshistory);\n }",
"@BeforeClass(alwaysRun = true)\r\n\tpublic void createUser() throws ParseException, SQLException, JoseException {\r\n\t\tSystem.out.println(\"******STARTING***********\");\r\n\t\tUser userInfo = User.builder().build();\r\n\t\tuserInfo.setUsername(userName);\r\n\t\tuserInfo.setPassword(\"Test@123\");\r\n\t\tsessionObj = EnvSession.builder().cobSession(config.getCobrandSessionObj().getCobSession())\r\n\t\t\t\t.path(config.getCobrandSessionObj().getPath()).build();\r\n\t\t//userHelper.getUserSession(\"InsightsEngineusers26 \", \"TEST@123\", sessionObj); \r\n\t\tuserHelper.getUserSession(userInfo, sessionObj);\r\n\t\tlong providerId = 16441;\r\n\t\tproviderAccountId = providerId;\r\n\t\tResponse response = providerAccountUtils.addProviderAccountStrict(providerId, \"fieldarray\",\r\n\t\t\t\t\"budget1_v1.site16441.1\", \"site16441.1\", sessionObj);\r\n\t\tproviderAccountId = response.jsonPath().getLong(JSONPaths.PROVIDER_ACC_ID);\r\n\t\tAssert.assertTrue(providerAccountId!=null);\r\n\t\t\r\n\t\t}"
] | [
"0.727132",
"0.71717304",
"0.69853127",
"0.6949588",
"0.6904563",
"0.6902632",
"0.6865602",
"0.6864342",
"0.6853835",
"0.6853763",
"0.67912316",
"0.6773971",
"0.6765612",
"0.67148733",
"0.6692692",
"0.667534",
"0.6666473",
"0.6664004",
"0.6656607",
"0.6635528",
"0.6627075",
"0.6618583",
"0.6606823",
"0.6593618",
"0.6554436",
"0.65231895",
"0.65123916",
"0.65032876",
"0.6501667",
"0.6490493",
"0.6490458",
"0.6480638",
"0.64725184",
"0.64617836",
"0.6459785",
"0.64557797",
"0.6442665",
"0.6434765",
"0.64309007",
"0.64182806",
"0.6414226",
"0.64124304",
"0.6410764",
"0.6407635",
"0.6406689",
"0.64046377",
"0.640409",
"0.64000124",
"0.6399547",
"0.639921",
"0.63910705",
"0.6382793",
"0.6373438",
"0.6371896",
"0.63716435",
"0.63430697",
"0.634126",
"0.6335476",
"0.6326738",
"0.63084763",
"0.63054466",
"0.6298074",
"0.62976587",
"0.62935364",
"0.6291953",
"0.628754",
"0.62831366",
"0.62795484",
"0.6279",
"0.6278523",
"0.6278194",
"0.62668085",
"0.62556493",
"0.62467736",
"0.623937",
"0.62313217",
"0.6226581",
"0.62232584",
"0.6221663",
"0.62210923",
"0.62158746",
"0.621336",
"0.62097096",
"0.6207638",
"0.6199383",
"0.618999",
"0.61844933",
"0.6181975",
"0.6181855",
"0.618028",
"0.61777693",
"0.6173993",
"0.617387",
"0.61722356",
"0.6167666",
"0.61648774",
"0.61631095",
"0.6161781",
"0.61617064",
"0.6159373"
] | 0.63174886 | 59 |
Create dummy user to delete | @Test
public void removeUser() {
userDAO.createUser(new User("dummy", "dummy", 1));
assertTrue(userResource.removeUser("dummy"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void deleteNewAccount() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"gamma@beta.net\");\n createUserRequest.setFirstname(\"Gamma\");\n createUserRequest.setLastname(\"Beta\");\n\n // First, we create the User account that we wish to delete\n final CreateUserResponse response = administration.createUser(token, createUserRequest);\n assertThat(response.isOk(), is(true));\n\n // Now, try to delete the account\n final UserRequest request = new UserRequest();\n request.setUser(response.getUser());\n request.setNewStatus(UserStatus.DELETED);\n final Response deletedUserResponse = administration.controlUserAccount(token, request);\n\n assertThat(deletedUserResponse, is(not(nullValue())));\n assertThat(deletedUserResponse.isOk(), is(true));\n }",
"@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearUsersTest() {\r\n\r\n\t\tpd.crearUsers();\r\n\t\tpd.pm.deletePersistent(pd.user1);\r\n\r\n\t}",
"public void deleteUser(String name);",
"@Test\n public void testCreateAccountWithoutPassword() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"beta@gamma.net\");\n createUserRequest.setFirstname(\"Beta\");\n createUserRequest.setLastname(\"Gamma\");\n\n // Now, perform the actual test - create the Account, and verify that\n // the response is ok, and that a Notification was sent\n final Response result = administration.createUser(token, createUserRequest);\n assertThat(result.isOk(), is(true));\n // Creating a new User should generate an Activate User notification\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n assertThat(spy.size(type), is(1));\n final String activationCode = spy.getNext(type).getFields().get(NotificationField.CODE);\n assertThat(activationCode, is(not(nullValue())));\n\n // Check that the user is in the list of members\n final String memberGroupId = findMemberGroup(token).getGroupId();\n token.setGroupId(memberGroupId);\n final FetchGroupRequest groupRequest = new FetchGroupRequest(memberGroupId);\n final FetchGroupResponse groupResponse = administration.fetchGroup(token, groupRequest);\n assertThat(groupResponse, is(not(nullValue())));\n }",
"void deleteUser(int id);",
"@Test\n public void testDeletingActiveUser() {\n // 1. Login as Austria\n // - The test is using Austria per default\n // 2. Create a new User\n final String username = \"mozart@iaeste.at\";\n final CreateUserRequest createRequest = new CreateUserRequest(username, \"Wolfgang\", \"Amadeus\");\n final CreateUserResponse createResponse = administration.createUser(token, createRequest);\n assertThat(createResponse.isOk(), is(true));\n\n // 3. Activate the NEW User\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n final NotificationField field = NotificationField.CODE;\n final String activationCode = spy.getNext(type).getFields().get(field);\n final Response activateResponse = administration.activateUser(activationCode);\n assertThat(activateResponse.isOk(), is(true));\n\n // 4. Delete the ACTIVE User\n final UserRequest deleteRequest = new UserRequest();\n deleteRequest.setUser(createResponse.getUser());\n deleteRequest.setNewStatus(UserStatus.DELETED);\n final Response deleteResponse = administration.controlUserAccount(token, deleteRequest);\n assertThat(deleteResponse.isOk(), is(true));\n }",
"@Test\n public void removeUserCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n assertFalse(userResource.removeUser(\"notdummy\"));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }",
"public void deleteUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk deleteUser\");\r\n\t}",
"public void createUser(User user) {\n\n\t}",
"public void deleteUser(User userToDelete) throws Exception;",
"@Test\n void createUserReturnsNull() {\n Address address = new Address(\"Earth\", \"Belgium\", \"City\", \"Street\", 0);\n User user = new User(\"Mira\", \"Vogelsang\", \"0412345678\", \"maarten@maarten\", \"pass\", address);\n\n assertNull(controller.createUser(user));\n }",
"void delete(User user);",
"void delete(User user);",
"public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example.of(user, em);\n List<Users> users = userRepository.findAll(example);\n System.out.println(\"Existing users: \" + users);\n\n if (users.size() == 0) {\n System.out.println(\"admin user not found, hence creating admin user\");\n userRepository.save(user);\n System.out.println(\"admin user created\");\n latch.countDown();\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"@Test\n\tvoid testDeleteAccount() {\n\t\t\n\t\t// Data Object for unregister user\n\t\tUser user = new User(\"Create AccountExample2\", \"CreateAccount2\", \"CreateAccount2@upr.edu\");\n\t\t\n\t\t// Prepare data\n\t\tUserDAO dao = new UserDAO();\n\t\tboolean exist = false;\n\t\t\n\t\ttry {\n\t\t\t// Creating User in DB\n\t\t\tdao.createAccount(user, \"CreateAccountPassword2\");\n\t\t\t\n\t\t\t// Deleting account\n\t\t\tdao.deleteAccount(user.getUsername());\n\n\t\t\t// Boolean confirming if exist\n\t\t\texist = !dao.availabilityUsername(user.getUsername());\n\t\t\t\n\t\t} catch (ClassNotFoundException | UnsupportedEncodingException | SQLException | GeneralSecurityException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// Asserting that the create account works\n\t\tassertFalse(exist);\n\t}",
"@Test\n public void testCleanupCurrentUser_NonOnBehalfUser() throws Exception {\n idService.cleanUpCurrentUser();\n // user must still exist\n PlatformUser user = getDomainObject(supplierAdminUser,\n PlatformUser.class);\n assertNotNull(user);\n }",
"public void createUser(User user);",
"@Test\n\tpublic void test_delete_user_success(){\n template.delete(REST_SERVICE_URI + \"/\" + getLastUser().getId() + ACCESS_TOKEN + token);\n }",
"@Test\r\n public void saveUserShouldCreateNewRowInDB(){\n userDaoJDBCTemplate.delete(38);\r\n userDaoJDBCTemplate.delete(40);\r\n userDaoJDBCTemplate.deleteByName(\"admin3\");\r\n userDaoJDBCTemplate.deleteByName(\"admin4\");\r\n }",
"private User createDummyUser(String userId) {\n\n return new User(userId, \"Usr_\" + userId, new ArrayList<ShoppingList>());\n }",
"void deleteUser(String deleteUserId);",
"void DeleteCompteUser(int id);",
"@Override\n\tpublic void deleteUser(String id) throws Exception {\n\t\t\n\t}",
"void deleteUser( String username );",
"@Override\n\tpublic void deleteUser() {\n\t\tLog.d(\"HFModuleManager\", \"deleteUser\");\n\t}",
"@Test\n\tpublic void testCreateUser() {\n\t\tassertTrue(auctionSystem.createUser(\"toto\", \"Glen\", \"Fiddich\", RoleEnum.SELLER));\n\t\tassertTrue(auctionSystem.createUser(\"tata\", \"Johnnie\", \"Campbell\", RoleEnum.BUYER));\n\t\tassertTrue(auctionSystem.createUser(\"tutu\", \"Ballentine\", \"Darmore\", RoleEnum.SELLER_BUYER));\n\t}",
"@Override\r\n\tpublic boolean deleteUser() {\n\t\treturn false;\r\n\t}",
"@Test\n public void testCreateOnBehalfUser() throws Exception {\n String password = \"abcdef\";\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), password);\n checkCreatedUser(result, customer, password, false);\n }",
"@Test\n\tvoid testCreateAccount() {\n\t\t\n\t\t// Data Object for unregister user\n\t\tUser user = new User(\"Create AccountExample\", \"CreateAccount\", \"CreateAccount@upr.edu\");\n\t\t\n\t\t// Prepare data\n\t\tUserDAO dao = new UserDAO();\n\t\tboolean exist = false;\n\t\t\n\t\ttry {\n\t\t\t// Creating User in DB\n\t\t\tdao.createAccount(user, \"CreateAccountPassword\");\n\t\t\t\n\t\t\t// Boolean confirming if exist\n\t\t\texist = !dao.availabilityUsername(user.getUsername());\n\t\t\t\n\t\t\t// Deleting account\n\t\t\tdao.deleteAccount(user.getUsername());\n\t\t\t\n\t\t} catch (ClassNotFoundException | UnsupportedEncodingException | SQLException | GeneralSecurityException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// Asserting that the create account works\n\t\tassertTrue(exist);\n\t}",
"public User delete(String user);",
"@Test\n public void testCreate() {\n User user = new User(\"lgn\", \"login@example.com\", \"Login Name\", \n \"12345678\");\n userService.create(user);\n }",
"@Test\r\n public void UserServiceTest_Create()\r\n {\r\n User user = new User();\r\n user.setId(\"1234\");\r\n user.setName(\"ABCDEFG\");\r\n ArrayList<Role> roles = new ArrayList<>();\r\n roles.add(new Role(\"Presenter\"));\r\n user.setRoles(roles);\r\n user.setPassword(\"12345678\");\r\n \r\n UserService service = new UserService();\r\n \r\n try {\r\n service.createAUser(user);\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n }\r\n UserServiceTest_Edit();\r\n UserServiceTest_Delete();\r\n }",
"public void UserServiceTest_Delete()\r\n {\r\n User user = new User();\r\n user.setId(\"1234\");\r\n UserService service = new UserService(); \r\n try {\r\n service.deleteUser(user);\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n }catch (NotFoundException e) {\r\n fail();\r\n System.out.println(e);\r\n }\r\n }",
"public void deleteUser(String username);",
"int createUser(User data) throws Exception;",
"@Override\n\tpublic void deleteUser(NguoiDung nd) {\n\n\t}",
"public static void deleteUser() {\n REGISTRATIONS.clear();\n ALL_EVENTS.clear();\n MainActivity.getPreferences().edit()\n .putString(FACEBOOK_ID.get(), null)\n .putString(USERNAME.get(), null)\n .putString(LAST_NAME.get(), null)\n .putString(FIRST_NAME.get(), null)\n .putString(GENDER.get(), null)\n .putString(BIRTHDAY.get(), null)\n .putString(EMAIL.get(), null)\n .putStringSet(LOCATIONS_INTEREST.get(), null)\n .apply();\n }",
"User createUser();",
"@Override\n public boolean deleteUser(User user) {\n return false;\n }",
"public void delete(User user)throws Exception;",
"void deleteUserById(Integer id);",
"@Override\n\tpublic void deleteUser(user theUser) {\n\t\t\n\t}",
"@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}",
"boolean create(User user) throws Exception;",
"@Test\n public void testDeleteUser() {\n System.out.println(\"deleteUser\");\n long userId = 0L;\n UserServiceImpl instance = new UserServiceImpl(passwordService);\n instance.deleteUser(userId);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test(expected = AppException.class)\n public void testCreateNameEmpty() {\n User user = new User(\"login\", \"login@example.com\", null, \n \"12345678\");\n userService.create(user);\n }",
"@Override\n\tpublic void create(User user) {\n\t\t\n\t}",
"public void delete(User usuario);",
"@Override\n\tpublic void deleteUserById(Integer id) {\n\n\t}",
"@Override\n\tpublic void deleteItem(Long id) {\n\t\tUser user = new User();\n\t\tuser.setId(id);\n\t\tuserRepository.delete(user);\n\t\tSystem.out.println(\"user deleted with succes !\");\n\t}",
"UserCreateResponse createUser(UserCreateRequest request);",
"@Override\r\n\tpublic int deleteUser(Users user) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void deleteUser(User user)\n\t{\n\n\t}",
"@Override\r\n\tpublic int delete(User user) {\n\t\treturn 0;\r\n\t}",
"@Test (priority = 0)\n public void test001createUserWithUserNameOnlyTest() {\n close();\n login();\n\n checkLoginIsPerformed();\n //create user with filled user name only\n createUser(SIMPLE_USER_NAME, new HashMap<String, String>());\n checkOperationStatusOk(\"Save (GUI)\");\n\n //search for the created in users list\n searchForElement(SIMPLE_USER_NAME);\n $(By.linkText(SIMPLE_USER_NAME)).shouldBe(visible).click();\n }",
"@Override\n\tpublic void delete(User entity) {\n\t\t\n\t}",
"@Test\n public void createEmployeeCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n assertFalse(employeeResource.createEmployee(new Employee(\"notdummy\", \"dummy\", \"dummy\", \"dummy\", \"dummy\", 1)));\n\n //removing test data after tests to avoid clutter in database\n employeeDAO.removeEmployee(\"dummy\");\n userDAO.removeUser(\"dummy\");\n\n //test clean up\n assertNull(userResource.getUser(\"dummy\"));\n }",
"public void delete(User obj) {\n\t\t\n\t}",
"public Builder clearCreateUser() {\n \n createUser_ = getDefaultInstance().getCreateUser();\n onChanged();\n return this;\n }",
"void deleteUserById(Long id);",
"CreateUserResult createUser(CreateUserRequest createUserRequest);",
"@Override\n\tpublic boolean deleteUser(Integer id) {\n\t\treturn false;\n\t}",
"public int Delete_User(String name) {\n\t\treturn 0;\r\n\t}",
"@Test\n\tpublic void testDeleteAdminAccountWithNonExistingUser() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString username = \"Catherine\";\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.deleteAdminAccount(username);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"The user cannot be found.\", error);\n\t}",
"void deleteUser(String userId);",
"public void deleteUser(long id){\n userRepository.deleteById(id);\n }",
"public User delete(User user);",
"@Test\n public void testAuthorizedRemoveUser() throws IOException {\n testUserId2 = createTestUser();\n grantUserManagementRights(testUserId2);\n\n String userId = createTestUser();\n\n Credentials creds = new UsernamePasswordCredentials(testUserId2, \"testPwd\");\n\n String getUrl = String.format(\"%s/system/userManager/user/%s.json\", baseServerUri, userId);\n assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_OK, null); //make sure the profile request returns some data\n\n String postUrl = String.format(\"%s/system/userManager/user/%s.delete.html\", baseServerUri, userId);\n List<NameValuePair> postParams = new ArrayList<>();\n assertAuthenticatedPostStatus(creds, postUrl, HttpServletResponse.SC_OK, postParams, null);\n\n assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_NOT_FOUND, null); //make sure the profile request returns some data\n }",
"public void deleteUser(ExternalUser userMakingRequest, String userId);",
"@Test\n public void removeEmployee() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n //Create dummy employee to delete\n employeeDAO.createEmployee(new Employee(\"dummy\", \"dummy\", \"dummy\", \"dummy\", \"dummy\", 3));\n\n //removing dummy data to avoid clutter in database\n assertTrue(employeeResource.removeEmployee(\"dummy\"));\n userDAO.removeUser(\"dummy\");\n\n //test clean up\n assertNull(userResource.getUser(\"dummy\"));\n }",
"public void deleteUser(Integer id) throws BadRequestException;",
"@Test\n void createTest() {\n Admin anAdmin = new Admin();\n anAdmin.setEmail(\"g.gialli1@wlbadmin.it\");\n anAdmin.setName(\"Giovanni\");\n anAdmin.setSurname(\"Gialli\");\n anAdmin.setPassword(\"Ciao1234.\");\n Admin created = adminJpa.create(anAdmin);\n assertEquals(\"g.gialli1@wlbadmin.it\", created.getEmail());\n try {\n entityManager = factor.createEntityManager();\n entityManager.getTransaction().begin();\n entityManager.remove(entityManager.merge(anAdmin));\n entityManager.getTransaction().commit();\n } finally {\n entityManager.close();\n }\n }",
"public UserAuthToken createUser(CreateUserRequest request);",
"public boolean delete(User user);",
"void deleteUser(String username) throws UserDaoException;",
"private void managePreCreatedUsers() {\n int numberRequestedGuests = CarProperties.number_pre_created_guests().orElse(0);\r\n int numberRequestedUsers = CarProperties.number_pre_created_users().orElse(0);\r\n Slog.i(TAG, \"managePreCreatedUsers(): OEM asked for \" + numberRequestedGuests\r\n + \" guests and \" + numberRequestedUsers + \" users\");\r\n if (numberRequestedGuests < 0 || numberRequestedUsers < 0) {\r\n Slog.w(TAG, \"preCreateUsers(): invalid values provided by OEM; \"\r\n + \"number_pre_created_guests=\" + numberRequestedGuests\r\n + \", number_pre_created_users=\" + numberRequestedUsers);\r\n return;\r\n }\r\n\r\n if (numberRequestedGuests == 0 && numberRequestedUsers == 0) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): not defined by OEM\");\r\n return;\r\n }\r\n\r\n // Then checks how many exist already\r\n List<UserInfo> allUsers = mUserManager.getUsers(/* excludePartial= */ true,\r\n /* excludeDying= */ true, /* excludePreCreated= */ false);\r\n\r\n int allUsersSize = allUsers.size();\r\n if (DBG) Slog.d(TAG, \"preCreateUsers: total users size is \" + allUsersSize);\r\n\r\n int numberExistingGuests = 0;\r\n int numberExistingUsers = 0;\r\n\r\n // List of pre-created users that were not properly initialized. Typically happens when\r\n // the system crashed / rebooted before they were fully started.\r\n SparseBooleanArray invalidUsers = new SparseBooleanArray();\r\n\r\n for (int i = 0; i < allUsersSize; i++) {\r\n UserInfo user = allUsers.get(i);\r\n if (!user.preCreated) continue;\r\n if (!user.isInitialized()) {\r\n Slog.w(TAG, \"Found invalid pre-created user that needs to be removed: \"\r\n + user.toFullString());\r\n invalidUsers.append(user.id, /* notUsed=*/ true);\r\n continue;\r\n }\r\n if (user.isGuest()) {\r\n numberExistingGuests++;\r\n } else {\r\n numberExistingUsers++;\r\n }\r\n }\r\n if (DBG) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): system already has \" + numberExistingGuests\r\n + \" pre-created guests,\" + numberExistingUsers + \" pre-created users, and these\"\r\n + \" invalid users: \" + invalidUsers );\r\n }\r\n\r\n int numberGuests = numberRequestedGuests - numberExistingGuests;\r\n int numberUsers = numberRequestedUsers - numberExistingUsers;\r\n int numberInvalidUsers = invalidUsers.size();\r\n\r\n if (numberGuests <= 0 && numberUsers <= 0 && numberInvalidUsers == 0) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): all pre-created and no invalid ones\");\r\n return;\r\n }\r\n\r\n // Finally, manage them....\r\n\r\n // In theory, we could submit multiple user pre-creations in parallel, but we're\r\n // submitting just 1 task, for 2 reasons:\r\n // 1.To minimize it's effect on other system server initialization tasks.\r\n // 2.The pre-created users will be unlocked in parallel anyways.\r\n new Thread( () -> {\r\n TimingsTraceLog t = new TimingsTraceLog(TAG, Trace.TRACE_TAG_SYSTEM_SERVER);\r\n\r\n t.traceBegin(\"preCreateUsers\");\r\n if (numberUsers > 0) {\r\n preCreateUsers(t, numberUsers, /* isGuest= */ false);\r\n }\r\n if (numberGuests > 0) {\r\n preCreateUsers(t, numberGuests, /* isGuest= */ true);\r\n }\r\n t.traceEnd();\r\n\r\n if (numberInvalidUsers > 0) {\r\n t.traceBegin(\"removeInvalidPreCreatedUsers\");\r\n for (int i = 0; i < numberInvalidUsers; i++) {\r\n int userId = invalidUsers.keyAt(i);\r\n Slog.i(TAG, \"removing invalid pre-created user \" + userId);\r\n mUserManager.removeUser(userId);\r\n }\r\n t.traceEnd();\r\n }\r\n }, \"CarServiceHelperManagePreCreatedUsers\").start();\r\n }",
"@Test\n public void testGetNewUser() throws Exception {\n UserMultiID umk = createRU(\"remote-user-\" + getRandomString());\n String idp = \"test-idp-\" + getRandomString();\n // create a new user.\n XMLMap map = getDBSClient().getUser(umk, idp);\n assert getDBSClient().hasUser(umk, idp);\n Identifier uid = BasicIdentifier.newID(map.get(userKeys.identifier()).toString());\n User user2 = getUserStore().get(uid);\n checkUserAgainstMap(map, user2);\n }",
"@Test\n public void testCreateUser() throws InvalidUserException {\n //Arrange\n User user = new User();\n user.setEmail(\"user@email.com\");\n user.setFirstName(\"first\");\n user.setLastName(\"last\");\n user.setPassword(\"pass\");\n user.setRole(\"admin\");\n \n //Act\n User createdUser = userService.createUser(user);\n User fetchedUser = userService.readUser(createdUser.getUserId());\n \n //Assert\n assertEquals(fetchedUser.getUserId(), createdUser.getUserId());\n assertEquals(fetchedUser.getEmail(), \"user@email.com\");\n assertEquals(fetchedUser.getFirstName(), \"first\");\n \n }",
"@Test\n public void testDeleteUser() {\n User testUser = new User();\n testUser.setUserEmail(TEST_EMAIL);\n testUser.setUserPassword(TEST_PASSWORD);\n \n Mockito.doNothing().when(userService).deleteUser((User) Matchers.anyObject());\n \n given().body(testUser).contentType(ContentType.JSON).when()\n .delete(URLPREFIX + \"delete\").then()\n .statusCode(HttpServletResponse.SC_OK)\n .contentType(ContentType.JSON).body(equalTo(\"true\"));\n }",
"public void deleteAccount(String userName) {\n\n }",
"public void deleteUser(long userId);",
"private String createUser(String name) {\n\t\treturn null;\n\t}",
"@Test\n public void testNotAuthorizedRemoveUser() throws IOException {\n testUserId2 = createTestUser();\n\n String userId = createTestUser();\n\n Credentials creds = new UsernamePasswordCredentials(\"admin\", \"admin\");\n\n String getUrl = String.format(\"%s/system/userManager/user/%s.json\", baseServerUri, userId);\n assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_OK, null); //make sure the profile request returns some data\n\n Credentials creds2 = new UsernamePasswordCredentials(testUserId2, \"testPwd\");\n String postUrl = String.format(\"%s/system/userManager/user/%s.delete.html\", baseServerUri, userId);\n List<NameValuePair> postParams = new ArrayList<>();\n assertAuthenticatedPostStatus(creds2, postUrl, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, postParams, null);\n\n assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_OK, null); //make sure the profile request returns some data\n }",
"DeleteUserResult deleteUser(DeleteUserRequest deleteUserRequest);",
"@Override\n\tpublic boolean deleteUserById(int id) {\n\t\treturn false;\n\t}",
"public void destroy(User user);",
"void createUser(User newUser, String token) throws AuthenticationException, InvalidUserException, UserAlreadyExistsException;",
"@Test\n public void testCreateValidUser() {\n LocalUserManager ua = new LocalUserManager();\n\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"gburdell1@gatech.edu\", \"George\", \"Burdell\", \"MANAGER\");\n } catch (Exception e) {\n Assert.fail();\n }\n Assert.assertEquals(1, ua.getUsers().size());\n Assert.assertEquals(\"gburdell1\", ua.getUsers().get(0).getUsername());\n Assert.assertEquals(\"gburdell1@gatech.edu\", ua.getUsers().get(0).getEmail());\n Assert.assertEquals(UserClass.MANAGER, ua.getUsers().get(0).getUserClass());\n }",
"int deleteByExample(BizUserWhiteListExample example);",
"@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}",
"@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }",
"Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);",
"int deleteByExample(UUserExample example);",
"public DeleteUser(int id) {\n\t\tsuper();\n\t\tthis.id = id;\n\t}",
"@Before\r\n\tpublic void setUp() {\n\t\tfor (int i=0; i<NUM_USERS; i++) {\r\n\t\t\ttry {\r\n\t\t\t\tNewUser user = CrowdAuthUtil.getUser(userID(i));\r\n\t\t\t\tCrowdAuthUtil.deleteUser(user.getEmail());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// here we are doing the best we can, so just go on to the next one\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"boolean delete(User user);",
"@Test\n public void createUserTestTest()\n {\n HashMap<String, Object> values = new HashMap<String, Object>();\n values.put(\"age\", \"22\");\n values.put(\"dob\", new Date());\n values.put(\"firstName\", \"CreateFName\");\n values.put(\"lastName\", \"CreateLName\");\n values.put(\"middleName\", \"CreateMName\");\n values.put(\"pasword\", \"user\");\n values.put(\"address\", \"CreateAddress\");\n values.put(\"areacode\", \"CreateAddressLine\");\n values.put(\"city\", \"CreateCity\");\n values.put(\"country\", \"CreateCountry\");\n values.put(\"road\", \"CreateRoad\");\n values.put(\"suberb\", \"CreateSuberb\");\n values.put(\"cell\", \"CreateCell\");\n values.put(\"email\", \"user\");\n values.put(\"homeTell\", \"CreateHomeTell\");\n values.put(\"workTell\", \"CreateWorkTell\");\n createUser.createNewUser(values);\n\n Useraccount useraccount = useraccountCrudService.findById(ObjectId.getCurrentUserAccountId());\n Assert.assertNotNull(useraccount);\n\n Garage garage = garageCrudService.findById(ObjectId.getCurrentGarageId());\n Assert.assertNotNull(garage);\n\n Saleshistory saleshistory = saleshistoryCrudService.findById(ObjectId.getCurrentSalesHistoryId());\n Assert.assertNotNull(saleshistory);\n }",
"public static void main(String[] args) {\n delUser(6);\n }",
"public static void deleteUser() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.deleteUser());\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void creatUser(String name, String phone, String email, String password);"
] | [
"0.71968305",
"0.717729",
"0.6977579",
"0.6933218",
"0.68083066",
"0.6784165",
"0.6768653",
"0.67493975",
"0.6731713",
"0.671234",
"0.67034936",
"0.6688667",
"0.6688667",
"0.6675218",
"0.6674748",
"0.66674954",
"0.66357785",
"0.6633005",
"0.6613704",
"0.6608499",
"0.65620506",
"0.6552094",
"0.654658",
"0.6529693",
"0.65293545",
"0.65264964",
"0.6519906",
"0.6503536",
"0.65016943",
"0.6460238",
"0.64572453",
"0.6453163",
"0.64519334",
"0.6447292",
"0.6444057",
"0.64244545",
"0.6419369",
"0.6418455",
"0.64095604",
"0.6408833",
"0.64037955",
"0.64027506",
"0.63976",
"0.63902843",
"0.637722",
"0.63724625",
"0.63641226",
"0.63573223",
"0.63422996",
"0.6332047",
"0.6331161",
"0.63306916",
"0.6329435",
"0.6318866",
"0.6318434",
"0.63165665",
"0.63124037",
"0.6311947",
"0.6306622",
"0.63057154",
"0.63013667",
"0.62898254",
"0.628475",
"0.62746334",
"0.6271137",
"0.62652284",
"0.6257979",
"0.625753",
"0.62447214",
"0.62422335",
"0.62420374",
"0.62380034",
"0.6236711",
"0.62331825",
"0.6227802",
"0.6224631",
"0.62241834",
"0.62229544",
"0.62215424",
"0.62211955",
"0.6208437",
"0.62009203",
"0.61817217",
"0.6180342",
"0.6178599",
"0.61762655",
"0.616944",
"0.6168384",
"0.6165009",
"0.6162318",
"0.61547905",
"0.6145533",
"0.61451644",
"0.614103",
"0.6140762",
"0.6134885",
"0.61315984",
"0.6123695",
"0.6117908",
"0.61178136"
] | 0.689686 | 4 |
Create dummy user to delete | @Test
public void removeUserCatch() {
userDAO.createUser(new User("dummy", "dummy", 1));
assertFalse(userResource.removeUser("notdummy"));
//clean up
userDAO.removeUser("dummy");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void deleteNewAccount() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"gamma@beta.net\");\n createUserRequest.setFirstname(\"Gamma\");\n createUserRequest.setLastname(\"Beta\");\n\n // First, we create the User account that we wish to delete\n final CreateUserResponse response = administration.createUser(token, createUserRequest);\n assertThat(response.isOk(), is(true));\n\n // Now, try to delete the account\n final UserRequest request = new UserRequest();\n request.setUser(response.getUser());\n request.setNewStatus(UserStatus.DELETED);\n final Response deletedUserResponse = administration.controlUserAccount(token, request);\n\n assertThat(deletedUserResponse, is(not(nullValue())));\n assertThat(deletedUserResponse.isOk(), is(true));\n }",
"@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearUsersTest() {\r\n\r\n\t\tpd.crearUsers();\r\n\t\tpd.pm.deletePersistent(pd.user1);\r\n\r\n\t}",
"public void deleteUser(String name);",
"@Test\n public void testCreateAccountWithoutPassword() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"beta@gamma.net\");\n createUserRequest.setFirstname(\"Beta\");\n createUserRequest.setLastname(\"Gamma\");\n\n // Now, perform the actual test - create the Account, and verify that\n // the response is ok, and that a Notification was sent\n final Response result = administration.createUser(token, createUserRequest);\n assertThat(result.isOk(), is(true));\n // Creating a new User should generate an Activate User notification\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n assertThat(spy.size(type), is(1));\n final String activationCode = spy.getNext(type).getFields().get(NotificationField.CODE);\n assertThat(activationCode, is(not(nullValue())));\n\n // Check that the user is in the list of members\n final String memberGroupId = findMemberGroup(token).getGroupId();\n token.setGroupId(memberGroupId);\n final FetchGroupRequest groupRequest = new FetchGroupRequest(memberGroupId);\n final FetchGroupResponse groupResponse = administration.fetchGroup(token, groupRequest);\n assertThat(groupResponse, is(not(nullValue())));\n }",
"@Test\n public void removeUser() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n assertTrue(userResource.removeUser(\"dummy\"));\n }",
"void deleteUser(int id);",
"@Test\n public void testDeletingActiveUser() {\n // 1. Login as Austria\n // - The test is using Austria per default\n // 2. Create a new User\n final String username = \"mozart@iaeste.at\";\n final CreateUserRequest createRequest = new CreateUserRequest(username, \"Wolfgang\", \"Amadeus\");\n final CreateUserResponse createResponse = administration.createUser(token, createRequest);\n assertThat(createResponse.isOk(), is(true));\n\n // 3. Activate the NEW User\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n final NotificationField field = NotificationField.CODE;\n final String activationCode = spy.getNext(type).getFields().get(field);\n final Response activateResponse = administration.activateUser(activationCode);\n assertThat(activateResponse.isOk(), is(true));\n\n // 4. Delete the ACTIVE User\n final UserRequest deleteRequest = new UserRequest();\n deleteRequest.setUser(createResponse.getUser());\n deleteRequest.setNewStatus(UserStatus.DELETED);\n final Response deleteResponse = administration.controlUserAccount(token, deleteRequest);\n assertThat(deleteResponse.isOk(), is(true));\n }",
"public void deleteUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk deleteUser\");\r\n\t}",
"public void createUser(User user) {\n\n\t}",
"public void deleteUser(User userToDelete) throws Exception;",
"@Test\n void createUserReturnsNull() {\n Address address = new Address(\"Earth\", \"Belgium\", \"City\", \"Street\", 0);\n User user = new User(\"Mira\", \"Vogelsang\", \"0412345678\", \"maarten@maarten\", \"pass\", address);\n\n assertNull(controller.createUser(user));\n }",
"void delete(User user);",
"void delete(User user);",
"public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example.of(user, em);\n List<Users> users = userRepository.findAll(example);\n System.out.println(\"Existing users: \" + users);\n\n if (users.size() == 0) {\n System.out.println(\"admin user not found, hence creating admin user\");\n userRepository.save(user);\n System.out.println(\"admin user created\");\n latch.countDown();\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"@Test\n\tvoid testDeleteAccount() {\n\t\t\n\t\t// Data Object for unregister user\n\t\tUser user = new User(\"Create AccountExample2\", \"CreateAccount2\", \"CreateAccount2@upr.edu\");\n\t\t\n\t\t// Prepare data\n\t\tUserDAO dao = new UserDAO();\n\t\tboolean exist = false;\n\t\t\n\t\ttry {\n\t\t\t// Creating User in DB\n\t\t\tdao.createAccount(user, \"CreateAccountPassword2\");\n\t\t\t\n\t\t\t// Deleting account\n\t\t\tdao.deleteAccount(user.getUsername());\n\n\t\t\t// Boolean confirming if exist\n\t\t\texist = !dao.availabilityUsername(user.getUsername());\n\t\t\t\n\t\t} catch (ClassNotFoundException | UnsupportedEncodingException | SQLException | GeneralSecurityException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// Asserting that the create account works\n\t\tassertFalse(exist);\n\t}",
"@Test\n public void testCleanupCurrentUser_NonOnBehalfUser() throws Exception {\n idService.cleanUpCurrentUser();\n // user must still exist\n PlatformUser user = getDomainObject(supplierAdminUser,\n PlatformUser.class);\n assertNotNull(user);\n }",
"public void createUser(User user);",
"@Test\n\tpublic void test_delete_user_success(){\n template.delete(REST_SERVICE_URI + \"/\" + getLastUser().getId() + ACCESS_TOKEN + token);\n }",
"@Test\r\n public void saveUserShouldCreateNewRowInDB(){\n userDaoJDBCTemplate.delete(38);\r\n userDaoJDBCTemplate.delete(40);\r\n userDaoJDBCTemplate.deleteByName(\"admin3\");\r\n userDaoJDBCTemplate.deleteByName(\"admin4\");\r\n }",
"private User createDummyUser(String userId) {\n\n return new User(userId, \"Usr_\" + userId, new ArrayList<ShoppingList>());\n }",
"void deleteUser(String deleteUserId);",
"void DeleteCompteUser(int id);",
"@Override\n\tpublic void deleteUser(String id) throws Exception {\n\t\t\n\t}",
"@Override\n\tpublic void deleteUser() {\n\t\tLog.d(\"HFModuleManager\", \"deleteUser\");\n\t}",
"void deleteUser( String username );",
"@Test\n\tpublic void testCreateUser() {\n\t\tassertTrue(auctionSystem.createUser(\"toto\", \"Glen\", \"Fiddich\", RoleEnum.SELLER));\n\t\tassertTrue(auctionSystem.createUser(\"tata\", \"Johnnie\", \"Campbell\", RoleEnum.BUYER));\n\t\tassertTrue(auctionSystem.createUser(\"tutu\", \"Ballentine\", \"Darmore\", RoleEnum.SELLER_BUYER));\n\t}",
"@Override\r\n\tpublic boolean deleteUser() {\n\t\treturn false;\r\n\t}",
"@Test\n public void testCreateOnBehalfUser() throws Exception {\n String password = \"abcdef\";\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), password);\n checkCreatedUser(result, customer, password, false);\n }",
"@Test\n\tvoid testCreateAccount() {\n\t\t\n\t\t// Data Object for unregister user\n\t\tUser user = new User(\"Create AccountExample\", \"CreateAccount\", \"CreateAccount@upr.edu\");\n\t\t\n\t\t// Prepare data\n\t\tUserDAO dao = new UserDAO();\n\t\tboolean exist = false;\n\t\t\n\t\ttry {\n\t\t\t// Creating User in DB\n\t\t\tdao.createAccount(user, \"CreateAccountPassword\");\n\t\t\t\n\t\t\t// Boolean confirming if exist\n\t\t\texist = !dao.availabilityUsername(user.getUsername());\n\t\t\t\n\t\t\t// Deleting account\n\t\t\tdao.deleteAccount(user.getUsername());\n\t\t\t\n\t\t} catch (ClassNotFoundException | UnsupportedEncodingException | SQLException | GeneralSecurityException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// Asserting that the create account works\n\t\tassertTrue(exist);\n\t}",
"public User delete(String user);",
"@Test\n public void testCreate() {\n User user = new User(\"lgn\", \"login@example.com\", \"Login Name\", \n \"12345678\");\n userService.create(user);\n }",
"@Test\r\n public void UserServiceTest_Create()\r\n {\r\n User user = new User();\r\n user.setId(\"1234\");\r\n user.setName(\"ABCDEFG\");\r\n ArrayList<Role> roles = new ArrayList<>();\r\n roles.add(new Role(\"Presenter\"));\r\n user.setRoles(roles);\r\n user.setPassword(\"12345678\");\r\n \r\n UserService service = new UserService();\r\n \r\n try {\r\n service.createAUser(user);\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n }\r\n UserServiceTest_Edit();\r\n UserServiceTest_Delete();\r\n }",
"public void UserServiceTest_Delete()\r\n {\r\n User user = new User();\r\n user.setId(\"1234\");\r\n UserService service = new UserService(); \r\n try {\r\n service.deleteUser(user);\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n }catch (NotFoundException e) {\r\n fail();\r\n System.out.println(e);\r\n }\r\n }",
"public void deleteUser(String username);",
"int createUser(User data) throws Exception;",
"@Override\n\tpublic void deleteUser(NguoiDung nd) {\n\n\t}",
"public static void deleteUser() {\n REGISTRATIONS.clear();\n ALL_EVENTS.clear();\n MainActivity.getPreferences().edit()\n .putString(FACEBOOK_ID.get(), null)\n .putString(USERNAME.get(), null)\n .putString(LAST_NAME.get(), null)\n .putString(FIRST_NAME.get(), null)\n .putString(GENDER.get(), null)\n .putString(BIRTHDAY.get(), null)\n .putString(EMAIL.get(), null)\n .putStringSet(LOCATIONS_INTEREST.get(), null)\n .apply();\n }",
"User createUser();",
"@Override\n public boolean deleteUser(User user) {\n return false;\n }",
"public void delete(User user)throws Exception;",
"void deleteUserById(Integer id);",
"@Override\n\tpublic void deleteUser(user theUser) {\n\t\t\n\t}",
"@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}",
"boolean create(User user) throws Exception;",
"@Test\n public void testDeleteUser() {\n System.out.println(\"deleteUser\");\n long userId = 0L;\n UserServiceImpl instance = new UserServiceImpl(passwordService);\n instance.deleteUser(userId);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test(expected = AppException.class)\n public void testCreateNameEmpty() {\n User user = new User(\"login\", \"login@example.com\", null, \n \"12345678\");\n userService.create(user);\n }",
"@Override\n\tpublic void create(User user) {\n\t\t\n\t}",
"public void delete(User usuario);",
"@Override\n\tpublic void deleteUserById(Integer id) {\n\n\t}",
"@Override\n\tpublic void deleteItem(Long id) {\n\t\tUser user = new User();\n\t\tuser.setId(id);\n\t\tuserRepository.delete(user);\n\t\tSystem.out.println(\"user deleted with succes !\");\n\t}",
"UserCreateResponse createUser(UserCreateRequest request);",
"@Override\r\n\tpublic int deleteUser(Users user) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void deleteUser(User user)\n\t{\n\n\t}",
"@Test (priority = 0)\n public void test001createUserWithUserNameOnlyTest() {\n close();\n login();\n\n checkLoginIsPerformed();\n //create user with filled user name only\n createUser(SIMPLE_USER_NAME, new HashMap<String, String>());\n checkOperationStatusOk(\"Save (GUI)\");\n\n //search for the created in users list\n searchForElement(SIMPLE_USER_NAME);\n $(By.linkText(SIMPLE_USER_NAME)).shouldBe(visible).click();\n }",
"@Override\r\n\tpublic int delete(User user) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void delete(User entity) {\n\t\t\n\t}",
"@Test\n public void createEmployeeCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n assertFalse(employeeResource.createEmployee(new Employee(\"notdummy\", \"dummy\", \"dummy\", \"dummy\", \"dummy\", 1)));\n\n //removing test data after tests to avoid clutter in database\n employeeDAO.removeEmployee(\"dummy\");\n userDAO.removeUser(\"dummy\");\n\n //test clean up\n assertNull(userResource.getUser(\"dummy\"));\n }",
"public void delete(User obj) {\n\t\t\n\t}",
"public Builder clearCreateUser() {\n \n createUser_ = getDefaultInstance().getCreateUser();\n onChanged();\n return this;\n }",
"void deleteUserById(Long id);",
"CreateUserResult createUser(CreateUserRequest createUserRequest);",
"@Override\n\tpublic boolean deleteUser(Integer id) {\n\t\treturn false;\n\t}",
"public int Delete_User(String name) {\n\t\treturn 0;\r\n\t}",
"@Test\n\tpublic void testDeleteAdminAccountWithNonExistingUser() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString username = \"Catherine\";\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.deleteAdminAccount(username);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"The user cannot be found.\", error);\n\t}",
"void deleteUser(String userId);",
"public void deleteUser(long id){\n userRepository.deleteById(id);\n }",
"@Test\n public void testAuthorizedRemoveUser() throws IOException {\n testUserId2 = createTestUser();\n grantUserManagementRights(testUserId2);\n\n String userId = createTestUser();\n\n Credentials creds = new UsernamePasswordCredentials(testUserId2, \"testPwd\");\n\n String getUrl = String.format(\"%s/system/userManager/user/%s.json\", baseServerUri, userId);\n assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_OK, null); //make sure the profile request returns some data\n\n String postUrl = String.format(\"%s/system/userManager/user/%s.delete.html\", baseServerUri, userId);\n List<NameValuePair> postParams = new ArrayList<>();\n assertAuthenticatedPostStatus(creds, postUrl, HttpServletResponse.SC_OK, postParams, null);\n\n assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_NOT_FOUND, null); //make sure the profile request returns some data\n }",
"public User delete(User user);",
"public void deleteUser(ExternalUser userMakingRequest, String userId);",
"@Test\n public void removeEmployee() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n //Create dummy employee to delete\n employeeDAO.createEmployee(new Employee(\"dummy\", \"dummy\", \"dummy\", \"dummy\", \"dummy\", 3));\n\n //removing dummy data to avoid clutter in database\n assertTrue(employeeResource.removeEmployee(\"dummy\"));\n userDAO.removeUser(\"dummy\");\n\n //test clean up\n assertNull(userResource.getUser(\"dummy\"));\n }",
"public void deleteUser(Integer id) throws BadRequestException;",
"@Test\n void createTest() {\n Admin anAdmin = new Admin();\n anAdmin.setEmail(\"g.gialli1@wlbadmin.it\");\n anAdmin.setName(\"Giovanni\");\n anAdmin.setSurname(\"Gialli\");\n anAdmin.setPassword(\"Ciao1234.\");\n Admin created = adminJpa.create(anAdmin);\n assertEquals(\"g.gialli1@wlbadmin.it\", created.getEmail());\n try {\n entityManager = factor.createEntityManager();\n entityManager.getTransaction().begin();\n entityManager.remove(entityManager.merge(anAdmin));\n entityManager.getTransaction().commit();\n } finally {\n entityManager.close();\n }\n }",
"public UserAuthToken createUser(CreateUserRequest request);",
"public boolean delete(User user);",
"void deleteUser(String username) throws UserDaoException;",
"private void managePreCreatedUsers() {\n int numberRequestedGuests = CarProperties.number_pre_created_guests().orElse(0);\r\n int numberRequestedUsers = CarProperties.number_pre_created_users().orElse(0);\r\n Slog.i(TAG, \"managePreCreatedUsers(): OEM asked for \" + numberRequestedGuests\r\n + \" guests and \" + numberRequestedUsers + \" users\");\r\n if (numberRequestedGuests < 0 || numberRequestedUsers < 0) {\r\n Slog.w(TAG, \"preCreateUsers(): invalid values provided by OEM; \"\r\n + \"number_pre_created_guests=\" + numberRequestedGuests\r\n + \", number_pre_created_users=\" + numberRequestedUsers);\r\n return;\r\n }\r\n\r\n if (numberRequestedGuests == 0 && numberRequestedUsers == 0) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): not defined by OEM\");\r\n return;\r\n }\r\n\r\n // Then checks how many exist already\r\n List<UserInfo> allUsers = mUserManager.getUsers(/* excludePartial= */ true,\r\n /* excludeDying= */ true, /* excludePreCreated= */ false);\r\n\r\n int allUsersSize = allUsers.size();\r\n if (DBG) Slog.d(TAG, \"preCreateUsers: total users size is \" + allUsersSize);\r\n\r\n int numberExistingGuests = 0;\r\n int numberExistingUsers = 0;\r\n\r\n // List of pre-created users that were not properly initialized. Typically happens when\r\n // the system crashed / rebooted before they were fully started.\r\n SparseBooleanArray invalidUsers = new SparseBooleanArray();\r\n\r\n for (int i = 0; i < allUsersSize; i++) {\r\n UserInfo user = allUsers.get(i);\r\n if (!user.preCreated) continue;\r\n if (!user.isInitialized()) {\r\n Slog.w(TAG, \"Found invalid pre-created user that needs to be removed: \"\r\n + user.toFullString());\r\n invalidUsers.append(user.id, /* notUsed=*/ true);\r\n continue;\r\n }\r\n if (user.isGuest()) {\r\n numberExistingGuests++;\r\n } else {\r\n numberExistingUsers++;\r\n }\r\n }\r\n if (DBG) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): system already has \" + numberExistingGuests\r\n + \" pre-created guests,\" + numberExistingUsers + \" pre-created users, and these\"\r\n + \" invalid users: \" + invalidUsers );\r\n }\r\n\r\n int numberGuests = numberRequestedGuests - numberExistingGuests;\r\n int numberUsers = numberRequestedUsers - numberExistingUsers;\r\n int numberInvalidUsers = invalidUsers.size();\r\n\r\n if (numberGuests <= 0 && numberUsers <= 0 && numberInvalidUsers == 0) {\r\n Slog.i(TAG, \"managePreCreatedUsers(): all pre-created and no invalid ones\");\r\n return;\r\n }\r\n\r\n // Finally, manage them....\r\n\r\n // In theory, we could submit multiple user pre-creations in parallel, but we're\r\n // submitting just 1 task, for 2 reasons:\r\n // 1.To minimize it's effect on other system server initialization tasks.\r\n // 2.The pre-created users will be unlocked in parallel anyways.\r\n new Thread( () -> {\r\n TimingsTraceLog t = new TimingsTraceLog(TAG, Trace.TRACE_TAG_SYSTEM_SERVER);\r\n\r\n t.traceBegin(\"preCreateUsers\");\r\n if (numberUsers > 0) {\r\n preCreateUsers(t, numberUsers, /* isGuest= */ false);\r\n }\r\n if (numberGuests > 0) {\r\n preCreateUsers(t, numberGuests, /* isGuest= */ true);\r\n }\r\n t.traceEnd();\r\n\r\n if (numberInvalidUsers > 0) {\r\n t.traceBegin(\"removeInvalidPreCreatedUsers\");\r\n for (int i = 0; i < numberInvalidUsers; i++) {\r\n int userId = invalidUsers.keyAt(i);\r\n Slog.i(TAG, \"removing invalid pre-created user \" + userId);\r\n mUserManager.removeUser(userId);\r\n }\r\n t.traceEnd();\r\n }\r\n }, \"CarServiceHelperManagePreCreatedUsers\").start();\r\n }",
"@Test\n public void testGetNewUser() throws Exception {\n UserMultiID umk = createRU(\"remote-user-\" + getRandomString());\n String idp = \"test-idp-\" + getRandomString();\n // create a new user.\n XMLMap map = getDBSClient().getUser(umk, idp);\n assert getDBSClient().hasUser(umk, idp);\n Identifier uid = BasicIdentifier.newID(map.get(userKeys.identifier()).toString());\n User user2 = getUserStore().get(uid);\n checkUserAgainstMap(map, user2);\n }",
"@Test\n public void testCreateUser() throws InvalidUserException {\n //Arrange\n User user = new User();\n user.setEmail(\"user@email.com\");\n user.setFirstName(\"first\");\n user.setLastName(\"last\");\n user.setPassword(\"pass\");\n user.setRole(\"admin\");\n \n //Act\n User createdUser = userService.createUser(user);\n User fetchedUser = userService.readUser(createdUser.getUserId());\n \n //Assert\n assertEquals(fetchedUser.getUserId(), createdUser.getUserId());\n assertEquals(fetchedUser.getEmail(), \"user@email.com\");\n assertEquals(fetchedUser.getFirstName(), \"first\");\n \n }",
"@Test\n public void testDeleteUser() {\n User testUser = new User();\n testUser.setUserEmail(TEST_EMAIL);\n testUser.setUserPassword(TEST_PASSWORD);\n \n Mockito.doNothing().when(userService).deleteUser((User) Matchers.anyObject());\n \n given().body(testUser).contentType(ContentType.JSON).when()\n .delete(URLPREFIX + \"delete\").then()\n .statusCode(HttpServletResponse.SC_OK)\n .contentType(ContentType.JSON).body(equalTo(\"true\"));\n }",
"public void deleteAccount(String userName) {\n\n }",
"public void deleteUser(long userId);",
"private String createUser(String name) {\n\t\treturn null;\n\t}",
"@Test\n public void testNotAuthorizedRemoveUser() throws IOException {\n testUserId2 = createTestUser();\n\n String userId = createTestUser();\n\n Credentials creds = new UsernamePasswordCredentials(\"admin\", \"admin\");\n\n String getUrl = String.format(\"%s/system/userManager/user/%s.json\", baseServerUri, userId);\n assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_OK, null); //make sure the profile request returns some data\n\n Credentials creds2 = new UsernamePasswordCredentials(testUserId2, \"testPwd\");\n String postUrl = String.format(\"%s/system/userManager/user/%s.delete.html\", baseServerUri, userId);\n List<NameValuePair> postParams = new ArrayList<>();\n assertAuthenticatedPostStatus(creds2, postUrl, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, postParams, null);\n\n assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_OK, null); //make sure the profile request returns some data\n }",
"DeleteUserResult deleteUser(DeleteUserRequest deleteUserRequest);",
"@Override\n\tpublic boolean deleteUserById(int id) {\n\t\treturn false;\n\t}",
"public void destroy(User user);",
"void createUser(User newUser, String token) throws AuthenticationException, InvalidUserException, UserAlreadyExistsException;",
"@Test\n public void testCreateValidUser() {\n LocalUserManager ua = new LocalUserManager();\n\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"gburdell1@gatech.edu\", \"George\", \"Burdell\", \"MANAGER\");\n } catch (Exception e) {\n Assert.fail();\n }\n Assert.assertEquals(1, ua.getUsers().size());\n Assert.assertEquals(\"gburdell1\", ua.getUsers().get(0).getUsername());\n Assert.assertEquals(\"gburdell1@gatech.edu\", ua.getUsers().get(0).getEmail());\n Assert.assertEquals(UserClass.MANAGER, ua.getUsers().get(0).getUserClass());\n }",
"int deleteByExample(BizUserWhiteListExample example);",
"@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}",
"@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }",
"int deleteByExample(UUserExample example);",
"Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);",
"@Before\r\n\tpublic void setUp() {\n\t\tfor (int i=0; i<NUM_USERS; i++) {\r\n\t\t\ttry {\r\n\t\t\t\tNewUser user = CrowdAuthUtil.getUser(userID(i));\r\n\t\t\t\tCrowdAuthUtil.deleteUser(user.getEmail());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// here we are doing the best we can, so just go on to the next one\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public DeleteUser(int id) {\n\t\tsuper();\n\t\tthis.id = id;\n\t}",
"boolean delete(User user);",
"@Test\n public void createUserTestTest()\n {\n HashMap<String, Object> values = new HashMap<String, Object>();\n values.put(\"age\", \"22\");\n values.put(\"dob\", new Date());\n values.put(\"firstName\", \"CreateFName\");\n values.put(\"lastName\", \"CreateLName\");\n values.put(\"middleName\", \"CreateMName\");\n values.put(\"pasword\", \"user\");\n values.put(\"address\", \"CreateAddress\");\n values.put(\"areacode\", \"CreateAddressLine\");\n values.put(\"city\", \"CreateCity\");\n values.put(\"country\", \"CreateCountry\");\n values.put(\"road\", \"CreateRoad\");\n values.put(\"suberb\", \"CreateSuberb\");\n values.put(\"cell\", \"CreateCell\");\n values.put(\"email\", \"user\");\n values.put(\"homeTell\", \"CreateHomeTell\");\n values.put(\"workTell\", \"CreateWorkTell\");\n createUser.createNewUser(values);\n\n Useraccount useraccount = useraccountCrudService.findById(ObjectId.getCurrentUserAccountId());\n Assert.assertNotNull(useraccount);\n\n Garage garage = garageCrudService.findById(ObjectId.getCurrentGarageId());\n Assert.assertNotNull(garage);\n\n Saleshistory saleshistory = saleshistoryCrudService.findById(ObjectId.getCurrentSalesHistoryId());\n Assert.assertNotNull(saleshistory);\n }",
"public static void main(String[] args) {\n delUser(6);\n }",
"public static void deleteUser() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.deleteUser());\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void creatUser(String name, String phone, String email, String password);"
] | [
"0.7196076",
"0.71776664",
"0.69772613",
"0.693324",
"0.68979007",
"0.6808124",
"0.67847604",
"0.67503077",
"0.67320955",
"0.6712543",
"0.6704026",
"0.66889256",
"0.66889256",
"0.6675547",
"0.66750365",
"0.6667968",
"0.6635831",
"0.6633636",
"0.66142714",
"0.66099465",
"0.6562237",
"0.6551637",
"0.65464735",
"0.65300953",
"0.6529546",
"0.65280247",
"0.6520076",
"0.65036047",
"0.6502144",
"0.64604485",
"0.6457675",
"0.6453815",
"0.64522207",
"0.64470845",
"0.64441246",
"0.6424792",
"0.6419463",
"0.64184",
"0.64099973",
"0.64092076",
"0.6403281",
"0.6403185",
"0.6397492",
"0.6390453",
"0.6378067",
"0.6372208",
"0.6364705",
"0.6357201",
"0.63417214",
"0.6331761",
"0.6331113",
"0.6330653",
"0.63297355",
"0.63202924",
"0.63195163",
"0.63166547",
"0.63133043",
"0.63127625",
"0.6306424",
"0.6305435",
"0.6301024",
"0.6289736",
"0.62842375",
"0.62738603",
"0.62714726",
"0.62643987",
"0.62579054",
"0.62578976",
"0.624518",
"0.6242955",
"0.6241551",
"0.62372607",
"0.6236657",
"0.6233592",
"0.6227925",
"0.62251574",
"0.6224442",
"0.62233937",
"0.6223056",
"0.6221554",
"0.6208747",
"0.62006605",
"0.61818737",
"0.6180339",
"0.6178048",
"0.6177107",
"0.61685395",
"0.61683273",
"0.61655307",
"0.616258",
"0.615568",
"0.6146042",
"0.6145551",
"0.61412334",
"0.6140569",
"0.6135275",
"0.6132739",
"0.612435",
"0.6118129",
"0.61170924"
] | 0.67698526 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.