query
stringlengths 8
1.54M
| document
stringlengths 9
312k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
Either generates the trace or reads from somewhere. | public abstract void prepareTrace(); | [
"private void writeTrace()\r\n {\r\n TGCreator creator = new TGCreator();\r\n TGTrace trace = creator.createTrace(JVM.getVM(), this.stateGraph);\r\n TraceGraphWriter tgWriter = new TraceGraphWriter(trace);\r\n\r\n if (this.traceCompressed)\r\n {\r\n this.filename += ITraceConstants.ZIP_FILE_SUFFIX;\r\n tgWriter.saveCompressed(new File(this.filename));\r\n }\r\n else\r\n {\r\n this.filename += ITraceConstants.XML_FILE_SUFFIX;\r\n tgWriter.save(new File(this.filename));\r\n }\r\n\r\n SymbolicExecutionTracerPlugin.log(Status.INFO,\r\n \"Symbolic Execution Tracer wrote \" + this.numEndStates\r\n + \" traces to \" + this.filename);\r\n }",
"private static void loadTrace() throws DataLayerException {\n\n\t\tIterator methodList = gkttr.getMethods();\n\t\tArrayList interactionTraceList;\n\n\t\t//int method;\n\t\t//while ( methodList.hasNext() ) {\n\t\t\t//method = (Integer) methodList.next();\n\t\t\t//System.out.println(\"analysing traces for method \" + method);\n\t\t\t//marker = 0;\n\t\t\t//interactionTraceList = gkttr.getInteractionTraces(method);\n\t\t\tinteractionTraceList = gkttr.getInteractionTraces(methodList);\n\t\t\t//System.out.println(\"traces \" + interactionTraceList);\n\t\t\tanalyseTraceMethod(interactionTraceList);\n\t\t//}\n\t}",
"private void saveTrace() {\n\t\tSystem.out.println(\"Saving trace.\");\n\t\tFile outputFile = generateFile();\n\t\tif (outputFile != null) {\n\t\t\tTraceMetaInfo traceInfo = new TraceMetaInfo(currentTrace, outputFile.toString());\n\t\t\tEvent event = new StackTraceCreationEvent(traceInfo);\n\t\t\tBukkit.getPluginManager().callEvent(event);\n\t\t}\n\t}",
"public void generate() throws RuntimeException {\n\t\t// required to keep track of the order of the online set traceentries (used by tracking)\n\t\ttrackingPos = new ArrayList<GeoPosition>();\n\t\t\n\t\t// Check if a traceType has been specified.\n\t\tif (traceType.equals(\"\"))\n\t\t\tthrow new RuntimeException(\"No traceType specified!\");\n\t\t// Sort the traceEntries into different buckets\n\t\t// according to their positions and orientations.\n\t\tif (offlineTraceEntries.size() == 0)\n\t\t\tthrow new RuntimeException(\"Cannot generate the offline set without any traceEntries!\");\n\t\tif (onlineTraceEntries.size() == 0)\n\t\t\tthrow new RuntimeException(\"Cannot generate the online set without any traceEntries!\");\n\t\t\t\t\n\t\t// initiate offline trace data structures\n\t\tofflineTraceEntryBuckets = new Hashtable<GeoPosition, ArrayList<TraceEntry>>();\n\t\t// initiate online trace data structures\n\t\tonlineTraceEntryBuckets = new Hashtable<GeoPosition, ArrayList<TraceEntry>>();\n\t\t\t\t\n\t\tfor (int i = 0; i < offlineTraceEntries.size(); i++) {\n\t\t\tTraceEntry te = offlineTraceEntries.get(i);\n\t\t\tGeoPosition gp = te.getGeoPosition();\n\t\t\tif (discardOrientationInFingerprints)\n\t\t\t\tgp.setOrientation(Double.NaN);\n\t\t\t\n\t\t\tif (offlineTraceEntryBuckets.containsKey(gp)) { // a bucket for this position and orientation already exists\n\t\t\t\tofflineTraceEntryBuckets.get(gp).add(te);\n\t\t\t} else { // no bucket yet for this position and orientation\n\t\t\t\tArrayList<TraceEntry> traceEntryBucket = new ArrayList<TraceEntry>();\n\t\t\t\ttraceEntryBucket.add(te);\n\t\t\t\tofflineTraceEntryBuckets.put(gp, traceEntryBucket);\n\t\t\t}\n\t\t}\t\t\n\t\tif (verbose) System.out.println(\"TraceGenerator: Data for \" + offlineTraceEntryBuckets.size() + \" different fingerprints found.\");\n\t\t\n\t\tfor (int i = 0; i < onlineTraceEntries.size(); i++) {\n\t\t\tTraceEntry te = onlineTraceEntries.get(i);\n\t\t\tGeoPosition gp = te.getGeoPosition();\n\t\t\tif (discardOrientationInFingerprints)\n\t\t\t\tgp.setOrientation(Double.NaN);\n\t\t\t\n\t\t\tif (onlineTraceEntryBuckets.containsKey(gp)) { // a bucket for this position and orientation already exists\n\t\t\t\tonlineTraceEntryBuckets.get(gp).add(te);\n\t\t\t} else { // no bucket yet for this position and orientation\n\t\t\t\tArrayList<TraceEntry> traceEntryBucket = new ArrayList<TraceEntry>();\n\t\t\t\ttraceEntryBucket.add(te);\n\t\t\t\tonlineTraceEntryBuckets.put(gp, traceEntryBucket);\n\t\t\t}\n\t\t\tif (!trackingPos.contains(gp)) trackingPos.add(gp);\n\t\t}\n\t\tif (verbose) System.out.println(\"TraceGenerator: Data for \" + onlineTraceEntryBuckets.size() + \" different test positions found.\");\n\t\t\n\t\t// Operations depending on the chosen traceType:\n\t\tif (traceType.equals(\"Radar\")) {\n\t\t\t// Determine the minimum MAC set.\n\t\t\tif (verbose) System.out.println(\"TraceGenerator: Determining the minimum MAC set of all fingerprints and test positions ...\");\n\t\t\tminimumMacSet = determineMinimumMacSet();\n\n\t\t\t// Delete all traceEntries that don't contain all the MAC addresses\n\t\t\t// in the minimum MAC set.\n\t\t\tif (verbose) System.out.println(\"TraceGenerator: Deleting traceEntries that don't contain all the MAC addresses in the minimum MAC set ...\");\n\t\t\tdeleteUnsuitableTraceEntries(0, offlineTraceEntryBuckets);\n\t\t\tdeleteUnsuitableTraceEntries(0, onlineTraceEntryBuckets);\n\t\t\t\n\t\t\t// Delete all MAC addresses not contained in the minimum MAC set from\n\t\t\t// all the traceEntries.\n\t\t\tif (verbose) System.out.println(\"TraceGenerator: Trimming the remaining traceEntries to match the minimum MAC set ...\");\n\t\t\ttrimTraceEntries(0, offlineTraceEntryBuckets);\n\t\t\ttrimTraceEntries(0, onlineTraceEntryBuckets);\n\n\t\t\t// Check if the buckets still contain enough entries.\n\t\t\tcheckBucketSizes();\n\t\t\t\n\t\t\t// Generate the sets.\n\t\t\tgenerateSets();\n\t\t} else if (traceType.equals(\"RadarPUnknown\")) {\n\t\t\t// Check if the buckets still contain enough entries.\n\t\t\tcheckBucketSizes();\n\t\t\t\n\t\t\t// Generate the sets.\n\t\t\tgenerateSets();\n\t\t} else if (traceType.equals(\"Rice\")) {\n\t\t\t// Check if the buckets contain enough entries.\n\t\t\tcheckBucketSizes();\n\n\t\t\t// Generate the sets.\n\t\t\tgenerateSets();\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Unknown traceType!\");\n\t\t}\n\t\tif (verbose) System.out.println(\"TraceGenerator: Done.\");\n\t}",
"public void setTrace(boolean trace) {\n this.trace = trace;\n }",
"public static void writeToTraceFile(StringBuffer trace) throws ErrorHandler{\n\t\ttry {\n\t\t\tFile traceFile = new File(\"trace_file.txt\");\n\t\t\t\n\t\t\tif(traceFile.exists()){\n\t\t\t\tBufferedWriter fileWriter = new BufferedWriter(new FileWriter(traceFile,true));\n\t\t\t\tfileWriter.write(trace+\"\\n\");\n\t\t\t\tfileWriter.flush();\n\t\t\t\tfileWriter.close();\n\t\t\t}else{ //If file does not exist create one.\n\t\t\t\t\tBufferedWriter fileWriter = new BufferedWriter(new FileWriter(traceFile));\n\t\t\t\t\ttraceFile.createNewFile();\n\t\t\t\t\t\n\t\t\t\t\t//Header line1\n\t\t\t\t\tfileWriter.write(String.format(\"%49s\", \"|| BEFORE EXECUTION || \")\n\t\t\t\t\t\t\t+ String.format(\"%25s\", \" AFTER EXECUTION ||\\n\")\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t//Underline\n\t\t\t\t\tStringBuffer underLine = new StringBuffer();\n\t\t\t\t\tfor(int i=0;i<77;i++){\n\t\t\t\t\t\tunderLine.append(\"-\");\n\t\t\t\t\t}\n\t\t\t\t\tfileWriter.write(underLine+\"\\n\");\n\t\t\t\t\t\n\t\t\t\t\t//Header line2\n\t\t\t\t\tfileWriter.write(String.format(\"%5s\", \"PC | \")\n\t\t\t\t\t\t\t\t\t\t+ String.format(\"%6s\", \"BR | \")\n\t\t\t\t\t\t\t\t\t\t+ String.format(\"%9s\", \"IR || \")\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t+ String.format(\"%6s\", \"TOS | \")\n\t\t\t\t\t\t\t\t\t\t+ String.format(\"%8s\", \"(TOS) | \")\n\t\t\t\t\t\t\t\t\t\t+ String.format(\"%6s\", \"EA | \")\n\t\t\t\t\t\t\t\t\t\t+ String.format(\"%9s\", \"(EA) || \")\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t+ String.format(\"%6s\", \"TOS | \")\n\t\t\t\t\t\t\t\t\t\t+ String.format(\"%8s\", \"(TOS) | \")\n\t\t\t\t\t\t\t\t\t\t+ String.format(\"%6s\", \"EA | \")\n\t\t\t\t\t\t\t\t\t\t+ String.format(\"%9s\", \"(EA) ||\\n\")\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\tfileWriter.write(String.format(\"%5s\", \"(H)| \")\n\t\t\t\t\t\t\t+ String.format(\"%6s\", \"(H) | \")\n\t\t\t\t\t\t\t+ String.format(\"%9s\", \"(H) || \")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t+ String.format(\"%6s\", \"(D) | \")\n\t\t\t\t\t\t\t+ String.format(\"%8s\", \"(H) | \")\n\t\t\t\t\t\t\t+ String.format(\"%6s\", \"(H) | \")\n\t\t\t\t\t\t\t+ String.format(\"%9s\", \"(H) || \")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t+ String.format(\"%6s\", \"(D) | \")\n\t\t\t\t\t\t\t+ String.format(\"%8s\", \"(H) | \")\n\t\t\t\t\t\t\t+ String.format(\"%6s\", \"(H) | \")\n\t\t\t\t\t\t\t+ String.format(\"%9s\", \"(H) ||\\n\")\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t//Underline\n\t\t\t\t\tunderLine.setLength(0);\n\t\t\t\t\tfor(int i=0;i<77;i++){\n\t\t\t\t\t\tunderLine.append(\"-\");\n\t\t\t\t\t}\n\t\t\t\t\tfileWriter.write(underLine+\"\\n\");\n\t\t\t\t\t\n\t\t\t\t\tfileWriter.write(trace+\"\\n\");\n\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\tfileWriter.close();\n\t\t\t}\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new ErrorHandler(106);\n\t\t}\n\t}",
"private void loadTraces(Reader r) throws TraceException, java.io.IOException {\n\n final TrimLineReader reader = new LogFileTraces.TrimLineReader(r);\n\n // Read through to first token\n StringTokenizer tokens = reader.tokenizeLine();\n\n if (tokens == null) {\n throw new TraceException(\"Trace file is empty.\");\n }\n\n // read over empty lines\n while (!tokens.hasMoreTokens()) {\n tokens = reader.tokenizeLine();\n }\n\n // skip the first column which should be the state number\n String token = tokens.nextToken();\n\n // lines starting with [ are ignored, assuming comments in MrBayes file\n // lines starting with # are ignored, assuming comments in Migrate or BEAST file\n while (token.startsWith(\"[\") || token.startsWith(\"#\")) {\n // readTraceType(token, tokens); // using # to define type\n tokens = reader.tokenizeLine();\n\n // read over empty lines\n while (!tokens.hasMoreTokens()) {\n tokens = reader.tokenizeLine();\n }\n\n // read state token and ignore\n token = tokens.nextToken();\n }\n\n // read label tokens\n String[] labels = new String[tokens.countTokens()];\n\n for (int i = 0; i < labels.length; i++) {\n labels[i] = tokens.nextToken();\n addTrace(labels[i]);\n }\n\n int traceCount = getTraceCount();\n\n long num_samples = 0;\n\n String line = reader.readLine();\n tokens = reader.getStringTokenizer(line);\n String lastLine = line;\n while (tokens != null && tokens.hasMoreTokens()) {\n\n String stateString = tokens.nextToken();\n long state = 0;\n\n try {\n try {\n // Changed this to parseDouble because LAMARC uses scientific notation for the state number\n state = (long) Double.parseDouble(stateString);\n } catch (NumberFormatException nfe) {\n throw new TraceException(\"Unable to parse state number in column 1 (Line \" +\n reader.getLineNumber() + \")\");\n }\n\n if (num_samples < 1) {\n // MrBayes puts 1 as the first state, BEAST puts 0\n // In order to get the same gap between subsequent samples,\n // we force this to 0.\n if (state == 1) state = 0;\n }\n num_samples += 1;\n\n if (!addState(state, num_samples)) {\n throw new TraceException(\"State \" + state + \" is not consistent with previous spacing (Line \" +\n reader.getLineNumber() + \")\");\n }\n\n } catch (NumberFormatException nfe) {\n throw new TraceException(\"State \" + state + \":Expected real value in column \" + reader.getLineNumber());\n }\n\n for (int i = 0; i < traceCount; i++) {\n if (tokens.hasMoreTokens()) {\n String value = tokens.nextToken();\n\n addParsedValue(i, value);\n\n } else {\n throw new TraceException(\"State \" + state + \": missing values at line \" + reader.getLineNumber());\n }\n }\n // used to keep the last valid line\n lastLine = line;\n// tokens = reader.tokenizeLine();\n line = reader.readLine();\n tokens = reader.getStringTokenizer(line);\n }\n\n if (num_samples == 0)\n throw new TraceException(\"Incorrect file format, no sample is found !\");\n\n burnIn = lastState / 10;\n\n if (lastState < 0)\n lastState = firstState;\n if (stepSize < 0 && lastState > 0)\n stepSize = lastState;\n\n validateTraceType(lastLine);\n validateUniqueValues();\n }",
"public static void main(String[] args) throws Exception {\r\n\t\tif (args.length != 1) {\r\n\t\t\tSystem.err.println(\"Usage: Reader TRACE_FILE\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\r\n\t\t// read in the trace\r\n\t\tTrace trace = Trace.parseFrom(new FileInputStream(args[0]));\r\n\r\n\t\tPrint(trace);\r\n\t}",
"TraceList read(File file) throws IOException;",
"private Trace() {\n initFields();\n }",
"public Trace() {\n\t}",
"protected synchronized void started(ITrace trace) {\n\t\t//\n\t}",
"public synchronized static void initTraceEnvironment()\n {\n\t// Return if environment has been initialized\n\tif (traceInit) \n\t return;\n\n\ttraceInit = true;\n\n\t// Create a new Console writer to read data from queue and output to\n\t// console and trace file.\n\tmainWriter = new MainConsoleWriter(getTraceOutputStream());\n\n // Reassign stderr and stdout.\n\t//\n\t// Notice that two separate debug streams should be used\n\t// instead of one. They will put the data into a queue, then\n\t// the console writer thread will read from the queue periodically.\n\t//\n\n\t/* Set Err string to console and file (trace or my own) */\n\tDebugOutputStream myErrOS = new DebugOutputStream(mainWriter);\n\tPrintStream myErrPS = new PrintStream(myErrOS, true);\n\tSystem.setErr(myErrPS);\n\n\t/* Set out string to console and file (trace or my own)*/\n\tDebugOutputStream myOutOS = new DebugOutputStream(mainWriter);\n\tPrintStream myOutPS = new PrintStream(myOutOS, true);\n\tSystem.setOut(myOutPS);\n\n\t// Display version information\n\tString strDisplay = ConsoleWindow.displayVersion();\n\tSystem.out.print(strDisplay);\n }",
"se.lth.immun.protocol.MSDataProtocol.Trace getTrace();",
"public RequestGet<Trace> getTrace(Trace trace) {\n Validate.checkNotNullAndZero(trace.getCodeBoxId(), \"Fetching trace result without codebox id. If run from webhook, result is already known.\");\n String url = String.format(Constants.TRACE_DETAIL_URL, getNotEmptyInstanceName(), trace.getCodeBoxId(), trace.getId());\n return new RequestGetOne<>(trace, url, this);\n }",
"private void trace(String msg) {\n\t}",
"@Override\n public void trace(String output) {\n }",
"private static OpenTelemetrySdk setupTraceExporter() throws IOException {\n // Using default project ID and Credentials\n TraceConfiguration configuration =\n TraceConfiguration.builder()\n .setDeadline(Duration.ofMillis(30000))\n .setProjectId(Constants.PROJECT_ID != \"\" ? Constants.PROJECT_ID : null)\n .build();\n\n TraceExporter traceExporter = TraceExporter.createWithConfiguration(configuration);\n // Register the TraceExporter with OpenTelemetry\n return OpenTelemetrySdk.builder()\n .setTracerProvider(\n SdkTracerProvider.builder()\n .addSpanProcessor(BatchSpanProcessor.builder(traceExporter).build())\n .build())\n .build();\n }",
"public interface TraceReader {\r\n\r\n /**\r\n * \r\n * @return the next instruction in the trace, or null if it reached the end\r\n */\r\n String nextInstruction();\r\n\r\n /**\r\n *\r\n * @return the address of the last returned instruction, or null if there is\r\n * no valid address\r\n */\r\n Integer getAddress();\r\n\r\n /**\r\n *\r\n * @return the total number of returned instructions up to this moment\r\n */\r\n long getNumInstructions();\r\n\r\n /**\r\n * Optional: returns the values of the registers at the current moment.\r\n *\r\n * @return null if not implemented.\r\n */\r\n //Map<RegisterId, Integer> getRegisters();\r\n RegisterTable getRegisters();\r\n\r\n /**\r\n *\r\n * @return the total number of cycles up to this moment\r\n */\r\n long getCycles();\r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field484' field. doc for field484 | public java.lang.CharSequence getField484() {
return field484;
} | [
"public java.lang.CharSequence getField484() {\n return field484;\n }",
"public void setField484(java.lang.CharSequence value) {\n this.field484 = value;\n }",
"public java.lang.CharSequence getField483() {\n return field483;\n }",
"public java.lang.CharSequence getField483() {\n return field483;\n }",
"public java.lang.CharSequence getField494() {\n return field494;\n }",
"public java.lang.CharSequence getField489() {\n return field489;\n }",
"public java.lang.CharSequence getField457() {\n return field457;\n }",
"public java.lang.CharSequence getField494() {\n return field494;\n }",
"public java.lang.CharSequence getField482() {\n return field482;\n }",
"public java.lang.CharSequence getField457() {\n return field457;\n }",
"public java.lang.CharSequence getField482() {\n return field482;\n }",
"public java.lang.CharSequence getField496() {\n return field496;\n }",
"public boolean hasField484() {\n return fieldSetFlags()[484];\n }",
"java.lang.String getField1448();",
"java.lang.String getField1548();",
"public java.lang.CharSequence getField485() {\n return field485;\n }",
"java.lang.String getField1748();",
"public java.lang.CharSequence getField496() {\n return field496;\n }",
"java.lang.String getField1348();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds record into the buffer pool | public void addRecord(GISrecord record) {
if (record != null) {
//if the buffer pool is full
//remove the last record in the list before inserting
if (bufferPool.size() == maxPoolSize) {
bufferPool.removeLast();
bufferPool.addFirst(record);
}
//if the buffer pool is not full and the record we want to insert already exist
//we want to reinsert the matching record to the top of the list
//else we just add to the list normally
else {
if (bufferPool.contains(record)) {
bufferPool.remove(record);
bufferPool.addFirst(record);
}
else {
bufferPool.addFirst(record);
}
}
}
} | [
"void addRecord(Record record);",
"public synchronized void addRecord(PVRecord record) {\n master.addRecord(record);\n }",
"public void add(BindRecord record) {\n map.put(record.getPeptide(), record);\n }",
"public void addRecord(Record record) {\n recordsList.add(record);\n }",
"void addRecord(HistoryRec record);",
"public void add(Buffer b)\n {\n addBuffer(b);\n }",
"public BufferPool() {\n\t\tbufferPool = new LinkedList<GISrecord>();\n\t}",
"private void addRecordToTheOutputBuffer(final SamRecordWithOrdinal samRecordWithOrdinal) throws PicardException {\n final int recordReferenceIndex = samRecordWithOrdinal.getRecord().getReferenceIndex();\n if (recordReferenceIndex < referenceIndex) {\n throw new PicardException(\"Records out of order: \" + recordReferenceIndex + \" < \" + referenceIndex);\n } else if (referenceIndex < recordReferenceIndex) {\n // new reference, so we need to mark duplicates on the current ones\n // NB: we will not miss inter-chromosomal alignments since presumably one end will have been mapped to this chromosome and processed, and we do not need the other end to do so.\n tryPollingTheToMarkQueue(true, null);\n // update genomic coordinate to the next reference index\n referenceIndex = recordReferenceIndex;\n }\n\n // add the samRecordWithOrdinal to the output buffer so that it can be tracked\n outputBuffer.add(samRecordWithOrdinal);\n }",
"public void addRecord(SampleObject record) {\r\n this.results.put(record, new DigitalObject());\r\n }",
"void addRecord(HistoryRecord record) throws IOException;",
"public void addData(AggregateRecord record) {\n this.data.add(record);\n }",
"public void update(Record record) {\n if (!isReady) {\n logger.info(\"Current reservoir is not ready for update record\");\n return;\n }\n try {\n recordsQueue.put(record);\n } catch (InterruptedException e) {\n logger.warn(\"Thread is interrupted during putting value to blocking queue.\", e);\n } catch (IllegalArgumentException e) {\n logger.warn(\"The record queue may be full\");\n }\n }",
"private synchronized void add(WeakDisposerRecord rec) {\n records.add(rec);\n }",
"private synchronized void addRecord(String key, RecordBase record) {\n List<RecordBase> recordList = this.records.get(key.toUpperCase());\n if (recordList != null) {\n recordList.add(record);\n } else {\n recordList = new ArrayList<>();\n recordList.add(record);\n this.records.put(key.toUpperCase(), recordList);\n }\n }",
"protected void addToBatchBuffer(String statement)\n {\n batchBuffer.append(statement);\n batchBuffer.append(\"\\n\");\n }",
"public void addMarker(final byte[] aBuff) {\n buffers.add(aBuff);\n }",
"void append(MemoryRecords records);",
"public void addRecord(ListGridRecord record) {\r\n\t\tthis.addData(record);\r\n\t}",
"public void append(IoBuffer buffer) {\n data.offerLast(buffer);\n updateBufferList();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns short representation of this value. | public short getShortValue() {
return numberValue.shortValue();
} | [
"public Short asShort() {\r\n\t\treturn DataConverterRegistry.convert(Short.class, value);\r\n\t}",
"public short shortValue() {\n\t\treturn (short) re;\n\t}",
"public short toShort()\n {\n return (Short) toClass(Short.class);\n }",
"public String getShort() { \n\t\treturn getShortElement().getValue();\n\t}",
"public com.google.spanner.v1.PlanNode.ShortRepresentation getShortRepresentation() {\n if (shortRepresentationBuilder_ == null) {\n return shortRepresentation_ == null\n ? com.google.spanner.v1.PlanNode.ShortRepresentation.getDefaultInstance()\n : shortRepresentation_;\n } else {\n return shortRepresentationBuilder_.getMessage();\n }\n }",
"public short shortValueExact() {\n if (!mDenominator.equals(java.math.BigInteger.ONE) || mNumerator.bitLength() > 15)\n throw new ArithmeticException(\"Value does not have an exact short representation\");\n\n return mNumerator.shortValue();\n }",
"@java.lang.Override\n public com.google.spanner.v1.PlanNode.ShortRepresentation getShortRepresentation() {\n return shortRepresentation_ == null\n ? com.google.spanner.v1.PlanNode.ShortRepresentation.getDefaultInstance()\n : shortRepresentation_;\n }",
"public com.google.spanner.v1.PlanNode.ShortRepresentationOrBuilder\n getShortRepresentationOrBuilder() {\n if (shortRepresentationBuilder_ != null) {\n return shortRepresentationBuilder_.getMessageOrBuilder();\n } else {\n return shortRepresentation_ == null\n ? com.google.spanner.v1.PlanNode.ShortRepresentation.getDefaultInstance()\n : shortRepresentation_;\n }\n }",
"@java.lang.Override\n public com.google.spanner.v1.PlanNode.ShortRepresentationOrBuilder\n getShortRepresentationOrBuilder() {\n return shortRepresentation_ == null\n ? com.google.spanner.v1.PlanNode.ShortRepresentation.getDefaultInstance()\n : shortRepresentation_;\n }",
"public short getShort() throws MdsException\n\t{\n\t\tfinal Data data = executeWithContext(\"WORD(DATA($1))\", this);\n\t\tif (!(data instanceof Scalar))\n\t\t\tthrow new MdsException(\"Cannot convert Data to byte\");\n\t\treturn data.getShort();\n\t}",
"public static short shortValue(Object theObject){\n \ttry {\n return theObject instanceof Number ? ((Number) theObject).shortValue() : Short.parseShort((String) theObject);\n } catch (Exception e) {\n throw new CCDataException(theObject.getClass().getSimpleName() +\" is not a number.\");\n }\n }",
"public String toStringShort()\n {\n return (denormTemp() + \",\" + denormDO() + \",\" +\n denormPercSat() + \",\" + denormPH() + \",\" +\n denormCond() + \",\" + denormEcoli() + \",\" + clusterId);\n\n }",
"public short toShort() {\n if (size() != Short.SIZE) {\n throw new IllegalArgumentException(\"A FixedBitSet must be exactly \" + Short.SIZE + \"bits to convert to a short\");\n }\n\n //Convert to an int in the interim\n int n = 0;\n for (int i = 0; i < Short.SIZE; ++i) {\n n = (n << 1) + (bits[i] ? 1 : 0);\n }\n return (short) n;\n }",
"public Short getShortAttribute();",
"public Builder setShortRepresentation(\n com.google.spanner.v1.PlanNode.ShortRepresentation value) {\n if (shortRepresentationBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n shortRepresentation_ = value;\n } else {\n shortRepresentationBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000010;\n onChanged();\n return this;\n }",
"public String getShortDes() {\n return shortDes;\n }",
"String getShortTextValue();",
"public Short getAsShort(String key) {\n Object value = mValues.get(key);\n try {\n return value != null ? ((Number) value).shortValue() : null;\n } catch (ClassCastException e) {\n if (value instanceof CharSequence) {\n try {\n return Short.valueOf(value.toString());\n } catch (NumberFormatException e2) {\n Log.e(TAG, \"Cannot parse Short value for \" + value + \" at key \" + key);\n return null;\n }\n } else {\n Log.e(TAG, \"Cannot cast value for \" + key + \" to a Short: \" + value, e);\n return null;\n }\n }\n }",
"public String format(short s);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check payee account first and last name | private int payeeChecker(String payee, String first_name, String last_name){
try {
PreparedStatement find_account = connection.prepareStatement(
"select accounts.account, person.firstname, person.lastname" +
" from accounts join person on accounts.id = person.id where account = ?");
find_account.setString(1, payee);
ResultSet ret = find_account.executeQuery();
if (ret.next()){
String first = ret.getString(2);
String last = ret.getString(3);
if (!Objects.equals(first, first_name) || !Objects.equals(last, last_name)){
return myIO.PAYEE_INFO_NOT_MATCHING; // payee info not matching
}else{
return myIO.SUCCESS;
}
}else{
return myIO.ACCOUNT_NOT_FOUND; //account not found account not existing
}
}catch (SQLException e) {
e.printStackTrace();
return myIO.SERVER_ERROR;
}
} | [
"protected void validateFirstName(){\n Boolean firstName = Pattern.matches(\"[A-Z][a-z]{2,}\",getFirstName());\n System.out.println(nameResult(firstName));\n }",
"java.lang.String getUserFirstName();",
"public void firstNameCheck() {\n\t\t\tif (getNameOfTheCard().equalsIgnoreCase(getCustomerFullName())) {\n\t\t\t\tsetColAuthorizedby(null);\n\t\t\t\tsetColpassword(null);\n\t\t\t\tsetBooAuthozed(false);\n\t\t\t} else {\n\n\n\t\t\t\tList<DebitAutendicationView> localEmpllist = iPersonalRemittanceService.getdebitAutendicationList();\n\t\t\t\tsetEmpllist(localEmpllist);\n\n\t\t\t\tsetColAuthorizedby(null);\n\t\t\t\tsetColpassword(null);\n\t\t\t\tsetBooAuthozed(true);\n\t\t\t\t// populate alert msg if customer name not match\n\t\t\t\tsetExceptionMessage(Constants.NameCheckAlertMsg);\n\t\t\t\tRequestContext.getCurrentInstance().execute(\"alertmsg.show();\");\n\t\t\t}\n\t\t}",
"java.lang.String getUserLastName();",
"protected void validateLastName(){\n Boolean lastName = Pattern.matches(\"[A-Z][a-z]{2,}\",getLastName());\n System.out.println(nameResult(lastName));\n }",
"private void validateProfile() {\n String newFirstname = firstname.getText().toString();\n String newLastname = lastname.getText().toString();\n if (newFirstname.isEmpty())\n Toast.makeText(this, \"You can't leave first name empty!\", Toast.LENGTH_SHORT).show();\n else if (newLastname.isEmpty())\n Toast.makeText(this, \"You can't leave last name empty!\", Toast.LENGTH_SHORT).show();\n else updateAccountSettings(newFirstname, newLastname);\n }",
"public boolean firstNameCheck(String firstName) throws UserRegistrationCustomException\n\t{\n\t\tPattern newPattern = Pattern.compile(\"^[A-Z]{1}[a-z]{2,}$\");\n\t\tboolean ans = newPattern.matcher(firstName).matches();\n\t\tif(ans==true)\n\t\t\treturn true;\n\t\telse\n\t\t\tthrow new UserRegistrationCustomException(\"Please enter a Valid name with first letter in Caps and having min 3 alphabets.\");\n\t}",
"public static boolean checkFirstName(String firstName) throws UserRegistrationException {\n check = Pattern.compile(\"[A-Z]{1}[a-z]{2,}\").matcher(firstName).matches();\n if (check) {\n return true;\n } else {\n throw new UserRegistrationException(\"Enter Valid Firstname\");\n }\n }",
"boolean validateLastName(String Last_name) {\n\t\treturn true;\n\n\t}",
"boolean validateFirstName(String First_name) {\n\t\treturn true;\n\n\t}",
"public boolean validateFirstName() {\n\t\treturn this.getFirstName().length() > 0 && this.getFirstName().length() <= 20;\n\t}",
"@And(\"^user enter lastname$\")\n public void user_enter_lastname(DataTable arg1) throws Exception {\n methodName = Thread.currentThread().getStackTrace()[1].getMethodName();\n\n Map<String, List<String>> dataMap = null;\n dataMap = FrameworkLibrary.getHorizontalData(arg1);\n try {\n String LastName = getXLSTestData(dataMap.get(\"InputFileName\").get(0), dataMap.get(\"SheetName\").get(0), dataMap.get(\"RowId\").get(0), \"LastName\");\n\n\n if (isElementPresentVerification(IntakeConstants.Patient_Last_Name_Feild)) {\n if (!clearAndEnterText(IntakeConstants.Patient_Last_Name_Feild, LastName)) {\n throw new Exception(\"Not able to enter value patient last name field\");\n }\n if (captureScreenshot) {\n takeScreenShot(methodName);\n }\n }\n\n\n } catch (Exception e) {\n takeScreenShot(methodName);\n throw new Exception(e.getMessage());\n }\n }",
"private String validateFirstName(String firstName)\n {\n if(!firstName.matches(\"[A-Z][a-zA-Z]*\"))\n {\n System.out.println(\"The first name \"+ firstName+\" is in the wrong format.\");\n }\n return firstName;\n }",
"@Then(\"^updated personal information should be displayed \\\"([^\\\"]*)\\\"$\")\r\n\t\tpublic void firstname_changed(String firstName) {\n\t\t\tString txtFirstName1 = driver\r\n\t\t\t\t\t.findElement(By.xpath(\"//ul[@class='last_item alternate_item box']//span[1][@class='address_name']\"))\r\n\t\t\t\t\t.getText();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t try{\r\n\t\t\t\t Assert.assertEquals(firstName, txtFirstName1);\r\n\t\t\t\t }catch (Throwable t){\r\n\t\t\t\t System.out.println(\"First Name updated from My Account page\");\r\n\t\t\t\t t.getMessage();\r\n\t\t\t\t }\r\n\t\t}",
"public static String retrieveFirstNameLastNameModifiedInMemberProfile(WebDriver driver, String memEmail, String FirstName,String LastName) throws ClassNotFoundException, SQLException\n\t{\n\t\tString port = Directory.Oracle_Port;\n\t\tString database_name= Directory.Oracle_Databasename;\n\t\tString user = Directory.Oracle_User;\n\t\tString pass = Directory.Oracle_Pass;\n\t\tString hostname =Directory.Oracle_Hostname;\n\t\tString url =\"jdbc:oracle:thin:@\"+hostname+\":\"+port+\":\"+database_name+\"\";\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\tConnection conn = DriverManager.getConnection(url,user,pass);\n\t\tSystem.out.println(\"connection success\");\n\t\tStatement stat=conn.createStatement();\n\t\tResultSet rs = stat.executeQuery(\"select FIRST_NAME, LAST_NAME, EMAIL from account where Email like '\"+memEmail+\"'\");\n\t\tSystem.out.println(\"query executed\");\n\t\tString email=\"\";\n\t\tString FName=\"\";\n\t\tString LName=\"\";\n\t\tif(rs.next())\n\t\t{\n\t\t\temail= rs.getString(\"EMAIL\");\n\t\t\tFName= rs.getString(\"FIRST_NAME\");\n\t\t\tLName= rs.getString(\"LAST_NAME\");\n\t\t\tif(memEmail.equalsIgnoreCase(email)&&FirstName.equalsIgnoreCase(FName)&&LastName.equalsIgnoreCase(LName))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"FirstName, LastName and Email match eachother\");\n\t\t\t}\n\t\t\telse if(!memEmail.equalsIgnoreCase(email)&&!FirstName.equalsIgnoreCase(FName)&&!LastName.equalsIgnoreCase(LName))\n\t\t\t{\n\t\t\t\tAssert.fail();\n\t\t\t}\n\t\t}\n\t\treturn email;\n\t}",
"private static Boolean isValidName(String firstName, String lastName) {\t\t\r\n\t\t// Ensure that the first name\r\n\t\t// 1. Is not null\r\n\t\t// 2. Is not empty\r\n\t\tif(firstName == null || firstName.isEmpty()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Ensure that the last name\r\n\t\t// 1. Is not null\r\n\t\t// 2. Is not empty\r\n\t\t// 3. The first character is a valid Alphabetical character\r\n\t\tif(lastName == null || lastName.isEmpty() || !Character.isAlphabetic(lastName.charAt(0)))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public void updateFirstNameAndlastName() {\r\n\t\tprint(\"Update First name and last name\");\r\n\t\tDateFormat txt = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n\t\tDate date = new Date();\r\n\t\tString fNamePostFix = \"Vivek\" + txt.format(date);\r\n\t\tString lNamePostFix = \"Sharma\" + txt.format(date);\r\n\t\tsendKeys(Locator.MyTrader.First_Name.value, fNamePostFix);\r\n\t\tsendKeys(Locator.MyTrader.Last_Name.value, lNamePostFix);\r\n\t}",
"public static void firstName(){\n\n\t\tString firstNameRegex = \"^[A-Z]{1}[a-z]{2,}\";\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the First Name\");\n\t\tString firstName = sc.nextLine();\n\t\t\n\t\tPredicate<String> firstNameFilter = Pattern.compile(firstNameRegex).asMatchPredicate();\n\t\tSystem.out.println(firstNameFilter.test(firstName));\n\n\t}",
"String getAccountName();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save an interactive chart with stock and bond data as a local HTML file. | public static void saveGraph() throws IOException
{
// Save graph of asset growth and related curves (stock, bonds, mixed, CPI, etc.).
Sequence snpReal = calcSnpReturns(Inflation.Real);
snpReal.setName("S&P (real, calculated)");
snpReal._div(snpReal.getFirst(0));
Sequence snpNominal = calcSnpReturns(Inflation.Nominal);
snpNominal.setName("S&P (nominal, calculated)");
snpNominal._div(snpNominal.getFirst(0));
Chart.saveLineChart(new File(DataIO.getOutputPath(), "shiller.html"), "Shiller Data", "100%", "800px",
ChartScaling.LOGARITHMIC, ChartTiming.MONTHLY, snpReal, snpNominal, stock, bonds, mixedMap.get(70), cpi);
} | [
"public void saveChartToFile(String filename) {\n DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();\n Document document = domImpl.createDocument(null, \"svg\", null);\n SVGGraphics2D svgGenerator = new SVGGraphics2D(document);\n jFreeChart.draw(svgGenerator, new Rectangle(1000, 600));\n File file = new File(filename);\n OutputStream outputStream = null;\n try {\n outputStream = new FileOutputStream(file);\n } catch (FileNotFoundException e) {\n }\n Writer out;\n try {\n out = new OutputStreamWriter(outputStream, \"UTF-8\");\n svgGenerator.stream(out, true);\n if (outputStream != null) {\n outputStream.flush();\n outputStream.close();\n }\n } catch (UnsupportedEncodingException e) {\n } catch (IOException e) {\n }\n }",
"void savePortfolio(String filename);",
"public void writeDataFile(String stock) throws FileNotFoundException {\n\n\t\tStringBuilder jsonData = new StringBuilder(\"\");\n\t\tStringBuilder priceData = new StringBuilder(\"\");\n\t\tStringBuilder volumeData = new StringBuilder(\"\");\n\t\tStringBuilder summaryData = new StringBuilder(\"\");\n\n\t\tString[] str = { \"January\", \"February\", \"March\", \"April\", \"May\",\n\t\t\t\t\"June\", \"July\", \"August\", \"September\", \"October\", \"November\",\n\t\t\t\t\"December\" };\n\n\t\tLocalDate fromDate = new LocalDate(2010, 11, 17);\n\n\t\tLocalDate toDate = new LocalDate();\n\n\t\tLinkedList<Stock> ll = FinanceQuery.getHistorical(stock, fromDate,\n\t\t\t\ttoDate, \"d\");\n\n\t\tIterator<Stock> iterator = ll.iterator();\n\n\t\tFile file = new File(\"./WebRoot/static/javascript/Vis_Files/data-\"\n\t\t\t\t+ stock + \".js\");\n\t\tfile.deleteOnExit();\n\t\tPrintWriter write = new PrintWriter(file);\n\n\t\tint i = 0;\n\n\t\twhile (iterator.hasNext()) {\n\t\t\tString jD = \"\";\n\t\t\tString pD = \"\";\n\t\t\tString vD = \"\";\n\t\t\tString sD = \"\";\n\t\t\tStock s = iterator.next();\n\n\t\t\t// will contain all the key points about the share\n\t\t\tjD += \"{date:'\" + str[s.getDate().getMonthOfYear() - 1] + \" \"\n\t\t\t\t\t+ s.getDate().getDayOfMonth() + \", \"\n\t\t\t\t\t+ s.getDate().getYear() + \"',\";\n\t\t\tjD += \"open:\" + s.getOpen() + \",\";\n\t\t\tjD += \"high:\" + s.getHigh() + \",\";\n\t\t\tjD += \"low:\" + s.getLow() + \",\";\n\t\t\tjD += \"close:\" + s.getClose() + \",\";\n\t\t\tjD += \"volume:\" + s.getVolume() + \"}\";\n\t\t\t// -----------------------------\n\t\t\t// will store the closing price of the share over the range of time\n\t\t\tpD += \"[\" + (ll.size() - 1 - i) + \",\" + s.getClose() + \"]\";\n\t\t\t// -----------------------------\n\t\t\t// will store the volume sold of the share over the range in time\n\t\t\tvD += \"[\" + (ll.size() - 1 - i) + \",\" + s.getVolume() + \"]\";\n\t\t\t// -----------------------------\n\t\t\t// summary of the data, same as price data\n\t\t\tsD += \"[\" + (ll.size() - 1 - i) + \",\" + s.getClose() + \"]\";\n\n\t\t\tif (i != 0) {\n\t\t\t\tjD += \",\";\n\t\t\t\tpD += \",\";\n\t\t\t\tvD += \",\";\n\t\t\t\tsD += \",\";\n\t\t\t}\n\n\t\t\ti++;\n\t\t\t// add to the front of the string\n\t\t\t// [so that olds dates are first and newest dates are last]\n\t\t\t// when iterating over the list - new dates are done first\n\t\t\tjsonData.insert(0, jD);\n\t\t\tpriceData.insert(0, pD);\n\t\t\tvolumeData.insert(0, vD);\n\t\t\tsummaryData.insert(0, sD);\n\t\t}\n\t\tjsonData.insert(0, \"var jsonData = [\");\n\t\tpriceData.insert(0, \"var priceData = [\");\n\t\tvolumeData.insert(0, \"var volumeData = [\");\n\t\tsummaryData.insert(0, \"var summaryData = [\");\n\n\t\twrite.println(jsonData + \"];\");\n\t\twrite.println(priceData + \"];\");\n\t\twrite.println(volumeData + \"];\");\n\t\twrite.println(summaryData + \"];\");\n\n\t\twrite.close();\n\t}",
"public void saveChartDataToFile(boolean bJustCurrTS) {\n String sFileName = \"\";\n java.io.FileWriter jOut = null;\n try {\n\n \t//Allow the user to save a text file\n ModelFileChooser jChooser = new ModelFileChooser();\n jChooser.setFileFilter(new sortie.gui.components.TextFileFilter());\n\n int iReturnVal = jChooser.showSaveDialog(m_oChartFrame);\n if (iReturnVal != javax.swing.JFileChooser.APPROVE_OPTION) return;\n \n // User chose a file - trigger the save\n java.io.File oFile = jChooser.getSelectedFile();\n sFileName = oFile.getAbsolutePath();\n if (sFileName.endsWith(\".txt\") == false) {\n sFileName += \".txt\";\n }\n if (new java.io.File(sFileName).exists()) {\n iReturnVal = javax.swing.JOptionPane.showConfirmDialog(m_oChartFrame,\n \"Do you wish to overwrite the existing file?\",\n \"Model\",\n javax.swing.JOptionPane.YES_NO_OPTION);\n if (iReturnVal == javax.swing.JOptionPane.NO_OPTION) return; \n }\n\n m_oChartFrame.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.\n Cursor.WAIT_CURSOR));\n\n DetailedOutputLegend oLegend = (DetailedOutputLegend) m_oManager.\n getLegend();\n\n //Start with the file header - reconstitute the full file name\n String sTitle = m_oChartFrame.getTitle();\n sTitle = sTitle.substring(0, sTitle.indexOf(\" - \"));\n sTitle = sTitle + \" - \" + m_oManager.getFileName();\n\n if (bJustCurrTS) {\n //Write the current timestep's data only\n jOut = new FileWriter(sFileName);\n jOut.write(sTitle + \"\\n\");\n jOut.write(\"Timestep\\t\" + String.valueOf(oLegend.getCurrentTimestep()) + \"\\n\");\n\n //Now write the timestep data\n writeChartDataToFile(jOut);\n jOut.close();\n } else {\n //Write the whole run to file\n int iNumTimesteps = oLegend.getNumberOfTimesteps(),\n iTimestepToReturnTo = oLegend.getCurrentTimestep(),\n iTs; //loop counter\n \n //Trim the \".txt\" back off the filename\n sFileName = sFileName.substring(0, sFileName.indexOf(\".txt\"));\n\n //Force the processing of each timestep\n for (iTs = 0; iTs <= iNumTimesteps; iTs++) {\n\n //Get this timestep's filename\n jOut = new java.io.FileWriter(sFileName + \"_\" + iTs + \".txt\");\n jOut.write(sTitle + \"\\n\");\n jOut.write(\"Timestep\\t\" + iTs + \"\\n\");\n\n //Make the file manager parse this file\n m_oManager.readFile(iTs);\n\n //Have the chart write this timestep's data\n writeChartDataToFile(jOut);\n\n jOut.close();\n }\n\n //Refresh all the existing charts back to the way they were\n m_oManager.readFile(iTimestepToReturnTo);\n m_oManager.updateCharts();\n }\n\n m_oChartFrame.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.\n Cursor.DEFAULT_CURSOR));\n\n //Tell the user\n javax.swing.JOptionPane.showMessageDialog(m_oChartFrame,\n \"File has been saved.\");\n }\n catch (java.io.IOException oErr) {\n sortie.data.simpletypes.ModelException oExp = new sortie.data.simpletypes.ModelException(\n ErrorGUI.BAD_FILE, \"JAVA\",\n \"There was a problem writing the file \" + sFileName + \".\");\n ErrorGUI oHandler = new ErrorGUI(m_oChartFrame);\n oHandler.writeErrorMessage(oExp);\n }\n catch (sortie.data.simpletypes.ModelException oErr) {\n ErrorGUI oHandler = new ErrorGUI(m_oChartFrame);\n oHandler.writeErrorMessage(oErr);\n }\n finally {\n try {\n if (jOut != null) {\n jOut.close();\n }\n }\n catch (java.io.IOException oErr) {\n ;\n }\n }\n }",
"private void saveData() {\n String jsonSaveFile = getString(R.string.data_save_file);\n Type stockListType = new TypeToken<ArrayList<String>>() {}.getType();\n\n ArrayList<String> favoriteStockTickers = new ArrayList<>();\n for(Stock stock : snp500Stocks) {\n if (stock.getIsFavorite()) {\n favoriteStockTickers.add(stock.getTicker());\n }\n }\n\n String jsonStocks = new Gson().toJson(favoriteStockTickers, stockListType);\n\n FileOutputStream fos = null;\n try {\n fos = openFileOutput(jsonSaveFile, MODE_PRIVATE);\n fos.write(jsonStocks.getBytes());\n } catch (IOException e) {\n // Can't do anything really, just hope for the best.\n e.printStackTrace();\n } finally {\n if (fos != null) {\n try {\n fos.close();\n } catch (IOException e) {\n // Can't do anything really, just hope for the best.\n e.printStackTrace();\n }\n }\n }\n }",
"private void handleExportToSVG() {\n FileChooser chooser = new FileChooser();\n chooser.setTitle(\"Export to SVG\");\n FileChooser.ExtensionFilter filter = new FileChooser.ExtensionFilter(\n \"Scalable Vector Graphics (SVG)\", \"*.svg\");\n chooser.getExtensionFilters().add(filter);\n File file = chooser.showSaveDialog(getScene().getWindow());\n if (file != null) {\n ExportUtils.writeAsSVG((Drawable) this.canvas.getChart(), (int) getWidth(), \n (int) getHeight(), file);\n }\n }",
"public void saveToFile(){\n fileManager.saveToFile(graphManager.getGraphs());\n }",
"public void fileSave()\n {\n try\n {\n // construct the default file name using the instance name + current date and time\n StringBuffer currentDT = new StringBuffer();\n try {\n currentDT = new StringBuffer(ConnectWindow.getDatabase().getSYSDate());\n }\n catch (Exception e) {\n displayError(e,this) ;\n }\n\n // construct a default file name\n String defaultFileName;\n if (ConnectWindow.isLinux()) {\n defaultFileName = ConnectWindow.getBaseDir() + \"/Output/RichMon \" + instanceName + \" \" + currentDT.toString() + \".html\";\n }\n else {\n defaultFileName = ConnectWindow.getBaseDir() + \"\\\\Output\\\\RichMon \" + instanceName + \" \" + currentDT.toString() + \".html\";\n }\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setSelectedFile(new File(defaultFileName));\n File saveFile;\n BufferedWriter save;\n\n // prompt the user to choose a file name\n int option = fileChooser.showSaveDialog(this);\n if (option == JFileChooser.APPROVE_OPTION)\n {\n saveFile = fileChooser.getSelectedFile();\n\n // force the user to use a new file name if the specified filename already exists\n while (saveFile.exists())\n {\n JOptionPane.showConfirmDialog(this,\"File already exists\",\"File Already Exists\",JOptionPane.ERROR_MESSAGE);\n option = fileChooser.showOpenDialog(this);\n if (option == JFileChooser.APPROVE_OPTION)\n {\n saveFile = fileChooser.getSelectedFile();\n }\n }\n save = new BufferedWriter(new FileWriter(saveFile));\n saveFile.createNewFile();\n\n // create a process to format the output and write the file\n try {\n OutputHTML outputHTML = new OutputHTML(saveFile,save,\"Database\",databasePanel.getResultCache());\n outputHTML.savePanel(\"Performance\",performancePanel.getResultCache(),null);\n// outputHTML.savePanel(\"Scratch\",scratchPanel.getResultCache(),scratchPanel.getSQLCache());\n\n JTabbedPane scratchTP = ScratchPanel.getScratchTP();\n \n for (int i=0; i < scratchTP.getComponentCount(); i++) {\n try {\n System.out.println(\"i=\" + i + \" class: \" + scratchTP.getComponentAt(i).getClass());\n if (scratchTP.getComponentAt(i) instanceof ScratchDetailPanel) {\n ScratchDetailPanel t = (ScratchDetailPanel)scratchTP.getComponentAt(i);\n System.out.println(\"Saving: \" + scratchTP.getTitleAt(i));\n outputHTML.savePanel(scratchTP.getTitleAt(i), t.getResultCache(), t.getSQLCache());\n }\n } catch (Exception e) {\n // do nothing \n }\n }\n }\n catch (Exception e) {\n displayError(e,this);\n }\n\n // close the file\n save.close();\n }\n }\n catch (IOException e)\n {\n displayError(e,this);\n }\n }",
"public void saveData() {\r\n\tDocument doc = new Document(getXML());\r\n\tXMLOutputter outputter = new XMLOutputter();\r\n\t\r\n\tString fileName = getFileFromChooser();\r\n\tif ( fileName != null) {\r\n\t try {\r\n\t\tDataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(fileName)));\r\n\t\toutputter.output(doc,out);\r\n\t\tlogger.log(Level.FINEST,\"Writing into file: \" + fileName); \r\n\t } catch ( IOException ioex) {\r\n\t\tlogger.log(Level.WARNING,\"Could not write data\");\r\n\t\tlogger.log(Level.INFO,ioex.getMessage());\r\n\t }\r\n\t}\r\n }",
"void exportSvg() throws IOException;",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tHTMLExporter.export(track);\n\t\t\t}",
"public static void saveToFile() {\r\n\t\tFile f = new File(\"decks.dat\");\r\n\t\tif (!f.exists()) {\r\n\t\t\ttry {\r\n\t\t\t\tf.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFileOutputStream file = new FileOutputStream(f);\r\n\t\t\tObjectOutputStream obj = new ObjectOutputStream(file);\r\n\t\t\tobj.writeObject(decks);\r\n\t\t\tobj.close();\r\n\t\t\tfile.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void handleExportToPNG() {\n FileChooser chooser = new FileChooser();\n chooser.setTitle(\"Export to PNG\");\n FileChooser.ExtensionFilter filter = new FileChooser.ExtensionFilter(\n \"Portable Network Graphics (PNG)\", \"*.png\");\n chooser.getExtensionFilters().add(filter);\n File file = chooser.showSaveDialog(getScene().getWindow());\n if (file != null) {\n try {\n ChartUtilities.saveChartAsPNG(file, this.canvas.getChart(), 2*(int)getWidth(), 2*(int)getHeight());\n } catch (IOException ex) {\n // FIXME: show a dialog with the error\n throw new RuntimeException(ex);\n }\n } \n }",
"public void writeHTMLFile(String path) throws IOException {\n String index = slurp(getClass().getResourceAsStream(INDEX));\n String d3js = slurp(getClass().getResourceAsStream(D3JS));\n\n FileWriter fw = new FileWriter(path + HTML_EXT);\n ObjectWriter writer = new ObjectMapper().writer(); // .writerWithDefaultPrettyPrinter();\n fw.write(index.replace(TITLE_PLACEHOLDER, path)\n .replace(D3JS_PLACEHOLDER, d3js)\n .replace(DATA_PLACEHOLDER, writer.writeValueAsString(toJson())));\n fw.close();\n }",
"protected void savePortfolioListener() {\n String pname = viewPlusTwo.getPortfolioName();\n\n if (pname.equals(\"\")) {\n return;\n }\n Portfolio p;\n try {\n p = modelPlus.portfolioContents(pname);\n\n }\n catch (IllegalArgumentException e) {\n viewPlusTwo.putInvalidInput();\n return;\n }\n FileParsing parse = new PortfolioFile(p);\n\n boolean fileAccept = true;\n while (fileAccept) {\n String fileName = viewPlusTwo.fileToWrite();\n try {\n boolean b = parse.writeToFile(fileName, false);\n if (!b) {\n String overWrite = viewPlusTwo.overWrite();\n if (overWrite.matches(\"[Yy][eE][sS]\")) {\n parse.writeToFile(fileName, true);\n }\n }\n fileAccept = false;\n } catch (NoSuchElementException e) {\n viewPlusTwo.displayFileMissing();\n }\n }\n viewPlusTwo.putSuccess();\n }",
"public void saveAs() {\n MimsJFileChooser fileChooser = new MimsJFileChooser(ui);\n fileChooser.setSelectedFile(new File(ui.getLastFolder(), ui.getImageFilePrefix() + \".png\"));\n ResourceBundle localizationResources = ResourceBundleWrapper.getBundle(\"org.jfree.chart.LocalizationBundle\");\n ExtensionFileFilter filter = new ExtensionFileFilter(\n localizationResources.getString(\"PNG_Image_Files\"), \".png\");\n fileChooser.addChoosableFileFilter(filter);\n fileChooser.setFileFilter(filter);\n int option = fileChooser.showSaveDialog(chartpanel);\n if (option == MimsJFileChooser.APPROVE_OPTION) {\n String filename = fileChooser.getSelectedFile().getPath();\n if (!filename.endsWith(\".png\")) {\n filename = filename + \".png\";\n }\n try {\n ChartUtils.saveChartAsPNG(new File(filename), chartpanel.getChart(), getWidth(), getHeight());\n } catch (IOException ioe) {\n IJ.error(\"Unable to save file.\\n\\n\" + ioe.toString());\n }\n }\n }",
"private void saveToFile(){\n this.currentMarkovChain.setMarkovName(this.txtMarkovChainName.getText());\n saveMarkovToCSVFileInformation();\n \n //Save to file\n Result result = DigPopGUIUtilityClass.saveDigPopGUIInformationSaveFile(\n this.digPopGUIInformation,\n this.digPopGUIInformation.getFilePath());\n }",
"@Override\n public void saveDocumentAs(URL url) {\n XmlDataAdaptor da = XmlDataAdaptor.newEmptyDocumentAdaptor();\n XmlDataAdaptor arrViewerData_Adaptor = da.createChild(dataRootName);\n arrViewerData_Adaptor.setValue(\"title\", url.getFile());\n XmlDataAdaptor params_font = arrViewerData_Adaptor.createChild(\"font\");\n params_font.setValue(\"name\", globalFont.getFamily());\n params_font.setValue(\"style\", globalFont.getStyle());\n params_font.setValue(\"size\", globalFont.getSize());\n XmlDataAdaptor params_DA = arrViewerData_Adaptor.createChild(\"PARAMS\");\n params_DA.setValue(\"AutoUpdate\", autoUpdateView_Button.isSelected());\n params_DA.setValue(\"Frequency\", ((Integer) freq_ViewPanel_Spinner.getValue()).intValue());\n XmlDataAdaptor xPosPanelDA = arrViewerData_Adaptor.createChild(\"ARRAY_PVS_PANEL\");\n arrayPVsGraphPanel.dumpConfig(xPosPanelDA);\n XmlDataAdaptor arrayPVsDA = arrViewerData_Adaptor.createChild(\"ARRAY_PVs\");\n for (int i = 0, n = arrayPVs.size(); i < n; i++) {\n ArrayViewerPV arrViewer = (ArrayViewerPV) arrayPVs.get(i);\n arrViewer.dumpConfig(arrayPVsDA);\n }\n try {\n arrViewerData_Adaptor.writeTo(new File(url.getFile()));\n setHasChanges(true);\n } catch (IOException e) {\n System.out.println(\"IOException e=\" + e);\n }\n }",
"private void exportFile()\n\t{\n\t\ttry\n\t\t{\n\t\t\tdrinkListFileOutput = new BufferedWriter(new FileWriter(drinkListFile));\n\t\t\tdrinkListFileOutput.write(exportDrinkList);//insert string of drinks\n\t\t\tdrinkListFileOutput.close();\n\t\t\tJOptionPane.showMessageDialog(null, \"Successfully saved drinks\");\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\te.toString();//change this\n\t\t\tJOptionPane.showMessageDialog(null, \"Drink save error: \" + e.toString());//change this);\n\t\t}\n\n\n\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__SwitchStmt__Alternatives" $ANTLR start "rule__ForStmt__Alternatives_2" InternalGo.g:3658:1: rule__ForStmt__Alternatives_2 : ( ( ( rule__ForStmt__ConditionAssignment_2_0 ) ) | ( ( rule__ForStmt__ForAssignment_2_1 ) ) | ( ( rule__ForStmt__RangeAssignment_2_2 ) ) ); | public final void rule__ForStmt__Alternatives_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalGo.g:3662:1: ( ( ( rule__ForStmt__ConditionAssignment_2_0 ) ) | ( ( rule__ForStmt__ForAssignment_2_1 ) ) | ( ( rule__ForStmt__RangeAssignment_2_2 ) ) )
int alt20=3;
alt20 = dfa20.predict(input);
switch (alt20) {
case 1 :
// InternalGo.g:3663:2: ( ( rule__ForStmt__ConditionAssignment_2_0 ) )
{
// InternalGo.g:3663:2: ( ( rule__ForStmt__ConditionAssignment_2_0 ) )
// InternalGo.g:3664:3: ( rule__ForStmt__ConditionAssignment_2_0 )
{
if ( state.backtracking==0 ) {
before(grammarAccess.getForStmtAccess().getConditionAssignment_2_0());
}
// InternalGo.g:3665:3: ( rule__ForStmt__ConditionAssignment_2_0 )
// InternalGo.g:3665:4: rule__ForStmt__ConditionAssignment_2_0
{
pushFollow(FOLLOW_2);
rule__ForStmt__ConditionAssignment_2_0();
state._fsp--;
if (state.failed) return ;
}
if ( state.backtracking==0 ) {
after(grammarAccess.getForStmtAccess().getConditionAssignment_2_0());
}
}
}
break;
case 2 :
// InternalGo.g:3669:2: ( ( rule__ForStmt__ForAssignment_2_1 ) )
{
// InternalGo.g:3669:2: ( ( rule__ForStmt__ForAssignment_2_1 ) )
// InternalGo.g:3670:3: ( rule__ForStmt__ForAssignment_2_1 )
{
if ( state.backtracking==0 ) {
before(grammarAccess.getForStmtAccess().getForAssignment_2_1());
}
// InternalGo.g:3671:3: ( rule__ForStmt__ForAssignment_2_1 )
// InternalGo.g:3671:4: rule__ForStmt__ForAssignment_2_1
{
pushFollow(FOLLOW_2);
rule__ForStmt__ForAssignment_2_1();
state._fsp--;
if (state.failed) return ;
}
if ( state.backtracking==0 ) {
after(grammarAccess.getForStmtAccess().getForAssignment_2_1());
}
}
}
break;
case 3 :
// InternalGo.g:3675:2: ( ( rule__ForStmt__RangeAssignment_2_2 ) )
{
// InternalGo.g:3675:2: ( ( rule__ForStmt__RangeAssignment_2_2 ) )
// InternalGo.g:3676:3: ( rule__ForStmt__RangeAssignment_2_2 )
{
if ( state.backtracking==0 ) {
before(grammarAccess.getForStmtAccess().getRangeAssignment_2_2());
}
// InternalGo.g:3677:3: ( rule__ForStmt__RangeAssignment_2_2 )
// InternalGo.g:3677:4: rule__ForStmt__RangeAssignment_2_2
{
pushFollow(FOLLOW_2);
rule__ForStmt__RangeAssignment_2_2();
state._fsp--;
if (state.failed) return ;
}
if ( state.backtracking==0 ) {
after(grammarAccess.getForStmtAccess().getRangeAssignment_2_2());
}
}
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__ForStmt__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:8387:1: ( ( ( rule__ForStmt__Alternatives_2 )? ) )\r\n // InternalGo.g:8388:1: ( ( rule__ForStmt__Alternatives_2 )? )\r\n {\r\n // InternalGo.g:8388:1: ( ( rule__ForStmt__Alternatives_2 )? )\r\n // InternalGo.g:8389:2: ( rule__ForStmt__Alternatives_2 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getForStmtAccess().getAlternatives_2()); \r\n }\r\n // InternalGo.g:8390:2: ( rule__ForStmt__Alternatives_2 )?\r\n int alt79=2;\r\n int LA79_0 = input.LA(1);\r\n\r\n if ( ((LA79_0>=RULE_STRING && LA79_0<=RULE_FLOAT_LIT)||(LA79_0>=RULE_UNARY_OP && LA79_0<=RULE_BOOLEAN_LIT)||LA79_0==42||(LA79_0>=45 && LA79_0<=46)||LA79_0==48||(LA79_0>=51 && LA79_0<=52)||LA79_0==54||LA79_0==56||(LA79_0>=60 && LA79_0<=63)||LA79_0==83) ) {\r\n alt79=1;\r\n }\r\n switch (alt79) {\r\n case 1 :\r\n // InternalGo.g:8390:3: rule__ForStmt__Alternatives_2\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__ForStmt__Alternatives_2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getForStmtAccess().getAlternatives_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Stmt__Alternatives() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:908:1: ( ( ruleIfStmt ) | ( ruleForStmt ) | ( ruleAssStmt ) )\n int alt4=3;\n switch ( input.LA(1) ) {\n case 41:\n {\n alt4=1;\n }\n break;\n case 43:\n {\n alt4=2;\n }\n break;\n case RULE_IDF:\n {\n alt4=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n }\n\n switch (alt4) {\n case 1 :\n // InternalMGPL.g:909:2: ( ruleIfStmt )\n {\n // InternalMGPL.g:909:2: ( ruleIfStmt )\n // InternalMGPL.g:910:3: ruleIfStmt\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStmtAccess().getIfStmtParserRuleCall_0()); \n }\n pushFollow(FOLLOW_2);\n ruleIfStmt();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStmtAccess().getIfStmtParserRuleCall_0()); \n }\n\n }\n\n\n }\n break;\n case 2 :\n // InternalMGPL.g:915:2: ( ruleForStmt )\n {\n // InternalMGPL.g:915:2: ( ruleForStmt )\n // InternalMGPL.g:916:3: ruleForStmt\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStmtAccess().getForStmtParserRuleCall_1()); \n }\n pushFollow(FOLLOW_2);\n ruleForStmt();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStmtAccess().getForStmtParserRuleCall_1()); \n }\n\n }\n\n\n }\n break;\n case 3 :\n // InternalMGPL.g:921:2: ( ruleAssStmt )\n {\n // InternalMGPL.g:921:2: ( ruleAssStmt )\n // InternalMGPL.g:922:3: ruleAssStmt\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStmtAccess().getAssStmtParserRuleCall_2()); \n }\n pushFollow(FOLLOW_2);\n ruleAssStmt();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStmtAccess().getAssStmtParserRuleCall_2()); \n }\n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ForStmt__ForAssignment_2_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:16910:1: ( ( ruleForClause ) )\r\n // InternalGo.g:16911:2: ( ruleForClause )\r\n {\r\n // InternalGo.g:16911:2: ( ruleForClause )\r\n // InternalGo.g:16912:3: ruleForClause\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getForStmtAccess().getForForClauseParserRuleCall_2_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleForClause();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getForStmtAccess().getForForClauseParserRuleCall_2_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void ruleSwitchStmt() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:1417:2: ( ( ( rule__SwitchStmt__Alternatives ) ) )\r\n // InternalGo.g:1418:2: ( ( rule__SwitchStmt__Alternatives ) )\r\n {\r\n // InternalGo.g:1418:2: ( ( rule__SwitchStmt__Alternatives ) )\r\n // InternalGo.g:1419:3: ( rule__SwitchStmt__Alternatives )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSwitchStmtAccess().getAlternatives()); \r\n }\r\n // InternalGo.g:1420:3: ( rule__SwitchStmt__Alternatives )\r\n // InternalGo.g:1420:4: rule__SwitchStmt__Alternatives\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__SwitchStmt__Alternatives();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSwitchStmtAccess().getAlternatives()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final EObject ruleForStatement() throws RecognitionException {\n EObject current = null;\n int ruleForStatement_StartIndex = input.index();\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n Token otherlv_6=null;\n Token otherlv_8=null;\n Token otherlv_10=null;\n EObject lv_loopVariable_2_0 = null;\n\n EObject lv_expression_4_0 = null;\n\n EObject lv_forInit_5_0 = null;\n\n EObject lv_expression_7_0 = null;\n\n EObject lv_forUpdate_9_0 = null;\n\n EObject lv_statement_11_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 70) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3224:28: ( (otherlv_0= KEYWORD_40 otherlv_1= KEYWORD_4 ( ( ( (lv_loopVariable_2_0= ruleLoopVariable ) ) otherlv_3= KEYWORD_12 ( (lv_expression_4_0= ruleExpression ) ) ) | ( ( (lv_forInit_5_0= ruleForInit ) )? otherlv_6= KEYWORD_13 ( (lv_expression_7_0= ruleExpression ) )? otherlv_8= KEYWORD_13 ( (lv_forUpdate_9_0= ruleForUpdate ) )? ) ) otherlv_10= KEYWORD_5 ( (lv_statement_11_0= ruleStatement ) ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3225:1: (otherlv_0= KEYWORD_40 otherlv_1= KEYWORD_4 ( ( ( (lv_loopVariable_2_0= ruleLoopVariable ) ) otherlv_3= KEYWORD_12 ( (lv_expression_4_0= ruleExpression ) ) ) | ( ( (lv_forInit_5_0= ruleForInit ) )? otherlv_6= KEYWORD_13 ( (lv_expression_7_0= ruleExpression ) )? otherlv_8= KEYWORD_13 ( (lv_forUpdate_9_0= ruleForUpdate ) )? ) ) otherlv_10= KEYWORD_5 ( (lv_statement_11_0= ruleStatement ) ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3225:1: (otherlv_0= KEYWORD_40 otherlv_1= KEYWORD_4 ( ( ( (lv_loopVariable_2_0= ruleLoopVariable ) ) otherlv_3= KEYWORD_12 ( (lv_expression_4_0= ruleExpression ) ) ) | ( ( (lv_forInit_5_0= ruleForInit ) )? otherlv_6= KEYWORD_13 ( (lv_expression_7_0= ruleExpression ) )? otherlv_8= KEYWORD_13 ( (lv_forUpdate_9_0= ruleForUpdate ) )? ) ) otherlv_10= KEYWORD_5 ( (lv_statement_11_0= ruleStatement ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3226:2: otherlv_0= KEYWORD_40 otherlv_1= KEYWORD_4 ( ( ( (lv_loopVariable_2_0= ruleLoopVariable ) ) otherlv_3= KEYWORD_12 ( (lv_expression_4_0= ruleExpression ) ) ) | ( ( (lv_forInit_5_0= ruleForInit ) )? otherlv_6= KEYWORD_13 ( (lv_expression_7_0= ruleExpression ) )? otherlv_8= KEYWORD_13 ( (lv_forUpdate_9_0= ruleForUpdate ) )? ) ) otherlv_10= KEYWORD_5 ( (lv_statement_11_0= ruleStatement ) )\n {\n otherlv_0=(Token)match(input,KEYWORD_40,FOLLOW_KEYWORD_40_in_ruleForStatement6425); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getForStatementAccess().getForKeyword_0());\n \n }\n otherlv_1=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleForStatement6437); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getForStatementAccess().getLeftParenthesisKeyword_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3235:1: ( ( ( (lv_loopVariable_2_0= ruleLoopVariable ) ) otherlv_3= KEYWORD_12 ( (lv_expression_4_0= ruleExpression ) ) ) | ( ( (lv_forInit_5_0= ruleForInit ) )? otherlv_6= KEYWORD_13 ( (lv_expression_7_0= ruleExpression ) )? otherlv_8= KEYWORD_13 ( (lv_forUpdate_9_0= ruleForUpdate ) )? ) )\n int alt62=2;\n alt62 = dfa62.predict(input);\n switch (alt62) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3235:2: ( ( (lv_loopVariable_2_0= ruleLoopVariable ) ) otherlv_3= KEYWORD_12 ( (lv_expression_4_0= ruleExpression ) ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3235:2: ( ( (lv_loopVariable_2_0= ruleLoopVariable ) ) otherlv_3= KEYWORD_12 ( (lv_expression_4_0= ruleExpression ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3235:3: ( (lv_loopVariable_2_0= ruleLoopVariable ) ) otherlv_3= KEYWORD_12 ( (lv_expression_4_0= ruleExpression ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3235:3: ( (lv_loopVariable_2_0= ruleLoopVariable ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3236:1: (lv_loopVariable_2_0= ruleLoopVariable )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3236:1: (lv_loopVariable_2_0= ruleLoopVariable )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3237:3: lv_loopVariable_2_0= ruleLoopVariable\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getForStatementAccess().getLoopVariableLoopVariableParserRuleCall_2_0_0_0()); \n \t \n }\n pushFollow(FOLLOW_ruleLoopVariable_in_ruleForStatement6459);\n lv_loopVariable_2_0=ruleLoopVariable();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getForStatementRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"loopVariable\",\n \t\tlv_loopVariable_2_0, \n \t\t\"LoopVariable\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_3=(Token)match(input,KEYWORD_12,FOLLOW_KEYWORD_12_in_ruleForStatement6472); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_3, grammarAccess.getForStatementAccess().getColonKeyword_2_0_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3258:1: ( (lv_expression_4_0= ruleExpression ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3259:1: (lv_expression_4_0= ruleExpression )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3259:1: (lv_expression_4_0= ruleExpression )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3260:3: lv_expression_4_0= ruleExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getForStatementAccess().getExpressionExpressionParserRuleCall_2_0_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleExpression_in_ruleForStatement6492);\n lv_expression_4_0=ruleExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getForStatementRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"expression\",\n \t\tlv_expression_4_0, \n \t\t\"Expression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3277:6: ( ( (lv_forInit_5_0= ruleForInit ) )? otherlv_6= KEYWORD_13 ( (lv_expression_7_0= ruleExpression ) )? otherlv_8= KEYWORD_13 ( (lv_forUpdate_9_0= ruleForUpdate ) )? )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3277:6: ( ( (lv_forInit_5_0= ruleForInit ) )? otherlv_6= KEYWORD_13 ( (lv_expression_7_0= ruleExpression ) )? otherlv_8= KEYWORD_13 ( (lv_forUpdate_9_0= ruleForUpdate ) )? )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3277:7: ( (lv_forInit_5_0= ruleForInit ) )? otherlv_6= KEYWORD_13 ( (lv_expression_7_0= ruleExpression ) )? otherlv_8= KEYWORD_13 ( (lv_forUpdate_9_0= ruleForUpdate ) )?\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3277:7: ( (lv_forInit_5_0= ruleForInit ) )?\n int alt59=2;\n alt59 = dfa59.predict(input);\n switch (alt59) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3278:1: (lv_forInit_5_0= ruleForInit )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3278:1: (lv_forInit_5_0= ruleForInit )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3279:3: lv_forInit_5_0= ruleForInit\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getForStatementAccess().getForInitForInitParserRuleCall_2_1_0_0()); \n \t \n }\n pushFollow(FOLLOW_ruleForInit_in_ruleForStatement6521);\n lv_forInit_5_0=ruleForInit();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getForStatementRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"forInit\",\n \t\tlv_forInit_5_0, \n \t\t\"ForInit\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n break;\n\n }\n\n otherlv_6=(Token)match(input,KEYWORD_13,FOLLOW_KEYWORD_13_in_ruleForStatement6535); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_6, grammarAccess.getForStatementAccess().getSemicolonKeyword_2_1_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3300:1: ( (lv_expression_7_0= ruleExpression ) )?\n int alt60=2;\n alt60 = dfa60.predict(input);\n switch (alt60) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3301:1: (lv_expression_7_0= ruleExpression )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3301:1: (lv_expression_7_0= ruleExpression )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3302:3: lv_expression_7_0= ruleExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getForStatementAccess().getExpressionExpressionParserRuleCall_2_1_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleExpression_in_ruleForStatement6555);\n lv_expression_7_0=ruleExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getForStatementRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"expression\",\n \t\tlv_expression_7_0, \n \t\t\"Expression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n break;\n\n }\n\n otherlv_8=(Token)match(input,KEYWORD_13,FOLLOW_KEYWORD_13_in_ruleForStatement6569); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_8, grammarAccess.getForStatementAccess().getSemicolonKeyword_2_1_3());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3323:1: ( (lv_forUpdate_9_0= ruleForUpdate ) )?\n int alt61=2;\n int LA61_0 = input.LA(1);\n\n if ( (LA61_0==KEYWORD_63||LA61_0==KEYWORD_42||LA61_0==KEYWORD_23||LA61_0==KEYWORD_25||LA61_0==KEYWORD_2||LA61_0==RULE_ID) ) {\n alt61=1;\n }\n switch (alt61) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3324:1: (lv_forUpdate_9_0= ruleForUpdate )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3324:1: (lv_forUpdate_9_0= ruleForUpdate )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3325:3: lv_forUpdate_9_0= ruleForUpdate\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getForStatementAccess().getForUpdateForUpdateParserRuleCall_2_1_4_0()); \n \t \n }\n pushFollow(FOLLOW_ruleForUpdate_in_ruleForStatement6589);\n lv_forUpdate_9_0=ruleForUpdate();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getForStatementRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"forUpdate\",\n \t\tlv_forUpdate_9_0, \n \t\t\"ForUpdate\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n otherlv_10=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleForStatement6605); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_10, grammarAccess.getForStatementAccess().getRightParenthesisKeyword_3());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3346:1: ( (lv_statement_11_0= ruleStatement ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3347:1: (lv_statement_11_0= ruleStatement )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3347:1: (lv_statement_11_0= ruleStatement )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3348:3: lv_statement_11_0= ruleStatement\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getForStatementAccess().getStatementStatementParserRuleCall_4_0()); \n \t \n }\n pushFollow(FOLLOW_ruleStatement_in_ruleForStatement6625);\n lv_statement_11_0=ruleStatement();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getForStatementRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"statement\",\n \t\tlv_statement_11_0, \n \t\t\"Statement\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 70, ruleForStatement_StartIndex); }\n }\n return current;\n }",
"public final void rule__IfStmt__Alternatives_4_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:3620:1: ( ( ( rule__IfStmt__IfsAssignment_4_1_0 ) ) | ( ( rule__IfStmt__Block2Assignment_4_1_1 ) ) )\r\n int alt18=2;\r\n int LA18_0 = input.LA(1);\r\n\r\n if ( (LA18_0==69) ) {\r\n alt18=1;\r\n }\r\n else if ( (LA18_0==57) ) {\r\n alt18=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 18, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt18) {\r\n case 1 :\r\n // InternalGo.g:3621:2: ( ( rule__IfStmt__IfsAssignment_4_1_0 ) )\r\n {\r\n // InternalGo.g:3621:2: ( ( rule__IfStmt__IfsAssignment_4_1_0 ) )\r\n // InternalGo.g:3622:3: ( rule__IfStmt__IfsAssignment_4_1_0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getIfStmtAccess().getIfsAssignment_4_1_0()); \r\n }\r\n // InternalGo.g:3623:3: ( rule__IfStmt__IfsAssignment_4_1_0 )\r\n // InternalGo.g:3623:4: rule__IfStmt__IfsAssignment_4_1_0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__IfStmt__IfsAssignment_4_1_0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getIfStmtAccess().getIfsAssignment_4_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalGo.g:3627:2: ( ( rule__IfStmt__Block2Assignment_4_1_1 ) )\r\n {\r\n // InternalGo.g:3627:2: ( ( rule__IfStmt__Block2Assignment_4_1_1 ) )\r\n // InternalGo.g:3628:3: ( rule__IfStmt__Block2Assignment_4_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getIfStmtAccess().getBlock2Assignment_4_1_1()); \r\n }\r\n // InternalGo.g:3629:3: ( rule__IfStmt__Block2Assignment_4_1_1 )\r\n // InternalGo.g:3629:4: rule__IfStmt__Block2Assignment_4_1_1\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__IfStmt__Block2Assignment_4_1_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getIfStmtAccess().getBlock2Assignment_4_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__ForStmt__ConditionAssignment_2_0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:16895:1: ( ( ruleCondition ) )\r\n // InternalGo.g:16896:2: ( ruleCondition )\r\n {\r\n // InternalGo.g:16896:2: ( ruleCondition )\r\n // InternalGo.g:16897:3: ruleCondition\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getForStmtAccess().getConditionConditionParserRuleCall_2_0_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleCondition();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getForStmtAccess().getConditionConditionParserRuleCall_2_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__IfStmt__Group_4__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:8062:1: ( ( ( rule__IfStmt__Alternatives_4_1 ) ) )\r\n // InternalGo.g:8063:1: ( ( rule__IfStmt__Alternatives_4_1 ) )\r\n {\r\n // InternalGo.g:8063:1: ( ( rule__IfStmt__Alternatives_4_1 ) )\r\n // InternalGo.g:8064:2: ( rule__IfStmt__Alternatives_4_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getIfStmtAccess().getAlternatives_4_1()); \r\n }\r\n // InternalGo.g:8065:2: ( rule__IfStmt__Alternatives_4_1 )\r\n // InternalGo.g:8065:3: rule__IfStmt__Alternatives_4_1\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__IfStmt__Alternatives_4_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getIfStmtAccess().getAlternatives_4_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__S_If__ElseAssignment_4_1() throws RecognitionException {\n int rule__S_If__ElseAssignment_4_1_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 1033) ) { return ; }\n // InternalGaml.g:17271:1: ( ( ( rule__S_If__ElseAlternatives_4_1_0 ) ) )\n // InternalGaml.g:17272:1: ( ( rule__S_If__ElseAlternatives_4_1_0 ) )\n {\n // InternalGaml.g:17272:1: ( ( rule__S_If__ElseAlternatives_4_1_0 ) )\n // InternalGaml.g:17273:1: ( rule__S_If__ElseAlternatives_4_1_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_IfAccess().getElseAlternatives_4_1_0()); \n }\n // InternalGaml.g:17274:1: ( rule__S_If__ElseAlternatives_4_1_0 )\n // InternalGaml.g:17274:2: rule__S_If__ElseAlternatives_4_1_0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_If__ElseAlternatives_4_1_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_IfAccess().getElseAlternatives_4_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 1033, rule__S_If__ElseAssignment_4_1_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SwitchStmt__Alternatives() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:3641:1: ( ( ( rule__SwitchStmt__Group_0__0 ) ) | ( ( rule__SwitchStmt__Group_1__0 ) ) )\r\n int alt19=2;\r\n int LA19_0 = input.LA(1);\r\n\r\n if ( (LA19_0==80) ) {\r\n int LA19_1 = input.LA(2);\r\n\r\n if ( (synpred45_InternalGo()) ) {\r\n alt19=1;\r\n }\r\n else if ( (true) ) {\r\n alt19=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 19, 1, input);\r\n\r\n throw nvae;\r\n }\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 19, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt19) {\r\n case 1 :\r\n // InternalGo.g:3642:2: ( ( rule__SwitchStmt__Group_0__0 ) )\r\n {\r\n // InternalGo.g:3642:2: ( ( rule__SwitchStmt__Group_0__0 ) )\r\n // InternalGo.g:3643:3: ( rule__SwitchStmt__Group_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSwitchStmtAccess().getGroup_0()); \r\n }\r\n // InternalGo.g:3644:3: ( rule__SwitchStmt__Group_0__0 )\r\n // InternalGo.g:3644:4: rule__SwitchStmt__Group_0__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__SwitchStmt__Group_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSwitchStmtAccess().getGroup_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalGo.g:3648:2: ( ( rule__SwitchStmt__Group_1__0 ) )\r\n {\r\n // InternalGo.g:3648:2: ( ( rule__SwitchStmt__Group_1__0 ) )\r\n // InternalGo.g:3649:3: ( rule__SwitchStmt__Group_1__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSwitchStmtAccess().getGroup_1()); \r\n }\r\n // InternalGo.g:3650:3: ( rule__SwitchStmt__Group_1__0 )\r\n // InternalGo.g:3650:4: rule__SwitchStmt__Group_1__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__SwitchStmt__Group_1__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSwitchStmtAccess().getGroup_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XSwitchExpression__Alternatives_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3124:1: ( ( ( rule__XSwitchExpression__Group_2_0__0 ) ) | ( ( rule__XSwitchExpression__Group_2_1__0 ) ) )\n int alt25=2;\n int LA25_0 = input.LA(1);\n\n if ( ((LA25_0>=RULE_ID && LA25_0<=RULE_STRING)||LA25_0==26||(LA25_0>=34 && LA25_0<=35)||LA25_0==40||(LA25_0>=42 && LA25_0<=48)||(LA25_0>=60 && LA25_0<=61)||LA25_0==64||LA25_0==66||(LA25_0>=70 && LA25_0<=78)||LA25_0==87) ) {\n alt25=1;\n }\n else if ( (LA25_0==56) ) {\n int LA25_2 = input.LA(2);\n\n if ( (LA25_2==RULE_ID) ) {\n int LA25_3 = input.LA(3);\n\n if ( ((LA25_3>=13 && LA25_3<=39)||(LA25_3>=56 && LA25_3<=59)||LA25_3==61||(LA25_3>=83 && LA25_3<=84)) ) {\n alt25=1;\n }\n else if ( (LA25_3==67) ) {\n alt25=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 25, 3, input);\n\n throw nvae;\n }\n }\n else if ( ((LA25_2>=RULE_HEX && LA25_2<=RULE_STRING)||LA25_2==26||(LA25_2>=34 && LA25_2<=35)||LA25_2==40||(LA25_2>=42 && LA25_2<=48)||LA25_2==56||(LA25_2>=60 && LA25_2<=61)||LA25_2==64||LA25_2==66||(LA25_2>=70 && LA25_2<=78)||LA25_2==87) ) {\n alt25=1;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 25, 2, input);\n\n throw nvae;\n }\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 25, 0, input);\n\n throw nvae;\n }\n switch (alt25) {\n case 1 :\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3125:1: ( ( rule__XSwitchExpression__Group_2_0__0 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3125:1: ( ( rule__XSwitchExpression__Group_2_0__0 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3126:1: ( rule__XSwitchExpression__Group_2_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSwitchExpressionAccess().getGroup_2_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3127:1: ( rule__XSwitchExpression__Group_2_0__0 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3127:2: rule__XSwitchExpression__Group_2_0__0\n {\n pushFollow(FOLLOW_rule__XSwitchExpression__Group_2_0__0_in_rule__XSwitchExpression__Alternatives_26799);\n rule__XSwitchExpression__Group_2_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSwitchExpressionAccess().getGroup_2_0()); \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3131:6: ( ( rule__XSwitchExpression__Group_2_1__0 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3131:6: ( ( rule__XSwitchExpression__Group_2_1__0 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3132:1: ( rule__XSwitchExpression__Group_2_1__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSwitchExpressionAccess().getGroup_2_1()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3133:1: ( rule__XSwitchExpression__Group_2_1__0 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:3133:2: rule__XSwitchExpression__Group_2_1__0\n {\n pushFollow(FOLLOW_rule__XSwitchExpression__Group_2_1__0_in_rule__XSwitchExpression__Alternatives_26817);\n rule__XSwitchExpression__Group_2_1__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSwitchExpressionAccess().getGroup_2_1()); \n }\n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XSwitchExpression__Alternatives_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:2804:1: ( ( ( rule__XSwitchExpression__Group_2_0__0 ) ) | ( ( rule__XSwitchExpression__Group_2_1__0 ) ) )\n int alt21=2;\n int LA21_0 = input.LA(1);\n\n if ( ((LA21_0>=RULE_ID && LA21_0<=RULE_STRING)||LA21_0==25||(LA21_0>=33 && LA21_0<=34)||LA21_0==39||(LA21_0>=42 && LA21_0<=47)||(LA21_0>=54 && LA21_0<=55)||LA21_0==57||LA21_0==61||LA21_0==63||(LA21_0>=67 && LA21_0<=75)||LA21_0==84) ) {\n alt21=1;\n }\n else if ( (LA21_0==60) ) {\n int LA21_2 = input.LA(2);\n\n if ( (LA21_2==RULE_ID) ) {\n int LA21_3 = input.LA(3);\n\n if ( ((LA21_3>=13 && LA21_3<=38)||LA21_3==40||(LA21_3>=50 && LA21_3<=51)||LA21_3==53||LA21_3==57||LA21_3==60||(LA21_3>=80 && LA21_3<=81)) ) {\n alt21=1;\n }\n else if ( (LA21_3==64) ) {\n alt21=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 21, 3, input);\n\n throw nvae;\n }\n }\n else if ( ((LA21_2>=RULE_HEX && LA21_2<=RULE_STRING)||LA21_2==25||(LA21_2>=33 && LA21_2<=34)||LA21_2==39||(LA21_2>=42 && LA21_2<=47)||(LA21_2>=54 && LA21_2<=55)||LA21_2==57||(LA21_2>=60 && LA21_2<=61)||LA21_2==63||(LA21_2>=67 && LA21_2<=75)||LA21_2==84) ) {\n alt21=1;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 21, 2, input);\n\n throw nvae;\n }\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 21, 0, input);\n\n throw nvae;\n }\n switch (alt21) {\n case 1 :\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:2805:1: ( ( rule__XSwitchExpression__Group_2_0__0 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:2805:1: ( ( rule__XSwitchExpression__Group_2_0__0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:2806:1: ( rule__XSwitchExpression__Group_2_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSwitchExpressionAccess().getGroup_2_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:2807:1: ( rule__XSwitchExpression__Group_2_0__0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:2807:2: rule__XSwitchExpression__Group_2_0__0\n {\n pushFollow(FOLLOW_rule__XSwitchExpression__Group_2_0__0_in_rule__XSwitchExpression__Alternatives_26074);\n rule__XSwitchExpression__Group_2_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSwitchExpressionAccess().getGroup_2_0()); \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:2811:6: ( ( rule__XSwitchExpression__Group_2_1__0 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:2811:6: ( ( rule__XSwitchExpression__Group_2_1__0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:2812:1: ( rule__XSwitchExpression__Group_2_1__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSwitchExpressionAccess().getGroup_2_1()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:2813:1: ( rule__XSwitchExpression__Group_2_1__0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:2813:2: rule__XSwitchExpression__Group_2_1__0\n {\n pushFollow(FOLLOW_rule__XSwitchExpression__Group_2_1__0_in_rule__XSwitchExpression__Alternatives_26092);\n rule__XSwitchExpression__Group_2_1__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSwitchExpressionAccess().getGroup_2_1()); \n }\n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Statement__ForstAssignment_13() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:16565:1: ( ( ruleForStmt ) )\r\n // InternalGo.g:16566:2: ( ruleForStmt )\r\n {\r\n // InternalGo.g:16566:2: ( ruleForStmt )\r\n // InternalGo.g:16567:3: ruleForStmt\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getStatementAccess().getForstForStmtParserRuleCall_13_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleForStmt();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getStatementAccess().getForstForStmtParserRuleCall_13_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__ForStmt__ConditionAssignment_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:4829:1: ( ( ruleExpr ) )\n // InternalMGPL.g:4830:2: ( ruleExpr )\n {\n // InternalMGPL.g:4830:2: ( ruleExpr )\n // InternalMGPL.g:4831:3: ruleExpr\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getForStmtAccess().getConditionExprParserRuleCall_4_0()); \n }\n pushFollow(FOLLOW_2);\n ruleExpr();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getForStmtAccess().getConditionExprParserRuleCall_4_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XSwitchExpression__Alternatives_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2818:1: ( ( ( rule__XSwitchExpression__Group_2_0__0 ) ) | ( ( rule__XSwitchExpression__Group_2_1__0 ) ) )\r\n int alt21=2;\r\n int LA21_0 = input.LA(1);\r\n\r\n if ( ((LA21_0>=RULE_ID && LA21_0<=RULE_STRING)||LA21_0==23||(LA21_0>=30 && LA21_0<=31)||LA21_0==36||(LA21_0>=39 && LA21_0<=40)||LA21_0==74||LA21_0==104||LA21_0==107||LA21_0==109||(LA21_0>=113 && LA21_0<=115)||(LA21_0>=117 && LA21_0<=122)||LA21_0==132) ) {\r\n alt21=1;\r\n }\r\n else if ( (LA21_0==106) ) {\r\n int LA21_2 = input.LA(2);\r\n\r\n if ( (LA21_2==RULE_ID) ) {\r\n int LA21_3 = input.LA(3);\r\n\r\n if ( ((LA21_3>=14 && LA21_3<=35)||LA21_3==37||(LA21_3>=100 && LA21_3<=102)||LA21_3==104||LA21_3==106||LA21_3==116||(LA21_3>=128 && LA21_3<=129)) ) {\r\n alt21=1;\r\n }\r\n else if ( (LA21_3==110) ) {\r\n alt21=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 21, 3, input);\r\n\r\n throw nvae;\r\n }\r\n }\r\n else if ( ((LA21_2>=RULE_HEX && LA21_2<=RULE_STRING)||LA21_2==23||(LA21_2>=30 && LA21_2<=31)||LA21_2==36||(LA21_2>=39 && LA21_2<=40)||LA21_2==74||LA21_2==104||(LA21_2>=106 && LA21_2<=107)||LA21_2==109||(LA21_2>=113 && LA21_2<=115)||(LA21_2>=117 && LA21_2<=122)||LA21_2==132) ) {\r\n alt21=1;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 21, 2, input);\r\n\r\n throw nvae;\r\n }\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 21, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt21) {\r\n case 1 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2819:1: ( ( rule__XSwitchExpression__Group_2_0__0 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2819:1: ( ( rule__XSwitchExpression__Group_2_0__0 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2820:1: ( rule__XSwitchExpression__Group_2_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXSwitchExpressionAccess().getGroup_2_0()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2821:1: ( rule__XSwitchExpression__Group_2_0__0 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2821:2: rule__XSwitchExpression__Group_2_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XSwitchExpression__Group_2_0__0_in_rule__XSwitchExpression__Alternatives_26096);\r\n rule__XSwitchExpression__Group_2_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXSwitchExpressionAccess().getGroup_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2825:6: ( ( rule__XSwitchExpression__Group_2_1__0 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2825:6: ( ( rule__XSwitchExpression__Group_2_1__0 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2826:1: ( rule__XSwitchExpression__Group_2_1__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXSwitchExpressionAccess().getGroup_2_1()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2827:1: ( rule__XSwitchExpression__Group_2_1__0 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2827:2: rule__XSwitchExpression__Group_2_1__0\r\n {\r\n pushFollow(FOLLOW_rule__XSwitchExpression__Group_2_1__0_in_rule__XSwitchExpression__Alternatives_26114);\r\n rule__XSwitchExpression__Group_2_1__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXSwitchExpressionAccess().getGroup_2_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__ForStmt__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:2783:1: ( ( 'for' ) )\n // InternalMGPL.g:2784:1: ( 'for' )\n {\n // InternalMGPL.g:2784:1: ( 'for' )\n // InternalMGPL.g:2785:2: 'for'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getForStmtAccess().getForKeyword_0()); \n }\n match(input,43,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getForStmtAccess().getForKeyword_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Statement__Alternatives_0_1() throws RecognitionException {\n int rule__Statement__Alternatives_0_1_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 211) ) { return ; }\n // InternalGaml.g:3102:1: ( ( ( ruleS_Assignment ) ) | ( ruleS_1Expr_Facets_BlockOrEnd ) | ( ruleS_Other ) | ( ruleS_Do ) | ( ruleS_Return ) | ( ruleS_Solve ) | ( ruleS_If ) | ( ruleS_Equations ) )\n int alt9=8;\n alt9 = dfa9.predict(input);\n switch (alt9) {\n case 1 :\n // InternalGaml.g:3103:1: ( ( ruleS_Assignment ) )\n {\n // InternalGaml.g:3103:1: ( ( ruleS_Assignment ) )\n // InternalGaml.g:3104:1: ( ruleS_Assignment )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStatementAccess().getS_AssignmentParserRuleCall_0_1_0()); \n }\n // InternalGaml.g:3105:1: ( ruleS_Assignment )\n // InternalGaml.g:3105:3: ruleS_Assignment\n {\n pushFollow(FollowSets000.FOLLOW_2);\n ruleS_Assignment();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStatementAccess().getS_AssignmentParserRuleCall_0_1_0()); \n }\n\n }\n\n\n }\n break;\n case 2 :\n // InternalGaml.g:3109:6: ( ruleS_1Expr_Facets_BlockOrEnd )\n {\n // InternalGaml.g:3109:6: ( ruleS_1Expr_Facets_BlockOrEnd )\n // InternalGaml.g:3110:1: ruleS_1Expr_Facets_BlockOrEnd\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStatementAccess().getS_1Expr_Facets_BlockOrEndParserRuleCall_0_1_1()); \n }\n pushFollow(FollowSets000.FOLLOW_2);\n ruleS_1Expr_Facets_BlockOrEnd();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStatementAccess().getS_1Expr_Facets_BlockOrEndParserRuleCall_0_1_1()); \n }\n\n }\n\n\n }\n break;\n case 3 :\n // InternalGaml.g:3115:6: ( ruleS_Other )\n {\n // InternalGaml.g:3115:6: ( ruleS_Other )\n // InternalGaml.g:3116:1: ruleS_Other\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStatementAccess().getS_OtherParserRuleCall_0_1_2()); \n }\n pushFollow(FollowSets000.FOLLOW_2);\n ruleS_Other();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStatementAccess().getS_OtherParserRuleCall_0_1_2()); \n }\n\n }\n\n\n }\n break;\n case 4 :\n // InternalGaml.g:3121:6: ( ruleS_Do )\n {\n // InternalGaml.g:3121:6: ( ruleS_Do )\n // InternalGaml.g:3122:1: ruleS_Do\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStatementAccess().getS_DoParserRuleCall_0_1_3()); \n }\n pushFollow(FollowSets000.FOLLOW_2);\n ruleS_Do();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStatementAccess().getS_DoParserRuleCall_0_1_3()); \n }\n\n }\n\n\n }\n break;\n case 5 :\n // InternalGaml.g:3127:6: ( ruleS_Return )\n {\n // InternalGaml.g:3127:6: ( ruleS_Return )\n // InternalGaml.g:3128:1: ruleS_Return\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStatementAccess().getS_ReturnParserRuleCall_0_1_4()); \n }\n pushFollow(FollowSets000.FOLLOW_2);\n ruleS_Return();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStatementAccess().getS_ReturnParserRuleCall_0_1_4()); \n }\n\n }\n\n\n }\n break;\n case 6 :\n // InternalGaml.g:3133:6: ( ruleS_Solve )\n {\n // InternalGaml.g:3133:6: ( ruleS_Solve )\n // InternalGaml.g:3134:1: ruleS_Solve\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStatementAccess().getS_SolveParserRuleCall_0_1_5()); \n }\n pushFollow(FollowSets000.FOLLOW_2);\n ruleS_Solve();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStatementAccess().getS_SolveParserRuleCall_0_1_5()); \n }\n\n }\n\n\n }\n break;\n case 7 :\n // InternalGaml.g:3139:6: ( ruleS_If )\n {\n // InternalGaml.g:3139:6: ( ruleS_If )\n // InternalGaml.g:3140:1: ruleS_If\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStatementAccess().getS_IfParserRuleCall_0_1_6()); \n }\n pushFollow(FollowSets000.FOLLOW_2);\n ruleS_If();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStatementAccess().getS_IfParserRuleCall_0_1_6()); \n }\n\n }\n\n\n }\n break;\n case 8 :\n // InternalGaml.g:3145:6: ( ruleS_Equations )\n {\n // InternalGaml.g:3145:6: ( ruleS_Equations )\n // InternalGaml.g:3146:1: ruleS_Equations\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStatementAccess().getS_EquationsParserRuleCall_0_1_7()); \n }\n pushFollow(FollowSets000.FOLLOW_2);\n ruleS_Equations();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStatementAccess().getS_EquationsParserRuleCall_0_1_7()); \n }\n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 211, rule__Statement__Alternatives_0_1_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void entryRuleForStmt() throws RecognitionException {\r\n try {\r\n // InternalGo.g:1455:1: ( ruleForStmt EOF )\r\n // InternalGo.g:1456:1: ruleForStmt EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getForStmtRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleForStmt();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getForStmtRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }",
"ForStatement createForStatement();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the specified time having been worked on the task in the database. | public boolean updateTimeForTask(CountedTime countedTime) throws SQLException; | [
"@Override\n public boolean updateTimeForTask(CountedTime countedTime) throws SQLException{\n return taskManager.updateTimeForTask(countedTime);\n }",
"public void saveTimeForTask(Task task, int time, Date startTime, Date stopTime) throws SQLException;",
"@Override\n public void saveTimeForTask(Task task, int time, Date startTime, Date stopTime) throws SQLException{\n taskManager.saveTimeForTask(task, time, startTime, stopTime);\n }",
"@Test\n\tpublic void testUpdateDeadlineTaskWithTime(){\n\t\tCommand result = tester.parse(\"update 2 homework for CS2103. 221015 2000\");\n\t\tassertEquals(\"update\", result.getCommand());\n\t\tTasks task = result.getTask();\n\t\tassertEquals(\"homework for CS2103\", task.getDescription());\n\t\tDuration timeDetails = ((DeadlineTask)task).getDurationDetails();\n\t\tassertEquals(\"221015\", timeDetails.getEndDate());\n\t\tassertEquals(\"2000\", timeDetails.getEndTime());\n\t\tassertEquals(Integer.parseInt(\"2\"), task.getTaskID());\n\t}",
"public void updateTime() throws SQLException {\n\t\tConnection con = openDBConnection();\n\t\tCallableStatement callStmt = con.prepareCall(\" {call team1.GABES_CHECK_TIME()}\");\n\t\tcallStmt.execute();\n\t\tcallStmt.close();\n\t}",
"Integer updateTaskHours(Long taskId, Integer hours) throws ServiceException;",
"void editNoteStartTime(NoteModel currentNote, int newStartTime);",
"void updateActiveTime(int T);",
"public void updateTaskAssignToTeam(int task_id, int team_id) throws Exception {\n //update bio query with user id\n connectToDatabase();\n String sql = \"UPDATE Task SET assignedTeam_id ='\" + team_id + \"'WHERE task_id =\" + task_id;\n statement.executeUpdate(sql);\n\n //close database connection\n close();\n\n\n }",
"public void testCmdUpdate_time_field() {\n\t\t// Initialize test variables\n\t\tCommandAction expectedCA;\n\t\tTask expectedTask;\n\t\tList<Task> expectedTaskList;\n\n\t\t/*\n\t\t * Test 3: Testing time field (all ID are valid)\n\t\t */\n\t\tctf.initialize();\n\t\texpectedTaskList = null;\n\t\taddNewTask(TASK_NAME_1);\n\n\t\t// Test 3a: start time and end time are both null\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 3b: valid start time without end time\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, VALID_START_TIME + \"\", null, null);\n\t\texpectedCA = new CommandAction(MSG_INVALIDTIME, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 3c: start time after end time\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, INVALID_START_TIME + \"\", VALID_END_TIME + \"\", null);\n\t\texpectedCA = new CommandAction(MSG_INVALIDTIME, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 3d: start time before end time\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, VALID_START_TIME + \"\", VALID_END_TIME + \"\", null);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, VALID_START_TIME, VALID_END_TIME, PRIORITY_TYPE.NORMAL);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t}",
"void updateTaskDueDate(int id, LocalDateTime dueDate);",
"@PutMapping(\"/workoutTime/{id}\")\n\tvoid updateWorkoutTime(@RequestBody UserWorkoutBean theWorkoutTime,@PathVariable int id) {\n\t\tservice.updateWorkoutTime(theWorkoutTime, id);\n\t}",
"protected abstract void updateDayTime(fr.inria.phoenix.diasuite.framework.datatype.daytime.DayTime currentTime) throws Exception;",
"void updateTaskDueDate();",
"public void updateTask(Task task){//needs to depend on row num\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID,task.getId());\n values.put(KEY_LABEL,task.getLabel());\n values.put(KEY_TIME, task.getTime());\n db.update(TABLE_NAME, values, KEY_ID+\" = ?\",\n new String[] { String.valueOf(task.getId()) });\n }",
"@Query(\"UPDATE Schedule SET `Start hour` = :start_time WHERE sid = :sId\")\n void updateStartHour(Integer sId, Long start_time);",
"public void updateTrip() {\n if (allStopTimes.getColOfStopTimes().size() > 0) {\n stopTimesInTrip = allStopTimes.searchTripIdTimes(tripId);\n }\n }",
"public void setWorkTime(Integer workTime)\n {\n this.workTime = workTime;\n }",
"@Test\n\tpublic void testUpdateDeadlineTaskWithoutTime(){\n\t\tCommand result = tester.parse(\"update 2 homework for CS2103. 221015\");\n\t\tassertEquals(\"update\", result.getCommand());\n\t\tTasks task = result.getTask();\n\t\tassertEquals(\"homework for CS2103\", task.getDescription());\n\t\tDuration timeDetails = ((DeadlineTask)task).getDurationDetails();\n\t\tassertEquals(\"221015\", timeDetails.getEndDate());\n\t\tassertEquals(\"2359\", timeDetails.getEndTime());\n\t\tassertEquals(Integer.parseInt(\"2\"), task.getTaskID());\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the value associated with the column: exchange_date | public java.util.Date getExchangeDate () {
return exchangeDate;
} | [
"public java.lang.String getExchangeDate() {\n return exchangeDate;\n }",
"public java.lang.String getCurrencyExchangeDate() {\n return currencyExchangeDate;\n }",
"Date getDateValue();",
"public OffsetDateTime exchangeRateDate() {\n return this.innerProperties() == null ? null : this.innerProperties().exchangeRateDate();\n }",
"public void setExchangeDate(java.lang.String exchangeDate) {\n this.exchangeDate = exchangeDate;\n }",
"public void setExchangeDate (java.util.Date exchangeDate) {\n\t\tthis.exchangeDate = exchangeDate;\n\t}",
"public Date getDate(String column);",
"io.opencannabis.schema.temporal.TemporalDate.Date getReceived();",
"com.google.type.Date getDateValue();",
"java.lang.String getInvoiceDate();",
"public Date getVALUE_DATE()\r\n {\r\n\treturn VALUE_DATE;\r\n }",
"public Date getDELIVERY_DATE() {\r\n return DELIVERY_DATE;\r\n }",
"public Date getDELIVERY_DATE()\r\n {\r\n\treturn DELIVERY_DATE;\r\n }",
"Date getDateField();",
"java.util.Date getADateDataSourceValue();",
"public Date getDEAL_VALUE_DATE() {\r\n return DEAL_VALUE_DATE;\r\n }",
"java.lang.String getOrderDate();",
"public Date getDate(Object key) {\r\n return boundDataConversion.getFieldValue(Date.class, super.get(key.toString().toLowerCase()));\r\n }",
"public Date getVALUE_DATE() {\r\n return VALUE_DATE;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of createAssociation method, of class ShoppingCartDAOImpl. | @Test
public void testCreateAssociations() {
System.out.println("Add new ShoppingCart");
User expectUser = new User("yogamaster", "yogamaster", "Yoga", "Master",
"What is your favorit car?", "Benz");
expectUser = userDAO.create(expectUser);
Customer expectCustomer = new Customer(expectUser);
expectCustomer = customerDAO.create(expectCustomer);
ShoppingCart shoppingCart = new ShoppingCart(expectCustomer);
Product product = new Product();
product.setName("HP");
product.setType("Computer");
product.setPrice(1300);
product.setAvailableQuantity(3);
product.setDescription("HP123");
Product resultProduct = productDAO.create(product);
ShoppingCartItem cartItem = new ShoppingCartItem();
cartItem.setProduct(product);
cartItem.setShoppingCart(shoppingCart);
cartItem = shoppingCartItemDAO.create(cartItem);
assertNotNull(resultProduct.getId());
assertEquals(product, resultProduct);
ShoppingCart expect = shoppingCartDAO.create(shoppingCart);
assertNotNull(expect.getId());
assertEquals(expect, shoppingCart);
ShoppingCart shoppingCartTest = shoppingCartDAO.getById(expect.getId());
Set<ShoppingCartItem> shoppingCartList = shoppingCartTest.getSetOfShoppingCartItems();
for (ShoppingCartItem cartItem1 : shoppingCartList) {
assertEquals(cartItem1, cartItem);
}
} | [
"Association createAssociation();",
"@Test\n public void testCreate() {\n System.out.println(\"Add new ShoppingCart\");\n \n User expectUser = new User(\"yogamaster\", \"yogamaster\", \"Yoga\", \"Master\",\n \"What is your favorit car?\", \"Benz\");\n expectUser = userDAO.create(expectUser);\n \n Customer expectCustomer = new Customer(expectUser);\n expectCustomer = customerDAO.create(expectCustomer);\n \n ShoppingCart shoppingCart = new ShoppingCart(expectCustomer);\n ShoppingCart expect = shoppingCartDAO.create(shoppingCart);\n assertNotNull(expect.getId());\n }",
"@Test\n public void testRemoveAssociations() {\n\n User expectUser = new User(\"yogamaster\", \"yogamaster\", \"Yoga\", \"Master\",\n \"What is your favorit car?\", \"Benz\");\n expectUser = userDAO.create(expectUser);\n \n Customer expectCustomer = new Customer(expectUser);\n expectCustomer = customerDAO.create(expectCustomer);\n \n ShoppingCart shoppingCart = new ShoppingCart(expectCustomer);\n \n Product product = new Product();\n product.setName(\"HP\");\n product.setType(\"Computer\");\n product.setPrice(1300);\n product.setAvailableQuantity(3);\n product.setDescription(\"HP123\");\n\n Product resultProduct = productDAO.create(product);\n \n ShoppingCartItem cartItem = new ShoppingCartItem();\n cartItem.setProduct(product);\n cartItem.setShoppingCart(shoppingCart);\n cartItem = shoppingCartItemDAO.create(cartItem);\n \n ShoppingCart expect = shoppingCartDAO.create(shoppingCart);\n\n ShoppingCart removeShoppingCart = shoppingCartDAO.remove(expect.getId());\n for (ShoppingCartItem removeItem : removeShoppingCart.getSetOfShoppingCartItems()) {\n try {\n System.out.println(\"Checking ShoppingCartItem\" + removeItem.getId());\n ShoppingCartItem nullItem = shoppingCartItemDAO.getById(removeItem.getId());\n System.out.println(\"Null: ShoppingCartItem, \" + removeItem.getId());\n } catch (Exception e) {\n assertEquals(org.hibernate.ObjectNotFoundException.class, e.getClass());\n System.out.println(\"Not found: Product \" + removeItem.getId());\n }\n }\n }",
"public void testAssociateProduct() throws Exception {\r\n initData();\r\n // bakingChocolate should have 2 products to begin with\r\n assertEquals(bakingChocolate.getProductAssociations().size(),2);\r\n // now associate another product\r\n bakingChocolate.associate(chocoChuncks);\r\n // verify that it now has 3\r\n assertEquals(bakingChocolate.getProductAssociations().size(),3);\r\n }",
"@Test\n public void testAddCartToUserWithCartDetails() throws Exception {\n User user = new User();\n\n user.setUsername(\"someusername\");\n user.setPassword(\"myPassword\");\n\n user.setCart(new Cart());\n\n List<Product> storedProducts = (List<Product>) productService.listAll();\n\n CartDetail cartItemOne = new CartDetail();\n cartItemOne.setProduct(storedProducts.get(0));\n user.getCart().addCartDetail(cartItemOne);\n\n CartDetail cartItemTwo = new CartDetail();\n cartItemTwo.setProduct(storedProducts.get(1));\n user.getCart().addCartDetail(cartItemTwo);\n\n User savedUser = userService.saveOrUpdate(user);\n\n assert savedUser.getId() != null;\n assert savedUser.getVersion() != null;\n assert savedUser.getCart() != null;\n assert savedUser.getCart().getId() != null;\n assert savedUser.getCart().getCartDetails().size() == 2;\n }",
"public void testassociate_AssociationException2()\r\n throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.associate(address, 3, false);\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }",
"@Test\r\n\tvoid testaddProductToCart() throws Exception\r\n\t{\r\n\t\tCart cart=new Cart();\r\n\t\tcart.setProductId(1001);\r\n\t\tcartdao.addProductToCart(cart);\r\n\t\tList<Cart> l=cartdao.findAllProductsInCart();\r\n\t\tassertEquals(1,l.size());\r\n\t}",
"@Test\n\tpublic void testSelectByAssociationID() {\n\t\tModuleAssociation returnedModuleAssociation = moduleAssociationRepo.insert(moduleAssociation);\n\t\tModuleAssociation moduleAssociations = moduleAssociationRepo\n\t\t\t\t.selectByID(returnedModuleAssociation.getAssociationID());\n\t\tassertNotNull(moduleAssociations);\n\t}",
"public void testRetrieveAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddresses(new long[]{address.getId()});\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }",
"public void testRetrieveAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddress(address.getId());\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }",
"@Test\n public void testAddAndRemoveCartToUserWithCartDetails() throws Exception {\n User user = new User();\n\n user.setUsername(\"someusername\");\n user.setPassword(\"myPassword\");\n\n user.setCart(new Cart());\n\n List<Product> storedProducts = (List<Product>) productService.listAll();\n\n CartDetail cartItemOne = new CartDetail();\n cartItemOne.setProduct(storedProducts.get(0));\n user.getCart().addCartDetail(cartItemOne);\n\n CartDetail cartItemTwo = new CartDetail();\n cartItemTwo.setProduct(storedProducts.get(1));\n user.getCart().addCartDetail(cartItemTwo);\n\n User savedUser = userService.saveOrUpdate(user);\n\n assert savedUser.getCart().getCartDetails().size() == 2;\n\n savedUser.getCart().removeCartDetail(savedUser.getCart().getCartDetails().get(0));\n\n userService.saveOrUpdate(savedUser);\n\n assert savedUser.getCart().getCartDetails().size() == 1;\n }",
"@Test\n public void testAddProduc() {\n System.out.println(\"addProduc\");\n Product product = new Product(15,\"Picafresa\", 13, 11);\n ProductDao instance = new ProductDao();\n int expResult = 1;\n int result = instance.addProduc(product);\n assertEquals(expResult, result);\n \n }",
"@RequestMapping(value = \"/associations\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Association> createAssociation(@RequestBody Association association) throws URISyntaxException {\n log.debug(\"REST request to save Association : {}\", association);\n if (association.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"association\", \"idexists\", \"A new association cannot already have an ID\")).body(null);\n }\n Association result = associationRepository.save(association);\n return ResponseEntity.created(new URI(\"/api/associations/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"association\", result.getId().toString()))\n .body(result);\n }",
"@Test\n public void testGetById() {\n System.out.println(\"ShoppingCart getByID\");\n \n User expectUser = new User(\"yogamaster\", \"yogamaster\", \"Yoga\", \"Master\",\n \"What is your favorit car?\", \"Benz\");\n expectUser = userDAO.create(expectUser);\n \n Customer expectCustomer = new Customer(expectUser);\n expectCustomer = customerDAO.create(expectCustomer);\n \n ShoppingCart shoppingCart = new ShoppingCart(expectCustomer);\n \n ShoppingCart expect = shoppingCartDAO.create(shoppingCart);\n assertNotNull(expect.getId());\n\n ShoppingCart result = shoppingCartDAO.getById(expect.getId());\n assertEquals(expect, result);\n }",
"@Test\n \t@DatabaseSetup(value = {\n \t\t\t\"classpath:dbunit/systemAdmin/userDataOneOfEachTestData.xml\", \n\t\t\t\"classpath:dbunit/parties/suppliersTestData.xml\", \n\t\t\t\"classpath:dbunit/asset/assetsTestData.xml\", \n\t\t\t\"classpath:dbunit/parties/emailsTelephoneEtcTestData.xml\",\n\t\t\t\"classpath:dbunit/asset/assetProposalTestDataEmpty.xml\" // Needed if debugging with rollback set to false\n\t\t\t})\n\tpublic void createAssetProposalNewPersonalDetailsTest()\n\t{\n \t\tAssetProposal testAssetProposal = getNewProposal();\n\n \t\t//Setup a new proposalExtra, which by saving the AssetProposal should also persist the proposalExtras set.\n \t\tAssetProposalExtras assetProposalExtra = new AssetProposalExtras();\n \t\tassetProposalExtra.setCostOfExtras(COST);\n \t\tassetProposalExtra.setAssetId(DBUNIT_LEASE_ASSET);\n \t\tassetProposalExtra.setLeaseOutExtraId(DBUNIT_LEASE_OUT_EXTRA);\n \t\ttestAssetProposal.addAssetProposalExtra(assetProposalExtra);\n \t\t\n \t\tAssetSchedule assetSchedule = new AssetSchedule();\n \t\tassetSchedule.setAssets(testAssetProposal.getAsset());\n \t\tassetSchedule.setLeaseCommences(new Date());\n \t\t\n \t\tEmail email = new Email();\n \t\temail.setEmailAddress(updatedEmailAddress);\n \t\tAddress address = new Address();\n \t\taddress.setAddressLine1(addressLine1);\n \t\taddress.setCity(city);\n \t\tTelephoneNumber telephoneNumber = new TelephoneNumber();\n \t\ttelephoneNumber.setTelNo(telNo);\n\n \t\ttestAssetProposal.setEmail(email);\n \t\ttestAssetProposal.setAddress(address);\n \t\ttestAssetProposal.setTelephone(telephoneNumber);\n \t\ttestAssetProposal.setAssetSchedule(assetSchedule);\n\t\thibernateDAO.create(testAssetProposal);\n \t\tflushAndClear();\n\t\n \t\tassertNotNull(testAssetProposal.getId());\n \t\tassertNotNull(assetSchedule.getId());\n \t\t\n\t\tAssetProposal assetProposalRetrieved = hibernateDAO.retrieve(AssetProposal.class, testAssetProposal.getId());\n\t\n\t\t//Ensure the extras have been created.\n\t\tfor (AssetProposalExtras extra : assetProposalRetrieved.getAssetProposalExtras()) {\n\t \t\tassertEquals(testAssetProposal.getAsset().getId(), extra.getAsset().getId());\n\t \t\tassertEquals(COST, extra.getCostOfExtras());\n\t\t\tassertAuditFields(extra);\n\t\t\tassertEquals(0, extra.getVersionNumber().intValue());\n\t\t}\n \t\tassertNotNull(assetProposalRetrieved.getAssetSchedule());\n\t\tassertEquals(assetSchedule.getId(), (Long)assetProposalRetrieved.getAssetSchedule().getId());\n \t\tassertEquals(updatedEmailAddress, assetProposalRetrieved.getEmail().getEmailAddress());\n \t\tassertEquals(addressLine1, assetProposalRetrieved.getAddress().getAddressLine1());\n \t\tassertEquals(telNo, assetProposalRetrieved.getTelephone().getTelNo());\n\n \t\tassertEquals((Long)201L, (Long)assetProposalRetrieved.getAddress().getId());\n \t\tassertEquals((Long)301L, (Long)assetProposalRetrieved.getEmail().getId());\n \t\tassertEquals((Long)401L, (Long)assetProposalRetrieved.getTelephone().getId());\n \t\tassertEquals((Long)DBUNIT_COMPANY, (Long)assetProposalRetrieved.getCompany().getId());\n \t\t//assertEquals((Long)1L, (Long)assetProposalRetrieved.getProposalExtra().getId());\n\n \t\tassertAuditFields(assetProposalRetrieved);\n\t}",
"@Test\n @Transactional\n public void testCreate() {\n System.out.println(\"creating traject\");\n service.create(traject2);\n \n Traject result = (Traject)service.read(traject2.getId());\n int trajectId = result.getId();\n \n assertNotNull(\"traject must not be null\", traject2);\n assertNotNull(\"result must not be null\", result);\n \n assertEquals(\"traject, all fields must be equal\", traject2, result);\n }",
"public void testAssociateProductCategory() throws Exception {\r\n initData();\r\n // chocolate should have 2 child categories to begin with\r\n assertEquals(chocolate.getChildProductCategories().size(),2);\r\n // now add another category\r\n chocolate.associate(biteSize);\r\n // verify that it now has 3\r\n assertEquals(chocolate.getChildProductCategories().size(),3);\r\n }",
"@Test\n public void testAddAssociatedPart() {\n System.out.println(\"addAssociatedPart\");\n Part part = null;\n Product instance = new Product();\n instance.addAssociatedPart(part);\n }",
"public void testGetAllAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.getAllAddresses();\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the itOrderFulfillmentTime property. | public void setItOrderFulfillmentTime(int value) {
this.itOrderFulfillmentTime = value;
} | [
"public int getItOrderFulfillmentTime() {\n return itOrderFulfillmentTime;\n }",
"public void setOrderTime(Date orderTime) {\n this.orderTime = orderTime;\n }",
"public void setOrderTime(Date orderTime) {\r\n this.orderTime = orderTime;\r\n }",
"public void setOrdertime(Date ordertime) {\n this.ordertime = ordertime;\n }",
"public void setOrdertime(Date ordertime) {\n\t\tthis.ordertime = ordertime;\n\t}",
"public void setDeliverTime(Date deliverTime) {\n this.deliverTime = deliverTime;\n }",
"public void setGiftSendTime(LocalDateTime giftSendTime) {\r\n this.giftSendTime = giftSendTime;\r\n }",
"public void setTimeOrder(String timeOrder) {\n this.timeOrder = timeOrder;\n }",
"public void setGiftReceiveTime(LocalDateTime giftReceiveTime) {\r\n this.giftReceiveTime = giftReceiveTime;\r\n }",
"public void setDeliveryTime(String pDeliveryTime) {\n mDeliveryTime = pDeliveryTime;\n }",
"public void setTradeTime(Date tradeTime) {\n this.tradeTime = tradeTime;\n }",
"public void setSettleTime(Date settleTime) {\n this.settleTime = settleTime;\n }",
"public void setDealTime(Integer dealTime) {\r\n this.dealTime = dealTime;\r\n }",
"public void setDeliveryTime(Long deliverTime) {\r\n\t\tthis.deliveryTime = deliverTime;\r\n\t}",
"public void setDeliveryTime(double deliveryTime) {\n this.deliveryTime = deliveryTime;\n }",
"public void setShipTime(LocalDateTime shipTime) {\r\n this.shipTime = shipTime;\r\n }",
"public void setInstallTime(Date installTime) {\n this.installTime = installTime;\n }",
"public void setExpenseSettlementTime (java.lang.String expenseSettlementTime) {\n\t\tthis.expenseSettlementTime = expenseSettlementTime;\n\t}",
"public void setWishPaymentTime(Date wishPaymentTime) {\n this.wishPaymentTime = wishPaymentTime;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a reference to the application database. | public DB getDatabase() {
return mongo.getDB(properties.getDatabaseName());
} | [
"public Database getDatabase() {\n return dbHandle;\n }",
"public GraphDatabaseService GetDatabaseInstance() {\r\n\t\treturn _db;\r\n\t}",
"public ODatabaseInternal<?> db() {\n return ODatabaseRecordThreadLocal.INSTANCE.get().getDatabaseOwner();\n }",
"static DatabaseReference getDBRef() {\n return mDBRef;\n }",
"public abstract Object getDatabase();",
"private DatabaseAdapter getDatabase() {\n\t\tif (db != null) return db;\n\t\t//Load the Database class specified in the TrialConfig.\n\t\tString className = TrialConfig.getDatabaseClassName();\n\t\ttry {\n\t\t\tClass theClass = Class.forName(className);\n\t\t\treturn (DatabaseAdapter)theClass.newInstance();\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tlogger.warn(\n\t\t\t\tserviceName + \": Unable to load the Database class: \" + className, ex);\n\t\t}\n\t\treturn null;\n\t}",
"public String getDb() {\n return db;\n }",
"public static Database getInstance() {\n if (database == null) database = new Database();\n return database;\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}",
"DatabaseManager getDatabaseManager();",
"public DatabaseAccessor getDb() {\r\n return db;\r\n }",
"public static String getConfigDatabase() {\n\t return getConfig() + \"/db\";\n }",
"public static HelpDatabase getDatabase() {\n\t\treturn database;\n\t}",
"public CuratorDb database() { return db; }",
"public Database syncDb() {\n return new Database(tenant, category, label, null, true);\n }",
"public FirebaseDatabase getDatabase() {\n return this.database;\n }",
"public DatabaseMeta getSharedDatabase( String name ) {\n return (DatabaseMeta) getSharedObject( DatabaseMeta.class.getName(), name );\n }",
"public String getDatabaseIdentifier();",
"public int getDatabase() {\n return dbIndex;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete the assistidos by id. | public void delete(Long id) {
log.debug("Request to delete Assistidos : {}", id);
assistidosRepository.delete(id);
assistidosSearchRepository.delete(id);
} | [
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Sintoma : {}\", id);\n sintomaRepository.delete(id);\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete AtendimentoDiverso : {}\", id);\n atendimentoDiversoRepository.deleteById(id);\n atendimentoDiversoSearchRepository.deleteById(id);\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete SolicitacaoExame : {}\", id);\n solicitacaoExameRepository.deleteById(id);\n solicitacaoExameSearchRepository.deleteById(id);\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete Carrera_etapa : {}\", id);\n carrera_etapaRepository.delete(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Empresas : {}\", id);\n empresasRepository.deleteById(id);\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete Exam : {}\", id);\n examRepository.deleteById(id);\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete Epas : {}\", id);\n epasRepository.delete(id);\n }",
"public void eliminarTripulante(Long id);",
"public void delete(Long id) {\n log.debug(\"Request to delete TipoSituacao : {}\", id);\n tipoSituacaoRepository.delete(id);\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete Etudiant : {}\", id);\n etudiantRepository.delete(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Preferencia : {}\", id);\n preferenciaRepository.deleteById(id);\n }",
"@Override\n public void delete(String id) {\n log.debug(\"Request to delete Aluno : {}\", id);\n alunoRepository.delete(id);\n alunoSearchRepository.delete(id);\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete DetallePresupuesto : {}\", id);\n detallePresupuestoRepository.deleteById(id);\n }",
"@DeleteMapping(\"/tipcalperis/{id}\")\n @Timed\n public ResponseEntity<Void> deleteTipcalperi(@PathVariable Long id) {\n log.debug(\"REST request to delete Tipcalperi : {}\", id);\n tipcalperiRepository.delete(id);\n tipcalperiSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"public void delUtente(int id);",
"public void delete(Long id) {\n log.debug(\"Request to delete TipoDecisao : {}\", id);\n tipoDecisaoRepository.deleteById(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Exercise : {}\", id);\n exerciseRepository.delete(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Infortunio : {}\", id);\n infortunioRepository.deleteById(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Importancia : {}\", id);\n importanciaRepository.deleteById(id);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove a song from queue | public String remove(int index) throws NullPointerException{
//calls function to find the track at index
AudioTrack track = trackAtIndex(index);
//if track is in polled, remove track from polled
if(polled.contains(track)) polled.remove(track);
//if track is in queue, remove track from queue
else if(queue.contains(track)) queue.remove(trackAtIndex(index));
//if track is currently playing, go next in queue without adding in polled
else if(getPlayer().getPlayingTrack().equals(track)) next();
//return message
return String.format("%s is removed from the queue.", track.getInfo().title);
} | [
"void removeFromQueue(ActionEvent event){\n model.getQueueList().remove(podcast);\n podcast.setQueued(false);\n podcast.togglePlaying();\n cm.hide();\n }",
"public void removeSongFromPlaylist(Song song){\n playlistSongs.remove(song);\n numberOfSongs = numberOfSongs - 1;\n }",
"public void removeSong(int pos) {\n songs.remove(pos);\n }",
"public void removeFromQueue(Player player) {\n queue.removePlayer(player);\n }",
"public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}",
"public boolean remove(final String queueName, final String item);",
"public void remove(T item) {\n \tqueue.remove(item);\n }",
"Song removeSong(Song out)\n\t\tthrows IllegalArgumentException, NullPointerException;",
"public void removeSong(int index)\n {\n if( validIndex(index) ) {\n System.out.println(songs.get(index).getFile() + \" deleted\");\n songs.remove(index);\n }\n }",
"public Song removeSong(Song s) {\n\t\tif (this.songList.contains(s)) {\n\t\t\tthis.songList.removeAll(Collections.singleton(s));\n\t\t}\n\t\treturn s;\n\t}",
"public void removeSong(Song song) {\n\n for(int ii = 0; ii < Library.size(); ii++) {\n if(Library.get(ii).equals(song)) {\n Library.remove(ii);\n }\n \n }\n }",
"public T remove() throws EmptyQueueException;",
"public E remove() throws FileQueueClosedException;",
"public Song removeSong(int index) {\n\t\tSong output = null;\n\t\t//try {\n\t\t\t// if (!this.songList.isEmpty()) {\n\t\t\toutput = this.songList.get(index);\n\t\t\tthis.songList.remove(index);\n\t\t\t// }\n\t\t//} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(\"Index has to be greater than 0\");\n\t\t//} catch (IndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(\"Playlist is empty\");\n\t\t//}\n\t\treturn output;\n\t}",
"public Song pop() {\n\t\treturn queue.remove(0);\n\t}",
"public void removePlaylist(Playlist p) {\n library.remove(p);\n size--;\n }",
"public void removeSong(int position) throws IllegalArgumentException{\n if (position < 1 || position > 51 || position - 1 >= size()){\n throw new IllegalArgumentException(\"Invalid position to remove song\");\n }\n int size = size();\n for (int i = position - 1; i < size; i++){\n files[i] = files[i+1];\n }\n }",
"@Override\n public void removeSong(Song song) {\n if (song != null && !em.contains(song)) {\n song = em.merge(song);\n }\n em.remove(song);\n }",
"public void clearEnqueued() {\n // save the top item\n Stream top = playQueue.poll();\n // clear the queue and re-add the top item\n playQueue.clear();\n if (top != null) {\n playQueue.add(top);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column tbl_potetialbidder.contactor | public String getContactor() {
return contactor;
} | [
"public Conctb getConctb() {\r\n\t\treturn conctb;\r\n\t}",
"public String getCGINF_LICENCIA_CONDUCIR(){\r\n\t\treturn this.myCginf_licencia_conducir;\r\n\t}",
"public Long getContId() {\n return contId;\n }",
"public BigDecimal getCONTRIB_PAYABLE_CIF() {\r\n return CONTRIB_PAYABLE_CIF;\r\n }",
"public Long getCustContId() {\n return custContId;\n }",
"public BigDecimal getCON_ID() {\r\n return CON_ID;\r\n }",
"public BigDecimal getCONTRIB_RECEIVABLE_CIF() {\r\n return CONTRIB_RECEIVABLE_CIF;\r\n }",
"public int getCadence() {\r\n return cadence;\r\n }",
"public String getConid() {\n return conid;\n }",
"public String getCondicion() {\n\t\t\treturn condicion;\n\t\t}",
"public Long getContType() {\n return contType;\n }",
"public BigDecimal getCHARGE_CODE() {\r\n return CHARGE_CODE;\r\n }",
"public Long getComCoi() {\n return comCoi;\n }",
"public String obtenerCicloLetra() {\n\n if (conectado) {\n try {\n String letra = \"\";\n\n String Query = \"SELECT `CURRENT_CICLO`() AS `CURRENT_CICLO`; \";\n Logy.mi(\"Query: \" + Query);\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n\n if (resultSet.next()) {\n letra = resultSet.getString(\"CURRENT_CICLO\");\n Logy.m(\"letra obtenida ------------ : \" + letra);\n } else {\n Logy.me(\"no se obtuvieron resultados de CURRENT_CICLO()\");\n }\n\n if (letra != null && (letra.equals(\"A\") || letra.equals(\"B\"))) {\n return letra;\n } else {\n Logy.me(\"error al obtener la letra del CICLO de DB\");\n return null;\n }\n\n } catch (SQLException ex) {\n Logy.me(\"No se pudo consultar CURRENT_CICLO`() de la DB: \" + ex.getMessage());\n return null;\n }\n } else {\n Logy.me(\"No se ha establecido previamente una conexion a la DB\");\n return null;\n }\n }",
"public BigDecimal getGUARANTOR_CIF()\r\n {\r\n\treturn GUARANTOR_CIF;\r\n }",
"public String getConnumber() {\r\n return connumber;\r\n }",
"public String getBuyerContactor() {\n return buyerContactor;\n }",
"public Long getContragentid()\n {\n return contragentid; \n }",
"public BigDecimal getConcentracionmolecula() {\n return concentracionmolecula;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Recreate all tables in HBase. | public void recreateAllHTables() {
for (String tableName : adapter.getHTableDefs().keySet()) {
recreateHTable(tableName);
}
} | [
"public void recreateHTable(String tableName) {\r\n\t\ttry {\r\n\t\t\tHTableDef htd = adapter.getHTableDefbyName(tableName);\r\n\t\t\tif (hbAdmin.tableExists(tableName)) {\r\n\t\t\t\tHBaseUtil.deleteHTable(this.hbAdmin, tableName);\r\n\t\t\t}\r\n\t\t\tHBaseUtil.creatHTable(this.hbAdmin, tableName,\r\n\t\t\t\t\thtd.getColumnFamilies());\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tlog.warn(\"Failed to Create HTable: \" + tableName, e);\r\n\t\t}\r\n\t}",
"public void deleteAllHTables() {\r\n\t\tfor (String tableName : adapter.getHTableDefs().keySet()) {\r\n\t\t\ttry {\r\n\t\t\t\tif (hbAdmin.tableExists(tableName)) {\r\n\t\t\t\t\tHBaseUtil.deleteHTable(this.hbAdmin, tableName);\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tlog.warn(\"Failed to Delete HTable: \" + tableName, e);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void createTables(){\r\n\t\tDBArchitector.getInstance().createTables();\r\n\t}",
"public void reset() {\n this.dropTables();\n this.createTables();\n }",
"private void clearAllTables() {\n try {\n statement.executeUpdate(\"SET FOREIGN_KEY_CHECKS = 0\");\n for (String table : TABLES) {\n statement.executeUpdate(\"TRUNCATE \" + table);\n }\n statement.executeUpdate(\"SET FOREIGN_KEY_CHECKS = 1\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public void resetTable() {\t\t\r\n\t\tthis.deleteTable();\r\n\t\tthis.onCreate(db);\r\n\t\tLog.i(logtag, \"Table '\" + TABLE_NAME + \"' reseted\");\r\n\t}",
"public void resetTables() {\n\t\tthis.tableMap = new HashMap<>();\n\t}",
"public void createTables()\n throws RdbException, SQLException\n {\n RdbSession ses = getSession();\n for( int i = 1; i < _rtbl_lst.length; i += 2 ){\n String sql;\n sql = toCreate( (Rtbl)_rtbl_lst[i] );\n\n System.out.println( sql );\n\n ses.create( (Rtbl)_rtbl_lst[i] );\n ses.index( (Rtbl)_rtbl_lst[i] );\n }\n\n HighLowKeys hl = new HighLowKeys();\n\n ses.create( hl );\n ses.index( hl );\n\n ses.close();\n }",
"public void dropAndCreateTable() throws SQLException{\n\t\tDalHints hints = new DalHints();\n\t\tString[] sqls = new String[] { \n\t\t\t\tString.format(DROP_TABLE_SQL, this.parser.getTableName()),\n\t\t\t\tString.format(CREATE_TABLE_SQL, this.parser.getTableName())};\n\t\tclient.batchUpdate(sqls, hints);\n\t}",
"public void dropAllTables() {\n\t\tdbHelper.onUpgrade(database, 1, 1);\n\t}",
"void resetTable();",
"protected void createEmptyTable() throws Exception {\n if (_stmt != null) {\n _stmt.close();\n }\n \n _stmt = (AxionStatement) _conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n\n try {\n _stmt.execute(\"drop table foo\");\n } catch (SQLException ignore) {\n // ignore and continue \n }\n _stmt.execute(\"create table foo (id int)\");\n \n _rset = _stmt.executeQuery(\"select * from foo\");\n }",
"private void ensureTable() throws TException {\n\n try {\n if (!connector.namespaceOperations().exists(accumuloNamespace)) {\n logger.warn(\"The accumulo namespace '\" + accumuloNamespace + \"' does not exist. An attempt to create namespace will start now.\");\n connector.namespaceOperations().create(accumuloNamespace);\n logger.warn(\"The accumulo namespace '\" + accumuloNamespace + \"' was created.\");\n }\n } catch (Exception e) {\n logger.error(\"An error occurred while checking for the existence of or while creating the accumulo namespace '\" + accumuloNamespace + \"'.\");\n throw new TException(e);\n }\n\n try {\n if (!connector.tableOperations().exists(WarehausConstants.TABLE_NAME)) {\n logger.warn(\"The warehaus table '\" + WarehausConstants.TABLE_NAME + \"' does not exist. An attempt to create the table will start now.\");\n connector.tableOperations().create(WarehausConstants.TABLE_NAME, false);\n logger.warn(\"The warehaus table '\" + WarehausConstants.TABLE_NAME + \"' was created.\");\n\n logger.info(\"Adding table splits\");\n String splitsAsString = getConfigurationProperties().getProperty(WarehausConstants.WAREHAUS_SPLITS_KEY, WarehausConstants.DEFAULT_WAREHAUS_SPLITS);\n String splitsArray[] = splitsAsString.split(\",\");\n List<Text> splitsAsText = Lists.transform(Arrays.asList(splitsArray), new Function<String, Text>() {\n @Override\n public Text apply(String input) {\n return new Text(input);\n }\n });\n SortedSet<Text> splits = new TreeSet<>(splitsAsText);\n connector.tableOperations().addSplits(WarehausConstants.TABLE_NAME, splits);\n }\n } catch (Exception e) {\n logger.error(\"An error occurred while checking for the existence of or while creating the warehaus table '\" + WarehausConstants.TABLE_NAME + \"'.\", e);\n throw new TException(e);\n }\n\n try {\n if (!connector.tableOperations().exists(WarehausConstants.PURGE_TABLE_NAME)) {\n logger.warn(\"The warehaus purge table '\" + WarehausConstants.PURGE_TABLE_NAME + \"' does not exist. An attempt to create the table will start now.\");\n connector.tableOperations().create(WarehausConstants.PURGE_TABLE_NAME, true);\n logger.warn(\"The warehaus purge table '\" + WarehausConstants.PURGE_TABLE_NAME + \"' was created.\");\n }\n } catch (Exception e) {\n logger.error(\"An error occurred while checking for the existence of or while creating the warehaus purge table '\" + WarehausConstants.PURGE_TABLE_NAME + \"'.\", e);\n throw new TException(e);\n }\n\n try {\n String ezBatchUser = getConfigurationProperties().getProperty(\"ezbatch.user\", \"ezbake\");\n connector.securityOperations().grantTablePermission(ezBatchUser, WarehausConstants.TABLE_NAME, TablePermission.READ);\n logger.info(\"READ permission granted to ezbatch user\");\n } catch (Exception e) {\n logger.error(\"An error occurred while trying to give the ezbatch user access\");\n throw new TException(e);\n }\n }",
"private void deleteOldTables(){\n jdbcTemplate.execute(\"DROP TABLE OLDcompetence\");\n jdbcTemplate.execute(\"DROP TABLE OLDrole\");\n jdbcTemplate.execute(\"DROP TABLE OLDperson\");\n jdbcTemplate.execute(\"DROP TABLE OLDavailability\");\n jdbcTemplate.execute(\"DROP TABLE OLDcompetence_profile\");\n }",
"private void flushUserTable(){\n\t\tDeniz_DatabaseConnection.dropTable(false);\n\t\tDeniz_DatabaseConnection.createTable(false);\n\t}",
"public void clearTables() {\r\n // your code here\r\n\t\ttry {\r\n\t\t\tdeleteReservationStatement.executeUpdate();\r\n\t\t\tdeleteBookingStatement.executeUpdate();\r\n\t\t\tdeleteUserStatement.executeUpdate();\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }",
"private void clearAllTables() throws Exception {\r\n connection.prepareStatement(\"DELETE FROM all_user\").executeUpdate();\r\n connection.prepareStatement(\"DELETE FROM contact\").executeUpdate();\r\n connection.prepareStatement(\"DELETE FROM company\").executeUpdate();\r\n connection.prepareStatement(\"DELETE FROM email\").executeUpdate();\r\n connection.prepareStatement(\"DELETE FROM user\").executeUpdate();\r\n connection.prepareStatement(\"DELETE FROM client\").executeUpdate();\r\n connection.prepareStatement(\"DELETE FROM principal_role\").executeUpdate();\r\n connection.prepareStatement(\"DELETE FROM manager_category\").executeUpdate();\r\n connection.prepareStatement(\"DELETE FROM principal\").executeUpdate();\r\n connection.prepareStatement(\"DELETE FROM role\").executeUpdate();\r\n connection.prepareStatement(\"DELETE FROM category\").executeUpdate();\r\n connection.prepareStatement(\"DELETE FROM entity_status_history\").executeUpdate();\r\n connection.prepareStatement(\"DELETE FROM entity_status\").executeUpdate();\r\n }",
"@Override\n\tpublic void createNewTable() {\n\t\tint i = 1;\n\t\tboolean newIndexIsFound = false;\n\t\tString tableName = null;\n\t\twhile (!newIndexIsFound) {\n\t\t\ttableName = \"Table\" + i++;\n\n\t\t\tif (!this.tableNameAlreadyExists(tableName)) {\n\t\t\t\tnewIndexIsFound = true;\n\t\t\t}\n\t\t}\n\t\tthis.addTable(tableName);\n\t}",
"private void ensureTables() throws SQLException {\n this.ensureDiffContextTable();\n this.ensureDiffTable();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update a batch of objects by index type | public void updateBatch(List<? extends TypedObject> objects, IndexPathInfo indexPathInfo, boolean isIndexerRequest) throws IndexPersistException {
this.addDocuments(objects, indexPathInfo, IndexPersistType.UPDATE, isIndexerRequest);
} | [
"void updateIndexes();",
"public abstract void updateIndex();",
"@Override\n public final void updateIndexDocuments(String indexName, String documentType, Map<String, String> documentMap)\n {\n LOGGER.info(\"Updating Elasticsearch index documents, indexName={}, documentType={}.\", indexName, documentType);\n\n List<String> allIndices = getAliases(indexName);\n\n allIndices.forEach((index) -> {\n // Prepare a bulk request builder\n Bulk.Builder bulkBuilder = new Bulk.Builder();\n // For each document prepare an update request and add it to the bulk request builder\n documentMap.forEach((id, jsonString) -> {\n BulkableAction updateIndex = new Index.Builder(jsonString).index(index).type(documentType).id(id).build();\n bulkBuilder.addAction(updateIndex);\n });\n\n // Execute the bulk update request\n JestResult jestResult = jestClientHelper.execute(bulkBuilder.build());\n\n // If there are failures log them\n if (!jestResult.isSucceeded())\n {\n LOGGER.error(\"Bulk response error = {}\", jestResult.getErrorMessage());\n }\n });\n }",
"public void addAllObjectsToIndex() throws CustomResponseException, DAOException, InterruptedException, IOException {\n indexer.setMethod(HTTPMethods.PUT);\n indexer.performMultipleRequests(findAll(), templateType);\n }",
"public void addAllObjectsToIndex() throws DAOException, InterruptedException, IOException, ResponseException {\n indexer.setMethod(HTTPMethods.PUT);\n indexer.performMultipleRequests(findAll(), userGroupType);\n }",
"void updateInBatch(String query);",
"public void index(List<String> idsToUpdate) throws Exception {\n\t\tclassSuperClassesList = new HashMap<String, List<String>>();\n\t\tdocuments = new HashMap<String, CustomMap>();\n\t\tBufferedReader fin = new BufferedReader(new FileReader(Cfg.CONFIGURATIONS_PATH + \"mapping/mapping.json\"));\n\t\tMapping mapping = new Gson().fromJson(fin, Mapping.class);\n\t\tfin.close();\n\t\t\n\t\tRequest request = new Request();\n\t\tSet<String> objectTypesIndexed = new TreeSet<String>();\n\t\t\n\t\t// Collects all classes referenced from root in mapping.json\n\t\tfor(DataMapping m : mapping.getData()) {\n\t\t\tif (m.getPath()!=null) {\n\t\t\t\tfor (String path : m.getPath()) {\n\t\t\t\t\tString className = path.split(Cfg.PATH_PROPERTY_PREFIX)[0].trim();\n\t\t\t\t\tif (!\"*\".equals(className) && !objectTypesIndexed.contains(className))\tobjectTypesIndexed.add(className);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString xmlDeleteDocuments = null;\n\t\t\n\t\t// loads statistics that will be used to create every document indexes\n\t\tstatistics = ResourceStatistics.list();\n\t\tif (idsToUpdate==null) {\n\t\t\tfor(String className : objectTypesIndexed) {\n\t\t\t\t// for each class eligible for indexing, get all its objects\n\t\t\t\tList<String> list = request.listObjectsId(className);\n\t\t\t\t// and generate its index info\n\t\t\t\tfor(String id : list) createDocumentEntry(id, className, mapping);\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\tfor (String id : idsToUpdate) {\n\t\t\t\tString className = request.getObjectClass(id);\n\t\t\t\tif (className!=null) {\n\t\t\t\t\tList<String> allClassNames = classSuperClassesList.get(className);\n\t\t\t\t\t\n\t\t\t\t\tif (allClassNames==null) {\n\t\t\t\t\t\tallClassNames = request.listSuperClasses(className);\n\t\t\t\t\t\tclassSuperClassesList.put(className, allClassNames);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tallClassNames.add(className);\n\t\t\t\t\tfor (String cn : allClassNames) {\n\t\t\t\t\t\tif (objectTypesIndexed.contains(cn)) {\n\t\t\t\t\t\t\tcreateDocumentEntry(id, className, mapping);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// if className is null means that object was deleted, so we add the delete id\n\t\t\t\t\tif (xmlDeleteDocuments == null) xmlDeleteDocuments = \"\";\n\t\t\t\t\txmlDeleteDocuments += \"<delete><id>\"+id+\"</id></delete>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// render xml index that will feed Solr\n\t\tString xml = \"\";\n\t\tif (idsToUpdate!=null) xml = \"<update>\\n\";\n\t\t\n\t\txml += \"<add>\\n\";\n\t\tfor(Map.Entry<String, CustomMap> ent1 : documents.entrySet()) {\n\t\t\tString id = ent1.getKey();\n\t\t\tCustomMap doc = ent1.getValue();\n\t\t\txml += \"\t<doc>\\n\";\n\t\t\txml += \"\t\t<field name='id'>\" + id +\"</field>\\n\";\n\t\t\txml += \"\t\t<field name='class'>\" + request.getObjectClassSimple(id) +\"</field>\\n\";\n\t\t\tfor(Map.Entry<String, Object> ent2 : doc.entrySet()) {\n\t\t\t\tString name = ent2.getKey();\n\t\t\t\tObject val = ent2.getValue();\n\t\t\t\tif (val instanceof String) {\n\t\t\t\t\txml +=\t\"\t\t<field name='\"+name+\"'><![CDATA[\"+val+\"]]></field>\\n\";\n\t\t\t\t} else if (val instanceof String[]) {\n\t\t\t\t\tString[] vals = (String[])val;\n\t\t\t\t\tfor (String v : vals) xml +=\t\"\t\t<field name='\"+name+\"'><![CDATA[\"+v+\"]]></field>\\n\";\n\t\t\t\t} else {\n\t\t\t\t\txml +=\t\"\t\t<field name='\"+name+\"'>\"+val+\"</field>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\txml += \"\t</doc>\\n\";\n\t\t}\n\t\t\n\t\txml += \"</add>\\n\";\n\t\t\n\t\tif (idsToUpdate!=null) xml += (xmlDeleteDocuments!=null?xmlDeleteDocuments:\"\") + \"</update>\";\n\t\t\n\t\t// saving data.xml is for information purposes ony\n\t\t// so it is not critical if it fails \n\t\ttry {\n\t\t\tString outFileName = \"data.xml\";\n\t\t\tif (idsToUpdate!=null) outFileName = \"lastUpdate.xml\";\n\t\t\tPrintWriter fout = new PrintWriter(Cfg.SOLR_PATH + \"data/\" + outFileName);\n\t\t\tfout.print(xml);\n\t\t\tfout.close();\n\t\t} catch (Exception e) {\n\t\t\tlog.warn(\"Error saving indexation data.xml\", e);\n\t\t}\n\t\t\n\t\t// Before adding the new index, delete the previous one\n\t\tif (idsToUpdate==null) deleteAll();\n\t\t\n\t\t// Connect to Solr, service Update\n\t\tURL url = new URL(Cfg.SOLR_URL + \"update\");\n\t HttpURLConnection conn = (HttpURLConnection)url.openConnection();\n\t conn.setRequestProperty(\"Content-Type\", \"application/xml;charset=utf-8\");\n\t conn.setRequestMethod(\"POST\");\n\n\t // Feed hungry Solr with all the index\n\t conn.setDoOutput(true);\n\t OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream(),\"UTF8\");\n\t //System.out.println(wr.getEncoding());\n\t wr.write(xml);\n\t wr.flush();\n\t wr.close();\n\n\t // Get the response\n\t BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream(),\"UTF8\"));\n\t String str;\n\t StringBuffer sb = new StringBuffer();\n\t while ((str = rd.readLine()) != null) {\n\t \tsb.append(str);\n\t \tsb.append(\"\\n\");\n\t }\n\n\t log.info(\"Indexation Solr Response \" + sb.toString());\n\t rd.close();\n\t}",
"void batchUpdate(List<Article> articles);",
"private void indexUpdates(UpdateQueryResult updates) {\r\n Iterator<HashMap<String, String>> i = updates.getIterator();\r\n while (i.hasNext()) {\r\n HashMap<String, String> values = i.next();\r\n \r\n \t// during index default solr fields are indexed separately\r\n \tString articleId = values.get(\"KnowledgeArticleId\");\r\n \tString title = values.get(\"Title\");\r\n \tvalues.remove(\"Title\");\r\n \tString summary = values.get(\"Summary\");\r\n \tvalues.remove(\"Summary\");\r\n \t\r\n \ttry {\r\n \t\tif (UtilityLib.notEmpty(articleId) && UtilityLib.notEmpty(title)) {\r\n \t\t\t// index sObject\r\n \t\t\t// default fields every index must have\r\n \t\t\tStringBuilder sb = new StringBuilder();\r\n \t\t\tContent c = new Content();\r\n \t\t\tc.setKey(articleId);\r\n \t\t\tsb.setLength(0);\r\n \t\t\tsb.append(summary);\r\n \t\t\tc.setData(sb.toString().getBytes());\r\n \t\t\tc.addMetadata(\"Content-Type\", \"text/html\");\r\n \t\t\tc.addMetadata(\"title\", title);\r\n \t\t\t\r\n \t\t\tLOG.debug(\"Salesforce Crawler: Indexing articleId=\"+articleId+\" title=\"+title+\" summary=\"+summary);\r\n \t\t\t\r\n \t\t\t// index articleType specific fields\r\n \t\t\tfor (Entry<String, String> entry : values.entrySet()) {\r\n \t\t\t\tc.addMetadata(entry.getKey(), entry.getValue().toString());\r\n \t\t\t\tif (!entry.getKey().equals(\"Attachment__Body__s\")) {\r\n \t\t\t\t\tLOG.debug(\"Salesforce Crawler: Indexing field key=\"+entry.getKey()+\" value=\"+entry.getValue().toString());\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tstate.getProcessor().process(c);\r\n \t\t}\r\n } catch (Exception e) {\r\n \tUtilityLib.errorException(LOG, e);\r\n \tstate.getStatus().incrementCounter(Counter.Failed);\r\n }\r\n }\r\n }",
"public abstract void collectIndexUpdate(IndexUpdateBuilder indexUpdateBuilder) throws InterruptedException, IOException, RepositoryException;",
"private void addIndexes(NodeState state, String indexName) {\n Set<String> primaryTypes = newHashSet();\n Set<String> mixinTypes = newHashSet();\n for (String typeName : state.getNames(declaringNodeTypes)) {\n NodeState type = types.getChildNode(typeName);\n if (type.getBoolean(JCR_ISMIXIN)) {\n mixinTypes.add(typeName);\n } else {\n primaryTypes.add(typeName);\n }\n addAll(primaryTypes, type.getNames(OAK_PRIMARY_SUBTYPES));\n addAll(mixinTypes, type.getNames(OAK_MIXIN_SUBTYPES));\n }\n \n PropertyState ps = state.getProperty(propertyNames);\n Iterable<String> propertyNames = ps != null ? ps.getValue(Type.NAMES)\n : ImmutableList.of(indexName);\n for (String pname : propertyNames) {\n List<Property2IndexHookUpdate> list = this.indexMap.get(pname);\n if (list == null) {\n list = newArrayList();\n this.indexMap.put(pname, list);\n }\n boolean exists = false;\n String localPath = getPath();\n for (Property2IndexHookUpdate piu : list) {\n if (piu.matches(localPath, primaryTypes, mixinTypes)) {\n exists = true;\n break;\n }\n }\n if (!exists) {\n Property2IndexHookUpdate update = new Property2IndexHookUpdate(\n getPath(), node.child(INDEX_DEFINITIONS_NAME).child(indexName),\n store, primaryTypes, mixinTypes);\n list.add(update);\n updates.add(update);\n }\n }\n }",
"<T> int update(T obj, String keyColumn);",
"public void indexInESearch(ArrayList<Map<String, Object>> tweets,String indexName,String type)throws Exception {\r\n\t\t\t\r\n\t\t\t\tTransportClient client = this.elasticsearch.getESInstance(this.esHost, this.esPort);\r\n\t\t\t\tBulkRequestBuilder bulkRequestBuilder = client.prepareBulk();\r\n\t\t\t\tfor (Map<String, Object> tweet : tweets) {\r\n//\t\t\t\t\tSystem.err.println(count++ + tweet.toString());\r\n\t\t\t\t\t\tbulkRequestBuilder.add(client.prepareUpdate(indexName,type,tweet.get(\"id\").toString()).setDoc(tweet).setUpsert(tweet));\t\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\tbulkRequestBuilder.setRefresh(true).execute().actionGet();\r\n\t\t\t\t\r\n\t\t\t\tclient.close();\t\r\n\t\t\r\n\t\t}",
"private void updateObjects() throws SQLException {\n for (Entry<Class<? extends PersistentObject>, Map<PersistentObject, ChangedObject>> type : changedObjects\n .entrySet()) {\n for (Entry<PersistentObject, ChangedObject> typeObject : type.getValue().entrySet()) {\n connection.update(typeObject.getValue());\n }\n }\n }",
"public void setElementAt(Object obj, int index);",
"int updateAll(Query<? extends Entity> query, Update update) throws UnifyException;",
"void setIndexData(Object data);",
"public void onIndexUpdate();",
"Long cleanIndex(Long index, List<Long> ids);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XIfExpression__Group__6" $ANTLR start "rule__XIfExpression__Group__6__Impl" ../org.xtext.mongobeans.ui/srcgen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9561:1: rule__XIfExpression__Group__6__Impl : ( ( rule__XIfExpression__Group_6__0 )? ) ; | public final void rule__XIfExpression__Group__6__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9565:1: ( ( ( rule__XIfExpression__Group_6__0 )? ) )
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9566:1: ( ( rule__XIfExpression__Group_6__0 )? )
{
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9566:1: ( ( rule__XIfExpression__Group_6__0 )? )
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9567:1: ( rule__XIfExpression__Group_6__0 )?
{
if ( state.backtracking==0 ) {
before(grammarAccess.getXIfExpressionAccess().getGroup_6());
}
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9568:1: ( rule__XIfExpression__Group_6__0 )?
int alt75=2;
int LA75_0 = input.LA(1);
if ( (LA75_0==61) ) {
int LA75_1 = input.LA(2);
if ( (synpred111_InternalMongoBeans()) ) {
alt75=1;
}
}
switch (alt75) {
case 1 :
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9568:2: rule__XIfExpression__Group_6__0
{
pushFollow(FOLLOW_rule__XIfExpression__Group_6__0_in_rule__XIfExpression__Group__6__Impl19550);
rule__XIfExpression__Group_6__0();
state._fsp--;
if (state.failed) return ;
}
break;
}
if ( state.backtracking==0 ) {
after(grammarAccess.getXIfExpressionAccess().getGroup_6());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__XIfExpression__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9554:1: ( rule__XIfExpression__Group__6__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9555:2: rule__XIfExpression__Group__6__Impl\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group__6__Impl_in_rule__XIfExpression__Group__619523);\n rule__XIfExpression__Group__6__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group_6__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9596:1: ( rule__XIfExpression__Group_6__0__Impl rule__XIfExpression__Group_6__1 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9597:2: rule__XIfExpression__Group_6__0__Impl rule__XIfExpression__Group_6__1\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__0__Impl_in_rule__XIfExpression__Group_6__019595);\n rule__XIfExpression__Group_6__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__1_in_rule__XIfExpression__Group_6__019598);\n rule__XIfExpression__Group_6__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group_6__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9627:1: ( rule__XIfExpression__Group_6__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:9628:2: rule__XIfExpression__Group_6__1__Impl\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__1__Impl_in_rule__XIfExpression__Group_6__119659);\n rule__XIfExpression__Group_6__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8845:1: ( rule__XIfExpression__Group__6__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8846:2: rule__XIfExpression__Group__6__Impl\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group__6__Impl_in_rule__XIfExpression__Group__618082);\n rule__XIfExpression__Group__6__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:10451:1: ( rule__XIfExpression__Group__6__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:10452:2: rule__XIfExpression__Group__6__Impl\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group__6__Impl_in_rule__XIfExpression__Group__621336);\n rule__XIfExpression__Group__6__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group__6() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:21507:1: ( rule__XIfExpression__Group__6__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:21508:2: rule__XIfExpression__Group__6__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XIfExpression__Group__6__Impl_in_rule__XIfExpression__Group__643400);\r\n rule__XIfExpression__Group__6__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XIfExpression__Group_6__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:10493:1: ( rule__XIfExpression__Group_6__0__Impl rule__XIfExpression__Group_6__1 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:10494:2: rule__XIfExpression__Group_6__0__Impl rule__XIfExpression__Group_6__1\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__0__Impl_in_rule__XIfExpression__Group_6__021408);\n rule__XIfExpression__Group_6__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__1_in_rule__XIfExpression__Group_6__021411);\n rule__XIfExpression__Group_6__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:10462:1: ( ( ( rule__XIfExpression__Group_6__0 )? ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:10463:1: ( ( rule__XIfExpression__Group_6__0 )? )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:10463:1: ( ( rule__XIfExpression__Group_6__0 )? )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:10464:1: ( rule__XIfExpression__Group_6__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXIfExpressionAccess().getGroup_6()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:10465:1: ( rule__XIfExpression__Group_6__0 )?\n int alt81=2;\n int LA81_0 = input.LA(1);\n\n if ( (LA81_0==65) ) {\n int LA81_1 = input.LA(2);\n\n if ( (synpred123_InternalGuiceModules()) ) {\n alt81=1;\n }\n }\n switch (alt81) {\n case 1 :\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:10465:2: rule__XIfExpression__Group_6__0\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__0_in_rule__XIfExpression__Group__6__Impl21363);\n rule__XIfExpression__Group_6__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXIfExpressionAccess().getGroup_6()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group_6__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8918:1: ( rule__XIfExpression__Group_6__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8919:2: rule__XIfExpression__Group_6__1__Impl\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__1__Impl_in_rule__XIfExpression__Group_6__118218);\n rule__XIfExpression__Group_6__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8856:1: ( ( ( rule__XIfExpression__Group_6__0 )? ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8857:1: ( ( rule__XIfExpression__Group_6__0 )? )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8857:1: ( ( rule__XIfExpression__Group_6__0 )? )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8858:1: ( rule__XIfExpression__Group_6__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXIfExpressionAccess().getGroup_6()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8859:1: ( rule__XIfExpression__Group_6__0 )?\n int alt68=2;\n int LA68_0 = input.LA(1);\n\n if ( (LA68_0==62) ) {\n int LA68_1 = input.LA(2);\n\n if ( (synpred104_InternalHelloXcore()) ) {\n alt68=1;\n }\n }\n switch (alt68) {\n case 1 :\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8859:2: rule__XIfExpression__Group_6__0\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__0_in_rule__XIfExpression__Group__6__Impl18109);\n rule__XIfExpression__Group_6__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXIfExpressionAccess().getGroup_6()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group_6__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8887:1: ( rule__XIfExpression__Group_6__0__Impl rule__XIfExpression__Group_6__1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8888:2: rule__XIfExpression__Group_6__0__Impl rule__XIfExpression__Group_6__1\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__0__Impl_in_rule__XIfExpression__Group_6__018154);\n rule__XIfExpression__Group_6__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__1_in_rule__XIfExpression__Group_6__018157);\n rule__XIfExpression__Group_6__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group_6__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:21549:1: ( rule__XIfExpression__Group_6__0__Impl rule__XIfExpression__Group_6__1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:21550:2: rule__XIfExpression__Group_6__0__Impl rule__XIfExpression__Group_6__1\r\n {\r\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__0__Impl_in_rule__XIfExpression__Group_6__043472);\r\n rule__XIfExpression__Group_6__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__1_in_rule__XIfExpression__Group_6__043475);\r\n rule__XIfExpression__Group_6__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XIfExpression__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7351:1: ( rule__XIfExpression__Group__6__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7352:2: rule__XIfExpression__Group__6__Impl\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group__6__Impl_in_rule__XIfExpression__Group__614930);\n rule__XIfExpression__Group__6__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group_6__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:21580:1: ( rule__XIfExpression__Group_6__1__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:21581:2: rule__XIfExpression__Group_6__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__1__Impl_in_rule__XIfExpression__Group_6__143536);\r\n rule__XIfExpression__Group_6__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XIfExpression__Group__6() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:12071:1: ( rule__XIfExpression__Group__6__Impl )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:12072:2: rule__XIfExpression__Group__6__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XIfExpression__Group__6__Impl_in_rule__XIfExpression__Group__624498);\r\n rule__XIfExpression__Group__6__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XIfExpression__Group_6__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7393:1: ( rule__XIfExpression__Group_6__0__Impl rule__XIfExpression__Group_6__1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7394:2: rule__XIfExpression__Group_6__0__Impl rule__XIfExpression__Group_6__1\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__0__Impl_in_rule__XIfExpression__Group_6__015002);\n rule__XIfExpression__Group_6__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__1_in_rule__XIfExpression__Group_6__015005);\n rule__XIfExpression__Group_6__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group__6() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:10829:1: ( rule__XIfExpression__Group__6__Impl )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:10830:2: rule__XIfExpression__Group__6__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XIfExpression__Group__6__Impl_in_rule__XIfExpression__Group__622163);\r\n rule__XIfExpression__Group__6__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XIfExpression__Group_6__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7424:1: ( rule__XIfExpression__Group_6__1__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7425:2: rule__XIfExpression__Group_6__1__Impl\n {\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__1__Impl_in_rule__XIfExpression__Group_6__115066);\n rule__XIfExpression__Group_6__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XIfExpression__Group__6__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:21518:1: ( ( ( rule__XIfExpression__Group_6__0 )? ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:21519:1: ( ( rule__XIfExpression__Group_6__0 )? )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:21519:1: ( ( rule__XIfExpression__Group_6__0 )? )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:21520:1: ( rule__XIfExpression__Group_6__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXIfExpressionAccess().getGroup_6()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:21521:1: ( rule__XIfExpression__Group_6__0 )?\r\n int alt157=2;\r\n int LA157_0 = input.LA(1);\r\n\r\n if ( (LA157_0==140) ) {\r\n int LA157_1 = input.LA(2);\r\n\r\n if ( (synpred209_InternalRmOdp()) ) {\r\n alt157=1;\r\n }\r\n }\r\n switch (alt157) {\r\n case 1 :\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:21521:2: rule__XIfExpression__Group_6__0\r\n {\r\n pushFollow(FOLLOW_rule__XIfExpression__Group_6__0_in_rule__XIfExpression__Group__6__Impl43427);\r\n rule__XIfExpression__Group_6__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXIfExpressionAccess().getGroup_6()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'BElement Structure'. | BElementStructure createBElementStructure(); | [
"BElement createBElement();",
"BType createBType();",
"BPSpecElement createBPSpecElement();",
"Structure createStructure();",
"B createB();",
"protected abstract Structure newStructure();",
"BOp createBOp();",
"BasicElem createBasicElem();",
"ObjectElement createObjectElement();",
"BPObject createBPObject();",
"BUnion createBUnion();",
"ClassB initClassB(ClassB iClassB)\n {\n iClassB.updateElementValue(\"ClassB\");\n return iClassB;\n }",
"public GNElement buildElement()\n {\n \tGNElement elem = GNXMLDocumentUtility.newElement(get_TagName());\n\n /** Marshals \"version\" attribute */\n \taddAttributeToElement(elem, this._ATTR_DEFAULT_REQUIRED, version);\n\n /** Marshals \"name\" attribute */\n \taddAttributeToElement(elem, this._ATTR_DEFAULT_REQUIRED, name);\n\n /** Marshals \"uuid\" attribute */\n \taddAttributeToElement(elem, this._ATTR_DEFAULT_REQUIRED, uuid);\n\n /** Marshals a list of Documentation objects to elements */\n Iterator it1 = _objDocumentation.iterator();\n while (it1.hasNext())\n {\n Documentation obj = (Documentation)it1.next();\n if (obj != null)\n elem.addElement(obj.buildElement());\n }\n\n /** Marshals a list of SubstitutionSet objects to elements */\n Iterator it2 = _objSubstitutionSet.iterator();\n while (it2.hasNext())\n {\n SubstitutionSet obj = (SubstitutionSet)it2.next();\n if (obj != null)\n elem.addElement(obj.buildElement());\n }\n\n /** Marshals a list of Include objects to elements */\n Iterator it3 = _objInclude.iterator();\n while (it3.hasNext())\n {\n Include obj = (Include)it3.next();\n if (obj != null)\n elem.addElement(obj.buildElement());\n }\n\n /** Marshals a list of BusinessDocument objects to elements */\n Iterator it4 = _objBusinessDocument.iterator();\n while (it4.hasNext())\n {\n BusinessDocument obj = (BusinessDocument)it4.next();\n if (obj != null)\n elem.addElement(obj.buildElement());\n }\n\n /** Marshals a list of ProcessSpecification objects to elements */\n Iterator it5 = _objProcessSpecification.iterator();\n while (it5.hasNext())\n {\n ProcessSpecification obj = (ProcessSpecification)it5.next();\n if (obj != null)\n elem.addElement(obj.buildElement());\n }\n\n /** Marshals a list of Package objects to elements */\n Iterator it6 = _objPackage.iterator();\n while (it6.hasNext())\n {\n Package obj = (Package)it6.next();\n if (obj != null)\n elem.addElement(obj.buildElement());\n }\n\n /** Marshals a list of BinaryCollaboration objects to elements */\n Iterator it7 = _objBinaryCollaboration.iterator();\n while (it7.hasNext())\n {\n BinaryCollaboration obj = (BinaryCollaboration)it7.next();\n if (obj != null)\n elem.addElement(obj.buildElement());\n }\n\n /** Marshals a list of BusinessTransaction objects to elements */\n Iterator it8 = _objBusinessTransaction.iterator();\n while (it8.hasNext())\n {\n BusinessTransaction obj = (BusinessTransaction)it8.next();\n if (obj != null)\n elem.addElement(obj.buildElement());\n }\n\n /** Marshals a list of MultiPartyCollaboration objects to elements */\n Iterator it9 = _objMultiPartyCollaboration.iterator();\n while (it9.hasNext())\n {\n MultiPartyCollaboration obj = (MultiPartyCollaboration)it9.next();\n if (obj != null)\n elem.addElement(obj.buildElement());\n }\n return elem;\n }",
"public ArrayStructureBB(StructureMembers members, int[] shape, ByteBuffer bbuffer, int offset) {\n super(members, shape);\n this.bbuffer = bbuffer;\n this.bb_offset = offset;\n }",
"public DStructure newDStructure() {\n return new DStructure();\n }",
"BTable createBTable();",
"public List<BbanStructureDTO> getBbanStructures() {\n return bbanStructures;\n }",
"private EventBElement loadEventBElement(Object element) {\n\t\tif (element instanceof IAdaptable) {\n\t\t\tEObject eobject = (EObject) ((IAdaptable) element).getAdapter(EObject.class);\n\t\t\tif (eobject.eIsProxy()) {\n\t\t\t\tEMFRodinDB emfrdb = new EMFRodinDB();\n\t\t\t\teobject = emfrdb.loadElement(((InternalEObject)eobject).eProxyURI());\n\t\t\t}\n\t\t\tif (eobject instanceof EventBElement) {\n\t\t\t\treturn (EventBElement)eobject;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public ArrayStructureBB(StructureMembers members, int[] shape) {\n super(members, shape);\n this.bbuffer = ByteBuffer.allocate(nelems * getStructureSize());\n bbuffer.order(ByteOrder.BIG_ENDIAN);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the DepMacOSEnrollmentProfile from the service | void get(final ICallback<? super DepMacOSEnrollmentProfile> callback); | [
"DepMacOSEnrollmentProfile get() throws ClientException;",
"ApplicationProfile getApplicationProfile();",
"public ProfileService getProfileService()\n {\n return profileService;\n }",
"@Nullable\n public AndroidWorkProfileCertificateProfileBase get() throws ClientException {\n return send(HttpMethod.GET, null);\n }",
"public ContainerServiceServicePrincipalProfile servicePrincipalProfile() {\n return this.servicePrincipalProfile;\n }",
"public AndroidImportedPFXCertificateProfile get() throws ClientException {\n return send(HttpMethod.GET, null);\n }",
"LegalBusinessProfile get();",
"@Override\n public GetServiceProfileResult getServiceProfile(GetServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeGetServiceProfile(request);\n }",
"private IProfile getProfile() {\n \t\treturn profileRegistry.getProfile(getProfileId());\n \t}",
"public Profile getProfile();",
"public WindowsAutopilotDeploymentProfileAssignment get() throws ClientException {\n return send(HttpMethod.GET, null);\n }",
"@Deprecated\n public V1SeccompProfile getSeccompProfile() {\n return this.seccompProfile!=null ?this.seccompProfile.build():null;\n }",
"public String getActiveProfileKey() {\n IAudioProfileService service = getService();\n try {\n return service.getActiveProfileKey();\n } catch (RemoteException e) {\n Log.e(TAG, \"Dead object in getActiveProfileKey\", e);\n return null;\n }\n }",
"public ApplicationProfile getApplicationProfile() {\n return applicationProfile;\n }",
"CertprofileQa getCertprofile(String certprofileName);",
"Profile getProfile( String profileId );",
"com.gbusiness.agentslot.api.MeetingProfile getMeetingProfile();",
"Profile getProfile() {\n\t\treturn (Profile) getTarget();\n\t}",
"public ManagedClusterServicePrincipalProfile servicePrincipalProfile() {\n return this.servicePrincipalProfile;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Declarator' containment reference. If the meaning of the 'Declarator' containment reference isn't clear, there really should be more of a description here... | Declarator getDeclarator(); | [
"AbstractDeclarator getDeclarator();",
"Declarator createDeclarator();",
"@ASTNodeAnnotation.Child(name=\"VariableDecl\")\n public VariableDeclarator getVariableDecl() {\n return (VariableDeclarator) getChild(2);\n }",
"public /*@Nullable*/ VariableTree getDeclaration() {\n return decl;\n }",
"public VariableDeclarator getVariableDeclNoTransform() {\n return (VariableDeclarator) getChildNoTransform(2);\n }",
"public VariableNameBindingNode getDeclarationNode();",
"declaration getDeclaration();",
"public String getDeclarationNo() {\r\n return declarationNo;\r\n }",
"public final void rule__Declarators__DeclaratorListAssignment_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:8930:1: ( ( ruleDeclarator ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:8931:1: ( ruleDeclarator )\r\n {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:8931:1: ( ruleDeclarator )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:8932:1: ruleDeclarator\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDeclaratorsAccess().getDeclaratorListDeclaratorParserRuleCall_1_1_0()); \r\n }\r\n pushFollow(FollowSets000.FOLLOW_ruleDeclarator_in_rule__Declarators__DeclaratorListAssignment_1_118248);\r\n ruleDeclarator();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDeclaratorsAccess().getDeclaratorListDeclaratorParserRuleCall_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public double getDeclination() {\n return declination;\n }",
"public static Q firstDeclarator(Q context, Q declared, String... declaratorTypes) {\n\t\treturn com.ensoftcorp.open.commons.analysis.CommonQueries.firstDeclarator(context, declared, declaratorTypes);\n\t}",
"public final void rule__DirectDeclarator__DecAssignment_0_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:9050:1: ( ( ruleDeclarator ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:9051:1: ( ruleDeclarator )\r\n {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:9051:1: ( ruleDeclarator )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:9052:1: ruleDeclarator\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDirectDeclaratorAccess().getDecDeclaratorParserRuleCall_0_1_1_0()); \r\n }\r\n pushFollow(FollowSets000.FOLLOW_ruleDeclarator_in_rule__DirectDeclarator__DecAssignment_0_1_118496);\r\n ruleDeclarator();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDirectDeclaratorAccess().getDecDeclaratorParserRuleCall_0_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"MathMLNodeList getDeclarations();",
"public final void rule__Declarators__DecAssignment_0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:8915:1: ( ( ruleDeclarator ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:8916:1: ( ruleDeclarator )\r\n {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:8916:1: ( ruleDeclarator )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:8917:1: ruleDeclarator\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDeclaratorsAccess().getDecDeclaratorParserRuleCall_0_0()); \r\n }\r\n pushFollow(FollowSets000.FOLLOW_ruleDeclarator_in_rule__Declarators__DecAssignment_018217);\r\n ruleDeclarator();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDeclaratorsAccess().getDecDeclaratorParserRuleCall_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public int getAbsDecl_d ( ) {\r\n\t\tdouble d = getDecl();\r\n\t\tif (d < 0.0)\r\n\t\t\td = - d;\r\n\t\treturn (int)Math.abs(d + 0.0000001);\r\n\t}",
"public NodeVarDecl head()\n\t{\n\t\treturn _head;\n\t}",
"public LanguageDeclension getDeclension() {\n return this.declension;\n }",
"public ParsedDeclaration getDeclaration(ParsedReference reference)\n {\n return declarations.getDeclaration(reference);\n }",
"public final void rule__Declarator__DcAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:8960:1: ( ( ruleDirectDeclarator ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:8961:1: ( ruleDirectDeclarator )\r\n {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:8961:1: ( ruleDirectDeclarator )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:8962:1: ruleDirectDeclarator\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getDeclaratorAccess().getDcDirectDeclaratorParserRuleCall_1_0()); \r\n }\r\n pushFollow(FollowSets000.FOLLOW_ruleDirectDeclarator_in_rule__Declarator__DcAssignment_118310);\r\n ruleDirectDeclarator();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getDeclaratorAccess().getDcDirectDeclaratorParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last cached task by popping it from the stack. | public CachedTask getLastCachedTask() {
return cachedTasks.pop();
} | [
"final Runnable popTask() {\n int s = sp;\n while (s != base) {\n if (tryActivate()) {\n Runnable[] q = queue;\n int mask = q.length - 1;\n int i = (s - 1) & mask;\n Runnable t = q[i];\n if (t == null || !casSlotNull(q, i, t))\n break;\n storeSp(s - 1);\n return t;\n }\n }\n return null;\n }",
"public Task getLastTask(){\n if(tasks.isEmpty()){\n return null;\n }\n \n Integer lastExecuteTime;\n lastExecuteTime = getLastTaskExecuteTime();\n if(lastExecuteTime == null)\n return null;\n return tasks.get(lastExecuteTime);\n }",
"private final Object pop() {\r\n\t\treturn eval_stack.remove(eval_stack.size() - 1);\r\n\t}",
"@Override\r\n\tpublic T pop() {\r\n\t\tT top = stack[topIndex];\r\n\t\tstack[topIndex] = null;\r\n\t\ttopIndex--;\r\n\t\treturn top;\r\n\t}",
"public Task getMostRecentlyDeletedTask() {\n return this.getMostRecentlyDeletedTask;\n }",
"public T pop() {\n\t\tT item = null;\n\t\ttry {\n\t\t\titem = top.getData();\n\t\t\ttop = top.getNext();\n\t\t\tsize--;\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Stack Underflow...!\");\n\t\t}\n\t\treturn item;\n\t}",
"public BDERA popBottom()\n {\n if (bottom==0)\n return null;\n\n bottom--;\n\n BDERA r = tasks[bottom];\n int[] stamp = new int[1];\n int top1= top.get(stamp);\n int oldStamp = stamp[0];\n int newStamp = oldStamp+1;\n int newTop = 0;\n\n\n if (bottom>top1)\n {\n return r;\n }\n\n if (bottom==top1)\n {\n bottom=0;\n if (top.compareAndSet(top1,newTop,oldStamp,newStamp))\n return r;\n }\n\n top.set(0,newStamp);\n return null;\n }",
"public Action getLastAction() {\n\t\treturn (Action) tasks.removeLast();\n\t}",
"private synchronized Command popNextCommand()\n {\n if (m_ToExecuteQueue.size() == 0)\n return null;\n\n Command command = m_ToExecuteQueue.get(0);\n m_ToExecuteQueue.remove(0);\n\n return command;\n }",
"public Task peekHighest();",
"public Intent popLastIntent()\n\t{\n\t\tsynchronized(UnityJibeBridge.class) {\n\t\t\tif (!intentStack.empty())\n\t\t\t\treturn intentStack.pop();\n\t\t\telse\n\t\t\t\treturn null;\n\t\t}\n\t}",
"public T back() {\r\n\t\treturn theQueue[back];\r\n\t}",
"final Runnable locallyDeqTask() {\n Runnable work = dispatchQueue.poll();\n if( work!=null ) {\n return work;\n }\n int b;\n while (sp != (b = base)) {\n if (tryActivate()) {\n Runnable[] q = queue;\n int i = (q.length - 1) & b;\n Runnable t = q[i];\n if (t != null && casSlotNull(q, i, t)) {\n base = b + 1;\n return t;\n }\n }\n }\n return dispatchQueue.getSourceQueue().poll();\n }",
"public Object pop() {\r\n Object o = null;\r\n while (o == null) {\r\n try {\r\n throttle.increment();\r\n o = pool.remove(0);\r\n } catch (Exception e) {\r\n // thread collision detected, retry\r\n }\r\n }\r\n return o;\r\n }",
"public String pop() {\n if (queue.size() == 0) {\n return null;\n }\n\n String result = top();\n queue.remove(0);\n return result;\n }",
"public T pop() {\r\n if ( top == null )\r\n throw new IllegalStateException(\"Can't pop from an empty stack.\");\r\n T topItem = top.item; // The item that is being popped.\r\n top = top.next; // The previous second item is now on top.\r\n return topItem;\r\n }",
"@Override\n public T pop() {\n\n //if the stack is empty, throw an exception\n if(isEmpty()) {\n throw new StackUnderflowException();\n } else {\n //else, remove the item at the top of the stack\n T topElement = stack[size()-1];\n stack[size()-1] = null;\n\n modCount++; //record the change\n return topElement;\n }\n }",
"public String yankPop() {\n lastKill = false;\n if (lastYank) {\n prev();\n return slots[head];\n }\n return null;\n }",
"private synchronized MailSet pop() {\n if (toSaveQueue.size() > 0) {\n MailSet ms = toSaveQueue.get(0);\n toSaveQueue.remove(0);\n return ms;\n } else {\n return null;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a registration results object to be populated with accessors. | public RegistrationResults() {
} | [
"com.openmdmremote.harbor.HRPCProto.Registration getRegistration();",
"Regulator createRegulator();",
"Result findResultByRegistration(Registration registration);",
"Register createRegister();",
"public RegistryCreator(){\n\n\t\tthis.accounting = new Accounting();\n\t\tthis.inventory = new Inventory();\n\n\t}",
"public RegistrationInfo getRegistrationInfo();",
"entities.Torrent.RegistrationResponseOrBuilder getRegistrationResponseOrBuilder();",
"protected void initResult() {\n }",
"public RegRes result() {\r\n return (RegRes)super.clone();\r\n }",
"entities.Torrent.RegistrationResponse getRegistrationResponse();",
"private RegistrationResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public R buildAndRegister() {\n\t\tFabricRegistry fabricRegistry = (FabricRegistry) registry;\n\t\tfabricRegistry.build(attributes);\n\n\t\t//noinspection unchecked\n\t\tAccessorRegistry.getROOT().add(((AccessorRegistry) registry).getRegistryKey(), registry, Lifecycle.stable());\n\n\t\treturn registry;\n\t}",
"Register.Res getRegisterRes();",
"public ConceptResult() {}",
"com.openmdmremote.harbor.HRPCProto.RegistrationOrBuilder getRegistrationOrBuilder();",
"public Result() {\r\n super();\r\n System.out.println(\"Result:Constructor\");\r\n }",
"private UserRegOutput(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Registration() {\n\t}",
"DataSetRegistrationDetails<T> createDataSetRegistrationDetails();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the city of this candidate. | @Override
public void setCity(java.lang.String city) {
_candidate.setCity(city);
} | [
"public void setCity(final String city)\n {\n this.city = city;\n }",
"public void setCity(String c)\n {\n address.setCity(c);\n }",
"@Override\n public void setCity(java.lang.String city) {\n _person.setCity(city);\n }",
"public void setCity(java.lang.String City) {\n this.City = City;\n }",
"public void setCity(String s) {\n this.city = s;\n }",
"public void setCity(java.lang.String city)\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(CITY$24, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CITY$24);\n }\n target.setStringValue(city);\n }\n }",
"public void setCity(java.lang.String city)\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(CITY$4, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CITY$4);\n }\n target.setStringValue(city);\n }\n }",
"@Override\n\tpublic void setCity(String city) {\n\t\t_registration.setCity(city);\n\t}",
"public void setCity(String value) {\n setAttributeInternal(CITY, value);\n }",
"@Override\n\tpublic void setCity(java.lang.String city) {\n\t\t_eprocurementRequest.setCity(city);\n\t}",
"@Step(\"Select City {city}\")\n\tpublic void setCity(String city) {\n\t\tcompanyInfo.getInpSelectCity().sendKeys(city);\n\t\tselectDropdownValue(companyInfo.getDrpdwnSelect(),city);\n\t}",
"public void setCity(int tourPosition, City city) {\n tour.set(tourPosition, city);\n // If the tours been altered we need to reset the fitness and distance\n fitness = 0;\n distance = 0;\n }",
"public void setCity(String newCity) {\r\n\r\n\t}",
"public void xsetCity(org.apache.xmlbeans.XmlString city)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CITY$24, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(CITY$24);\n }\n target.set(city);\n }\n }",
"public void xsetCity(org.apache.xmlbeans.XmlString city)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CITY$4, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(CITY$4);\n }\n target.set(city);\n }\n }",
"@Override\n\tpublic void setCity(java.lang.String city) {\n\t\t_announcement.setCity(city);\n\t}",
"public void xsetCity(org.apache.xmlbeans.XmlString city)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CITY$4, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(CITY$4);\r\n }\r\n target.set(city);\r\n }\r\n }",
"public void setCityField(String city) {\n WebElement cF = this.getCityField();\n cF.clear();\n cF.sendKeys(city);\n }",
"public void setCity(com.flexnet.operations.webservices.SimpleQueryType city) {\n this.city = city;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets whether deleted messages should be hidden. | public boolean getHideDeletedMsg() {
return hideDeletedMsg;
} | [
"boolean getShowDeleted();",
"public void setHideDeletedMsg(boolean hideDeletedMsg) {\n this.hideDeletedMsg = hideDeletedMsg;\n }",
"public boolean isMessageDeleted() {\r\n return isMessageDeleted( getMessage() );\r\n }",
"public boolean getDeleted() {\n return deleted;\n }",
"public Integer getIsDeleted() {\n return isDeleted;\n }",
"public java.lang.Boolean getIsDeleted() {\r\n return isDeleted;\r\n }",
"public String getIsdeleted() {\n return isdeleted;\n }",
"@Schema(description = \"Whether or not a dashboard is deleted.\")\n public Boolean isDeleted() {\n return deleted;\n }",
"public boolean isHideConfirmation() {\r\n return hideConfirmation;\r\n }",
"public Boolean isHidden() {\n return m_hidden;\n }",
"public boolean isVisualizeDeleteEnabled() {\n return visualizeDeleteEnabled;\n }",
"public Byte getIsDeleted() {\n return isDeleted;\n }",
"public boolean getGqmConfirmDeletions() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (GQM_CONFIRM_DELETIONS_);\n return ((Boolean)retnValue).booleanValue ();\n }",
"public boolean isDeletedModified() {\n return deleted_is_modified; \n }",
"public boolean isIsHidden() {\r\n return isHidden;\r\n }",
"public boolean isSetDeleted() {\n return this.deleted != null;\n }",
"public String getIsHidden() {\n return isHidden;\n }",
"public boolean isDeleteButtonVisible() {\r\n\t\tif (_deleteButton == null)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn _deleteButton.getVisible();\r\n\t}",
"public boolean isDeleting() {\n return status.equals(Status.DELETING);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the group ID of this person. | @Override
public void setGroupId(long groupId) {
_person.setGroupId(groupId);
} | [
"public void setGroup(String groupID) {\n _groupID = nullIfEmpty(groupID);;\n }",
"public void setGroupID(int groupID) {\n this.groupID = groupID;\n }",
"public void setGroupID(int value) {\n this.groupID = value;\n }",
"@Override\n public void setGroupId(long groupId) {\n _contactInfo.setGroupId(groupId);\n }",
"public void setGroup_id(Integer group_id) {\n this.group_id = group_id;\n }",
"@Override\n\tpublic void setGroupId(long groupId) {\n\t\t_paper.setGroupId(groupId);\n\t}",
"public void setGroup(Group group) {\r\n this.group = group;\r\n }",
"void setGroupId(int groupId);",
"public void setIdUserGroup( org.morozko.java.mod.db.dao.DAOID idUserGroup ) {\n this.idUserGroup = idUserGroup;\n }",
"public void setGroup(Group group) {\n this.group = group;\n }",
"@Override\n public void setGroupId(long groupId) {\n _manager.setGroupId(groupId);\n }",
"public void setIdDomainGroup( Long idDomainGroup ) {\n this.idDomainGroup = idDomainGroup;\n }",
"public void setGroup_id(Long group_id) {\n this.group_id = group_id;\n }",
"public void setGroup(int group) {\r\n\t\tthis.group = group;\r\n\t}",
"public Builder setGrpId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n grpId_ = value;\n onChanged();\n return this;\n }",
"void setGroup(InternalGroup group);",
"@Override\n public void setGroupId(long groupId) {\n _leagueDay.setGroupId(groupId);\n }",
"public void setGROUP_ID(String GROUP_ID) {\r\n this.GROUP_ID = GROUP_ID == null ? null : GROUP_ID.trim();\r\n }",
"public void setGroupId(Number value) {\n setAttributeInternal(GROUPID, value);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_jButtonBeheerBedrijvenActionPerformed Loads all constant values from the database. | private void loadStaticData(){
this.specialisaties = this.dbFacade.getAllSpecialisaties();
this.jComboBoxSpecialisatie.setModel(new DefaultComboBoxModel(this.specialisaties.toArray()));
this.SpecialisatieSitueert = this.dbFacade.getAllSitueert();
this.jComboBoxSitueert.setModel(new DefaultComboBoxModel(this.SpecialisatieSitueert.toArray()));
} | [
"public void getFirstValues(ActionEvent e) throws SQLException\n {\n DatabaseConnector connector = new DatabaseConnector();\n Connection connection = DatabaseConnector.getConnection();\n\n if (s9==\"\")\n {\n s9 = tf9.getText();\n }\n\n String sql1 = \"SELECT PopulationA, WachstumsRA, TragfähigkeitA, KonkEffektA \" +\n \"FROM konkurrenz_um_ressourcen.parameter_a WHERE Name like '\"+s9+\"'\";\n\n String sql2 = \"SELECT PopulationB, WachstumsRB, TragfähigkeitB, KonkEffektB \" +\n \"FROM konkurrenz_um_ressourcen.parameter_b WHERE Name like '\"+s9+\"'\";\n\n pst1 = connection.prepareStatement(sql1);\n pst2 = connection.prepareStatement(sql2);\n\n ResultSet rs1 = pst1.executeQuery();\n ResultSet rs2 = pst2.executeQuery();\n\n if(rs1.next())\n {\n String popA = rs1.getString(\"PopulationA\");\n tf1.setText(popA);\n String war = rs1.getString(\"WachstumsRA\");\n tf3.setText(war);\n String tra = rs1.getString(\"TragfähigkeitA\");\n tf5.setText(tra);\n String konka = rs1.getString(\"KonkEffektA\");\n tf7.setText(konka);\n }\n\n if(rs2.next())\n {\n String popb = rs2.getString(\"PopulationB\");\n tf2.setText(popb);\n String wbr = rs2.getString(\"WachstumsRB\");\n tf4.setText(wbr);\n String trb = rs2.getString(\"TragfähigkeitB\");\n tf6.setText(trb);\n String konkb = rs2.getString(\"KonkEffektB\");\n tf8.setText(konkb);\n }\n\n\n tf9.setText(s9);\n }",
"public FrmBeliKredit() {\n initComponents();\n koneksi.Koneksi_DB();\n setcomboktp();\n setcombomobil();\n setcombopaket();\n kodeotomatis1();\n }",
"public void loadRegistry() {\r\n /*\r\n * carga de los datos de un registro cuando se selecciona una fila de \r\n * la tabla que muestra los barrios existentes\r\n */\r\n disabledShowGeomFile = true;\r\n currentNeighborhood = null;\r\n if (selectedRowDataTable != null) {\r\n currentNeighborhood = neighborhoodsFacade.find(Integer.parseInt(selectedRowDataTable.getColumn1()));\r\n }\r\n if (currentNeighborhood != null) {\r\n btnEditDisabled = false;\r\n btnRemoveDisabled = false;\r\n if (currentNeighborhood.getNeighborhoodName() != null) {\r\n neighborhoodName = currentNeighborhood.getNeighborhoodName();\r\n } else {\r\n neighborhoodName = \"\";\r\n }\r\n if (currentNeighborhood.getNeighborhoodId() != null) {\r\n neighborhoodId = currentNeighborhood.getNeighborhoodId().toString();// integer NOT NULL, -- Código del barrio.\r\n } else {\r\n neighborhoodId = \"\";\r\n }\r\n if (currentNeighborhood.getNeighborhoodArea() != null) {\r\n neighborhoodType = String.valueOf(currentNeighborhood.getNeighborhoodArea());// character(1), -- Tipo de barrio.\r\n if (neighborhoodType.compareTo(\"1\") == 0) {//ZONA URBANA\r\n } else {//ZONA RURAL\r\n neighborhoodSuburbId = \"2\";\r\n }\r\n } else {\r\n neighborhoodType = \"1\";\r\n }\r\n if (currentNeighborhood.getNeighborhoodLevel() != null) {\r\n neighborhoodLevel = String.valueOf(currentNeighborhood.getNeighborhoodLevel());// character(1), -- Estrato socioeconómico del barrio.\r\n } else {\r\n neighborhoodLevel = \"\";\r\n }\r\n\r\n if (currentNeighborhood.getNeighborhoodSuburb() != -1) {\r\n neighborhoodSuburbId = String.valueOf(currentNeighborhood.getNeighborhoodSuburb());// character(1), -- Tipo de barrio.\r\n } else {\r\n neighborhoodSuburbId = \"\";\r\n }\r\n if (currentNeighborhood.getPopulation() != null) {\r\n popuation = String.valueOf(currentNeighborhood.getPopulation());\r\n } else {\r\n popuation = \"0\";\r\n }\r\n if (currentNeighborhood.getNeighborhoodCorridor() != null) {\r\n neighborhoodCorridor = String.valueOf(currentNeighborhood.getNeighborhoodCorridor());\r\n } else {\r\n neighborhoodCorridor = \"0\";\r\n }\r\n changeArea();//sacar lista de comunas\r\n if (currentNeighborhood.getNeighborhoodSuburb() != -1) {\r\n neighborhoodSuburbId = String.valueOf(currentNeighborhood.getNeighborhoodSuburb());// character(1), -- Tipo de barrio.\r\n } else {\r\n neighborhoodSuburbId = \"\";\r\n }\r\n\r\n //determino si la geometria ya esta cargada\r\n if (currentNeighborhood.getGeom() != null && currentNeighborhood.getGeom().trim().length() != 0) {\r\n geomText = \"<div style=\\\"color: blue;\\\"><b>Tiene geometría</b></div>\";\r\n } else {\r\n geomText = \"<div style=\\\"color: red;\\\"><b>No tiene geometría</b></div>\";\r\n }\r\n\r\n availableQuadrants = new ArrayList<>();\r\n selectedAvailableQuadrants = new ArrayList<>();\r\n availableAddQuadrants = new ArrayList<>();\r\n selectedAvailableAddQuadrants = new ArrayList<>();\r\n quadrantsFilter = \"\";\r\n\r\n //determino los cuadrantes\r\n availableQuadrants = new ArrayList<>();\r\n selectedAvailableQuadrants = new ArrayList<>();\r\n availableAddQuadrants = new ArrayList<>();\r\n selectedAvailableAddQuadrants = new ArrayList<>();\r\n try {\r\n ResultSet rs = connectionJdbcMB.consult(\"\"\r\n + \" SELECT * FROM quadrants WHERE quadrant_id NOT IN \"\r\n + \" (SELECT quadrant_id FROM neighborhood_quadrant \"\r\n + \" WHERE neighborhood_id = \" + currentNeighborhood.getNeighborhoodId().toString() + \") \");\r\n while (rs.next()) {\r\n availableQuadrants.add(rs.getString(\"quadrant_name\"));\r\n }\r\n rs = connectionJdbcMB.consult(\"\"\r\n + \" SELECT * FROM quadrants WHERE quadrant_id IN \"\r\n + \" (SELECT quadrant_id FROM neighborhood_quadrant \"\r\n + \" WHERE neighborhood_id = \" + currentNeighborhood.getNeighborhoodId().toString() + \") \");\r\n while (rs.next()) {\r\n availableAddQuadrants.add(rs.getString(\"quadrant_name\"));\r\n }\r\n } catch (Exception e) {\r\n }\r\n }\r\n }",
"public DataGaji() {\n initComponents();\n connect = new Koneksi();\n setLocationRelativeTo(null);\n CB_KaryawanId.removeAllItems();\n LoadCBKaryawanId();\n LoadTableDataGaji();\n ClearData();\n TF_GajiPegId.setVisible(false);\n TF_PotTidakHadir.disable();\n TF_GajiBersih.disable();\n TF_GajiKotor.disable();\n }",
"private void setDefaultDBValues() {\r\n this.rhostfield.setText(hostnameString_default);\r\n this.rportfield.setText((new Integer(portNr_default)).toString());\r\n this.rdatabasefield.setText(databaseString_default);\r\n this.ruserfield.setText(rusernameString_default);\r\n this.rpasswdfield.setText(\"\");\r\n this.rtablename1efield.setText(nodeList_DBtable_default);\r\n this.colnodeIdfield.setText(node_ids_DBcol_default);\r\n this.colnodeLabelfield.setText(node_labels_DBcol_default);\r\n this.rtablename2efield.setText(edgeList_DBtable_default);\r\n this.coledge1field.setText(edgeList_DBcol1_default);\r\n this.coledge2field.setText(edgeList_DBcol2_default);\r\n this.colweightfield.setText(edgeList_DBcolweight_default);\r\n this.otablenamefield.setText(result_DBtable_default);\r\n\r\n this.is_alg_started = false;\r\n this.is_already_read_from_DB = false;\r\n this.is_already_renumbered = false;\r\n }",
"public Formulario_HABITACION_BD() {\n initComponents();\n setTitle(\"Registro de Habitacion\");\n setLocationRelativeTo(null);\n consultaDB();\n }",
"private void loadData(String cari) {\n \n // Mengatur formatter tanggal menjadi dd-MM-yyyy\n SimpleDateFormat f = new SimpleDateFormat(\"dd-MM-yyyy HH:mm\", new Locale(\"id\", \"ID\"));\n \n \n try {\n // Meremove semua data pada table.\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged(); \n \n // Membuat statement baru\n c.stat = c.conn.createStatement();\n String sql = \"SELECT * FROM viewSubmissionSiswa WHERE ID_Instruktur = '\" + OSSession.getId() + \"' \"\n + \"AND Nilai IS NULL ORDER BY Terakhir_dimodifikasi DESC\";\n \n // Menampung result ke c.result\n c.result = c.stat.executeQuery(sql);\n int no = 1;\n // Melakukan looping pada result dari query\n while(c.result.next()) {\n ResultSet r = c.result;\n \n // Membuat array dari object untuk ditambahkan ke model\n Object obj[] = new Object[5];\n obj[0] = no++;\n obj[1] = r.getString(\"Nama_Kelas\");\n obj[2] = r.getString(\"Judul\");\n obj[3] = r.getString(\"Nama_Siswa\");\n obj[4] = f.format(r.getDate(\"Terakhir_dimodifikasi\"));\n \n // Menambahkan row baru ke model\n model.addRow(obj);\n }\n \n c.stat.close();\n c.result.close();\n } catch(SQLException e) {\n System.out.println(\"Terjadi error saat load data pendaftaran \" + e);\n }\n \n }",
"public Day11CarsDB() {\n \n try {\n initComponents();\n dlgAddEdit.pack();\n db = new Database();\n refreshList();\n\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(this,\n \"Unable to connect to database\\n\" + ex.getMessage(),\n \"Database Error\",\n JOptionPane.ERROR_MESSAGE);\n System.exit(1);\n }\n }",
"private void refreshDisplayedStageplaats(){\n if (this.geselecteerdeStageplaats != null){\n if (this.geselecteerdeStageplaats.getId() != null){\n this.jLabelID.setText(this.geselecteerdeStageplaats.getId().toString());\n }\n this.jTextFieldTitel.setText(this.geselecteerdeStageplaats.getTitel());\n this.jTextAreaOmschrijving.setText(this.geselecteerdeStageplaats.getOmschrijving());\n this.jSliderAantalPlaatsen.setValue(this.geselecteerdeStageplaats.getAantalPlaatsen());\n this.jTextFieldPeriode.setText(this.geselecteerdeStageplaats.getPeriode());\n this.jTextAreaBegeleiding.setText((this.geselecteerdeStageplaats.getBegeleiding()));\n this.jTextAreaVereisteKennis.setText(this.geselecteerdeStageplaats.getExtraKennisVereist());\n this.jTextAreaVoorzieningen.setText(this.geselecteerdeStageplaats.getVoorzieningen());\n this.jComboBoxSpecialisatie.setSelectedItem(this.geselecteerdeStageplaats.getSitueertID().getSpecialisatieID());\n this.SpecialisatieSitueert = this.dbFacade.getAllSitueertOfSpecialisatieID(this.geselecteerdeStageplaats.getSitueertID().getSpecialisatieID().getId());\n this.jComboBoxSitueert.setModel(new DefaultComboBoxModel(this.SpecialisatieSitueert.toArray()));\n \n this.jComboBoxSitueert.setSelectedItem(this.geselecteerdeStageplaats.getSitueertID());\n \n // Bedrijf\n displayBedrijf();\n \n SimpleDateFormat dateformat = new SimpleDateFormat(\"dd-MM-yyyy '-' HH:mm:ss\");\n this.jLabelAanmaakdatum.setText(dateformat.format(this.geselecteerdeStageplaats.getAanmaakDatum()));\n this.jLabellaatsteWijzing.setText(dateformat.format(this.geselecteerdeStageplaats.getLaatsteWijziging()));\n }\n }",
"public frm_nilai() {\n initComponents();\n \n dbsetting = new koneksi();\n driver = dbsetting.SettingPanel(\"DBDriver\");\n database = dbsetting.SettingPanel(\"DBDatabase\");\n user = dbsetting.SettingPanel(\"DBUsername\");\n pass = dbsetting.SettingPanel(\"DBPassword\");\n \n tblNilai.setModel(tablemodel);\n setModelComboNim();\n setModelComboMK();\n settableload();\n }",
"private void initKeys()\n\t{\n\t\tResultSet result = null;\n\t\tString selectStmt = \"SELECT Ab_ID FROM ABILITY\";\n\t\tString selectCount = \"SELECT COUNT(*) FROM ABILITY\";\n\t\tString[] data = null;\n\n\t\ttry\n\t\t{\n\t\t\t// Retrieve the count of primary keys in the table\n\t\t\tStatement stmt = m_dbConn.createStatement();\n\t\t\tresult = stmt.executeQuery(selectCount);\n\t\t\tint count = 1;\n\t\t\twhile (result.next())\n\t\t\t{\n\t\t\t\tcount = result.getInt(1);\n\t\t\t}\n\n\t\t\tdata = new String[count + 1];\n\t\t\tdata[0] = \"(new entry)\";\n\n\t\t\t// Retrieve the primary keys from the table\n\t\t\t// and store each one in an array of Strings\n\t\t\tresult = stmt.executeQuery(selectStmt);\n\t\t\tint i = 0;\n\t\t\twhile (result.next() && i < data.length)\n\t\t\t{\n\t\t\t\tdata[i + 1] = result.getString(\"Ab_ID\");\n\t\t\t\ti++;\n\t\t\t}\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tabilKeys = data;\n\t}",
"public GUI_PinjamBuku() throws SQLException {\n initComponents();\n this.arrPeminjaman = new ArrayList<>();\n this.arrKeranjang = new ArrayList<>();\n this.controller_peminjaman = new Controller_Peminjaman();\n this.controller_buku = new Controller_Buku();\n this.controller_admin = new Controller_Admin();\n this.controller_member = new Controller_Member();\n //this.tfMember.setText(i);\n this.showComboBoxMember();\n this.showComboBoxAdmin();\n this.showComboBoxBuku();\n this.showTablePeminjaman();\n\n this.tblBuku.setModel(this.controller_buku.viewTabel());\n }",
"private void jComboBoxSpecialisatieActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxSpecialisatieActionPerformed\n\n this.SpecialisatieSitueert = this.dbFacade.getAllSitueertOfSpecialisatieID(((Specialisatie)this.jComboBoxSpecialisatie.getSelectedItem()).getId());\n this.jComboBoxSitueert.setModel(new DefaultComboBoxModel(this.SpecialisatieSitueert.toArray()));\n }",
"public void load() {\n try {\n fileConnection = (FileConnection) Connector.open(filePath);\n if (fileConnection.exists()) {\n fileIO = new BufferedReader(new InputStreamReader(fileConnection.openInputStream()));\n String line;\n while ((line = fileIO.readLine()) != null) {\n int pos = line.indexOf(\" \");\n if (pos != -1) {\n for (int i = 0; i < constants.size(); ++i) {\n Constant c = (Constant) constants.elementAt(i);\n if (c.getKey().equals(line.substring(0, pos))) {\n c.value = Double.parseDouble(line.substring(pos));\n }\n }\n } else {\n System.out.println(\"Invalid line\");\n }\n }\n fileConnection.close();\n }\n } catch (IOException e) {\n System.out.println(\"Messed up reading constants\");\n }\n }",
"protected void currentConstantValueSet() {\r\n\t\t\tString constantString = String\r\n\t\t\t\t\t.valueOf(constantBox.getItemAt(constantBox.getSelectedIndex()));\r\n\t\t\tif (constantString == null || constantString.equals(\"(select a constant)\")) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tField constant = constantTable.get(constantString);\r\n\t\t\tString valueStr = constantValueToBox.getText();\r\n\t\t\tObject value = ReflectionUtils.parseValue(constant.getType(), constant.getGenericType(), valueStr);\r\n\t\t\tReflectionUtils.setConstantValue(STUDENT_CLASS, constant.getName(), value);\r\n\t\t}",
"private void save() {\n Vector<Vector> dataVector = getTableModel().getDataVector();\n constantsList.clear();\n dataVector.stream().forEach((dataRow) -> {\n String name = (String) dataRow.get(0);\n String type = (String) dataRow.get(1);\n Object value = dataRow.get(2);\n ValuedParameterDescriptor newParam = new ValuedParameterDescriptor(name, type, value);\n constantsList.add(newParam);\n });\n constantsProperty.setValueAndUpdate(constantsList); // almost certainly redundant\n }",
"void all_Data_retrieve() {\n\t\tStatement stm=null;\n\t\tResultSet rs=null;\n\t\ttry{\n\t\t\t//Retrieve tuples by executing SQL command\n\t\t stm=con.createStatement();\n\t String sql=\"select * from \"+tableName+\" order by id desc\";\n\t\t rs=stm.executeQuery(sql);\n\t\t DataGUI.model.setRowCount(0);\n\t\t //Add rows to table model\n\t\t while (rs.next()) {\n Vector<Object> newRow = new Vector<Object>();\n //Add cells to each row\n for (int i = 1; i <=colNum; i++) \n newRow.addElement(rs.getObject(i));\n DataGUI.model.addRow(newRow);\n }//end of while\n\t\t //Catch SQL exception\n }catch (SQLException e ) {\n \te.printStackTrace();\n\t } finally {\n\t \ttry{\n\t if (stm != null) stm.close(); \n\t }\n\t \tcatch (SQLException e ) {\n\t \t\te.printStackTrace();\n\t\t }\n\t }\n\t}",
"private void jButtonRefreshActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRefreshActionPerformed\n // TODO add your handling code here:\n refreshDatabaseTables();\n }",
"public ElevSeRegKurser() {\n initComponents();\n try {\n idb = new InfDB(\"C://db//HOGDB.FDB\");\n } catch (InfException e) {\n JOptionPane.showMessageDialog(null, \"Något gick visst fel\");\n System.out.println(\"Internt felmeddelande\" + e.getMessage());\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column ecs_takegoods_order.consignee | public String getConsignee() {
return consignee;
} | [
"public String getConsignee() {\r\n return consignee;\r\n }",
"public String getConsigneeNo() {\n return consigneeNo;\n }",
"public Integer getConsigneeUserId() {\n return consigneeUserId;\n }",
"public String getIdConsignee() {\n return idConsignee;\n }",
"public void setConsignee(String consignee) {\r\n this.consignee = consignee;\r\n }",
"public void setConsignee(String consignee) {\n this.consignee = consignee;\n }",
"java.lang.String getCouponVendor();",
"consigneeManage selectByPrimaryKey(Integer consigneeId);",
"@Column(name = \"INS_CO_NAME\")\n\tpublic String getInsuranceCo()\n\t{\n\t\treturn insuranceCo;\n\t}",
"private String getConsignorCode() throws Exception\n\t{\n\t\tConnection conn = null;\n\n\t\ttry\n\t\t{\n\t\t\t//#CM716107\n\t\t\t// Obtain Connection \t\n\t\t\tconn = ConnectionManager.getConnection(DATASOURCE_NAME);\n\t\t\tRetrievalSupportParameter param = new RetrievalSupportParameter();\n\n\t\t\t//#CM716108\n\t\t\t// Obtain the Consignor code from the schedule. \n\t\t\tWmsScheduler schedule = new RetrievalOrderListSCH();\n\t\t\tparam = (RetrievalSupportParameter) schedule.initFind(conn, param);\n\n\t\t\tif (param != null)\n\t\t\t{\n\t\t\t\treturn param.getConsignorCode();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tmessage.setMsgResourceKey(ExceptionHandler.getDisplayMessage(ex, this.getClass()));\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t//#CM716109\n\t\t\t\t// Close the connection. \n\t\t\t\tif (conn != null)\n\t\t\t\t{\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException se)\n\t\t\t{\n\t\t\t\tmessage.setMsgResourceKey(ExceptionHandler.getDisplayMessage(se, this.getClass()));\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public String getConsignorCode()\n\t{\n\t\treturn wConsignorCode;\n\t}",
"public String getConsigneephone() {\n return consigneephone;\n }",
"java.lang.String getFkout();",
"public String getConsigneeAddress() {\n return consigneeAddress;\n }",
"public void setConsignee(String consignee) {\n this.consignee = consignee == null ? null : consignee.trim();\n }",
"public String getRatesPropertyParent() throws SQLException {\r\n String chiff = null;\r\n String query = \"SELECT ParentRatesProperty from Rate_Parent_company ;\";\r\n Statement stmt = conn.prepareStatement(query);\r\n ResultSet resultat = stmt.executeQuery(query);\r\n if (resultat.first()) {\r\n chiff = resultat.getString(\"ParentRatesProperty\");\r\n }\r\n System.out.println(\"requete = \" + stmt.toString());\r\n System.out.println(chiff);\r\n return chiff;\r\n }",
"java.lang.String getCoId();",
"public Integer getTakeGoodsCode() {\n return takeGoodsCode;\n }",
"public java.lang.String getCONCEPTO() {\r\n return CONCEPTO;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run the Command createCommand(int) method test. | @Test
public void testCreateCommand_6()
throws Exception {
int cmdId = 5;
Command result = CommandFactory.createCommand(cmdId);
// add additional test code here
assertNotNull(result);
} | [
"@Test\n\tpublic void testCreateCommand_1()\n\t\tthrows Exception {\n\t\tint cmdId = 0;\n\n\t\tCommand result = CommandFactory.createCommand(cmdId);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"@Test\n\tpublic void testCreateCommand_11()\n\t\tthrows Exception {\n\t\tint cmdId = 10;\n\n\t\tCommand result = CommandFactory.createCommand(cmdId);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"@Test\n\tpublic void testCreateCommand_10()\n\t\tthrows Exception {\n\t\tint cmdId = 9;\n\n\t\tCommand result = CommandFactory.createCommand(cmdId);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"@Test\n\tpublic void testCreateCommand_12()\n\t\tthrows Exception {\n\t\tint cmdId = 11;\n\n\t\tCommand result = CommandFactory.createCommand(cmdId);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"@Test\n\tpublic void testCreateCommand_5()\n\t\tthrows Exception {\n\t\tint cmdId = 4;\n\n\t\tCommand result = CommandFactory.createCommand(cmdId);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"@Test\n\tpublic void testCreateCommand_8()\n\t\tthrows Exception {\n\t\tint cmdId = 7;\n\n\t\tCommand result = CommandFactory.createCommand(cmdId);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"Command createCommand();",
"private SyncCommandTestImpl createCommand(Integer limit)\n {\n initMocks();\n return new SyncCommandTestImpl(init, observer, controller, queue, limit);\n }",
"@Test\n public void createCommand_numberDescription_commandCreated() {\n String description = \"1\";\n Assertions.assertDoesNotThrow(() -> {\n MatcherAssert.assertThat(\n DeleteCommand.createCommand(description),\n instanceOf(DeleteCommand.class)\n );\n });\n }",
"public TestCommand()\n {\n }",
"Commands createCommands();",
"@Test\n public void createCommand_presentDescription_commandCreated() {\n String description = \"run\";\n Assertions.assertDoesNotThrow(() -> {\n MatcherAssert.assertThat(\n AddCommand.createCommand(description, CommandTypeEnum.TODO),\n instanceOf(AddCommand.class)\n );\n });\n }",
"@Test\n\tpublic void commandGeneration_should_work() {\n\t\t// Command generated should be not null.\n\t\tassertNotNull(new ReportService().commandGeneration());\n\t\t// Command generated shouldn't be empty.\n\t\tassertNotEquals(\"\", new ReportService().commandGeneration());\n\t\t// Command generated length shouldn't be not zero.\n\t\tassertNotEquals(0, new ReportService().commandGeneration().length());\n\t}",
"@Test\n\tpublic void whenRightCommandEnteredThenDoCommandConstructShouldReturnRightCommand() {\n\t\t//Given the user enter the Right command string\n\t\tString userEntered = \"Right\";\n\t\t//When the doCommandConstruct method called\n\t\tCommand command = defaultCommandFactory.constructCommand(userEntered);\n\t\t//Then the Right command object should return\n\t\tassertThat(command, is(instanceOf(RightCommand.class)));\n\t}",
"IDbCommand createCommand();",
"@Test\n public void commandIdTest() {\n // TODO: test commandId\n }",
"@Test\n public void testSimpleCommandExecute() {\n // Create the VO\n SimpleCommandTestVO vo = new SimpleCommandTestVO(5);\n\n // Create the Notification (note)\n Notification note = new Notification(\"SimpleCommandTestNote\", vo);\n\n // Create the SimpleCommand\n SimpleCommandTestCommand command = new SimpleCommandTestCommand();\n\n // Execute the SimpleCommand\n command.execute(note);\n\n // test assertions\n Assertions.assertTrue(vo.result == 10, \"Expecting vo.result == 10\");\n }",
"@Test\n public void type() throws IllegalArgumentException {\n WebDriverCommandProcessor proc = new WebDriverCommandProcessor(\"http://localhost/\", manager.get());\n CommandFactory factory = new CommandFactory(proc);\n factory.newCommand(1, \"type\", \"aaa\", \"\");\n }",
"Execute createExecute();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .llql_proto.Sample sample = 15; | com.vitessedata.llql.llql_proto.LLQLQuery.Sample getSample(); | [
"com.vitessedata.llql.llql_proto.LLQLQuery.SampleOrBuilder getSampleOrBuilder();",
"public com.vitessedata.llql.llql_proto.LLQLQuery.SampleOrBuilder getSampleOrBuilder() {\n return sample_;\n }",
"public com.vitessedata.llql.llql_proto.LLQLQuery.SampleOrBuilder getSampleOrBuilder() {\n if (sampleBuilder_ != null) {\n return sampleBuilder_.getMessageOrBuilder();\n } else {\n return sample_;\n }\n }",
"public com.vitessedata.llql.llql_proto.LLQLQuery.Sample getSample() {\n if (sampleBuilder_ == null) {\n return sample_;\n } else {\n return sampleBuilder_.getMessage();\n }\n }",
"edgify.Samples.DataSample getSample();",
"private Sample(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public interface ANY_SAMPLE_STATE\n{\n\tint value = 65535;\n}",
"long getQueryExecutionSample();",
"public void setSamples(int samples){ \n this.samples = samples; \n }",
"java.util.List<? extends prometheus.Types.SampleOrBuilder> \n getSamplesOrBuilderList();",
"public void loadSample (PlayerAudioSample pareq) {\n try {\n PlayerAudioWav sample = pareq.getSample ();\n int size = sample.getData_count() + 12 + 4;\n sendHeader (PLAYER_MSGTYPE_REQ, PLAYER_AUDIO_REQ_SAMPLE_LOAD, size);\n XdrBufferEncodingStream xdr = new XdrBufferEncodingStream (size);\n xdr.beginEncoding (null, 0);\n xdr.xdrEncodeInt (sample.getData_count ()); // data_count\n xdr.xdrEncodeDynamicOpaque (sample.getData ()); // array_count + data\n xdr.xdrEncodeInt (sample.getFormat ()); // sample format\n xdr.xdrEncodeInt (pareq.getIndex ()); // sample index\n xdr.endEncoding ();\n os.write (xdr.getXdrData (), 0, xdr.getXdrLength ());\n xdr.close ();\n os.flush ();\n } catch (IOException e) {\n throw new PlayerException\n (\"[Audio] : Couldn't send request: \" +\n e.toString(), e);\n } catch (OncRpcException e) {\n throw new PlayerException\n (\"[Audio] : Error while XDR-encoding request: \" +\n e.toString(), e);\n }\n }",
"com.protobuftest.protobuf.GameProbuf.Game.Question getQestion();",
"private AddSampleRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public void addSample(WriteChannel channel, VType sample) throws Exception;",
"speech.multilang.Params.DecisionPointParams.Type getType();",
"com.zzsong.netty.protobuff.two.ProtoData.Dog getDog();",
"void addSampleSentence(String rname,String sample) {\n GRule r = (GRule)rules.get(stripRuleName(rname));\n /* TODO : exception */\n if (r == null) {\n return;\n }\n r.samples.addElement(sample);\n }",
"private Sample(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private DataSample(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Processes submit_sm, if it has the sar optional parameters. Processed request is then put in the pool of message parts. If all parts for current msisdn are received, they are then concatenated and are put to the report map. In this case, msisdn becomes NOT_BUSY. | public void processSarConcatPart(final SubmitSm submitSm) {
String msisdn = submitSm.getDestAddress().getAddress();
String linkId = submitSm.getSourceAddress().getAddress();
int sarTotalSegments = 0;
for (int i : submitSm.getOptionalParameter(SmppConstants.TAG_SAR_TOTAL_SEGMENTS).getValue()) {
sarTotalSegments = sarTotalSegments * 10 + i;
}
int sarSegmentSeqnum = 0;
for (int i : submitSm.getOptionalParameter(SmppConstants.TAG_SAR_SEGMENT_SEQNUM).getValue()) {
sarSegmentSeqnum = sarSegmentSeqnum * 10 + i;
}
int sarMsgRefnum = 0;
for (int i : submitSm.getOptionalParameter(SmppConstants.TAG_SAR_MSG_REF_NUM).getValue()) {
sarMsgRefnum = sarMsgRefnum * 10 + i; //todo: проверить, нужно ли в цикле умножать на 10 ref_num
}
String messageFullId = msisdn + linkId + sarMsgRefnum;
messageParts.put(messageFullId, new SubmitSmData(sarSegmentSeqnum,
submitSm.getShortMessage()));
if (sarTotalSegments == messageParts.get(messageFullId).size()) {
logger.info("Got all SAR parts for msisdn = " + msisdn + ", getting whole text from SAR parts.");
byte[] finalMessage = concatenateUdhOrSar(messageParts.get(messageFullId));
messageParts.asMap().remove(messageFullId);
transactionReportService.processOneInfoReport(finalMessage, msisdn, submitSm.getDataCoding());
}
} | [
"public void processPayloadConcatMessage(final SubmitSm submitSm) {\n String destAddress = submitSm.getDestAddress().getAddress();\n\n Tlv messagePayload = submitSm.getOptionalParameter(SmppConstants.TAG_MESSAGE_PAYLOAD);\n byte[] shortMessage = messagePayload.getValue();\n transactionReportService.processOneInfoReport(shortMessage, destAddress, submitSm.getDataCoding());\n\n logger.info(\"Have processed PAYLOAD for msisdn = \" + destAddress + \".\");\n\n }",
"private void performSendToStagingArea() {\n MsbColumns columns = MsbClient.getColumnInfo();\n\n final Integer msbID = new Integer((String) sorter.getValueAt(\n selRow, columns.getIndexForKey(\"msbid\")));\n final String checksum = (String) sorter.getValueAt(\n selRow, columns.getIndexForKey(\"checksum\"));\n final String projectid = (String) sorter.getValueAt(\n selRow, columns.getIndexForKey(\"projectid\"));\n\n // Perform SpQueuedMap check and other Swing actions before\n // launching the SwingWorker thread.\n if (remaining.isSelected()) {\n String time =\n SpQueuedMap.getSpQueuedMap().containsMsbChecksum(checksum);\n\n if (time != null) {\n int rtn = JOptionPane.showOptionDialog(null,\n \"This observation was sent to the queue \"\n + time + \".\\n Continue ?\",\n \"Duplicate execution warning\",\n JOptionPane.YES_NO_OPTION,\n JOptionPane.WARNING_MESSAGE, null, null,\n null);\n\n if (rtn == JOptionPane.NO_OPTION) {\n return;\n }\n }\n }\n\n logger.info(\"Fetching MSB \" + msbID + \" INFO is: \" + projectid +\n \", \" + checksum);\n\n InfoPanel.logoPanel.start();\n om.enableList(false);\n\n (new SwingWorker<SpItem, Void>() {\n public SpItem doInBackground() {\n return localQuerytool.fetchMSB(msbID);\n }\n\n // Runs on the event-dispatching thread.\n protected void done() {\n // Restore GUI state: we want to do this on the\n // event-dispatching thread regardless of whether the worker\n // succeeded or not.\n om.enableList(true);\n InfoPanel.logoPanel.stop();\n\n try {\n SpItem item = get();\n\n // Perform the following actions of the worker was\n // successful ('get' didn't raise an exception).\n DeferredProgramList.clearSelection();\n om.addNewTree(item);\n buildStagingPanel();\n }\n catch (InterruptedException e) {\n logger.error(\"Execution thread interrupted\");\n }\n catch (ExecutionException e) {\n logger.error(\"Error retriving MSB: \" + e);\n String why = null;\n Throwable cause = e.getCause();\n if (cause != null) {\n why = cause.toString();\n }\n else {\n why = e.toString();\n }\n\n // exceptions are generally Null Pointers or Number Format\n // Exceptions\n logger.debug(why);\n JOptionPane.showMessageDialog(\n null, why, \"Could not fetch MSB\",\n JOptionPane.ERROR_MESSAGE);\n }\n catch (Exception e) {\n // Retaining this catch-all block as one was present in\n // the previous version of this code. Exceptions\n // raised by 'get' should be caught above -- this block\n // is in case the in-QT handling of the MSB fails.\n // (Not sure if that can happen or not.)\n logger.error(\"Error processing retrieved MSB: \" + e);\n JOptionPane.showMessageDialog(\n null, e.toString(), \"Could not process fetched MSB\",\n JOptionPane.ERROR_MESSAGE);\n }\n }\n }).execute();\n }",
"public void processSimpleMessage(final SubmitSm submitSm) {\n String destAddress = submitSm.getDestAddress().getAddress();\n byte[] shortMessage = submitSm.getShortMessage();\n transactionReportService.processOneInfoReport(shortMessage, destAddress, submitSm.getDataCoding());\n\n logger.info(\"Have processed simple message for msisdn = \" + destAddress + \".\");\n\n }",
"private synchronized void checkAndSendMessage() {\n\n log.debug(\"synchronized checkAndSendMessage!\");\n if ((!stopSendingMessage)\n && (nextTasksQueue.size() == totalPartitionsAssigned)) {\n log.debug(\"sendMessage!\");\n\n stopSendingMessage = true;\n flagLocalCompute = false;\n\n log.debug(\"Worker: Superstep \" + superstep + \" completed.\");\n log.debug(\"Worker: outgoing message size = \"\n + outgoingMessages.size());\n\n long start = System.currentTimeMillis();\n\n try {\n\n List<Pattern> messageList = new ArrayList<Pattern>();\n messageList.addAll(outgoingMessages);\n outgoingMessages.clear();\n coordinatorProxy.sendMessageWorker2Coordinator(this.workerID,\n messageList);\n\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n\n log.debug(\"send up message using \"\n + (System.currentTimeMillis() - start) + \"ms.\");\n }\n }",
"private void submitJob() {\r\n\t\tif(!inputQueue.isEmpty()) {\t\t\t\t\t\t\t\t\t// nested \"ifs\" to check job arrival times \r\n\t\t\tJob front = (Job)inputQueue.query();\t\t\t\t\t// and preempt if needed\r\n\t\t\tif(front.getArrivalTime() == clock.getClock()) {\t\t//\r\n\t\t\t\tfront.arrival();\t\t\t\t\t\t\t\t\t//\r\n\t\t\t\tfirstQueue.insert(inputQueue.remove());\t\t\t\t//\r\n\t\t\t\tif(cpu.isBusy()) {\r\n\t\t\t\t\tif(cpu.getJob().getCurrentQueue() != 1) {\r\n\t\t\t\t\t\tpreempt();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taverageResponse++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\r\n\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\r\n\t}",
"SMS getNextSMSQueuedForSending()\n throws SMSServiceException;",
"public void sendGetRequest() {\r\n\t\tString[] requests = this.input.substring(4, this.input.length()).split(\" \"); \r\n\t\t\r\n\t\tif(requests.length <= 1 || !(MyMiddleware.readSharded)){\r\n\t\t\tnumOfRecipients = 1;\r\n\t\t\trecipient = servers.get(loadBalance());\r\n\r\n\t\t\trecipient.send(this, input);\r\n\t\t\tsendTime = System.nanoTime();\r\n\r\n\t\t\tworkerTime = sendTime - pollTime;\r\n\r\n\t\t\t\r\n\t\t\tif(requests.length <= 1) {\r\n\t\t\t\tnumOfGets++;\r\n\t\t\t\ttype= \"10\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnumOfMultiGets++;\r\n\t\t\t\ttype = requests.length+\"\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString reply = recipient.receive();\r\n\t\t\treceiveTime = System.nanoTime();\r\n\t\t\tprocessingTime = receiveTime - sendTime;\r\n\t\t\t\r\n\t\t\tint hit = 0;\r\n\t\t\thit += reply.split(\"VALUE\").length - 1;\r\n\t\t\tmiss += requests.length-hit;\r\n\r\n\t\t\tif(!(reply.endsWith(\"END\"))) {\r\n\t\t\t\tunproperRequests.add(reply);\r\n\t\t\t\tsendBack(currentJob.getClient(), reply);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tsendBack(currentJob.getClient(), reply);\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnumOfMultiGets++;\r\n\t\t\ttype = requests.length+\"\";\r\n\t\t\tnumOfRecipients = servers.size();\r\n\t\t\trequestsPerServer = requests.length / servers.size();\r\n\t\t\tremainingRequests = requests.length % servers.size() ;\r\n\t\t\t\r\n\t\t\t//The worker thread sends a number of requests to each server equal to requestsPerServer \r\n\t\t\t//and at most requestsPerServer + remainingRequests\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < servers.size(); i++) {\r\n\t\t\t\tmessage = requestType;\r\n\t\t\t\tfor(int j = 0; j < requestsPerServer; j++){\r\n\t\t\t\t\tmessage += \" \";\r\n\t\t\t\t\tmessage += requests[requestsPerServer*i+j];\r\n\t\t\t\t\tif(i < remainingRequests) {\r\n\t\t\t\t\t\tmessage += \" \";\r\n\t\t\t\t\t\tmessage += requests[requests.length - remainingRequests + i];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tservers.get(i).send(this, message);\r\n\t\t\t}\r\n\t\t\tsendTime = System.nanoTime();\r\n\r\n\t\t\tworkerTime = sendTime - pollTime;\r\n\r\n\t\t\tint hit = 0;\r\n\t\t\tfor(ServerHandler s : servers) {\r\n\t\t\t\tString ricevuto = s.receive();\r\n\t\t\t\thit += ricevuto.split(\"VALUE\").length - 1;\r\n\t\t\t\treplies.add(ricevuto);\r\n\t\t\t}\r\n\t\t\treceiveTime = System.nanoTime();\r\n\t\t\tprocessingTime = receiveTime - sendTime;\r\n\r\n\t\t\tmiss += requests.length-hit;\r\n\t\t\t\r\n\t\t\tfinalReply = \"\";\r\n\t\t\tfor(String reply : replies) {\r\n\t\t\t\tif(!(reply.endsWith(\"END\"))) {\r\n\t\t\t\t\tunproperRequests.add(reply);\r\n\t\t\t\t\tsendBack(currentJob.getClient(), reply);\r\n\t\t\t\t\treplies.clear();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treply = reply.substring(0, reply.length() - 3);\r\n\t\t\t\t\tfinalReply += reply;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalReply += \"END\";\r\n\t\t\tsendBack(currentJob.getClient(), finalReply);\r\n\t\t\treplies.clear();\r\n\r\n\t\t}\r\n\t\t\r\n\t}",
"protected abstract boolean processMessage(HttpServletRequest req, HttpServletResponse res) throws ServletException, MessagingException, IOException, JSONException;",
"void sendMempoolSubmission(Command command);",
"void dispatchMessage(SmsMessage sms) {\n boolean handled = false;\n\n // Special case the message waiting indicator messages\n if (sms.isMWISetMessage()) {\n mPhone.updateMessageWaitingIndicator(true);\n\n if (sms.isMwiDontStore()) {\n handled = true;\n }\n\n if (Config.LOGD) {\n Log.d(TAG,\n \"Received voice mail indicator set SMS shouldStore=\"\n + !handled);\n }\n } else if (sms.isMWIClearMessage()) {\n mPhone.updateMessageWaitingIndicator(false);\n\n if (sms.isMwiDontStore()) {\n handled = true;\n }\n\n if (Config.LOGD) {\n Log.d(TAG,\n \"Received voice mail indicator clear SMS shouldStore=\"\n + !handled);\n }\n }\n\n if (handled) {\n return;\n }\n\n // Parse the headers to see if this is partial, or port addressed\n int referenceNumber = -1;\n int count = 0;\n int sequence = 0;\n int destPort = -1;\n\n SmsHeader header = sms.getUserDataHeader();\n if (header != null) {\n for (SmsHeader.Element element : header.getElements()) {\n switch (element.getID()) {\n case SmsHeader.CONCATENATED_8_BIT_REFERENCE: {\n byte[] data = element.getData();\n\n referenceNumber = data[0] & 0xff;\n count = data[1] & 0xff;\n sequence = data[2] & 0xff;\n\n break;\n }\n\n case SmsHeader.CONCATENATED_16_BIT_REFERENCE: {\n byte[] data = element.getData();\n\n referenceNumber = (data[0] & 0xff) * 256 + (data[1] & 0xff);\n count = data[2] & 0xff;\n sequence = data[3] & 0xff;\n\n break;\n }\n\n case SmsHeader.APPLICATION_PORT_ADDRESSING_16_BIT: {\n byte[] data = element.getData();\n\n destPort = (data[0] & 0xff) << 8;\n destPort |= (data[1] & 0xff);\n\n break;\n }\n }\n }\n }\n\n if (referenceNumber == -1) {\n // notify everyone of the message if it isn't partial\n byte[][] pdus = new byte[1][];\n pdus[0] = sms.getPdu();\n\n if (destPort != -1) {\n if (destPort == SmsHeader.PORT_WAP_PUSH) {\n dispatchWapPdu(sms.getUserData());\n }\n // The message was sent to a port, so concoct a URI for it\n dispatchPortAddressedPdus(pdus, destPort);\n } else {\n // It's a normal message, dispatch it\n dispatchPdus(pdus);\n }\n } else {\n // Process the message part\n processMessagePart(sms, referenceNumber, sequence, count, destPort);\n }\n }",
"private synchronized void processWpsNeeded(int nRequestType, int nTbfMs)\n {\n /* look at the type of WPS request and start/stop the Wifi fix session*/\n if (Config.LOGD)\n {\n Log.d(TAG,\"WPS NEEDED request type: \"+nRequestType+\" tbf: \"+nTbfMs);\n }\n Message wpsMsg = Message.obtain(mHandler, nRequestType);\n wpsMsg.arg1 = nTbfMs;\n mHandler.sendMessage(wpsMsg);\n }",
"public String submitManRequest() {\r\n if (selectedRequest != null) {\r\n String formResponse;\r\n switch(reqStatus) {\r\n case PENDING:\r\n break;\r\n case REJECTED:\r\n formResponse = changeRequestStatus();\r\n break;\r\n case CONFIRMED:\r\n formResponse = changeRequestStatus();\r\n makePayment();\r\n break;\r\n default:\r\n break;\r\n }\r\n return \"home\"; \r\n } else {\r\n return null;\r\n }\r\n }",
"public static String _jobdone(anywheresoftware.b4a.samples.httputils2.httpjob _res) throws Exception{\nif (_res._success==anywheresoftware.b4a.keywords.Common.True) { \n //BA.debugLineNum = 209;BA.debugLine=\"Select res.JobName\";\nswitch (BA.switchObjectToInt(_res._jobname,\"sms_send\",\"send_push\")) {\ncase 0: {\n //BA.debugLineNum = 211;BA.debugLine=\"progress_spot.DisMissDialog\";\nmostCurrent._progress_spot.DisMissDialog();\n break; }\ncase 1: {\n //BA.debugLineNum = 214;BA.debugLine=\"progress_spot.DisMissDialog\";\nmostCurrent._progress_spot.DisMissDialog();\n break; }\n}\n;\n };\n //BA.debugLineNum = 217;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"private void submitRequest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tchangeControlState(false);\n\t\t\tlblStatus.setText(\"Sending Request...\");\n\t\t\tnew Thread(new Runnable()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tMPSWebRequest mpswr = new MPSWebRequest(mWSURL);\n\t\t\t\t\t\tmpswr.addParameter(\"tran\", taDSIXML.getText()); //Set WebServices 'tran' parameter to the XML transaction request\n\t\t\t\t\t\tmpswr.addParameter(\"pw\", \"XYZ\"); //Set merchant's WebServices password\n\t\t\t\t\t\tmpswr.setWebMethodName((String)cmbWebMethod.getSelectedItem()); //Set WebServices webmethod to selected type\n\t\t\t\t\t\tmpswr.setTimeout(10); //Set request timeout to 10 seconds\n\t\t\t\t\t\t\n\t\t\t\t\t\tString mpsResponse = mpswr.sendRequest();\n\t\t\t\t\t\tlblStatus.setText(\"\");\n\t\t\t\t\t\tshowPopup(\"Response XML String\",mpsResponse.replace(\">\\t\", \">\\n\\t\"));\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\tshowPopup(\"Exception\", e.toString());\n\t\t\t\t\t}\n\t\t\t\t\tfinally\n\t\t\t\t\t{\n\t\t\t\t\t\tlblStatus.setText(\"\");\n\t\t\t\t\t\tchangeControlState(true);\n\t\t\t\t\t\t@SuppressWarnings(\"unused\") // Properly disposing of current thread\n\t\t\t\t\t\tThread curthread = Thread.currentThread();\n\t\t\t\t\t\tcurthread = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).start();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tshowPopup(\"Exception\", e.toString());\n\t\t}\n\t}",
"public void recordSubmitWaiting(OrderManagementContext orderManagementContext_);",
"public void submit() {\n\t\tRESOURCE_SYNC_QUEUE.dispatchBarrierSync( new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\t_isCanceled = false;\n\t\t\t\tPENDING_CHANNELS.clear();\n\t\t\t\tPENDING_CHANNELS.addAll( CHANNELS );\n\t\t\t\tDISCONNECTED_CHANNELS.addAll( CHANNELS );\t// assume all channels disconnected until notified otherwise\n\t\t\t\tCONNECTED_CHANNELS.clear();\n\t\t\t}\n\t\t});\n\t\t\n\t\ttry {\n\t\t\tfor ( final Channel channel : CHANNELS ) {\n\t\t\t\tprocessRequest( channel );\n\t\t\t}\n\t\t\tChannel.flushIO();\n\t\t}\n\t\tcatch( Exception exception ) {\n\t\t\tthrow new RuntimeException( \"Exception while submitting a batch Get request.\", exception );\n\t\t}\n\t}",
"private void SMSNotification(Map<String, Object> params) {\n\n try {\n String mobileNo = (String) params.get(\"mobileNo\");\n Integer contractId = (Integer) params.get(\"contractId\");\n String smsMsg = (String) params.get(\"smsMsg\");\n\n Properties prop = new Properties();\n prop.load(getClass().getClassLoader().getResourceAsStream(\n \"config/fmp.properties\"));\n\n String smsClassPath = prop.getProperty(\"smsClassPath\");\n SendSMS obj = (SendSMS) Class.forName(smsClassPath).newInstance();\n\n Method m = obj.getClass().getDeclaredMethod(\"send\", String.class,\n String.class, Properties.class);\n String messageId = (String) m.invoke(obj, mobileNo, smsMsg, prop);\n\n if (!\"\".equals(messageId)) {\n contractDao.updateSmsNumber(contractId, messageId);\n }\n } catch (Exception e) {\n log.warn(e, e);\n }\n }",
"synchronized public void processWaitingRequests(boolean processCertifiedMessagesAsWell) {\n if (processCertifiedMessagesAsWell) {\n CertifiedMessageManager cmmgr = CertifiedMessageManager.getSingleton();\n cmmgr.resumeConnectionPoolMessages(getName());\n }\n while (isStarted() && waitingQueue.size()>0 && super.getNumActive()<getPoolSize()) {\n WaitingConnectionRequest req = waitingQueue.remove(0);\n try {\n PooledAdapterConnection conn = this.getConnection(\"reserved-for-\" + req.activityInstId, req.activityInstId);\n boolean processed = processWaitingRequest(req, conn);\n if (!processed) {\n super.returnObject(req.connection);\n }\n } catch (Exception e) {\n StandardLogger logger = LoggerUtil.getStandardLogger();\n logger.severeException(\"Failed to process waiting request \" + req.assignee, e);\n }\n }\n }",
"public void submit() {\r\n String scNo_IDregex = \"^[sS][0-9]{6}$\";\r\n String decNo_IDregex = \"^[dD][0-9]{6}$\";\r\n\r\n boolean scCheck = false;\r\n boolean dcCheck = false;\r\n boolean addCheck = false;\r\n boolean subsPkgCheck = false;\r\n\r\n if (scInput.getText().length() == 0) {\r\n scEmptyWarn.setVisible(true);\r\n scExample.setVisible(false);\r\n scFormatWarn.setVisible(false);\r\n scSameWarn.setVisible(false);\r\n } else if (!scInput.getText().matches(scNo_IDregex)) {\r\n scFormatWarn.setVisible(true);\r\n scExample.setVisible(false);\r\n scEmptyWarn.setVisible(false);\r\n scSameWarn.setVisible(false);\r\n } else if (scInput.getText().matches(scNo_IDregex)) {\r\n for (int j = 0; j < App.servList.size(); j++) {\r\n if (scInput.getText().equalsIgnoreCase(App.servList.get(j).getSmartCardNo())) {\r\n scSameWarn.setVisible(true);\r\n scExample.setVisible(false);\r\n scFormatWarn.setVisible(false);\r\n scEmptyWarn.setVisible(false);\r\n scCheck = false;\r\n break;\r\n }\r\n scExample.setVisible(true);\r\n scEmptyWarn.setVisible(false);\r\n scFormatWarn.setVisible(false);\r\n scSameWarn.setVisible(false);\r\n scCheck = true;\r\n }\r\n }\r\n\r\n if (dcInput.getText().length() == 0) {\r\n dcEmptyWarn.setVisible(true);\r\n dcExample.setVisible(false);\r\n dcSameWarn.setVisible(false);\r\n dcFormatWarn.setVisible(false);\r\n } else if (!dcInput.getText().matches(decNo_IDregex)) {\r\n dcFormatWarn.setVisible(true);\r\n dcEmptyWarn.setVisible(false);\r\n dcSameWarn.setVisible(false);\r\n dcExample.setVisible(false);\r\n } else if (dcInput.getText().matches(decNo_IDregex)) {\r\n for (int j = 0; j < App.servList.size(); j++) {\r\n if (dcInput.getText().equalsIgnoreCase(App.servList.get(j).getDecodeNo())) {\r\n dcExample.setVisible(false);\r\n dcEmptyWarn.setVisible(false);\r\n dcFormatWarn.setVisible(false);\r\n dcSameWarn.setVisible(true);\r\n dcCheck = false;\r\n break;\r\n }\r\n dcExample.setVisible(true);\r\n dcEmptyWarn.setVisible(false);\r\n dcFormatWarn.setVisible(false);\r\n dcSameWarn.setVisible(false);\r\n dcCheck = true;\r\n }\r\n }\r\n\r\n if (addInput.getText().length() == 0) {\r\n addWarn.setVisible(true);\r\n } else if (addInput.getText().length() >= 1) {\r\n addWarn.setVisible(false);\r\n addCheck = true;\r\n }\r\n try {\r\n if (rightElArr.length == 0) {\r\n subsPkgWarn.setVisible(true);\r\n } else if (rightElArr.length >= 1) {\r\n subsPkgWarn.setVisible(false);\r\n subsPkgCheck = true;\r\n }\r\n } catch (NullPointerException npe) {\r\n\r\n subsPkgCheck = false;\r\n subsPkgWarn.setVisible(true);\r\n }\r\n if (scCheck && dcCheck && addCheck && subsPkgCheck) {\r\n updateList();\r\n updateSubsList();\r\n JOptionPane.showMessageDialog(null, \"You have successfully create a new service \" + scInput.getText().toUpperCase(), \"New Service Created\", JOptionPane.INFORMATION_MESSAGE);\r\n dispose();\r\n }\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a value to property additionalType. | Builder addAdditionalType(String value); | [
"@ApiModelProperty(value = \"Generic field containing additional information relevant to the featureType specified. Whether mandatory or not is dependent on the value of featureType\")\n\n\n public String getAdditionalValue() {\n return additionalValue;\n }",
"Builder addAdditionalType(URL value);",
"AdditionalValuesType getAdditionalValues();",
"public PropertyValue getAdditionalProperty() throws ClassCastException;",
"@JsonAnySetter\n\tpublic void setAdditionalProperty(String name, Object value) {\n\t\tthis.additionalProperties.put(name, value);\n\t}",
"@JsonAnySetter\n public void setAdditionalProperty(String name, Object value) {\n this.additionalProperties.put(name, value);\n }",
"public RawProperty addExtendedProperty(String name, String value, VCardDataType dataType) {\n\t\tRawProperty raw = new RawProperty(name, value, dataType);\n\t\taddProperty(raw);\n\t\treturn raw;\n\t}",
"public void add(String property, Object value) {\n\t\tvalues.add(new UserValue(property, value));\n\t}",
"@JsonAnySetter\n public void setAdditionalProperty(String name, Object value)\n {\n additionalProperties.put(name, value);\n }",
"void add(VisualPropertyType calcType, Object value);",
"public void addValue() {\n addValue(1);\n }",
"public void addGenericArgumentValue(Object value, Class<?> type) {\n genericArgumentValues.add(new ValueHolder(value, type));\n }",
"public void test_addTypedValue_accuracy() {\n instance.addTypedValue(typedValue);\n assertTrue(\"The TypedValue is not added properly.\", instance.containsTypedValue(typedValue));\n }",
"void add(Usage.Value value);",
"DefinedProperty relAddProperty( long relId, int propertyKey, Object value );",
"DefinedProperty nodeAddProperty( long nodeId, int propertyKey, Object value );",
"public void addValue(Object value)\n {\n valueList = (Object[]) ArrayList.add(valueList, value);\n valueSet = true;\n }",
"UMLTaggedValue addTaggedValue(String name, String value);",
"public OtmProperty<?> add(TLModelElement newTL);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads the specified CQL file from the classpath into the database. | public void loadClasspathCypherScriptFile(String cqlFileName) {
StringBuilder cypher = new StringBuilder();
try (Scanner scanner = new Scanner(Thread.currentThread().getContextClassLoader().getResourceAsStream(cqlFileName))) {
scanner.useDelimiter(System.getProperty("line.separator"));
while (scanner.hasNext()) {
cypher.append(scanner.next()).append(' ');
}
}
new ExecutionEngine(this.database).execute(cypher.toString());
} | [
"private void loadSqlFile(String fileName) throws Exception {\n\t\tStatement statement = null;\n\t\ttry {\n\t\t\tstatement = connection.createStatement();\n\t\t\t// execute each statement on its own\n\t\t\tList<String> commands = getFileContents(fileName);\n\t\t\tfor (String cmd : commands)\n\t\t\t\tstatement.executeUpdate(cmd);\n\n\t\t} finally {\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\t\t}\n\t}",
"public void loadScript() throws IOException, SQLException {\r\n\t\t\tString line;\r\n\t\t\tStringBuffer query = new StringBuffer();\r\n\t\t\tboolean queryEnds = false;\r\n\r\n\t\t\twhile ((line = rdr.readLine()) != null) {\r\n\t\t\t\tif (isComment(line))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tqueryEnds = checkStatementEnds(line);\r\n\t\t\t\tquery.append(line);\r\n\t\t\t\tif (queryEnds) {\r\n\t\t\t\t\tstatement.addBatch(query.toString());\r\n\t\t\t\t\tquery.setLength(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"public void loadDatabaseFromFile(String file) {\n try {\n InputStream input = getClass().getResourceAsStream(file);\n String json = FileToString.readFile(input);\n LongSpell[] spells = JSONFilter.toObjectFromJson(json, LongSpell[].class);\n for (LongSpell s : spells) {\n Spell newSpell = longSpelltoSpell(s);\n if (!spellDao.existsById(newSpell.getName())) {\n spellDao.create(newSpell);\n }\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Problem initalizing database\");\n }\n }",
"private String loadQuery(String f) throws Exception {\n\t\tString str = \"\";\n\t\torg.springframework.core.io.Resource fileResource =resourceLoader.getResource(\"classpath:\" + f);\n\t\tInputStream in = getClass().getResourceAsStream(f);\n\t\tBufferedReader bL = new BufferedReader(new InputStreamReader(in));\n\t\twhile (bL.ready()) {\n\t\t\tString rd = bL.readLine();\n\t\t\tstr += rd + \"\\n\";\n\t\t}\n\t\tbL.close();\n\t\treturn str;\n\t}",
"public ZQL(File file) throws ZException, IOException{\n\t\tload(file);\n\t}",
"public static void executeFromFile(String filename) throws Exception {\n Scanner sc = new Scanner(new File(filename));\n Database database = new Database();\n while(sc.hasNextLine()) {\n String line = sc.nextLine();\n database.handleQuery(line);\n }\n// database.dump();\n }",
"public void loadFile(InputStream fileContent) throws IOException, DBException {\n\t\tstrategy.loadFile(fileContent, factory, loggingAction, loggedInMID);\n\t}",
"private void load_db(String path){\n try {\n ClassLoader classLoader = ClassLoader.getSystemClassLoader();\n File db_file = new File(classLoader.getResource(path).getFile());\n FileReader filereader = new FileReader(db_file);\n CSVReader csvReader = new CSVReaderBuilder(filereader).withSkipLines(1).build();\n List<String[]> db_as_string = csvReader.readAll();\n for (String[] record: db_as_string) {\n db.add(Arrays.stream(record).mapToInt(Integer::parseInt).toArray());\n }\n alice_record_len = db.get(0).length;\n }\n catch(Exception e){\n System.out.println(e.getMessage());\n }\n }",
"public void rawSqlStatement(File file) {\n try {\n String query = new String(Files.readAllBytes(file.toPath()),UTF_8);\n rawSqlStatement(query);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void insertQuery(String filename) throws InitDBFileNotFoundException, InitDBIOException, InitDBSQLException {\n String file = \"input/\" + filename;\n try (BufferedReader in = new BufferedReader(new FileReader(file))){\n String db = in.readLine();\n String[] col = in.readLine().split(\"/\");\n for(int i = 0; i < 4; i++)\n in.readLine();\n\n String sql;\n\n String s;\n while((s = in.readLine()) != null){\n sql = \"INSERT INTO `\" + db + \"` ( \";\n for(int i = 0; i < col.length; i++){\n if(i == col.length -1){\n sql += \"`\" + col[i] + \"`\";\n } else {\n sql += \"`\" + col[i] + \"`, \";\n }\n }\n sql += \") VALUES ( \";\n\n String[] var = s.split(\"/\");\n\n for(int i = 0; i < var.length; i++){\n if(i == col.length -1){\n sql += \"? \";\n } else {\n sql += \"?, \";\n }\n }\n sql += \")\";\n\n executeInsert(sql, var);\n }\n } catch (FileNotFoundException e) {\n throw new InitDBFileNotFoundException(\"Unable locate \" + filename + \".\");\n } catch (IOException e){\n throw new InitDBIOException(\"Unable to read file. Make sure its formatted correctly.\");\n }\n }",
"@Cacheable(value = \"cypherQueriesCache\", key = \"#name\", unless = \"#result != null\")\n private String loadCypher(String name) {\n\n try {\n logger.debug(\"Cypher query with name {} not found in cache, try loading it from file.\", name);\n\n ResourcePatternResolver resolver = ResourcePatternUtils.getResourcePatternResolver(this.resourceLoader);\n Resource[] queryFiles = resolver.getResources(\"classpath*:queries/*.cql\");\n\n for (Resource queryFile : queryFiles) {\n\n if (queryFile.getFilename().endsWith(name + QUERY_FILE_SUFFIX)) {\n\n logger.debug(\"Found query file with name {} in classpath.\", queryFile.getFilename());\n\n InputStream inputStream = queryFile.getInputStream();\n String cypher = StreamUtils.copyToString(inputStream, Charset.defaultCharset());\n\n return cypher;\n }\n }\n\n logger.warn(\"Query file with name {} not found in classpath.\", name + QUERY_FILE_SUFFIX);\n\n return null;\n } catch (IOException e) {\n throw new IllegalStateException(\"Invalid query file path.\", e);\n }\n }",
"private void createQuery(String fileName) throws InitDBFileNotFoundException, InitDBIOException, InitDBSQLException {\n String file = \"input/\" + fileName;\n try (BufferedReader in = new BufferedReader(new FileReader(file))){\n String table = in.readLine();\n String[] col = in.readLine().split(\"/\");\n String[] dataType = in.readLine().split(\"/\");\n String[] dataSize = in.readLine().split(\"/\");\n String PK = in.readLine();\n in.readLine();\n\n String sql;\n\n sql = \"CREATE TABLE `\" + table + \"` ( \";\n for(int i = 0; i < col.length; i++){\n sql += \"`\" + col[i] + \"` \" + dataType[i] + \"(\" + dataSize[i] + \") NOT NULL,\";\n }\n sql += \" PRIMARY KEY (`\" + PK + \"`))\";\n\n executeCreate(sql);\n\n } catch (FileNotFoundException e){\n throw new InitDBFileNotFoundException(\"Unable locate \" + fileName + \".\");\n } catch (IOException e){\n throw new InitDBIOException(\"Unable to read file. Make sure its formatted correctly.\");\n }\n }",
"private final void executeSqlFile(String filename) throws Exception {\r\n FileReader file = null;\r\n StringBuffer content = new StringBuffer();\r\n try {\r\n file = new FileReader(filename);\r\n char[] buffer = new char[1024];\r\n int retLength = 0;\r\n\r\n while ((retLength = file.read(buffer)) >= 0) {\r\n content.append(buffer, 0, retLength);\r\n }\r\n } finally {\r\n if (file != null) {\r\n file.close();\r\n }\r\n }\r\n\r\n // get the connection\r\n Connection connection = null;\r\n Statement statement = null;\r\n try {\r\n connection = getConnection();\r\n statement = connection.createStatement();\r\n // Executes the SQL in the file\r\n statement.executeUpdate(content.toString());\r\n } finally {\r\n doClose(connection, statement, null);\r\n }\r\n }",
"public static void Import() throws SQLException, FileNotFoundException\n\t{\n\t\tFile f = new File(inLocation);\n\t\tScanner scan = new Scanner(new FileReader(f));\n\t\twhile (scan.hasNext())\n\t\t{\n\t\t\tstmt.execute(scan.nextLine());\n\t\t}\n\t\tscan.close();\n\t\t// stmt.execute(\"INSERT INTO `table_1530416012` VALUES\n\t\t// (1,'12345','370211198106134438','张三',2,'2017-08-03');\");\n\t}",
"public void importFromFileDirectoryInSQLDatabase(){\n throw new RuntimeException(\"Not implemented yet...\");\n\t}",
"private void executeSQL(String file) throws Exception {\n // get db connection\n Connection connection = new DBConnectionFactoryImpl(\"com.topcoder.db.connectionfactory.\"\n + \"DBConnectionFactoryImpl\").createConnection();\n Statement statement = connection.createStatement();\n\n // get sql statements and add to statement\n BufferedReader in = new BufferedReader(new FileReader(file));\n String line = null;\n\n while ((line = in.readLine()) != null) {\n if (line.trim().length() != 0) {\n statement.addBatch(line);\n }\n }\n statement.executeBatch();\n }",
"boolean loadSQL();",
"public void importFromFileDirectoryInCassandraDatabase(){\n \tthrow new RuntimeException(\"Not implemented yet...\");\n\t}",
"private static List<Statement> loadFile(File file) throws IOException,\n ExecutionFacade.OperationFailed {\n try (InputStream input = new FileInputStream(file)) {\n return loadStream(input);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Obtiene la lista de Modelos | public ArrayList<Modelo> getListaModelos() {
recuperarLista();
return lista;
} | [
"public List<Modelo> obtenModelos() {\r\n try {\r\n IntAdmInventario adm = new FacAdmInventario();\r\n\r\n return adm.obtenListaModelos();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return null;\r\n }",
"public static ObservableList getModelList(){\n\n\t\tObservableList<String> models = FXCollections.observableArrayList();\n\t\tURL modelsURL = NN.class.getResource(\"../resources/models\");\n\t\tif(modelsURL != null) {\n\t\t\tFile modelDirectory = new File(modelsURL.toString().substring(5));\n\n\t\t\tif (modelDirectory != null && modelDirectory.isDirectory()) {\n\t\t\t\tSystem.out.println(Arrays.toString(modelDirectory.list()));\n\t\t\t\tfor (String filepath: modelDirectory.list()) {\n\t\t\t\t\tif(filepath.endsWith(\".txt\")){\n\t\t\t\t\t\tmodels.add(filepath.replace(\".txt\", \"\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn models;\n\t}",
"private static String[] getModelNames() {\n\t\treturn getConfiguration().getString(MODELS).split(\"\\\\|\");\n\t}",
"Collection<ModelDescriptor> listModels();",
"@Override\n public List<ModeloCuestionario> findAll() {\n List<ModeloCuestionario> listadoModelos = (List<ModeloCuestionario>) modeloCuestionarioRepository.findAll();\n Collections.sort(listadoModelos, (o1, o2) -> o1.getDescripcion().compareTo(o2.getDescripcion()));\n \n return listadoModelos;\n \n }",
"public abstract List<MODE> getModes();",
"public Modelo()\n\t{\n\t\tlista = new ListaEncadenada<ComparendoDatos>();\n\t}",
"void retrieveListModes();",
"public List<ModelClass> getAllModels() throws StorageIOException {\n try {\n Dao<ModelDB, String> modelDao = this.databaseHelper.getDao(ModelDB.class);\n QueryBuilder<ModelDB, String> queryBuilder = modelDao.queryBuilder();\n \n queryBuilder.orderBy(\"name\", true);\n \n List<ModelDB> entities = modelDao.query(queryBuilder.prepare());\n List<ModelClass> models = new ArrayList<ModelClass>(entities.size());\n \n for (ModelDB e : entities) {\n models.add(dbToClass(e));\n }\n\n return models;\n \n } catch (SQLException e) {\n throw new StorageIOException(\"Failed to get models\", e);\n }\n }",
"@Override\n @Transactional(readOnly = true)\n public List<ModeDTO> findAll() {\n log.debug(\"Request to get all Modes\");\n return modeRepository.findAll().stream()\n .map(modeMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }",
"public List<SistemaFazendaModel> listaTudo(){\n\t\treturn this.session.createCriteria(SistemaFazendaModel.class).list();\n\t}",
"listOfModels createlistOfModels();",
"public List<Modelo> getAll() {\n Session s = null;\n boolean wasRollback = false;\n try {\n\n s = beginTransaction();\n //verificamos si existe el usuario dado\n List<Modelo> modelos = s.createNamedQuery(\"Modelo.getAll\")\n .getResultList();\n\n return modelos;\n } catch (Throwable t) {\n wasRollback = true;\n } finally {\n try {\n endTransaction(s, wasRollback);\n } catch (Throwable t) {\n\n }\n }\n return null;\n }",
"java.util.List<com.google.devtools.testing.v1.AndroidModel> \n getModelsList();",
"public CadastrarMarcasModelos() {\n initComponents();\n }",
"@GuardedBy(\"mLock\") // Do not call outside this lock.\n private List<ModelFile> listAllModelsLocked() {\n if (mAllModelFiles == null) {\n final List<ModelFile> allModels = new ArrayList<>();\n // The update model has the highest precedence.\n if (new File(UPDATED_MODEL_FILE_PATH).exists()) {\n final ModelFile updatedModel = ModelFile.fromPath(UPDATED_MODEL_FILE_PATH);\n if (updatedModel != null) {\n allModels.add(updatedModel);\n }\n }\n // Factory models should never have overlapping locales, so the order doesn't matter.\n final File modelsDir = new File(MODEL_DIR);\n if (modelsDir.exists() && modelsDir.isDirectory()) {\n final File[] modelFiles = modelsDir.listFiles();\n final Pattern modelFilenamePattern = Pattern.compile(MODEL_FILE_REGEX);\n for (File modelFile : modelFiles) {\n final Matcher matcher = modelFilenamePattern.matcher(modelFile.getName());\n if (matcher.matches() && modelFile.isFile()) {\n final ModelFile model = ModelFile.fromPath(modelFile.getAbsolutePath());\n if (model != null) {\n allModels.add(model);\n }\n }\n }\n }\n mAllModelFiles = allModels;\n }\n return mAllModelFiles;\n }",
"public List<String> getListOfAircraftModels() {\n \n List<AircraftModel> list = project.getAircraftModelList().getModelList();\n LinkedList<String> modelListInString = new LinkedList<>();\n for (AircraftModel model : list) {\n modelListInString.add(model.getId());\n }\n\n return modelListInString;\n }",
"private void cargarListaDisponibles() {\n\t\tArrayList<Multimedia> objetos;\n\t\ttry {\n\t\t\tobjetos = BD.obtenerObjetos();\n\t\t\tfor(Multimedia ob: objetos)\n\t\t\t\tmodeloDisponibles.addElement(ob);\n\t\t\tlistaDisponibles.setModel(modeloDisponibles);\n\t\t} catch (BDException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"private final void inicializarListas() {\r\n\t\t//Cargo la Lista de orden menos uno\r\n\t\tIterator<Character> it = Constantes.LISTA_CHARSET_LATIN.iterator();\r\n\t\tCharacter letra;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tletra = it.next();\r\n\t\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(letra);\r\n\t\t}\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(Constantes.EOF);\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.actualizarProbabilidades();\r\n\t\t\r\n\t\t//Cargo las listas de ordenes desde 0 al orden definido en la configuración\r\n\t\tOrden ordenContexto;\r\n\t\tfor (int i = 0; i <= this.orden; i++) {\r\n\t\t\tordenContexto = new Orden();\r\n\t\t\tthis.listaOrdenes.add(ordenContexto);\r\n\t\t}\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Spring Data Elasticsearch repository for the DroitaccesDocument entity. | public interface DroitaccesDocumentSearchRepository extends ElasticsearchRepository<DroitaccesDocument, Long> {
} | [
"public interface DocumentoSearchRepository extends ElasticsearchRepository<Documento, Long> {\n}",
"public interface RecomendacionSearchRepository extends ElasticsearchRepository<Recomendacion, Long> {\n}",
"public interface RelatedDocumentSearchRepository extends ElasticsearchRepository<RelatedDocument, Long> {\n}",
"public interface ClotureSearchRepository extends ElasticsearchRepository<Cloture, Long> {\n}",
"public interface EvDiagramSearchRepository extends ElasticsearchRepository<EvDiagram, Long> {\n}",
"public interface ArtefactSearchRepository extends ElasticsearchRepository<Artefact, Long> {\n}",
"public interface DevisSearchRepository extends ElasticsearchRepository<Devis, Long> {\n}",
"public interface RedactionSearchRepository extends ElasticsearchRepository<Redaction, Long> {\n}",
"public interface RecetteJournaliereSearchRepository extends ElasticsearchRepository<RecetteJournaliere, Long> {\n}",
"public interface SaldoAppSearchRepository extends ElasticsearchRepository<SaldoApp, Long> {\n}",
"public interface DatlabSearchRepository extends ElasticsearchRepository<Datlab, Long> {\n}",
"public interface ContratoSearchRepository extends ElasticsearchRepository<Contrato, Long> {\n}",
"public interface EscolaridadeSearchRepository extends ElasticsearchRepository<Escolaridade, Long> {\n}",
"public interface CausalDescriptionSearchRepository extends ElasticsearchRepository<CausalDescription, Long> {\n}",
"public interface DepositSearchRepository extends ElasticsearchRepository<Deposit, Long> {\n}",
"public interface OrderConsigneeSearchRepository extends ElasticsearchRepository<OrderConsignee, Long> {\n}",
"public interface GroupeSearchRepository extends ElasticsearchRepository<Groupe, Long> {\n}",
"public interface LawenforceDepartmentSearchRepository extends ElasticsearchRepository<LawenforceDepartment, Long> {\n}",
"public interface DoctorSearchRepository extends ElasticsearchRepository<Doctor, Long> {\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates a template schedule that just looks for options for generation | protected void generateTemplateSchedule(Long companyId, Long userId, SchedulingOptions opt) {
log.trace("Generating schedule for company [id=" + companyId + "]");
this.opt = opt;
List<User> allUsers = getAllUsers(userId);
List<Task> allTasks = getAllTasks(companyId);
for (Task task : allTasks) {
log.debug("Generation - Assigning task: " + task.getTitle());
if(task == null) {
continue;
}
for (User user : allUsers) {
if(user == null) {
continue;
}
if (task.getStatus() == TaskStatus.Assigned) {
log.debug("Generation - Task Already Assigned " + task.getTitle());
break;
}
log.debug("Generation - Checking employee: " + user.getUserID());
if(assignTask(task, user)) {
break;
}
}
if(opt.getRandom()) {
log.debug("Employees shuffled");
Collections.shuffle(allUsers, new Random(rand.nextLong()));
}
}
} | [
"private void scheduleTargetFileGeneration() {\n //Calculate today's fire time\n DateTimeFormatter fmt = DateTimeFormat.forPattern(\"H:m\");\n String timeProp = settingsFacade.getProperty(TARGET_FILE_TIME);\n DateTime time = fmt.parseDateTime(timeProp);\n DateTime today = DateTime.now() // This means today's date...\n .withHourOfDay(time.getHourOfDay()) // ...at the hour...\n .withMinuteOfHour(time.getMinuteOfHour()) // ...and minute specified in imi.properties\n .withSecondOfMinute(0)\n .withMillisOfSecond(0);\n\n //Second interval between events\n String intervalProp = settingsFacade.getProperty(TARGET_FILE_SEC_INTERVAL);\n Integer secInterval = Integer.parseInt(intervalProp);\n\n if (secInterval < 1) {\n LOGGER.warn(\"{} is set to less than 1 second, no repeating schedule will be set to automatically generate \" +\n \"target files!\", TARGET_FILE_SEC_INTERVAL);\n return;\n }\n\n LOGGER.debug(String.format(\"The %s message will be sent every %ss starting %s\", GENERATE_TARGET_FILE_EVENT,\n secInterval.toString(), today.toString()));\n\n //Schedule repeating job\n MotechEvent event = new MotechEvent(GENERATE_TARGET_FILE_EVENT);\n RepeatingSchedulableJob job = new RepeatingSchedulableJob(event, //MOTECH event\n null, //repeatCount, null means infinity\n secInterval, //repeatIntervalInSeconds\n today.toDate(), //startTime\n null, //endTime, null means no end time\n true); //ignorePastFiresAtStart\n\n schedulerService.safeScheduleRepeatingJob(job);\n }",
"public void generateTimes() {\n\n\t\tLocalTime currentTime = PropertiesConfig.getMorningSessionBegin();\n\t\tfor (Talk talk : morningSession.getTalks()) {\n\t\t\ttalk.setTime(currentTime);\n\t\t\tcurrentTime = currentTime.plusMinutes(talk.getLength());\n\t\t}\n\n\t\tTalk lunch = new Talk(PropertiesConfig.LUNCH_TITLE);\n\t\tlunch.setTime(PropertiesConfig.getLunchBegin());\n\t\tlunchSession.addTalk(lunch);\n\n\t\tcurrentTime = PropertiesConfig.getAfternoonSessionBegin();\n\t\tfor (Talk talk : afternoonSession.getTalks()) {\n\t\t\ttalk.setTime(currentTime);\n\t\t\tcurrentTime = currentTime.plusMinutes(talk.getLength());\n\t\t}\n\n\t\tTalk meetEvent = new Talk(PropertiesConfig.MEET_EVENT_TITLE);\n\t\tmeetEvent.setTime(currentTime);\n\t\tmeetSession.addTalk(meetEvent);\n\t}",
"Schedule createSchedule();",
"public void generateValidTimes()\r\r\n {\r\r\n this.beginTime = Calendar.getInstance();\r\r\n this.beginTime.add(Calendar.DATE, -1);\r\r\n this.endTime = Calendar.getInstance();\r\r\n }",
"public Set<SemesterConfiguration> generateTimetables(Set<CourseSelection> courseSelections);",
"public ArrayList<Day> generateSchedule(char scheduleType) {\n getEmployees(scheduleType);\n\n //for every day of the week starting with monday (runs 7 times)\n boolean retryWeek = true;\n ArrayList<Day> schedule = new ArrayList<>();\n\n int iteration = 0;\n while(retryWeek && iteration < 200) {\n\n schedule = new ArrayList<>();\n LocalDateTime nextMonday = getNextMonday();\n for (String day : days) {\n\n boolean redoDay = true;\n int dayCount = 0;\n boolean noPref = false;\n\n\n\n //gets all the employees availability for a given day\n //gets the day and makes a day object with the opening and closing time\n DayTemplate template = getDayTemplate(day, scheduleType);\n Day today = new Day();\n\n\n String[] split = template.getOpenTime().split(\":\");\n\n\n int hour = Integer.parseInt(split[0]);\n int minute = Integer.parseInt(split[1]);\n today.setStartTime(nextMonday.withHour(hour).withMinute(minute));\n today.setDayId(0);\n split = template.getCloseTime().split(\":\");\n hour = Integer.parseInt(split[0]);\n minute = Integer.parseInt(split[1]);\n\n\n today.setEndTime(nextMonday.withHour(hour).withMinute(minute));\n\n //gets the shift templates from the day\n ArrayList<ShiftTemplate> shiftList = new ArrayList<>(template.getShiftTemplateList());\n\n while (redoDay && dayCount < 50) {\n\n today.getShiftList().clear();\n sortEmployees(day);\n retryWeek = false;\n redoDay = false;\n\n //randomizes the employees\n randomizeList();\n\n //for every shift that needs to be filled (runs around 3-5 times/day)\n for (ShiftTemplate shiftTemplate : shiftList) {\n\n //holds employees who can work but dont prefer to\n ArrayList<Employee> secondary = new ArrayList<>();\n ArrayList<Employee> scheduled = new ArrayList<>();\n\n String[] tsplit = shiftTemplate.getStartTime().split(\":\");\n\n int shiftHour = Integer.parseInt(tsplit[0]);\n int shiftMin = Integer.parseInt(tsplit[1]);\n LocalDateTime shiftStartTime = nextMonday.withHour(shiftHour).withMinute(shiftMin);\n\n tsplit = shiftTemplate.getEndTime().split(\":\");\n shiftHour = Integer.parseInt(tsplit[0]);\n shiftMin = Integer.parseInt(tsplit[1]);\n LocalDateTime shiftEndTime = nextMonday.withHour(shiftHour).withMinute(shiftMin);\n Date dStartTime = Date.from(shiftStartTime.atZone(ZoneId.systemDefault()).toInstant());\n Date dEndTime = Date.from(shiftEndTime.atZone(ZoneId.systemDefault()).toInstant());\n Shift shift = new Shift(0,dStartTime,dEndTime, scheduleType, shiftTemplate.getMinNoEmp(), shiftTemplate.getMaxNoEmp());\n shift.setDayId(today);\n\n\n\n //creates a shift to be filled\n\n //for every employee in the available list of employees\n for (int j = 0; j < availList.size(); j++) {\n\n\n boolean availShift = true;\n boolean prefShift = true;\n\n //gives the hour of the day as an int in 24 hour format eg. 11 for 11am\n\n int startHour = Integer.parseInt(shiftTemplate.getStartTime().split(\":\")[0]);\n int endHour = Integer.parseInt(shiftTemplate.getEndTime().split(\":\")[0]);\n\n //holds the employees availability and preferences for the day\n boolean[] currentEmpAvail = null;\n if (availability.get(j) != null) {\n currentEmpAvail = availability.get(j);\n }\n boolean[] currentEmpPref = null;\n\n if (preferences.get(j) == null) {\n //System.out.println(\"null\");\n prefShift = false;\n } else {\n currentEmpPref = preferences.get(j);\n\n }\n\n\n //Checks Availability and preferences for each shift (every hour in the shift: around 8 times/shift)\n for (int i = startHour; i < endHour; i++) {\n\n\n //if they can't work any hour of the shift don't schedule them\n if (currentEmpAvail != null && !currentEmpAvail[i] && availShift) {\n availShift = false;\n }\n //if they don't prefer to work any hour in this shift don't set them as preferred\n if (currentEmpPref != null && !currentEmpPref[i] && prefShift) {\n prefShift = false;\n }\n }\n\n\n\n if (availList.get(j) == null) {\n availShift = false;\n prefShift = false;\n }\n if (prefList.get(j) == null) {\n prefShift = false;\n }\n\n\n if (noPref) {\n prefShift = true;\n }\n\n //if they are available and prefer the shift add them to the schedule\n\n if (availShift && prefShift && shift.getEmployeeList().size() < shift.getMaxNoEmp()) {\n\n shift.getEmployeeList().add(availList.get(j));\n\n\n ArrayList<Shift> empShiftList1 = new ArrayList<>(availList.get(j).getShiftList());\n empShiftList1.add(shift);\n availList.get(j).setShiftList(empShiftList1);\n scheduled.add(availList.get(j));\n\n } else if (availShift) {\n secondary.add(availList.get(j));\n }\n }\n\n //for every spot in the shift that still needs to be filled add from secondary (anywhere from 1-5 times)\n int x = 0;\n for (int i = shift.getEmployeeList().size(); i < shift.getMinNoEmp(); i++) {\n\n if (x < secondary.size()) {\n shift.getEmployeeList().add(secondary.get(x));\n ArrayList<Shift> empShiftList = new ArrayList<>(secondary.get(x).getShiftList());\n empShiftList.add(shift);\n secondary.get(x).setShiftList(empShiftList);\n scheduled.add(secondary.get(x));\n x++;\n }\n }\n\n // if the shift had issues generating tell me\n if (shift.getEmployeeList().size() < shift.getMinNoEmp() || shift.getEmployeeList().size() > shift.getMaxNoEmp()) {\n try {\n throw new ShiftCannotBeFilledException(day);\n } catch (ShiftCannotBeFilledException e) {\n System.out.println(\"shift Could not be filled\");\n retryWeek = true;\n noPref = true;\n redoDay = true;\n }\n }\n\n //deletes the scheduled employees from the days list of available employees once theyve been scheduled for a shift\n for (Employee toRemove : scheduled) {\n\n int index = getIndex(availList, toRemove);\n availList.set(index, null);\n prefList.set(index, null);\n availability.set(index, null);\n preferences.set(index, null);\n }\n today.getShiftList().add(shift);\n }\n //while loop\n dayCount++;\n }\n\n schedule.add(today);\n nextMonday = nextMonday.plusDays(1);\n System.out.println(nextMonday);\n }\n\n iteration++;\n }\n if(iteration >= 100) {\n System.out.println(\"Failed to generate schedule after 100 iterations\");\n }\n return schedule;\n\n }",
"private void generateDefaultTimeSlots() {\n\t\tLocalTime startTime = LocalTime.of(9, 0); // 9AM start time\n\t\tLocalTime endTime = LocalTime.of(19, 0); // 5PM end time\n\n\t\tfor (int i = 1; i <= 7; i++) {\n\t\t\tList<Timeslot> timeSlots = new ArrayList<>();\n\t\t\tLocalTime currentTime = startTime.plusMinutes(15);\n\t\t\twhile (currentTime.isBefore(endTime) && currentTime.isAfter(startTime)) {\n\t\t\t\tTimeslot newSlot = new Timeslot();\n\t\t\t\tnewSlot.setTime(currentTime);\n\t\t\t\tnewSlot = timeslotRepository.save(newSlot);\n\t\t\t\ttimeSlots.add(newSlot);\n\t\t\t\tcurrentTime = currentTime.plusHours(1); // new slot after one hour\n\t\t\t}\n\t\t\tDay newDay = new Day();\n\t\t\tnewDay.setTs(timeSlots);\n\t\t\tnewDay.setDayOfWeek(DayOfWeek.of(i));\n\t\t\tdayRepository.save(newDay);\n\t\t}\n\t}",
"public void testGenerateJobs() throws Exception {\n HarvestDefinitionDAO hddao = HarvestDefinitionDAO.getInstance();\n TemplateDAO.getInstance();\n\n final String scheduleName = \"foo\";\n final String noComments = \"\";\n \n final GregorianCalendar cal = new GregorianCalendar();\n // Avoids tedious rounding problems\n cal.set(Calendar.MILLISECOND, 0);\n // Make sure existing job is in the future\n PartialHarvest hd = (PartialHarvest) hddao.read(Long.valueOf(42));\n cal.add(Calendar.YEAR, 2);\n Date now = cal.getTime();\n Schedule s = Schedule.getInstance(now, 2, new WeeklyFrequency(2),\n scheduleName, noComments);\n ScheduleDAO.getInstance().create(s);\n hd.setSchedule(s);\n hd.reset();\n hddao.update(hd);\n\n cal.setTime(new Date()); // reset\n now = cal.getTime();\n generateJobs(now);\n JobDAO jobdao = JobDAO.getInstance();\n List<Job> jobs = IteratorUtils.toList(jobdao.getAll(JobStatus.NEW));\n assertEquals(\"Should get no job for the HD in the future\", 0, jobs\n .size());\n // Make some harvest definitions with schedules around the given time\n // Requires a list of configurations for each HD\n List<DomainConfiguration> cfgs = new ArrayList<DomainConfiguration>();\n Domain domain = DomainDAO.getInstance().read(\"netarkivet.dk\");\n cfgs.add(domain.getDefaultConfiguration());\n final ScheduleDAO sdao = ScheduleDAO.getInstance();\n HarvestDefinition hd1 = HarvestDefinition.createPartialHarvest(\n cfgs,\n sdao.read(\"Hver hele time\"),\n \"Hele time\", noComments, \"EveryBody\");\n hd1.setSubmissionDate(new Date());\n hddao.create(hd1);\n HarvestDefinition hd2 = HarvestDefinition.createPartialHarvest(\n cfgs,\n sdao.read(\"Hver nat kl 4.00\"),\n \"Kl. 4\", noComments, \"EveryBody\");\n hd2.setSubmissionDate(new Date());\n hddao.create(hd2);\n generateJobs(now);\n List<Job> jobs1 = IteratorUtils.toList(jobdao.getAll(JobStatus.NEW));\n assertEquals(\"Should get jobs for no new defs immediately\", 0, jobs1\n .size());\n\n cal.add(Calendar.DAY_OF_MONTH, 1);\n now = cal.getTime();\n generateJobs(now);\n jobs1 = IteratorUtils.toList(jobdao.getAll(JobStatus.NEW));\n assertEquals(\"Should get jobs for both new defs after a day\", 2, jobs1\n .size());\n // Check that the right HD's came in\n Job j1 = jobs1.get(0);\n Job j2 = jobs1.get(1);\n assertTrue(\"Neither job must be for HD 42\", j1\n .getOrigHarvestDefinitionID() != hd.getOid() &&\n j2.getOrigHarvestDefinitionID()\n != hd.getOid());\n assertTrue(\"One of the jobs must be for the new HD \" + hd1.getOid()\n + \", but we got \" + jobs1, j1.getOrigHarvestDefinitionID()\n .equals(hd1.getOid())\n || j2.getOrigHarvestDefinitionID().equals(\n hd1.getOid()));\n assertTrue(\"One of the jobs must be for the new HD \" + hd1.getOid()\n + \", but we got \" + jobs1, j1.getOrigHarvestDefinitionID()\n .equals(hd2.getOid())\n || j2.getOrigHarvestDefinitionID().equals(hd2.getOid()));\n generateJobs(now);\n List<Job> jobs2 = IteratorUtils.toList(jobdao.getAll(JobStatus.NEW));\n assertEquals(\n \"Should generate one more job because we are past the time\"\n + \" when the next hourly job should have been scheduled.\",\n jobs1.size() + 1, jobs2.size());\n }",
"private void generateOptimisationTimings() {\n\t\toptTimeList = new ArrayList<Integer>();\n\t\tint timeCount = 0;\n\t\twhile (timeCount < simPeriod) {\n\t\t\ttimeCount = timeCount + OPTIMISATION_TIME_INTERVAL;\n\t\t\toptTimeList.add(timeCount);\n\t\t}\n\t}",
"public static Schedule initializeSchedule(String[] args) {\n\n if (args.length == 5) { // Level 3\n RandomGenerator r = new RandomGenerator(Integer.parseInt(args[0]), \n Double.parseDouble(args[3]), Double.parseDouble(args[4]), 0);\n return new Schedule(r, args[1], args[2], \"1\", \"0\", \"0\", \"0\");\n } else if (args.length == 6) { // Level 4\n RandomGenerator r = new RandomGenerator(Integer.parseInt(args[0]), \n Double.parseDouble(args[4]), Double.parseDouble(args[5]), 0);\n return new Schedule(r, args[1], args[3], args[2], \"0\", \"0\", \"0\");\n } else if (args.length == 8) { // Level 5\n RandomGenerator r = new RandomGenerator(Integer.parseInt(args[0]), \n Double.parseDouble(args[4]), Double.parseDouble(args[5]), \n Double.parseDouble(args[6]));\n return new Schedule(r, args[1], args[3], args[2], args[7], \"0\", \"0\");\n } else if (args.length == 9) { // Level 6\n RandomGenerator r = new RandomGenerator(Integer.parseInt(args[0]), \n Double.parseDouble(args[5]), Double.parseDouble(args[6]), \n Double.parseDouble(args[7]));\n return new Schedule(r, args[1], args[4], args[3], args[8], args[2], \"0\");\n } else if (args.length == 10) { // Level 7\n RandomGenerator r = new RandomGenerator(Integer.parseInt(args[0]), \n Double.parseDouble(args[5]), Double.parseDouble(args[6]), \n Double.parseDouble(args[7]));\n return new Schedule(r, args[1], args[4], args[3], args[8], args[2], args[9]);\n } else {\n throw new IllegalArgumentException(\"Invalid Input\");\n }\n }",
"PSScheduledTask createSchedule();",
"@Override\n public List<int[]> generateSchedule() {\n this.state = AlgorithmState.ACTIVE;\n // initially place our initial schedule in the priority queue, so we can pop in a loop.\n this.priorityQueue.add(this.heuristicManager.getAlgorithmStepFromSchedule(originalSchedule));\n\n List<Schedule> fringeSchedules;\n AlgorithmStep step;\n\n // returning null indicates that the algorithm has found the optimal solution, as there is nothing left for it\n // to expand (no free nodes left).\n while ((fringeSchedules = (step = this.priorityQueue.poll()).takeStep()) != null) {\n this.priorityQueue.addAll(this.heuristicManager.getAlgorithmStepsFromSchedules(pruneExpandedSchedulesAndAddToMap(fringeSchedules)));\n }\n // Just calling ScheduleStateChange.rebuildSolutionPath() but via a few parent objects.\n this.bestSchedule = step;\n // notify the GUI that the algorithm has found the optimal\n this.state = AlgorithmState.FINISHED;\n return step.rebuildPath();\n }",
"java.lang.String getSnapshotCreationSchedule();",
"public void generateMap()\n {\n int t;\n for(int i = 0; i < 3; i++)\n {\n t = random.nextInt(3);\n this.addTemplate(new Templates(t));\n }\n\n }",
"public void buildSchedule() {\n class SimulationStep extends BasicAction {\n public void execute() {\n SimUtilities.shuffle(rabbitList);\n for (int i = 0; i < rabbitList.size(); i++) {\n RabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n rabbit.step();\n }\n\n reapDeadRabbits();\n\n displaySurf.updateDisplay();\n }\n }\n schedule.scheduleActionBeginning(0, new SimulationStep());\n\n class GrassGrowth extends BasicAction {\n public void execute() {\n space.spreadGrass(grassGrowthRate);\n }\n }\n schedule.scheduleActionBeginning(0, new GrassGrowth());\n\n class UpdatePopulationPlot extends BasicAction {\n public void execute() {\n populationPlot.step();\n }\n }\n schedule.scheduleActionAtInterval(5, new UpdatePopulationPlot());\n }",
"public void scheduleOptions() {\n System.out.println(\"Would you like to (1) Add an Event, (2) Remove an Event, (3) Exit this menu\");\n }",
"protected void buildTemplates() { }",
"public void testSkippingScheduling() throws Exception {\n HarvestDefinitionDAO hddao = HarvestDefinitionDAO.getInstance();\n \n List<DomainConfiguration> cfgs = new ArrayList<DomainConfiguration>();\n Domain domain = DomainDAO.getInstance().read(\"netarkivet.dk\");\n cfgs.add(domain.getDefaultConfiguration());\n final ScheduleDAO sdao = ScheduleDAO.getInstance();\n Date now = new Date();\n Date yesterday = new Date(now.getTime() - (24 * 60 * 60 * 1000));\n HarvestDefinition hd1 = HarvestDefinition.createPartialHarvest(\n cfgs,\n sdao.read(\"Hver hele time\"),\n \"Hele time\", \"\", \"EveryBody\");\n hd1.setSubmissionDate(now);\n hddao.create(hd1);\n hddao.updateNextdate(((PartialHarvest) hd1).getOid(), yesterday);\n Iterable<Long> readyHarvestDefinitions =\n hddao.getReadyHarvestDefinitions(now);\n Iterator<Long> iterator = readyHarvestDefinitions.iterator();\n if (!iterator.hasNext()) {\n fail(\"At least one harvestdefinition should be ready for scheduling\");\n }\n \n // take the next ready definition, and inject the id of this\n // into the harvestDefinitionsBeingScheduled datastructure and \n Long readyHarvestId = iterator.next();\n @SuppressWarnings(\"rawtypes\")\n Class c = Class.forName(HarvestJobGenerator.class.getName());\n Field f = c.getDeclaredField(\"harvestDefinitionsBeingScheduled\");\n Field f1 = c.getDeclaredField(\"schedulingStartedMap\");\n Set<Long> harvestDefinitionsBeingScheduled =\n Collections.synchronizedSet(new HashSet<Long>());\n harvestDefinitionsBeingScheduled.add(readyHarvestId);\n \n Map<Long, Long> schedulingStartedMap =\n Collections.synchronizedMap(new HashMap<Long, Long>());\n Long acceptabledelay = 5L * 60 * 1000;\n Long scheduledTime = System.currentTimeMillis() - acceptabledelay - 1000L;\n schedulingStartedMap.put(readyHarvestId, scheduledTime);\n f1.set(null, schedulingStartedMap);\n f.set(null, harvestDefinitionsBeingScheduled);\n // redirect Stdout til myOut\n PrintStream origStdout = System.out;\n ByteArrayOutputStream myOut = new ByteArrayOutputStream();\n System.setOut(new PrintStream(myOut));\n try {\n generateJobs(new Date()); \n } finally {\n myOut.close();\n System.setOut(origStdout);\n } \n final String expectedOutput = \"[WARNING-Notification] Not creating jobs \"\n + \"for harvestdefinition #44 (Hele time) \" \n + \"as the previous scheduling is still running\\n\";\n assertTrue(\"The excepted notification should have been sent, but received instead: \" \n + myOut.toString(), \n myOut.toString().equals(expectedOutput));\n }",
"private void renderSchedule(int option){\n\t\tEvents[] events = mySchedule.getEvents();\n\t\tint i = 0;\n\t\tif(option == 1){\n\t\t\tcolorIndex = 8;\n\t\t}\n\t\twhile (events[i] != null) {\n\t\t\taddEvent(events[i], colorIndex);\n\t\t\tif(colorIndex < 8 && option ==0){\n\t\t\t\tcolorIndex++;\n\t\t\t}\n\t\t\telse if(option == 0)\n\t\t\t\tcolorIndex = 0;\n\t\t\ti++;\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an API for modifying the alreadyexisting RowData which has been set on the given ControlWrapper. | public static LayoutsRowData modifyRowData(ControlWrapper wrapper) {
return modifyRowData(wrapper.getLayoutData());
} | [
"public static LayoutsRowData setRowData(ControlWrapper wrapper) {\n\t\treturn setRowData(wrapper.getRootControl());\n\t}",
"public void setRowDataWrapper(final IWrapper < Object, RowData > theRowDataWrapper) {\r\n this.rowDataWrapper = theRowDataWrapper;\r\n }",
"public static LayoutsRowData modifyRowData(Control control) {\n\t\treturn modifyRowData(control.getLayoutData());\n\t}",
"public static LayoutsRowData setRowData(Control control) {\n\t\tgetLayout(control.getParent(), RowLayout.class);\n\t\tRowData rowData = new RowData();\n\t\tcontrol.setLayoutData(rowData);\n\t\treturn new LayoutsRowData(rowData);\n\t}",
"public static LayoutsGridData modifyGridData(ControlWrapper wrapper) {\n\t\treturn modifyGridData(wrapper.getLayoutData());\n\t}",
"@Override\r\n\tpublic BusItem getRowData() {\n\t\treturn wrappedData.get(rowId);\r\n\t}",
"protected abstract E modifyRow(E rowObject);",
"RowValues createRowValues();",
"public void setWrapper(Vector primaryKey, Object wrapper) {\n CacheKey cacheKey = getCacheKey(primaryKey);\n\n if (cacheKey != null) {\n cacheKey.setWrapper(wrapper);\n }\n }",
"public DataValues getControlValuesForUpdate(DataTable table);",
"T getRowData(int rowNumber);",
"@Override\n public void getDataRow() {\n\n }",
"@Override\r\n\tpublic void setWrappedData(Object arg0) {\n\r\n\t}",
"RowValue createRowValue();",
"public static LayoutsGridData setGridData(ControlWrapper wrapper) {\n\t\treturn setGridData(wrapper.getRootControl());\n\t}",
"protected abstract List<?> getRowValues(T dataObject);",
"protected abstract void buildRowImpl(T rowValue, int absRowIndex);",
"protected String handleDataFieldInRow(Component item, Object obj, String row, int index, String originalId) {\r\n if (!(item instanceof DataField)) {\r\n return row;\r\n }\r\n\r\n String currentValue = ObjectPropertyUtils.getPropertyValueAsText(obj, ((DataField) item).getPropertyName());\r\n\r\n if (currentValue == null) {\r\n currentValue = \"\";\r\n }\r\n\r\n //for readOnly DataFields replace the value marked with the value on the current object\r\n row = row.replaceAll(VALUE_TOKEN + originalId + VALUE_TOKEN, currentValue);\r\n currentColumnValue = currentValue;\r\n\r\n Inquiry dataFieldInquiry = ((DataField) item).getInquiry();\r\n if (dataFieldInquiry != null && dataFieldInquiry.getInquiryParameters() != null\r\n && dataFieldInquiry.getInquiryLink() != null) {\r\n\r\n String inquiryLinkId = dataFieldInquiry.getInquiryLink().getId().replace(ID_TOKEN, \"\")\r\n + UifConstants.IdSuffixes.LINE + index;\r\n\r\n // process each Inquiry link parameter by replacing each in the inquiry url with their current value\r\n for (String key : dataFieldInquiry.getInquiryParameters().keySet()) {\r\n String name = dataFieldInquiry.getInquiryParameters().get(key);\r\n\r\n //omit the binding prefix from the key to get the path relative to the current object\r\n key = key.replace(((DataField) item).getBindingInfo().getBindByNamePrefix() + \".\", \"\");\r\n\r\n if (ObjectPropertyUtils.isReadableProperty(obj, key)) {\r\n String value = ObjectPropertyUtils.getPropertyValueAsText(obj, key);\r\n row = row.replaceFirst(\"(\" + inquiryLinkId + \"(.|\\\\s)*?\" + name + \")=.*?([&|\\\"])\",\r\n \"$1=\" + value + \"$3\");\r\n }\r\n }\r\n }\r\n\r\n return row;\r\n }",
"public interface DataControlsTransfer\r\n\t{\t\t\r\n\t\t//implement to reading values from controls for table row update\r\n\t\tpublic DataValues getControlValuesForUpdate(DataTable table);\r\n\t\t\r\n\t\t//implement to set controls values from current row for view/edit \r\n\t\tpublic void setControlValuesForView(DataValues values);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the keycode for the clear key | public int getClearKeyCode() {
// TODO::
return 0;
} | [
"@java.lang.Override\n public com.google.cloud.video.livestream.v1.Encryption.Clearkey getClearkey() {\n return clearkey_ == null\n ? com.google.cloud.video.livestream.v1.Encryption.Clearkey.getDefaultInstance()\n : clearkey_;\n }",
"public com.google.cloud.video.livestream.v1.Encryption.Clearkey getClearkey() {\n if (clearkeyBuilder_ == null) {\n return clearkey_ == null\n ? com.google.cloud.video.livestream.v1.Encryption.Clearkey.getDefaultInstance()\n : clearkey_;\n } else {\n return clearkeyBuilder_.getMessage();\n }\n }",
"public static int getKeyCode()\n {\n checkInstance(\"getKeyCode()\");\n\n if (_gotKey)\n {\n _gotKey = false;\n return _keyCode;\n }\n else\n return KeyEvent.CHAR_UNDEFINED;\n }",
"public int getBackspaceKeyCode() {\n // TODO::\n return 0;\n }",
"public int getKeyCode() {\n if (this.isKeySet) {\n return this.keyCode;\n }\n return KeyEvent.VK_UNDEFINED;\n }",
"int getKeyCode();",
"public int getBackKeyCode() {\n // TODO::\n return 0;\n }",
"public Command getClearCommand() {\n\t\treturn clearCommand;\n\t}",
"public static char getKey()\n {\n checkInstance(\"getKey()\");\n\n if (_gotKey)\n {\n _gotKey = false;\n return _keyChar;\n }\n else\n return KeyEvent.CHAR_UNDEFINED;\n }",
"public int getKeyClose() {\r\n return getKeyEscape();\r\n }",
"public com.google.cloud.video.livestream.v1.Encryption.ClearkeyOrBuilder\n getClearkeyOrBuilder() {\n if (clearkeyBuilder_ != null) {\n return clearkeyBuilder_.getMessageOrBuilder();\n } else {\n return clearkey_ == null\n ? com.google.cloud.video.livestream.v1.Encryption.Clearkey.getDefaultInstance()\n : clearkey_;\n }\n }",
"public int getKeyMenu() {\r\n return getKeyEscape();\r\n }",
"public static char getKey() {\n try {\n return (char) Input.read(true);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return 0;\n }",
"public int getKeyCode() {\n return keyEvent.getKeyCode();\n }",
"public int getKeyEscape() {\r\n return Input.Keys.valueOf(getKeyEscapeName());\r\n }",
"com.google.cloud.video.livestream.v1.Encryption.Clearkey getClearkey();",
"public JButton getClearBox() {\n\t\treturn clearBox;\n\t}",
"void unsetKeyBox();",
"public static int getLastKeyCode()\n {\n return _keyCode;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set serial line configuration | public abstract void setSerialLineConfiguration(final SerialLineConfiguration config); | [
"void setCfgLinea(String cfgLinea);",
"private void setSerialPortParameters() throws IOException {\r\n int baudRate = 57600; // 57600bps\r\n\r\n try {\r\n serialPort.setSerialPortParams(\r\n baudRate,\r\n SerialPort.DATABITS_8,\r\n SerialPort.STOPBITS_1,\r\n SerialPort.PARITY_NONE);\r\n\r\n serialPort.setFlowControlMode(\r\n SerialPort.FLOWCONTROL_NONE);\r\n } catch (UnsupportedCommOperationException ex) {\r\n throw new IOException(\"Unsupported serial port parameter\");\r\n }\r\n }",
"private void setupSerial() {\n if (Boolean.parseBoolean(GatewayProperties.getProperty(\"arduino.enabled\"))) {\n serialCommunication = new SerialCommunication();\n }\n }",
"private void setSerialPortParameters() throws IOException {\n int baudRate = 57600; // 57600bps\n\n try {\n // Set serial port to 57600bps-8N1..my favourite\n serialPort.setSerialPortParams(baudRate, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);\n serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE);\n } catch (UnsupportedCommOperationException ex) {\n throw new IOException(\"Unsupported serial port parameter\");\n }\n }",
"public void setup() {\r\n\r\n //Serial.begin(115200);\r\n\r\n // start with standard serial & rate\r\n mrlComm.begin(Serial);\r\n }",
"public final void setSerial(String serial){\n this.peripheralSerial = serial;\n }",
"public static void EEPROM_set_cs_line(int state)\n {\n reset_line = state;\n\n if (reset_line != CLEAR_LINE)\n EEPROM_reset();\n }",
"public void setLine (int Line);",
"void xsetCfgLinea(org.apache.xmlbeans.XmlString cfgLinea);",
"public void setSerial(int serial) {\n\t\tthis.serial = serial;\n\t}",
"public void setSerialPort(java.lang.CharSequence value) {\n this.serialPort = value;\n }",
"public void setLineMode(int lineMode);",
"public void setLine(Line line1) {\n line = line1;\n }",
"private void setConfigListLines() {\n List<GuiLine> newLines = genLines(currentFilepath,\"robot_info.txt\");\n super.setSelectionZoneHeight(newLines.size(), newLines);\n }",
"public void updateSerialSettings(Shoe shoe, String port, int rate, int bits, int stop, int parity) throws IOException, NumberFormatException {\r\n FileWriter fileWriter = new FileWriter(\"././ressources/serial\" + shoe.getSide().toString() + \".txt\");\r\n BufferedWriter writer = new BufferedWriter(fileWriter);\r\n writer.write(port + \"\\n\" + rate + \"\\n\" + bits + \"\\n\" + stop + \"\\n\" + parity + \"\\n\");\r\n writer.close();\r\n fileWriter.close();\r\n shoe.getSerialReader().initializeParameters();\r\n }",
"public void setSerial(java.lang.String newSerial);",
"public abstract void setRTS(boolean rts);",
"public void setTransmitLineState(short value) {\n this.transmitLineState = value;\n }",
"public void setLine() {\n ((MyPCanvas) canvas).setSelectionEventHandler(this.lineSelectionEventHandler);\n PNotificationCenter.defaultCenter().addListener(this, \"selectionChanged\", PSelectionEventHandler.SELECTION_CHANGED_NOTIFICATION,\n this.lineSelectionEventHandler);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets array of all "TrafficVolume" elements | org.landxml.schema.landXML11.TrafficVolumeDocument.TrafficVolume[] getTrafficVolumeArray(); | [
"java.util.List<org.landxml.schema.landXML11.TrafficVolumeDocument.TrafficVolume> getTrafficVolumeList();",
"org.landxml.schema.landXML11.TrafficVolumeDocument.TrafficVolume getTrafficVolumeArray(int i);",
"public org.landxml.schema.landXML11.VolumeDocument.Volume[] getVolumeArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(VOLUME$4, targetList);\r\n org.landxml.schema.landXML11.VolumeDocument.Volume[] result = new org.landxml.schema.landXML11.VolumeDocument.Volume[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public Iterable<TrafficDataVolumes> getTrafficDataVolumes() {\n\t\treturn _trafficDataVolumes;\n\t}",
"int sizeOfTrafficVolumeArray();",
"List<String> volumes();",
"public java.util.List<org.landxml.schema.landXML11.VolumeDocument.Volume> getVolumeList()\r\n {\r\n final class VolumeList extends java.util.AbstractList<org.landxml.schema.landXML11.VolumeDocument.Volume>\r\n {\r\n public org.landxml.schema.landXML11.VolumeDocument.Volume get(int i)\r\n { return IntersectionImpl.this.getVolumeArray(i); }\r\n \r\n public org.landxml.schema.landXML11.VolumeDocument.Volume set(int i, org.landxml.schema.landXML11.VolumeDocument.Volume o)\r\n {\r\n org.landxml.schema.landXML11.VolumeDocument.Volume old = IntersectionImpl.this.getVolumeArray(i);\r\n IntersectionImpl.this.setVolumeArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.VolumeDocument.Volume o)\r\n { IntersectionImpl.this.insertNewVolume(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.VolumeDocument.Volume remove(int i)\r\n {\r\n org.landxml.schema.landXML11.VolumeDocument.Volume old = IntersectionImpl.this.getVolumeArray(i);\r\n IntersectionImpl.this.removeVolume(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfVolumeArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new VolumeList();\r\n }\r\n }",
"public static double[] getVolumeDistribution() {\r\n\t\treturn IntraDayVolumeDistribution.getDistribution();\r\n\t}",
"public int getVolts()\n {\n return volts;\n }",
"public org.landxml.schema.landXML11.TrafficControlDocument.TrafficControl[] getTrafficControlArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(TRAFFICCONTROL$0, targetList);\r\n org.landxml.schema.landXML11.TrafficControlDocument.TrafficControl[] result = new org.landxml.schema.landXML11.TrafficControlDocument.TrafficControl[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"void setTrafficVolumeArray(int i, org.landxml.schema.landXML11.TrafficVolumeDocument.TrafficVolume trafficVolume);",
"public List<Volume> getLocalVolumes() {\n if (volumeMap == null) {\n refreshVolumesList();\n }\n\n // return the map as a List\n List<Volume> listOfVolumes = new ArrayList<Volume>(volumeMap.keySet());\n return listOfVolumes;\n }",
"java.util.List<com.google.cloud.baremetalsolution.v2.VolumeConfig> getVolumesList();",
"org.landxml.schema.landXML11.SpeedsDocument.Speeds[] getSpeedsArray();",
"void setTrafficVolumeArray(org.landxml.schema.landXML11.TrafficVolumeDocument.TrafficVolume[] trafficVolumeArray);",
"BigDecimal getVolumeTraded();",
"public org.landxml.schema.landXML11.VolumeGeomDocument.VolumeGeom[] getVolumeGeomArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(VOLUMEGEOM$4, targetList);\r\n org.landxml.schema.landXML11.VolumeGeomDocument.VolumeGeom[] result = new org.landxml.schema.landXML11.VolumeGeomDocument.VolumeGeom[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public float getVolume() {\n return mDrones.get(0).getVolume();\n }",
"@Override\n public double getVolume() {\n return liquids\n .stream()\n .mapToDouble(Liquid::getVolume)\n .sum();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the first e s f match result in the ordered set where esfPartecipantId = &63; and esfMatchId = &63;. | public static it.ethica.esf.model.ESFMatchResult findBymatchId_PartecipantId_First(
long esfPartecipantId, long esfMatchId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException,
it.ethica.esf.NoSuchMatchResultException {
return getPersistence()
.findBymatchId_PartecipantId_First(esfPartecipantId,
esfMatchId, orderByComparator);
} | [
"@Override\n\tpublic int getFirst() {\n\t\treturn _esfMatchResult.getFirst();\n\t}",
"public static it.ethica.esf.model.ESFMatchResult fetchBymatchId_PartecipantId_First(\n\t\tlong esfPartecipantId, long esfMatchId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence()\n\t\t\t\t .fetchBymatchId_PartecipantId_First(esfPartecipantId,\n\t\t\tesfMatchId, orderByComparator);\n\t}",
"public static it.ethica.esf.model.ESFMatchResult fetchByResultUserId_First(\n\t\tlong esfPartecipantId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence()\n\t\t\t\t .fetchByResultUserId_First(esfPartecipantId,\n\t\t\torderByComparator);\n\t}",
"public static it.ethica.esf.model.ESFMatchResult fetchByEsfMatchId_First(\n\t\tlong esfMatchId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence()\n\t\t\t\t .fetchByEsfMatchId_First(esfMatchId, orderByComparator);\n\t}",
"public static it.ethica.esf.model.ESFResult fetchByESFMatchId_First(\n\t\tlong esfMatchId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence()\n\t\t\t\t .fetchByESFMatchId_First(esfMatchId, orderByComparator);\n\t}",
"public static it.ethica.esf.model.ESFMatchResult findByEsfMatchId_First(\n\t\tlong esfMatchId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tit.ethica.esf.NoSuchMatchResultException {\n\t\treturn getPersistence()\n\t\t\t\t .findByEsfMatchId_First(esfMatchId, orderByComparator);\n\t}",
"public static it.ethica.esf.model.ESFMatchResult findByResultUserId_First(\n\t\tlong esfPartecipantId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tit.ethica.esf.NoSuchMatchResultException {\n\t\treturn getPersistence()\n\t\t\t\t .findByResultUserId_First(esfPartecipantId, orderByComparator);\n\t}",
"@Override\n\tpublic long getEsfMatchId() {\n\t\treturn _esfMatchResult.getEsfMatchId();\n\t}",
"public it.ethica.esf.model.ESFMatch fetchByMatchTypeId_First(\n\t\tlong esfMatchTypeId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"@Override\n\tpublic void setFirst(int first) {\n\t\t_esfMatchResult.setFirst(first);\n\t}",
"public void cacheResult(it.ethica.esf.model.ESFMatch esfMatch);",
"@Override\n\tpublic long getEsfMatchResultId() {\n\t\treturn _esfMatchResult.getEsfMatchResultId();\n\t}",
"public void cacheResult(\n\t\tjava.util.List<it.ethica.esf.model.ESFMatch> esfMatchs);",
"public it.ethica.esf.model.ESFMatch findByMatchTypeId_First(\n\t\tlong esfMatchTypeId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tit.ethica.esf.NoSuchMatchException;",
"private SearchNode getLowestFScoreNode(LinkedList<SearchNode> openSet, HashMap<SearchNode, Integer> f) {\n int lowestScore = Integer.MAX_VALUE;\n SearchNode lowestScoreNode = openSet.get(0);\n for (SearchNode node : openSet) {\n if (f.get(node) < lowestScore) {\n lowestScore = f.get(node);\n lowestScoreNode = node;\n }\n }\n return lowestScoreNode;\n }",
"private Point lowestFInOpen() {\n\t\tPoint lowestP = null;\n\t\tfor (Point p : openset) {\n\t\t\tif (lowestP == null) \n\t\t\t\tlowestP = p;\n\t\t\telse if (fscores.get(p) < fscores.get(lowestP))\n\t\t\t\tlowestP = p;\n\t\t}\n\t\treturn lowestP;\n\t}",
"public TupleMatch getMatch(int idMatch) throws SQLException {\n stmtExiste.setInt(1,idMatch);\n try(ResultSet rset = stmtExiste.executeQuery()){\n if (rset.next()) {\n TupleMatch tupleMatch;\n tupleMatch = new TupleMatch();\n tupleMatch.idMatch = idMatch;\n tupleMatch.equipelocal = rset.getInt(2);\n tupleMatch.equipevisiteur = rset.getInt(3);\n tupleMatch.terrainid = rset.getInt(4);\n tupleMatch.matchdate = rset.getDate(5);\n tupleMatch.matchheure = rset.getTime(6);\n tupleMatch.pointslocal = rset.getInt(7);\n tupleMatch.pointsvisiteur = rset.getInt(8); \n rset.close();\n return tupleMatch;\n }\n }catch(Exception ex){\n System.out.println(\"SYSERREUR - Probleme lors de la recuperation des donnees du match \" + idMatch + \".\");\n }\n return null;\n }",
"public it.ethica.esf.model.ESFMatch findBymyMatch_First(long userId,\n\t\tboolean isNational, long esfAssociationId, java.util.Date startDate,\n\t\tlong description, long esfSportTypeId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tit.ethica.esf.NoSuchMatchException;",
"public Match<S> getMatch(int matchIndex);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the specified theme attr color | @TargetApi(18)
public static int getColor(int color){
return themeValues.get(color);
} | [
"public static int getThemeColor(Context context, int attribute, int defaultColor) {\n int themeColor = 0;\n String packageName = context.getPackageName();\n try {\n Context packageContext = context.createPackageContext(packageName, 0);\n ApplicationInfo applicationInfo =\n context.getPackageManager().getApplicationInfo(packageName, 0);\n packageContext.setTheme(applicationInfo.theme);\n Resources.Theme theme = packageContext.getTheme();\n TypedArray ta = theme.obtainStyledAttributes(new int[]{attribute});\n themeColor = ta.getColor(0, defaultColor);\n ta.recycle();\n } catch (NameNotFoundException e) {\n e.printStackTrace();\n }\n return themeColor;\n }",
"@SuppressWarnings({\"CatchAndPrintStackTrace\", \"deprecation\"})\n public static int getThemeColor(Context context, int attribute, int defaultColor) {\n int themeColor = 0;\n String packageName = context.getPackageName();\n try {\n Context packageContext = context.createPackageContext(packageName, 0);\n ApplicationInfo applicationInfo =\n context.getPackageManager().getApplicationInfo(packageName, 0);\n packageContext.setTheme(applicationInfo.theme);\n Resources.Theme theme = packageContext.getTheme();\n TypedArray ta = theme.obtainStyledAttributes(new int[] {attribute});\n themeColor = ta.getColor(0, defaultColor);\n ta.recycle();\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n return themeColor;\n }",
"public static int resolveColorFromAttr(final Context context, @AttrRes final int attrColor) {\n final TypedValue value = new TypedValue();\n context.getTheme().resolveAttribute(attrColor, value, true);\n\n if (value.resourceId != 0) {\n return ContextCompat.getColor(context, value.resourceId);\n }\n\n return value.data;\n }",
"public static int getColorFromAttribute(Context context, int attrId) {\n return LanSoDemoApplication.getAppResources().getColor(getResourceFromAttribute(context, attrId));\n }",
"public String getColor() {\n return (String)getAttributeInternal(COLOR);\n }",
"public String getColor() {\n return (String) getAttributeInternal(COLOR);\n }",
"protected int getThemePreference() {\n SharedPreferences prefs = getSharedPreferences(\"colormode\", MODE_PRIVATE);\n int pref = prefs.getInt(ResistorActivity.PREFERENCES_COLOR_MODE, 1);\n return themeResourceIDs[pref];\n }",
"java.lang.String getTheme();",
"public Color getAtomColor(IAtom atom);",
"String getTheme();",
"@ColorInt\n public static int fetchAccentColor(Context context) {\n TypedValue typedValue = new TypedValue();\n TypedArray a =\n context.obtainStyledAttributes(typedValue.data, new int[]{R.attr.colorAccent});\n int color = a.getColor(0, ContextCompat.getColor(context, android.R.color.white));\n a.recycle();\n return color;\n }",
"public int getColor( )\r\n {\r\n return color;\r\n }",
"public Color getAtomColor(IAtom atom, Color defaultColor);",
"public Color getColour () {\n String colour_qualifier;\n\n try {\n colour_qualifier = getValueOfQualifier (\"colour\");\n if (colour_qualifier == null) {\n // it's international \"be nice to Americans day\":\n colour_qualifier = getValueOfQualifier (\"color\");\n }\n } catch (InvalidRelationException e) {\n colour_qualifier = null;\n }\n\n if (colour_qualifier == null) {\n // use default colour for this type of feature\n\n return Options.getOptions ().getDefaultFeatureColour (getKey ());\n }\n\n final StringVector colours = StringVector.getStrings (colour_qualifier);\n\n if (colours.size () < 1) {\n return Options.getOptions ().getDefaultFeatureColour (getKey ());\n }\n\n try {\n if (colours.size () == 3) {\n int red = Integer.parseInt (colours.elementAt (0));\n int green = Integer.parseInt (colours.elementAt (1));\n int blue = Integer.parseInt (colours.elementAt (2));\n\n if (red < 0) {\n red = 0;\n }\n\n if (red > 255) {\n red = 255;\n }\n\n if (green < 0) {\n green = 0;\n }\n\n if (green > 255) {\n green = 255;\n }\n\n if (blue < 0) {\n blue = 0;\n }\n\n if (blue > 255) {\n blue = 255;\n }\n\n return new Color (red, green, blue);\n } else {\n final String colour_string = colours.elementAt (0);\n\n final int colour_number;\n\n colour_number = Integer.parseInt (colour_string);\n return Options.getOptions ().getColorFromColourNumber (colour_number);\n }\n } catch (NumberFormatException e) {\n // use default colour for this type of feature\n\n return Options.getOptions ().getDefaultFeatureColour (getKey ());\n }\n }",
"public static String getTheme()\r\n {\r\n return theme;\r\n }",
"Integer getTxtColor();",
"public static String getColor(String tag) {\n if (tagColorMap == null) {\n tagColorMap = new HashMap<String, String>();\n }\n\n if (!tagColorMap.containsKey(tag)) {\n setColor(tag);\n }\n\n return tagColorMap.get(tag);\n }",
"public String getColour() {\n return (String) getAttributeInternal(COLOUR);\n }",
"public static int getGradientColor(){\n if (themeResourceId == R.style.ThemeOverlay_AppCompat_MusicLight) {\n return getVibrantColor();\n }\n else if (themeResourceId == R.style.ThemeOverlay_AppCompat_MusicNight) {\n return getDarkVibrantColor();\n }\n else{\n return themeValues.get(COLOR_PRIMARY);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the servicePrincipalKey property: The key of the service principal used to authenticate against Kusto. | public AzureDataExplorerLinkedServiceTypeProperties withServicePrincipalKey(SecretBase servicePrincipalKey) {
this.servicePrincipalKey = servicePrincipalKey;
return this;
} | [
"public SecretBase servicePrincipalKey() {\n return this.servicePrincipalKey;\n }",
"public AzureMLServiceLinkedService withServicePrincipalKey(SecretBase servicePrincipalKey) {\n this.servicePrincipalKey = servicePrincipalKey;\n return this;\n }",
"public void setPrincipalId(java.lang.String principalId) {\r\n this.principalId = principalId;\r\n }",
"public void setPrincipalId(String principalId) {\n this.principalId = principalId;\n }",
"public void setPrincipal( String principal );",
"public void setPrincipalId(final String id) {\n this.principalId = id;\n }",
"public Object servicePrincipalId() {\n return this.servicePrincipalId;\n }",
"public AzureDataExplorerLinkedServiceTypeProperties withServicePrincipalId(Object servicePrincipalId) {\n this.servicePrincipalId = servicePrincipalId;\n return this;\n }",
"public void setPrincipal(PrincipalEntity principal) {\n this.principal = principal;\n }",
"public void setKeyValueCredential(Credential keyValueCredential) {\r\n this.credential = keyValueCredential;\r\n }",
"@Override\n protected void serviceStart() throws Exception {\n super.serviceStart();\n kdc.start();\n keytab = new File(workDir, \"keytab.bin\");\n loginUsername = UserGroupInformation.getLoginUser().getShortUserName();\n loginPrincipal = loginUsername + \"/\" + krbInstance;\n\n alicePrincipal = ALICE + \"/\" + krbInstance;\n bobPrincipal = BOB + \"/\" + krbInstance;\n kdc.createPrincipal(keytab,\n alicePrincipal,\n bobPrincipal,\n \"HTTP/\" + krbInstance,\n HTTP_LOCALHOST,\n loginPrincipal);\n final File keystoresDir = new File(workDir, \"ssl\");\n keystoresDir.mkdirs();\n sslConfDir = KeyStoreTestUtil.getClasspathDir(\n this.getClass());\n KeyStoreTestUtil.setupSSLConfig(keystoresDir.getAbsolutePath(),\n sslConfDir, getConfig(), false);\n clientSSLConfigFileName = KeyStoreTestUtil.getClientSSLConfigFileName();\n serverSSLConfigFileName = KeyStoreTestUtil.getServerSSLConfigFileName();\n String kerberosRule =\n \"RULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\\nDEFAULT\";\n KerberosName.setRules(kerberosRule);\n }",
"public void setDatastorePrincipalSupported(boolean datastorePrincipalSupported) {\r\n this.datastorePrincipalSupported = datastorePrincipalSupported;\r\n }",
"public String servicePrincipalClientId() {\n return this.servicePrincipalClientId;\n }",
"public String servicePrincipalObjectId() {\n return this.servicePrincipalObjectId;\n }",
"@ZAttr(id=279)\n public void setCertAuthorityKeySelfSigned(String zimbraCertAuthorityKeySelfSigned) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraCertAuthorityKeySelfSigned, zimbraCertAuthorityKeySelfSigned);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"public void setAuthenticatedPrincipalId(java.lang.String authenticatedPrincipalId) {\r\n this.authenticatedPrincipalId = authenticatedPrincipalId;\r\n }",
"public ManagedClusterServicePrincipalProfile servicePrincipalProfile() {\n return this.servicePrincipalProfile;\n }",
"public String getPrincipalId() {\n return principalId;\n }",
"public ManagedClusterProperties withServicePrincipalProfile(\n ManagedClusterServicePrincipalProfile servicePrincipalProfile) {\n this.servicePrincipalProfile = servicePrincipalProfile;\n return this;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the class for meaningful class names in log messages If your logger supports instantiating a logger with a class name, the implementation should allow instantiation in this manner. Otherwise, a NOOP implementation is acceptable. | public Logger setLoggerClass(Class<?> clazz); | [
"public Logger setLoggerClass(String className);",
"@Test\n public final void testGetClassName()\n {\n AbstractLogger instance = new Logger(String.class);\n assertEquals(\"java.lang.String\", instance.getClassName(), \"values are not equal\");\n\n instance = new Logger(\"java.lang.String\");\n assertEquals(\"java.lang.String\", instance.getClassName(), \"values are not equal\");\n\n try\n {\n Class cls = null;\n Logger logger = new Logger(cls);\n fail(\"illegal state\");\n logger.doLog(Level.TRACE, \"illegal state\");\n } catch (IllegalArgumentException except)\n {\n assertNotNull(except, \"value is null\");\n }\n\n try\n {\n String className = null;\n Logger logger = new Logger(className);\n fail(\"illegal state\");\n logger.doLog(Level.TRACE, \"illegal state\");\n } catch (IllegalArgumentException except)\n {\n assertNotNull(except, \"value is null\");\n }\n }",
"private Logger(String name) {\n\t\tthis.sourceClass = name;\n\t}",
"private Logger(Class<?> sourceClass) {\n\t\tthis(sourceClass.getName());\n\t}",
"public void setClassName(String className) { this.className=className; }",
"public interface Logger {\n\n\t/**\n\t * Set the name for meaningful class names in log messages\n\t * \n\t * If your logger supports instantiating a logger with a class name, \n\t * the implementation should allow instantiation in this manner.\n\t * Otherwise, a NOOP implementation is acceptable.\n\t */\n\tpublic Logger setLoggerClass(String className);\n\t\n\t/** \n\t * Set the class for meaningful class names in log messages\n\t * \n\t * If your logger supports instantiating a logger with a class name, \n\t * the implementation should allow instantiation in this manner.\n\t * Otherwise, a NOOP implementation is acceptable.\n\t */\n\tpublic Logger setLoggerClass(Class<?> clazz);\n\t\n\t/**\n * Log a fatal event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void fatal(String message);\n\t\n\t/**\n * Log a fatal level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void fatal(String message, Throwable throwable);\n\n\t/**\n * Log an error level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void error(String message);\n\t\n\t/**\n * Log an error level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void error(String message, Throwable throwable);\n\n\t/**\n * Log a warning level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void warning(String message);\n\t\n\t/**\n * Log a warning level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void warning(String message, Throwable throwable);\n\n\t/**\n * Log an info level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void info(String message);\n\t\n\t/**\n * Log an info level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void info(String message, Throwable throwable);\n\n\t/**\n * Log a debug level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void debug(String message);\n\t\n\t/**\n * Log a debug level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void debug(String message, Throwable throwable);\n}",
"Object createLogger(Class<?> clazz);",
"public Log(Class<?> cls) {\n this(I2PAppContext.getGlobalContext().logManager(), cls, null);\n _manager.addLog(this);\n }",
"public abstract LoggerBackend create(String loggingClassName);",
"public Log4jLogger() {\n this.setClassName( getClass() );\n }",
"private static void setLoggerName(String logname, String logtype) {\n /* checks for security prefix, if present removes it. */\n if (logname != null) {\n loggerName = logname;\n }\n \n if (logtype != null) {\n if (logname != null) {\n loggerName += \".\";\n }\n loggerName += logtype;\n }\n }",
"protected abstract InternalLogger newInstance(String name);",
"Logger createLogger(Class clazz, CelebrosExportData loggerData);",
"MPulseLogger(String mClassName) {\n this.mClassName = mClassName;\n boolean androidLog;\n try {\n Class.forName(\"android.util.Log\");\n androidLog = true;\n } catch (ClassNotFoundException e) {\n // android logger not available, probably a test environment.\n androidLog = false;\n }\n this.mLoggable = sIsDebug && androidLog;\n }",
"public interface LogFactory {\n\n /**\n * Check if logger class is compatible with the log factory.\n *\n * @param loggerClass logger class\n * @return true if compatible and false - otherwise\n */\n boolean isCompatible(Class<?> loggerClass);\n\n /**\n * Create logger with the given name (as configuration parameter).\n *\n * @param name logger name\n * @return logger instance\n */\n Object createLogger(String name);\n\n /**\n * Create logger with the given class (as configuration parameter).\n *\n * @param clazz class\n * @return logger instance\n */\n Object createLogger(Class<?> clazz);\n\n}",
"public void setClassname(String classname) {\r\n this.classname = classname;\r\n }",
"public Logger getLogger(Class<?> clazz);",
"void setMeasurementControllerClassName(String className);",
"public GenericLogger()\r\n\t{\r\n\t\tPackageLoggingController.setLogger(this);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return true if this table has a column with the given title or id. | public boolean hasColumn(String title); | [
"protected boolean hasColumn(String header){\n return hasColumn(header, false);\n }",
"boolean hasColumnAt(int index);",
"boolean hasColId();",
"boolean hasColNm();",
"public boolean isColumn(CaseInsensitiveString data)\n \t{\n \t\tif (!_loading && data != null)\n \t\t{\n \t\t\treturn _columns.containsKey(data);\n \t\t}\n \t\treturn false;\n \t}",
"public boolean containsColumn(final String name) {\n boolean found = false;\n \n for (PgColumn column : columns) {\n if (column.getName().equals(name)) {\n found = true;\n \n break;\n }\n }\n \n return found;\n }",
"public boolean containsColumn(String name) {\r\n\t\treturn columnMap.containsKey(name) || aliasMap.containsKey(name);\r\n\t}",
"public boolean doesColumnExist(String colName) {\r\n \t\treturn dataStore.isColumn(colName);\r\n \t}",
"private static boolean columnExist(String tableName, String columnName)\n\t{\n\t\tCursor cursor = null;\n\t\tint index = -1;\n\t\ttry {\n\t\t\tcursor = db.rawQuery(\"SELECT * FROM \" + tableName + \" LIMIT 0\", null);\n\t\t\tindex = cursor.getColumnIndex(columnName);\n\t\t} \n\t\tfinally {\n\t\t\tcursor.close();\n\t\t}\t\n\n\t\treturn !(index == -1);\n\t}",
"boolean containsFieldByID(final String id);",
"boolean isNeedColumnInfo();",
"public boolean contains (HeaderColumn o) {\n\t\treturn (this.columns.contains (o));\n\t}",
"public boolean containsColumn(String colName) {\n\t\treturn dc.containsKey(colName);\n\t}",
"public boolean hasColumns() {\n\t\treturn numColumns() > 0;\n\t}",
"public boolean hasField(String id)\r\n {\r\n return get(id).size() != 0;\r\n }",
"private boolean CheckIfValueExistsInDataBase(String id, String title) {\n\n sqlHelper = new FavoritesSqlHelper(this);\n db = sqlHelper.getReadableDatabase();\n String [] columns = {FavoritesContract.COLUMN_UNIQ_ID, FavoritesContract.COLUMN_TITLE};\n String selection = FavoritesContract.COLUMN_UNIQ_ID + \"=?\" + \" AND \" + FavoritesContract.COLUMN_TITLE + \"=?\";\n String [] selectionArgs = {id, title};\n\n Cursor cursor = db.query(FavoritesContract.TABLE_NAME, columns, selection, selectionArgs, null, null, null);\n int result = cursor.getCount();\n if (result > 0){\n cursor.close();\n return true;\n }else{\n cursor.close();\n return false;\n }\n }",
"public boolean isSetColumnName() {\n return this.columnName != null;\n }",
"private boolean isPrimaryKeyColumn(String column) {\n\t\treturn primaryKeyColumnNames.contains(column.toUpperCase(Locale.ENGLISH));\n\t}",
"public boolean isSetColumnName() {\n return this.columnName != null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Reference'. | Reference createReference(); | [
"ReferenceProperty createReferenceProperty();",
"ReferenceLink createReferenceLink();",
"public Reference bindReference(Reference reference) {\n Reference newReference = null;\n \n switch(reference.getType()) {\n case \"article\":\n newReference = new ArticleReference();\n break;\n \n case \"book\":\n newReference = new BookReference();\n break;\n \n case \"booklet\":\n newReference = new BookletReference();\n break;\n \n case \"inproceedings\":\n newReference = new InproceedingsReference();\n break;\n \n case \"manual\":\n newReference = new ManualReference();\n break;\n \n default:\n return null;\n }\n \n newReference.copyFields(reference);\n return newReference;\n }",
"ReferenceRealization createReferenceRealization();",
"ReferenceEmbed createReferenceEmbed();",
"private WeakReference<Object> newRef() {\n return new WeakReference<Object>(new Object());\n }",
"public Reference(String uriReference) {\r\n this((Reference) null, uriReference);\r\n }",
"public ReferenceHelper getReferenceHelper();",
"public ReferenceBook() {\n\t\tsuper();\n\t\ttype = \"REFERENCE\";\n\t}",
"ReferenceTreatment createReferenceTreatment();",
"HxType createReference(final String className);",
"PropertyReference createPropertyReference();",
"RefExpression createRefExpression();",
"private ReferenceType createRef(IntuitEntity entity) {\n ReferenceType referenceType = new ReferenceType();\n referenceType.setValue(entity.getId());\n return referenceType;\n }",
"public static Reference create(IFile file) {\n return new Reference(file.getProject(), getMapKey(file));\n }",
"protected URIReferenceImpl makeRefImpl(URIReference ref) {\n return (ref instanceof URIReferenceImpl) ? (URIReferenceImpl)ref : new URIReferenceImpl(ref.getURI());\n }",
"public ReferenceImpl()\n {\n \t\n\t\tthis.refType = \"\";\n\t\t\n\t\tthis.refDesc = \"\";\n\t\t\n\t\tthis.parentId = Long.valueOf(\"0\");\n\t\t\n\t\tthis.refIndex = Long.valueOf(\"0\");\n\t\t\n\t\tthis.description = \"\";\n\t\t\n \tthis.dateCreated = new Date();\n \tthis.dateUpdated = new Date();\n }",
"interface Reference {\r\n\r\n\t\t/**\r\n\t\t * Return the \"source\" node of the reference, i.e. the node that\r\n\t\t * references the \"target\" node.\r\n\t\t */\r\n\t\tNode source();\r\n\r\n\t\t/**\r\n\t\t * Return the \"target\" node of the reference, i.e. the node that\r\n\t\t * is referenced by the \"source\" node.\r\n\t\t */\r\n\t\tNode target();\r\n\r\n\t}",
"TargetType createReference(InputStream byteStream, ReferenceContext context);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test that store file stores the files in alphabetical order, regardless of when a file was stored | @Test
public void testStoreFileAlphabetical() {
File file1 = new File("c");
File file2 = new File("b");
File file3 = new File("a");
parent.storeFile(file1);
parent.storeFile(file2);
parent.storeFile(file3);
ArrayList<File> output = parent.getStoredFiles();
ArrayList<File> expected = new ArrayList<File>();
expected.add(file3);
expected.add(file2);
expected.add(file1);
assertEquals(output, expected);
} | [
"@Test\n public void testStoreFile() {\n\n File file1 = new File(\"file1\");\n File file2 = new File(\"file2\");\n parent.storeFile(file1);\n parent.storeFile(file2);\n ArrayList<File> output = parent.getStoredFiles();\n ArrayList<File> expected = new ArrayList<File>();\n expected.add(file1);\n expected.add(file2);\n assertEquals(output, expected);\n }",
"@Test\n public void testReadFromFile() throws IOException {\n System.out.println(\"sort names: \"+ fileName);\n assertEquals(createList(), appService.readFromFile(fileName));\n }",
"@Test\n public void testSortFileName() throws URISyntaxException {\n Path bullrunnerGtfs = Paths.get(getClass().getClassLoader().getResource(\"bullrunner-gtfs.zip\").toURI());\n Path bullrunnerGtfsNoShapes = Paths.get(getClass().getClassLoader().getResource(\"bullrunner-gtfs-no-shapes.zip\").toURI());\n assertTrue(SortUtils.compareByFileName(bullrunnerGtfs, bullrunnerGtfsNoShapes) > 0);\n\n // bullrunner-gtfs.zip is before testagency2.zip\n Path testAgency2 = Paths.get(getClass().getClassLoader().getResource(\"testagency2.zip\").toURI());\n assertTrue(SortUtils.compareByFileName(bullrunnerGtfs, testAgency2) < 0);\n\n // Should be sorted by date in file name (ascending)\n Path tu1 = Paths.get(getClass().getClassLoader().getResource(\"TripUpdates-2017-02-18T20-00-08Z.txt\").toURI());\n Path tu2 = Paths.get(getClass().getClassLoader().getResource(\"TripUpdates-2017-02-18T20-00-23Z.txt\").toURI());\n Path tu3 = Paths.get(getClass().getClassLoader().getResource(\"TripUpdates-2017-02-18T20-01-08Z.txt\").toURI());\n\n assertTrue(SortUtils.compareByFileName(tu1, tu2) < 0);\n assertTrue(SortUtils.compareByFileName(tu2, tu3) < 0);\n assertTrue(SortUtils.compareByFileName(tu1, tu3) < 0);\n assertTrue(SortUtils.compareByFileName(tu3, tu1) > 0);\n assertTrue(SortUtils.compareByFileName(tu3, tu2) > 0);\n assertTrue(SortUtils.compareByFileName(tu2, tu1) > 0);\n\n /**\n * SortUtils.sortByName()\n */\n final List<File> files = Stream.of(tu3, tu2, tu1).map(Path::toFile)\n .collect(Collectors.toList());\n\n // Before sorting - should be backwards\n File[] array = files.toArray(new File[files.size()]);\n assertEquals(\"TripUpdates-2017-02-18T20-01-08Z.txt\", array[0].getName());\n assertEquals(\"TripUpdates-2017-02-18T20-00-23Z.txt\", array[1].getName());\n assertEquals(\"TripUpdates-2017-02-18T20-00-08Z.txt\", array[2].getName());\n\n // After sorting, should be in alpha order\n array = SortUtils.sortByName(array);\n assertEquals(\"TripUpdates-2017-02-18T20-00-08Z.txt\", array[0].getName());\n assertEquals(\"TripUpdates-2017-02-18T20-00-23Z.txt\", array[1].getName());\n assertEquals(\"TripUpdates-2017-02-18T20-01-08Z.txt\", array[2].getName());\n }",
"@Test\n public void testWriteToFile() throws IOException {\n\n appService.writeToFile(createSortedList(), fileName);\n File file = new File(\"names-sorted.txt\");\n\n //Checks whether the new file created or not\n assertTrue(file.exists());\n\n List<Name> names = null;\n if (file.exists()) {\n InputStream inputStream = new FileInputStream(file);\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n String line;\n\n names = new ArrayList<>();\n while ((line = reader.readLine()) != null) {\n Name name = new Name();\n String[] nameSplitted = line.split(\", \");\n name.setFirstName(nameSplitted[1]);\n name.setLastName(nameSplitted[0]);\n names.add(name);\n\n }\n } else {\n // fails if the sorted file not created\n fail(\"File not created or the given file doesn't exist\");\n }\n\n //Checks whether the created file contains the names in expected sorted order\n assertEquals(names, createSortedList());\n\n // Uncomment the below code to delete the created file, if required.\n // deleteFile(f);\n\n }",
"public void unitFileToSort() throws IOException {\n\t\tFile tempFile = null;\n\t\tfor (int i = 1; i < tempFiles.length; i++) {\n\t\t\ttempFile = sortBySmallFile(tempFiles[0], tempFiles[i]);\n\t\t\ttempFiles[0].delete();\n\t\t\ttempFiles[0] = tempFile;\n\n\t\t\t// String tempName = tempFiles[0].getAbsolutePath();\n\t\t\t// tempName = tempName.substring(0, tempName.lastIndexOf(\".\"));\n\t\t\t// tempName = tempName.substring(0, tempName.lastIndexOf(\".\"));\n\t\t\t// System.out.println(\"To rename : \" + tempName);\n\t\t\t// if(tempFiles[0].renameTo(new File(tempName))){\n\t\t\t// System.out.println(\"Rename succesful\");\n\t\t\t// } else {\n\t\t\t// System.out.println(\"Rename failed\");\n\t\t\t// }\n\t\t\t// System.out.println(tempFiles[0].getAbsolutePath());\n\t\t}\n\t\ttempFile.renameTo(new File(ORIG_FILE_PATH + \"sortResult.txt\"));\n\t}",
"@Test\n\tpublic void orderFileListTest_should_work() throws IOException {\n\t\tnew ReportService().orderFileList();\n\t}",
"private void sortFiles(){\n try{\n switch (orders.valueOf(this.orderLine[0])){\n case abs:\n if (this.orderLine.length == 2 && this.orderLine[1].equals(\"REVERSE\"))\n this.files = order(this.files, orders.abs, true);\n else if (this.orderLine.length == 1)\n this.files = order(this.files, orders.abs, false);\n else{\n this.files = order(this.files, orders.abs, false);\n this.addWarning(this.errorMsg + (this.firstSectionLine + 4));\n }\n break;\n case type:\n if (this.orderLine.length == 2 && this.orderLine[1].equals(\"REVERSE\"))\n this.files = order(this.files, orders.type, true);\n else if (this.orderLine.length == 1)\n this.files = order(this.files, orders.type, false);\n else{\n this.files = order(this.files, orders.abs, false);\n this.addWarning(this.errorMsg + (this.firstSectionLine + 4));\n }\n break;\n case size:\n if (this.orderLine.length == 2 && this.orderLine[1].equals(\"REVERSE\"))\n this.files = order(this.files, orders.size, true);\n else if (this.orderLine.length == 1)\n this.files = order(this.files, orders.size, false);\n else{\n this.files = order(this.files, orders.abs, false);\n this.addWarning(this.errorMsg + (this.firstSectionLine + 4));\n }\n break;\n }\n }\n catch (IllegalArgumentException e){\n this.files = order(this.files, orders.abs, false);\n this.addWarning(this.errorMsg + (this.firstSectionLine + 4));\n }\n\n }",
"public void testReadFilesFile() {\n try {\n PrintWriter out = new PrintWriter(new FileWriter(\"TestReadFilesFile.txt\"));\n out.println(\"05141988.txt\");\n out.flush();\n out.close();\n } catch (IOException e){\n System.out.println(\"Write Failed\");\n }\n \n System.out.println(\"readFilesFile\");\n String file = \"TestReadFilesFile.txt\";\n OrderDataAccess instance = new OrderDataAccess();\n ArrayList<String> expResult = new ArrayList<>();\n expResult.add(\"05141988.txt\");\n ArrayList<String> result = instance.readFilesFile(file);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"@Test\n public void testLexicographicalOrder() throws Exception {\n\n Path file1 = createFile(\"srcs/system/foo.txt\", \"foo\");\n Path file2 = createFile(\"srcs/system-root/bar.txt\", \"bar\");\n\n DirectoryTree tree = build(file1, file2);\n\n assertLexicographicalOrder(tree);\n }",
"private void sort() {\n setFiles(getFileStreamFromView());\n }",
"public boolean isFilesSortedAlphaNumerically() throws Exception {\n flag = false;\n try {\n logInstruction(\"LOG INSTRUCTION: CHECKING FOR SORTED LIST OF FILES.\");\n frameSwitch.switchToAddLinkFrame();\n lstOfFiles = fileListAlphaNumerically.getUIElementsList();\n for (UIElement uiElement : lstOfFiles) {\n lstOfFileNames.add(uiElement.getText());\n\n }\n lstnewListOfFileNames = lstOfFileNames;\n Collections.sort(lstOfFileNames);\n if (lstOfFileNames.equals(lstnewListOfFileNames))\n flag = true;\n } catch (Exception e) {\n throw new Exception(\n \"UNABLE TO CHECK IF THE FILE LIST IS SORTED ALPHANUMERICALLY.\" + \" \\n METHOD :isFilesSortedAlphaNumerically \\n\" + e\n .getLocalizedMessage());\n }\n return flag;\n }",
"public String saveFileOrder() {\n\n datasetVersionService.saveFileMetadata(FileMetadataOrder.reorderDisplayOrder(fileMetadatas));\n\n return returnToPreviousPage();\n }",
"@Test\n public void testFileOrderRelevance() throws Exception {\n cpd.add(new File((\"./\" + (CPDTest.BASE_TEST_RESOURCE_PATH)), \"dup2.java\"));\n cpd.add(new File((\"./\" + (CPDTest.BASE_TEST_RESOURCE_PATH)), \"dup1.java\"));\n cpd.go();\n Iterator<Match> matches = cpd.getMatches();\n while (matches.hasNext()) {\n Match match = matches.next();\n // the file added first was dup2.\n Assert.assertTrue(match.getFirstMark().getFilename().endsWith(\"dup2.java\"));\n Assert.assertTrue(match.getSecondMark().getFilename().endsWith(\"dup1.java\"));\n } \n }",
"@Test\n public void testSortDate() throws URISyntaxException, IOException, InterruptedException {\n Path file1 = Files.createTempFile(\"tempFileOldest\", \".tmp\");\n Thread.sleep(1500);\n Path file2 = Files.createTempFile(\"tempFileMiddle\", \".tmp\");\n Thread.sleep(1500);\n Path file3 = Files.createTempFile(\"tempFileNewest\", \".tmp\");\n\n /**\n * SortUtils.compareByDateModified()\n */\n assertTrue(SortUtils.compareByDateModified(file2, file3) < 0);\n assertTrue(SortUtils.compareByDateModified(file3, file2) > 0);\n assertFalse(SortUtils.compareByDateModified(file2, file3) > 0);\n assertFalse(SortUtils.compareByDateModified(file3, file2) < 0);\n\n assertTrue(SortUtils.compareByDateModified(file1, file2) < 0);\n assertTrue(SortUtils.compareByDateModified(file2, file1) > 0);\n assertFalse(SortUtils.compareByDateModified(file2, file1) < 0);\n assertFalse(SortUtils.compareByDateModified(file1, file2) > 0);\n\n /**\n * SortUtils.sortByDateModified()\n */\n final List<File> files = Stream.of(file3, file2, file1).map(Path::toFile)\n .collect(Collectors.toList());\n\n // Before sorting - should be backwards, newest to oldest\n File[] array = files.toArray(new File[files.size()]);\n assertTrue(array[0].getName().startsWith(\"tempFileNewest\"));\n assertTrue(array[1].getName().startsWith(\"tempFileMiddle\"));\n assertTrue(array[2].getName().startsWith(\"tempFileOldest\"));\n\n // After sorting, should be in date order (oldest to newest)\n array = SortUtils.sortByDateModified(array);\n assertTrue(array[0].getName().startsWith(\"tempFileOldest\"));\n assertTrue(array[1].getName().startsWith(\"tempFileMiddle\"));\n assertTrue(array[2].getName().startsWith(\"tempFileNewest\"));\n\n for (File file : array) {\n file.deleteOnExit();\n }\n }",
"@Test\n public void equalsDifferentOrder(){\n //backup_1e contains many things in different order, but it is equal to backup_1\n\n InputStream url1= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1.json\");\n InputStream url1e= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1e.json\");\n\n Backup backup_a = Backup.initFromFile(url1);\n Backup backup_b = Backup.initFromFile(url1e);\n\n assertEquals(backup_a, backup_b);\n }",
"private void testZipfileOrder(Path out) throws IOException {\n ZipFile outZip = new ZipFile(out.toFile());\n Enumeration<? extends ZipEntry> entries = outZip.entries();\n int index = 0;\n LinkedList<String> entryNames = new LinkedList<>();\n // We expect classes*.dex files first, in order, then the rest of the files, in order.\n while(entries.hasMoreElements()) {\n ZipEntry entry = entries.nextElement();\n if (!entry.getName().startsWith(\"classes\") || !entry.getName().endsWith(\".dex\")) {\n entryNames.add(entry.getName());\n continue;\n }\n if (index == 0) {\n Assert.assertEquals(\"classes.dex\", entry.getName());\n } else {\n Assert.assertEquals(\"classes\" + (index + 1) + \".dex\", entry.getName());\n }\n index++;\n }\n // Everything else should be sorted according to name.\n String[] entriesUnsorted = entryNames.toArray(StringUtils.EMPTY_ARRAY);\n String[] entriesSorted = entryNames.toArray(StringUtils.EMPTY_ARRAY);\n Arrays.sort(entriesSorted);\n Assert.assertArrayEquals(entriesUnsorted, entriesSorted);\n }",
"protected void createFileList()\n {\n // get a sorted array of files\n File f = new File(appManagementDir);\n String[] files = f.list(new FileFilter(AppSettings.getFilter()));\n \n // get the adapter for this file list\n ArrayAdapter<String> a = (ArrayAdapter<String>)fileList.getAdapter();\n a.clear();\n \n // clear the check boxes\n fileList.clearChoices();\n \n if (files != null && files.length > 0)\n {\n Arrays.sort(files, 0, files.length, new Comparator<Object>() {\n \n @Override\n public int compare(Object object1, Object object2)\n {\n int comp = 0;\n if (object1 instanceof String \n && object2 instanceof String)\n {\n String str1 = (String)object1;\n String str2 = (String)object2;\n \n comp = str1.compareToIgnoreCase(str2);\n }\n \n return comp;\n }});\n \n \n // add all the files\n for (String fileName : files)\n {\n a.add(fileName);\n }\n \n fileList.invalidate();\n }\n }",
"public void testCompareByName() throws Exception\n {\n logger_.info(\"Running testCompareByName...\");\n \n File tmpDir = FileUtil.getTempDir();\n File fileA = new File(tmpDir, \"a\" + RandomUtils.nextInt());\n File fileB = new File(tmpDir, \"b\" + RandomUtils.nextInt());\n \n try\n {\n FileComparator fc = FileComparator.COMPARE_NAME;\n assertTrue(fc.compare(fileA, fileB) < 0);\n assertTrue(fc.compare(fileB, fileA) > 0);\n assertTrue(fc.compare(fileA, fileA) == 0);\n }\n finally\n {\n FileUtil.deleteQuietly(fileA);\n FileUtil.deleteQuietly(fileB);\n }\n }",
"private void addFileInOrder(MyFile file) {\n\n Log.d(TAG, \"New file added: \" + file.getFilename() + \"; lastAccess: \" + file.getLastAccess());\n files.add(file);\n Collections.sort(files);\n if (ascending)\n Collections.reverse(files);\n notifyAdapter();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Integration test equivalent of testApplyEffectsPower(). Tests that applyEffects method (from Player) works for "power". | @Test
public void testApplyEffectsPowerMockless() {
Player player = Player.makePlayer();
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("power", 1);
ACard powerCard = ACard.makeCard(null, "", "", "Hero", 0, 0, 0, map);
assertEquals(0, player.getPower());
player.applyEffects(powerCard);
assertEquals(1, player.getPower());
} | [
"@Test\n\tpublic void testApplyEffectsPower() {\n\t\tPlayer player = Player.makePlayer();\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tmap.put(\"power\", 1);\n\t\tACard powerCard = EasyMock.niceMock(HeroCard.class);\n\t\tEasyMock.expect(powerCard.getEffects()).andReturn(map);\n\t\tEasyMock.replay(powerCard);\n\n\t\tassertEquals(0, player.getPower());\n\t\tplayer.applyEffects(powerCard);\n\t\tassertEquals(1, player.getPower());\n\t\tEasyMock.verify(powerCard);\n\t}",
"@Test\n void doEffectshockwave() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n RealPlayer b = new RealPlayer('b', \"blue\");\n RealPlayer e = new RealPlayer('e', \"emerald\");\n RealPlayer gr = new RealPlayer('g', \"grey\");\n RealPlayer v = new RealPlayer('v', \"violet\");\n RealPlayer y = new RealPlayer('y', \"yellow\");\n AlphaGame.getPlayers().add(b);\n AlphaGame.getPlayers().add(e);\n AlphaGame.getPlayers().add(gr);\n AlphaGame.getPlayers().add(v);\n AlphaGame.getPlayers().add(y);\n WeaponFactory wf = new WeaponFactory(\"shockwave\");\n Weapon w12 = new Weapon(\"shockwave\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w12);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w12.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(5));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim2);\n players.add(victim3);\n try{\n p.getPh().getWeaponDeck().getWeapon(w12.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException ex) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1);\n\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(5));\n victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSquare(10));\n players.clear();\n players.add(victim2);\n players.add(victim3);\n try{\n p.getPh().getWeaponDeck().getWeapon(w12.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException ex) { }\n\n assertTrue(victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(5));\n victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim4 = new RealPlayer('b', \"ciccia\");\n RealPlayer victim5 = new RealPlayer('p', \"ciccia\");\n victim4.setPlayerPosition(Board.getSquare(1));\n victim5.setPlayerPosition(Board.getSquare(0));\n players.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w12.getName()).doEffect(\"alt\", null, null, p, null, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException ex) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1 && victim4.getPb().countDamages() == 0 && victim5.getPb().countDamages() == 0);\n }",
"@Test\n\tpublic void testApplyEffectsDrawMockless() {\n\t\tPlayer player = Player.makePlayer();\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tmap.put(\"draw\", 1);\n\t\tACard drawCard = ACard.makeCard(null, \"\", \"\", \"Hero\", 0, 0, 0, map);\n\t\tassertEquals(5, player.getHandSize());\n\t\tassertEquals(5, player.getDeckSize());\n\t\tplayer.applyEffects(drawCard);\n\t\tassertEquals(6, player.getHandSize());\n\t\tassertEquals(4, player.getDeckSize());\n\t}",
"@Test\n\tpublic void testGetPlayerPower() {\n\t\tPlayer player = Player.makePlayer();\n\t\tassertEquals(0, player.getPower());\n\t\tplayer.addPower(2);\n\t\tassertEquals(2, player.getPower());\n\n\t\t// Tests negative inputs.\n\n\t\tplayer.addPower(-2);\n\t\tassertEquals(0, player.getPower());\n\t}",
"@Test\n\tpublic void testApplyEffectsRunesMockless() {\n\t\tPlayer player = Player.makePlayer();\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tmap.put(\"runes\", 1);\n\t\tACard runeCard = ACard.makeCard(null, \"\", \"\", \"Hero\", 0, 0, 0, map);\n\t\tassertEquals(0, player.getRunes());\n\t\tplayer.applyEffects(runeCard);\n\t\tassertEquals(1, player.getRunes());\n\t}",
"@Test\n\tpublic void testApplyEffectsAllBasicMockless() {\n\t\tPlayer player = Player.makePlayer();\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tmap.put(\"honor\", 5);\n\t\tmap.put(\"runes\", 3);\n\t\tmap.put(\"draw\", 2);\n\t\tmap.put(\"power\", 4);\n\t\tACard allCard = ACard.makeCard(null, \"\", \"\", \"Hero\", 0, 0, 0, map);\n\t\tassertEquals(0, player.getHonor());\n\t\tassertEquals(0, player.getPower());\n\t\tassertEquals(0, player.getRunes());\n\t\tassertEquals(5, player.getHandSize());\n\t\tassertEquals(5, player.getDeckSize());\n\t\tplayer.applyEffects(allCard);\n\t\tassertEquals(5, player.getHonor());\n\t\tassertEquals(4, player.getPower());\n\t\tassertEquals(3, player.getRunes());\n\t\tassertEquals(3, player.getDeckSize());\n\t\tassertEquals(7, player.getHandSize());\n\t}",
"@Test\n\tpublic void testApplyEffectsHonor() {\n\t\tPlayer player = Player.makePlayer();\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tmap.put(\"honor\", 5);\n\t\tACard honorCard = EasyMock.niceMock(HeroCard.class);\n\t\tEasyMock.expect(honorCard.getEffects()).andReturn(map);\n\t\tEasyMock.replay(honorCard);\n\n\t\tassertEquals(0, player.getHonor());\n\t\tplayer.applyEffects(honorCard);\n\t\tassertEquals(5, player.getHonor());\n\t\tEasyMock.verify(honorCard);\n\t}",
"@Test\n void doEffectpowerglove() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"power glove\");\n Weapon w10 = new Weapon(\"power glove\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w10);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w10.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(p.getPlayerPosition() == Board.getSquare(1) && victim.getPb().countDamages() == 1 && victim.getPb().getMarkedDamages('b') == 2);\n\n p.setPlayerPosition(Board.getSquare(0));\n s.add(Board.getSquare(1));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n players.clear();\n players.add(victim);\n s.add(Board.getSpawnpoint('b'));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSpawnpoint('b'));\n players.add(victim2);\n try{\n p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect(\"alt\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(p.getPlayerPosition() == Board.getSpawnpoint('b') && victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 2);\n\n p.setPlayerPosition(Board.getSquare(0));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(1));\n s.add(Board.getSpawnpoint('b'));\n try{\n p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect(\"alt\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { System.out.println(\"ERROR\");}\n\n assertTrue(p.getPlayerPosition() == Board.getSpawnpoint('b') && victim.getPb().countDamages() == 2);\n }",
"@Test\n\tpublic void testApplyEffectsHonorMockless() {\n\t\tPlayer player = Player.makePlayer();\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tmap.put(\"honor\", 5);\n\t\tACard honorCard = ACard.makeCard(null, \"\", \"\", \"Hero\", 0, 0, 0, map);\n\t\tassertEquals(0, player.getHonor());\n\t\tplayer.applyEffects(honorCard);\n\t\tassertEquals(5, player.getHonor());\n\t}",
"@Test\n void doEffectwhisper() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"whisper\");\n Weapon w6 = new Weapon(\"whisper\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w6);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSpawnpoint(2));\n p.getPh().drawWeapon(wd, w6.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w6.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().getMarkedDamages('b') == 1 && victim.getPb().countDamages() == 3);\n\n players.get(0).setPlayerPosition(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w6.getName()).doEffect(\"base\", null, null, p, players, null); //\"A choice of yours is wrong\"\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n }",
"@Test\n\tpublic void testApplyEffectsDraw() {\n\t\tPlayer player = Player.makePlayer();\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tmap.put(\"draw\", 1);\n\n\t\tACard drawCard = EasyMock.niceMock(HeroCard.class);\n\t\tEasyMock.expect(drawCard.getEffects()).andReturn(map);\n\t\tEasyMock.replay(drawCard);\n\n\t\tassertEquals(5, player.getHandSize());\n\t\tassertEquals(5, player.getDeckSize());\n\t\tplayer.applyEffects(drawCard);\n\t\tassertEquals(6, player.getHandSize());\n\t\tassertEquals(4, player.getDeckSize());\n\t\tEasyMock.verify(drawCard);\n\t}",
"@Test\n\tpublic void testApplyEffectsRunes() {\n\t\tPlayer player = Player.makePlayer();\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tmap.put(\"runes\", 1);\n\t\tACard runeCard = EasyMock.niceMock(HeroCard.class);\n\t\tEasyMock.expect(runeCard.getEffects()).andReturn(map);\n\t\tEasyMock.replay(runeCard);\n\n\t\tassertEquals(0, player.getRunes());\n\t\tplayer.applyEffects(runeCard);\n\t\tassertEquals(1, player.getRunes());\n\t\tEasyMock.verify(runeCard);\n\t}",
"@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w4);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w4);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w4.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w4.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n }",
"@Test\n void doEffectthor() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"t.h.o.r.\");\n Weapon w15 = new Weapon(\"t.h.o.r.\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w15);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w15.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim2);\n try {\n p.getPh().getWeaponDeck().getWeapon(w15.getName()).doEffect(\"base\", \"opt1\", null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n players.add(victim2);\n players.add(victim3);\n try {\n p.getPh().getWeaponDeck().getWeapon(w15.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 2);\n }",
"@Test\n\tpublic void filippoBrunelleschiEffectTest(){\n\t\tEffect effect = new FilippoBrunelleschiEffect();\n\t\teffect.applyEffect(player);\n\t\tassertTrue(player.getBonuses().isDiscountOccupiedTower());\n\t}",
"@Test\n void doEffectfurnace() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"furnace\");\n Weapon w3 = new Weapon(\"furnace\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w3);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w3.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('r'));\n Terminator t = new Terminator('g', Board.getSquare(5));\n t.setOwnerColor(victim.getColor());\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(victim.getPlayerPosition());\n try{\n p.getPh().getWeaponDeck().getWeapon(w3.getName()).doEffect(\"base\", null, null, p, null, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && t.getPb().countDamages() == 1);\n\n p.setPlayerPosition(Board.getSquare(0));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('r'));\n t = new Terminator('g', Board.getSpawnpoint('r'));\n t.setOwnerColor(victim.getColor());\n s.clear();\n s.add(Board.getSpawnpoint('r'));\n try{\n p.getPh().getWeaponDeck().getWeapon(w3.getName()).doEffect(\"alt\", null, null, p, null, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && victim.getPb().getMarkedDamages('b')==1 && t.getPb().countDamages() == 1 && t.getPb().getMarkedDamages('b')==1);\n\n }",
"@Test\n void doEffecttractorbeam() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"tractor beam\");\n Weapon w2 = new Weapon(\"tractor beam\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.getWeapons().add(w2);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w2.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSpawnpoint('b'));\n try {\n p.getPh().getWeaponDeck().getWeapon(w2.getName()).doEffect(\"base\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n assertTrue(players.get(0).getPb().countDamages() == 1 && players.get(0).getPlayerPosition() == Board.getSpawnpoint('b'));\n\n players.get(0).setPlayerPosition(Board.getSquare(1));\n s.clear();\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w2.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(players.get(0).getPb().countDamages() == 4 && players.get(0).getPlayerPosition() == p.getPlayerPosition());\n }",
"@Test\n void doEffectelectroscythe() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"electroscythe\");\n Weapon w1 = new Weapon(\"electroscythe\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.getWeapons().add(w1);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w1.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(0));\n Terminator t = new Terminator('y', Board.getSquare(0));\n t.setOwnerColor(victim.getColor());\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(t);\n try{\n p.getPh().getWeaponDeck().getWeapon(w1.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && t.getPb().countDamages() == 2);\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w1.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && t.getPb().countDamages() == 3);\n }",
"@Test\n\tpublic void sistoIVEffectTest(){\n\t\tEffect effect = new SistoIVEffect();\n\t\teffect.applyEffect(player);\n\t\tassertEquals(player.getBonuses().getChurchSupportBonus(), 5);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test that the LogUnitServer correctly handles a TAIL request. A TAILS_QUERY operation should be added to the BatchProcessor, and the response should contain the result from the completed future. | @Test
public void testHandleTail() {
RequestMsg request = getRequestMsg(
getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),
getTailRequestMsg(TailRequestMsg.Type.ALL_STREAMS_TAIL)
);
TailsResponse tailsResponseExpected = new TailsResponse(1L, 20L,
ImmutableMap.of(UUID.randomUUID(), 5L, UUID.randomUUID(), 10L));
when(mBatchProcessor.<TailsResponse>addTask(BatchWriterOperation.Type.TAILS_QUERY, request))
.thenReturn(CompletableFuture.completedFuture(tailsResponseExpected));
ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);
logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);
// Assert that the payload has a TAIL response and that the base
// header fields have remained the same.
verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));
ResponseMsg response = responseCaptor.getValue();
assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));
assertTrue(response.getPayload().hasTailResponse());
// Assert that the response is as expected.
TailsResponse provided = getTailsResponse(response.getPayload().getTailResponse());
assertEquals(tailsResponseExpected.getEpoch(), provided.getEpoch());
assertEquals(tailsResponseExpected.getLogTail(), provided.getLogTail());
assertEquals(tailsResponseExpected.getStreamTails(), provided.getStreamTails());
} | [
"@Test\n public void testHandleRangeWriteLog() {\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getRangeWriteLogRequestMsg(Collections.singletonList(getDefaultLogData(1L)))\n );\n\n // Prepare a future that can be used by the caller.\n when(mBatchProcessor.<Void>addTask(BatchWriterOperation.Type.RANGE_WRITE, request))\n .thenReturn(CompletableFuture.completedFuture(null));\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasRangeWriteLogResponse());\n }",
"@Test\n public void testHandleWriteLog() {\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getWriteLogRequestMsg(getDefaultLogData(1L))\n );\n\n // Prepare a future that can be used by the caller.\n when(mBatchProcessor.<Void>addTask(BatchWriterOperation.Type.WRITE, request))\n .thenReturn(CompletableFuture.completedFuture(null));\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasWriteLogResponse());\n }",
"@Test\n public void testHandleLogAddressSpace() {\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getLogAddressSpaceRequestMsg()\n );\n\n Map<UUID, StreamAddressSpace> tails = ImmutableMap.of(\n UUID.randomUUID(), new StreamAddressSpace(-1L, Collections.singleton(32L)),\n UUID.randomUUID(), new StreamAddressSpace(-1L, Collections.singleton(11L))\n );\n\n StreamsAddressResponse expectedResponse = new StreamsAddressResponse(32L, tails);\n expectedResponse.setEpoch(1L);\n\n // Return a future when the operation is added to the BatchProcessor.\n when(mBatchProcessor.<StreamsAddressResponse>addTask(BatchWriterOperation.Type.LOG_ADDRESS_SPACE_QUERY, request))\n .thenReturn(CompletableFuture.completedFuture(expectedResponse));\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n // Assert that the payload has a LOG_ADDRESS_SPACE response and that the base\n // header fields have remained the same.\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasLogAddressSpaceResponse());\n\n // Assert that the response is as expected.\n StreamsAddressResponse provided = getStreamsAddressResponse(\n response.getPayload().getLogAddressSpaceResponse().getLogTail(),\n response.getPayload().getLogAddressSpaceResponse().getEpoch(),\n response.getPayload().getLogAddressSpaceResponse().getAddressMapList()\n );\n\n assertEquals(expectedResponse.getEpoch(), provided.getEpoch());\n assertEquals(expectedResponse.getLogTail(), provided.getLogTail());\n assertEquals(expectedResponse.getAddressMap().size(), provided.getAddressMap().size());\n\n provided.getAddressMap().forEach((id, addressSpace) -> {\n assertEquals(expectedResponse.getAddressMap().get(id), addressSpace);\n });\n }",
"@Test(timeout = 20 * 1000)\n public final void testGetQueryStatusAndResultAfterFinish() throws Exception {\n String sql = \"select * from lineitem order by l_orderkey\";\n ClientProtos.SubmitQueryResponse response = client.executeQuery(sql);\n\n assertNotNull(response);\n QueryId queryId = new QueryId(response.getQueryId());\n\n try {\n while (true) {\n Thread.sleep(100);\n\n List<ClientProtos.BriefQueryInfo> finishedQueries = client.getFinishedQueryList();\n boolean finished = false;\n if (finishedQueries != null) {\n for (ClientProtos.BriefQueryInfo eachQuery: finishedQueries) {\n if (eachQuery.getQueryId().equals(queryId.getProto())) {\n finished = true;\n break;\n }\n }\n }\n\n if (finished) {\n break;\n }\n }\n\n QueryStatus queryStatus = client.getQueryStatus(queryId);\n assertNotNull(queryStatus);\n assertTrue(TajoClientUtil.isQueryComplete(queryStatus.getState()));\n\n ResultSet resultSet = client.getQueryResult(queryId);\n assertNotNull(resultSet);\n\n int count = 0;\n while(resultSet.next()) {\n count++;\n }\n\n assertEquals(5, count);\n } finally {\n client.closeQuery(queryId);\n }\n }",
"@Test\n public void Task1() {\n given()\n .when()\n .get(\"https://httpstat.us/203\")\n .then()\n .statusCode(203)\n .contentType(ContentType.TEXT)\n ;\n }",
"@Test\n public void Task5() {\n given()\n .when()\n .get(\"https://jsonplaceholder.typicode.com/todos\")\n .then()\n .statusCode(200)\n .contentType(ContentType.JSON)\n // .log().body()\n .body(\"userId[2]\", equalTo(1))\n .body(\"title[2]\", equalTo(\"fugiat veniam minus\"))\n ;\n }",
"public void testSkippingOverFailedQuery() throws Throwable {\n CompletableFuture<QueryResponse> future1 = new CompletableFuture<>();\n CompletableFuture<QueryResponse> future2 = new CompletableFuture<>();\n\n RaftProxyConnection connection = mock(RaftProxyConnection.class);\n Mockito.when(connection.query(any(QueryRequest.class)))\n .thenReturn(future1)\n .thenReturn(future2);\n\n RaftProxyState state = new RaftProxyState(1, UUID.randomUUID().toString(), \"test\", 1000);\n RaftProxyManager manager = mock(RaftProxyManager.class);\n ThreadContext threadContext = new TestContext();\n\n RaftProxySubmitter submitter = new RaftProxySubmitter(mock(RaftProxyConnection.class), connection, state, new RaftProxySequencer(state), manager, serializer, threadContext);\n\n CompletableFuture<String> result1 = submitter.submit(new TestQuery());\n CompletableFuture<String> result2 = submitter.submit(new TestQuery());\n\n assertEquals(state.getResponseIndex(), 1);\n\n assertFalse(result1.isDone());\n assertFalse(result2.isDone());\n\n future1.completeExceptionally(new QueryException(\"failure\"));\n future2.complete(QueryResponse.newBuilder()\n .withStatus(RaftResponse.Status.OK)\n .withIndex(10)\n .withResult(\"Hello world!\")\n .build());\n\n assertTrue(result1.isCompletedExceptionally());\n assertTrue(result2.isDone());\n assertEquals(result2.get(), \"Hello world!\");\n\n assertEquals(state.getResponseIndex(), 10);\n }",
"private void log(String url, String headers, String body, String response, Date startTime, Date endTime) {\n\n TranslatorLog translatorLog = new TranslatorLog();\n translatorLog.setId(GeneratorKit.getUUID());\n translatorLog.setUrl(url);\n translatorLog.setHeaders(headers);\n translatorLog.setBody(body);\n translatorLog.setResponse(response);\n translatorLog.setStartTime(startTime);\n translatorLog.setEndTime(endTime);\n translatorLogMapper.insertSelective(translatorLog);\n }",
"@Test\n public void testHandleTrimLog() {\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getTrimLogRequestMsg(Token.of(0L, 24L))\n );\n\n // Return a future when the operation is added to the BatchProcessor.\n when(mBatchProcessor.<Void>addTask(BatchWriterOperation.Type.PREFIX_TRIM, request))\n .thenReturn(CompletableFuture.completedFuture(null));\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n // Assert that the payload has a TRIM_LOG response and that the base\n // header fields have remained the same.\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasTrimLogResponse());\n }",
"@Test\n public void testHandleCommittedTail() {\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getCommittedTailRequestMsg()\n );\n\n final long tail = 7L;\n when(mStreamLog.getCommittedTail()).thenReturn(tail);\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n // Assert that the payload has a COMMITTED_TAIL response and that the base\n // header fields have remained the same.\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasCommittedTailResponse());\n assertEquals(tail, response.getPayload().getCommittedTailResponse().getCommittedTail());\n }",
"@Test\n public void testAsyncPost() throws Exception {\n final long tic = System.currentTimeMillis();\n\n // Submit requests asynchronously.\n final Future<Response> rf1 = target(PATH).request().async().post(Entity.text(\"1\"));\n final Future<Response> rf2 = target(PATH).request().async().post(Entity.text(\"2\"));\n final Future<Response> rf3 = target(PATH).request().async().post(Entity.text(\"3\"));\n // get() waits for the response\n\n // workaround for AHC default connection manager limitation of\n // only 2 open connections per host that may intermittently block\n // the test\n final CountDownLatch latch = new CountDownLatch(3);\n ExecutorService executor = Executors.newFixedThreadPool(3);\n\n final Future<String> r1 = executor.submit(new Callable<String>() {\n @Override\n public String call() throws Exception {\n try {\n return rf1.get().readEntity(String.class);\n } finally {\n latch.countDown();\n }\n }\n });\n final Future<String> r2 = executor.submit(new Callable<String>() {\n @Override\n public String call() throws Exception {\n try {\n return rf2.get().readEntity(String.class);\n } finally {\n latch.countDown();\n }\n }\n });\n final Future<String> r3 = executor.submit(new Callable<String>() {\n @Override\n public String call() throws Exception {\n try {\n return rf3.get().readEntity(String.class);\n } finally {\n latch.countDown();\n }\n }\n });\n\n assertTrue(\"Waiting for results has timed out.\", latch.await(5 * getAsyncTimeoutMultiplier(), TimeUnit.SECONDS));\n final long toc = System.currentTimeMillis();\n\n assertEquals(\"DONE-1\", r1.get());\n assertEquals(\"DONE-2\", r2.get());\n assertEquals(\"DONE-3\", r3.get());\n\n final int asyncTimeoutMultiplier = getAsyncTimeoutMultiplier();\n LOGGER.info(\"Using async timeout multiplier: \" + asyncTimeoutMultiplier);\n //assertThat(\"Async processing took too long.\", toc - tic, Matchers.lessThan(4 * AsyncResource.OPERATION_DURATION\n // * asyncTimeoutMultiplier));\n\n }",
"public void testSubmitQuery() throws Throwable {\n RaftProxyConnection connection = mock(RaftProxyConnection.class);\n when(connection.query(any(QueryRequest.class)))\n .thenReturn(CompletableFuture.completedFuture(QueryResponse.newBuilder()\n .withStatus(RaftResponse.Status.OK)\n .withIndex(10)\n .withResult(\"Hello world!\")\n .build()));\n\n RaftProxyState state = new RaftProxyState(1, UUID.randomUUID().toString(), \"test\", 1000);\n RaftProxyManager manager = mock(RaftProxyManager.class);\n ThreadContext threadContext = new TestContext();\n\n RaftProxySubmitter submitter = new RaftProxySubmitter(mock(RaftProxyConnection.class), connection, state, new RaftProxySequencer(state), manager, serializer, threadContext);\n assertEquals(submitter.submit(new TestQuery()).get(), \"Hello world!\");\n assertEquals(state.getResponseIndex(), 10);\n }",
"@Test\n void highConcurrencyOnSingleConnection() {\n SingleConnection singleConnection =\n options.getSingleConnectionFactory().apply(\"localhost\", server.httpPort());\n assumeTrue(singleConnection != null);\n\n int count = 50;\n String method = \"GET\";\n String path = \"/success\";\n URI uri = resolveAddress(path);\n\n CountDownLatch latch = new CountDownLatch(1);\n ExecutorService pool = Executors.newFixedThreadPool(4);\n for (int i = 0; i < count; i++) {\n int index = i;\n Runnable job =\n () -> {\n try {\n latch.await();\n } catch (InterruptedException e) {\n throw new AssertionError(e);\n }\n try {\n Integer result =\n testing.runWithSpan(\n \"Parent span \" + index,\n () -> {\n Span.current().setAttribute(\"test.request.id\", index);\n return singleConnection.doRequest(\n path,\n Collections.singletonMap(\"test-request-id\", String.valueOf(index)));\n });\n assertThat(result).isEqualTo(200);\n } catch (Throwable throwable) {\n if (throwable instanceof AssertionError) {\n throw (AssertionError) throwable;\n }\n throw new AssertionError(throwable);\n }\n };\n pool.submit(job);\n }\n latch.countDown();\n\n List<Consumer<TraceAssert>> assertions = new ArrayList<>();\n for (int i = 0; i < count; i++) {\n assertions.add(\n trace -> {\n SpanData rootSpan = trace.getSpan(0);\n // Traces can be in arbitrary order, let us find out the request id of the current one\n int requestId = Integer.parseInt(rootSpan.getName().substring(\"Parent span \".length()));\n\n trace.hasSpansSatisfyingExactly(\n span ->\n span.hasName(rootSpan.getName())\n .hasKind(SpanKind.INTERNAL)\n .hasNoParent()\n .hasAttributesSatisfyingExactly(\n equalTo(AttributeKey.longKey(\"test.request.id\"), requestId)),\n span -> assertClientSpan(span, uri, method, 200, null).hasParent(rootSpan),\n span ->\n assertServerSpan(span)\n .hasParent(trace.getSpan(1))\n .hasAttributesSatisfyingExactly(\n equalTo(AttributeKey.longKey(\"test.request.id\"), requestId)));\n });\n }\n\n testing.waitAndAssertTraces(assertions);\n\n pool.shutdown();\n }",
"@Test\n public void testHandleUpdateCommittedTail() {\n final long tail = 7L;\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getUpdateCommittedTailRequestMsg(tail)\n );\n\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n // Assert that the payload has an UPDATE_COMMITTED_TAIL response and that\n // the base header fields have remained the same.\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasUpdateCommittedTailResponse());\n\n // Verify that the tail has been updated in the StreamLog.\n verify(mStreamLog).updateCommittedTail(tail);\n }",
"@Test\n public void runSteelThreadHappyPathFacilities() {\n SteelThreadSystemCheck test =\n new SteelThreadSystemCheck(\n eeClient, facilitiesClient, \"123\", ledger, failureThresholdForTests);\n when(facilitiesClient.nearbyFacilities(Mockito.any(), Mockito.anyInt(), Mockito.anyString()))\n .thenReturn(VaFacilitiesResponse.builder().build());\n test.runSteelThreadCheckAsynchronously();\n verify(ledger, times(1)).recordSuccess();\n }",
"@Test\n public void testGetAuditLogDownloadStatus() throws Exception {\n // =================================================================\n // AuditLogService::getAuditLogDownload\n // =================================================================\n // Set Selector\n AuditLogDateRange dateRange = new AuditLogDateRange();\n // It specifies the current month\n SimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd\");\n Calendar cal = new GregorianCalendar();\n Date now = cal.getTime();\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH);\n int date = 1;\n cal.set(year, month, date, 0, 0, 0);\n\n dateRange.setStartDate(format.format(cal.getTime()));\n dateRange.setEndDate(format.format(now));\n\n AuditLogDownloadSelector auditLogDownloadSelector = new AuditLogDownloadSelector();\n auditLogDownloadSelector.setAccountId(accountId);\n auditLogDownloadSelector.setDateRange(dateRange);;\n auditLogDownloadSelector.getUpdateSources().add(AuditLogUpdateSource.API);\n auditLogDownloadSelector.getUpdateSources().add(AuditLogUpdateSource.CAMPAIGN_MANAGEMENT_TOOL);\n\n // Run\n List<AuditLogDownloadValues> getAuditLogDownloadResponse = null;\n try {\n getAuditLogDownloadResponse = AuditLogDownloadSample.getAuditLogDownload(auditLogDownloadSelector);\n } catch (Exception e) {\n fail();\n }\n\n // =================================================================\n // AuditLogService::getAuditLogDownloadStatus\n // =================================================================\n // Set Selector\n AuditLogDownloadStatusSelector auditLogDownloadStatusSelector = new AuditLogDownloadStatusSelector();\n auditLogDownloadStatusSelector.setAccountId(accountId);\n auditLogDownloadStatusSelector.getAuditLogJobIds().add(Long.valueOf(getAuditLogDownloadResponse.get(0).getAuditLogJob().getAuditLogJobId()));\n\n // Run\n List<AuditLogDownloadValues> getAuditLogDownloadStatusResponse = null;\n try {\n getAuditLogDownloadStatusResponse = AuditLogDownloadSample.getAuditLogDownloadStatus(auditLogDownloadStatusSelector);\n } catch (Exception e) {\n fail();\n }\n\n // Assert\n for (AuditLogDownloadValues AuditLogDownloadValues : getAuditLogDownloadStatusResponse) {\n assertThat(AuditLogDownloadValues.isOperationSucceeded(), is(true));\n assertThat(AuditLogDownloadValues.getAuditLogJob().getAccountId(), is(notNullValue()));\n }\n }",
"@Test\n public void getBatchTest() {\n String token = null;\n // List<BatchReturn> response = api.getBatch(token);\n\n // TODO: test validations\n }",
"@Test\n public void eventRequestsFlow() throws JSONException {\n List<Activity> activities=getActivities(Status.OPEN);\n Activity activity=null;\n for (Activity a:activities) {\n if (a.getStatus().equalsIgnoreCase(Status.OPEN)) {\n activity=a;\n break;\n }\n }\n\n EventRequest eventRequest=new EventRequest();\n eventRequest.setDate(1450094383L);\n eventRequest.setAddress(\"an address\");\n eventRequest.setLon(2.343);\n eventRequest.setLat(34.3432);\n eventRequest.setRequestMessage(\"yo mate do you wanna do this?\");\n eventRequest.setType(Action.ADD_EVENT);\n\n Response response=client.target(hostname + \"/rest/activities/\" + codingUtilities.toUtf(activity.getId()) + \"/requests\")\n .request(MediaType.APPLICATION_JSON_TYPE).header(\"Cookie\", getSessionId(user3Email))\n .post(Entity.entity(eventRequest, MediaType.APPLICATION_JSON_TYPE));\n\n assertEquals(200, response.getStatus());\n eventRequest=response.readEntity(EventRequest.class);\n\n //REPLY\n eventRequest.setStatus(Status.ACCEPTED);\n\n response=client.target(hostname + \"/rest/activities/requests/\" + codingUtilities.toUtf(eventRequest.getId()))\n .request().header(\"Cookie\", getSessionId())\n .put(Entity.entity(eventRequest, MediaType.APPLICATION_JSON_TYPE));\n\n //test if event is created\n response = client.target(hostname + \"/rest/activities/\" + codingUtilities.toUtf(activity.getId()))\n .request().header(\"Cookie\", getSessionId()).get();\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n assertEquals(true,response.hasEntity());\n Activity retAct=response.readEntity(Activity.class);\n boolean contains=false;\n String eventId=null;\n for (Event e:retAct.getEvents()) {\n if (e.getAddress().equalsIgnoreCase(\"an address\")) {\n eventId=e.getId(); //keep it for later use\n assertEquals(e.getActivityId(),activity.getId()); //are we talking about the original activity here?\n assertEquals(Status.OPEN,e.getStatus());\n contains=true;\n break;\n }\n }\n\n assertEquals(true, contains);\n\n //let's add another user so we have two users to test the voting system\n EventRequest participationRequest=new EventRequest();\n participationRequest.setType(Action.PARTICIPATE_EVENT);\n participationRequest.setRequestMessage(\"Looks cool, I want to come with you\");\n\n response=client.target(hostname+\"/rest/activities/\" + codingUtilities.toUtf(activity.getId()) + \"/events/\"+\n codingUtilities.toUtf(eventId) +\"/requests/\")\n .request(MediaType.APPLICATION_JSON_TYPE).header(\"Cookie\", getSessionId(\"testuser2@test.com\"))\n .post(Entity.entity(participationRequest, MediaType.APPLICATION_JSON_TYPE));\n participationRequest=response.readEntity(EventRequest.class);\n\n //reject her\n\n participationRequest.setStatus(Status.REJECTED);\n response=client.target(hostname + \"/rest/activities/requests/\" + codingUtilities.toUtf(participationRequest.getId()))\n .request().header(\"Cookie\", getSessionId())\n .put(Entity.entity(participationRequest, MediaType.APPLICATION_JSON_TYPE));\n\n //check that she is not a participant\n response=client.target(hostname+\"/rest/activities/\"+codingUtilities.toUtf(activity.getId()) + \"/events/\"+codingUtilities.toUtf(eventId))\n .request().header(\"Cookie\", getSessionId()).get();\n Event retEvent=response.readEntity(Event.class);\n assertEquals(false,retEvent.getParticipants().contains(\"claire\"));\n\n //AGAIN\n //let's add another user so we have two users to test the voting system\n\n participationRequest=new EventRequest();\n participationRequest.setType(Action.PARTICIPATE_EVENT);\n participationRequest.setRequestMessage(\"hey,pleeeeaseee?\");\n\n response=client.target(hostname + \"/rest/activities/\" + codingUtilities.toUtf(activity.getId()) + \"/events/\" +\n codingUtilities.toUtf(eventId) + \"/requests/\")\n .request().header(\"Cookie\", getSessionId(\"testuser2@test.com\"))\n .post(Entity.entity(participationRequest, MediaType.APPLICATION_JSON_TYPE));\n\n participationRequest=response.readEntity(EventRequest.class);\n\n //accept her\n\n participationRequest.setStatus(Status.ACCEPTED);\n response=client.target(hostname + \"/rest/activities/requests/\" + codingUtilities.toUtf(participationRequest.getId()))\n .request().header(\"Cookie\", getSessionId())\n .put(Entity.entity(participationRequest, MediaType.APPLICATION_JSON_TYPE));\n\n\n //check that she is a participant\n response=client.target(hostname+\"/rest/activities/\"+codingUtilities.toUtf(activity.getId()) + \"/events/\"+codingUtilities.toUtf(eventId))\n .request().header(\"Cookie\", getSessionId()).get();\n retEvent=response.readEntity(Event.class);\n assertEquals(true,retEvent.getParticipants().stream().anyMatch(u->u.getUsername().equalsIgnoreCase(\"testuser2\")));\n\n //test that testuser3 has a notification that testuser2 was added as a participant\n response = client.target(hostname + \"/rest/auth/echo/\").request()\n .header(\"Cookie\", getSessionId(\"testuser3@test.com\")).get();\n assertEquals(true, response.hasEntity());\n String res=response.readEntity(String.class);\n JSONObject userData=new JSONObject(res);\n JSONArray notifications=userData.getJSONArray(\"notifications\");\n boolean found=false;\n for (int i=0;i<notifications.length();i++){\n JSONObject jsonObject=notifications.getJSONObject(i);\n if (jsonObject.get(\"action\").equals(Action.PARTICIPATE_EVENT) && jsonObject.getJSONArray(\"sourceDisplayNames\").getString(0).equals(\"testuser2\")){\n found = true;\n }\n }\n assertEquals(true, found);\n\n //now send a modification request for the same event\n eventRequest=new EventRequest();\n eventRequest.setType(Action.UPDATE_EVENT);\n eventRequest.setDate(145009444443L);\n eventRequest.setAddress(\"address 25\");\n eventRequest.setLon(2.343);\n eventRequest.setLat(34.3432);\n eventRequest.setRequestMessage(\"can we please change the address and time?\");\n\n response=client.target(hostname + \"/rest/activities/\" + codingUtilities.toUtf(activity.getId()) + \"/events/\"+\n codingUtilities.toUtf(eventId) +\"/requests/\")\n .request().header(\"Cookie\", getSessionId(\"testuser3@test.com\"))\n .post(Entity.entity(eventRequest, MediaType.APPLICATION_JSON_TYPE));\n\n eventRequest=response.readEntity(EventRequest.class);\n\n //start the voting system test\n\n eventRequest.setStatus(Status.VOTING);\n eventRequest.setDemocracyType(EventRequest.ABSOLUTE_MAJORITY);\n\n response=client.target(hostname + \"/rest/activities/requests/\" + codingUtilities.toUtf(eventRequest.getId()))\n .request().header(\"Cookie\", getSessionId())\n .put(Entity.entity(eventRequest, MediaType.APPLICATION_JSON_TYPE));\n\n\n //now test that user2 sees the request and also she has a notification for it and she can vote\n response=client.target(hostname+\"/rest/users/me/requests\").request().header(\"Cookie\", getSessionId(user3Email)).get();\n JSONArray requests=new JSONArray(response.readEntity(String.class));\n contains=false;\n for (int i=0;i<requests.length();i++) {\n JSONObject request=requests.getJSONObject(i);\n if (request.getString(\"id\").equalsIgnoreCase(eventRequest.getId())) {\n contains=true;\n assertEquals(request.getString(\"status\"),Status.VOTING);\n break;\n }\n }\n assertEquals(true,contains);\n\n response = client.target(hostname + \"/rest/auth/echo/\").request()\n .header(\"Cookie\", getSessionId(\"testuser3@test.com\")).get();\n assertEquals(true, response.hasEntity());\n res=response.readEntity(String.class);\n userData=new JSONObject(res);\n notifications=userData.getJSONArray(\"notifications\");\n found=false;\n for (int i=0;i<notifications.length();i++){\n JSONObject jsonObject=notifications.getJSONObject(i);\n if (jsonObject.get(\"action\").equals(Action.REQUEST_REFERRED) && jsonObject.getJSONArray(\"targetIds\").getString(0).equals(eventRequest.getId())){\n found = true;\n }\n }\n assertEquals(true, found);\n\n //vote as user2\n Vote vote=new Vote();\n vote.setAction(Verbs.ACCEPT);\n vote.setMessage(\"count me in!\");\n response=client.target(hostname + \"/rest/activities/requests/\" + codingUtilities.toUtf(eventRequest.getId()) + \"/votes\")\n .request().header(\"Cookie\", getSessionId(user2Email))\n .post(Entity.entity(vote,MediaType.APPLICATION_JSON_TYPE));\n assertEquals(200,response.getStatus());\n\n\n vote=new Vote();\n vote.setAction(Verbs.ACCEPT);\n vote.setMessage(\"ok guys if you want it so bad I will change it\");\n response=client.target(hostname + \"/rest/activities/requests/\" + codingUtilities.toUtf(eventRequest.getId()) + \"/votes\")\n .request().header(\"Cookie\", getSessionId())\n .post(Entity.entity(vote,MediaType.APPLICATION_JSON_TYPE));\n assertEquals(200,response.getStatus());\n\n //test if event is changed\n response = client.target(hostname + \"/rest/activities/\" + codingUtilities.toUtf(activity.getId()) + \"/events/\" + codingUtilities.toUtf(eventId))\n .request().header(\"Cookie\", getSessionId()).get();\n\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n assertEquals(true,response.hasEntity());\n Event event=response.readEntity(Event.class);\n assertEquals(\"address 25\",event.getAddress());\n\n //try to delete the request (should result in badrequest because it is already accepted)\n response=client.target(hostname + \"/rest/activities\"\n + \"/requests/\" + codingUtilities.toUtf(eventRequest.getId()))\n .request().header(\"Cookie\", getSessionId(user3Email))\n .delete();\n\n assertEquals(400,response.getStatus());\n\n //todo get a list of the requests and see if the request is accepted\n response=client.target(hostname + \"/rest/users/me/requests\").request().header(\"Cookie\", getSessionId()).get();\n requests=new JSONArray(response.readEntity(String.class));\n contains=false;\n for (int i=0;i<requests.length();i++) {\n JSONObject request=requests.getJSONObject(i);\n if (request.getString(\"id\").equalsIgnoreCase(eventRequest.getId())) {\n contains=true;\n assertEquals(request.getString(\"status\"),Status.ACCEPTED);\n break;\n }\n }\n assertEquals(true,contains);\n\n //send an un-participate request as user2 and then check the event for participants\n response=client.target(hostname + \"/rest/activities/requests/\" + codingUtilities.toUtf(participationRequest.getId()))\n .request().header(\"Cookie\", getSessionId(user2Email))\n .delete();\n\n assertEquals(200,response.getStatus());\n\n //check that she is NOT a participant\n response=client.target(hostname + \"/rest/activities/\" + codingUtilities.toUtf(activity.getId()) + \"/events/\" + codingUtilities.toUtf(eventId))\n .request().header(\"Cookie\", getSessionId(user1Email))\n .get();\n\n retEvent=response.readEntity(Event.class);\n assertEquals(false,retEvent.getParticipants().contains(\"testuser2\"));\n\n }",
"@Test\n public void postMethod() throws BonitaException, InterruptedException {\n stubFor(post(urlEqualTo(\"/\"))\n .willReturn(aResponse().withStatus(HttpStatus.SC_OK)));\n\n checkResultIsPresent(executeConnector(buildMethodParametersSet(POST)));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the cbSize value for this Menuinfo. | public int getCbSize() {
return cbSize;
} | [
"public int getComboSize()\n {\n return comboSize;\n }",
"public int getSelectedSize() {\n\t\t\treturn resultSize;\n\t\t}",
"public int getSetSize(){ return Integer.parseInt(setSize.getText()); }",
"private final int getMaxComboSize() {\n\t\treturn (2 + level);\n\t}",
"public static byte getSize() {\n return SIZE;\n }",
"public String getCoolBarSizes() {\r\n\t\t\treturn this.toolBarSizes.toString();\t\t\r\n\t}",
"public String getSizeLabel() {\n return (String)getAttributeInternal(SIZELABEL);\n }",
"public Long getMaxSizeList() {\r\n\t\treturn GestionPropiedadesConfiguracion.getMaxSizeList();\r\n\t}",
"@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }",
"public int getSectorSize() {\n int sectorSizeSelectionIndex = sectorSizeComboBox.getSelectedIndex();\n\n if (sectorSizeSelectionIndex == 0) {\n return 0;\n }\n\n return Integer.valueOf((String) sectorSizeComboBox.getSelectedItem());\n }",
"public JComboBox<Integer> getFontSizeBox() {\n\t\treturn ((PanelModification) this.panelModification).getFontSizeBox();\n\t}",
"public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }",
"public Integer getSize() {\r\n if (obj != null) {\r\n return obj.getPayload().length;\r\n }\r\n else { \r\n return getInteger(\"size\"); \r\n }\r\n }",
"public final long getFileSize() {\n\t\treturn m_info.getSize();\n\t}",
"public int getBoxSize() {\n\t\treturn this.boxSize;\n\t}",
"public int getccSize() {\n\t\treturn ccSize;\n\t}",
"public long getCurrentSize()\n {\n return this.current_size;\n }",
"public String getIconSize() {\n\t\treturn (String) getStateHelper().eval(PropertyKeys.iconSize);\n\t}",
"public Integer sizeLimitInBytes() {\n return this.sizeLimitInBytes;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates boat position when no keys are pressed or when control() is no longer being called (e.g. after the race is over). Boat speed is decreasing (due to drag), position keeps increasing until the speed is below 0. Speed is clamped at 0 when it goes below 0 (or reaches 0) | public void update(){
if (boatStats.getSpeed() > 0){
boatStats.setSpeed(boatStats.getSpeed() - boatStats.getDeceleration());
boatPosition.setPosY(boatPosition.getPosY() + boatStats.getSpeed());
} else {
boatStats.setSpeed(0);
}
} | [
"public void brake(){\n if (speed <= 0){\n speed = 0;\n }\n else{\n speed -= 5;\n }\n }",
"public void moveBricks()\n\t{\n\t\tint a, b;\n\t\t// Bounce off the right wall\n\t\tif(locationX + velocityX > maxX )\n\t\t{\n\t\t\ta = maxX - locationX;\n\t\t\tb = velocityX - a;\n\t\t\tlocationX = maxX - b;\n\t\t\tvelocityX = velocityX * (-1);\t\n\t\t\t\n\t\t}\n\t\t// Bounce off the left wall\n\t\telse if(locationX + velocityX < minX)\n\t\t{\n\t\t\ta = minX - locationX;\n\t\t\tb = velocityX - a;\n\t\t\tlocationX = minX - b;\n\t\t\tvelocityX = velocityX * (-1);\t\n\t\t}\n\t\t// Bounce off the bottom wall\n\t\telse if(locationY + velocityY > maxY)\n\t\t{\n\t\t\ta = maxY - locationY;\n\t\t\tb = velocityY - a;\n\t\t\tlocationY = maxY - b;\n\n\t\t\tvelocityY = velocityY * (-1);\n\t\t}\n\t\t// Bounce off the top wall\n\t\telse if(locationY + velocityY < minY)\n\t\t{\n\t\t\ta = minY - locationY;\n\t\t\tb = velocityY - a;\n\t\t\tlocationY = minY - b;\n\n\t\t\tvelocityY = velocityY * (-1);\n\t\t}\n\t\telse\n\t\t\tlocationX = locationX + velocityX;\n\t\t\tlocationY = locationY + velocityY;\n\t}",
"@Override\n public void teleopPeriodic() {\n\n if (m_joystick.getRawButton(1)){\n\n m_intake.set(Value.kReverse);\n\n\n // beltSpeed = 1;\n }\n else {\n\n m_intake.set(Value.kForward);\n\n //beltSpeed = 0;\n\n }\n \n }",
"private void controlMovement() {\n swerveDrive.setAmountTurn(gamepad1.left_stick_x);\n swerveDrive.setPowerOverall(gamepad1.right_stick_y);\n\n }",
"public void Robotmoving(){\n\t\t\n\t\tif (distance <= 0) {\n\t\t\tif (!commands.isEmpty()){\n\t\t\t\tInteger[] nextCommand = commands.remove();\n\t\t\t\tcommand = nextCommand[0];\n\t\t\t\tdistance = nextCommand[1];\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (command == 1){\n\t\t\t\n \tforward();\n\t\tdistance = distance - speed;}\n \telse if (command == 2){\n \tbackward();\n\t\tdistance = distance - speed;}\n \telse if (command == 3){\n \trotateAntiClockWise();\n\t\tdistance = distance - rotSpeed;}\n \telse if (command == 4){\n rotateClockWise();\n\t\tdistance = distance - rotSpeed;}\n \telse if (command == 5){\n \t\tif (wantsToKick == false){\n \t\t\twantsToKick = true;\n \t\t}\n \t\t\n \t}\n\t}",
"public void update(Controller controller) {\r\n\t\t// Friction removing speed depending on weight.\r\n\t\tdx = dx - dx * 0.04;\r\n\r\n\t\t// Force = k * Distance From Equilibrium * Mass\r\n\t\tdx += 0.00016 * (1.75 - x) * (1 / (fatLevel)); // Elastic rope:\r\n\t\t\t\t\t\t\t\t\t\t\t \r\n\r\n\t\tif (controller.keys[KeyEvent.VK_RIGHT] || controller.keys[KeyEvent.VK_D]){\r\n\t\t\tdx += 0.0004;\r\n\t\t}\r\n\t\tif (controller.keys[KeyEvent.VK_LEFT] || controller.keys[KeyEvent.VK_A]){\r\n\t\t\tdx -= 0.0004;\r\n\t\t\t//Moving against the rope's force burns fat\r\n\t\t\tfatLevel -= 0.003;\r\n\t\t}\r\n\r\n\t\tx += dx;\r\n\r\n\t\tlimitScreenMovement();\r\n\t\t\r\n\r\n\t\t// Movement Y-axis\r\n\t\tif (controller.keys[KeyEvent.VK_UP] || controller.keys[KeyEvent.VK_W]) {\r\n\t\t\tjump();\r\n\t\t}\r\n\t\t/*\r\n\t\t * This prevents double-jumping.\r\n\t\t * By setting the number of jump-key presses over the allowed value \r\n\t\t * for adding more speed, no more force will be added if the key is \r\n\t\t * pressed again.\r\n\t\t */\r\n\t\telse if(jumping){\r\n\t\t\tjumpKeyPresses = 100;\r\n\t\t\tjumping = false;\r\n\t\t}\r\n\r\n\t\ty += dy;\r\n\t\t\r\n\t\t//If the player is jumping, add the gravitational acceleration to dy.\r\n\t\tif (jumpKeyPresses > 0) {\r\n\t\t\tdy += 0.0009;\r\n\t\t\t\r\n\t\t\t//If the player just hit the ground, reset speed and position.\r\n\t\t\tif (y > groundLevel) {\r\n\t\t\t\tdy = 0;\r\n\t\t\t\ty = groundLevel;\r\n\t\t\t\tjumpKeyPresses = 0;\r\n\t\t\t\t//Jumping burns fat.\r\n\t\t\t\tfatLevel -= 0.05;\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void move(){\n \n currentAnimation = idleDown;\n \n if(playerKeyInput.allKeys[VK_W]){\n int ty = (int) (objectCoordinateY - speed + bounds.y) / 16;\n \n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY -= speed;\n currentAnimation = upWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_S]){\n int ty = (int) (objectCoordinateY + speed + bounds.y + bounds.height) / 16;\n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY += speed;\n currentAnimation = downWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_A]){\n int tx = (int) (objectCoordinateX - speed + bounds.x) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX -= speed;\n currentAnimation = sideWalkLeft;\n }\n } \n \n if(playerKeyInput.allKeys[VK_D]){\n int tx = (int) (objectCoordinateX + speed + bounds.x + bounds.width) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX += speed;\n currentAnimation = sideWalkRight;\n }\n } \n \n if(playerKeyInput.allKeys[VK_E]){\n currentAnimation = pickUp;\n } \n }",
"private void Movement()\n {\n ///aceste verificari ajuta la modificarea vitezei mobului in cazul miscarii hartii care la randul ei este determinata de miscarea playerului adica de apasarea tastelor wasd\n if(KeyPress.a_pressed==true&&stop==false) {\n if(facing==0)\n VelX=2;\n else\n VelX=2;\n }\n if(KeyPress.d_pressed==true&&stop==false) {\n if(facing==0)\n VelX=-2;\n else\n VelX=-2;\n }\n if((KeyPress.a_pressed==false&&KeyPress.d_pressed==false)||(stop==true))\n {\n if(facing==0)\n VelX=0;\n else\n VelX=0;\n }\n stop=false;\n\n }",
"public void liftWobbleGoal() {\n liftServo.setPosition(UP_POSITION);\n }",
"void update(long fps){\r\n\r\n // Move the bat based on the mBatMoving variable\r\n // and the speed of the previous frame\r\n if(mBatMoving == LEFT){\r\n mXCoord = mXCoord - mBatSpeed / fps;\r\n }\r\n\r\n if(mBatMoving == RIGHT){\r\n mXCoord = mXCoord + mBatSpeed / fps;\r\n }\r\n\r\n // Stop the bat going off the screen\r\n if(mXCoord < 0){\r\n mXCoord = 0;\r\n bigBatCounter++;\r\n\r\n switch (bigBatCounter) {\r\n\r\n case 1:\r\n batTimer = System.currentTimeMillis();\r\n break;\r\n\r\n case 400:\r\n\r\n\r\n if (System.currentTimeMillis() - batTimer < 8000) {\r\n\r\n mLength = mScreenX / 4;\r\n batBoost = \"Boost: Bat Size\";\r\n\r\n }\r\n bigBatCounter = 0;\r\n break;\r\n\r\n }\r\n\r\n }\r\n\r\n if(mXCoord + mLength > mScreenX){\r\n mXCoord = mScreenX - mLength;\r\n\r\n bigBatCounter++;\r\n\r\n switch (bigBatCounter) {\r\n\r\n case 1:\r\n batTimer = System.currentTimeMillis();\r\n break;\r\n\r\n case 400:\r\n\r\n\r\n if (System.currentTimeMillis() - batTimer < 8000) {\r\n\r\n mBatSpeed = mBatSpeed * 1.3f;\r\n batBoost = \"Boost: Bat Speed\";\r\n\r\n }\r\n bigBatCounter = 0;\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // Update mRect based on the results from\r\n // the previous code in update\r\n mRect.left = mXCoord;\r\n mRect.right = mXCoord + mLength;\r\n }",
"public void movement()\n\t{\n\t\tballoonY = balloonY + speedBalloonY1;\n\t\tif(balloonY > 700)\n\t\t{\n\t\t\tballoonY = -50;\n\t\t\tballoonX = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon2Y = balloon2Y + speedBalloonY2;\n\t\tif(balloon2Y > 700)\n\t\t{\n\t\t\tballoon2Y = -50;\n\t\t\tballoon2X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon3Y = balloon3Y + speedBalloonY3;\n\t\tif(balloon3Y > 700)\n\t\t{\n\t\t\tballoon3Y = -50;\n\t\t\tballoon3X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon4Y = balloon4Y + speedBalloonY4;\n\t\tif(balloon4Y > 700)\n\t\t{\n\t\t\tballoon4Y = -50;\n\t\t\tballoon4X = (gen.nextInt(900)-75);\n\t\t}\n\t\t\n\t\tballoon5Y = balloon5Y + speedBalloonY5;\n\t\tif(balloon5Y > 700)\n\t\t{\n\t\t\tballoon5Y = -50;\n\t\t\tballoon5X = (gen.nextInt(900)-75);\n\t\t}\n\t}",
"public void move() {\n track += speed;\n speed += acceleration;\n if (speed <= 0) {\n speed =0;\n }\n if (speed >= MAX_SPEED) {\n speed = MAX_SPEED;\n }\n y -= dy;\n if (y <=MAX_TOP) {\n y = MAX_TOP;\n }\n if (y >=MAX_BOTTOM){\n y = MAX_BOTTOM;\n }\n if (layer2 - speed <= 0) {\n layer1 = 0;\n layer2 = 2400;\n } else {\n\n layer1 -= speed;\n layer2 -= speed;\n }\n }",
"@Override\n public void move() {\n int speed = this.getSpeed();\n this.setSpeed(speed - 1);\n\n if (this.getSpeed() == 0) {\n super.move();\n this.setSpeed(1);\n }\n }",
"public void brake() {\n if (body.getLinearVelocity().x <= 0) {\n return;\n }\n float force = -acceleration * body.getMass() * 0.5f;\n body.applyForceToCenter(force, 0f, true);\n }",
"@Override\n public void move() {\n final int speed = this.getSpeed();\n this.setSpeed(speed - 1);\n\n if (this.getSpeed() == 0) {\n super.move();\n this.setSpeed(2);\n }\n }",
"private void move(KeyEvent e) {\r\n\t\tif ((getGoal() > getY() && e.getKeyCode() == upKey)\r\n\t\t\t\t|| (getGoal() < getY() && e.getKeyCode() == downKey)) {\r\n\t\t\tsetGoalY(getY());\r\n\t\t}\r\n\t\tif (Math.abs(getGoal() - getY()) < Config.KB_THRESHOLD) {\r\n\t\t\tif (e.getKeyCode() == upKey) {\r\n\t\t\t\tsetGoalY(getGoal() - Config.KB_MOVE_PER_CLICK);\r\n\t\t\t} else if (e.getKeyCode() == downKey) {\r\n\t\t\t\tsetGoalY(getGoal() + Config.KB_MOVE_PER_CLICK);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (e.getKeyCode() == shootKey) {\r\n\t\t\tspawnBullet();\r\n\t\t}\r\n\t\tif (e.getKeyCode() == shieldKey) {\r\n\t\t\tshield();\r\n\t\t}\r\n\t}",
"void move(){\n holostoiHod = false;\n currentSpeed = getSpeedFromPowerful(totalPowerful);\n }",
"public void keyReleased(KeyEvent evt){\r\n\t\t \tpaddle.setSpeed(0);\r\n\t\t }",
"public void move() {\n this.y -= this.speed;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads the lexicon into a data structure for later use. | public void loadLexicon(String fileName) {
if (fileName == null) {
throw new IllegalArgumentException("Error reading from file.");
}
try {
lexicon = new TreeSet<String>();
Scanner s =
new Scanner(new FileReader(fileName));
while (s.hasNext()) {
String str = s.next();
lexicon.add(str.toLowerCase());
s.nextLine();
}
}
catch (Exception e) {
throw new IllegalArgumentException("Error reading from file.");
}
isLexiconLoaded = true;
} | [
"public Lexicon() {\n\t\ttokenForm2index = new TreeMap<String, int[]>();\n\t\tindex2docfreq = new TreeMap();\n\t\tlabels = new ArrayList<String>();\n\t}",
"private void convertLexicon() {\t\t\n\t\t\t\n\t\tParameters.reportLineFlush(\"Extracting lexical rules\");\n\t\tlexicon = new Hashtable<String, Double>();\n\t\t\n\t\tScanner lexiconScan = FileUtil.getScanner(petrovLexiconFile); \n\t\twhile(lexiconScan.hasNextLine()) {\n\t\t\tString line = lexiconScan.nextLine();\n\t\t\tline = line.replaceAll(\"\\\\\\\\\", \"\");\t\t\t\n\t\t\tString[] lineSplit = line.split(\"\\\\s\");\n\t\t\tint length = lineSplit.length;\n\t\t\tString pos = lineSplit[0];\n\t\t\tString lex = lineSplit[1];\n\t\t\t\t\n\t\t\tint index = 0;\n\t\t\tfor(int i=2; i<length; i++) {\t\t\t\t\n\t\t\t\tdouble prob = cleanProb(lineSplit[i]);\n\t\t\t\tif (prob>minProbRule) {\n\t\t\t\t\tString rule = pos + \"-\" + index + \" \" + lex;\n\t\t\t\t\tlexicon.put(rule, prob);\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\t\n\t}",
"private static void loadLexicon(String fileName) throws Exception {\r\n\t\tpositive = new HashSet<String>();\r\n\t\tnegative = new HashSet<String>();\r\n\t\tanger = new HashSet<String>();\r\n\t\tanticipation = new HashSet<String>();\r\n\t\tdisgust = new HashSet<String>();\r\n\t\tfear = new HashSet<String>();\r\n\t\tjoy = new HashSet<String>();\r\n\t\tsadness = new HashSet<String>();\r\n\t\tsurprise = new HashSet<String>();\r\n\t\ttrust = new HashSet<String>();\r\n\t\tReader in = new FileReader(fileName);\r\n\t\tIterable<CSVRecord> records = CSVFormat.EXCEL.withFirstRecordAsHeader().parse(in);\r\n\t\tfor (CSVRecord record : records) {\r\n\t\t\tString word = record.get(\"word\");\r\n\t\t\tString type = record.get(\"type\");\r\n\t\t\tint score = Integer.valueOf(record.get(\"score\"));\r\n\t\t\tif (score == 1) {\r\n\t\t\t\tswitch (type) {\r\n\t\t\t\tcase \"positive\":\r\n\t\t\t\t\tpositive.add(word);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"negative\":\r\n\t\t\t\t\tnegative.add(word);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"anger\":\r\n\t\t\t\t\tanger.add(word);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"anticipation\":\r\n\t\t\t\t\tanticipation.add(word);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"disgust\":\r\n\t\t\t\t\tdisgust.add(word);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"fear\":\r\n\t\t\t\t\tfear.add(word);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"joy\":\r\n\t\t\t\t\tjoy.add(word);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"sadness\":\r\n\t\t\t\t\tsadness.add(word);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"surprise\":\r\n\t\t\t\t\tsurprise.add(word);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"trust\":\r\n\t\t\t\t\ttrust.add(word);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void buildLexicon(){\n try {\n InputStream input = getAssets().open(\"lexicon_Formatted.txt\");\n lexicon = new Lexicon(input);\n } catch (IOException e){\n\n }\n }",
"public void addLexicon(String filename) {\n try {\n BufferedReader lexiconReader = new BufferedReader(new InputStreamReader(new FileInputStream(filename), \"UTF-8\"));\n String lexiconLine;\n while ((lexiconLine = lexiconReader.readLine()) != null) {\n addStringToLexicon(lexiconLine);\n }\n } catch (FileNotFoundException e) {\n logger.error(\"Lexicon not found: \"+ filename);\n System.exit(-1);\n } catch (IOException e) {\n logger.error(\"IO error while reading: \"+ filename, e);\n throw new RuntimeException(e);\n }\n }",
"public void load(){\n try {\n this.engineMeta.setDirToSave(this.getMetadataFilePath());\n this.mapperDocFiles.setDirToSave(new File(this.getMapperIdFilePath()));\n this.posIndex.loadLexiconArray(this.getLexiconArrayFilePath());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public Doublets(InputStream in) {\n try {\n //////////////////////////////////////\n // INSTANTIATE lexicon OBJECT HERE //\n //////////////////////////////////////\n lexicon = new HashSet<String>();\n Scanner s =\n new Scanner(new BufferedReader(new InputStreamReader(in)));\n while (s.hasNext()) {\n String str = s.next();\n /////////////////////////////////////////////////////////////\n // INSERT CODE HERE TO APPROPRIATELY STORE str IN lexicon. //\n /////////////////////////////////////////////////////////////\n lexicon.add(str.toLowerCase());\n s.nextLine();\n }\n in.close();\n }\n catch (java.io.IOException e) {\n System.err.println(\"Error reading from InputStream.\");\n System.exit(1);\n }\n }",
"private static void init()\n {\n try\n {\n ObjectInputStream ois = \n new ObjectInputStream(new FileInputStream(lexFile));\n lexDB = (HashMap)ois.readObject();\n ois.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"File not found: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } catch (IOException e) {\n System.err.println(\"IO Exception: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } catch (ClassNotFoundException e) {\n System.err.println(\"Class Not Found Exception: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } // catch\n }",
"public abstract Lexicon<String> getLexicon();",
"public Lexicon getLexicon() {\n\treturn lexicon;\n }",
"public void loadSymbol(String symbol);",
"public void setLexicon(Lexicon lexicon) {\n\tthis.lexicon = lexicon;\n\n }",
"private void constructGlobalLexicon (MessageStore store) {\n\t\tglobalLexicon = new InMemoryLexicon();\n\t\tfor (int i = 0 ; i < this.nClasses; ++i) {\n\t\t\tIInvertedIndex localIndex = store.getIndexes()[i];\n\t\t\tIterator<String> iterator = localIndex.getLexicon().iterator();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tglobalLexicon.addValue(iterator.next());\n\t\t\t}\n\t\t}\n\t}",
"int CPRCEN_engine_load_user_lexicon(Pointer eng, int voice_index, String fname);",
"public void load(String path) {\r\n\r\n\t\t// If the name is already set by the user\r\n\t\tif ((path != null) && (!path.trim().equalsIgnoreCase(\"\"))) {\r\n\t\t\ttry {\r\n\r\n\t\t\t\t// Creates the XStream object\r\n\t\t\t\tXStream x = new XStream(new DomDriver());\r\n\r\n\t\t\t\t// Creates the file input stream\r\n\t\t\t\tFileInputStream fileInputStream = new FileInputStream(path);\r\n\r\n\t\t\t\t// Gets the lexicon configuration from the XML file\r\n\t\t\t\tAcideMenuIconsConfiguration menuIconsConfiguration = \r\n\t\t\t\t\t\t(AcideMenuIconsConfiguration) x.fromXML(fileInputStream);\r\n\r\n\t\r\n\t\t\t\t// Gets the commands manager\r\n\t\t\t\tAcideMenuIconsManager iconsManager = menuIconsConfiguration\r\n\t\t\t\t\t\t.getMenuIconsManager();\r\n\r\n\t\t\t\t// Closes the file input stream\r\n\t\t\t\tfileInputStream.close();\r\n\r\n\t\t\t\t// Stores the items manager\r\n\t\t\t\t_iconsManager = iconsManager;\r\n\r\n\t\t\t} catch (Exception exception) {\r\n\r\n\t\t\t\t// Displays an error message\r\n\t\t\t\tJOptionPane.showMessageDialog(null, AcideLanguageManager\r\n\t\t\t\t\t\t.getInstance().getLabels().getString(\"s2151\")\r\n\t\t\t\t\t\t+ path\r\n\t\t\t\t\t\t+ AcideLanguageManager.getInstance().getLabels()\r\n\t\t\t\t\t\t\t\t.getString(\"s957\")\r\n\t\t\t\t\t\t+ DEFAULT_PATH\r\n\t\t\t\t\t\t+ DEFAULT_NAME);\r\n\r\n\t\t\t\t// If the file does not exist, loads the default configuration\r\n\t\t\t\tload(DEFAULT_PATH + DEFAULT_NAME);\r\n\r\n\t\t\t\t// Updates the log\r\n\t\t\t\tAcideLog.getLog().info(\r\n\t\t\t\t\t\tAcideLanguageManager.getInstance().getLabels()\r\n\t\t\t\t\t\t\t\t.getString(\"s2153\")\r\n\t\t\t\t\t\t\t\t+ \" \" + path);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setLexicon(DatabaseBackedLexicon lex);",
"public Lexicon()\r\n\t{\r\n\t\tclassNames = new Table3List<String,Integer,Provenance>();\r\n\t\tnameClasses = new Table3List<Integer,String,Provenance>();\r\n\t\tnameProperties = new Table3List<Integer,String,Provenance>();\r\n\t\tlangCount = new HashMap<String,Integer>();\r\n\t\t\r\n\t\t// Michelle\r\n\t\tcommentToEntity = new HashMap<String, ArrayList<Integer>>();\r\n\t\tentityToComment = new HashMap<Integer, ArrayList<String>>();\r\n\t}",
"public HangmanLexicon() {\n\t\ttry {\n\t\t\tr = new BufferedReader(new FileReader(\"HangmanLexicon.txt\"));\n\t\t\ttext = r.readLine(); // Read and save in text\n\t\t\twhile (text != null) { // While there is still words\n\t\t\t\tlist.add(text); // Add them in ArrayList called \"list\"\n\t\t\t\ttext = r.readLine();\n\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tr.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public Hangman(String lexiconFilePath) {\n\t\tthis.lexiconFilePath = lexiconFilePath;\n\t\tinit();\n\t\trunGame();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Online storage is a "realtime" object storage engine such as Riak CS or Amazon S3. | public @Nullable AsyncBlobStoreSupport getOnlineStorageSupport(); | [
"ObjectStorageService objectStorage();",
"public interface PersistenceStorageEngine {\n /**\n * Save a user overwrite\n *\n * @param path The path for this write\n * @param node The node for this write\n * @param writeId The write id that was used for this write\n */\n public void saveUserOverwrite(Path path, Node node, long writeId);\n\n /**\n * Save a user merge\n *\n * @param path The path for this merge\n * @param children The children for this merge\n * @param writeId The write id that was used for this merge\n */\n public void saveUserMerge(Path path, CompoundWrite children, long writeId);\n\n /**\n * Remove a write with the given write id.\n *\n * @param writeId The write id to remove\n */\n public void removeUserWrite(long writeId);\n\n /**\n * Return a list of all writes that were persisted\n *\n * @return The list of writes\n */\n public List<UserWriteRecord> loadUserWrites();\n\n /** Removes all user writes */\n public void removeAllUserWrites();\n\n /**\n * Loads all data at a path. It has no knowledge of whether the data is \"complete\" or not.\n *\n * @param path The path at which to load the node.\n * @return The node that was loaded.\n */\n public Node serverCache(Path path);\n\n /**\n * Overwrite the server cache at the given path with the given node.\n *\n * @param path The path to update\n * @param node The node to write to the cache.\n */\n public void overwriteServerCache(Path path, Node node);\n\n /**\n * Update the server cache at the given path with the given node, merging each child into the\n * cache.\n *\n * @param path The path to update\n * @param node The node to merge into the cache.\n */\n public void mergeIntoServerCache(Path path, Node node);\n\n /**\n * Update the server cache at the given path with the given children, merging each one into the\n * cache.\n *\n * @param path The path for this merge\n * @param children The children to update\n */\n public void mergeIntoServerCache(Path path, CompoundWrite children);\n\n public long serverCacheEstimatedSizeInBytes();\n\n public void saveTrackedQuery(TrackedQuery trackedQuery);\n\n public void deleteTrackedQuery(long trackedQueryId);\n\n public List<TrackedQuery> loadTrackedQueries();\n\n public void resetPreviouslyActiveTrackedQueries(long lastUse);\n\n public void saveTrackedQueryKeys(long trackedQueryId, Set<ChildKey> keys);\n\n public void updateTrackedQueryKeys(\n long trackedQueryId, Set<ChildKey> added, Set<ChildKey> removed);\n\n public Set<ChildKey> loadTrackedQueryKeys(long trackedQueryId);\n\n public Set<ChildKey> loadTrackedQueryKeys(Set<Long> trackedQueryIds);\n\n public void pruneCache(Path root, PruneForest pruneForest);\n\n public void beginTransaction();\n\n public void endTransaction();\n\n public void setTransactionSuccessful();\n\n public void close();\n}",
"public interface StorageModel {\n}",
"public interface ExternalBlobIO {\n /**\n * Write data to blob store\n * @param in: InputStream containing data to be written\n * @param actualSize: size of data in stream, or -1 if size is unknown. To be used by implementor for optimization where possible\n * @param mbox: Mailbox which contains the blob. Can optionally be used by store for partitioning\n * @return locator string for the stored blob, unique identifier created by storage protocol\n * @throws IOException\n * @throws ServiceException\n */\n String writeStreamToStore(InputStream in, long actualSize, Mailbox mbox) throws IOException, ServiceException;\n\n /**\n * Create an input stream for reading data from blob store\n * @param locator: identifier string for the blob as returned from write operation\n * @param mbox: Mailbox which contains the blob. Can optionally be used by store for partitioning\n * @return InputStream containing the data\n * @throws IOException\n */\n InputStream readStreamFromStore(String locator, Mailbox mbox) throws IOException;\n\n /**\n * Delete a blob from the store\n * @param locator: identifier string for the blob\n * @param mbox: Mailbox which contains the blob. Can optionally be used by store for partitioning\n * @return true on success false on failure\n * @throws IOException\n */\n boolean deleteFromStore(String locator, Mailbox mbox) throws IOException;\n}",
"public interface StorageService {\n\n /**\n * Method to create root directory\n *\n * @throws IOException\n */\n void init() throws IOException;\n\n /**\n * Method to store file\n *\n * @param filename\n * @param file\n */\n void store(String filename, MultipartFile file);\n\n /**\n * Method to get all files\n *\n * @return Stream of Path objects\n * @throws IOException\n */\n Stream<Path> loadAll() throws IOException;\n\n /**\n * Method to load file\n *\n * @param filename\n * @return Path object for file\n */\n Path load(String filename);\n\n /**\n * Method to delete all files in storage root directory only\n */\n void deleteAll();\n\n\tResource loadAsResource(EcomProduct prod);\n\n\tvoid storeResource(String filename, MultipartFile file);\n}",
"public static void readLocalAndFetchOnline() {\n readLocalFileData();\n\n if (USE_ONLINE_DATA) {\n fetchFromOnline();\n } else {\n SkyblockAddons.getInstance().getUpdater().checkForUpdate();\n }\n }",
"public static boolean isUsingExternalStorage()\n\t{\n\t\treturn storage == EXTERNAL_STORAGE;\n\t}",
"public interface Storage {\n\n\t/**\n\t * Gets the name of the storage.\n\t * \n\t * @return the name of this storage\n\t */\n\tString getName();\n\n\t/**\n\t * Gets the total capacity of the storage in MByte.\n\t * \n\t * @return the capacity of the storage in MB\n\t */\n\tdouble getCapacity();\n\n\t/**\n\t * Gets the current size of the storage in MByte.\n\t * \n\t * @return the current size of the storage in MB\n\t */\n\tdouble getCurrentSize();\n\n\t/**\n\t * Gets the maximum transfer rate of the storage in MByte/sec.\n\t * \n\t * @return the maximum transfer rate in MB/sec\n\t */\n\tdouble getMaxTransferRate();\n\n\t/**\n\t * Gets the available space on this storage in MByte.\n\t * \n\t * @return the available space in MB\n\t */\n\tdouble getAvailableSpace();\n\n\t/**\n\t * Sets the maximum transfer rate of this storage system in MByte/sec.\n\t * \n\t * @param rate the maximum transfer rate in MB/sec\n\t * @return <tt>true</tt> if the setting succeeded, <tt>false</tt> otherwise\n\t */\n\tboolean setMaxTransferRate(int rate);\n\n\t/**\n\t * Checks if the storage is full or not.\n\t * \n\t * @return <tt>true</tt> if the storage is full, <tt>false</tt> otherwise\n\t */\n\tboolean isFull();\n\n\t/**\n\t * Gets the number of files stored on this storage.\n\t * \n\t * @return the number of stored files\n\t */\n\tint getNumStoredFile();\n\n\t/**\n\t * Makes a reservation of the space on the storage to store a file.\n\t * \n\t * @param fileSize the size to be reserved in MB\n\t * @return <tt>true</tt> if reservation succeeded, <tt>false</tt> otherwise\n\t */\n\tboolean reserveSpace(int fileSize);\n\n\t/**\n\t * Adds a file for which the space has already been reserved. The time taken (in seconds) for\n\t * adding the specified file can also be found using\n\t * {@link gridsim.datagrid.File#getTransactionTime()}.\n\t * \n\t * @param file the file to be added\n\t * @return the time (in seconds) required to add the file\n\t */\n\tdouble addReservedFile(File file);\n\n\t/**\n\t * Checks whether there is enough space on the storage for a certain file.\n\t * \n\t * @param fileSize a FileAttribute object to compare to\n\t * @return <tt>true</tt> if enough space available, <tt>false</tt> otherwise\n\t */\n\tboolean hasPotentialAvailableSpace(int fileSize);\n\n\t/**\n\t * Gets the file with the specified name. The time taken (in seconds) for getting the specified\n\t * file can also be found using {@link gridsim.datagrid.File#getTransactionTime()}.\n\t * \n\t * @param fileName the name of the needed file\n\t * @return the file with the specified filename\n\t */\n\tFile getFile(String fileName);\n\n\t/**\n\t * Gets the list of file names located on this storage.\n\t * \n\t * @return a List of file names\n\t */\n\tList<String> getFileNameList();\n\n\t/**\n\t * Adds a file to the storage. The time taken (in seconds) for adding the specified file can\n\t * also be found using {@link gridsim.datagrid.File#getTransactionTime()}.\n\t * \n\t * @param file the file to be added\n\t * @return the time taken (in seconds) for adding the specified file\n\t */\n\tdouble addFile(File file);\n\n\t/**\n\t * Adds a set of files to the storage. The time taken (in seconds) for adding each file can also\n\t * be found using {@link gridsim.datagrid.File#getTransactionTime()}.\n\t * \n\t * @param list the files to be added\n\t * @return the time taken (in seconds) for adding the specified files\n\t */\n\tdouble addFile(List<File> list);\n\n\t/**\n\t * Removes a file from the storage. The time taken (in seconds) for deleting the specified file\n\t * can be found using {@link gridsim.datagrid.File#getTransactionTime()}.\n\t * \n\t * @param fileName the name of the file to be removed\n\t * @return the deleted file.\n\t */\n\tFile deleteFile(String fileName);\n\n\t/**\n\t * Removes a file from the storage. The time taken (in seconds) for deleting the specified file\n\t * can also be found using {@link gridsim.datagrid.File#getTransactionTime()}.\n\t * \n\t * @param fileName the name of the file to be removed\n\t * @param file the file which is removed from the storage is returned through this parameter\n\t * @return the time taken (in seconds) for deleting the specified file\n\t */\n\tdouble deleteFile(String fileName, File file);\n\n\t/**\n\t * Removes a file from the storage. The time taken (in seconds) for deleting the specified file\n\t * can also be found using {@link gridsim.datagrid.File#getTransactionTime()}.\n\t * \n\t * @param file the file which is removed from the storage is returned through this parameter\n\t * @return the time taken (in seconds) for deleting the specified file\n\t */\n\tdouble deleteFile(File file);\n\n\t/**\n\t * Checks whether a file is stored in the storage or not.\n\t * \n\t * @param fileName the name of the file we are looking for\n\t * @return <tt>true</tt> if the file is in the storage, <tt>false</tt> otherwise\n\t */\n\tboolean contains(String fileName);\n\n\t/**\n\t * Checks whether a file is stored in the storage or not.\n\t * \n\t * @param file the file we are looking for\n\t * @return <tt>true</tt> if the file is in the storage, <tt>false</tt> otherwise\n\t */\n\tboolean contains(File file);\n\n\t/**\n\t * Renames a file on the storage. The time taken (in seconds) for renaming the specified file\n\t * can also be found using {@link gridsim.datagrid.File#getTransactionTime()}.\n\t * \n\t * @param file the file we would like to rename\n\t * @param newName the new name of the file\n\t * @return <tt>true</tt> if the renaming succeeded, <tt>false</tt> otherwise\n\t */\n\tboolean renameFile(File file, String newName);\n\n}",
"public interface StorageManager {\n\n\n /**\n * Copy the bytes from the specified old location to the specified new location\n * in the current backend storage\n * @param oldLocationId The old location of the bytes\n * @param newLocationId The new location of the bytes\n */\n public void copyBytes(NodePath oldNodePath, NodePath newNodePath);\n\n /**\n * Create a container at the specified location in the current backend storage\n * @param locationId The location of the container\n */\n public void createContainer(NodePath nodePath);\n\n /**\n * Create a container at the specified location in the current backend storage\n * @param locationId The location of the container\n */\n //public void createNode(NodePath nodePath);\n\n /**\n * Get the bytes from the specified location in the current backend storage\n * @param locationId The location of the bytes\n * @return a stream containing the requested bytes\n */\n public InputStream getBytes(NodePath nodePath);\n\n /**\n * Returns the SWIFT storage URL for current account\n * @return\n */\n public String getStorageUrl();\n \n public long getBytesUsed();\n \n /**\n * Returns the metadata record of container syncto address in SWIFT storage\n * @param container\n * @return\n */\n public String getNodeSyncAddress(String container);\n\n /**\n * Move the bytes from the specified old location to the specified new location \n * in the current backend storage\n * @param oldLocationId The old location of the bytes\n * @param newLocationId The new location of the bytes\n */\n public void moveBytes(NodePath oldNodePath, NodePath newNodePath);\n\t\n\t/**\n * Put the bytes from the specified input stream at the specified location in \n * the current backend storage\n * @param locationId The location for the bytes\n * @param stream The stream containing the bytes\n */\n public void putBytes(NodePath nodePath, InputStream stream);\n\n\t/**\n * Remove the bytes at the specified location in the current backend storage\n * @param locationId The location of the bytes\n */\n public void remove(NodePath nodePath);\n \n public void setNodeSyncTo(String container, String syncTo, String syncKey); \n\n /**\n * Update node metadata object from data in storage\n * @param nodePath Node location\n * @param nodeInfo The metadata object to update\n */\n\tpublic void updateNodeInfo(NodePath nodePath, NodeInfo nodeInfo);\n\n}",
"public static StorageConnector getStorage()\n {\n\tif(sc==null)\n\t{\n\t\tsc = new HazelcastStorage();\n\t}\n\n\treturn sc;\n }",
"public void computeOnline() {\n this.offline = false;\n }",
"boolean createStorage();",
"public interface DataStore {\n\n Bucket loadBucket(String bucketName);\n\n List<Bucket> loadBuckets();\n\n void saveBucket(Bucket bucket);\n\n void deleteBucket(String bucketName);\n\n Blob loadBlob(String bucketName, String blobKey);\n\n List<Blob> loadBlobs(String bucketName);\n\n void saveBlob(String bucketName, Blob blob);\n\n void deleteBlob(String bucketName, String blobKey);\n}",
"public Storage getStorage()\r\n\t{\r\n\t\treturn storage;\r\n\t}",
"public DataStorage getDataStorage();",
"public void setupStorage() {\r\n Predicate<StoreImage> storagePredicate = new StoreAll<StoreImage>();\r\n switch (storageRule) {\r\n case ALL:\r\n break;\r\n case FULL_SIZE_IMG:\r\n storagePredicate = new StoreLargeImages();\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n // We only support Drive Storage at this moment\r\n storage = new DriveStorage(workingDir, imgDB, storagePredicate);\r\n /*\r\n switch (storageMode) {\r\n case DRIVE:\r\n storage = new DriveStorage(workingDir, imgDB, storagePredicate);\r\n break;\r\n default:\r\n storage = new DriveStorage(workingDir, imgDB, storagePredicate);\r\n break;\r\n }\r\n */\r\n\r\n Predicate<StoreImage> cachePredicate = null;\r\n switch (cachingRule) {\r\n case ALL:\r\n cachePredicate = new CacheAll<StoreImage>();\r\n break;\r\n default:\r\n cachePredicate = new CacheAll<StoreImage>();\r\n break;\r\n }\r\n\r\n cache = null;\r\n switch (cachingMode) {\r\n case FIFO:\r\n cache = new FirstInFirstOut<StoreImage>(storage, cacheSize, cachePredicate);\r\n break;\r\n case LIFO:\r\n cache = new LastInFirstOut<StoreImage>(storage, cacheSize, cachePredicate);\r\n break;\r\n case RR:\r\n cache = new RandomReplacement<StoreImage>(storage, cacheSize, cachePredicate);\r\n break;\r\n case LFU:\r\n cache = new LeastFrequentlyUsed<StoreImage>(storage, cacheSize, cachePredicate);\r\n break;\r\n case LRU:\r\n cache = new LeastRecentlyUsed<StoreImage>(storage, cacheSize, cachePredicate);\r\n break;\r\n case MRU:\r\n cache = new MostRecentlyUsed<StoreImage>(storage, cacheSize, cachePredicate);\r\n break;\r\n case NONE:\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n log.info(\"Storage setup done.\");\r\n }",
"private void readFromInternalStorage() {\n ArrayList<GeofenceObjects> returnlist = new ArrayList<>();\n if (!isExternalStorageReadable()) {\n System.out.println(\"not readable\");\n } else {\n returnlist = new ArrayList<>();\n try {\n FileInputStream fis = openFileInput(\"GeoFences\");\n ObjectInputStream ois = new ObjectInputStream(fis);\n returnlist = (ArrayList<GeofenceObjects>) ois.readObject();\n ois.close();\n System.out.println(returnlist);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n currentList = returnlist;\n }",
"public void setStorage(Storage storage);",
"public abstract void connect() throws StorageException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds an annotation_item to a parameter of this Method. | public void addParameterAnnotationItem(int parameterIndex, AnnotationItem annotationItem) {
annotatedParameterSetRefList.addAnnotationItem(parameterIndex, annotationItem);
} | [
"public void addAnnotationItem(AnnotationItem annotationItem) {\n\t\tannotationSetItem.addAnnotationItem(annotationItem);\n\t}",
"@PropertySetter(role = ANNOTATION)\n\t<E extends CtElement> E addAnnotation(CtAnnotation<? extends Annotation> annotation);",
"public AnnotatedTypeBuilder<X> addToMethodParameter(Method method, int position, Annotation annotation) {\n\t\tif (!methods.containsKey(method)) {\n\t\t\tmethods.put(method, new AnnotationBuilder());\n\t\t}\n\t\tif (methodParameters.get(method) == null) {\n\t\t\tmethodParameters.put(method, new HashMap<Integer, AnnotationBuilder>());\n\t\t}\n\t\tif (methodParameters.get(method).get(position) == null) {\n\t\t\tmethodParameters.get(method).put(position, new AnnotationBuilder());\n\t\t}\n\t\tmethodParameters.get(method).get(position).add(annotation);\n\t\treturn this;\n\t}",
"public void addAnnotation(Annotation annotation) {\r\n\t\tannotations.add(annotation);\r\n\t}",
"public metadslx.languages.soal.Annotation AnnotatedElement_addAnnotation(metadslx.languages.soal.AnnotatedElement _this, String name) {\n throw new UnsupportedOperationException();\n }",
"public void addAnnotation(Annotation annotation)\n {\n int annotationsCount = targetAnnotationsAttribute.u2annotationsCount;\n Annotation[] annotations = targetAnnotationsAttribute.annotations;\n\n // Make sure there is enough space for the new annotation.\n if (annotations.length <= annotationsCount)\n {\n targetAnnotationsAttribute.annotations = new Annotation[annotationsCount+1];\n System.arraycopy(annotations, 0,\n targetAnnotationsAttribute.annotations, 0,\n annotationsCount);\n annotations = targetAnnotationsAttribute.annotations;\n }\n\n // Add the annotation.\n annotations[targetAnnotationsAttribute.u2annotationsCount++] = annotation;\n }",
"public void addParameter(ItemParam itemParam) {\n ItemParam[] itemParamsNext = new ItemParam[itemParams.length + 1];\n System.arraycopy(itemParams, 0, itemParamsNext, 0, itemParams.length);\n /*ItemParam[] itemParamsNext = new ItemParam[itemParams.length + 1];\n for(int c=0;c<itemParams.length;c++){\n itemParamsNext[c] = itemParams[c];\n }\n itemParamsNext[itemParams.length] = itemParam;\n this.itemParams = itemParamsNext;*/\n itemParamsNext[itemParams.length] = itemParam;\n this.itemParams = itemParamsNext;\n }",
"public void addCustomParam(Object param) {\n customParams.add(param);\n }",
"public void annotate(String annotation) {\n if (isActive())\n itemBuffer.offer(new Tag(System.currentTimeMillis(), credentials.user, annotation));\n }",
"public Annotation getAnnotationParam()\n\t{\n\t\treturn annotationParam;\n\t}",
"public void addAnnotation(String a) {\n applicationIdentifiers.add(a);\n }",
"public void addAnnotation(int lineIndex, int pointIdx, String annotation, float angle) {\r\n lineIndex = getLastIndex(lineIndex);\r\n double x = m_dataset.getXValue(lineIndex, pointIdx);\r\n double y = m_dataset.getYValue(lineIndex, pointIdx);\r\n addAnnotation(x, y, annotation, angle);\r\n }",
"public void Annotation(Annotation _this) {\n this.NamedElement(_this);\n }",
"public void addAnnotationType(Object annotationType) {\n \t\taddAnnotationType(annotationType, SQUIGGLES);\n \t}",
"public void addCustom(Param custom) {\r\n if (custom == null) {\r\n return;\r\n }\r\n\r\n this.customList.add(custom);\r\n }",
"abstract public void addAnnotation(T object, MIGroup group,\n\t\t\tObject mioExtendable);",
"public AnnotatedTypeBuilder<X> addToMethod(AnnotatedMethod<? super X> method, Annotation annotation) {\n\t\treturn addToMethod(method.getJavaMember(), annotation);\n\t}",
"public void addAnnotation(ArtifactAnnotation newAnnotation) throws OseeCoreException {\n\n // Update attribute if it already exists\n for (Attribute<String> attr : getAttributes()) {\n ArtifactAnnotation annotation = new ArtifactAnnotation(attr.getValue());\n if (newAnnotation.equals(annotation)) {\n attr.setValue(newAnnotation.toXml());\n return;\n }\n }\n artifact.addAttribute(CoreAttributeTypes.Annotation, newAnnotation.toXml());\n }",
"public T addParam(InParameter ip){\r\n\t\tparams.add(ip);\r\n\t\treturn getThisType();\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor Specifies that xeno1 and xeno2 are incompatible. Once specified as incompatible, the pair can never be specified as being "compatible". In that case, don't throw an exception, simply treat the method invocation as a "noop". A xeno is always compatible with itself, is never incompatible with itself: directives to the contrary should be treated as "noop" operations. Both parameters must correspond to a member of the population. | public void setIncompatible(int xeno1, int xeno2) {
// fill me in!
} | [
"public void setCompatible(int xeno1, int xeno2) {\n // fill me in!\n }",
"public boolean areIncompatible(int xeno1, int xeno2) {\n return false; // replace to taste!\n }",
"public boolean areCompatible(int xeno1, int xeno2) {\n return false; // replace to taste!\n }",
"public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException;",
"public BracketMonotonic\n\t\t(double x1,\n\t\t double x2)\n\t\t{\n\t\tsuper (x1, x2);\n\t\t}",
"public Bond(IAtom atom1, IAtom atom2) {\n this(atom1, atom2, IBond.Order.SINGLE, CDKConstants.STEREO_BOND_NONE);\n }",
"public InvNode(/*@Nullable*/ Invariant inv1, /*@Nullable*/ Invariant inv2) {\n super(Pair.of(inv1, inv2));\n assert !(inv1 == null && inv2 == null) : \"Both invariants may not be null\";\n }",
"public Xnor(Expression ex1, Expression ex2) {\n super(ex1, ex2);\n this.setOperator(\" # \");\n }",
"public interface ONNXOperator {\n\n /**\n * The operator name.\n * @return The name.\n */\n public String getOpName();\n\n /**\n * The number of inputs.\n * @return The number of inputs.\n */\n public int getNumInputs();\n\n /**\n * The number of optional inputs.\n * @return The number of optional inputs.\n */\n public int getNumOptionalInputs();\n\n /**\n * The number of outputs.\n * @return The number of outputs.\n */\n public int getNumOutputs();\n\n /**\n * The operator attributes.\n * @return The operator attribute map.\n */\n public Map<String,ONNXAttribute> getAttributes();\n \n /**\n * The mandatory attribute names.\n * @return The required attribute names.\n */\n public Set<String> getMandatoryAttributeNames();\n\n /**\n * Returns the opset version.\n * @return The opset version.\n */\n public int getOpVersion();\n\n /**\n * Returns the opset domain.\n * <p>\n * May be {@code null} if it is the default ONNX domain;\n * @return The opset domain.\n */\n public String getOpDomain();\n\n /**\n * Returns the opset proto for these operators.\n * @return The opset proto.\n */\n default public OnnxMl.OperatorSetIdProto opsetProto() {\n return OnnxMl.OperatorSetIdProto.newBuilder().setDomain(getOpDomain()).setVersion(getOpVersion()).build();\n }\n\n /**\n * Builds this node based on the supplied inputs and output.\n * Throws {@link IllegalArgumentException} if this operator takes more than a single input or output.\n * @param context The onnx context used to ensure this node has a unique name.\n * @param input The name of the input.\n * @param output The name of the output.\n * @return The NodeProto.\n */\n default public OnnxMl.NodeProto build(ONNXContext context, String input, String output) {\n return build(context,new String[]{input},new String[]{output}, Collections.emptyMap());\n }\n\n /**\n * Builds this node based on the supplied inputs and output.\n * Throws {@link IllegalArgumentException} if this operator takes more than a single input or output.\n * May throw {@link UnsupportedOperationException} if the attribute type is not supported.\n * @param context The onnx context used to ensure this node has a unique name.\n * @param input The names of the input.\n * @param output The name of the output.\n * @param attributeValues The attribute names and values.\n * @return The NodeProto.\n */\n default public OnnxMl.NodeProto build(ONNXContext context, String input, String output, Map<String,Object> attributeValues) {\n return build(context,new String[]{input},new String[]{output},attributeValues);\n }\n\n /**\n * Builds this node based on the supplied inputs and output.\n * Throws {@link IllegalArgumentException} if the number of inputs or outputs is wrong.\n * @param context The onnx context used to ensure this node has a unique name.\n * @param inputs The names of the inputs.\n * @param output The name of the output.\n * @return The NodeProto.\n */\n default public OnnxMl.NodeProto build(ONNXContext context, String[] inputs, String output) {\n return build(context,inputs,new String[]{output},Collections.emptyMap());\n }\n\n /**\n * Builds this node based on the supplied inputs and output.\n * Throws {@link IllegalArgumentException} if the number of inputs, outputs or attributes is wrong.\n * May throw {@link UnsupportedOperationException} if the attribute type is not supported.\n * @param context The onnx context used to ensure this node has a unique name.\n * @param inputs The names of the inputs.\n * @param output The name of the output.\n * @param attributeValues The attribute names and values.\n * @return The NodeProto.\n */\n default public OnnxMl.NodeProto build(ONNXContext context, String[] inputs, String output, Map<String,Object> attributeValues) {\n return build(context,inputs,new String[]{output},attributeValues);\n }\n\n /**\n * Builds this node based on the supplied input and outputs.\n * Throws {@link IllegalArgumentException} if the number of inputs or outputs is wrong.\n * @param context The onnx context used to ensure this node has a unique name.\n * @param input The name of the input.\n * @param outputs The names of the outputs.\n * @return The NodeProto.\n */\n default public OnnxMl.NodeProto build(ONNXContext context, String input, String[] outputs) {\n return build(context,new String[]{input},outputs,Collections.emptyMap());\n }\n\n /**\n * Builds this node based on the supplied input and outputs.\n * Throws {@link IllegalArgumentException} if the number of inputs, outputs or attributes is wrong.\n * May throw {@link UnsupportedOperationException} if the attribute type is not supported.\n * @param context The onnx context used to ensure this node has a unique name.\n * @param input The name of the input.\n * @param outputs The names of the outputs.\n * @param attributeValues The attribute names and values.\n * @return The NodeProto.\n */\n default public OnnxMl.NodeProto build(ONNXContext context, String input, String[] outputs, Map<String,Object> attributeValues) {\n return build(context,new String[]{input},outputs,attributeValues);\n }\n\n /**\n * Builds this node based on the supplied inputs and outputs.\n * Throws {@link IllegalArgumentException} if the number of inputs or outputs is wrong.\n * @param context The onnx context used to ensure this node has a unique name.\n * @param inputs The names of the inputs.\n * @param outputs The names of the outputs.\n * @return The NodeProto.\n */\n default public OnnxMl.NodeProto build(ONNXContext context, String[] inputs, String[] outputs) {\n return build(context,inputs,outputs,Collections.emptyMap());\n }\n\n /**\n * Builds this node based on the supplied inputs and outputs.\n * Throws {@link IllegalArgumentException} if the number of inputs, outputs or attributes is wrong.\n * May throw {@link UnsupportedOperationException} if the attribute type is not supported.\n * @param context The onnx context used to ensure this node has a unique name.\n * @param inputs The names of the inputs.\n * @param outputs The names of the outputs.\n * @param attributeValues The attribute names and values.\n * @return The NodeProto.\n */\n default public OnnxMl.NodeProto build(ONNXContext context, String[] inputs, String[] outputs, Map<String,Object> attributeValues) {\n int numInputs = getNumInputs();\n int numOptionalInputs = getNumOptionalInputs();\n int numOutputs = getNumOutputs();\n String opName = getOpName();\n String domain = getOpDomain();\n Map<String, ONNXAttribute> attributes = getAttributes();\n Set<String> mandatoryAttributeNames = getMandatoryAttributeNames();\n\n String opStatus = String.format(\"Building op %s:%s(%d(+%d)) -> %d\", domain, opName, numInputs, numOptionalInputs, numOutputs);\n\n if ((numInputs != VARIADIC_INPUT) && ((inputs.length < numInputs) || (inputs.length > numInputs + numOptionalInputs))) {\n throw new IllegalArgumentException(opStatus + \". Expected \" + numInputs + \" inputs, with \" + numOptionalInputs + \" optional inputs, but received \" + inputs.length);\n } else if ((numInputs == VARIADIC_INPUT) && (inputs.length == 0)) {\n throw new IllegalArgumentException(opStatus + \". Expected at least one input for variadic input, received zero\");\n }\n if (outputs.length != numOutputs) {\n throw new IllegalArgumentException(opStatus + \". Expected \" + numOutputs + \" outputs, but received \" + outputs.length);\n }\n if (!attributes.keySet().containsAll(attributeValues.keySet())) {\n throw new IllegalArgumentException(opStatus + \". Unexpected attribute found, received \" + attributeValues.keySet() + \", expected values from \" + attributes.keySet());\n }\n if (!attributeValues.keySet().containsAll(mandatoryAttributeNames)) {\n throw new IllegalArgumentException(opStatus + \". Expected to find all mandatory attributes, received \" + attributeValues.keySet() + \", expected \" + mandatoryAttributeNames);\n }\n\n Logger.getLogger(\"org.tribuo.util.onnx.ONNXOperator\").fine(opStatus);\n OnnxMl.NodeProto.Builder nodeBuilder = OnnxMl.NodeProto.newBuilder();\n for (String i : inputs) {\n nodeBuilder.addInput(i);\n }\n for (String o : outputs) {\n nodeBuilder.addOutput(o);\n }\n nodeBuilder.setName(context.generateUniqueName(opName));\n nodeBuilder.setOpType(opName);\n if (domain != null) {\n nodeBuilder.setDomain(domain);\n }\n for (Map.Entry<String,Object> e : attributeValues.entrySet()) {\n ONNXAttribute attr = attributes.get(e.getKey());\n nodeBuilder.addAttribute(attr.build(e.getValue()));\n }\n return nodeBuilder.build();\n }\n}",
"public Mechanisms(int portOne, boolean rOne , int portTwo, boolean rTwo){\n tOne = new WPI_TalonSRX(portOne);\n tOne.setInverted(rOne);\n tTwo = new WPI_TalonSRX(portTwo);\n tTwo.setInverted(rTwo);\n }",
"public Djn(Operande op1, Operande op2) {\r\n\t\tsuper(op1, op2);\r\n\t}",
"public BinaryPredicate(NodePair nodePair){\n\t\tsuper();\n\t\tthis.node1 = nodePair.getNode1();\n\t\tthis.node2 = nodePair.getNode2();\n\t}",
"@Override\r\n\tprotected final double intraSim(Value val1, Value val2) throws Exception {\r\n\t\tint objNum1 = getOwnerObjs(val1).size();\r\n\t\tint objNum2 = getOwnerObjs(val2).size();\r\n\t\tdouble product = 1. * objNum1 * objNum2;\r\n\t\treturn product / (objNum1 + objNum2 + product);\r\n\t}",
"public static void analysisAssertDisjoint(SLLBenchmarks x, SLLBenchmarks y, String message) {\n\t}",
"void setNilXdescelement2();",
"public Bond(IAtom atom1, IAtom atom2, Order order) {\n this(atom1, atom2, order, CDKConstants.STEREO_BOND_NONE);\n }",
"public static void main(String[] args) {\n\t\tImplicitPromotionInConstructor ipic1 = new ImplicitPromotionInConstructor('v'); \r\n\t}",
"public BLXCrossOver() {\n }",
"public abstract SampleModel createCompatibleSampleModel(int a0, int a1);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an ForStatement and pushes it onto the statement stack. | protected ForStatement createForStatement() {
ForStatement stmt = new ForStatement(maker);
pushStatement(stmt);
return stmt;
} | [
"ForStatement createForStatement();",
"ForStatement(AST ast) {\n super(ast); }",
"private ForLoopNode createForTag() {\n\t\tElementVariable Arg1 = getVariable(lexer.nextToken());\n\t\tElement Arg2 = getForArgument(lexer.nextToken());\n\t\tElement Arg3 = getForArgument(lexer.nextToken());\n\t\t\n\t\tElement Arg4 = null;\n\t\tToken token = lexer.nextToken();\n\t\tif (token.getType() != TokenType.ENDTAG) { \n\t\t\tArg4 = getForArgument(token);\n\t\t\ttoken = lexer.nextToken();\n\t\t}\n\t\t\n\t\tif (token.getType() != TokenType.ENDTAG)\n\t\t\tthrow new SmartScriptParserException(\"Expected end tag symbol at \" +\n\t\t\t\t\tlexer.getCurrentIndex());\n\t\t\n\t\treturn new ForLoopNode(Arg1, Arg2, Arg3, Arg4);\n\t}",
"private void processForLoopNode() {\n ForLoopNode forLoopNode = initializeForLoopNode();\n Node nodeOnTopOfStack = (Node) stack.peek();\n nodeOnTopOfStack.addChildNode(forLoopNode);\n if (forLoopNode.getStepExpression() != null)\n closeForLoopTag();\n else\n lexer.setState(SmartScriptLexerState.BASIC);\n stack.push(forLoopNode);\n lexer.nextToken();\n processToken();\n }",
"private void generateForStatement(ForStatement stmt, List<ICode> result) {\n\t\tString index = varEnvironment.get(stmt.getIndex().getLexeme());\n\t\tint step = stmt.getStep().map(e -> ((IntValue) evalConst(e)).getValue()).orElse(1);\n\t\tgenerate(stmt.getFrom(), index, result);\n\n\t\tString loop = newLabel();\n\t\tresult.add(new Label(loop));\n\n\t\tString to = newTemp();\n\t\tgenerate(stmt.getTo(), to, result);\n\n\t\tString body = newLabel();\n\t\tString end = newLabel();\n\t\tif (step > 0) {\n\t\t\tresult.add(new If(index, If.Op.GT, to, end, body));\n\t\t} else {\n\t\t\tresult.add(new If(to, If.Op.GT, index, end, body));\n\t\t}\n\n\t\tresult.add(new Label(body));\n\n\t\tfor (Statement stmt2 : stmt.getBody()) {\n\t\t\tgenerate(stmt2, result);\n\t\t}\n\n\t\tString place = newTemp();\n\t\tresult.add(new LetInt(place, step));\n\t\tresult.add(new LetBin(index, index, LetBin.Op.IADD, place));\n\t\tresult.add(new Goto(loop));\n\t\tresult.add(new Label(end));\n\t}",
"private ParseTree parseForStatement() {\n SourcePosition start = getTreeStartLocation();\n eat(TokenType.FOR);\n boolean awaited = peekPredefinedString(AWAIT);\n if (awaited) {\n eatPredefinedString(AWAIT);\n }\n eat(TokenType.OPEN_PAREN);\n if (peekVariableDeclarationList()) {\n VariableDeclarationListTree variables = parseVariableDeclarationListNoIn();\n if (peek(TokenType.IN)) {\n if (awaited) {\n reportError(\"for-await-of is the only allowed asynchronous iteration\");\n }\n // for-in: only one declaration allowed\n if (variables.declarations.size() > 1) {\n reportError(\"for-in statement may not have more than one variable declaration\");\n }\n VariableDeclarationTree declaration = variables.declarations.get(0);\n if (declaration.initializer != null) {\n // An initializer is allowed here in ES5 and below, but not in ES6.\n // Warn about it, to encourage people to eliminate it from their code.\n // http://esdiscuss.org/topic/initializer-expression-on-for-in-syntax-subject\n if (config.atLeast6) {\n reportError(\"for-in statement may not have initializer\");\n } else {\n errorReporter.reportWarning(\n declaration.location.start, \"for-in statement should not have initializer\");\n }\n }\n\n return parseForInStatement(start, variables);\n } else if (peekPredefinedString(PredefinedName.OF)) {\n // for-of: only one declaration allowed\n if (variables.declarations.size() > 1) {\n if (awaited) {\n reportError(\"for-await-of statement may not have more than one variable declaration\");\n } else {\n reportError(\"for-of statement may not have more than one variable declaration\");\n }\n }\n // for-of: initializer is illegal\n VariableDeclarationTree declaration = variables.declarations.get(0);\n if (declaration.initializer != null) {\n if (awaited) {\n reportError(\"for-await-of statement may not have initializer\");\n } else {\n reportError(\"for-of statement may not have initializer\");\n }\n }\n\n if (awaited) {\n return parseForAwaitOfStatement(start, variables);\n } else {\n return parseForOfStatement(start, variables);\n }\n } else {\n // \"Vanilla\" for statement: const/destructuring must have initializer\n checkVanillaForInitializers(variables);\n return parseForStatement(start, variables);\n }\n }\n\n if (peek(TokenType.SEMI_COLON)) {\n return parseForStatement(start, null);\n }\n\n ParseTree initializer = parseExpressionNoIn();\n if (peek(TokenType.IN) || peek(TokenType.EQUAL) || peekPredefinedString(PredefinedName.OF)) {\n initializer = transformLeftHandSideExpression(initializer);\n if (!initializer.isValidAssignmentTarget()) {\n reportError(\"invalid assignment target\");\n }\n }\n\n if (peek(TokenType.IN) || peekPredefinedString(PredefinedName.OF)) {\n if (initializer.type != ParseTreeType.BINARY_OPERATOR\n && initializer.type != ParseTreeType.COMMA_EXPRESSION) {\n if (peek(TokenType.IN)) {\n return parseForInStatement(start, initializer);\n } else {\n // for {await}? ( _ of _ )\n if (awaited) {\n return parseForAwaitOfStatement(start, initializer);\n } else {\n return parseForOfStatement(start, initializer);\n }\n }\n }\n }\n\n return parseForStatement(start, initializer);\n }",
"protected void visitForStmtBodyOnly(ForStmt forStmt) {\n pushScope();\n visit(forStmt.getBody());\n popScope();\n }",
"public final PythonParser.for_stmt_return for_stmt() throws RecognitionException {\n PythonParser.for_stmt_return retval = new PythonParser.for_stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token FOR152=null;\n Token IN154=null;\n Token COLON156=null;\n Token ORELSE157=null;\n Token COLON158=null;\n PythonParser.suite_return s1 = null;\n\n PythonParser.suite_return s2 = null;\n\n PythonParser.exprlist_return exprlist153 = null;\n\n PythonParser.testlist_return testlist155 = null;\n\n\n PythonTree FOR152_tree=null;\n PythonTree IN154_tree=null;\n PythonTree COLON156_tree=null;\n PythonTree ORELSE157_tree=null;\n PythonTree COLON158_tree=null;\n\n\n stmt stype = null;\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:938:5: ( FOR exprlist[expr_contextType.Store] IN testlist[expr_contextType.Load] COLON s1= suite[false] ( ORELSE COLON s2= suite[false] )? )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:938:7: FOR exprlist[expr_contextType.Store] IN testlist[expr_contextType.Load] COLON s1= suite[false] ( ORELSE COLON s2= suite[false] )?\n {\n root_0 = (PythonTree)adaptor.nil();\n\n FOR152=(Token)match(input,FOR,FOLLOW_FOR_in_for_stmt3763); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n FOR152_tree = (PythonTree)adaptor.create(FOR152);\n adaptor.addChild(root_0, FOR152_tree);\n }\n pushFollow(FOLLOW_exprlist_in_for_stmt3765);\n exprlist153=exprlist(expr_contextType.Store);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, exprlist153.getTree());\n IN154=(Token)match(input,IN,FOLLOW_IN_in_for_stmt3768); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n IN154_tree = (PythonTree)adaptor.create(IN154);\n adaptor.addChild(root_0, IN154_tree);\n }\n pushFollow(FOLLOW_testlist_in_for_stmt3770);\n testlist155=testlist(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, testlist155.getTree());\n COLON156=(Token)match(input,COLON,FOLLOW_COLON_in_for_stmt3773); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n COLON156_tree = (PythonTree)adaptor.create(COLON156);\n adaptor.addChild(root_0, COLON156_tree);\n }\n pushFollow(FOLLOW_suite_in_for_stmt3777);\n s1=suite(false);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, s1.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:939:9: ( ORELSE COLON s2= suite[false] )?\n int alt68=2;\n int LA68_0 = input.LA(1);\n\n if ( (LA68_0==ORELSE) ) {\n alt68=1;\n }\n switch (alt68) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:939:10: ORELSE COLON s2= suite[false]\n {\n ORELSE157=(Token)match(input,ORELSE,FOLLOW_ORELSE_in_for_stmt3789); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n ORELSE157_tree = (PythonTree)adaptor.create(ORELSE157);\n adaptor.addChild(root_0, ORELSE157_tree);\n }\n COLON158=(Token)match(input,COLON,FOLLOW_COLON_in_for_stmt3791); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n COLON158_tree = (PythonTree)adaptor.create(COLON158);\n adaptor.addChild(root_0, COLON158_tree);\n }\n pushFollow(FOLLOW_suite_in_for_stmt3795);\n s2=suite(false);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, s2.getTree());\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n\n stype = actions.makeFor(FOR152, (exprlist153!=null?exprlist153.etype:null), actions.castExpr((testlist155!=null?((PythonTree)testlist155.tree):null)), (s1!=null?s1.stypes:null), (s2!=null?s2.stypes:null));\n \n }\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n if ( state.backtracking==0 ) {\n\n retval.tree = stype;\n\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }",
"public final void rule__ForStmt__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:8360:1: ( ( 'for' ) )\r\n // InternalGo.g:8361:1: ( 'for' )\r\n {\r\n // InternalGo.g:8361:1: ( 'for' )\r\n // InternalGo.g:8362:2: 'for'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getForStmtAccess().getForKeyword_1()); \r\n }\r\n match(input,72,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getForStmtAccess().getForKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"private ForLoopNode initializeForLoopNode() {\n ElementVariable variable = getForLoopVariable();\n Element startExpression = getForLoopStartExpression();\n Element endExpression = getForLoopEndExpression();\n Element stepExpression = getStepExpression();\n\n return new ForLoopNode(variable, startExpression, endExpression, stepExpression);\n }",
"protected void sequence_ForStatement(ISerializationContext context, ForStatement semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, XsPackage.Literals.FOR_STATEMENT__VAR) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XsPackage.Literals.FOR_STATEMENT__VAR));\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, XsPackage.Literals.FOR_STATEMENT__OP) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XsPackage.Literals.FOR_STATEMENT__OP));\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, XsPackage.Literals.FOR_STATEMENT__END) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XsPackage.Literals.FOR_STATEMENT__END));\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, XsPackage.Literals.FOR_STATEMENT__STATEMENT) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XsPackage.Literals.FOR_STATEMENT__STATEMENT));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getForStatementAccess().getVarForVarDeclarationParserRuleCall_3_0(), semanticObject.getVar());\r\n\t\tfeeder.accept(grammarAccess.getForStatementAccess().getOpRelOpParserRuleCall_5_0(), semanticObject.getOp());\r\n\t\tfeeder.accept(grammarAccess.getForStatementAccess().getEndExpressionParserRuleCall_6_0(), semanticObject.getEnd());\r\n\t\tfeeder.accept(grammarAccess.getForStatementAccess().getStatementStatementOrBlockParserRuleCall_8_0(), semanticObject.getStatement());\r\n\t\tfeeder.finish();\r\n\t}",
"protected LoopStatement createLoopStatement() {\n LoopStatement stmt = new LoopStatement(maker);\n pushStatement(stmt);\n return stmt;\n }",
"public final void for_loop_expression() throws Exception {\n\t\ttry {\n\t\t\t// C:\\\\Users\\\\Michael\\\\Documents\\\\Senior Design\\\\pseudoLanguage\\\\Language.g:126:2: ( FOR LPAREN ID ASSIGN VALUE SEMICOLON ID comparator VALUE SEMICOLON ID increment RPAREN compound_statement ENDFOR )\n\t\t\t// C:\\\\Users\\\\Michael\\\\Documents\\\\Senior Design\\\\pseudoLanguage\\\\Language.g:127:3: FOR LPAREN ID ASSIGN VALUE SEMICOLON ID comparator VALUE SEMICOLON ID increment RPAREN compound_statement ENDFOR\n\t\t\t{\n\t\t\tmatch(input,FOR,FOLLOW_FOR_in_for_loop_expression926); \n\t\t\tmatch(input,LPAREN,FOLLOW_LPAREN_in_for_loop_expression928); \n\t\t\tmatch(input,ID,FOLLOW_ID_in_for_loop_expression930); \n\t\t\tmatch(input,ASSIGN,FOLLOW_ASSIGN_in_for_loop_expression932); \n\t\t\tmatch(input,VALUE,FOLLOW_VALUE_in_for_loop_expression934); \n\t\t\tmatch(input,SEMICOLON,FOLLOW_SEMICOLON_in_for_loop_expression936); \n\t\t\tmatch(input,ID,FOLLOW_ID_in_for_loop_expression938); \n\t\t\tpushFollow(FOLLOW_comparator_in_for_loop_expression940);\n\t\t\tcomparator();\n\t\t\tstate._fsp--;\n\n\t\t\tmatch(input,VALUE,FOLLOW_VALUE_in_for_loop_expression942); \n\t\t\tmatch(input,SEMICOLON,FOLLOW_SEMICOLON_in_for_loop_expression944); \n\t\t\tmatch(input,ID,FOLLOW_ID_in_for_loop_expression946); \n\t\t\tpushFollow(FOLLOW_increment_in_for_loop_expression948);\n\t\t\tincrement();\n\t\t\tstate._fsp--;\n\n\t\t\tmatch(input,RPAREN,FOLLOW_RPAREN_in_for_loop_expression950); \n\t\t\tpushFollow(FOLLOW_compound_statement_in_for_loop_expression952);\n\t\t\tcompound_statement();\n\t\t\tstate._fsp--;\n\n\t\t\tmatch(input,ENDFOR,FOLLOW_ENDFOR_in_for_loop_expression954); \n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"final public Operation forLoopPointer() throws ParseException {\n Operation op, init=null, inc=null;\n Operation body[];\n BooleanExpression bexpr;\n int position, saveStart=-1, saveStop=-1, saveStart2=-1, saveStop2=-1;\n int forLineNumber;\n jj_consume_token(FOR);\n jj_consume_token(LPAREN);\n if (lineNumber>1)\n php.write( \",\\n\" );\n\n f = new Formatter();\n php.write( \"\\\"\" + f.format(\"%2d\",lineNumber).toString() );\n position = 2;\n for(int i=0; i<indent; i++)\n {\n php.write( \" \" );\n position += 2;\n }\n php.write( \"for ( \" );\n forLineNumber = lineNumber;\n position += 6;\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case IDENTIFIER:\n init = pointerAssignmentInForLoop();\n break;\n default:\n jj_la1[18] = jj_gen;\n ;\n }\n jj_consume_token(SEMICOLON);\n if (init!=null)\n {\n ( (OpAssign) init).setStartHighlighting( position );\n position += ((OpAssign)init).getSource().length();\n ( (OpAssign) init).setStopHighlighting( position );\n php.write( \" ; \" );\n position += 3;\n }\n else\n {\n php.write( \"/* empty */ ; \" );\n position += 14;\n }\n bexpr = booleanExpression();\n jj_consume_token(SEMICOLON);\n if (bexpr instanceof CompoundBooleanExpression)\n {\n php.write(\"\\\",\\n\");\n lineNumber++;\n\n f = new Formatter();\n php.write(\"\\\"\" + f.format(\"%2d\",lineNumber).toString() );\n position = 2;\n for(int i=0; i<indent; i++)\n {\n php.write( \" \" );\n position += 2;\n }\n php.write( \" \" ); // to account for \"for ( \"\n position += 6;\n\n String boolExpr = bexpr.toString(dereferenceOp, nullString,\n infoString);\n php.write( \"( \" + boolExpr + \" ) \");\n php.write( ((CompoundBooleanExpression)bexpr).getConnector() +\n \"\\\",\\n\");\n\n bexpr.setStartHighlighting( position+ 2 );\n bexpr.setStopHighlighting( position+ 2 + boolExpr.length() );\n\n lineNumber++;\n\n f = new Formatter();\n php.write(\"\\\"\" + f.format(\"%2d\",lineNumber).toString() );\n position = 2;\n for(int i=0; i<indent; i++)\n {\n php.write( \" \" );\n position += 2;\n }\n php.write( \" \" ); // to account for \"for ( \"\n position += 6;\n String boolExpr2 =\n ((CompoundBooleanExpression)bexpr).getSecond().toString(\n dereferenceOp, nullString, infoString);\n php.write(\"( \" + boolExpr2 + \" ) ;\\\",\\n\" );\n lineNumber++;\n\n ((CompoundBooleanExpression)bexpr).getSecond().setStartHighlighting(\n position+ 2 );\n ((CompoundBooleanExpression)bexpr).getSecond().setStopHighlighting(\n position+ 2 + boolExpr2.length() );\n\n // to prepare for the increment section\n\n f = new Formatter();\n php.write(\"\\\"\" + f.format(\"%2d\",lineNumber).toString() );\n position = 2;\n for(int i=0; i<indent; i++)\n {\n php.write( \" \" );\n position += 2;\n }\n php.write( \" \" ); // to account for \"for ( \"\n position += 6;\n\n }\n else\n { // simple boolean expression\n\n bexpr.setStartHighlighting( position );\n\n String b = bexpr.toString( dereferenceOp, nullString, infoString);\n php.write( b );\n position += b.length();\n bexpr.setStopHighlighting( position );\n php.write( \" ; \" );\n position += 3;\n }\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case IDENTIFIER:\n inc = pointerAssignmentInForLoop();\n break;\n default:\n jj_la1[19] = jj_gen;\n ;\n }\n jj_consume_token(RPAREN);\n op = new OpForPointer( (OpAssign) init, bexpr, (OpAssign)inc );\n op.setLineNumber( forLineNumber );\n\n if ( inc != null )\n {\n ( (OpAssign) inc).setLineNumber( lineNumber );\n ( (OpAssign) inc).setStartHighlighting( position );\n ( (OpAssign) inc).setStopHighlighting(\n position + ((OpAssign)inc).getSource().length() );\n }\n else\n php.write( \"/* empty */\" );\n\n php.write( \" )\\\",\\n\");\n\n lineNumber++;\n\n f = new Formatter();\n php.write(\n \"\\\"\" + f.format(\"%2d\",lineNumber).toString() );\n for(int i=0; i<indent; i++)\n php.write( \" \" );\n php.write( \"{\\\"\");\n\n lineNumber++;\n indent++;\n body = block();\n if (body != null)\n {\n for( int i=0; i<body.length; i++)\n if (body[i] != null)\n ((OpForPointer)op).addOperation( body[i] );\n }\n php.write( \",\\n\" );\n\n indent--;\n f = new Formatter();\n php.write(\n \"\\\"\" + f.format(\"%2d\",lineNumber).toString() );\n for(int i=0; i<indent; i++)\n php.write( \" \" );\n php.write( \"}\\\"\");\n lineNumber++;\n\n\n\n {if (true) return op;}\n throw new Error(\"Missing return statement in function\");\n }",
"public final StormParser.forstatement_return forstatement() throws RecognitionException {\n StormParser.forstatement_return retval = new StormParser.forstatement_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n Token KW_FOR5=null;\n Token LPAREN6=null;\n Token RPAREN7=null;\n StormParser.block_return block8 =null;\n\n\n CommonTree KW_FOR5_tree=null;\n CommonTree LPAREN6_tree=null;\n CommonTree RPAREN7_tree=null;\n RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,\"token RPAREN\");\n RewriteRuleTokenStream stream_KW_FOR=new RewriteRuleTokenStream(adaptor,\"token KW_FOR\");\n RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,\"token LPAREN\");\n RewriteRuleSubtreeStream stream_block=new RewriteRuleSubtreeStream(adaptor,\"rule block\");\n try {\n // /home/ablecao/workspace/Storm.g:76:13: ( KW_FOR LPAREN RPAREN block -> ^( TOK_FOR block ) )\n // /home/ablecao/workspace/Storm.g:76:15: KW_FOR LPAREN RPAREN block\n {\n KW_FOR5=(Token)match(input,KW_FOR,FOLLOW_KW_FOR_in_forstatement266); \n stream_KW_FOR.add(KW_FOR5);\n\n\n LPAREN6=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_forstatement268); \n stream_LPAREN.add(LPAREN6);\n\n\n RPAREN7=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_forstatement270); \n stream_RPAREN.add(RPAREN7);\n\n\n pushFollow(FOLLOW_block_in_forstatement272);\n block8=block();\n\n state._fsp--;\n\n stream_block.add(block8.getTree());\n\n // AST REWRITE\n // elements: block\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 // 76:42: -> ^( TOK_FOR block )\n {\n // /home/ablecao/workspace/Storm.g:76:45: ^( TOK_FOR block )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot(\n (CommonTree)adaptor.create(TOK_FOR, \"TOK_FOR\")\n , root_1);\n\n adaptor.addChild(root_1, stream_block.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n\n retval.tree = root_0;\n\n }\n\n retval.stop = input.LT(-1);\n\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n\n catch (RecognitionException e) {\n reportError(e);\n throw e;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }",
"public final void rule__ForStmt__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:2783:1: ( ( 'for' ) )\n // InternalMGPL.g:2784:1: ( 'for' )\n {\n // InternalMGPL.g:2784:1: ( 'for' )\n // InternalMGPL.g:2785:2: 'for'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getForStmtAccess().getForKeyword_0()); \n }\n match(input,43,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getForStmtAccess().getForKeyword_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public void createNewForLoop(int arity, CompilerCallback body, CompilerCallback args, boolean hasMultipleArgsHead, NodeType argsNodeId);",
"public For_Statement_Test()\n {\n }",
"private ForLoopNode completeForTagBody() {\n\t\tElementVariable firstElement = constructForTagBodyVariable(lexer.nextToken());\n\t\tElement secondElement = constructForTagBodyExpression(lexer.nextToken(), \"Second\");\n\t\tElement thirdElement = constructForTagBodyExpression(lexer.nextToken(), \"Third\");\n\n\t\tSmartScriptToken fourthToken = lexer.nextToken();\n\t\tif (fourthToken.getType() == SmartScriptTokenType.CLOSE_TAG) {\n\t\t\treturn new ForLoopNode(firstElement, secondElement, thirdElement);\n\t\t}\n\n\t\tElement fourthElement = constructForTagBodyExpression(fourthToken, \"Fourth\");\n\n\t\tSmartScriptToken closeTag = lexer.nextToken();\n\t\tif (closeTag.getType() != SmartScriptTokenType.CLOSE_TAG) {\n\t\t\tthrow new SmartScriptParserException(\"FOR-tag must have at most 4 arguments, and then must be closed.\");\n\t\t}\n\t\treturn new ForLoopNode(firstElement, secondElement, thirdElement, fourthElement);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns true if anyString pattern can consume this token | public boolean matchAnyString() { return false; } | [
"private boolean isString() {\n\t\treturn ((type == TERMINAL) && (terminal instanceof TPatternString));\n\t}",
"public abstract boolean isSingleCharMatcher();",
"private boolean isStringSequence() {\n\t\treturn ((type == TERMINAL) && (terminal instanceof TPatternStringSequence));\n\t}",
"private boolean STRING(String s) {\r\n int n = input.match(s, in);\r\n in += n;\r\n return (n > 0);\r\n }",
"public boolean isLiteral() {\r\n Pattern x = thePattern;\r\n while(x != null) {\r\n if(x instanceof oneChar)\r\n ;\r\n else if(x instanceof Skipped)\r\n ;\r\n else\r\n return false;\r\n x = x.next;\r\n }\r\n return true;\r\n }",
"public abstract boolean containsToken(String token);",
"public default boolean hasTokenString() {\n\t\treturn false;\n\t}",
"boolean hasStrval();",
"protected boolean isPatternFoundInString(String string) {\n if (!StringUtils.isEmpty(string)) {\n Matcher matcher = pattern.matcher(string);\n if (matcher.find()) {\n return true;\n }\n }\n return false;\n }",
"public boolean hasTokenstring() {\n return fieldSetFlags()[0];\n }",
"public boolean canHaveToken(String token) {\n\t\treturn token != null && token.length() == 1 && Character.isLetter(token.charAt(0));\n\t}",
"public boolean consume( String consumable )\n {\n return consume( consumable, Whitespaces.KEEP );\n }",
"boolean validatePattern(String raw);",
"private boolean accept(String s) {\n if (curIRIndex >= IR.length())\n return false;\n if (curIRIndex + s.length() <= IR.length() && s.equals(IR.substring(curIRIndex, curIRIndex + s.length()))) {\n curIRIndex += s.length();\n skipWhitespace();\n return true;\n } else {\n return false;\n }\n }",
"private boolean matchesOne(String string, PatternsList patterns) {\n if (patterns != null) {\n for (Pattern pattern : patterns.getPatterns()) {\n if (pattern.matcher(string).matches()) {\n return true;\n }\n }\n }\n return false;\n }",
"boolean isString(String str)\r\n\t{\r\n\t\treturn str.matches(\".*[a-zA-Z]+.*\");\r\n\t}",
"final protected boolean match( Token T, String token )\n {\n return match( T, token, 0, false );\n }",
"public boolean doesMatchPattern() {\n \treturn barcodeMatcher.matches();\n }",
"public abstract boolean hasToken(int numberOfTokens);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the solenoid field | public Solenoid getSolenoid() {
return _solenoid;
} | [
"public Number getSolineId() {\n return (Number)getAttributeInternal(SOLINEID);\n }",
"java.lang.String getField1515();",
"public Number getOeSolineId() {\n return (Number) getAttributeInternal(OESOLINEID);\n }",
"java.lang.String getField1671();",
"java.lang.String getField1307();",
"java.lang.String getField1571();",
"public boolean isSolenoidOnly() {\n\t\treturn ((_activeField != null) && (_activeField == _solenoid));\n\t}",
"java.lang.String getField1710();",
"java.lang.String getField1414();",
"java.lang.String getField1600();",
"java.lang.String getField1646();",
"java.lang.String getField1633();",
"java.lang.String getField1263();",
"java.lang.String getField1572();",
"java.lang.String getField1871();",
"java.lang.String getField1663();",
"java.lang.String getField1063();",
"java.lang.String getField1772();",
"java.lang.String getField1362();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a transaction to the HashMap of transactions where the id is the key | public void addTransaction(Transaction t) {
transactions.put(t.getId(), t);
} | [
"public void addTransaction(Transaction tx) {\n // IMPLEMENT THIS\n }",
"public void addTransaction(CustomerTransaction cust) {\n history.add(cust);\n }",
"public void addTransaction(TransactionId tid, Permissions pms){\n\tif(tid != null){\n\t Transaction tas = new Transaction(tid, pms);\n\t this.traid.add(tas);\n\t} else{\n\t Debug.log(\"!!!warning: a 'null' transation ID is going to get a page. Adding refused.\"); \n\t}\n }",
"public void addTransaction(Transaction transaction) {\r\n\t\ttransactionList.add(transaction);\r\n\t}",
"public TransactionRecord addTransaction(Transaction transaction) \n throws IOException;",
"public void addTransactionRecordToCache (TransactionInfoRecord txr) {\n synchronized (transactionRecords) {\n if (transactionRecords == null) {\n transactionRecords = \n new LinkedHashMap <String, TransactionInfoRecord>();\n }\n \n transactionRecords.put (txr.getId(), txr);\n /* circular reference */\n txr.setPlog(this);\n }\n }",
"void addConfirmedTransaction(int transId, String userId);",
"public void addTransaction(Transaction t) {\n\t\ttransactions.add(t);\n\t\tt.getSourceAccount().getTransactions().add(t);\n\t\tif(t.isHasRecipientAccount()) {\n\t\t\tt.getRecipientAccount().getTransactions().add(t);\n\t\t}\n\t\tfirePropertyChange(ID_TRANSACTIONS, null, t);\n\t}",
"public void addTransaction(Transaction tx) {\n // IMPLEMENT THIS\n txPool.addTransaction(tx);\n\n }",
"public void addTransaction(Transaction tx) {\n // IMPLEMENT THIS\n transactionPool.addTransaction(tx);\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public void addTransaction(Transaction tx) {\n // IMPLEMENT THIS\n\t txPool.addTransaction(tx);\n }",
"public void addToKnownTransactions(Sha256Hash hash)\n {\n m_knownTransactions.add(hash);\n }",
"public void addTransactionItem() {\r\n\t\ttim.addTransactionItem();\r\n\t}",
"@Override\n\tpublic void addTransactionToDatabase(Transaction trans) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into transaction_history values(default, ?, ?, ?, now())\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setInt(1, trans.getAccountId());\n\t\t\tprepStmt.setString(2, trans.getUsername());\n\t\t\tprepStmt.setDouble(3, trans.getAmount());\n\t\t\tprepStmt.executeUpdate();\n\t}",
"public void addTransaction(Transaction tx) {\n transactionPool.addTransaction(tx);\n }",
"public void addCommittedTx(GridCacheTxEx<K, V> tx);",
"void add(Transaction transaction) throws NoContentTimestampException;",
"public void put(GlobalTransaction tx, TransactionContext transactionContext)\n {\n if (tx == null)\n {\n log.error(\"key (GlobalTransaction) is null\");\n return;\n }\n gtx2ContextMap.put(tx, transactionContext);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor, create a new adapter with a list of color and a list of smiley | public PageAdapter(FragmentManager mgr, int[] colors, int[] smiley){
super(mgr);
this.colors = colors;
this.smiley = smiley;
} | [
"public Smiley(Color eyesColor, Color smileColor, Color outlineColor, Color skinColor) \n {color1 = eyesColor;\n color2 = smileColor;\n color3 = outlineColor;\n color4 = skinColor;\n }",
"IngredientsAdapter(ArrayList<String> ingredients, Context context) {\n\n this.ingredients = ingredients;\n ingredientsImages = new HashMap<>();\n setImagesMap(ingredients, context);\n\n }",
"public ListWithImageAdapter(Context context, int textViewResourceId, ArrayList<LogicalDevice> items) {\n super(context, textViewResourceId, items);\n this.items = items;\n }",
"private void customizeMonkeyAdapter(){\n MonkeyConfig config = new MonkeyConfig();\n config.setTextBubbleIncomingColor(Color.GREEN);\n config.setTextBubbleOutgoingColor(Color.BLUE);\n adapter.setMonkeyConfig(config);\n }",
"public customAdapter() {\n super(SeekerRatingsListActivity.this, R.layout.rating_content, seekerRatingsList);\n }",
"public TipsAdapter(List<Tip> tipsList, Tips.Types type, Context context){\n this.dataSet = tipsList;\n this.type = type;\n this.context = context;\n\n icon = new Hashtable<String, Integer>();\n icon.put(\"1\", R.drawable.a_alimentacion);\n icon.put(\"2\", R.drawable.a_salud);\n icon.put(\"3\", R.drawable.a_ejercicios);\n\n textColor = new Hashtable<String, Integer>();\n textColor.put(\"1\", R.color.bluoOrange);\n textColor.put(\"2\", R.color.blueButtonPrimary);\n textColor.put(\"3\", R.color.bluoGreen);\n }",
"public ColorList () { \n\t\t\n\t}",
"public ExposureArrayAdapter(Context context, CaptureDesign design, DisplayOptionBundle options){\n super(context, R.layout.small_text_simple_list_view_1, design.getExposures());\n mContext = context;\n mDesign = design;\n mOptions = options;\n }",
"public CheckInAdapter(Activity activity, int layoutResourceId,ArrayList<CheckInBitmap> checkInList) \n {\n super(activity, layoutResourceId, checkInList);\n this.activity = activity;\n this.checkInList = checkInList;\n }",
"BeverageAdapter(List<Beverage> beverages) {\n mBeverages = beverages;\n }",
"public ItemCardAdapter(ArrayList itemList, Class<?> ViewClass){\n super();\n this.ViewClass = ViewClass;\n this.itemList = itemList;\n }",
"protected abstract ListAdapter createAdapter();",
"public MyGridViewAdapter(int[] images, Context context)\n {\n super();\n pictures = new ArrayList<Picture>();\n inflater = LayoutInflater.from(context);\n for (int i = 0; i < images.length; i++)\n {\n //Picture picture = new Picture(titles[i], images[i]);\n Picture picture = new Picture(images[i]);\n pictures.add(picture);\n }\n }",
"public IngredientAdapter(Context context, ArrayList<Ingredient> data) {\n this.context = context;\n this.data = data;\n inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n }",
"public NotificationRecyclerAdapter(ArrayList<Notification> arrayList, Context context){\n this.arrayList = arrayList;\n this.context = context;\n }",
"public MilesAdapter(Activity context, ArrayList<Album> miles) {\n super(context, 0, miles);\n }",
"public MyBeverageRecyclerViewAdapter(List<Beverage> items, OnListFragmentInteractionListener listener) {\n mValues = items;\n mListener = listener;\n }",
"private void createListView()\r\n {\n itens = new ArrayList<Objeto>();\r\n Objeto item1 = new Objeto(\"Igreja Nossa Senhora de Lourdes\", R.drawable.lourdes);\r\n Objeto item2 = new Objeto(\"Basilica Sagrado Coração de Jesus\", R.drawable.santuario);\r\n Objeto item3 = new Objeto(\"Igreja São Sebastião\", R.drawable.sebastiao);\r\n Objeto item4 = new Objeto(\"Matriz Nossa Senhora da Conceição\", R.drawable.matriz);\r\n\r\n itens.add(item1);\r\n itens.add(item2);\r\n itens.add(item3);\r\n itens.add(item4);\r\n\r\n //Cria o adapter\r\n adapterListView = new AdapterListView(this, itens);\r\n\r\n //Define o Adapter\r\n listView.setAdapter(adapterListView);\r\n //Cor quando a lista é selecionada para rolagem.\r\n listView.setCacheColorHint(Color.TRANSPARENT);\r\n }",
"public StockListItemAdapter(Stocks stocks, OnStockListItemAdapterInteractionListener listener) {\n this.stocks = stocks;\n this.listener = listener;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Insert a new partner into database | AdPartner insertAdPartner(AdPartner adPartner); | [
"public int insertPartner(Address addressObj, User userObj, Partner partnerObj)\n\t{\n\t\t// Keep the result came from DB\n\t\tint recordId = -1;\n\n\t\t// Open connection to DB\n\t\tMySql db = new MySql();\n\t\tConnection con = db.openConnection();\n\n\t\t// Select into DB\n\t\tString sql = \"{CALL sp_insert_parceiro\" + \n\t\t\t\t\t \"(\"+\n\t\t\t\t\t \"?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?\"+\n\t\t\t\t\t \")}\";\n\n\t\ttry {\n\n\t\t\t// Create the statement\n\t\t\tCallableStatement stmt = (CallableStatement) con.prepareCall(sql);\n\t\t\t\n\t\t\tstmt.registerOutParameter(20, java.sql.Types.INTEGER);\n\t\t\t\n\t\t\t// Address\n\t\t\tstmt.setString(1, addressObj.getLogradouro());\n\t\t\tstmt.setString(2, addressObj.getNumero());\n\t\t\tstmt.setString(3, addressObj.getCidade());\n\t\t\tstmt.setInt(4, addressObj.getIdEstado());\n\t\t\tstmt.setString(5, addressObj.getCep());\n\t\t\tstmt.setString(6, addressObj.getBairro());\n\t\t\tstmt.setString(7, addressObj.getComplemento());\n\t\t\t\n\t\t\t// User\n\t\t\tstmt.setString(8, userObj.getUsuario());\n\t\t\tstmt.setString(9, userObj.getSenha());\n\t\t\tstmt.setInt(10, userObj.getIdNivelUsuario());\n\t\t\t\n\t\t\t// Partner\n\t\t\tstmt.setString(11, partnerObj.getNomeFantasia());\n\t\t\tstmt.setString(12, partnerObj.getRazaoSocial());\n\t\t\tstmt.setString(13, partnerObj.getCnpj());\n\t\t\tstmt.setInt(14, partnerObj.getSocorrista());\n\t\t\tstmt.setString(15, partnerObj.getEmail());\n\t\t\tstmt.setString(16, partnerObj.getTelefone());\n\t\t\tstmt.setString(17, partnerObj.getFotoPerfil());\n\t\t\tstmt.setString(18, partnerObj.getCelular());\n\t\t\tstmt.setInt(19, partnerObj.getIdPlanoContratacao());\n\n\t\t\t// Execute the query\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\t// Verify if procedure returns one record\n\t\t\tif(rs.next())// Returns one\n\t\t\t{\n\t\t\t\t// Keep record in variable to return it \n\t\t\t\trecordId = rs.getInt(1);\n\t\t\t}\n\n\t\t\t// close connection to DB\n\t\t\tcon.close();\n\n\t\t\treturn recordId;\n\n\t\t}catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn recordId;\n\t\t}\n\t}",
"void addRomanticPartner(Personagem partner);",
"private void doCreateNewPartner() {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"***Hors Management System:: System Administration:: Create new partner\");\n Partner partner = new Partner();\n System.out.print(\"Enter partner username:\");\n partner.setName(sc.nextLine().trim());\n System.out.print(\"Enter partner password;\");\n partner.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Partner>> constraintViolations = validator.validate(partner);\n\n if (constraintViolations.isEmpty()) {\n partner = partnerControllerRemote.createNewPartner(partner);\n System.out.println(\"New partner created successfully\");\n } else {\n showInputDataValidationErrorsForPartner(constraintViolations);\n }\n\n }",
"public void addPartnerValues(Partner partner) throws MCDSException, RemoteException;",
"public void savePartnerValues(Partner partner) throws MCDSException, RemoteException;",
"public void addParts(String p_id, String Desc, String price, String product_id, String qty, String q_of_p_val) {\r\n try{\r\n \r\n stmt=DBconnection.getStatementConnection();\r\n stmt.executeUpdate\r\n (\"INSERT INTO parts VALUE('\"+p_id+\"','\"+Desc+\"','\"+price+\"','\"+product_id+\"','\"+qty+\"','\"+q_of_p_val+\"')\");\r\n JOptionPane.showMessageDialog(null,\"You are Succesful Added Data..!\");\r\n } \r\n catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n }",
"public void insert() throws SQLException {\n \n int result;\n \n // Form and execute statement\n insertStatement.setString(1, name);\n insertStatement.setString(2, street);\n insertStatement.setString(3, city);\n insertStatement.setString(4, state);\n insertStatement.setString(5, zip);\n insertStatement.setString(6, phone);\n result = insertStatement.executeUpdate();\n \n // Check results\n if (result == 0)\n throw new SQLException(\"[Sponsor] No row was inserted.\");\n }",
"private void insertionClient(int id, String nomFamille, String prenom,\n String courriel, String tel, String anniv,\n String adresse, String ville, String province,\n String codePostal, String carte, String noCarte,\n int expMois, int expAnnee, String motDePasse,\n String forfait) {\n }",
"public CandidatoSpecializzazione inserisci(CandidatoSpecializzazione candidatoSpecializzazione);",
"int insert(CmsPrefrenceAreaProductRelation record);",
"public abstract void insert(Propiedad p_domain) throws Exception;",
"void insertaPersona(Connection conexion, Persona persona);",
"public void createNewPayment() {\n// Prepare parameters\n String[] params = {this.isPaid.toString(), this.paymentMethod, Double.toString(this.totalPrice)};\n\n\n// SQL string query\n String query = \"INSERT INTO payment (isPaid, payment_method, total_price) VALUES (?, ?, ?);\";\n\n// Execute query and retrieve new payment id\n int paymentId = Connect.prepUpdatePayment(query, params);\n\n// Update local id\n if(paymentId >= 0) {\n this.paymentId = paymentId;\n }\n }",
"public static void addProvider(String id_product, String date_of_delivery, String name_provider) throws SQLException, ClassNotFoundException {\n try {\n Connection c = getConnection();\n ResourceBundle props = ResourceBundle.getBundle(\"accountSQL\");\n String res = props.getString(\"provider.insert\");\n PreparedStatement ps = c.prepareStatement(res);\n {\n ps.setInt(1, Integer.parseInt(String.valueOf(id_product)));\n ps.setDate(2, Date.valueOf(date_of_delivery));\n ps.setString(3, name_provider);\n ps.executeUpdate();\n }\n System.out.println(\"PreparedStatement: \" + ps);\n } catch (NamingException e) {\n log.error(\"NamingException\");\n e.printStackTrace();\n }\n\n }",
"public void insertConcursoClasificacionParticipante(ConcursoClasificacionParticipante concursoClasificacionParticipante, Usuario usuario);",
"Crime insertCrime(Crime crime);",
"public void insertPlayer( TennisPlayer p ) throws TennisDatabaseException {\r\n try{\r\n this.root = insertPlayerRec( this.root, p ); //Call to the recursive implementation. \r\n }\r\n catch( TennisDatabaseException e ){\r\n throw e;\r\n }\r\n }",
"public void insertClient(ClientVO clientVO);",
"int insert(DBVpnConnectionPoint record);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the given isotope from the MolecularFormulaExpand. | @TestMethod("testRemoveIsotope_IIsotope")
public void removeIsotope(IIsotope isotope) {
isotopesMax.remove(getIsotope(isotope));
isotopesMin.remove(getIsotope(isotope));
} | [
"public boolean supprimerMagasin(int id);",
"public void remover(Pais pais);",
"public Value.Builder clearJamMulai() {\n fieldSetFlags()[2] = false;\n return this;\n }",
"void unsetSpecimen();",
"public void removeSpecimen(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SPECIMEN$22, i);\n }\n }",
"public void clearMassList() {\n\t\tfor(Mass m : myMassList) {\n\t\t\tm.remove();\n\t\t}\n\t\tmyMassList.clear();\n\t}",
"public void remove(Element toRemove, boolean clearRecipes)\n {\n assert toRemove != null : \"null element\";\n // Check all categories to remove the element\n for (ArrayList<Category> categoryKind : allCategories)\n {\n // Go through the categories and remove the element if it's in there\n for (Category category : categoryKind)\n {\n // If the element was removed: clean up where necessary\n if (category.remove(toRemove))\n {\n // If the category is now empty: remove the category\n if (category.getContaining().size() == 0)\n {\n categoryKind.remove(category);\n }\n // Remove the recipes when wanted\n if (clearRecipes)\n {\n // Clear all the recipes\n for (String recipe : toRemove.getAllRecipes())\n {\n recipes.put(recipe, null);\n }\n }\n return;\n }\n }\n }\n }",
"void unsetElementOperation();",
"private void removeAssetsFromLaunchDataList()\n {\n\n int size = mLaunchDataList.size();\n LaunchData currentLaunchData;\n String scormType = \"\";\n\n for (int i = 0; i < size;)\n {\n currentLaunchData = (LaunchData) mLaunchDataList.elementAt(i);\n scormType = currentLaunchData.getSCORMType();\n\n if (scormType.equals(\"asset\"))\n {\n mLaunchDataList.removeElementAt(i);\n size = mLaunchDataList.size();\n }\n else\n {\n i++;\n }\n }\n }",
"public void removeAmountOfWork();",
"@PreRemove\n private void preRemove() {\n if (exams != null) {\n for (Exam exam : exams) {\n exam.setSpeciality(null);\n }\n }\n }",
"public void unsetSum()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(SUM$22);\r\n }\r\n }",
"void removePatternDemand();",
"public void removeIngredient(Ingredient input) {\n getIngredientList().remove(input);\n }",
"public void removeFeasiblePOI(PlaceOfInterest placeOfInterest) {\n feasiblePOIs.remove(placeOfInterest);\n }",
"public void removeCustomFormula(String nodeID)\r\n \t{\n \t\tdagPanel.removeCustomFormula(nodeID);\r\n \t}",
"void removeFinancialStatements(int i);",
"void unsetEquilibriumCant();",
"public void clearPrizeMoneyFormulas() {\n\t\twhile (!prizeMoneyFormulas.isEmpty()) {\n\t\t\tremoveFromPrizeMoneyFormulas(prizeMoneyFormulas.iterator().next());\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string indicating billing order. Mandatory. | public String getBillingOrder()
{
if (billingOrder == null)
return "";
return billingOrder;
} | [
"public java.lang.String getBilling_def() {\n return billing_def;\n }",
"java.lang.String getClientOrderIdBuy();",
"String billingPartNumber();",
"java.lang.String getSupplyOrderNumber();",
"java.lang.String getClientOrderId();",
"@Override\n\tpublic java.lang.String getBillingName() {\n\t\treturn _bookOrder.getBillingName();\n\t}",
"String savingsPlanOrderId();",
"public String getBillingStatus() {\r\n return billingStatus;\r\n }",
"@Override\n\tpublic java.lang.String getBillingPrefecture() {\n\t\treturn _bookOrder.getBillingPrefecture();\n\t}",
"public String getBillingCode() {\r\n return billingCode;\r\n }",
"public java.lang.String getBillingNumber() {\n return billingNumber;\n }",
"public int getBilling_type() {\n return billing_type;\n }",
"public String getBillingInfo(){\n\t\treturn billingInfo;\n\t}",
"public String getPayOrderNo() {\n return payOrderNo;\n }",
"java.lang.String getCustomerOrderNumber();",
"public String getCustApprReqd() {\r\n return custApprReqd;\r\n }",
"java.lang.String getOrderNumber();",
"@Override\n\tpublic java.lang.String getPurchaseOrder() {\n\t\treturn _eprocurementRequest.getPurchaseOrder();\n\t}",
"public java.lang.String getProjectPurchaseOrder() {\n return projectPurchaseOrder;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a MineSweeper of any size that has numberOfMines randomly set so we get different games. | public MineSweeper(int rows, int columns, int numberOfMines) {
Random generator = new Random();
int x;
int y;
boolean[][] mines = new boolean[columns][rows];
for (int i = 0; i < Math.min(numberOfMines, columns*rows); i++) {
do {
x = generator.nextInt(rows);
y = generator.nextInt(columns);
} while (mines[x][y]);
mines[y][x] = true;
}
board = new GameSquare[mines.length][mines[0].length];
for (int i = 0; i < mines.length; i++) {
for (int j = 0; j < mines[0].length; j++) {
board[i][j] = new GameSquare(mines[i][j], i, j);
if (board[i][j].isMine) {
System.out.print("+");
} else {
System.out.print("-");
}
}
System.out.println();
}
setAdjacentMines();
} | [
"public MineSweeper(boolean[][] mines) {\r\n board = new GameSquare[mines.length][mines[0].length];\r\n \r\n for (int i = 0; i < mines.length; i++) {\r\n \tfor (int j = 0; j < mines[0].length; j++) {\r\n \t\tboard[i][j] = new GameSquare(mines[i][j], i, j);\r\n \t\tif (board[i][j].isMine) {\r\n \t\t\tSystem.out.print(\"+\");\r\n \t\t} else {\r\n \t\t\tSystem.out.print(\"-\");\r\n \t\t}\r\n \t}\r\n \tSystem.out.println();\r\n }\r\n\r\n // Example construction of one GameSquare stored in row 2, column 4:\r\n // /// board[2][4] = new GameSquare(mines[2][4], 2, 4);\r\n // Use a nested for loop to change all board array elements\r\n // from null to a new GameSquare\r\n\r\n // You will need to call private void setAdjacentMines() to set\r\n // mineNeighbors for all GameSquare objects because each GameSquare object\r\n // must first know if it is a mine or not. Set mineNeighbors for each.\r\n setAdjacentMines();\r\n }",
"public void generateMines() {\n ArrayList<Integer> list = new ArrayList<Integer>();\n for (int i = 1; i < rowNum*colNum+1; i++) {\n list.add(i);//range from 1 to 64\n }\n Collections.shuffle(list);\n\n //System.out.print(\"Old_version_game.Mine location from left to right: \");\n for (int index = 0; index < mineNum; index++)\n rands[index] = list.get(index);////10 numbers ranging from 1 to 64\n Arrays.sort(rands);//sort in ascending order\n }",
"private void setMines(){\n Random random = new Random();\r\n int counter = mines;\r\n while(counter>0){\r\n int rx = random.nextInt(this.x); //without +1 because it can be 0\r\n int ry = random.nextInt(this.y);\r\n if( ! this.grid[rx][ry].isMine() ){\r\n this.grid[rx][ry].setMine();\r\n counter--; \r\n }\r\n }\r\n \r\n }",
"public NatsMinesweeper(int height, int width, int numMines)\n {\n //Create and set up the window.\n super(\"Nat's Minesweeper\");\n setSize(2*MARGIN_SIZE + width*SQUARE_SIZE, \n \tTITLE_BAR_HEIGHT + 3*MARGIN_SIZE + H + height*SQUARE_SIZE);\n setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n gameWon = false;\n gameLost = false;\n \t\n \t//Create and set up a blank panel to fill the window, on which all other panels will be placed.\n JPanel panel = new JPanel();\n panel.setSize(getWidth(), getHeight());\n panel.setBackground(Color.WHITE);\n panel.setLayout(null);\n add(panel);\n \n \t//Create and set up a MineCounter in the top left of the window to keep track of the mines left.\n this.numMines = numMines;\n minesFound = 0;\n mineCounter = new MineCounter(numMines);\n panel.add(mineCounter);\n mineCounter.setLocation(MARGIN_SIZE, MARGIN_SIZE);\n \n \t//Create and set up a TimerDisplay in the top right of the window to display the elapsed time.\n timerDisplay = new TimerDisplay();\n panel.add(timerDisplay);\n timerDisplay.setLocation(panel.getWidth() - MARGIN_SIZE - W, MARGIN_SIZE);\n \n \t//Create and set up a ResetButton to reset the game.\n resetButton = new ResetButton();\n panel.add(resetButton);\n resetButton.setLocation(panel.getWidth()/2 - H/2, MARGIN_SIZE);\n \n \t//Create a board panel to hold all the game squares in a grid pattern, \n \t//then fill the board (and grid) with GameSquares.\n JPanel board = new JPanel(new GridLayout(height, width));\n board.setSize(width*SQUARE_SIZE, height*SQUARE_SIZE);\n panel.add(board);\n board.setLocation(MARGIN_SIZE, H + 2*MARGIN_SIZE);\n grid = new GameSquare[height][width];\n for (int r = 0; r < height; r++)\n {\n for (int c = 0; c < width; c++)\n {\n grid[r][c] = new GameSquare(r, c);\n board.add(grid[r][c]);\n }\n }\n \n setVisible(true); //Finally, display the window, allowing the game to begin.\n }",
"public MineSweeper(int rows,int columns,int bombNumber){\n\t\tboard = new Board(rows,columns,bombNumber);\n\t}",
"private void initCells()\n {\n this.minesweeperCells = new MinesweeperCell[ROWS_COLUMNS][ROWS_COLUMNS];\n int k = 0;\n mines = new ArrayList<>();\n while(k < N_MINES)\n {\n int randomRow, randomColumn;\n randomRow = (int) (Math.random() *this.minesweeperCells.length);\n randomColumn = (int) (Math.random() *this.minesweeperCells[0].length);\n Point mine = new Point(randomRow, randomColumn);\n if(!mines.contains(mine))\n {\n mines.add(mine);\n k++;\n }\n }\n // init the cells\n for(int i = 0; i < this.minesweeperCells.length; i++)\n {\n for(int j = 0; j < this.minesweeperCells[i].length; j++)\n {\n this.minesweeperCells[i][j] = new MinesweeperCell(false, true, getMineCount(i,j), i, j);\n }\n }\n this.minesweeperCustomView.setArray(this.minesweeperCells);\n }",
"public void assignmines() {\n\n for(int row = 0; row < mineBoard.length; row++) {\n for(int col = 0; col < mineBoard[0].length; col++) {\n mineBoard[row][col] = 0;\n }\n }\n\n int minesPlaced = 0;\n Random t = new Random();\n while(minesPlaced < nummines) {\n int row = t.nextInt(10);\n int col = t.nextInt(10);\n if(mineBoard[row][col] == Empty) {\n setmine(true);\n mineBoard[row][col] = Mine;\n minesPlaced++;\n }\n }\n }",
"public Minesweeper () {}",
"private void populateMineFieldByRandom() {\n\n // Initialize random number generator\n Random r = new Random();\n\n // Place 50 mines\n for(int i=0; i<50; i++)\n {\n // Take x and y coordinates where to place a mine\n int x = r.nextInt(this.gameboard.length);\n int y = r.nextInt(this.gameboard[0].length);\n\n // Place a mine in the square (doesn't matter if there already is one)\n this.gameboard[x][y].add(new GameObjectMine());\n }\n\n // Clear squares surrounding the player of mines\n this.gameboard[5][0].clear();\n this.gameboard[5][1].clear();\n this.gameboard[6][0].clear();\n this.gameboard[6][1].clear();\n this.gameboard[7][0].clear();\n this.gameboard[7][1].clear();\n\n // Place player object in starting position and mark the square as visited\n this.gameboard[6][0].add(new GameObjectPlayer());\n this.visitedSquares[6][0]=true;\n\n // Cleare squares surrounding the goal\n this.gameboard[5][18].clear();\n this.gameboard[5][19].clear();\n this.gameboard[6][18].clear();\n this.gameboard[6][19].clear();\n this.gameboard[7][18].clear();\n this.gameboard[7][19].clear();\n\n // Place goal on board\n this.gameboard[6][19].add(new GameObjectGoal());\n\n // Iterate over each square and store number of mines surrounding each square in an array\n for(int i=0; i<this.gameboard.length; i++)\n {\n for(int j=0; j<this.gameboard[0].length; j++)\n {\n this.surroundingMines[i][j]=this.countNumberOfSurroundingMines(i, j);\n }\n }\n }",
"public void createMines() {\n\t\tint minesCount = 0;\n\t\tRandom rand = new Random();\n\t\t\n\t\tswitch(diff) {\n\t\tcase 1:\n\t\t\tpercentMines = 15;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tpercentMines = PERCENT_MINES_DEFAULT;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tpercentMines = 35;\n\t\t\tbreak;\n\t\t}\n\t\tnumMines = dim*dim*percentMines / 100;\n\t\twhile (minesCount < numMines) {\n\t\t\tint xVal = rand.nextInt(buttons.length);\n\t\t\tint yVal = rand.nextInt(buttons[0].length);\n\t\t\tboolean curMineStat = buttons[yVal][xVal].getMineBool();\n\t\t\tboolean curPathStat = buttons[yVal][xVal].getPathBool();\n\t\t\tif(!curMineStat && ! curPathStat) {\n\t\t\t\tbuttons[yVal][xVal].setMineBool(true);\n\t\t\t}\n\t\t\tminesCount = countMines();\n\t\t}\n\t\t\n\t\t\n\t}",
"public void placeMines() {\n Random random = new Random();\n int minesToPlace = 5;\n\n while (minesToPlace > 0) {\n int i = random.nextInt(10) + 1;\n int j = random.nextInt(10) + 1;\n Tile oldTile = tiles[i][j][0];\n if (oldTile instanceof SeaTile) {\n Tile mineTile = new MineTile(i, j, 0);\n tiles[i][j][0] = mineTile;\n minesToPlace--;\n }\n }\n updateLocalObservers();\n }",
"private void initMinesweeper() {\n timer.start();\n timer.setOnChronometerTickListener(new Chronometer.OnChronometerTickListener() {\n public void onChronometerTick(Chronometer arg0) {\n long minutes = ((SystemClock.elapsedRealtime() - timer.getBase()) / 1000) / 60;\n long seconds = ((SystemClock.elapsedRealtime() - timer.getBase()) / 1000) % 60;\n long elapsedTime = SystemClock.elapsedRealtime();\n }\n });\n // initialise 2D array for game with mines\n minesweeper = new Minesweeper[SQUARE_ROWS_COLUMNS][SQUARE_ROWS_COLUMNS];\n // initialise mines\n mines = new ArrayList<>();\n for (int i = 0; i < NUM_MINES; i++) {\n int rowMine, columnMine;\n rowMine = (int) (Math.random() * minesweeper.length);\n columnMine = (int) (Math.random() * minesweeper[0].length);\n // use point for location of mine\n Point mine = new Point(rowMine, columnMine);\n mines.add(mine);\n }\n // creates the boxes for the game\n for (int i = 0; i < minesweeper.length; i++) {\n\n for (int j = 0; j < minesweeper[i].length; j++) {\n minesweeper[i][j] = new Minesweeper(true, false, getMinesSurrounding(i, j), i, j);\n }\n }\n // set up the array on the view\n view.setArray(minesweeper);\n }",
"public Minesweeper(){\n width = getGridWidth(); //sets the width of the game\n height = getGridHeight(); //sets the height of the game\n minesweeperButtons = new ButtonListener[height][width];\n updateButtonStrings = new String[height][width];\n for (int i = 0; i < height; i++) { //adds a button listener and \"\" to each button\n for (int j = 0; j < width; j++) {\n ButtonListener button = new ButtonListener(i, j, \"\");\n minesweeperButtons[i][j] = button;\n updateButtonStrings[i][j] = \"\";\n }\n }\n createRandomBombs(); //gives the board bombs in random locations\n currentGameState = GameState.TURN_P1; //sets the first move to player 1\n }",
"private void generateShips() {\n boolean b;\n int kx, ky;\n for (int n = 3; n >= 0; n--) {\n for (int m = 0; m <= 3 - n; m++) {\n do {\n Random random = new Random();\n int x = getRandomNumberInRange(1, 11);\n int y = getRandomNumberInRange(1, 11);\n kx = random.nextInt(2);\n if (kx == 0) {\n ky = 1;\n } else {\n ky = 0;\n }\n b = true;\n for (int i = 0; i <= n; i++) {\n if (!isFreedom(x + kx * i, y + ky * i, getInsideBoard())) {\n b = false;\n }\n }\n if (b) {\n for (int j = 0; j <= n; j++) {\n getInsideBoard()[x + kx * j][y + ky * j] = n + 1;\n }\n }\n } while (!b);\n }\n }\n setStabilityInsideBoard(copyInsideArray());\n }",
"public Minesweeper(){\n\t\t// Select difficulty\n\t\tObject[] difficulties = GameBoard.LEVELS.keySet().toArray();\n\t String difficulty = (String)JOptionPane.showInputDialog(\n\t \t\tnull, \n\t \t\t\"Left-Click to reveal a case.\\nRight-Click to mark a case.\\nSelect a difficulty : \", \n\t \t\t\"Minesweeper\", \n\t \t\tJOptionPane.QUESTION_MESSAGE, \n\t \t\tnull, \n\t \t\tdifficulties, \n\t \t\tdifficulties[1]\n\t );\n\t \n\t if(difficulty != null){\n\t \tthis.gameBoard = new GameBoard(GameBoard.LEVELS.get(difficulty));\n\t }\n\t else System.exit(0);\n\t}",
"public Grid initMines(int length, int width, int minesNumber) {\n Grid gridWithMines = new Grid(length, width);\n\n Random rand = new Random();\n while(minesNumber > 0){\n int randomRow = rand.nextInt(length-1);\n int randomColumn = rand.nextInt(width-1);\n Position position = new Position(randomRow, randomColumn);\n\n if(!gridWithMines.isMine(position)) {\n gridWithMines.addMine(position);\n\n //update grid with computed adjacent mines\n List<Position> adjacents = gridWithMines.getAdjacents(new Position(randomColumn, randomRow));\n for (Position adjacent : adjacents) {\n if(!gridWithMines.isMine(adjacent)){\n gridWithMines.updateAdjacentOfMine(adjacent);\n }\n }\n minesNumber--;\n }\n }\n return gridWithMines;\n }",
"public MineField2(int rows, int columns, int mines){\n int mineXCoor, mineYCoor;\n numberOfRows = rows;\n numberOfColumns = columns;\n numberOfMines = mines;\n fieldGrid = new int[numberOfRows][numberOfColumns][3];\n \n for(int i=0; i<numberOfMines; i++){\n mineXCoor = randomNumber.nextInt(numberOfRows-1);\n mineYCoor = randomNumber.nextInt(numberOfColumns-1);\n \n if(fieldGrid[mineXCoor][mineYCoor][0]==9){\n i--;\n }\n else{\n fieldGrid[mineXCoor][mineYCoor][0]=9; \n }\n }\n \n\t // populates the cells with the probability numbers \n\t for(int i=0; i<numberOfRows; i++){\n\t for(int k=0; k<numberOfColumns; k++){\n\t if(fieldGrid[i][k][0]==9){\n\t if(i>0){\n\t if(fieldGrid[i-1][k][0]!=9){\n\t fieldGrid[i-1][k][0] = fieldGrid[i-1][k][0] + 1;\n\t }\n\t }\n\t if(k<numberOfColumns-1){\n\t if(fieldGrid[i][k+1][0]!=9){\n\t fieldGrid[i][k+1][0] = fieldGrid[i][k+1][0] + 1;\n\t }\n\t }\n\t if(i<numberOfRows-1 && k<numberOfColumns-1){\n\t if(fieldGrid[i+1][k+1][0]!=9){\n\t fieldGrid[i+1][k+1][0] = fieldGrid[i+1][k+1][0] + 1;\n\t }\n\t }\n\t if(i<numberOfRows-1){\n\t if(fieldGrid[i+1][k][0]!=9){\n\t fieldGrid[i+1][k][0] = fieldGrid[i+1][k][0] + 1;\n\t }\n\t }\n if(i>0 && k>0){\n if(fieldGrid[i-1][k-1][0]!=9){\n fieldGrid[i-1][k-1][0] = fieldGrid[i-1][k-1][0] + 1;\n }\n }\n if(k>0){\n if(fieldGrid[i][k-1][0]!=9){\n fieldGrid[i][k-1][0] = fieldGrid[i][k-1][0] + 1;\n }\n }\n if(i>0 && k<numberOfColumns-1){\n if(fieldGrid[i-1][k+1][0]!=9){\n fieldGrid[i-1][k+1][0] = fieldGrid[i-1][k+1][0] + 1;\n }\n }\n if(k>0 && i<numberOfRows-1){\n if(fieldGrid[i+1][k-1][0]!=9){\n fieldGrid[i+1][k-1][0] = fieldGrid[i+1][k-1][0] + 1;\n }\n }\n\t }\n\t } \t \n\t }\n\t}",
"Tile getNewTile(int size);",
"public MineHard()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(16, 16, 32);\r\n addObject(new Person() , 1 , 14);\r\n addObject(new Rock() , 1 , 15);\r\n addObject(new Rock() , 8 , 15);\r\n addObject(new Rock() , 12 , 15);\r\n addObject(new Rock() , 5 , 14);\r\n addObject(new Rock() , 15 , 13);\r\n addObject(new Rock() , 9 , 13);\r\n addObject(new Rock() , 12 , 12);\r\n addObject(new Rock() , 10 , 11);\r\n addObject(new Rock() , 7 , 11);\r\n addObject(new Rock() , 2 , 11);\r\n addObject(new Rock() , 1 , 12);\r\n addObject(new Rock() , 15 , 10);\r\n addObject(new Rock() , 12 , 9);\r\n addObject(new Rock() , 4 , 9);\r\n addObject(new Rock() , 1 , 9);\r\n addObject(new Rock() , 11 , 8);\r\n addObject(new Rock() , 13 , 7);\r\n addObject(new Rock() , 10 , 7);\r\n addObject(new Rock() , 9 , 7);\r\n addObject(new Rock() , 8 , 7);\r\n addObject(new Rock() , 7 , 7);\r\n addObject(new Rock() , 2 , 6);\r\n addObject(new Rock() , 5 , 5);\r\n addObject(new Rock() , 12 , 5);\r\n addObject(new Rock() , 9 , 4);\r\n addObject(new Rock() , 13 , 2);\r\n addObject(new Rock() , 3 , 3);\r\n addObject(new Rock() , 4 , 2);\r\n addObject(new Rock() , 1 , 1);\r\n addObject(new Rock() , 9 , 1);\r\n addObject(new Rock() , 10 , 0);\r\n addObject(new Rock() , 0 , 0);\r\n addObject(new Rock() , 0 , 7);\r\n addObject(new Rock() , 5 , 0);\r\n addObject(new Rock() , 15 , 0);\r\n addObject(new Rock() , 15 , 8);\r\n \r\n addObject(new Goldbar() , 15 , 2);\r\n addObject(new Goldbar() , 12 , 8);\r\n addObject(new Goldbar() , 15 , 15);\r\n addObject(new Goldbar() , 3 , 2);\r\n addObject(new Goldbar() , 9 , 0);\r\n addObject(new Goldbar() , 2 , 9);\r\n \r\n addObject(new Zombie() , 13 , 13);\r\n addObject(new Zombie() , 12 , 6);\r\n addObject(new Zombie() , 6 , 0);\r\n addObject(new Zombie() , 1 , 4);\r\n addObject(new Zombie() , 7 , 9);\r\n addObject(new TryC() , 2 , 1);\r\n addObject(new MainMenu() , 12 , 1);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EvaluationExpressionOut__Group__0" $ANTLR start "rule__EvaluationExpressionOut__Group__0__Impl" ../com.blasedef.onpa.ONPA.ui/srcgen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4486:1: rule__EvaluationExpressionOut__Group__0__Impl : ( () ) ; | public final void rule__EvaluationExpressionOut__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4490:1: ( ( () ) )
// ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4491:1: ( () )
{
// ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4491:1: ( () )
// ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4492:1: ()
{
before(grammarAccess.getEvaluationExpressionOutAccess().getFreeEvaluationExpressionAction_0());
// ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4493:1: ()
// ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4495:1:
{
}
after(grammarAccess.getEvaluationExpressionOutAccess().getFreeEvaluationExpressionAction_0());
}
}
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__EvaluationExpressionOut__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4478:1: ( rule__EvaluationExpressionOut__Group__0__Impl rule__EvaluationExpressionOut__Group__1 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4479:2: rule__EvaluationExpressionOut__Group__0__Impl rule__EvaluationExpressionOut__Group__1\n {\n pushFollow(FOLLOW_rule__EvaluationExpressionOut__Group__0__Impl_in_rule__EvaluationExpressionOut__Group__08825);\n rule__EvaluationExpressionOut__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__EvaluationExpressionOut__Group__1_in_rule__EvaluationExpressionOut__Group__08828);\n rule__EvaluationExpressionOut__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EvaluationExpressionOut__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4598:1: ( rule__EvaluationExpressionOut__Group__4__Impl )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4599:2: rule__EvaluationExpressionOut__Group__4__Impl\n {\n pushFollow(FOLLOW_rule__EvaluationExpressionOut__Group__4__Impl_in_rule__EvaluationExpressionOut__Group__49068);\n rule__EvaluationExpressionOut__Group__4__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EvaluationExpressionOut__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4509:1: ( rule__EvaluationExpressionOut__Group__1__Impl rule__EvaluationExpressionOut__Group__2 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4510:2: rule__EvaluationExpressionOut__Group__1__Impl rule__EvaluationExpressionOut__Group__2\n {\n pushFollow(FOLLOW_rule__EvaluationExpressionOut__Group__1__Impl_in_rule__EvaluationExpressionOut__Group__18886);\n rule__EvaluationExpressionOut__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__EvaluationExpressionOut__Group__2_in_rule__EvaluationExpressionOut__Group__18889);\n rule__EvaluationExpressionOut__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EvaluationExpressionOut__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4569:1: ( rule__EvaluationExpressionOut__Group__3__Impl rule__EvaluationExpressionOut__Group__4 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4570:2: rule__EvaluationExpressionOut__Group__3__Impl rule__EvaluationExpressionOut__Group__4\n {\n pushFollow(FOLLOW_rule__EvaluationExpressionOut__Group__3__Impl_in_rule__EvaluationExpressionOut__Group__39008);\n rule__EvaluationExpressionOut__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__EvaluationExpressionOut__Group__4_in_rule__EvaluationExpressionOut__Group__39011);\n rule__EvaluationExpressionOut__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EvaluationExpressionOut__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4538:1: ( rule__EvaluationExpressionOut__Group__2__Impl rule__EvaluationExpressionOut__Group__3 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4539:2: rule__EvaluationExpressionOut__Group__2__Impl rule__EvaluationExpressionOut__Group__3\n {\n pushFollow(FOLLOW_rule__EvaluationExpressionOut__Group__2__Impl_in_rule__EvaluationExpressionOut__Group__28946);\n rule__EvaluationExpressionOut__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__EvaluationExpressionOut__Group__3_in_rule__EvaluationExpressionOut__Group__28949);\n rule__EvaluationExpressionOut__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EvaluationExpressionIn__Group_0_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4363:1: ( ( () ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4364:1: ( () )\n {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4364:1: ( () )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4365:1: ()\n {\n before(grammarAccess.getEvaluationExpressionInAccess().getGlobalEvaluationExpressionAction_0_1_0()); \n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4366:1: ()\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4368:1: \n {\n }\n\n after(grammarAccess.getEvaluationExpressionInAccess().getGlobalEvaluationExpressionAction_0_1_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void ruleEvaluationExpressionOut() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:620:2: ( ( ( rule__EvaluationExpressionOut__Group__0 ) ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:621:1: ( ( rule__EvaluationExpressionOut__Group__0 ) )\n {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:621:1: ( ( rule__EvaluationExpressionOut__Group__0 ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:622:1: ( rule__EvaluationExpressionOut__Group__0 )\n {\n before(grammarAccess.getEvaluationExpressionOutAccess().getGroup()); \n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:623:1: ( rule__EvaluationExpressionOut__Group__0 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:623:2: rule__EvaluationExpressionOut__Group__0\n {\n pushFollow(FOLLOW_rule__EvaluationExpressionOut__Group__0_in_ruleEvaluationExpressionOut1137);\n rule__EvaluationExpressionOut__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getEvaluationExpressionOutAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }",
"public final void rule__EvaluationExpressionIn__Group_0_0__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4315:1: ( rule__EvaluationExpressionIn__Group_0_0__3__Impl )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4316:2: rule__EvaluationExpressionIn__Group_0_0__3__Impl\n {\n pushFollow(FOLLOW_rule__EvaluationExpressionIn__Group_0_0__3__Impl_in_rule__EvaluationExpressionIn__Group_0_0__38512);\n rule__EvaluationExpressionIn__Group_0_0__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void ruleImplementation() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:218:2: ( ( ( rule__Implementation__Group__0 ) ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:219:1: ( ( rule__Implementation__Group__0 ) )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:219:1: ( ( rule__Implementation__Group__0 ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:220:1: ( rule__Implementation__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getImplementationAccess().getGroup()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:221:1: ( rule__Implementation__Group__0 )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:221:2: rule__Implementation__Group__0\r\n {\r\n pushFollow(FOLLOW_rule__Implementation__Group__0_in_ruleImplementation404);\r\n rule__Implementation__Group__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getImplementationAccess().getGroup()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Output__Group_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:945:1: ( rule__Output__Group_0__2__Impl )\n // InternalWh.g:946:2: rule__Output__Group_0__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Output__Group_0__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Output__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:778:1: ( rule__Output__Group__0__Impl rule__Output__Group__1 )\n // InternalWh.g:779:2: rule__Output__Group__0__Impl rule__Output__Group__1\n {\n pushFollow(FOLLOW_11);\n rule__Output__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Output__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Output__Group_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:891:1: ( rule__Output__Group_0__0__Impl rule__Output__Group_0__1 )\n // InternalWh.g:892:2: rule__Output__Group_0__0__Impl rule__Output__Group_0__1\n {\n pushFollow(FOLLOW_13);\n rule__Output__Group_0__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Output__Group_0__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__End__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10557:1: ( ( 'end' ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10558:1: ( 'end' )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10558:1: ( 'end' )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10559:1: 'end'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getEndAccess().getEndKeyword_0()); \r\n }\r\n match(input,76,FOLLOW_76_in_rule__End__Group__0__Impl21841); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getEndAccess().getEndKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__EvaluationExpressionOut__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4609:1: ( ( ';' ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4610:1: ( ';' )\n {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4610:1: ( ';' )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4611:1: ';'\n {\n before(grammarAccess.getEvaluationExpressionOutAccess().getSemicolonKeyword_4()); \n match(input,27,FOLLOW_27_in_rule__EvaluationExpressionOut__Group__4__Impl9096); \n after(grammarAccess.getEvaluationExpressionOutAccess().getSemicolonKeyword_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Output_expression_list__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:4281:1: ( ( () ) )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:4282:1: ( () )\r\n {\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:4282:1: ( () )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:4283:1: ()\r\n {\r\n before(grammarAccess.getOutput_expression_listAccess().getOutput_expression_listAction_0()); \r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:4284:1: ()\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:4286:1: \r\n {\r\n }\r\n\r\n after(grammarAccess.getOutput_expression_listAccess().getOutput_expression_listAction_0()); \r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__EvaluationExpressionIn__Group_0_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4224:1: ( rule__EvaluationExpressionIn__Group_0_0__0__Impl rule__EvaluationExpressionIn__Group_0_0__1 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:4225:2: rule__EvaluationExpressionIn__Group_0_0__0__Impl rule__EvaluationExpressionIn__Group_0_0__1\n {\n pushFollow(FOLLOW_rule__EvaluationExpressionIn__Group_0_0__0__Impl_in_rule__EvaluationExpressionIn__Group_0_0__08329);\n rule__EvaluationExpressionIn__Group_0_0__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__EvaluationExpressionIn__Group_0_0__1_in_rule__EvaluationExpressionIn__Group_0_0__08332);\n rule__EvaluationExpressionIn__Group_0_0__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Output_expression_list__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:4269:1: ( rule__Output_expression_list__Group__0__Impl rule__Output_expression_list__Group__1 )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:4270:2: rule__Output_expression_list__Group__0__Impl rule__Output_expression_list__Group__1\r\n {\r\n pushFollow(FOLLOW_rule__Output_expression_list__Group__0__Impl_in_rule__Output_expression_list__Group__08712);\r\n rule__Output_expression_list__Group__0__Impl();\r\n\r\n state._fsp--;\r\n\r\n pushFollow(FOLLOW_rule__Output_expression_list__Group__1_in_rule__Output_expression_list__Group__08715);\r\n rule__Output_expression_list__Group__1();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Expression__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:926:1: ( rule__Expression__Group__0__Impl rule__Expression__Group__1 )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:927:2: rule__Expression__Group__0__Impl rule__Expression__Group__1\n {\n pushFollow(FOLLOW_rule__Expression__Group__0__Impl_in_rule__Expression__Group__01871);\n rule__Expression__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Expression__Group__1_in_rule__Expression__Group__01874);\n rule__Expression__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Output_expression_list__Group_2__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:4394:1: ( rule__Output_expression_list__Group_2__1__Impl )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:4395:2: rule__Output_expression_list__Group_2__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__Output_expression_list__Group_2__1__Impl_in_rule__Output_expression_list__Group_2__18960);\r\n rule__Output_expression_list__Group_2__1__Impl();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Configure Solrj to use Kerberos authentication via SPNEGO/GSSAPI for client requests. Client Kerberos credentials for the supplied Principal will be retrieved from specified keytab file. Additionally, all HTTP requests performed as part of the authentication negotiation will use SSL encryption and use the supplied SSLContext to obtain secure sockets. If you have no special SSL requirements, other than to enable it, use SSLContext.getDefault(). Optionally, an X509HostVerifier may also be supplied in AuthenticationOptions. | public static void initAuthentication(AuthenticationOptions options)
{
logger.info("Registering custom HTTPClient authentication with Solr");
SpnegoAuthenticatorFactory authenticatorFactory =
new SpnegoAuthenticatorFactory.Builder()
.keytab(options.keytab)
.principal(options.principal)
.sslContext(options.ctx)
.hostnameVerifier(options.verifier)
.build();
HttpRequestAuthenticatorProvider.registerFactory(authenticatorFactory);
} | [
"private void initKerberos(String keytabFile, String principal) {\n if (keytabFile == null || keytabFile.length() == 0) {\n throw new IllegalArgumentException(String.format(\"Setting keytab file path required when kerberos is enabled. Use %s configuration entry to define keytab file.\", HBASE_REGIONSERVER_KEYTAB_FILE));\n }\n if (principal == null || principal.length() == 0) {\n throw new IllegalArgumentException(String.format(\"Setting kerberos principal is required when kerberos is enabled. Use %s configuration entry to define principal.\", HBASE_REGIONSERVER_KERBEROS_PRINCIPAL));\n }\n if(kerberosInit.compareAndSet(false, true)) { // init kerberos if kerberosInit is false, then set it to true\n // let's avoid modifying the supplied configuration, just to be conservative\n final Configuration ugiConf = new Configuration(authzConf);\n UserGroupInformation.setConfiguration(ugiConf);\n LOG.info(\n \"Attempting to acquire kerberos ticket for HBase Indexer binding with keytab: {}, principal: {} \",\n keytabFile, principal);\n try {\n UserGroupInformation.loginUserFromKeytab(principal, keytabFile);\n } catch (IOException ioe) {\n kerberosInit.set(false);\n throw new RuntimeException(ioe);\n }\n LOG.info(\"Got Kerberos ticket for HBase Indexer binding\");\n }\n\n }",
"private void initKerberos(String keytabFile, String principal) {\n if (keytabFile == null || keytabFile.length() == 0) {\n throw new IllegalArgumentException(\"keytabFile required because kerberos is enabled\");\n }\n if (principal == null || principal.length() == 0) {\n throw new IllegalArgumentException(\"principal required because kerberos is enabled\");\n }\n synchronized (KafkaAuthBinding.class) {\n if (kerberosInit == null) {\n kerberosInit = Boolean.TRUE;\n // let's avoid modifying the supplied configuration, just to be conservative\n final Configuration ugiConf = new Configuration();\n ugiConf.set(HADOOP_SECURITY_AUTHENTICATION, ServiceConstants.ServerConfig.SECURITY_MODE_KERBEROS);\n UserGroupInformation.setConfiguration(ugiConf);\n LOG.info(\n \"Attempting to acquire kerberos ticket with keytab: {}, principal: {} \",\n keytabFile, principal);\n try {\n UserGroupInformation.loginUserFromKeytab(principal, keytabFile);\n } catch (IOException ioe) {\n throw new RuntimeException(\"Failed to login user with Principal: \" + principal +\n \" and Keytab file: \" + keytabFile, ioe);\n }\n LOG.info(\"Got Kerberos ticket\");\n }\n }\n }",
"public KerberosSaslNettyClient(Map<String, Object> topoConf, String jaasSection, String host) {\n LOG.debug(\"KerberosSaslNettyClient: Creating SASL {} client to authenticate to server \",\n SaslUtils.KERBEROS);\n\n LOG.info(\"Creating Kerberos Client.\");\n LOG.debug(\"KerberosSaslNettyClient: authmethod {}\", SaslUtils.KERBEROS);\n\n SaslClientCallbackHandler ch = new SaslClientCallbackHandler();\n\n String jaasConfFile = ClientAuthUtils.getJaasConf(topoConf);\n\n subject = null;\n try {\n LOG.debug(\"Trying to login using {}.\", jaasConfFile);\n Login login = new Login(jaasSection, ch, jaasConfFile);\n subject = login.getSubject();\n LOG.debug(\"Got Subject: {}\", subject.toString());\n } catch (LoginException ex) {\n LOG.error(\"Client failed to login in principal:\" + ex, ex);\n throw new RuntimeException(ex);\n }\n\n //check the credential of our principal\n if (subject.getPrivateCredentials(KerberosTicket.class).isEmpty()) {\n LOG.error(\"Failed to verify user principal.\");\n throw new RuntimeException(\"Fail to verify user principal with section \\\"\"\n + jaasSection\n + \"\\\" in login configuration file \"\n + jaasConfFile);\n }\n\n String serviceName = null;\n try {\n serviceName = ClientAuthUtils.get(topoConf, jaasSection, \"serviceName\");\n } catch (IOException e) {\n LOG.error(\"Failed to get service name.\", e);\n throw new RuntimeException(e);\n }\n\n try {\n Principal principal = (Principal) subject.getPrincipals().toArray()[0];\n final String fPrincipalName = principal.getName();\n final String fHost = host;\n final String fServiceName = serviceName;\n final CallbackHandler fch = ch;\n LOG.debug(\"Kerberos Client with principal: {}, host: {}\", fPrincipalName, fHost);\n saslClient = Subject.doAs(subject, new PrivilegedExceptionAction<SaslClient>() {\n @Override\n public SaslClient run() {\n try {\n Map<String, String> props = new TreeMap<String, String>();\n props.put(Sasl.QOP, \"auth\");\n props.put(Sasl.SERVER_AUTH, \"false\");\n return Sasl.createSaslClient(\n new String[]{ SaslUtils.KERBEROS },\n fPrincipalName,\n fServiceName,\n fHost,\n props, fch);\n } catch (Exception e) {\n LOG.error(\"Subject failed to create sasl client.\", e);\n return null;\n }\n }\n });\n LOG.info(\"Got Client: {}\", saslClient);\n\n } catch (PrivilegedActionException e) {\n LOG.error(\"KerberosSaslNettyClient: Could not create Sasl Netty Client.\");\n throw new RuntimeException(e);\n }\n }",
"public void setKerberosAuthenticationEnabled(boolean kerberosAuthenticationEnabled) {\n this.kerberosAuthenticationEnabled = kerberosAuthenticationEnabled;\n }",
"public static void authenticateKerberos() {\r\n\t\tString kerberosUser = ConfigReader.getProperty(\"KERB_USER_NAME\");\r\n//\t\tString command = \"echo \\\"\"+ ConfigReader.getProperty(\"KERB_PASSWORD\") +\"\\\" | kinit \"+ kerberosUser;\r\n\t\tString command = \"/bin/sh kinitscript.sh \"+ ConfigReader.getProperty(\"KERB_PASSWORD\") +\" \" + kerberosUser;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Authenticating as \"+kerberosUser);\r\n\t\t\trunShellCommandPB(System.getProperty(\"user.dir\").concat(\"/script/shell\"), command);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n protected void serviceStart() throws Exception {\n super.serviceStart();\n kdc.start();\n keytab = new File(workDir, \"keytab.bin\");\n loginUsername = UserGroupInformation.getLoginUser().getShortUserName();\n loginPrincipal = loginUsername + \"/\" + krbInstance;\n\n alicePrincipal = ALICE + \"/\" + krbInstance;\n bobPrincipal = BOB + \"/\" + krbInstance;\n kdc.createPrincipal(keytab,\n alicePrincipal,\n bobPrincipal,\n \"HTTP/\" + krbInstance,\n HTTP_LOCALHOST,\n loginPrincipal);\n final File keystoresDir = new File(workDir, \"ssl\");\n keystoresDir.mkdirs();\n sslConfDir = KeyStoreTestUtil.getClasspathDir(\n this.getClass());\n KeyStoreTestUtil.setupSSLConfig(keystoresDir.getAbsolutePath(),\n sslConfDir, getConfig(), false);\n clientSSLConfigFileName = KeyStoreTestUtil.getClientSSLConfigFileName();\n serverSSLConfigFileName = KeyStoreTestUtil.getServerSSLConfigFileName();\n String kerberosRule =\n \"RULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\\nDEFAULT\";\n KerberosName.setRules(kerberosRule);\n }",
"@Override\n public Authentication authenticate(Authentication authentication) {\n if (!(authentication instanceof KerberosServiceRequestToken)) {\n return null;\n }\n\n Bus cxfBus = getBus();\n IdpSTSClient sts = new IdpSTSClient(cxfBus);\n sts.setAddressingNamespace(\"http://www.w3.org/2005/08/addressing\");\n if (tokenType != null && tokenType.length() > 0) {\n sts.setTokenType(tokenType);\n } else {\n sts.setTokenType(WSConstants.WSS_SAML2_TOKEN_TYPE);\n }\n sts.setKeyType(HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512_BEARER);\n sts.setWsdlLocation(getWsdlLocation());\n sts.setServiceQName(new QName(namespace, wsdlService));\n sts.setEndpointQName(new QName(namespace, wsdlEndpoint));\n\n sts.getProperties().putAll(properties);\n if (use200502Namespace) {\n sts.setNamespace(HTTP_SCHEMAS_XMLSOAP_ORG_WS_2005_02_TRUST);\n }\n\n if (lifetime != null) {\n sts.setEnableLifetime(true);\n sts.setTtl(lifetime.intValue());\n }\n\n return handleKerberos((KerberosServiceRequestToken)authentication, sts);\n }",
"public static void initEncryption(EncryptionOptions options)\n { \n logger.info(\"Registering custom HTTPClient SSL configuration with Solr\");\n SSLSocketFactory socketFactory = \n (options.verifier == null) ?\n new SSLSocketFactory(options.ctx) :\n new SSLSocketFactory(options.ctx, options.verifier);\n HttpClientUtil.setConfigurer(new SSLHttpClientConfigurer(socketFactory)); \n }",
"boolean ensureKerberosClientIsPresent();",
"public static void main(String[] args) \n throws IOException, GSSException {\n Oid krb5Oid = new Oid( \"1.2.840.113554.1.2.2\");\n \n // 1.2 Set Kerberos Properties\n System.setProperty( \"sun.security.krb5.debug\", \"true\");\n System.setProperty( \"java.security.auth.login.config\", \"./jaas.conf\");\n System.setProperty( \"javax.security.auth.useSubjectCredsOnly\", \"true\");\n \n // 2. Login to the KDC.\n LoginContext loginCtx = null;\n // \"KerberizedServer\" refers to a section of the JAAS configuration in the jaas.conf file.\n Subject subject = null;\n try {\n loginCtx = new LoginContext( \"KerberizedServer\");\n loginCtx.login();\n subject = loginCtx.getSubject();\n }\n catch (LoginException e) {\n System.err.println(\"Login failure : \" + e);\n System.exit(-1);\n }\n // Obtain the command-line arguments and parse the port number\n \n if (args.length != 1) {\n System.err.println(\"Usage: java <options> KerberizedServer <localPort>\");\n System.exit(-1);\n }\n \n // 3. Main Loop: handle connections from network clients.\n // 3.1. Startup service network connection.\n int localPort = Integer.parseInt(args[0]);\n\n // <1. NIO>\n Selector selector = SelectorProvider.provider().openSelector();\n \n // Create a new non-blocking server socket channel\n ServerSocketChannel serverChannel = ServerSocketChannel.open();\n serverChannel.configureBlocking(false);\n \n // Bind the server socket to the specified address and port\n InetSocketAddress isa = new InetSocketAddress(\"localhost\",localPort);\n serverChannel.socket().bind(isa);\n \n // Register the server socket channel, indicating an interest in \n // accepting new connections\n serverChannel.register(selector, SelectionKey.OP_ACCEPT);\n // </1. NIO>\n\n GSSContext clientContext = null;\n\n // selection key => context map.\n final HashMap<SelectionKey,GSSContext> clientToContext = new HashMap<SelectionKey,GSSContext>();\n\n System.out.println(\"start main listen loop..\");\n while(true) {\n\n selector.select();\n Iterator selectedKeys = selector.selectedKeys().iterator();\n while (selectedKeys.hasNext()) {\n final SelectionKey sk = (SelectionKey) selectedKeys.next();\n selectedKeys.remove();\n\n if (!sk.isValid()) {\n System.out.println(\"key is not valid; continuing.\");\n continue;\n }\n \n // Check what event is available and deal with it\n if (sk.isAcceptable()) {\n System.out.println(\"accepting connection from client.\");\n\n // For an accept to be pending the channel must be a server socket channel.\n ServerSocketChannel serverSocketChannel = (ServerSocketChannel) sk.channel();\n \n // Accept the connection and make it non-blocking\n SocketChannel socketChannel = serverSocketChannel.accept();\n socketChannel.configureBlocking(false);\n \n // Register the new SocketChannel with our Selector, indicating\n // we'd like to be notified when there's data waiting to be read\n socketChannel.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRITE);\n } else if (sk.isReadable()) {\n System.out.println(\"reading context from channel.\");\n final SocketChannel socketChannel = (SocketChannel) sk.channel();\n \n clientContext =\n Subject.doAs( subject, new PrivilegedAction<GSSContext>() {\n public GSSContext run() {\n try {\n GSSManager manager = GSSManager.getInstance();\n GSSContext context = manager.createContext( (GSSCredential) null);\n while (!context.isEstablished()) {\n System.out.println(\"KerberizedServer: context not yet established: accepting from client.\");\n \n ByteBuffer readBuffer = ByteBuffer.allocate(8192);\n readBuffer.clear();\n \n // Attempt to read off the channel\n int numRead = 0;\n try {\n numRead = socketChannel.read(readBuffer);\n if (numRead != -1) {\n readBuffer.flip();\n System.out.println(\"read: \" + numRead + \" bytes.\");\n byte[] bytes = new byte[8192];\n readBuffer.get(bytes,0,numRead);\n Hexdump.hexdump(System.out,bytes,0,numRead);\n context.acceptSecContext(bytes,0,numRead);\n }\n } catch (IOException e) {\n System.err.println(\"IOEXCEPTION: GIVING UP ON THIS CLIENT.\");\n // The remote forcibly closed the connection, cancel\n // the selection key and close the channel.\n clientToContext.remove(sk);\n sk.cancel();\n try {\n sk.channel().close();\n }\n catch (IOException ioe) {\n System.err.println(\"IoException trying to close socket.\");\n ioe.printStackTrace();\n }\n return null;\n }\n \n if (numRead == -1) {\n // Remote entity shut the socket down cleanly. Do the\n // same from our end and cancel the channel.\n System.out.println(\"removing key from clientToContext.\");\n clientToContext.remove(sk);\n try {\n sk.channel().close();\n }\n catch (IOException ioe) {\n System.err.println(\"IoException trying to close socket.\");\n ioe.printStackTrace();\n } \n sk.cancel();\n return null;\n }\n }\n System.out.println(\"returning context now.\");\n return context;\n }\n catch (GSSException e) {\n System.err.println(\"GSS EXCEPTION: GIVING UP ON THIS CLIENT.\");\n e.printStackTrace();\n clientToContext.remove(sk);\n try {\n sk.channel().close();\n }\n catch (IOException ioe) {\n System.err.println(\"IoException trying to close socket.\");\n ioe.printStackTrace();\n }\n sk.cancel();\n return null;\n }\n }\n }\n );\n System.out.println(\"done with client context-acceptance.\");\n if (clientContext != null) {\n clientToContext.put(sk,clientContext);\n System.out.println(\"KerberizedServer: Client authenticated: (principal: \" + clientContext.getSrcName() + \")\");\n // ..conduct business with client since it's authenticated and optionally encrypted too..\n \n \n }\n \n // dump current client->context mapping to console.\n System.out.println(\"===<current clients>===\");\n for (SelectionKey each : clientToContext.keySet()) {\n GSSContext eachContext = null;\n if ((eachContext = clientToContext.get(each)) != null) {\n System.out.println(\"client principal: \" + eachContext.getSrcName());\n }\n }\n System.out.println(\"===</current clients>===\");\n } else if (sk.isWritable()) {\n // .. write to client ..\n }\n }\n }\n\n }",
"GssKrb5ClientExt(String authzID, String protocol, String serverName,\n Map props, CallbackHandler cbh) throws SaslException {\n\n super(props, MY_CLASS_NAME);\n\n String service = protocol + \"@\" + serverName;\n logger.log(Level.FINE, \"KRB5CLNT01:Requesting service name: {0}\",\n service);\n\n try {\n GSSManager mgr = GSSManager.getInstance();\n\n // Create the name for the requested service entity for Krb5 mech\n GSSName acceptorName = mgr.createName(service,\n GSSName.NT_HOSTBASED_SERVICE, KRB5_OID);\n\n // Parse properties to check for supplied credentials\n GSSCredential credentials = null;\n if (props != null) {\n Object prop = props.get(Sasl.CREDENTIALS);\n if (prop != null && prop instanceof GSSCredential) {\n credentials = (GSSCredential) prop;\n logger.log(Level.FINE,\n \"KRB5CLNT01:Using the credentials supplied in \" +\n \"javax.security.sasl.credentials\");\n }\n }\n\n // Create a context using credentials for Krb5 mech\n secCtx = mgr.createContext(acceptorName,\n KRB5_OID, /* mechanism */\n credentials, /* credentials */\n GSSContext.INDEFINITE_LIFETIME);\n\n // Request credential delegation when credentials have been supplied\n if (credentials != null) {\n secCtx.requestCredDeleg(true);\n }\n\n // Parse properties to set desired context options\n if (props != null) {\n // Mutual authentication\n String prop = (String)props.get(Sasl.SERVER_AUTH);\n if (prop != null) {\n mutual = \"true\".equalsIgnoreCase(prop);\n }\n }\n secCtx.requestMutualAuth(mutual);\n\n // Always specify potential need for integrity and confidentiality\n // Decision will be made during final handshake\n secCtx.requestConf(true);\n secCtx.requestInteg(true);\n\n } catch (GSSException e) {\n throw new SaslException(\"Failure to initialize security context\", e);\n }\n\n if (authzID != null && authzID.length() > 0) {\n try {\n this.authzID = authzID.getBytes(\"UTF8\");\n } catch (IOException e) {\n throw new SaslException(\"Cannot encode authorization ID\", e);\n }\n }\n }",
"@Test\n public void testDisableDrillbitAuth_EnableClientAuthKerberos() throws Exception {\n\n final DrillConfig newConfig = new DrillConfig(DrillConfig.create(cloneDefaultTestConfigProperties())\n .withValue(ExecConstants.USER_AUTHENTICATION_ENABLED,\n ConfigValueFactory.fromAnyRef(false)));\n\n final Properties connectionProps = new Properties();\n connectionProps.setProperty(DrillProperties.AUTH_MECHANISM, \"kerberos\");\n\n try {\n updateTestCluster(1, newConfig, connectionProps);\n fail();\n } catch (Exception ex) {\n assertTrue(ex.getCause() instanceof NonTransientRpcException);\n assertTrue(!(ex.getCause().getCause() instanceof SaslException));\n }\n }",
"public void setIsKerberos(String isKerberos) {\r\n this.isKerberos = isKerberos;\r\n }",
"public void setTlsKeyPath(String tlsKeyPath);",
"private void createSslStartTlsKeystoreSection( FormToolkit toolkit, Composite parent )\n {\n // Creation of the section, compacted\n Section section = toolkit.createSection( parent, Section.TITLE_BAR | Section.TWISTIE | Section.COMPACT );\n section.setText( Messages.getString( \"LdapLdapsServersPage.SslStartTlsKeystore\" ) ); //$NON-NLS-1$\n section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );\n Composite composite = toolkit.createComposite( section );\n toolkit.paintBordersFor( composite );\n GridLayout glayout = new GridLayout( 3, false );\n composite.setLayout( glayout );\n section.setClient( composite );\n\n // Keystore File Text\n toolkit.createLabel( composite, Messages.getString( \"LdapLdapsServersPage.Keystore\" ) ); //$NON-NLS-1$\n keystoreFileText = toolkit.createText( composite, \"\" ); //$NON-NLS-1$\n setGridDataWithDefaultWidth( keystoreFileText, new GridData( SWT.FILL, SWT.CENTER, true, false ) );\n keystoreFileBrowseButton = toolkit.createButton( composite,\n Messages.getString( \"LdapLdapsServersPage.Browse\" ), SWT.PUSH ); //$NON-NLS-1$\n\n // Password Text\n toolkit.createLabel( composite, Messages.getString( \"LdapLdapsServersPage.Password\" ) ); //$NON-NLS-1$\n keystorePasswordText = toolkit.createText( composite, \"\" ); //$NON-NLS-1$\n keystorePasswordText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );\n keystorePasswordText.setEchoChar( '\\u2022' );\n\n // Show Password Checkbox\n toolkit.createLabel( composite, \"\" ); //$NON-NLS-1$\n showPasswordCheckbox = toolkit.createButton( composite,\n Messages.getString( \"LdapLdapsServersPage.ShowPassword\" ), SWT.CHECK ); //$NON-NLS-1$\n showPasswordCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );\n showPasswordCheckbox.setSelection( false );\n }",
"private void createSslAdvancedSettingsSection( FormToolkit toolkit, Composite parent )\n {\n // Creation of the section, compacted\n Section section = toolkit.createSection( parent, Section.TITLE_BAR | Section.TWISTIE | Section.COMPACT );\n section.setText( Messages.getString( \"LdapLdapsServersPage.SslAdvancedSettings\" ) ); //$NON-NLS-1$\n section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );\n Composite composite = toolkit.createComposite( section );\n toolkit.paintBordersFor( composite );\n GridLayout glayout = new GridLayout( 4, false );\n composite.setLayout( glayout );\n section.setClient( composite );\n\n // Enable LDAPS needClientAuth Checkbox\n needClientAuthCheckbox = toolkit.createButton( composite,\n Messages.getString( \"LdapLdapsServersPage.NeedClientAuth\" ), SWT.CHECK ); //$NON-NLS-1$\n needClientAuthCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 1, 1 ) );\n\n // Enable LDAPS wantClientAuth Checkbox. As the WantClientAuth is dependent on\n // the NeedClientAuth, we move it one column to the right\n toolkit.createLabel( composite, TABULATION );\n wantClientAuthCheckbox = toolkit.createButton( composite,\n Messages.getString( \"LdapLdapsServersPage.WantClientAuth\" ), SWT.CHECK ); //$NON-NLS-1$\n wantClientAuthCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );\n\n // Ciphers Suite label \n Label ciphersLabel = toolkit.createLabel( composite, Messages.getString( \"LdapLdapsServersPage.CiphersSuite\" ), SWT.WRAP ); //$NON-NLS-1$\n setBold( ciphersLabel );\n ciphersLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, glayout.numColumns, 1 ) );\n\n // Ciphers Suites Table Viewer\n ciphersSuiteTableViewer = new CheckboxTableViewer( new Table( composite, SWT.BORDER | SWT.CHECK ) );\n ciphersSuiteTableViewer.setContentProvider( new ArrayContentProvider() );\n ciphersSuiteTableViewer.setLabelProvider( new LabelProvider()\n {\n @Override\n public String getText( Object cipher )\n {\n if ( cipher instanceof SupportedCipher )\n {\n SupportedCipher supportedCipher = ( SupportedCipher ) cipher;\n\n return supportedCipher.getCipher();\n }\n\n return super.getText( cipher );\n }\n } );\n \n List<SupportedCipher> supportedCiphers = new ArrayList<>();\n \n for ( SupportedCipher supportedCipher : SupportedCipher.SUPPORTED_CIPHERS )\n {\n if ( supportedCipher.isJava8Implemented() )\n {\n supportedCiphers.add( supportedCipher );\n }\n }\n \n ciphersSuiteTableViewer.setInput( supportedCiphers );\n GridData ciphersSuiteTableViewerGridData = new GridData( SWT.FILL, SWT.NONE, true, false, glayout.numColumns, 5 );\n ciphersSuiteTableViewerGridData.heightHint = 60;\n ciphersSuiteTableViewer.getControl().setLayoutData( ciphersSuiteTableViewerGridData );\n\n // Enabled Protocols label \n Label protocolsLabel = toolkit.createLabel( composite, Messages.getString( \"LdapLdapsServersPage.EnabledProtocols\" ), SWT.WRAP ); //$NON-NLS-1$\n setBold( protocolsLabel );\n protocolsLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, glayout.numColumns, 1 ) );\n\n // Enabled Protocols\n // SSL V3\n sslv3Checkbox = toolkit.createButton( composite, SSL_V3, SWT.CHECK ); //$NON-NLS-1$\n sslv3Checkbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );\n\n // TLS 1.0\n tlsv1_0Checkbox = toolkit.createButton( composite, TLS_V1_0, SWT.CHECK ); //$NON-NLS-1$\n tlsv1_0Checkbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );\n\n // TLS 1.1\n tlsv1_1Checkbox = toolkit.createButton( composite, TLS_V1_1, SWT.CHECK ); //$NON-NLS-1$\n tlsv1_1Checkbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );\n \n // TLS 1.2\n tlsv1_2Checkbox = toolkit.createButton( composite, TLS_V1_2, SWT.CHECK ); //$NON-NLS-1$\n tlsv1_2Checkbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );\n }",
"public void setTlsKeyPath(String path);",
"public boolean isKerberosAuthenticationEnabled() {\n return kerberosAuthenticationEnabled;\n }",
"@Override\n protected void serviceInit(final Configuration conf) throws Exception {\n patchConfigAtInit(conf);\n super.serviceInit(conf);\n Properties kdcConf = MiniKdc.createConf();\n workDir = GenericTestUtils.getTestDir(\"kerberos\");\n workDir.mkdirs();\n kdc = new MiniKdc(kdcConf, workDir);\n\n krbInstance = LOCALHOST_NAME;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the keyboard accelerator for this option. | public KeyStroke getAccelerator() {
return (KeyStroke) getValue(ACCELERATOR_KEY);
} | [
"public KeyStroke getAccelerator() {\n return this.accelerator;\n }",
"protected String getAcceleratorPreferencesKey() {\r\n return MenuItem.MENU_ACCELERATOR + \"_\" + this.attribute;\r\n }",
"public char getFocusAccelerator() {\r\n\t\treturn getJTextField().getFocusAccelerator();\r\n\t}",
"@VTID(69)\r\n @ReturnValue(type=NativeType.VARIANT)\r\n java.lang.Object getAccelerator();",
"public char getHotkey() {\r\n\t\treturn hotkey;\r\n\t}",
"public int getKeyMenu() {\r\n return getKeyEscape();\r\n }",
"@Nullable\n public static KeyStroke getAccelerator ( @Nullable final HotkeyData hotkey )\n {\n return hotkey != null && hotkey.isHotkeySet () ? hotkey.getKeyStroke () : null;\n }",
"public static int getFocusAcceleratorKeyMask ()\n {\n int mask = ActionEvent.ALT_MASK;\n if ( SystemUtils.isJava7orAbove () )\n {\n // This toolkit method was added in JDK 7 and later ones\n // It is recommended to use instead of the hardcoded accelerator mask\n final Toolkit toolkit = Toolkit.getDefaultToolkit ();\n if ( Objects.equals ( toolkit.getClass ().getCanonicalName (), \"sun.awt.SunToolkit\" ) )\n {\n final Object toolkitMask = ReflectUtils.callMethodSafely ( toolkit, \"getFocusAcceleratorKeyMask\" );\n if ( toolkitMask != null )\n {\n mask = ( Integer ) toolkitMask;\n }\n }\n }\n return mask;\n }",
"public int getKeyEscape() {\r\n return Input.Keys.valueOf(getKeyEscapeName());\r\n }",
"java.lang.String getMnemonic();",
"public static char getKey()\n {\n checkInstance(\"getKey()\");\n\n if (_gotKey)\n {\n _gotKey = false;\n return _keyChar;\n }\n else\n return KeyEvent.CHAR_UNDEFINED;\n }",
"int getKeyCode();",
"public int getKeyDown() {\r\n return Input.Keys.valueOf(keyDownName);\r\n }",
"@NotNull\n public KeyStroke getKeyStroke ()\n {\n if ( keyCode == null )\n {\n throw new HotkeyException ( \"KeyStroke can only be retrieved from HotkeyData that contains key code\" );\n }\n return KeyStroke.getKeyStroke ( keyCode, getModifiers () );\n }",
"public void getKeyboardShortcut(AccessibleEvent e) {\n }",
"public String getKeyToPress() {\r\n return keyToPress;\r\n }",
"final public char getAccessKey()\n {\n return ComponentUtils.resolveCharacter((Character)getProperty(ACCESS_KEY_KEY));\n }",
"public int getKeyboardType() {\n return impl.getKeyboardType();\n }",
"public static int getKeyCode()\n {\n checkInstance(\"getKeyCode()\");\n\n if (_gotKey)\n {\n _gotKey = false;\n return _keyCode;\n }\n else\n return KeyEvent.CHAR_UNDEFINED;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set whether client lifetime is accepted | public void setAcceptClientLifetime(boolean acceptClientLifetime) {
this.acceptClientLifetime = acceptClientLifetime;
} | [
"public boolean isAcceptClientLifetime() {\n return this.acceptClientLifetime;\n }",
"public void setAllowNewClients(boolean value) {\n this.allowNewClients = value;\n }",
"public abstract void setAcceptTimeout(int value);",
"public boolean isAllowNewClients() {\n return allowNewClients;\n }",
"private boolean configureExpireVariably() {\n if (config.getExpiryFactory().isEmpty()) {\n return false;\n }\n caffeine.expireAfter(new ExpiryAdapter<>(config.getExpiryFactory().orElseThrow().create()));\n return true;\n }",
"public void setNeedClientAuth(boolean flag)\n {\n needClientAuth = flag;\n }",
"void setExpired(boolean expired);",
"public void setIsClient(java.lang.Boolean _isClient)\n {\n isClient = _isClient;\n }",
"public void setWantClientAuth(boolean flag)\n {\n wantClientAuth = flag;\n }",
"public static void setUseClientServer(boolean on) { cacheUseClientServer.setBoolean(on); }",
"public void checkAndAcceptClientConnections() {\r\n\t\tserver.checkAndAcceptClientConnections();\r\n\t}",
"private boolean configureExpireAfterAccess() {\n if (config.getExpireAfterAccess().isEmpty()) {\n return false;\n }\n caffeine.expireAfterAccess(Duration.ofNanos(config.getExpireAfterAccess().getAsLong()));\n return true;\n }",
"public boolean shouldExpire() {\n return expire;\n }",
"public void setKeepalive (boolean keepalive) {\n\tthis.keepalive = (this.keepalive && keepalive);\n }",
"public void setClientTimeout(long timeout) { clientTimeout = timeout;}",
"public boolean isSetClient() {\r\n return this.client != null;\r\n }",
"public void setSmartClientLive(boolean value) {\n this.smartClientLive = value;\n }",
"boolean hasRequestedExpiration();",
"public boolean keepAliveEnabled();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for convert image to string.................................................................. | private String imageToString(){
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
// get image from image view..................................................................
_bitmap = ((BitmapDrawable)imageView.getDrawable()).getBitmap();
_bitmap.compress(Bitmap.CompressFormat.JPEG,50,byteArrayOutputStream);
byte[] imageByte = byteArrayOutputStream.toByteArray();
return Base64.encodeToString(imageByte,Base64.DEFAULT);
} | [
"java.lang.String getImage();",
"String convertImageToBase64String(final BufferedImage img) {\n final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", byteArrayOutputStream);\n return Base64.getEncoder().encodeToString(byteArrayOutputStream.toByteArray());\n } catch (IOException e) {\n logger.error(\"cannot convert image to base 64\", e);\n }\n return null;\n }",
"public static String encodeToString(BufferedImage image, String type) {\n String imageString = null;\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n\n try {\n ImageIO.write(image, type, bos);\n byte[] imageBytes = bos.toByteArray();\n\n //BASE64Encoder encoder = new BASE64Encoder();\n Base64.Encoder encoder = Base64.getEncoder();\n imageString = encoder.encodeToString(imageBytes);\n\n bos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return imageString;\n }",
"private String getStringImage(Bitmap bmp) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] imageBytes = baos.toByteArray();\n return Base64.encodeToString(imageBytes, Base64.DEFAULT);\n }",
"private void encodingImagePath() {\n try {\n Bitmap bm = BitmapFactory.decodeFile(image);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bm.compress(Bitmap.CompressFormat.JPEG, 100, baos); //bm is the bitmap object\n byte[] b = baos.toByteArray();\n strEncodedImage = Base64.encodeToString(b, Base64.DEFAULT);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private String ConvertImagenTexto(Bitmap imagenpro) {\n ByteArrayOutputStream espacio = new ByteArrayOutputStream();\n imagenpro.compress(Bitmap.CompressFormat.JPEG,100,espacio);\n byte[] imagen = espacio.toByteArray();\n String imagenAstring = Base64.encodeToString(imagen,Base64.DEFAULT);\n return imagenAstring;\n }",
"public static String encodeBitmapAsString(Bitmap img){\n ByteArrayOutputStream byteArrayOS = new ByteArrayOutputStream();\n img.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOS);\n return Base64.encodeToString(byteArrayOS.toByteArray(), Base64.DEFAULT);\n }",
"public String convertBufferedImageToBase64(BufferedImage image){\n\n\t\tString type = \"png\";\n\t\tString imageString = null;\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\ttry {\n\t\t\t// writes bufferedImage to a string\n\t\t\tImageIO.write(image, type, Base64.getEncoder().wrap(bos));\n\t\t\timageString = bos.toString();\n\n\t\t\tbos.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException while encoding collage image as a string\");\n\t\t}\n\t\treturn imageString;\n\t}",
"String ImageBufferToText(byte[] imageBuf, int width, int height, int bpp, String langId, String configs);",
"java.lang.String getPic2();",
"public void Encode_Image1() {\n\n for (String s : Arraylist_image_encode) {\n listString += s + \"IMAGE:\";\n }\n\n }",
"private String bufferAsJpgString(byte[] rawImg) {\n int[] pixels = new int[rawImg.length];\n for (int i = 0; i < rawImg.length; i++) {\n pixels[i] = (int) rawImg[i];\n }\n DataBufferInt buffer = new DataBufferInt(pixels, pixels.length);\n WritableRaster raster = Raster.createPackedRaster(buffer, IMG_SIZE, IMG_SIZE, IMG_SIZE, BAND_MASKS, null);\n ColorModel cm = ColorModel.getRGBdefault();\n BufferedImage image = new BufferedImage(cm, raster, cm.isAlphaPremultiplied(), null);\n\n byte[] imgBytes = null;\n try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {\n ImageIO.write(image, \"JPG\", baos);\n baos.flush();\n imgBytes = baos.toByteArray();\n } catch (IOException e) {\n // TODO log exception\n }\n\n byte[] encoded = Base64.getEncoder().encode(imgBytes);\n return new String(encoded);\n }",
"public static String convertImage(File imageFile) {\n StringBuilder sb = new StringBuilder();\n try (BufferedInputStream is = new BufferedInputStream(new FileInputStream(imageFile))) {\n for (int i; (i = is.read()) != -1;) {\n String temp = \"0000000\" + Integer.toBinaryString(i).toUpperCase();\n if (temp.length() == 1) {\n sb.append('0');\n }\n temp = temp.substring(temp.length() - 8);\n sb.append(temp).append(' ');\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return \"Failed image binary conversion \";\n }",
"public String BitMapToString(Bitmap bitmap){\n ByteArrayOutputStream baos=new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG,100, baos);\n byte [] b=baos.toByteArray();\n String temp= Base64.encodeToString(b, Base64.DEFAULT);\n return temp;\n }",
"public String emitAsImageBase64() {\n BufferedImage img = emitAsBufferedImage();\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", os);\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n Base64 b64 = new Base64();\n String result = b64.encode(os.toByteArray());\n try {\n os.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }",
"public static String convert(Bitmap bitmap){\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream);\n String newBase64 = Base64.encodeToString(outputStream.toByteArray(), Base64.DEFAULT);\n return newBase64;\n }",
"public static String BitMapToString(Bitmap bitmap){\n ByteArrayOutputStream baos=new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG,100, baos);\n byte [] b=baos.toByteArray();\n String temp= Base64.encodeToString(b, Base64.DEFAULT);\n return temp;\n }",
"java.lang.String getPic4();",
"static String convertToBase64(byte[] image){\n return !Objects.isNull(image)\n ? Base64.getEncoder().encodeToString(image)\n : \"\";\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Container's getter for DlvScheduleSpecVO1 | public DlvScheduleSpecVOImpl getDlvScheduleSpecVO1() {
return (DlvScheduleSpecVOImpl)findViewObject("DlvScheduleSpecVO1");
} | [
"public DlvScheduleVOImpl getDlvScheduleVO1() {\n return (DlvScheduleVOImpl)findViewObject(\"DlvScheduleVO1\");\n }",
"java.lang.String getSchedule();",
"public ScheduleType getScheduleType();",
"public Schedule getSchedule(){\r\n\t\treturn this.schedule;\r\n\t}",
"public Schedule getScheduleFromFrame(){\n\t\treturn mySchedule;\n\t}",
"public String getScheduleType()\n {\n return this.scheduleType;\n }",
"public Schedules getSchedule() {\n\t\treturn schedule;\n\t}",
"public List<SlotDto> ScheduleSlot(ScheduleDto schedule) {\n\n List<SlotDto> slots = null;\n try {\n slots = dao.ScheduleSlot(schedule);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return slots;\n\n }",
"public Schedule getSchedule() {\r\n\t\treturn schedule;\r\n\t}",
"ScheduleStartType getScheduleStart();",
"public Object getAlarmSpec();",
"public SpaceSchedule getSchedule() {\n\t\treturn null;\n\t}",
"@Override\n\t@GET\n\t@Path(\"{courseId}/schedules\")\n\t@Produces(value ={MediaType.APPLICATION_JSON,MediaType.TEXT_XML})\n\t@PermissionsTag(value={Constants.USER_ADMIN,Constants.USER_STUDENT})\n\tpublic Response getCourseSchedule(@PathParam(\"courseId\")int courseId) {\n\t\tList<ScheduleVO> scheudleVO = courseService.getCourseSchedule(courseId);\n\t\tList<RestScheduleVO> restcurriculumVO = new ArrayList<>();\n\t\tfor (ScheduleVO schedulevo : scheudleVO) {\n\t\t\tRestScheduleVO restScheduleVOs = new RestScheduleVO(schedulevo.getScheduleId(), schedulevo.getStartDate(), schedulevo.getEndDate(), schedulevo.getStartTime(), schedulevo.getEndTime(), schedulevo.getDaysOfWeek());\n\t\t\trestcurriculumVO.add(restScheduleVOs);\n\t\t}\n\t\tGenericEntity<List<RestScheduleVO>> entity = new GenericEntity<List<RestScheduleVO>>(restcurriculumVO){};\n\t\treturn Response.status(Status.OK).entity(entity).build();\n\t}",
"Double getScheduleDuration();",
"@ApiModelProperty(value = \"Schedule that this filter refers to. Output is a Schedule Summary Object. Input must be a Schedule Lookup Object. Required.\")\n public ScheduleSummary getSchedule() {\n return schedule;\n }",
"public List<SlotDto> viewSlotsOfSchedule(ScheduleDto schedule) {\n List<SlotDto> slots = null;\n try {\n slots = dao.viewSlotsOfSchedule(schedule);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return slots;\n }",
"public String getScheduleName()\n {\n return this.scheduleName;\n }",
"public ScheduleProperties schedule() {\n return this.schedule;\n }",
"org.apache.xmlbeans.XmlString xgetSchedule();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use DoForward.newBuilder() to construct. | private DoForward(Builder builder) {
super(builder);
} | [
"private DoForward(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }",
"private Forward(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"io.cloudstate.protocol.EntityProto.Forward getForward();",
"public void onFastForward();",
"ForwardAction createForwardAction();",
"public static Builder builder(ForwardingObjective fwd) {\n return new Builder(fwd);\n }",
"protected void forward(){\tqcmd( Direction.FORWARD ); }",
"protected void sequence_FORWARD(ISerializationContext context, FORWARD semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.DEP_YIMPL__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.DEP_YIMPL__NAME));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.DEP_YIMPL__DISTANCE_CST) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.DEP_YIMPL__DISTANCE_CST));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.DEP_YIMPL__TEMPS_CST) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.DEP_YIMPL__TEMPS_CST));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getFORWARDAccess().getNameForwardKeyword_0_0(), semanticObject.getName());\n\t\tfeeder.accept(grammarAccess.getFORWARDAccess().getDistanceCSTINTTerminalRuleCall_4_0(), semanticObject.getDistanceCST());\n\t\tfeeder.accept(grammarAccess.getFORWARDAccess().getTempsCSTINTTerminalRuleCall_7_0(), semanticObject.getTempsCST());\n\t\tfeeder.finish();\n\t}",
"speech.multilang.Params.ForwardingControllerParamsOrBuilder getForwardingParamsOrBuilder();",
"@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.ForwardInfoOrBuilder getForwardOrBuilder() {\n if (stepInfoCase_ == 13) {\n return (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance();\n }",
"public void setForward(Long forward) {\n this.forward = forward;\n }",
"public Neurona_FeedForward(){}",
"@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.ForwardInfo getForward() {\n if (forwardBuilder_ == null) {\n if (stepInfoCase_ == 13) {\n return (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance();\n } else {\n if (stepInfoCase_ == 13) {\n return forwardBuilder_.getMessage();\n }\n return com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance();\n }\n }",
"private FeedForwardNetBase buildFeedForwardNet() {\n return new FeedForwardNetBase(this.structure, this.data);\n }",
"public void setForward(Date forward) {\n this.forward = forward;\n }",
"@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.ForwardInfo getForward() {\n if (stepInfoCase_ == 13) {\n return (com.google.cloud.networkmanagement.v1beta1.ForwardInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.ForwardInfo.getDefaultInstance();\n }",
"void setForward(boolean isForward);",
"private ForwardingControllerParams(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public SuperPeer forward(String command, Message message) {\n IPv4 neighbor;\n Socket nSock;\n DataOutputStream toNeighbor;\n\n message.decrementTTL().setSender(this.getAddress());\n for (String n : this.neighbors) {\n try {\n this.log(String.format(\"-> Forwarding '%s %s' to (%s)\", command, message, n));\n neighbor = new IPv4(n);\n // forward the message to each, with the TTL decremented\n nSock = new Socket(neighbor.getAddress(), neighbor.getPort());\n toNeighbor = new DataOutputStream(nSock.getOutputStream());\n\n toNeighbor.writeUTF(this.toString()); // initial handshake\n toNeighbor.writeUTF(String.format(\"%s %s\", command, message));\n nSock.close();\n } catch (Exception e) {\n this.log(String.format(\"-> Could not connect to (%s). Is it live?\", n));\n }\n }\n return this;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use Employee.newBuilder() to construct. | private Employee(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private Employee(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public static com.fretron.Model.Employee.Builder newBuilder() {\n return new com.fretron.Model.Employee.Builder();\n }",
"public static com.fretron.Model.Employee.Builder newBuilder(com.fretron.Model.Employee other) {\n return new com.fretron.Model.Employee.Builder(other);\n }",
"private EmployeeInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private EmployeeReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private EmployeeRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Employee build() {\n\t\t\t/*\n\t\t\t * this is using hte private constructor in the Employee class that takes a\n\t\t\t * String,LocalDate,Role enum, double, boolean\n\t\t\t */\n\t\t\treturn new Employee(name, startDate, role, wages, gender);\n\t\t}",
"private EmployeeRes(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Employee() {\n\t\tthis.name = \"No name\";\n\t\tthis.hireDate = new Date(\"January\", 1, 1000); \n\t}",
"public static com.fretron.Model.Employee.Builder newBuilder(com.fretron.Model.Employee.Builder other) {\n return new com.fretron.Model.Employee.Builder(other);\n }",
"private EmployeeResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public EmployeeEntity() {\n }",
"public EmployeeRecord(){}",
"Employee createEmployee();",
"public EmployeeModel() {\n\t super();\n }",
"@Override\n public Employee create(long employeeId) {\n Employee employee = new EmployeeImpl();\n\n employee.setNew(true);\n employee.setPrimaryKey(employeeId);\n\n return employee;\n }",
"private Employee populateEmployeeData(com.paypal.bfs.test.employee.model.Employee emp) {\n\t\tEmployee employee = new Employee();\n\t\temployee.setId(emp.getEmployeeId());\n employee.setFirstName(emp.getFirstName());\n employee.setLastName(emp.getLastName());\n employee.setDateOfBirth(getStringFromDate(emp.getDateOfBirth()));\n employee.setLine1(emp.getAddressLine1());\n employee.setLine2(emp.getAddressLine2());\n employee.setCity(emp.getCity());\n employee.setState(emp.getState());\n employee.setCountry(emp.getCountry());\n employee.setZipCode(emp.getZipCode());\n return employee;\n\t}",
"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 }",
"private static void createEmployees() {\n \tEmployee employee1=new Employee();\n \tEmployee employee2=new Employee(\"Angie\",\"Smith\", \"asmith@teams.com\",departments.get(2),\"08/21/2020\",002);\n \tEmployee employee3=new Employee(\"Margaret\",\"Thompson\",\"mthompson@teams.com\", departments.get(0),\"08/21/2020\",003);\n \t\n \temployee1.setFirstName(\"Dean\");\n \temployee1.setLastName(\"Johnson\");\n \temployee1.setDepartment(departments.get(2));\n \temployee1.setEmail(\"djohnson@teams.com\");\n \temployee1.setEmployeeId(001);\n \temployee1.setHireDate(\"08/21/2020\");\n \t\n \t\n \temployees.add(employee1);\n \temployees.add(employee2);\n \temployees.add(employee3);\n \temployee2.setSalary(employee2.raiseSalary(10));\n \t\n \n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shortcut method The method uses a TypeKey and null injection message to obtain an instance. | default <T> T instance(Class<T> type) throws UnsatisfiedInjectionException {
return instance(new TypeKey<>(type), null);
} | [
"public IParameter getInstance(String type){\n if(!initialized)\n throw new IllegalStateException(\"constructor never finished\");\n Class klass=(Class)paramList.get(type);\n if(klass==null)\n return null;\n else\n return getInstance(klass,false);\n }",
"<T> Provider<T> provider(Key<T> key, Object message) throws UnsatisfiedInjectionException;",
"private <T> T getFromIntent(String key, Class<T> clazz) {\n if (intent == null) return null;\n return getFromBundle(key, clazz, intent.getExtras());\n }",
"InstanceOrCallableInstance get(Class<?> key, Class<? extends Annotation> qualifier);",
"private Type() {}",
"protected Object getInstantiator(final Object key) throws NoSuchElementException {\n\n Class requiredKeyClass = getClassForKey();\n\n if(!requiredKeyClass.isAssignableFrom(key.getClass()))\n throw new IllegalArgumentException(\"Incorrect Class for key type\");\n\n // Get the constructors for this key.\n Object instantiator = getAssocTable().get(key);\n\n if(null == instantiator) {\n throw new NoSuchElementException(\"key '\" + key + \"' not registered.\");\n }\n\n return instantiator;\n }",
"Object lookup(FactoryInstance instanceInfo);",
"protected abstract UnresolvedType create(TypeInitializer typeInitializer, ClassDumpAction.Dispatcher dispatcher);",
"default <T> Provider<T> provider(Class<T> type) throws UnsatisfiedInjectionException {\r\n return provider(new TypeKey<>(type), null);\r\n }",
"<T> Supplier<T> supplier(Key<T> key) throws UnsatisfiedInjectionException;",
"static Thing lookup(String gType) {\n Thing stored;\n \n stored = (Thing) things.get(gType);\n if (stored == null) {\n throw new IllegalStateException(\"\\nYou've asked for the Thing corresponding to \\\"\" + gType\n + \"\\\" but it isn't registered.\");\n }\n \n return stored;\n }",
"<T extends KogitoEngine> T get(Class<T> clazz);",
"@CheckForNull\n <T extends IdentifiableObject> T get(@Nonnull Class<T> type, @Nonnull String uid);",
"public TypeKeyTransferable(TypeKeyEntry entry)\r\n {\r\n myTypeKeyEntry = entry;\r\n }",
"private <T> T getInstance(DatastoreType datastoreType, TransactionalCache.Mode cacheMode) {\n DatastoreId id = getDatastoreId(datastoreType);\n Object instance = cache.get(id, cacheMode);\n if (instance == null) {\n InstanceInvocationHandler invocationHandler = new InstanceInvocationHandler(datastoreType, getProxyMethodService());\n TypeMetadataSet<?> types = getTypes(datastoreType);\n instance = proxyFactory.createInstance(invocationHandler, types.toClasses(), CompositeObject.class);\n cache.put(id, instance, cacheMode);\n if (TransactionalCache.Mode.READ.equals(cacheMode)) {\n instanceListenerService.postLoad(instance);\n }\n }\n return (T) instance;\n }",
"Instance getInstance(String id);",
"@SuppressWarnings(\"unchecked\")\n @Override\n\tpublic <T> T getBean(String beanName, Class<T> ofType) throws CouldNotResolveBeanException, ClassCastException {\n\t\tKey<T> bindKey = Key.get(ofType, Names.named(beanName));\n\t\ttry {\n\t\t\treturn injector.getInstance(bindKey);\n\t\t} catch (RuntimeException e) {\n\t\t\tKey<?> beanKey = getBeanKey(beanName);\n\t\t\tif (beanKey == null) {\n\t\t\t\tthrow new CouldNotResolveBeanException(\"Could not find any bean named \" + beanName);\n\t\t\t}\n\t\t\treturn (T) injector.getInstance(beanKey);\n\t\t}\n\t}",
"Object newApiInstance(Object implKey);",
"Instance createInstance();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a VBox with HBox for filter, and TabPane | public VBox createLeftSidePane(TabPane sideTabPane) {
VBox vbox = new VBox();
// Create HBox with textfield and button
VBox verBox = createHorBoxFilterClubs(sideTabPane);
vbox.getChildren().add(verBox);
// Create TabPane
sideTabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);
sideTabPane.getTabs().addAll(getClubTabArrayList());
//tabpane.getStylesheets().add(getClass().getResource("css/TabPaneStyles.css").toExternalForm());
Text placeHolder = new Text( " Geen afdelingen gevonden." );
placeHolder.setFont( Font.font( null, FontWeight.BOLD, 14 ) );
BooleanBinding bb = Bindings.isEmpty( sideTabPane.getTabs() );
placeHolder.visibleProperty().bind( bb );
placeHolder.managedProperty().bind( bb );
vbox.getChildren().add(placeHolder); // Show placeholder when no tabs
vbox.getChildren().add(sideTabPane); // Show tabs if present
vbox.setPrefSize(250, 800);
return vbox;
} | [
"public VBox createHorBoxFilterGames(TabPane centerTabPane) {\n /** Creates a VBox with textfield and button for filtering tabpanes\n * \n */\n VBox vbox = new VBox();\n String seizoensstring = pref.get(\"Seizoen\", Integer.toString(LocalDate.now().getYear()));\n Label gameLabel = new Label(\"Wedstrijdschema \" + seizoensstring);\n gameLabel.setFont(Font.font( null, FontWeight.BOLD, 20 ));\n gameLabel.setAlignment(Pos.CENTER);\n vbox.setAlignment(Pos.CENTER);\n vbox.getChildren().add(gameLabel);\n HBox hbox = new HBox();\n TextField filterField = new TextField();\n filterField.setPromptText(\"Filter tabs\");\n filterField.textProperty().addListener((obs, oldText, newText) -> {\n clubfilterField.setText(newText);\n if (newText == null || newText.isEmpty()) {\n // Reset the tabpane to show all tabs\n centerTabPane.getTabs().clear();\n centerTabPane.getTabs().addAll(getGameTabArrayList());\n \n } else { \n centerTabPane.getTabs().clear();\n centerTabPane.getTabs().addAll(getGameTabArrayList());\n \n centerTabPane.getTabs().removeIf(tab -> !tab.getText().contains(newText));\n \n }\n });\n \n resetButton = new Button();\n resetButton.setText(\"Reset\");\n resetButton.setOnAction(event -> {\n centerTabPane.getTabs().clear();\n centerTabPane.getTabs().addAll(getGameTabArrayList());\n \n filterField.setText(\"\");\n });\n hbox.getStyleClass().add(\"bordered-titled-border\");\n hbox.setHgrow(filterField, Priority.ALWAYS);\n hbox.getChildren().add(filterField);\n hbox.getChildren().add(resetButton);\n vbox.getChildren().add(hbox);\n return vbox;\n }",
"public VBox createHorBoxFilterClubs(TabPane sideTabPane) {\n VBox vbox = new VBox();\n Label clubLabel = new Label(\"Teams\");\n clubLabel.setFont(Font.font( null, FontWeight.BOLD, 20 ));\n clubLabel.setAlignment(Pos.CENTER);\n vbox.setAlignment(Pos.CENTER);\n vbox.getChildren().add(clubLabel);\n \n HBox hbox = new HBox();\n clubfilterField = new TextField();\n clubfilterField.setPromptText(\"Filter tabs\");\n clubfilterField.textProperty().addListener((obs, oldText, newText) -> {\n \n if (newText == null || newText.isEmpty()) {\n // Reset the tabpane to show all tabs\n sideTabPane.getTabs().clear();\n sideTabPane.getTabs().addAll(getClubTabArrayList());\n } else {\n \n sideTabPane.getTabs().clear();\n sideTabPane.getTabs().addAll(getClubTabArrayList());\n sideTabPane.getTabs().removeIf(tab -> !tab.getText().contains(newText));\n //sideTabPane.getTabs().filtered(tab -> tab.getText().contains(newText));\n \n }\n });\n \n Button filterButton = new Button();\n filterButton.setText(\"Reset\");\n filterButton.setOnAction(event -> {\n sideTabPane.getTabs().clear();\n sideTabPane.getTabs().addAll(getClubTabArrayList());\n clubfilterField.setText(\"\");\n });\n hbox.getStyleClass().add(\"bordered-titled-border\");\n hbox.setHgrow(clubfilterField, Priority.ALWAYS);\n hbox.getChildren().add(clubfilterField);\n hbox.getChildren().add(filterButton);\n vbox.getChildren().add(hbox);\n return vbox;\n }",
"public VBox createHorBoxFilterUmpires(TabPane sideTabPane) {\n VBox vbox = new VBox();\n Label umpireLabel = new Label(\"Umpires\");\n umpireLabel.setFont(Font.font( null, FontWeight.BOLD, 20 ));\n umpireLabel.setAlignment(Pos.CENTER);\n vbox.setAlignment(Pos.CENTER);\n vbox.getChildren().add(umpireLabel);\n HBox hbox = new HBox();\n TextField filterField = new TextField();\n filterField.setPromptText(\"Filter tabs\");\n filterField.textProperty().addListener((obs, oldText, newText) -> {\n System.out.println(\"Text changed from \"+oldText+\" to \"+newText);\n \n if (newText == null || newText.isEmpty()) {\n //System.out.println(\"current observableTabList: \" + afdelingen);\n //System.out.println(\"Nothing to filter: \" + afdelingen);\n // Reset the tabpane to show all tabs\n sideTabPane.getTabs().clear();\n \n sideTabPane.getTabs().addAll(getUmpireTabArrayList());\n } else {\n //System.out.println(\"Filter active: \" + newText);\n //System.out.println(\"Filtered List = \" + afdelingen.filtered(tab -> tab.getAfdelingsNaam().contains(newText)));\n \n sideTabPane.getTabs().clear();\n sideTabPane.getTabs().addAll(getUmpireTabArrayList());\n sideTabPane.getTabs().removeIf(tab -> !tab.getText().contains(newText));\n \n }\n });\n \n resetButton = new Button();\n resetButton.setText(\"Reset\");\n resetButton.setOnAction(event -> {\n sideTabPane.getTabs().clear();\n sideTabPane.getTabs().addAll(getUmpireTabArrayList());\n filterField.setText(\"\");\n });\n hbox.getStyleClass().add(\"bordered-titled-border\");\n hbox.setHgrow(filterField, Priority.ALWAYS);\n hbox.getChildren().add(filterField);\n hbox.getChildren().add(resetButton);\n vbox.getChildren().add(hbox);\n return vbox;\n }",
"private void displayFilterPane() {\n FilterPane filterPane = new FilterPane(140, 60);\n\n sceneNodes.getChildren().add(filterPane);\n }",
"public void createVBox() {\n\t\tthis.getChildren().clear();\n\t\tthis.setPadding(new Insets(SPACING));\n\t this.setSpacing(SPACING);\n\t this.setMinWidth(SIZE);\n\t this.setMinHeight(SIZE);\n\t Text title = new Text(GROOVY);\n\t this.getChildren().add(title);\n\t addTextAreas();\n\t}",
"public void showFlightFilters() {\n filterPane.getChildren().clear();\n filterPane.getChildren().add(airlineNameFilterView);\n filterPane.getChildren().add(startFilterView);\n filterPane.getChildren().add(destinationFilterView);\n filterPane.getChildren().add(priceFilterView);\n filterPane.getChildren().add(durationFilterView);\n }",
"private Tab createInventoryTab() {\n Tab inventoryTab = new Tab(\"Beholdning\");\n BorderPane inventoryBorderPane = new BorderPane();\n\n VBox inventoryVBox = createInventoryVBox();\n //BorderPane loansBorderPaneBottom = createLoansBorderPaneBottom();\n\n inventoryTab.setContent(inventoryBorderPane);\n inventoryBorderPane.setCenter(inventoryVBox);\n //inventoryBorderPane.setBottom(loansBorderPaneBottom);\n \n return inventoryTab;\n }",
"public void showAirlineFilters() {\n filterPane.getChildren().clear();\n filterPane.getChildren().add(countryFilterView);\n filterPane.getChildren().add(airlineCodeFilterView);\n filterPane.getChildren().add(airlineNameFilterView);\n }",
"public void showAirportsFilters() {\n filterPane.getChildren().clear();\n filterPane.getChildren().add(countryFilterView);\n filterPane.getChildren().add(flightNumberFilterView);\n filterPane.getChildren().add(airportCodeFilterView);\n filterPane.getChildren().add(airportNameFilterView);\n }",
"public HBox getHBox2(){\r\n GridPane panei = new GridPane();\r\n panei.setHgap(10);\r\n panei.setVgap(10); \r\n hbox2 = new HBox(); \r\n txt_produc = new TextField(); \r\n txt_cantidad = new TextField();\r\n \r\n panei.add(new Label(\"Codigo Producto\"), 0, 1);\r\n panei.add(txt_produc, 1, 1);\r\n panei.add(new Label(\"Cantidad Producto\"), 0, 3);\r\n panei.add(txt_cantidad, 1, 3);\r\n \r\n GridPane panec = new GridPane();\r\n panec.setHgap(10);\r\n panec.setVgap(10);\r\n txt_cantidad = new TextField();\r\n txt_precio = new TextField(); \r\n \r\n panec.add(new Label(\"Nombre\"), 0, 1);\r\n panec.add(txt_cantidad, 1, 1); \r\n panec.add(new Label(\"Precio\"), 0, 3);\r\n panec.add(txt_precio, 1, 3);\r\n \r\n GridPane paned = new GridPane();\r\n paned.setHgap(10);\r\n paned.setVgap(10);\r\n \r\n btn_agregar = new Button(\"Agregar\");\r\n \r\n paned.add(btn_agregar, 2, 5);\r\n \r\n hbox2.getChildren().add(panei);\r\n hbox2.getChildren().add(panec);\r\n hbox2.getChildren().add(paned);\r\n \r\n \r\n return hbox2;\r\n }",
"public CompanyOverviewHalfVBox (DataContainerManager dataContainerManager){\n companyOverviewHalfVBox = this;\n\n\n companyName = dataContainerManager.getCompanyOverviewData().getName();\n Label companyNameLabel = new Label(companyName);\n companyNameLabel.setFont(new Font(\"Verdana\",20));\n\n companySector = \"Industry: \"+dataContainerManager.getCompanyOverviewData().getIndustry();\n Label companySectorLabel = new Label(companySector);\n companySectorLabel.setFont(new Font(\"Verdana\",16));\n\n\n\n\n companyDescription = dataContainerManager.getCompanyOverviewData().getDescription();\n Label companyDescriptionLabel = new Label(companyDescription);\n\n\n companyDescriptionLabel.setWrapText(true);\n companyDescriptionLabel.setFont(new Font(\"Verdana\",14));\n\n ScrollPane descriptionScrollPane = new ScrollPane();\n descriptionScrollPane.setContent(companyDescriptionLabel);\n descriptionScrollPane.pannableProperty().set(true);\n descriptionScrollPane.hbarPolicyProperty().setValue(ScrollPane.ScrollBarPolicy.NEVER);\n descriptionScrollPane.vbarPolicyProperty().setValue(ScrollPane.ScrollBarPolicy.AS_NEEDED);\n descriptionScrollPane.setPrefHeight(200);\n descriptionScrollPane.setFitToWidth(true);\n\n\n\n\n \n HistoricalStockPriceTabPane historicalStockPriceTapPane = new HistoricalStockPriceTabPane(dataContainerManager);\n\n\n\n\n companyOverviewHalfVBox.getLocalToSceneTransform();\n companyOverviewHalfVBox.getChildren().add(companyNameLabel);\n companyOverviewHalfVBox.getChildren().add(companySectorLabel);\n companyOverviewHalfVBox.getChildren().add(descriptionScrollPane);\n companyOverviewHalfVBox.getChildren().add(new Separator(Orientation.HORIZONTAL));\n\n companyOverviewHalfVBox.getChildren().add(historicalStockPriceTapPane);\n\n\n }",
"public void createView()\n {\n mView.getChildren().add(mHBox);\n }",
"public TabPaneLike(TabSide side, TabLabelCreator tabLabelCreator){\n BorderPane bp = new BorderPane();\n\n this.tabLabelCreator = tabLabelCreator;\n\n getChildren().add(bp);\n\n bp.maxWidthProperty().bind(widthProperty());\n bp.minWidthProperty().bind(widthProperty());\n bp.prefWidthProperty().bind(widthProperty());\n\n bp.maxHeightProperty().bind(heightProperty());\n bp.minHeightProperty().bind(heightProperty());\n bp.prefHeightProperty().bind(heightProperty());\n\n\n tabContent = new StackPane();\n tabs = new LinkedList<>();\n\n switch(side){\n case TOP -> {\n nameTab = new HBox();\n tabLabelCreator.setHeights(nameTab);\n bp.setTop(nameTab);\n }\n case BOTTOM -> {\n nameTab = new HBox();\n tabLabelCreator.setHeights(nameTab);\n bp.setBottom(nameTab);\n }\n case RIGHT -> {\n nameTab = new VBox();\n tabLabelCreator.setWidths(nameTab);\n bp.setRight(nameTab);\n }\n case LEFT -> {\n nameTab = new VBox();\n tabLabelCreator.setWidths(nameTab);\n bp.setLeft(nameTab);\n }\n default -> nameTab = new VBox();\n\n }\n\n bp.setCenter(tabContent);\n\n nameTab.setStyle(\"-fx-background-color: lightgrey\");\n }",
"public CreateTab(PetriDishApp app) {\r\n\t\tsetText(\"Create\");\r\n\t\tsetClosable(false);\r\n\r\n\t\t// organized in a single VBox\r\n\t\tVBox createTabBox = new VBox();\r\n\t\tcreateTabBox.setPadding(new Insets(10, 5, 10, 5));\r\n\t\tcreateTabBox.setSpacing(10);\r\n\t\tcreateTabBox.setAlignment(Pos.TOP_CENTER);\r\n\t\tsetContent(createTabBox);\r\n\t\t// done setting up box\r\n\r\n\t\t// organized into HBoxes, with separators\r\n\t\tcreateTabBox.getChildren().add(new Separator());\r\n\t\t// each section labeled\r\n\t\tcreateTabBox.getChildren().add(new Label(\"New Simulation Size\"));\r\n\r\n\t\tHBox topBox = new HBox();\r\n\t\tcreateTabBox.getChildren().add(topBox);\r\n\t\ttopBox.setSpacing(10);\r\n\t\ttopBox.setAlignment(Pos.CENTER_LEFT);\r\n\r\n\t\tcreateTabBox.getChildren().add(new Separator());\r\n\t\tcreateTabBox.getChildren().add(new Label(\"New Simulation Cell Pops\"));\r\n\r\n\t\tHBox secondBox = new HBox();\r\n\t\tcreateTabBox.getChildren().add(secondBox);\r\n\t\tsecondBox.setSpacing(10);\r\n\t\tsecondBox.setAlignment(Pos.CENTER_LEFT);\r\n\r\n\t\tcreateTabBox.getChildren().add(new Separator());\r\n\t\t// finished setting up organization\r\n\r\n\t\t// begin adding GUI elements to their HBoxes\r\n\r\n\t\t// width input box\r\n\t\tBoundedIntField simDimWidthMsg = new BoundedIntField(PetriDishApp.MIN_PETRI_DISH_DIM,\r\n\t\t\t\tPetriDishApp.MAX_PETRI_DISH_DIM);\r\n\t\tsimDimWidthMsg.setMaxWidth(75);\r\n\r\n\t\tsimDimWidthMsg.integerProperty().bindBidirectional(app.newSimulationWidth);\r\n\r\n\t\t// height input box\r\n\t\tBoundedIntField simDimHeightMsg = new BoundedIntField(PetriDishApp.MIN_PETRI_DISH_DIM,\r\n\t\t\t\tPetriDishApp.MAX_PETRI_DISH_DIM);\r\n\t\tsimDimHeightMsg.setMaxWidth(75);\r\n\r\n\t\tsimDimHeightMsg.integerProperty().bindBidirectional(app.newSimulationHeight);\r\n\r\n\t\ttopBox.getChildren().add(simDimWidthMsg);\r\n\t\ttopBox.getChildren().add(simDimHeightMsg);\r\n\r\n\t\t// input fields for starting cell populations\r\n\t\t\r\n\t\t// agar\r\n\t\tBoundedIntField simAgarPopMsg = new BoundedIntField();\r\n\t\tsimAgarPopMsg.setMaxWidth(50);\r\n\r\n\t\tsimAgarPopMsg.integerProperty().bindBidirectional(app.newSimulationAgarPop);\r\n\t\t\r\n\t\t// grazer\r\n\t\tBoundedIntField simGrazerPopMsg = new BoundedIntField();\r\n\t\tsimGrazerPopMsg.setMaxWidth(50);\r\n\r\n\t\tsimGrazerPopMsg.integerProperty().bindBidirectional(app.newSimulationGrazerPop);\r\n\t\t\r\n\t\t// pred\r\n\t\tBoundedIntField simPredPopMsg = new BoundedIntField();\r\n\t\tsimPredPopMsg.setMaxWidth(50);\r\n\r\n\t\tsimPredPopMsg.integerProperty().bindBidirectional(app.newSimulationPredPop);\r\n\t\t\r\n\t\t// plant\r\n\t\tBoundedIntField simPlantPopMsg = new BoundedIntField();\r\n\t\tsimPlantPopMsg.setMaxWidth(50);\r\n\r\n\t\tsimPlantPopMsg.integerProperty().bindBidirectional(app.newSimulationPlantPop);\r\n\t\t\r\n\t\t// add those input boxes to the second box\r\n\t\t// with their own labels in VBoxes\r\n\t\t\r\n\t\tArrayList<VBox> labelContainers = new ArrayList<VBox>();\r\n\t\t\r\n\t\t// make the boxes\r\n\t\t\r\n\t\tVBox simAgarPopMsgContainer = new VBox();\r\n\t\tVBox simGrazerPopMsgContainer = new VBox();\r\n\t\tVBox simPredPopMsgContainer = new VBox();\r\n\t\tVBox simPlantPopMsgContainer = new VBox();\r\n\t\t\r\n\t\t// configure the boxes\r\n\t\t\r\n\t\tlabelContainers.add(simAgarPopMsgContainer);\r\n\t\tlabelContainers.add(simGrazerPopMsgContainer);\r\n\t\tlabelContainers.add(simPredPopMsgContainer);\r\n\t\tlabelContainers.add(simPlantPopMsgContainer);\r\n\t\t\r\n\t\tfor (VBox v : labelContainers) {\r\n\t\t\tv.setPadding(new Insets(10, 5, 10, 5));\r\n\t\t\tv.setSpacing(10);\r\n\t\t\tv.setAlignment(Pos.TOP_CENTER);\r\n\t\t}\r\n\t\t\r\n\t\tsimAgarPopMsgContainer.getChildren().add(new Label(\"Agar\"));\r\n\t\tsimAgarPopMsgContainer.getChildren().add(simAgarPopMsg);\r\n\t\t\r\n\t\tsimGrazerPopMsgContainer.getChildren().add(new Label(\"Grazer\"));\r\n\t\tsimGrazerPopMsgContainer.getChildren().add(simGrazerPopMsg);\r\n\t\t\r\n\t\tsimPredPopMsgContainer.getChildren().add(new Label(\"Predator\"));\r\n\t\tsimPredPopMsgContainer.getChildren().add(simPredPopMsg);\r\n\t\t\r\n\t\tsimPlantPopMsgContainer.getChildren().add(new Label(\"Plant\"));\r\n\t\tsimPlantPopMsgContainer.getChildren().add(simPlantPopMsg);\r\n\t\t\r\n\t\tfor (VBox v : labelContainers) {\r\n\t\t\tsecondBox.getChildren().add(v);\r\n\t\t}\r\n\t\t\r\n\t}",
"private TabPane createTabPane() {\n Tab loans = createLoansTab();\n Tab book = createCopyTab();\n Tab bookCopy = createInventoryTab();\n Tab borrower = createBorrowerTab();\n Tab librarian = createLibrarianTab();\n TabPane tabPane = new TabPane(loans, book, bookCopy, borrower, librarian);\n\n tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);\n tabPane.getSelectionModel().selectedItemProperty().addListener(l -> updateAllList());\n\n return tabPane;\n }",
"private Tab createLoansTab() {\n Tab loansTab = new Tab(\"Utlån\");\n BorderPane loansBorderPane = new BorderPane();\n VBox loansContent = new VBox();\n\n VBox loansTopContent = createLoansTopContent();\n HBox loansBottomContent = createLoansBottomContent();\n\n loansTab.setContent(loansBorderPane);\n loansBorderPane.setCenter(loansContent);\n loansContent.getChildren().addAll(loansTopContent, loansBottomContent);\n\n VBox.setVgrow(loansTopContent, Priority.ALWAYS);\n VBox.setVgrow(loansBottomContent, Priority.ALWAYS);\n\n return loansTab;\n }",
"public SearchBorderPaneView() {\r\n\t\tthis.searchBorderPaneController = new SearchBorderPaneController();\r\n\t\t//-.-off\r\n\t\tthis.searchTextField = TextFieldBuilder.create()\r\n\t\t\t\t\t\t\t\t\t\t\t\t.promptText(SEARCHTEXTFIELD_PROMPTTEXT)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.size(SearchBPDecorator.SEARCHTEXTFIELDWIDTH, SearchBPDecorator.SEARCHTEXTFIELDHEIGHT)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.build();\r\n\t\t\r\n\t\tsetSearchTextFieldKeyEvent();\r\n\t\t\r\n\t\tthis.searchButton = ButtonBuilder.create()\r\n\t\t\t\t\t\t\t\t\t.text(SEARCHBUTTON_TEXT)\r\n\t\t\t\t\t\t\t\t\t.build();\r\n\t\tsetSearchButtonFunction();\r\n\t\tsetButtonDisability();\r\n\t\tsetTop(HBoxBuilder.noCreate()\r\n\t\t\t\t\t\t\t.noTextField(this.searchTextField)\r\n\t\t\t\t\t\t\t.noButton(this.searchButton)\r\n\t\t\t\t\t\t\t.build());\r\n\t\t//-.-on\r\n\t\tsetPadding();\r\n\t\tshowPodcastList();\r\n\t\tshowEpisodesList();\r\n\t\tSearchBPDecorator.decorateFactory(this);\r\n\t}",
"private void layoutParts()\n {\n HBox box = new HBox();\n\n box.setPadding(new Insets(5, 10, 5, 10));\n box.setSpacing(10);\n\n box.setAlignment(Pos.CENTER_LEFT);\n box.getChildren().addAll(label, slider, base10Field, hexField);\n\n getChildren().add(box);\n }",
"private Tab createCopyTab() {\n Tab copyTab = new Tab(\"Kopi\");\n \n BorderPane copyBorderPane = new BorderPane();\n VBox copyContent = new VBox();\n\n VBox copyTopContent = createCopyTopContent();\n //HBox copyBottomContent = createCopyBottomContent();\n\n copyTab.setContent(copyBorderPane);\n copyBorderPane.setCenter(copyContent);\n //copyContent.getChildren().addAll(copyTopContent, copyBottomContent);\n copyContent.getChildren().addAll(copyTopContent);\n\n VBox.setVgrow(copyTopContent, Priority.ALWAYS);\n //VBox.setVgrow(copyBottomContent, Priority.ALWAYS);\n\n return copyTab;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
signout is handled in UserInterceptor, this method never actually reached, mapping needed to be declared though | @RequestMapping(value="/signout", method= RequestMethod.GET)
public void signout() {
} | [
"public void userLoggedOut() {\n\t\t}",
"public void signOut() {\r\n FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove(LOGIN);\r\n }",
"@Override\n\tpublic void userLogout() {\n\t\tclient.userLogout();\n\t}",
"boolean userLogout(UserDTO user) throws UserException, SQLException,ConnectException;",
"default void onLoggedOut() {}",
"private void signOutUser()\n {\n mAuth.signOut();\n startActivity(LoginActivity.createIntent(mContext));\n finish();\n }",
"public void signOutUser() {\n Log.d(TAG, \"signOutUser: started\");\n SharedPreferences sharedPreferences = context.getSharedPreferences(SESSION_DATA, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n editor.remove(LOGGED_USER);\n editor.commit();\n\n //navigate back to the Login page after the user is logged out.\n Intent intent = new Intent(context, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(intent);\n }",
"@Override\n public void logout() {\n this.loggedIn = false;\n }",
"boolean handleLogoutRequest(Request request,Response response,SecurityContextHolder context) throws Throwable;",
"public void onLogout() {\n mainAppViewModel.userLoggedOut();\n viewHandler.openWelcomeView();\n }",
"private void signOut()\n {\n mAuth.signOut();\n }",
"private void signOut() {\n mAuth.signOut();\n\n }",
"public Result logOut() {\n customerService().logout();\n return redirectToReturnUrl();\n }",
"@Override\n public void OnLogOutClicked() {\n\n UserManager.setToken(null, this);\n UserManager.setUser(null, this);\n\n Intent signInIntent = new Intent(this, SignInActivity.class);\n startActivity(signInIntent);\n finish();\n\n }",
"public void userLoggedOut(User user) \n\t\t{\n\t\t\tLog.i(\"OpenFeint\", \"User logged out\");\n\t\t\tMainActivity.this.userLoggedOut();\t\n\t\t}",
"public void userLoggedOut(User user) \n\t\t{\n\t\t\tLog.i(\"OpenFeint\", \"User logged out\");\n\t\t\tMainActivity.this.userLoggedOut();\n\t\t}",
"@Override\n public void invalidate() {\n if (authenticationListener != null) {\n authenticationListener.onUserLoggedOut();\n }\n }",
"@POST\n @Path(\"/\")\n public Response logout() {\n if (!FeatureFlags.API_SESSION_AUTH.enabled()) {\n return error(Response.Status.INTERNAL_SERVER_ERROR, \"This endpoint is only available when session authentication feature flag is enabled\");\n }\n if (!session.getUser().isAuthenticated()) {\n return error(Response.Status.BAD_REQUEST, \"No valid session cookie was sent in the request\");\n }\n session.setUser(null);\n session.setStatusDismissed(false);\n return ok(\"User logged out\");\n }",
"public void logOut(){\n this.setLogged(false);\n this.loggedUserEmail = null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Forward Authorization Roles Forward KeyCloak roles to the Authorization policy. In your Authorization policy you should specify your required role(s). | @JsonProperty("forwardRoles")
public void setForwardRoles(ForwardRoles forwardRoles) {
this.forwardRoles = forwardRoles;
} | [
"public void issueRoles() {}",
"public void setAuthorizationHandler(AuthorizationHandler handler)\n {\n }",
"private Collection<? extends GrantedAuthority> mapRolesToAuthorities(Collection<Role> roles) {\n// Put roles into stream then map the role, we put role to the security provide class\n// simplegrantedauthority and we pass roles name to this object and finally we collected stream to the list\n return roles.stream().map(role -> new SimpleGrantedAuthority(role.getRole())).collect(Collectors.toList());\n }",
"private List<GrantedAuthority> mapRolesToAuthorities(List<Role> roles){\n List<GrantedAuthority> authorities = new ArrayList();\n for(Role r:roles){\n GrantedAuthority authority = new SimpleGrantedAuthority(r.getRname());\n authorities.add(authority);\n }\n return authorities;\n }",
"public void addAuthorization(RoleAuthorizationEntity roleAuthorization) {\n authorizations.add(roleAuthorization);\n }",
"public void addAuthorizations(Collection<RoleAuthorization> roleAuthorizations) {\n for (RoleAuthorization roleAuthorization : roleAuthorizations) {\n addAuthorization(createRoleAuthorizationEntity(roleAuthorization));\n }\n }",
"@FunctionalInterface\n private interface RoleChecker {\n public void checkAndRedirect(String role, String redirectAddress) throws IOException;\n }",
"void updateRoleMapping(String principalId, String role) throws RegistryStorageException;",
"public interface RolePermissionMapper {\n /**\n * Sets the context for this {@link RolePermissionMapper}\n *\n * @param context\n */\n void setContext(AuthorizationMapperContext context);\n\n /**\n * @param name the name of the role\n * @return the {@link Role}\n */\n Role getRole(String name);\n\n /**\n * @return all roles handled by this RolePermissionMapper\n */\n Map<String, Role> getAllRoles();\n\n /**\n * @param name\n * @return whether this permission mapper contains the named role\n */\n boolean hasRole(String name);\n}",
"protected boolean processRoles(HttpServletRequest request,\r\n\t\t\t\t\t\t\t\t HttpServletResponse response,\r\n\t\t\t\t\t\t\t\t ActionMapping mapping)\r\n\t\tthrows IOException, ServletException {\r\n\r\n\t\t// Is this action protected by role requirements?\r\n\t\tString roles[] = mapping.getRoleNames();\r\n\t\tif ((roles == null) || (roles.length < 1)) {\r\n\t\t\treturn (true);\r\n\t\t}\r\n\r\n\t\t// Check the current user against the list of required roles\r\n\t\tfor (int i = 0; i < roles.length; i++) {\r\n\t\t\tif (request.isUserInRole(roles[i])) {\r\n\t\t\t\tif (log.isDebugEnabled()) {\r\n\t\t\t\t\tlog.debug(\" User '\" + request.getRemoteUser() +\r\n\t\t\t\t\t\t\"' has role '\" + roles[i] + \"', granting access\");\r\n\t\t\t\t}\r\n\t\t\t\treturn (true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// The current user is not authorized for this action\r\n\t\tif (log.isDebugEnabled()) {\r\n\t\t\tlog.debug(\" User '\" + request.getRemoteUser() +\r\n\t\t\t\t\t \"' does not have any required role, denying access\");\r\n\t\t}\r\n \r\n\t\tresponse.sendError(\r\n\t\t\tHttpServletResponse.SC_FORBIDDEN,\r\n\t\t\tgetInternal().getMessage(\"notAuthorized\", mapping.getPath()));\r\n \r\n\t\treturn (false);\r\n\r\n\t}",
"@Override\r\n public Object aroundInvoke(InvocationContext context, Continuation continuation) throws Exception {\n Operation operation = Directives.getMappedOperation(\r\n context.getResolutionEnvironment().dataFetchingEnvironment\r\n .getFieldDefinition())\r\n .get();\r\n // Auth auth = operation\r\n // .getApplicableResolver(context.getResolutionEnvironment()\r\n // .dataFetchingEnvironment.getArguments().keySet()).getExecutable().getDelegate()\r\n // .getAnnotation(Auth.class);\r\n Set<String> allNeededRoles = operation.getResolvers().stream()\r\n .map(res -> res.getExecutable().getDelegate()) // get the underlying method\r\n .filter(method -> method.isAnnotationPresent(Auth.class))\r\n .map(method -> method.getAnnotation(Auth.class))\r\n .flatMap(obj -> Arrays.stream(obj.rolesRequired()))\r\n .collect(Collectors.toSet());\r\n\r\n// Set<String> allNeededRoles = allAuthAnnotations.stream()\r\n// .flatMap(auths -> Arrays.stream(auths.rolesRequired()))\r\n// .collect(Collectors.toSet());\r\n\r\n Set<String> allRoles = SecurityContextHolder.getContext().getAuthentication().getAuthorities().stream()\r\n .map(role -> role.getAuthority())\r\n .collect(Collectors.toSet());\r\n\r\n if (allNeededRoles.size() > 0 && !allNeededRoles.containsAll(allRoles)) {\r\n// throw new IllegalAccessException(\"Access denied\"); // or return null\r\n return null;\r\n }\r\n return continuation.proceed(context);\r\n }",
"private void getGrantedRoles() {\n\t\tremoveAllRows();\n\t\tif (path != null) {\n\t\t\tMain.get().mainPanel.desktop.browser.tabMultiple.status.setRoleSecurity();\n\t\t\tServiceDefTarget endPoint = (ServiceDefTarget) authService;\n\t\t\tendPoint.setServiceEntryPoint(RPCService.AuthService);\t\n\t\t\tauthService.getGrantedRoles(path, callbackGetGrantedRoles);\n\t\t}\n\t}",
"protected static void enableAclAuthorizer(Properties brokerProps) {\n brokerProps.put(\"authorizer.class.name\", \"kafka.security.authorizer.AclAuthorizer\");\n brokerProps.put(\"sasl.enabled.mechanisms\", \"PLAIN\");\n brokerProps.put(\"sasl.mechanism.inter.broker.protocol\", \"PLAIN\");\n brokerProps.put(\"security.inter.broker.protocol\", \"SASL_PLAINTEXT\");\n brokerProps.put(\"listeners\", \"SASL_PLAINTEXT://localhost:0\");\n brokerProps.put(\"listener.name.sasl_plaintext.plain.sasl.jaas.config\",\n \"org.apache.kafka.common.security.plain.PlainLoginModule required \"\n + \"username=\\\"super\\\" \"\n + \"password=\\\"super_pwd\\\" \"\n + \"user_connector=\\\"connector_pwd\\\" \"\n + \"user_super=\\\"super_pwd\\\";\");\n brokerProps.put(\"super.users\", \"User:super\");\n }",
"public void setUserRoles(String[] roles) {}",
"boolean anyGranted(String roles);",
"@Override\n public void createReadOnlyHivePolicy(String categoryName, String feedName, List<String> hadoopAuthorizationGroups, String datebaseName, List<String> tableNames) {\n String sentryPolicyName = getHivePolicyName(categoryName, feedName);\n if (sentryClientObject.checkIfRoleExists(sentryPolicyName)) {\n try {\n sentryClientObject.dropRole(sentryPolicyName);\n } catch (SentryClientException e1) {\n log.error(\"Failed to update policy in sentry\" + e1.getMessage());\n throw new RuntimeException(e1);\n }\n }\n\n try {\n\n sentryClientObject.createRole(sentryPolicyName);\n for (String groupCounter : hadoopAuthorizationGroups) {\n sentryClientObject.grantRoleToGroup(sentryPolicyName, groupCounter);\n }\n for (String tableCounter : tableNames) {\n sentryClientObject.grantRolePriviledges(HIVE_READ_ONLY_PERMISSION, TABLE, datebaseName + \".\" + tableCounter, sentryPolicyName);\n\n }\n\n } catch (SentryClientException e) {\n log.error(\"Failed to create Sentry policy\" + sentryPolicyName);\n throw new RuntimeException(e);\n }\n\n }",
"private static void addAuthorization(SearchMetadataCollection doc, String aclString) {\n Map<String, List<String>> permissions = new HashMap<>();\n\n // Define containers for common permissions\n for (Action action : Permissions.Action.values()) {\n permissions.put(action.toString(), new ArrayList<>());\n }\n\n AccessControlList acl = AccessControlParser.parseAclSilent(aclString);\n for (AccessControlEntry entry : acl.getEntries()) {\n if (!entry.isAllow()) {\n logger.info(\"Series index does not support denial via ACL, ignoring {}\", entry);\n continue;\n }\n List<String> actionPermissions = permissions.get(entry.getAction());\n if (actionPermissions == null) {\n actionPermissions = new ArrayList<>();\n permissions.put(entry.getAction(), actionPermissions);\n }\n actionPermissions.add(entry.getRole());\n }\n\n // Write the permissions to the input document\n for (Map.Entry<String, List<String>> entry : permissions.entrySet()) {\n String fieldName = SeriesIndexSchema.ACL_PERMISSION_PREFIX.concat(entry.getKey());\n doc.addField(fieldName, entry.getValue(), false);\n }\n }",
"boolean allGranted(String roles);",
"protected abstract void addRoleAttributes(TLCoreObject coreObject);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Makes task completed. Removes from current tasks and adds into completed tasks. | void setCompleted(Task task) {
currentTasks.remove(task);
completedTasks.add(task);
} | [
"public void taskCompleted() {\n\t\tactiveTaskCount--;\n\t}",
"public void completeNext()\n {\n\tTask t = toDo.get(0);\n\tt.complete();\n\ttoDo.remove(0);\n\tcompleted.add(t);\n }",
"public void completeTask() {\n completed = true;\n }",
"public void completeTask() {\n isCompleted = true;\n }",
"synchronized void finishTask() {\r\n tasks--;\r\n this.notify();\r\n }",
"public void removeCompleted() {\n // Loop through and remove completed tasks\n for (int i = 0; i < isComplete.size(); i++) {\n if (isComplete.get(i)) {\n isComplete.remove(i);\n tasks.remove(i);\n i--; // Since we've removed items we need the index to go back one\n }\n }\n }",
"void addDoneTask(Task task);",
"public void setCompletedTasks(CopyOnWriteArrayList<Task> completedTasks) {\n this.completedTasks = completedTasks;\n }",
"@Override\n\tpublic void removeByCompleted(boolean completed) {\n\t\tfor (Task task : findByCompleted(completed, QueryUtil.ALL_POS,\n\t\t\t\tQueryUtil.ALL_POS, null)) {\n\t\t\tremove(task);\n\t\t}\n\t}",
"void TaskFinished(Task task) {\n\n repository.finishTask(task);\n }",
"private void complete(int removeIndex) throws IOException {\n\t\t//User should not modify the completed task, so the mode would be switched to 0 automatically\n\t\tswitchToChangeableMode();\n\t\tif (mode == DISPLAY_MODE.TODO_TASKLIST){\n\t\t\t\n\t\t\tif (removeIndex < 0 || removeIndex > taskList.size()) {\n\t\t\t\tshowMessage(MESSAGE_COMPLETE_OPERATION_FAILURE);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tshowMessage(MESSAGE_COMPLETE_OPERATION);\n\t\t\tTask finishedOne = taskList.remove(removeIndex - 1);\n\t\t\t//update hasfinished added here\t\t\n\t\t\tTask copyOfFinishedOne = new Task(finishedOne.getContent(),finishedOne.getDate(),finishedOne.getDeadline(),finishedOne.getVenue());\n\t\t\tcopyOfFinishedOne.finish();\n\t\t\tcompletedTaskList.add(copyOfFinishedOne);\n\t\t\tsaveFile();\n\t\t}else{\n\t\t\tif (removeIndex < 0 || removeIndex > searchResult.size()) {\n\t\t\t\tshowMessage(MESSAGE_DELETE_OPERATION_FAILURE);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tint indexinTaskList = 0;\n\t\t\tfor (int i = 0; i < taskList.size(); i++){\n\t\t\t\tif (taskList.get(i).isEqual(searchResult.get(removeIndex - 1 ))){\n\t\t\t\t\tindexinTaskList = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tTask finishedOne = taskList.get(indexinTaskList);\n\t\t\tTask copyOfFinishedOne = new Task(finishedOne.getContent(),finishedOne.getDate(),finishedOne.getDeadline(),finishedOne.getVenue());\n\t\t\tcopyOfFinishedOne.finish();\n\t\t\tcompletedTaskList.add(copyOfFinishedOne);\n\t\t\ttaskList.remove(indexinTaskList);\n\t\t\tshowMessage(MESSAGE_DELETE_OPERATION);\n\t\t\tsearchResult.remove(removeIndex - 1);\n\t\t\tsaveFile();\n\t\t}\n\t}",
"void addDoneTasks(List<Task> task);",
"public static void completeTask(Task t) {\r\n\t\tt.complete();\r\n\t\tmainMenu();\r\n\t}",
"private void doMarkTaskAsCompleted() {\n System.out.println(\n \"Select the task you would like to mark as complete by entering the appropriate index number.\");\n int index = input.nextInt();\n todoList.markTaskAsCompleted(index);\n System.out.println(\"The selected task has been marked as complete. \");\n }",
"public void markSubtaskComplete();",
"@Override\n public void markTaskAsComplete(Integer taskId) {\n Task task = getTaskById(taskId);\n task.setStatus(Status.COMPLETED);\n task.setLastModified(Instant.now());\n }",
"@Override\n\tpublic boolean done() {\n\t\tfor(Task t : details.getPendingTasks()){\n\t\t\tif(!t.isComplete())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public ControllerUpgradeState addTasksCompletedItem(UpgradeTask tasksCompletedItem) {\n if (this.tasksCompleted == null) {\n this.tasksCompleted = new ArrayList<UpgradeTask>();\n }\n this.tasksCompleted.add(tasksCompletedItem);\n return this;\n }",
"public void setTaskCompleted(TaskAttemptID taskID) {\n taskStatuses.get(taskID).setState(TaskStatus.SUCCEEDED);\n successfulTaskID = taskID;\n activeTasks.remove(taskID);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Count how many human proteins are in the Panther pathway files. | public void countHumanProteins() throws Exception {
// Get the human proteins accession numbers in UniProts
UniProtAnalyzer uniAnalyzer = new UniProtAnalyzer();
Map<String, String> uniAccIDsMap = uniAnalyzer.loadUniProtIDsMap();
// TREMBL
//fileName = DATASET_DIR + "UniProt" + File.separator + "uniprot_trembl_human.dat";
//processUniProtIds(fileName, uniProtIds);
System.out.println("Total UniProt: " + uniAccIDsMap.size());
// Panther map file: Pathway Component to UniProt IDs
String fileName = DATASET_DIR + "Panther" + File.separator + "SequenceAssociationPathway1.13";
FileReader fileReader = new FileReader(fileName);
BufferedReader bufferedReader = new BufferedReader(fileReader);
String line = null;
String[] tokens = null;
Set<String> pantherIds = new HashSet<String>();
Set<String> nonredundantIds = new HashSet<String>();
String uniID = null;
while ((line = bufferedReader.readLine()) != null) {
tokens = line.split("\t");
uniID = tokens[4];
if (uniAccIDsMap.containsKey(uniID)) {
pantherIds.add(uniID);
nonredundantIds.add(uniAccIDsMap.get(uniID));
}
}
System.out.println("UniProt in Panther: " + pantherIds.size());
System.out.println("UnitProt in Panther (nonredundant): " + nonredundantIds.size());
// Check how many panther ids have been in the Reactome already
// Set<String> reactomeIds = loadReactomeIds();
// int c = 0;
// for (String id : pantherIds) {
// if (reactomeIds.contains(id))
// c++;
// }
// System.out.println("Panther ID in Reactome: " + c);
} | [
"int getPathsCount();",
"int getProcessorpathCount();",
"long getNumberOfPeptides(String experimentAccession);",
"int getProofsCount();",
"int getSourcepathCount();",
"int getHerwinCount();",
"@Override\n\tpublic int getPianosCount() {\n\t\treturn pianoPersistence.countAll();\n\t}",
"public int getPeptideShakerHits() {\n\n int contribution = 0;\n\n for (int tempContribution : fileIdRate.values()) {\n\n contribution += tempContribution;\n\n }\n\n return contribution;\n\n }",
"int getJiePaoCountCount();",
"public static int cityCount() {\n return roamPaths.size();\n }",
"int getPoiImagesCount();",
"int getFileFingerPrintCount();",
"public int qureyNumOfInspectors() {\r\n\t\tif (DBConnection.conn == null) {\r\n\t\t\tDBConnection.openConn();\r\n\t\t}\r\n\t\tint sum = 0;\r\n\t\ttry {\r\n\t\t\tString sql = \"select count(*) from InspectionPersonnel\";\r\n\t\t\tps = DBConnection.conn.prepareStatement(sql);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tsum = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tDBConnection.closeResultSet(rs);\r\n\t\t\tDBConnection.closeStatement(ps);\r\n\t\t\tDBConnection.closeConn();\r\n\t\t\treturn sum;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}",
"int getWeikeCountCount();",
"public int getProteinCount() {\r\n return proteinHits.size();\r\n }",
"int getPluginsCriticalPathCount();",
"int getWeikeCount();",
"int getFileNamesCount();",
"Integer getLogicalFileCount();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a Beta distribution | public static RuntimeValue beta(RuntimeValue a, RuntimeValue b) throws RuntimeException {
if (isDiscreteFloatSample(a) && hasSingleValue(a.getDiscreteFloatSample()) &&
isDiscreteFloatSample(b) && hasSingleValue(b.getDiscreteFloatSample())) {
return new RuntimeValue(
RuntimeValue.Type.DISTRIBUTION,
new BetaDistribution(a.getDiscreteFloatSample().single(), b.getDiscreteFloatSample().single())
);
}
throw new RuntimeException("Unable to create Beta distribution");
} | [
"public CauchyDistribution (double alpha, double beta) {\n setParams (alpha, beta);\n }",
"public BernoulliBayesianEstimator()\n {\n // This is the uniform distribution.\n this( new BetaDistribution.PDF( 1.0, 1.0 ) );\n }",
"public void setBeta(double value) {\r\n this.beta = value;\r\n }",
"private static double beta(double a, double b) {\n return ((Gamma.gamma(a) * Gamma.gamma(b)) / Gamma.gamma(a + b));\n }",
"public void setBeta(double aBeta);",
"public double getBeta() {\r\n return beta;\r\n }",
"public BernoulliBayesianEstimator(\n BetaDistribution prior )\n {\n this( new BernoulliDistribution(), prior );\n }",
"public BetaDistribution(Lambda[] lambda, int maxIterations) {\n this(lambda, true, true, 1e-5, maxIterations);\n }",
"public float getBeta() {\n\t\treturn beta;\n\t}",
"public void setBeta(double beta) {\r\n\t\tthis.beta = beta;\r\n\t}",
"public void setBeta(float beta) {\n\t\tthis.beta = beta;\n\t}",
"public double getBeta()\n\t{\n\t\treturn Math.toRadians(beta);\n\t}",
"public BernoulliDistribution(){\n\t\tthis(0.5);\n\t}",
"private double probability(double min, double max, double alpha, double beta) {\r\n\t\treturn ((double)(beta - alpha + 1) / (double)(max - min + 1));\r\n\t}",
"private void InitBeta(double norm, vector<double> *beta_T_1);",
"protected void calcBeta(Sequence seq)\n {\n int T = seq.length();\n int nStates = getNumStates();\n int iLast = nStates - 1;\n beta = Library.allocMatrixDouble(T, nStates, Library.LOG_ZERO);\n calcB(seq);\n\n // end probability according to prior\n for(int i = 0; i < nStates; i++)\n beta[T-1][i] = piEnd[i] + bmat[i][T - 1];\n\n for(int t = T - 2; t >= 0; t--){\n // calc i -> j\n for(int i = 0; i < nStates; i++){\n assert (beta[t][i] == Library.LOG_ZERO);\n for(int j = 0; j < nStates; j++){\n double a = tran[i][j] + bmat[j][t + 1] + beta[t + 1][j];\n if (a == Library.LOG_ZERO) continue;\n beta[t][i] = Library.logadd(beta[t][i], a);\n }\n }\n }\n }",
"static public double computeGammaFromBeta(double beta) { \n return 1.0/Math.sqrt(1.0 - beta*beta); \n }",
"public int getBeta1(int g, int t, int m, int n);",
"public boolean isBeta() {return isBeta.booleanValue();}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getSubjectLocator gets the value of subjectLocator | public String getSubjectLocator() {
return subjectLocator;
} | [
"public void setSubjectLocator(String subjectLocator) {\n\t\tthis.subjectLocator = subjectLocator;\n\t}",
"Collection<LocatorIF> getSubjectIdentifiers();",
"public ITopic bySubjectLocator(final ILocator l) {\r\n\t\treturn byIdentity(subjectLocators, l);\r\n\t}",
"public SubjectInfo getSubject() {\n return this.subject;\n }",
"java.lang.String getSubject();",
"public Set<ILocator> getSubjectLocators() {\r\n\t\treturn getIdentities(Key.SUBJEC_LOCATOR);\r\n\t}",
"public String getSubject() {\n return subject;\n }",
"ITriplePatternElement<ConstantTermType,NamedVarType,AnonVarType> getSubject();",
"Identifier getSubjectIdentifier();",
"public String getSubject()\r\n {\r\n return (m_subject);\r\n }",
"public SubjectInfo getSubjectInfo() {\r\n\t\treturn subjectInfo;\r\n\t}",
"public String getSubject() {\r\n\r\n\t\treturn getStringProperty(\"Subject\");\r\n\t}",
"public SubjectHierarchy getSubjectHierarchy();",
"public String getSubjectc() {\n return subjectc;\n }",
"@ApiModelProperty(example = \"null\", value = \"Subject of association (what it is about), e.g. ClinVar:nnn, MGI:1201606\")\n public BioObject getSubject() {\n return subject;\n }",
"@Override\n public long getSubject() {\n return _teacher.getSubject();\n }",
"public Object getLocator()\n {\n return m_locator;\n }",
"public void cacheSubjectLocator(final ILocator l, ITopic t) {\r\n\t\tif (subjectLocators == null) {\r\n\t\t\tsubjectLocators = HashUtil.getHashMap();\r\n\t\t}\r\n\t\tsubjectLocators.put(l, t);\r\n\t}",
"@Test\n\tpublic void testGetSubject_1()\n\t\tthrows Exception {\n\n\t\tSubject result = ThreadContext.getSubject();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Start a new game and tell all observers to draw an new game with the string message startNewGame() | public void startNewGame() {
initializeBoard();
// The state of this model just changed so tell any observer to update themselves
setChanged();
notifyObservers("startNewGame()");
} | [
"private void startNewGame() {\n // TODO - handle starting a new game by shuffling the tiles and showing a start message,\n // and updating the game state\n }",
"private void startNewGame() {\n\t\ttry {\n\t\t\tthis.map.reload();\n\t\t\tthis.playerWon = false;\n\t\t\tactivePlayer = this.players.get(0);\n\t\t\tclientStartTurn();\n\t\t\tSystem.out.println(\"Starting new game.\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IndexOutOfBoundsException e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void newGame() \n\t{\n\t\tgameRunning = true;\n\t\tMain.main(null);\n\t}",
"void notifyNewGame();",
"public void beginGame() {\r\n data.gameState = 3;\r\n data.gameStartFlag = true;\r\n setChanged();\r\n notifyObservers(data);\r\n data.gameStartFlag = false; //Set the gameStart flag to false so the relevant update lines aren't ever run a second time\r\n }",
"public void startGame() {\n\t\tSystem.out.println(\"Entered Game.startGame\");\n\t\tboolean isFirstPlayer = helloObserver.isOnlyPlayer();\n\t\tif (isFirstPlayer) {\n\t\t\tSystem.out.println(\"I'm the only player.\");\n\t\t\tcreateDefaultGameState();\n\t\t\tstartGameLoop();\n\t\t} else {\n\t\t\thelloObserver.onGameStart(player);\n\t\t}\n\t\tConnector.getInstance().subscribeHello();\n\t}",
"public void startGame() {\r\n gameState.startGame();\r\n }",
"private void newGame()\r\n {\r\n //close the current screen\r\n screen.dispose();\r\n //start back at the set up menu\r\n SetupView screen = new SetupView();\r\n SetupController controller = new SetupController(screen);\r\n screen.registerObserver(controller);\r\n }",
"private void startNewGame() {\n try {\n gui.updateScreen();\n } catch(IOException e){}\n\n TextInputDialogResultValidator validator = new TextInputDialogResultValidator() {\n @Override\n public String validate(String content) {\n Boolean valid = controller.getAllPlayers().contains(content);\n if(valid){\n return \"Player name already exists, please chose another name.\";\n }\n return null;\n }\n };\n String player = new TextInputDialogBuilder()\n .setTitle(\"New Player Name\")\n .setDescription(\"Enter your player's name\")\n .setValidator(validator)\n .build()\n .showDialog(gui);\n if(player == null){\n handleMainMenu();\n }\n controller.createNewPlayer(player);\n renderArea();\n }",
"private void startNewGame() {\n this.setStartingValues();\n this.clearGrid();\n }",
"public void startGame(){\n\n\t\tGame.updatePlayer(players.get(curr));\n\t\tGameBoard gb = new GameBoard();\n\t\tthis.registerObserver(gb);\n\t\tgb.update(this, board);\n\n\t}",
"public static void newGame()\n {\n new CFGame().play();\n }",
"public void startGame()\n\t{\n\t\t\n\t}",
"void startNewGame() {\n // Set the content to be a new GamePane, so the \n window.setContent(new GamePane());\n }",
"@Override\n public void addNotify() {\n super.addNotify();\n startGame();\n }",
"private void startNewGame() {\n GameMenuView gameMenu = new GameMenuView();\r\n gameMenu.display();\r\n }",
"private void startGame() {\r\n\t\tlog(mName + \": print an opening message (something useful, it is up to you)\");\r\n\t\tnew Thread(new Host(mRightPercent)).start();\r\n\r\n\t\tfor (Contestant c : Contestant.mGame.getContestants()) {\r\n\t\t\tlog(mName + \": Welcome \" + c.getName() + \" to the game.\");\r\n\t\t\tsynchronized (c.mConvey) {\r\n\t\t\t\tc.mConvey.notify();\r\n\t\t\t}\r\n\r\n\t\t\tsynchronized (intro) {\r\n\t\t\t\twaitForSignal(intro, null);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tsynchronized (Contestant.mGame) {\r\n\t\t\tContestant.mGame.setGameStarted(true);\r\n\t\t\tContestant.mGame.notify();\r\n\t\t}\r\n\t}",
"public void newGame() {\r\n \tcurrentBoard = new Board(rows, cols, mines);\r\n \tcurrentCBoard = currentBoard.getCBoard();\r\n \tcBoardList.clear();\r\n\r\n playing = true;\r\n status.setText(\"Running...\");\r\n\r\n // Make sure that this component has the keyboard focus\r\n requestFocusInWindow();\r\n repaint();\r\n }",
"private void commNewGame() {\n\t\t\n\t\tcommPosition(\"startpos\");\n\t\tcurrentGame.reset();\n\t\tnewCommand.reset();\n\t\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field479' field. doc for field479 | public java.lang.CharSequence getField479() {
return field479;
} | [
"public java.lang.CharSequence getField479() {\n return field479;\n }",
"public java.lang.CharSequence getField483() {\n return field483;\n }",
"public java.lang.CharSequence getField483() {\n return field483;\n }",
"java.lang.String getField1164();",
"public java.lang.CharSequence getField481() {\n return field481;\n }",
"public void setField479(java.lang.CharSequence value) {\n this.field479 = value;\n }",
"public java.lang.CharSequence getField481() {\n return field481;\n }",
"public java.lang.CharSequence getField463() {\n return field463;\n }",
"java.lang.String getField1348();",
"public java.lang.CharSequence getField477() {\n return field477;\n }",
"java.lang.String getField1748();",
"java.lang.String getField1040();",
"java.lang.String getField1349();",
"java.lang.String getField1063();",
"java.lang.String getField1371();",
"java.lang.String getField1039();",
"public java.lang.CharSequence getField463() {\n return field463;\n }",
"java.lang.String getField1393();",
"java.lang.String getField1548();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Format a property collection (apply the escaping) | private static String formatProperties(Set<Property> objectProperties) {
if (objectProperties != null && !objectProperties.isEmpty()) {
StringBuilder sb = new StringBuilder();
for (Property property : objectProperties) {
sb.append(':').append(escape(property.getName(), "=;:")).append("=").append(escape(property.getValue(), "=;:"));
}
return sb.substring(1);
}
else {
return "";
}
} | [
"void addFormatter(String property, Formatter formatter);",
"private String dumpProperties(ArrayList<Property> properties){\n String result = \"\";\n for (Property prop: properties)\n result +=dumpProperty(prop) + \"\\n\";\n return result;\n }",
"private String serialisePropertyMap(Map<String, String> pPropertyMap){\n StringBuilder lResult = new StringBuilder();\n lResult.append(\"{\");\n \n for(Map.Entry<String, String> lEntry : pPropertyMap.entrySet()){ \n lResult.append(lEntry.getKey());\n lResult.append(\"=\");\n lResult.append(\"\\\"\" + lEntry.getValue() + \"\\\"\");\n lResult.append(\", \");\n }\n \n lResult.replace(lResult.length() - 2, lResult.length(), \"}\");\n return lResult.toString();\n \n }",
"@Test\n\tpublic void testToStringMultipleBeans() {\n\t\tRapidBean bean1 = this.createTestBean(\"Bl�mel\", \"Martin\", \"19641014\");\n\t\tRapidBean bean2 = this.createTestBean(\"Bl�mel\", \"Ulrike\", \"19620802\");\n\t\tRapidBean bean3 = this.createTestBean(\"Keinki\", \"Katharina\", \"19901119\");\n\t\tPropertyCollection prop = this\n\t\t\t\t.createCollectionProperty(\"<property name=\\\"test\\\"\" + \" targettype=\\\"TestBean\\\"\" + \"/>\", \",\", \"\\\\\");\n\t\tCollection<RapidBean> col = new ArrayList<RapidBean>();\n\t\tcol.add(bean1);\n\t\tcol.add(bean2);\n\t\tcol.add(bean3);\n\t\tprop.setValue(col);\n\t\tAssert.assertEquals(\"Bl�mel_Martin_19641014,Bl�mel_Ulrike_19620802,Keinki_Katharina_19901119\", prop.toString());\n\t}",
"public static String encodeCompactedProperties(Properties props) {\n List<String> parts = new ArrayList<>();\n for (Map.Entry<Object, Object> entry : props.entrySet()) {\n parts.add(EQUALS.join(entry.getKey(), entry.getValue()));\n }\n return SEMICOLON.join(parts);\n }",
"public interface PropertyFormatter {\r\n public Object format(String propertyName, Object value);\r\n }",
"public static String serializeObjectCollectionToString(Collection<? extends Object> collection){\n StringBuilder stringBuilder = new StringBuilder();\n Iterator iterator = collection.iterator();\n stringBuilder.append(String.format(\"%n\"));\n while(iterator.hasNext()){\n stringBuilder.append(iterator.next().toString());\n stringBuilder.append(String.format(\"%n\"));\n }\n return stringBuilder.toString();\n }",
"void setEscapeHtmlInPropertyValue(boolean escapeHtmlInPropertyValue);",
"@Test\n\tpublic void testShortConversionWithCommas() {\n\t\t\n\t\tProperties storedProps = new Properties();\n\t\tstoredProps.setProperty(\"key1\", \"value1\");\n\t\tstoredProps.setProperty(\"key2\", \"value2\");\n\t\t\n\t\tString value = PropertiesConverter.propertiesToString(storedProps);\n\t\t\n\t\tassertTrue(\"Wrong value: \"+value, value.contains(\"key1=value1\"));\n\t\tassertTrue(\"Wrong value: \"+value, value.contains(\"key2=value2\"));\n\t\tassertEquals(1, StringUtils.countOccurrencesOf(value, \",\"));\n\t}",
"private SpringToStringStyle(String options) {\n\t\tsuper();\n\t\tsetContentStart(\"{\");\n\t\tsetContentEnd(\"}\");\n\t\tsetArrayStart(\"[\");\n\t\tsetArrayEnd(\"]\");\n\t\tsetArraySeparator(\",\");\n\t\tsetFieldSeparator(\", \");\n\t\tsetArrayContentDetail(true);\n\t\tsetUseShortClassName(!options.contains(\"L\"));\n\t\tsetUseIdentityHashCode(options.contains(\"@\"));\n\t}",
"public String getPropertiesForOutput()\n { //declare variable and assign its value\n String allPropertiesAppended = \"\";\n \n /*for loop to go through propertyList data \n and retrieving each element of propertyList \n assigning them to property variable*/\n for(Property property : propertyList)\n { /*store all properties into allPropertiesAppended variable\n (by concatenating it).*/\n allPropertiesAppended += property +\"\\n\";\n }//end of for\n //return allPropertiesAppended\n return allPropertiesAppended;\n }",
"private String getServiceProperties(Properties properties) {\n String s = \"<ul>\";\n Enumeration<Object> e = properties.keys();\n while (e.hasMoreElements()) {\n String key = (String) e.nextElement();\n String value = properties.get(key).toString();\n s += \"<li>\" + key + \" = \" + value + \"</li>\";\n }\n s += \"</ul>\";\n return s;\n }",
"private void renderFilterProperties(Collection<StringPropertyFilter> properties,\r\n StringBuilder query, List<Object> args) {\r\n if (properties == null || properties.size() == 0) {\r\n return;\r\n }\r\n List<StringPropertyFilter> genericExcludedFilter = new ArrayList<StringPropertyFilter>();\r\n int counter = 0;\r\n propertiesLoop: for (StringPropertyFilter property : properties) {\r\n counter++;\r\n if (property.getPropertyValue() == null && !property.isInclude()) {\r\n genericExcludedFilter.add(property);\r\n continue propertiesLoop;\r\n }\r\n args.add(property.getKeyGroup());\r\n args.add(property.getPropertyKey());\r\n String note = \" note\" + counter;\r\n String noteProperty = \" noteProperty\" + counter;\r\n query.append(\" AND note.\" + NoteConstants.ID + \" IN ( SELECT \" + note + \".\"\r\n + NoteConstants.ID + \" FROM \" + NoteConstants.CLASS_NAME + note);\r\n query.append(\" left join \" + note + \".\" + NoteConstants.PROPERTIES + noteProperty);\r\n query.append(\" WHERE \" + note + \".\" + NoteConstants.ID + \" = note.\" + NoteConstants.ID\r\n + \" AND \" + noteProperty + \".\" + PropertyConstants.KEYGROUP + \" = ? AND\");\r\n query.append(noteProperty + \".\" + PropertyConstants.PROPERTYKEY + \" = ? \");\r\n if (property.getPropertyValue() != null) {\r\n query.append(\" AND \" + noteProperty + \".\" + StringPropertyConstants.PROPERTYVALUE);\r\n if (!property.isInclude()) {\r\n query.append(\" !\");\r\n }\r\n query.append(\" = ?\");\r\n args.add(property.getPropertyValue());\r\n }\r\n query.append(\")\");\r\n }\r\n counter++;\r\n for (int e = 0; e < genericExcludedFilter.size(); e++) {\r\n String note = \" note\" + (e + counter);\r\n String noteProperty = \" noteProperty\" + (e + counter);\r\n query.append(\" AND note.\" + NoteConstants.ID + \" NOT IN ( SELECT \" + note + \".\"\r\n + NoteConstants.ID + \" FROM \" + NoteConstants.CLASS_NAME + note);\r\n query.append(\" left join \" + note + \".\" + NoteConstants.PROPERTIES + noteProperty);\r\n query.append(\" WHERE \" + note + \".\" + NoteConstants.ID + \" = note.\" + NoteConstants.ID\r\n + \" AND \" + noteProperty + \".\" + PropertyConstants.KEYGROUP + \" = ? AND\");\r\n query.append(noteProperty + \".\" + PropertyConstants.PROPERTYKEY + \" = ? )\");\r\n StringPropertyFilter property = genericExcludedFilter.get(e);\r\n args.add(property.getKeyGroup());\r\n args.add(property.getPropertyKey());\r\n }\r\n }",
"@Override\n public String toString()\n {\n StringBuffer retval = new StringBuffer(40);\n\n retval.append(_name);\n\n if (_propertyFlag == true)\n {\n retval.append(\" = \");\n retval.append(_arguments.get(0));\n }\n else\n {\n Iterator<String> ait;\n String sep;\n\n retval.append('(');\n\n for (ait = _arguments.iterator(), sep = \"\";\n ait.hasNext() == true;\n sep = \", \")\n {\n retval.append(sep);\n retval.append(ait.next());\n }\n\n retval.append(')');\n }\n\n return (retval.toString());\n }",
"@Override\n public void visitPreformatted(Object value, String formatted) {\n out.append(formatted);\n }",
"void printPropertyList() {\n for(int i = 0; i < properties.size(); i++) {\n System.out.println((i + 1) + \") \" + properties.get(i).toString());\n }\n }",
"protected String generatePropertyStyle(P property, T item) {\n\t\tPropertyColumn<T, P> column = getPropertyColumn(property);\n\t\tif (column != null && (column.getStyle() != null || column.getAlignment() != null)) {\n\t\t\tfinal StringBuilder sb = new StringBuilder();\n\t\t\tif (column.getAlignment() != null) {\n\t\t\t\tif (ColumnAlignment.CENTER.equals(column.getAlignment())) {\n\t\t\t\t\tsb.append(\"v-align-center\");\n\t\t\t\t} else if (ColumnAlignment.RIGHT.equals(column.getAlignment())) {\n\t\t\t\t\tsb.append(\"v-align-right\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (column.getStyle() != null) {\n\t\t\t\tif (sb.length() > 0) {\n\t\t\t\t\tsb.append(\" \");\n\t\t\t\t}\n\t\t\t\tcolumn.getStyle().ifPresent(s -> {\n\t\t\t\t\tString cellStyle = s.getCellStyle(property, item);\n\t\t\t\t\tif (cellStyle != null) {\n\t\t\t\t\t\tsb.append(cellStyle);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn (sb.length() > 0) ? sb.toString() : null;\n\t\t}\n\t\treturn null;\n\t}",
"@Test\n public void testConvertToHierarchicalDelimiters()\n {\n Configuration conf = new BaseConfiguration();\n conf.addProperty(\"test.key\", \"1\\\\,2\\\\,3\");\n assertEquals(\"Wrong property value\", \"1,2,3\", conf\n .getString(\"test.key\"));\n HierarchicalConfiguration hc = ConfigurationUtils\n .convertToHierarchical(conf);\n assertEquals(\"Escaped list delimiters not correctly handled\", \"1,2,3\",\n hc.getString(\"test.key\"));\n }",
"String serialize(final Property<?> property, final Object value) throws PropertyWriteException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the title, publisher, developer, director, producer and composer of the game | @Override
public String toString() {
return "Title of Game: " + super.getTitleOfGame()
+ "\nPublisher: " + super.getPublisher()
+ "\nDeveloper: " + super.getDeveloper()
+ "\nDirector: " + super.getDirector()
+ "\nProducer: " + super.getProducer()
+ "\nComposer: " + super.getComposer();
} | [
"public String getGameDescription(){\n return this.gameDescription;\n }",
"GameInformation getGameInformation();",
"public String playerInfo() {\n return \"Name: \" + playerName + \", Score: \" + score;\n }",
"public static String getGame() {\r\n\t\treturn gameName;\r\n\t}",
"public String genre14(){\n String genre14MovieTitle = \" \";\n for(int i = 0; i < results.length; i++){\n if(results[i].genre()) {\n genre14MovieTitle += results[i].getTitle() + \"\\n\";\n }\n }\n System.out.println(genre14MovieTitle);\n return genre14MovieTitle;\n }",
"public String currentGamePrint(Game gam){\n\t\tString data = String.format(\"Game ID: %-25s \\t Official: %s \", gam.getGameID(), gam.getOfficial().getName());\n\t\treturn data;\n\t}",
"static String showPlayerGemsAndPokeballs()\n {\n return \"\\nYou have \" + Player.current.gems + \" gems and \" + Player.current.pokeballs + \" pokeball(s).\\n\";\n }",
"private String[] nextGame() {\r\n\t\tLocalDate nextGameDate = schedule.getNextGame();\r\n\t\tif(nextGameDate == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn schedule.getGameInfo(nextGameDate);\r\n\t}",
"public String getCompetitionTitle() {\n return competitionTitle;\n }",
"public void playerDetailedInfo(Player p){\n System.out.println(\"Indicator: \" + indicator + \"\\nJoker: \"+joker);\n System.out.println(\"Winner: Player\" + p.getPlayerNo());\n System.out.println(\"Tile size: \" + p.getTiles().size());\n System.out.println(\"Joker count: \" + p.getJokerCount());\n System.out.println(\"Double score: \" + p.getDoubleCount()*2);\n System.out.println(\"All tiles in ascending order:\\t\" + p.getTiles());\n System.out.println(\"Clustered according to number: \\t\" + p.getNoClus());\n System.out.println(\"Total number clustering score: \" + p.totalNoClustering());\n System.out.println(\"Clustered according to color: \\t\" + p.getColClus());\n System.out.println(\"Total color clustering score: \" + p.totalColCluster());\n System.out.println(\"Final score of Player\"+p.getPlayerNo()+\": \" + p.getPlayerScore());\n }",
"GameDescription createGameDescription();",
"public String getStatsOfGames(){\n\n String res = \"\";\n\n if (games.size() <= 0){\n return \"No game registered in tournament\";\n }\n\n for(int num=0; num<games.size(); num++)\n {\n SoccerGames game = games.get(num);\n res += \"Game Id: \" + game.getGameId() + \" \"+ game.getHostTeam().getName() + \": \" + game.goalsScored +\n \" VS \" + game.getOpponentTeam().getName() + \": \" + game.concededGoal;\n\n }\n return res;\n }",
"public String GetGamesList()\n\t{\n\t\tString gameslist = \"\";\n\t\tfor (int i = 0; i < gametype.length; i++)\n\t\t{\n\t\t\tgameslist += \"Game Number \" + i + \"\\t\" + gametype[i].GetName() + \"\\n\";\n\t\t\tif (gametype[i].Game_Status())\n\t\t\t{\n\t\t\t\tgameslist += \"There is currently a game in progress\\n\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgameslist += \"No game is being played at the moment\\n\";\n\t\t\t}\n\n\t\t\tif (gametype[i].SizeofQueue() >= 2)\n\t\t\t{\n\t\t\t\tgameslist += \"Number of players in queue:\\t\" + gametype[i].SizeofQueue() + \"\\n\\n\";\n\t\t\t}\n\t\t\telse if (gametype[i].SizeofQueue() == 1)\n\t\t\t{\n\t\t\t\tgameslist += \"There is currently one player waiting to play a game\\n\\n\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgameslist += \"There is currently nobody waiting to play a game\\n\\n\";\n\t\t\t}\n\t\t}\n\t\treturn gameslist;\n\t}",
"public GameSummary getGameSummary() {\n \t\treturn data.getGameSummary();\n \t}",
"protected String printResults(PlayerImpl player){\n return \" Player \" + player.getName().toUpperCase() + \" :\" +\n \"\\n Developments purchased: \" + player.getPlayerDeck().getDevelopments().size() +\n \"\\n Total prestige: \" + player.getPlayerDeck().getPrestige();\n }",
"java.lang.String getGameName();",
"public Game() {\r\n this.title = \"Baldur's Gate\";\r\n this.price = 19.99;\r\n this.platform = \"PC\";\r\n this.genre = \"Role playing game\";\r\n this.quality = 4.5;\r\n this.gameImage = \"\";\r\n }",
"public void aboutGame() {\n System.out.println(\"Intent:\\n\"\n + \"This game was made by a team of experienced coders at UWW \\n\"\n + \"with the intent to learn git in a quick and efficient manner. \\n\");\n System.out.println(\"Game:\\n\"\n + \"Zombie War is a game designed to simulate a battle for survival. \\n\"\n + \"A randomly generated number of survivors are fighting for their \\n\"\n + \"lives against a random number of zombies of various kinds.\\n\");\n }",
"@Override\r\r\n public String toString (){\r\r\n String temp = String.format (\"%s %s %s\", year, league, tittle);\r\r\n return temp;\r\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Se prueba que el valor arrojado por el metodo de la clase employee cuando el tipo de empleado sea Worker, sea el correcto | @Test
public void CalculateYearBonusWorkerTest() {
Employee employeetest=new Employee((float) 100.0, "", (float) 10.0, EmployeeType.Worker);
assertEquals((float) 386.0, employeetest.CalculateYearBonus());
} | [
"public void addEmployee(Worker aWorker, Director theDirector) {\r\n\t\t\r\n\t\t// en chef och hans arbetare till listan\r\n\t\t\r\n\t\ttheCompanyList.add(aWorker);\r\n\t\r\n\t\t// kopllar ihop worker och chef\r\n\t\t// skickar in wotker till metoden\r\n\t\t// lägger in i theDirector lista, alla hans/hennes workers\r\n\t\ttheDirector.addEmployee(aWorker);\t\r\n\t}",
"public java.lang.Boolean getIsEmployee()\n {\n return isEmployee;\n }",
"@Test\n\tpublic void CalculateYearBonusSupervisorTest() {\n\t\tEmployee employeetest=new Employee((float) 100.0, \"\", (float) 10.0, EmployeeType.Supervisor);\n\t\tassertEquals((float) 288.0, employeetest.CalculateYearBonus());\n\t}",
"public String getEmployeeType()\n {\n return get(EMPLOYEETYPE);\n }",
"java.lang.String getEmployeeName();",
"public void addEmployee(int type, String fn, String ln, char m, char g, int en, boolean ft, double amount)\n {\n\n //Doesn't add an employee if the max number of employees has been reached\n if (currentEmployees == 10)\n {\n System.out.println();\n System.out.println(\"Cannot add more Employees.\");\n return;\n }\n\n //Doesn't add an employee if any of the required data fields is not passed\n boolean inputError = false;\n\n if ( type <= 0 || type > 3 ) inputError = true;\n if ( fn.length() == 0 ) inputError = true;\n if ( ln.length() == 0 ) inputError = true;\n if ( Character.toString(m).length() == 0 ) inputError = true;\n if ( Character.toString(g).length() == 0 ) inputError = true;\n if ( en <= 0 ) inputError = true;\n if ( amount <= 0 ) inputError = true;\n\n if ( inputError == true )\n {\n System.out.println(\"Invalid Employee Type, None Added.\");\n return;\n }\n\n //Doesn't add an employee if the given employee number is equal to an existing employee number\n Employee equalEmpnum;\n int findEmpnum;\n for ( int y = 0; y < currentEmployees; y++)\n {\n equalEmpnum = employees[y];\n findEmpnum = equalEmpnum.getEmployeeNumber();\n\n if (findEmpnum == en)\n {\n System.out.println();\n System.out.println(\"Duplicate Not Added.\");\n return;\n } \n }\n\n //creates hourly employee\n if (type == 1)\n {\n HourlyEmployee hourlyEmployee = new HourlyEmployee(fn, ln, m, g, en, ft, amount);\n employees[currentEmployees++] = hourlyEmployee;\n }\n\n //creates salary employee\n if (type == 2)\n {\n SalaryEmployee salaryEmployee = new SalaryEmployee(fn, ln, m, g, en, ft, amount);\n employees[currentEmployees++] = salaryEmployee;\n }\n\n //creates commission employee\n if (type == 3)\n {\n CommissionEmployee commissionEmployee = new CommissionEmployee(fn, ln, m, g, en, ft, amount);\n employees[currentEmployees++] = commissionEmployee;\n }\n }",
"public void setEmployeeNum(String employeeNum) {\n this.employeeNum = employeeNum;\n }",
"public int getEmp_type() {\r\n return getAsNumber(\"emp_type\").intValue();\r\n }",
"public void setEmployee(Employee employee) {\n this.employee = employee;\n }",
"private int retrieveEmployeeSupervisorID(String idPersonEmployee) {\r\n int idSupervisor = 0;\r\n if (idPersonEmployee != null && idPersonEmployee.trim().length() > 0) {\r\n idSupervisor = retrieveEmployeeSupervisorID(Integer.valueOf(idPersonEmployee));\r\n }\r\n return idSupervisor;\r\n }",
"private void determineManagerType()\n\t{\n\t\t//Determine if the shift starts with a number (specific shift time)\n\t\tif(BJsWholesaleScheduler.startsWithNumber(startTime))\n\t\t{\n\t\t\t//Separate the start and end times for managers with specific times\n\t\t\tString newEndTime = startTime.split(\"-\")[1];\n\n\t\t\t//Determine which block the manager falls in\n\t\t\t//Closing (endTime is greater than 9:00p)\n\t\t\tif(BJsWholesaleScheduler.getMilitaryTime(newEndTime) > 2100)\n\t\t\t\temployeeType = EmployeeType.CLOSING_MANAGER;\n\t\t\t//Mid-shift (endTime is greater than 5:00p)\n\t\t\telse if(BJsWholesaleScheduler.getMilitaryTime(newEndTime) > 1700)\n\t\t\t\temployeeType = EmployeeType.MID_SHIFT_MANAGER;\n\t\t\t//Opening (endTime is greater than 12:00p)\n\t\t\telse if(BJsWholesaleScheduler.getMilitaryTime(newEndTime) > 1200)\n\t\t\t\temployeeType = EmployeeType.OPENING_MANAGER;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Set the type of employee based on if the employee is a manager or not\n\t\t\tif(startTime.contains(\"Open\") || startTime.contains(\"Early\"))\n\t\t\t\temployeeType = EmployeeType.OPENING_MANAGER;\n\t\t\telse if(startTime.contains(\"Mid\"))\n\t\t\t\temployeeType = EmployeeType.MID_SHIFT_MANAGER;\n\t\t\telse if(startTime.contains(\"Close\"))\n\t\t\t\temployeeType = EmployeeType.CLOSING_MANAGER;\n\t\t}\n\t}",
"private String CalloutEmployeeID(Properties ctx, int windowNo, GridTab mTab,\n\t\t\tGridField mField, Object value){\n\t\t\n\t\tif(value == null)\n\t\t\treturn \"\";\n\t\t\n\t\tint HC_Employee_ID = (Integer)value;\n\t\t\n\t\tMEmployee employee = new MEmployee(ctx, HC_Employee_ID, null);\n\t\t\n\t\tif(employee.getHC_Status() == \"P\"){\n\t\t\treturn \"Error: Employee must be activated first\";\n\t\t}\n\t\t\n\t\tint HC_EmployeeJob_ID = employee.getJobDataChangeEmployeeJob();\n\t\t\n\t\tif(HC_EmployeeJob_ID <= 0){\n\t\t\tmTab.setValue(\"HC_Employee_ID\", null);\n\t\t\tmTab.setValue(\"HC_JobAction\" , null);\n\t\t\tmTab.setValue(\"HC_Status\"\t , null);\n\t\t\treturn \"Error: Employee must be permanent class\";\n\t\t}\n\t\tMEmployeeJob job = new MEmployeeJob(ctx, HC_EmployeeJob_ID, null);\n\t\tmTab.setValue(\"HC_EmployeeJob_ID\"\t, job.getHC_EmployeeJob_ID());\n\t\tmTab.setValue(\"HC_PreviousJob_ID\"\t, job.getHC_Job_ID());\t\t\n\t\tmTab.setValue(\"HC_Status\"\t\t\t, job.getHC_Status());\n\t\tmTab.setValue(\"HC_Org_ID\"\t\t\t, job.getHC_Org_ID());\n\t\tmTab.setValue(\"HC_Manager_ID\"\t\t, job.getHC_Manager_ID());\n\t\tmTab.setValue(\"Description\"\t\t\t, job.getDescription());\n\t\tmTab.setValue(\"NomorSK\"\t\t\t\t, job.get_Value(\"NomorSK\"));\n\t\tmTab.setValue(\"HC_Reason_ID\"\t\t, job.getHC_Reason_ID());\n\t\tmTab.setValue(\"HC_PayGroup_ID\"\t\t, job.getHC_PayGroup_ID());\n\t\tmTab.setValue(\"HC_Compensation1\"\t, job.get_Value(\"HC_Compensation1\"));\n\t\tmTab.setValue(\"HC_Compensation2\"\t, job.get_Value(\"HC_Compensation1\"));\n\t\tmTab.setValue(\"HC_WorkStartDate\"\t, job.getHC_WorkStartDate());\n\t\t\n\t\tmTab.setValue(\"HC_Job_ID\", null);\n\t\tmTab.setValue(\"HC_Org2_ID\",null);\n\t\tmTab.setValue(\"HC_ManagerTo_ID\", null);\n\t\tmTab.setValue(\"HC_JobAction\",null);\n\t\t\n\t\tif(mTab.getValue(\"HC_JobAction\") != null ) {\n\t\t\tif(mTab.getValue(\"HC_JobAction\").equals(\"SLC\")) {\n\t\t\t\tmTab.setValue(\"HC_Job_ID\"\t, mTab.getValue(\"HC_PreviousJob_ID\"));\n\t\t\t\tmTab.setValue(\"HC_Org2_ID\"\t, mTab.getValue(\"HC_Org_ID\"));\n\t\t\t\tif(mTab.getValue(\"HC_Manager_ID\")!= null)\t\n\t\t\t\t\tmTab.setValue(\"HC_ManagerTo_ID\", mTab.getValue(\"HC_Manager_ID\"));\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}",
"public String getEmploymentWork() {\n return employmentWork;\n }",
"public String getEmployeeNum() {\r\n\t\treturn employeeNum;\r\n\t}",
"java.lang.String getEmployer();",
"private boolean employeeIsEligible(Employee emp) \n { \n \n \n }",
"private void modifyEmployee() {\n String hourlyStatusSelection = (String) employeeHourlyField.getSelectedItem();\n String newEmployeeName = employeeNameField.getText();\n boolean hourlyStatus = hourlyStatusSelection.equals(\"Hourly\") ? true : false;\n int newEmployeeWage = (Integer) employeeWageField.getValue();\n Employee employeeToModify = new Employee(newEmployeeName, hourlyStatus, newEmployeeWage);\n boolean nameTaken = selectedEmployee.getName().equals(employeeNameField.getText());\n boolean listContainsEmployee = employeeList.contains(employeeToModify);\n if (!nameTaken && listContainsEmployee) {\n JOptionPane.showMessageDialog(new JPanel(), \"ERROR: Employee with same name already exists\");\n } else {\n selectedEmployee.reset(employeeNameField.getText(), hourlyStatus,\n (Integer) employeeWageField.getValue());\n }\n }",
"public static WorkTimeEmployee valueOf(Employee employee, List<CustomWorkTime> workTimes) {\n WorkTimeEmployee workTimeEmployee = new WorkTimeEmployee();\n workTimeEmployee.name = employee.fullName();\n workTimeEmployee.workTimes = CustomWorkTime.reduceAndSortWorktimes(workTimes);\n return workTimeEmployee;\n }",
"public void setEmployee3(Employee e) {\n employee3 = e;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is the setter method. this will set the seList The service engines associated with the dnsvs. Field introduced in 17.1.1. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. Default value when not specified in API or module is interpreted by Avi Controller as null. | public void setSeList(List<String> seList) {
this.seList = seList;
} | [
"public void setServiceList(java.lang.String[] serviceList) {\r\n this.serviceList = serviceList;\r\n }",
"public Builder setServiceList(io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList value) {\n if (serviceListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n endpointConfig_ = value;\n onChanged();\n } else {\n serviceListBuilder_.setMessage(value);\n }\n endpointConfigCase_ = 3;\n return this;\n }",
"public void setHostList(List<Host> hostLst){\r\n\t\tthis.hostList = hostLst;\r\n\t}",
"public void setSiteList(ArrayList<Site> theSiteList) {\n theSiteList = siteList;\n }",
"public void setServices(ArrayList<Service> services){\n\t\tthis.services = services;\n\t}",
"public void setSites(ArrayList<Site> sites) {\n }",
"void setServiceConfigurationList(org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList serviceConfigurationList);",
"public void setHosts(List<String> hosts) {\n this.hosts = hosts;\n }",
"public void setHosts(List<String> hosts) {\n setProperty(HOSTS, hosts);\n }",
"public void setServerService (String data){\r\n if (data != null && ! data.trim().equals(\"\")){\r\n services.add(data);\r\n }\r\n }",
"public synchronized void setHosts(List<VirtualHost> hosts) {\r\n this.hosts.clear();\r\n \r\n if (hosts != null) {\r\n this.hosts.addAll(hosts);\r\n }\r\n }",
"public void setServices(List<AService> services) {\n this.services = services;\n }",
"public void setSDNLists(com.newco.ofac.webservice.SDN[] SDNLists) {\r\n this.SDNLists = SDNLists;\r\n }",
"public void setDnsServers(String servers[]);",
"public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }",
"@java.lang.Override\n public io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList() {\n if (endpointConfigCase_ == 3) {\n return (io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList) endpointConfig_;\n }\n return io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList.getDefaultInstance();\n }",
"public void setHosts(final List<String> hosts) {\n\t\tthis.hosts = hosts;\n\t}",
"public void setDnsServers(String[] servers);",
"void setDatasourceConfigurations(List<IPSDatasourceConfig> configs);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Provides the standard interface for calling the classifier Mfunction with 1 input argument. Input arguments may be passed as subclasses of com.mathworks.toolbox.javabuilder.MWArray, or as arrays of any supported Java type. Arguments passed as Java types are converted to MATLAB arrays according to default conversion rules. Mdocumentation as provided by the author of the M function: %CLASSIFIER Summary of this function goes here % Detailed explanation goes here | public Object[] classifier(int nargout, Object... rhs) throws MWException
{
Object[] lhs = new Object[nargout];
fMCR.invoke(Arrays.asList(lhs),
MWMCR.getRhsCompat(rhs, sClassifierSignature),
sClassifierSignature);
return lhs;
} | [
"protected abstract void postMatLab(Object[] mlResults);",
"public interface IClassification {\n /**\n * Interface source code revision.\n */\n String MARF_INTERFACE_CODE_REVISION = \"$Revision: 1.4 $\";\n\n\t/* Classification API */\n\n /**\n * Generic classification routine.\n *\n * @return <code>true</code> if classification was successful; <code>false</code> otherwise\n * @throws ClassificationException if there was an error while classifying\n */\n boolean classify()\n throws ClassificationException;\n\n /**\n * Generic training routine for building/updating\n * mean vectors in the training set.\n *\n * @return <code>true</code> if training was successful; <code>false</code> otherwise\n * @throws ClassificationException if there was a problem while training\n */\n boolean train()\n throws ClassificationException;\n\n /**\n * Retrieves the likely classification result.\n * If there were many, this will return the result with the\n * highest statistical score or probability. The decision\n * of whether to retrieve a maximum result (with maximum probability)\n * or minimum result (with minimum distance) from the sample is\n * left to be made by concrete implementations.\n *\n * @return Result object\n */\n Result getResult();\n\n /**\n * Retrieves the enclosed result set.\n *\n * @return the enclosed ResultSet object\n */\n ResultSet getResultSet();\n\n /**\n * Retrieves the features source.\n *\n * @return returns the FeatureExtraction reference\n * @since 0.3.0.4\n */\n IFeatureExtraction getFeatureExtraction();\n\n /**\n * Allows setting the features surce.\n *\n * @param poFeatureExtraction the FeatureExtraction object to set\n * @since 0.3.0.4\n */\n void setFeatureExtraction(IFeatureExtraction poFeatureExtraction);\n}",
"Matrix classify(double multiLabelThreshold) throws MatrixException;",
"Matrix classify() throws MatrixException;",
"public T classify(I input);",
"public abstract double test(ClassifierData<U> testData);",
"public interface TestingMetric\n{\n /**\n * <code>test</code> is the function which LBJ's cross validation method\n * will call in order to test an example.\n *\n * @param classifier The classifier whose accuracy is being measured.\n * @param oracle A classifier that returns the label of each example.\n * @param parser A parser to supply the example objects.\n **/\n double test(Classifier classifier, Classifier oracle, Parser parser); \n}",
"public interface Classifier<I extends Input, T extends Target> extends java.io.Serializable {\r\n\r\n /**\r\n * Train the model with Lists of Input and Target objects.\r\n * @param inputList\r\n * @param targetList\r\n */\r\n public void train(List<I> inputList, List<T> targetList);\r\n \r\n /**\r\n * Classify Input to Target.\r\n * @param input\r\n * @return\r\n */\r\n public T classify(I input);\r\n \r\n /**\r\n * Number of observations used to train the model.\r\n * @return\r\n */\r\n public int numObs();\r\n /**\r\n * Number of features in the model.\r\n * @return\r\n */\r\n public int numFeatures();\r\n \r\n}",
"public abstract void printClassifier();",
"private String readClassifierType(String[] args) {\n \t\treturn args[CLASSIFIER_ID];\n \t}",
"void runClassifier(File fileToClassify) throws IOException;",
"public interface Classifier extends GeneralizableElement, Namespace {\n /**\n * <p>\n * Adds a feature at the end of the ordered collection of the current object.\n * </p>\n *\n * @param feature\n * the feature to be added.\n * @throws IllegalArgumentException\n * if <code>feature</code> is null.\n */\n void addFeature(Feature feature);\n\n /**\n * <p>\n * Adds a feature at specified index of the ordered collection of the current object.\n * </p>\n *\n * @param index\n * index at which the specified element is to be added.\n * @param feature\n * the feature to be added.\n * @throws IllegalArgumentException\n * if <code>feature</code> is null.\n * @throws IndexOutOfBoundsException\n * if <code>index</code> is < 0 or > features.size.\n */\n void addFeature(int index, Feature feature);\n\n /**\n * <p>\n * Sets the feature at specified index of the ordered collection of the current object.\n * </p>\n *\n * @param index\n * index of feature to replace.\n * @param feature\n * the feature to be added.\n * @throws IllegalArgumentException\n * if <code>feature</code> is null.\n * @throws IndexOutOfBoundsException\n * if <code>index</code> is < 0 or >= features.size.\n */\n void setFeature(int index, Feature feature);\n\n /**\n * <p>\n * Removes (and fetches) the feature at specified index from the ordered collection of the current object.\n * </p>\n *\n * @param index\n * the index of the feature to be removed.\n * @throws IndexOutOfBoundsException\n * if <code>index</code> is < 0 or >= features.size.\n * @return the removed object of type <code>Feature</code>.\n */\n Feature removeFeature(int index);\n\n /**\n * <p>\n * Removes a feature from the ordered collection of the current object.\n * </p>\n *\n * @param feature\n * the feature to be removed.\n * @throws IllegalArgumentException\n * if <code>feature</code> is null.\n * @return <code>true</code> if the current object state changed because of the removal.\n */\n boolean removeFeature(Feature feature);\n\n /**\n * <p>\n * Removes all the objects of type \"feature\" from the ordered collection of the current object.\n * </p>\n */\n void clearFeatures();\n\n /**\n * <p>\n * Gets all the objects of type \"feature\" previously added to the ordered collection of the current object.\n * </p>\n * <p>\n * Additions and removals of elements to and from the returned list do not change the state of current object (i.e.\n * the returned list is a copy of the internal one of the current object). However, if an element contained in it is\n * modified, the state of the current object is modified accordingly (i.e. the internal and the returned lists share\n * references to the same objects).\n * </p>\n *\n * @return a <code>java.util.List</code> instance, containing all the objects of type <code>Feature</code> added\n * to the collection of current object.\n */\n List<Feature> getFeatures();\n\n /**\n * <p>\n * Checks if a feature is contained in the ordered collection of the current object.\n * </p>\n *\n * @param feature\n * the feature to be tested.\n * @throws IllegalArgumentException\n * if <code>feature</code> is null.\n * @return <code>true</code> if <code>feature</code> is contained in the collection of the current object.\n */\n boolean containsFeature(Feature feature);\n\n /**\n * <p>\n * Gets the index of the specified feature in the ordered collection of the current object, or -1 if such a\n * collection doesn't contain it.\n * </p>\n *\n * @param feature\n * the desired feature.\n * @throws IllegalArgumentException\n * if <code>feature</code> is null.\n * @return the index of the specified <code>Feature</code> in the ordered collection of the current object, or -1\n * if such a collection doesn't contain it.\n */\n int indexOfFeature(Feature feature);\n\n /**\n * <p>\n * Returns the number of objects of type \"feature\" previously added to the ordered collection of the current object.\n * </p>\n *\n * @return the quantity of objects of type <code>Feature</code> inserted in the ordered collection of the current\n * object.\n */\n int countFeatures();\n\n /**\n * <p>\n * Adds a typed feature to the collection of the current object.\n * </p>\n *\n * @param typedFeature\n * the typed feature to be added.\n * @throws IllegalArgumentException\n * if <code>typedFeature</code> is null.\n */\n void addTypedFeature(StructuralFeature typedFeature);\n\n /**\n * <p>\n * Removes a typed feature from the collection of the current object.\n * </p>\n *\n * @param typedFeature\n * the typed feature to be removed.\n * @throws IllegalArgumentException\n * if <code>typedFeature</code> is null.\n * @return <code>true</code> if the current object state changed because of the removal.\n */\n boolean removeTypedFeature(StructuralFeature typedFeature);\n\n /**\n * <p>\n * Removes all the objects of type \"typed feature\" from the collection of the current object.\n * </p>\n */\n void clearTypedFeatures();\n\n /**\n * <p>\n * Gets all the objects of type \"typed feature\" previously added to the collection of the current object.\n * </p>\n * <p>\n * Additions and removals of elements to and from the returned collection do not change the state of current object\n * (i.e. the returned collection is a copy of the internal one of the current object). However, if an element\n * contained in it is modified, the state of the current object is modified accordingly (i.e. the internal and the\n * returned collections share references to the same objects).\n * </p>\n *\n * @return a <code>java.util.Collection</code> instance, containing all the objects of type\n * <code>StructuralFeature</code> added to the collection of current object.\n */\n Collection<StructuralFeature> getTypedFeatures();\n\n /**\n * <p>\n * Checks if a typed feature is contained in the collection of the current object.\n * </p>\n *\n * @param typedFeature\n * the element to be tested.\n * @throws IllegalArgumentException\n * if <code>typedFeature</code> is null.\n * @return <code>true</code> if <code>typedFeature</code> is contained in the collection of the current object.\n */\n boolean containsTypedFeature(StructuralFeature typedFeature);\n\n /**\n * <p>\n * Returns the number of objects of type \"typed feature\" previously added to the collection of the current object.\n * </p>\n *\n * @return the quantity of objects of type <code>StructuralFeature</code> inserted in the collection of the\n * current object.\n */\n int countTypedFeatures();\n\n /**\n * <p>\n * Adds a typed parameter to the collection of the current object.\n * </p>\n *\n * @param typedParameter\n * the typed parameter to be added.\n * @throws IllegalArgumentException\n * if <code>typedParameter</code> is null.\n */\n void addTypedParameter(Parameter typedParameter);\n\n /**\n * <p>\n * Removes a typed parameter from the collection of the current object.\n * </p>\n *\n * @param typedParameter\n * the typed parameter to be removed.\n * @throws IllegalArgumentException\n * if <code>typedParameter</code> is null.\n * @return <code>true</code> if the current object state changed because of the removal, i.e. its collection\n * contained the specified typed parameter.\n */\n boolean removeTypedParameter(Parameter typedParameter);\n\n /**\n * <p>\n * Removes all the objects of type \"typed parameter\" from the collection of the current object.\n * </p>\n */\n void clearTypedParameters();\n\n /**\n * <p>\n * Gets all the objects of type \"typed parameter\" previously added to the collection of the current object.\n * </p>\n * <p>\n * Additions and removals of elements to and from the returned collection do not change the state of current object\n * (i.e. the returned collection is a copy of the internal one of the current object). However, if an element\n * contained in it is modified, the state of the current object is modified accordingly (i.e. the internal and the\n * returned collections share references to the same objects).\n * </p>\n *\n * @return a <code>java.util.Collection</code> instance, containing all the objects of type <code>Parameter</code>\n * added to the collection of current object.\n */\n Collection<Parameter> getTypedParameters();\n\n /**\n * <p>\n * Checks if a typed parameter is contained in the collection of the current object.\n * </p>\n *\n * @param typedParameter\n * the element to be tested.\n * @throws IllegalArgumentException\n * if <code>typedParameter</code> is null.\n * @return <code>true</code> if <code>typedParameter</code> is contained in the collection of the current\n * object.\n */\n boolean containsTypedParameter(Parameter typedParameter);\n\n /**\n * <p>\n * Returns the number of objects of type \"typed parameter\" previously added to the collection of the current object.\n * </p>\n *\n * @return the quantity of objects of type <code>Parameter</code> inserted in the collection of the current\n * object.\n */\n int countTypedParameters();\n\n /**\n * <p>\n * Adds a association to the collection of the current object.\n * </p>\n *\n * @param association\n * the association to be added.\n * @throws IllegalArgumentException\n * if <code>association</code> is null.\n */\n void addAssociation(AssociationEnd association);\n\n /**\n * <p>\n * Removes a association from the collection of the current object.\n * </p>\n *\n * @param association\n * the association to be removed.\n * @throws IllegalArgumentException\n * if <code>association</code> is null.\n * @return <code>true</code> if the current object state changed because of the removal.\n */\n boolean removeAssociation(AssociationEnd association);\n\n /**\n * <p>\n * Removes all the objects of type \"association\" from the collection of the current object.\n * </p>\n */\n void clearAssociations();\n\n /**\n * <p>\n * Gets all the objects of type \"association\" previously added to the collection of the current object.\n * </p>\n * <p>\n * Additions and removals of elements to and from the returned collection do not change the state of current object\n * (i.e. the returned collection is a copy of the internal one of the current object). However, if an element\n * contained in it is modified, the state of the current object is modified accordingly (i.e. the internal and the\n * returned collections share references to the same objects).\n * </p>\n *\n * @return a <code>java.util.Collection</code> instance, containing all the objects of type\n * <code>AssociationEnd</code> added to the collection of current object.\n */\n Collection<AssociationEnd> getAssociations();\n\n /**\n * <p>\n * Checks if a association is contained in the collection of the current object.\n * </p>\n *\n * @param association\n * the element to be tested.\n * @throws IllegalArgumentException\n * if <code>association</code> is null.\n * @return <code>true</code> if <code>association</code> is contained in the collection of the current object.\n */\n boolean containsAssociation(AssociationEnd association);\n\n /**\n * <p>\n * Returns the number of objects of type \"association\" previously added to the collection of the current object.\n * </p>\n *\n * @return the quantity of objects of type <code>AssociationEnd</code> inserted in the collection of the current\n * object.\n */\n int countAssociations();\n\n /**\n * <p>\n * Adds a specified end to the collection of the current object.\n * </p>\n *\n * @param specifiedEnd\n * the specified end to be added.\n * @throws IllegalArgumentException\n * if <code>specifiedEnd</code> is null.\n */\n void addSpecifiedEnd(AssociationEnd specifiedEnd);\n\n /**\n * <p>\n * Removes a specified end from the collection of the current object.\n * </p>\n *\n * @param specifiedEnd\n * the specified end to be removed.\n * @throws IllegalArgumentException\n * if <code>specifiedEnd</code> is null.\n * @return <code>true</code> if the current object state changed because of the removal.\n */\n boolean removeSpecifiedEnd(AssociationEnd specifiedEnd);\n\n /**\n * <p>\n * Removes all the objects of type \"specified end\" from the collection of the current object.\n * </p>\n */\n void clearSpecifiedEnds();\n\n /**\n * <p>\n * Gets all the objects of type \"specified end\" previously added to the collection of the current object.\n * </p>\n * <p>\n * Additions and removals of elements to and from the returned collection do not change the state of current object\n * (i.e. the returned collection is a copy of the internal one of the current object). However, if an element\n * contained in it is modified, the state of the current object is modified accordingly (i.e. the internal and the\n * returned collections share references to the same objects).\n * </p>\n *\n * @return a <code>java.util.Collection</code> instance, containing all the objects of type\n * <code>AssociationEnd</code> added to the collection of current object.\n */\n Collection<AssociationEnd> getSpecifiedEnds();\n\n /**\n * <p>\n * Checks if a specified end is contained in the collection of the current object.\n * </p>\n *\n * @param specifiedEnd\n * the element to be tested.\n * @throws IllegalArgumentException\n * if <code>specifiedEnd</code> is null.\n * @return <code>true</code> if <code>specifiedEnd</code> is contained in the collection of the current object.\n */\n boolean containsSpecifiedEnd(AssociationEnd specifiedEnd);\n\n /**\n * <p>\n * Returns the number of objects of type \"specified end\" previously added to the collection of the current object.\n * </p>\n *\n * @return the quantity of objects of type <code>AssociationEnd</code> inserted in the collection of the current\n * object.\n */\n int countSpecifiedEnds();\n\n /**\n * <p>\n * Adds a powertype range to the collection of the current object.\n * </p>\n *\n * @param powertypeRange\n * the powertype range to be added.\n * @throws IllegalArgumentException\n * if <code>powertypeRange</code> is null.\n */\n void addPowertypeRange(Generalization powertypeRange);\n\n /**\n * <p>\n * Removes a powertype range from the collection of the current object.\n * </p>\n *\n * @param powertypeRange\n * the powertype range to be removed.\n * @throws IllegalArgumentException\n * if <code>powertypeRange</code> is null.\n * @return <code>true</code> if the current object state changed because of the removal.\n */\n boolean removePowertypeRange(Generalization powertypeRange);\n\n /**\n * <p>\n * Removes all the objects of type \"powertype range\" from the collection of the current object.\n * </p>\n */\n void clearPowertypeRanges();\n\n /**\n * <p>\n * Gets all the objects of type \"powertype range\" previously added to the collection of the current object.\n * </p>\n * <p>\n * Additions and removals of elements to and from the returned collection do not change the state of current object\n * (i.e. the returned collection is a copy of the internal one of the current object). However, if an element\n * contained in it is modified, the state of the current object is modified accordingly (i.e. the internal and the\n * returned collections share references to the same objects).\n * </p>\n *\n * @return a <code>java.util.Collection</code> instance, containing all the objects of type\n * <code>Generalization</code> added to the collection of current object.\n */\n Collection<Generalization> getPowertypeRanges();\n\n /**\n * <p>\n * Checks if a powertype range is contained in the collection of the current object.\n * </p>\n *\n * @param powertypeRange\n * the element to be tested.\n * @throws IllegalArgumentException\n * if <code>powertypeRange</code> is null.\n * @return <code>true</code> if <code>powertypeRange</code> is contained in the collection of the current\n * object.\n */\n boolean containsPowertypeRange(Generalization powertypeRange);\n\n /**\n * <p>\n * Returns the number of objects of type \"powertype range\" previously added to the collection of the current object.\n * </p>\n *\n * @return the quantity of objects of type <code>Generalization</code> inserted in the collection of the current\n * object.\n */\n int countPowertypeRanges();\n\n /**\n * <p>\n * Adds a object flow state to the collection of the current object.\n * </p>\n *\n * @param objectFlowState\n * the object flow state to be added.\n * @throws IllegalArgumentException\n * if <code>objectFlowState</code> is null.\n */\n void addObjectFlowState(ObjectFlowState objectFlowState);\n\n /**\n * <p>\n * Removes a object flow state from the collection of the current object.\n * </p>\n *\n * @param objectFlowState\n * the object flow state to be removed.\n * @throws IllegalArgumentException\n * if <code>objectFlowState</code> is null.\n * @return <code>true</code> if the current object state changed because of the removal.\n */\n boolean removeObjectFlowState(ObjectFlowState objectFlowState);\n\n /**\n * <p>\n * Removes all the objects of type \"object flow state\" from the collection of the current object.\n * </p>\n */\n void clearObjectFlowStates();\n\n /**\n * <p>\n * Gets all the objects of type \"object flow state\" previously added to the collection of the current object.\n * </p>\n * <p>\n * Additions and removals of elements to and from the returned collection do not change the state of current object\n * (i.e. the returned collection is a copy of the internal one of the current object). However, if an element\n * contained in it is modified, the state of the current object is modified accordingly (i.e. the internal and the\n * returned collections share references to the same objects).\n * </p>\n *\n * @return a <code>java.util.Collection</code> instance, containing all the objects of type\n * <code>ObjectFlowState</code> added to the collection of current object.\n */\n Collection<ObjectFlowState> getObjectFlowStates();\n\n /**\n * <p>\n * Checks if a object flow state is contained in the collection of the current object.\n * </p>\n *\n * @param objectFlowState\n * the element to be tested.\n * @throws IllegalArgumentException\n * if <code>objectFlowState</code> is null.\n * @return <code>true</code> if <code>objectFlowState</code> is contained in the collection of the current\n * object.\n */\n boolean containsObjectFlowState(ObjectFlowState objectFlowState);\n\n /**\n * <p>\n * Returns the number of objects of type \"object flow state\" previously added to the collection of the current\n * object.\n * </p>\n *\n * @return the quantity of objects of type <code>ObjectFlowState</code> inserted in the collection of the current\n * object.\n */\n int countObjectFlowStates();\n\n /**\n * <p>\n * Adds a instance to the collection of the current object.\n * </p>\n *\n * @param instance\n * the instance to be added.\n * @throws IllegalArgumentException\n * if <code>instance</code> is null.\n */\n void addInstance(Instance instance);\n\n /**\n * <p>\n * Removes a instance from the collection of the current object.\n * </p>\n *\n * @param instance\n * the instance to be removed.\n * @throws IllegalArgumentException\n * if <code>instance</code> is null.\n * @return <code>true</code> if the current object state changed because of the removal, i.e. its collection\n * contained the specified instance.\n */\n boolean removeInstance(Instance instance);\n\n /**\n * <p>\n * Removes all the objects of type \"instance\" from the collection of the current object.\n * </p>\n */\n void clearInstances();\n\n /**\n * <p>\n * Gets all the objects of type \"instance\" previously added to the collection of the current object.\n * </p>\n * <p>\n * Additions and removals of elements to and from the returned collection do not change the state of current object\n * (i.e. the returned collection is a copy of the internal one of the current object). However, if an element\n * contained in it is modified, the state of the current object is modified accordingly (i.e. the internal and the\n * returned collections share references to the same objects).\n * </p>\n *\n * @return a <code>java.util.Collection</code> instance, containing all the objects of type <code>Instance</code>\n * added to the collection of current object.\n */\n Collection<Instance> getInstances();\n\n /**\n * <p>\n * Checks if a instance is contained in the collection of the current object.\n * </p>\n *\n * @param instance\n * the element to be tested.\n * @throws IllegalArgumentException\n * if <code>instance</code> is null.\n * @return <code>true</code> if <code>instance</code> is contained in the collection of the current object.\n */\n boolean containsInstance(Instance instance);\n\n /**\n * <p>\n * Returns the number of objects of type \"instance\" previously added to the collection of the current object.\n * </p>\n *\n * @return the quantity of objects of type <code>Instance</code> inserted in the collection of the current object.\n */\n int countInstances();\n}",
"@Override\n\tpublic ClassifyResult classify(String[] words) {\n\n\t// \"This method returns the classification result for a single message\"\n\n\t// Instantiate new ClassifyResult to hold results to return\n\tClassifyResult resultsToReturn = new ClassifyResult();\n\t \n\t/**\n\t * Log probabilities:\n\t * The second gotcha that any implementation of a Naive Bayes classifier\n\t * must contend with is underflow. Underflow can occur when we take the \n\t * product of a number of small floating-point values. Fortunately, there\n\t * is a workaround. Recall that a Naive Bayes classifier computes:\n\t * f(w) = argmax[P(Ham) * PI from i = 1 to k of (P(w | HAM)\n\t * f(w) = argmax[P(Spam) * PI from i = 1 to k of (P(w | SPAM)\n\t * where l is HAM or SPAM and w is the ith word of your SMS message, numbered\n\t * 1 to k.\n\t * \n\t * So, for the first part: \n\t * g(w) = argmax[log P(Ham) + ...\n\t * g(w) = argmax[log P(Spam) + ...\n\t */\n\n\t// g(w) = argmax[log P(Ham) + ...\n\tresultsToReturn.log_prob_ham = Math.log(((double) HAMInstanceHits) / \n\t\t\t\t\t\t (double) (trainingDataLength));\n\n\t// g(w) = argmax[log P(Spam) + ...\n\tresultsToReturn.log_prob_spam = Math.log(((double) SPAMInstanceHits) / \n\t\t\t\t\t\t (double) (trainingDataLength));\n\t\n\t/**\n\t * Now, the summation part:\n\t *\n * g(w) = ... + summation from i = 1 to k of (logP(w | ham))]\n\t * g(w) = ... + summation from i = 1 to k of (logP(w | spam))]\n\t */\n\tfor (int i = 0; i < words.length; i++) {\n\t \n\t // g(w) = ... + summation from i = 1 to k of (logP(w | ham))]\n\t resultsToReturn.log_prob_ham += \n\t\tMath.log(p_w_given_l(words[i], Label.HAM));\n\n\t // g(w) = ... + summation from i = 1 to k of (logP(w | spam))]\n\t resultsToReturn.log_prob_spam += \n\t\tMath.log(p_w_given_l(words[i], Label.SPAM));\n\t\n\t}\n\n\t// Lastly, label the ClassifyResult as ham if log_prob_ham is greater (argmax)\n\tif (resultsToReturn.log_prob_ham > resultsToReturn.log_prob_spam)\n\t resultsToReturn.label = Label.HAM;\n\n\t// Lastly, label the ClassifyResult as spam if log_prob_spam is greater (argmax)\n\telse\n\t resultsToReturn.label = Label.SPAM;\n\n\treturn resultsToReturn;\n\n }",
"private static native long CvSVM_1(long trainData_nativeObj, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long params_nativeObj);",
"void setClassificationArray(org.landxml.schema.landXML11.ClassificationDocument.Classification[] classificationArray);",
"public interface OnlineClassifier {\n\n /**\n * Update an online classifier with the given training instance.\n * @param instance A labelled instance with which we train the classifier.\n * @throws MLException\n */\n\tpublic void update(Instance instance) throws MLException;\n\n}",
"org.landxml.schema.landXML11.ClassificationDocument.Classification getClassificationArray(int i);",
"public interface Aggregator {\n /**\n * Determines the final class recognized\n * @param confidence Confidence values produced by a recognizer\n * (one confidence value per class)\n * @return The final prediction given by a classifier\n */\n public Prediction apply( double[] confidence );\n\n}",
"C classification(I item, boolean useThreshold);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new MultiColumnRestriction.IN instance for the specified clustering column. | @SafeVarargs
private static Restriction newMultiIN(CFMetaData cfMetaData, int firstIndex, List<ByteBuffer>... values)
{
List<ColumnDefinition> columnDefinitions = new ArrayList<>();
List<Term> terms = new ArrayList<>();
for (int i = 0; i < values.length; i++)
{
columnDefinitions.add(getClusteringColumnDefinition(cfMetaData, firstIndex + i));
terms.add(toMultiItemTerminal(values[i].toArray(new ByteBuffer[0])));
}
return new MultiColumnRestriction.InWithValues(columnDefinitions, terms);
} | [
"private static Restriction newSingleIN(CFMetaData cfMetaData, int index, ByteBuffer... values)\n {\n ColumnDefinition columnDef = getClusteringColumnDefinition(cfMetaData, index);\n return new SingleColumnRestriction.InWithValues(columnDef, toTerms(values));\n }",
"PivotInClause createPivotInClause();",
"EvaluationExpressionIn createEvaluationExpressionIn();",
"public AltaData condition_in(String condition_column, String[] condition_value) {\n String condition_value_text = String.join(\",\", condition_value);\n setData_request_url(getData_request_url() + \"&\" + condition_column + \"_in=\" + condition_value_text);\n\n return this;\n }",
"UnipivotInClause createUnipivotInClause();",
"public static Criterion in(String propertyName, Collection values) {\r\n return new InExpression(propertyName, values.toArray());\r\n }",
"Expr getExpr_in();",
"public static Criterion in(String propertyName, Object[] values) {\n\t\treturn new InExpression(propertyName, values);\n\t}",
"public static InSubQueryExpressionElement in(final String property, final SelectCommonSupplier subQuery) {\n return new InSubQueryExpressionElement(property, subQuery.sql());\n }",
"public static InSubQueryExpressionElement in(final String property, final SelectCommon subQuery) {\n return new InSubQueryExpressionElement(property, subQuery);\n }",
"Condition in(QueryParameter parameter, Object... values);",
"public static SetExpression in(String propertyName, Object[] values) {\n return new SetExpression(Operator.IN, propertyName, values);\n }",
"public final EObject ruleArrayConstructionIterationClause() throws RecognitionException {\n EObject current = null;\n\n Token lv_variableName_0_0=null;\n EObject lv_collectionExpression_2_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5759:6: ( ( ( (lv_variableName_0_0= RULE_ID ) ) 'in' ( (lv_collectionExpression_2_0= ruleExpression ) ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5760:1: ( ( (lv_variableName_0_0= RULE_ID ) ) 'in' ( (lv_collectionExpression_2_0= ruleExpression ) ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5760:1: ( ( (lv_variableName_0_0= RULE_ID ) ) 'in' ( (lv_collectionExpression_2_0= ruleExpression ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5760:2: ( (lv_variableName_0_0= RULE_ID ) ) 'in' ( (lv_collectionExpression_2_0= ruleExpression ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5760:2: ( (lv_variableName_0_0= RULE_ID ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5761:1: (lv_variableName_0_0= RULE_ID )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5761:1: (lv_variableName_0_0= RULE_ID )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5762:3: lv_variableName_0_0= RULE_ID\n {\n lv_variableName_0_0=(Token)input.LT(1);\n match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleArrayConstructionIterationClause10031); \n\n \t\t\tcreateLeafNode(grammarAccess.getArrayConstructionIterationClauseAccess().getVariableNameIDTerminalRuleCall_0_0(), \"variableName\"); \n \t\t\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getArrayConstructionIterationClauseRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode, current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"variableName\",\n \t \t\tlv_variableName_0_0, \n \t \t\t\"ID\", \n \t \t\tlastConsumedNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t \n\n }\n\n\n }\n\n match(input,41,FOLLOW_41_in_ruleArrayConstructionIterationClause10046); \n\n createLeafNode(grammarAccess.getArrayConstructionIterationClauseAccess().getInKeyword_1(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5788:1: ( (lv_collectionExpression_2_0= ruleExpression ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5789:1: (lv_collectionExpression_2_0= ruleExpression )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5789:1: (lv_collectionExpression_2_0= ruleExpression )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5790:3: lv_collectionExpression_2_0= ruleExpression\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getArrayConstructionIterationClauseAccess().getCollectionExpressionExpressionParserRuleCall_2_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleExpression_in_ruleArrayConstructionIterationClause10067);\n lv_collectionExpression_2_0=ruleExpression();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getArrayConstructionIterationClauseRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"collectionExpression\",\n \t \t\tlv_collectionExpression_2_0, \n \t \t\t\"Expression\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public static WhereExpression.WhereIn in(Expression expression, Expression... elements)\n {\n Query.checkNull( expression, \"Expression\" );\n\n WhereExpression.WhereIn in = new WhereExpression.WhereIn();\n in.expression = expression;\n in.elements = elements;\n return in;\n }",
"private static Predicate createIn(Expression<?> propertyPath, List<?> arguments, EntityManager manager) {\n return propertyPath.in(arguments);\n }",
"public static Expression in(String propertyName, Collection value) {\n return new PropertyExpression(propertyName, value, InFunction.INSTANCE);\n }",
"public void setIin(java.lang.String iin) {\n this.iin = iin;\n }",
"public final void rule__Argument__InAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:10375:1: ( ( ( 'in' ) ) )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:10376:1: ( ( 'in' ) )\r\n {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:10376:1: ( ( 'in' ) )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:10377:1: ( 'in' )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getArgumentAccess().getInInKeyword_1_0()); \r\n }\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:10378:1: ( 'in' )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:10379:1: 'in'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getArgumentAccess().getInInKeyword_1_0()); \r\n }\r\n match(input,78,FOLLOW_78_in_rule__Argument__InAssignment_120820); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getArgumentAccess().getInInKeyword_1_0()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getArgumentAccess().getInInKeyword_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"InOper createInOper();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new AddressIndexKeyIterator. Memory addresses encoded as Absolute are not included. | public AddressIndexKeyIterator(Table table, int indexCol, AddressMap addrMap, boolean atStart)
throws IOException {
this(table, indexCol, addrMap, false, (AddressSetView) null, atStart);
} | [
"public AddressIndexKeyIterator(Table table, int indexCol, AddressMap addrMap, Address minAddr,\n\t\t\tAddress maxAddr, boolean atStart) throws IOException {\n\t\tthis(table, indexCol, addrMap, false, new AddressSet(minAddr, maxAddr), atStart);\n\t}",
"AddressIndexKeyIterator(Table table, int indexCol, AddressMap addrMap, boolean absolute,\n\t\t\tAddress start, boolean before) throws IOException {\n\t\tthis.table = table;\n\t\tthis.indexCol = indexCol;\n\n\t\tkeyRangeList = addrMap.getKeyRanges(null, absolute, false);\n\t\tkeyRangeIndex = addrMap.findKeyRange(keyRangeList, start);\n\t\tif (keyRangeList.size() == 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (keyRangeIndex < 0) {\n\t\t\t// start address NOT contained within keyRangeList\n\t\t\tkeyRangeIndex = -keyRangeIndex - 1;\n\t\t\tif (keyRangeIndex == 0) {\n\t\t\t\tKeyRange keyRange = keyRangeList.get(keyRangeIndex);\n\t\t\t\tit =\n\t\t\t\t\ttable.indexFieldIterator(new LongField(keyRange.minKey), new LongField(\n\t\t\t\t\t\tkeyRange.maxKey), true, indexCol);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tKeyRange keyRange = keyRangeList.get(--keyRangeIndex);\n\t\t\t\tit =\n\t\t\t\t\ttable.indexFieldIterator(new LongField(keyRange.minKey), new LongField(\n\t\t\t\t\t\tkeyRange.maxKey), false, indexCol);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// start address is contained within keyRangeList\n\t\t\tKeyRange keyRange = keyRangeList.get(keyRangeIndex);\n\t\t\tlong startKey =\n\t\t\t\tabsolute ? addrMap.getAbsoluteEncoding(start, false) : addrMap.getKey(start, false);\n\t\t\tit =\n\t\t\t\ttable.indexFieldIterator(new LongField(keyRange.minKey), new LongField(\n\t\t\t\t\tkeyRange.maxKey), new LongField(startKey), before, indexCol);\n\t\t}\n\t}",
"public AddressIndexKeyIterator(Table table, int indexCol, AddressMap addrMap, boolean absolute,\n\t\t\tAddressSetView set, boolean atStart) throws IOException {\n\t\tthis.table = table;\n\t\tthis.indexCol = indexCol;\n\n\t\tkeyRangeList = addrMap.getKeyRanges(set, absolute, false);\n\t\tif (keyRangeList.size() == 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (atStart) {\n\t\t\tkeyRangeIndex = 0;\n\t\t\tKeyRange keyRange = keyRangeList.get(keyRangeIndex);\n\t\t\tit =\n\t\t\t\ttable.indexFieldIterator(new LongField(keyRange.minKey), new LongField(\n\t\t\t\t\tkeyRange.maxKey), true, indexCol);\n\t\t}\n\t\telse {\n\t\t\tkeyRangeIndex = keyRangeList.size() - 1;\n\t\t\tKeyRange keyRange = keyRangeList.get(keyRangeIndex);\n\t\t\tit =\n\t\t\t\ttable.indexFieldIterator(new LongField(keyRange.minKey), new LongField(\n\t\t\t\t\tkeyRange.maxKey), false, indexCol);\n\t\t}\n\t}",
"public AddressIndexKeyIterator(Table table, int indexCol, AddressMap addrMap,\n\t\t\tAddressSetView set, boolean atStart) throws IOException {\n\t\tthis(table, indexCol, addrMap, false, set, atStart);\n\t}",
"public NodeIterator cloneIterator() {\n\tKeyIndex other = new KeyIndex(_arraySize);\n\n\tother._index = _index;\n\tother._nodes = _nodes.cloneArray();\n\tother._pos = _pos;\n\tother._start = _start;\n\tother._node = _node;\n\n\treturn(other);\n }",
"public AddressIndexKeyIterator(Table table, int indexCol, AddressMap addrMap, Address start,\n\t\t\tboolean before) throws IOException {\n\t\tthis(table, indexCol, addrMap, false, start, before);\n\t}",
"public AutoIndexMap()\n\t\t{\n\t\t\t// Initialise instance variables\n\t\t\tindices = new IdentityHashMap<>();\n\t\t}",
"KeyIndex frozenCopy();",
"public FastIndex() {\r\n\t\tnonZeroEntries = 0;\r\n\t\tentryNums = new int[nonZeroEntries];\r\n\t\tentryVals = new int[nonZeroEntries];\r\n\t\thashCode = 0;\r\n\t}",
"ByteArrayIndex createByteArrayIndex();",
"public interface IndexMap {\n\n /**\n * Add an entry to the map. If the same indexKey, regionKey pair exists in the map is it replaced\n * with the new value.\n *\n * @param indexKey the index key for the entry. The index key may be NULL.\n * @param regionKey the region key for the entry. The region key cannot be NULL.\n * @param value a value for the entry, or NULL for no value\n */\n void put(Object indexKey, Object regionKey, Object value);\n\n /**\n * Remove an entry from the map.\n *\n * @param indexKey the index key to remove\n * @param regionKey the region key to remove\n *\n * This method has no effect if the indexKey, regionKey does not exist in the map.\n */\n void remove(Object indexKey, Object regionKey);\n\n /**\n * Return all of the IndexEntries that map to a given region key.\n */\n CloseableIterator<IndexEntry> get(Object indexKey);\n\n /**\n * Return the set of index keys for a given region key.\n */\n CloseableIterator<CachedDeserializable> getKey(Object indexKey);\n\n /**\n * Return all of the IndexEntries in the range between start and end. If end < start, this will\n * return a descending iterator going from end to start.\n */\n CloseableIterator<IndexEntry> iterator(Object start, boolean startInclusive, Object end,\n boolean endInclusive);\n\n /**\n * Return all of the IndexEntries that from start to the tail of the map.\n */\n CloseableIterator<IndexEntry> iterator(Object start, boolean startInclusive);\n\n /**\n * Return all of the IndexEntries in the map.\n */\n CloseableIterator<IndexEntry> iterator();\n\n /**\n * Return all of the IndexEntries from the end to the head of the map.\n */\n CloseableIterator<IndexEntry> descendingIterator(Object end, boolean endInclusive);\n\n /**\n * Return all of the IndexEntries in the map in descending order.\n */\n CloseableIterator<IndexEntry> descendingIterator();\n\n /**\n * Return all of the region keys from start to end.\n */\n CloseableIterator<CachedDeserializable> keyIterator(Object start, boolean startInclusive,\n Object end, boolean endInclusive);\n\n /**\n * Return all of the region keys from start to the tail of the map\n */\n CloseableIterator<CachedDeserializable> keyIterator(Object start, boolean startInclusive);\n\n /**\n * Return all of the region keys in the map\n */\n CloseableIterator<CachedDeserializable> keyIterator();\n\n /**\n * Return all of the region keys from the end to the head of the map, in descending order.\n */\n CloseableIterator<CachedDeserializable> descendingKeyIterator(Object end, boolean endInclusive);\n\n /**\n * Return all of the region keys in the map, in descending order.\n */\n CloseableIterator<CachedDeserializable> descendingKeyIterator();\n\n\n /**\n * Return the estimate of the size of the map in the given range, inclusive.\n */\n long size(Object start, Object end);\n\n /**\n * Return an estimate of the size of the map from the given key to get end of the map\n */\n long sizeToEnd(Object start);\n\n /**\n * Return an estimate of the size of the map from the beginning to the given key\n */\n long sizeFromStart(Object end);\n\n\n /**\n * Return an estimate of the size of the map.\n */\n long size();\n\n /**\n * Destroy the index map and remove all data from disk. Once a map is destroyed, it will not be\n * recovered.\n */\n void destroy();\n\n /**\n * A single entry in an index\n *\n * @since GemFire cedar\n */\n interface IndexEntry {\n /**\n * Return the index key of the entry. May be NULL.\n */\n CachedDeserializable getKey();\n\n /**\n * Return the region key for the index\n */\n CachedDeserializable getRegionKey();\n\n /**\n * Return the value of the entry. May be NULL.\n */\n CachedDeserializable getValue();\n }\n\n\n\n}",
"public DBaseIndex( String name ) throws IOException {\n File f = new File( name + \".ndx\" );\n\n if ( !f.exists() )\n throw new FileNotFoundException();\n\n fileName = name;\n file = new RandomAccessFile( f, \"rw\" );\n\n file.read( b );\n startingPageNo = ByteUtils.readLEInt( b, 0 );\n\n file.read( b );\n numberOfPages = ByteUtils.readLEInt( b, 0 );\n\n file.skipBytes( 4 ); //Reserved\n file.read( b, 0, 2 );\n keyLength = ByteUtils.readLEShort( b, 0 );\n\n file.read( b, 0, 2 );\n noOfKeysPerPage = ByteUtils.readLEShort( b, 0 );\n\n file.read( b, 0, 2 );\n keyType = ByteUtils.readLEShort( b, 0 );\n\n file.read( b );\n sizeOfKeyRecord = ByteUtils.readLEInt( b, 0 );\n\n file.skipBytes( 1 ); //Reserved\n uniqueFlag = file.readBoolean();\n\n keyBytes = new byte[keyLength];\n }",
"public IntMap()\r\n {\r\n this(16);\r\n }",
"public AddressRanges() {}",
"public Comparator<PeerAddress> createXORAddressComparator() {\n return createXORAddressComparator(self);\n }",
"CloseableIterator<CachedDeserializable> keyIterator(Object start, boolean startInclusive,\n Object end, boolean endInclusive);",
"public interface KeyIndex {\n /**\n * Get the index of a key.\n *\n * @param key The key to query.\n * @return The key's index.\n * @throws IllegalArgumentException if {@code key} is not in the index.\n */\n int getIndex(long key);\n\n /**\n * Query whether this index contains a particular key.\n * @param key The key to look for.\n * @return {@code true} if the index contains the key.\n */\n boolean containsKey(long key);\n\n /**\n * Get the key for an index position.\n *\n * @param idx The index of the key to retrieve.\n * @return The key for the given <var>idx</var>.\n * @throws IndexOutOfBoundsException if {@code idx} is not a valid index.\n */\n long getKey(int idx);\n\n /**\n * Try to get the index for an ID, returning a negative value if it does not exist.\n * This method is like {@link #getIndex(long)}, except it returns a negative value\n * instead of throwing an exception if the id does not exist.\n * @param id The ID to look for.\n * @return The index of the ID, or a negative value if it is not in the index.\n */\n int tryGetIndex(long id);\n\n /**\n * Get the size of this index.\n *\n * @return The number of indexed keys.\n */\n int size();\n\n /**\n * Get the lower bound of the index range for this index.\n * @return The lower bound for the key index range.\n */\n int getLowerBound();\n\n /**\n * Get the upper bound of the index range for this index.\n *\n * @return The upper bound for the key index range.\n */\n int getUpperBound();\n\n /**\n * Get the list of indexed keys. This list is 0-indexed, so the key at position 0 in this list is at index\n * {@link #getLowerBound()} in the key index.\n *\n * @return The list of keys in the index. No key will appear twice.\n */\n LongList getKeyList();\n\n /**\n * Get a frozen copy of this key index. If the key index is mutable, then this method will return an immutable\n * copy of it. If the key index is already immutable, it may just return itself without copying.\n *\n * @return An immutable key index with the same contents as this key index.\n */\n KeyIndex frozenCopy();\n}",
"default NTInstrumentZoneBuilderType addKeyRangeGenerator(\n final int low,\n final int high)\n {\n final var msb = (high << 8);\n final var lsb = low & 0xff;\n return this.addGenerator(\n NTGenerator.of(NTGeneratorOperatorIndex.of(43), \"keyRange\"),\n NTGenericAmount.of(msb | lsb));\n }",
"final ByteBuffer getKeyFromPointer(int index) {\n int origionalLimit = memoryBuffer.limit();\n memoryBuffer.limit(memoryBuffer.capacity());\n int pointerOffset = computePointerOffset(index);\n int keyPos = memoryBuffer.getInt(pointerOffset);\n int valuePos = memoryBuffer.getInt(pointerOffset + 4);\n memoryBuffer.limit(origionalLimit);\n assert valuePos >= keyPos;\n ByteBuffer key = sliceOutRange(keyPos, valuePos);\n return key;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
represents a tagged value | public interface UMLTaggedValue {
/**
* the tag's name, key, id or tag
*/
String getName();
/**
* the tag's value
*/
String getValue();
/**
* Modify a taggedValue's value.
*
* @param value the value to change to.
*/
void setValue(String value);
} | [
"UMLTaggedValue getTaggedValue(String name);",
"UMLTaggedValue addTaggedValue(String name, String value);",
"public String getTaggedValue(String name);",
"public TaggedValue getTaggedValue(int index);",
"public String getTagVal() {\n return tagVal;\n }",
"public ValueTaglet() {\n name = \"value\";\n }",
"public void addTaggedValue(TaggedValue taggedValue);",
"public String getValue() {\n\t\treturn tagValue;\n\t}",
"public String getTagValue() {\n return tagValue;\n }",
"Object getNBTValue();",
"UMLTaggedValue getTaggedValue(String name, boolean ignoreCase);",
"Collection<UMLTaggedValue> getTaggedValues();",
"public void setTag(String value) {\n this.tag = value;\n }",
"com.google.protobuf.StringValue getTag();",
"private void addTaggedValue(\n Element element,\n String tagName,\n String value,\n String newId,\n String xmiid,\n Namespace namespace) throws Exception {\n try {\n if (element != null) {\n element.setAttribute(\"value\", value);\n }\n \n else {\n Element taggedValue = new Element(\"TaggedValue\", namespace);\n \n taggedValue.setNamespace(\n Namespace.getNamespace(\"UML\", \"href://org.omg/UML\"));\n \n taggedValue.setAttribute(new Attribute(\"xmi.id\", newId));\n \n taggedValue.setAttribute(new Attribute(\"tag\", tagName));\n \n taggedValue.setAttribute(new Attribute(\"modelElement\", xmiid));\n \n taggedValue.setAttribute(new Attribute(\"value\", value));\n \n Element elem1 = getElement(rootElement, \"//*[local-name()='Model'\");\n \n Element parentElement = elem1.getParentElement();\n \n parentElement.addContent(taggedValue);\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n log.error(\n \"Exception while creating new TaggedValue element: \" + e.getMessage());\n \n throw new Exception(\n \"Exception in creating new TaggedValue element: \" + e.getMessage());\n }\n }",
"public String getTagValue(){\n if(tagValues.size() == 0){\n return \"\";\n }\n else{\n return this.tagValues.get(0);\n }\n }",
"public void setTagValue(String tagValue) {\n this.tagValue = tagValue;\n }",
"public TaggedValue getTaggedValue(int index)\r\n\t{\r\n\t\treturn (TaggedValue) taggedValueList.get(index);\r\n\t}",
"com.google.protobuf.StringValueOrBuilder getTagOrBuilder();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remember recent file currently, automatically going to form doesn't work | @Override
public void run() {
recent = bluetoothDir + '/' + fileName;
//TODO : check is valid tag file
//goToForm(recent);
} | [
"protected void restoreLastState() {\n\t\tInteger ii = Accessors.INT_ACCESSOR.get(\"numberOfFiles\");\n\t\tif(ii == null)\n\t\t\tii = 0;\n\t\tint jj = 0;\n\t\t\n\t\tFile file;\n\t\twhile(jj < ii) {\n\t\t\tfile = new File(Preference.PREFERENCES_NODE.get(\"editSession\" + ++jj, \"\"));\n\t\t\topen(file);\n\t\t}\n\t}",
"void openFile(){\r\n\t\t //before opening a file we need to check if the previous file was saved or not \r\n\t\t if(!checkSaved()){\r\n\t\t\t this.npd.statusBar.setText(\"Well, you must save the file to continue...\");\r\n\t\t\t return;\r\n\t\t }\r\n\t\t \r\n\t\t fchooser.setDialogTitle(\"open file\");\r\n\t\t fchooser.setApproveButtonText(\"Open Now\");\r\n\t\t \r\n\t\t if(fchooser.showOpenDialog(this.npd.frame) != JFileChooser.APPROVE_OPTION)\r\n\t\t\t return;\r\n\t\t \r\n\t\t File temp = fchooser.getSelectedFile();\r\n\t\t fileRef = temp;\r\n\t\t this.npd.textField.setText(readFile(temp));\r\n\t }",
"private void rememberOpenedlab(){\n try {\n FileOutputStream out = new FileOutputStream(iniFile);\n if(currentLab != null){\n writeValueToINI(out, \"prevLab\", currentLab.getPath());\n }\n else{\n writeValueToINI(out, \"prevLab\", \"\");\n }\n \n }\n catch (FileNotFoundException ex) { System.out.println(ex);} \n catch (IOException ex) { System.out.println(ex);} \n catch (NullPointerException ex) {\n System.out.println(ex);\n }\n }",
"public void onPreviousClicked(ActionEvent event) {\n try ( // Creating a random access file\n RandomAccessFile inout = new RandomAccessFile(\"AddressBook.dat\", \"rw\");\n ) {\n if (count > 1)\n count--;\n else\n count = 1;\n inout.seek((count * 143) - 143);\n read(inout);\n displayContent.setText(\"Reading address #\" + count);\n }\n catch (IOException ex) {}\n }",
"public void saveHistory() {\r\n\t\tJFileChooser jfc = new JFileChooser();\r\n\t\tjfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\r\n\t\tjfc.setDialogTitle(\"Save \" + curveName + \" history\");\r\n\t\tjfc.setSelectedFile(new File(\".txt\"));\r\n\t\tint returnVal = jfc.showSaveDialog(getRootPane());\r\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tif (!cancelBecauseFileExist(jfc.getSelectedFile())) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\thistory.save(jfc.getSelectedFile());\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(getRootPane(), \"Error while saving the history\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\t public void actionPerformed(ActionEvent arg0) {\n\t\t JFileChooser j = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory()); \n\t\t\n\t\t // invoke the showsOpenDialog function to show the save dialog \n\t\t int r = j.showOpenDialog(null); \n\t\t\n\t\t // if the user selects a file \n\t\t if (r == JFileChooser.APPROVE_OPTION) \n\t\t\n\t\t { \n\t\t // set the label to the path of the selected file \n\t\t textfield.setText(j.getSelectedFile().getAbsolutePath()); \n\t\t\n\t\t } \n\t\t // if the user cancelled the operation \n\t\t \n\t\t //\n\t\t \n\t\t }",
"public void updateRecentPaneFilesMenu()\r\n {\r\n recentPaneFilesMenu.removeAll(); // clear previous menu items\r\n recentPaneFilesMenu.setFont(GlobalValues.uifont);\r\n clearRecentFilesJMenuItem = new JMenuItem(\"Clear the list of recent files\");\r\n clearRecentFilesJMenuItem.setFont(GlobalValues.uifont);\r\n clearRecentFilesJMenuItem.addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(ActionEvent e) {\r\n recentPaneFiles.clear();\r\n recentPaneFilesMenu.removeAll();\r\n }\r\n });\r\n\r\n recentPaneFilesMenu.add(clearRecentFilesJMenuItem);\r\n \r\n int numberRecentFiles = recentPaneFiles.size();\r\n for (int k=numberRecentFiles-1; k>=0; k--) { // reverse order for displaying the most recently loaded first\r\n final String recentFileName = (String)recentPaneFiles.elementAt(k); // take the recent filename\r\n recentFileMenuItem = new JMenuItem(recentFileName);\r\n recentFileMenuItem.setFont(GlobalValues.uifont);\r\n recentFileMenuItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n jShellLabEdit(recentFileName); // reload the recent file in editor\r\n \r\n // update the workingDir\r\n String pathOfLoadFileName = recentFileName.substring(0, recentFileName.lastIndexOf(File.separatorChar));\r\n GlobalValues.workingDir = pathOfLoadFileName;\r\n }\r\n });\r\n recentPaneFilesMenu.add(recentFileMenuItem); // add the menu item corresponding to the recent file\r\n } // for all the recently accessed files \r\n\r\n recentPaneFilesMenu.setToolTipText(\"Tracks \\\"Saved As\\\" Files\");\r\n mainJMenuBar.add(recentPaneFilesMenu); // finally add the recent files menu to the main menu bar\r\n \r\n }",
"private void adjustRecentFiles( File last_used ) {\n // get the current list\n String recent = \"\";\n try {\n recent = Constants.PREFS.get( Constants.RECENT_LIST, \"\" );\n }\n catch ( Exception e ) {} // NOPMD\n if ( recent.startsWith( last_used.getAbsolutePath() ) )\n return ;\n ArrayList list = new ArrayList();\n StringTokenizer st = new StringTokenizer( recent, File.pathSeparator );\n while ( st.hasMoreTokens() ) {\n list.add( st.nextToken() );\n }\n\n // check if the last used file is already in the list, remove\n // it if it is\n String last = last_used.getAbsolutePath();\n if ( list.contains( last ) ) {\n list.remove( last );\n }\n\n // add the last used at the top of the list\n list.add( 0, last );\n\n // trim the list to size\n if ( list.size() > Constants.MAX_RECENT_SIZE ) {\n list = new ArrayList( list.subList( 0, Constants.MAX_RECENT_SIZE ) );\n }\n\n // save the list\n StringBuffer sb = new StringBuffer();\n Iterator it = list.iterator();\n while ( it.hasNext() ) {\n sb.append( it.next() ).append( File.pathSeparator );\n }\n\n try {\n Constants.PREFS.put( Constants.RECENT_LIST, sb.toString() );\n Constants.PREFS.flush();\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n\n // notify helpers that the list has changed\n _helper.actionPerformed( new ActionEvent( this, Constants.RECENT_LIST_CHANGED, last_used.getAbsolutePath() ) );\n }",
"private void entryFileButtonActionPerformed(java.awt.event.ActionEvent evt) {\n JFileChooser chooser = new JFileChooser();\n chooser.setDialogTitle(\"Select Entries File\");\n File workingDirectory = new File(System.getProperty(\"user.dir\"));\n chooser.setCurrentDirectory(workingDirectory);\n if (chooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {\n entryFile = chooser.getSelectedFile();\n entryFileLabel.setText(getFileName(entryFile));\n pcs.firePropertyChange(\"ENTRY\", null, entryFile);\n }\n }",
"private void refreshHistList() {\n\t\tfinal File file = multiChooser.getSelectedFile();\n\t\thListModel.clear();\n\t\ttxtListFile.setText(\"\");\n\t\tif (file != null) {\n\t\t\ttxtListFile.setText(file.getAbsolutePath());\n\t\t\tif (loadHistNames(file)) {\n\t\t\t\tcheckSelectionIsNone();\n\t\t\t}\n\t\t}\n\t}",
"public void saveRecentFiles() {\n DrJava.getConfig().setSetting(_settingConfigConstant, _recentFiles);\n }",
"public void loadRecentPaneFiles() {\r\n // create streams\r\n \r\n boolean exists = (new File(fileWithFileListOfPaneRecentFiles)).exists();\r\nif (exists) {\r\n \r\n try {\r\n // open the file containing the stored list of recent files\r\n FileInputStream input = new FileInputStream(fileWithFileListOfPaneRecentFiles);\r\n \r\n //create reader stream\r\n BufferedReader recentsReader= new BufferedReader(new InputStreamReader(input));\r\n\r\n recentPaneFiles.clear(); // clear the Vector of recent files\r\n String currentLine; // refill it from disk\r\n while ((currentLine = recentsReader.readLine()) != null)\r\n if (recentPaneFiles.indexOf(currentLine) == -1) // file not already in list\r\n recentPaneFiles.add(currentLine);\r\n\r\n recentsReader.close();\r\n input.close();\r\n updateRecentPaneFilesMenu(); // update the recent files menu\r\n\r\n }\r\n catch(java.io.IOException except)\r\n {\r\n System.out.println(\"IO exception in readRecentsFiles. File: \"+fileWithFileListOfPaneRecentFiles+\" not found\");\r\n recentPaneFilesMenu.removeAll(); // clear previous menu items\r\n clearRecentFilesJMenuItem = new JMenuItem(\"Clear the list of recent files\");\r\n clearRecentFilesJMenuItem.addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(ActionEvent e) {\r\n recentPaneFiles.clear();\r\n recentPaneFilesMenu.removeAll();\r\n }\r\n });\r\n\r\n recentPaneFilesMenu.add(clearRecentFilesJMenuItem);\r\n mainJMenuBar.add(recentPaneFilesMenu); // finally add the recent files menu to the main menu bar\r\n \r\n }\r\n }\r\n }",
"void addRecentEntry(final String fileName) {\r\n\t\tif (recent.add(fileName)) {\r\n\t\t\tif (ui.fileRecent.getItemCount() < 2) {\r\n\t\t\t\tui.fileRecent.addSeparator();\r\n\t\t\t}\r\n\t\t\tJMenuItem item = new JMenuItem(fileName);\r\n\t\t\titem.addActionListener(new Act() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void act() {\r\n\t\t\t\t\tdoOpenRecent(fileName);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tui.fileRecent.insert(item, 2);\r\n\t\t}\r\n\t}",
"protected void setupRecentFiles() {\r\n\t\trecentMenu.removeAll();\r\n\t\tList keys = recentFiles.getFiles();\r\n\t\tif (keys.isEmpty()) {\r\n\t\t\tJMenuItem recentMenuItem = new JMenuItem(\"<<None>>\");\r\n\t\t\trecentMenu.add(recentMenuItem);\r\n\t\t} else\r\n\t\t\tfor (int i = 0; i < keys.size(); i++) {\r\n\t\t\t\tString key = (String) keys.get(i);\r\n\t\t\t\tJMenuItem recentMenuItem = new JMenuItem((i + 1) + \". \" + key);\r\n\t\t\t\trecentMenuItem.addActionListener(new OpenRecentListener());\r\n\t\t\t\trecentMenu.add(recentMenuItem);\r\n\t\t\t\tsuper.repaint();\r\n\t\t\t}\r\n\t}",
"public void openSavedFilesFrame()\n {\n //create a new load frame\n savedFilesFrame = new SavedFilesFrame(this);\n //if user saved some games and wants to see them on this frame\n if( !firstLoadGame )\n {\n savedFilesFrame.updatePanel(sideMenu.getSaved_files());\n }\n }",
"public void storeFileHistory() {\n\t\ttheFileHistory.store(theConfiguration);\n\t}",
"public Restore() {\n initComponents();\n setVisible(true);\n fileChooser.setVisible(false);\n pathtf.requestFocusInWindow();\n }",
"private void defaultFileButtonActivated() {\n chosenFilePath = GlobalValue.DEFAULT_BIN_RESOURCE;\n chosenFileName = DefaultSettings.DEFAULT_FILE_NAME;\n fileLoadSetting.setTextField(DefaultSettings.DEFAULT_FILE_NAME);\n }",
"public void updateOpenFiles(final File file) {\n \n if (_recentFiles.size() == 0) {\n _insertSeparator(_pos); //one at top\n _pos++;\n }\n \n final FileOpenSelector recentSelector = new FileOpenSelector() {\n public File[] getFiles() { return new File[] { file }; }\n };\n \n removeIfInList(file);\n _recentFiles.add(0,file);\n\n _do(new Runnable1<JMenu>() {\n public void run(JMenu fileMenu) {\n JMenuItem newItem = new JMenuItem(\"\");\n newItem.addActionListener(new AbstractAction(\"Open \" + file.getName()) {\n public void actionPerformed(ActionEvent ae) {\n if (_recentFileAction != null) {\n _recentFileAction.actionPerformed(recentSelector);\n }\n }\n });\n try { newItem.setToolTipText(file.getCanonicalPath()); }\n catch(IOException e) {\n // don't worry about it at this point\n }\n fileMenu.insert(newItem,_pos);\n }\n });\n numberItems();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the CommandWord associated with a word. | public CommandWord getCommandWord(String commandWord){
CommandWord aDevolver = CommandWord.UNKNOWN;
if (validCommands.keySet().contains(commandWord)){
aDevolver = validCommands.get(commandWord);
}
return aDevolver;
} | [
"public CommandWord getCommandWord(String commandWord)\n {\n CommandWord command = validCommands.get(commandWord);\n if(command != null) {\n return command;\n }\n else {\n return CommandWord.UNKNOWN;\n }\n }",
"public Command get(String word)\n {\n return (Command)commands.get(validCommands.get(word));\n }",
"public static CommandWord getCommandWord(String commandWord)\n {\n CommandWord command = CommandWord.UNKNOWN;\n \n for(CommandWord c : CommandWord.values()) {\n if(c.toString().equalsIgnoreCase(commandWord)) {\n command = c;\n }\n } \n return command;\n }",
"java.lang.String getWord();",
"public String getKeyWord() {\n String first = buffer.substring(0,1);\n String command = buffer.substring(1, buffer.length());\n \t return parseKeyWord(first, command, new StringTokenizer(command, first));\n \t}",
"public String getCommand() {\n if (words.length == 0) {\n return NO_INPUT;\n }\n return words[0].toLowerCase();\n }",
"private static String getCommandWord(String[] userCommand) {\n\t\tassert userCommand.length >0;\n\t\tString firstWord = userCommand[Constants.COMMAND_POSITION];\n\t\treturn firstWord;\n\t}",
"public String getWord()\n\t{\n\t\treturn word;\n\t}",
"private Command getCommand(String input, String commandWord, String task) {\n switch (ReferenceList.commandsDictionary.get(commandWord.toLowerCase())) {\n case AddCommand.COMMAND_WORD:\n return prepareAdd(task);\n case EditCommand.COMMAND_WORD:\n return prepareEdit(task);\n case DeleteCommand.COMMAND_WORD:\n return prepareDelete(task);\n case ListCommand.COMMAND_WORD:\n return prepareList(task);\n case HelpCommand.COMMAND_WORD:\n return new HelpCommand();\n case ExitCommand.COMMAND_WORD:\n return new ExitCommand();\n case DoneCommand.COMMAND_WORD:\n return prepareDone(task);\n case FindCommand.COMMAND_WORD:\n return new FindCommand();\n case ClearCommand.COMMAND_WORD:\n return new ClearCommand();\n case UndoCommand.COMMAND_WORD:\n return prepareUndo();\n case RedoCommand.COMMAND_WORD:\n return prepareRedo();\n case StorageCommand.COMMAND_WORD:\n return prepareStorage(input);\n case SortCommand.COMMAND_WORD:\n return prepareSort(task);\n default: \n return commandIncorrectPlusHelp(String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, Messages.MESSAGE_UNKNOWN_COMMAND));\n }\n }",
"private String getKey(String word) {\r\n\t\treturn word;\r\n\t}",
"private Token getReservedWordToken(String word) {\n return reservedWords.get(word);\n }",
"public Word getWord(Word w) {\n\t\treturn mapper.load(w);\n\t}",
"public static Tokenizer forWord(){\n return word;\n }",
"public Word getChosenWord() {\n try {\n\n return this.dictionary.searchWord(getChosenWordSpelling());\n\n } catch (NullPointerException exception) {\n System.out.println(\"You've chosen nothing.\");\n return null;\n }\n }",
"public static String getCommandWordInStub(String stub) {\n return stub.split(\" \")[0];\n }",
"public String getWord() {\n if(words[index] != null) {\n return words[index];\n } else {\n return \"\";\n }\n }",
"WordBean getWord(String word);",
"public static String getWord() {\r\n\t\treturn words[(int) (Math.random() * words.length)];\r\n\t}",
"public final Word getWord(int offset) {\n return words[offset == 0 ? offset : offset - 1];\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method navigates the Display to the createAccount screen by hiding the current panels in the WindowFrame and calling display.createAccountScreen(). | private void goToCreateAccount() {
display.resetView();
display.createAccountScreen();
} | [
"public void switchToCreateAccount() {\r\n\t\tlayout.show(this, \"createPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"public static void createAccount(){\n\t\t\n JLabel titleText = layout.getTitleText();\n JLabel subTitleText = layout.getSubTitleText();\n JPanel menuButtons = layout.getMenuButtons();\n ExitButton exitButton = layout.getExitButton();\n JPanel accountPanel = layout.getNewAccountPanel();\n\n menuButtons.setVisible(false);\n exitButton.setVisible(true);\n titleText.setVisible(true);\n subTitleText.setVisible(true);\n accountPanel.setVisible(true);\n\n titleText.setText(\"Create New Account\");\n\n currentPlayer = new Player();\n\t\t\n\t}",
"public CreateAccountScreenPriviliged() {\n initComponents();\n \n }",
"private void goToCreateAccountScreen() {\n Intent intent = new Intent(this, CreateAccountScreen.class);\n startActivity(intent);\n }",
"private void newUserScreen() {\n\t\t\n\t\t//Initialize windows\n\t\tDimension newUserSize = new Dimension(newUserWidth, newUserHeight);\n\t\tnewUserWindow = new JFrame(\"New User\");\n\t\tnewUserWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tnewUserWindow.setSize(newUserSize);\n\t\tnewUserWindow.setLayout(null);\n\t\tnewUserWindow.setResizable(false);\n\t\tnewUserWindow.setLocationRelativeTo(null);\n\t\tnewUserWindow.setLayout(new BorderLayout());\n\t\t\n\t\t//Set Background\n\t\tJLabel background = new JLabel(new ImageIcon(\"Resource/loginBackground.jpg\"));\n\t\tbackground.setBounds(0, 0, newUserWidth, newUserHeight);\n\t\tnewUserWindow.add(background);\n\t\t\n\t\t//Teacher JButton\n\t\tJButton teacherB = new JButton(\"Teacher\");\n\t\tteacherB.setBounds(25, 25, 100, 50);\n\t\tteacherB.setFont(masterFont);\n\t\tteacherB.setBorder(compound);\n\t\tteacherB.setOpaque(true);\n\t\tteacherB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tnewUserWindow.dispose();\n\t \t\tteacherAccount = true;\n\t \t\tnewTeacherScreen();\n\t }\n\t \t});\n\t\tbackground.add(teacherB);\n\t\t\t\t\n\t\t//Student JButton\n\t\tJButton studentB = new JButton(\"Student\");\n\t\tstudentB.setBounds(150, 25, 100, 50);\n\t\tstudentB.setFont(masterFont);\n\t\tstudentB.setBorder(compound);\n\t\tstudentB.setOpaque(true);\n\t\tstudentB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tnewUserWindow.dispose();\n\t\t\t\tstudentAccount = true;\n\t\t\t\tnewStudentScreen();\n\t }\n\t \t});\n\t\tbackground.add(studentB);\n\t\t\n\t\t//Existing JButton\n\t\tJButton existingB = new JButton(\"Existing\");\n\t\texistingB.setBounds(275, 25, 100, 50);\n\t\texistingB.setFont(masterFont);\n\t\texistingB.setBorder(compound);\n\t\texistingB.setOpaque(true);\n\t\texistingB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tnewUserWindow.dispose();\n\t\t\t\tloginScreen();\n\t }\n\t \t});\n\t\tbackground.add(existingB);\n\t\t\n\t\t//Display the window\n\t\tnewUserWindow.setVisible(true);\n\t}",
"private void btnCreateAdminAccountActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreateAdminAccountActionPerformed\n this.setVisible(false);\n CreateAdminAccount tempCreateAdminAccount = new CreateAdminAccount(hospital);\n tempCreateAdminAccount.setVisible(true);\n tempCreateAdminAccount.onLoad();\n }",
"public void changeScreenToCreateAccount(View view){\n Intent i = new Intent(this,\n AccountCreationActivity.class);\n startActivity(i);\n finish();\n }",
"public void goAsCreateAccount() {\n btnContinueCreateAccount().click();\n }",
"public void createAccountWindow() throws IOException {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"createAccountView.fxml\"));\n Parent root = loader.load();\n\n // Loading the controller\n CreateAccountController controller = loader.getController();\n controller.load();\n controller.setMain(this);\n\n // Set the primary stage\n stage.setTitle(\"Create Customer Account\");\n stage.setScene(new Scene(root));\n stage.show();\n }",
"NewAccountPage openNewAccountPage();",
"@Override\n public void actionPerformed(ActionEvent e) {\n frame.setVisible(false);//when user clicks my profile button the visibility of the frame for the home screen will be set to false \n new MyProfile();//displays the user's profile page\n }",
"private void createPrincipalWindow() {\n createWindowCenter(windowPrincipal, 880, 530, constants.personMenu());\n windowPrincipal.addItem(createGridPersons());\n configurePrincipalWindow();\n windowPrincipal.addCloseClickHandler(new CloseClickHandler() {\n\n public void onCloseClick(CloseClientEvent event) {\n windowPrincipal.destroy();\n }\n });\n canvasPrincipal.addChild(windowPrincipal);\n canvasPrincipal.show();\n }",
"public RegisterScreen(){\n\t\tMainWindow.displayPanel(this,700,596,\"Register\");\n\t\tString[] args = new String[0];\n\t\tClientNetwork.connect();\n\t\tthis.setLayout(null);\n\t\tsetBackground(Color.decode(\"#3498db\"));\n\t\tJLabel EU = (JLabel)CreateUI.MakeUIObject(\"Please enter a username\",100, 150, 150, 50, \"label\");\n\t\tJLabel EP = (JLabel)CreateUI.MakeUIObject(\"Please enter a password\",100, 200, 150, 50,\"label\");\n\t\tJLabel RP = (JLabel)CreateUI.MakeUIObject(\"Please reenter your password\",100, 250, 250, 50,\"label\");\n\t\tJLabel TT = (JLabel)CreateUI.MakeUIObject(\"Usernames and Passwords may only\",200, 10, 1000, 20,\"label\");\n\t\tJLabel TT2 = (JLabel)CreateUI.MakeUIObject(\"consist of numbers and letters.\",200, 41, 1000, 10,\"label\");\n\t\tEP.setToolTipText(\"Passwords may only contain numbers and letters\");\n\t\tEU.setToolTipText(\"Usernames may only contain numbers and letters\");\n\t\tJButton submit = (JButton)CreateUI.MakeUIObject(\"Submit\",200, 400, 100, 100,\"button\");\n\t\tJButton Login = (JButton)CreateUI.MakeUIObject(\"Login\",325, 400, 100, 100, \"button\");\n\t\tLogin.setToolTipText(\"Login to an already existing account\");\n\t\tsetSize(700, 596);\n\t\tJLabel TOU = (JLabel)CreateUI.MakeUIObject(\"Please select an acount type.\",100, 85, 175, 15,\"label\");\n\t\tString[] TypesOfUsers = new String[] {\"Player\", \"Admin\", \"Spectator\"};\n\t\tJComboBox<String> UserTypeSelect = new JComboBox<>(TypesOfUsers);\n\t\tUserTypeSelect.setBounds(300, 75, 125, 50);\n\t\tJTextField Us = (JTextField)CreateUI.MakeUIObject(\"\", 300, 150, 300, 50, \"text\");\n\t\tJPasswordField p1 = (JPasswordField)CreateUI.MakeUIObject(\"\",300, 200, 300, 50, \"pass\");\n\t\tJPasswordField p2 = (JPasswordField)CreateUI.MakeUIObject(\"\",300, 250, 300, 50, \"pass\");\n\t\tp2.addActionListener(new ActionListener() {\n\t\t @Override\n\t\t public void actionPerformed(ActionEvent e) {\n\t\t \tif(Us.getText() != null && passmatch(p1, p2)) {\n\t\t \t\tClientNetwork.connect();\n\t\t \t\tint accountType = UserTypeSelect.getSelectedIndex();\n\t\t \t\tSystem.out.println(accountType);\n\t\t \t\tboolean flag = false;\n\t\t \t\tif(accountType == 1) {\n\t\t \t\t\tString attempt = JOptionPane.showInputDialog(\"Please enter the admin password:\");\n\t\t \t\t\tif(attempt.equals(\"Large_Father\")) {accountType = 1;}\n\t\t \t\t\telse {\n\t\t \t\t\t\tflag = true;\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t\tif(flag) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"That is not the correct password!\\nAccounts starting with Admin_ can only be used by admins!\");\n\t\t\t\t\t}\n\t\t \t\telse {\n\t\t \t\t\tString res = ClientNetwork.createAccountOnServer(Us.getText().toString(), p1.getPassword());\t\t\n\t\t\t\t\t\tif (res.equals(\"usernameFail\") || res.equals(\"passwordFail\") || res.equals(\"takenFail\") || flag) {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Account Registration failed because of the following error: \"+res);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tClientNetwork.setAccountType(res, accountType);\n\t\t\t\t\t\t\tTitleScreen.UserProfile = ClientNetwork.loginToServer(Us.getText().toString(), p1.getPassword()).getP();\n\t\t\t\t\t\t\tTitleScreen.UserID = TitleScreen.UserProfile.getUserID();\n\t\t\t\t\t\t\tTitleScreen.UserProfile.setAccountType(ClientNetwork.getAccountType(TitleScreen.UserID));\n\t\t\t\t\t\t\tClientNetwork.setPlayerCurrency(TitleScreen.UserID, 500);\n\t\t\t\t\t\t\tsetVisible(false);\n\t\t\t\t\t\t\tremoveAll();\n\t\t\t\t\t\t\tMainMenu.main(args);\n\t\t\t\t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t});\n\t\t\n\t\tJButton clear = (JButton)CreateUI.MakeUIObject(\"Clear\",450, 400, 100, 100,\"button\");\n\t\tclear.setToolTipText(\"Clear all textboxes\");\n\t\tthis.add(clear);\n\t\tthis.add(TT);\n\t\tthis.add(TT2);\n\t\tthis.add(EU);\n\t\tthis.add(EP);\n\t\tthis.add(RP);\n\t\tthis.add(Us);\n\t\tthis.add(p1);\n\t\tthis.add(p2);\n\t\tthis.add(submit);\n\t\tthis.add(Login);\n\t\tthis.add(UserTypeSelect);\n\t\tthis.add(TOU);\n\t\t//add(panel);\t\n\t\tsubmit.addActionListener((ActionEvent event) -> {\n\t\t\tsubmit.setVisible(false);\n\t\t\tif(Us.getText() != null && passmatch(p1, p2)) {\n\t\t\t\tClientNetwork.connect();\n\t \t\tint accountType = UserTypeSelect.getSelectedIndex();\n\t \t\tSystem.out.println(accountType);\n\t \t\tboolean flag = false;\n\t \t\tif(accountType == 1) {\n\t \t\t\tString attempt = JOptionPane.showInputDialog(\"Please enter the admin password:\");\n\t \t\t\tif(attempt.equals(\"Large_Father\")) {accountType = 1;}\n\t \t\t\telse {\n\t \t\t\t\tflag = true;\n\t \t\t\t}\n\t \t\t}\n\t \t\tif(flag) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"That is not the correct password!\\nAccounts starting with Admin_ can only be used by admins!\");\n\t\t\t\t}\n\t \t\telse {\n\t \t\t\tString res = ClientNetwork.createAccountOnServer(Us.getText().toString(), p1.getPassword());\t\t\n\t\t\t\t\tif (res.equals(\"usernameFail\") || res.equals(\"passwordFail\") || res.equals(\"takenFail\") || flag) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Account Registration failed because of the following error: \"+res);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tClientNetwork.setAccountType(res, accountType);\n\t\t\t\t\t\tTitleScreen.UserProfile = ClientNetwork.loginToServer(Us.getText().toString(), p1.getPassword()).getP();\n\t\t\t\t\t\t//TitleScreen.UserProfile.setAccountType(accountType);\n\t\t\t\t\t\tTitleScreen.UserID = TitleScreen.UserProfile.getUserID();\n\t\t\t\t\t\tClientNetwork.setPlayerCurrency(TitleScreen.UserID, 500);\n\t\t\t\t\t\tsetVisible(false);\n\t\t\t\t\t\tremoveAll();\n\t\t\t\t\t\tMainMenu.main(args);\n\t\t\t\t\t}\n\t \t\t}\n\t\t\t}\n\t\t\tsubmit.setVisible(true);\n });\t\t\n\t\tLogin.addActionListener((ActionEvent event) -> {\n\t\t\tLoginScreen.main(args);\n\t\t\tremoveAll();\n\t\t\tthis.setVisible(false);\n });\n\t\tclear.addActionListener((ActionEvent event) -> {\n\t\t\tUs.setText(\"\");\n\t\t\tp1.setText(\"\");\n\t\t\tp2.setText(\"\");\n });\n\t}",
"private void goToAddStripAccount() {\n hidePaymentUi();\n mBinding.includeActionBar.tvTitle.setText(R.string.addStripAccount);\n mFragment = new StripeAccountFragment();\n if (!mFragment.isAdded()) {\n this.getSupportFragmentManager().beginTransaction()\n .replace(R.id.flContainer, mFragment).commit();\n }\n }",
"private void createAccountButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createAccountButtonActionPerformed\n na.setVisible(true);\n boolean isLoggedInNew = uL.isLoggedIn();\n boolean isLoggedIn = na.isLoggedIn();\n if (isLoggedInNew || isLoggedIn) {\n dm.messageMustLogOut();\n na.dispose();\n }\n }",
"public void createSetupPlayersScreen() {\r\n\t\t//Create the 3 panel components of the screen.\r\n\t\tupperPanel = FrameUtils.makeUpperPanel(\"setup players\");\r\n\t\tmiddlePanel = FrameUtils.makeMiddlePanel();\r\n\t\tlowerPanel = FrameUtils.makeLowerPanel();\r\n\t\t\r\n\t\t//Creates the choice box.\r\n\t\tchoiceBoxPlayer1 = FrameUtils.makePlayerList();\r\n\t\tchoiceBoxPlayer2 = FrameUtils.makePlayerList();\r\n\t\tchoiceBoxPlayer3 = FrameUtils.makePlayerList();\r\n\t\tchoiceBoxPlayer4 = FrameUtils.makePlayerList();\r\n\r\n\t\t//Make all the needed buttons.\r\n\t\tbuttonClearPlayers = FrameUtils.makeButton(\" Clear \", \"clearPlayers\", false);\r\n\t\tbuttonClearPlayers.addActionListener(this);\r\n\t\tbuttonContinueSetup2 = FrameUtils.makeButton(\" Continue \", \"continueSetup2\", false);\r\n\t\tbuttonContinueSetup2.addActionListener(this);\r\n\t\tbuttonReturnPlayers = FrameUtils.makeButton(\" Return \", \"returnPlayers\", false);\r\n\t\tbuttonReturnPlayers.addActionListener(this);\r\n\r\n\t\t//Add the buttons to the proper panels.\r\n\t\tlowerPanel.add(buttonClearPlayers);\r\n\r\n\t\t//Adds the appropriate button to the panel depending if setup has been\r\n\t\t//shown previously.\r\n\t\tif (Main.isSetupDone) {\r\n\t\t\tlowerPanel.add(buttonReturnPlayers);\r\n\t\t} else {\r\n\t\t\tlowerPanel.add(buttonContinueSetup2);\r\n\t\t}\r\n\r\n\t\t//Add items to the middle panel.\r\n\t\tmiddlePanel.setLayout(new GridBagLayout());\r\n\t\tmiddlePanel.add(player1Label, FrameUtils.gbLayoutNormal(0, 0));\r\n\t\tmiddlePanel.add(choiceBoxPlayer1, FrameUtils.gbLayoutNormal(1, 0));\r\n\t middlePanel.add(player2Label, FrameUtils.gbLayoutNormal(0, 1));\r\n\t\tmiddlePanel.add(choiceBoxPlayer2, FrameUtils.gbLayoutNormal(1, 1));\r\n\t\tmiddlePanel.add(player3Label, FrameUtils.gbLayoutNormal(0, 2));\r\n\t\tmiddlePanel.add(choiceBoxPlayer3, FrameUtils.gbLayoutNormal(1, 2));\r\n\r\n\t\t//Hide the check boxes if the game has not been started.\r\n\t\tif (Main.isGameStarted) {\r\n\t\t\tmiddlePanel.add(player1Checkbox, FrameUtils.gbLayoutNormal(2, 0));\r\n\t\t\tplayer1Checkbox.addItemListener(this);\r\n\t\t\tmiddlePanel.add(player2Checkbox, FrameUtils.gbLayoutNormal(2, 1));\r\n\t\t\tplayer2Checkbox.addItemListener(this);\r\n\t\t\tmiddlePanel.add(player3Checkbox, FrameUtils.gbLayoutNormal(2, 2));\r\n\t\t\tplayer3Checkbox.addItemListener(this);\r\n\t\t\t\r\n\t\t\t//Disable players if the clear button was pressed.\r\n\t\t\tif (player1Checkbox.getState()) {\r\n\t\t\t\tchoiceBoxPlayer2.setEnabled(false);\r\n\t\t\t\tchoiceBoxPlayer3.setEnabled(false);\r\n\t\t\t\tchoiceBoxPlayer4.setEnabled(false);\r\n\t\t\t}\r\n\t\t\tif (player2Checkbox.getState()) {\r\n\t\t\t\tchoiceBoxPlayer1.setEnabled(false);\r\n\t\t\t\tchoiceBoxPlayer3.setEnabled(false);\r\n\t\t\t\tchoiceBoxPlayer4.setEnabled(false);\r\n\t\t\t}\r\n\t\t\tif (player3Checkbox.getState()) {\r\n\t\t\t\tchoiceBoxPlayer1.setEnabled(false);\r\n\t\t\t\tchoiceBoxPlayer2.setEnabled(false);\r\n\t\t\t\tchoiceBoxPlayer4.setEnabled(false);\r\n\t\t\t}\r\n\t\t\tif (player4Checkbox.getState()) {\r\n\t\t\t\tchoiceBoxPlayer1.setEnabled(false);\r\n\t\t\t\tchoiceBoxPlayer2.setEnabled(false);\r\n\t\t\t\tchoiceBoxPlayer3.setEnabled(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Don't show fourth player if playing three handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tmiddlePanel.add(player4Label, FrameUtils.gbLayoutNormal(0, 3));\r\n\t\t\tmiddlePanel.add(choiceBoxPlayer4, FrameUtils.gbLayoutNormal(1, 3));\r\n\t\t\t\r\n\t\t\t//Hide the check boxes if the game has not been started.\r\n\t\t\tif (Main.isGameStarted) {\r\n\t\t\t\tmiddlePanel.add(player4Checkbox, FrameUtils.gbLayoutNormal(2, 3));\r\n\t\t\t\tplayer4Checkbox.addItemListener(this);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Shows the previous players, if there were any.\r\n\t\tUtils.showPreviousPlayerNames();\r\n\t\t\r\n\t\t//This adds all the panels to the frame.\r\n\t\tframe.add(upperPanel, BorderLayout.NORTH);\r\n\t\tframe.add(middlePanel, BorderLayout.CENTER);\r\n\t\tframe.add(lowerPanel, BorderLayout.SOUTH);\r\n\t\t\r\n\t\tframe.setVisible(true);\r\n\t}",
"private void userWindow(){\r\n flashWindow.dispose();\r\n userWindow =new JFrame(\"User Window\");\r\n userWindow.setLayout(null);\r\n accountTabs(userWindow);\r\n userWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n userWindow.setSize(getWidth(), getHeight());\r\n userWindow.setResizable(true);\r\n userWindow.setVisible(true);\r\n }",
"private void createpanel4() {\r\n\t\tpanels[3].setLayout(new FlowLayout(FlowLayout.CENTER, 20, 0));\r\n\r\n\t\texecute = new JButton(\"Login\") {\r\n\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\tg.drawImage(ImageLoader.getImage(\"black_0.4\"), 0, 0, null);\r\n\t\t\t\tsuper.paint(g);\r\n\t\t\t}\r\n\t\t};\r\n\t\texecute.setOpaque(false);\r\n\t\tif (System.getProperty(\"os.name\").startsWith(\"Windows\"))\r\n\t\t\texecute.setForeground(Color.WHITE);\r\n\t\telse\r\n\t\t\texecute.setForeground(Color.BLACK);\r\n\t\texecute.setBorderPainted(true);\r\n\t\texecute.setContentAreaFilled(false);\r\n\t\texecute.setFont(customFont.deriveFont(15f));\r\n\r\n\t\tcancel = new JButton(\"Cancel\") {\r\n\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\tg.drawImage(ImageLoader.getImage(\"black_0.4\"), 0, 0, null);\r\n\t\t\t\tsuper.paint(g);\r\n\t\t\t}\r\n\t\t};\r\n\t\tcancel.setOpaque(false);\r\n\t\tif (System.getProperty(\"os.name\").startsWith(\"Windows\"))\r\n\t\t\tcancel.setForeground(Color.WHITE);\r\n\t\telse\r\n\t\t\tcancel.setForeground(Color.BLACK);\r\n\t\tcancel.setBorderPainted(true);\r\n\t\tcancel.setContentAreaFilled(false);\r\n\t\tcancel.setFont(customFont.deriveFont(15f));\r\n\r\n\t\tcreateAccount = new JButton(\"New Account\") {\r\n\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\tg.drawImage(ImageLoader.getImage(\"black_0.4\"), 0, 0, null);\r\n\t\t\t\tsuper.paint(g);\r\n\t\t\t}\r\n\t\t};\r\n\t\tcreateAccount.setOpaque(false);\r\n\t\tif (System.getProperty(\"os.name\").startsWith(\"Windows\"))\r\n\t\t\tcreateAccount.setForeground(Color.WHITE);\r\n\t\telse\r\n\t\t\tcreateAccount.setForeground(Color.BLACK);\r\n\t\tcreateAccount.setBorderPainted(true);\r\n\t\tcreateAccount.setContentAreaFilled(false);\r\n\t\tcreateAccount.setFont(customFont.deriveFont(10f));\r\n\r\n\t\tcancel.setPreferredSize(new Dimension(120, 30));\r\n\t\tcreateAccount.setPreferredSize(new Dimension(120, 30));\r\n\t\texecute.setPreferredSize(new Dimension(120, 30));\r\n\r\n\t\tpanels[3].add(execute);\r\n\t\tpanels[3].add(createAccount);\r\n\t\tpanels[3].add(cancel);\r\n\t\tpanels[3].setOpaque(false);\r\n\t\tallComponents.add(panels[3]);\r\n\t\tthis.backPanel.add(allComponents);\r\n\t\tthis.getContentPane().add(backPanel);\r\n\t\tpanels[3].revalidate();\r\n\r\n\t\tcreateAccount.addMouseListener(\r\n\t\t\t\tnew LoginListener(createAccount, userinfo, passwordbox, guicontroller, cancel, createAccount));\r\n\t\tcancel.addMouseListener(new LoginListener(cancel, userinfo, passwordbox, guicontroller, cancel, createAccount));\r\n\t\texecute.addMouseListener(\r\n\t\t\t\tnew LoginListener(execute, userinfo, passwordbox, guicontroller, cancel, createAccount));\r\n\t}",
"public void goToScheduleArcTypeCreateScreen() {\n\t\tdisplay.resetView();\n\t\tdisplay.scheduleArcTypeCreateScreen();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loops through all integers between 1 and the max int value, checks to see if each number is a multiple of all the integers between 3 and 20. | public void smallestMultiple(){
outerLoop: for( int i = 2; i < Integer.MAX_VALUE; i++ ){
for( int j = 3; j <= 20; j++ )
if( i % j != 0 )
continue outerLoop;
System.out.println( i );
break;
}
} | [
"public boolean isMultiple20(double n)\n {\n while ( n > 0 ) {\n n = n - 20;\n if (n == 0) {\n return true;\n }\n }\n return false;\n }",
"public boolean more20(int n) {\r\n if(n % 20 <= 2 && n % 20 > 0 )\r\n return true;\r\n else return false;\r\n}",
"static int multiplesOf3And5(int n) {\n int response = 0;\n for (int i = 0; i < n; i++) {\n if (i % 3 == 0 || i % 5 == 0) {\n response += i;\n }\n }\n return response;\n }",
"public static int sumOfMultiplesOf3Or5(int limit) {\n int total = 0;\n \n for (int i = 0; i < limit; i++) {\n \n if(isMultiple(i, 3) || isMultiple(i, 5)) {\n total += i;\n } \n } \n \n return total;\n }",
"void findDivisibleBy5and3(int startNumber, int stopNumber) {\n\t\tSystem.out.println(\"Divisible by 5 & 3, numbers are:\");\n\t\tfor (int i=startNumber; i<=stopNumber; i++) {\n\t\t\tif (i%5 ==0 && i%3 ==0) {\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t}",
"public static boolean isPowerof3(int num){\n\t\tif (Math.pow(3,20) % num == 0){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\n\t\t// while (num % 3 == 0){\n\t\t// \tnum /= 3;\n\t\t// \tif (num == 1){\n\t\t// \t\treturn true;\n\t\t// \t}\n\t\t// }\n\t\t// return false;\n\t}",
"public static void main(String[] args) {\n int smallestMult = 0;\n\n //multFound will end the loop iterating through numbers to find the smallestMult\n boolean multFound = false;\n\n //divCounter counts how many integers, one through the upperLimit, divide evenly\n //we want divCounter to equal 20 because we need all 20 integers to divide evenly\n int divCounter = 0;\n\n //upperLimit is the variable for the largest number the multiple must be\n //divisible by\n int upperLimit= 20;\n\n //var is our variable that will be incremented and tested for divisibility \n int var= upperLimit;\n\n //while loop iterates through numbers until a multiple is found\n while (multFound==false){\n \n //for loop iterates through divisions 1-20 and increments divCounter for \n //each one that divides evenly\n for (int i=1; i<=upperLimit; i++){\n if (var % i == 0){\n divCounter++;\n }\n }\n\n /*if loop sets up the end of program if div is found\n * it transfers the smallest multiple from var to smallestMult \n * changes the condition of multFound to true to exit the while loop\n */\n if (divCounter == upperLimit){\n smallestMult= var;\n multFound = true;\n }\n\n //reset divCounter for next iteration in case smallestMult\n //is not found\n divCounter= 0;\n\n //increments var by upperLimit for next iteration in case smallestMult\n //is not found\n var += upperLimit;\n }\n\n //print smallestMult\n System.out.println(smallestMult);\n }",
"private static boolean checkBy3 (int a) {\n return a % 3 == 0;\n }",
"private int checkRange(int number,int range){\n return (number+range)%range;\n }",
"public static void main(String[] args)\n\t{\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\tint smallestNumber = 0;\n\t\tboolean loopCheck = true;\n\t\tArrayList<Integer> checkList = new ArrayList<Integer>();\n\t\t\n\t\t//add all integers between 11 - 20 that do not evenly divide 2520\n\t\tfor(int i = 11; i < 21; i++)\n\t\t\tif(INCREMENT % i != 0)\n\t\t\t\tcheckList.add(i);\n\t\t\n\t\t//this loop checks for the smallest number that is evenly divisible by 1 - 20\n\t\twhile(loopCheck)\n\t\t{\n\t\t\tsmallestNumber += INCREMENT;\n\t\t\t\n\t\t\tfor(Integer x : checkList)\n\t\t\t{\n\t\t\t\tif(smallestNumber % x != 0)\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tif(x == checkList.get(checkList.size() - 1))\n\t\t\t\t\tloopCheck = false;\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.print(\"The smallest positive number that is evenly divisible by all\");\n\t\tSystem.out.println(\" of the numbers from 1 to 20 is \" + smallestNumber + \".\");\n\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\n\t\tSystem.out.println(\"That took \" + (endTime - startTime) + \" milliseconds.\");\n\t}",
"private static void addAllMultiplesOfFive()\n\t{\n\t\tfor (int i = 0; i <= MAX_NUMBER; i += 5)\n\t\t{\n\t\t\tboolean isDivisibleByThree = i % 3 == 0;\n\t\t\tif (!isDivisibleByThree)\n\t\t\t{\n\t\t\t\tanswerSum += i;\n\t\t\t}\n\t\t}\n\t}",
"private void checkDivisibleByThree() {\n\t}",
"public boolean or35 (int n) {\n if ( (n % 3 == 0) || (n % 5 == 0)){\n return true;\n }\n return false;\n}",
"public static boolean isMultiple(int x, int y)\r\n\t{\r\n\t\tif (x % y != 0)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}",
"public int restrictNumber(int num) {\n\t\tif (num <= 5) {\n\t\t\treturn num;\n\t\t}\n\t\tfor (int i = 5; (i + 5) <= 20; i += 5) {\n\t\t\tif (num == (i+5)) {\n\t\t\t\treturn num;\n\t\t\t}\n\t\t\telse if ((num > i)&&(num < i+5)) {\n\t\t\t\tnum = i + 5;\n\t\t\t\tSystem.out.println(\"If more than 5 shares\"\n\t\t\t\t\t\t+ \", \\nyou can only buy 10, 15 or \"\n\t\t\t\t\t\t+ \"20 shares \\n ---> amount changed to \" + num);\n\t\t\t}\n\t\t}\n\t\treturn num;\n\t}",
"public boolean or35(int n) {\n return (n % 3 == 0 || n % 5 == 0);\n}",
"private boolean isIntegerInRage(int x, int min, int max)\n {\n return x>=min && x<=max;\n }",
"public static boolean isMultiple(long n,long m ) {\n\t\tif (n % m == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public void multiplesOfFive()\n {\n int index = 10;\n int max = 95;\n\n while (index <= 95) {\n System.out.println(index);\n index += 5;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Returns all workouts | @PreAuthorize("hasRole('USER') or hasRole('CONTRIBUTOR') or hasRole('ADMIN')")
@GetMapping()
public ResponseEntity<List<Workout>> getAllWorkouts(){
List<Workout> workouts = workoutRepository.findAll();
HttpStatus status = HttpStatus.OK;
return new ResponseEntity<>(workouts, status);
} | [
"public List<Workout> getAllWorkoutsList() {\n Cursor workoutCursor = getWorkoutTable();\n List<Workout> workouts = new ArrayList<>();\n\n // Go through each of the workoutId\n while (workoutCursor.moveToNext()) {\n long workoutId = workoutCursor.getLong(workoutCursor.getColumnIndex(WorkoutContract.WorkoutEntry._ID));\n Workout w = getWorkout(workoutId);\n\n if (w != null) {\n workouts.add(w);\n }\n }\n workoutCursor.close();\n return workouts;\n }",
"private List<Workout> fetchWorkoutFromActivities(List<IDiaryActivity> acts) {\n List<Workout> workoutList = new ArrayList<>();\n if(acts != null) {\n for(int i=0; i<acts.size(); i++) {\n List<Workout> isl = ((WorkoutActivity) acts.get(i)).getWorkoutList();\n workoutList.addAll(isl);\n }\n }\n Log.d(\"WORKOUT\", workoutList.toString());\n return workoutList;\n }",
"public void getWorkouts()\n {\n db.open();\n Cursor cursor =db.getAllWorkouts(); //get the data form the database\n if(cursor.isAfterLast()) //check for empty table then just return\n {\n return;\n }\n cursor.moveToFirst(); //move to first position\n WorkoutSession obSession = new WorkoutSession(cursor.getLong(0), cursor.getString(1), cursor.getString(2), cursor.getString(3), cursor.getString(4), cursor.getString(5)); //create workout session from first row in db\n sessionList.add(obSession); //add to sessionList\n while(cursor.moveToNext()) //move to next row each loop\n {\n obSession = new WorkoutSession(cursor.getLong(0), cursor.getString(1), cursor.getString(2), cursor.getString(3), cursor.getString(4), cursor.getString(5)); //create anew WorkoutSession from the new row in the table\n sessionList.add(obSession); //add to sessionList\n }\n }",
"@GetMapping(\"/{id}/workouts\")\n public ResponseEntity<List<Workout>> getWorkoutsByExerciseSet(@PathVariable Long id) {\n List<Workout> workoutsByExerciseSets = new ArrayList<>();\n HttpStatus status;\n if (exerciseSetRepository.existsById(id)) {\n status = HttpStatus.OK;\n workoutsByExerciseSets = exerciseSetService.getWorkoutsByExerciseSet(id);\n } else {\n status = HttpStatus.NOT_FOUND;\n }\n return new ResponseEntity<>(workoutsByExerciseSets, status);\n }",
"public List<Work> getWork(){\n\t\tList<Work> works = new ArrayList<Work>();\n\t\tfor(DelegatedWork w: this.delegatedWork){\n\t\t\tworks.add(w);\n\t\t}\n\t\tfor(RegisteredWork w: this.registeredWork){\n\t\t\tworks.add(w);\n\t\t}\n\t\treturn works;\n\t}",
"private void getExecutionList(Workout workout) {\n mDatabase.collection(\"user\").document(mItem).collection(\"workout\")\n .document(new SimpleDateFormat(getString(R.string.date_pattern), Locale.getDefault()).format(workout.getStartDate()))\n .collection(\"execution\").get().addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {\n @Override\n public void onSuccess(QuerySnapshot queryDocumentSnapshots) {\n for (DocumentSnapshot documentSnapshot : queryDocumentSnapshots) {\n Log.d(TAG, \"Ottenuto lista esecuzione\");\n getExecutionData(documentSnapshot.toObject(ExecutionList.class));\n }\n }\n });\n }",
"public final Workout getWorkout(int index) {\r\n\t\treturn workoutList.get(index);\r\n\t}",
"@GetMapping(\"/works\")\n @Timed\n public List<Work> getAllWorks() {\n log.debug(\"REST request to get all Works\");\n if(SecurityUtils.isCurrentUserInRole(\"ROLE_ADMIN\"))\n return workRepository.findAllWithEagerRelationships();\n else\n return workRepository.findAllWithEagerRelationshipsByCurrentUserIsProjectTeam();\n }",
"Map<Integer, String> findNameWorkouts() throws DaoException;",
"List<WorkoutSession> getCurrentWeekSessions(int weekStartDay);",
"public static ArrayList<WorkoutInfo> retrieveAllWorkoutInfo() {\n\t\tFile folder = new File(\"src/res/xml\");\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tArrayList<WorkoutInfo> output = new ArrayList<WorkoutInfo>();\n\t\t//iterate through each file in the workout directory\n\t\tfor(File sourceFile: listOfFiles) {\n\t\t\ttry {\n\t\t\t\tPresentation temp;\n\t\t\t\t//check to make sure only workout presentations or PWS presentations are iterated through\n\t\t\t\tif (!sourceFile.toString().toUpperCase().endsWith(\"EXERCISE.XML\") &&\n\t\t\t\t\t\t!sourceFile.toString().toUpperCase().endsWith(\"REST.XML\")) {\n\t\t\t\t\t//check that the file is not null\n\t\t\t\t\tif (cleantextTags(sourceFile) != null) {\n\t\t\t\t\t\t//parse the XML workout to the Presentation Object\n\t\t\t\t\t\tJAXBContext jaxbContext = JAXBContext.newInstance(Presentation.class);\n\t\t\t\t\t\tUnmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();\n\t\t\t\t\t\ttemp = (Presentation) jaxbUnmarshaller.unmarshal(sourceFile);\n\t\t\t\t\t\tWorkoutInfo workout = new WorkoutInfo();\n\n\t\t\t\t\t\t/**\n * If it is a MegaFit workout, build the exercise list with the optional\n\t\t\t\t\t\t * xml elements.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (sourceFile.toString().toUpperCase().endsWith(\"WORKOUT.XML\")) {\n\t\t\t\t\t\t\tfor (int j = 0; j < temp.getSlide().size(); j++) {\n\t\t\t\t\t\t\t\tPresentation.Slide tempSlide = temp.getSlide().get(j);\n\t\t\t\t\t\t\t\t//retrieve the exercise information from each slide and construct and ExerciseInfo object\n\t\t\t\t\t\t\t\tExerciseInfo info = new ExerciseInfo(tempSlide.getExerciseName(), tempSlide.getSets(),\n\t\t\t\t\t\t\t\t\t\ttempSlide.getReps(), tempSlide.getPoints(),\n\t\t\t\t\t\t\t\t\t\ttempSlide.getSpeed(), tempSlide.getStrength(),\n\t\t\t\t\t\t\t\t\t\ttempSlide.getEndurance(), tempSlide.getAgility());\n\t\t\t\t\t\t\t\t//add the exercise information to the list in the workout info\n\t\t\t\t\t\t\t\tworkout.addExercise(info);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//set the remaining attributes of the workout info\n\t\t\t\t\t\tworkout.setName(temp.getDocumentInfo().getTitle());\n\t\t\t\t\t\tworkout.setDuration(temp.getWorkoutDuration());\n\t\t\t\t\t\tworkout.setDescription(temp.getDocumentInfo().getComment());\n\t\t\t\t\t\tworkout.setAuthor(temp.getDocumentInfo().getAuthor());\n\t\t\t\t\t\tworkout.setFileName(sourceFile.getAbsolutePath());\n\t\t\t\t\t\t//sum all the points earned from each exercise\n\t\t\t\t\t\tworkout.sumTotalPoints();\n\t\t\t\t\t\t//add the workout information to the output list\n\t\t\t\t\t\toutput.add(workout);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (JAXBException e) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}",
"public void addDefaultWorkouts() {\n DatabaseHelper databaseHelper = new DatabaseHelper(context);\n for (int i = 0; i < builtIns.length; i++) {\n if (builtIns[i].getDurations().length == builtIns[i].getDurations().length) {\n if (databaseHelper.insertWorkout(builtIns[i].getName())) {\n databaseHelper.fillWorkout(builtIns[i].getName(),\n builtIns[i].getActivities(),\n builtIns[i].getDurations());\n }\n }\n }\n }",
"List<String> getAllWorkspaces();",
"public void printWorkout() {\n for (Exercise e : workout) {\n System.out.println(e);\n }\n }",
"public Cursor getWorkoutTable() {\n String sql = \"select * from \" + WorkoutEntry.TABLE_NAME;\n return db.rawQuery(sql, null);\n }",
"public List<Workout> getWorkoutListFromDate(Date d) {\n List<IDiaryActivity> activities = getActivitiesFromDate(d);\n return fetchWorkoutFromActivities(activities);\n }",
"List<CleanWorkRequest> getAllWorkOrders();",
"List<WorkingSchedule> getAll();",
"public WorkoutId getWorkoutId(){return this.mWorkoutId;}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new HelloSign Landing page. | public LandingPage() {
super(true);
} | [
"Page createPage();",
"private void createFirstPage() {\n BooleanSupplier showWelcomePage = () -> !FirstRunStatus.shouldSkipWelcomePage();\n mPages.add(new FirstRunPage<>(SigninFirstRunFragment.class, showWelcomePage));\n mFreProgressStates.add(MobileFreProgress.WELCOME_SHOWN);\n mPagerAdapter = new FirstRunPagerAdapter(FirstRunActivity.this, mPages);\n mPager.setAdapter(mPagerAdapter);\n // Other pages will be created by createPostNativeAndPoliciesPageSequence() after\n // native and policy service have been initialized.\n }",
"public signpage() {\n initComponents();\n \n }",
"public void makeLoginPage() {\n new LoginPage(primaryStage);\n }",
"public MainPage() {\n initComponents();\n \n initPage();\n }",
"public HomePage() {\n }",
"void createPage0() {\n\n\t}",
"public void createPage() {\n AddPageCommand c = new AddPageCommand(this);\n PagePane p = new PagePane();\n PageModel m = (PageModel) p.getModel();\n String pageKey = EnumFactory.getInstance().createKey(EnumFactory.PAGE);\n m.setKey(pageKey);\n m.setEnum(EnumFactory.getInstance().createEnum(EnumFactory.PAGE));\n c.add(p);\n execute(c);\n }",
"public CreateLeadPage()\r\n\t{\r\n\t\t\r\n\t\tPageFactory.initElements(driver, this);\r\n\r\n\t}",
"public Page (String name) {\n pageName = name;\n backgroundImageName = \"\"; // TODO: are we setting a background image when you create a page?\n }",
"public TeamsPage(){\n topMenuPage = new TopMenuPage();\n boardsMenuPage = new BoardsMenuPage();\n waitUntilPageObjectIsLoaded();\n }",
"private final void createAppPages() {\r\n\t\t//Instantiate Page objects that have no associated test properties\r\n\t\t//Note that if a test DOES need to specify test properties for one of these pages\r\n\t\t// (e.g., search terms), it can create its own local version of the page, and pass\r\n\t\t// the pagePropertiesFilenameKey argument, OR create it here, by calling createPage\r\n\t\t// instead of createStaticPage\r\n\r\n\t\t//Can also instantiate regular (i.e., with associated test properties) DD-specific\r\n\t\t// Page objects here, but typically it is best for the test or utility methods to do that;\r\n\t\t// if we do it here we may end up creating Page objects that never get used.\r\n }",
"public GarageOwnerPage() {\n initComponents();\n }",
"void makeStationGraphPage() {\n new StationAnalyticsPage(secondaryStage);\n }",
"public LoginPageUI() {\n initComponents();\n homePage = new HomePageUI(this);\n }",
"public StartPage() {\n initComponents();\n }",
"@GET\n @Path(\"\")\n @Produces(MediaType.TEXT_HTML)\n public String landingPage() {\n return AboutPage.toHtml();\n }",
"public LandingPage navigateToMainPage() {\n open(PropertiesReader.getProperty(\"URL\"));\n return this;\n }",
"@Override\r\n\tprotected void createPages() {\r\n\t\tcreatePage0();\r\n\t\tcreatePage1();\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the properties associated with content. This effectively removes all of the current content properties and adds a new set of properties. Some properties, such as system properties provided by the underlying storage system, cannot be updated or removed. Some of the values which cannot be updated or removed: contentchecksum, contentmodified, contentsize | public void setContentProperties(String spaceId,
String contentId,
Map<String, String> contentProperties)
throws ContentStoreException; | [
"private void writeProperties() {\n propsMutex.writeAccess(new Runnable() {\n public void run() {\n OutputStream out = null;\n FileLock lock = null;\n try {\n FileObject pFile = file.getPrimaryFile();\n FileObject myFile = FileUtil.findBrother(pFile, extension);\n if (myFile == null) {\n myFile = FileUtil.createData(pFile.getParent(), pFile.getName() + \".\" + extension);\n }\n lock = myFile.lock();\n out = new BufferedOutputStream(myFile.getOutputStream(lock));\n props.store(out, \"\");\n out.flush();\n lastLoaded = myFile.lastModified();\n logger.log(Level.FINE, \"Written AssetData properties for {0}\", file);\n } catch (IOException e) {\n Exceptions.printStackTrace(e);\n } finally {\n if (out != null) {\n try {\n out.close();\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n if (lock != null) {\n lock.releaseLock();\n }\n }\n }\n });\n }",
"@Override\n public void updateProperties() {\n // unneeded\n }",
"void setProperties(String url, StorageServiceProperties storageServiceProperties);",
"void _properties(int properties) {\n this.properties = 0;\n }",
"void addOrReplaceProperty(Property prop, Collection<Property> properties);",
"public static void setProperties(Properties properties)\r\n {\r\n //todo should I fire events here? who knows...\r\n //to do it properly, it has to set one property at the time\r\n //this would fire property change events\r\n props = properties;\r\n try\r\n {\r\n saveFile();\r\n }\r\n catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }",
"public void update(\n final Properties properties\n ) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"public static synchronized void setProperties(Properties props) {\n PropertiesManager.props = props;\n }",
"@Override\r\n \tpublic boolean setAllProperties(Map<String, Object> properties) {\r\n \t\tfor (String attr : properties.keySet()) {\r\n \t\t\tObject value = properties.get(attr);\r\n \t\t\tif (! setProperty(attr, value))\r\n \t\t\t\treturn false;\r\n \t\t}\r\n \t\t\r\n \t\treturn true ;\r\n \t}",
"protected void UpdateProperties(final Map<String, Object> props){\n //loop through the properties keys, check to see if it already exists,\n //if it does, update it, if it doesn't add it.\n props.keySet().forEach((k) -> {\n if(this.properties.get(k) == null){\n this.properties.put(k, props.get(k));\n }else{\n this.properties.replace(k, props.get(k));\n }\n }\n );\n }",
"BlobServiceProperties refresh();",
"public void setProperties(final Map<String, EventProperty> properties) {\n mStorage.setProperties(properties);\n }",
"public static void updateProperties(Properties props) {\n\t\tif(props == null) {\n\t\t\tSystem.out.println(\"ATTEMPT TO SET NULL PROPERTIES. Leaving old properties as is: \");\n\t\t\treturn;\n\t\t}\n\t\tproperties = props;\n\t}",
"protected void setContents(Object contents) {\n\t}",
"protected void storeProperties(final List<Property> properties) {\n for (Property property : properties) {\n getJdbcTemplate().update(\n INSERT_PROPERTY,\n new Object[] {\n property.resourceId,\n property.localPath,\n property.value.substring(\n 0,\n Math.min(property.value.length(),\n databaseIndexPrefixLength)).toLowerCase(),\n property.position });\n }\n }",
"public void setMessageContent(String content) {\n int clength = (content == null? 0: content.length());\n try {\n this.contentLengthHeader.setContentLength(clength);\n } catch (InvalidArgumentException ex) {}\n messageContent = content;\n messageContentBytes = null;\n messageContentObject = null;\n }",
"public static void processChangePropertyRequest(XServer xServer, Client client, byte mode, int bytesRemaining, Window w, Hashtable<Integer, Property> properties) throws IOException {\n InputOutput io = client.getInputOutput();\n\n if (bytesRemaining < 16) {\n io.readSkip(bytesRemaining);\n ErrorCode.write(client, ErrorCode.Length, RequestCode.ChangeProperty, 0);\n return;\n }\n\n int pid = io.readInt(); // Property atom.\n int tid = io.readInt(); // Type atom.\n byte format = (byte) io.readByte(); // Format.\n\n io.readSkip(3); // Unused.\n\n int length = io.readInt(); // Length of data.\n int n, pad;\n\n if (format == 8) n = length;\n else if (format == 16) n = length * 2;\n else n = length * 4;\n\n pad = -n & 3;\n\n bytesRemaining -= 16;\n if (bytesRemaining != n + pad) {\n io.readSkip(bytesRemaining);\n ErrorCode.write(client, ErrorCode.Length, RequestCode.ChangeProperty, 0);\n return;\n }\n\n byte[] data = new byte[n];\n\n io.readBytes(data, 0, n);\n io.readSkip(pad); // Unused.\n\n Atom property = xServer.getAtom(pid);\n\n if (property == null) {\n ErrorCode.write(client, ErrorCode.Atom, RequestCode.ChangeProperty, pid);\n return;\n }\n\n if (!xServer.atomExists(tid)) {\n ErrorCode.write(client, ErrorCode.Atom, RequestCode.ChangeProperty, tid);\n return;\n }\n\n Property p;\n\n if (properties.containsKey(pid)) {\n p = properties.get(pid);\n } else {\n p = new Property(pid, tid, format);\n properties.put(pid, p);\n }\n\n if (mode == 0) { // Replace.\n p._type = tid;\n p._format = format;\n p._data = data;\n } else {\n if (tid != p._type || format != p._format) {\n ErrorCode.write(client, ErrorCode.Match, RequestCode.ChangeProperty, 0);\n return;\n }\n\n if (p._data == null) {\n p._data = data;\n } else {\n byte[] d1, d2;\n\n if (mode == 1) { // Prepend.\n d1 = data;\n d2 = p._data;\n } else { // Append.\n d1 = p._data;\n d2 = data;\n }\n\n p._data = new byte[d1.length + d2.length];\n System.arraycopy(d1, 0, p._data, 0, d1.length);\n System.arraycopy(d2, 0, p._data, d1.length, d2.length);\n }\n }\n\n Vector<Client> sc;\n\n if ((sc = w.getSelectingClients(EventCode.MaskPropertyChange)) != null) {\n for (Client c : sc) {\n if (c == null) continue;\n EventCode.sendPropertyNotify(c, w, property, xServer.getTimestamp(), 0);\n }\n }\n\n // trigger callback for event change if existent\n if(p._onPropertyChange != null) p._onPropertyChange.onPropertyChanged(p._data, xServer.getAtom(tid));\n }",
"public synchronized void updateProperties(User user, Properties properties) {\r\n for (Property property : properties.getProperty()) {\r\n user.getProperties().getProperty().add(property);\r\n }\r\n this.putUser(user);\r\n }",
"public static void setAllDFPPropertiesInCache(List<LineItemDTO> propertiesList, String key){ \n\t \tkey = ALL_PROPERTIES_DFP_KEY+\"-\"+key;\n\t\t\tlog.info(\"setDFPPropertiesInCache : memcache key:\"+key);\t\t\t\n\t\t\tif(memcache !=null && memcache.contains(key)){\n\t \t\tmemcache.delete(key);\n\t \t}\n\t \tmemcache.put(key, propertiesList, Expiration.byDeltaSeconds(expireInDay));\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List device commands that match the given criteria. | ISearchResults<? extends IDeviceCommand> listDeviceCommands(IDeviceCommandSearchCriteria criteria)
throws SiteWhereException; | [
"public List<Command> getCommands();",
"public static void listAllCommands(){\n printLine();\n System.out.println(\" Hello there! Here are all the available commands and their respective formats:\");\n System.out.println(\" To add a deadline: \\\"deadline {Name of task} /by {date} \\\"\");\n System.out.println(\" To add an event: \\\"event {Name of task} /at {date} \\\" \\\");\");\n System.out.println(\" To add an item in todo: \\\"todo {Name of task}\\\" \");\n System.out.println(\" To list out all tasks that you have entered: \\\"list\\\"\");\n System.out.println(\" To filter task by date: \\\"list {date}\\\"\");\n System.out.println(\" To mark a task as completed: \\\"done {index of task in list}\\\"\");\n System.out.println(\" To delete a task: \\\"delete {index of task in list}\\\"\");\n System.out.println(\" To find a task: \\\"find {keyword to be searched }\\\"\");\n printLine();\n }",
"private List<Command> getMatchingCommands(String arg) {\n List<Command> result = new ArrayList<Command>();\n \n // Grab the commands that match the argument.\n for (Entry<String,Command> entry : commands.entrySet()) {\n if (arg.equalsIgnoreCase(entry.getKey())) {\n result.add(entry.getValue());\n }\n }\n \n return result;\n }",
"Commandes getCmdsIf();",
"public String getCommandList()\n {\n String toPrint = \"\";\n for(String command : validCommands) {\n \tif(!command.equals(\"1\") && !command.equals(\"2\") && !command.equals(\"3\")) {\n \t\ttoPrint += command + \" \";\n \t}\n \t//1, 2 or 3 are only valid commands when events are playing, therefore they are not printed here.\n }\n return toPrint;\n }",
"ArrayList<Command> getCommands(CommandType type);",
"private List<Command> getMatchingCommands(String arg) {\n\t\tList<Command> result = new ArrayList<>();\n\n\t\t// Grab the commands that match the argument.\n\t\tfor (Entry<String, Command> entry : commands.entrySet()) {\n\t\t\tif (arg.matches(entry.getKey())) {\n\t\t\t\tresult.add(entry.getValue());\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"public String[] getCommands();",
"public List<T> findMatchCommands(String input) {\n List<T> appropriateCommands = Lists.newArrayList();\n for (T command : this) {\n if (command.getPattern().startsWith(input)) {\n appropriateCommands.add(command);\n }\n }\n return appropriateCommands;\n }",
"public static List<Command> getQueryCommands() {\n return queryCommands;\n }",
"public List<AppMenuCommand> findAllCommands() {\n Query query = em.createNamedQuery(\"AppMenuCommand.findAll\");\n List<AppMenuCommand> events = query.getResultList();\n return events;\n }",
"abstract public CommandInfo[] getAllCommands(String mimeType);",
"Map<String, ShellCommand> getCommands();",
"public static ArrayList<String> getListOfAllAvailableCommandsForACertainPlayer(Player p) {\n ArrayList<String> list = new ArrayList<>();\n\n for (final Map.Entry<String, CmdProperties> entry : commandClasses.entrySet()) {\n if (p.hasPermission(entry.getValue().getPermission())) {\n list.add(entry.getKey());\n }\n }\n\n return list;\n }",
"public SortedMap<String, ShellCommand> commands();",
"Set<CommandConfigurationDTO> getCommands();",
"public static SoftwareCmd[] getCommands() {\n return commands;\n }",
"Commands getIf_commands();",
"public String showAll()\n {\n StringBuilder commandList = new StringBuilder();\n \n for(String command : validCommands.keySet()) \n {\n commandList.append( command + \" \" );\n } //for\n \n return commandList.toString();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns previous node, or throws NullPointerException if null. Use when predecessor cannot be null. The null check could be elided, but is present to help the VM. | final Node predecessor() throws NullPointerException {
Node p = prev;
if (p == null) {
throw new NullPointerException();
} else {
return p;
}
} | [
"final ThreadTest.Node predecessor() throws NullPointerException {\n ThreadTest.Node p = prev;\n if (p == null)\n throw new NullPointerException();\n else\n return p;\n }",
"public DNode getPrev() {\n\t\t\tif (!hasPrev())\n\t\t\t\treturn null;\n\t\t\treturn prev;\n\t\t}",
"public Node getPreviousNode() {\n\t\treturn previousNode;\n\t}",
"public Node getPrev() {\n return null;\n }",
"public PNode getPrev() {\n\t\treturn ver == 0 ? null : object.getNode(ver - 1);\n\t}",
"public native Node previousNode();",
"public E previous() {\n\t\tif ((pointer - 1) < 0) {\n\t\t\treturn null;\n\t\t}\n\t\tpointer--;\n\t\treturn get(pointer);\n\t}",
"public final Rule getPredecessor() {\n //ELM: in again\n//\t\treturn null; // TODO by m.zopf: because of performance reasons return here just null\n return m_pred;\n }",
"protected Node<E> getPreviousNode() {\n return previous;\n }",
"public node getPrevious() {\n\t\t\treturn previous;\n\t\t}",
"Vertex getPredecessor();",
"private T getPredecessor (BSTNode<T> current) {\n\t\twhile(current.getRight() != null) {\n\t\t\tcurrent = current.getRight();\n\t\t}\n\t\treturn current.getData();\n\n\t}",
"public Node getPrev()\r\n\t{\r\n\t\treturn prev;\r\n\t}",
"public Node getPrevious() {\n return previous;\n }",
"public Node getPredecessor() {\n\t\treturn predecessor;\n\t}",
"@Override public T previous() {\n\t\t\t\n \tif(hasPrevious()){\n \t\tLista<T>.Nodo nodo = this.anterior;\n \t\t\tthis.anterior=nodo.anterior;\n \t\t\tthis.siguiente=nodo;\n \t\treturn nodo.elemento;}\n \telse{throw new NoSuchElementException();}\n \t\n }",
"public static <T> T findPredecessor(Node<T> t) {\n if(t == null)\n return null;\n else\n return findMax(t.left);//call to helper method to find the right most node of the left sub-tree\n }",
"public int getPrevNode() {\n\t\treturn this.previousNode;\n\t}",
"NodeInterface getPredecessor() throws RemoteException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a label for each row in the file, mapping the data against the columns headers | protected List<PrintRequest.Label> createLabels(Scanner fileData) {
String columnHeadingLine = fileData.nextLine();
String[] columnHeadings = columnHeadingLine.split("\\||,");
List<String> columns = new ArrayList<>();
for (String ch : columnHeadings) {
ch = ch.trim().toLowerCase().replaceAll("\\s+", "_");
columns.add(ch);
}
List<Map<String, String>> fields = new ArrayList<>();
while(fileData.hasNext()){
String line = fileData.nextLine().trim();
if (line.isEmpty()) {
continue;
}
String[] data = line.split("\\||,");
Map<String, String> fieldMap = new HashMap<>();
for (int i = 0; i < data.length; i++) {
fieldMap.put(columns.get(i), data[i].trim());
}
fields.add(fieldMap);
}
List<PrintRequest.Label> labels = new ArrayList<>();
for (Map<String, String> field : fields) {
PrintRequest.Label label = new PrintRequest.Label(field);
labels.add(label);
}
return labels;
} | [
"private void setRowLabels(){\r\n StringBuilder rowLabels = new StringBuilder(\"Filenames\\n\\n\");\r\n int count = 0;\r\n boolean complete =false;\r\n if(displaySettings[0] == true){\r\n rowLabels.append(\"Characters\\n\\n\");\r\n count++;\r\n }\r\n if(displaySettings[1]==true){\r\n rowLabels.append(\"Words\\n\\n\");\r\n count++;\r\n }\r\n if(displaySettings[2] == true){\r\n rowLabels.append(\"Lines\\n\\n\");\r\n count++;\r\n }\r\n if(displaySettings[3] == true){\r\n rowLabels.append(\"Source Lines\\n\\n\");\r\n count++;\r\n }\r\n if(displaySettings[4] == true){\r\n rowLabels.append(\"Comment Lines\\n\");\r\n if(count < 5 ){\r\n rowLabels.append(\"\\n\");\r\n }\r\n count++;\r\n }\r\n if(count < 5){\r\n complete =true;\r\n }\r\n for(;count <4; count++){\r\n rowLabels.append(\"\\n\\n\");\r\n }\r\n if(complete){\r\n rowLabels.append(\"\\n\\n\");\r\n }\r\n rowLabel = String.valueOf(rowLabels);\r\n }",
"private void fillNumberingByRow() {\n for (int r = 0; r < super.getGridHeight(); r++) {\n for (int c = 0; c < super.getGridWidth(); c++) {\n int index = r * super.getGridWidth() + c;\n\n String fileName = String.format(this.nameMatcher, index + super.getStartTile());\n super.setTileName(r, c, fileName);\n }\n }\n }",
"static public Map<String, INDArray> readClassLabels(String path,JavaSparkContext sc) throws IOException {\n classLabels=new HashMap<>();\n DataInputStream dis = getFileStream(path,sc);\n BufferedReader br = new BufferedReader(new InputStreamReader(dis));\n\n String line;\n List<String> labelList = new LinkedList<>();\n while ((line=br.readLine())!=null)\n labelList.add(line);\n int i=0;\n //Generate 1-hot vectors\n for (String label : labelList) {\n float[] label1Hot = new float[labelList.size()];\n label1Hot[i] = 1;\n classLabels.put(label, Nd4j.create(label1Hot));\n i++;\n }\n return classLabels;\n }",
"public void mapHeader(){\r\n\t\tString header = readNextLine();\r\n\t\tif (header == null) return;\r\n\t\t\r\n\t\tString split[] = header.split(Constants.SPLIT_MARK);\r\n\t\tfor (int i=0; i < Constants.HEADER.length; i++){\r\n\t\t\tmapHeader.put(Constants.HEADER[i], Constants.UNKNOWN);\r\n\t\t\tfor (int j = 0; j < split.length; j++){\r\n\t\t\t\tif (Constants.HEADER[i].equals(split[j])){\r\n\t\t\t\t\tmapHeader.put(Constants.HEADER[i], j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void fillNumberingByColumn() {\n for (int r = 0; r < super.getGridHeight(); r++) {\n int val = r + super.getStartTile();\n\n for (int c = 0; c < super.getGridWidth(); c++) {\n String fileName = String.format(this.nameMatcher, val);\n super.setTileName(r, c, fileName);\n val += super.getGridHeight();\n }\n }\n }",
"public Table newTable(String[] rowLabel, String[] columnLabel, String[][] data) {\r\n\t\t\tint rowNumber = DEFAULT_ROW_COUNT;\r\n\t\t\tint columnNumber = DEFAULT_COLUMN_COUNT;\r\n\t\t\tif (data != null) {\r\n\t\t\t\trowNumber = data.length;\r\n\t\t\t\tcolumnNumber = data[0].length;\r\n\t\t\t}\r\n\t\t\tint rowHeaders = 0, columnHeaders = 0;\r\n\r\n\t\t\tif (rowLabel != null) {\r\n\t\t\t\trowHeaders = 1;\r\n\t\t\t}\r\n\t\t\tif (columnLabel != null) {\r\n\t\t\t\tcolumnHeaders = 1;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tTableTableElement newTEle = createTable(ownerContainer, rowNumber + rowHeaders, columnNumber\r\n\t\t\t\t\t\t+ columnHeaders, rowHeaders, columnHeaders);\r\n\t\t\t\t// append to the end of table container\r\n\t\t\t\townerContainer.getTableContainerElement().appendChild(newTEle);\r\n\r\n\t\t\t\tTable table = getTableInstance(newTEle);\r\n\t\t\t\tList<Row> rowList = table.getRowList();\r\n\t\t\t\tfor (int i = 0; i < rowNumber + rowHeaders; i++) {\r\n\t\t\t\t\tRow row = rowList.get(i);\r\n\t\t\t\t\tfor (int j = 0; j < columnNumber + columnHeaders; j++) {\r\n\t\t\t\t\t\tif ((i == 0) && (j == 0)) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tCell cell = row.getCellByIndex(j);\r\n\t\t\t\t\t\tif (i == 0 && columnLabel != null) // first row, should\r\n\t\t\t\t\t\t// fill column\r\n\t\t\t\t\t\t// labels\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (j <= columnLabel.length) {\r\n\t\t\t\t\t\t\t\tcell.setStringValue(columnLabel[j - 1]);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.setStringValue(\"\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (j == 0 && rowLabel != null) // first column,\r\n\t\t\t\t\t\t// should fill\r\n\t\t\t\t\t\t// row labels\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (i <= rowLabel.length) {\r\n\t\t\t\t\t\t\t\tcell.setStringValue(rowLabel[i - 1]);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.setStringValue(\"\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif ((data != null) && (i >= rowHeaders) && (j >= columnHeaders)) {\r\n\t\t\t\t\t\t\t\tcell.setStringValue(data[i - rowHeaders][j - columnHeaders]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn table;\r\n\r\n\t\t\t} catch (DOMException e) {\r\n\t\t\t\tLogger.getLogger(Table.class.getName()).log(Level.SEVERE, e.getMessage(), e);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tLogger.getLogger(Table.class.getName()).log(Level.SEVERE, e.getMessage(), e);\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}",
"private void addLabels()\n {\n add(my_score_label);\n add(my_level_label);\n add(my_lines_label);\n }",
"public void setRowLabel(String rowLabel) {\n this.rowLabel = rowLabel;\n }",
"private void buildTable() {\n rowData = new Object[4];\n infoTable = new JTable();\n tableModel = new DefaultTableModel();\n tableModel.setColumnIdentifiers(columnNames);\n infoTable.setModel(tableModel);\n String line;\n \n try {\n FileInputStream fin = new FileInputStream(\"ContactInfo.txt\");\n BufferedReader br = new BufferedReader(new InputStreamReader(fin)); \n \n while((line = br.readLine()) != null)\n {\n rowData[0] = line;\n for(int i = 1; i < 4; i++) {\n rowData[i] = br.readLine();\n }\n tableModel.addRow(rowData);\n } \n br.close();\n }\n catch (FileNotFoundException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n catch (IOException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }",
"public void initializeLabelByRecord(){\n\t\tfor(int i=0; i<this.recordShelf.getSize(); i++){\n\t\t\tthis.recordShelf.setLabelOfSlot(this.recordShelf.getRecordFromSlot(i), i);\n\t\t}\n\t}",
"protected String getLabel(Row row) {\n return row.getAs(ParquetConstants.LABEL);\n }",
"private Label createLabel(ParserRuleContext node, String prefix) {\n Token token = node.getStart();\n int line = token.getLine();\n int column = token.getCharPositionInLine();\n String result = prefix + \"_\" + line + \"_\" + column;\n return new Label(result);\n }",
"private void addTitles() {\n\t\ttable.add(new Label(labelResources.getString(\"id\") + SPACE),0,0);\n\t\ttable.add(new Label(labelResources.getString(\"x\") + SPACE), 1, 0);\n\t\ttable.add(new Label(labelResources.getString(\"y\") +SPACE), 2, 0);\n\t\ttable.add(new Label(labelResources.getString(\"heading\")+SPACE) , 3, 0);\n\t\ttable.add(new Label(labelResources.getString(\"penstate\")+SPACE),4, 0);\n\t}",
"private static ArrayList<LabelOffset> pass1(String inFile, String dataFile, String codeFile)\n throws FileNotFoundException, RuntimeException {\n String path = \"\";\n File inf = new File(path + inFile);\n File daf = new File(path + dataFile);\n File cof = new File(path + codeFile);\n\n if (!inf.canRead()) {\n throw new FileNotFoundException(\"Invalid input file name: \" + inFile);\n }\n\n ArrayList<LabelOffset> labels = new ArrayList<LabelOffset>();\n\n int dataCount = 0;\n int offset = 0;\n\n Scanner input = new Scanner(inf);\n String line;\n\n //to keep track of how we should parse the line\n boolean isData = false;\n boolean isCode = false;\n\n String currLab = \"\";\n\n\n while (input.hasNextLine()) {\n\n line = input.nextLine().trim();\n\n\n if (line.equals(\".data\")) {\n isData = true;\n isCode = false;\n System.out.println(\"Reading data\");\n }\n if (line.equals(\".global main\")) {\n isData = false;\n isCode = true;\n\n System.out.println(\"Reading code\");\n\n }\n Scanner curr = new Scanner(line);\n\n if (isData) {\n if (line.startsWith(\".word\")) {\n //remove .word from line then split the integers with ',' as delimiter\n line = line.replace(\".word\", \"\");\n String[] nums = line.split(\",\");\n dataCount += nums.length;\n }\n\n }\n\n\n if (isCode) {\n // labels start <label>:\n if (line.endsWith(\":\")) {\n currLab = line.replace(\":\", \"\");\n LabelOffset currCom = new LabelOffset();\n currCom.label = currLab;\n currCom.offset = offset;\n labels.add(currCom);\n } else if (!line.startsWith(\".\")) {\n offset += 4;\n }\n\n }\n\n }\n\n\n PrintWriter dataOut = new PrintWriter(daf);\n PrintWriter codeOut = new PrintWriter(cof);\n dataOut.println(dataCount * 4);\n codeOut.println(offset + 4);\n\n dataOut.close();\n codeOut.close();\n\n\n return labels;\n }",
"public Table newTable(String[] rowLabel, String[] columnLabel, double[][] data) {\r\n\t\t\tint rowNumber = DEFAULT_ROW_COUNT;\r\n\t\t\tint columnNumber = DEFAULT_COLUMN_COUNT;\r\n\t\t\tif (data != null) {\r\n\t\t\t\trowNumber = data.length;\r\n\t\t\t\tcolumnNumber = data[0].length;\r\n\t\t\t}\r\n\t\t\tint rowHeaders = 0, columnHeaders = 0;\r\n\r\n\t\t\tif (rowLabel != null) {\r\n\t\t\t\trowHeaders = 1;\r\n\t\t\t}\r\n\t\t\tif (columnLabel != null) {\r\n\t\t\t\tcolumnHeaders = 1;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tTableTableElement newTEle = createTable(ownerContainer, rowNumber + rowHeaders, columnNumber\r\n\t\t\t\t\t\t+ columnHeaders, rowHeaders, columnHeaders);\r\n\t\t\t\t// append to the end of table container\r\n\t\t\t\townerContainer.getTableContainerElement().appendChild(newTEle);\r\n\t\t\t\tTable table = getTableInstance(newTEle);\r\n\t\t\t\tList<Row> rowList = table.getRowList();\r\n\t\t\t\tfor (int i = 0; i < rowNumber + rowHeaders; i++) {\r\n\t\t\t\t\tRow row = rowList.get(i);\r\n\t\t\t\t\tfor (int j = 0; j < columnNumber + columnHeaders; j++) {\r\n\t\t\t\t\t\tif ((i == 0) && (j == 0)) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tCell cell = row.getCellByIndex(j);\r\n\t\t\t\t\t\tif (i == 0 && columnLabel != null) // first row, should\r\n\t\t\t\t\t\t// fill column\r\n\t\t\t\t\t\t// labels\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (j <= columnLabel.length) {\r\n\t\t\t\t\t\t\t\tcell.setStringValue(columnLabel[j - 1]);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.setStringValue(\"\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (j == 0 && rowLabel != null) // first column,\r\n\t\t\t\t\t\t// should fill\r\n\t\t\t\t\t\t// row labels\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (i <= rowLabel.length) {\r\n\t\t\t\t\t\t\t\tcell.setStringValue(rowLabel[i - 1]);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.setStringValue(\"\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {// data\r\n\t\t\t\t\t\t\tif ((data != null) && (i >= rowHeaders) && (j >= columnHeaders)) {\r\n\t\t\t\t\t\t\t\tcell.setDoubleValue(data[i - rowHeaders][j - columnHeaders]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn table;\r\n\r\n\t\t\t} catch (DOMException e) {\r\n\t\t\t\tLogger.getLogger(Table.class.getName()).log(Level.SEVERE, e.getMessage(), e);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tLogger.getLogger(Table.class.getName()).log(Level.SEVERE, e.getMessage(), e);\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}",
"private static void WriteHeaderFromString(WritableSheet sheet,int row,String header){\n\t\tLabel label;\n\t\tString[] arr = commaSeparatedStringToStringArray(header);\n\t\ttry{\n\t\t\tfor(int i=0;i<arr.length;i++){\n\t\t\t\tlabel = new Label(i, row, arr[i]);\n\t\t\t\tsheet.addCell(label);\n\t\t\t}\n\t\t}catch(Exception ex){\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t}",
"private static void populateTable(String name, File fileObj, Statement stat) {\n\t\tString tableName = \"\";\n\t\tScanner scan = null;\n\t\tString line = \"\";\n\t\tString[] splitLine = null;\n\t\t\n\t\ttableName = \"stevenwbroussard.\" + name;\n\t\ttry {\n\t\t\tscan = new Scanner(fileObj);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"Failed make thread with file.\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\t//use a for loop to go through, later use a while loop\n\t\twhile (scan.hasNext() != false) {\n\t\t//for (int i = 0; i < 10; i++) {\n\t\t\tline = scan.nextLine();\n\t\t\tsplitLine = line.split(\"\\\\,\");\n\t\t\t\n\t\t\t//if the type for integer column is NULL\n\t\t\tif (splitLine[0].equals(\"NULL\")) {\n\t\t\t\tsplitLine[0] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[1].equals(\"NULL\")) {\n\t\t\t\tsplitLine[1] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[4].equals(\"NULL\")) {\n\t\t\t\tsplitLine[4] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[5].equals(\"NULL\")) {\n\t\t\t\tsplitLine[5] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[7].equals(\"NULL\")) {\n\t\t\t\tsplitLine[7] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[9].equals(\"NULL\")) {\n\t\t\t\tsplitLine[9] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[11].equals(\"NULL\")) {\n\t\t\t\tsplitLine[11] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[13].equals(\"NULL\")) {\n\t\t\t\tsplitLine[13] = \"-1\";\n\t\t\t}\n\t\t\t\n\t\t\t//if the type for double column is NULL\n\t\t\tif (splitLine[6].equals(\"NULL\")) {\n\t\t\t\tsplitLine[6] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[8].equals(\"NULL\")) {\n\t\t\t\tsplitLine[8] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[10].equals(\"NULL\")) {\n\t\t\t\tsplitLine[10] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[12].equals(\"NULL\")) {\n\t\t\t\tsplitLine[12] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[14].equals(\"NULL\")) {\n\t\t\t\tsplitLine[14] = \"-1.0\";\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tstat.executeQuery(comd.insert(tableName, \n\t\t\t\t\t \t Integer.parseInt(splitLine[0]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[1]), \n\t\t\t\t\t \t splitLine[2], \n\t\t\t\t\t \t splitLine[3], \n\t\t\t\t\t \t Integer.parseInt(splitLine[4]),\n\t\t\t\t\t \t Integer.parseInt(splitLine[5]),\n\t\t\t\t\t \t Double.parseDouble(splitLine[6]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[7]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[8]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[9]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[10]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[11]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[12]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[13]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[14])));\n\t\t\t}\n\t\t\tcatch(SQLException s) {\n\t\t\t\tSystem.out.println(\"SQL insert statement failed.\");\n\t\t\t\ts.printStackTrace();\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"private void generateGenericHeaders() {\n\t\tresourcesSheet.createRow(0).createCell(0).setCellValue(\"Resources at start of last round\");\r\n\t\tresourcesSheet.createRow(1*(NUM_ROUNDS + 3)).createCell(0).setCellValue(\"Resources available in current round\");\r\n\t\tresourcesSheet.createRow(2*(NUM_ROUNDS + 3)).createCell(0).setCellValue(\"Resources discovered in last round\");\r\n\t\tresourcesSheet.createRow(3*(NUM_ROUNDS + 3)).createCell(0).setCellValue(\"Resources from eco science in last round\");\r\n\t\tresourcesSheet.createRow(4*(NUM_ROUNDS + 3)).createCell(0).setCellValue(\"Resources natural growth in last round\");\r\n\t\tresourcesSheet.createRow(5*(NUM_ROUNDS + 3)).createCell(0).setCellValue(\"Resources to country investment trust in last round\");\r\n\t\tresourcesSheet.createRow(6*(NUM_ROUNDS + 3)).createCell(0).setCellValue(\"Resources used in last round\");\r\n\t\t\r\n\t\tresourcesSheetSessionHeaders = new Row[7];\r\n\t\tfor(int resourcesDataID = 0; resourcesDataID < 7; resourcesDataID++)\r\n\t\t\tresourcesSheetSessionHeaders[resourcesDataID] = resourcesSheet.createRow(1 + resourcesDataID * (NUM_ROUNDS + 3));\r\n\t\t\r\n\t\t// towers sheet\r\n\t\ttowersSheet.createRow(0).createCell(0).setCellValue(\"Tower height before last round\");\r\n\t\ttowersSheet.createRow(NUM_ROUNDS + 4).createCell(0).setCellValue(\"Tower growth during last round\");\r\n\t\ttowersSheet.createRow(2 * (NUM_ROUNDS + 4)).createCell(0).setCellValue(\"Tower height after last round\");\r\n\t\t\r\n\t\t//prices\r\n\t\tpricesSheet.createRow(0).createCell(0).setCellValue(\"Price factor\");\r\n\t\tpricesSheet.createRow(NUM_ROUNDS + 3).createCell(0).setCellValue(\"Relative price change\");\r\n\t\tpricesSheet.createRow(2 * (NUM_ROUNDS + 3)).createCell(0).setCellValue(\"Price table\");\r\n\t}",
"public void setHeaders(String[] column_names){\n tr = new TableRow(this);\n tr.setLayoutParams(new TableRow.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT\n ));\n\n for(int i=0; i<column_names.length; i++) {\n TextView tv = new TextView(this);\n tv.setText(column_names[i]);\n tv.setTextColor(Color.BLACK);\n tv.setTextSize(header_text_size);\n tv.setPadding(header_left_padding, 0, 0, 0);\n tr.addView(tv);\n }\n tl.addView(tr);\n\n /*\n Make a row for dividers\n */\n tr = new TableRow(this);\n tr.setLayoutParams(new TableRow.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT\n ));\n for(int i=0; i<column_names.length; i++){\n TextView divider = new TextView(this);\n divider.setText(\"________________\");\n divider.setTextColor(Color.BLACK);\n divider.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT));\n divider.setPadding(5, 0, 0, 0);\n tr.addView(divider);\n }\n tl.addView(tr);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.